Created
March 6, 2013 19:15
-
-
Save peripatew/5102135 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jumpSize = 150; | |
stayX = transform.position[0]; | |
newY = transform.position[1]; | |
n = 0; | |
if (marker.numKeys > 0){n = marker.nearestKey(time).index; | |
if (marker.key(n).time > time){ | |
n--;}} | |
if (n == 0){ | |
[stayX,newY] | |
}else{ | |
[stayX, (newY-((n+0)*jumpSize))] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pixels = -100;
f = 10; // number of transition frames
dur = (f*thisComp.frameDuration);
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time < time){
n++;
if (n > marker.numKeys) n = 0;}
if (n == 0){
p = marker.numKeys;
value + [0, p_pixels]
}else{t = marker.key(n).time;
p = ease(time,t - dur,t,n-1,n);
value + [0, p_pixels]
}
}else{
value
}