DesertAtmos
The desert's time of day and weather on worldClockKit's shared clock, and the look, air and sound each machine makes of them. Started by the `DesertAtmosphere` component; modelled on tropicalKit's `Atmos`.
DesertAtmos
The desert's time of day and weather on worldClockKit's shared clock, and the look, air and sound each machine makes of them. Started by the DesertAtmosphere component; modelled on tropicalKit's Atmos.
local DesertAtmos = require("desertKit.DesertAtmos")
DesertAtmos.setTime("dusk", { hold = true }) -- every player: "dawn" | "midday" | "dusk" | "night"
DesertAtmos.dustStorm({ approach = 45, duration = 60, clear = 25 }) -- a haboob rolls in for everyone
DesertAtmos.setWeather("clear") -- or "storm" (stays until changed), or any worldClockKit weather
print(DesertAtmos.report().time, DesertAtmos.report().ambience.levels)
setTime(name, { hold? }): set the shared clock to a preset (hold = truepauses it there).dustStorm(opts)/clearStorm(fade?): a dust storm for every player (seeDustStorm);setWeather(name, { fade? }).configure(opts): what this machine draws and plays:look,grade,haze,shimmer,storm,milkyWay,ambience,ambienceVolume,footsteps,footprints,stormEveryMinutes.override({ dawn = { haze = 0.003, heat = 0.2, grade = { saturation = 1.2 } }, ... }): per-time overrides on top of the presets.current()/lookFor(weights, storm, overrides?)(pure): the blended{ grade, haze, hazeTint, hazeTintMix, heat, storm, weights }.weights()/weightsAt(solar),timeOfDay(),stormAmount(),weather(),hourForSolar(solar).report(): time, weights, storm amount and state, weather, clock hour, look, shimmer, sky, ambience levels and calls, footstep counts, footprints.PRESETS,STORM,KEYS,CAMPFIRE,start(opts, holder)/stop(holder)/tick(dt).
The presets (compared against the reference sheet design/references/mirage_wells)
| time | solar hour | look | reference |
|---|---|---|---|
| dawn | 6.35 | pink-peach light on the crests, blue-violet shadow, a low pink dust mist (haze 0.0026) | time_dawn |
| midday | 12.3 | bleached high white sun, short shadows, pale hazy blue-white sky, heat shimmer 1 and a mirage on the horizon, grade desaturated (0.86) | time_midday_heat_shimmer2 |
| dusk | 17.75 | sun on the horizon, amber and rust dunes, orange-to-magenta sky, purple shadows, palms in silhouette | time_dusk |
| night | 22.4 | high bright moon (silver-blue light), navy sky with stars and the Milky Way, sand readable, a cool blue grade | time_night |
The light and sky colours are the "desert" sky look (DesertSky.SKY_LOOK), so they apply with the WorldClock's skyMode "kit" (the clock's sky shader) and "engine" (the scene's ProceduralSky, coloured by DesertSky).
What it does on each machine
- Holds the "desert" sky look (
look = falsefrees it), colours the engine sky in skyMode "engine". - Three of the engine's post passes for the grade (colorGrade, color_correction tint, vignette) per time and storm.
- Wraps the clock director's
evaluateso its fog becomes dust haze (chained after other kits' hooks). - Heat shimmer (
HeatShimmer), the storm (DustStorm), the Milky Way (DesertSky), each one full-screen pass, registered only when it has something to draw. - Campfires: every Light whose entity carries attribute
desertLight = "campfire"is lit warm and flickering from dusk to dawn and put out by day (CAMPFIRE). - Ambience (
DesertAmbience), footsteps (DesertFootsteps) and tropicalKit'sFootprints, taught the desert's sand and mud.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2The desert's time of day and weather on worldClockKit's shared clock: four lighting presets (dawn: pink-peach crests over blue-violet troughs in a low dust mist; midday: a bleached high white sun, short shadows, a hazy pale sky and heat shimmer; dusk: deep amber dunes under an orange-magenta sky with purple shadows; night: silver-blue moonlit crests under the Milky Way) and a dust storm that rolls in, which every player sees at the same moment; a "desert" sky look the clock lights the scene with; and on each machine a colour grade per time and weather, dust haze in the clock's fog, heat shimmer, the storm's wall of dust, the desert's ambience by time and place, footsteps per surface and footprints in the sand. Modelled on tropicalKit's Atmos.
lerp(a: number, b: number, t: number) → number return a
| arg | type | description |
|---|---|---|
| a | number | |
| b | number | |
| t | number |
smooth(e0: number, e1: number, x: number) → number
| arg | type | description |
|---|---|---|
| e0 | number | |
| e1 | number | |
| x | number |
rgb(r: number, g: number, b: number) → void
| arg | type | description |
|---|---|---|
| r | number | |
| g | number | |
| b | number |
deepFreeze(t: any) → any
| arg | type | description |
|---|---|---|
| t | any |
hourForSolar(solar: number) → number
The clock hour at which the sun stands at solar hour `solar` today.
| arg | type | description |
|---|---|---|
| solar | number |
weightsAt(solar: number) → void
Weight of each preset at solar hour `solar` (sums to 1). Pure.
| arg | type | description |
|---|---|---|
| solar | number |
weights( ) → void
timeOfDay( ) → string
The preset nearest the clock now: "dawn", "midday", "dusk" or "night".
stormAmount( ) → number
How deep in dust the shared weather is, 0-1 (its sand channel, fades included).
weather( ) → string
setTime(name: string, opts: { hold: boolean? }?) → void
Set the shared clock to a preset for every player: "dawn", "midday", "dusk", "night". `opts.hold = true` pauses the clock there (false resumes it).
| arg | type | description |
|---|---|---|
| name | string | |
| opts | { hold: boolean? }? |
setWeather(name: string, opts: { fade: number? }?) → void
Set the shared weather for every player: "clear", "storm" (a dust storm that rolls in and stays until the weather changes), or any worldClockKit weather. Fades over `opts.fade` s.
| arg | type | description |
|---|---|---|
| name | string | |
| opts | { fade: number? }? |
dustStorm(opts: any?) → any
A dust storm for every player: a wall of dust appears on the horizon and rolls in over `approach` s (45), blows for `duration` s (60), then clears over `clear` s (25). Also takes `from` = { x, z } (the direction it comes from), `distance`, `height`. Whoever holds the shared clock moves the weather through it, so it ends even if the caller left.
| arg | type | description |
|---|---|---|
| opts | any? |
clearStorm(fade: number?) → void
End a dust storm now, for every player.
| arg | type | description |
|---|---|---|
| fade | number? |
configure(opts: any) → void
Change what this machine draws and plays: `grade`, `haze`, `shimmer`, `storm`, `look`, `milkyWay`, `ambience`, `ambienceVolume`, `footsteps`, `footprints`, `stormEveryMinutes`.
| arg | type | description |
|---|---|---|
| opts | any |
config( ) → any
override(overrides: { [string]: any }) → void
Per-time overrides on top of the presets: `{ dawn = { haze = 0.003, heat = 0.2, grade = { saturation = 1.3 } }, ... }`. Replaces the whole override table; `{}` clears it.
| arg | type | description |
|---|---|---|
| overrides | { [string]: any } |
mix(a: any, b: any, t: number) → any
| arg | type | description |
|---|---|---|
| a | any | |
| b | any | |
| t | number |
presetPart(name: string, overrides: any?) → any
| arg | type | description |
|---|---|---|
| name | string | |
| overrides | any? |
lookFor(w: { [string]: number }, storm: number, overrides: any?) → any
The look for preset weights `w` and storm amount `storm` (0-1), with optional per-time `overrides`: `{ grade, haze, hazeTint, hazeTintMix, heat, storm, weights }`. Pure.
| arg | type | description |
|---|---|---|
| w | { [string]: number } | |
| storm | number | |
| overrides | any? |
current( ) → any
shapeEnv(env: any) → void
Chained after any other hook (tropicalKit's, alpineKit's), so there is still a single fog writer.
| arg | type | description |
|---|---|---|
| env | any |
installHook( ) → void
effectLive(name: string) → boolean
| arg | type | description |
|---|---|---|
| name | string |
ensureGrade( ) → void
removeGrade( ) → void
setProp(effect: string, prop: string, v: any, key: string) → void
| arg | type | description |
|---|---|---|
| effect | string | |
| prop | string | |
| v | any | |
| key | string |
writeGrade(g: any) → void
| arg | type | description |
|---|---|---|
| g | any |
holdLook(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
start(opts: any?, holder: string?) → void
Start the desert look, ambience, footsteps and footprints on this machine (the DesertAtmosphere component calls this). `holder` names who started it: it keeps running until every holder has called `stop(holder)`, so a scene rebuild that spawns, drops and re-wakes components keeps it.
| arg | type | description |
|---|---|---|
| opts | any? | |
| holder | string? |
stop(holder: string?) → void
Stop it on this machine. With a `holder`, only that holder lets go, and it stops once no holder is left.
| arg | type | description |
|---|---|---|
| holder | string? |
running( ) → boolean
campfireStep(dt: number, w: { [string]: number }) → void
| arg | type | description |
|---|---|---|
| dt | number | |
| w | { [string]: number } |
horizonColor( ) → void
tick(dt: number) → void
One frame: blend the look from the clock and weather and write what changed; draw the shimmer, the storm and the night sky; tick the ambience, footsteps and footprints.
| arg | type | description |
|---|---|---|
| dt | number |
report( ) → any
What this machine shows: time, preset weights, storm amount and state, weather, clock hour, the blended look, shimmer, night sky, ambience levels and calls, footstep counts, footprints.
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.