View on GitHub

leaflet-city-mapper

A small 3D rendering engine for leaflet

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.

Related: workers, materials, transforms.