import CanvasWindow from "./canvas-windows"; import ResourceLoader from "./resource-loader"; (async function gameloop() { const canvasWindow = new CanvasWindow({ canvas: document.querySelector("canvas"), maxMultiplier: 5, windowPercentage: 0.9, }); await canvasWindow.load(); const { canvas } = canvasWindow; const ctx = canvas.getContext("2d"); const [overworld] = await Promise.all([ "assets/overworld.png", ].map(ResourceLoader.load)); ctx.drawImage(overworld, 0, 0); })();