Gamepad object

[This documentation is preliminary and is subject to change.]

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.

PropertyAccess typeDescription

axes

Read-only

Array of current axis values supported by the gamepad device.

buttons

Read-only

Array of states for the buttons supported by the gamepad device.

connected

Read-only

Indicates whether the gamepad device is connected.

id

Read-only

Description of the gamepad device as reported by the underlying driver.

index

Read-only

The index position of the Gamepad object in the array reported by the navigator.getGamepads function.

mapping

Read-only

A string representing the current configuration (mapping) of the controls on the gamepad device.

timestamp

Read-only

A value representing the time the Gamepad object was recorded.

 

 

 

Show:
© 2015 Microsoft