Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

ParentAnimation

MikhailTymchukDX edited this page Apr 12, 2017 · 2 revisions

ParentAnimation (inherits Animation)

The ParentAnimation serves as a base class for all animations that contain children (such as Sys.Extended.UI.Animation.ParallelAnimation, Sys.Extended.UI.SequenceAnimation, etc.). It does not actually play the animations, so any classes that inherit from it must do so. Any animation that requires nested child animations must inherit from this class, although it will likely want to inherit off of Sys.Extended.UI.Animation.ParallelAnimation or Sys.Extended.UI.SequenceAnimation which will actually play their child animations.

Client properties

Name Description
animations Array of child animations to be played (there are no assumptions placed on order because it will matter for some derived animations like Sys.Extended.UI.Animation.SequenceAnimation, but not for others like Sys.Extended.UI.Animation.ParallelAnimation). To manipulate the child animations, use the functions add, clear, remove, and removeAt.

Client methods

Name Description
add(animation) Add an animation as a child of this animation.
clear() Clear the array of child animations. This will dispose the cleared child animations.
constructor(target, duration, fps, animations)
remove(animation) Remove the animation from the array of child animations. This will dispose the removed animation.
removeAt(index) Remove the animation at a given index from the array of child animations.

Client properties

animations

Array of child animations to be played (there are no assumptions placed on order because it will matter for some derived animations like Sys.Extended.UI.Animation.SequenceAnimation, but not for others like Sys.Extended.UI.Animation.ParallelAnimation). To manipulate the child animations, use the functions add, clear, remove, and removeAt.

Getter name: get_target()

Client methods

add(animation)

Add an animation as a child of this animation.

Params:

  • animation
    • Type: Object
    • Description: Child animation to add.

clear()

Clear the array of child animations. This will dispose the cleared child animations.

constructor(target, duration, fps, animations)

Params:

  • target

    • Type: Object
    • Description: Target of the animation.
  • duration

    • Type: Number
    • Description: Length of the animation in seconds. The default is 1.
  • fps

    • Type: Number
    • Description: Number of steps per second. The default is 25.
  • animations

    • Type: Object
    • Description: Array of child animations to be played.

remove(animation)

Remove the animation from the array of child animations. This will dispose the removed animation.

Params:

  • animation
    • Type: Object
    • Description: Child animation to remove.

removeAt(index)

Remove the animation at a given index from the array of child animations.

Params:

  • index
    • Type: Number
    • Description: Index of the child animation to remove.
Clone this wiki locally