Unique string identifier for the object
Animation playback state
Animation looping behavior:
-1
is infinite loops. Otherwise a specific number of loops
Animation name
Limit animation playback range. By default between 0
and duration
.
Default: 0
Limit animation playback range. By default between 0
and duration
.
Default: duration
Animation playback speed factor
Current animation playback time in seconds
Refresh animation values to their current states in the embed. This can be useful for example when determining playback position of animations.
(Normally values are updated only after calling listAnimations()
)
Using via then() callback:
animation.refresh().then(() => {
// Log current playback position
console.log(animation.time);
});
Or in async function:
await animation.refresh();
// Log current playback position
console.log(animation.time);
Animation duration in seconds