WebXRManager constructor

WebXRManager(
  1. WebGLRenderer renderer,
  2. RenderingContext gl
)

Implementation

WebXRManager(this.renderer, this.gl) : super() {
// final scope = this;
  state = renderer.state;
  cameraL.layers.enable( 1 );
  cameraL.viewport = Vector4.zero();

  cameraR.layers.enable( 2 );
  cameraR.viewport = Vector4.zero();

  cameraVR = ArrayCamera([ cameraL, cameraR ]);

  cameraVR.layers.enable( 1 );
  cameraVR.layers.enable( 2 );

  animation.setAnimationLoop( onAnimationFrame );
}