Skip to content

Commit 05d0a94

Browse files
committed
Phaser.AnimationParser methods JSONData, JSONDataHash and XMLData have all had their cacheKey parameter removed as it's no longer used.
1 parent 04e7be3 commit 05d0a94

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ Version 2.4 - "Katar" - in dev
252252
* Files can now be added to the Loader with an absolute URL even if you have a Loader.baseURL set. In previous versions the baseURL would still be prepended to the file URL, but the Loader now checks if the a file URL begins with `http` or `//` and skips prepending the baseURL to it.
253253
* Phaser.StateManager would incorrectly call `loadUpdate` and `loadRender` while the game was paused or if the State didn't have an `update` or `render` method defined, even after the loader was completed. Although this is a bug fix it's still an API change should you have been using the `loadUpdate/Render` calls in the old way. Also the StateManager no longer calls `preRender` unless the State `create` method has *finished*. If the State doesn't have a `create` method then `preRender` runs immediately.
254254
* Frame.uuid has been removed (was flagged as deprecated for several releases). This has a two-fold effect: First it means that the property no longer exists and secondly it means that the AnimationParser (the class responsible for loading sprite sheets and texture atlases) no longer has to call either RandomDataGenerator.uuid OR populates the PIXI.TextureCache. The first saves some CPU time and the second saves memory by not creating references to textures it doesn't ever use. The PIXI.TextureCache is now ignored by Phaser other than for the `__missing` and `__default` textures.
255+
* Phaser.AnimationParser methods `JSONData`, `JSONDataHash` and `XMLData` have all had their `cacheKey` parameter removed as it's no longer used.
255256

256257
### New Features
257258

src/animation/AnimationParser.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,9 @@ Phaser.AnimationParser = {
9292
* @method Phaser.AnimationParser.JSONData
9393
* @param {Phaser.Game} game - A reference to the currently running game.
9494
* @param {object} json - The JSON data from the Texture Atlas. Must be in Array format.
95-
* @param {string} cacheKey - The Game.Cache asset key of the texture image.
9695
* @return {Phaser.FrameData} A FrameData object containing the parsed frames.
9796
*/
98-
JSONData: function (game, json, cacheKey) {
97+
JSONData: function (game, json) {
9998

10099
// Malformed?
101100
if (!json['frames'])
@@ -147,10 +146,9 @@ Phaser.AnimationParser = {
147146
* @method Phaser.AnimationParser.JSONDataHash
148147
* @param {Phaser.Game} game - A reference to the currently running game.
149148
* @param {object} json - The JSON data from the Texture Atlas. Must be in JSON Hash format.
150-
* @param {string} cacheKey - The Game.Cache asset key of the texture image.
151149
* @return {Phaser.FrameData} A FrameData object containing the parsed frames.
152150
*/
153-
JSONDataHash: function (game, json, cacheKey) {
151+
JSONDataHash: function (game, json) {
154152

155153
// Malformed?
156154
if (!json['frames'])
@@ -205,10 +203,9 @@ Phaser.AnimationParser = {
205203
* @method Phaser.AnimationParser.XMLData
206204
* @param {Phaser.Game} game - A reference to the currently running game.
207205
* @param {object} xml - The XML data from the Texture Atlas. Must be in Starling XML format.
208-
* @param {string} cacheKey - The Game.Cache asset key of the texture image.
209206
* @return {Phaser.FrameData} A FrameData object containing the parsed frames.
210207
*/
211-
XMLData: function (game, xml, cacheKey) {
208+
XMLData: function (game, xml) {
212209

213210
// Malformed?
214211
if (!xml.getElementsByTagName('TextureAtlas'))
@@ -222,7 +219,6 @@ Phaser.AnimationParser = {
222219
var frames = xml.getElementsByTagName('SubTexture');
223220
var newFrame;
224221

225-
// var uuid;
226222
var name;
227223
var frame;
228224
var x;

0 commit comments

Comments
 (0)