getMixDuration method

double getMixDuration()

Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData.getMix based on the animation before this animation (if any).

A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the properties it was animating. A mix duration of 0 can be set at any time to end the mix on the next AnimationState.update.

The mixDuration can be set manually rather than use the value from AnimationStateData.getMix. In that case, the mixDuration can be set for a new track entry only before AnimationState.update is first called.

When using [AnimationState.addAnimation] with a delay <= 0, the [getDelay] is set using the mix duration from the [AnimationStateData]. If mixDuration is set afterward, the delay may need to be adjusted. For example: entry.delay = entry.previous.getTrackComplete() - entry.mixDuration;

Implementation

double getMixDuration() {
  return _bindings.spine_track_entry_get_mix_duration(_entry);
}