Optionalprops: ITimelineStaticProps & ITimelineMutableProps & Partial<OptionalonCallbacks: Partial<Retrieves the module's callbacks instance.
Get the timeline duration, ensuring it is at least 0 ms.
Get the eased progress of the timeline, derived from the easing function.
Checks if the module has been destroyed.
Whether the timeline is paused.
Whether the timeline is currently playing.
Whether the timeline is reversed (progress decreases over time).
The name of the module, derived from the class name
Optional prefix for classnames used by the module
Get or set the linear progress of the timeline. Setting this triggers an update and associated callbacks.
Current properties. Do not mutate these directly, use updateProps instead.
Protected_addAdds a class name on an element, and keeps track of it for removal when the module is destroyed.
The target DOM element.
The class name to toggle.
Protected_cnHelper function to generate classnames with the module's prefix.
The class names to generate.
A string of class names with the module's prefix applied.
Protected_destroyDestroy the timeline, stopping any active animation and cleaning up resources.
Get default mutable properties.
Timeline duration in milliseconds.
Easing function for timeline progression. Accepts standard easing types or an array of bezier values.
Get default static properties.
Protected_handleMethod that is called when the module's properties mutate. In most cases, used to handle callbacks.
Destroys the module, cleaning up resources, callbacks, and event listeners.
Adds a custom callback to the module.
The event type to listen for (e.g., 'props', 'destroy').
The function to execute when the event is triggered.
Additional settings for the callback.
Adds a callback on the module's destruction.
The function to execute during destruction.
Pause the timeline, halting progress without resetting it.
Play the timeline, advancing progress toward completion. Does nothing if the timeline is destroyed or already completed.
Reset the timeline to the beginning (progress = 0).
Reverse the timeline, moving progress toward the start. Does nothing if the timeline is destroyed or already at the start.
A timeline class for managing animations with easing and precise progress control. It provides methods for playing, reversing, pausing, and resetting the timeline.
Documentation