gamepad-api

    1.0.1 • Public • Published

    Gamepad API

    npm version

    Used Gamepad API to setup wrapper for nicer usage.

    Install

    npm install gamepad-api
    

    API

    Gamepad.on('SUPPORTED_EVENT', function () {
      // do something ...
    });

    Supported events

    • Joysticks

      • joystick:left - when user use left joystick
      • joystick:right - when user use right joystick
    • Arrows

      • arrow:up
      • arrow:right
      • arrow:down
      • arrow:left
    • Shapes

      • shape:triangle
      • shape:circle
      • shape:cross
      • shape:square
    • Special

      • special:select
      • special:start
      • special:ps
    • Extras

      • extra:l1
      • extra:l2
      • extra:r1
      • extra:r2

    Gamepad API

    More details in specification: http://www.w3.org/TR/gamepad/

    Thanks

    Thanks ben@daisyowl.com for http://html5gamepad.com/.

    License

    The MIT License

    Install

    npm i gamepad-api

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar