Skip to main content
ViewportFit = "fill" | "contain" | "cover"
Defined in: packages/common/src/viewport/viewport.type.ts:9 How the game’s design resolution is fitted into the client container, mirroring CSS object-fit.
  • "fill": stretches the game to the container; the aspect ratio is not kept.
  • "contain": scales uniformly so the whole game is visible (letterboxed).
  • "cover": scales uniformly so the container is filled (edges cropped).