Skip to content

Documentation / scene / ScreenScaleMode

Type Alias: ScreenScaleMode

ScreenScaleMode = "fit" | "fit-width" | "fit-height" | "cover" | "stretch"

Defined in: libs/scene/src/app/screen.ts:16

Scaling mode used to adapt the design resolution to the viewport.

  • 'fit' – Preserve aspect ratio, show whole design area, may add letterboxing (black bars).
  • 'fit-width' – Match viewport width exactly; height follows aspect ratio (may crop or letterbox vertically).
  • 'fit-height' – Match viewport height exactly; width follows aspect ratio (may crop or letterbox horizontall
  • 'cover' – Preserve aspect ratio, fill the entire viewport, design area may be cropped.
  • 'stretch' – Do not preserve aspect ratio, stretch to fill the viewport.

Released under the MIT License.