Basics
Guides
API Reference
Basics
Guides
API Reference
[13:7] extends: FxObj
Wraps FXGL's Animation, the running animation handle returned by AnimationBuilder.build (or implicitly created by buildAndPlay). The wrapper exposes the play/pause/stop/resume controls plus a few progress accessors and the onFinished hook.
Animation (Ajo = null)
Wraps an existing Animation AussomJavaObject. Normally produced by AnimationBuilder.build rather than constructed directly.
Ajo is an AussomJavaObject around an FXGL Animation.start ()
Starts the animation from the beginning.
this objectstop ()
Stops the animation and resets to the start.
this objectpause ()
Pauses the animation at the current frame.
this objectresume ()
Resumes a paused animation.
this objectisAnimating ()
Returns whether the animation is currently running.
A bool.isPaused ()
Returns whether the animation is currently paused.
A bool.isAutoReverse ()
Returns whether the animation auto-reverses on cycle completion.
A bool.setOnFinished (callback Cb)
Sets the callback fired when the animation finishes its full run (after any repeats).
Cb is a callback with no arguments.this objectonUpdate (double Tpf)
Drives the animation forward by tpf seconds. Normally called automatically by the FXGL scene; useful for manual control.
Tpf is a double with the elapsed time in seconds.this objectstartReverse ()
Starts the animation playing in reverse from its end frame.
this objectsetAutoReverse (bool Reverse)
Sets whether the animation auto-reverses on alternating cycles.
Reverse is a bool.this objectsetReverse (bool Reverse)
Sets the current playback direction. true plays in reverse, false plays forward.
Reverse is a bool.this objectgetReverse ()
Returns the current playback direction.
A bool, true when playing in reverse.setCycleCount (int Count)
Sets the cycle (repeat) count at runtime.
Count is the new cycle count.this objectgetCycleCount ()
Returns the configured cycle count.
An int.setInterpolator (InterpolatorObj)
Sets the interpolator (easing curve).
InterpolatorObj is an AussomJavaObject around a JavaFX Interpolator (see fxgl.Interpolators).this objectgetInterpolator ()
Returns the current interpolator.
An AussomJavaObject around an Interpolator.setTimeTo (double Seconds)
Scrubs the animation to the given time in seconds. Useful for cutscene scrubbing or seeking.
Seconds is the target time in seconds.this objectgetEndTime ()
Returns the total duration of one cycle in seconds.
A double.getOnFinished ()
Returns the onFinished callback currently registered, or null when none.
An AussomJavaObject around a Runnable.setOnCycleFinished (callback Cb)
Sets the per-cycle completion callback (fired at the end of each cycle, not only at the final cycle).
Cb is a callback with no arguments.this objectgetOnCycleFinished ()
Returns the per-cycle completion callback currently registered, or null when none.
An AussomJavaObject around a Runnable.getAnimatedValue ()
Returns the underlying AnimatedValue this Animation drives. Useful for inspecting the from / to values.
An AussomJavaObject around an AnimatedValue.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.