Przeglądaj źródła

[ts] Ported latest anim state change

badlogic 8 lat temu
rodzic
commit
e4ff874172

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

@@ -1118,9 +1118,12 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta, animationCount + 1);
 			if (entry.mixTime > 0 && (entry.mixTime >= entry.mixDuration || entry.timeScale == 0)) {
-				if (animationCount > 6 && from.mixingFrom == null) {
-					entry.mixingFrom = null;
-					this.queue.end(from);
+				if (animationCount > 5 && from.mixingFrom == null) {
+					entry.interruptAlpha = Math.max(0, entry.interruptAlpha - delta * 0.66);
+					if (entry.interruptAlpha <= 0) {
+						entry.mixingFrom = null;
+						this.queue.end(from);
+					}
 				}
 				return finished;
 			}

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-all.js.map


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

@@ -1118,9 +1118,12 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta, animationCount + 1);
 			if (entry.mixTime > 0 && (entry.mixTime >= entry.mixDuration || entry.timeScale == 0)) {
-				if (animationCount > 6 && from.mixingFrom == null) {
-					entry.mixingFrom = null;
-					this.queue.end(from);
+				if (animationCount > 5 && from.mixingFrom == null) {
+					entry.interruptAlpha = Math.max(0, entry.interruptAlpha - delta * 0.66);
+					if (entry.interruptAlpha <= 0) {
+						entry.mixingFrom = null;
+						this.queue.end(from);
+					}
 				}
 				return finished;
 			}

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-canvas.js.map


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

@@ -1118,9 +1118,12 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta, animationCount + 1);
 			if (entry.mixTime > 0 && (entry.mixTime >= entry.mixDuration || entry.timeScale == 0)) {
-				if (animationCount > 6 && from.mixingFrom == null) {
-					entry.mixingFrom = null;
-					this.queue.end(from);
+				if (animationCount > 5 && from.mixingFrom == null) {
+					entry.interruptAlpha = Math.max(0, entry.interruptAlpha - delta * 0.66);
+					if (entry.interruptAlpha <= 0) {
+						entry.mixingFrom = null;
+						this.queue.end(from);
+					}
 				}
 				return finished;
 			}

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-core.js.map


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

@@ -1118,9 +1118,12 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta, animationCount + 1);
 			if (entry.mixTime > 0 && (entry.mixTime >= entry.mixDuration || entry.timeScale == 0)) {
-				if (animationCount > 6 && from.mixingFrom == null) {
-					entry.mixingFrom = null;
-					this.queue.end(from);
+				if (animationCount > 5 && from.mixingFrom == null) {
+					entry.interruptAlpha = Math.max(0, entry.interruptAlpha - delta * 0.66);
+					if (entry.interruptAlpha <= 0) {
+						entry.mixingFrom = null;
+						this.queue.end(from);
+					}
 				}
 				return finished;
 			}

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-threejs.js.map


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

@@ -1118,9 +1118,12 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta, animationCount + 1);
 			if (entry.mixTime > 0 && (entry.mixTime >= entry.mixDuration || entry.timeScale == 0)) {
-				if (animationCount > 6 && from.mixingFrom == null) {
-					entry.mixingFrom = null;
-					this.queue.end(from);
+				if (animationCount > 5 && from.mixingFrom == null) {
+					entry.interruptAlpha = Math.max(0, entry.interruptAlpha - delta * 0.66);
+					if (entry.interruptAlpha <= 0) {
+						entry.mixingFrom = null;
+						this.queue.end(from);
+					}
 				}
 				return finished;
 			}

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-webgl.js.map


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

@@ -1118,9 +1118,12 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta, animationCount + 1);
 			if (entry.mixTime > 0 && (entry.mixTime >= entry.mixDuration || entry.timeScale == 0)) {
-				if (animationCount > 6 && from.mixingFrom == null) {
-					entry.mixingFrom = null;
-					this.queue.end(from);
+				if (animationCount > 5 && from.mixingFrom == null) {
+					entry.interruptAlpha = Math.max(0, entry.interruptAlpha - delta * 0.66);
+					if (entry.interruptAlpha <= 0) {
+						entry.mixingFrom = null;
+						this.queue.end(from);
+					}
 				}
 				return finished;
 			}

Plik diff jest za duży
+ 0 - 0
spine-ts/build/spine-widget.js.map


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

@@ -115,9 +115,13 @@ module spine {
 
 			// Require mixTime > 0 to ensure the mixing from entry was applied at least once.
 			if (entry.mixTime > 0 && (entry.mixTime >= entry.mixDuration || entry.timeScale == 0)) {
-				if (animationCount > 6 && from.mixingFrom == null) { // Limit the mixing from linked list.
-					entry.mixingFrom = null;
-					this.queue.end(from);
+				if (animationCount > 5 && from.mixingFrom == null) {
+					// Limit linked list by speeding up and removing old entries.
+					entry.interruptAlpha = Math.max(0, entry.interruptAlpha - delta * 0.66);
+					if (entry.interruptAlpha <= 0) {
+						entry.mixingFrom = null;
+						this.queue.end(from);
+					}
 				}
 				return finished;
 			}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików