Namespace: Loader

Phaser.Types. Loader

Namespaces

FileTypes

Type Definitions


FileConfig

Type:
  • object
Properties:
Name Type Argument Default Description
type string

The file type string (image, json, etc) for sorting within the Loader.

key string

Unique cache key (unique within its file type)

url string <optional>

The URL of the file, not including baseURL.

path string <optional>

The path of the file, not including the baseURL.

extension string <optional>

The default extension this file uses.

responseType XMLHttpRequestResponseType <optional>

The responseType to be used by the XHR request.

xhrSettings Phaser.Types.Loader.XHRSettingsObject | false <optional>
false

Custom XHR Settings specific to this file and merged with the Loader defaults.

config any <optional>

A config object that can be used by file types to store transitional data.

Since: 3.0.0
Source: src/loader/typedefs/FileConfig.js (Line 1)

XHRSettingsObject

Type:
  • object
Properties:
Name Type Argument Default Description
responseType XMLHttpRequestResponseType

The response type of the XHR request, i.e. blob, text, etc.

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 integer <optional>
0

Optional XHR timeout value.

header string | undefined <optional>

This value is used to populate the XHR setRequestHeader and is undefined by default.

headerValue string | undefined <optional>

This value is used to populate the XHR setRequestHeader and is undefined by default.

requestedWith string | undefined <optional>

This value is used to populate the XHR setRequestHeader and is undefined by default.

overrideMimeType string | undefined <optional>

Provide a custom mime-type to use instead of the default.

Since: 3.0.0
Source: src/loader/typedefs/XHRSettingsObject.js (Line 1)