A chunk's meshes are in the scene and renderable. Fires from the same place
for synchronous and worker builds, so chunkWorker: true doesn't change
when (relative to the geometry existing) consumers hear about it — only how
many frames later. Use it to place props, spawn decorations, or drive a
"world loading" indicator.
A chunk's meshes have been removed from the scene and disposed — because it
streamed out of range, or because dispose() / setMap() tore everything
down. Anything you parented to that chunk's region should go now.
A unit was registered and its Object3D added to the scene.
A unit was removed from the scene and its fog contribution withdrawn.
A unit began following a new path. col/row are where it set off from.
A unit crossed into a new cell mid-path. Fires after the fog reveal for
that cell, so a listener reading fogData sees the post-move visibility.
A unit reached the end of its path. The event most turn logic wants:
unlike unitMoveEnd it does not fire for an interrupted move.
A unit stopped moving, whether it finished the path (completed: true) or
HexUnit.stop cut it short. Pair with animation state.
A unit stepped from land onto a liquid cell. Only units given an
isLiquid predicate report this. Fires before unitCellEnter.
A unit stepped from a liquid cell onto land. Fires before unitCellEnter.
Once per rendered frame, after chunks, picking, and the overlay layers have updated and before the draw call. The multi-subscriber form of HexWorld.onFrame, which still fires first.
The cell under the pointer changed — including to and from null when the
cursor leaves the map. One subscription that always knows what's under the
cursor; use it for a status readout or a hover highlight that has to clear.
The pointer moved onto this cell. Paired with cellLeave.
The pointer moved off this cell. Fires before the matching cellEnter.
A press and release on the same cell without dragging past HexWorldOptions.clickTolerance. Fires for every button, so a right-click that isn't a camera pan reads as the cancel gesture it is.
A button went down over a cell. Fires synchronously from the DOM handler,
so pointer.preventDefault() still works — the hook for consuming an input
before the camera controller acts on it.
HexWorld.setMap swapped the map. Chunk events for the new map follow.
Everything HexWorld.events can emit. Chunk streaming and unit events are re-emitted verbatim from ChunkManager.events and (once HexWorld.trackUnits is wired) UnitManager.events, so one subscription point covers the whole world.