SystemInput

SystemInput

Creates input systems.

Constructor

new SystemInput($parameters)

Description:
  • Creates a new input system.
Source:
Example
const system = new SystemInput({$container});
system.initiate();
system.tick();
Parameters:
Name Type Description
$parameters Object The given parameters.
$parameters.$container HTMLElement The container on which to attach input events.

Methods

getInput($input) → {boolean}

Description:
  • Gets the current input state value of the given digital input.
Source:
Parameters:
Name Type Description
$input string The event code of the given digital input.
Returns:
Type
boolean

getInputAnalog($input) → {number}

Description:
  • Gets the current input state value of the given analog input.
Source:
Parameters:
Name Type Description
$input string The event code of the given analog input.
Returns:
Type
number

onInitiate()

Description:
  • Called when the system is being initiated.
Source:

onTerminate() → {void|Promise.<void>}

Description:
  • Called when the system is being terminated.
Source:
Returns:
Type
void | Promise.<void>

onTick($parameters)

Description:
  • Called when the system is being updated by one tick update.
Source:
Parameters:
Name Type Description
$parameters Object The given parameters.
$parameters.$stage Stage The stage on which to execute the system.
$parameters.$timetick number The tick duration (in ms).