Browse Source

[ts] Ported flipX/flipY -> scaleX/scaleY change. See #1142.

badlogic 7 years ago
parent
commit
172bf22d84

+ 8 - 1
CHANGELOG.md

@@ -4,6 +4,7 @@
 * **Breaking changes**
 * **Breaking changes**
   * The completion event will fire for looped 0 duration animations every frame.
   * The completion event will fire for looped 0 duration animations every frame.
   * `MixPose` is now called `MixBlend`
   * `MixPose` is now called `MixBlend`
+  * Skeleton `flipX/flipY` has been replaced with `scaleY/scaleY`. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance
 * **Additions**
 * **Additions**
   * Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call `TrackEntry#setMixBlend(MixBlend.add)` on each track. To specify the blend percentage, set `TrackEntry#alpha`. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.
   * Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call `TrackEntry#setMixBlend(MixBlend.add)` on each track. To specify the blend percentage, set `TrackEntry#alpha`. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.
 
 
@@ -25,6 +26,7 @@
 * **Breaking changes**
 * **Breaking changes**
   * Listeners on `spAnimationState` and `spTrackEntry` will now also be called if a track entry gets disposed as part of disposing an animation state.
   * Listeners on `spAnimationState` and `spTrackEntry` will now also be called if a track entry gets disposed as part of disposing an animation state.
   * The completion event will fire for looped 0 duration animations every frame.
   * The completion event will fire for looped 0 duration animations every frame.
+  * Skeleton `flipX/flipY` has been replaced with `scaleY/scaleY`. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance
 * **Additions**
 * **Additions**
   * Added support for local and relative transform constraint calculation, including additional fields in `spTransformConstraintData`.
   * Added support for local and relative transform constraint calculation, including additional fields in `spTransformConstraintData`.
   * `Animation#apply` and `Timeline#apply`` now take enums `MixPose` and `MixDirection` instead of booleans
   * `Animation#apply` and `Timeline#apply`` now take enums `MixPose` and `MixDirection` instead of booleans
@@ -67,8 +69,10 @@
 ## C# ##
 ## C# ##
 * **Breaking changes**
 * **Breaking changes**
   * The completion event will fire for looped 0 duration animations every frame.
   * The completion event will fire for looped 0 duration animations every frame.
+  * Skeleton `flipX/flipY` has been replaced with `scaleY/scaleY`. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance
 * **Additions**
 * **Additions**
   * Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call `TrackEntry#MixBlend = MixBlend.add` on each track. To specify the blend percentage, set `TrackEntry#Alpha`. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.
   * Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call `TrackEntry#MixBlend = MixBlend.add` on each track. To specify the blend percentage, set `TrackEntry#Alpha`. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.
+  * Skeleton `flipX/flipY` has been replaced with `scaleY/scaleY`. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance
 
 
 ### Unity
 ### Unity
 * **Runtime and Editor, and Assembly Definition** Files and folders have been reorganized into "Runtime" and "Editor". Each of these have an `.asmdef` file that defines these separately as their own assembly in Unity. For projects not using assembly definition, you may delete the `.asmdef` files. These assembly definitions will be ignored by older versions of Unity that don't support it.
 * **Runtime and Editor, and Assembly Definition** Files and folders have been reorganized into "Runtime" and "Editor". Each of these have an `.asmdef` file that defines these separately as their own assembly in Unity. For projects not using assembly definition, you may delete the `.asmdef` files. These assembly definitions will be ignored by older versions of Unity that don't support it.
@@ -82,7 +86,7 @@
 		* `Spine/Skeleton`
 		* `Spine/Skeleton`
 		* `Spine/Skeleton Tint Black`
 		* `Spine/Skeleton Tint Black`
 		* `Spine/Skeleton Lit`
 		* `Spine/Skeleton Lit`
-		* `Spine/Skeleton Tint`	
+		* `Spine/Skeleton Tint`
 		* `Spine/Skeleton Fill`
 		* `Spine/Skeleton Fill`
 		* `Spine/SkeletonGraphic (Premultiply Alpha)` was renamed to `Spine/SkeletonGraphic`
 		* `Spine/SkeletonGraphic (Premultiply Alpha)` was renamed to `Spine/SkeletonGraphic`
 		* `Spine/SkeletonGraphic Tint Black (Premultiply Alpha)` was renamed to `Spine/SkeletonGraphic Tint Black`
 		* `Spine/SkeletonGraphic Tint Black (Premultiply Alpha)` was renamed to `Spine/SkeletonGraphic Tint Black`
@@ -103,6 +107,7 @@
   * Skeleton attachments: Moved update of attached skeleton out of libGDX `SkeletonRenderer`, added overloaded method `Skeleton#updateWorldTransform(Bone)`, used for `SkeletonAttachment`. You now MUST call this new method with the bone of the parent skeleton to which the child skeleton is attached. See `SkeletonAttachmentTest` for and example.
   * Skeleton attachments: Moved update of attached skeleton out of libGDX `SkeletonRenderer`, added overloaded method `Skeleton#updateWorldTransform(Bone)`, used for `SkeletonAttachment`. You now MUST call this new method with the bone of the parent skeleton to which the child skeleton is attached. See `SkeletonAttachmentTest` for and example.
   * The completion event will fire for looped 0 duration animations every frame.
   * The completion event will fire for looped 0 duration animations every frame.
   * `MixPose` is now called `MixBlend`.
   * `MixPose` is now called `MixBlend`.
+  * Skeleton `flipX/flipY` has been replaced with `scaleY/scaleY`. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance
 * **Additions**
 * **Additions**
   * Added `EventData#audioPath` field. This field contains the file name of the audio file used for the event.
   * Added `EventData#audioPath` field. This field contains the file name of the audio file used for the event.
   * Added convenience method to add all attachments from one skin to another, see https://github.com/EsotericSoftware/spine-runtimes/commit/a0b7bb6c445efdfac12b0cdee2057afa3eff3ead
   * Added convenience method to add all attachments from one skin to another, see https://github.com/EsotericSoftware/spine-runtimes/commit/a0b7bb6c445efdfac12b0cdee2057afa3eff3ead
@@ -119,6 +124,7 @@
 ## Lua
 ## Lua
 * **Breaking changes**
 * **Breaking changes**
   * The completion event will fire for looped 0 duration animations every frame.
   * The completion event will fire for looped 0 duration animations every frame.
+  * Skeleton `flipX/flipY` has been replaced with `scaleY/scaleY`. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance
 * **Additions**
 * **Additions**
   * Added `JitterEffect` and `SwirlEffect` and support for vertex effects in Corona and Love
   * Added `JitterEffect` and `SwirlEffect` and support for vertex effects in Corona and Love
   * Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call `TrackEntry:setMixBlend(MixBlend.add)` on each track. To specify the blend percentage, set `TrackEntry.alpha`. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.
   * Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call `TrackEntry:setMixBlend(MixBlend.add)` on each track. To specify the blend percentage, set `TrackEntry.alpha`. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.
@@ -132,6 +138,7 @@
 ## Typescript/Javascript
 ## Typescript/Javascript
 * **Breaking changes**
 * **Breaking changes**
   * The completion event will fire for looped 0 duration animations every frame.
   * The completion event will fire for looped 0 duration animations every frame.
+  * Skeleton `flipX/flipY` has been replaced with `scaleY/scaleY`. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance
 * **Additions**
 * **Additions**
   * Added `AssetManager.loadTextureAtlas`. Instead of loading the `.atlas` and corresponding image files manually, you can simply specify the location of the `.atlas` file and AssetManager will load the atlas and all its images automatically. `AssetManager.get("atlasname.atlas")` will then return an instance of `spine.TextureAtlas`.
   * Added `AssetManager.loadTextureAtlas`. Instead of loading the `.atlas` and corresponding image files manually, you can simply specify the location of the `.atlas` file and AssetManager will load the atlas and all its images automatically. `AssetManager.get("atlasname.atlas")` will then return an instance of `spine.TextureAtlas`.
   * Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call `TrackEntry#setMixBlend(MixBlend.add)` on each track. To specify the blend percentage, set `TrackEntry#alpha`. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. See https://github.com/EsotericSoftware/spine-runtimes/blob/f045d221836fa56191ccda73dd42ae884d4731b8/spine-ts/webgl/tests/test-additive-animation-blending.html for an example.
   * Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call `TrackEntry#setMixBlend(MixBlend.add)` on each track. To specify the blend percentage, set `TrackEntry#alpha`. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. See https://github.com/EsotericSoftware/spine-runtimes/blob/f045d221836fa56191ccda73dd42ae884d4731b8/spine-ts/webgl/tests/test-additive-animation-blending.html for an example.

+ 48 - 48
spine-ts/build/spine-all.d.ts

