Star Points & Radius Constraints
Overview
Star shapes clamp point counts and radii to keep geometry valid and predictable.
Canvas controls
When a single star is selected, the canvas shows three control points:
- Count: right-side outer corner, drag on the arc around center to change
numPoints.- Count drag is eased: near-start movement changes slowly, longer drag accelerates point changes.
- Ratio: first inner corner between top and right-side corners, drag to change
innerRadius. - Radius: top outer corner, drag to change
outerRadius. - Drag updates happen continuously during
dragmove, then commit once ondragend.
API
editor.updateObjectProperty(starId, 'numPoints', 5)
editor.updateObjectProperty(starId, 'outerRadius', 60)
editor.updateObjectProperty(starId, 'innerRadius', 24)
Constraints
numPointsis clamped to the range 3–60.innerRadiusis clamped to 0–outerRadius.outerRadiusis clamped to >= 1.sizeis synchronized toouterRadius * 2.
Resize behavior
- Resizing a star preserves the current innerRadius / outerRadius ratio.