FPS Throttler
Throttle function call excatly to specific number times during one second - fps limit (by using requestAnimationFrame).
Example:
const Throttler = ;const throttler = {} 10;
This will call function 10 times per second (max limit is 60 - according to requestAnimationFrame specification).
Usage
Create new throttler:
const Throttler = ;const throttler = callback fpsLimit;
For ecmascript module use:
;
Start:
throttlerstart;
Stop:
throttler;
Change fps limit
throttler;
Change callback
throttler;