Camera-framing helpers for scene/scene-manager.ts.
Shared FOV-aware fit math for two camera-framing callers:
SceneManager.centerCameraOnScene() — F-key recenter, computes
bounds from loaded geometry.
SceneManager.autoFrameCamera() — auto-frame on scene load,
uses bounds from zarr metadata.
Both paths compute or get bounds, feed scene scale to the controls,
compute distance (perspective) or zoom (orthographic), position the
camera, look at the target, then reinitialize + saveState.
fitCameraToBounds owns the shared fit math; computeSceneBoundingBox
owns scene traversal for the F-key path.
Camera-framing helpers for
scene/scene-manager.ts.Shared FOV-aware fit math for two camera-framing callers:
SceneManager.centerCameraOnScene()— F-key recenter, computes bounds from loaded geometry.SceneManager.autoFrameCamera()— auto-frame on scene load, uses bounds from zarr metadata.Both paths compute or get bounds, feed scene scale to the controls, compute distance (perspective) or zoom (orthographic), position the camera, look at the target, then reinitialize + saveState.
fitCameraToBoundsowns the shared fit math;computeSceneBoundingBoxowns scene traversal for the F-key path.