Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.
MikhailTymchukDX edited this page Aug 25, 2016 · 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
.ctor(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

.ctor(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.

onEnd()

Calls the doAction method when the animation completes.

doAction()

The doAction method must be implemented by all actions.

getAnimatedValue()

Empty implementation of required abstract method.

setValue()

Empty implementation of required abstract method.

Clone this wiki locally