浏览代码

[ts] Fixes completion event firing for 0 duration animations. See #1112.

badlogic 7 年之前
父节点
当前提交
ca15f5e64f

+ 4 - 3
spine-ts/build/spine-all.d.ts

@@ -589,9 +589,6 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
-interface Math {
-	fround(n: number): number;
-}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -1000,6 +997,7 @@ declare module spine {
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
 		static toSinglePrecision(value: number): number;
+		static webkit602BugfixHelper(alpha: number, pose: MixPose): void;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;
@@ -1054,6 +1052,9 @@ declare module spine {
 		end(): void;
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	abstract class Attachment {
 		name: string;

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


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


+ 4 - 3
spine-ts/build/spine-canvas.d.ts

@@ -589,9 +589,6 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
-interface Math {
-	fround(n: number): number;
-}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -1000,6 +997,7 @@ declare module spine {
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
 		static toSinglePrecision(value: number): number;
+		static webkit602BugfixHelper(alpha: number, pose: MixPose): void;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;
@@ -1054,6 +1052,9 @@ declare module spine {
 		end(): void;
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	abstract class Attachment {
 		name: string;

+ 152 - 144
spine-ts/build/spine-canvas.js

@@ -162,12 +162,12 @@ var spine;
 			var y = curves[i - 1];
 			return y + (1 - y) * (percent - x) / (1 - x);
 		};
+		CurveTimeline.LINEAR = 0;
+		CurveTimeline.STEPPED = 1;
+		CurveTimeline.BEZIER = 2;
+		CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;
 		return CurveTimeline;
 	}());
-	CurveTimeline.LINEAR = 0;
-	CurveTimeline.STEPPED = 1;
-	CurveTimeline.BEZIER = 2;
-	CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;
 	spine.CurveTimeline = CurveTimeline;
 	var RotateTimeline = (function (_super) {
 		__extends(RotateTimeline, _super);
@@ -226,12 +226,12 @@ var spine;
 				bone.rotation += r * alpha;
 			}
 		};
+		RotateTimeline.ENTRIES = 2;
+		RotateTimeline.PREV_TIME = -2;
+		RotateTimeline.PREV_ROTATION = -1;
+		RotateTimeline.ROTATION = 1;
 		return RotateTimeline;
 	}(CurveTimeline));
-	RotateTimeline.ENTRIES = 2;
-	RotateTimeline.PREV_TIME = -2;
-	RotateTimeline.PREV_ROTATION = -1;
-	RotateTimeline.ROTATION = 1;
 	spine.RotateTimeline = RotateTimeline;
 	var TranslateTimeline = (function (_super) {
 		__extends(TranslateTimeline, _super);
@@ -287,14 +287,14 @@ var spine;
 				bone.y += (bone.data.y + y - bone.y) * alpha;
 			}
 		};
+		TranslateTimeline.ENTRIES = 3;
+		TranslateTimeline.PREV_TIME = -3;
+		TranslateTimeline.PREV_X = -2;
+		TranslateTimeline.PREV_Y = -1;
+		TranslateTimeline.X = 1;
+		TranslateTimeline.Y = 2;
 		return TranslateTimeline;
 	}(CurveTimeline));
-	TranslateTimeline.ENTRIES = 3;
-	TranslateTimeline.PREV_TIME = -3;
-	TranslateTimeline.PREV_X = -2;
-	TranslateTimeline.PREV_Y = -1;
-	TranslateTimeline.X = 1;
-	TranslateTimeline.Y = 2;
 	spine.TranslateTimeline = TranslateTimeline;
 	var ScaleTimeline = (function (_super) {
 		__extends(ScaleTimeline, _super);
@@ -473,18 +473,18 @@ var spine;
 				color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);
 			}
 		};
+		ColorTimeline.ENTRIES = 5;
+		ColorTimeline.PREV_TIME = -5;
+		ColorTimeline.PREV_R = -4;
+		ColorTimeline.PREV_G = -3;
+		ColorTimeline.PREV_B = -2;
+		ColorTimeline.PREV_A = -1;
+		ColorTimeline.R = 1;
+		ColorTimeline.G = 2;
+		ColorTimeline.B = 3;
+		ColorTimeline.A = 4;
 		return ColorTimeline;
 	}(CurveTimeline));
-	ColorTimeline.ENTRIES = 5;
-	ColorTimeline.PREV_TIME = -5;
-	ColorTimeline.PREV_R = -4;
-	ColorTimeline.PREV_G = -3;
-	ColorTimeline.PREV_B = -2;
-	ColorTimeline.PREV_A = -1;
-	ColorTimeline.R = 1;
-	ColorTimeline.G = 2;
-	ColorTimeline.B = 3;
-	ColorTimeline.A = 4;
 	spine.ColorTimeline = ColorTimeline;
 	var TwoColorTimeline = (function (_super) {
 		__extends(TwoColorTimeline, _super);
@@ -567,24 +567,24 @@ var spine;
 				dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);
 			}
 		};
+		TwoColorTimeline.ENTRIES = 8;
+		TwoColorTimeline.PREV_TIME = -8;
+		TwoColorTimeline.PREV_R = -7;
+		TwoColorTimeline.PREV_G = -6;
+		TwoColorTimeline.PREV_B = -5;
+		TwoColorTimeline.PREV_A = -4;
+		TwoColorTimeline.PREV_R2 = -3;
+		TwoColorTimeline.PREV_G2 = -2;
+		TwoColorTimeline.PREV_B2 = -1;
+		TwoColorTimeline.R = 1;
+		TwoColorTimeline.G = 2;
+		TwoColorTimeline.B = 3;
+		TwoColorTimeline.A = 4;
+		TwoColorTimeline.R2 = 5;
+		TwoColorTimeline.G2 = 6;
+		TwoColorTimeline.B2 = 7;
 		return TwoColorTimeline;
 	}(CurveTimeline));
-	TwoColorTimeline.ENTRIES = 8;
-	TwoColorTimeline.PREV_TIME = -8;
-	TwoColorTimeline.PREV_R = -7;
-	TwoColorTimeline.PREV_G = -6;
-	TwoColorTimeline.PREV_B = -5;
-	TwoColorTimeline.PREV_A = -4;
-	TwoColorTimeline.PREV_R2 = -3;
-	TwoColorTimeline.PREV_G2 = -2;
-	TwoColorTimeline.PREV_B2 = -1;
-	TwoColorTimeline.R = 1;
-	TwoColorTimeline.G = 2;
-	TwoColorTimeline.B = 3;
-	TwoColorTimeline.A = 4;
-	TwoColorTimeline.R2 = 5;
-	TwoColorTimeline.G2 = 6;
-	TwoColorTimeline.B2 = 7;
 	spine.TwoColorTimeline = TwoColorTimeline;
 	var AttachmentTimeline = (function () {
 		function AttachmentTimeline(frameCount) {
@@ -893,14 +893,14 @@ var spine;
 					constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
 			}
 		};
+		IkConstraintTimeline.ENTRIES = 3;
+		IkConstraintTimeline.PREV_TIME = -3;
+		IkConstraintTimeline.PREV_MIX = -2;
+		IkConstraintTimeline.PREV_BEND_DIRECTION = -1;
+		IkConstraintTimeline.MIX = 1;
+		IkConstraintTimeline.BEND_DIRECTION = 2;
 		return IkConstraintTimeline;
 	}(CurveTimeline));
-	IkConstraintTimeline.ENTRIES = 3;
-	IkConstraintTimeline.PREV_TIME = -3;
-	IkConstraintTimeline.PREV_MIX = -2;
-	IkConstraintTimeline.PREV_BEND_DIRECTION = -1;
-	IkConstraintTimeline.MIX = 1;
-	IkConstraintTimeline.BEND_DIRECTION = 2;
 	spine.IkConstraintTimeline = IkConstraintTimeline;
 	var TransformConstraintTimeline = (function (_super) {
 		__extends(TransformConstraintTimeline, _super);
@@ -975,18 +975,18 @@ var spine;
 				constraint.shearMix += (shear - constraint.shearMix) * alpha;
 			}
 		};
+		TransformConstraintTimeline.ENTRIES = 5;
+		TransformConstraintTimeline.PREV_TIME = -5;
+		TransformConstraintTimeline.PREV_ROTATE = -4;
+		TransformConstraintTimeline.PREV_TRANSLATE = -3;
+		TransformConstraintTimeline.PREV_SCALE = -2;
+		TransformConstraintTimeline.PREV_SHEAR = -1;
+		TransformConstraintTimeline.ROTATE = 1;
+		TransformConstraintTimeline.TRANSLATE = 2;
+		TransformConstraintTimeline.SCALE = 3;
+		TransformConstraintTimeline.SHEAR = 4;
 		return TransformConstraintTimeline;
 	}(CurveTimeline));
