Last active
February 26, 2020 08:46
-
-
Save ryanbru0803/7e0d576a666daeacc01ce21c29742ba2 to your computer and use it in GitHub Desktop.
The squash and stretch expression should make your animation a bit more alive by adding a proportional squash and stretch scale to your shapes or images.
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
maxDev = 13; // max deviation in pixels | |
spd = 30; //speed of oscillation | |
decay = 1.0; //how fast it slows down | |
t = time - inPoint; | |
x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t); | |
y = scale[0]*scale[1]/x; | |
[x,y] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment