Camera-setup helpers extracted from scene/scene-manager.ts.
Three independent behaviors live here, each pure with respect to the
scene manager (they take camera / scene / controls references in by
parameter and never reach out for instance state):
createDefaultPerspectiveCamera — read FOV / clipping defaults
from config and instantiate a THREE.PerspectiveCamera. Does
not append anything to the scene.
resetCameraToInitialPosition — reset position + look-at to the
config.camera.initialPosition home pose; the orbit-state reset
and saveState() stay in the caller because they own controls.
applyZarrViewerConfig — apply per-scene camera overrides
(position, target, target_node, up) and the optional background
color from the loaded zarr's viewer_config userData. Returns a
boolean so the caller can decide whether to skip auto-framing.
Camera-setup helpers extracted from
scene/scene-manager.ts.Three independent behaviors live here, each pure with respect to the scene manager (they take camera / scene / controls references in by parameter and never reach out for instance state):
createDefaultPerspectiveCamera— read FOV / clipping defaults fromconfigand instantiate aTHREE.PerspectiveCamera. Does not append anything to the scene.resetCameraToInitialPosition— reset position + look-at to theconfig.camera.initialPositionhome pose; the orbit-state reset and saveState() stay in the caller because they own controls.applyZarrViewerConfig— apply per-scene camera overrides (position, target, target_node, up) and the optional background color from the loaded zarr'sviewer_configuserData. Returns a boolean so the caller can decide whether to skip auto-framing.