Here's an example of how to use animationFrames function from the rxjs library in JavaScript:
130 chars6 linesThe animationFrames function returns an observable that emits a value on every animation frame. You can subscribe to this observable and run your code inside.
249 chars8 linesUsing animationFrames in your code allows you to perform animations with high performance and precision, since it is timed with the browser's rendering loop.
gistlibby LogSnag