Skip to main content
Version: 0.12.0 (latest)

UePointLightHelper

Helper object to assist with visualizing a UePointLight effect on the scene. This consists of an octahedron mesh for visualizing an instance of PointLight.

Inherits from UeObject3D

Constructor​

new UePointLightHelper(light, sphereSize = 1, color = undefined, data = {})

Parameters​

NameTypeDefaultDescription
lightUePointLightundefinedThe light to be visualized.
sphereSizenumber1The size of the octahedron.
colorColorundefinedThe helper's color. If not set, the helper will take the color of the light.
datastruct{}Additional data.

Properties​

PropertyTypeDescription
lightUePointLightThe UePointLight being visualized.
colorColorThe color parameter passed in the constructor.
sphereSizenumberThe size of the octahedron.
meshUeMeshThe octahedron mesh used for visualization.

Methods​

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

Example​

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

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

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