come la uso questa funzione per cambiare la _x e la _y di un oggetto?
// quadratic easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in value, d: duration
// t and d can be in frames or seconds/milliseconds
Math.easeOutQuad = function (t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
};
![]()
![]()


Rispondi quotando