
Gamepad data object. This object represents a snapshot of a gamepad state, it does not update automatically.
Buttons cluster container - 4 buttons.
Buttons cluster container - 3 buttons.
Front buttons.
Get if a gamepad button is currently pressed.
Gamepad data object. This object represents a snapshot of a gamepad state, it does not update automatically.
Kind: global class
StringVector2Vector2StringBooleanVector2Vector2BooleanBooleanFourButtonsClusterFourButtonsClusterFourButtonsClusterFrontButtonsBooleanNumberBooleanCreate gamepad state object.
| Param | Type | Description |
|---|---|---|
| gp | \* |
Browser gamepad state object. |
StringGamepad Id.
Kind: instance property of Gamepad
Vector2Gamepad first axis value.
Kind: instance property of Gamepad
Vector2Gamepad second axis value.
Kind: instance property of Gamepad
StringMapping type.
Kind: instance property of Gamepad
BooleanTrue if the gamepad is of a known type and we have extra mapped attributes. False if unknown / not supported.
Kind: instance property of Gamepad
Vector2Gamepad left stick. Only available with “standard” mapping.
Kind: instance property of Gamepad
Vector2Gamepad right stick. Only available with “standard” mapping.
Kind: instance property of Gamepad
BooleanGamepad left stick is pressed. Only available with “standard” mapping.
Kind: instance property of Gamepad
BooleanGamepad right stick is pressed. Only available with “standard” mapping.
Kind: instance property of Gamepad
FourButtonsClusterRight cluster button states.
Kind: instance property of Gamepad
FourButtonsClusterLeft cluster button states.
Kind: instance property of Gamepad
FourButtonsClusterCenter cluster button states.
Kind: instance property of Gamepad
FrontButtonsFront buttons states.
Kind: instance property of Gamepad
BooleanTrue if the gamepad is of a known type and we have extra mapped attributes. False if unknown.
Kind: instance property of Gamepad
NumberGet buttons count.
Kind: instance property of Gamepad
Returns: Number - Buttons count.
BooleanGet button state (if pressed down) by index.
Kind: instance method of Gamepad
Returns: Boolean - True if pressed, false otherwise.
| Param | Type | Description |
|---|---|---|
| index | Number |
Button index to check. |
Buttons cluster container - 4 buttons.
Create the cluster states.
| Param | Type | Description |
|---|---|---|
| bottom | Boolean |
Bottom button state. |
| right | Boolean |
Right button state. |
| left | Boolean |
Left button state. |
| top | Boolean |
Top button state. |
Buttons cluster container - 3 buttons.
Create the cluster states.
| Param | Type | Description |
|---|---|---|
| left | Boolean |
Left button state. |
| right | Boolean |
Right button state. |
| center | Boolean |
Center button state. |
Front buttons.
Create the cluster states.
Get if a gamepad button is currently pressed.
Kind: global function
Prviate: