Created
April 10, 2024 10:11
-
-
Save AndreVero/f5164f49f341c84ea0d3e05ffcafd473 to your computer and use it in GitHub Desktop.
Sun and moon component rotation
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
val defaultSpringSpec = remember { | |
FloatSpringSpec( | |
dampingRatio = Spring.DampingRatioNoBouncy, | |
stiffness = Spring.StiffnessVeryLow, | |
) | |
} | |
val rotationAnimation = remember { | |
Animatable(180f) | |
} | |
val scope = rememberCoroutineScope() | |
SunMoonComponent( | |
rotation = rotationAnimation.value, | |
modifier = Modifier | |
.size(height = 150.dp, width = 100.dp) | |
.offset(y = 165.dp) | |
.align(Alignment.Center) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment