Class: RendererManager
Updates renderer settings.
Constructors
Constructor
new RendererManager(): RendererManager;
Returns
RendererManager
Methods
SetSkybox2DTexture()
static SetSkybox2DTexture(texture): Promise<void>;
Sets the skybox texture.
Parameters
| Parameter | Type | Description |
|---|---|---|
texture | number | The skybox Texture; it must be a 2D texture. |
Returns
Promise<void>
A promise that resolves when the skybox texture has been changed.
GetSkybox2DTexture()
static GetSkybox2DTexture(): Promise<number>;
Gets the skybox texture.
Returns
Promise<number>
A promise that resolves to the skybox Texture.
SetAmbientLight()
static SetAmbientLight(color): Promise<void>;
Sets the ambient light color.
Parameters
| Parameter | Type | Description |
|---|---|---|
color | vec3 | The HDR color as a vec3, with each component in the range [0, +10]. |
Returns
Promise<void>
A promise that resolves when the ambient light has been changed.
GetAmbientLight()
static GetAmbientLight(): Promise<vec3>;
Gets the ambient light color.
Returns
Promise<vec3>
A promise that resolves to the ambient light color as a vec3.
RenderCubemap()
static RenderCubemap(texture, position): Promise<void>;
Renders a cubemap from a position.
Parameters
| Parameter | Type | Description |
|---|---|---|
texture | number | The Texture to render into. It must be a render texture with a cube dimesion. |
position | vec3 | The world position to render from. |
Returns
Promise<void>
A promise that resolves when the cubemap has been rendered.
SetReflectionCubemap()
static SetReflectionCubemap(texture): Promise<void>;
Sets the reflection cubemap.
Parameters
| Parameter | Type | Description |
|---|---|---|
texture | number | The Texture to assign as the reflection cubemap. It must have a cube dimesion. |
Returns
Promise<void>
A promise that resolves when the reflection cubemap has been changed.
GetReflectionCubemap()
static GetReflectionCubemap(): Promise<number>;
Gets the reflection cubemap.
Returns
Promise<number>
A promise that resolves to the reflection cubemap Texture.
SetReflectionIntensity()
static SetReflectionIntensity(intensity): Promise<void>;
Sets the reflection intensity.
Parameters
| Parameter | Type | Description |
|---|---|---|
intensity | number | The reflection intensity as a number in the range [0, 10], where 0 means no reflection. |
Returns
Promise<void>
A promise that resolves when the reflection intensity has been changed.
GetReflectionIntensity()
static GetReflectionIntensity(): Promise<number>;
Gets the reflection intensity.
Returns
Promise<number>
A promise that resolves to the reflection intensity.