Class: MapPointerJoystickHandler
A handler for joystick inputs that control the movement of a map pointer. Consumes inputs and converts them into displacement vectors for the map pointer. Supports input acceleration.
Constructors
constructor
• new MapPointerJoystickHandler(accelTimeThreshold?
): MapPointerJoystickHandler
Constructor.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
accelTimeThreshold | number | MapPointerJoystickHandler.DEFAULT_ACCEL_TIME_THRESHOLD | The maximum time, in milliseconds, between inputs required to trigger acceleration. Defaults to MapPointerJoystickHandler.DEFAULT_ACCEL_TIME_THRESHOLD. |
Returns
Defined in
src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Components/Map/MapPointerJoystickHandler.ts:36
Methods
onInput
▸ onInput(direction
, out
): Float64Array
Handles a joystick input, converting it into a displacement vector for the map pointer.
Parameters
Name | Type | Description |
---|---|---|
direction | MapPointerJoystickDirection | The direction of the input. |
out | Float64Array | The vector to which to write the result. |
Returns
Float64Array
The displacement vector for the map pointer commanded by the input.
Defined in
src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/Components/Map/MapPointerJoystickHandler.ts:47