From c9203007f048ffe44ea13b72c22e6cdf5fff98c8 Mon Sep 17 00:00:00 2001
From: Karakas <22kaen1bdi@hft-stuttgart.de>
Date: Thu, 23 Nov 2023 09:47:29 +0000
Subject: [PATCH] Update public/index.html

---
 public/index.html | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/public/index.html b/public/index.html
index 6651dc4..aec9a1d 100644
--- a/public/index.html
+++ b/public/index.html
@@ -38,6 +38,21 @@ async function activateXR() {
   cube.position.set(1, 1, 1);
   scene.add(cube);
 
+  // Set up the WebGLRenderer, which handles rendering to the session's base layer.
+  const renderer = new THREE.WebGLRenderer({
+    alpha: true,
+    preserveDrawingBuffer: true,
+    canvas: canvas,
+    context: gl
+  });
+  renderer.autoClear = false;
+
+  // The API directly updates the camera matrices.
+  // Disable matrix auto updates so three.js doesn't attempt
+  // to handle the matrices independently.
+  const camera = new THREE.PerspectiveCamera();
+  camera.matrixAutoUpdate = false;
+
 }
 </script>
 </body>
-- 
GitLab