diff --git a/index.html b/index.html index bba99f2..f11f025 100644 --- a/index.html +++ b/index.html @@ -209,7 +209,11 @@
- This interface defines an individual gamepad device. + This interface represents an individual gamepad device. A Gamepad is a + live object; that is, user interaction with the device will be reflected + in the state of the object's properties. When the system receives new + data from a connected gamepad, a microtask is queued in the current + event loop to update the state of the Gamepad object.
[Exposed=Window] @@ -230,7 +234,8 @@
An identification string for the gamepad. This string identifies the brand or style of connected gamepad device. Typically, this will - include the USB vendor and a product ID. + include the USB vendor and a product ID. The ID string MUST NOT change + once the Gamepad object has been returned to script. index attribute @@ -296,19 +301,19 @@ then Y. It is RECOMMENDED that axes appear in decreasing order of importance, such that element 0 and 1 typically represent the X and Y axis of a directional stick. The same object MUST be returned until - the user agent needs to return different values (or values in - a different order). + the user agent needs to modify the length of the array or + return different axis values.
buttons attribute - Array of button states for all buttons of the gamepad. It is + Array of GamepadButton objects representing all buttons of the gamepad. It is RECOMMENDED that buttons appear in decreasing importance such that the primary button, secondary button, tertiary button, and so on appear as elements 0, 1, 2, ... in the buttons array. The same object - MUST be returned until the user agent needs to return - different values (or values in a different order). + MUST be returned until the user agent needs to modify the + length of the array or the button ordering. @@ -318,7 +323,13 @@
This interface defines the state of an individual button on a gamepad - device. + device. A GamepadButton is a live object; that is, user interaction with + the button represented by the object will be reflected in the object's + properties. When the system receives new data from a connected gamepad, + a microtask is queued in the current event loop to update the state of + the GamepadButton object. If a gamepad device is disconnected, the + GamepadButton objects representing its buttons MUST continue to return + the last state received from the device before disconnection.
[Exposed=Window] @@ -416,7 +427,7 @@getGamepads
- Retrieve a snapshot of the data for the the currently connected and + Retrieve an array of Gamepad objects representing currently connected and interacted-with gamepads. Gamepads MUST only appear in the list if they are currently connected to the user agent, and at least one device has been interacted with by the user. If no devices have