Hemisphere Light
Updated
Sky color from above, ground color from below.
- Type
comp-hemisphere-light- Script class
HemisphereLightComponent- Per entity
- One
- Version
- 1.1.0
Read about it in Lights: what it does, how to use it from a script, and examples.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
intensity |
0 ≤ x ≤ 100 |
Events
Section titled “Events”Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.
HemisphereLight::change
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Light a scene from the sky and the groundOne Hemisphere Light lights everything: tops take its sky colour, undersides its ground colour, with no direction and no shadows. The script steps it through noon, sunset and night.
Watch the tops and undersides of the shapes change colour with each mood. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(HemisphereLightComponent); if (component) log(component.props);}