Gamepad API
Used
Gamepad APIto setup wrapper for nicer usage.
Install
npm install gamepad-api
API
Gamepad;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: http://www.w3.org/TR/gamepad/
Thanks
Thanks ben@daisyowl.com for http://html5gamepad.com/.