下面这段代码什么意思啊,求详解
this.fx(function (f){
for (var i = 0, j = imgs.length; i < j; i++)
it.setView(imgs[i],
f(data[i+1][0],data[i][0]), f(data[i+1][1],data[i][1]),
f(data[i+1][2],data[i][2]), f(data[i+1][3],data[i][3])
)
},{
init:function (){
for (var i = 0, j = imgs.length; i < j; i++)
imgs[i].style.zIndex=z[i]
},
end:function (){
imgs[0].style.left='-9999px';
it.playing=false
}
})
fx:function (fn, opts) {
var D = Date, opts = opts || {}, d = +new D, thread, time = opts.time || 640,
end = opts.end || D, z, fx = opts.fx || function(x) {
return (x /= 0.5) < 1 ? (0.5 * Math.pow(x, 2)) : (-0.5 * ((x -= 2) * x - 2));
};
opts.context = opts.context || opts;
if(opts.init && false === opts.init.call(opts.context))return;
return thread = setInterval(function() {
z = Math.min(1, (new D - d) / time);
if (false === fn.call(opts.context, _, z) || z == 1)end.call(opts.context,clearInterval(thread));
}, 10);
function _(f, t) {return + f + (t - f) * fx(z) }
}