Package Exports
- request-animation-frame-polyfill
Readme
request-animation-frame-polyfill
requestAnimationFrame polyfill library for nodejs and old browsers.
Install
$ yarn add request-animation-frame-polyfillUsage
import { requestAnimationFrame, cancelAnimationFrame } from 'request-animation-frame-polyfill'
let id: number
const hello = (time: number) => {
console.log('hello:' + time)
id = requestAnimationFrame(hello)
}
id = requestAnimationFrame(hello)
setTimeout( () => cancelAnimationFrame(id), 100)Build
Build:
$ yarn buildExample
$ cd example
$ npx ts-node main.tsDeploy
$ npm login
$ npm publish