Package Exports
- raf
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (raf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
raf
reqeustAnimationFrame polyfill for browserify.
var raf = require('raf')
, canvas = document.getElementById('opengl')
raf(canvas)
.on('data', function(dt) {
console.log('difference in time is '+dt+'ms')
})
API
raf([optional element]) -> event emitter
returns a event emitter that immediately starts emitting 'data' events representing animation frames for a given element (or for the entire window, if no element is passed).
ee.pause() / ee.resume()
pauses or resumes the events coming out of ee.
the dt on the next event after a resume will represent the difference between
the last rendered frame and the newest frame.
raf.polyfill
the polyfilled requestAnimationFrame function.
license
MIT
