Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Polygon

Hierarchy

  • Polygon

Index

Methods

Static CircleSearch playground for Circle

  • 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 ParseSearch playground for Parse

  • Creates a polygon from input string

    Parameters

    • input: string

      Input polygon data

    Returns Vector2[]

    the parsed points

Static RectangleSearch playground for Rectangle

  • 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 rectangle

Static StartingAtSearch playground for StartingAt

  • 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

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method