-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
40 lines (40 loc) · 1.11 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!doctype html>
<html lang="en">
<head>
<title>WebGL</title>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="module">
import init, { render, on_key_down, on_key_up } from "/pkg/look_how_they_truncated_my_boy.js";
async function main() {
await init();
function loop(ms) {
render(ms);
requestAnimationFrame(loop);
}
document.addEventListener("keydown", on_key_down);
document.addEventListener("keyup", on_key_up);
requestAnimationFrame(loop);
}
main()
</script>
<script data-goatcounter="https://ryvsflpspddwwacxrnst.supabase.co/functions/v1/goat-counter/count" async src="./goat-counter.js"></script>
<style>
html,
body {
height: 100%;
margin: 0;
}
/* make the canvas fill its container */
canvas {
width: 100%;
height: 100%;
display: block;
}
</style>
</head>
<body>
<canvas></canvas>
</body>
</html>