pvec
v1.1.0
Published
JavaScript port of the Processing PVector class.
Downloads
11
Maintainers
Readme
JavaScript port of the Processing PVector class.
- Easy to use.
- No dependencies.
- Built-in TypeScript declaration typings.
- UMD format for usage via either CommonJS or ESM.
Usage
First add PVec as a dependency of your project.
npm install pvec --save
PVec can now be used within your project.
CommonJS (Node)
const PVec = require('pvec')
ES Module (Webpack/Rollup/etc.)
import PVec from 'pvec'
Documentation
Functionality is very similar to the PVector class in Processing.
PVector reference (Processing/Java)
Dedicated documentation for PVec coming soon
Build
If for whatever reason you wish to build PVec yourself, to generate the output build files for PVec, simply run;
npm run build
This will generate the CommonJS and ES Module versions of PVec, and also produce the TypeScript declaration types file.
A testing suite built on Mocha can be invoked via;
npm test