Last active
May 18, 2022 07:21
-
-
Save Arslan-TR/e356e374b03e01eb648d19f02056b88d 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
// auto animation Wiggle | |
// u can use for position/scale/rotation; | |
amp = .99;// genlik/amplitude | |
freq = 2;// titresim sikligi | |
decay = 5.5;// gecikme/bitis | |
n = 0; | |
if (numKeys > 0){ | |
n = nearestKey(time).index; | |
if (key(n).time > time){ | |
n--; | |
} | |
} | |
if (n == 0){ | |
t = 0; | |
}else{ | |
t = time - key(n).time; | |
} | |
if (n > 0){ | |
v = velocityAtTime(key(n).time - thisComp.frameDuration/10); | |
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t); | |
}else{ | |
value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment