-
Combining inPoint and outPoint Position Ease
Hello,
I found this inPoint position ease expression from one of the threads, please is there any way I can modify the expression for both inPoint and outPoint ease?
Thanks in advance.
Regards,
Obed
EaseIn = function(power){return function(t){return Math.pow(t, power)}};
EaseOut = function(power){return function(t){return 1 - Math.abs(Math.pow(t-1, power))}};
EaseInOut = function(power){return function(t){return t < 0.5 ? EaseIn(power)(t*2)/2 : EaseOut(power)(t*2 - 1)/2+0.5}};dur=1; power=5; //1=linear, 2=Quad, 3=Cubic, 4=Quart, 5=Quint
startX= 3000; startY=-3000;
endX= 960 ; endY= 540 ;t=ease(time-inPoint,0,dur,0,1);
Exp=EaseInOut(power)(t);
x=startX+(endX-startX)*Exp;
y=startY+(endY-startY)*Exp;
[x,y]