Type:Rect

From Resonite Wiki
Revision as of 08:12, 30 June 2024 by Ohzee (talk | contribs) (Type inputting are now pretty named and not weird, adjusting for future reference)

A Rect represents a value type of a 2-dimensional rectangle. It consists of a starting x and y coordinate, and a width and height. Most, if not all, components will have these as proportions of the total bounds, between 0 and 1.

For dynamic variables and other components requiring a type, the type for Rect is rect.

Examples

  • For the SpriteProvider component, the Rect property bounds the sprite to be rendered, with the values being proportions of the total width and height of the sprite image.
  • Rects can be received from the component RectTransformComputedProperties to get the elements inside a UIX Canvas, and the rect sizes and positions from those elements.

See Also

How Other Places Define Rects