skia-point-in-svg-path
Uses the SKIA C 2-d graphics library to determine if a given point is within a closed SVG path.
Install
npm i skia-point-in-svg-path
Example
const getPointsAndIntersectingPaths = const results = ; console;/*[ { pointId: 'test-point', x: 100, y: 100, intersectingPathIds: [ 'test-path' ] }, { pointId: 'test-point', x: 750, y: 500, intersectingPathIds: [] } ]*/
Why?
Determining if a point falls withing an arbitrary, closed, SVG path is difficult and I'd rather use a well-tested graphics library to determine that :)