Basics
Guides
API Reference
Basics
Guides
API Reference
[24:7] extends: FxObj
Wraps FXGL's AnimationChannel (com.almasb.fxgl.texture.AnimationChannel), the configuration object that describes one cycle of a sprite-sheet animation (e.g. WALK_LEFT 4 frames at 0.5s total). Used together with AnimatedTexture to drive sprite animations. Three constructor forms cover the common cases:
AnimationChannel ()
Empty default constructor; populated by adopt or one of the factory helpers.
adopt (object Ajo)
Wraps an existing AnimationChannel AussomJavaObject.
Ajo is an AussomJavaObject around an AnimationChannel.A new wrapper.fromSingleRow (object ImageObj, double DurationSeconds, int NumFrames)
Builds an AnimationChannel for a single-row sprite sheet split horizontally into NumFrames equal cells.
ImageObj is a fx.Image wrapper.DurationSeconds is the total cycle time in seconds.NumFrames is the number of horizontal cells.A new AnimationChannel wrapper.fromGrid (object ImageObj, int FramesPerRow, int FrameWidth, int FrameHeight, double DurationSeconds, int StartFrame, int EndFrame)
Builds an AnimationChannel from a multi-row sprite sheet with the supplied grid spec and frame range.
ImageObj is a fx.Image wrapper.FramesPerRow is the cells per row in the sheet.FrameWidth is the cell width in pixels.FrameHeight is the cell height in pixels.DurationSeconds is the total cycle time in seconds.StartFrame is the inclusive first cell index.EndFrame is the inclusive last cell index.A new AnimationChannel wrapper.isLastFrame (int Frame)
Returns whether the given frame index is the last in the cycle.
getFrameData (int Frame)
Returns the FrameData AJO for the given frame index.
getFrameWidth (int Frame)
Returns the frame width in pixels for the given frame.
getFrameHeight (int Frame)
Returns the frame height in pixels for the given frame.
frameAfter (int Frame)
Returns the next-frame index, wrapping to 0 after the last.
getImage ()
Returns the source Image as an AJO.
getFrameImage (int FrameIndex)
Returns the cropped Image for the given frame index. Useful for previewing individual frames in UI.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.