disable OrbitControls mouse interaction on 3D overlay canvas

Rotation, scale and FOV are now driven exclusively by the scrub buttons.
Disabling OrbitControls prevents the user from accidentally rotating the
model by dragging on the canvas. The controls instance is kept for
programmatic camera updates (onRotateDrag calls controls.update()).
Damping and the redundant controls.update() in the RAF loop are removed.
This commit is contained in:
Tanish Manku committed 2026-03-13 16:26:13 -07:00
1 parent a8e375ff64
commit 5e2f82faeb
1 file changed
+1 -3
@@ -208,8 +208,7 @@ export const Model3DOverlay = React.forwardRef<Model3DOverlayHandle, Model3DOver
params.cameraTarget.y,
params.cameraTarget.z,
);
controls.enableDamping = true;
controls.dampingFactor = 0.05;
controls.enabled = false; // interaction handled via scrub buttons
controls.update();
controlsRef.current = controls;
@@ -257,7 +256,6 @@ export const Model3DOverlay = React.forwardRef<Model3DOverlayHandle, Model3DOver
// RAF loop
const animate = () => {
animFrameRef.current = requestAnimationFrame(animate);
controls.update();
renderer.render(scene, camera);
};
animate();