Timeline script interface

The ITimelineState represents an actively running timeline. It is also the base class of ITweenState, as tweens are a kind of temporary timeline. Unless otherwise stated, where this documentation refers to a timeline, it also applies to a tween.

Timeline APIs

finished
A promise that resolves when the timeline finishes playing. This can be awaited in order to wait until the timeline finishes before proceeding to do something else.
pause()
resume()
Pause or resume playback of the timeline.
isPlaying
isPaused
Read-only booleans indicating whether playback is active or paused.
time
Set or get the current playback time of the timeline in seconds.
totalTime
Set or get the total time (i.e. the duration) of the timeline in seconds.
progress
A read-only number representing the playback progress from 0 to 1 (i.e. the time divided by the total time).
isLooping
Set or get a boolean indicating whether playback will repeat when it finishes.
isPingPong
Set or get a boolean indicating whether the playback direction will alternately reverse when repeating.
playbackRate
Set or get the speed of playback as a multiplier, e.g. 1 is normal speed, 2 is twice as fast, etc.
tags
A read-only array of strings representing the tags for this timeline.
hasTags(tags)
Return a boolean indicating if the timeline matches all the provided tags, given by a space-separated string.
isReleased
A read-only boolean indicating if the interface was released, which happens after the timeline finishes. Once released accessing any other property (apart from this one) will throw an exception, as the underlying timeline state no longer exists.
Construct 3 Manual 2022-08-31

On this page