Refactor light sources

This commit is contained in:
2022-07-21 16:21:35 +01:00
parent cf5ec4a261
commit aabd8a2cb8
8 changed files with 71 additions and 45 deletions
+1 -5
View File
@@ -47,11 +47,7 @@ flareCircleAt col alphax tranv = flares .:~ CircFlare
explosionFlashAt :: Point2 -> World -> World
explosionFlashAt p = tempLightSources .:~ tlsTimeRadFunPos 20 150 intensityFunc (addZ 20 p)
where
intensityFunc x
| x < 10 = 1 / (10 - fromIntegral x)
| otherwise = 1
explosionFlashAt p = tempLightSources .:~ tlsTimeRadFunPos 20 150 (TLSFade 1 10) (addZ 20 p)
ptFlicker :: Particle -> World -> World
ptFlicker pt