Vector sources
| Source guide | Project README |
Initializes GeoJSON and vector tile sources and manages source areas, feature preparation, loading queues and mesh attachment.
From view to mesh
flowchart LR
View["Map view"] --> Areas["updateArea: retain / release"]
Areas --> Queue["pump: nearest areas"]
Queue --> Load["Load feature collection"]
Load --> Style["Style + project features"]
Style --> Worker["Worker: build geometry"]
Worker --> Check{"Still wanted?"}
Check -->|yes| Mesh["Attach mesh + schedule frame"]
Check -->|no| Stop["Discard"]
GeoJSON uses one area; archive blocks include a view border. The
pump allows four jobs per scene and two per layer.
null styles skip features; metadata and face ranges support
picking. Errors emit error; released areas abort
work and destroy their buffers. Vector tiles have
a separate lifecycle.
- initializeGeoJSON.js: initialize a GeoJSON-backed layer.
- updateArea.js: maintain the areas needed by the view.
- buildArea.js: load features, build worker geometry and attach the mesh.
Related: scene, workers, vector-tiles.