summaryrefslogtreecommitdiff
path: root/game/www/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'game/www/index.html')
-rw-r--r--game/www/index.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/game/www/index.html b/game/www/index.html
new file mode 100644
index 0000000..2181c25
--- /dev/null
+++ b/game/www/index.html
@@ -0,0 +1,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>