.xr.isSessionSupported('immersive-vr').then((supported) => {
            xrButton.enabled = supported;
          });

          navigator.xr.requestSession('inline').then(onSessionStarted);
        }
      }

      function initGL() {
        if (gl)
          return;

        gl = createWebGLContext({
          xrCompatible: true
        });

        // Note: If you don't want dragging on the canvas to do things like
        // scroll or pull-to-refresh, you'll want to set touch-action: none;
        // on