Reify shockwaves

This commit is contained in:
2022-07-24 00:20:28 +01:00
parent 97174535d8
commit 5b9e9968f3
17 changed files with 197 additions and 166 deletions
+17
View File
@@ -0,0 +1,17 @@
module Dodge.Shockwave.Draw
where
import Dodge.Data.Shockwave
import Picture
import Geometry
drawShockwave :: Shockwave -> Picture
drawShockwave sw = setDepth 20
. setLayer BloomLayer
. uncurryV translate (_swPos sw)
. color (_swColor sw)
$ thickCircle rad thickness
where
r = _swRad sw
thickness = tFraction**2 * r
rad = r - (3/4) * r * tFraction
tFraction = fromIntegral (_swTimer sw) / fromIntegral (_swMaxTime sw)