Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

Weather

The scene's weather, as it lands on the world.

local id = entity.spawn("weather").id
entity(id).component.add("Weather", { wetness = 0.8, snow = 0.0 })

Rain darkens the ground and sharpens what it reflects, snow whitens whatever faces up, and anything under a roof stays clear of both.

Particles falling in front of a dry scene read as particles. What sells weather is the world acknowledging it.

Every field is live. Both wetness and snow at 0 releases the pass entirely.

shelter controls how strictly cover is respected — 1 leaves anything under a roof dry. Cover is read from a field baked over the scene's own geometry, so a floor under a roof reads the same from every camera. shelterDistance sets how far up the test looks and shelterResolution how finely the field samples the world; a higher resolution resolves a roof's edge and a narrow overhang.

For code driving weather over time, reach for @builtin::systems.weather.weather.

The full description is in the package readme: guides { path = "systems/weather" }.