1.26.2.1
Gameface
Animation Interface Reference

The Animation object for dom element. More...

Public Member Functions

void play ()
 Starts playing the animation if paused, does nothing if already running. More...
 
void pause ()
 Pauses the animation if running, does nothing if finished/paused. More...
 
void reverse ()
 Reverses the animations playbackRate and plays it. More...
 
void playFromTo (double playTime, double pauseTime, optional AnyCallback callback)
 Plays an animation from the selected time to the pause time. When the pauseTime is reached, the animation is automatically paused and the callback is invoked. More...
 

Public Attributes

attribute double currentTime
 The current time of the animation. More...
 
attribute double playbackRate
 The playback rate of the animation. More...
 
attribute EventSetter finish
 

Detailed Description

The Animation object for dom element.

Member Function Documentation

◆ pause()

void Animation::pause ( )

Pauses the animation if running, does nothing if finished/paused.

◆ play()

void Animation::play ( )

Starts playing the animation if paused, does nothing if already running.

◆ playFromTo()

void Animation::playFromTo ( double  playTime,
double  pauseTime,
optional AnyCallback  callback 
)

Plays an animation from the selected time to the pause time. When the pauseTime is reached, the animation is automatically paused and the callback is invoked.

◆ reverse()

void Animation::reverse ( )

Reverses the animations playbackRate and plays it.

Member Data Documentation

◆ currentTime

attribute double Animation::currentTime

The current time of the animation.

◆ finish

attribute EventSetter Animation::finish

◆ playbackRate

attribute double Animation::playbackRate

The playback rate of the animation.