animation

abstract fun animation(animation: SpatialHoverAnimation = tween(), block: SpatialHoverEffectScope.() -> Unit)

Specify the animation for sub-scope effects.

In the following example, activating effects will use FastOutSlowInEasing, deactivating effects will use LinearEasing.

animation(tween(easing = if (isActive) FastOutSlowInEasing else LinearEasing )) {
//effects ...
}

Parameters

animation

The animation for the block.

block

Sub-scope of animation.