Expand description
Shared streaming pre-pass meta resolution.
The browser pre-passes (buildPrePassOnce / buildPrePassStreaming in
wasm-bindings) each need the same bundle of load-time metadata before
workers can start meshing: the length/plane-angle unit scales, the RTC
(relative-to-centre) frame, and the building rotation from IfcSite.
This module is the single home for that resolution logic so the three
call sites can no longer drift.
Only the RESOLUTION logic lives here — the wasm side keeps ownership of
WHEN the resulting StreamMeta is emitted. In particular the streaming
pre-pass still emits its meta event MID-SCAN (as soon as
META_EMIT_JOB_THRESHOLD geometry jobs are buffered, near the top of the
file) so workers spin up early — the ~17 s → ~3 s time-to-first-geometry
win on a 986 MB file. This helper does not change that timing; it only
factors out the two-vs-three-stage RTC ladder that the two emission sites
previously copied.
Everything here COMPOSES the existing canonical primitives:
resolve_unit_scales,
EntityDecoder::seed_unit_scales,
GeometryRouter::with_scale,
GeometryRouter::detect_rtc_anchor_for_file,
GeometryRouter::detect_rtc_offset_for_file, the shared
coord_is_large predicate inside
the ladder, and MeshFrame::select for the frame the ladder’s answer
turns into.
Structs§
- Stream
Meta - The load-time metadata both pre-passes emit before workers start meshing.
Enums§
- Meta
Mode - Which RTC-detection ladder
resolve_stream_metashould run.
Functions§
- resolve_
stream_ meta - Resolve the full
StreamMetabundle for one pre-pass emission point.