-	TransformConstraintTimeline.ENTRIES = 5;
-	TransformConstraintTimeline.PREV_TIME = -5;
-	TransformConstraintTimeline.PREV_ROTATE = -4;
-	TransformConstraintTimeline.PREV_TRANSLATE = -3;
-	TransformConstraintTimeline.PREV_SCALE = -2;
-	TransformConstraintTimeline.PREV_SHEAR = -1;
-	TransformConstraintTimeline.ROTATE = 1;
-	TransformConstraintTimeline.TRANSLATE = 2;
-	TransformConstraintTimeline.SCALE = 3;
-	TransformConstraintTimeline.SHEAR = 4;
 	spine.TransformConstraintTimeline = TransformConstraintTimeline;
 	var PathConstraintPositionTimeline = (function (_super) {
 		__extends(PathConstraintPositionTimeline, _super);
@@ -1031,12 +1031,12 @@ var spine;
 			else
 				constraint.position += (position - constraint.position) * alpha;
 		};
+		PathConstraintPositionTimeline.ENTRIES = 2;
+		PathConstraintPositionTimeline.PREV_TIME = -2;
+		PathConstraintPositionTimeline.PREV_VALUE = -1;
+		PathConstraintPositionTimeline.VALUE = 1;
 		return PathConstraintPositionTimeline;
 	}(CurveTimeline));
-	PathConstraintPositionTimeline.ENTRIES = 2;
-	PathConstraintPositionTimeline.PREV_TIME = -2;
-	PathConstraintPositionTimeline.PREV_VALUE = -1;
-	PathConstraintPositionTimeline.VALUE = 1;
 	spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;
 	var PathConstraintSpacingTimeline = (function (_super) {
 		__extends(PathConstraintSpacingTimeline, _super);
@@ -1131,14 +1131,14 @@ var spine;
 				constraint.translateMix += (translate - constraint.translateMix) * alpha;
 			}
 		};
+		PathConstraintMixTimeline.ENTRIES = 3;
+		PathConstraintMixTimeline.PREV_TIME = -3;
+		PathConstraintMixTimeline.PREV_ROTATE = -2;
+		PathConstraintMixTimeline.PREV_TRANSLATE = -1;
+		PathConstraintMixTimeline.ROTATE = 1;
+		PathConstraintMixTimeline.TRANSLATE = 2;
 		return PathConstraintMixTimeline;
 	}(CurveTimeline));
-	PathConstraintMixTimeline.ENTRIES = 3;
-	PathConstraintMixTimeline.PREV_TIME = -3;
-	PathConstraintMixTimeline.PREV_ROTATE = -2;
-	PathConstraintMixTimeline.PREV_TRANSLATE = -1;
-	PathConstraintMixTimeline.ROTATE = 1;
-	PathConstraintMixTimeline.TRANSLATE = 2;
 	spine.PathConstraintMixTimeline = PathConstraintMixTimeline;
 })(spine || (spine = {}));
 var spine;
@@ -1263,8 +1263,10 @@ var spine;
 						if (timeline instanceof spine.RotateTimeline) {
 							this.applyRotateTimeline(timeline, skeleton, animationTime, mix, pose, timelinesRotation, ii << 1, firstFrame);
 						}
-						else
+						else {
+							spine.Utils.webkit602BugfixHelper(mix, pose);
 							timeline.apply(skeleton, animationLast, animationTime, events, mix, pose, spine.MixDirection["in"]);
+						}
 					}
 				}
 				this.queueEvents(current, animationTime);
@@ -1333,6 +1335,7 @@ var spine;
 				if (timeline instanceof spine.RotateTimeline)
 					this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, pose, timelinesRotation, i << 1, firstFrame);
 				else {
+					spine.Utils.webkit602BugfixHelper(alpha, pose);
 					timeline.apply(skeleton, animationLast, animationTime, events, alpha, pose, spine.MixDirection.out);
 				}
 			}
@@ -1416,10 +1419,13 @@ var spine;
 					continue;
 				this.queue.event(entry, event_1);
 			}
-			if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
-				: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
+			var complete = false;
+			if (entry.loop)
+				complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
+			else
+				complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
+			if (complete)
 				this.queue.complete(entry);
-			}
 			for (; i < n; i++) {
 				var event_2 = events[i];
 				if (event_2.time < animationStart)
@@ -1631,13 +1637,13 @@ var spine;
 		AnimationState.prototype.clearListenerNotifications = function () {
 			this.queue.clear();
 		};
+		AnimationState.emptyAnimation = new spine.Animation("<empty>", [], 0);
+		AnimationState.SUBSEQUENT = 0;
+		AnimationState.FIRST = 1;
+		AnimationState.DIP = 2;
+		AnimationState.DIP_MIX = 3;
 		return AnimationState;
 	}());
-	AnimationState.emptyAnimation = new spine.Animation("<empty>", [], 0);
-	AnimationState.SUBSEQUENT = 0;
-	AnimationState.FIRST = 1;
-	AnimationState.DIP = 2;
-	AnimationState.DIP_MIX = 3;
 	spine.AnimationState = AnimationState;
 	var TrackEntry = (function () {
 		function TrackEntry() {
@@ -3058,12 +3064,12 @@ var spine;
 		PathConstraint.prototype.getOrder = function () {
 			return this.data.order;
 		};
+		PathConstraint.NONE = -1;
+		PathConstraint.BEFORE = -2;
+		PathConstraint.AFTER = -3;
+		PathConstraint.epsilon = 0.00001;
 		return PathConstraint;
 	}());
-	PathConstraint.NONE = -1;
-	PathConstraint.BEFORE = -2;
-	PathConstraint.AFTER = -3;
-	PathConstraint.epsilon = 0.00001;
 	spine.PathConstraint = PathConstraint;
 })(spine || (spine = {}));
 var spine;
@@ -3095,15 +3101,6 @@ var spine;
 		RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale";
 	})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));
 })(spine || (spine = {}));
-(function () {
-	if (!Math.fround) {
-		Math.fround = (function (array) {
-			return function (x) {
-				return array[0] = x, array[0];
-			};
-		})(new Float32Array(1));
-	}
-})();
 var spine;
 (function (spine) {
 	var Assets = (function () {
@@ -5874,13 +5871,13 @@ var spine;
 				this.a = 1;
 			return this;
 		};
+		Color.WHITE = new Color(1, 1, 1, 1);
+		Color.RED = new Color(1, 0, 0, 1);
+		Color.GREEN = new Color(0, 1, 0, 1);
+		Color.BLUE = new Color(0, 0, 1, 1);
+		Color.MAGENTA = new Color(1, 0, 1, 1);
 		return Color;
 	}());
-	Color.WHITE = new Color(1, 1, 1, 1);
-	Color.RED = new Color(1, 0, 0, 1);
-	Color.GREEN = new Color(0, 1, 0, 1);
-	Color.BLUE = new Color(0, 0, 1, 1);
-	Color.MAGENTA = new Color(1, 0, 1, 1);
 	spine.Color = Color;
 	var MathUtils = (function () {
 		function MathUtils() {
@@ -5918,14 +5915,14 @@ var spine;
 				return min + Math.sqrt(u * d * (mode - min));
 			return max - Math.sqrt((1 - u) * d * (max - mode));
 		};
+		MathUtils.PI = 3.1415927;
+		MathUtils.PI2 = MathUtils.PI * 2;
+		MathUtils.radiansToDegrees = 180 / MathUtils.PI;
+		MathUtils.radDeg = MathUtils.radiansToDegrees;
+		MathUtils.degreesToRadians = MathUtils.PI / 180;
+		MathUtils.degRad = MathUtils.degreesToRadians;
 		return MathUtils;
 	}());
-	MathUtils.PI = 3.1415927;
-	MathUtils.PI2 = MathUtils.PI * 2;
-	MathUtils.radiansToDegrees = 180 / MathUtils.PI;
-	MathUtils.radDeg = MathUtils.radiansToDegrees;
-	MathUtils.degreesToRadians = MathUtils.PI / 180;
-	MathUtils.degRad = MathUtils.degreesToRadians;
 	spine.MathUtils = MathUtils;
 	var Interpolation = (function () {
 		function Interpolation() {
@@ -6023,9 +6020,11 @@ var spine;
 		Utils.toSinglePrecision = function (value) {
 			return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;
 		};
+		Utils.webkit602BugfixHelper = function (alpha, pose) {
+		};
+		Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";
 		return Utils;
 	}());
-	Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";
 	spine.Utils = Utils;
 	var DebugUtils = (function () {
 		function DebugUtils() {
@@ -6161,6 +6160,15 @@ var spine;
 	}());
 	spine.WindowedMean = WindowedMean;
 })(spine || (spine = {}));
+(function () {
+	if (!Math.fround) {
+		Math.fround = (function (array) {
+			return function (x) {
+				return array[0] = x, array[0];
+			};
+		})(new Float32Array(1));
+	}
+})();
 var spine;
 (function (spine) {
 	var Attachment = (function () {
@@ -6242,9 +6250,9 @@ var spine;
 		VertexAttachment.prototype.applyDeform = function (sourceAttachment) {
 			return this == sourceAttachment;
 		};
+		VertexAttachment.nextID = 0;
 		return VertexAttachment;
 	}(Attachment));
-	VertexAttachment.nextID = 0;
 	spine.VertexAttachment = VertexAttachment;
 })(spine || (spine = {}));
 var spine;
@@ -6482,48 +6490,48 @@ var spine;
 			worldVertices[offset] = offsetX * a + offsetY * b + x;
 			worldVertices[offset + 1] = offsetX * c + offsetY * d + y;
 		};
