Build an octree from a flat [x, y, z, ...] position buffer.
[x, y, z, ...]
The input buffer is not modified (a copy is made internally). Points with NaN/Infinity coordinates are silently filtered.
Performs a memory pre-check if setMaxWasmMemory has been called with a non-zero limit. Returns an error if estimated memory exceeds the limit.
setMaxWasmMemory
positions
Float32Array
max_points_per_node
max_depth
Optional
Build an octree from a flat
[x, y, z, ...]position buffer.The input buffer is not modified (a copy is made internally). Points with NaN/Infinity coordinates are silently filtered.
Performs a memory pre-check if
setMaxWasmMemoryhas been called with a non-zero limit. Returns an error if estimated memory exceeds the limit.Arguments
positions—Float32Arrayof[x, y, z, ...]triples.max_points_per_node— Max points per leaf (default: 50 000).max_depth— Max tree depth (default: 21).