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 = 0.05;//控制彈跳的高度
freq = 2.0;//控制彈跳的速度
decay = 4.0;//控制彈跳的減速
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}
View all comments
Show parent comment
1
u/januart1st Jun 05 '25
Here: https://www.jan1lab.com/blog/jan1-ae-bounce-expression