-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
48 lines (46 loc) · 1.24 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
<html>
<head>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-179077851-1');
</script>
<meta charset="UTF-8" />
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@600&display=swap" rel="stylesheet">
<script type="module">
import init from './target/wasm.js'
init()
function auto_focus() {
let canvas = document.getElementsByTagName("canvas");
if (!canvas.length) {
setTimeout(auto_focus, 100);
} else {
canvas[0].focus();
}
}
auto_focus();
</script>
<style>
* {
font-family: 'Source Code Pro', monospace;
color: #777;
}
#board {
font-size: 2em;
margin: 0px;
line-height: 120%;
}
</style>
<body>
<div>
<canvas id="bevy-canvas" tabIndex="0" autofocus height="576" width="992"></canvas>
<p>
Arrows: move<br />
Space: set bomb<br />
Enter: start or restart<br />
Esc: Exit the game</p>
<a href="#" onclick="var c = document.getElementById('bevy-canvas'); let x = (c.webkitRequestFullScreen || c.requestFullscreen); x.call(c);">fullscreen</a>
</div>
</body>
</html>