0.2.2 • Published 7 years ago

velocitymodel v0.2.2

Weekly downloads
13
License
MIT
Repository
github
Last release
7 years ago

velocitymodel

PD controlled velocity model with optional animation extension

Demo here

Install the module:

npm i -S velocitymodel

Example usage:

import VelocityModel from 'velocitymodel/lib/velocitymodel';
import ModelAnimator from 'velocitymodel/lib/modelanimator';

const indicator = document.querySelector('#indicator');
const updater = (value) => {
  indicator.style.left = value; // or however you want to use the value
};
const P = 100; // Propotional part
const D = 10; // Velocity part
const model = new VelocityModel(P, D);
const animator = new ModelAnimator(model, updater);

animator.setTarget(222);
0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.7

7 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.0

8 years ago