Преглед на файлове

[ts] Fixed RegionAttachment#setRegion, now actually sets the region property. Fixed up WebGL example

badlogic преди 9 години
родител
ревизия
b4788a6c42

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

@@ -3970,7 +3970,6 @@ var spine;
 			region.renderObject = region;
 			var attachment = new spine.RegionAttachment(name);
 			attachment.setRegion(region);
-			attachment.region = region;
 			return attachment;
 		};
 		TextureAtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {
@@ -4633,6 +4632,7 @@ var spine;
 				vertices[RegionAttachment.U4] = region.u2;
 				vertices[RegionAttachment.V4] = region.v2;
 			}
+			this.region = region;
 		};
 		RegionAttachment.prototype.updateOffset = function () {
 			var regionScaleX = this.width / this.region.originalWidth * this.scaleX;

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
spine-ts/build/spine-all.js.map


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

@@ -3793,7 +3793,6 @@ var spine;
 			region.renderObject = region;
 			var attachment = new spine.RegionAttachment(name);
 			attachment.setRegion(region);
-			attachment.region = region;
 			return attachment;
 		};
 		TextureAtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {
@@ -4456,6 +4455,7 @@ var spine;
 				vertices[RegionAttachment.U4] = region.u2;
 				vertices[RegionAttachment.V4] = region.v2;
 			}
+			this.region = region;
 		};
 		RegionAttachment.prototype.updateOffset = function () {
 			var regionScaleX = this.width / this.region.originalWidth * this.scaleX;

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
spine-ts/build/spine-core.js.map


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

@@ -3793,7 +3793,6 @@ var spine;
 			region.renderObject = region;
 			var attachment = new spine.RegionAttachment(name);
 			attachment.setRegion(region);
-			attachment.region = region;
 			return attachment;
 		};
 		TextureAtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {
@@ -4456,6 +4455,7 @@ var spine;
 				vertices[RegionAttachment.U4] = region.u2;
 				vertices[RegionAttachment.V4] = region.v2;
 			}
+			this.region = region;
 		};
 		RegionAttachment.prototype.updateOffset = function () {
 			var regionScaleX = this.width / this.region.originalWidth * this.scaleX;

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
spine-ts/build/spine-threejs.js.map


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

@@ -3793,7 +3793,6 @@ var spine;
 			region.renderObject = region;
 			var attachment = new spine.RegionAttachment(name);
 			attachment.setRegion(region);
-			attachment.region = region;
 			return attachment;
 		};
 		TextureAtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {
@@ -4456,6 +4455,7 @@ var spine;
 				vertices[RegionAttachment.U4] = region.u2;
 				vertices[RegionAttachment.V4] = region.v2;
 			}
+			this.region = region;
 		};
 		RegionAttachment.prototype.updateOffset = function () {
 			var regionScaleX = this.width / this.region.originalWidth * this.scaleX;

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
spine-ts/build/spine-webgl.js.map


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

@@ -3793,7 +3793,6 @@ var spine;
 			region.renderObject = region;
 			var attachment = new spine.RegionAttachment(name);
 			attachment.setRegion(region);
-			attachment.region = region;
 			return attachment;
 		};
 		TextureAtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {
@@ -4456,6 +4455,7 @@ var spine;
 				vertices[RegionAttachment.U4] = region.u2;
 				vertices[RegionAttachment.V4] = region.v2;
 			}
+			this.region = region;
 		};
 		RegionAttachment.prototype.updateOffset = function () {
 			var regionScaleX = this.width / this.region.originalWidth * this.scaleX;

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
spine-ts/build/spine-widget.js.map


+ 1 - 2
spine-ts/core/src/TextureAtlasAttachmentLoader.ts

@@ -43,8 +43,7 @@ module spine {
 			if (region == null) throw new Error("Region not found in atlas: " + path + " (region attachment: " + name + ")");
 			region.renderObject = region;
 			let attachment = new RegionAttachment(name);
-			attachment.setRegion(region);
-			attachment.region = region;
+			attachment.setRegion(region);			
 			return attachment;
 		}
 

+ 1 - 0
spine-ts/core/src/attachments/RegionAttachment.ts

@@ -113,6 +113,7 @@ module spine {
 				vertices[RegionAttachment.U4] = region.u2;
 				vertices[RegionAttachment.V4] = region.v2;
 			}
+			this.region = region;
 		}
 
 		updateOffset () : void {

+ 1 - 1
spine-ts/webgl/example/index.html

@@ -84,7 +84,7 @@ function load () {
 		skeletons["spineboy"] = loadSkeleton("spineboy", "run", false);
 		skeletons["raptor"] = loadSkeleton("raptor", "walk", false);
 		skeletons["tank"] = loadSkeleton("tank", "drive", false);
-		skeletons["goblins"] = loadSkeleton("goblins-mesh", "walk", true, "goblin");
+		skeletons["goblins"] = loadSkeleton("goblins-mesh", "walk", false, "goblin");
 		skeletons["vine"] = loadSkeleton("vine", "animation", false);
 		skeletons["stretchyman"] = loadSkeleton("stretchyman", "sneak", false);				
 		setupUI();

Някои файлове не бяха показани, защото твърде много файлове са промени