AnimationHelpers are a set of classes provided by DynamicHUD that helps implementing simple and recurrent animations.
Here is a short description of each of them:
AnimationProperty
Defines a property that holds and updates a value for animations.
Purpose: Provides getter and setter for animatable values.
Key Methods:
get(): Returns the current value.
set(T): Updates the value.
Example:
AnimationProperty<Float> opacity =newAnimationProperty<>(){privatefloat value =1.0f;publicFloatget(){return value;}publicvoidset(Floatv){ value = v;}};
Animation
Abstract base class for animations, managing timing and progress.
Purpose: Handles animation lifecycle (start, update, stop) with easing and callbacks.
Key Methods:
start(): Begins the animation.
update(): Updates animation state.
duration(long): Sets duration in milliseconds.
easing(EasingType): Sets easing type.
onComplete(Runnable): Adds callback when finished.