Merge branch '3.7-beta' into 3.7-beta-cpp

This commit is contained in:
badlogic 2018-10-15 16:52:57 +02:00
commit 53d15a47a1
21 changed files with 99 additions and 30 deletions

View File

@ -135,7 +135,7 @@ package spine.animation {
from.trackLast = from.nextTrackLast;
// 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).
if (from.totalAlpha == 0 || to.mixDuration == 0) {
to.mixingFrom = from.mixingFrom;
@ -146,6 +146,13 @@ package spine.animation {
return finished;
}
// If to has 0 timeScale and is not the first entry, remove the mix and apply it one more time to return to the setup pose.
if (to.timeScale == 0 && to.mixingTo != null) {
to.timeScale = 1;
to.mixTime = 0;
to.mixDuration = 0;
}
from.trackTime += delta * from.timeScale;
to.mixTime += delta * to.timeScale;
return false;

View File

@ -327,7 +327,7 @@ int /*boolean*/ _spAnimationState_updateMixingFrom (spAnimationState* self, spTr
from->trackLast = from->nextTrackLast;
/* 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). */
if (from->totalAlpha == 0 || to->mixDuration == 0) {
to->mixingFrom = from->mixingFrom;
@ -338,6 +338,12 @@ int /*boolean*/ _spAnimationState_updateMixingFrom (spAnimationState* self, spTr
return finished;
}
if (to->timeScale == 0 && to->mixingTo) {
to->timeScale = 1;
to->mixTime = 0;
to->mixDuration = 0;
}
from->trackTime += delta * from->timeScale;
to->mixTime += delta * to->timeScale;
return 0;

View File

@ -717,7 +717,7 @@ bool AnimationState::updateMixingFrom(TrackEntry *to, float delta) {
from->_trackLast = from->_nextTrackLast;
// 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).
if (from->_totalAlpha == 0 || to->_mixDuration == 0) {
to->_mixingFrom = from->_mixingFrom;
@ -728,6 +728,12 @@ bool AnimationState::updateMixingFrom(TrackEntry *to, float delta) {
return finished;
}
if (to->_timeScale == 0 && to->_mixingTo) {
to->_timeScale = 1;
to->_mixTime = 0;
to->_mixDuration = 0;
}
from->_trackTime += delta * from->_timeScale;
to->_mixTime += delta * to->_timeScale;

View File

@ -142,7 +142,7 @@ namespace Spine {
from.trackLast = from.nextTrackLast;
// 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).
if (from.totalAlpha == 0 || to.mixDuration == 0) {
to.mixingFrom = from.mixingFrom;
@ -153,6 +153,13 @@ namespace Spine {
return finished;
}
// If to has 0 timeScale and is not the first entry, remove the mix and apply it one more time to return to the setup pose.
if (to.timeScale == 0 && to.mixingTo != null) {
to.timeScale = 1;
to.mixTime = 0;
to.mixDuration = 0;
}
from.trackTime += delta * from.timeScale;
to.mixTime += delta * to.timeScale;
return false;

View File

@ -299,7 +299,7 @@ function AnimationState:updateMixingFrom (to, delta)
from.trackLast = from.nextTrackLast
-- Require mixTime > 0 to ensure the mixing from entry was applied at least once.
if (to.mixTime > 0 and (to.mixTime >= to.mixDuration or to.timeScale == 0)) then
if (to.mixTime > 0 and to.mixTime >= to.mixDuration) then
-- Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
if (from.totalAlpha == 0 or to.mixDuration == 0) then
to.mixingFrom = from.mixingFrom
@ -310,6 +310,13 @@ function AnimationState:updateMixingFrom (to, delta)
return finished
end
-- If to has 0 timeScale and is not the first entry, remove the mix and apply it one more time to return to the setup pose.
if to.timeScale == 0 and to.mixingTo then
to.timeScale = 1
to.mixTime = 0
to.mixDuration = 0
end
from.trackTime = from.trackTime + delta * from.timeScale
to.mixTime = to.mixTime + delta * to.timeScale
return false;

View File

@ -1367,7 +1367,7 @@ var spine;
var finished = this.updateMixingFrom(from, delta);
from.animationLast = from.nextAnimationLast;
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) {
to.mixingFrom = from.mixingFrom;
if (from.mixingFrom != null)
@ -1377,6 +1377,11 @@ var spine;
}
return finished;
}
if (to.timeScale == 0 && to.mixingTo != null) {
to.timeScale = 1;
to.mixTime = 0;
to.mixDuration = 0;
}
from.trackTime += delta * from.timeScale;
to.mixTime += delta * to.timeScale;
return false;

File diff suppressed because one or more lines are too long

View File

@ -1367,7 +1367,7 @@ var spine;
var finished = this.updateMixingFrom(from, delta);
from.animationLast = from.nextAnimationLast;
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) {
to.mixingFrom = from.mixingFrom;
if (from.mixingFrom != null)
@ -1377,6 +1377,11 @@ var spine;
}
return finished;
}
if (to.timeScale == 0 && to.mixingTo != null) {
to.timeScale = 1;
to.mixTime = 0;
to.mixDuration = 0;
}
from.trackTime += delta * from.timeScale;
to.mixTime += delta * to.timeScale;
return false;

File diff suppressed because one or more lines are too long

View File

@ -1367,7 +1367,7 @@ var spine;
var finished = this.updateMixingFrom(from, delta);
from.animationLast = from.nextAnimationLast;
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) {
to.mixingFrom = from.mixingFrom;
if (from.mixingFrom != null)
@ -1377,6 +1377,11 @@ var spine;
}
return finished;
}
if (to.timeScale == 0 && to.mixingTo != null) {
to.timeScale = 1;
to.mixTime = 0;
to.mixDuration = 0;
}
from.trackTime += delta * from.timeScale;
to.mixTime += delta * to.timeScale;
return false;

File diff suppressed because one or more lines are too long

View File

@ -1367,7 +1367,7 @@ var spine;
var finished = this.updateMixingFrom(from, delta);
from.animationLast = from.nextAnimationLast;
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) {
to.mixingFrom = from.mixingFrom;
if (from.mixingFrom != null)
@ -1377,6 +1377,11 @@ var spine;
}
return finished;
}
if (to.timeScale == 0 && to.mixingTo != null) {
to.timeScale = 1;
to.mixTime = 0;
to.mixDuration = 0;
}
from.trackTime += delta * from.timeScale;
to.mixTime += delta * to.timeScale;
return false;

