Module Loader-PIXI.Impl

let create: baseUrl:string => ?⁠concurrency:int => unit => t;

creates a new resource loader

parameter baseUrl

The base url for all resources loaded by this loader.

parameter concurrency

The number of resources to load concurrently.

let useStatic: middlewareFn => ?⁠priority:int => unit => t;

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.

let getBaseUrl: Js.t(_t) => string;

The base url for all resources loaded by this loader. Any trailing slashes are trimmed off.

let setBaseUrl: Js.t(_t) => string => unit;

The base url for all resources loaded by this loader. Any trailing slashes are trimmed off.

let getConcurrency: Js.t(_t) => int;

The number of resources to load concurrently.

let setConcurrency: Js.t(_t) => int => unit;

The number of resources to load concurrently.

let getResources: Js.t(_t) => Js.Dict.t(Resource.t);

All the resources for this loader keyed by name, or URL if no name was given.

let setResources: Js.t(_t) => Js.Dict.t(Resource.t) => unit;

All the resources for this loader keyed by name, or URL if no name was given.

let getDefaultQueryString: Js.t(_t) => string;

A querystring to append to every URL added to the loader.

let setDefaultQueryString: Js.t(_t) => string => unit;

A querystring to append to every URL added to the loader.

let getLoading: Js.t(_t) => bool;

Loading state of the loader, true if it is currently loading resources.

let setLoading: Js.t(_t) => bool => unit;

Loading state of the loader, true if it is currently loading resources.

let getProgress: Js.t(_t) => float;

The progress percent of the loader going through the queue.

let setProgress: Js.t(_t) => float => unit;

The progress percent of the loader going through the queue.

let addUrl: Js.t(_t as 'a) => string => Js.t('a);

adds a resource to loader queue

let add: Js.t(_t as 'a) => [ `Name(string) | `Options(addOptions) | `UrlArrays(string) | `OptionsArray(addOptions) ] => ?⁠url:string => unit => Js.t('a);

adds a resource to loader queue

let use: Js.t(_t as 'a) => fn:middlewareFn => ?⁠priority:int => unit => Js.t('a);

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

let reset: Js.t(_t as 'a) => Js.t('a);

Resets the queue of the loader to prepare for a new load.

let load: Js.t(_t as 'a) => ?⁠cb:onCompleteSignal => unit => Js.t('a);

Starts loading the queued resources.

let addUrlResolver: Js.t(_t as 'a) => urlResolverFn('b) => Js.t('a);

Add a function that can be used to modify the url just prior to `baseUrl` and `defaultQueryString` being applied