# @deckeraga/vec-js

> 2D and 3D vector math library.

Latest version **1.0.1** (published 2019-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @deckeraga/vec-js
pnpm add @deckeraga/vec-js
yarn add @deckeraga/vec-js
bun add @deckeraga/vec-js
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-04-07 |
| First published | 2019-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 23.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alec Decker |
| Maintainers | deckeraga |
| Keywords | Vector, Geometry, Linear Algebra, Graphics |

## Links

- npm: https://www.npmjs.com/package/@deckeraga/vec-js
- npm.io page: https://npm.io/package/@deckeraga/vec-js

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-04-07
- 1.0.0 — 2019-04-07

## README

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

# Installation
npm
```sh
npm i @deckeraga/vec-js
```

# Building/Testing 
Build with 
```sh
npm run build
```

Run Jest unit tests with
```sh
npm run test
```

# Example
```javascript
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).

---
_Source: https://npm.io/package/@deckeraga/vec-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
