mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
Previously, it wasn't possible for multiple Spine Atlases to use PNGs with the exact same filename, even if they were in different folders. The SpineFile
loader has now been updated so that the always-unique Spine key is pre-pended to the filename, for example if the key was bonus
and the PNG in the atlas was coin.png
then the final key (as stored in the Texture Manager) is now bonus:coin.png
. The SpinePlugin.getAtlasCanvas
and getAtlasWebGL
methods have been updated to reflect this change. Fix #6022
This commit is contained in:
parent
b4ea85107b
commit
083a465f8d
2 changed files with 3 additions and 3 deletions
|
@ -176,7 +176,7 @@ var SpineFile = new Class({
|
|||
{
|
||||
var textureURL = textures[i];
|
||||
|
||||
var key = textureURL;
|
||||
var key = this.key + ':' + textureURL;
|
||||
|
||||
var image = new ImageFile(loader, key, textureURL, textureXhrSettings);
|
||||
|
||||
|
|
|
@ -547,7 +547,7 @@ var SpinePlugin = new Class({
|
|||
|
||||
atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)
|
||||
{
|
||||
return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());
|
||||
return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage());
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -592,7 +592,7 @@ var SpinePlugin = new Class({
|
|||
|
||||
atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)
|
||||
{
|
||||
return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);
|
||||
return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage(), false);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue