Central storage of engine-wide shared resources and variables
Found in Chapter 5, page 251 of the textbook
Example: 5.4 Font Support- Source:
Methods
(static) cleanUp()
Unload the default font and particle texture
- Source:
(static) getDefaultFontName() → {string}
Returns the path to the default font
- Source:
Returns:
kDefaultFont - path to default font
- Type
- string
(static) getDefaultPSTexture() → {string}
Returns the path to the default particle texture
- Source:
Returns:
kDefaultPSTexture - path to default particle texture
- Type
- string
(static) getGlobalAmbientColor() → {Array.<float>}
Returns the global ambient color
- Source:
Returns:
mGlobalAmbientColor - [R,G,B,A] color array
- Type
- Array.<float>
(static) getGlobalAmbientIntensity() → {float}
Returns the global ambient light intensity
- Source:
Returns:
mGlobalAmbientIntensity - light intensity value
- Type
- float
(static) init()
Initializes the resources using promises and add them to the resource map
- Source:
(static) setGlobalAmbientColor(v)
Set the global ambient color
Parameters:
| Name | Type | Description |
|---|---|---|
v |
Array.<float> | new [R,G,B,A] color array |
- Source:
(static) setGlobalAmbientIntensity(v)
Set the global ambient light intensity
Parameters:
| Name | Type | Description |
|---|---|---|
v |
float | new light insensity value |
- Source: