You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/loader/Loader.js
+22-3Lines changed: 22 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -368,6 +368,22 @@ Phaser.Loader.prototype = {
368
368
returnthis;
369
369
370
370
},
371
+
372
+
/**
373
+
* Add a custom JSON file to the Loader.
374
+
*
375
+
* @method Phaser.Loader#json
376
+
* @param {string} key - Unique asset key of the json file.
377
+
* @param {string} url - URL of the json file.
378
+
* @return {Phaser.Loader} This Loader instance.
379
+
*/
380
+
json: function(key,url){
381
+
382
+
this.addToFileList('json',key,url);
383
+
384
+
returnthis;
385
+
386
+
},
371
387
372
388
/**
373
389
* Add a binary file to the Loader. It will be loaded via xhr with a responseType of "arraybuffer". You can specify an optional callback to process the file after load.
0 commit comments