Class GaussianSplattingStreamExperimental
Hierarchy (View Summary)
- WebXRSpatialLayerType
- GaussianSplattingStream
Implements
Constructors
constructor
-
new GaussianSplattingStream(
name: string,
metadata: ISOGLODMetadata,
rootUrl: string,
scene: Scene,
options?: IGaussianSplattingStreamOptions,
): GaussianSplattingStreamExperimentalCreates a new SOG LOD streaming mesh and immediately starts streaming (non-blocking).
Parameters
- name: string
mesh name
- metadata: ISOGLODMetadata
parsed
lod-meta.json - rootUrl: string
base URL the metadata's relative paths resolve against
- scene: Scene
hosting scene
- options: IGaussianSplattingStreamOptions = {}
streaming options
Returns GaussianSplattingStream
- name: string
Accessors
debug Display
-
get debugDisplay(): boolean
ExperimentalWhen true, renders a wireframe box per LOD node, colored by the LOD level selected by debugLodSource.
Returns boolean
-
set debugDisplay(value: boolean): void
ExperimentalParameters
- value: boolean
Returns void
debug Lod Source
-
ExperimentalSelects which LOD value drives the debug wireframe colors: the distance-based
"optimal"LOD (default, recomputed as the camera moves) or the"current"streamed/rendered LOD.Returns GaussianSplattingStreamDebugLodSource
effective Splat Budget
-
get effectiveSplatBudget(): number
ExperimentalThe splat cap actually in force this frame: a hosting compound's apportioned allocation when this stream is coordinated, otherwise this stream's own splatBudget, clamped to what can be kept resident.
0means no cap (pure distance LOD). Unlike splatBudget, this reflects the compound override, so it is the value to display or reason about at runtime.Returns number
frustum Culling
-
get frustumCulling(): boolean
ExperimentalWhen true (default), nodes whose bounding box is outside the camera frustum are biased to the coarsest LOD instead of being hidden. They stay in the sort/render set (their off-screen splats are clipped), so turning the camera toward them shows low detail immediately with no invisible frames, then refines. Changes take effect in real time.
Returns boolean
-
set frustumCulling(value: boolean): void
ExperimentalParameters
- value: boolean
Returns void
lod0 Splat Count
-
ExperimentalThe total number of splats represented by valid level-0 leaf entries. This remains pending while source metadata is loading and is unavailable when no applicable level-0 entries exist or required metadata fails.
Returns GaussianSplattingStreamLod0SplatCount
max Detail Lod
-
get maxDetailLod(): number
ExperimentalFinest (most detailed) LOD level any node is allowed to render.
0allows full detail (level 0);1caps detail at the next-coarser level, and so on. Nodes already coarser than this cap (by distance) are unaffected. Changes take effect in real time.Returns number
-
set maxDetailLod(value: number): void
ExperimentalParameters
- value: number
Returns void
max Lod Level
-
get maxLodLevel(): number
ExperimentalCoarsest LOD level index in the scene (number of LOD levels minus one). Useful as the upper bound for maxDetailLod.
Returns number
minimum Resident Splats
-
get minimumResidentSplats(): number
ExperimentalMinimum fixed work-buffer capacity required for the complete coarse representation: one invisible padding splat, the included environment, and every unique whole coarse source file. It is
0until the required coarse metadata has resolved. Initial residency options below this value are raised to it.Returns number
resident Splat Budget
-
get residentSplatBudget(): number
ExperimentalThe resolved maximum number of splats kept resident in the work buffer. This combines IGaussianSplattingStreamOptions.maxResidentSplats and IGaussianSplattingStreamOptions.memoryBudgetMb, taking the smaller positive limit and raising it to minimumResidentSplats. With neither limit set, the complete source size is retained when known; otherwise a bounded device-tiered default is used. The fixed capacity is capped at the device texture limit.
0means initial capacity has not been resolved.Returns number
splat Budget
-
get splatBudget(): number
ExperimentalThis stream's own budget-driven LOD cap in splats (see IGaussianSplattingStreamOptions.splatBudget).
0disables the budget (pure distance LOD). Setting it caps the rendered splat count, taking effect on the next frame. When this stream is hosted in a compound whose own budget is set, that shared budget overrides this value — read the actual runtime cap from effectiveSplatBudget, not this getter (which always reports the configured own cap).Returns number
-
set splatBudget(value: number): void
ExperimentalParameters
- value: number
Returns void
streaming Part Proxy
-
get streamingPartProxy(): Nullable<GaussianSplattingPartProxyMesh>
ExperimentalHosted mode only: the compound part proxy this stream drives (world transform + visibility of the reserved region), or null before the part has been reserved (or when running standalone).
Returns Nullable<GaussianSplattingPartProxyMesh>
Methods
dispose
-
ExperimentalParameters
OptionaldoNotRecurse: boolean
Returns void
evaluate Optimal Lods
-
ExperimentalRe-evaluates the optimal LOD for every node from the active cameras. Each node takes the finest level and the largest projected pixel size any active camera demands (so every pane of a split view is served), and the frustum bias uses the union of the frusta. Selection is view-direction-independent, so single- and multi-camera rendering are consistent. The results are stored in each node's
optimalLod/pixelSize.Parameters
- camera: Nullable<Camera> = null
when provided, evaluate against just this camera; otherwise use the active-camera set
Returns void
- camera: Nullable<Camera> = null
get Budget Demand
-
ExperimentalIGaussianSplattingLodBudgetParticipant: the splats this stream would render at full (distance-optimal) detail — its demand on a host compound's shared budget. Computed from the current per-node distance-optimal levels (no pixel threshold), so it does not depend on the allocation it is helping to compute.
Returns number
the full-detail rendered splat count (0 before the base layer is ready)
get Class Name
-
ExperimentalReturns string
is Ready
-
ExperimentalWhen
_hostCompoundis set (i.e. this stream was created via AddGaussianSplattingStreamPart to drive a reserved region of another compound mesh, rather than rendering itself), this instance is disabled and never drawn — so it never runs its own depth-sort worker and the base class's readiness check (which waits for one) would never pass. Report ready unconditionally in that case; the host compound is the one actually rendering, and its ownisReady()already covers real sort completion.Parameters
- completeCheck: boolean = false
defines if a complete check (including materials and lights) has to be done (false by default)
Returns boolean
true when ready
- completeCheck: boolean = false
set Budget Allocation
-
ExperimentalIGaussianSplattingLodBudgetParticipant: sets the compound's apportioned share of the shared budget.
nullreleases coordination (revert to this stream's own splatBudget); a number (incl. 0, meaning "coordinated at the coarsest level") drives the pixel-threshold convergence. Any change to the (already integer) allocation forces a next-frame re-eval: a decrease may put the current selection over the new cap, and even a small increase can unlock a finer level that a stationary camera would otherwise never re-evaluate to. The apportioned demand is allocation-independent, so this settles in one step and does not churn frame to frame.Parameters
- splats: Nullable<number>
the apportioned allocation, or null to release coordination
Returns void
- splats: Nullable<number>
when Part Ready Async
-
ExperimentalHosted mode only: resolves once the reserved part exists and its base layer has decoded (so the proxy's bounds are real and the part is ready to be placed/framed), or rejects if streaming fails/disposes first. Resolves immediately for a standalone stream. Used by AddGaussianSplattingStreamPartAsync.
Returns Promise<void>
a promise that settles when the hosted part is ready to use
when Settled Async
-
ExperimentalResolves once the scene is fully streamed and displayed for the current camera: a LOD re-evaluation has run for the current point of view, every reachable LOD file has finished downloading and decoding (no downloads, decodes, or queued work remain), and the depth sort for the resulting splats has been applied and rendered. Intended for deterministic automated testing and screenshot/image comparison.
Streaming and settling require rendered frames. If an external render loop is already running, this waits on it passively; otherwise (e.g. when awaited inside an async
createScenebefore the host starts its render loop) it drivesscene.render()itself until settled, so it never deadlocks.Note: the promise only resolves while the camera is still — if the camera keeps moving, the target LODs (and the depth sort) keep changing and the stream never settles. Position the camera, then await this.
Parameters
- stableFrames: number = 3
number of consecutive settled frames to require before resolving (defaults to 3), so the final sorted frame is actually on screen
Returns Promise<void>
a promise that resolves when loading and rendering are complete for the current view
- stableFrames: number = 3
StaticIs LOD Metadata
-
ExperimentalReturns true when the parsed JSON looks like a PlayCanvas-style
lod-meta.jsonpayload.Parameters
- data: unknown
parsed JSON
Returns data is ISOGLODMetadata
whether the data is SOG LOD metadata
- data: unknown
Streams a PlayCanvas-style SOG LOD scene (
lod-meta.json) into a single Gaussian Splatting mesh.Each selected SOG file (plus the environment) is loaded directly as GPU textures and decoded on the GPU into one unified, PlayCanvas-style square work buffer (no CPU splat decode or
updateData). Only the splats of each node's currently-selected LOD are rendered/sorted via the mesh's interval filter.The coarsest (least-detail) LOD of every node is streamed first as a permanent base layer so the whole scene is visible quickly with no holes. A distance-based "optimal" LOD is then computed per node (see evaluateOptimalLods); finer LOD source files are streamed on demand and a node only switches to a finer LOD once that file is decoded, so transitions never flash or leave gaps.