pvec
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

PVec

Build Status Dependencies Dev Dependencies npm Downloads GitHub license

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

Package Sidebar

Install

npm i pvec

Weekly Downloads

5

Version

1.1.0

License

MIT

Last publish

Collaborators

  • varbrad