callbag-animation-frames

Callbag listenable source sending DOMHighResTimeStamp at display refresh rate

Usage no npm install needed!

<script type="module">
  import callbagAnimationFrames from 'https://cdn.skypack.dev/callbag-animation-frames';
</script>

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