[ts] Fix not returning to setup pose when multiple mixing from entries end at same time. See #1013

This commit is contained in:
badlogic 2017-10-28 09:37:28 +02:00
parent 882f49f5a9
commit 5b410bf2ba
13 changed files with 27 additions and 14 deletions

View File

@ -1715,8 +1715,10 @@ var spine;
if (from.mixingFrom != null) if (from.mixingFrom != null)
this.applyMixingFrom(from, skeleton, currentPose); this.applyMixingFrom(from, skeleton, currentPose);
var mix = 0; var mix = 0;
if (to.mixDuration == 0) if (to.mixDuration == 0) {
mix = 1; mix = 1;
currentPose = spine.MixPose.setup;
}
else { else {
mix = to.mixTime / to.mixDuration; mix = to.mixTime / to.mixDuration;
if (mix > 1) if (mix > 1)

File diff suppressed because one or more lines are too long

View File

@ -1715,8 +1715,10 @@ var spine;
if (from.mixingFrom != null) if (from.mixingFrom != null)
this.applyMixingFrom(from, skeleton, currentPose); this.applyMixingFrom(from, skeleton, currentPose);
var mix = 0; var mix = 0;
if (to.mixDuration == 0) if (to.mixDuration == 0) {
mix = 1; mix = 1;
currentPose = spine.MixPose.setup;
}
else { else {
mix = to.mixTime / to.mixDuration; mix = to.mixTime / to.mixDuration;
if (mix > 1) if (mix > 1)

File diff suppressed because one or more lines are too long

View File

@ -1266,8 +1266,10 @@ var spine;
if (from.mixingFrom != null) if (from.mixingFrom != null)
this.applyMixingFrom(from, skeleton, currentPose); this.applyMixingFrom(from, skeleton, currentPose);
var mix = 0; var mix = 0;
if (to.mixDuration == 0) if (to.mixDuration == 0) {
mix = 1; mix = 1;
currentPose = spine.MixPose.setup;
}
else { else {
mix = to.mixTime / to.mixDuration; mix = to.mixTime / to.mixDuration;
if (mix > 1) if (mix > 1)

File diff suppressed because one or more lines are too long

View File

@ -1266,8 +1266,10 @@ var spine;
if (from.mixingFrom != null) if (from.mixingFrom != null)
this.applyMixingFrom(from, skeleton, currentPose); this.applyMixingFrom(from, skeleton, currentPose);
var mix = 0; var mix = 0;
if (to.mixDuration == 0) if (to.mixDuration == 0) {
mix = 1; mix = 1;
currentPose = spine.MixPose.setup;
}
else { else {
mix = to.mixTime / to.mixDuration; mix = to.mixTime / to.mixDuration;
if (mix > 1) if (mix > 1)

File diff suppressed because one or more lines are too long

View File

@ -1266,8 +1266,10 @@ var spine;
if (from.mixingFrom != null) if (from.mixingFrom != null)
this.applyMixingFrom(from, skeleton, currentPose); this.applyMixingFrom(from, skeleton, currentPose);
var mix = 0; var mix = 0;
if (to.mixDuration == 0) if (to.mixDuration == 0) {
mix = 1; mix = 1;
currentPose = spine.MixPose.setup;
}
else { else {
mix = to.mixTime / to.mixDuration; mix = to.mixTime / to.mixDuration;
if (mix > 1) if (mix > 1)

File diff suppressed because one or more lines are too long

View File

@ -1266,8 +1266,10 @@ var spine;
if (from.mixingFrom != null) if (from.mixingFrom != null)
this.applyMixingFrom(from, skeleton, currentPose); this.applyMixingFrom(from, skeleton, currentPose);
var mix = 0; var mix = 0;
if (to.mixDuration == 0) if (to.mixDuration == 0) {
mix = 1; mix = 1;
currentPose = spine.MixPose.setup;
}
else { else {
mix = to.mixTime / to.mixDuration; mix = to.mixTime / to.mixDuration;
if (mix > 1) if (mix > 1)

File diff suppressed because one or more lines are too long

View File

@ -191,9 +191,10 @@ module spine {
if (from.mixingFrom != null) this.applyMixingFrom(from, skeleton, currentPose); if (from.mixingFrom != null) this.applyMixingFrom(from, skeleton, currentPose);
let mix = 0; let mix = 0;
if (to.mixDuration == 0) // Single frame mix to undo mixingFrom changes. if (to.mixDuration == 0) { // Single frame mix to undo mixingFrom changes.
mix = 1; mix = 1;
else { currentPose = MixPose.setup;
} else {
mix = to.mixTime / to.mixDuration; mix = to.mixTime / to.mixDuration;
if (mix > 1) mix = 1; if (mix > 1) mix = 1;
} }