AnimationTrack

One weighted clip in an AnimationMixer, created with AnimationMixer.addTrack (or rememberAnimationTrack). Mutate weight to blend it in or out, index to swap the clip, or speed/loop for playback. The read-only time, progress and isFinished update every frame.

Properties

Link copied to clipboard
var index: Int

Zero-based animation index this track samples.

Link copied to clipboard

True once a non-looping track has reached the end of its clip. Always false while loop.

Link copied to clipboard

Whether this track wraps at its end (true) or holds the final frame (false).

Link copied to clipboard

Normalized progress (0..1) of this track. 0 when the clip has no duration.

Link copied to clipboard

Playback rate multiplier (1 = real time, negative plays backwards).

Link copied to clipboard
val time: Float

Current playback time of this track in seconds. Read-only.

Link copied to clipboard

Blend weight, relative to the other tracks. 0 mutes the track but keeps its clock running.

Functions

Link copied to clipboard
fun seek(time: Float)

Resets this track's clock to time seconds.