View on GitHub

leaflet-city-mapper

A small 3D rendering engine for leaflet

Transforms

Source guide Project README

Composes model and scene transforms and updates world matrices when nodes or their parents change.

Local to world

flowchart LR
  TRS["Node translation / YXZ rotation / scale"] --> Local["Local matrix"]
  Explicit["Explicit node matrix"] --> Local
  Parent["Parent world matrix"] --> World["World = parent × local"]
  Local --> World
  World --> Consumers["Rendering / picking / collision"]
  GLTF["glTF translation / quaternion / scale"] --> Explicit

An explicit matrix overrides node components. Unchanged matrices are not recomputed, but children are still visited. Geographic projection is separate.

Related: scene, models, projections.