Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaronshaf/callbag-animation-frames
Callbag listenable source sending DOMHighResTimeStamp at display refresh rate
https://github.com/aaronshaf/callbag-animation-frames
callbags raf requestionanimationframe
Last synced: 3 months ago
JSON representation
Callbag listenable source sending DOMHighResTimeStamp at display refresh rate
- Host: GitHub
- URL: https://github.com/aaronshaf/callbag-animation-frames
- Owner: aaronshaf
- License: mit
- Created: 2018-02-08T16:34:29.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-04T23:00:54.000Z (almost 6 years ago)
- Last Synced: 2024-10-17T01:07:28.235Z (3 months ago)
- Topics: callbags, raf, requestionanimationframe
- Language: JavaScript
- Size: 104 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-callbags - animation-frames
README
```bash
yarn add callbag-animation-frames
``````javascript
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](https://github.com/tc39/proposal-pipeline-operator):
```javascript
animationFrames
|> forEach(highResTimeStamp => {
// have fun
});
```## Learn more
* [Callbag basics](https://github.com/staltz/callbag-basics)
* [Why we need callbags](https://staltz.com/why-we-need-callbags.html), by André Staltz
* [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) (MDN)