module:Star

module:Star

Star class
star demo

Constructor

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

Star constructor

Parameters:
Name Type Attributes Default Description
positionDefinition PositionDefinition

Center of the star

nbBranches Number <optional>
5

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

outerRadius Number

Distance of branches from center

bevelRatio Number <optional>
0.5

Ratio between branches length and bevel between them

options ComponentOptions <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:
Name Type Description
definition Object

Star definition

Returns:
Type
Star

# rebuild()

Compute the position for the points from the internal properties