intertween
v0.0.26
Published
The lightweight, fastest, smartest, effecient value interpolator with no-dependecy, zero-configuration and relative interpolation
Downloads
43
Maintainers
Readme
InterTween
A value interpolator between to any value with relative support
Minified&Gzipped ~2Kb, but it does almost anything related to interpolate values
CDN
# unpkg
https://unpkg.com/intertween
# npmcdn
https://npmcdn.com/intertween
# jsDelivr
https://cdn.jsdelivr.net/npm/intertween
Installing
$ npm install intertween
# or
$ yarn add intertween
Usage
var InterTween = require('intertween');
var value = InterTween(AnyValue1, AnyValue2);
loop_frame(function (elapsed) {
// elapsed should be between 0...1
value(elapsed) // InterpolatingValue
});