Skip to content
MikhailTymchukDX edited this page Apr 12, 2017 · 2 revisions

Action (inherits Animation)

Action is a base class for all "non-animating" animations that provides empty implementations for abstract methods and adds a doAction method that will be called to perform the action's operation. While regular animations perform an operation in a sequence of small steps spread over an interval, the actions perform a single operation instantaneously. By default, all actions have a duration of zero. The actions are very useful for defining complex animations.

Client methods

Name Description
constructor(target, duration, fps)
doAction() The doAction method must be implemented by all actions.
getAnimatedValue() Empty implementation of required abstract method.
onEnd() Calls the doAction method when the animation completes.
setValue() Empty implementation of required abstract method.

Client methods

constructor(target, duration, fps)

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.

doAction()

The doAction method must be implemented by all actions.

getAnimatedValue()

Empty implementation of required abstract method.

onEnd()

Calls the doAction method when the animation completes.

setValue()

Empty implementation of required abstract method.

Clone this wiki locally