+		RegionAttachment.OX1 = 0;
+		RegionAttachment.OY1 = 1;
+		RegionAttachment.OX2 = 2;
+		RegionAttachment.OY2 = 3;
+		RegionAttachment.OX3 = 4;
+		RegionAttachment.OY3 = 5;
+		RegionAttachment.OX4 = 6;
+		RegionAttachment.OY4 = 7;
+		RegionAttachment.X1 = 0;
+		RegionAttachment.Y1 = 1;
+		RegionAttachment.C1R = 2;
+		RegionAttachment.C1G = 3;
+		RegionAttachment.C1B = 4;
+		RegionAttachment.C1A = 5;
+		RegionAttachment.U1 = 6;
+		RegionAttachment.V1 = 7;
+		RegionAttachment.X2 = 8;
+		RegionAttachment.Y2 = 9;
+		RegionAttachment.C2R = 10;
+		RegionAttachment.C2G = 11;
+		RegionAttachment.C2B = 12;
+		RegionAttachment.C2A = 13;
+		RegionAttachment.U2 = 14;
+		RegionAttachment.V2 = 15;
+		RegionAttachment.X3 = 16;
+		RegionAttachment.Y3 = 17;
+		RegionAttachment.C3R = 18;
+		RegionAttachment.C3G = 19;
+		RegionAttachment.C3B = 20;
+		RegionAttachment.C3A = 21;
+		RegionAttachment.U3 = 22;
+		RegionAttachment.V3 = 23;
+		RegionAttachment.X4 = 24;
+		RegionAttachment.Y4 = 25;
+		RegionAttachment.C4R = 26;
+		RegionAttachment.C4G = 27;
+		RegionAttachment.C4B = 28;
+		RegionAttachment.C4A = 29;
+		RegionAttachment.U4 = 30;
+		RegionAttachment.V4 = 31;
 		return RegionAttachment;
 	}(spine.Attachment));
-	RegionAttachment.OX1 = 0;
-	RegionAttachment.OY1 = 1;
-	RegionAttachment.OX2 = 2;
-	RegionAttachment.OY2 = 3;
-	RegionAttachment.OX3 = 4;
-	RegionAttachment.OY3 = 5;
-	RegionAttachment.OX4 = 6;
-	RegionAttachment.OY4 = 7;
-	RegionAttachment.X1 = 0;
-	RegionAttachment.Y1 = 1;
-	RegionAttachment.C1R = 2;
-	RegionAttachment.C1G = 3;
-	RegionAttachment.C1B = 4;
-	RegionAttachment.C1A = 5;
-	RegionAttachment.U1 = 6;
-	RegionAttachment.V1 = 7;
-	RegionAttachment.X2 = 8;
-	RegionAttachment.Y2 = 9;
-	RegionAttachment.C2R = 10;
-	RegionAttachment.C2G = 11;
-	RegionAttachment.C2B = 12;
-	RegionAttachment.C2A = 13;
-	RegionAttachment.U2 = 14;
-	RegionAttachment.V2 = 15;
-	RegionAttachment.X3 = 16;
-	RegionAttachment.Y3 = 17;
-	RegionAttachment.C3R = 18;
-	RegionAttachment.C3G = 19;
-	RegionAttachment.C3B = 20;
-	RegionAttachment.C3A = 21;
-	RegionAttachment.U3 = 22;
-	RegionAttachment.V3 = 23;
-	RegionAttachment.X4 = 24;
-	RegionAttachment.Y4 = 25;
-	RegionAttachment.C4R = 26;
-	RegionAttachment.C4G = 27;
-	RegionAttachment.C4B = 28;
-	RegionAttachment.C4A = 29;
-	RegionAttachment.U4 = 30;
-	RegionAttachment.V4 = 31;
 	spine.RegionAttachment = RegionAttachment;
 })(spine || (spine = {}));
 var spine;
@@ -6578,9 +6586,9 @@ var spine;
 		};
 		SwirlEffect.prototype.end = function () {
 		};
+		SwirlEffect.interpolation = new spine.PowOut(2);
 		return SwirlEffect;
 	}());
-	SwirlEffect.interpolation = new spine.PowOut(2);
 	spine.SwirlEffect = SwirlEffect;
 })(spine || (spine = {}));
 var spine;
@@ -6831,10 +6839,10 @@ var spine;
 				}
 				return vertices;
 			};
+			SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
+			SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;
 			return SkeletonRenderer;
 		}());
-		SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
-		SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;
 		canvas.SkeletonRenderer = SkeletonRenderer;
 	})(canvas = spine.canvas || (spine.canvas = {}));
 })(spine || (spine = {}));

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


+ 4 - 3
spine-ts/build/spine-core.d.ts

@@ -589,9 +589,6 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
-interface Math {
-	fround(n: number): number;
-}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -1000,6 +997,7 @@ declare module spine {
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
 		static toSinglePrecision(value: number): number;
+		static webkit602BugfixHelper(alpha: number, pose: MixPose): void;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;
@@ -1054,6 +1052,9 @@ declare module spine {
 		end(): void;
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	abstract class Attachment {
 		name: string;

+ 150 - 142
spine-ts/build/spine-core.js

@@ -162,12 +162,12 @@ var spine;
 			var y = curves[i - 1];
 			return y + (1 - y) * (percent - x) / (1 - x);
 		};
+		CurveTimeline.LINEAR = 0;
+		CurveTimeline.STEPPED = 1;
+		CurveTimeline.BEZIER = 2;
+		CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;
 		return CurveTimeline;
 	}());
-	CurveTimeline.LINEAR = 0;
-	CurveTimeline.STEPPED = 1;
-	CurveTimeline.BEZIER = 2;
-	CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;
 	spine.CurveTimeline = CurveTimeline;
 	var RotateTimeline = (function (_super) {
 		__extends(RotateTimeline, _super);
@@ -226,12 +226,12 @@ var spine;
 				bone.rotation += r * alpha;
 			}
 		};
+		RotateTimeline.ENTRIES = 2;
+		RotateTimeline.PREV_TIME = -2;
+		RotateTimeline.PREV_ROTATION = -1;
+		RotateTimeline.ROTATION = 1;
 		return RotateTimeline;
 	}(CurveTimeline));
-	RotateTimeline.ENTRIES = 2;
-	RotateTimeline.PREV_TIME = -2;
-	RotateTimeline.PREV_ROTATION = -1;
-	RotateTimeline.ROTATION = 1;
 	spine.RotateTimeline = RotateTimeline;
 	var TranslateTimeline = (function (_super) {
 		__extends(TranslateTimeline, _super);
@@ -287,14 +287,14 @@ var spine;
 				bone.y += (bone.data.y + y - bone.y) * alpha;
 			}
 		};
+		TranslateTimeline.ENTRIES = 3;
+		TranslateTimeline.PREV_TIME = -3;
+		TranslateTimeline.PREV_X = -2;
+		TranslateTimeline.PREV_Y = -1;
+		TranslateTimeline.X = 1;
+		TranslateTimeline.Y = 2;
 		return TranslateTimeline;
 	}(CurveTimeline));
-	TranslateTimeline.ENTRIES = 3;
-	TranslateTimeline.PREV_TIME = -3;
-	TranslateTimeline.PREV_X = -2;
-	TranslateTimeline.PREV_Y = -1;
-	TranslateTimeline.X = 1;
-	TranslateTimeline.Y = 2;
 	spine.TranslateTimeline = TranslateTimeline;
 	var ScaleTimeline = (function (_super) {
 		__extends(ScaleTimeline, _super);
@@ -473,18 +473,18 @@ var spine;
 				color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);
 			}
 		};
