stream large CityGML and zip files, fix geometry and view bugs
Loading
- parse into fixed-size per-LOD blocks and upload them to the GPU while
reading, so memory stays flat for multi-GB files (3.4 GB 3D-DLM loads
with a JS heap below 90 MB) and the model is shown during loading
- load the single .gml (or .xml) inside a zip archive, decompressed as a
stream, including ZIP64
- reject 7z/RAR/gzip and other non-XML input at once with a clear message,
and enable the sax buffer limit that unterminated "<!" in binary data
used to bypass until the tab ran out of memory
- decode UTF-8 across chunk borders, cancel a running load when a new
file is chosen, report load errors
Geometry
- split coordinates on any whitespace (indented posList, one pos per line)
- subtract the origin in double precision before float32 conversion
- handle PolygonPatch, Rectangle and Triangle
- tag geometry with its LOD; setLodVisible() prepares LOD switches
- light brown for land use and relief, nested colours restore the parent
View
- bind shader attribute locations, check compile/link errors, free GPU
buffers of the previous file
- infinite far plane with a near plane following the camera distance,
starting distance fitted to the model without a 10 km cap
- minimum zoom step and distance, pan speed proportional to the distance
Tests: npm test (Node 22+), 73 tests
Co-Authored-By:
Claude Opus 5.5 (1M context) <noreply@anthropic.com>
package.json
0 → 100644
public/citygml.js
0 → 100644
public/navigation.js
0 → 100644
public/renderer.js
0 → 100644
This diff is collapsed.
public/zipreader.js
0 → 100644
tests/citygml.test.js
0 → 100644
tests/fake-gl.js
0 → 100644
tests/navigation.test.js
0 → 100644
tests/renderer.test.js
0 → 100644
tests/zip-util.js
0 → 100644
tests/zipreader.test.js
0 → 100644
Please register or sign in to comment