Skip to content

Night Sky

Updated

Night sky with stars, Milky Way, moon and shooting stars.

Type
comp-night-sky
Script class
NightSkyComponent
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
exposure 0 ≤ x ≤ 100
moonAzimuth
moonElevation
moonPhase
nebulaDrift -3.141592653589793 ≤ x ≤ 3.141592653589793
preset "pristineMountain"
seed
starCount 0 ≤ x ≤ 100000, integer
starDensity 0 ≤ x ≤ 2

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