Add missing dependencies, fix arc rendering
This commit is contained in:
@@ -86,7 +86,6 @@ flashFlareAt col alphax (V2 x y) = Particle
|
||||
|
||||
explosionFlashAt :: Point2 -> World -> World
|
||||
explosionFlashAt p = over tempLightSources ((:) $ tLightFade 20 150 intensityFunc p)
|
||||
. glareAt 20 10 5 (withAlpha 0.3 white) 75 150 p
|
||||
where
|
||||
intensityFunc x
|
||||
| x < 10 = 1 / (10 - fromIntegral x)
|
||||
|
||||
@@ -50,7 +50,7 @@ Shockwave picture.
|
||||
drawShockwave :: Particle -> Picture
|
||||
drawShockwave pt = pic
|
||||
where
|
||||
pic = setDepth 20 . uncurryV translate p
|
||||
pic = setDepth 20 . setLayer 1 . uncurryV translate p
|
||||
$ color (_btColor' pt) $ thickCircle rad thickness
|
||||
p = _btPos' pt
|
||||
r = _btRad' pt
|
||||
|
||||
@@ -122,7 +122,7 @@ moveFlame rotd w pt
|
||||
closeCrs cr = dist ep (_crPos cr)
|
||||
< _crRad cr + 10 - min 9 (max 0 (fromIntegral time - 80))
|
||||
+ 5 * angleCoeff (angleVV (ep -.- _crPos cr) rotd)
|
||||
angleCoeff x = abs $ 1 - abs ( (x * 2 - pi) / pi )
|
||||
angleCoeff x' = abs $ 1 - abs ( (x' * 2 - pi) / pi )
|
||||
hiteff = _btHitEffect' pt pt
|
||||
rfl wl p = Just $ pt
|
||||
{ _btTimer' = time -1
|
||||
@@ -167,10 +167,13 @@ drawFlameletZ
|
||||
-> Particle
|
||||
-> Picture
|
||||
drawFlameletZ rot pt = pictures
|
||||
[ setLayer 5 pic
|
||||
, setLayer 4 pi2
|
||||
, setLayer 3 piu
|
||||
, setLayer 1 glow
|
||||
--[ setLayer 5 pic
|
||||
--, setLayer 4 pi2
|
||||
--, setLayer 3 piu
|
||||
[ setLayer 1 pic
|
||||
, setLayer 1 pi2
|
||||
, setLayer 1 piu
|
||||
--, setLayer 1 glow
|
||||
]
|
||||
where
|
||||
z = _ptZ pt
|
||||
@@ -184,13 +187,13 @@ drawFlameletZ rot pt = pictures
|
||||
$ circleSolidCol (withAlpha 0 red) (withAlpha 0.05 red) 30
|
||||
piu = setDepth (z + 20)
|
||||
. uncurryV translate ep
|
||||
. color (dark red)
|
||||
. color (brightX 2 2 $ dark red)
|
||||
. rotate (negate (rot - 0.1 * fromIntegral time))
|
||||
. scale s1 s1
|
||||
$ polygon (rectNSWE siz2 (-siz2) (-siz2) siz2)
|
||||
pi2 = setDepth (z + 20)
|
||||
. uncurryV translate ep
|
||||
. color (mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
|
||||
. color (brightX 2 2 $ mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
|
||||
orange (dark red)
|
||||
)
|
||||
. rotate (negate (rot + 0.2 * fromIntegral time))
|
||||
@@ -198,7 +201,7 @@ drawFlameletZ rot pt = pictures
|
||||
$ polygon (rectNSWE siz2 (-siz2) (-siz2) siz2)
|
||||
pic = setDepth (z + 20)
|
||||
. uncurryV translate ep
|
||||
. color (mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
|
||||
. color (brightX 2 2 $ mixColors (fromIntegral (max 0 (time-2))) (10-fromIntegral time)
|
||||
white (dark red)
|
||||
)
|
||||
. rotate (negate ( 0.1 * fromIntegral time + rot))
|
||||
|
||||
Reference in New Issue
Block a user