motion-tween-raf-engine
v1.0.5 fps animation requestAnimationFrame raf loop looper
#Installation
$ npm install motion-tween-raf-engine --save
#Usage
Usage is very straight forward.
import { RAF } from "motion-tween-raf-engine";
const loop = new RAF(frameRate, (time, delta) => {
// do something
}, autoStart)
loop.start()
loop.stop()
loop.resume()
loop.reset()
- frameRate: from 1 to 60
- callback: will receive time and delta
- autoStart: defaults to true
npm i motion-tween-raf-engine
Metadata
- MIT
- Whatever
- Rafael Milewski
- released 12/30/2016