Class: AnimatorsArrayList

AnimatorsArrayList

Array list of animators. Provides synchronous animating. An instance of animatorsArrayList = animation of an algorithm.

new AnimatorsArrayList()

Author:
  • Jakub Melezinek
Source:

Extends

  • jsgl.util.ArrayList

Methods

add(animator)

Parameters:
Name Type Description
animator jsgl.util.Animator
Source:

<protected> getCurrentAnimator() → {jsgl.util.Animator}

Source:
Returns:
Returns current animator or null if array list is empty or all animators were played.
Type
jsgl.util.Animator

getCurrentAnimatorIndex() → {Number}

Source:
Returns:
Type
Number

isPlaying()

Source:
Returns:
Returns -1 if is stopped (at the end of animation, no animator), 0 if is paused, 1 if is playing

pause()

Pauses current animator.
Source:
Returns:
Returns false if current animator is null, othervise true.

play()

Plays current animator.
Source:
Returns:
Returns false if current animator is null, othervise true.

setCurrentAnimatorIndex(index) → {jsgl.util.Animator}

Parameters:
Name Type Description
index Number
Source:
Returns:
Type
jsgl.util.Animator

stop()

Stops current animator.
Source:
Returns:
Returns false if current animator is null, othervise true.