crossFadeFrom method
dynamic
crossFadeFrom(
- dynamic fadeOutAction,
- dynamic duration,
- dynamic warp
Implementation
crossFadeFrom(fadeOutAction, duration, warp) {
fadeOutAction.fadeOut(duration);
fadeIn(duration);
if (warp) {
var fadeInDuration = _clip.duration,
fadeOutDuration = fadeOutAction._clip.duration,
startEndRatio = fadeOutDuration / fadeInDuration,
endStartRatio = fadeInDuration / fadeOutDuration;
fadeOutAction.warp(1.0, startEndRatio, duration);
this.warp(endStartRatio, 1.0, duration);
}
return this;
}