auto-git:
[change] src/app/App.tsx [change] src/app/editor-store.ts [change] src/document/migrate-scene-document.ts [change] src/document/scene-document.ts [change] src/viewport-three/ViewportCanvas.tsx [change] src/viewport-three/viewport-host.ts
This commit is contained in:
@@ -21,7 +21,8 @@ export function ViewportCanvas({ world }: ViewportCanvasProps) {
|
||||
|
||||
const viewportHost = new ViewportHost();
|
||||
hostRef.current = viewportHost;
|
||||
viewportHost.mount(container, world);
|
||||
viewportHost.mount(container);
|
||||
viewportHost.updateWorld(world);
|
||||
|
||||
return () => {
|
||||
viewportHost.dispose();
|
||||
|
||||
@@ -36,10 +36,9 @@ export class ViewportHost {
|
||||
this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
|
||||
}
|
||||
|
||||
mount(container: HTMLElement, world: WorldSettings) {
|
||||
mount(container: HTMLElement) {
|
||||
this.container = container;
|
||||
container.appendChild(this.renderer.domElement);
|
||||
this.updateWorld(world);
|
||||
this.resize();
|
||||
|
||||
this.resizeObserver = new ResizeObserver(() => {
|
||||
|
||||
Reference in New Issue
Block a user