addKeyframe

[ Function ]

public addKeyframe(property: string, value: string, progessPoint: number): this;

Adds a keyframe.

Parameter

Name

Type

Description

property

string

The name of a CSS property

value

string

The desired value for this CSS property

progressPoint

number

A value between 0 and 1 inclusive, which determines the point in time of the animation. 0 is the start and 1 the end of the animation.

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('transform', 'translate(0px, 0px)', 0)
    .addKeyframe('transform', 'translate(30px, 30px)', 1);
addKeyframe 1:

Available from 1.8