Re: [w3c/gamepad] Spec liveness of Gamepad and GamepadButton objects (#8) (#123)

domenic commented on this pull request.



> -          MUST be returned until the <a>user agent</a> needs to return
-          different values (or values in a different order).
+          <p>
+          Array of {{GamepadButton}} objects representing the current state of
+          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.
+          </p>
+          <p>
+          When the system receives new data from a connected gamepad, a
+          microtask MUST be queued with the user interaction task source to
+          update the gamepad state. If the gamepad has the same buttons in the
+          same order as the previous update, the buttons attribute MUST return
+          the same array object. If the number of buttons or the ordering of
+          buttons has changed, the buttons attribute MUST return a new array

The behavior defined in the previous comment seems right to me. There is an async turn boundary between the value of the property changing which is very reasonable.

Also, I suspect both buttons and axes should have this behavior, not just axes.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/123#discussion_r348896758

Received on Thursday, 21 November 2019 05:00:48 UTC