Showing content from https://webplatform.github.io/docs/apis/gamepad/Gamepad below:
Gamepad · WebPlatform Docs
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
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4