This library to help you integrate an xBox 360 controller in your web application
You need an xBox 360 controller configured in your computer
Copy the library into your application
xBoxPad.on('pressed', function(buttons) {
if (buttons.length === 1 && buttons[0] === 'A') {
... do something ...
}
});
- Install dependencies:
npm install
- Run
bower install
to install frontend dependencies - Run
gulp
to build the library
I use OSX (Yosemite 10.10.2 at the moment of writting these instructions).
-
You need an xBox 360 controller
-
If you have a Wireless one you also need an USB receiver
-
Install the driver
https://github.com/luser/gamepadmapping.js
More detailed instructions on making an xBox controller work on OSX:
http://www.reddit.com/r/osx/comments/2ipi0u/how_to_use_the_xbox_360_controller_driver_on_os_x/
http://www.maclife.com/article/howtos/how_use_xbox_360_wireless_controller_your_mac
- Compabitility with xBox ONE controller
- Generalization to other game pads, e.g: PS4