mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
[ts] Ported 0 timeScale fix, see #1194.
This commit is contained in:
parent
e11e0d42d8
commit
0161fe59ca
@ -1367,7 +1367,7 @@ var spine;
|
|||||||
var finished = this.updateMixingFrom(from, delta);
|
var finished = this.updateMixingFrom(from, delta);
|
||||||
from.animationLast = from.nextAnimationLast;
|
from.animationLast = from.nextAnimationLast;
|
||||||
from.trackLast = from.nextTrackLast;
|
from.trackLast = from.nextTrackLast;
|
||||||
if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
|
if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
|
||||||
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
||||||
to.mixingFrom = from.mixingFrom;
|
to.mixingFrom = from.mixingFrom;
|
||||||
if (from.mixingFrom != null)
|
if (from.mixingFrom != null)
|
||||||
@ -1377,6 +1377,11 @@ var spine;
|
|||||||
}
|
}
|
||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
if (to.timeScale == 0 && to.mixingTo != null) {
|
||||||
|
to.timeScale = 1;
|
||||||
|
to.mixTime = 0;
|
||||||
|
to.mixDuration = 0;
|
||||||
|
}
|
||||||
from.trackTime += delta * from.timeScale;
|
from.trackTime += delta * from.timeScale;
|
||||||
to.mixTime += delta * to.timeScale;
|
to.mixTime += delta * to.timeScale;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -1367,7 +1367,7 @@ var spine;
|
|||||||
var finished = this.updateMixingFrom(from, delta);
|
var finished = this.updateMixingFrom(from, delta);
|
||||||
from.animationLast = from.nextAnimationLast;
|
from.animationLast = from.nextAnimationLast;
|
||||||
from.trackLast = from.nextTrackLast;
|
from.trackLast = from.nextTrackLast;
|
||||||
if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
|
if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
|
||||||
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
||||||
to.mixingFrom = from.mixingFrom;
|
to.mixingFrom = from.mixingFrom;
|
||||||
if (from.mixingFrom != null)
|
if (from.mixingFrom != null)
|
||||||
@ -1377,6 +1377,11 @@ var spine;
|
|||||||
}
|
}
|
||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
if (to.timeScale == 0 && to.mixingTo != null) {
|
||||||
|
to.timeScale = 1;
|
||||||
|
to.mixTime = 0;
|
||||||
|
to.mixDuration = 0;
|
||||||
|
}
|
||||||
from.trackTime += delta * from.timeScale;
|
from.trackTime += delta * from.timeScale;
|
||||||
to.mixTime += delta * to.timeScale;
|
to.mixTime += delta * to.timeScale;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -1367,7 +1367,7 @@ var spine;
|
|||||||
var finished = this.updateMixingFrom(from, delta);
|
var finished = this.updateMixingFrom(from, delta);
|
||||||
from.animationLast = from.nextAnimationLast;
|
from.animationLast = from.nextAnimationLast;
|
||||||
from.trackLast = from.nextTrackLast;
|
from.trackLast = from.nextTrackLast;
|
||||||
if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
|
if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
|
||||||
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
||||||
to.mixingFrom = from.mixingFrom;
|
to.mixingFrom = from.mixingFrom;
|
||||||
if (from.mixingFrom != null)
|
if (from.mixingFrom != null)
|
||||||
@ -1377,6 +1377,11 @@ var spine;
|
|||||||
}
|
}
|
||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
if (to.timeScale == 0 && to.mixingTo != null) {
|
||||||
|
to.timeScale = 1;
|
||||||
|
to.mixTime = 0;
|
||||||
|
to.mixDuration = 0;
|
||||||
|
}
|
||||||
from.trackTime += delta * from.timeScale;
|
from.trackTime += delta * from.timeScale;
|
||||||
to.mixTime += delta * to.timeScale;
|
to.mixTime += delta * to.timeScale;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -1367,7 +1367,7 @@ var spine;
|
|||||||
var finished = this.updateMixingFrom(from, delta);
|
var finished = this.updateMixingFrom(from, delta);
|
||||||
from.animationLast = from.nextAnimationLast;
|
from.animationLast = from.nextAnimationLast;
|
||||||
from.trackLast = from.nextTrackLast;
|
from.trackLast = from.nextTrackLast;
|
||||||
if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
|
if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
|
||||||
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
||||||
to.mixingFrom = from.mixingFrom;
|
to.mixingFrom = from.mixingFrom;
|
||||||
if (from.mixingFrom != null)
|
if (from.mixingFrom != null)
|
||||||
@ -1377,6 +1377,11 @@ var spine;
|
|||||||
}
|
}
|
||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
if (to.timeScale == 0 && to.mixingTo != null) {
|
||||||
|
to.timeScale = 1;
|
||||||
|
to.mixTime = 0;
|
||||||
|
to.mixDuration = 0;
|
||||||
|
}
|
||||||
from.trackTime += delta * from.timeScale;
|
from.trackTime += delta * from.timeScale;
|
||||||
to.mixTime += delta * to.timeScale;
|
to.mixTime += delta * to.timeScale;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -1367,7 +1367,7 @@ var spine;
|
|||||||
var finished = this.updateMixingFrom(from, delta);
|
var finished = this.updateMixingFrom(from, delta);
|
||||||
from.animationLast = from.nextAnimationLast;
|
from.animationLast = from.nextAnimationLast;
|
||||||
from.trackLast = from.nextTrackLast;
|
from.trackLast = from.nextTrackLast;
|
||||||
if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
|
if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
|
||||||
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
||||||
to.mixingFrom = from.mixingFrom;
|
to.mixingFrom = from.mixingFrom;
|
||||||
if (from.mixingFrom != null)
|
if (from.mixingFrom != null)
|
||||||
@ -1377,6 +1377,11 @@ var spine;
|
|||||||
}
|
}
|
||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
if (to.timeScale == 0 && to.mixingTo != null) {
|
||||||
|
to.timeScale = 1;
|
||||||
|
to.mixTime = 0;
|
||||||
|
to.mixDuration = 0;
|
||||||
|
}
|
||||||
from.trackTime += delta * from.timeScale;
|
from.trackTime += delta * from.timeScale;
|
||||||
to.mixTime += delta * to.timeScale;
|
to.mixTime += delta * to.timeScale;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -1367,7 +1367,7 @@ var spine;
|
|||||||
var finished = this.updateMixingFrom(from, delta);
|
var finished = this.updateMixingFrom(from, delta);
|
||||||
from.animationLast = from.nextAnimationLast;
|
from.animationLast = from.nextAnimationLast;
|
||||||
from.trackLast = from.nextTrackLast;
|
from.trackLast = from.nextTrackLast;
|
||||||
if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
|
if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
|
||||||
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
||||||
to.mixingFrom = from.mixingFrom;
|
to.mixingFrom = from.mixingFrom;
|
||||||
if (from.mixingFrom != null)
|
if (from.mixingFrom != null)
|
||||||
@ -1377,6 +1377,11 @@ var spine;
|
|||||||
}
|
}
|
||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
if (to.timeScale == 0 && to.mixingTo != null) {
|
||||||
|
to.timeScale = 1;
|
||||||
|
to.mixTime = 0;
|
||||||
|
to.mixDuration = 0;
|
||||||
|
}
|
||||||
from.trackTime += delta * from.timeScale;
|
from.trackTime += delta * from.timeScale;
|
||||||
to.mixTime += delta * to.timeScale;
|
to.mixTime += delta * to.timeScale;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -118,7 +118,7 @@ module spine {
|
|||||||
from.trackLast = from.nextTrackLast;
|
from.trackLast = from.nextTrackLast;
|
||||||
|
|
||||||
// Require mixTime > 0 to ensure the mixing from entry was applied at least once.
|
// Require mixTime > 0 to ensure the mixing from entry was applied at least once.
|
||||||
if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
|
if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
|
||||||
// Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
|
// Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
|
||||||
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
if (from.totalAlpha == 0 || to.mixDuration == 0) {
|
||||||
to.mixingFrom = from.mixingFrom;
|
to.mixingFrom = from.mixingFrom;
|
||||||
@ -129,6 +129,12 @@ module spine {
|
|||||||
return finished;
|
return finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (to.timeScale == 0 && to.mixingTo != null) {
|
||||||
|
to.timeScale = 1;
|
||||||
|
to.mixTime = 0;
|
||||||
|
to.mixDuration = 0;
|
||||||
|
}
|
||||||
|
|
||||||
from.trackTime += delta * from.timeScale;
|
from.trackTime += delta * from.timeScale;
|
||||||
to.mixTime += delta * to.timeScale;
|
to.mixTime += delta * to.timeScale;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user