+		ColorTimeline.ENTRIES = 5;
+		ColorTimeline.PREV_TIME = -5;
+		ColorTimeline.PREV_R = -4;
+		ColorTimeline.PREV_G = -3;
+		ColorTimeline.PREV_B = -2;
+		ColorTimeline.PREV_A = -1;
+		ColorTimeline.R = 1;
+		ColorTimeline.G = 2;
+		ColorTimeline.B = 3;
+		ColorTimeline.A = 4;
 		return ColorTimeline;
 	}(CurveTimeline));
-	ColorTimeline.ENTRIES = 5;
-	ColorTimeline.PREV_TIME = -5;
-	ColorTimeline.PREV_R = -4;
-	ColorTimeline.PREV_G = -3;
-	ColorTimeline.PREV_B = -2;
-	ColorTimeline.PREV_A = -1;
-	ColorTimeline.R = 1;
-	ColorTimeline.G = 2;
-	ColorTimeline.B = 3;
-	ColorTimeline.A = 4;
 	spine.ColorTimeline = ColorTimeline;
 	var TwoColorTimeline = (function (_super) {
 		__extends(TwoColorTimeline, _super);
@@ -567,24 +567,24 @@ var spine;
 				dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);
 			}
 		};
+		TwoColorTimeline.ENTRIES = 8;
+		TwoColorTimeline.PREV_TIME = -8;
+		TwoColorTimeline.PREV_R = -7;
+		TwoColorTimeline.PREV_G = -6;
+		TwoColorTimeline.PREV_B = -5;
+		TwoColorTimeline.PREV_A = -4;
+		TwoColorTimeline.PREV_R2 = -3;
+		TwoColorTimeline.PREV_G2 = -2;
+		TwoColorTimeline.PREV_B2 = -1;
+		TwoColorTimeline.R = 1;
+		TwoColorTimeline.G = 2;
+		TwoColorTimeline.B = 3;
+		TwoColorTimeline.A = 4;
+		TwoColorTimeline.R2 = 5;
+		TwoColorTimeline.G2 = 6;
+		TwoColorTimeline.B2 = 7;
 		return TwoColorTimeline;
 	}(CurveTimeline));
-	TwoColorTimeline.ENTRIES = 8;
-	TwoColorTimeline.PREV_TIME = -8;
-	TwoColorTimeline.PREV_R = -7;
-	TwoColorTimeline.PREV_G = -6;
-	TwoColorTimeline.PREV_B = -5;
-	TwoColorTimeline.PREV_A = -4;
-	TwoColorTimeline.PREV_R2 = -3;
-	TwoColorTimeline.PREV_G2 = -2;
-	TwoColorTimeline.PREV_B2 = -1;
-	TwoColorTimeline.R = 1;
-	TwoColorTimeline.G = 2;
-	TwoColorTimeline.B = 3;
-	TwoColorTimeline.A = 4;
-	TwoColorTimeline.R2 = 5;
-	TwoColorTimeline.G2 = 6;
-	TwoColorTimeline.B2 = 7;
 	spine.TwoColorTimeline = TwoColorTimeline;
 	var AttachmentTimeline = (function () {
 		function AttachmentTimeline(frameCount) {
@@ -893,14 +893,14 @@ var spine;
 					constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
 			}
 		};
+		IkConstraintTimeline.ENTRIES = 3;
+		IkConstraintTimeline.PREV_TIME = -3;
+		IkConstraintTimeline.PREV_MIX = -2;
+		IkConstraintTimeline.PREV_BEND_DIRECTION = -1;
+		IkConstraintTimeline.MIX = 1;
+		IkConstraintTimeline.BEND_DIRECTION = 2;
 		return IkConstraintTimeline;
 	}(CurveTimeline));
-	IkConstraintTimeline.ENTRIES = 3;
-	IkConstraintTimeline.PREV_TIME = -3;
-	IkConstraintTimeline.PREV_MIX = -2;
-	IkConstraintTimeline.PREV_BEND_DIRECTION = -1;
-	IkConstraintTimeline.MIX = 1;
-	IkConstraintTimeline.BEND_DIRECTION = 2;
 	spine.IkConstraintTimeline = IkConstraintTimeline;
 	var TransformConstraintTimeline = (function (_super) {
 		__extends(TransformConstraintTimeline, _super);
@@ -975,18 +975,18 @@ var spine;
 				constraint.shearMix += (shear - constraint.shearMix) * alpha;
 			}
 		};
+		TransformConstraintTimeline.ENTRIES = 5;
+		TransformConstraintTimeline.PREV_TIME = -5;
+		TransformConstraintTimeline.PREV_ROTATE = -4;
+		TransformConstraintTimeline.PREV_TRANSLATE = -3;
+		TransformConstraintTimeline.PREV_SCALE = -2;
+		TransformConstraintTimeline.PREV_SHEAR = -1;
+		TransformConstraintTimeline.ROTATE = 1;
+		TransformConstraintTimeline.TRANSLATE = 2;
+		TransformConstraintTimeline.SCALE = 3;
+		TransformConstraintTimeline.SHEAR = 4;
 		return TransformConstraintTimeline;
 	}(CurveTimeline));
-	TransformConstraintTimeline.ENTRIES = 5;
-	TransformConstraintTimeline.PREV_TIME = -5;
-	TransformConstraintTimeline.PREV_ROTATE = -4;
-	TransformConstraintTimeline.PREV_TRANSLATE = -3;
-	TransformConstraintTimeline.PREV_SCALE = -2;
-	TransformConstraintTimeline.PREV_SHEAR = -1;
-	TransformConstraintTimeline.ROTATE = 1;
-	TransformConstraintTimeline.TRANSLATE = 2;
-	TransformConstraintTimeline.SCALE = 3;
-	TransformConstraintTimeline.SHEAR = 4;
 	spine.TransformConstraintTimeline = TransformConstraintTimeline;
 	var PathConstraintPositionTimeline = (function (_super) {
 		__extends(PathConstraintPositionTimeline, _super);
@@ -1031,12 +1031,12 @@ var spine;
 			else
 				constraint.position += (position - constraint.position) * alpha;
 		};
+		PathConstraintPositionTimeline.ENTRIES = 2;
+		PathConstraintPositionTimeline.PREV_TIME = -2;
+		PathConstraintPositionTimeline.PREV_VALUE = -1;
+		PathConstraintPositionTimeline.VALUE = 1;
 		return PathConstraintPositionTimeline;
 	}(CurveTimeline));
-	PathConstraintPositionTimeline.ENTRIES = 2;
-	PathConstraintPositionTimeline.PREV_TIME = -2;
-	PathConstraintPositionTimeline.PREV_VALUE = -1;
-	PathConstraintPositionTimeline.VALUE = 1;
 	spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;
 	var PathConstraintSpacingTimeline = (function (_super) {
 		__extends(PathConstraintSpacingTimeline, _super);
@@ -1131,14 +1131,14 @@ var spine;
 				constraint.translateMix += (translate - constraint.translateMix) * alpha;
 			}
 		};
+		PathConstraintMixTimeline.ENTRIES = 3;
+		PathConstraintMixTimeline.PREV_TIME = -3;
+		PathConstraintMixTimeline.PREV_ROTATE = -2;
+		PathConstraintMixTimeline.PREV_TRANSLATE = -1;
+		PathConstraintMixTimeline.ROTATE = 1;
+		PathConstraintMixTimeline.TRANSLATE = 2;
 		return PathConstraintMixTimeline;
 	}(CurveTimeline));
-	PathConstraintMixTimeline.ENTRIES = 3;
-	PathConstraintMixTimeline.PREV_TIME = -3;
-	PathConstraintMixTimeline.PREV_ROTATE = -2;
-	PathConstraintMixTimeline.PREV_TRANSLATE = -1;
-	PathConstraintMixTimeline.ROTATE = 1;
-	PathConstraintMixTimeline.TRANSLATE = 2;
 	spine.PathConstraintMixTimeline = PathConstraintMixTimeline;
 })(spine || (spine = {}));
 var spine;
@@ -1263,8 +1263,10 @@ var spine;
 						if (timeline instanceof spine.RotateTimeline) {
 							this.applyRotateTimeline(timeline, skeleton, animationTime, mix, pose, timelinesRotation, ii << 1, firstFrame);
 						}
-						else
+						else {
+							spine.Utils.webkit602BugfixHelper(mix, pose);
 							timeline.apply(skeleton, animationLast, animationTime, events, mix, pose, spine.MixDirection["in"]);
+						}
 					}
 				}
 				this.queueEvents(current, animationTime);
