Added basePath support to SpriteSheetLoader#169
Conversation
|
Would be quite convenient to have this. |
|
Thanks, this is definitely needed. I want to do some testing before accepting the PR, but your work is appreciated. Our plan is to remove this requirement by getting rid of sub-queues, and instead pushing manifest and SpriteSheetLoader contents into the main queue so that things like Cheers. |
|
Not super happy with the ambiguity with how this handles basepath on images. Right now the Not sure this makes a ton of sense, and it might be better to instead just assume the same basepath for sub-items. Prepending the basepath could result in some weird behavior: For example if you load "spritesheet.json" with a path of "sprites/" and a basepath of "site/assets/" then you will end up with Ideally the SpriteSheet format should support a path property for it's assets (instead of the loadItem), and that could be used on individual items or something, and the basepath could be propagated properly. Either way, I am not sold on this approach. |
|
This will be considered in PreloadJS 2.0 |
I have added basePath support to SpriteSheetLoader,
because the current SpriteSheetLoader doesn't take basePath into account when loading spritesheets using SpriteSheetLoader.