Commit 3202737a authored by Rafiei's avatar Rafiei
Browse files

Update index.html

parent 8d6b1a90
Pipeline #9661 passed with stage
in 7 seconds
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" <meta name="viewport"
...@@ -9,13 +10,14 @@ ...@@ -9,13 +10,14 @@
<!-- three.js --> <!-- three.js -->
<script src="https://unpkg.com/three@0.126.0/build/three.js"></script> <script src="https://unpkg.com/three@0.126.0/build/three.js"></script>
</head> </head>
<body> <body>
<!-- Starting an immersive WebXR session requires user interaction. <!-- Starting an immersive WebXR session requires user interaction.
We start this one with a simple button. --> We start this one with a simple button. -->
<button onclick="activateXR()">Start Cube Demo</button> <button onclick="activateXR()">Start Cube Demo</button>
<script> <script>
async function activateXR() { async function activateXR() {
// Add a canvas element and initialize a WebGL context that is compatible with WebXR. // Add a canvas element and initialize a WebGL context that is compatible with WebXR.
const canvas = document.createElement("canvas"); const canvas = document.createElement("canvas");
document.body.appendChild(canvas); document.body.appendChild(canvas);
...@@ -93,6 +95,7 @@ session.requestAnimationFrame(onXRFrame); ...@@ -93,6 +95,7 @@ session.requestAnimationFrame(onXRFrame);
} }
</script> </script>
</body> </body>
</html> </html>
Markdown is supported
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