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 |
- Source
Extends
Members
bevelRatio
Get the bevel ratio
- Source
bevelRatio
Change the bevel ratio
- Source
nbBranches
Get the number of branches
- Source
nbBranches
Change the number of branches
- Source
radius
Get the outer radius
- Overrides
- Source
radius
Change the outer radius
- Overrides
- Source
Methods
(static) from(definition) → {Star}
Parameters:
Name | Type | Description |
---|---|---|
definition | Object | Star definition |
- Source
Returns:
- Type:
- Star
rebuild()
Compute the position for the points from the internal properties
- Source