Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. var vel = 100;
  2. var pInit = position.valueAtTime(0)[0]; // initial position of a cloud
  3. var tInit = (thisComp.width-pInit)/vel; // time it takes to cross the right border starting from init position
  4. var tFull = (thisComp.width+width)/vel; // time it takes to cross the frame starting behind the left border
  5. var offset = 0;
  6. tBound = tInit;
  7.  
  8. if(time > tBound) {
  9. tBound += tFull;
  10. offset += thisComp.width+width;
  11. }
  12.  
  13. [value[0]+time*vel-offset,value[1]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement