gamepad-api
v1.0.6
Published
🔨 Used Gamepad API to setup wrapper for nicer usage.
Maintainers
Readme
gamepad-api
🔨 Used Gamepad API to setup wrapper for nicer usage.
Preview 🎉
https://piecioshka.github.io/gamepad-api/demo/
Usage
Installation:
npm install gamepad-apiGamepad.on('SUPPORTED_EVENT', function () {
// do something ...
});API / Supported events
Joysticks
joystick:left- when user use left joystickjoystick:right- when user use right joystick
Arrows
arrow:uparrow:rightarrow:downarrow:left
Shapes
shape:triangleshape:circleshape:crossshape:square
Special
special:selectspecial:startspecial:ps
Extras
extra:l1extra:l2extra:r1extra:r2
Gamepad API
More details in specification: https://www.w3.org/TR/gamepad/
Thanks
Thanks [email protected] for https://html5gamepad.com/.
