Refactor clouds

This commit is contained in:
2025-06-24 13:28:17 +01:00
parent b1041d1eb0
commit 444be7b49c
12 changed files with 80 additions and 140 deletions
+5 -5
View File
@@ -8,17 +8,17 @@ import Geometry
import RandomHelp
wlDustAt :: Wall -> Point2 -> World -> World
wlDustAt wl = smokeCloudAt dustcol 200 1 . addZ 20
where
dustcol = _wlColor wl & _4 .~ 1
wlDustAt _ = makeCloudAt StoneDust 200 . addZ 20
-- where
-- dustcol = _wlColor wl & _4 .~ 1
muchWlDustAt :: Wall -> Point2 -> World -> World
muchWlDustAt wl p = flip (foldl' f) [10, 20 .. 100]
where
f w h =
w
& smokeCloudAt dustcol 200 1 (addZ h (p +.+ off))
& makeCloudAt StoneDust 200 (addZ h (p +.+ off))
& randGen .~ g
where
(off, g) = runState (randInCirc 1) (_randGen w)
dustcol = _wlColor wl & _4 .~ 1
-- dustcol = _wlColor wl & _4 .~ 1