API

Class Polygon

Polygon

Index
  • Creates a circle

    Parameters

    • radius: number

      radius of circle

    • cx: number = 0

      scale in x

    • cy: number = 0

      scale in y

    • numberOfSides: number = 32

      number of sides that make up the circle

    Returns Vector2[]

    points that make the resulting circle

  • Creates a rectangle

    Parameters

    • xmin: number

      bottom X coord

    • ymin: number

      bottom Y coord

    • xmax: number

      top X coord

    • ymax: number

      top Y coord

    Returns Vector2[]

    points that make the resulting rectangle