This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

Gamepad

Summary

This object defines an individual gamepad device. Data is retrieved via the DOM Navigator object’s getGamepads() method.

Properties

axes
Array of values for all axes of the gamepad. Each entry in the array is a floating point value in the range -1.0 - 1.0, representing the axis position from the lowest value (-1.0) to the highest value (1.0).
buttons
Array of values for all buttons of the gamepad.
id
A string that identifies the brand or style of connected gamepad device.
index
The index of the gamepad in the Navigator.
timestamp
A timestamp indicating the last time the data for this gamepad was updated.

Methods

No methods.

Events

No events.

Related specifications

W3C Gamepad Specification
W3C Working Draft