The Expressions Cheat Sheet
Loading...

if (numKeys > 1 && time > key(numKeys).time){
	 var sTime = key(1).time;
	 var eTime = key(numKeys).time;
	 var loopEvery = eTime - sTime;
	 var delta = time - eTime;
	 var finalTime = sTime + (delta%loopEvery);
	 valueAtTime(finalTime);
 }else {
	 value
}

function loopOutPath(){
  if (numKeys > 1 && time > key(numKeys).time){
	  var sTime = key(1).time;
	  var eTime = key(numKeys).time;
	  var loopEvery = eTime - sTime;
	  var delta = time - eTime;
	  var finalTime = sTime + (delta%loopEvery);
	  return valueAtTime(finalTime);
   }else {
		 return value
	}
}

loopOutPath();