Polygon

Hierarchy

  • Polygon

Index

Methods

Static Circle

Find examples in Playground
  • Circle(radius: number, cx?: number, cy?: number, numberOfSides?: number): Vector2[]
  • Creates a circle

    Parameters

    • radius: number

      radius of circle

    • Optional cx: number

      scale in x

    • Optional cy: number

      scale in y

    • Optional numberOfSides: number

      number of sides that make up the circle

    Returns Vector2[]

    points that make the resulting circle

Static Parse

Find examples in Playground
  • Creates a polygon from input string

    Parameters

    • input: string

      Input polygon data

    Returns Vector2[]

    the parsed points

Static Rectangle

Find examples in Playground
  • Rectangle(xmin: number, ymin: number, xmax: number, ymax: number): Vector2[]
  • 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 rectation

Static StartingAt

Find examples in Playground
  • StartingAt(x: number, y: number): Path2
  • Starts building a polygon from x and y coordinates

    Parameters

    • x: number

      x coordinate

    • y: number

      y coordinate

    Returns Path2

    the started path2

Generated using TypeDoc