Skip to content

Point Light

Updated

A light bulb that shines in every direction.

Type
comp-point-light
Script class
PointLightComponent
Per entity
One
Version
1.2.0

Read about it in Lights: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
decay 0 ≤ x ≤ 10
distance 0 ≤ x ≤ 1000
intensity 0 ≤ x ≤ 100000

Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.

  • PointLight::change

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(PointLightComponent);
if (component) log(component.props);
}