camera.setAutoRotate
setAutoRotate(enabled: boolean, speed: number): voidEnable or disable continuous auto-rotation around the y-axis.
When enabled is true, the interaction manager starts a
requestAnimationFrame loop (RAF integration landed 2026-04-24) that
increments the scene's y-rotation by speed radians on every frame.
When enabled is false, the loop is stopped and the scene holds its
current rotation angle.
Not undoable. Does not emit any event.
enabled | boolean | true to start rotating, false to stop. |
speed | number | Rotation increment in radians per frame (default: 0.005). |
Returns: void
Example
api.camera.setAutoRotate(true, 0.01); // start fast rotation
api.camera.setAutoRotate(false); // stop rotation