Skip to main content

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

NameTypeDefault valueDescription
accelTimeThresholdnumberMapPointerJoystickHandler.DEFAULT_ACCEL_TIME_THRESHOLDThe maximum time, in milliseconds, between inputs required to trigger acceleration. Defaults to MapPointerJoystickHandler.DEFAULT_ACCEL_TIME_THRESHOLD.

Returns

MapPointerJoystickHandler

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

NameTypeDescription
directionMapPointerJoystickDirectionThe direction of the input.
outFloat64ArrayThe 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