new AtlasJSONFile(loader, key [, textureURL] [, atlasURL] [, textureXhrSettings] [, atlasXhrSettings])
Parameters:
| Name | Type | Argument | Description | 
|---|---|---|---|
loader | 
            
            Phaser.Loader.LoaderPlugin | A reference to the Loader that is responsible for this file.  | 
        |
key | 
            
            string | Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig | The key to use for this file, or a file configuration object.  | 
        |
textureURL | 
            
            string | Array.<string> | 
                
                    <optional> | 
            
            
            The absolute or relative URL to load the texture image file from. If undefined or   | 
        
atlasURL | 
            
            object | string | 
                
                    <optional> | 
            
            
            The absolute or relative URL to load the texture atlas json data file from. If undefined or   | 
        
textureXhrSettings | 
            
            Phaser.Types.Loader.XHRSettingsObject | 
                
                    <optional> | 
            
            
            An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.  | 
        
atlasXhrSettings | 
            
            Phaser.Types.Loader.XHRSettingsObject | 
                
                    <optional> | 
            
            
            An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.  | 
        
- Since: 3.0.0
 - Source: src/loader/filetypes/AtlasJSONFile.js (Line 15)
 
Extends
Members
- 
    
baseURL :string
 - 
    
    
A reference to the Loaders baseURL at the time this MultiFile was created. Used to populate child-files.
Type:
- string
 
- Since: 3.20.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 128)
 
 - 
    
complete :boolean
 - 
    
    
The completion status of this MultiFile.
Type:
- boolean
 
- Since: 3.7.0
 - Inherited From:
 - Default Value:
 - 
		
- false
 
 - Source: src/loader/MultiFile.js (Line 89)
 
 - 
    
config :any
 - 
    
    
A storage container for transient data that the loading files need.
Type:
- any
 
- Since: 3.7.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 119)
 
 - 
    
failed :number
 - 
    
    
The number of files that failed to load.
Type:
- number
 
- Since: 3.7.0
 - Inherited From:
 - Default Value:
 - 
		
- 0
 
 - Source: src/loader/MultiFile.js (Line 109)
 
 - 
    
files :Array.<Phaser.Loader.File>
 - 
    
    
Array of files that make up this MultiFile.
Type:
- Array.<Phaser.Loader.File>
 
- Since: 3.7.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 80)
 
 - 
    
key :string
 - 
    
    
Unique cache key (unique within its file type)
Type:
- string
 
- Since: 3.7.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 61)
 
 - 
    
loader :Phaser.Loader.LoaderPlugin
 - 
    
    
A reference to the Loader that is going to load this file.
Type:
- Since: 3.7.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 43)
 
 - 
    
path :string
 - 
    
    
A reference to the Loaders path at the time this MultiFile was created. Used to populate child-files.
Type:
- string
 
- Since: 3.20.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 138)
 
 - 
    
pending :number
 - 
    
    
The number of files to load.
Type:
- number
 
- Since: 3.7.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 99)
 
 - 
    
prefix :string
 - 
    
    
A reference to the Loaders prefix at the time this MultiFile was created. Used to populate child-files.
Type:
- string
 
- Since: 3.20.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 148)
 
 - 
    
type :string
 - 
    
    
The file type string for sorting within the Loader.
Type:
- string
 
- Since: 3.7.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 52)
 
 
Methods
- 
    
addToCache()
 - 
    
    
Adds this file to its target cache upon successful loading and processing.
- Since: 3.7.0
 - Source: src/loader/filetypes/AtlasJSONFile.js (Line 87)
 
 - 
    
addToMultiFile(files)
 - 
    
    
Adds another child to this MultiFile, increases the pending count and resets the completion status.
Parameters:
Name Type Description filesPhaser.Loader.File The File to add to this MultiFile.
- Since: 3.7.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 178)
 
Returns:
This MultiFile instance.
 - 
    
isReadyToProcess()
 - 
    
    
Checks if this MultiFile is ready to process its children or not.
- Since: 3.7.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 165)
 
Returns:
trueif all children of this MultiFile have loaded, otherwisefalse.- Type
 - boolean
 
 - 
    
onFileComplete(file)
 - 
    
    
Called by each File when it finishes loading.
Parameters:
Name Type Description filePhaser.Loader.File The File that has completed processing.
- Since: 3.7.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 201)
 
 - 
    
onFileFailed(file)
 - 
    
    
Called by each File that fails to load.
Parameters:
Name Type Description filePhaser.Loader.File The File that has failed to load.
- Since: 3.7.0
 - Inherited From:
 - Source: src/loader/MultiFile.js (Line 219)
 
 
