Created
October 19, 2021 21:40
-
-
Save victorbrndls/ee568cae6fdb9c274b823800fb8ebf44 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
spring( | |
dampingRatio = Spring.DampingRatioHighBouncy, | |
stiffness = Spring.StiffnessMedium | |
) | |
tween( | |
durationMillis = 300, | |
delayMillis = 50, | |
easing = LinearOutSlowInEasing | |
) | |
// animates based on the snapshot values specified at different timestamps | |
keyframes { | |
durationMillis = 375 | |
0.0f at 0 with LinearOutSlowInEasing // for 0-15 ms | |
0.2f at 15 with FastOutLinearInEasing // for 15-75 ms | |
0.4f at 75 // ms | |
0.4f at 225 // ms | |
} | |
// runs a animation repeatedly until it reaches the specified iteration count | |
repeatable( | |
iterations = 3, | |
animation = tween(durationMillis = 300), | |
repeatMode = RepeatMode.Reverse | |
) | |
// like repeatable, but it repeats for an infinite amount of iterations | |
infiniteRepeatable( | |
animation = tween(durationMillis = 300), | |
repeatMode = RepeatMode.Reverse | |
) | |
// immediately switches the value to the end value | |
snap(delayMillis = 50) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment