If a config object was passed to MultiAtlasFile it expected the atlas URL to be in the url property, however the docs and file config expected it in atlasURL. You can now use either of these properties to declare the url. Fix #4815

This commit is contained in:
Richard Davey 2020-01-15 11:36:11 +00:00
parent 09a6f554ef
commit d5644cf977
2 changed files with 11 additions and 1 deletions

View file

@ -47,7 +47,16 @@ var MultiAtlasFile = new Class({
var config = key;
key = GetFastValue(config, 'key');
atlasURL = GetFastValue(config, 'url');
if (GetFastValue(config, 'url', false))
{
atlasURL = GetFastValue(config, 'url');
}
else
{
atlasURL = GetFastValue(config, 'atlasURL');
}
atlasXhrSettings = GetFastValue(config, 'xhrSettings');
path = GetFastValue(config, 'path');
baseURL = GetFastValue(config, 'baseURL');

View file

@ -3,6 +3,7 @@
*
* @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.
* @property {string} [atlasURL] - The absolute or relative URL to load the multi atlas json file from. Or, a well formed JSON object.
* @property {string} [url] - An alias for 'atlasURL'. If given, it overrides anything set in 'atlasURL'.
* @property {string} [atlasExtension='json'] - The default file extension to use for the atlas json if no url is provided.
* @property {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - Extra XHR Settings specifically for the atlas json file.
* @property {string} [path] - Optional path to use when loading the textures defined in the atlas data.