wgpu-renderer/index.html

50 lines
No EOL
1.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>wgpu-renderer</title>
<style>
body {
margin: 0;
padding: 0;
background: black;
}
canvas {
background-color: black;
display: block;
width: 100vw;
height: 100vh;
}
#loading {
color: white;
position: absolute;
top: 50%;
right: 50%;
z-index: 100;
}
</style>
</head>
<body>
<h1 id="loading">Loading...</h1>
<script type="module">
import init from "./pkg/wgpu_renderer.js";
// TODO: still on GL, uncomment once WebGPU works
// if (!navigator.gpu) {
// document.getElementById("loading").innerText = "WebGPU not supported :(";
// } else {
init().then(() => {
console.log("WASM Loaded");
document.getElementById("loading").remove();
});
// }
</script>
</body>
</html>