0.1.11 • Published 5 years ago

wtc-vector v0.1.11

Weekly downloads
199
License
ISC
Repository
github
Last release
5 years ago

wtc-vector

A basic 2d vector class.

Usage

let vPosition = new Vector(10, 10);
let vForce = new Vector(0, 1);
vPosition.add(vForce); // [0, 11];

Using the es5 bundle in browser

npm install --save wtc-vector

Using gulp

Add the final module to your JS bundle.

...JS bundle logic
node_modules/wtc-vector/dist/es5-bundle.js

The module will then be exposed inside window as window.WTCVector.default

Example

<script>
  var vector = new window.WTCVector.default(0,0);
</script>

Documentation

Documentation can be found here

Demos

The following demos provide proofs and interactive examples of the Vector class:

  • Basic demo

    A basic Vector demonstration.

  • Addition proof

    A basic proof of addition with vectors, with associated display.

  • Unit vectors

    Shows the use of unit vectors and the reasoning behind their use in a vector's redering.

  • Linear transformations

    This demo shows how to calculate linear transformations (specifically in the vector space's unit vectors).

  • Snowflake

    This demonstrates the use of a rotating vector as a a method of calculating a sinewave and it's applicable use in the animation of a falling snowflake.

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago