-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
34 lines (32 loc) · 1.02 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
<!DOCTYPE html>
<meta charset="utf8" />
<meta name="viewport" content="width=device-width, user-scalable=0" />
<title>Potato</title>
<link rel="stylesheet" href="../play/game.css" />
<link rel="stylesheet" href="../play/debug.css" />
<body>
<canvas id="billboard"></canvas>
<canvas id="scene"></canvas>
<main></main>
<audio loop autoplay>
<source src="./assets/music1.mp3" type="audio/mpeg" />
</audio>
<div id="debug">
<div>update: <span id="update"></span></div>
<div>delta: <span id="delta"></span></div>
<div>fps: <span id="fps"></span></div>
<div><button onclick="toggle(this)">pause</button></div>
</div>
<script type="module">
import "./src/index.js";
window.toggle = function toggle(button) {
if (game.Running) {
game.Stop();
button.textContent = "resume";
} else {
game.Start();
button.textContent = "pause";
}
};
</script>
</body>