@@ -1333,6 +1335,7 @@ var spine;
 				if (timeline instanceof spine.RotateTimeline)
 					this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, pose, timelinesRotation, i << 1, firstFrame);
 				else {
+					spine.Utils.webkit602BugfixHelper(alpha, pose);
 					timeline.apply(skeleton, animationLast, animationTime, events, alpha, pose, spine.MixDirection.out);
 				}
 			}
@@ -1416,10 +1419,13 @@ var spine;
 					continue;
 				this.queue.event(entry, event_1);
 			}
-			if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
-				: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
+			var complete = false;
+			if (entry.loop)
+				complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
+			else
+				complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
+			if (complete)
 				this.queue.complete(entry);
-			}
 			for (; i < n; i++) {
 				var event_2 = events[i];
 				if (event_2.time < animationStart)
@@ -1631,13 +1637,13 @@ var spine;
 		AnimationState.prototype.clearListenerNotifications = function () {
 			this.queue.clear();
 		};
+		AnimationState.emptyAnimation = new spine.Animation("<empty>", [], 0);
+		AnimationState.SUBSEQUENT = 0;
+		AnimationState.FIRST = 1;
+		AnimationState.DIP = 2;
+		AnimationState.DIP_MIX = 3;
 		return AnimationState;
 	}());
-	AnimationState.emptyAnimation = new spine.Animation("<empty>", [], 0);
-	AnimationState.SUBSEQUENT = 0;
-	AnimationState.FIRST = 1;
-	AnimationState.DIP = 2;
-	AnimationState.DIP_MIX = 3;
 	spine.AnimationState = AnimationState;
 	var TrackEntry = (function () {
 		function TrackEntry() {
@@ -3058,12 +3064,12 @@ var spine;
 		PathConstraint.prototype.getOrder = function () {
 			return this.data.order;
 		};
+		PathConstraint.NONE = -1;
+		PathConstraint.BEFORE = -2;
+		PathConstraint.AFTER = -3;
+		PathConstraint.epsilon = 0.00001;
 		return PathConstraint;
 	}());
-	PathConstraint.NONE = -1;
-	PathConstraint.BEFORE = -2;
-	PathConstraint.AFTER = -3;
-	PathConstraint.epsilon = 0.00001;
 	spine.PathConstraint = PathConstraint;
 })(spine || (spine = {}));
 var spine;
@@ -3095,15 +3101,6 @@ var spine;
 		RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale";
 	})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));
 })(spine || (spine = {}));
-(function () {
-	if (!Math.fround) {
-		Math.fround = (function (array) {
-			return function (x) {
-				return array[0] = x, array[0];
-			};
-		})(new Float32Array(1));
-	}
-})();
 var spine;
 (function (spine) {
 	var Assets = (function () {
@@ -5874,13 +5871,13 @@ var spine;
 				this.a = 1;
 			return this;
 		};
+		Color.WHITE = new Color(1, 1, 1, 1);
+		Color.RED = new Color(1, 0, 0, 1);
+		Color.GREEN = new Color(0, 1, 0, 1);
+		Color.BLUE = new Color(0, 0, 1, 1);
+		Color.MAGENTA = new Color(1, 0, 1, 1);
 		return Color;
 	}());
-	Color.WHITE = new Color(1, 1, 1, 1);
-	Color.RED = new Color(1, 0, 0, 1);
-	Color.GREEN = new Color(0, 1, 0, 1);
-	Color.BLUE = new Color(0, 0, 1, 1);
-	Color.MAGENTA = new Color(1, 0, 1, 1);
 	spine.Color = Color;
 	var MathUtils = (function () {
 		function MathUtils() {
@@ -5918,14 +5915,14 @@ var spine;
 				return min + Math.sqrt(u * d * (mode - min));
 			return max - Math.sqrt((1 - u) * d * (max - mode));
 		};
+		MathUtils.PI = 3.1415927;
+		MathUtils.PI2 = MathUtils.PI * 2;
+		MathUtils.radiansToDegrees = 180 / MathUtils.PI;
+		MathUtils.radDeg = MathUtils.radiansToDegrees;
+		MathUtils.degreesToRadians = MathUtils.PI / 180;
+		MathUtils.degRad = MathUtils.degreesToRadians;
 		return MathUtils;
 	}());
-	MathUtils.PI = 3.1415927;
-	MathUtils.PI2 = MathUtils.PI * 2;
-	MathUtils.radiansToDegrees = 180 / MathUtils.PI;
-	MathUtils.radDeg = MathUtils.radiansToDegrees;
-	MathUtils.degreesToRadians = MathUtils.PI / 180;
-	MathUtils.degRad = MathUtils.degreesToRadians;
 	spine.MathUtils = MathUtils;
 	var Interpolation = (function () {
 		function Interpolation() {
@@ -6023,9 +6020,11 @@ var spine;
 		Utils.toSinglePrecision = function (value) {
 			return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;
 		};
+		Utils.webkit602BugfixHelper = function (alpha, pose) {
+		};
+		Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";
 		return Utils;
 	}());
-	Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";
 	spine.Utils = Utils;
 	var DebugUtils = (function () {
 		function DebugUtils() {
@@ -6161,6 +6160,15 @@ var spine;
 	}());
 	spine.WindowedMean = WindowedMean;
 })(spine || (spine = {}));
+(function () {
+	if (!Math.fround) {
+		Math.fround = (function (array) {
+			return function (x) {
+				return array[0] = x, array[0];
+			};
+		})(new Float32Array(1));
+	}
+})();
 var spine;
 (function (spine) {
 	var Attachment = (function () {
@@ -6242,9 +6250,9 @@ var spine;
 		VertexAttachment.prototype.applyDeform = function (sourceAttachment) {
 			return this == sourceAttachment;
 		};
+		VertexAttachment.nextID = 0;
 		return VertexAttachment;
 	}(Attachment));
-	VertexAttachment.nextID = 0;
 	spine.VertexAttachment = VertexAttachment;
 })(spine || (spine = {}));
 var spine;
@@ -6482,48 +6490,48 @@ var spine;
 			worldVertices[offset] = offsetX * a + offsetY * b + x;
 			worldVertices[offset + 1] = offsetX * c + offsetY * d + y;
 		};
+		RegionAttachment.OX1 = 0;
+		RegionAttachment.OY1 = 1;
+		RegionAttachment.OX2 = 2;
+		RegionAttachment.OY2 = 3;
+		RegionAttachment.OX3 = 4;
+		RegionAttachment.OY3 = 5;
+		RegionAttachment.OX4 = 6;
+		RegionAttachment.OY4 = 7;
+		RegionAttachment.X1 = 0;
+		RegionAttachment.Y1 = 1;
+		RegionAttachment.C1R = 2;
+		RegionAttachment.C1G = 3;
+		RegionAttachment.C1B = 4;
+		RegionAttachment.C1A = 5;
+		RegionAttachment.U1 = 6;
+		RegionAttachment.V1 = 7;
+		RegionAttachment.X2 = 8;
+		RegionAttachment.Y2 = 9;
+		RegionAttachment.C2R = 10;
+		RegionAttachment.C2G = 11;
+		RegionAttachment.C2B = 12;
+		RegionAttachment.C2A = 13;
+		RegionAttachment.U2 = 14;
+		RegionAttachment.V2 = 15;
+		RegionAttachment.X3 = 16;
+		RegionAttachment.Y3 = 17;
+		RegionAttachment.C3R = 18;
+		RegionAttachment.C3G = 19;
+		RegionAttachment.C3B = 20;
+		RegionAttachment.C3A = 21;
+		RegionAttachment.U3 = 22;
+		RegionAttachment.V3 = 23;
+		RegionAttachment.X4 = 24;
+		RegionAttachment.Y4 = 25;
+		RegionAttachment.C4R = 26;
+		RegionAttachment.C4G = 27;
+		RegionAttachment.C4B = 28;
+		RegionAttachment.C4A = 29;
+		RegionAttachment.U4 = 30;
+		RegionAttachment.V4 = 31;
 		return RegionAttachment;
 	}(spine.Attachment));
