callbag-animation-frames

Callbag listenable source sending DOMHighResTimeStamp at display refresh rate


Keywords
callbags, raf, requestionanimationframe
License
MIT
Install
npm install callbag-animation-frames@2.1.0

Documentation

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