Skip to main content

Function: registerInputs()

registerInputs(world, time, options?): InputManager

Defined in: input/register-inputs.ts:28

Creates an InputManager, registers it on a new entity in the world, and adds the update and reset systems that drive it each frame.

Parameters​

world​

EcsWorld

The world to register the input entity and systems with.

time​

Time

The Time instance used to advance the InputManager each frame.

options?​

Actions to register with the InputManager up front.

axis1dActions?​

Axis1dAction[]

1D axis actions to add to the InputManager.

axis2dActions?​

Axis2dAction[]

2D axis actions to add to the InputManager.

holdActions?​

HoldAction[]

Hold actions to add to the InputManager.

triggerActions?​

TriggerAction[]

Trigger actions to add to the InputManager.

Returns​

InputManager

The InputManager, for creating input sources and bindings against.