addEmptyAnimation method

TrackEntry addEmptyAnimation(
  1. int trackIndex,
  2. double mixDuration,
  3. double delay
)

Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's TrackEntry.getMixDuration. If the track is empty, it is equivalent to calling setEmptyAnimation.

See setEmptyAnimation.

If delay > 0, sets TrackEntry.getDelay. If <= 0, the delay set is the duration of the previous track entry minus any mix duration plus the specified delay (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration). If the previous entry is looping, its next loop completion is used instead of its duration.

Returns a track entry to allow further customization of animation playback. References to the track entry must not be kept after the EventType.dispose event occurs.

Implementation

TrackEntry addEmptyAnimation(int trackIndex, double mixDuration, double delay) {
  final entry = _bindings.spine_animation_state_add_empty_animation(_state, trackIndex, mixDuration, delay);
  return TrackEntry._(entry, this);
}