Presets
import { PRESETS, type PresetName, type SkyParams } from "threejs-sky-pro";Bundled Presets
PRESETS contains the bundled sky presets as a Readonly<Record<PresetName, SkyParams>>.
| Key | Look |
|---|---|
partlyCloudy | Scattered fair-weather cumulus under a high midday sun — the startup default. |
stunningSunset | Low sun with a broad warm Mie aureole and a deep cumulus deck. |
thunderstorm | Heavy overcast with a towering storm deck. |
stormyEvening | Tall storm deck under a low warm sun, with thick horizon coverage and a dense gray haze layer. |
moonlitNight | Deep predawn sky with a bright moon, sparse high clouds, and star brightness tuned for a configured panorama. |
fluffy | High midday sun over a soft, low-density cumulus deck with crisp billows. |
hazy | Thick atmospheric haze under a high sun — a muted, washed-out horizon. |
pixar | High midday sun over tall, dense, bright-white cumulus with soft rounded storybook edges. |
type PresetName = 'partlyCloudy' | 'stunningSunset' | 'thunderstorm' | 'stormyEvening' | 'moonlitNight' | 'fluffy' | 'hazy' | 'pixar';Types
SkyParams describes a complete visual configuration. Every field is required, and applying a preset replaces the current visual state.
Presets do not provide textures. moonlitNight adjusts star brightness when SkySystem was created with a nightSky panorama; otherwise, stars remain disabled.
Each block uses the parameter type of its matching component. For example, sky.atmosphere.toParams() returns a valid atmosphere block.
Presets store appearance rather than the complete performance configuration. They do not include the cloud rendering mode, quality tier, environment-map settings, or god-ray step count. They do include godRays.enabled and weather-map resolution; changing the latter regenerates the weather map.
interface SkyParams {
atmosphere: AtmosphereParams;
// `sun.elevation` and `sun.azimuth` are both degrees.
sun: SunParams;
time: TimeOfDayParams;
cloud: CloudsParams;
noise: NoiseParams;
// `enabled` toggles the pass; `moonGodRayScale` scales moonlight shafts
godRays: GodRaysParams;
nightSky: NightSkyParams;
}
interface CloudsParams {
shape: CloudShapeParams;
lighting: CloudLightingParams;
wind: CloudWindParams;
cirrus: CloudCirrusParams;
// storm haze, combines with cirrus on the same deck
haze: CloudHazeParams;
// horizon dissolve + aerial-perspective haze
fade: CloudFadeParams;
}
interface NoiseParams {
// Only the weather map is preset-tunable; applying it triggers a CPU FBM regen.
weather: { resolution: number; profile: WeatherMapProfile };
}
interface NightSkyParams {
// panorama brightness
intensity: number;
}Loading
await sky.applyPreset(PRESETS['stunningSunset']);Use a bundled preset, create a SkyParams object, or export one from the demo's settings panel.
