Skip to content
pixi-silk
GitHub repository
Function

nearestOnPath

import { nearestOnPath } from 'pixi-silk/path';
function nearestOnPath(path: BezierPath, p: Vec): PathHitPoint | null;

The closest point of the whole path to p, or null for a path without segments.

Parameters#

ParameterType
pathBezierPath
pVec

Returns#

PathHitPoint | null