mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[ts] Fixed RegionAttachment#setRegion, now actually sets the region property. Fixed up WebGL example
This commit is contained in:
parent
3c12d54653
commit
b4788a6c42
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -113,6 +113,7 @@ module spine {
|
||||
vertices[RegionAttachment.U4] = region.u2;
|
||||
vertices[RegionAttachment.V4] = region.v2;
|
||||
}
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
updateOffset () : void {
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user