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;
}