Builtin Library
README.md
lighting.get
Reads the scene's full lighting state: every light (entity name, id, kind, current values), and the sky — its entity, component type, controls, and for a material sky, the material's editable parameters (what setSky's params accepts). sky.source = "fallback" means the scene has no explicit sky entity and renders the engine fallback; setSky adds one. The shape round-trips into setup.
The scene's sun is one field set with one holder, so each directional light
reports holdsSun: the light marked true is the one whose direction, colour,
intensity and castsShadows the geometry is lit and shadowed by.
directionals and ambients are the scoped collections: one record per light
entity, each carrying entityId, layerMask (the render layer mask of the
entity carrying it — cameras whose include mask intersects it are lit by it),
color and intensity, plus direction and castsShadows on a directional
record. A light on an entity with no explicit render layer records the default
layer. A punctual light (point, spot, area, distant) carries layerMask on its
lights record instead, read from the row the renderer holds for it.