Created
February 23, 2023 20:55
-
-
Save Kpeved/b5a1566edd00191e4fff0e95e20b1268 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
// Start calculation each time the animationAngle changes. | |
val assembleValue = remember(animationAngle) { | |
// We only need this animation for second rotation | |
if (animationAngle >= 360) { | |
// Reversed linear interpolation between 0..30 degrees, transformed into 0..1 | |
(animationAngle % 30) / 30 | |
} else -1f | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment