Improve explosion visuals
This commit is contained in:
@@ -166,13 +166,9 @@ drawFlameletZ
|
||||
-> Particle
|
||||
-> Picture
|
||||
drawFlameletZ rot pt = pictures
|
||||
--[ setLayer 5 pic
|
||||
--, setLayer 4 pi2
|
||||
--, setLayer 3 piu
|
||||
[ setLayer 1 pic
|
||||
, setLayer 3 piu
|
||||
, setLayer 3 pi2
|
||||
--, setLayer 1 glow
|
||||
]
|
||||
where
|
||||
z = _ptZ pt
|
||||
@@ -182,29 +178,30 @@ drawFlameletZ rot pt = pictures
|
||||
size = _btWidth' pt
|
||||
siz2 = size + 0.2
|
||||
time = _btTimer' pt
|
||||
glow = setDepth 19 $ uncurryV translate ep
|
||||
$ circleSolidCol (withAlpha 0 red) (withAlpha 0.05 red) 30
|
||||
piu = setDepth (z + 20)
|
||||
piu = setDepth (z + 25)
|
||||
. uncurryV translate ep
|
||||
. color (brightX 2 2 $ dark red)
|
||||
-- . color (V4 2 (-0.5) (-0.5) 1)
|
||||
. color (mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
|
||||
(V4 2 0 0 1) (V4 2 0 0 0)
|
||||
)
|
||||
. rotate (negate (rot - 0.1 * fromIntegral time))
|
||||
. scale s1 s1
|
||||
$ polygon (rectNSWE siz2 (-siz2) (-siz2) siz2)
|
||||
pi2 = setDepth (z + 20)
|
||||
pi2 = setDepth (z + 25)
|
||||
. uncurryV translate ep
|
||||
. color (brightX 2 2 $ mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
|
||||
orange (dark red)
|
||||
. color (mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
|
||||
(V4 2 1 0 0.5) (V4 0 0 0 0)
|
||||
)
|
||||
. rotate (negate (rot + 0.2 * fromIntegral time))
|
||||
. scale s2 s2
|
||||
$ polygon (rectNSWE siz2 (-siz2) (-siz2) siz2)
|
||||
pic = setDepth (z + 20)
|
||||
. uncurryV translate ep
|
||||
. color (brightX 2 2 $ mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
|
||||
. color (brightX 1 2 $ mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
|
||||
white (dark red)
|
||||
)
|
||||
. rotate (negate ( 0.1 * fromIntegral time + rot))
|
||||
. scale sc sc
|
||||
. scale (0.5* sc) (0.5 *sc)
|
||||
$ polygon $ map toV2 [(-size,-size),(size,-size),(size,size),(-size,size)]
|
||||
sc = (*) 2 $ log $ 1 + fromIntegral time / 20
|
||||
s1 = (*) 2 $ log $ 2 + fromIntegral time / 40
|
||||
|
||||
Reference in New Issue
Block a user