Class: Loader

Loader

new Loader ()

Manages the state and loading of multiple resources to load.

Members

Loader.async static

Loader.base64 Deprecated static

See:

Loader.encodeBinary static

Loader.Resource static

Methods

Loader.pre (fn)Loader static

Sets up a middleware function that will run before the resource is loaded.

Name Type Description
fn function

The middleware function to register.

Returns:
Type Description
Loader Returns itself.

Loader.use (fn)Loader static

Sets up a middleware function that will run after the resource is loaded.

Name Type Description
fn function

The middleware function to register.

Returns:
Type Description
Loader Returns itself.

Type Definitions

Loader.OnCompleteSignal (loader)

When the loader completes loading resources it dispatches this callback.

Name Type Description
loader Loader

The loader that has finished loading resources.

Loader.OnErrorSignal (loader, resource)

When an error occurrs the loader and resource are disaptched.

Name Type Description
loader Loader

The loader the error happened in.

resource Resource

The resource that caused the error.

Loader.OnLoadSignal (loader, resource)

When a load completes the loader and resource are disaptched.

Name Type Description
loader Loader

The loader that laoded the resource.

resource Resource

The resource that has completed loading.

Loader.OnProgressSignal (loader, resource)

When the progress changes the loader and resource are disaptched.

Name Type Description
loader Loader

The loader the progress is advancing on.

resource Resource

The resource that has completed or failed to cause the progress to advance.

Loader.OnStartSignal (loader)

When the loader starts loading resources it dispatches this callback.

Name Type Description
loader Loader

The loader that has started loading resources.