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

    if (data.cameraOverride) {
      // Specify which camera is the original camera (e.g., used by Inspector).
      this.cameraEl = data.cameraOverride;
    } else {
      // Default camera.
      this.cameraEl = sceneEl.camera.el;
      // Make sure A-Frame doesn't automatically remove this camera.
      this.cameraEl.removeAttribute('data-aframe-default-camera');
    }
    this.cameraEl.setAttribute('data-aframe-avatar-replayer-camera', '');

    sceneEl.removeEventListener('camera-set-active', this.setupCamera);

    this.configureHeadGeometry();

    // Create spectator camera for either if we are in spectator mode or toggling to it.
    this.initSpectatorCamera();
  }
function () {
    var data = this.data;
    var sceneEl = this.el;

    if (data.cameraOverride) {
      // Specify which camera is the original camera (e.g., used by Inspector).
      this.cameraEl = data.cameraOverride;
    } else {
      // Default camera.
      this.cameraEl = sceneEl.camera.el;
      // Make sure A-Frame doesn't automatically remove this camera.
      this.cameraEl.removeAttribute('data-aframe-default-camera');
    }
    this.cameraEl.setAttribute('data-aframe-avatar-replayer-camera', '');

    sceneEl.removeEventListener('camera-set-active', this.setupCamera);

    this.configureHeadGeometry();

    // Create spectator camera for either if we are in spectator mode or toggling to it.
    this.initSpectatorCamera();
  }
function ( ) { var data = this . data ; var sceneEl = this . el ; if ( data . cameraOverride ) { // Specify which camera is the original camera (e.g., used by Inspector). this . cameraEl = data . cameraOverride ; } else { // Default camera. this . cameraEl = sceneEl . camera . el ; // Make sure A-Frame doesn't automatically remove this camera. this . cameraEl . removeAttribute ( 'data-aframe-default-camera' ) ; } this . cameraEl . setAttribute ( 'data-aframe-avatar-replayer-camera' , '' ) ; sceneEl . removeEventListener ( 'camera-set-active' , this . setupCamera ) ; this . configureHeadGeometry ( ) ; // Create spectator camera for either if we are in spectator mode or toggling to it. this . initSpectatorCamera ( ) ; }
Grab a handle to the "original" camera.
Initialize spectator camera and dummy geometry for original camera.
Grab a handle to the original camera . Initialize spectator camera and dummy geometry for original camera .