Add explicit layer datatype

This commit is contained in:
2022-04-10 10:48:17 +01:00
parent edd82fb3ac
commit 77c3f83d20
27 changed files with 75 additions and 70 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ mvBlip p col maxt t w pt =
, Just $ pt & ptUpdate .~ mvBlip p col maxt (t-1)
& ptDraw .~ ( const
. setDepth (-0.5)
. setLayer 1
. setLayer BloomLayer
. uncurryV translate p
. color (withAlpha (fromIntegral t / fromIntegral maxt) col)
$ circleSolid 2 )
@@ -50,7 +50,7 @@ mvSonar x p w pt = (w, Just $ pt {_ptDraw = const pic
}
)
where
pic = setDepth (-0.5) . setLayer 1 $ pictures crBlips
pic = setDepth (-0.5) . setLayer BloomLayer $ pictures crBlips
crBlips = mapMaybe crBlip $ IM.elems $ _creatures w
crBlip cr | dist cpos p < r + crad && dist cpos p > r - (crad + 100)
= Just $ colHelper (0.5 * (1 - (r - dist cpos p) /100))