Add missing dependencies, fix arc rendering

This commit is contained in:
2021-08-28 16:22:21 +01:00
parent 4e97a1998c
commit c36654520d
9 changed files with 77 additions and 15 deletions
+11 -8
View File
@@ -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))