addKeyframe
[ Function ]
public addKeyframe(keyframe: TcHmi.Animation.Keyframe): this;
Adds a keyframe.
Parameter
Name | Type | Description |
---|---|---|
keyframe | Keyframe to be added. |
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({
styles: { top: ['20px'], left: ['20px'] },
progressPoint: 0
}).addKeyframe({
styles: { top: ['50px'], left: ['50px'] },
progressPoint: 1
});
![]() | Available from 1.8 |