SDK JS
    Preparing search index...

    Decodes a whole 3D-Tiles .glb gaussian-splat tile — one whose KHR_gaussian_splatting buffer is …_compression_spz_2 (Esri/Cesium) — via the turbospz wasm.

    Implements the codec-agnostic GltfSplatDecoder seam from @bitruvius/geo-core, so @bitruvius/tiles3d can stream Esri/Cesium splat tilesets without depending on this package directly: you inject an instance and the engine drives decode(glb) per tile. For off-main-thread decode use WorkerSpzGltfSplatDecoder (same contract). The wasm is a lazily-initialized singleton shared across instances.

    import { Tiles3DSplatLayer } from '@bitruvius/sdk-maplibre';
    import { SpzGltfSplatDecoder } from '@bitruvius/turbo-spz';

    // Inject the codec into the splat layer/engine; it handles the per-tile decode.
    const layer = new Tiles3DSplatLayer(tilesetUrl, { decoder: new SpzGltfSplatDecoder() });
    map.addLayer(layer);

    Implements

    • GltfSplatDecoder
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Decode one .glb gaussian-splat tile to a flat splat cloud.

      Parameters

      • glb: ArrayBuffer

        The .glb tile bytes (may be gzip-framed, e.g. Esri spz_2).

      Returns Promise<GltfSplatCloud>

      The decoded GltfSplatCloud (parallel Float32Arrays in the tile's glb-local frame, plus the column-major 4×4 nodeMatrix).

      If the wasm fails to initialize (see WasmHostInit), or if glb is not a valid SPZ-compressed gaussian-splat tile — the wasm decode rejects.