-
Scale Expression with Bounce Inertia
I am ever learning at Expressions and am in need of help from people smarter than I.
I want to scale an object and have it bounce to a stop. I found Dan Ebberts post on this topic from a few years ago. The expression listed below mostly works for me, the only thing I would like to eliminate is the bounce out, I just want it to scale bounce in and hold, that’s it. How would I modify the following to achieve this?
rate = 500;
rampDur = value[0]/rate;
freq = 3;
decay = 5;
w = freq*Math.PI*2;if (time < (inPoint+outPoint)/2){
if (time < (inPoint + rampDur)){
s = linear(time,inPoint,inPoint+rampDur,0,value[0]);
}else{
t = time - (inPoint+rampDur);
s = value[0] + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}else{
if (time > (outPoint - rampDur)){
s = linear(time,outPoint-rampDur,outPoint,value[0],0);
}else{
t = (outPoint - rampDur) - time;
s = value[0] + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}
[s,s]scott skaja
tangletown post – edit•animate•design•composite•color correct
tangletownpost.com
Sorry, there were no replies found.