API Referencehydra
Atmosphere
Day/night cycle, sky colors, celestial lighting, weather, and clouds.
Module: hydra
Day/night cycle, sky colors, celestial lighting, weather, and clouds.
Declaration
export class Atmosphere { ... }Properties
timeOfDay
timeOfDay: number;secondsPerHour
secondsPerHour: number;wind
wind: Magnitude3d;weatherDelegate
weatherDelegate: WeatherDelegate;clouds
clouds?: Clouds;sunColor
sunColor: Color;moonColor
moonColor: Color;sunSize
sunSize: number;moonSize
moonSize: number;sunTintStrength
sunTintStrength: number;moonTintStrength
moonTintStrength: number;starIntensity
starIntensity: number;cycle
cycle: boolean;Methods
enable
enable(): void;disable
disable(): void;isEnabled
isEnabled(): boolean;enableWeather
enableWeather(): void;disableWeather
disableWeather(): void;getNormalizedTime
getNormalizedTime(): number;getSunAngle
getSunAngle(): Magnitude3d;getMoonAngle
getMoonAngle(): Magnitude3d;getLightIntensity
getLightIntensity(): number;getLightColor
getLightColor(): Color;getSkyboxColors
getSkyboxColors(): Color[];createSkyCubemap
Creates a sky cubemap with the requested face size.
createSkyCubemap(size: number): Cubemap;updateSkyCubemap
Updates an existing cubemap with the current sky colors.
updateSkyCubemap(cubemap: Cubemap): void;castShadowsFromSunlight
castShadowsFromSunlight(resolution: number): void;useGlobalLight
useGlobalLight(): void;isDaytime
isDaytime(): boolean;setTime
Sets the atmosphere clock using hours, minutes, and seconds.
setTime(hours: number, minutes: number, seconds: number): void;addClouds
Creates clouds using the supplied noise frequency and division count.
addClouds(frequency: number, numDivisions: number): void;resetRuntimeState
resetRuntimeState(): void;