arcade2d
Type Alias

GameCanvasOptions

game.types.ts:19

Sizing strategy for the application's canvas.

  • { fill: 'window' } — the canvas is sized to the browser window and updates on every resize event. Use for fullscreen-style games.
  • { width, height } — the canvas is created at a fixed pixel size and never resizes. Use for embedded views, prototypes, and anything that should occupy a known box on the page.

Sizing is intentionally separated from the unrelated GameOptions.debug flag — earlier iterations conflated "fill the window" with "attach game to window for console access", which made the option hard to opt into independently.

{ fill: 'window' } | { height: number; width: number }
ESC