-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.html
57 lines (57 loc) · 2.17 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>boxel-y voxel-y thing</title>
<link rel="stylesheet" href="res/main.css" />
</head>
<body>
<canvas width="300" height="200"></canvas>
<script type="module" src="src/main.js"></script>
<div id="overlay">
<div><strong>W,A,S,D</strong>: move</div>
<div><strong>mouse</strong>: look</div>
<div><strong>SPACE</strong>: jump (hold to fly)</div>
<div><strong>E / portal</strong>: create new world</div>
<div><strong>left click</strong>: add block</div>
<div><strong>right click</strong>: destructo mode</div>
<div><strong>shift click</strong>: delete block</div>
<div>
<a href="https://github.com/mrspeaker/webgl2-voxels">github repo</a>
</div>
<div><span id="deb1"></span></div>
<div><span id="deb2"></span></div>
</div>
<img id="cross" src="res/cross.png" />
<div id="ad">
Oh hi! I just wrote a book to help you make that amazing game you've been
thinking about. You should check it out.<br />
Press `<strong>B</strong>` to start makin' some games.
</div>
<noscript>
<p class="anotherVisitor">
Welcome! This is WebGL2 experiment - the classic minecraft world. If
you'd like to explore it, you will need to enable JavaScript. Go on,
just for a minute!
</p>
</noscript>
<p id="nosupport" class="anotherVisitor">
Welcome! This is WebGL2 experiment - the classic minecraft world. But it's
using features (<span id="nomodule">
<a
href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import"
>JavaScript Native Modules</a
></span
><span id="nowebgl2">WebGL2</span>) that it seems like your browser
doesn't support yet.<br /><br />
<a href="https://github.com/mrspeaker/webgl2-voxels"
>Have a look at the code</a
>
if you're that way inclined. WegGL2 is pretty fun.
</p>
<script nomodule>
document.querySelector("#nosupport").style.display = "block";
document.querySelector("#nomodule").style.display = "inline";
</script>
</body>
</html>