Loader modules. Loads assets onto the clients browser
- Source:
Methods
(static) audio(name, url)
Adds an audio to the queue
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | name of the asset |
url |
string | path to the asset |
- Source:
(static) getResource(name) → {object}
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | name of the resource |
- Source:
Returns:
- resource
- Type
- object
(static) image(name, url)
Adds an image to the queue
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | name of the asset |
url |
string | path to the asset |
- Source:
(static) initialize(game)
Used to configure any initial state required by the implementation
Parameters:
| Name | Type | Description |
|---|---|---|
game |
game object |
- Source:
(static) json(name, url)
Adds a json file to the queue
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | name of the file |
url |
string | path to the file |
- Source:
(static) start() → {Promise}
Starts loading all the elements queued
- Source:
Returns:
- Resolved when loading has finished
- Type
- Promise