API

Interface IGaussianSplattingStreamOptions

interface IGaussianSplattingStreamOptions {
    debugDisplay?: boolean;
    debugLodSource?: GaussianSplattingStreamDebugLodSource;
    decodeSh?: boolean;
    deflateURL?: string;
    evictionCooldownFrames?: number;
    fflate?: any;
    frustumCulling?: boolean;
    lodBaseDistance?: number;
    lodBehindPenalty?: number;
    lodCooldownFrames?: number;
    lodMultiplier?: number;
    lodRangeMax?: number;
    lodRangeMin?: number;
    lodUpdateDistance?: number;
    lodUpdateInterval?: number;
    maxConcurrentDownloads?: number;
    maxDecodesPerFrame?: number;
    maxDetailLod?: number;
    maxDownloadRetries?: number;
    maxResidentSplats?: number;
    memoryBudgetMb?: number;
    needsRotationScale?: boolean;
    splatBudget?: number | "auto";
}
Index
debugDisplay?: boolean

When true, renders a wireframe box per LOD node, colored by the node's LOD level.

Which LOD value drives the debug wireframe colors. Defaults to "optimal".

decodeSh?: boolean

When true, higher-order spherical-harmonics carried by the SOG files (shN) are GPU-decoded into baked packed-u32 SH textures so the streamed splats render with view-dependent lighting (matching the non-stream .spz/.sog path) instead of flat DC-only color. Streams with complete initial metadata use the maximum source SH degree. Streams that defer finer metadata reserve the supported degree-4 layout before it is known, even if the files ultimately carry no shN; lower-degree files neutral-fill the unused bands. Defaults to true; set to false to force flat DC-only color and avoid the SH decode cost/texture memory.

deflateURL?: string

URL of the fflate UMD module used to unzip .sog environment bundles.

evictionCooldownFrames?: number

Frames an unreferenced (no longer rendered) LOD file stays resident before it is evicted, so a quick return to it avoids a re-download. Only used when a budget enables eviction. PlayCanvas default 100.

fflate?: any

Pre-loaded fflate module.

frustumCulling?: boolean

When true (default), LOD nodes outside the camera frustum are biased to their coarsest LOD rather than rendered at full detail. They stay in the sort/render set so they appear instantly (at low detail) when the camera turns toward them, then refine. Set to false to render every node at its distance LOD.

lodBaseDistance?: number

Distance (in local units) of the first LOD transition. PlayCanvas default 5.

lodBehindPenalty?: number

Distance multiplier applied to nodes behind the camera (1 = no penalty). PlayCanvas default 1.

lodCooldownFrames?: number

Frames a node must wait after switching LOD before it may switch again (oscillation damping). Defaults to 10.

lodMultiplier?: number

Geometric ratio between successive LOD transition distances. PlayCanvas default 3.

lodRangeMax?: number

Highest LOD index the optimal-LOD heuristic may select. Defaults to lodLevels - 1.

lodRangeMin?: number

Lowest LOD index the optimal-LOD heuristic may select. Defaults to 0.

lodUpdateDistance?: number

Minimum camera movement (world units) required to re-evaluate LODs. Defaults to 0.5.

lodUpdateInterval?: number

Minimum number of frames between LOD re-evaluations (throttles per-frame work during motion). Defaults to 4.

maxConcurrentDownloads?: number

Maximum number of LOD file downloads allowed to run concurrently. PlayCanvas default 2.

maxDecodesPerFrame?: number

Maximum number of LOD source files to GPU-decode per frame (spreads work to avoid hitches). Defaults to 1.

maxDetailLod?: number

Finest (most detailed) LOD level any node is allowed to render. 0 allows full detail (level 0); 1 caps detail at the next-coarser level, and so on. Higher values force a coarser maximum detail.

maxDownloadRetries?: number

Number of times a failed file download is retried before giving up. PlayCanvas default 2.

maxResidentSplats?: number

Initial maximum number of splats kept resident in the fixed-size work buffer. It is raised when necessary to fit the complete coarse layer. When unset and the complete source size is known, streams retain the complete source. Streams that defer finer metadata use a bounded device-tiered default with coarse-derived refinement headroom. Finite non-positive values leave this limit unset; non-finite or unsafe positive counts are rejected. Positive fractional counts are floored to at least one splat before applying the coarse minimum.

memoryBudgetMb?: number

Initial GPU/CPU memory estimate (in megabytes) for resident splats. It is converted to a splat count using the per-splat cost (core data plus any baked SH and rotation/scale textures), combined with maxResidentSplats by taking the smaller limit, then raised when necessary to fit the complete coarse layer. The work buffer has a fixed lifetime capacity; construct a new stream to use another limit. Finite non-positive values leave this limit unset; non-finite values are rejected.

needsRotationScale?: boolean

When true, each splat's rotation matrix + scale are GPU-decoded into half-float rotation/scale textures so the streamed splats participate in voxel-based IBL shadowing (matching the non-stream path). Standalone: the work buffer owns the rotation textures. Hosted: the compound's rotation textures become a shared render-target atlas the stream decodes into. Defaults to false.

splatBudget?: number | "auto"

Enables budget-driven LOD: caps the total rendered splats by converging a screen-space (size + distance) pixel-size threshold to the budget. Selection is view-direction-independent, so it is consistent across any number of active cameras (each node takes the finest level and largest projected size any camera demands). A number is an explicit splat cap; "auto" picks a device-tiered default (desktop 2.5M / iOS 1.5M / other mobile 1M; XR shares the mobile tier). Undefined (default) disables the cap — LOD is pure distance, identical to prior behavior. Runtime-mutable via the splatBudget accessor. When this stream is hosted in a compound, the compound's GaussianSplattingMesh.splatBudget (if set) overrides this and apportions a shared budget across all its streams.