Readonlyexploredcells ever seen, which is what gets drawn dim
Readonlylighthow bright each visible cell is, 0 to 1, by cell index
Readonlyvisiblecells currently in view
how lit a cell is right now, 0 when out of view
forgets everything, as a new floor should
reveals the whole map, for a magic mapping effect or a debug view
Recomputes what is visible from a point.
how far light reaches, in cells. When omitted, the level's viewDistance
is used, falling back to the larger level dimension.
Optionalsight: HeightSight
when given, sight is height-aware: every cell in range is tested along the straight line to it, blocked by opaque terrain or by a cell rising above viewer and target alike. That is line-of-sight per cell rather than shadowcasting, so its edges deliberately disagree with the flat computation in the same way targeting already does - rot.js's callback only ever sees the blocking cell, never the target, so the viewer-relative rule cannot live inside it.
Example