API

Function AddGaussianSplattingStreamPartAsync

  • Experimental

    Adds a PlayCanvas-style SOG LOD stream as a part of a compound Gaussian Splatting mesh and resolves once the part is ready to use, returning its GaussianSplattingPartProxyMesh — the same handle GaussianSplattingCompoundMesh.addPart returns for a static part. This lets a host application treat a streamed splat exactly like any other compound part (place/frame/gizmo via the proxy, remove via compound.removePart(proxy.partIndex)); the streaming controller lives behind the proxy and is disposed automatically when the part is removed.

    Resolves after the reserved region exists and its base layer has decoded (so the proxy's bounds are real), and rejects if streaming fails before that (the partially-constructed stream is disposed on rejection).

    NOTE: the base-layer decode runs on the GPU inside the scene's render loop, so this promise only resolves once the scene is rendering. Do not await it before the render loop has started (it would never resolve) — start rendering (e.g. engine.runRenderLoop) first, or await it concurrently with the first frames.

    Parameters

    • compound: GaussianSplattingMesh

      the compound mesh to add the streamed part to

    • name: string

      name for the streaming controller / part

    • metadata: ISOGLODMetadata

      parsed lod-meta.json

    • rootUrl: string

      base URL the metadata's relative paths resolve against

    • options: IGaussianSplattingStreamOptions = {}

      streaming options

    Returns Promise<GaussianSplattingPartProxyMesh>

    the part proxy driving the streamed region, ready to place/frame