Day Sky
Updated
Physically scattered daytime sky with time of day and clouds.
- Type
comp-day-sky- Script class
DaySkyComponent- 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.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
cloudAltitude |
- |
|
cloudDensity |
0 ≤ x ≤ 8 |
|
cloudOpacity |
0 ≤ x ≤ 1 |
|
cloudPreset |
"partly |
|
cloudSeed |
||
cloudWind |
- |
|
exposure |
0 ≤ x ≤ 100 |
|
horizonBlend |
0 ≤ x ≤ 1 |
|
mie |
0 ≤ x ≤ 1 |
|
mie |
0 ≤ x ≤ 1 |
|
preset |
"clearNoon" |
|
rayleigh |
0 ≤ x ≤ 64 |
|
sunIntensity |
0 ≤ x ≤ 1000 |
|
time |
0 ≤ x ≤ 1 |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
A stepped day cycleA Day Sky with the runtime Sky & Terrain demo's golden-hour clouds runs from sunrise to sunset in four minutes, stepped once a second, with the Sun light re-aimed and dimmed to match.
Watch the sun climb and the light on the shapes change; a whole day takes four minutes. 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(DaySkyComponent); if (component) log(component.props);}