Skip to content

Events

Veyrajs dispatches DOM-style federated events through the scene graph: a pointer interaction is hit-tested to a target node, then flows capture → target → bubble. One SceneEvent carries the screen point, the world point, the target, and the current phase.

Click the blue square and watch a single handler fire at every level, in both phases:

pointerenter / pointerleave fire per shape and don’t bubble — ideal for outlining the shape under the pointer and switching the cursor:

Every event carries the pointer in three spaces — screen, world, and any node’s local space: