Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaronshaf/callbag-gamepads
Callbag source for connected gamepad inputs
https://github.com/aaronshaf/callbag-gamepads
callbag gamepad gamepad-api
Last synced: 17 days ago
JSON representation
Callbag source for connected gamepad inputs
- Host: GitHub
- URL: https://github.com/aaronshaf/callbag-gamepads
- Owner: aaronshaf
- License: mit
- Created: 2018-02-06T00:32:07.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-21T17:23:10.000Z (over 6 years ago)
- Last Synced: 2024-10-16T04:32:48.284Z (25 days ago)
- Topics: callbag, gamepad, gamepad-api
- Language: JavaScript
- Homepage: https://callbag-gamepads.netlify.com/
- Size: 50.8 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-callbags - gamepads
README
```
yarn add callbag-gamepads
``````javascript
const pipe = require("callbag-pipe");
const forEach = require("callbag-for-each");
const gamepads = require("callbag-gamepads");pipe(
gamepads,
forEach(gamepads => {
// have fun
})
);
```If you're blessed with the [pipeline operator](https://github.com/tc39/proposal-pipeline-operator):
```javascript
gamepads
|> forEach(gamepads => {
// have fun
});
```## Verified to work with
* Xbox controllers
* [iNNEXT SNES Retro USB Game Controller](http://a.co/hgkJPTZ) (Amazon)## Learn more
* [Callbag basics](https://github.com/staltz/callbag-basics)
* [Why we need callbags](https://staltz.com/why-we-need-callbags.html), by André Staltz
* [Using the Gamepad API](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API) (MDN)
controller