@studiomoniker/point
v2.0.0
Published
A JavaScript 2D vector class with methods for common vector operations
Downloads
33
Readme
Point
JavaScript 2D point library with methods for common vector operations
Forked from Victor, bringing in ideas and code from Paper.js.
Installation
Node.js / Browserify
npm install @studiomoniker/point --save
var Point = require('@studiomoniker/point');
var point = new Point(10, 20);
ES6
npm install @studiomoniker/point --save
import Point from '@studiomoniker/point';
let point = new Point(10, 20);
Global object
Include the pre-built script.
<script src="build/point.js"></script>
<script>
var point = new Point(10, 20);
</script>
Build & test
npm run build
npm test
License
MIT