[ts] Fixed issue with mixDuration on dip mix entry being 0. Caused NaNs when applying mixing from

This commit is contained in:
badlogic 2017-05-17 13:54:43 +02:00
parent 6734145060
commit 5b262648ca

View File

@ -220,7 +220,7 @@ module spine {
first = true;
alpha = alphaDip;
let dipMix = timelineDipMix[i];
if (dipMix != null) alpha *= Math.max(0, 1 - dipMix.mixTime / dipMix.mixDuration);
if (dipMix != null && dipMix.mixDuration > 0) alpha *= Math.max(0, 1 - dipMix.mixTime / dipMix.mixDuration);
break;
}
if (timeline instanceof RotateTimeline)