Preparing search index...

    Represents a 2D rectangle with position and dimensions.

    Index

    Constructors

    Properties

    bottom: number

    Y coordinate of the bottom edge.

    left: number

    X coordinate of the left edge.

    leftBottom: vec2

    Corner point at the left and bottom edges as a vec2.

    right: number

    X coordinate of the right edge.

    rightTop: vec2

    Corner point at the right and top edges as a vec2.

    top: number

    Y coordinate of the top edge.

    Methods

    • Creates a new Rect instance.

      Parameters

      • left: number
      • right: number
      • bottom: number
      • top: number

      Returns Editor.Rect

    • Returns the center point of the rectangle as a vec2.

      Returns vec2

    • Returns the width and height of the rectangle as a vec2.

      Returns vec2

    • Moves the rectangle so its center is at the given vec2 position.

      Parameters

      Returns void

    • Sets the width and height of the rectangle from a vec2.

      Parameters

      Returns void

    • Converts the rectangle to a vec4 (left, bottom, right, top).

      Returns vec4