From 18584fc4963c9c09902a1390b491387f8e5e78fc Mon Sep 17 00:00:00 2001 From: Dario Segura Date: Mon, 1 Dec 2014 14:58:17 -0500 Subject: [PATCH] -[JAVASCRIPT] Atlas attachment loader was using the name as the path instead of the path passed to it. It would throw an exception using the path to report the error, making it extremely confusing. --- spine-js/spine.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spine-js/spine.js b/spine-js/spine.js index d17c546a1..24deaad8d 100644 --- a/spine-js/spine.js +++ b/spine-js/spine.js @@ -2425,7 +2425,7 @@ spine.AtlasAttachmentLoader = function (atlas) { }; spine.AtlasAttachmentLoader.prototype = { 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 + ")"; var attachment = new spine.RegionAttachment(name); attachment.rendererObject = region; @@ -2439,7 +2439,7 @@ spine.AtlasAttachmentLoader.prototype = { return attachment; }, 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 + ")"; var attachment = new spine.MeshAttachment(name); attachment.rendererObject = region; @@ -2457,7 +2457,7 @@ spine.AtlasAttachmentLoader.prototype = { return attachment; }, 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 + ")"; var attachment = new spine.SkinnedMeshAttachment(name); attachment.rendererObject = region;