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

marcoscaceres 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

I guess that make sense... it doesn't feel good to swap out arrays, but yes, the async/looping aspects does make it reasonable. Thank you. 

-- 
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_r348897749

Received on Thursday, 21 November 2019 05:06:51 UTC