Description

Adds a listener when a button is pressed or released

Usage

Parameters

  • Id {String}

    button. See https://github.com/sgraham/gamepad.js

  • onDown {Function}

    Callback function when the button is pressed

  • onUp {Function}

    Callback function when the button is released

Discussion