Skip to content

Ambient Light

Updated

Even light from everywhere, with no direction or shadows.

Type
comp-ambient-light
Script class
AmbientLightComponent
Per entity
One
Version
1.1.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
intensity 0 ≤ x ≤ 100

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

  • AmbientLight::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(AmbientLightComponent);
if (component) log(component.props);
}