IFClite TypeScript API
    Preparing search index...

    Interface StreamPointCloudOptions

    interface StreamPointCloudOptions {
        autoOrigin?: boolean;
        blob: Blob;
        chunkSize?: number;
        createSource?: (
            opts: CreateDecodeWorkerSourceOptions,
        ) => StreamingPointSource;
        format: DecodeWorkerFormat;
        label?: string;
        maxFileSize?: number;
        maxPointsInMemory?: number;
        onChunk: (chunk: DecodedPointChunk) => void;
        onComplete?: (
            bbox: PointCloudBBox,
            totalEmitted: number,
            classCounts: Uint32Array<ArrayBufferLike> | null,
        ) => void;
        onError?: (err: Error) => void;
        onOpen?: (
            info: PointSourceInfo & {
                originOffset?: readonly [number, number, number];
                stride: number;
            },
        ) => void;
        onProgress?: (loaded: number, total: number) => void;
        originOffset?: readonly [number, number, number];
        signal?: AbortSignal;
    }
    Index
    autoOrigin?: boolean

    Choose a local decode origin when no explicit alignment is supplied (#4226).

    blob: Blob

    File or remote-fetched blob.

    chunkSize?: number

    Points per chunk during streaming decode. Default: 200_000.

    Override the source factory (used by tests).

    Source format.

    label?: string

    Optional label (filename, URL) for diagnostics.

    maxFileSize?: number

    Hard size ceiling — if blob.size exceeds, the call rejects.

    maxPointsInMemory?: number

    Soft memory cap measured in points. When the source declares more than this, the host applies stride-based downsampling so the chunks fit. Default: 25 million (~600 MB GPU at the 24-byte/point format).

    onChunk: (chunk: DecodedPointChunk) => void

    Called for each decoded chunk.

    onComplete?: (
        bbox: PointCloudBBox,
        totalEmitted: number,
        classCounts: Uint32Array<ArrayBufferLike> | null,
    ) => void

    Called once with the aggregated bbox once the stream finishes. classCounts is the per-class point histogram (256 slots, one per LAS classification code) aggregated across every emitted chunk, or null when no chunk carried a classifications buffer (#1783).

    onError?: (err: Error) => void

    Called if the source errors mid-stream.

    onOpen?: (
        info: PointSourceInfo & {
            originOffset?: readonly [number, number, number];
            stride: number;
        },
    ) => void

    Called once after the source's header parses.

    onProgress?: (loaded: number, total: number) => void

    Periodic progress signal in 0..1.

    originOffset?: readonly [number, number, number]

    Native (X, Y, Z)-axis offset subtracted from each decoded coordinate in f64, before it's narrowed to f32 (issue #1804, extended to every point-cloud format). Used to align a georeferenced scan with an IFC model's IfcMapConversion — see apps/viewer/src/hooks/ingest/pointCloudAlignment.ts computePointCloudAlignment().decodeOriginOffset.

    signal?: AbortSignal

    Abort signal for the whole stream.