Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    State saveCameraState / restoreCameraState share with the ControlsManager: the camera, the active control instance, scene scale and the minimum pivot depth, plus the manager-owned snapshot vectors (position, rotation, up, target) they read from and write into in place.

    interface CameraStateCtx {
        camera: LuxarCamera;
        currentControls: LuxarFlyControls | LuxarOrbitControls | null;
        sceneScale: number;
        minPivotDepth: number;
        savedCameraPosition: Vector3;
        savedCameraRotation: Euler;
        savedCameraUp: Vector3;
        savedTarget: Vector3;
    }
    Index
    camera: LuxarCamera
    currentControls: LuxarFlyControls | LuxarOrbitControls | null
    sceneScale: number
    minPivotDepth: number

    Smallest camera-to-pivot distance the orbit system allows (ControlsManager.minPivotDepth()): auto-frame's min distance limit when set, capped at sceneScale·1e-3. The fly-target derivation floors the reused pivot depth here, so any depth reachable through orbit interaction round-trips exactly while flying inside the floor can't collapse the pivot onto the camera.

    savedCameraPosition: Vector3
    savedCameraRotation: Euler
    savedCameraUp: Vector3
    savedTarget: Vector3