diff options
author | natrixaeria <janng@gmx.de> | 2019-06-14 17:28:36 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-06-14 17:28:36 +0200 |
commit | a4532a3f034850c9fe8e26cc210bda618136dcbf (patch) | |
tree | 67ec62726748e734e0032e621107dd7a5fe1423a | |
parent | 438825a7ce98a0cd455ff0adebd6d3cf8d3209be (diff) |
Adapt canvas rendering resolution to screen size
-rw-r--r-- | webhogg/wasm/index.html | 5 |
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> |