insertAnchor
import { insertAnchor } from 'pixi-silk/path';
function insertAnchor(
path: BezierPath,
segment: number,
t: number
): {
index: number;
path: BezierPath;
};
Inserts an anchor on segment segment at t without changing the shape: the segment is split
exactly (de Casteljau) and the neighbours’ handles shrink to match. Returns the new path and
the new anchor’s index.
Parameters#
| Parameter | Type |
|---|---|
path | BezierPath |
segment | number |
t | number |
Returns#
{
index: number;
path: BezierPath;
}
| Name | Type | Defined in |
|---|---|---|
index | number | path.ts:333 |
path | BezierPath | path.ts:333 |