loopyJS:requestAnimationFrame 的 Polyfill 和包装器以提供动画循环

时间:2021-07-02 13:00:20
【文件属性】:
文件名称:loopyJS:requestAnimationFrame 的 Polyfill 和包装器以提供动画循环
文件大小:28KB
文件格式:ZIP
更新时间:2021-07-02 13:00:20
JavaScript #LoopyJS requestAnimationFrame 的 polyfill 和包装器,为动画和计时循环提供通用功能 ##NPM $ npm install loopyjs ##建造 确保你安装了 grunt-cli $ npm install $ grunt build ##用法 循环一段代码,1000ms后取消循环 var animation = loopy ( function ( deltaTime , timeElapsed ) { //deltaTime: time since last loop //timeElapsed: time since looping started if ( timeElapsed ) >= 1000 ) { animation . cancel ( ) ; } //your loop code here con
【文件预览】:
loopyJS-master
----.gitignore(20B)
----README.md(2KB)
----tests()
--------vendor()
--------tests.js(2KB)
--------index.html(297B)
----Gruntfile.js(1KB)
----bower.json(190B)
----package.json(990B)
----src()
--------core.js(3KB)
--------index.js(335B)
--------utility.js(233B)
--------animation-helpers.js(2KB)

网友评论