API

Interface SceneNode

Common base for all scene entities: TRS transform, parent/children hierarchy, and a cached world matrix.

interface SceneNode {
    children: SceneNode[];
    metadata?: LiteMetadata;
    name: string;
    parent: IWorldMatrixProvider | null;
    position: ObservableVec3;
    rotation: EulerProxy;
    rotationQuaternion: ObservableQuat;
    scaling: ObservableVec3;
    visible?: boolean;
    worldMatrix: Mat4;
    worldMatrixVersion: number;
}

Hierarchy (View Summary)

Index
children: SceneNode[]
metadata?: LiteMetadata

User metadata. glTF loads populate metadata.gltf.extras when source extras exist.

name: string
parent: IWorldMatrixProvider | null
position: ObservableVec3
rotation: EulerProxy

Euler XYZ bidirectional proxy — reads decompose current quat; writes update quat atomically.

rotationQuaternion: ObservableQuat

Quaternion rotation — source of truth for the local matrix.

visible?: boolean

Self-visibility. Undefined/true = visible; false skips render + camera AABB. Cascade is materialized at write-time by setSubtreeVisible.

worldMatrix: Mat4
worldMatrixVersion: number