Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TranslationAnimationBuilder

[17:7] extends: FxObj

Wraps FXGL's AnimationBuilder.TranslationAnimationBuilder, the subbuilder returned by AnimationBuilder.translate(entities). Use from / to to set the translation endpoints and build or buildAndPlay to realize the animation. Not directly constructed -- obtain from AnimationBuilder.translate(entitiesList).

Methods

  • TranslationAnimationBuilder ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing TranslationAnimationBuilder AussomJavaObject.

    • @p Ajo is an AussomJavaObject around the FXGL subbuilder.
    • @r A new wrapper.
  • from (double X, double Y)

    Sets the start point for the translation.

    • @p X is the start X.
    • @p Y is the start Y.
    • @r this object
  • to (double X, double Y)

    Sets the end point for the translation.

    • @p X is the end X.
    • @p Y is the end Y.
    • @r this object
  • from3D (double X, double Y, double Z)

    Sets the start point in 3D space.

    • @p X is the start X.
    • @p Y is the start Y.
    • @p Z is the start Z.
    • @r this object
  • to3D (double X, double Y, double Z)

    Sets the end point in 3D space.

    • @p X is the end X.
    • @p Y is the end Y.
    • @p Z is the end Z.
    • @r this object
  • alongPath (object ShapeObj)

    Translates along a JavaFX Shape (Line / CubicCurve / QuadCurve / Path).

    • @p ShapeObj is an AussomJavaObject around a JavaFX Shape.
    • @r this object
  • build ()

    Builds the Animation without playing it.

    • @r An Animation wrapper.
  • buildAndPlay ()

    Builds the Animation and starts it in the scene this builder was created with (typically the running game scene from fxgl.animationBuilder()).

    • @r this object
  • buildAndPlayIn (object SceneObj)

    Builds the Animation and starts it in the supplied scene.

    • @p SceneObj is a Scene wrapper.
    • @r this object