Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var vel = 100;
- var pInit = position.valueAtTime(0)[0]; // initial position of a cloud
- var tInit = (thisComp.width-pInit)/vel; // time it takes to cross the right border starting from init position
- var tFull = (thisComp.width+width)/vel; // time it takes to cross the frame starting behind the left border
- var offset = 0;
- tBound = tInit;
- if(time > tBound) {
- tBound += tFull;
- offset += thisComp.width+width;
- }
- [value[0]+time*vel-offset,value[1]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement