Re: [w3c/gamepad] Should fire events instead of using passive model (#4)

Thanks for sharing the explainer!

Yes, I think event coalescing will be necessary and we are currently figuring out how it should work. We want to be able to support use cases where every input frame must be received with minimal latency as well as use cases that can benefit from events but don't want the overhead of handling every input frame.

Please take a look at the proposals in this [doc](https://docs.google.com/document/d/1rnQ1gU0iwPXbO7OvKS6KO9gyfpSdSQvKhK9_OkzUuKE). We've also opened a [TAG design review](https://github.com/w3ctag/design-reviews/issues/662) and comments are welcome on the [pull request](https://github.com/w3c/gamepad/pull/152).

Right now I'm leaning toward Proposal 3 which would keep buttondown/buttonup (with no coalescing) but remove axischange/buttonchange in favor of a unified change event that encapsulates all the changes within an input frame and provides a getCoalescedEvents method to retrieve events for skipped input frames. I think these events, along with the current polling interface, do a good job of covering all the use cases called out in this thread.

-- 
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/4#issuecomment-894460031

Received on Friday, 6 August 2021 19:03:34 UTC