@@ -532,26 +532,26 @@ Phaser.Loader.prototype = {
532532 *
533533 * @method Phaser.Loader#tilemap
534534 * @param {string } key - Unique asset key of the tilemap data.
535- * @param {string } [mapDataURL ] - The url of the map data file (csv/json)
536- * @param {object } [mapData ] - An optional JSON data object. If given then the mapDataURL is ignored and this JSON object is used for map data instead.
535+ * @param {string } [url ] - The url of the map data file (csv/json)
536+ * @param {object } [data ] - An optional JSON data object. If given then the url is ignored and this JSON object is used for map data instead.
537537 * @param {number } [format=Phaser.Tilemap.CSV] - The format of the map data. Either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON.
538538 * @return {Phaser.Loader } This Loader instance.
539539 */
540- tilemap : function ( key , mapDataURL , mapData , format ) {
540+ tilemap : function ( key , url , data , format ) {
541541
542- if ( typeof mapDataURL === "undefined" ) { mapDataURL = null ; }
543- if ( typeof mapData === "undefined" ) { mapData = null ; }
542+ if ( typeof url === "undefined" ) { url = null ; }
543+ if ( typeof data === "undefined" ) { data = null ; }
544544 if ( typeof format === "undefined" ) { format = Phaser . Tilemap . CSV ; }
545545
546- if ( mapDataURL == null && mapData == null )
546+ if ( url == null && data == null )
547547 {
548- console . warn ( 'Phaser.Loader.tilemap - Both mapDataURL and mapData are null. One must be set.' ) ;
548+ console . warn ( 'Phaser.Loader.tilemap - Both url and data are null. One must be set.' ) ;
549549
550550 return this ;
551551 }
552552
553553 // A map data object has been given
554- if ( mapData )
554+ if ( data )
555555 {
556556 switch ( format )
557557 {
@@ -562,18 +562,18 @@ Phaser.Loader.prototype = {
562562 // An xml string or object has been given
563563 case Phaser . Tilemap . TILED_JSON :
564564
565- if ( typeof mapData === 'string' )
565+ if ( typeof data === 'string' )
566566 {
567- mapData = JSON . parse ( mapData ) ;
567+ data = JSON . parse ( data ) ;
568568 }
569569 break ;
570570 }
571571
572- this . game . cache . addTilemap ( key , null , mapData , format ) ;
572+ this . game . cache . addTilemap ( key , null , data , format ) ;
573573 }
574574 else
575575 {
576- this . addToFileList ( 'tilemap' , key , mapDataURL , { format : format } ) ;
576+ this . addToFileList ( 'tilemap' , key , url , { format : format } ) ;
577577 }
578578
579579 return this ;
@@ -586,37 +586,37 @@ Phaser.Loader.prototype = {
586586 *
587587 * @method Phaser.Loader#physics
588588 * @param {string } key - Unique asset key of the physics json data.
589- * @param {string } [dataURL ] - The url of the map data file (csv/json)
590- * @param {object } [jsonData ] - An optional JSON data object. If given then the dataURL is ignored and this JSON object is used for physics data instead.
589+ * @param {string } [url ] - The url of the map data file (csv/json)
590+ * @param {object } [data ] - An optional JSON data object. If given then the url is ignored and this JSON object is used for physics data instead.
591591 * @param {string } [format=Phaser.Physics.LIME_CORONA_JSON] - The format of the physics data.
592592 * @return {Phaser.Loader } This Loader instance.
593593 */
594- physics : function ( key , dataURL , jsonData , format ) {
594+ physics : function ( key , url , data , format ) {
595595
596- if ( typeof dataURL === "undefined" ) { dataURL = null ; }
597- if ( typeof jsonData === "undefined" ) { jsonData = null ; }
596+ if ( typeof url === "undefined" ) { url = null ; }
597+ if ( typeof data === "undefined" ) { data = null ; }
598598 if ( typeof format === "undefined" ) { format = Phaser . Physics . LIME_CORONA_JSON ; }
599599
600- if ( dataURL == null && jsonData == null )
600+ if ( url == null && data == null )
601601 {
602- console . warn ( 'Phaser.Loader.physics - Both dataURL and jsonData are null. One must be set.' ) ;
602+ console . warn ( 'Phaser.Loader.physics - Both url and data are null. One must be set.' ) ;
603603
604604 return this ;
605605 }
606606
607607 // A map data object has been given
608- if ( jsonData )
608+ if ( data )
609609 {
610- if ( typeof jsonData === 'string' )
610+ if ( typeof data === 'string' )
611611 {
612- jsonData = JSON . parse ( jsonData ) ;
612+ data = JSON . parse ( data ) ;
613613 }
614614
615- this . game . cache . addPhysicsData ( key , null , jsonData , format ) ;
615+ this . game . cache . addPhysicsData ( key , null , data , format ) ;
616616 }
617617 else
618618 {
619- this . addToFileList ( 'physics' , key , dataURL , { format : format } ) ;
619+ this . addToFileList ( 'physics' , key , url , { format : format } ) ;
620620 }
621621
622622 return this ;
0 commit comments