reverseKeyframes
[ Function ]
public reverseKeyframes(): this;
Reverses the order in which the keyframes are played by subtracting the respective progressPoint
from 1 and setting the result as a new progressPoint
. Can be used to run animations backwards after being played.
Parameter
Name | Type | Description |
---|---|---|
- | - | - |
Return value
Type | Description |
---|---|
This method returns its parent object to allow concatenation of method calls. |
Sample - JavaScript
var animation = new TcHmi.Animation('ViewDesktopBeckhoffLogo', '');
animation.addKeyframe('top', '20px', 0)
.addKeyframe('top', '50px', 1);
animation.reverseKeyframes();
var keyframes = animation.keyframes();
// [{ styles: { top: ["20px"] }, progressPoint: 1 }, { styles: { top: ["50px"] }, progressPoint:0 }]
Available from 1.8 |