src/systems/motion-capture-replayer.js
function (gamepads) {
    var i;
    var sceneEl = this.sceneEl;
    var trackedControlsSystem = sceneEl.systems['tracked-controls'];
    gamepads = gamepads || []
    // convert from read-only GamepadList
    gamepads = Array.from(gamepads)

    this.gamepads.forEach(function (gamepad) {
      if (gamepads[gamepad.index]) { return; }
      // to pass check in updateControllerListOriginal
      gamepad.pose = true;
      gamepads[gamepad.index] = gamepad;
    });

    this.updateControllerListOriginal(gamepads);
  }
function (gamepads) {
    var i;
    var sceneEl = this.sceneEl;
    var trackedControlsSystem = sceneEl.systems['tracked-controls'];
    gamepads = gamepads || []
    // convert from read-only GamepadList
    gamepads = Array.from(gamepads)

    this.gamepads.forEach(function (gamepad) {
      if (gamepads[gamepad.index]) { return; }
      // to pass check in updateControllerListOriginal
      gamepad.pose = true;
      gamepads[gamepad.index] = gamepad;
    });

    this.updateControllerListOriginal(gamepads);
  }
function ( gamepads ) { var i ; var sceneEl = this . sceneEl ; var trackedControlsSystem = sceneEl . systems [ 'tracked-controls' ] ; gamepads = gamepads || [ ] // convert from read-only GamepadList gamepads = Array . from ( gamepads ) this . gamepads . forEach ( function ( gamepad ) { if ( gamepads [ gamepad . index ] ) { return ; } // to pass check in updateControllerListOriginal gamepad . pose = true ; gamepads [ gamepad . index ] = gamepad ; } ) ; this . updateControllerListOriginal ( gamepads ) ; }
Wrap `updateControllerList` to stub in the gamepads and emit `controllersupdated`.
Wrap updateControllerList to stub in the gamepads and emit controllersupdated .