diff options
author | quou <quou@disroot.org> | 2023-05-06 16:51:36 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2023-05-06 16:51:36 +1000 |
commit | 4629675329f872c9dd4672402b9b9e5e593fec19 (patch) | |
tree | c2e42b6cd93d4b96ebea23177b2dfee3eeaed9ec /ems/template.html | |
parent | ec51d32ea0a30c138e690f637f38d83c086e02b9 (diff) |
Building and running for emscripten.
Diffstat (limited to 'ems/template.html')
-rw-r--r-- | ems/template.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/ems/template.html b/ems/template.html new file mode 100644 index 0000000..cc5985d --- /dev/null +++ b/ems/template.html @@ -0,0 +1,48 @@ +<!doctype html> +<html lang="en-us"> + <head> + <meta charset="utf-8"> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <title>malloc(bullet);</title> + + <style> + body { + padding: none; + margin-top: 0px; + margin-left: 0px; + background-color: #000000; + image-rendering: crisp-edges; + } + </style> + </head> + <body> + <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex="0" onclick="focus_canvas()"></canvas> + + <script> + function focus_canvas() { + document.getElementById('canvas').focus(); + } + Module = { + print: + function(what) + { + console.log(what); + }, + printErr: + function(what) + { + console.error(what); + }, + canvas: + ( + function() + { + return document.getElementById('canvas'); + } + )() + }; + </script> + + {{{ SCRIPT }}} + </body> +</html> |