# Two.Polygon
Extends: Two.Path
# Constructor
Argument | Description |
---|---|
x | The x position of the polygon. |
y | The y position of the polygon. |
radius | The radius value of the polygon. |
sides | The number of vertices used to construct the polygon. |
# clone
Two.Polygon.clone
Returns: Two.Polygon
Argument | Description |
---|---|
parent | The parent group or scene to add the clone to. |
Create a new instance of Two.Polygon with the same properties of the current path.
# toObject
Two.Polygon.toObject
Returns: Object
Return a JSON compatible plain object that represents the path.