土豆2013 年 10 月 28 日
曾哥,你再详细地解释一下你的代码么?
比如里的那几个 easing: {
linear: function( t, b, c, d ){
return c*t/d + b;
},
easeIn: function( t, b, c, d ){
return c*(t/=d)*t + b;
},
strongEaseIn: function(t, b, c, d){
return c * (t /= d) * t * t * t * t + b;
},
strongEaseOut: function(t, b, c, d){
return c * ((t = t / d – 1) * t * t * t * t + 1) + b;
},
sineaseIn: function( t, b, c, d ){
return c*(t/=d)*t*t + b;
},
sineaseOut: function(t,b,c,d){
return c*((t=t/d-1)*t*t + 1) + b;
},
sineaseInOut: function(t,b,c,d){
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((–t)*(t-2) – 1) + b;
}
它们有什么区别?各个函数是什么意思?谢谢!