Process point cloud data in chunks on the main thread.
This is a fallback for environments where Web Workers are not available
(e.g. missing COOP/COEP headers). It processes the data in chunks and
yields to the main thread between chunks using setTimeout(0).
The pipeline runs Octree build + Tileset generation. Since the actual
processing is synchronous in WASM, this function splits the work into
conceptual phases and calls onChunk after each phase.
Arguments
positions — Float32Array of [x, y, z, ...].
colors — Optional Uint8Array of [r, g, b, ...].
max_points_per_node — Max points per octree leaf (default: 50,000).
Process point cloud data in chunks on the main thread.
This is a fallback for environments where Web Workers are not available (e.g. missing COOP/COEP headers). It processes the data in chunks and yields to the main thread between chunks using
setTimeout(0).The pipeline runs Octree build + Tileset generation. Since the actual processing is synchronous in WASM, this function splits the work into conceptual phases and calls
onChunkafter each phase.Arguments
positions—Float32Arrayof[x, y, z, ...].colors— OptionalUint8Arrayof[r, g, b, ...].max_points_per_node— Max points per octree leaf (default: 50,000).max_depth— Max tree depth (default: 21).on_chunk— Callback(phase: string, done: number, total: number).Returns
A
Promisethat resolves with theTilesetResult(as JSON string).