Build 29074010

This commit is contained in:
Renan LE CARO 2025-04-12 08:50:28 +02:00
parent 613b7cce58
commit 7e8643ceed
9 changed files with 20 additions and 14 deletions

View file

@ -221,7 +221,10 @@ window.addEventListener("fullscreenchange", () => fitSize(gameState));
setInterval(() => {
// Sometimes, the page changes size without triggering the event (when switching to fullscreen, closing debug panel...)
const { width, height } = gameCanvas.getBoundingClientRect();
const width = window.innerWidth,
height = window.innerHeight;
if (width !== gameState.canvasWidth || height !== gameState.canvasHeight)
fitSize(gameState);
}, 1000);