Problem
The Excalibur game canvas correctly scales down when the browser viewport is reduced in size, but it does not scale back up when the viewport is increased.
Investigation
The canvas uses DisplayMode.FitContainer with fixed engine dimensions (1200×600). The codebase has no resize event handling — no window.addEventListener('resize'), no ResizeObserver, and no manual engine screen resize calls.
When the viewport shrinks, CSS constraints (width: 100%) cause the canvas to shrink. When the viewport grows, Excalibur has no mechanism to detect the container size change and recalculate scaling.
Likely fix
Add a ResizeObserver on the canvas container element that triggers Excalibur's screen resize when the container dimensions change. This could be added in GameCanvas.tsx or CatwalkCanvas.tsx.
Key files
packages/factory/src/client/components/GameCanvas.tsx — Engine creation with DisplayMode.FitContainer
packages/factory/src/client/components/CatwalkCanvas.tsx — Similar setup
packages/factory/src/client/components/GameCanvas.css — Container styling with aspect-ratio: 2/1
Problem
The Excalibur game canvas correctly scales down when the browser viewport is reduced in size, but it does not scale back up when the viewport is increased.
Investigation
The canvas uses
DisplayMode.FitContainerwith fixed engine dimensions (1200×600). The codebase has no resize event handling — nowindow.addEventListener('resize'), noResizeObserver, and no manual engine screen resize calls.When the viewport shrinks, CSS constraints (
width: 100%) cause the canvas to shrink. When the viewport grows, Excalibur has no mechanism to detect the container size change and recalculate scaling.Likely fix
Add a
ResizeObserveron the canvas container element that triggers Excalibur's screen resize when the container dimensions change. This could be added inGameCanvas.tsxorCatwalkCanvas.tsx.Key files
packages/factory/src/client/components/GameCanvas.tsx— Engine creation withDisplayMode.FitContainerpackages/factory/src/client/components/CatwalkCanvas.tsx— Similar setuppackages/factory/src/client/components/GameCanvas.css— Container styling withaspect-ratio: 2/1