raf-engine
A js RAF engine
Usage
; // Create the engineconst engine = ;const fn = { // Awesome stuff executed each frame};// Add a function to the quee and take the idconst id = engine;// Add a function by manually setting the idengine;// Add a function and make it executed at half the speed (jump odd frames)engine; // Time to start the engineenginestart; // Remove a function by id, the engine will auto-stop when the last function is removedengine; // Or stop it manuallyengine;// By passing true to force you can also cancel the last queed frame just to be sure// it won't be executed, otherwise the already requested frames will be executedengine; // You can also check the running state by testing the .stopped propertyif !enginestopped engine;