Copy link to clipboard
Copied
hi I want to decrees the duration of my text animation with this expression I’ve tried edit the '' framDuration*2 '' I’ve set it to ‘’ framDuration*1 ‘’ it worked but it only decreased from 2s to 1s I want it to decrees bellow 1 second something like 15 frame or 10 frames
freq = 1;
decay = 6;
duration = 0.25;
retard = (textTotal-textIndex)*thisComp.frameDuration*2;
t = time - (inPoint + retard);
startVal = [100,100,100];endVal = [0,0,0];
if (t < duration){
linear(t,0,duration,startVal,endVal);
}else{
amp = (endVal - startVal)/duration;
w = freq*Math.PI*2;
endVal + amp*(Math.sin((t-duration)*w)/Math.exp(decay*(t-duration))/w);}
Copy link to clipboard
Copied
I'm not clear what you are saying here. You would simply modify the already defined "duration" value, which is in seconds. Everything else would only accelerate the actual bouncing or put more dampening on the expression.
Mylenium
Copy link to clipboard
Copied
Copy link to clipboard
Copied
but it dosen't change the full duration of the animation
Copy link to clipboard
Copied
Change
duration = 0.25;
to
duration = 15 * thisComp.frameDuration;
That will make duration count frames instead of seconds.
What property are you adding this expression to? I'm not exactly sure what you are trying to accomplish because the expression basically moves a 3D position property from 100, 100, 100 to 0, 0, 0, and adds a bounce but it throws an error if added to Transform/Position which is the only 3 Axis array possible on a text layer without an effect applied.