Open larsgk opened 5 years ago
Suggestion would be to add a button history array for v2.
It does not matter what the solution is, but this is a serious issue that needs fixed. Modern web APIs should not still have this problem. The API is the core which abstractions can be built on, it is poor quality when it cannot efficiently reproduce the information the underlying system already has.
I would be pleased to see any of many solutions to the problem implemented.
When discussing this issue please keep in mind the W3C's Code of Ethics and Professional Conduct. Then language used in the comment above is unnecessary to effectively communicate the issues with the current design.
You're right, I fixed the strong language.
Quickly pressing/releasing buttons could get lost between calls to navigator.getGamepads()
I fully understand why the API uses a polling mechanism (and not events) to e.g. prevent 'data overflow' of analog axis events, but perhaps it could be possible to include a history on each button with timestamps and data if more than one change happened since last call to getGamepads().
This is only really an issue if the framerate drops, of course.