-	RegionAttachment.OX1 = 0;
-	RegionAttachment.OY1 = 1;
-	RegionAttachment.OX2 = 2;
-	RegionAttachment.OY2 = 3;
-	RegionAttachment.OX3 = 4;
-	RegionAttachment.OY3 = 5;
-	RegionAttachment.OX4 = 6;
-	RegionAttachment.OY4 = 7;
-	RegionAttachment.X1 = 0;
-	RegionAttachment.Y1 = 1;
-	RegionAttachment.C1R = 2;
-	RegionAttachment.C1G = 3;
-	RegionAttachment.C1B = 4;
-	RegionAttachment.C1A = 5;
-	RegionAttachment.U1 = 6;
-	RegionAttachment.V1 = 7;
-	RegionAttachment.X2 = 8;
-	RegionAttachment.Y2 = 9;
-	RegionAttachment.C2R = 10;
-	RegionAttachment.C2G = 11;
-	RegionAttachment.C2B = 12;
-	RegionAttachment.C2A = 13;
-	RegionAttachment.U2 = 14;
-	RegionAttachment.V2 = 15;
-	RegionAttachment.X3 = 16;
-	RegionAttachment.Y3 = 17;
-	RegionAttachment.C3R = 18;
-	RegionAttachment.C3G = 19;
-	RegionAttachment.C3B = 20;
-	RegionAttachment.C3A = 21;
-	RegionAttachment.U3 = 22;
-	RegionAttachment.V3 = 23;
-	RegionAttachment.X4 = 24;
-	RegionAttachment.Y4 = 25;
-	RegionAttachment.C4R = 26;
-	RegionAttachment.C4G = 27;
-	RegionAttachment.C4B = 28;
-	RegionAttachment.C4A = 29;
-	RegionAttachment.U4 = 30;
-	RegionAttachment.V4 = 31;
 	spine.RegionAttachment = RegionAttachment;
 })(spine || (spine = {}));
 var spine;
@@ -6578,9 +6586,9 @@ var spine;
 		};
 		SwirlEffect.prototype.end = function () {
 		};
+		SwirlEffect.interpolation = new spine.PowOut(2);
 		return SwirlEffect;
 	}());
-	SwirlEffect.interpolation = new spine.PowOut(2);
 	spine.SwirlEffect = SwirlEffect;
 })(spine || (spine = {}));
 //# sourceMappingURL=spine-core.js.map

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


+ 4 - 3
spine-ts/build/spine-threejs.d.ts

@@ -589,9 +589,6 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
-interface Math {
-	fround(n: number): number;
-}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -1000,6 +997,7 @@ declare module spine {
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
 		static toSinglePrecision(value: number): number;
+		static webkit602BugfixHelper(alpha: number, pose: MixPose): void;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;
@@ -1054,6 +1052,9 @@ declare module spine {
 		end(): void;
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	abstract class Attachment {
 		name: string;

+ 153 - 145
spine-ts/build/spine-threejs.js

@@ -162,12 +162,12 @@ var spine;
 			var y = curves[i - 1];
 			return y + (1 - y) * (percent - x) / (1 - x);
 		};
+		CurveTimeline.LINEAR = 0;
+		CurveTimeline.STEPPED = 1;
+		CurveTimeline.BEZIER = 2;
+		CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;
 		return CurveTimeline;
 	}());
-	CurveTimeline.LINEAR = 0;
-	CurveTimeline.STEPPED = 1;
-	CurveTimeline.BEZIER = 2;
-	CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;
 	spine.CurveTimeline = CurveTimeline;
 	var RotateTimeline = (function (_super) {
 		__extends(RotateTimeline, _super);
@@ -226,12 +226,12 @@ var spine;
 				bone.rotation += r * alpha;
 			}
 		};
+		RotateTimeline.ENTRIES = 2;
+		RotateTimeline.PREV_TIME = -2;
+		RotateTimeline.PREV_ROTATION = -1;
+		RotateTimeline.ROTATION = 1;
 		return RotateTimeline;
 	}(CurveTimeline));
-	RotateTimeline.ENTRIES = 2;
-	RotateTimeline.PREV_TIME = -2;
-	RotateTimeline.PREV_ROTATION = -1;
-	RotateTimeline.ROTATION = 1;
 	spine.RotateTimeline = RotateTimeline;
 	var TranslateTimeline = (function (_super) {
 		__extends(TranslateTimeline, _super);
@@ -287,14 +287,14 @@ var spine;
 				bone.y += (bone.data.y + y - bone.y) * alpha;
 			}
 		};
+		TranslateTimeline.ENTRIES = 3;
+		TranslateTimeline.PREV_TIME = -3;
+		TranslateTimeline.PREV_X = -2;
+		TranslateTimeline.PREV_Y = -1;
+		TranslateTimeline.X = 1;
+		TranslateTimeline.Y = 2;
 		return TranslateTimeline;
 	}(CurveTimeline));
-	TranslateTimeline.ENTRIES = 3;
-	TranslateTimeline.PREV_TIME = -3;
-	TranslateTimeline.PREV_X = -2;
-	TranslateTimeline.PREV_Y = -1;
-	TranslateTimeline.X = 1;
-	TranslateTimeline.Y = 2;
 	spine.TranslateTimeline = TranslateTimeline;
 	var ScaleTimeline = (function (_super) {
 		__extends(ScaleTimeline, _super);
@@ -473,18 +473,18 @@ var spine;
 				color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);
 			}
 		};
+		ColorTimeline.ENTRIES = 5;
+		ColorTimeline.PREV_TIME = -5;
+		ColorTimeline.PREV_R = -4;
+		ColorTimeline.PREV_G = -3;
+		ColorTimeline.PREV_B = -2;
+		ColorTimeline.PREV_A = -1;
+		ColorTimeline.R = 1;
+		ColorTimeline.G = 2;
+		ColorTimeline.B = 3;
+		ColorTimeline.A = 4;
 		return ColorTimeline;
 	}(CurveTimeline));
-	ColorTimeline.ENTRIES = 5;
-	ColorTimeline.PREV_TIME = -5;
-	ColorTimeline.PREV_R = -4;
-	ColorTimeline.PREV_G = -3;
-	ColorTimeline.PREV_B = -2;
-	ColorTimeline.PREV_A = -1;
-	ColorTimeline.R = 1;
-	ColorTimeline.G = 2;
-	ColorTimeline.B = 3;
-	ColorTimeline.A = 4;
 	spine.ColorTimeline = ColorTimeline;
 	var TwoColorTimeline = (function (_super) {
 		__extends(TwoColorTimeline, _super);
@@ -567,24 +567,24 @@ var spine;
 				dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);
 			}
 		};
+		TwoColorTimeline.ENTRIES = 8;
+		TwoColorTimeline.PREV_TIME = -8;
+		TwoColorTimeline.PREV_R = -7;
+		TwoColorTimeline.PREV_G = -6;
+		TwoColorTimeline.PREV_B = -5;
+		TwoColorTimeline.PREV_A = -4;
+		TwoColorTimeline.PREV_R2 = -3;
+		TwoColorTimeline.PREV_G2 = -2;
+		TwoColorTimeline.PREV_B2 = -1;
+		TwoColorTimeline.R = 1;
+		TwoColorTimeline.G = 2;
+		TwoColorTimeline.B = 3;
+		TwoColorTimeline.A = 4;
+		TwoColorTimeline.R2 = 5;
+		TwoColorTimeline.G2 = 6;
+		TwoColorTimeline.B2 = 7;
 		return TwoColorTimeline;
 	}(CurveTimeline));
-	TwoColorTimeline.ENTRIES = 8;
-	TwoColorTimeline.PREV_TIME = -8;
-	TwoColorTimeline.PREV_R = -7;
-	TwoColorTimeline.PREV_G = -6;
-	TwoColorTimeline.PREV_B = -5;
-	TwoColorTimeline.PREV_A = -4;
-	TwoColorTimeline.PREV_R2 = -3;
-	TwoColorTimeline.PREV_G2 = -2;
-	TwoColorTimeline.PREV_B2 = -1;
-	TwoColorTimeline.R = 1;
-	TwoColorTimeline.G = 2;
-	TwoColorTimeline.B = 3;
-	TwoColorTimeline.A = 4;
-	TwoColorTimeline.R2 = 5;
-	TwoColorTimeline.G2 = 6;
-	TwoColorTimeline.B2 = 7;
 	spine.TwoColorTimeline = TwoColorTimeline;
 	var AttachmentTimeline = (function () {
 		function AttachmentTimeline(frameCount) {
@@ -893,14 +893,14 @@ var spine;
 					constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
 			}
 		};
+		IkConstraintTimeline.ENTRIES = 3;
+		IkConstraintTimeline.PREV_TIME = -3;
+		IkConstraintTimeline.PREV_MIX = -2;
+		IkConstraintTimeline.PREV_BEND_DIRECTION = -1;
+		IkConstraintTimeline.MIX = 1;
+		IkConstraintTimeline.BEND_DIRECTION = 2;
 		return IkConstraintTimeline;
 	}(CurveTimeline));
-	IkConstraintTimeline.ENTRIES = 3;
-	IkConstraintTimeline.PREV_TIME = -3;
-	IkConstraintTimeline.PREV_MIX = -2;
-	IkConstraintTimeline.PREV_BEND_DIRECTION = -1;
-	IkConstraintTimeline.MIX = 1;
-	IkConstraintTimeline.BEND_DIRECTION = 2;
 	spine.IkConstraintTimeline = IkConstraintTimeline;
 	var TransformConstraintTimeline = (function (_super) {
 		__extends(TransformConstraintTimeline, _super);
@@ -975,18 +975,18 @@ var spine;
 				constraint.shearMix += (shear - constraint.shearMix) * alpha;
 			}
 		};
