SDK JS
    Preparing search index...

    Class BvcGltfSplatDecoder

    Decodes a 3D-Tiles .glb gaussian-splat tile whose splat buffer is compressed with BVC (the BITRUVIUS_gaussian_splatting_bvc glTF extension), via the vendored BVC wasm.

    Implements core's codec-agnostic GltfSplatDecoder seam, so the same @bitruvius/tiles3d streaming engine + MapLibre layer that consume Esri/Cesium spz_2 tiles (@bitruvius/turbo-spz) also consume BVC-in-glTF tiles — only the injected decoder changes. Decode-only: BVC encode is a separate licensed capability, not shipped in the browser wasm. For heavy scenes prefer WorkerBvcGltfSplatDecoder (same decode(glb) contract, off the main thread).

    Wire the BVC splat codec into the tiles3d glTF mesh/splat decoder:

    import { BvcGltfSplatDecoder } from '@bitruvius/bvc';

    const splatDecoder = new BvcGltfSplatDecoder();
    const cloud = await splatDecoder.decode(glbBytes); // ArrayBuffer of one .glb tile
    // cloud.positions/scales/rotations/alphas/colors/sh → upload to the splat renderer

    Implements

    • GltfSplatDecoder
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Decode one BVC-in-glTF .glb tile into a CPU-side gaussian-splat cloud.

      Parameters

      • glb: ArrayBuffer

        The complete .glb tile bytes (the BVC-compressed splat buffer).

      Returns Promise<GltfSplatCloud>

      The GltfSplatCloud: numPoints, shDegree, the 4×4 column-major nodeMatrix, and de-interleaved attribute arrays — positions (metres, xyz per splat, length numPoints*3), scales (xyz, *3), rotations (quaternion, *4), alphas (numPoints), colors (rgb, *3), and sh spherical-harmonics.

      Initializes the wasm on first use; rejects on wasm init failure or if the bytes are not a valid BVC-in-glTF tile.