Skip to content

Function: detectCusps()

detectCusps(points, config): boolean[]

Defined in: corners.ts:84

Which points are corners. Returns a boolean per input point (never true at the endpoints).

Adjacent candidates are collapsed to the sharpest — a real corner drawn at a high sample rate trips the threshold at several consecutive samples, and breaking the spline at each of them would replace one corner with a short straight-line chamfer, which looks like a mistake and is one.

Parameters

points

readonly Vec[]

config

CuspConfig

Returns

boolean[]