gamepadtest icon indicating copy to clipboard operation
gamepadtest copied to clipboard

before contributing

Open GrosSacASac opened this issue 8 years ago • 6 comments

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 ?

GrosSacASac avatar Nov 25 '17 15:11 GrosSacASac

maybe changing it would render this kind of bug and fix obsolete https://github.com/nondebug/gamepadtest/commit/1f23b34cd7233cf2afbc17b589f00c28ecb6b1ec

GrosSacASac avatar Nov 25 '17 15:11 GrosSacASac

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.

luser avatar Nov 25 '17 20:11 luser

Replace<progress>with <meter> pull request sent

GrosSacASac avatar Nov 26 '17 13:11 GrosSacASac

I just tested and, we still need scangamepads for chrome otherwise the gampeds objects are not live but frozen. We can simplify it however

GrosSacASac avatar Nov 28 '17 01:11 GrosSacASac

hi can you have a look at open pull requests ?

GrosSacASac avatar Jun 23 '18 23:06 GrosSacASac

Could you have a look at https://github.com/luser/gamepadtest/pull/8 ?

GrosSacASac avatar Oct 18 '18 16:10 GrosSacASac