Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ScaleAnimationBuilder

[14:7] extends: FxObj

Wraps FXGL's AnimationBuilder.ScaleAnimationBuilder, the subbuilder returned by AnimationBuilder.scale(entities). Use from / to to set the scale endpoints (as 2D points) and origin to set the scale pivot, then build or buildAndPlay.

Methods

  • ScaleAnimationBuilder ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing ScaleAnimationBuilder AussomJavaObject.

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

    Sets the start scale (X, Y).

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

    Sets the end scale (X, Y).

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

    Sets the scale pivot.

    • @p X is the pivot X.
    • @p Y is the pivot Y.
    • @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.

    • @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