From 9cc06fcb9e4e2f57b4cfd132119cf1fb20afe6fc Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 23 Oct 2023 21:23:58 -0400 Subject: Resize canvas to fit window size, rewrite enemies. --- boot.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'boot.js') diff --git a/boot.js b/boot.js index 0d88a1f..f834d62 100644 --- a/boot.js +++ b/boot.js @@ -16,6 +16,15 @@ async function load() { const mod = await SchemeModule.fetch_and_instantiate("game.wasm", {}, { window: { + get() { + return window; + }, + innerWidth() { + return window.innerWidth; + }, + innerHeight() { + return window.innerHeight; + }, requestAnimationFrame(proc) { window.requestAnimationFrame(wrapProc(proc)); }, -- cgit v1.2.3