Skip to content

Function: segmentDistance() ​

ts
function segmentDistance(frame, p): number | undefined;

Experimental

Fragment-stage mirror: signed distance (px, negative inside) from p to this segment's share of the stroke, or undefined when p is owned by a neighbouring segment.

Parameters ​

ParameterType
frameSegmentFrame
pV2

Returns ​

number | undefined

Released under the MIT License.