Interface DirectionalLight
children: SceneNode[];
diffuse: [number, number, number];
direction: ObservableVec3;
excludedMeshes?: ReadonlySet<Mesh>;
excludedMeshIds?: ReadonlySet<string>;
includedOnlyMeshes?: ReadonlySet<Mesh>;
includedOnlyMeshIds?: ReadonlySet<string>;
intensity: number;
lightType: "directional";
metadata?: LiteMetadata;
name: string;
parent: IWorldMatrixProvider | null;
position: ObservableVec3;
rotation: EulerProxy;
rotationQuaternion: ObservableQuat;
scaling: ObservableVec3;
shadowGenerator?: ShadowGenerator;
specular: [number, number, number];
visible?: boolean;
worldMatrix: Mat4;
worldMatrixVersion: number;
}
Hierarchy (View Summary)
- LightBase
- DirectionalLight
Properties
children
diffuse
Readonlydirection
Optionalexcluded Meshes
Meshes excluded from this light by object identity. Applied before the ID sets.
Optionalexcluded Mesh Ids
Mesh IDs excluded from this light. If set, these meshes are NOT lit by this light.
Optionalincluded Only Meshes
If non-empty, ONLY these meshes are lit by this light, minus any in excludedMeshes. Applied before the ID sets.
Optionalincluded Only Mesh Ids
If non-empty, ONLY these mesh IDs are lit by this light. Takes priority over excludedMeshIds.
intensity
Readonlylight Type
Optionalmetadata
User metadata. glTF loads populate metadata.gltf.extras when source extras exist.
name
parent
Readonlyposition
Readonlyrotation
Euler XYZ bidirectional proxy — reads decompose current quat; writes update quat atomically.
Readonlyrotation Quaternion
Quaternion rotation — source of truth for the local matrix.
Readonlyscaling
Optionalshadow Generator
Shadow generator attached to this light. Set this to make the light cast shadows.
specular
Optional Readonlyvisible
Self-visibility. Undefined/true = visible; false skips render + camera AABB.
Read-only: change it with setMeshVisible(node, visible), which cascades the value to
descendants and invalidates cached opaque render bundles. A plain field write would do
neither, leaving a hidden mesh drawing or a revealed mesh missing.
Shared base for all light types. Provides pipeline integration callbacks so render pipelines are light-agnostic.