n = value.length; if(numKeys > 1){ firstKey = key(1).time; lastKey = key(numKeys).time; v = velocityAtTime(lastKey - thisComp.frameDuration); a = 20; decay = 2; f = 1/a; t = Math.max(time - lastKey, 0); x = a * Math.sin(v[0] * t * f) / Math.exp(decay * t); y = a * Math.sin(v[1] * t * f) / Math.exp(decay * t); z = a * Math.sin(v[2] * t * f) / Math.exp(decay * t); value + [x,y,z]; } else value;
if(numKeys > 1){ firstKey = key(1).time; lastKey = key(numKeys).time; v = velocityAtTime(lastKey - thisComp.frameDuration); a = 2; decay = 2; f = 1/a; t = Math.max(time - lastKey, 0); x = a * Math.sin(v * t * f) / Math.exp(decay * t); value + x; } else value;