【文件属性】:
文件名称:Do-in:以固定的时间重复运行任务
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-28 10:33:00
task duration time HTML
在固定的时间段内重复运行任务
一个任务运行程序,它在给定的时间段内在X秒内重复运行代码,并以到目前为止的进度调用step方法。 最基本的例子是数到一个数。
基本用法
// This function will be called repeatedly until the duration has reached
var step = function ( t , elapsed ) {
// easing
t = t * t * t ;
// calculate new value
var value = 300 * t ; // will count from 0 to 300
// limit value ("t" might be higher than "1")
if ( t > 0.999 )
value = 30
【文件预览】:
Do-in-master
----index.html(7KB)
----.gitattributes(378B)
----do-in.js(2KB)
----README.md(2KB)
----.gitignore(574B)
----package.json(834B)