@ff0000-ad-tech/ad-geom
v1.3.2
Published
[![npm (tag)](https://img.shields.io/npm/v/@ff0000-ad-tech%2Fad-geom.svg?style=flat-square)](https://www.npmjs.com/package/@ff0000-ad-tech%2Fad-geom) [![GitHub issues](https://img.shields.io/github/issues/ff0000-ad-tech/ad-geom.svg?style=flat-square)](htt
Downloads
6
Readme
RED Interactive Agency - Ad Technology
ad-geom
A package of utilities for point transformation and manipulation; handling the leg work of matrix and vector maths.
API
Matrix2D
- new Matrix2D()
- .clear()
- .rotate(radians) ⇒ Matrix2D
- .rotate(x, y) ⇒ Matrix2D
- .skew(ax, ay) ⇒ Matrix2D
- .translate(x, y) ⇒ Matrix2D
- .getCss() ⇒ String
- .getX() ⇒ Number
- .getY() ⇒ Number
- .setFromCss(matrixString)
Matrix3D
- new Matrix3D()
- .clear()
- .rotateX(radians) ⇒ Matrix3D
- .rotateY(radians) ⇒ Matrix3D
- .rotateY(radians) ⇒ Matrix3D
- .rotate(x, y) ⇒ Matrix3D
- .skew(ax, ay) ⇒ Matrix3D
- .translate(x, y, z) ⇒ Matrix3D
- .getCss() ⇒ String
- .getX() ⇒ Number
- .getY() ⇒ Number
- .getY() ⇒ Number
- .setFromCss(matrixString)
ParentTransform
- new ParentTransform()
- .update(callback) ⇒ Array
SimpleNoise2D
- new SimpleNoise2D()
- .get(x, y) ⇒ Vector2D
Vector2D
- new Vector2D(x, y)
- .add(v) ⇒ Vector2D
- .sub(v) ⇒ Vector2D
- .dist(v) ⇒ number
- .mult(s)
- .div(s) ⇒ Vector2D
- .limit(s) ⇒ Vector2D
- .length() ⇒ Number
- .normalize() ⇒ Vector2D
- .clone() ⇒ Vector2D
- .degreeToVector() ⇒ Vector2D
- .random(degreeIncrement) ⇒ Vector2D