fix(Editor): Sync cameraProps state when auto-framing on model generation
Build and Deploy / build-and-push (push) Successful in 49s

This commit is contained in:
AI Bot
2026-09-03 10:36:01 +05:30
parent ed8f589d49
commit 606f39b9a3
+10
View File
@@ -1609,6 +1609,11 @@ export default function Editor() {
camera.far = radius * 100; camera.far = radius * 100;
camera.updateProjectionMatrix(); camera.updateProjectionMatrix();
camera.lookAt(center); camera.lookAt(center);
setCameraProps(prev => ({
...prev,
position: [center.x, center.y + (maxDim / 4), center.z + cameraZDistance]
}));
} }
// 4. Update OrbitControls // 4. Update OrbitControls
@@ -5255,6 +5260,11 @@ export default function Editor() {
camera.far = radius * 100; camera.far = radius * 100;
camera.updateProjectionMatrix(); camera.updateProjectionMatrix();
camera.lookAt(center); camera.lookAt(center);
setCameraProps(prev => ({
...prev,
position: [center.x, center.y + (maxDim / 4), center.z + cameraZDistance]
}));
} }
if (orbitControlsRef.current) { if (orbitControlsRef.current) {