Class Polygon
Hierarchy
- Polygon
Index
Constructors
Methods
Constructors
constructor
Returns Polygon
Methods
Static CircleSearch playground for Circle
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
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 Starting AtSearch playground for StartingAt
Starts building a polygon from x and y coordinates
Parameters
x: number
x coordinate
y: number
y coordinate
Returns Path2
the started path2
Polygon
https://doc.babylonjs.com/how_to/parametric_shapes#non-regular-polygon