Skip to main content

Animation

class Animation extends Component

Self-running animation

constructor

new Animation(options)

Create new instance of the Animation

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
optionsobject✔️{}Options

Events

progress

Fires for every animation frame when animation is active.

Type: object

PROPERTYTYPEDESCRIPTION
eventobjectEvent object.
event.progressnumberCurrent animation progress value.
Value is ranged from 0(start) to 1(end).
event.easedProgressnumberEased progress value.

loop

Fires for every animation loop except for the last loop
This will be triggered only when repeat > 0

Type: object

PROPERTYTYPEDESCRIPTION
eventobjectEvent object.
event.progressnumberCurrent animation progress value.
Value is ranged from 0(start) to 1(end).
event.easedProgressnumberEased progress value.
event.loopIndexnumberIndex of the current loop.

finish

Fires when animation ends.

Type: void