summaryrefslogtreecommitdiff
path: root/game/www/index.html
blob: 2181c25cf0a122f7330c5005e38a1238a210b67c (plain)
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
<!doctype html>
<html lang="en-us">
	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	    <meta name="viewport" content="width=device-width">
		<meta property="og:title" content="Dungeon Crawl">
		<meta property="og:description" content="Dungeon Crawl game!">
	    <title>Dungeon Crawl</title>
	    <style>
			* {
				margin: 0;
				padding: none;
				border: none;
			}

	        canvas {
	            width: 100%;
				height: 100%;
	            display: block;
	            background: black;
	        }
	    </style>
	</head>
	<body>
	    <canvas id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
	    <script type='text/javascript'>
	        var Module = {
	            canvas: (function () {
	                var canvas = document.querySelector('#canvas');
					canvas.addEventListener("webglcontextlost", function (e) {
						alert('WebGL context lost. You will need to reload the page.');
						e.preventDefault();
					}, false);
	                return canvas;
	            })(),
	            print: console.log,
				printErr: console.error,
	            setStatus: console.debug,
	        };
	    </script>
	    <script src="game.js"></script>
	</body>
</html>