API

Interface GaussianSplattingMesh

Public Gaussian-splatting mesh handle. _kind is a brand so consumers can narrow on it; the renderable is wired up by loadSplat() directly.

interface GaussianSplattingMesh {
    boundMax: [number, number, number];
    boundMin: [number, number, number];
    children: SceneNode[];
    firstSortReady: Promise<void>;
    metadata?: LiteMetadata;
    name: string;
    parent: IWorldMatrixProvider | null;
    position: ObservableVec3;
    rotation: EulerProxy;
    rotationQuaternion: ObservableQuat;
    scaling: ObservableVec3;
    shDegree: number;
    splatsData: ArrayBuffer;
    textureHeight: number;
    textureWidth: number;
    vertexCount: number;
    visible?: boolean;
    worldMatrix: Mat4;
    worldMatrixVersion: number;
    updateData(splatBuffer: ArrayBuffer): void;
}

Hierarchy (View Summary)

Index
boundMax: [number, number, number]
boundMin: [number, number, number]

World-space AABB across all splat centres (for camera framing).

children: SceneNode[]
firstSortReady: Promise<void>

Resolves on the first sort completion. The lab scene awaits this before flagging dataset.ready.

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.

shDegree: number

Spherical-harmonics degree (0 means no view-dependent SH). Set at load time and immutable afterwards — updateData rejects a degree change.

splatsData: ArrayBuffer

Raw 32-byte/splat row buffer. Mirrors BJS splatsData (with keepInRam:true) — exposed for inspection + updateData round-trips.

textureHeight: number
textureWidth: number

RGBA32F texture dimensions used for centers/covA/covB/colors.

vertexCount: number

Number of splats in the cloud.

visible?: boolean

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

worldMatrix: Mat4
worldMatrixVersion: number
  • Replace the splat data in place. Re-uploads centres / covariance / colour textures, re-posts positions to the sort worker, and updates the AABB. Vertex count must match the original buffer. Mirrors BJS GaussianSplattingMesh.updateData(buffer, _sh, opts).

    Parameters

    • splatBuffer: ArrayBuffer

    Returns void