First foundational piece for task #16. WgpuStreamingLoader exposes:
- readSidecarMetadataOnly(path): reads v13 header + mesh dict + instance
dict + georef + elements + string table from disk. Skips the bulky
vertex and index byte sections, recording their on-disk offsets so
they can be range-read later (per-chunk, on demand). The file handle
is closed before return.
- readSidecarVertexChunk / readSidecarIndexChunk: open + fseek + fread
for a byte range. Synchronous; intended to be called from a worker
thread for true async streaming or the main thread for stage-1
on-demand load.
No format change yet — operates on existing v13 sidecars. v14 with an
explicit per-chunk TOC arrives in a follow-up; this layer abstracts
the chunk boundaries so the upgrade stays internal.
No integration with existing applyCachedModel — that's commit 3/4.
Build verifies the API compiles and links into IfcViewerWgpu.
Commits in this series:
1/4: metadata-only reader (THIS)
2/4: per-chunk residency state on WgpuModelGpuData
3/4: --streaming opt-in path through applyCachedModel
4/4: per-frame chunk-on-visible loader (the OOM fix)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>