A Float value that may be animated over time.

Constructor

View source

new (value :Float, ?listener :Listener2<Float, Float>)

Properties

behavior :Behavior

The behavior that is currently animating the value, or null if the value is not being animated.

Methods

View source

animate (from :Float, to :Float, seconds :Float, ?easing :EaseFunction) :Void

Animates between the two given values.

Parameters:

from

The initial value.

to

The target value.

seconds

The animation duration, in seconds.

easing

The easing function to use, defaults to Ease.linear.

View source

animateBy (by :Float, seconds :Float, ?easing :EaseFunction) :Void

Animates the current value by the given delta.

Parameters:

by

The delta added to the current value to get the target value.

seconds

The animation duration, in seconds.

easing

The easing function to use, defaults to Ease.linear.

View source

animateTo (to :Float, seconds :Float, ?easing :EaseFunction) :Void

Animates between the current value and the given value.

Parameters:

to

The target value.

seconds

The animation duration, in seconds.

easing

The easing function to use, defaults to Ease.linear.