-
Combining two expressions
Hi everyone. I have two expressions which im trying to combine to work on the scale property of a shape layer. The first one is a bounce expression and the second is an expression to use a slider to control the scale of a layer (on the second keyframe). It might help to check out the original thread (https://forums.adobe.com/message/9104388#9104388) where I was given the second expression to get an better idea. If anyone can help that would be greatly appreciated.
Bounce expressionamp = .1;
freq = 2.0;
decay = 4.0;
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}}
if (n == 0){ t = 0;
}else{
t = time - key(n).time;
}
if (n > 0){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}Expression to control scale of the layer
x2 = thisComp.layer("Null 1").effect("Slider Control")("Slider");
x = ease(time,key(1).time,key(2).time,key(1).value[0],x2);
[x,x]
Sorry, there were no replies found.