+		TransformConstraintTimeline.ENTRIES = 5;
+		TransformConstraintTimeline.PREV_TIME = -5;
+		TransformConstraintTimeline.PREV_ROTATE = -4;
+		TransformConstraintTimeline.PREV_TRANSLATE = -3;
+		TransformConstraintTimeline.PREV_SCALE = -2;
+		TransformConstraintTimeline.PREV_SHEAR = -1;
+		TransformConstraintTimeline.ROTATE = 1;
+		TransformConstraintTimeline.TRANSLATE = 2;
+		TransformConstraintTimeline.SCALE = 3;
+		TransformConstraintTimeline.SHEAR = 4;
 		return TransformConstraintTimeline;
 	}(CurveTimeline));
-	TransformConstraintTimeline.ENTRIES = 5;
-	TransformConstraintTimeline.PREV_TIME = -5;
-	TransformConstraintTimeline.PREV_ROTATE = -4;
-	TransformConstraintTimeline.PREV_TRANSLATE = -3;
-	TransformConstraintTimeline.PREV_SCALE = -2;
-	TransformConstraintTimeline.PREV_SHEAR = -1;
-	TransformConstraintTimeline.ROTATE = 1;
-	TransformConstraintTimeline.TRANSLATE = 2;
-	TransformConstraintTimeline.SCALE = 3;
-	TransformConstraintTimeline.SHEAR = 4;
 	spine.TransformConstraintTimeline = TransformConstraintTimeline;
 	var PathConstraintPositionTimeline = (function (_super) {
 		__extends(PathConstraintPositionTimeline, _super);
@@ -1031,12 +1031,12 @@ var spine;
 			else
 				constraint.position += (position - constraint.position) * alpha;
 		};
+		PathConstraintPositionTimeline.ENTRIES = 2;
+		PathConstraintPositionTimeline.PREV_TIME = -2;
+		PathConstraintPositionTimeline.PREV_VALUE = -1;
+		PathConstraintPositionTimeline.VALUE = 1;
 		return PathConstraintPositionTimeline;
 	}(CurveTimeline));
-	PathConstraintPositionTimeline.ENTRIES = 2;
-	PathConstraintPositionTimeline.PREV_TIME = -2;
-	PathConstraintPositionTimeline.PREV_VALUE = -1;
-	PathConstraintPositionTimeline.VALUE = 1;
 	spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;
 	var PathConstraintSpacingTimeline = (function (_super) {
 		__extends(PathConstraintSpacingTimeline, _super);
@@ -1131,14 +1131,14 @@ var spine;
 				constraint.translateMix += (translate - constraint.translateMix) * alpha;
 			}
 		};
+		PathConstraintMixTimeline.ENTRIES = 3;
+		PathConstraintMixTimeline.PREV_TIME = -3;
+		PathConstraintMixTimeline.PREV_ROTATE = -2;
+		PathConstraintMixTimeline.PREV_TRANSLATE = -1;
+		PathConstraintMixTimeline.ROTATE = 1;
+		PathConstraintMixTimeline.TRANSLATE = 2;
 		return PathConstraintMixTimeline;
 	}(CurveTimeline));
-	PathConstraintMixTimeline.ENTRIES = 3;
-	PathConstraintMixTimeline.PREV_TIME = -3;
-	PathConstraintMixTimeline.PREV_ROTATE = -2;
-	PathConstraintMixTimeline.PREV_TRANSLATE = -1;
-	PathConstraintMixTimeline.ROTATE = 1;
-	PathConstraintMixTimeline.TRANSLATE = 2;
 	spine.PathConstraintMixTimeline = PathConstraintMixTimeline;
 })(spine || (spine = {}));
 var spine;
@@ -1263,8 +1263,10 @@ var spine;
 						if (timeline instanceof spine.RotateTimeline) {
 							this.applyRotateTimeline(timeline, skeleton, animationTime, mix, pose, timelinesRotation, ii << 1, firstFrame);
 						}
-						else
+						else {
+							spine.Utils.webkit602BugfixHelper(mix, pose);
 							timeline.apply(skeleton, animationLast, animationTime, events, mix, pose, spine.MixDirection["in"]);
+						}
 					}
 				}
 				this.queueEvents(current, animationTime);
@@ -1333,6 +1335,7 @@ var spine;
 				if (timeline instanceof spine.RotateTimeline)
 					this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, pose, timelinesRotation, i << 1, firstFrame);
 				else {
+					spine.Utils.webkit602BugfixHelper(alpha, pose);
 					timeline.apply(skeleton, animationLast, animationTime, events, alpha, pose, spine.MixDirection.out);
 				}
 			}
@@ -1416,10 +1419,13 @@ var spine;
 					continue;
 				this.queue.event(entry, event_1);
 			}
-			if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
-				: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
+			var complete = false;
+			if (entry.loop)
+				complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
+			else
+				complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
+			if (complete)
 				this.queue.complete(entry);
-			}
 			for (; i < n; i++) {
 				var event_2 = events[i];
 				if (event_2.time < animationStart)
@@ -1631,13 +1637,13 @@ var spine;
 		AnimationState.prototype.clearListenerNotifications = function () {
 			this.queue.clear();
 		};
+		AnimationState.emptyAnimation = new spine.Animation("<empty>", [], 0);
+		AnimationState.SUBSEQUENT = 0;
+		AnimationState.FIRST = 1;
+		AnimationState.DIP = 2;
+		AnimationState.DIP_MIX = 3;
 		return AnimationState;
 	}());
-	AnimationState.emptyAnimation = new spine.Animation("<empty>", [], 0);
-	AnimationState.SUBSEQUENT = 0;
-	AnimationState.FIRST = 1;
-	AnimationState.DIP = 2;
-	AnimationState.DIP_MIX = 3;
 	spine.AnimationState = AnimationState;
 	var TrackEntry = (function () {
 		function TrackEntry() {
@@ -3058,12 +3064,12 @@ var spine;
 		PathConstraint.prototype.getOrder = function () {
 			return this.data.order;
 		};
+		PathConstraint.NONE = -1;
+		PathConstraint.BEFORE = -2;
+		PathConstraint.AFTER = -3;
+		PathConstraint.epsilon = 0.00001;
 		return PathConstraint;
 	}());
-	PathConstraint.NONE = -1;
-	PathConstraint.BEFORE = -2;
-	PathConstraint.AFTER = -3;
-	PathConstraint.epsilon = 0.00001;
 	spine.PathConstraint = PathConstraint;
 })(spine || (spine = {}));
 var spine;
@@ -3095,15 +3101,6 @@ var spine;
 		RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale";
 	})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));
 })(spine || (spine = {}));
