- Source: src/loader/index.js (Line 10)
Classes
Namespaces
Members
-
<static> FILE_COMPLETE :number
-
File has finished processing.
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 117)
-
<static> FILE_DESTROYED :number
-
File has been destroyed
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 126)
-
<static> FILE_ERRORED :number
-
The File has errored somehow during processing.
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 108)
-
<static> FILE_FAILED :number
-
File failed to load
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 90)
-
<static> FILE_LOADED :number
-
File has loaded successfully, awaiting processing
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 81)
-
<static> FILE_LOADING :number
-
File has been started to load by the loader (onLoad called)
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 72)
-
<static> FILE_PENDING :number
-
File is in the load queue but not yet started
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 63)
-
<static> FILE_POPULATED :number
-
File was populated from local data and doesn't need an HTTP request
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 135)
-
<static> FILE_PROCESSING :number
-
File is being processed (onProcess callback)
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 99)
-
<static> LOADER_COMPLETE :number
-
The Loader has completed loading and processing.
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 36)
-
<static> LOADER_DESTROYED :number
-
The Loader has been destroyed.
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 54)
-
<static> LOADER_IDLE :number
-
The Loader is idle.
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 9)
-
<static> LOADER_LOADING :number
-
The Loader is actively loading.
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 18)
-
<static> LOADER_PROCESSING :number
-
The Loader is processing files is has loaded.
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 27)
-
<static> LOADER_SHUTDOWN :number
-
The Loader is shutting down.
Type:
- number
- Since: 3.0.0
- Source: src/loader/const.js (Line 45)
Methods
-
<static> GetURL(file, baseURL)
-
Given a File and a baseURL value this returns the URL the File will use to download from.
Parameters:
Name Type Description file
Phaser.Loader.File The File object.
baseURL
string A default base URL.
- Since: 3.0.0
- Source: src/loader/GetURL.js (Line 7)
Returns:
The URL the File will use.
- Type
- string
-
<static> MergeXHRSettings(global, local)
-
Takes two XHRSettings Objects and creates a new XHRSettings object from them.
The new object is seeded by the values given in the global settings, but any setting in the local object overrides the global ones.
Parameters:
Name Type Description global
Phaser.Types.Loader.XHRSettingsObject The global XHRSettings object.
local
Phaser.Types.Loader.XHRSettingsObject The local XHRSettings object.
- Since: 3.0.0
- Source: src/loader/MergeXHRSettings.js (Line 10)
Returns:
A newly formed XHRSettings object.
-
<static> XHRLoader(file, globalXHRSettings)
-
Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings and starts the download of it. It uses the Files own XHRSettings and merges them with the global XHRSettings object to set the xhr values before download.
Parameters:
Name Type Description file
Phaser.Loader.File The File to download.
globalXHRSettings
Phaser.Types.Loader.XHRSettingsObject The global XHRSettings object.
- Since: 3.0.0
- Source: src/loader/XHRLoader.js (Line 9)
Returns:
The XHR object.
- Type
- XMLHttpRequest
-
<static> XHRSettings( [responseType] [, async] [, user] [, password] [, timeout] [, withCredentials])
-
Creates an XHRSettings Object with default values.
Parameters:
Name Type Argument Default Description responseType
XMLHttpRequestResponseType <optional>
'' The responseType, such as 'text'.
async
boolean <optional>
true Should the XHR request use async or not?
user
string <optional>
'' Optional username for the XHR request.
password
string <optional>
'' Optional password for the XHR request.
timeout
number <optional>
0 Optional XHR timeout value.
withCredentials
boolean <optional>
false Optional XHR withCredentials value.
- Since: 3.0.0
- Source: src/loader/XHRSettings.js (Line 7)
Returns:
The XHRSettings object as used by the Loader.