src/embed/world-renderer.js
function WorldRenderer(params) {
  this.init_(params.hideFullscreenButton);

  this.sphereRenderer = new SphereRenderer(this.scene);
  this.hotspotRenderer = new HotspotRenderer(this);
  this.hotspotRenderer.on('focus', this.onHotspotFocus_.bind(this));
  this.hotspotRenderer.on('blur', this.onHotspotBlur_.bind(this));
  this.reticleRenderer = new ReticleRenderer(this.camera);

  // Get the VR Display as soon as we initialize.
  navigator.getVRDisplays().then(function(displays) {
    if (displays.length > 0) {
      this.vrDisplay = displays[0];
    }
  }.bind(this));

}
function WorldRenderer(params) {
  this.init_(params.hideFullscreenButton);

  this.sphereRenderer = new SphereRenderer(this.scene);
  this.hotspotRenderer = new HotspotRenderer(this);
  this.hotspotRenderer.on('focus', this.onHotspotFocus_.bind(this));
  this.hotspotRenderer.on('blur', this.onHotspotBlur_.bind(this));
  this.reticleRenderer = new ReticleRenderer(this.camera);

  // Get the VR Display as soon as we initialize.
  navigator.getVRDisplays().then(function(displays) {
    if (displays.length > 0) {
      this.vrDisplay = displays[0];
    }
  }.bind(this));

}
function WorldRenderer ( params ) { this . init_ ( params . hideFullscreenButton ) ; this . sphereRenderer = new SphereRenderer ( this . scene ) ; this . hotspotRenderer = new HotspotRenderer ( this ) ; this . hotspotRenderer . on ( 'focus' , this . onHotspotFocus_ . bind ( this ) ) ; this . hotspotRenderer . on ( 'blur' , this . onHotspotBlur_ . bind ( this ) ) ; this . reticleRenderer = new ReticleRenderer ( this . camera ) ; // Get the VR Display as soon as we initialize. navigator . getVRDisplays ( ) . then ( function ( displays ) { if ( displays . length > 0 ) { this . vrDisplay = displays [ 0 ] ; } } . bind ( this ) ) ; }
The main WebGL rendering entry point. Manages the scene, camera, VR-related
rendering updates. Interacts with the WebVRManager.

Coordinates the other renderers: SphereRenderer, HotspotRenderer,
ReticleRenderer.

Also manages the AdaptivePlayer and VideoProxy.

Emits the following events:
load: when the scene is loaded.
error: if there is an error loading the scene.
modechange(Boolean isVR): if the mode (eg. VR, fullscreen, etc) changes.
The main WebGL rendering entry point . Manages the scene camera VR - related rendering updates . Interacts with the WebVRManager .