run-with-fps

Runs a function with given FPS

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
run-with-fps
202.1.010 months ago4 years agoMinified + gzip package size for run-with-fps in KB

Readme

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