Hello Alex,
Please when I modified it, I have encountered error a the last line.
Thank you.
Regards,
Obed
function easeInOutQuint(t, tMin, tMax, value1, value2){
b = value1;
c = value2-b;
d = tMax-tMin;
t = tMin < tMax ? thisLayer.linear(t,tMin,tMax,0,d) : thisLayer.linear(t,tMin,tMax,d,0);
t /= d/2;
if (t <1) return c/2*Math.pow(t,5) + b;
t -= 2;
return c/2*(Math.pow(t,5) + 2) + b;
}
duration = 1;
start=[3000,-3000];
destination = [960,540];
exit = [-3000,3000];
middle = (inPoint+outPoint)/2;
v = time < middle ? easeInOutQuint(time,inPoint,inPoint+duration,start,destination) : easeInOutQuint(time,outPoint-duration,outPoint,destination,exit);