File diff suppressed because one or more lines are too long

View File

@ -1367,7 +1367,7 @@ var spine;
var finished = this.updateMixingFrom(from, delta);
from.animationLast = from.nextAnimationLast;
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) {
to.mixingFrom = from.mixingFrom;
if (from.mixingFrom != null)
@ -1377,6 +1377,11 @@ var spine;
}
return finished;
}
if (to.timeScale == 0 && to.mixingTo != null) {
to.timeScale = 1;
to.mixTime = 0;
to.mixDuration = 0;
}
from.trackTime += delta * from.timeScale;
to.mixTime += delta * to.timeScale;
return false;

File diff suppressed because one or more lines are too long

View File

@ -1367,7 +1367,7 @@ var spine;
var finished = this.updateMixingFrom(from, delta);
from.animationLast = from.nextAnimationLast;
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) {
to.mixingFrom = from.mixingFrom;
if (from.mixingFrom != null)
@ -1377,6 +1377,11 @@ var spine;
}
return finished;
}
if (to.timeScale == 0 && to.mixingTo != null) {
to.timeScale = 1;
to.mixTime = 0;
to.mixDuration = 0;
}
from.trackTime += delta * from.timeScale;
to.mixTime += delta * to.timeScale;
return false;

File diff suppressed because one or more lines are too long

View File

@ -118,7 +118,7 @@ module spine {
from.trackLast = from.nextTrackLast;
// 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).
if (from.totalAlpha == 0 || to.mixDuration == 0) {
to.mixingFrom = from.mixingFrom;
@ -129,6 +129,12 @@ module spine {
return finished;
}
if (to.timeScale == 0 && to.mixingTo != null) {
to.timeScale = 1;
to.mixTime = 0;
to.mixDuration = 0;
}
from.trackTime += delta * from.timeScale;
to.mixTime += delta * to.timeScale;
return false;