Log inGet started
Package

atmos.module

Newest version

README.md

atmos

The weather of the Smog night, placed from a scene builder in two calls:

local Atmos = require("art.fx.atmos")
Atmos.place(root)                                   -- rain + street splashes
Atmos.chimneys(root, { {-10, 15.5, -20}, {10, 16, -12} })  -- smoke plumes
  • Atmos.place(parent, opts?) spawns Rain (art.fx.rain_drops drawn with art.fx.rain) and its child RainSplashes (art.fx.rain_splashes with art.fx.rain_splash). The shaders stand every drop and splash around WHICHEVER camera draws them, so the rain follows the player, the editor camera and any capture with no per-frame script. opts: density (0..1), fallSpeed, wind ({x,y,z} m/s), opacity, lampGain, tint, streakLength, farFade, splashes = false, name. These retune the shared material for the session (every Rain follows them).
  • Atmos.chimneys(parent, points, opts?) spawns ChimneySmoke with a Smoke_<i> child per chimney-pot top ({x,y,z} or {x=,y=,z=,s=}), each drawing art.fx.smoke_puffs with art.fx.chimney_smoke. opts: opacity, wind, riseHeight, life, color, colorAged, sizeEnd, scale, name.
  • Atmos.rebuildMeshes() re-authors the three meshes (only needed to change Atmos.RAIN_DROPS / SPLASHES / PUFFS).

Everything animates from the gameplay clock (time in the shaders): it moves in play and stands still, fully drawn, in edit mode.