ShakeConfig

data class ShakeConfig(val iterations: Int, val intensity: Float, val rotate: Float = 0.0f, val rotateX: Float = 0.0f, val rotateY: Float = 0.0f, val scaleX: Float = 0.0f, val scaleY: Float = 0.0f, val translateX: Float = 0.0f, val translateY: Float = 0.0f, val trigger: Long = System.currentTimeMillis())

Represent the configuration for a shake animation.

Constructors

Link copied to clipboard
constructor(iterations: Int, intensity: Float, rotate: Float = 0.0f, rotateX: Float = 0.0f, rotateY: Float = 0.0f, scaleX: Float = 0.0f, scaleY: Float = 0.0f, translateX: Float = 0.0f, translateY: Float = 0.0f, trigger: Long = System.currentTimeMillis())

Properties

Link copied to clipboard

The intensity of the shake animation. Higher values result in a more pronounced shake.

Link copied to clipboard

The number of times the animation should repeat.

Link copied to clipboard
val rotate: Float = 0.0f

The amount of rotation to apply around the Z-axis during the shake.

Link copied to clipboard
val rotateX: Float = 0.0f

The amount of rotation to apply around the X-axis during the shake.

Link copied to clipboard
val rotateY: Float = 0.0f

The amount of rotation to apply around the Y-axis during the shake.

Link copied to clipboard
val scaleX: Float = 0.0f

The amount to scale the composable along the X-axis during the shake.

Link copied to clipboard
val scaleY: Float = 0.0f

The amount to scale the composable along the Y-axis during the shake.

Link copied to clipboard
val translateX: Float = 0.0f

The amount to translate the composable along the X-axis during the shake.

Link copied to clipboard
val translateY: Float = 0.0f

The amount to translate the composable along the Y-axis during the shake.

Link copied to clipboard

A timestamp used to trigger the animation. Defaults to the current system time. This is useful for re-triggering the animation with the same configuration.