Browse Source

[as3] Fix path constraint for when path length is NaN. See #1230.

badlogic 6 years ago
parent
commit
9f8003a3b6

BIN
spine-as3/spine-as3-example/lib/spine-as3.swc


+ 2 - 2
spine-as3/spine-as3/src/spine/PathConstraint.as

@@ -189,7 +189,7 @@ package spine {
 				var pathLength : Number = lengths[curveCount];
 				if (percentPosition) position *= pathLength;
 				if (percentSpacing) {
-					for (var i : int = 0; i < spacesCount; i++)
+					for (var i : int = 1; i < spacesCount; i++)
 						spaces[i] *= pathLength;
 				}
 				this._world.length = 8;
@@ -305,7 +305,7 @@ package spine {
 			else
 				position *= pathLength / path.lengths[curveCount - 1];
 			if (percentSpacing) {
-				for (i = 0; i < spacesCount; i++)
+				for (i = 1; i < spacesCount; i++)
 					spaces[i] *= pathLength;
 			}
 

BIN
spine-starling/spine-starling-example/lib/spine-as3.swc


BIN
spine-starling/spine-starling/lib/spine-as3.swc