Gamepad object
Gamepad objects describe the state of the buttons and axes associated with a gamepad device at a given time. Use the Navigator.getGamepads function to retrieve an array of gamepad objects representing the gamepad devices connected to the device running Internet Explorer.
Syntax
var aGamepads = navigator.getGamepads();
DOM Information
Inheritance Hierarchy
The Gamepad does not inherit from any class or interface.Members
The Gamepad object has these types of members:
Properties
The Gamepad object has these properties.
| Property | Access type | Description |
|---|---|---|
|
Read-only |
Array of current axis values supported by the gamepad device. | |
|
Read-only |
Array of states for the buttons supported by the gamepad device. | |
|
Read-only |
Indicates whether the gamepad device is connected. | |
|
Read-only |
The displayId property returns the VRDisplay that is associated with this Gamepad object. | |
|
Read-only |
The hand property specifies the hand that the controller is held in or is most likely to be held in. | |
|
Read-only |
The hapticActuators property returns an array of all the haptic actuators in the gamepad. | |
|
Read-only |
Description of the gamepad device as reported by the underlying driver. | |
|
Read-only |
The index position of the Gamepad object in the array reported by the navigator.getGamepads function. | |
|
Read-only |
A string representing the current configuration (mapping) of the controls on the gamepad device. | |
|
Read-only |
The pose property returns the current pose of the gamepad. | |
|
Read-only |
A value representing the time the Gamepad object was recorded. |