1.0.6 ⢠Published 10 months ago
gamepad-api v1.0.6
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 ben@daisyowl.com for https://html5gamepad.com/.