mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Merge pull request #334 from TrompoGames/Trompo-JS-AtlasAttachmentLoader
[JAVASCRIPT] Atlas attachment loader fix.
This commit is contained in:
commit
96f230d3cb
@ -2425,7 +2425,7 @@ spine.AtlasAttachmentLoader = function (atlas) {
|
|||||||
};
|
};
|
||||||
spine.AtlasAttachmentLoader.prototype = {
|
spine.AtlasAttachmentLoader.prototype = {
|
||||||
newRegionAttachment: function (skin, name, path) {
|
newRegionAttachment: function (skin, name, path) {
|
||||||
var region = this.atlas.findRegion(name);
|
var region = this.atlas.findRegion(path);
|
||||||
if (!region) throw "Region not found in atlas: " + path + " (region attachment: " + name + ")";
|
if (!region) throw "Region not found in atlas: " + path + " (region attachment: " + name + ")";
|
||||||
var attachment = new spine.RegionAttachment(name);
|
var attachment = new spine.RegionAttachment(name);
|
||||||
attachment.rendererObject = region;
|
attachment.rendererObject = region;
|
||||||
@ -2439,7 +2439,7 @@ spine.AtlasAttachmentLoader.prototype = {
|
|||||||
return attachment;
|
return attachment;
|
||||||
},
|
},
|
||||||
newMeshAttachment: function (skin, name, path) {
|
newMeshAttachment: function (skin, name, path) {
|
||||||
var region = this.atlas.findRegion(name);
|
var region = this.atlas.findRegion(path);
|
||||||
if (!region) throw "Region not found in atlas: " + path + " (mesh attachment: " + name + ")";
|
if (!region) throw "Region not found in atlas: " + path + " (mesh attachment: " + name + ")";
|
||||||
var attachment = new spine.MeshAttachment(name);
|
var attachment = new spine.MeshAttachment(name);
|
||||||
attachment.rendererObject = region;
|
attachment.rendererObject = region;
|
||||||
@ -2457,7 +2457,7 @@ spine.AtlasAttachmentLoader.prototype = {
|
|||||||
return attachment;
|
return attachment;
|
||||||
},
|
},
|
||||||
newSkinnedMeshAttachment: function (skin, name, path) {
|
newSkinnedMeshAttachment: function (skin, name, path) {
|
||||||
var region = this.atlas.findRegion(name);
|
var region = this.atlas.findRegion(path);
|
||||||
if (!region) throw "Region not found in atlas: " + path + " (skinned mesh attachment: " + name + ")";
|
if (!region) throw "Region not found in atlas: " + path + " (skinned mesh attachment: " + name + ")";
|
||||||
var attachment = new spine.SkinnedMeshAttachment(name);
|
var attachment = new spine.SkinnedMeshAttachment(name);
|
||||||
attachment.rendererObject = region;
|
attachment.rendererObject = region;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user