SDK JS
    Preparing search index...

    Class WorkerBvcGltfPointCloudDecoder

    Fans BVC-in-glTF point-cloud .glb decodes out to a WorkerPool — decode, ENU projection and requantization all run in the worker, so the render thread never janks. Drop-in for BvcGltfPointCloudDecoder (same decode(glb, ctx) contract, same PackedPointTile out), and the decoder Tiles3DPointCloudLayer builds for decoder: 'bvc' when workers is left on (the default) and Worker exists.

    concurrency reports the pool size so the engine can size its decode queue to keep every worker busy. The .glb buffer is transferred (not copied) to the worker, so do not touch it after calling decode. If the pool cannot be spawned, decoding degrades once to the main-thread BvcGltfPointCloudDecoder and the failure is reported through onDegraded — never again per tile. Call dispose when the layer goes away to release the workers.

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

    const pointDecoder = new WorkerBvcGltfPointCloudDecoder();
    const tile = await pointDecoder.decode(glb, ctx); // ctx: CesiumPointDecodeContext
    pointDecoder.dispose(); // tear down the pool when the layer is removed

    Implements

    • CesiumPointDecoder
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    concurrency: number

    Worker pool size — the engine sizes its decode concurrency to match this.

    Methods

    • Parameters

      • buffer: ArrayBuffer

        The tile bytes (.pnts or .glb).

      • ctx: CesiumPointDecodeContext

        Georeference + requantize context (CesiumPointDecodeContext).

      Returns Promise<PackedPointTile>

      The ENU-rebased PackedPointTile.

    • Returns void