Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughsk/voxel-gamepad
HTML5 gamepad API support for voxel.js
https://github.com/hughsk/voxel-gamepad
Last synced: 12 days ago
JSON representation
HTML5 gamepad API support for voxel.js
- Host: GitHub
- URL: https://github.com/hughsk/voxel-gamepad
- Owner: hughsk
- License: other
- Created: 2013-06-27T02:26:52.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-27T02:27:42.000Z (over 11 years ago)
- Last Synced: 2024-10-17T16:37:43.222Z (22 days ago)
- Language: JavaScript
- Homepage: http://hughsk.github.io/voxel-gamepad/
- Size: 443 KB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# voxel-gamepad #
Adds gamepad support for voxel.js using the HTML5 Gamepad API.
If you're looking for a gamepad which works well cross-platform, try the
[Logitech F310](http://www.logitech.com/en-au/support/gamepad-f310). An Xbox
controller should suffice on Windows.Not working? Try the [gamepad tester](http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html)
and see how it goes - otherwise, open an issue :)## Installation ##
``` bash
npm install voxel-gamepad
```## Usage ##
### `require('voxel-gamepad')(game)` ###
Call the function on the game instance to load up gamepad support. Now, you
should be able to connect your controller, open up the game, and press one of
the controller's face buttons to start using your gamepad.``` javascript
var engine = require('voxel-engine')
, gamepad = require('voxel-gamepad')var game = engine({
materials: ['#fff', '#000']
, materialFlatColor: true
, chunkDistance: 2
, contols: {
discreteFire: true
}
})gamepad(game)
```