createXRCanvas() {
    this.canvas = document.createElement("canvas");
    document.body.appendChild(this.canvas);
    this.gl = this.canvas.getContext("webgl", {xrCompatible: true});

    this.xrSession.updateRenderState({
      baseLayer: new XRWebGLLayer(this.xrSession, this.gl)
    });
  }
/**
   * Add a canvas element and initialize a WebGL context that is compatible with WebXR.
   */
Add a canvas element and initialize a WebGL context that is compatible with WebXR.
Add a canvas element and initialize a WebGL context that is compatible with WebXR .
createXRCanvas() {
    this.canvas = document.createElement("canvas");
    document.body.appendChild(this.canvas);
    this.gl = this.canvas.getContext("webgl", {xrCompatible: true});
    this.xrSession.updateRenderState({
      baseLayer: new XRWebGLLayer(this.xrSession, this.gl)
    });
  }
createXRCanvas ( ) { this . canvas = document . createElement ( "canvas" ) ; document . body . appendChild ( this . canvas ) ; this . gl = this . canvas . getContext ( "webgl" , { xrCompatible : true } ) ; this . xrSession . updateRenderState ( { baseLayer : new XRWebGLLayer ( this . xrSession , this . gl ) } ) ; }
Add a canvas element and initialize a WebGL context that is compatible with WebXR.
Add a canvas element and initialize a WebGL context that is compatible with WebXR .