-
Adding Overshoot expression to Scale expression
Hello, please, is there any way I could add this overshoot expression above to my scale expression below
try {
amp = effect(“Scale – Overshoot”)(“ADBE Slider Control-0001”) / 2.5, freq = effect(“Scale – Bounce”)(“ADBE Slider Control-0001”) / 20, decay = effect(“Scale – Friction”)(“ADBE Slider Control-0001”) / 20, n = 0, 0 < numKeys && (n = nearestKey(time)
.index, key(n)
.time > time && n–), t = 0 === n ? 0 : time – key(n)
.time, 0 < n ? (v = velocityAtTime(key(n)
.time – thisComp.frameDuration / 10), value + v / 100 * amp * Math.sin(freq * t * 2 * Math.PI) / Math.exp(decay * t)) : value;
} catch (e$$4) {
value = value;
}
Scale Expression
function easeInOutCubic(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,3) + b;
t -= 2;
return c/2*(Math.pow(t,3) + 2) + b;
}
duration = .47;
start=[0,0,0];
destination = [100,100,100];
exit = [0,0,-0];
middle = (inPoint+outPoint)/2;
v = time < middle ? easeInOutCubic(time,inPoint,inPoint+duration,start,destination) : easeInOutCubic(time,outPoint-duration,outPoint,destination,exit);
Thank you
Regards,
Obed