button()
Shorthand for a ButtonBinding: button("key:Space", "pad:A", "touch:jump").
function button(...sources: string[]): ButtonBinding;Defined in: engine/src/input/actions.ts:48
Parameters
| Parameter | Type |
|---|---|
...sources | string[] |
Returns
axis()
Shorthand for an AxisBinding: axis({ negative: ["key:KeyA"], positive: ["key:KeyD"], analog: ["pad:LeftX"] }).
createInput()
Create the input for one surface, usually the canvas. Make one per surface and build everything else on it; dispose() removes every listener at once. DOM-only in practice, though the targets and clocks can be injected (see InputOptions) to drive it headlessly.