C

WebGLAnimation

An animation for use with WebGLGraphModelManager, only.
Inheritance Hierarchy

Remarks

You can create instances of this class via the factory methods in WebGLGraphModelManager. After associating an animation with graph items, you can start it.

After starting, an animation makes progress towards its final state, possibly going through several iterations. The final state is either the same as the initial state for cyclic animations or a different state for unidirectional animations. While it is in progress, an animation can be given a signal to stop. For unidirectional animations like scale, a stopping animations continues its current iteration, and then finishes its progress. For cyclic animations like pulse, it reverses its effect in a single last iteration until it reaches its initial state, and then finishes its progress. Also, while an animation is stopping, you can switch it back into normal progress by calling the start method again.

To cancel its progress immediately, call the reset method. To start a finished animation a second time, call the reset method, first.

Note that Resetting or stopping an animation does not remove the association with the graph elements, but removing the association cancels the animation.

This class also implements the IAnimation interface, so animations can be scheduled via animator instances. This can be handy for running multiple animations in parallel.

Animations should be shared and un-assigned when not in use as the maximum number of assigned animation instances is limited to 15 per type of element. There can be only 8 animations assigned to one item at the same time and only 31 different combinations of the above animations may be assigned to items, with the 32nd combination being no animation at all. If any of these limits are violated, some animations will either not be applied or will stop working.

This class cannot be instantiated

See Also

API

setAnimations, setAnimations, setAnimations, createFadeAnimation, createPulseAnimation, createBeaconAnimation, createScaleAnimation, createShakeAnimation, createArcHeightAnimation, createFadeAnimation, createPulseAnimation, createScaleAnimation

Members

No filters for this type

Properties

Specifies the preferred total duration of this animation if it is used with an Animator.
This is the product of the duration of a single iteration and the number of iterations of this animation.
readonlyfinal

Methods

Called by an Animator to clean up after this animation has finished.
You don't need to call this method in combination with start, stop, or reset.
final
Immediately resets this animation to its initial state.
This will immediately reset the animation to its initial state, regardless of the progress it made. Such a resetted animation can be restarted at any time with the start method.
final

See Also

API
start, stop
Starts the progress of the animation, unless it already finished.

After associating an animation with graph items, you can start it.

After starting, an animation makes progress towards its final state, possibly going through several iterations. The final state is either the same as the initial state for cyclic animations or a different state for unidirectional animations. While it is in progress, an animation can be given a signal to stop. For unidirectional animations like scale, a stopping animations continues its current iteration, and then finishes its progress. For cyclic animations like pulse, it reverses its effect in a single last iteration until it reaches its initial state, and then finishes its progress. Also, while an animation is stopping, you can switch it back into normal progress by calling the start method again.

To cancel its progress immediately, call the reset method. To start a finished animation a second time, call the reset method, first.

Using this method does not require a separate Animator instance.

final

Return Value

Promise<boolean>
A Promise<void> that will resolve to true if the animation reached its final state, or to false if the animation has been signaled to stop or resetted.

See Also

API
stop, reset
Signals the animation to stop.

While it is in progress, an animation can be given a signal to stop. For unidirectional animations like scale, a stopping animations continues its current iteration, and then finishes its progress. For cyclic animations like pulse, it reverses its effect in a single last iteration until it reaches its initial state, and then finishes its progress. Also, while an animation is stopping, you can switch it back into normal progress by calling the start method again.

To cancel its progress immediately, call the reset method.

final

Return Value

Promise<boolean>
A Promise<void> that will resolve to true if the animation has fully stopped or resetted, or to false if the animation has been switched back to normal progress.

See Also

API
start, reset