Expression in Transform effect properties
Hello,
By any chance could someone explain the following expression to me briefly, telling me what it does and how I can adjust certain values and what those adjustments will do, I want to keep it as a template. I found it in a project file I bought from someone, so I can see what it does, I just want to be able to adjust it. Also, I noticed keyframes used and dont know how they'd be set either. The expression was placed on the 'Rotation' and 'Position' properties of the 'Transform' effect. Thanks guys.
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);
amp = .1;
freq =3.1;
decay = 7;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}
