src/components/avatar-replayer.js
function () {
    var spectatorCameraEl = this.spectatorCameraEl;

    if (!spectatorCameraEl) {
      this.el.addEventListener('spectatorcameracreated',
                               bind(this.activateSpectatorCamera, this));
      return;
    }

    if (!spectatorCameraEl.hasLoaded) {
      spectatorCameraEl.addEventListener('loaded', bind(this.activateSpectatorCamera, this));
      return;
    }

    log('Activating spectator camera');
    spectatorCameraEl.setAttribute('camera', 'active', true);
    this.cameraEl.getObject3D('replayerMesh').visible = true;
  }
function () {
    var spectatorCameraEl = this.spectatorCameraEl;

    if (!spectatorCameraEl) {
      this.el.addEventListener('spectatorcameracreated',
                               bind(this.activateSpectatorCamera, this));
      return;
    }

    if (!spectatorCameraEl.hasLoaded) {
      spectatorCameraEl.addEventListener('loaded', bind(this.activateSpectatorCamera, this));
      return;
    }

    log('Activating spectator camera');
    spectatorCameraEl.setAttribute('camera', 'active', true);
    this.cameraEl.getObject3D('replayerMesh').visible = true;
  }
function ( ) { var spectatorCameraEl = this . spectatorCameraEl ; if ( ! spectatorCameraEl ) { this . el . addEventListener ( 'spectatorcameracreated' , bind ( this . activateSpectatorCamera , this ) ) ; return ; } if ( ! spectatorCameraEl . hasLoaded ) { spectatorCameraEl . addEventListener ( 'loaded' , bind ( this . activateSpectatorCamera , this ) ) ; return ; } log ( 'Activating spectator camera' ) ; spectatorCameraEl . setAttribute ( 'camera' , 'active' , true ) ; this . cameraEl . getObject3D ( 'replayerMesh' ) . visible = true ; }
Activate spectator camera, show replayer mesh.
Activate spectator camera show replayer mesh .