A library designed to make the Gamepad API easier to use for non-gaming applications.
→ Controller.js documentation
→ Try it out now
-
Download the lastest build.
-
Unpack the ZIP file and copy the library and (optionally) the layouts add-on to your project files.
-
Include the library and layouts add-on just before your closing
<body>
tag:<script src="path/to/Controller.min.js"></script> <script src="path/to/Controller.layouts.min.js"></script> <!-- optional -->
-
Start listening for gamepads with
Controller.search()
. -
Read the documentation and build something cool.
The main requirement of Controller.js is the Gamepad API itself. However it's only been tested and guaranteed to work in the following:
- Chrome 52+
- Firefox 48+
- Edge 14+
For up-to-date information on the status of the Gamepad API in browsers, check Can I use.
The MIT License (MIT)
Copyright © 2016 Samir Zahran