0% found this document useful (0 votes)
110 views2 pages

After Effect (Bounce Effect Text)

The document contains code to generate an oscillating value based on keyframe data over time. It first finds the nearest keyframe index and calculates time from that keyframe. It then calculates an oscillating value based on the keyframe's velocity, decaying over time. This is done over three iterations with different oscillation parameters each time.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views2 pages

After Effect (Bounce Effect Text)

The document contains code to generate an oscillating value based on keyframe data over time. It first finds the nearest keyframe index and calculates time from that keyframe. It then calculates an oscillating value based on the keyframe's velocity, decaying over time. This is done over three iterations with different oscillation parameters each time.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

num = 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 && t < 1){
v = velocityAtTime(key(n),time =
thisComp,frameDuration/10);
amp = .05;
freq - 4.0;
decay = 8.0;
velue +
v*amp*Math.sin(freq*t*2*Math.PI)Math.Exp(decay
*t);
}else{
value;
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 = .02;
freq = 3.0;
decay = 5.0;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}

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 = 8;
freq = 2.0;
decay = 3.0;
value + (v/100)*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}

You might also like