Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Animatable

[24:7] extends: FxObj

Wraps an AussomAnimatable (implementation of FXGL's Animatable interface) so Aussom code can make any object animatable by FXGL's AnimationBuilder. Register one callback per property; each property callback must return a JavaFX DoubleProperty wrapper that the animation will drive. The two pivot setters (setScaleOrigin / setRotationOrigin) receive a Point3D wrapper. Example: a = new Animatable(); a.onXProperty(::xProp).onYProperty(::yProp); AnimationBuilder.translate(a.obj).to(...).buildAndPlay();

Methods

  • Animatable ()

    Creates a new Animatable bridge ready to receive property callbacks.

  • adopt (object Ajo)

    Wraps an existing AussomAnimatable AussomJavaObject.

    • @p Ajo is an AussomJavaObject around an AussomAnimatable.
    • @r A new wrapper.
  • onXProperty (callback Cb)

    Registers the callback for xProperty().

    • @p Cb is a callback () -> DoubleProperty.
    • @r this object
  • onYProperty (callback Cb)

    Registers the callback for yProperty().

    • @p Cb is a callback () -> DoubleProperty.
    • @r this object
  • onZProperty (callback Cb)

    Registers the callback for zProperty().

    • @p Cb is a callback () -> DoubleProperty.
    • @r this object
  • onScaleXProperty (callback Cb)

    Registers the callback for scaleXProperty().

    • @p Cb is a callback () -> DoubleProperty.
    • @r this object
  • onScaleYProperty (callback Cb)

    Registers the callback for scaleYProperty().

    • @p Cb is a callback () -> DoubleProperty.
    • @r this object
  • onScaleZProperty (callback Cb)

    Registers the callback for scaleZProperty().

    • @p Cb is a callback () -> DoubleProperty.
    • @r this object
  • onRotationXProperty (callback Cb)

    Registers the callback for rotationXProperty().

    • @p Cb is a callback () -> DoubleProperty.
    • @r this object
  • onRotationYProperty (callback Cb)

    Registers the callback for rotationYProperty().

    • @p Cb is a callback () -> DoubleProperty.
    • @r this object
  • onRotationZProperty (callback Cb)

    Registers the callback for rotationZProperty().

    • @p Cb is a callback () -> DoubleProperty.
    • @r this object
  • onOpacityProperty (callback Cb)

    Registers the callback for opacityProperty().

    • @p Cb is a callback () -> DoubleProperty.
    • @r this object
  • onSetScaleOrigin (callback Cb)

    Registers the callback for setScaleOrigin(Point3D).

    • @p Cb is a callback (pivot) -> any.
    • @r this object
  • onSetRotationOrigin (callback Cb)

    Registers the callback for setRotationOrigin(Point3D).

    • @p Cb is a callback (pivot) -> any.
    • @r this object
  • xProperty ()

  • yProperty ()

  • zProperty ()

  • scaleXProperty ()

  • scaleYProperty ()

  • scaleZProperty ()

  • rotationXProperty ()

  • rotationYProperty ()

  • rotationZProperty ()

  • opacityProperty ()

  • setScaleOrigin (double X, double Y, double Z)

    Invokes the bridge's setScaleOrigin(Point3D) implementation with the supplied pivot. The Aussom callback registered via onSetScaleOrigin runs.

  • setRotationOrigin (double X, double Y, double Z)

    Invokes the bridge's setRotationOrigin(Point3D) implementation with the supplied pivot.