NatureGL Skyv1.1.0

Reference

Presets

Fifteen skies, one file each, in src/config/presets/. Hover a card to see the sky move, click to enlarge it, or run one live.

ClearclearHigh sun, a few fair-weather cumulus.
Partly cloudypartlyCloudyBroken cumulus in clumps and clearings.
MarinemarineThe signature sky: sea cumulus with the sun ahead.
OvercastovercastA low grey deck. No blue, no sun disc.
StormstormSquall line, rain veils, lightning, low sun under the deck.
MonsoonmonsoonHeavy tropical rain under a torn deck.
AltocumulusaltocumulusA mackerel sky of small mid-level puffs.
CirruscirrusFibrous ice cloud on a clean blue dome.
ToweringtoweringCumulus congestus: isolated cauliflower towers.
CumulonimbuscumulonimbusOne monumental cell anchored 10 km north.
DawndawnSun just clear of the horizon, long warm light.
Golden hourgoldenLow sun behind towering cumulus.
SunsetsunsetEmber light under an altocumulus sheet.
NoctilucentnoctilucentElectric-blue high cloud in deep twilight.
NightnightWaning gibbous moon, stars and the milky way.

#Loading presets

js
sky.loadPreset('storm');        // snap: no easing, history reset, full re-bake
sky.applyPreset('storm');       // ease there over ~1–2 s
sky.presetName;                 // 'storm', or null once edited

Both also accept a params object. Any field you leave out takes the default.

#Presets are plain data

src/config/presets/golden.js
/** Golden — golden hour behind towering cumulus */
export default {
  label: 'Golden',
  cloudForm: 'towering', humidity: 0.7, precipitation: 0, temperature: 0.68, wind: 0.15, density: 0.68, edge: 0.42,
  clump: 0.5, coverage: 0, cirrus: 1, haze: 0.32, timeOfDay: 18.032, northOffset: 97.77, lunarAge: 18.3,
  exposure: 0, bloom: 0.42, godRays: 0.8, view: { yaw: 0, pitch: 0.2 },
};

view is a framing hint that only the demo uses; the library ignores it.

js
import { PRESETS, getPresetParams } from 'naturegl-sky';

Object.keys(PRESETS);           // ['clear', 'partlyCloudy', …]
getPresetParams('marine');      // complete, deep-cloned SkyParams

#Try one live

Runs WebGL2 in this page · starts on cumulonimbus
Starts on cumulonimbus. Press 1–0 in the demo to switch presets.

#Reference

NameFormTimeLook
clearcumulus13:59High sun, a few fair-weather cumulus
partlyCloudycumulus15:00Broken cumulus in clumps and clearings
marinecumulus15:57The signature sky: sea cumulus, sun ahead
overcastcumulus16:11A low grey deck, no blue, no sun
stormcumulus18:16Dark squall line, rain veils, lightning, low sun under the deck
monsooncumulus17:23Heavy tropical rain under a torn deck
altocumulusaltocumulus15:57A mackerel sky of small mid-level puffs
cirruscirrus15:43Fibrous ice cloud, clean blue dome
toweringtowering16:11Cumulus congestus: isolated cauliflower towers
cumulonimbuscumulonimbus14:45A monumental cell anchored 10 km north, sun behind you
dawncumulus18:20Sun just clear of the horizon, long warm light
goldentowering18:02Golden hour behind towering cumulus
sunsetaltocumulus18:17Ember light under an altocumulus sheet
noctilucentnoctilucent18:47Electric-blue high cloud in deep twilight
nightcumulus21:30Moonlit night, waning gibbous, stars and the milky way

The times were re-derived for the physical sun track: timeOfDay together with northOffset reproduces each sky's original sun elevation and azimuth. That's why dawn shows an evening hour.