-(function () {
-	if (!Math.fround) {
-		Math.fround = (function (array) {
-			return function (x) {
-				return array[0] = x, array[0];
-			};
-		})(new Float32Array(1));
-	}
-})();
 var spine;
 (function (spine) {
 	var Assets = (function () {
@@ -5874,13 +5871,13 @@ var spine;
 				this.a = 1;
 			return this;
 		};
+		Color.WHITE = new Color(1, 1, 1, 1);
+		Color.RED = new Color(1, 0, 0, 1);
+		Color.GREEN = new Color(0, 1, 0, 1);
+		Color.BLUE = new Color(0, 0, 1, 1);
+		Color.MAGENTA = new Color(1, 0, 1, 1);
 		return Color;
 	}());
-	Color.WHITE = new Color(1, 1, 1, 1);
-	Color.RED = new Color(1, 0, 0, 1);
-	Color.GREEN = new Color(0, 1, 0, 1);
-	Color.BLUE = new Color(0, 0, 1, 1);
-	Color.MAGENTA = new Color(1, 0, 1, 1);
 	spine.Color = Color;
 	var MathUtils = (function () {
 		function MathUtils() {
@@ -5918,14 +5915,14 @@ var spine;
 				return min + Math.sqrt(u * d * (mode - min));
 			return max - Math.sqrt((1 - u) * d * (max - mode));
 		};
+		MathUtils.PI = 3.1415927;
+		MathUtils.PI2 = MathUtils.PI * 2;
+		MathUtils.radiansToDegrees = 180 / MathUtils.PI;
+		MathUtils.radDeg = MathUtils.radiansToDegrees;
+		MathUtils.degreesToRadians = MathUtils.PI / 180;
+		MathUtils.degRad = MathUtils.degreesToRadians;
 		return MathUtils;
 	}());
-	MathUtils.PI = 3.1415927;
-	MathUtils.PI2 = MathUtils.PI * 2;
-	MathUtils.radiansToDegrees = 180 / MathUtils.PI;
-	MathUtils.radDeg = MathUtils.radiansToDegrees;
-	MathUtils.degreesToRadians = MathUtils.PI / 180;
-	MathUtils.degRad = MathUtils.degreesToRadians;
 	spine.MathUtils = MathUtils;
 	var Interpolation = (function () {
 		function Interpolation() {
@@ -6023,9 +6020,11 @@ var spine;
 		Utils.toSinglePrecision = function (value) {
 			return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;
 		};
+		Utils.webkit602BugfixHelper = function (alpha, pose) {
+		};
+		Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";
 		return Utils;
 	}());
-	Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";
 	spine.Utils = Utils;
 	var DebugUtils = (function () {
 		function DebugUtils() {
@@ -6161,6 +6160,15 @@ var spine;
 	}());
 	spine.WindowedMean = WindowedMean;
 })(spine || (spine = {}));
+(function () {
+	if (!Math.fround) {
+		Math.fround = (function (array) {
+			return function (x) {
+				return array[0] = x, array[0];
+			};
+		})(new Float32Array(1));
+	}
+})();
 var spine;
 (function (spine) {
 	var Attachment = (function () {
@@ -6242,9 +6250,9 @@ var spine;
 		VertexAttachment.prototype.applyDeform = function (sourceAttachment) {
 			return this == sourceAttachment;
 		};
+		VertexAttachment.nextID = 0;
 		return VertexAttachment;
 	}(Attachment));
-	VertexAttachment.nextID = 0;
 	spine.VertexAttachment = VertexAttachment;
 })(spine || (spine = {}));
 var spine;
@@ -6482,48 +6490,48 @@ var spine;
 			worldVertices[offset] = offsetX * a + offsetY * b + x;
 			worldVertices[offset + 1] = offsetX * c + offsetY * d + y;
 		};
+		RegionAttachment.OX1 = 0;
+		RegionAttachment.OY1 = 1;
+		RegionAttachment.OX2 = 2;
+		RegionAttachment.OY2 = 3;
+		RegionAttachment.OX3 = 4;
+		RegionAttachment.OY3 = 5;
+		RegionAttachment.OX4 = 6;
+		RegionAttachment.OY4 = 7;
+		RegionAttachment.X1 = 0;
+		RegionAttachment.Y1 = 1;
+		RegionAttachment.C1R = 2;
+		RegionAttachment.C1G = 3;
+		RegionAttachment.C1B = 4;
+		RegionAttachment.C1A = 5;
+		RegionAttachment.U1 = 6;
+		RegionAttachment.V1 = 7;
+		RegionAttachment.X2 = 8;
+		RegionAttachment.Y2 = 9;
+		RegionAttachment.C2R = 10;
+		RegionAttachment.C2G = 11;
+		RegionAttachment.C2B = 12;
+		RegionAttachment.C2A = 13;
+		RegionAttachment.U2 = 14;
+		RegionAttachment.V2 = 15;
+		RegionAttachment.X3 = 16;
+		RegionAttachment.Y3 = 17;
+		RegionAttachment.C3R = 18;
+		RegionAttachment.C3G = 19;
+		RegionAttachment.C3B = 20;
+		RegionAttachment.C3A = 21;
+		RegionAttachment.U3 = 22;
+		RegionAttachment.V3 = 23;
+		RegionAttachment.X4 = 24;
+		RegionAttachment.Y4 = 25;
+		RegionAttachment.C4R = 26;
+		RegionAttachment.C4G = 27;
+		RegionAttachment.C4B = 28;
+		RegionAttachment.C4A = 29;
+		RegionAttachment.U4 = 30;
+		RegionAttachment.V4 = 31;
 		return RegionAttachment;
 	}(spine.Attachment));
-	RegionAttachment.OX1 = 0;
-	RegionAttachment.OY1 = 1;
-	RegionAttachment.OX2 = 2;
-	RegionAttachment.OY2 = 3;
-	RegionAttachment.OX3 = 4;
-	RegionAttachment.OY3 = 5;
-	RegionAttachment.OX4 = 6;
-	RegionAttachment.OY4 = 7;
-	RegionAttachment.X1 = 0;
-	RegionAttachment.Y1 = 1;
-	RegionAttachment.C1R = 2;
-	RegionAttachment.C1G = 3;
-	RegionAttachment.C1B = 4;
-	RegionAttachment.C1A = 5;
-	RegionAttachment.U1 = 6;
-	RegionAttachment.V1 = 7;
-	RegionAttachment.X2 = 8;
-	RegionAttachment.Y2 = 9;
-	RegionAttachment.C2R = 10;
-	RegionAttachment.C2G = 11;
-	RegionAttachment.C2B = 12;
-	RegionAttachment.C2A = 13;
-	RegionAttachment.U2 = 14;
-	RegionAttachment.V2 = 15;
-	RegionAttachment.X3 = 16;
-	RegionAttachment.Y3 = 17;
-	RegionAttachment.C3R = 18;
-	RegionAttachment.C3G = 19;
-	RegionAttachment.C3B = 20;
-	RegionAttachment.C3A = 21;
-	RegionAttachment.U3 = 22;
-	RegionAttachment.V3 = 23;
-	RegionAttachment.X4 = 24;
-	RegionAttachment.Y4 = 25;
-	RegionAttachment.C4R = 26;
-	RegionAttachment.C4G = 27;
-	RegionAttachment.C4B = 28;
-	RegionAttachment.C4A = 29;
-	RegionAttachment.U4 = 30;
-	RegionAttachment.V4 = 31;
 	spine.RegionAttachment = RegionAttachment;
 })(spine || (spine = {}));
 var spine;
@@ -6578,9 +6586,9 @@ var spine;
 		};
 		SwirlEffect.prototype.end = function () {
 		};
+		SwirlEffect.interpolation = new spine.PowOut(2);
 		return SwirlEffect;
 	}());
-	SwirlEffect.interpolation = new spine.PowOut(2);
 	spine.SwirlEffect = SwirlEffect;
 })(spine || (spine = {}));
 var spine;
@@ -6680,9 +6688,9 @@ var spine;
 				geo.drawRange.start = 0;
 				geo.drawRange.count = this.indicesLength;
 			};
+			MeshBatcher.VERTEX_SIZE = 9;
 			return MeshBatcher;
 		}(THREE.Mesh));
-		MeshBatcher.VERTEX_SIZE = 9;
 		threejs.MeshBatcher = MeshBatcher;
 	})(threejs = spine.threejs || (spine.threejs = {}));
 })(spine || (spine = {}));
@@ -6918,10 +6926,10 @@ var spine;
 				clipper.clipEnd();
 				batch.end();
 			};
+			SkeletonMesh.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
+			SkeletonMesh.VERTEX_SIZE = 2 + 2 + 4;
 			return SkeletonMesh;
 		}(THREE.Object3D));
-		SkeletonMesh.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
-		SkeletonMesh.VERTEX_SIZE = 2 + 2 + 4;
 		threejs.SkeletonMesh = SkeletonMesh;
 	})(threejs = spine.threejs || (spine.threejs = {}));
 })(spine || (spine = {}));

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


+ 4 - 3
spine-ts/build/spine-webgl.d.ts

@@ -589,9 +589,6 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
-interface Math {
-	fround(n: number): number;
-}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -1000,6 +997,7 @@ declare module spine {
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
 		static toSinglePrecision(value: number): number;
+		static webkit602BugfixHelper(alpha: number, pose: MixPose): void;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;
@@ -1054,6 +1052,9 @@ declare module spine {
 		end(): void;
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	abstract class Attachment {
 		name: string;

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


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


+ 4 - 3
spine-ts/build/spine-widget.d.ts

@@ -589,9 +589,6 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
-interface Math {
-	fround(n: number): number;
-}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -1000,6 +997,7 @@ declare module spine {
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
 		static toSinglePrecision(value: number): number;
+		static webkit602BugfixHelper(alpha: number, pose: MixPose): void;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;
@@ -1054,6 +1052,9 @@ declare module spine {
 		end(): void;
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	abstract class Attachment {
 		name: string;

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


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


+ 6 - 4
spine-ts/core/src/AnimationState.ts

@@ -341,10 +341,12 @@ module spine {
 			}
 
 			// Queue complete if completed a loop iteration or the animation.
-			if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
-				: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
-				this.queue.complete(entry);
-			}
+			var complete = false;
+			if (entry.loop)
+				complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;
+			else
+				complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
+			if (complete) this.queue.complete(entry);
 
 			// Queue events after complete.
 			for (; i < n; i++) {

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