Properties:
| Name | Type | Description |
|---|---|---|
connected |
bool | [readonly] Whether the gamepad is currently connected. |
canRumble |
bool | [readonly] Whether the gamepad supports rumbling (force-feedback vibration). |
index |
number | (default: |
name |
string | [readonly] The name of the gamepad. |
axes |
Array.<number> | [readonly] Array of the axes' values. |
buttons |
Array.<bool> | [readonly] Array of the states of the buttons. |
triggers |
Array.<number> | [readonly] Array of the analog values of the buttons/triggers. |
Extends
Methods
-
Makes the gamepad rumble if supported.
Name Type Description intensitynumber A value between
0and1describing the rumbling intensity.durationnumber The rumbling duration in milliseconds.
callbackfunction An optional callback that tells when the rumbling is over.