diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-11-17 10:02:56 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-11-17 10:28:44 -0500 |
| commit | baae7dbc38ad4e131c107d9f0f638530ac250e2e (patch) | |
| tree | cb6c6dbab81424999617eef09885e798ee2c21c9 /game/www | |
| parent | Feedback and grade for Checkpoint (diff) | |
| download | DungeonCrawl-baae7dbc38ad4e131c107d9f0f638530ac250e2e.tar.gz DungeonCrawl-baae7dbc38ad4e131c107d9f0f638530ac250e2e.tar.bz2 DungeonCrawl-baae7dbc38ad4e131c107d9f0f638530ac250e2e.zip | |
wasm support!
Diffstat (limited to 'game/www')
| -rw-r--r-- | game/www/index.html | 44 |
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> |