API

Interface Camera

Minimal camera contract — any camera that can provide view/projection matrices. Both ArcRotateCamera and FreeCamera implement this interface. Pure state, no scene knowledge (pillar 4b).

The view/projection matrix caches below are allocated by the camera factory via the process-global allocateMat4() singleton — F32 by default, F64 after any HPM engine is constructed (see docs/lite/architecture/36-high-precision-matrix.md). The storage type is fixed at construction and never changes.

interface Camera {
    children: SceneNode[];
    farPlane: number;
    fov: number;
    name?: string;
    nearPlane: number;
    ortho?: OrthographicBounds | null;
    viewport?: NormalizedViewport;
    worldMatrix: Mat4;
    worldMatrixVersion: number;
}

Hierarchy (View Summary)

Index
children: SceneNode[]
farPlane: number
fov: number
name?: string

Optional source/debug name. Imported glTF cameras use the glTF camera name, or camera{index} when the source definition is unnamed.

nearPlane: number
ortho?: OrthographicBounds | null

Live orthographic view-volume extents, installed by enableOrthographicCamera and mutable/animatable thereafter. Null or undefined means the camera projects perspectively through fov.

worldMatrix: Mat4
worldMatrixVersion: number