API

Class GaussianSplattingStreamExperimental

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.

Hierarchy (View Summary)

Implements

Index
  • get effectiveSplatBudget(): number
    Experimental

    The 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. 0 means 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

  • get frustumCulling(): boolean
    Experimental

    When 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
    Experimental

    Parameters

    • value: boolean

    Returns void

  • get minimumResidentSplats(): number
    Experimental

    Minimum 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 0 until the required coarse metadata has resolved. Initial residency options below this value are raised to it.

    Returns number

  • get streamingPartProxy(): Nullable<GaussianSplattingPartProxyMesh>
    Experimental

    Hosted 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>

  • Experimental

    Re-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

  • Experimental

    IGaussianSplattingLodBudgetParticipant: 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)

  • Experimental

    When _hostCompound is 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 own isReady() 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

  • Experimental

    IGaussianSplattingLodBudgetParticipant: sets the compound's apportioned share of the shared budget. null releases 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

  • Experimental

    Hosted 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

  • Experimental

    Resolves 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 createScene before the host starts its render loop) it drives scene.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