@pandolajs/animationframe
v1.0.0
Published
A window.requestAnimationFrame and window.cancelAnimationFrame compatible libaray.
Downloads
2
Readme
animationFrame
A requestAnimationFrame and cancelAnimationFrame compatible javascript library which provide base support for the animation
.
Usage
ES6 and beyond
import animationFrame from '@pandolajs/animationframe'
const { raf, caf, highResTimestamp } = animationFrame
// raf: requestAnimationFrame
// caf: cancelAnimationFrame
// highResTimestamp
UMD
<script src="https://path.to.animationframe" />
<script>
window.animationFrame.raf()
window.animationFrame.caf()
window.animationFrame.highResTimestamp()
</script>
APIs
{ raf: Function | window.requestAnimationFrame caf: Function | window.cancelAnimationFrame highResTimestamp: Function | window.performance.now() }