Skip to main content

Type Alias: UiAspectRatioFitMode

UiAspectRatioFitMode = "widthControlsHeight" | "heightControlsWidth" | "fitInParent" | "envelopeParent"

Defined in: ui/components/aspect-ratio-fitter-component.ts:13

How AspectRatioFitterEcsComponent keeps aspectRatio:

  • widthControlsHeight - the entity's height is derived from its width.
  • heightControlsWidth - the entity's width is derived from its height.
  • fitInParent - the entity's size is the largest size, matching aspectRatio, that fits entirely within the parent's rect.
  • envelopeParent - the entity's size is the smallest size, matching aspectRatio, that fully covers the parent's rect.