refactor(editor): mount worker renderer in editor host (#10055)

This would allow for easier integration with current test runner, since the two column layout is removed.

The `ViewportTurboRender` canvas and its debug UI are only enabled if the extension is added, which won't affect the AFFiNE entry.

<img width="945" alt="image" src="https://github.com/user-attachments/assets/dc82daa4-cbed-4eb9-9660-28c3f7d35722" />
This commit is contained in:
doodlewind
2025-02-11 14:12:41 +00:00
parent 9ca2133e34
commit d021e4cddc
7 changed files with 84 additions and 101 deletions
@@ -12,10 +12,11 @@ presetsEffects();
export const doc = createEmptyDoc().init();
export const editor = new AffineEditorContainer();
editor.pageSpecs = editor.pageSpecs.concat([ViewportTurboRendererExtension]);
editor.edgelessSpecs = editor.edgelessSpecs.concat([
editor.pageSpecs = [...editor.pageSpecs, ViewportTurboRendererExtension];
editor.edgelessSpecs = [
...editor.edgelessSpecs,
ViewportTurboRendererExtension,
]);
];
editor.doc = doc;
editor.mode = 'edgeless';