summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornatrixaeria <janng@gmx.de>2019-06-14 17:28:36 +0200
committernatrixaeria <janng@gmx.de>2019-06-14 17:28:36 +0200
commita4532a3f034850c9fe8e26cc210bda618136dcbf (patch)
tree67ec62726748e734e0032e621107dd7a5fe1423a
parent438825a7ce98a0cd455ff0adebd6d3cf8d3209be (diff)
Adapt canvas rendering resolution to screen size
-rw-r--r--webhogg/wasm/index.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/webhogg/wasm/index.html b/webhogg/wasm/index.html
index 350c58d..a992390 100644
--- a/webhogg/wasm/index.html
+++ b/webhogg/wasm/index.html
@@ -8,6 +8,11 @@
<canvas id='c' style='width: 100%; height: 100%; position: fixed; display: block; overflow: hidden;'>
your browser is incompetent
</canvas>
+ <script>
+ let canvas = document.getElementById('c');
+ canvas.width = window.innerWidth;
+ canvas.height = window.innerHeight;
+ </script>
<script src='pkg/main.js'></script>
</body>
</html>