setAnchorType
import { setAnchorType } from 'pixi-silk/path';
function setAnchorType(
path: BezierPath,
index: number,
type: AnchorType,
straighten?: boolean
): BezierPath;
Changes anchor index to type. To corner the handles are kept as they are (pass
straighten to drop them). To smooth or mirrored they line up, and an anchor without
handles gets them from its neighbours.
Parameters#
| Parameter | Type | Default value |
|---|---|---|
path | BezierPath | undefined |
index | number | undefined |
type | AnchorType | undefined |
straighten | boolean | false |