Created
April 23, 2021 23:01
-
-
Save pauloaapereira/026741cf937bc7cc750acb4792c5997e to your computer and use it in GitHub Desktop.
Jetpack Compose - Earthquake Effect_7
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
@Immutable | |
interface IEarthquakeMover { | |
val x: Animatable<Float, AnimationVector1D> | |
val y: Animatable<Float, AnimationVector1D> | |
val rotation: Animatable<Float, AnimationVector1D> | |
val alpha: Animatable<Float, AnimationVector1D> | |
suspend fun move(shakeDuration: Int, shakeForce: Int) | |
suspend fun stop() | |
fun generateOffset(shakeForce: Int): Offset | |
fun generateRotation(shakeForce: Int): Float | |
fun generateAlpha(): Float | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment