diff --git a/src/main.js b/src/main.js index 9e444140..ab1d7a04 100644 --- a/src/main.js +++ b/src/main.js @@ -131,7 +131,7 @@ export default async () => { } const scene = state.gltf.scenes[state.sceneIndex]; scene.applyTransformHierarchy(state.gltf); - state.userCamera.aspectRatio = canvas.width / canvas.height; + state.userCamera.perspective.aspectRatio = canvas.width / canvas.height; state.userCamera.resetView(state.gltf, state.sceneIndex); // Try to start as many animations as possible without generating conficts. @@ -458,7 +458,7 @@ export default async () => { if((canvas.width/past.width <0.5 || canvas.width/past.width>2.0 )|| (canvas.height/past.height <0.5 || canvas.height/past.height>2.0 )) { - state.userCamera.aspectRatio = canvas.width / canvas.height; + state.userCamera.perspective.aspectRatio = canvas.width / canvas.height; state.userCamera.fitViewToScene(state.gltf, state.sceneIndex); }