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

    Interface ViewContext

    One frame's camera snapshot. Read-only for consumers.

    interface ViewContext {
        camera: Camera;
        cameraWorldPosition: Vector3;
        viewDirection: Vector3;
        viewMatrix: Matrix4;
        projectionMatrix: Matrix4;
        projView: Matrix4;
        frustum: Frustum;
        isOrtho: boolean;
        viewportCss: ViewSize | null;
        drawingBuffer: ViewSize | null;
    }
    Index
    camera: Camera

    The camera the snapshot was taken from (replaced on an ortho/perspective swap).

    cameraWorldPosition: Vector3

    Camera position in world space.

    viewDirection: Vector3

    Unit view direction in world space (the camera's -Z).

    viewMatrix: Matrix4

    World → view: inverse(camera.matrixWorld).

    projectionMatrix: Matrix4

    The camera's projection matrix, as the frame renders with it.

    projView: Matrix4

    projectionMatrix × viewMatrix: world → clip.

    frustum: Frustum

    Frustum of projView.

    isOrtho: boolean

    True for a parallel projection (P[3][3] === 1).

    viewportCss: ViewSize | null

    Canvas size in CSS pixels, or null when the canvas has no layout size.

    drawingBuffer: ViewSize | null

    Drawing-buffer size in physical pixels, or null when it is empty.