Skip to content

Commit 3f2ad4d

Browse files
committed
SpineFile will now check to see if another identical atlas in the load queue is already loading the texture it needs and will no longer get locked waiting for a file that will never complete. This allows multiple skeleton JSONs to use the same atlas data. Fix phaserjs#5331
1 parent 09a6d0e commit 3f2ad4d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

plugins/spine/src/SpineFile.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,12 @@ var SpineFile = new Class({
180180

181181
var image = new ImageFile(loader, key, textureURL, textureXhrSettings);
182182

183-
this.addToMultiFile(image);
183+
if (!loader.keyExists(image))
184+
{
185+
this.addToMultiFile(image);
184186

185-
loader.addFile(image);
187+
loader.addFile(image);
188+
}
186189
}
187190

188191
// Reset the loader settings

0 commit comments

Comments
 (0)