Commit 8d5277bf authored by LAU's avatar LAU
Browse files

Update index.html

parent 1ee2a265
Pipeline #7893 passed with stage
in 4 seconds
...@@ -63,11 +63,12 @@ const camera = new THREE.PerspectiveCamera(); ...@@ -63,11 +63,12 @@ const camera = new THREE.PerspectiveCamera();
camera.matrixAutoUpdate = false; camera.matrixAutoUpdate = false;
// Initialize a WebXR session using "immersive-ar". // Initialize a WebXR session using "immersive-ar".
const session = await navigator.xr.requestSession("immersive-ar"); const session = await navigator.xr.requestSession("immersive-ar", {requiredFeatures: ['hit-test']});
session.updateRenderState({ session.updateRenderState({
baseLayer: new XRWebGLLayer(session, gl) baseLayer: new XRWebGLLayer(session, gl)
}); });
// A 'local' reference space has a native origin that is located // A 'local' reference space has a native origin that is located
// near the viewer's position at the time the session was created. // near the viewer's position at the time the session was created.
const referenceSpace = await session.requestReferenceSpace('local'); const referenceSpace = await session.requestReferenceSpace('local');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment