        planeMesh.updateMatrixWorld();
            planeMesh.visible = true;
          } else {
            planeMesh.visible = false;
          }
        }
      } */

      renderer.render(scene, renderer.vr.enabled ? renderer.vr.getCamera(camera) : camera);
    }

    (async () => {
      await init();

      // console.log('request session');
      session = await navigator.xr.requestSession({
        exclusive: true,
        extensions: {
          planeTracking: true,
        },
      }).catch(err => 