Polygon
Polygon component.
Properties
points
Signal<PossibleVector2[], Vector2[], this>
Vertices of the polygon.
radius
Signal<number, this>
Corner radius.
startArrow
Signal<boolean, this>
Start arrow.
vertex
Signal<number, this>
Vertex index.
vertexCompletion
Signal<number, this>
Vertex completion.
Examples
import {Polygon} from '@wangyaoshen/locus';
const polygon = new Polygon({
points: [new Vector2(0, -100), new Vector2(100, 50), new Vector2(-100, 50)],
fill: 'red',
});