-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
74 lines (67 loc) · 1.62 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Mage, fireballs</title>
<style type="text/css">
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
font-family: sans-serif;
color: lightgrey;
}
#render-target {
width: 100%;
height: 100%;
}
#helpers {
position: absolute;
top: 5px;
right: 5px;
padding: 8px;
border: 1px solid lightgrey;
background-color: black;
border-radius: 5px;
}
#helpers th {
font-weight: normal;
text-align: right;
}
</style>
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js",
"three/loaders/": "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/loaders/",
"three/postprocessing/": "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/postprocessing/"
}
}
</script>
</head>
<body>
<div id="render-target"></div>
<div id="helpers">
<table>
<tr>
<th>FPS:</th>
<td id="fps-placeholder"></td>
</tr>
<tr>
<th>Input X:</th>
<td id="input-x-placeholder"></td>
</tr>
<tr>
<th>Input Z:</th>
<td id="input-z-placeholder"></td>
</tr>
</table>
</div>
<script type="module">
import { setupGame, runGame } from "./game.js";
setupGame().then(runGame).catch(console.error);
</script>
</body>
</html>