actions
Installation
SKILL.md
Actions and Action Bindings with @pmndrs/viverse
Actions decouple inputs from game logic. Bindings translate hardware events into actions that systems consume each frame.
Input → Binding → Action → Game Logic
This skill covers only the input layer. For a moving character, that intent flows on: input → Acta → physics — your system reads these actions and hands a move intent to Acta (animation), which produces the velocity for BvhCharacterPhysics. Don't drive the physics controller straight from raw input. See the acta, physics, and camera skills.
Action Types
- StateAction – Persistent state (movement, running). Multiple writers merge into one value via
.get(). - EventAction – One-shot events (jump, fire). Emitted via
.emit(), consumed via.subscribe().