API

Interface IGaussianSplattingStreamingPart

Handle to a region of a compound Gaussian Splatting mesh reserved for dynamic (streamed) content by GaussianSplattingMesh.reserveStreamingPart. It lets a streaming engine populate the region's splats over time and drive which of them are sorted/rendered, while the compound keeps depth-sorting and drawing every part (static + streamed) together in one pass.

Ranges/offsets passed to this handle are LOCAL to the part (0-based within [0, capacity)); the handle translates them to the compound's global atlas coordinates.

interface IGaussianSplattingStreamingPart {
    atlasWidth: number;
    base: number;
    capacity: number;
    centersTexture: Nullable<BaseTexture>;
    colorsTexture: Nullable<BaseTexture>;
    covariancesATexture: Nullable<BaseTexture>;
    covariancesBTexture: Nullable<BaseTexture>;
    isDepthSortSettled: boolean;
    mrtAtlas: Nullable<MultiRenderTarget>;
    partIndex: number;
    proxy: GaussianSplattingPartProxyMesh;
    rotMrtAtlas: Nullable<MultiRenderTarget>;
    shMrtAtlas: Nullable<MultiRenderTarget[]>;
    splatPositions: Nullable<Float32Array<ArrayBufferLike>>;
    expandBounds(min: Vector3, max: Vector3): void;
    notifyDataChanged(): void;
    onAfterAtlasRebuild(
        callback: (newAtlas: MultiRenderTarget) => void,
    ): () => void;
    onBeforeAtlasRebuild(
        callback: (oldAtlas: MultiRenderTarget) => void,
    ): () => void;
    postPositionsRange(localOffset: number, count: number): void;
    setActiveRanges(
        localRanges: Nullable<readonly IGaussianSplattingSplatRange[]>,
    ): void;
    writeSplats(
        localOffset: number,
        count: number,
        splatsData: ArrayBuffer | ArrayBufferView<ArrayBufferLike>,
    ): void;
}
Index
atlasWidth: number

Width (in texels) of the atlas, used to address decode/readback over the wide layout.

base: number

First atlas splat index of the reserved region.

capacity: number

Number of splats reserved for the region.

centersTexture: Nullable<BaseTexture>

The compound's shared centers texture (the region occupies [base, base+capacity) within it).

colorsTexture: Nullable<BaseTexture>

The compound's shared colors texture.

covariancesATexture: Nullable<BaseTexture>

The compound's shared covariance A texture.

covariancesBTexture: Nullable<BaseTexture>

The compound's shared covariance B texture.

isDepthSortSettled: boolean

Whether the compound's shared depth sort is settled (a streaming engine polls this to detect readiness).

mrtAtlas: Nullable<MultiRenderTarget>

The compound's shared render-target atlas a streaming engine decodes into, or null on a non-GPU backend.

partIndex: number

The part index assigned to this streaming region in the compound.

proxy: GaussianSplattingPartProxyMesh

The proxy mesh controlling this part's world transform and visibility.

rotMrtAtlas: Nullable<MultiRenderTarget>

The compound's shared rotation/scale render-target atlas (one 3-attachment half-float MRT) a streaming engine decodes rotation/scale into for voxel-IBL shadows, or null when rotation decode was not requested for this part.

shMrtAtlas: Nullable<MultiRenderTarget[]>

The compound's shared higher-order SH render-target atlas (one single-attachment integer MRT per packed-u32 SH texture) a streaming engine bakes SH into, or null when SH decode was not requested for this part.

splatPositions: Nullable<Float32Array<ArrayBufferLike>>

The compound's shared CPU centers buffer consumed by the sort worker.

  • Subscribes to the "shared atlas has been recreated" event. The callback receives the NEW atlas and should rebind to it and restore this region's backed-up data.

    Parameters

    • callback: (newAtlas: MultiRenderTarget) => void

      invoked with the new atlas MRT

    Returns () => void

    an unsubscribe function (call it on dispose)

  • Subscribes to the "about to recreate the shared atlas to grow it" event (e.g. another part is being added). The callback receives the OLD atlas and should back up this region's GPU-only data before it is disposed.

    Parameters

    • callback: (oldAtlas: MultiRenderTarget) => void

      invoked with the old atlas MRT

    Returns () => void

    an unsubscribe function (call it on dispose)

  • Patches only [localOffset, localOffset+count) of the worker's position buffer (for the GPU path, where texel data is written directly to the atlas and only the CPU centers are pushed to the worker).

    Parameters

    • localOffset: number

      first local splat index

    • count: number

      number of splats

    Returns void

  • CPU-decodes raw .splat bytes into the region at localOffset, uploading only those texels and patching the sort worker. Grows the part's bounding info to include the written centers. This is the CPU population path (used to seed the region or as a fallback when GPU decode is unavailable).

    Parameters

    • localOffset: number

      first local splat index to write

    • count: number

      number of splats to write

    • splatsData: ArrayBuffer | ArrayBufferView<ArrayBufferLike>

      raw .splat bytes for count splats (stride 32)

    Returns void