before contributing
Hi, first thanks for this awesome demo!
Would you accept a pull request with the following commits ? :
- Replace
<progress>with<meter> - Rename variables that uses single letter with more descriptive names
- performance optimizations
Also another question: Is window.addEventListener("gamepadconnected", connecthandler); window.addEventListener("gamepaddisconnected", disconnecthandler); useless considering scangamepads(); is called all the time in the requestAnimationFrame ? Or am I missing something ?
maybe changing it would render this kind of bug and fix obsolete https://github.com/nondebug/gamepadtest/commit/1f23b34cd7233cf2afbc17b589f00c28ecb6b1ec
Hi there!
This is just a simple demo app, but it's somewhat popular for demonstrating the Gamepad API, so I would certainly take PRs for improvements that don't break any functionality.
RE: the event listeners vs. scangamepads, Chrome did not support the gamepad events initially, but that's long enough ago that we can presumably drop that code and rely on the events.
Replace<progress>with <meter> pull request sent
I just tested and, we still need scangamepads for chrome otherwise the gampeds objects are not live but frozen. We can simplify it however
hi can you have a look at open pull requests ?
Could you have a look at https://github.com/luser/gamepadtest/pull/8 ?