Two.Star

Extends: Two.Path

Constructor

ArgumentDescription
xThe x position of the star.
yThe y position of the star.
innerRadiusThe inner radius value of the star.
outerRadiusThe outer radius value of the star.
sidesThe number of sides used to construct the star.

Properties

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

fromObject

Returns: Two.Star

ArgumentDescription
objObject notation of a Two.Star to create a new instance

Create a new Two.Star from an object notation of a Two.Star.

nota-bene

Works in conjunction with Two.Star.toObject

innerRadius

The size of the inner radius of the star.

outerRadius

The size of the outer radius of the star.

sides

The amount of sides the star has.

copy

ArgumentDescription
starThe reference Two.Star

Copy the properties of one Two.Star onto another.

clone

Returns: Two.Star

ArgumentDescription
parentThe parent group or scene to add the clone to.

Create a new instance of Two.Star with the same properties of the current path.

toObject

Returns: Object

Return a JSON compatible plain object that represents the path.