A minimal requestAnimationFrame render loop for node and the browser, using high-performance timing where possible.
Usagevar loop = require('raf-loop')
Â
var engine = loop(function(dt) {
   Â
}).start()
engine = loop([fn])
Creates a new loop with an optional function to receive tick events. The function will be called with delta time as the first parameter, in milliseconds.
engine.start()
Starts the render loop and returns this engine, for chaining.
engine.stop()
Stops the render loop and cancels the currently requested animation frame.
engine.on('tick', fn)
Attaches another function to the render loop.
LicenseMIT, see LICENSE.md for details.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4