generated from piesku/goodluck
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
45 lines (42 loc) · 1.58 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
<!DOCTYPE html>
<meta charset="utf8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<meta name="monetization" content="$ilp.uphold.com/QgQz4P8FygUZ" />
<title>ROAR (dev)</title>
<link rel="stylesheet" href="play/game.css" />
<link rel="stylesheet" href="play/debug.css" />
<body>
<canvas></canvas>
<main></main>
<img src="./textures/fire3.webp" id="fire" />
<img src="./textures/building1.webp" id="building1" />
<img src="./textures/building2.webp" id="building2" />
<img src="./textures/building3.webp" id="building3" />
<img src="./textures/building4.webp" id="building4" />
<img src="./textures/police.webp" id="police" />
<img src="./textures/missile2.webp" id="missile" />
<img src="./textures/noise2.webp" id="noise" />
<img src="./textures/cage.webp" id="cage" />
<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 {loop_start, loop_stop} from "./src/core.js";
import "./src/index.js";
let running = true;
window.toggle = function toggle(button) {
if (running) {
running = false;
loop_stop(game);
button.textContent = "resume";
} else {
running = true;
loop_start(game);
button.textContent = "pause";
}
};
</script>
</body>