From 606f39b9a332d33f82eba8fc2f958adf8171e6f9 Mon Sep 17 00:00:00 2001 From: AI Bot Date: Thu, 3 Sep 2026 10:36:01 +0530 Subject: [PATCH] fix(Editor): Sync cameraProps state when auto-framing on model generation --- src/pages/Editor.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/Editor.tsx b/src/pages/Editor.tsx index 259a6fd..daa29d2 100644 --- a/src/pages/Editor.tsx +++ b/src/pages/Editor.tsx @@ -1609,6 +1609,11 @@ export default function Editor() { camera.far = radius * 100; camera.updateProjectionMatrix(); camera.lookAt(center); + + setCameraProps(prev => ({ + ...prev, + position: [center.x, center.y + (maxDim / 4), center.z + cameraZDistance] + })); } // 4. Update OrbitControls @@ -5255,6 +5260,11 @@ export default function Editor() { camera.far = radius * 100; camera.updateProjectionMatrix(); camera.lookAt(center); + + setCameraProps(prev => ({ + ...prev, + position: [center.x, center.y + (maxDim / 4), center.z + cameraZDistance] + })); } if (orbitControlsRef.current) {