I have a set of line math utilities that I found myself copying between projects so much that I eventually decided to make an npm package out of it. It generic enough to be possibly useful for other people.
Main features both for 2d and 3d versions:
- line clipping
- line joining
- line overlap detection
- line intersections
- line chunking
- line translation
GitHub GitHub - Immugio/three-math-extensions
Install
npm i @immugio/three-math-extensions