Refactor light sources

This commit is contained in:
2021-11-28 16:53:26 +00:00
parent 1d9dd3e4e0
commit 618653a86e
28 changed files with 169 additions and 155 deletions
+2 -6
View File
@@ -59,7 +59,7 @@ flareCircleAt col alphax tranv = particles %~ (theFlareCircle :)
}
explosionFlashAt :: Point2 -> World -> World
explosionFlashAt p = tempLightSources %~ (tLightTimedIntensity 20 150 intensityFunc p :)
explosionFlashAt p = tempLightSources %~ (tlsTimeRadFunPos 20 150 intensityFunc (addZ 20 p) :)
where
intensityFunc x
| x < 10 = 1 / (10 - fromIntegral x)
@@ -74,8 +74,4 @@ flameFlicker pt
| otherwise = id
where
V2 x y = _btPos' pt
theLight = defaultTLS
{ _tlsPos = V3 x y 10
, _tlsRad = 70
, _tlsIntensity = V3 0.5 0 0
}
theLight = tlsTimeRadColPos 1 70 (V3 0.5 0 0) (V3 x y 10)