addKeyframe

[ Function ]

public addKeyframe(keyframe: TcHmi.Animation.Keyframe): this;

Adds a keyframe.

Parameter

Name

Type

Description

keyframe

TcHmi.Animation.Keyframe

Keyframe to be added.

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', '');
animation.addKeyframe({
    styles: { top: ['20px'], left: ['20px'] },
    progressPoint: 0
}).addKeyframe({
    styles: { top: ['50px'], left: ['50px'] },
    progressPoint: 1
});
addKeyframe 1:

Available from 1.8