Skip to main content

Class: RendererManager

Updates renderer settings.

Constructors

Constructor

new RendererManager(): RendererManager;

Returns

RendererManager

Methods

SetSkybox2DTexture()

static SetSkybox2DTexture(texture): Promise<void>;

Sets the skybox texture.

Parameters

ParameterTypeDescription
texturenumberThe 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

ParameterTypeDescription
colorvec3The 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

ParameterTypeDescription
texturenumberThe Texture to render into. It must be a render texture with a cube dimesion.
positionvec3The 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

ParameterTypeDescription
texturenumberThe 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

ParameterTypeDescription
intensitynumberThe 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.