package.lib.util.raf.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of regl Show documentation
Show all versions of regl Show documentation
regl is a fast functional WebGL framework.
The newest version!
/* globals requestAnimationFrame, cancelAnimationFrame */
module.exports = {
next: typeof requestAnimationFrame === 'function'
? function (cb) { return requestAnimationFrame(cb) }
: function (cb) { return setTimeout(cb, 16) },
cancel: typeof cancelAnimationFrame === 'function'
? function (raf) { return cancelAnimationFrame(raf) }
: clearTimeout
}