Validate the typed-array inputs that flow into WASM visibility /
projection calls. The compiled Rust code reads from positions,
slicePosition, tolerance, etc. assuming caller-supplied lengths
match numItems × ndim and ndim; if a malformed payload reaches
WASM, the read goes off the end of the buffer (undefined behavior in
WASM, may return garbage or trip a memory.fill panic). This helper
rejects bad inputs at the JS boundary with a clear error message
instead of letting the worker silently corrupt or crash.
radii is optional: present for points, absent for lines/gsplats.
Validate the typed-array inputs that flow into WASM visibility / projection calls. The compiled Rust code reads from
positions,slicePosition,tolerance, etc. assuming caller-supplied lengths matchnumItems × ndimandndim; if a malformed payload reaches WASM, the read goes off the end of the buffer (undefined behavior in WASM, may return garbage or trip a memory.fill panic). This helper rejects bad inputs at the JS boundary with a clear error message instead of letting the worker silently corrupt or crash.radiiis optional: present for points, absent for lines/gsplats.