Re: [w3c/gamepad] Need to spec liveness of Gamepad objects (#8)

@nondebug thanks, that look great! On the various "new array" questions, this is my best understanding:
- `navigator.getGamepads()` has to return a new each time, because the return value is `sequence<T>`. It was discussed earlier in the issue but I think this should be uncontroversial now.
- `axes` should return the same frozen array for every call until its values need to change, at which point it starts returning another frozen array.
- `buttons` is actually the same, that the values are objects and not numbers doesn't change much in terms of when a new array is returned.

For when updates happen, I think there are three choices:
- The spec defines exactly where in the rendering loop it happens, i.e., it would only happen between animation frames. I don't *think* this is what anyone wants though, because the gamepads aren't actually synchronized with the rendering at the hardware level.
- Allow updates to happen at the top of the event loop.
- Allow updates to happen at any microtask checkpoint.

Between the last two, I think "top of the event loop" is probably fine? But just matching what is or will be implemented is more important than what I think :)

-- 
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/issues/8#issuecomment-543580053

Received on Friday, 18 October 2019 07:55:24 UTC