Class Polygon
Methods
StaticCircle
-
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
- radius: number
StaticParse
-
Creates a polygon from input string
Parameters
- input: string
Input polygon data
Returns Vector2[]
the parsed points
- input: string
StaticRectangle
-
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
- xmin: number
StaticStarting At
-
Starts building a polygon from x and y coordinates
Parameters
- x: number
x coordinate
- y: number
y coordinate
Returns Path2
the started path2
- x: number
Polygon
See
https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#non-regular-polygon