diff --git a/public/index.html b/public/index.html index 6652c7dd60ad34f6d80148f3c8e6876702d19854..7d2fe4b28b2bfbf86d4294d9feb99308b06efb0f 100644 --- a/public/index.html +++ b/public/index.html @@ -1,23 +1,28 @@ -<!DOCTYPE html> +<!doctype html> <html> - <head> - <meta charset="utf-8"> - <meta name="generator" content="GitLab Pages"> - <title>Plain HTML site using GitLab Pages</title> - <link rel="stylesheet" href="style.css"> - </head> - <body> - <div class="navbar"> - <a href="https://pages.gitlab.io/plain-html/">Plain HTML Example</a> - <a href="https://gitlab.com/pages/plain-html/">Repository</a> - <a href="https://gitlab.com/pages/">Other Examples</a> - </div> +<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> - <h1>Hello World!</h1> + <!-- three.js --> + <script src="https://unpkg.com/three@0.126.0/build/three.js"></script> +</head> +<body> - <p> - This is a simple plain-HTML website on GitLab Pages, without any fancy static site generator. - </p> - </body> -</html> +<!-- 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> +</html>