Refactor light sources
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user