new require("lyria/preloader")()
Provides a preloader to load assets before they are needed
- Source:
- Source:
Requires
- module:root
- module:mixedice
- module:jquery
- module:lyria/resource
- module:lyria/log
- module:eventmap
Methods
-
add(child)
-
Adds a component to this entity
Parameters:
Name Type Description child
Object - Inherited From:
- Source:
-
log(text)
-
Logs from the component itself
Parameters:
Name Type Description text
String - Inherited From:
- Source:
-
remove(name)
-
Removes a component from the entity
Parameters:
Name Type Description name
String - Inherited From:
- Source:
-
start()
-
Starts the preloader and loads all assets asynchronously. Triggers events when necessary.
- Source:
-
task(taskFn)
-
Adds a custom task to the preloader
Parameters:
Name Type Description taskFn
function - Source:
-
taskAsync(taskFn)
-
Adds a custom asynchronous task to the preloader
Parameters:
Name Type Description taskFn
function - Source: