src/components/tracked-controls-webvr.js
function (id, buttonState) {
    var changed;
    changed = this.handlePress(id, buttonState) |
              this.handleTouch(id, buttonState) |
              this.handleValue(id, buttonState);
    if (!changed) { return false; }
    this.el.emit(EVENTS.BUTTONCHANGED, this.buttonEventDetails[id], false);
    return true;
  }
function (id, buttonState) {
    var changed;
    changed = this.handlePress(id, buttonState) |
              this.handleTouch(id, buttonState) |
              this.handleValue(id, buttonState);
    if (!changed) { return false; }
    this.el.emit(EVENTS.BUTTONCHANGED, this.buttonEventDetails[id], false);
    return true;
  }
function ( id , buttonState ) { var changed ; changed = this . handlePress ( id , buttonState ) | this . handleTouch ( id , buttonState ) | this . handleValue ( id , buttonState ) ; if ( ! changed ) { return false ; } this . el . emit ( EVENTS . BUTTONCHANGED , this . buttonEventDetails [ id ] , false ) ; return true ; }
Handle presses and touches for a single button.

@param {number} id - Index of button in Gamepad button array.
@param {number} buttonState - Value of button state from 0 to 1.
@returns {boolean} Whether button has changed in any way.
Handle presses and touches for a single button .