Implement smoke as clouds, mask colors when rendering framebuf texture
This commit is contained in:
@@ -790,13 +790,14 @@ moveShell time i cid rot accel w
|
||||
_ -> 0
|
||||
(v1:v2:v3:_) = fst $ runState ((sequence . repeat . randInCirc) 0.1) $ _randGen w
|
||||
(r1:r2:r3:_) = map ((*.*) 100) (v2:v3:v1:[])
|
||||
(t1:t2:t3:_) = randomRs ( 15,20) $ _randGen w
|
||||
(s1:s2:s3:_) = map (\s -> fromIntegral s * 0.1 - 1) (t3:t2:t1:[])
|
||||
-- ((r1:r2:r3:_),_) = runState ((sequence . repeat . randInCirc) 10) $ _randGen w
|
||||
-- v1 = fst $ runState (randInCirc 0.5) $ _randGen w
|
||||
smokeGen = makeSmokeAt'' v1 s1 t1 (newPos +.+ r1)
|
||||
. makeSmokeAt'' v2 s2 t2 (newPos +.+ r2)
|
||||
-- . makeSmokeAt'' v3 s3 t3 (newPos +.+ r3)
|
||||
smokeGen = makeSmokeCloud (oldPos +.+ r1 +.+ 30 *.* (normalizeV (oldPos -.- newPos)))
|
||||
-- (t1:t2:t3:_) = randomRs ( 15,20) $ _randGen w
|
||||
-- (s1:s2:s3:_) = map (\s -> fromIntegral s * 0.1 - 1) (t3:t2:t1:[])
|
||||
-- smokeGen = makeSmokeAt'' v1 s1 t1 (newPos +.+ r1)
|
||||
-- . makeSmokeAt'' v2 s2 t2 (newPos +.+ r2)
|
||||
-- -- . makeSmokeAt'' v3 s3 t3 (newPos +.+ r3)
|
||||
|
||||
|
||||
normalizeAnglePi angle | normalizeAngle angle > pi = normalizeAngle angle - 2*pi
|
||||
@@ -984,11 +985,12 @@ moveFlame rotd w pt =
|
||||
scaleChange | time < 80 = 3
|
||||
| otherwise = 3 - (fromIntegral time - 80) * 0.2
|
||||
g = _randGen w
|
||||
tms = randomRs (15,20) g
|
||||
scs = randomRs (0.1,0.5) g
|
||||
-- tms = randomRs (15,20) g
|
||||
-- scs = randomRs (0.1,0.5) g
|
||||
(rs,g1) = runState ((sequence . take 5 . repeat . randInCirc) 20) $ _randGen w
|
||||
f sc tm r = makeColorSmokeAt (greyN 0.3) (0.5 *.* vel) sc tm (ep +.+ r)
|
||||
smokeGen w = set randGen g1 $ foldr ($) w (zipWith3 f scs tms rs)
|
||||
-- smokeGen w = set randGen g1 $ foldr ($) w (zipWith3 f scs tms rs)
|
||||
smokeGen = makeFlamerSmoke ep
|
||||
|
||||
|
||||
flamerAngle = 0.3
|
||||
|
||||
Reference in New Issue
Block a user