Vec-js is a 2D and 3D vector math library for Nodejs.
npm
npm i @deckeraga/vec-jsBuild with
npm run buildRun Jest unit tests with
npm run testVector3.up()
.scale(15)
.dot(new Vector3(1, 12, 8));
Vector2.left()
.add(new Vector2(6, 9))
.normalize()
.distance(Vector2.zero()); This project is primarily a small tool to help familiarize myself with Typescript and Jest, but the end result should be usable in any application with a need for 2D or 3D vector representations.
- Support for matricies and matrix operations. (+ use to implement vector transforms).
- Support for geometry (plane, line, triangle, cube, sphere, etc + intersection tests).