jquery easing の引数
- x: null 不要。応用時はなしでおk
- t: current time
- b: beginnIng value (start value)
- c: change In value (end value)
- d: duration (total time) = fps
- s: stress? 任意。反動などの強さの調整
easeInBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
を抜き出したなら、↓みたいにするといい
var easeInBack = function (t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
}
var currentTime = 0;
var startValue = 0;
var endValue = 100;
var fps = 32;
(function(){
console.log(
easeInBack(currentTime, startValue, endValue, fps)
);
currentTime ++;
if(currentTime <= fps){
setTimeout(arguments.callee, 1000/fps);
}
})();