mirror of
https://github.com/wassname/phaser.git
synced 2026-07-14 01:10:16 +08:00
Loader can now parse both JSON Hash and JSON Array formated texture atlas files.
This commit is contained in:
@@ -88,6 +88,10 @@ Phaser.Cache.prototype = {
|
||||
{
|
||||
this._images[key].frameData = Phaser.Animation.Parser.JSONData(this.game, atlasData);
|
||||
}
|
||||
else if (format == Phaser.Loader.TEXTURE_ATLAS_JSON_HASH)
|
||||
{
|
||||
this._images[key].frameData = Phaser.Animation.Parser.JSONDataHash(this.game, atlasData);
|
||||
}
|
||||
else if (format == Phaser.Loader.TEXTURE_ATLAS_XML_STARLING)
|
||||
{
|
||||
this._images[key].frameData = Phaser.Animation.Parser.XMLData(this.game, atlasData, format);
|
||||
|
||||
@@ -217,7 +217,7 @@ Phaser.Loader.prototype = {
|
||||
|
||||
},
|
||||
|
||||
atlasJSON: function (key, textureURL, atlasURL, atlasData) {
|
||||
atlasJSONArray: function (key, textureURL, atlasURL, atlasData) {
|
||||
if (typeof atlasURL === "undefined") { atlasURL = null; }
|
||||
if (typeof atlasData === "undefined") { atlasData = null; }
|
||||
this.atlas(key, textureURL, atlasURL, atlasData, Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY);
|
||||
|
||||
Reference in New Issue
Block a user