direction

[ Function ]

public direction(valueNew: 'normal' | 'reverse' | 'alternate' | 'alternate-reverse' | null): this;

Sets the direction of the animation. The direction not only affects the order of the keyframes but also the timing function.

Parameter

Name

Type

Description

valueNew

string, null

The direction of the animation. If null is passed, the default value 'normal' is used.

'reverse' lets the animation run backwards, 'alternate' reverses the direction at each repetition for animations with more than one repetition and 'alternate-reverse' works like 'alternate', only that it starts with the reverse direction.

Return value

Type

Description

TcHmi.Animation

This method returns its parent object to allow concatenation of method calls.

Sample - JavaScript

var animation = new TcHmi.Animation('ViewDesktopBeckhoffLogo', '');
var directionDefault = animation.direction(); // 'normal'
animation.direction('alternate');
var direction = animation.direction(); // 'alternate'
direction 1:

Available from 1.8