Get current coordinate info (for incremental updates)
Get final coordinate info after incremental processing
Get current origin shift
Process meshes: detect large coordinates and shift if needed
Process a batch using authoritative WASM metadata when available.
Native buffer streaming and adaptive native processing have no pre-pass
decision and retain the legacy first-vertex vote. WASM callers set their
authoritative frame first through setWasmMetadata.
Fast incremental path for trusted native batches.
Desktop native streaming already emits site-local coordinates, so the JS layer does not need to re-run RTC detection, outlier filtering, or position shifting for every vertex. We only need lightweight bounds accumulation so the viewport can fit the camera while streaming.
Reset incremental state (for new file)
Record the world→render metadata the WASM pre-pass resolved for this
model (issue #945): the length-unit scale and the RTC offset the mesh
path actually subtracted. Pass rtcOffset: null when no shift was
applied. Surfaced on the returned CoordinateInfo so external
viewers can map externally-resolved geometry into the render frame.
Exact provenance is strict. For compatibility, a legacy two-argument
call with a non-finite offset remains non-throwing but publishes no
wasmRtcFrame.
Shift positions in-place by subtracting origin shift Corrupted values are set to 0 (center of shifted coordinate system)
Position array to modify
Origin shift to subtract
Optionalthreshold: number
Optional threshold for valid coordinates (defaults to MAX_REASONABLE_COORD)
Calculate bounding box from all meshes (filtering out corrupted values)