浏览代码

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

badlogic 8 年之前
父节点
当前提交
5b410bf2ba

+ 3 - 1
spine-ts/build/spine-all.js

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

文件差异内容过多而无法显示
+ 0 - 0
spine-ts/build/spine-all.js.map


+ 3 - 1
spine-ts/build/spine-canvas.js

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

文件差异内容过多而无法显示
+ 0 - 0
spine-ts/build/spine-canvas.js.map


+ 3 - 1
spine-ts/build/spine-core.js

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

文件差异内容过多而无法显示
+ 0 - 0
spine-ts/build/spine-core.js.map


+ 3 - 1
spine-ts/build/spine-threejs.js

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

文件差异内容过多而无法显示
+ 0 - 0
spine-ts/build/spine-threejs.js.map


+ 3 - 1
spine-ts/build/spine-webgl.js

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

文件差异内容过多而无法显示
+ 0 - 0
spine-ts/build/spine-webgl.js.map


+ 3 - 1
spine-ts/build/spine-widget.js

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

文件差异内容过多而无法显示
+ 0 - 0
spine-ts/build/spine-widget.js.map


+ 3 - 2
spine-ts/core/src/AnimationState.ts

@@ -191,9 +191,10 @@ module spine {
 			if (from.mixingFrom != null) this.applyMixingFrom(from, skeleton, currentPose);
 
 			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;
-			else {
+				currentPose = MixPose.setup;
+			} else {
 				mix = to.mixTime / to.mixDuration;
 				if (mix > 1) mix = 1;
 			}

部分文件因为文件数量过多而无法显示