The base url for all resources loaded by this loader.
The number of resources to load concurrently.
A querystring to append to every URL added to the loader.
This should be a valid query string without the question-mark (?
). The loader will
also not escape values for you. Make sure to escape your parameters with
encodeURIComponent
before assigning this property.
Loading state of the loader, true if it is currently loading resources.
Dispatched when the queued resources all load.
The callback looks like {@link Loader.OnCompleteSignal}.
Dispatched once per errored resource.
The callback looks like {@link Loader.OnErrorSignal}.
Dispatched once per loaded resource.
The callback looks like {@link Loader.OnLoadSignal}.
Dispatched once per loaded or errored resource.
The callback looks like {@link Loader.OnProgressSignal}.
Dispatched when the loader begins to process the queue.
The callback looks like {@link Loader.OnStartSignal}.
The progress percent of the loader going through the queue.
All the resources for this loader by name.
Collection of all installed use
middleware for Loader.
A premade instance of the loader that can be used to load resources.
Adds a resource (or multiple resources) to the loader queue.
This function can take a wide variety of different parameters. The only thing that is always required the url to load. All the following will work:
loader
// normal param syntax
.add('key', 'http://...', function () {})
.add('http://...', function () {})
.add('http://...')
// object syntax
.add({
name: 'key2',
url: 'http://...'
}, function () {})
.add({
url: 'http://...'
}, function () {})
.add({
name: 'key3',
url: 'http://...'
onComplete: function () {}
})
.add({
url: 'https://...',
onComplete: function () {},
crossOrigin: true
})
// you can also pass an array of objects or urls or both
.add([
{ name: 'key4', url: 'http://...', onComplete: function () {} },
{ url: 'http://...', onComplete: function () {} },
'http://...'
])
// and you can use both params and options
.add('key', 'http://...', { crossOrigin: true }, function () {})
.add('http://...', { crossOrigin: true }, function () {});
The name of the resource to load.
The url for this resource, relative to the baseUrl of this loader.
Returns itself.
The name of the resource to load.
The url for this resource, relative to the baseUrl of this loader.
Returns itself.
The url for this resource, relative to the baseUrl of this loader.
Returns itself.
The url for this resource, relative to the baseUrl of this loader.
Returns itself.
The options for the load. This object must contain a url
property.
Returns itself.
An array of resources to load, where each is
either an object with the options or a string url. If you pass an object, it must contain a url
property.
Returns itself.
Destroy the loader, removes references.
Starts loading the queued resources.
Returns itself.
Sets up a middleware function that will run before the resource is loaded.
The middleware function to register.
Returns itself.
Resets the queue of the loader to prepare for a new load.
Returns itself.
Sets up a middleware function that will run after the resource is loaded.
The middleware function to register.
Returns itself.
Sets up a middleware function that will run before the resource is loaded.
The middleware function to register.
Returns itself.
Adds a Loader plugin for the global shared loader and all new Loader instances created.
The plugin to add
Reference to PIXI.Loader for chaining
Sets up a middleware function that will run after the resource is loaded.
The middleware function to register.
Returns itself.
Generated using TypeDoc
The new loader, extends Resource Loader by Chad Engler: https://github.com/englercj/resource-loader
https://github.com/englercj/resource-loader
PIXI