pixi.loaders.Resource

type
class

Constructor

new(name : String, url : String, ?options : LoaderOptions)
parameters
name {string} The name of the resource to load.
url {string|string[]} The url for this resource, for audio/video loads you can pass an array of sources.
[options] {object} The options for the load.
[options.crossOrigin] {boolean} Is this request cross-origin? Default is to determine automatically.
[options.loadType=Resource.LOAD_TYPE.XHR] {Resource.LOAD_TYPE} How should this resource be loaded?
[options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] {Resource.XHR_RESPONSE_TYPE} How should the data being loaded be interpreted when using XHR?
Manages the state and loading of a single resource represented by a single URL.

Instance Variables

crossOrigin : String

Is this request cross-origin? If unset, determined automatically.

data : Dynamic

The data that was loaded by the resource.

error : Dynamic

The error that occurred while loading (if any).

isAudio : Bool

Describes if this resource was loaded as an audio tag. Only valid after the resource has completely loaded.

isImage : Bool

Describes if this resource was loaded as an image tag. Only valid after the resource has completely loaded.

isJson : Bool

Describes if this resource was loaded as json. Only valid after the resource has completely loaded.

isVideo : Bool

Describes if this resource was loaded as a video tag. Only valid after the resource has completely loaded.

isXml : Bool

Describes if this resource was loaded as xml. Only valid after the resource has completely loaded.

loadType : Int

The method of loading to use for this resource.

name : String

The name of this resource.

textures : Dynamic

url : String

The url used to load this resource.

xhr : Dynamic

The XHR object that was used to load this resource. This is only set when `loadType` is `Resource.LOAD_TYPE.XHR`.

xhrType : String

The type used to load the resource via XHR. If unset, determined automatically.