@deckeraga/vec-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

vec-js

Vec-js is a 2D and 3D vector math library for Nodejs.

Installation

npm

npm i @deckeraga/vec-js

Building/Testing

Build with

npm run build

Run Jest unit tests with

npm run test

Example

Vector3.up()
    .scale(15)
    .dot(new Vector3(1, 12, 8));

Vector2.left()
    .add(new Vector2(6, 9))
    .normalize()
    .distance(Vector2.zero()); 

Notes

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.

Future

  • Support for matricies and matrix operations. (+ use to implement vector transforms).
  • Support for geometry (plane, line, triangle, cube, sphere, etc + intersection tests).

Package Sidebar

Install

npm i @deckeraga/vec-js

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

24 kB

Total Files

8

Last publish

Collaborators

  • deckeraga