Class: MapPointerJoystickHandler
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/Map/MapPointerJoystickHandler.ts:21
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
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/Map/MapPointerJoystickHandler.ts:36
Constructor.
Parameters
Parameter | 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
MapPointerJoystickHandler
Methods
onInput()
onInput(
direction
,out
):Float64Array
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/Map/MapPointerJoystickHandler.ts:47
Handles a joystick input, converting it into a displacement vector for the map pointer.
Parameters
Parameter | 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.