Generator version of onEveryAnimationFrame.
Returns a new async iterator which yields the total elapsed time and elapsed time since the last call on every animation frame.
Optional
for await (const elapsed of newAnimationFrameIterator()) { // ... do something if (done) break;} Copy
for await (const elapsed of newAnimationFrameIterator()) { // ... do something if (done) break;}
v1.2.0
Generator version of onEveryAnimationFrame.
Returns a new async iterator which yields the total elapsed time and elapsed time since the last call on every animation frame.