Radial Menu Animation Config
data class RadialMenuAnimationConfig(val openDurationMs: Int = 300, val closeDurationMs: Int = 200, val itemScaleDurationMs: Int = 100, val easing: Easing = FastOutSlowInEasing, val selectedItemScale: Float = 1.4f, val enableSpringAnimation: Boolean = false, val springDampingRatio: Float = Spring.DampingRatioMediumBouncy, val springStiffness: Float = Spring.StiffnessMedium)(source)
Controls animation behavior of the RadialMenu.
Use the companion default, snappy, bouncy, or slow presets, or create a fully custom configuration.
Since
1.0.0
Parameters
open Duration Ms
Duration of the menu open animation in ms.
close Duration Ms
Duration of the menu close animation in ms.
item Scale Duration Ms
Duration of item hover scale animation in ms.
easing
Compose Easing curve for open/close animation.
selected Item Scale
Scale factor for the hovered item.
enable Spring Animation
If true, uses spring physics instead of tween.
spring Damping Ratio
Spring damping ratio (used if enableSpringAnimation is true).
spring Stiffness
Spring stiffness (used if enableSpringAnimation is true).
Throws
if openDurationMs ≤ 0, selectedItemScale ≤ 0, or springDampingRatio is outside 0..1.
Constructors
Link copied to clipboard
constructor(openDurationMs: Int = 300, closeDurationMs: Int = 200, itemScaleDurationMs: Int = 100, easing: Easing = FastOutSlowInEasing, selectedItemScale: Float = 1.4f, enableSpringAnimation: Boolean = false, springDampingRatio: Float = Spring.DampingRatioMediumBouncy, springStiffness: Float = Spring.StiffnessMedium)