name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Texture Manager. |
||
textureURL | string | <optional> |
The absolute or relative URL to load the texture image file from. |
|
textureExtension | string | <optional> | 'png' |
The default file extension to use for the image texture if no url is provided. |
textureXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the texture image file. |
|
atlasURL | object | string | <optional> |
The absolute or relative URL to load the atlas json file from. Or, a well formed JSON object to use instead. |
|
atlasExtension | string | <optional> | 'json' |
The default file extension to use for the atlas json if no url is provided. |
atlasXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the atlas json file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Texture Manager. |
||
textureURL | string | <optional> |
The absolute or relative URL to load the texture image file from. |
|
textureExtension | string | <optional> | 'png' |
The default file extension to use for the image texture if no url is provided. |
textureXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the texture image file. |
|
normalMap | string | <optional> |
The filename of an associated normal map. It uses the same path and url to load as the texture image. |
|
atlasURL | object | string | <optional> |
The absolute or relative URL to load the atlas json file from. Or, a well formed JSON object to use instead. |
|
atlasExtension | string | <optional> | 'json' |
The default file extension to use for the atlas json if no url is provided. |
atlasXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the atlas json file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Texture Manager. |
||
textureURL | string | <optional> |
The absolute or relative URL to load the texture image file from. |
|
textureExtension | string | <optional> | 'png' |
The default file extension to use for the image texture if no url is provided. |
textureXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the texture image file. |
|
normalMap | string | <optional> |
The filename of an associated normal map. It uses the same path and url to load as the texture image. |
|
atlasURL | string | <optional> |
The absolute or relative URL to load the atlas xml file from. |
|
atlasExtension | string | <optional> | 'xml' |
The default file extension to use for the atlas xml if no url is provided. |
atlasXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the atlas xml file. |
name | type | arguments | description |
---|---|---|---|
key | string |
The key of the file. Must be unique within the Loader and Audio Cache. |
|
url | string | Array.<string> | Phaser.Types.Loader.FileTypes.AudioFileURLConfig | Array.<Phaser.Types.Loader.FileTypes.AudioFileURLConfig> | <optional> |
The absolute or relative URLs to load the audio files from. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
context | AudioContext | <optional> |
The optional AudioContext this file will use to process itself. |
name | type | description |
---|---|---|
type | string |
The audio file format. See property names in Phaser.Device.Audio. |
url | string |
The absolute or relative URL of the audio file. |
name | type | arguments | description |
---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Audio Cache. |
|
jsonURL | string |
The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead. |
|
jsonXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the json file. |
audioURL | Object | <optional> |
The absolute or relative URL to load the audio file from. |
audioConfig | any | <optional> |
The audio configuration options. |
audioXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the audio file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Binary Cache. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'bin' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
|
dataType | any | <optional> |
Optional type to cast the binary file to once loaded. For example, |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Texture Manager. |
||
textureURL | string | <optional> |
The absolute or relative URL to load the texture image file from. |
|
textureExtension | string | <optional> | 'png' |
The default file extension to use for the image texture if no url is provided. |
textureXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the texture image file. |
|
normalMap | string | <optional> |
The filename of an associated normal map. It uses the same path and url to load as the texture image. |
|
fontDataURL | string | <optional> |
The absolute or relative URL to load the font data xml file from. |
|
fontDataExtension | string | <optional> | 'xml' |
The default file extension to use for the font data xml if no url is provided. |
fontDataXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the font data xml file. |
name | type | arguments | description |
---|---|---|---|
format | string | <optional> |
The texture compression base format that the browser must support in order to load this file. Can be any of: 'ETC', 'ETC1', 'ATC', 'ASTC', 'BPTC', 'RGTC', 'PVRTC', 'S3TC', 'S3TCSRGB' or the fallback format of 'IMG'. |
type | string | <optional> |
The container format, either PVR or KTX. If not given it will try to extract it from the textureURL extension. |
textureURL | string | <optional> |
The URL of the compressed texture file to load. |
atlasURL | string | <optional> |
Optional URL of a texture atlas JSON data file. If not given, the texture will be loaded as a single image. |
multiAtlasURL | string | <optional> |
Optional URL of a multi-texture atlas JSON data file as created by Texture Packer Pro. |
multiPath | string | <optional> |
Optional path to use when loading the textures defined in the multi atlas data. |
multiBaseURL | string | <optional> |
Optional Base URL to use when loading the textures defined in the multi atlas data. |
name | type | arguments | description |
---|---|---|---|
ETC | string | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | <optional> |
The string, or file entry object, for an ETC format texture. |
ETC1 | string | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | <optional> |
The string, or file entry object, for an ETC1 format texture. |
ATC | string | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | <optional> |
The string, or file entry object, for an ATC format texture. |
ASTC | string | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | <optional> |
The string, or file entry object, for an ASTC format texture. |
BPTC | string | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | <optional> |
The string, or file entry object, for an BPTC format texture. |
RGTC | string | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | <optional> |
The string, or file entry object, for an RGTC format texture. |
PVRTC | string | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | <optional> |
The string, or file entry object, for an PVRTC format texture. |
S3TC | string | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | <optional> |
The string, or file entry object, for an S3TC format texture. |
S3TCRGB | string | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | <optional> |
The string, or file entry object, for an S3TCRGB format texture. |
IMG | string | Phaser.Types.Loader.FileTypes.CompressedTextureFileEntry | <optional> |
The string, or file entry object, for the fallback image file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within the Loader. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'css' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Text Cache. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
shaderType | string | <optional> | 'fragment' |
The type of shader. Either |
extension | string | <optional> | 'glsl' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Text Cache. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'html' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Texture Manager. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'html' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
|
width | number | <optional> | 512 |
The width of the texture the HTML will be rendered to. |
height | number | <optional> | 512 |
The height of the texture the HTML will be rendered to. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Texture Manager. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'png' |
The default file extension to use if no url is provided. |
normalMap | string | <optional> |
The filename of an associated normal map. It uses the same path and url to load as the image. |
|
frameConfig | Phaser.Types.Loader.FileTypes.ImageFrameConfig | <optional> |
The frame configuration object. Only provided for, and used by, Sprite Sheets. |
|
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | description |
---|---|---|---|
frameWidth | number |
The width of the frame in pixels. |
|
frameHeight | number | <optional> |
The height of the frame in pixels. Uses the |
startFrame | number | <optional> |
The first frame to start parsing from. |
endFrame | number | <optional> |
The frame to stop parsing at. If not provided it will calculate the value based on the image and frame dimensions. |
margin | number | <optional> |
The margin in the image. This is the space around the edge of the frames. |
spacing | number | <optional> |
The spacing between each frame in the image. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the JSON Cache. |
||
url | string | any | <optional> |
The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly added to the Cache. |
|
extension | string | <optional> | 'json' |
The default file extension to use if no url is provided. |
dataKey | string | <optional> |
If specified instead of the whole JSON file being parsed and added to the Cache, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it. |
|
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Texture Manager. |
||
atlasURL | string | <optional> |
The absolute or relative URL to load the multi atlas json file from. Or, a well formed JSON object. |
|
url | string | <optional> |
An alias for 'atlasURL'. If given, it overrides anything set in 'atlasURL'. |
|
atlasExtension | string | <optional> | 'json' |
The default file extension to use for the atlas json if no url is provided. |
atlasXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the atlas json file. |
|
path | string | <optional> |
Optional path to use when loading the textures defined in the atlas data. |
|
baseURL | string | <optional> |
Optional Base URL to use when loading the textures defined in the atlas data. |
|
textureXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the texture files. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within the Loader. |
||
url | Array.<string> | <optional> |
An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array. |
|
extension | string | <optional> | 'js' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for these files. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the OBJ Cache. |
||
url | string | <optional> |
The absolute or relative URL to load this file from. If undefined or |
|
extension | string | <optional> | 'obj' |
The default file extension to use if no url is provided. |
flipUV | boolean | <optional> |
Flip the UV coordinates stored in the model data? |
|
matURL | string | <optional> |
An optional absolute or relative URL to the object material file from. If undefined or |
|
matExtension | string | <optional> | 'mat' |
The default material file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the JSON Cache. |
||
url | string | any | <optional> |
The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly processed. |
|
extension | string | <optional> | 'json' |
The default file extension to use if no url is provided. |
dataKey | string | <optional> |
If specified instead of the whole JSON file being parsed, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it. |
|
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | description |
---|---|---|---|
files | Array.<Phaser.Types.Loader.FileConfig> |
The files to load. See Phaser.Types.Loader.FileTypes. |
|
baseURL | string | <optional> |
A URL used to resolve paths in |
defaultType | string | <optional> |
The default Phaser.Types.Loader.FileConfig |
path | string | <optional> |
A URL path used to resolve relative paths in |
prefix | string | <optional> |
An optional prefix that is automatically prepended to each file key. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within the Loader. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'js' |
The default file extension to use if no url is provided. |
start | boolean | <optional> | false |
Automatically start the plugin after loading? |
mapping | string | <optional> |
If this plugin is to be injected into the Scene, this is the property key used. |
|
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Text Cache. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'js' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within the Loader. |
||
url | string | function | <optional> |
The absolute or relative URL to load the file from. Or, a Scene Plugin. |
|
extension | string | <optional> | 'js' |
The default file extension to use if no url is provided. |
systemKey | string | <optional> |
If this plugin is to be added to Scene.Systems, this is the property key for it. |
|
sceneKey | string | <optional> |
If this plugin is to be added to the Scene, this is the property key for it. |
|
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within the Loader. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'js' |
The default file extension to use if no url is provided. |
type | string | <optional> | 'script' |
The script type. Should be either 'script' for classic JavaScript, or 'module' if the file contains an exported module. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Texture Manager. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'png' |
The default file extension to use if no url is provided. |
normalMap | string | <optional> |
The filename of an associated normal map. It uses the same path and url to load as the image. |
|
frameConfig | Phaser.Types.Loader.FileTypes.ImageFrameConfig | <optional> |
The frame configuration object. |
|
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Texture Manager. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'svg' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
|
svgConfig | Phaser.Types.Loader.FileTypes.SVGSizeConfig | <optional> |
The svg size configuration object. |
name | type | arguments | description |
---|---|---|---|
width | number | <optional> |
An optional width. The SVG will be resized to this size before being rendered to a texture. |
height | number | <optional> |
An optional height. The SVG will be resized to this size before being rendered to a texture. |
scale | number | <optional> |
An optional scale. If given it overrides the width / height properties. The SVG is scaled by the scale factor before being rendered to a texture. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Text Cache. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'txt' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Tilemap Cache. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'csv' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Tilemap Cache. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'json' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Tilemap Cache. |
||
url | object | string | <optional> |
The absolute or relative URL to load the file from. Or, a well formed JSON object. |
|
extension | string | <optional> | 'json' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Texture Manager. |
||
textureURL | string | <optional> |
The absolute or relative URL to load the texture image file from. |
|
textureExtension | string | <optional> | 'png' |
The default file extension to use for the image texture if no url is provided. |
textureXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the texture image file. |
|
normalMap | string | <optional> |
The filename of an associated normal map. It uses the same path and url to load as the texture image. |
|
atlasURL | string | <optional> |
The absolute or relative URL to load the atlas data file from. |
|
atlasExtension | string | <optional> | 'txt' |
The default file extension to use for the atlas data if no url is provided. |
atlasXhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for the atlas data file. |
name | type | arguments | description |
---|---|---|---|
key | string | Phaser.Types.Loader.FileTypes.VideoFileConfig |
The key to use for this file, or a file configuration object. |
|
url | string | Array.<string> | Phaser.Types.Loader.FileTypes.VideoFileURLConfig | Array.<Phaser.Types.Loader.FileTypes.VideoFileURLConfig> | <optional> |
The absolute or relative URLs to load the video files from. |
noAudio | boolean | <optional> |
Does the video have an audio track? If not you can enable auto-playing on it. |
name | type | description |
---|---|---|
type | string |
The video file format. See property names in Phaser.Device.Video. |
url | string |
The absolute or relative URL of the video file. |
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
The key of the file. Must be unique within both the Loader and the Text Cache. |
||
url | string | <optional> |
The absolute or relative URL to load the file from. |
|
extension | string | <optional> | 'xml' |
The default file extension to use if no url is provided. |
xhrSettings | Phaser.Types.Loader.XHRSettingsObject | <optional> |
Extra XHR Settings specifically for this file. |