Logics for loading a text file into the resource_map
Exports the unload(), has(), and get() functions from resource map
Found in Chapter, page 138 of the textbook
Example: 4.3 Resource Map and Shader Loader- Source:
Methods
(static) load(path) → {Promise}
Load the text resource into the resource map
Parameters:
| Name | Type | Description |
|---|---|---|
path |
string | path to the text file |
- Source:
Returns:
a Promise to load the resource, null if the resource already exists in the map
- Type
- Promise