module:Star

Star class
star demo

Constructor

new module:Star(positionDefinition, nbBranchesopt, outerRadius, bevelRatioopt, optionsopt)

Star constructor

Parameters:
NameTypeAttributesDefaultDescription
positionDefinitionPositionDefinition

Center of the star

nbBranchesNumber<optional>
5

Number of branches to create (can't be less than 2)

outerRadiusNumber

Distance of branches from center

bevelRatioNumber<optional>
0.5

Ratio between branches length and bevel between them

optionsComponentOptions<optional>

Drawing options

Extends

Members

bevelRatio

Get the bevel ratio

bevelRatio

Change the bevel ratio

nbBranches

Get the number of branches

nbBranches

Change the number of branches

radius

Get the outer radius

radius

Change the outer radius

Methods

(static) from(definition) → {Star}

Parameters:
NameTypeDescription
definitionObject

Star definition

Returns:
Type: 
Star

rebuild()

Compute the position for the points from the internal properties