@effectionx/raf
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.0 • Public • Published

RAF: Request Animation Frame

Subscribe to a stream of Request Animation Frame updates with an Effection resource.


import { each, main, suspend } from "effection";
import { raf } from "@effectionx/raf";

await main(function* () {
  for (const frame of yield* each(raf)) {
    // add your handler code here
    console.log(frame);
    yield* each.next();
  }
});

Readme

Keywords

none

Package Sidebar

Install

npm i @effectionx/raf

Weekly Downloads

1

Version

1.0.0-alpha.0

License

MIT

Unpacked Size

3.98 kB

Total Files

16

Last publish

Collaborators

  • frontsidejack