Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: AnimationChannelData

[15:7] extends: FxObj

Wraps FXGL's AnimationChannelData (com.almasb.fxgl.texture.AnimationChannelData), the data record that says "render frames frameStart through frameEnd of a sprite sheet, each frameWidth x frameHeight pixels." Pass one or more to AnimationChannel(image, duration, frameWidth, data[]) to assemble a multi-row sprite-sheet animation.

Methods

  • AnimationChannelData (int FrameStart = 0, int FrameEnd = 0, int FrameWidth = 0, int FrameHeight = 0)

    Creates a new AnimationChannelData with the given inclusive frame range and per-frame pixel dimensions.

    • @p FrameStart is the first frame index in this channel.
    • @p FrameEnd is the last frame index in this channel (inclusive).
    • @p FrameWidth is the per-frame width in pixels.
    • @p FrameHeight is the per-frame height in pixels.
  • adopt (object Ajo)

    Wraps an existing AnimationChannelData AussomJavaObject.

    • @p Ajo is an AussomJavaObject around an AnimationChannelData.
    • @r A new wrapper.
  • getFrameStart ()

    Returns the first frame index.

  • getFrameEnd ()

    Returns the last frame index (inclusive).

  • getFrameWidth ()

    Returns the per-frame width in pixels.

  • getFrameHeight ()

    Returns the per-frame height in pixels.