Protected Readonly_childChild animations if this instance is a compound, or null.
Protected Readonly_valueThe callback to be called every frame to update the property value.
The duration of the animation in seconds. If repeating is true, the animation will have a period
of this many seconds; if false, the animation will stop after said amount of time has elapsed.
Changing this value while the animation is running is allowed, but might cause large jumps in
the interpolated value in the following frame.
A curve that determines how the startValue and endValue will be interpolated.
Changing this value while the animation is running is allowed, but might cause large jumps in
the interpolated value in the following frame.
The ending value of the animation. This is the value the animation has after finishing.
Changing this value while the animation is running is allowed, but might cause large jumps in
the interpolated value in the following frame.
A boolean flag that indicates if the animation has finished.
The number of times the animation was played.
Determines if the animation repeats after duration seconds or if it stops once the animation is finished.
Changing this value while the animation is running is allowed and setting it to false will cause
the animation to stop once the current iteration ends.
A boolean flag that indicates if the animation has started.
The time point, in seconds, in which the animation started.
The starting value of the animation. This is the value the animation has immediately after starting.
Changing this value while the animation is running is allowed, but might cause large jumps in
the interpolated value in the following frame.
Determines if this instance is a compound animation.
Gets the object.
Determines if the animation is currently running, that is, it is started but hasn't
finished yet. Repeatinganimations are always running unless manually stopped by callingstop`.
ProtectedaddAdds a child animation.
Internal function that performs interpolation between the startValue, endValue
and a factor. This effectively calls MathEx.lerp by casting
startValue and endValue to their appropriate type and returns another object of
the same type.
Interpolation factor in specified range.
Interpolated value with an object of the same type as startValue and endValue
Appends an animation to this instance by creating compound animation that contains both animations. If this instance is already a compound animation, it will be reused.
The animation to append.
a compound animation that contains both animations.
Appends an action to this instance by creating compound animation that contains both animations. If this instance is already a compound animation, it will be reused.
The action to trigger.
a compound animation that contains both animations.
Internal method called by the UIAnimationManager every frame while the animation is running. This
method is responsible for interpolating the values in the animation and updating the UI element data.
The current absolute time.
true If the animation finished
StaticanimateCreates an animation that executes an action lambda once the delay elapsed.
The target object.
The action to execute.
Optionaldelay: numberThe delay until the action is executed. Defaults to no delay.
Optionalrepeating: number | booleanWhether the animation should repeat or not. Defaults to false.
Set to true, to repeat forever.
Set to false, to never repeat.
Set to a number, to indicate the repeat count.
The created animation.
StaticanimateAnimates a property of the object. The animation is automatically started.
The target object.
The name of the property to be animated on the UIElement.
The starting value of the property.
The ending value of the property.
Optionalduration: numberThe animation duration in seconds. Defaults to 1 seconds.
OptionaleasingCurve: Const<EasingCurve>The easing curve to be used. Defaults to
Optionalrepeating: number | booleanWhether the animation should repeat or not. Defaults to false.
Set to true, to repeat forever.
Set to false, to never repeat.
Set to a number, to indicate the repeat count.
The created animation.
StaticanimateAnimates a property of the UIElement using a generic lambda function. The animation is
automatically started.
The target object.
The lambda that is called when the value is updated. The lambda should be used to assign the value on the u
The starting value of the property.
The ending value of the property.
Optionalduration: numberThe animation duration in seconds. Defaults to 1 seconds.
OptionaleasingCurve: Const<EasingCurve>The easing curve to be used. Defaults to
Optionalrepeating: number | booleanWhether the animation should repeat or not. Defaults to false.
Set to true, to repeat forever.
Set to false, to never repeat.
Set to a number, to indicate the repeat count.
The created animation.
StaticanimationCreates an animation that takes delay seconds to execute.
The target object.
The delay in seconds.
The created animation.
Staticstop
The EditorAnimation can be used to start, stop and control animations on arbitrary objects. While a common use-case is to animate UIElement types through APIs such as UIElement.animateWithSetter, the class is not limit to those types. Any object can be animated the the EditorAnimation system.
The animations takes a property setter, given either a lamba or as a
stringthat represents a property name on aUIElementand animates it with new values that start atstartValueand end atendValue. The values are interpolated according to the definedeasingCurveand will takedurationseconds to complete. The system guarantees that afterdurationthe value is exactlyendValueunlessrepeatingis true or a number, in that case the animation will automatically restart and go back tostartValueafterdurationseconds.