API Referenceatlasatlas/input
AxisTrigger
Axis binding built from mouse motion, four directional keys, or one or two controller axes.
Module: atlas/input
Axis binding built from mouse motion, four directional keys, or one or two controller axes.
Declaration
export class AxisTrigger { ... }Properties
type
The category or discriminator for this value.
type: AxisTriggerType;positiveX
The positive X.
positiveX: Trigger;negativeX
The negative X.
negativeX: Trigger;positiveY
The positive Y.
positiveY: Trigger;negativeY
The negative Y.
negativeY: Trigger;controllerId
The runtime controller identifier.
controllerId?: number;controllerAxisSingle
Whether this binding reads one controller axis.
controllerAxisSingle: boolean;axisIndex
The optional axis index.
axisIndex?: number;axisIndexY
The axis index Y.
axisIndexY: number;isJoystick
Whether the device exposes raw joystick axes and buttons.
isJoystick: boolean;Methods
fromMouse
Creates an axis binding driven by mouse motion.
static fromMouse(): AxisTrigger;fromKeys
Creates a two-axis binding; arguments are positive X, negative X, positive Y, then negative Y.
static fromKeys(
positiveX: Key,
negativeX: Key,
positiveY: Key,
negativeY: Key,
): AxisTrigger;fromControllerAxis
Binds a controller axis or pair; single selects one axis, otherwise axisIndexY supplies the second axis.
static fromControllerAxis(
controllerId: number,
axisIndex: number,
single: boolean,
axisIndexY?: number,
): AxisTrigger;