Reactions & Triggers
When this happens, do that — the page's only rule primitive, plus the per-clip triggers in the timeline.
Sequencing safely, and the caps that stop a runaway.
Every reaction carries a delay. With delay 0 the action runs on a microtask, decoupled from the store's own watcher stack; with a delay it lands on a timer. Chain reactions by having one emit an event another listens for, or by reacting to a clip ending.
The two caps
| Guard | Limit | Catches |
|---|---|---|
| Burst cap | 256 actions per macrotask turn | A synchronous loop: setStore → onChange → setStore. |
| Rate cap | 512 actions per rolling second | A slower self-feeding cascade whose delay puts each iteration in its own turn. |
Over either cap the action is dropped and logged until the window advances. Emitting is charged too — without that, onEvent(e) → emit(e) would loop forever through the bus.