Is it possible to animate decay to a target value?...
# compose
j
Is it possible to animate decay to a target value? Trying to implement lazy(column/row) snapping
d
Wouldn't that be just
animateTo
? You can specify an initial velocity, along with the target, for animateTo
j
Where would the decay come from? It looks like you cant pass a
DecayAnimationSpec<T>
to
animateTo
. I see
animateDecay
but that doesn’t take a target value
d
You would be using the decay as a part of the spring physics (also known as damping). The spring energy decays over time, that's how it comes to a stop.
j
Oh I see, I’ll play around with SpringSpec then, thanks!
👍 1