SDK JS
    Preparing search index...

    Adapts a standalone .lepcc (LPC1-framed Esri LEPCC) point-cloud container to the SDK's quantized streaming Decoder contract, so point-cloud layers can render a .lepcc capture through the same renderer path as any other point container.

    Composes the per-blob LepccDecoder (shared lazily-initialized wasm) with an i32 requantization pass. LEPCC decodes to dequantized world floats, so open decodes the whole container, requantizes it onto the configured LepccContainerDecoderOptions.grid, and caches the single DecodedPointTile (always tileCount: 1) that decodeTiles then yields and releases. RGB is widened u8 → full-range u16 (× 257); LAS flag bytes map to the tile's classification plane. Calling decodeTiles without a prior open re-decodes the bytes.

    import { LepccContainerDecoder } from '@bitruvius/turbo-lepcc';

    const decoder = new LepccContainerDecoder();
    const bytes = new Uint8Array(await (await fetch('cloud.lepcc')).arrayBuffer());
    const model = await decoder.open(bytes);
    for await (const tile of decoder.decodeTiles(model, bytes)) {
    // upload the quantized tile to the GPU
    }
    decoder.dispose();

    Implements

    • Decoder
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    backend: DecodeBackend = 'cpu-wasm'

    The backend this instance reports — always 'cpu-wasm' (in-process wasm decode).

    Methods

    • Yield the decoded container as its single quantized tile.

      Parameters

      • model: DecodedModel

        The DecodedModel returned by open for these bytes.

      • bytes: Uint8Array

        The same .lepcc bytes passed to open (re-decoded only if the cached tile is absent, e.g. decodeTiles without a prior open).

      • Optionalopts: DecodeOptions

        Optional DecodeOptions: signal to abort (checked before decode and before yield), and onTile(tile, 0) invoked as the tile finishes.

      Returns AsyncIterable<DecodedTile>

      An async iterable yielding exactly one DecodedPointTile.

      The provided signal's abort reason if aborted before the tile is produced; also rejects on bad LPC1 framing, wasm init failure, or malformed LEPCC blobs (see open).

    • Release the cached tile (the shared wasm singleton stays warm).

      Returns void

    • Decode the .lepcc container and report the quantized point model shape.

      Parameters

      • bytes: Uint8Array

        The raw .lepcc (LPC1) container bytes.

      Returns Promise<DecodedModel>

      The DecodedModel: profile: 'pointcloud', point meta with scale: [grid, grid, grid] and offset: [0, 0, 0], and tileCount: 1.

      NOT the cheap header parse of the general contract — LEPCC blobs decode to world floats, so the whole container is decoded and requantized here and the tile cached for decodeTiles (which releases it).

      If the LPC1 framing is invalid (see parseLpc1Header), if the wasm fails to initialize (see WasmHostInit), or if a LEPCC blob is malformed — the wasm decode rejects.