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.
Dispatched once per errored resource.
Dispatched once per loaded resource.
Dispatched once per loaded or errored resource.
Dispatched when the loader begins to process the queue.
The progress percent of the loader going through the queue.
All the resources for this loader keyed by name, or URL if no name was given.
The default middleware priority (50).
The base url for all resources loaded by this loader. Any trailing slashes are trimmed off.
The base url for all resources loaded by this loader. Any trailing slashes are trimmed off.
The number of resources to load concurrently.
The number of resources to load concurrently.
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
// name & url param syntax
.add('http://...')
.add('key', 'http://...')
// object syntax
.add({
name: 'key3',
url: 'http://...',
onComplete: function () {},
})
// you can also pass an array of objects or urls or both
.add([
{ name: 'key4', url: 'http://...', onComplete: function () {} },
{ url: 'http://...', onComplete: function () {} },
'http://...'
])
Add a function that can be used to modify the url just prior
to baseUrl
and defaultQueryString
being applied.
Starts loading the queued resources.
Resets the queue of the loader to prepare for a new load.
Sets up a middleware function that will run after the resource is loaded.
You can optionally specify a priority for this middleware which will determine the order middleware functions are run. A lower priority value will make the function run earlier. That is, priority 30 is run before priority 50.
Sets up a middleware function that will run after the resource is loaded.
You can optionally specify a priority for this middleware which will determine the order middleware functions are run. A lower priority value will make the function run earlier. That is, priority 30 is run before priority 50.
Generated using TypeDoc
Manages the state and loading of multiple resources to load.