Help with Elastic Snap Expression
Posted: December 5th, 2007, 11:19 pm
If I want this expression to move as a Y position animation.
How do I do that?
link:http://aefreemart.com/2006/06/16/elasti ... xpression/
displace = 600 ; //user enters # of pixels to move
startBounce = marker.key(1).time;
speedFactor = 1 + (startBounce - inPoint) ;
veloc = (displace / 50) / speedFactor ;
amplitude = ( displace / 3) / speedFactor;
decay = 3;
t = time - startBounce;
if (t < 0){ value + linear(time, 0, startBounce, 0, displace)
}else{
x = amplitude*Math.cos(veloc*t)/Math.exp(decay*t)-amplitude;
value + linear(time , 0, startBounce, 0, displace) + [ x , 0 ];
}
How do I do that?
link:http://aefreemart.com/2006/06/16/elasti ... xpression/
displace = 600 ; //user enters # of pixels to move
startBounce = marker.key(1).time;
speedFactor = 1 + (startBounce - inPoint) ;
veloc = (displace / 50) / speedFactor ;
amplitude = ( displace / 3) / speedFactor;
decay = 3;
t = time - startBounce;
if (t < 0){ value + linear(time, 0, startBounce, 0, displace)
}else{
x = amplitude*Math.cos(veloc*t)/Math.exp(decay*t)-amplitude;
value + linear(time , 0, startBounce, 0, displace) + [ x , 0 ];
}