index.html 849 Bytes
Newer Older
Acosta Vega's avatar
Acosta Vega committed
1
<!doctype html>
GitLab's avatar
GitLab committed
2
<html>
Acosta Vega's avatar
Acosta Vega committed
3
4
5
6
7
<head>
  <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>Cube Demo</title>
GitLab's avatar
GitLab committed
8

Acosta Vega's avatar
Acosta Vega committed
9
10
11
12
  <!-- three.js -->
  <script src="https://unpkg.com/three@0.126.0/build/three.js"></script>
</head>
<body>
GitLab's avatar
GitLab committed
13

Acosta Vega's avatar
Acosta Vega committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!-- Starting an immersive WebXR session requires user interaction.
    We start this one with a simple 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.
  const canvas = document.createElement("canvas");
  document.body.appendChild(canvas);
  const gl = canvas.getContext("webgl", {xrCompatible: true});

  // To be continued in upcoming steps.
}
</script>
</body>
GitLab's avatar
GitLab committed
28
29
</html>