Skip to main content
Version: 0.10.0

UeDirectionalLightHelper

Helper object to assist with visualizing a UeDirectionalLight effect on the scene. This consists of a plane and a line representing the light's position and direction.

Constructor​

new UeDirectionalLightHelper(light, size = 1, color = undefined)

Inherits from UeObject3D

Parameters​

NameTypeDefaultDescription
lightUeDirectionalLightundefinedThe light to be visualized.
sizenumber1The dimensions of the plane.
colorColorundefinedThe helper's color. If not set, the helper will take the color of the light.

Properties​

PropertyTypeDescription
lightObjectThe UeDirectionalLight being visualized.
colorColorThe color parameter passed in the constructor.
lightPlaneUeLineContains the square showing the location of the directional light.
targetLineUeLineRepresents the line pointing towards the target of the directional light.

Methods​

MethodReturnsDescription
.update()selfUpdates the helper to match the position and direction of the light being visualized.
.dispose()selfFrees the GPU-related resources allocated by this instance.

Example​

const light = new UeDirectionalLight(c_white, 1);
scene.add(light);

const helper = new UeDirectionalLightHelper(light, 5);
scene.add(helper);

// In your step/update event
helper.update();