run-with-fps
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

run-with-fps

Runs a function with given FPS

Usage

import runWithFPS from 'run-with-fps';

const stop = runWithFPS((delta) => {
  console.log(delta); // ms between prev and current frame
  // draw something here
}, 60);

stop(); // this will stop running

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i run-with-fps

      Weekly Downloads

      263

      Version

      2.1.0

      License

      MIT

      Unpacked Size

      1.16 kB

      Total Files

      4

      Last publish

      Collaborators

      • sunify