Browse Source

[ts] Ported latest AnimationState changes. See #792

badlogic 8 years ago
parent
commit
fb327d9000

+ 2 - 2
spine-ts/build/spine-all.js

@@ -1568,7 +1568,7 @@ var spine;
 				current.mixingFrom = from;
 				current.mixTime = 0;
 				from.timelinesRotation.length = 0;
-				if (from.mixingFrom != null)
+				if (from.mixingFrom != null && from.mixDuration > 0)
 					current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1);
 			}
 			this.queue.start(current);
@@ -1680,7 +1680,7 @@ var spine;
 			entry.trackTime = 0;
 			entry.trackLast = -1;
 			entry.nextTrackLast = -1;
-			entry.trackEnd = loop ? Number.MAX_VALUE : entry.animationEnd;
+			entry.trackEnd = Number.MAX_VALUE;
 			entry.timeScale = 1;
 			entry.alpha = 1;
 			entry.mixAlpha = 1;

File diff suppressed because it is too large
+ 0 - 0
spine-ts/build/spine-all.js.map


+ 2 - 2
spine-ts/build/spine-canvas.js

@@ -1568,7 +1568,7 @@ var spine;
 				current.mixingFrom = from;
 				current.mixTime = 0;
 				from.timelinesRotation.length = 0;
-				if (from.mixingFrom != null)
+				if (from.mixingFrom != null && from.mixDuration > 0)
 					current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1);
 			}
 			this.queue.start(current);
@@ -1680,7 +1680,7 @@ var spine;
 			entry.trackTime = 0;
 			entry.trackLast = -1;
 			entry.nextTrackLast = -1;
-			entry.trackEnd = loop ? Number.MAX_VALUE : entry.animationEnd;
+			entry.trackEnd = Number.MAX_VALUE;
 			entry.timeScale = 1;
 			entry.alpha = 1;
 			entry.mixAlpha = 1;

File diff suppressed because it is too large
+ 0 - 0
spine-ts/build/spine-canvas.js.map


+ 2 - 2
spine-ts/build/spine-core.js

@@ -1221,7 +1221,7 @@ var spine;
 				current.mixingFrom = from;
 				current.mixTime = 0;
 				from.timelinesRotation.length = 0;
-				if (from.mixingFrom != null)
+				if (from.mixingFrom != null && from.mixDuration > 0)
 					current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1);
 			}
 			this.queue.start(current);
@@ -1333,7 +1333,7 @@ var spine;
 			entry.trackTime = 0;
 			entry.trackLast = -1;
 			entry.nextTrackLast = -1;
-			entry.trackEnd = loop ? Number.MAX_VALUE : entry.animationEnd;
+			entry.trackEnd = Number.MAX_VALUE;
 			entry.timeScale = 1;
 			entry.alpha = 1;
 			entry.mixAlpha = 1;

File diff suppressed because it is too large
+ 0 - 0
spine-ts/build/spine-core.js.map


+ 2 - 2
spine-ts/build/spine-threejs.js

@@ -1221,7 +1221,7 @@ var spine;
 				current.mixingFrom = from;
 				current.mixTime = 0;
 				from.timelinesRotation.length = 0;
-				if (from.mixingFrom != null)
+				if (from.mixingFrom != null && from.mixDuration > 0)
 					current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1);
 			}
 			this.queue.start(current);
@@ -1333,7 +1333,7 @@ var spine;
 			entry.trackTime = 0;
 			entry.trackLast = -1;
 			entry.nextTrackLast = -1;
-			entry.trackEnd = loop ? Number.MAX_VALUE : entry.animationEnd;
+			entry.trackEnd = Number.MAX_VALUE;
 			entry.timeScale = 1;
 			entry.alpha = 1;
 			entry.mixAlpha = 1;

File diff suppressed because it is too large
+ 0 - 0
spine-ts/build/spine-threejs.js.map


+ 2 - 2
spine-ts/build/spine-webgl.js

@@ -1221,7 +1221,7 @@ var spine;
 				current.mixingFrom = from;
 				current.mixTime = 0;
 				from.timelinesRotation.length = 0;
-				if (from.mixingFrom != null)
+				if (from.mixingFrom != null && from.mixDuration > 0)
 					current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1);
 			}
 			this.queue.start(current);
@@ -1333,7 +1333,7 @@ var spine;
 			entry.trackTime = 0;
 			entry.trackLast = -1;
 			entry.nextTrackLast = -1;
-			entry.trackEnd = loop ? Number.MAX_VALUE : entry.animationEnd;
+			entry.trackEnd = Number.MAX_VALUE;
 			entry.timeScale = 1;
 			entry.alpha = 1;
 			entry.mixAlpha = 1;

File diff suppressed because it is too large
+ 0 - 0
spine-ts/build/spine-webgl.js.map


+ 2 - 2
spine-ts/build/spine-widget.js

@@ -1221,7 +1221,7 @@ var spine;
 				current.mixingFrom = from;
 				current.mixTime = 0;
 				from.timelinesRotation.length = 0;
-				if (from.mixingFrom != null)
+				if (from.mixingFrom != null && from.mixDuration > 0)
 					current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1);
 			}
 			this.queue.start(current);
@@ -1333,7 +1333,7 @@ var spine;
 			entry.trackTime = 0;
 			entry.trackLast = -1;
 			entry.nextTrackLast = -1;
-			entry.trackEnd = loop ? Number.MAX_VALUE : entry.animationEnd;
+			entry.trackEnd = Number.MAX_VALUE;
 			entry.timeScale = 1;
 			entry.alpha = 1;
 			entry.mixAlpha = 1;

File diff suppressed because it is too large
+ 0 - 0
spine-ts/build/spine-widget.js.map


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

@@ -349,7 +349,7 @@ module spine {
 				from.timelinesRotation.length = 0;
 
 				// If not completely mixed in, set mixAlpha so mixing out happens from current mix to zero.
-				if (from.mixingFrom != null) current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1);
+				if (from.mixingFrom != null && from.mixDuration > 0) current.mixAlpha *= Math.min(from.mixTime / from.mixDuration, 1);
 			}
 
 			this.queue.start(current);
@@ -469,7 +469,7 @@ module spine {
 			entry.trackTime = 0;
 			entry.trackLast = -1;
 			entry.nextTrackLast = -1;
-			entry.trackEnd = loop ? Number.MAX_VALUE : entry.animationEnd;
+			entry.trackEnd = Number.MAX_VALUE;
 			entry.timeScale = 1;
 
 			entry.alpha = 1;

Some files were not shown because too many files changed in this diff