# 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.

# Properties

A list of properties that are on every Two.Polygon.

# radius

The radius value of the polygon.

nota-bene

This property is tied to Two.Polygon.width and Two.Polygon.height. When you set radius, it affects width and height. Likewise, if you set width or height it will change the radius.

# width

The size of the width of the polygon.

nota-bene

This property is tied to Two.Polygon.radius. When you set radius, it affects the width. Likewise, if you set width it will change the radius.

# height

The size of the height of the polygon.

nota-bene

This property is tied to Two.Polygon.radius. When you set radius, it affects the height. Likewise, if you set height it will change the radius.

# sides

The amount of sides the polyogn has.

# 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

Returns: Object

Return a JSON compatible plain object that represents the path.