diff --git a/public/index.html b/public/index.html
index 4c1973cc8692b00c52b7acc1c0a2fbabaf1b3232..a24508f46cff7bffb3e77a0695416e3e3d2b0e1d 100644
--- a/public/index.html
+++ b/public/index.html
@@ -51,6 +51,15 @@ renderer.autoClear = false;
 // to handle the matrices independently.
 const camera = new THREE.PerspectiveCamera();
 camera.matrixAutoUpdate = false;
+// Initialize a WebXR session using "immersive-ar".
+const session = await navigator.xr.requestSession("immersive-ar");
+session.updateRenderState({
+  baseLayer: new XRWebGLLayer(session, gl)
+});
+
+// A 'local' reference space has a native origin that is located
+// near the viewer's position at the time the session was created.
+const referenceSpace = await session.requestReferenceSpace('local');
 
 }
 </script>