defineInputMap
defineInputMap(
actions):InputMap
Defined in: inputMap.ts:291
Define a named-action input map and register its per-frame evaluation system. Returns the live map — import it and query by name from any system.
Parameters
Section titled “Parameters”actions
Section titled “actions”Record<string, ActionDef>
Returns
Section titled “Returns”Example
Section titled “Example”export const Game = defineInputMap({ Move: Axis2D(Keys2D('KeyW','KeyS','KeyA','KeyD'), Stick('left')), Jump: Button(Key('Space'), GpButton(GamepadButton.South)),});// in a system: if (Game.pressed('Jump')) ...; const dir = Game.axis2d('Move');