Generalise flame flicker, cleanup
This commit is contained in:
@@ -13,6 +13,7 @@ import Geometry.Data
|
||||
import Picture
|
||||
|
||||
import Control.Lens
|
||||
import System.Random
|
||||
|
||||
makeCloudAt
|
||||
:: (Cloud -> Picture) -- ^ draw function
|
||||
@@ -64,8 +65,10 @@ makeStartCloudAt = makeCloudAt (drawCloudWith 2 800 white) 10 400 5
|
||||
shellTrailCloud :: Point3 -> World -> World
|
||||
shellTrailCloud = makeCloudAt (drawCloudWith (4/3) 800 (greyN 0.5)) 15 400 40
|
||||
|
||||
makeFlamerSmokeAt :: Float -> Point3 -> World -> World
|
||||
makeFlamerSmokeAt x = makeCloudAt (drawCloudWith 4 300 (greyN x)) 6 200 40
|
||||
makeFlamerSmokeAt :: Point3 -> World -> World
|
||||
makeFlamerSmokeAt p w = makeCloudAt (drawCloudWith 4 300 (greyN x)) 6 200 40 p w
|
||||
where
|
||||
x = fst $ randomR (0.5,0.8) (_randGen w)
|
||||
|
||||
spawnSmokeAtCursor :: World -> World
|
||||
spawnSmokeAtCursor w = shellTrailCloud (V3 x y 20) w
|
||||
|
||||
Reference in New Issue
Block a user