Trippy flamer

This commit is contained in:
2021-08-28 14:33:23 +01:00
parent 882a8e9824
commit 3a8b28a916
10 changed files with 81 additions and 28 deletions
+4
View File
@@ -26,6 +26,7 @@ tLightFade 0 rmax intensityF (V2 x y) = TLS
, _tlsRad = rmax
, _tlsIntensity = f $ intensityF 0
, _tlsUpdate = \w _ -> (w, Nothing)
, _tlsTime = 0
}
where
f x' = V3 x' x' x'
@@ -34,6 +35,7 @@ tLightFade i rmax intensityF p@(V2 x y) = TLS
, _tlsRad = rmax
, _tlsIntensity = f $ intensityF i
, _tlsUpdate = \w _ -> (w, Just $ tLightFade (i-1) rmax intensityF p)
, _tlsTime = 0
}
where
f x' = V3 x' x' x'
@@ -49,12 +51,14 @@ tLightRad 0 rmax _ (V2 x y) = TLS
, _tlsRad = rmax
, _tlsIntensity = 0.5
, _tlsUpdate = \w _ -> (w, Nothing)
, _tlsTime = 0
}
tLightRad i rmax rmin p@(V2 x y) = TLS
{ _tlsPos = V3 x y 0
, _tlsRad = rmax
, _tlsIntensity = V3 0.5 0.5 0
, _tlsUpdate = \w _ -> (w, Just $ tLightRad (i-1) rmax rmin p)
, _tlsTime = 0
}
tLightAt :: Int -> Point2 -> TempLightSource