@@ -16,11 +16,11 @@ declare module spine {
 		setup = 0,
 		setup = 0,
 		first = 1,
 		first = 1,
 		replace = 2,
 		replace = 2,
-		add = 3,
+		add = 3
 	}
 	}
 	enum MixDirection {
 	enum MixDirection {
 		in = 0,
 		in = 0,
-		out = 1,
+		out = 1
 	}
 	}
 	enum TimelineType {
 	enum TimelineType {
 		rotate = 0,
 		rotate = 0,
@@ -37,7 +37,7 @@ declare module spine {
 		pathConstraintPosition = 11,
 		pathConstraintPosition = 11,
 		pathConstraintSpacing = 12,
 		pathConstraintSpacing = 12,
 		pathConstraintMix = 13,
 		pathConstraintMix = 13,
-		twoColor = 14,
+		twoColor = 14
 	}
 	}
 	abstract class CurveTimeline implements Timeline {
 	abstract class CurveTimeline implements Timeline {
 		static LINEAR: number;
 		static LINEAR: number;
@@ -336,7 +336,7 @@ declare module spine {
 		end = 2,
 		end = 2,
 		dispose = 3,
 		dispose = 3,
 		complete = 4,
 		complete = 4,
-		event = 5,
+		event = 5
 	}
 	}
 	interface AnimationStateListener2 {
 	interface AnimationStateListener2 {
 		start(entry: TrackEntry): void;
 		start(entry: TrackEntry): void;
@@ -375,8 +375,8 @@ declare module spine {
 		private toLoad;
 		private toLoad;
 		private loaded;
 		private loaded;
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
-		private static downloadText(url, success, error);
-		private static downloadBinary(url, success, error);
+		private static downloadText;
+		private static downloadBinary;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
@@ -409,7 +409,7 @@ declare module spine {
 		Normal = 0,
 		Normal = 0,
 		Additive = 1,
 		Additive = 1,
 		Multiply = 2,
 		Multiply = 2,
-		Screen = 3,
+		Screen = 3
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -478,7 +478,7 @@ declare module spine {
 		OnlyTranslation = 1,
 		OnlyTranslation = 1,
 		NoRotationOrReflection = 2,
 		NoRotationOrReflection = 2,
 		NoScale = 3,
 		NoScale = 3,
-		NoScaleOrReflection = 4,
+		NoScaleOrReflection = 4
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -578,17 +578,17 @@ declare module spine {
 	}
 	}
 	enum PositionMode {
 	enum PositionMode {
 		Fixed = 0,
 		Fixed = 0,
-		Percent = 1,
+		Percent = 1
 	}
 	}
 	enum SpacingMode {
 	enum SpacingMode {
 		Length = 0,
 		Length = 0,
 		Fixed = 1,
 		Fixed = 1,
-		Percent = 2,
+		Percent = 2
 	}
 	}
 	enum RotateMode {
 	enum RotateMode {
 		Tangent = 0,
 		Tangent = 0,
 		Chain = 1,
 		Chain = 1,
-		ChainScale = 2,
+		ChainScale = 2
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -599,12 +599,12 @@ declare module spine {
 		private rawAssets;
 		private rawAssets;
 		private errors;
 		private errors;
 		constructor(pathPrefix?: string);
 		constructor(pathPrefix?: string);
-		private queueAsset(clientId, textureLoader, path);
+		private queueAsset;
 		loadText(clientId: string, path: string): void;
 		loadText(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		get(clientId: string, path: string): any;
 		get(clientId: string, path: string): any;
-		private updateClientAssets(clientAssets);
+		private updateClientAssets;
 		isLoadingComplete(clientId: string): boolean;
 		isLoadingComplete(clientId: string): boolean;
 		dispose(): void;
 		dispose(): void;
 		hasErrors(): boolean;
 		hasErrors(): boolean;
@@ -625,8 +625,8 @@ declare module spine {
 		skin: Skin;
 		skin: Skin;
 		color: Color;
 		color: Color;
 		time: number;
 		time: number;
-		flipX: boolean;
-		flipY: boolean;
+		scaleX: number;
+		scaleY: number;
 		x: number;
 		x: number;
 		y: number;
 		y: number;
 		constructor(data: SkeletonData);
 		constructor(data: SkeletonData);
@@ -808,12 +808,12 @@ declare module spine {
 		MipMapNearestNearest = 9984,
 		MipMapNearestNearest = 9984,
 		MipMapLinearNearest = 9985,
 		MipMapLinearNearest = 9985,
 		MipMapNearestLinear = 9986,
 		MipMapNearestLinear = 9986,
-		MipMapLinearLinear = 9987,
+		MipMapLinearLinear = 9987
 	}
 	}
 	enum TextureWrap {
 	enum TextureWrap {
 		MirroredRepeat = 33648,
 		MirroredRepeat = 33648,
 		ClampToEdge = 33071,
 		ClampToEdge = 33071,
-		Repeat = 10497,
+		Repeat = 10497
 	}
 	}
 	class TextureRegion {
 	class TextureRegion {
 		renderObject: any;
 		renderObject: any;
@@ -840,7 +840,7 @@ declare module spine {
 		pages: TextureAtlasPage[];
 		pages: TextureAtlasPage[];
 		regions: TextureAtlasRegion[];
 		regions: TextureAtlasRegion[];
 		constructor(atlasText: string, textureLoader: (path: string) => any);
 		constructor(atlasText: string, textureLoader: (path: string) => any);
-		private load(atlasText, textureLoader);
+		private load;
 		findRegion(name: string): TextureAtlasRegion;
 		findRegion(name: string): TextureAtlasRegion;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
@@ -916,9 +916,9 @@ declare module spine {
 		private polygonIndicesPool;
 		private polygonIndicesPool;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
-		private static isConcave(index, vertexCount, vertices, indices);
-		private static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y);
-		private static winding(p1x, p1y, p2x, p2y, p3x, p3y);
+		private static isConcave;
+		private static positiveArea;
+		private static winding;
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1090,7 +1090,7 @@ declare module spine {
 		Mesh = 2,
 		Mesh = 2,
 		LinkedMesh = 3,
 		LinkedMesh = 3,
 		Path = 4,
 		Path = 4,
-		Point = 5,
+		Point = 5
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1256,11 +1256,11 @@ declare module spine.canvas {
 		private tempColor;
 		private tempColor;
 		constructor(context: CanvasRenderingContext2D);
 		constructor(context: CanvasRenderingContext2D);
 		draw(skeleton: Skeleton): void;
 		draw(skeleton: Skeleton): void;
-		private drawImages(skeleton);
-		private drawTriangles(skeleton);
-		private drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);
-		private computeRegionVertices(slot, region, pma);
-		private computeMeshVertices(slot, mesh, pma);
+		private drawImages;
+		private drawTriangles;
+		private drawTriangle;
+		private computeRegionVertices;
+		private computeMeshVertices;
 	}
 	}
 }
 }
 declare module spine.webgl {
 declare module spine.webgl {
@@ -1315,7 +1315,7 @@ declare module spine.webgl {
 		touchesPool: Pool<Touch>;
 		touchesPool: Pool<Touch>;
 		private listeners;
 		private listeners;
 		constructor(element: HTMLElement);
 		constructor(element: HTMLElement);
-		private setupCallbacks(element);
+		private setupCallbacks;
 		addListener(listener: InputListener): void;
 		addListener(listener: InputListener): void;
 		removeListener(listener: InputListener): void;
 		removeListener(listener: InputListener): void;
 	}
 	}
@@ -1424,7 +1424,7 @@ declare module spine.webgl {
 		drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void;
 		drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void;
 		bind(shader: Shader): void;
 		bind(shader: Shader): void;
 		unbind(shader: Shader): void;
 		unbind(shader: Shader): void;
-		private update();
+		private update;
 		restore(): void;
 		restore(): void;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
@@ -1450,7 +1450,7 @@ declare module spine.webgl {
 		constructor();
 		constructor();
 	}
 	}
 	enum VertexAttributeType {
 	enum VertexAttributeType {
-		Float = 0,
+		Float = 0
 	}
 	}
 }
 }
 declare module spine.webgl {
 declare module spine.webgl {
@@ -1469,7 +1469,7 @@ declare module spine.webgl {
 		begin(shader: Shader): void;
 		begin(shader: Shader): void;
 		setBlendMode(srcBlend: number, dstBlend: number): void;
 		setBlendMode(srcBlend: number, dstBlend: number): void;
 		draw(texture: GLTexture, vertices: ArrayLike<number>, indices: Array<number>): void;
 		draw(texture: GLTexture, vertices: ArrayLike<number>, indices: Array<number>): void;
-		private flush();
+		private flush;
 		end(): void;
 		end(): void;
 		getDrawCalls(): number;
 		getDrawCalls(): number;
 		dispose(): void;
 		dispose(): void;
@@ -1509,13 +1509,13 @@ declare module spine.webgl {
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
 		end(): void;
 		end(): void;
 		resize(resizeMode: ResizeMode): void;
 		resize(resizeMode: ResizeMode): void;
-		private enableRenderer(renderer);
+		private enableRenderer;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
 	enum ResizeMode {
 	enum ResizeMode {
 		Stretch = 0,
 		Stretch = 0,
 		Expand = 1,
 		Expand = 1,
-		Fit = 2,
+		Fit = 2
 	}
 	}
 }
 }
 declare module spine.webgl {
 declare module spine.webgl {
@@ -1543,9 +1543,9 @@ declare module spine.webgl {
 		getVertexShaderSource(): string;
 		getVertexShaderSource(): string;
 		getFragmentSource(): string;
 		getFragmentSource(): string;
 		constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, vertexShader: string, fragmentShader: string);
 		constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, vertexShader: string, fragmentShader: string);
-		private compile();
-		private compileShader(type, source);
-		private compileProgram(vs, fs);
+		private compile;
+		private compileShader;
+		private compileProgram;
 		restore(): void;
 		restore(): void;
 		bind(): void;
 		bind(): void;
 		unbind(): void;
 		unbind(): void;
@@ -1592,16 +1592,16 @@ declare module spine.webgl {
 		polygon(polygonVertices: ArrayLike<number>, offset: number, count: number, color?: Color): void;
 		polygon(polygonVertices: ArrayLike<number>, offset: number, count: number, color?: Color): void;
 		circle(filled: boolean, x: number, y: number, radius: number, color?: Color, segments?: number): void;
 		circle(filled: boolean, x: number, y: number, radius: number, color?: Color, segments?: number): void;
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
-		private vertex(x, y, color);
+		private vertex;
 		end(): void;
 		end(): void;
-		private flush();
-		private check(shapeType, numVertices);
+		private flush;
+		private check;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
 	enum ShapeType {
 	enum ShapeType {
 		Point = 0,
 		Point = 0,
 		Line = 1,
 		Line = 1,
-		Filled = 4,
+		Filled = 4
 	}
 	}
 }
 }
 declare module spine.webgl {
 declare module spine.webgl {
@@ -1741,9 +1741,9 @@ declare module spine.threejs {
 		private tempColor;
 		private tempColor;
 		constructor(skeletonData: SkeletonData);
 		constructor(skeletonData: SkeletonData);
 		update(deltaTime: number): void;
 		update(deltaTime: number): void;
-		private clearBatches();
-		private nextBatch();
-		private updateGeometry();
+		private clearBatches;
+		private nextBatch;
+		private updateGeometry;
 	}
 	}
 }
 }
 declare module spine.threejs {
 declare module spine.threejs {
@@ -1778,10 +1778,10 @@ declare module spine {
 		private loaded;
 		private loaded;
 		private bounds;
 		private bounds;
 		constructor(element: HTMLElement | string, config: SpineWidgetConfig);
 		constructor(element: HTMLElement | string, config: SpineWidgetConfig);
-		private validateConfig(config);
-		private load();
-		private render();
-		private resize();
+		private validateConfig;
+		private load;
+		private render;
+		private resize;
 		pause(): void;
 		pause(): void;
 		play(): void;
 		play(): void;
 		isPlaying(): boolean;
 		isPlaying(): boolean;
@@ -1789,7 +1789,7 @@ declare module spine {
 		static loadWidgets(): void;
 		static loadWidgets(): void;
 		static loadWidget(widget: HTMLElement): void;
 		static loadWidget(widget: HTMLElement): void;
 		static pageLoaded: boolean;
 		static pageLoaded: boolean;
-		private static ready();
+		private static ready;
 		static setupDOMListener(): void;
 		static setupDOMListener(): void;
 	}
 	}
 	class SpineWidgetConfig {
 	class SpineWidgetConfig {

+ 18 - 38
spine-ts/build/spine-all.js

@@ -2358,28 +2358,16 @@ var spine;
 			this.appliedValid = true;
 			this.appliedValid = true;
 			var parent = this.parent;
 			var parent = this.parent;
 			if (parent == null) {
 			if (parent == null) {
-				var rotationY = rotation + 90 + shearY;
-				var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;
-				var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;
-				var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;
-				var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;
 				var skeleton = this.skeleton;
 				var skeleton = this.skeleton;
-				if (skeleton.flipX) {
-					x = -x;
-					la = -la;
-					lb = -lb;
-				}
-				if (skeleton.flipY) {
-					y = -y;
-					lc = -lc;
-					ld = -ld;
-				}
-				this.a = la;
-				this.b = lb;
-				this.c = lc;
-				this.d = ld;
-				this.worldX = x + skeleton.x;
-				this.worldY = y + skeleton.y;
+				var rotationY = rotation + 90 + shearY;
+				var sx = skeleton.scaleX;
+				var sy = skeleton.scaleY;
+				this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;
+				this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sy;
+				this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sx;
+				this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;
+				this.worldX = x * sx + skeleton.x;
+				this.worldY = y * sy + skeleton.y;
 				return;
 				return;
 			}
 			}
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
@@ -2436,8 +2424,8 @@ var spine;
 				case spine.TransformMode.NoScaleOrReflection: {
 				case spine.TransformMode.NoScaleOrReflection: {
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
-					var za = pa * cos + pb * sin;
-					var zc = pc * cos + pd * sin;
+					var za = (pa * cos + pb * sin) / this.skeleton.scaleX;
+					var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;
 					var s = Math.sqrt(za * za + zc * zc);
 					var s = Math.sqrt(za * za + zc * zc);
 					if (s > 0.00001)
 					if (s > 0.00001)
 						s = 1 / s;
 						s = 1 / s;
@@ -2451,25 +2439,17 @@ var spine;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
-					if (this.data.transformMode != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
-						zb = -zb;
-						zd = -zd;
-					}
 					this.a = za * la + zb * lc;
 					this.a = za * la + zb * lc;
 					this.b = za * lb + zb * ld;
 					this.b = za * lb + zb * ld;
 					this.c = zc * la + zd * lc;
 					this.c = zc * la + zd * lc;
 					this.d = zc * lb + zd * ld;
 					this.d = zc * lb + zd * ld;
-					return;
+					break;
 				}
 				}
 			}
 			}
-			if (this.skeleton.flipX) {
-				this.a = -this.a;
-				this.b = -this.b;
-			}
-			if (this.skeleton.flipY) {
-				this.c = -this.c;
-				this.d = -this.d;
-			}
+			this.a *= this.skeleton.scaleX;
+			this.b *= this.skeleton.scaleX;
+			this.c *= this.skeleton.scaleY;
+			this.d *= this.skeleton.scaleY;
 		};
 		};
 		Bone.prototype.setToSetupPose = function () {
 		Bone.prototype.setToSetupPose = function () {
 			var data = this.data;
 			var data = this.data;
@@ -3386,8 +3366,8 @@ var spine;
 			this._updateCache = new Array();
 			this._updateCache = new Array();
 			this.updateCacheReset = new Array();
 			this.updateCacheReset = new Array();
 			this.time = 0;
 			this.time = 0;
-			this.flipX = false;
-			this.flipY = false;
+			this.scaleX = 1;
+			this.scaleY = 1;
 			this.x = 0;
 			this.x = 0;
 			this.y = 0;
 			this.y = 0;
 			if (data == null)
 			if (data == null)

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


+ 27 - 27
spine-ts/build/spine-canvas.d.ts

@@ -16,11 +16,11 @@ declare module spine {
 		setup = 0,
 		setup = 0,
 		first = 1,
 		first = 1,
 		replace = 2,
 		replace = 2,
-		add = 3,
+		add = 3
 	}
 	}
 	enum MixDirection {
 	enum MixDirection {
 		in = 0,
 		in = 0,
-		out = 1,
+		out = 1
 	}
 	}
 	enum TimelineType {
 	enum TimelineType {
 		rotate = 0,
 		rotate = 0,
@@ -37,7 +37,7 @@ declare module spine {
 		pathConstraintPosition = 11,
 		pathConstraintPosition = 11,
 		pathConstraintSpacing = 12,
 		pathConstraintSpacing = 12,
 		pathConstraintMix = 13,
 		pathConstraintMix = 13,
-		twoColor = 14,
+		twoColor = 14
 	}
 	}
 	abstract class CurveTimeline implements Timeline {
 	abstract class CurveTimeline implements Timeline {
 		static LINEAR: number;
 		static LINEAR: number;
@@ -336,7 +336,7 @@ declare module spine {
 		end = 2,
 		end = 2,
 		dispose = 3,
 		dispose = 3,
 		complete = 4,
 		complete = 4,
-		event = 5,
+		event = 5
 	}
 	}
 	interface AnimationStateListener2 {
 	interface AnimationStateListener2 {
 		start(entry: TrackEntry): void;
 		start(entry: TrackEntry): void;
@@ -375,8 +375,8 @@ declare module spine {
 		private toLoad;
 		private toLoad;
 		private loaded;
 		private loaded;
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
-		private static downloadText(url, success, error);
-		private static downloadBinary(url, success, error);
+		private static downloadText;
+		private static downloadBinary;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
@@ -409,7 +409,7 @@ declare module spine {
 		Normal = 0,
 		Normal = 0,
 		Additive = 1,
 		Additive = 1,
 		Multiply = 2,
 		Multiply = 2,
-		Screen = 3,
+		Screen = 3
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -478,7 +478,7 @@ declare module spine {
 		OnlyTranslation = 1,
 		OnlyTranslation = 1,
 		NoRotationOrReflection = 2,
 		NoRotationOrReflection = 2,
 		NoScale = 3,
 		NoScale = 3,
-		NoScaleOrReflection = 4,
+		NoScaleOrReflection = 4
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -578,17 +578,17 @@ declare module spine {
 	}
 	}
 	enum PositionMode {
 	enum PositionMode {
 		Fixed = 0,
 		Fixed = 0,
-		Percent = 1,
+		Percent = 1
 	}
 	}
 	enum SpacingMode {
 	enum SpacingMode {
 		Length = 0,
 		Length = 0,
 		Fixed = 1,
 		Fixed = 1,
-		Percent = 2,
+		Percent = 2
 	}
 	}
 	enum RotateMode {
 	enum RotateMode {
 		Tangent = 0,
 		Tangent = 0,
 		Chain = 1,
 		Chain = 1,
-		ChainScale = 2,
+		ChainScale = 2
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -599,12 +599,12 @@ declare module spine {
 		private rawAssets;
 		private rawAssets;
 		private errors;
 		private errors;
 		constructor(pathPrefix?: string);
 		constructor(pathPrefix?: string);
-		private queueAsset(clientId, textureLoader, path);
+		private queueAsset;
 		loadText(clientId: string, path: string): void;
 		loadText(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		get(clientId: string, path: string): any;
 		get(clientId: string, path: string): any;
-		private updateClientAssets(clientAssets);
+		private updateClientAssets;
 		isLoadingComplete(clientId: string): boolean;
 		isLoadingComplete(clientId: string): boolean;
 		dispose(): void;
 		dispose(): void;
 		hasErrors(): boolean;
 		hasErrors(): boolean;
@@ -625,8 +625,8 @@ declare module spine {
 		skin: Skin;
 		skin: Skin;
 		color: Color;
 		color: Color;
 		time: number;
 		time: number;
-		flipX: boolean;
-		flipY: boolean;
+		scaleX: number;
+		scaleY: number;
 		x: number;
 		x: number;
 		y: number;
 		y: number;
 		constructor(data: SkeletonData);
 		constructor(data: SkeletonData);
@@ -808,12 +808,12 @@ declare module spine {
 		MipMapNearestNearest = 9984,
 		MipMapNearestNearest = 9984,
 		MipMapLinearNearest = 9985,
 		MipMapLinearNearest = 9985,
 		MipMapNearestLinear = 9986,
 		MipMapNearestLinear = 9986,
-		MipMapLinearLinear = 9987,
+		MipMapLinearLinear = 9987
 	}
 	}
 	enum TextureWrap {
 	enum TextureWrap {
 		MirroredRepeat = 33648,
 		MirroredRepeat = 33648,
 		ClampToEdge = 33071,
 		ClampToEdge = 33071,
-		Repeat = 10497,
+		Repeat = 10497
 	}
 	}
 	class TextureRegion {
 	class TextureRegion {
 		renderObject: any;
 		renderObject: any;
@@ -840,7 +840,7 @@ declare module spine {
 		pages: TextureAtlasPage[];
 		pages: TextureAtlasPage[];
 		regions: TextureAtlasRegion[];
 		regions: TextureAtlasRegion[];
 		constructor(atlasText: string, textureLoader: (path: string) => any);
 		constructor(atlasText: string, textureLoader: (path: string) => any);
-		private load(atlasText, textureLoader);
+		private load;
 		findRegion(name: string): TextureAtlasRegion;
 		findRegion(name: string): TextureAtlasRegion;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
@@ -916,9 +916,9 @@ declare module spine {
 		private polygonIndicesPool;
 		private polygonIndicesPool;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
-		private static isConcave(index, vertexCount, vertices, indices);
-		private static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y);
-		private static winding(p1x, p1y, p2x, p2y, p3x, p3y);
+		private static isConcave;
+		private static positiveArea;
+		private static winding;
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1090,7 +1090,7 @@ declare module spine {
 		Mesh = 2,
 		Mesh = 2,
 		LinkedMesh = 3,
 		LinkedMesh = 3,
 		Path = 4,
 		Path = 4,
-		Point = 5,
+		Point = 5
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1256,10 +1256,10 @@ declare module spine.canvas {
 		private tempColor;
 		private tempColor;
 		constructor(context: CanvasRenderingContext2D);
 		constructor(context: CanvasRenderingContext2D);
 		draw(skeleton: Skeleton): void;
 		draw(skeleton: Skeleton): void;
-		private drawImages(skeleton);
-		private drawTriangles(skeleton);
-		private drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);
-		private computeRegionVertices(slot, region, pma);
-		private computeMeshVertices(slot, mesh, pma);
+		private drawImages;
+		private drawTriangles;
+		private drawTriangle;
+		private computeRegionVertices;
+		private computeMeshVertices;
 	}
 	}
 }
 }

+ 18 - 38
spine-ts/build/spine-canvas.js

@@ -2358,28 +2358,16 @@ var spine;
 			this.appliedValid = true;
 			this.appliedValid = true;
 			var parent = this.parent;
 			var parent = this.parent;
 			if (parent == null) {
 			if (parent == null) {
-				var rotationY = rotation + 90 + shearY;
-				var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;
-				var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;
-				var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;
-				var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;
 				var skeleton = this.skeleton;
 				var skeleton = this.skeleton;
-				if (skeleton.flipX) {
-					x = -x;
-					la = -la;
-					lb = -lb;
-				}
-				if (skeleton.flipY) {
-					y = -y;
-					lc = -lc;
-					ld = -ld;
-				}
-				this.a = la;
-				this.b = lb;
-				this.c = lc;
-				this.d = ld;
-				this.worldX = x + skeleton.x;
-				this.worldY = y + skeleton.y;
+				var rotationY = rotation + 90 + shearY;
+				var sx = skeleton.scaleX;
+				var sy = skeleton.scaleY;
+				this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;
+				this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sy;
+				this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sx;
+				this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;
+				this.worldX = x * sx + skeleton.x;
+				this.worldY = y * sy + skeleton.y;
 				return;
 				return;
 			}
 			}
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
@@ -2436,8 +2424,8 @@ var spine;
 				case spine.TransformMode.NoScaleOrReflection: {
 				case spine.TransformMode.NoScaleOrReflection: {
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
-					var za = pa * cos + pb * sin;
-					var zc = pc * cos + pd * sin;
+					var za = (pa * cos + pb * sin) / this.skeleton.scaleX;
+					var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;
 					var s = Math.sqrt(za * za + zc * zc);
 					var s = Math.sqrt(za * za + zc * zc);
 					if (s > 0.00001)
 					if (s > 0.00001)
 						s = 1 / s;
 						s = 1 / s;
@@ -2451,25 +2439,17 @@ var spine;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
-					if (this.data.transformMode != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
-						zb = -zb;
-						zd = -zd;
-					}
 					this.a = za * la + zb * lc;
 					this.a = za * la + zb * lc;
 					this.b = za * lb + zb * ld;
 					this.b = za * lb + zb * ld;
 					this.c = zc * la + zd * lc;
 					this.c = zc * la + zd * lc;
 					this.d = zc * lb + zd * ld;
 					this.d = zc * lb + zd * ld;
-					return;
+					break;
 				}
 				}
 			}
 			}
-			if (this.skeleton.flipX) {
-				this.a = -this.a;
-				this.b = -this.b;
-			}
-			if (this.skeleton.flipY) {
-				this.c = -this.c;
-				this.d = -this.d;
-			}
+			this.a *= this.skeleton.scaleX;
+			this.b *= this.skeleton.scaleX;
+			this.c *= this.skeleton.scaleY;
+			this.d *= this.skeleton.scaleY;
 		};
 		};
 		Bone.prototype.setToSetupPose = function () {
 		Bone.prototype.setToSetupPose = function () {
 			var data = this.data;
 			var data = this.data;
@@ -3386,8 +3366,8 @@ var spine;
 			this._updateCache = new Array();
 			this._updateCache = new Array();
 			this.updateCacheReset = new Array();
 			this.updateCacheReset = new Array();
 			this.time = 0;
 			this.time = 0;
-			this.flipX = false;
-			this.flipY = false;
+			this.scaleX = 1;
+			this.scaleY = 1;
 			this.x = 0;
 			this.x = 0;
 			this.y = 0;
 			this.y = 0;
 			if (data == null)
 			if (data == null)

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


+ 22 - 22
spine-ts/build/spine-core.d.ts

@@ -16,11 +16,11 @@ declare module spine {
 		setup = 0,
 		setup = 0,
 		first = 1,
 		first = 1,
 		replace = 2,
 		replace = 2,
-		add = 3,
+		add = 3
 	}
 	}
 	enum MixDirection {
 	enum MixDirection {
 		in = 0,
 		in = 0,
-		out = 1,
+		out = 1
 	}
 	}
 	enum TimelineType {
 	enum TimelineType {
 		rotate = 0,
 		rotate = 0,
@@ -37,7 +37,7 @@ declare module spine {
 		pathConstraintPosition = 11,
 		pathConstraintPosition = 11,
 		pathConstraintSpacing = 12,
 		pathConstraintSpacing = 12,
 		pathConstraintMix = 13,
 		pathConstraintMix = 13,
-		twoColor = 14,
+		twoColor = 14
 	}
 	}
 	abstract class CurveTimeline implements Timeline {
 	abstract class CurveTimeline implements Timeline {
 		static LINEAR: number;
 		static LINEAR: number;
@@ -336,7 +336,7 @@ declare module spine {
 		end = 2,
 		end = 2,
 		dispose = 3,
 		dispose = 3,
 		complete = 4,
 		complete = 4,
-		event = 5,
+		event = 5
 	}
 	}
 	interface AnimationStateListener2 {
 	interface AnimationStateListener2 {
 		start(entry: TrackEntry): void;
 		start(entry: TrackEntry): void;
@@ -375,8 +375,8 @@ declare module spine {
 		private toLoad;
 		private toLoad;
 		private loaded;
 		private loaded;
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
-		private static downloadText(url, success, error);
-		private static downloadBinary(url, success, error);
+		private static downloadText;
+		private static downloadBinary;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
@@ -409,7 +409,7 @@ declare module spine {
 		Normal = 0,
 		Normal = 0,
 		Additive = 1,
 		Additive = 1,
 		Multiply = 2,
 		Multiply = 2,
-		Screen = 3,
+		Screen = 3
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -478,7 +478,7 @@ declare module spine {
 		OnlyTranslation = 1,
 		OnlyTranslation = 1,
 		NoRotationOrReflection = 2,
 		NoRotationOrReflection = 2,
 		NoScale = 3,
 		NoScale = 3,
-		NoScaleOrReflection = 4,
+		NoScaleOrReflection = 4
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -578,17 +578,17 @@ declare module spine {
 	}
 	}
 	enum PositionMode {
 	enum PositionMode {
 		Fixed = 0,
 		Fixed = 0,
-		Percent = 1,
+		Percent = 1
 	}
 	}
 	enum SpacingMode {
 	enum SpacingMode {
 		Length = 0,
 		Length = 0,
 		Fixed = 1,
 		Fixed = 1,
-		Percent = 2,
+		Percent = 2
 	}
 	}
 	enum RotateMode {
 	enum RotateMode {
 		Tangent = 0,
 		Tangent = 0,
 		Chain = 1,
 		Chain = 1,
-		ChainScale = 2,
+		ChainScale = 2
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -599,12 +599,12 @@ declare module spine {
 		private rawAssets;
 		private rawAssets;
 		private errors;
 		private errors;
 		constructor(pathPrefix?: string);
 		constructor(pathPrefix?: string);
-		private queueAsset(clientId, textureLoader, path);
+		private queueAsset;
 		loadText(clientId: string, path: string): void;
 		loadText(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		get(clientId: string, path: string): any;
 		get(clientId: string, path: string): any;
-		private updateClientAssets(clientAssets);
+		private updateClientAssets;
 		isLoadingComplete(clientId: string): boolean;
 		isLoadingComplete(clientId: string): boolean;
 		dispose(): void;
 		dispose(): void;
 		hasErrors(): boolean;
 		hasErrors(): boolean;
@@ -625,8 +625,8 @@ declare module spine {
 		skin: Skin;
 		skin: Skin;
 		color: Color;
 		color: Color;
 		time: number;
 		time: number;
-		flipX: boolean;
-		flipY: boolean;
+		scaleX: number;
+		scaleY: number;
 		x: number;
 		x: number;
 		y: number;
 		y: number;
 		constructor(data: SkeletonData);
 		constructor(data: SkeletonData);
@@ -808,12 +808,12 @@ declare module spine {
 		MipMapNearestNearest = 9984,
 		MipMapNearestNearest = 9984,
 		MipMapLinearNearest = 9985,
 		MipMapLinearNearest = 9985,
 		MipMapNearestLinear = 9986,
 		MipMapNearestLinear = 9986,
-		MipMapLinearLinear = 9987,
+		MipMapLinearLinear = 9987
 	}
 	}
 	enum TextureWrap {
 	enum TextureWrap {
 		MirroredRepeat = 33648,
 		MirroredRepeat = 33648,
 		ClampToEdge = 33071,
 		ClampToEdge = 33071,
-		Repeat = 10497,
+		Repeat = 10497
 	}
 	}
 	class TextureRegion {
 	class TextureRegion {
 		renderObject: any;
 		renderObject: any;
@@ -840,7 +840,7 @@ declare module spine {
 		pages: TextureAtlasPage[];
 		pages: TextureAtlasPage[];
 		regions: TextureAtlasRegion[];
 		regions: TextureAtlasRegion[];
 		constructor(atlasText: string, textureLoader: (path: string) => any);
 		constructor(atlasText: string, textureLoader: (path: string) => any);
-		private load(atlasText, textureLoader);
+		private load;
 		findRegion(name: string): TextureAtlasRegion;
 		findRegion(name: string): TextureAtlasRegion;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
@@ -916,9 +916,9 @@ declare module spine {
 		private polygonIndicesPool;
 		private polygonIndicesPool;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
-		private static isConcave(index, vertexCount, vertices, indices);
-		private static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y);
-		private static winding(p1x, p1y, p2x, p2y, p3x, p3y);
+		private static isConcave;
+		private static positiveArea;
+		private static winding;
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1090,7 +1090,7 @@ declare module spine {
 		Mesh = 2,
 		Mesh = 2,
 		LinkedMesh = 3,
 		LinkedMesh = 3,
 		Path = 4,
 		Path = 4,
-		Point = 5,
+		Point = 5
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {

+ 18 - 38
spine-ts/build/spine-core.js

@@ -2358,28 +2358,16 @@ var spine;
 			this.appliedValid = true;
 			this.appliedValid = true;
 			var parent = this.parent;
 			var parent = this.parent;
 			if (parent == null) {
 			if (parent == null) {
-				var rotationY = rotation + 90 + shearY;
-				var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;
-				var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;
-				var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;
-				var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;
 				var skeleton = this.skeleton;
 				var skeleton = this.skeleton;
-				if (skeleton.flipX) {
-					x = -x;
-					la = -la;
-					lb = -lb;
-				}
-				if (skeleton.flipY) {
-					y = -y;
-					lc = -lc;
-					ld = -ld;
-				}
-				this.a = la;
-				this.b = lb;
-				this.c = lc;
-				this.d = ld;
-				this.worldX = x + skeleton.x;
-				this.worldY = y + skeleton.y;
+				var rotationY = rotation + 90 + shearY;
+				var sx = skeleton.scaleX;
+				var sy = skeleton.scaleY;
+				this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;
+				this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sy;
+				this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sx;
+				this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;
+				this.worldX = x * sx + skeleton.x;
+				this.worldY = y * sy + skeleton.y;
 				return;
 				return;
 			}
 			}
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
@@ -2436,8 +2424,8 @@ var spine;
 				case spine.TransformMode.NoScaleOrReflection: {
 				case spine.TransformMode.NoScaleOrReflection: {
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
-					var za = pa * cos + pb * sin;
-					var zc = pc * cos + pd * sin;
+					var za = (pa * cos + pb * sin) / this.skeleton.scaleX;
+					var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;
 					var s = Math.sqrt(za * za + zc * zc);
 					var s = Math.sqrt(za * za + zc * zc);
 					if (s > 0.00001)
 					if (s > 0.00001)
 						s = 1 / s;
 						s = 1 / s;
@@ -2451,25 +2439,17 @@ var spine;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
-					if (this.data.transformMode != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
-						zb = -zb;
-						zd = -zd;
-					}
 					this.a = za * la + zb * lc;
 					this.a = za * la + zb * lc;
 					this.b = za * lb + zb * ld;
 					this.b = za * lb + zb * ld;
 					this.c = zc * la + zd * lc;
 					this.c = zc * la + zd * lc;
 					this.d = zc * lb + zd * ld;
 					this.d = zc * lb + zd * ld;
-					return;
+					break;
 				}
 				}
 			}
 			}
-			if (this.skeleton.flipX) {
-				this.a = -this.a;
-				this.b = -this.b;
-			}
-			if (this.skeleton.flipY) {
-				this.c = -this.c;
-				this.d = -this.d;
-			}
+			this.a *= this.skeleton.scaleX;
+			this.b *= this.skeleton.scaleX;
+			this.c *= this.skeleton.scaleY;
+			this.d *= this.skeleton.scaleY;
 		};
 		};
 		Bone.prototype.setToSetupPose = function () {
 		Bone.prototype.setToSetupPose = function () {
 			var data = this.data;
 			var data = this.data;
@@ -3386,8 +3366,8 @@ var spine;
 			this._updateCache = new Array();
 			this._updateCache = new Array();
 			this.updateCacheReset = new Array();
 			this.updateCacheReset = new Array();
 			this.time = 0;
 			this.time = 0;
-			this.flipX = false;
-			this.flipY = false;
+			this.scaleX = 1;
+			this.scaleY = 1;
 			this.x = 0;
 			this.x = 0;
 			this.y = 0;
 			this.y = 0;
 			if (data == null)
 			if (data == null)

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


+ 25 - 25
spine-ts/build/spine-threejs.d.ts

@@ -16,11 +16,11 @@ declare module spine {
 		setup = 0,
 		setup = 0,
 		first = 1,
 		first = 1,
 		replace = 2,
 		replace = 2,
-		add = 3,
+		add = 3
 	}
 	}
 	enum MixDirection {
 	enum MixDirection {
 		in = 0,
 		in = 0,
-		out = 1,
+		out = 1
 	}
 	}
 	enum TimelineType {
 	enum TimelineType {
 		rotate = 0,
 		rotate = 0,
@@ -37,7 +37,7 @@ declare module spine {
 		pathConstraintPosition = 11,
 		pathConstraintPosition = 11,
 		pathConstraintSpacing = 12,
 		pathConstraintSpacing = 12,
 		pathConstraintMix = 13,
 		pathConstraintMix = 13,
-		twoColor = 14,
+		twoColor = 14
 	}
 	}
 	abstract class CurveTimeline implements Timeline {
 	abstract class CurveTimeline implements Timeline {
 		static LINEAR: number;
 		static LINEAR: number;
@@ -336,7 +336,7 @@ declare module spine {
 		end = 2,
 		end = 2,
 		dispose = 3,
 		dispose = 3,
 		complete = 4,
 		complete = 4,
-		event = 5,
+		event = 5
 	}
 	}
 	interface AnimationStateListener2 {
 	interface AnimationStateListener2 {
 		start(entry: TrackEntry): void;
 		start(entry: TrackEntry): void;
@@ -375,8 +375,8 @@ declare module spine {
 		private toLoad;
 		private toLoad;
 		private loaded;
 		private loaded;
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
-		private static downloadText(url, success, error);
-		private static downloadBinary(url, success, error);
+		private static downloadText;
+		private static downloadBinary;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
@@ -409,7 +409,7 @@ declare module spine {
 		Normal = 0,
 		Normal = 0,
 		Additive = 1,
 		Additive = 1,
 		Multiply = 2,
 		Multiply = 2,
-		Screen = 3,
+		Screen = 3
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -478,7 +478,7 @@ declare module spine {
 		OnlyTranslation = 1,
 		OnlyTranslation = 1,
 		NoRotationOrReflection = 2,
 		NoRotationOrReflection = 2,
 		NoScale = 3,
 		NoScale = 3,
-		NoScaleOrReflection = 4,
+		NoScaleOrReflection = 4
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -578,17 +578,17 @@ declare module spine {
 	}
 	}
 	enum PositionMode {
 	enum PositionMode {
 		Fixed = 0,
 		Fixed = 0,
-		Percent = 1,
+		Percent = 1
 	}
 	}
 	enum SpacingMode {
 	enum SpacingMode {
 		Length = 0,
 		Length = 0,
 		Fixed = 1,
 		Fixed = 1,
-		Percent = 2,
+		Percent = 2
 	}
 	}
 	enum RotateMode {
 	enum RotateMode {
 		Tangent = 0,
 		Tangent = 0,
 		Chain = 1,
 		Chain = 1,
-		ChainScale = 2,
+		ChainScale = 2
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -599,12 +599,12 @@ declare module spine {
 		private rawAssets;
 		private rawAssets;
 		private errors;
 		private errors;
 		constructor(pathPrefix?: string);
 		constructor(pathPrefix?: string);
-		private queueAsset(clientId, textureLoader, path);
+		private queueAsset;
 		loadText(clientId: string, path: string): void;
 		loadText(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		get(clientId: string, path: string): any;
 		get(clientId: string, path: string): any;
-		private updateClientAssets(clientAssets);
+		private updateClientAssets;
 		isLoadingComplete(clientId: string): boolean;
 		isLoadingComplete(clientId: string): boolean;
 		dispose(): void;
 		dispose(): void;
 		hasErrors(): boolean;
 		hasErrors(): boolean;
@@ -625,8 +625,8 @@ declare module spine {
 		skin: Skin;
 		skin: Skin;
 		color: Color;
 		color: Color;
 		time: number;
 		time: number;
-		flipX: boolean;
-		flipY: boolean;
+		scaleX: number;
+		scaleY: number;
 		x: number;
 		x: number;
 		y: number;
 		y: number;
 		constructor(data: SkeletonData);
 		constructor(data: SkeletonData);
@@ -808,12 +808,12 @@ declare module spine {
 		MipMapNearestNearest = 9984,
 		MipMapNearestNearest = 9984,
 		MipMapLinearNearest = 9985,
 		MipMapLinearNearest = 9985,
 		MipMapNearestLinear = 9986,
 		MipMapNearestLinear = 9986,
-		MipMapLinearLinear = 9987,
+		MipMapLinearLinear = 9987
 	}
 	}
 	enum TextureWrap {
 	enum TextureWrap {
 		MirroredRepeat = 33648,
 		MirroredRepeat = 33648,
 		ClampToEdge = 33071,
 		ClampToEdge = 33071,
-		Repeat = 10497,
+		Repeat = 10497
 	}
 	}
 	class TextureRegion {
 	class TextureRegion {
 		renderObject: any;
 		renderObject: any;
@@ -840,7 +840,7 @@ declare module spine {
 		pages: TextureAtlasPage[];
 		pages: TextureAtlasPage[];
 		regions: TextureAtlasRegion[];
 		regions: TextureAtlasRegion[];
 		constructor(atlasText: string, textureLoader: (path: string) => any);
 		constructor(atlasText: string, textureLoader: (path: string) => any);
-		private load(atlasText, textureLoader);
+		private load;
 		findRegion(name: string): TextureAtlasRegion;
 		findRegion(name: string): TextureAtlasRegion;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
@@ -916,9 +916,9 @@ declare module spine {
 		private polygonIndicesPool;
 		private polygonIndicesPool;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
-		private static isConcave(index, vertexCount, vertices, indices);
-		private static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y);
-		private static winding(p1x, p1y, p2x, p2y, p3x, p3y);
+		private static isConcave;
+		private static positiveArea;
+		private static winding;
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1090,7 +1090,7 @@ declare module spine {
 		Mesh = 2,
 		Mesh = 2,
 		LinkedMesh = 3,
 		LinkedMesh = 3,
 		Path = 4,
 		Path = 4,
-		Point = 5,
+		Point = 5
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1275,9 +1275,9 @@ declare module spine.threejs {
 		private tempColor;
 		private tempColor;
 		constructor(skeletonData: SkeletonData);
 		constructor(skeletonData: SkeletonData);
 		update(deltaTime: number): void;
 		update(deltaTime: number): void;
-		private clearBatches();
-		private nextBatch();
-		private updateGeometry();
+		private clearBatches;
+		private nextBatch;
+		private updateGeometry;
 	}
 	}
 }
 }
 declare module spine.threejs {
 declare module spine.threejs {

+ 18 - 38
spine-ts/build/spine-threejs.js

@@ -2358,28 +2358,16 @@ var spine;
 			this.appliedValid = true;
 			this.appliedValid = true;
 			var parent = this.parent;
 			var parent = this.parent;
 			if (parent == null) {
 			if (parent == null) {
-				var rotationY = rotation + 90 + shearY;
-				var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;
-				var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;
-				var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;
-				var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;
 				var skeleton = this.skeleton;
 				var skeleton = this.skeleton;
-				if (skeleton.flipX) {
-					x = -x;
-					la = -la;
-					lb = -lb;
-				}
-				if (skeleton.flipY) {
-					y = -y;
-					lc = -lc;
-					ld = -ld;
-				}
-				this.a = la;
-				this.b = lb;
-				this.c = lc;
-				this.d = ld;
-				this.worldX = x + skeleton.x;
-				this.worldY = y + skeleton.y;
+				var rotationY = rotation + 90 + shearY;
+				var sx = skeleton.scaleX;
+				var sy = skeleton.scaleY;
+				this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;
+				this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sy;
+				this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sx;
+				this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;
+				this.worldX = x * sx + skeleton.x;
+				this.worldY = y * sy + skeleton.y;
 				return;
 				return;
 			}
 			}
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
@@ -2436,8 +2424,8 @@ var spine;
 				case spine.TransformMode.NoScaleOrReflection: {
 				case spine.TransformMode.NoScaleOrReflection: {
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
-					var za = pa * cos + pb * sin;
-					var zc = pc * cos + pd * sin;
+					var za = (pa * cos + pb * sin) / this.skeleton.scaleX;
+					var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;
 					var s = Math.sqrt(za * za + zc * zc);
 					var s = Math.sqrt(za * za + zc * zc);
 					if (s > 0.00001)
 					if (s > 0.00001)
 						s = 1 / s;
 						s = 1 / s;
@@ -2451,25 +2439,17 @@ var spine;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
-					if (this.data.transformMode != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
-						zb = -zb;
-						zd = -zd;
-					}
 					this.a = za * la + zb * lc;
 					this.a = za * la + zb * lc;
 					this.b = za * lb + zb * ld;
 					this.b = za * lb + zb * ld;
 					this.c = zc * la + zd * lc;
 					this.c = zc * la + zd * lc;
 					this.d = zc * lb + zd * ld;
 					this.d = zc * lb + zd * ld;
-					return;
+					break;
 				}
 				}
 			}
 			}
-			if (this.skeleton.flipX) {
-				this.a = -this.a;
-				this.b = -this.b;
-			}
-			if (this.skeleton.flipY) {
-				this.c = -this.c;
-				this.d = -this.d;
-			}
+			this.a *= this.skeleton.scaleX;
+			this.b *= this.skeleton.scaleX;
+			this.c *= this.skeleton.scaleY;
+			this.d *= this.skeleton.scaleY;
 		};
 		};
 		Bone.prototype.setToSetupPose = function () {
 		Bone.prototype.setToSetupPose = function () {
 			var data = this.data;
 			var data = this.data;
@@ -3386,8 +3366,8 @@ var spine;
 			this._updateCache = new Array();
 			this._updateCache = new Array();
 			this.updateCacheReset = new Array();
 			this.updateCacheReset = new Array();
 			this.time = 0;
 			this.time = 0;
-			this.flipX = false;
-			this.flipY = false;
+			this.scaleX = 1;
+			this.scaleY = 1;
 			this.x = 0;
 			this.x = 0;
 			this.y = 0;
 			this.y = 0;
 			if (data == null)
 			if (data == null)

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


+ 35 - 35
spine-ts/build/spine-webgl.d.ts

@@ -16,11 +16,11 @@ declare module spine {
 		setup = 0,
 		setup = 0,
 		first = 1,
 		first = 1,
 		replace = 2,
 		replace = 2,
-		add = 3,
+		add = 3
 	}
 	}
 	enum MixDirection {
 	enum MixDirection {
 		in = 0,
 		in = 0,
-		out = 1,
+		out = 1
 	}
 	}
 	enum TimelineType {
 	enum TimelineType {
 		rotate = 0,
 		rotate = 0,
@@ -37,7 +37,7 @@ declare module spine {
 		pathConstraintPosition = 11,
 		pathConstraintPosition = 11,
 		pathConstraintSpacing = 12,
 		pathConstraintSpacing = 12,
 		pathConstraintMix = 13,
 		pathConstraintMix = 13,
-		twoColor = 14,
+		twoColor = 14
 	}
 	}
 	abstract class CurveTimeline implements Timeline {
 	abstract class CurveTimeline implements Timeline {
 		static LINEAR: number;
 		static LINEAR: number;
@@ -336,7 +336,7 @@ declare module spine {
 		end = 2,
 		end = 2,
 		dispose = 3,
 		dispose = 3,
 		complete = 4,
 		complete = 4,
-		event = 5,
+		event = 5
 	}
 	}
 	interface AnimationStateListener2 {
 	interface AnimationStateListener2 {
 		start(entry: TrackEntry): void;
 		start(entry: TrackEntry): void;
@@ -375,8 +375,8 @@ declare module spine {
 		private toLoad;
 		private toLoad;
 		private loaded;
 		private loaded;
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
-		private static downloadText(url, success, error);
-		private static downloadBinary(url, success, error);
+		private static downloadText;
+		private static downloadBinary;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
@@ -409,7 +409,7 @@ declare module spine {
 		Normal = 0,
 		Normal = 0,
 		Additive = 1,
 		Additive = 1,
 		Multiply = 2,
 		Multiply = 2,
-		Screen = 3,
+		Screen = 3
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -478,7 +478,7 @@ declare module spine {
 		OnlyTranslation = 1,
 		OnlyTranslation = 1,
 		NoRotationOrReflection = 2,
 		NoRotationOrReflection = 2,
 		NoScale = 3,
 		NoScale = 3,
-		NoScaleOrReflection = 4,
+		NoScaleOrReflection = 4
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -578,17 +578,17 @@ declare module spine {
 	}
 	}
 	enum PositionMode {
 	enum PositionMode {
 		Fixed = 0,
 		Fixed = 0,
-		Percent = 1,
+		Percent = 1
 	}
 	}
 	enum SpacingMode {
 	enum SpacingMode {
 		Length = 0,
 		Length = 0,
 		Fixed = 1,
 		Fixed = 1,
-		Percent = 2,
+		Percent = 2
 	}
 	}
 	enum RotateMode {
 	enum RotateMode {
 		Tangent = 0,
 		Tangent = 0,
 		Chain = 1,
 		Chain = 1,
-		ChainScale = 2,
+		ChainScale = 2
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -599,12 +599,12 @@ declare module spine {
 		private rawAssets;
 		private rawAssets;
 		private errors;
 		private errors;
 		constructor(pathPrefix?: string);
 		constructor(pathPrefix?: string);
-		private queueAsset(clientId, textureLoader, path);
+		private queueAsset;
 		loadText(clientId: string, path: string): void;
 		loadText(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		get(clientId: string, path: string): any;
 		get(clientId: string, path: string): any;
-		private updateClientAssets(clientAssets);
+		private updateClientAssets;
 		isLoadingComplete(clientId: string): boolean;
 		isLoadingComplete(clientId: string): boolean;
 		dispose(): void;
 		dispose(): void;
 		hasErrors(): boolean;
 		hasErrors(): boolean;
@@ -625,8 +625,8 @@ declare module spine {
 		skin: Skin;
 		skin: Skin;
 		color: Color;
 		color: Color;
 		time: number;
 		time: number;
-		flipX: boolean;
-		flipY: boolean;
+		scaleX: number;
+		scaleY: number;
 		x: number;
 		x: number;
 		y: number;
 		y: number;
 		constructor(data: SkeletonData);
 		constructor(data: SkeletonData);
@@ -808,12 +808,12 @@ declare module spine {
 		MipMapNearestNearest = 9984,
 		MipMapNearestNearest = 9984,
 		MipMapLinearNearest = 9985,
 		MipMapLinearNearest = 9985,
 		MipMapNearestLinear = 9986,
 		MipMapNearestLinear = 9986,
-		MipMapLinearLinear = 9987,
+		MipMapLinearLinear = 9987
 	}
 	}
 	enum TextureWrap {
 	enum TextureWrap {
 		MirroredRepeat = 33648,
 		MirroredRepeat = 33648,
 		ClampToEdge = 33071,
 		ClampToEdge = 33071,
-		Repeat = 10497,
+		Repeat = 10497
 	}
 	}
 	class TextureRegion {
 	class TextureRegion {
 		renderObject: any;
 		renderObject: any;
@@ -840,7 +840,7 @@ declare module spine {
 		pages: TextureAtlasPage[];
 		pages: TextureAtlasPage[];
 		regions: TextureAtlasRegion[];
 		regions: TextureAtlasRegion[];
 		constructor(atlasText: string, textureLoader: (path: string) => any);
 		constructor(atlasText: string, textureLoader: (path: string) => any);
-		private load(atlasText, textureLoader);
+		private load;
 		findRegion(name: string): TextureAtlasRegion;
 		findRegion(name: string): TextureAtlasRegion;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
@@ -916,9 +916,9 @@ declare module spine {
 		private polygonIndicesPool;
 		private polygonIndicesPool;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
-		private static isConcave(index, vertexCount, vertices, indices);
-		private static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y);
-		private static winding(p1x, p1y, p2x, p2y, p3x, p3y);
+		private static isConcave;
+		private static positiveArea;
+		private static winding;
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1090,7 +1090,7 @@ declare module spine {
 		Mesh = 2,
 		Mesh = 2,
 		LinkedMesh = 3,
 		LinkedMesh = 3,
 		Path = 4,
 		Path = 4,
-		Point = 5,
+		Point = 5
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1284,7 +1284,7 @@ declare module spine.webgl {
 		touchesPool: Pool<Touch>;
 		touchesPool: Pool<Touch>;
 		private listeners;
 		private listeners;
 		constructor(element: HTMLElement);
 		constructor(element: HTMLElement);
-		private setupCallbacks(element);
+		private setupCallbacks;
 		addListener(listener: InputListener): void;
 		addListener(listener: InputListener): void;
 		removeListener(listener: InputListener): void;
 		removeListener(listener: InputListener): void;
 	}
 	}
@@ -1393,7 +1393,7 @@ declare module spine.webgl {
 		drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void;
 		drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void;
 		bind(shader: Shader): void;
 		bind(shader: Shader): void;
 		unbind(shader: Shader): void;
 		unbind(shader: Shader): void;
-		private update();
+		private update;
 		restore(): void;
 		restore(): void;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
@@ -1419,7 +1419,7 @@ declare module spine.webgl {
 		constructor();
 		constructor();
 	}
 	}
 	enum VertexAttributeType {
 	enum VertexAttributeType {
-		Float = 0,
+		Float = 0
 	}
 	}
 }
 }
 declare module spine.webgl {
 declare module spine.webgl {
@@ -1438,7 +1438,7 @@ declare module spine.webgl {
 		begin(shader: Shader): void;
 		begin(shader: Shader): void;
 		setBlendMode(srcBlend: number, dstBlend: number): void;
 		setBlendMode(srcBlend: number, dstBlend: number): void;
 		draw(texture: GLTexture, vertices: ArrayLike<number>, indices: Array<number>): void;
 		draw(texture: GLTexture, vertices: ArrayLike<number>, indices: Array<number>): void;
-		private flush();
+		private flush;
 		end(): void;
 		end(): void;
 		getDrawCalls(): number;
 		getDrawCalls(): number;
 		dispose(): void;
 		dispose(): void;
@@ -1478,13 +1478,13 @@ declare module spine.webgl {
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
 		end(): void;
 		end(): void;
 		resize(resizeMode: ResizeMode): void;
 		resize(resizeMode: ResizeMode): void;
-		private enableRenderer(renderer);
+		private enableRenderer;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
 	enum ResizeMode {
 	enum ResizeMode {
 		Stretch = 0,
 		Stretch = 0,
 		Expand = 1,
 		Expand = 1,
-		Fit = 2,
+		Fit = 2
 	}
 	}
 }
 }
 declare module spine.webgl {
 declare module spine.webgl {
@@ -1512,9 +1512,9 @@ declare module spine.webgl {
 		getVertexShaderSource(): string;
 		getVertexShaderSource(): string;
 		getFragmentSource(): string;
 		getFragmentSource(): string;
 		constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, vertexShader: string, fragmentShader: string);
 		constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, vertexShader: string, fragmentShader: string);
-		private compile();
-		private compileShader(type, source);
-		private compileProgram(vs, fs);
+		private compile;
+		private compileShader;
+		private compileProgram;
 		restore(): void;
 		restore(): void;
 		bind(): void;
 		bind(): void;
 		unbind(): void;
 		unbind(): void;
@@ -1561,16 +1561,16 @@ declare module spine.webgl {
 		polygon(polygonVertices: ArrayLike<number>, offset: number, count: number, color?: Color): void;
 		polygon(polygonVertices: ArrayLike<number>, offset: number, count: number, color?: Color): void;
 		circle(filled: boolean, x: number, y: number, radius: number, color?: Color, segments?: number): void;
 		circle(filled: boolean, x: number, y: number, radius: number, color?: Color, segments?: number): void;
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
-		private vertex(x, y, color);
+		private vertex;
 		end(): void;
 		end(): void;
-		private flush();
-		private check(shapeType, numVertices);
+		private flush;
+		private check;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
 	enum ShapeType {
 	enum ShapeType {
 		Point = 0,
 		Point = 0,
 		Line = 1,
 		Line = 1,
-		Filled = 4,
+		Filled = 4
 	}
 	}
 }
 }
 declare module spine.webgl {
 declare module spine.webgl {

+ 18 - 38
spine-ts/build/spine-webgl.js

@@ -2358,28 +2358,16 @@ var spine;
 			this.appliedValid = true;
 			this.appliedValid = true;
 			var parent = this.parent;
 			var parent = this.parent;
 			if (parent == null) {
 			if (parent == null) {
-				var rotationY = rotation + 90 + shearY;
-				var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;
-				var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;
-				var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;
-				var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;
 				var skeleton = this.skeleton;
 				var skeleton = this.skeleton;
-				if (skeleton.flipX) {
-					x = -x;
-					la = -la;
-					lb = -lb;
-				}
-				if (skeleton.flipY) {
-					y = -y;
-					lc = -lc;
-					ld = -ld;
-				}
-				this.a = la;
-				this.b = lb;
-				this.c = lc;
-				this.d = ld;
-				this.worldX = x + skeleton.x;
-				this.worldY = y + skeleton.y;
+				var rotationY = rotation + 90 + shearY;
+				var sx = skeleton.scaleX;
+				var sy = skeleton.scaleY;
+				this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;
+				this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sy;
+				this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sx;
+				this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;
+				this.worldX = x * sx + skeleton.x;
+				this.worldY = y * sy + skeleton.y;
 				return;
 				return;
 			}
 			}
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
@@ -2436,8 +2424,8 @@ var spine;
 				case spine.TransformMode.NoScaleOrReflection: {
 				case spine.TransformMode.NoScaleOrReflection: {
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
-					var za = pa * cos + pb * sin;
-					var zc = pc * cos + pd * sin;
+					var za = (pa * cos + pb * sin) / this.skeleton.scaleX;
+					var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;
 					var s = Math.sqrt(za * za + zc * zc);
 					var s = Math.sqrt(za * za + zc * zc);
 					if (s > 0.00001)
 					if (s > 0.00001)
 						s = 1 / s;
 						s = 1 / s;
@@ -2451,25 +2439,17 @@ var spine;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
-					if (this.data.transformMode != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
-						zb = -zb;
-						zd = -zd;
-					}
 					this.a = za * la + zb * lc;
 					this.a = za * la + zb * lc;
 					this.b = za * lb + zb * ld;
 					this.b = za * lb + zb * ld;
 					this.c = zc * la + zd * lc;
 					this.c = zc * la + zd * lc;
 					this.d = zc * lb + zd * ld;
 					this.d = zc * lb + zd * ld;
-					return;
+					break;
 				}
 				}
 			}
 			}
-			if (this.skeleton.flipX) {
-				this.a = -this.a;
-				this.b = -this.b;
-			}
-			if (this.skeleton.flipY) {
-				this.c = -this.c;
-				this.d = -this.d;
-			}
+			this.a *= this.skeleton.scaleX;
+			this.b *= this.skeleton.scaleX;
+			this.c *= this.skeleton.scaleY;
+			this.d *= this.skeleton.scaleY;
 		};
 		};
 		Bone.prototype.setToSetupPose = function () {
 		Bone.prototype.setToSetupPose = function () {
 			var data = this.data;
 			var data = this.data;
@@ -3386,8 +3366,8 @@ var spine;
 			this._updateCache = new Array();
 			this._updateCache = new Array();
 			this.updateCacheReset = new Array();
 			this.updateCacheReset = new Array();
 			this.time = 0;
 			this.time = 0;
-			this.flipX = false;
-			this.flipY = false;
+			this.scaleX = 1;
+			this.scaleY = 1;
 			this.x = 0;
 			this.x = 0;
 			this.y = 0;
 			this.y = 0;
 			if (data == null)
 			if (data == null)

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


+ 40 - 40
spine-ts/build/spine-widget.d.ts

@@ -16,11 +16,11 @@ declare module spine {
 		setup = 0,
 		setup = 0,
 		first = 1,
 		first = 1,
 		replace = 2,
 		replace = 2,
-		add = 3,
+		add = 3
 	}
 	}
 	enum MixDirection {
 	enum MixDirection {
 		in = 0,
 		in = 0,
-		out = 1,
+		out = 1
 	}
 	}
 	enum TimelineType {
 	enum TimelineType {
 		rotate = 0,
 		rotate = 0,
@@ -37,7 +37,7 @@ declare module spine {
 		pathConstraintPosition = 11,
 		pathConstraintPosition = 11,
 		pathConstraintSpacing = 12,
 		pathConstraintSpacing = 12,
 		pathConstraintMix = 13,
 		pathConstraintMix = 13,
-		twoColor = 14,
+		twoColor = 14
 	}
 	}
 	abstract class CurveTimeline implements Timeline {
 	abstract class CurveTimeline implements Timeline {
 		static LINEAR: number;
 		static LINEAR: number;
@@ -336,7 +336,7 @@ declare module spine {
 		end = 2,
 		end = 2,
 		dispose = 3,
 		dispose = 3,
 		complete = 4,
 		complete = 4,
-		event = 5,
+		event = 5
 	}
 	}
 	interface AnimationStateListener2 {
 	interface AnimationStateListener2 {
 		start(entry: TrackEntry): void;
 		start(entry: TrackEntry): void;
@@ -375,8 +375,8 @@ declare module spine {
 		private toLoad;
 		private toLoad;
 		private loaded;
 		private loaded;
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
 		constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string);
-		private static downloadText(url, success, error);
-		private static downloadBinary(url, success, error);
+		private static downloadText;
+		private static downloadBinary;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
 		loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void;
@@ -409,7 +409,7 @@ declare module spine {
 		Normal = 0,
 		Normal = 0,
 		Additive = 1,
 		Additive = 1,
 		Multiply = 2,
 		Multiply = 2,
-		Screen = 3,
+		Screen = 3
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -478,7 +478,7 @@ declare module spine {
 		OnlyTranslation = 1,
 		OnlyTranslation = 1,
 		NoRotationOrReflection = 2,
 		NoRotationOrReflection = 2,
 		NoScale = 3,
 		NoScale = 3,
-		NoScaleOrReflection = 4,
+		NoScaleOrReflection = 4
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -578,17 +578,17 @@ declare module spine {
 	}
 	}
 	enum PositionMode {
 	enum PositionMode {
 		Fixed = 0,
 		Fixed = 0,
-		Percent = 1,
+		Percent = 1
 	}
 	}
 	enum SpacingMode {
 	enum SpacingMode {
 		Length = 0,
 		Length = 0,
 		Fixed = 1,
 		Fixed = 1,
-		Percent = 2,
+		Percent = 2
 	}
 	}
 	enum RotateMode {
 	enum RotateMode {
 		Tangent = 0,
 		Tangent = 0,
 		Chain = 1,
 		Chain = 1,
-		ChainScale = 2,
+		ChainScale = 2
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -599,12 +599,12 @@ declare module spine {
 		private rawAssets;
 		private rawAssets;
 		private errors;
 		private errors;
 		constructor(pathPrefix?: string);
 		constructor(pathPrefix?: string);
-		private queueAsset(clientId, textureLoader, path);
+		private queueAsset;
 		loadText(clientId: string, path: string): void;
 		loadText(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadJson(clientId: string, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void;
 		get(clientId: string, path: string): any;
 		get(clientId: string, path: string): any;
-		private updateClientAssets(clientAssets);
+		private updateClientAssets;
 		isLoadingComplete(clientId: string): boolean;
 		isLoadingComplete(clientId: string): boolean;
 		dispose(): void;
 		dispose(): void;
 		hasErrors(): boolean;
 		hasErrors(): boolean;
@@ -625,8 +625,8 @@ declare module spine {
 		skin: Skin;
 		skin: Skin;
 		color: Color;
 		color: Color;
 		time: number;
 		time: number;
-		flipX: boolean;
-		flipY: boolean;
+		scaleX: number;
+		scaleY: number;
 		x: number;
 		x: number;
 		y: number;
 		y: number;
 		constructor(data: SkeletonData);
 		constructor(data: SkeletonData);
@@ -808,12 +808,12 @@ declare module spine {
 		MipMapNearestNearest = 9984,
 		MipMapNearestNearest = 9984,
 		MipMapLinearNearest = 9985,
 		MipMapLinearNearest = 9985,
 		MipMapNearestLinear = 9986,
 		MipMapNearestLinear = 9986,
-		MipMapLinearLinear = 9987,
+		MipMapLinearLinear = 9987
 	}
 	}
 	enum TextureWrap {
 	enum TextureWrap {
 		MirroredRepeat = 33648,
 		MirroredRepeat = 33648,
 		ClampToEdge = 33071,
 		ClampToEdge = 33071,
-		Repeat = 10497,
+		Repeat = 10497
 	}
 	}
 	class TextureRegion {
 	class TextureRegion {
 		renderObject: any;
 		renderObject: any;
@@ -840,7 +840,7 @@ declare module spine {
 		pages: TextureAtlasPage[];
 		pages: TextureAtlasPage[];
 		regions: TextureAtlasRegion[];
 		regions: TextureAtlasRegion[];
 		constructor(atlasText: string, textureLoader: (path: string) => any);
 		constructor(atlasText: string, textureLoader: (path: string) => any);
-		private load(atlasText, textureLoader);
+		private load;
 		findRegion(name: string): TextureAtlasRegion;
 		findRegion(name: string): TextureAtlasRegion;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
@@ -916,9 +916,9 @@ declare module spine {
 		private polygonIndicesPool;
 		private polygonIndicesPool;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		triangulate(verticesArray: ArrayLike<number>): Array<number>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
 		decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
-		private static isConcave(index, vertexCount, vertices, indices);
-		private static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y);
-		private static winding(p1x, p1y, p2x, p2y, p3x, p3y);
+		private static isConcave;
+		private static positiveArea;
+		private static winding;
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1090,7 +1090,7 @@ declare module spine {
 		Mesh = 2,
 		Mesh = 2,
 		LinkedMesh = 3,
 		LinkedMesh = 3,
 		Path = 4,
 		Path = 4,
-		Point = 5,
+		Point = 5
 	}
 	}
 }
 }
 declare module spine {
 declare module spine {
@@ -1284,7 +1284,7 @@ declare module spine.webgl {
 		touchesPool: Pool<Touch>;
 		touchesPool: Pool<Touch>;
 		private listeners;
 		private listeners;
 		constructor(element: HTMLElement);
 		constructor(element: HTMLElement);
-		private setupCallbacks(element);
+		private setupCallbacks;
 		addListener(listener: InputListener): void;
 		addListener(listener: InputListener): void;
 		removeListener(listener: InputListener): void;
 		removeListener(listener: InputListener): void;
 	}
 	}
@@ -1393,7 +1393,7 @@ declare module spine.webgl {
 		drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void;
 		drawWithOffset(shader: Shader, primitiveType: number, offset: number, count: number): void;
 		bind(shader: Shader): void;
 		bind(shader: Shader): void;
 		unbind(shader: Shader): void;
 		unbind(shader: Shader): void;
-		private update();
+		private update;
 		restore(): void;
 		restore(): void;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
@@ -1419,7 +1419,7 @@ declare module spine.webgl {
 		constructor();
 		constructor();
 	}
 	}
 	enum VertexAttributeType {
 	enum VertexAttributeType {
-		Float = 0,
+		Float = 0
 	}
 	}
 }
 }
 declare module spine.webgl {
 declare module spine.webgl {
@@ -1438,7 +1438,7 @@ declare module spine.webgl {
 		begin(shader: Shader): void;
 		begin(shader: Shader): void;
 		setBlendMode(srcBlend: number, dstBlend: number): void;
 		setBlendMode(srcBlend: number, dstBlend: number): void;
 		draw(texture: GLTexture, vertices: ArrayLike<number>, indices: Array<number>): void;
 		draw(texture: GLTexture, vertices: ArrayLike<number>, indices: Array<number>): void;
-		private flush();
+		private flush;
 		end(): void;
 		end(): void;
 		getDrawCalls(): number;
 		getDrawCalls(): number;
 		dispose(): void;
 		dispose(): void;
@@ -1478,13 +1478,13 @@ declare module spine.webgl {
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
 		end(): void;
 		end(): void;
 		resize(resizeMode: ResizeMode): void;
 		resize(resizeMode: ResizeMode): void;
-		private enableRenderer(renderer);
+		private enableRenderer;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
 	enum ResizeMode {
 	enum ResizeMode {
 		Stretch = 0,
 		Stretch = 0,
 		Expand = 1,
 		Expand = 1,
-		Fit = 2,
+		Fit = 2
 	}
 	}
 }
 }
 declare module spine.webgl {
 declare module spine.webgl {
@@ -1512,9 +1512,9 @@ declare module spine.webgl {
 		getVertexShaderSource(): string;
 		getVertexShaderSource(): string;
 		getFragmentSource(): string;
 		getFragmentSource(): string;
 		constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, vertexShader: string, fragmentShader: string);
 		constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, vertexShader: string, fragmentShader: string);
-		private compile();
-		private compileShader(type, source);
-		private compileProgram(vs, fs);
+		private compile;
+		private compileShader;
+		private compileProgram;
 		restore(): void;
 		restore(): void;
 		bind(): void;
 		bind(): void;
 		unbind(): void;
 		unbind(): void;
@@ -1561,16 +1561,16 @@ declare module spine.webgl {
 		polygon(polygonVertices: ArrayLike<number>, offset: number, count: number, color?: Color): void;
 		polygon(polygonVertices: ArrayLike<number>, offset: number, count: number, color?: Color): void;
 		circle(filled: boolean, x: number, y: number, radius: number, color?: Color, segments?: number): void;
 		circle(filled: boolean, x: number, y: number, radius: number, color?: Color, segments?: number): void;
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
 		curve(x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, segments: number, color?: Color): void;
-		private vertex(x, y, color);
+		private vertex;
 		end(): void;
 		end(): void;
-		private flush();
-		private check(shapeType, numVertices);
+		private flush;
+		private check;
 		dispose(): void;
 		dispose(): void;
 	}
 	}
 	enum ShapeType {
 	enum ShapeType {
 		Point = 0,
 		Point = 0,
 		Line = 1,
 		Line = 1,
-		Filled = 4,
+		Filled = 4
 	}
 	}
 }
 }
 declare module spine.webgl {
 declare module spine.webgl {
@@ -1688,10 +1688,10 @@ declare module spine {
 		private loaded;
 		private loaded;
 		private bounds;
 		private bounds;
 		constructor(element: HTMLElement | string, config: SpineWidgetConfig);
 		constructor(element: HTMLElement | string, config: SpineWidgetConfig);
-		private validateConfig(config);
-		private load();
-		private render();
-		private resize();
+		private validateConfig;
+		private load;
+		private render;
+		private resize;
 		pause(): void;
 		pause(): void;
 		play(): void;
 		play(): void;
 		isPlaying(): boolean;
 		isPlaying(): boolean;
@@ -1699,7 +1699,7 @@ declare module spine {
 		static loadWidgets(): void;
 		static loadWidgets(): void;
 		static loadWidget(widget: HTMLElement): void;
 		static loadWidget(widget: HTMLElement): void;
 		static pageLoaded: boolean;
 		static pageLoaded: boolean;
-		private static ready();
+		private static ready;
 		static setupDOMListener(): void;
 		static setupDOMListener(): void;
 	}
 	}
 	class SpineWidgetConfig {
 	class SpineWidgetConfig {

+ 18 - 38
spine-ts/build/spine-widget.js

@@ -2358,28 +2358,16 @@ var spine;
 			this.appliedValid = true;
 			this.appliedValid = true;
 			var parent = this.parent;
 			var parent = this.parent;
 			if (parent == null) {
 			if (parent == null) {
-				var rotationY = rotation + 90 + shearY;
-				var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;
-				var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;
-				var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;
-				var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;
 				var skeleton = this.skeleton;
 				var skeleton = this.skeleton;
-				if (skeleton.flipX) {
-					x = -x;
-					la = -la;
-					lb = -lb;
-				}
-				if (skeleton.flipY) {
-					y = -y;
-					lc = -lc;
-					ld = -ld;
-				}
-				this.a = la;
-				this.b = lb;
-				this.c = lc;
-				this.d = ld;
-				this.worldX = x + skeleton.x;
-				this.worldY = y + skeleton.y;
+				var rotationY = rotation + 90 + shearY;
+				var sx = skeleton.scaleX;
+				var sy = skeleton.scaleY;
+				this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;
+				this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sy;
+				this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sx;
+				this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;
+				this.worldX = x * sx + skeleton.x;
+				this.worldY = y * sy + skeleton.y;
 				return;
 				return;
 			}
 			}
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
 			var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
@@ -2436,8 +2424,8 @@ var spine;
 				case spine.TransformMode.NoScaleOrReflection: {
 				case spine.TransformMode.NoScaleOrReflection: {
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var cos = spine.MathUtils.cosDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
 					var sin = spine.MathUtils.sinDeg(rotation);
-					var za = pa * cos + pb * sin;
-					var zc = pc * cos + pd * sin;
+					var za = (pa * cos + pb * sin) / this.skeleton.scaleX;
+					var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;
 					var s = Math.sqrt(za * za + zc * zc);
 					var s = Math.sqrt(za * za + zc * zc);
 					if (s > 0.00001)
 					if (s > 0.00001)
 						s = 1 / s;
 						s = 1 / s;
@@ -2451,25 +2439,17 @@ var spine;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
 					var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
-					if (this.data.transformMode != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
-						zb = -zb;
-						zd = -zd;
-					}
 					this.a = za * la + zb * lc;
 					this.a = za * la + zb * lc;
 					this.b = za * lb + zb * ld;
 					this.b = za * lb + zb * ld;
 					this.c = zc * la + zd * lc;
 					this.c = zc * la + zd * lc;
 					this.d = zc * lb + zd * ld;
 					this.d = zc * lb + zd * ld;
-					return;
+					break;
 				}
 				}
 			}
 			}
-			if (this.skeleton.flipX) {
-				this.a = -this.a;
-				this.b = -this.b;
-			}
-			if (this.skeleton.flipY) {
-				this.c = -this.c;
-				this.d = -this.d;
-			}
+			this.a *= this.skeleton.scaleX;
+			this.b *= this.skeleton.scaleX;
+			this.c *= this.skeleton.scaleY;
+			this.d *= this.skeleton.scaleY;
 		};
 		};
 		Bone.prototype.setToSetupPose = function () {
 		Bone.prototype.setToSetupPose = function () {
 			var data = this.data;
 			var data = this.data;
@@ -3386,8 +3366,8 @@ var spine;
 			this._updateCache = new Array();
 			this._updateCache = new Array();
 			this.updateCacheReset = new Array();
 			this.updateCacheReset = new Array();
 			this.time = 0;
 			this.time = 0;
-			this.flipX = false;
-			this.flipY = false;
+			this.scaleX = 1;
+			this.scaleY = 1;
 			this.x = 0;
 			this.x = 0;
 			this.y = 0;
 			this.y = 0;
 			if (data == null)
 			if (data == null)

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


+ 16 - 36
spine-ts/core/src/Bone.ts

@@ -76,28 +76,16 @@ module spine {
 
 
 			let parent = this.parent;
 			let parent = this.parent;
 			if (parent == null) { // Root bone.
 			if (parent == null) { // Root bone.
-				let rotationY = rotation + 90 + shearY;
-				let la = MathUtils.cosDeg(rotation + shearX) * scaleX;
-				let lb = MathUtils.cosDeg(rotationY) * scaleY;
-				let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;
-				let ld = MathUtils.sinDeg(rotationY) * scaleY;
 				let skeleton = this.skeleton;
 				let skeleton = this.skeleton;
-				if (skeleton.flipX) {
-					x = -x;
-					la = -la;
-					lb = -lb;
-				}
-				if (skeleton.flipY) {
-					y = -y;
-					lc = -lc;
-					ld = -ld;
-				}
-				this.a = la;
-				this.b = lb;
-				this.c = lc;
-				this.d = ld;
-				this.worldX = x + skeleton.x;
-				this.worldY = y + skeleton.y;
+				let rotationY = rotation + 90 + shearY;
+				let sx = skeleton.scaleX;
+				let sy = skeleton.scaleY;
+				this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;
+				this.b = MathUtils.cosDeg(rotationY) * scaleY * sy;
+				this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sx;
+				this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;
+				this.worldX = x * sx + skeleton.x;
+				this.worldY = y * sy + skeleton.y;
 				return;
 				return;
 			}
 			}
 
 
@@ -155,8 +143,8 @@ module spine {
 			case TransformMode.NoScaleOrReflection: {
 			case TransformMode.NoScaleOrReflection: {
 				let cos = MathUtils.cosDeg(rotation);
 				let cos = MathUtils.cosDeg(rotation);
 				let sin = MathUtils.sinDeg(rotation);
 				let sin = MathUtils.sinDeg(rotation);
-				let za = pa * cos + pb * sin;
-				let zc = pc * cos + pd * sin;
+				let za = (pa * cos + pb * sin) / this.skeleton.scaleX;
+				let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;
 				let s = Math.sqrt(za * za + zc * zc);
 				let s = Math.sqrt(za * za + zc * zc);
 				if (s > 0.00001) s = 1 / s;
 				if (s > 0.00001) s = 1 / s;
 				za *= s;
 				za *= s;
@@ -169,25 +157,17 @@ module spine {
 				let lb = MathUtils.cosDeg(90 + shearY) * scaleY;
 				let lb = MathUtils.cosDeg(90 + shearY) * scaleY;
 				let lc = MathUtils.sinDeg(shearX) * scaleX;
 				let lc = MathUtils.sinDeg(shearX) * scaleX;
 				let ld = MathUtils.sinDeg(90 + shearY) * scaleY;
 				let ld = MathUtils.sinDeg(90 + shearY) * scaleY;
-				if (this.data.transformMode != TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
-					zb = -zb;
-					zd = -zd;
-				}
 				this.a = za * la + zb * lc;
 				this.a = za * la + zb * lc;
 				this.b = za * lb + zb * ld;
 				this.b = za * lb + zb * ld;
 				this.c = zc * la + zd * lc;
 				this.c = zc * la + zd * lc;
 				this.d = zc * lb + zd * ld;
 				this.d = zc * lb + zd * ld;
-				return;
-			}
-			}
-			if (this.skeleton.flipX) {
-				this.a = -this.a;
-				this.b = -this.b;
+				break;
 			}
 			}
-			if (this.skeleton.flipY) {
-				this.c = -this.c;
-				this.d = -this.d;
 			}
 			}
+			this.a *= this.skeleton.scaleX;
+			this.b *= this.skeleton.scaleX;
+			this.c *= this.skeleton.scaleY;
+			this.d *= this.skeleton.scaleY;
 		}
 		}
 
 
 		setToSetupPose () {
 		setToSetupPose () {

+ 1 - 1
spine-ts/core/src/Skeleton.ts

@@ -42,7 +42,7 @@ module spine {
 		skin: Skin;
 		skin: Skin;
 		color: Color;
 		color: Color;
 		time = 0;
 		time = 0;
-		flipX = false; flipY = false;
+		scaleX = 1; scaleY = 1;
 		x = 0; y = 0;
 		x = 0; y = 0;
 
 
 		constructor (data: SkeletonData) {
 		constructor (data: SkeletonData) {

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