The type of control.
The (control-specific) index of the control.
Buttons correspond to the standard layout specified in https://www.w3.org/TR/gamepad/#dfn-standard-gamepad.
Axes are mapped slightly differently:
Web API Standard Gamepad | This API |
---|---|
Axis 0 (left stick x-axis) | Axis2D 0 |
Axis 1 (left stick y-axis) | Axis2D 0 |
Axis 2 (right stick x-axis) | Axis2D 1 |
Axis 3 (right stick y-axis) | Axis2D 1 |
Axis n (for n >= 4) | Axis (n - 4) |
The identifier, unique per client + device combo.
The event type.
The 2D value of the axes.
The value on the x-axis (between -1.0 and 1.0, modeled after the Web Gamepad API)
The value on the y-axis (between -1.0 and 1.0, modeled after the Web Gamepad API)
Generated using TypeDoc
A 2D axis event on the gamepad.