yarn add callbag-gamepads
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:
gamepads
|> forEach(gamepads => {
// have fun
});
- Xbox controllers
- iNNEXT SNES Retro USB Game Controller (Amazon)
- Callbag basics
- Why we need callbags, by André Staltz
- Using the Gamepad API (MDN) controller