Created
December 25, 2018 02:32
-
-
Save animoplex/bcf2b9a63f11106a2a129d5e980f4831 to your computer and use it in GitHub Desktop.
While Loop Example - After Effects Expression by Animoplex
This file contains hidden or 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
| // JavaScript While Loop Example - Created by Animoplex: www.animoplex.com | |
| // The JavaScript While Loop and how it can be used in After Effects. | |
| // Full Tutorial: https://www.youtube.com/watch?v=SG3NyHmfc0s&t=225s | |
| src = thisComp.layer("Control").effect("Acceleration")("Slider"); | |
| dur = thisComp.frameDuration; | |
| dist = 0; | |
| t = 0; | |
| while (t < time) { | |
| dist += src.valueAtTime(t) * dur; | |
| t += dur; | |
| } | |
| value + dist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment