register(name, loaderFn)
Registers a custom loader to the AssetLoader class.
Returns
Not applicable.
Parameters
Name | Type | Description | Required |
name | string | The name of the custom loader that needs to be registered. | ✅ |
loaderFn | function | The loader function that is utilized by the custom loader. | ✅ |
Usage example
In this example, the API registers the font-loader
to use the
loadWebFonts
function.
AssetLoader.register('font-loader', loadWebFonts);
Previous topic loadAssets(assets) Next topic setAppAlias(appAlias)