如果工友需要ae来做简单动图而且恰好知道表达式怎么用,那么我来贡献一些糊弄了半年甲方的召唤咒
👇弹性拉伸挤压👇
spd =20;maxDev =10;
decay = 1;
t = time - inPoint;
offset = maxDev*Math.sin(t*spd)/Math.exp(t*decay);
scaleX = scale[0] + offset;scaleY = scale[1] - offset;
[scaleX,scaleY]
👇wiggle随机表达式👇
freq = 0.5; // 频率
amp = 50; // 幅度
loopTime =4; // 循环时间,单位为秒
t = time % loopTime;
wiggle1 = wiggle(freq, amp, 1, 0.5, t);
wiggle2 = wiggle(freq, amp, 1, 0.5, t - loopTime);
linear(t, 0, loopTime, wiggle1, wiggle2)
👇wiggle竖向漂浮👇
freq = 2; // 振频,每秒抖动的次数
amp = 30; // 振幅,抖动的范围
w = wiggle(freq, amp); // 生成一个随机数组
[value[0], w[1]]; // 保持X轴不变,只在Y轴上抖动
👇万能弹性👇
freq = 1;
decay = 2;
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
t = time - key(n).time;
amp = velocityAtTime(key(n).time - .001);
w = freq*Math.PI*2;
value + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
}else
value