... | ... | @@ -62,7 +62,7 @@ Edit the **index.html** and add the following HTML code to it: |
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport"
|
|
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
|
<title>Hello WebXR!</title>
|
|
|
<title>Cube Demo</title>
|
|
|
|
|
|
<!-- three.js -->
|
|
|
<script src="https://unpkg.com/three@0.126.0/build/three.js"></script>
|
... | ... | @@ -71,7 +71,7 @@ Edit the **index.html** and add the following HTML code to it: |
|
|
|
|
|
<!-- Starting an immersive WebXR session requires user interaction.
|
|
|
We start this one with a simple button. -->
|
|
|
<button onclick="activateXR()">Start Hello WebXR</button>
|
|
|
<button onclick="activateXR()">Start Cube Demo</button>
|
|
|
<script>
|
|
|
async function activateXR() {
|
|
|
// Add a canvas element and initialize a WebGL context that is compatible with WebXR.
|
... | ... | |