Skip to content

vr-components/xboxpad

Repository files navigation

xBoxPad

This library to help you integrate an xBox 360 controller in your web application

You need an xBox 360 controller configured in your computer

Usage

Copy the library into your application

xBoxPad.on('pressed', function(buttons) {
  if (buttons.length === 1 && buttons[0] === 'A') {
    ... do something ...
  }
});

Build it

  • Install dependencies: npm install
  • Run bower install to install frontend dependencies
  • Run gulp to build the library

Configure your xBox 360 controller

I use OSX (Yosemite 10.10.2 at the moment of writting these instructions).

  1. You need an xBox 360 controller

  2. If you have a Wireless one you also need an USB receiver

  3. Install the driver

References

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

Future Development

  • Compabitility with xBox ONE controller
  • Generalization to other game pads, e.g: PS4

About

It helps you integrate an xBox 360 controller in your web application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published