Set of utilities for 2d and 3d line math

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

npm i @immugio/three-math-extensions



Some of the functions are quite handy. I like the tolerance parameters, as in practical situations it is good to be able to change the tolerance.

– Pavel