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

This commit is contained in:
badlogic 2016-09-26 10:58:30 +02:00
parent 3c12d54653
commit b4788a6c42
13 changed files with 13 additions and 13 deletions

View File

@ -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;

File diff suppressed because one or more lines are too long

View File

@ -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;

File diff suppressed because one or more lines are too long

View File

@ -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;

File diff suppressed because one or more lines are too long

View File

@ -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;

File diff suppressed because one or more lines are too long

View File

@ -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;

File diff suppressed because one or more lines are too long

View File

@ -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;
}

View File

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

View File

@ -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();