Contains information about a specific Gamepad Axis. Axis objects are created automatically by the Gamepad as they are needed.
new Axis(pad, index)
name | type | description |
---|---|---|
pad | Phaser.Input.Gamepad.Gamepad |
A reference to the Gamepad that this Axis belongs to. |
index | number |
The index of this Axis. |
An event emitter to use to emit the axis events.
The index of this Axis.
A reference to the Gamepad that this Axis belongs to.
Movement tolerance threshold below which axis values are ignored in getValue
.
The raw axis value, between -1 and 1 with 0 being dead center.
Use the method getValue
to get a normalized value with the threshold applied.
Destroys this Axis instance and releases external references it holds.
Applies the threshold
value to the axis and returns it.
The axis value, adjusted for the movement threshold.