Skip to content

Environment

Updated

Lights the scene with an HDRI and shows it as the sky.

Type
comp-environment
Script class
EnvironmentComponent
Per entity
One
Version
2.1.0

Read about it in Environment and sky: 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
backgroundBlur 0 ≤ x ≤ 1
backgroundIntensity 0 ≤ x ≤ 100
intensity 0 ≤ x ≤ 100
rotation

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(EnvironmentComponent);
if (component) log(component.props);
}