API

Interface MeshLoDInstance

A placed instance of an asset: plain SceneNode state carrying its immutable asset and material. Multiple instances can share one asset.

interface MeshLoDInstance {
    asset: MeshLoDAsset;
    children: SceneNode[];
    material: PbrMaterialProps;
    metadata?: LiteMetadata;
    name: string;
    parent: IWorldMatrixProvider | null;
    position: ObservableVec3;
    rotation: EulerProxy;
    rotationQuaternion: ObservableQuat;
    scaling: ObservableVec3;
    screenSpaceError?: number;
    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.

screenSpaceError?: number
visible: boolean

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.

worldMatrix: Mat4
worldMatrixVersion: number