Models
| Source guide | Project README |
Loads static GLB/glTF resources, decodes model attributes and builds scene nodes. Model loading uses a source worker before attaching nodes to the layer.
Loading and attachment
flowchart LR
Added["Layer added"] --> Worker["Worker: decode glTF / GLB + resources"]
Worker --> View["Wait for camera view"]
View --> Nodes["Build nodes, geometry and materials"]
Nodes --> Transform["Apply layer transform"]
Transform --> Attach["Attach to layer root"]
Attach --> Terrain["Optional terrain conformance"]
Missing scenes and empty root lists are errors. For misplaced models, inspect node and layer transforms before projection.
- loadModel.js: load, attach and optionally conform a model to terrain.
- decodeModel.js: decode model content.
- buildModelNodes.js: assemble model scene nodes.
Related: workers, materials, transforms.