gamepad.js library for gamepad and joystick support in browser
It smoothes over the differences between browsers, platforms, APIs, and the wide variety of gamepad/joystick devices.
It offers two major features:
- A consistent mapping everywhere, so that you can simply access attributes like .leftStickX or .dpadDown rather than having to try to configure the device in your game/program.
- Images of the buttons/triggers/devices that correspond to the actual device the user has in their hand, so that you can offer intelligent prompts and help text. So, rather than “Press Button 0”, you can show a picture of the correct button. For example:
Visit the site / Checkout the repo
[Via http://www.html5gamedevs.com/2012/02/01/fullscreen-api-web-browsers/ ]