Package org.gnome.adw

Class SpringAnimation

java.lang.Object
All Implemented Interfaces:
Proxy

@Generated("io.github.jwharm.JavaGI") public final class SpringAnimation extends Animation
A spring-based Animation.

AdwSpringAnimation implements an animation driven by a physical model of a spring described by SpringParams, with a resting position in SpringAnimation:value-to, stretched to SpringAnimation:value-from.

Since the animation is physically simulated, spring animations don't have a fixed duration. The animation will stop when the simulated spring comes to a rest - when the amplitude of the oscillations becomes smaller than SpringAnimation:epsilon, or immediately when it reaches SpringAnimation:value-to if SpringAnimation:clamp is set to TRUE. The estimated duration can be obtained with SpringAnimation:estimated-duration.

Due to the nature of spring-driven motion the animation can overshoot SpringAnimation:value-to before coming to a rest. Whether the animation will overshoot or not depends on the damping ratio of the spring. See SpringParams for more information about specific damping ratio values.

If SpringAnimation:clamp is TRUE, the animation will abruptly end as soon as it reaches the final value, preventing overshooting.

Animations can have an initial velocity value, set via SpringAnimation:initial-velocity, which adjusts the curve without changing the duration. This makes spring animations useful for deceleration at the end of gestures.

If the initial and final values are equal, and the initial velocity is not 0, the animation value will bounce and return to its resting position.