Is it possible to animate decay to a target value? Trying to implement lazy(column/row) snapping
d
Doris Liu
06/18/2021, 4:20 AM
Wouldn't that be just
animateTo
? You can specify an initial velocity, along with the target, for animateTo
j
Jason Ankers
06/18/2021, 4:24 AM
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
Doris Liu
06/18/2021, 4:31 AM
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
Jason Ankers
06/18/2021, 4:35 AM
Oh I see, I’ll play around with SpringSpec then, thanks!