callbag-animation-frames
v2.1.0
Published
Callbag listenable source sending DOMHighResTimeStamp at display refresh rate
Downloads
13,551
Readme
yarn add callbag-animation-frames
const pipe = require("callbag-pipe");
const forEach = require("callbag-for-each");
const animationFrames = require("callbag-animation-frames");
pipe(
animationFrames,
forEach(highResTimeStamp => {
// have fun
})
);
If you're blessed with the pipeline operator:
animationFrames
|> forEach(highResTimeStamp => {
// have fun
});
Learn more
- Callbag basics
- Why we need callbags, by André Staltz
- requestAnimationFrame (MDN)