【AE表达式】循环

技术分享  收藏
0 / 311

普通循环:

loopOut("pingpong")

变换循环:

freq = 1; amp = 110; loopTime = 3; 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)

freq(频率) amp(幅度) loopTime(时长)

路径循环:

try{ timeStart = thisProperty.key(1).time; duration = thisProperty.key(thisProperty.numKeys).time-timeStart; pingPong = false; //change to true value if you want to loop animationn back & forth quant=Math.floor((time-timeStart)/duration); if(quant) quant = 0 if(quant%2 == 1 && pingPong == true){ t = 2*timeStart+ (quant+1)*duration - time; } else{ t = time-quant*duration; } } catch(err){ t = time; } thisProperty.valueAtTime(t)