Intent to Implement: Gamepad Button and Axis Events
50 views
Skip to first unread message
Matt Reynolds
unread,
Jun 28, 2018, 8:45:29 PM6/28/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 'Joe Medley' via blink-dev
mattre...@chromium.orghttps://docs.google.com/document/d/1rnQ1gU0iwPXbO7OvKS6KO9gyfpSdSQvKhK9_OkzUuKE
Adds gamepad input events for gamepadbuttondown, gamepadbuttonup, gamepadbuttonchange, and gamepadaxismove.
To consume gamepad button and axis input through the Gamepad API, applications must periodically fetch the latest gamepad data by calling navigator.getGamepads(). There are some issues with this approach. A polling-only interface means that applications that aim to achieve low input latency are required to poll at least as quickly as the browser's internal polling rate, which is not exposed through the API and may vary between browser vendors. It also means that some inputs may be lost if the tab fails to poll at the correct time. Introducing events for gamepad inputs would relieve the burden of input polling from the page and allow it to be notified when inputs are received outside the normal polling loop. For some applications it could eliminate the need for a polling loop altogether.
Firefox: Shipped (behind dom.gamepad.non_standard_events.enabled)
Edge: No public signals
Safari: No public signals
Web developers: Positive
There are minor differences between the proposed API change and the API as implemented in Firefox. However, it is unlikely that any applications rely on these non-standard events, and the differences are minor enough that they are compatible for most applications.
None
Yes