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

    Options for fitCameraToBounds.

    interface FitCameraOptions {
        lookAtTarget: Vector3;
        preserveControlsTarget?: boolean;
        logLabel?: string;
        up?: Vector3;
        viewDirection?: Vector3;
    }
    Index
    lookAtTarget: Vector3

    The point the camera should look at. Typically the bounding box center, but autoFrameCamera allows preserving an author-set target by passing controls.getFocusTarget() instead.

    preserveControlsTarget?: boolean

    If true, the controls' target is NOT updated to lookAtTarget (the caller has already set it elsewhere). When false, the helper calls controls.setTarget(lookAtTarget).

    logLabel?: string

    Identifier for the log line emitted on success — distinguishes "Camera centered on scene (F key)" from "Auto-framed camera" messages without forcing the caller to log separately.

    up?: Vector3

    The up vector the fitted view is squared to (see the up-reset in the implementation). Defaults to world +Y; SceneManager passes the scene's authored up (zarr viewer_config.up) so an author-oriented scene frames upright in ITS OWN frame rather than snapping to world Y.

    viewDirection?: Vector3

    Unit view direction for an axis-aligned preset (camera.view_axis / ?viewAxis=, resolved by view-axis.ts together with up). The camera is placed at lookAtTarget - viewDirection * distance and the box is fitted in that view's frame. Omitted ⇒ the historical pose: looking along -Z from +Z.