API

Interface LightBase

Shared base for all light types. Provides pipeline integration callbacks so render pipelines are light-agnostic.

interface LightBase {
    children: SceneNode[];
    excludedMeshIds?: ReadonlySet<string>;
    includedOnlyMeshIds?: ReadonlySet<string>;
    lightType: string;
    metadata?: LiteMetadata;
    name: string;
    parent: IWorldMatrixProvider | null;
    position: ObservableVec3;
    rotation: EulerProxy;
    rotationQuaternion: ObservableQuat;
    scaling: ObservableVec3;
    shadowGenerator?: ShadowGenerator;
    visible?: boolean;
    worldMatrix: Mat4;
    worldMatrixVersion: number;
}

Hierarchy (View Summary)

Index
children: SceneNode[]
excludedMeshIds?: ReadonlySet<string>

Mesh IDs excluded from this light. If set, these meshes are NOT lit by this light.

includedOnlyMeshIds?: ReadonlySet<string>

If non-empty, ONLY these mesh IDs are lit by this light. Takes priority over excludedMeshIds.

lightType: string
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.

shadowGenerator?: ShadowGenerator

Shadow generator attached to this light. Set this to make the light cast shadows.

visible?: boolean

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

worldMatrix: Mat4
worldMatrixVersion: number