Mid strictifying
This commit is contained in:
+11
-11
@@ -10,9 +10,9 @@ import Geometry.Data
|
||||
--import qualified Data.IntMap.Strict as IM
|
||||
|
||||
lightAt :: Point3 -> Int -> LightSource
|
||||
lightAt (x,y,z) i =
|
||||
lightAt (V3 x y z) i =
|
||||
LS {_lsID = i
|
||||
,_lsPos = (x,y,z)
|
||||
,_lsPos = (V3 x y z)
|
||||
,_lsDir = 0
|
||||
,_lsRad = 700
|
||||
,_lsIntensity = 0.75
|
||||
@@ -20,18 +20,18 @@ lightAt (x,y,z) i =
|
||||
basicLS :: PSType
|
||||
basicLS = PutLS ls dec
|
||||
where
|
||||
ls = lightAt (0,0,0) 0
|
||||
ls = lightAt (V3 0 0 0) 0
|
||||
dec = onLayer PtLayer $ color white $ circleSolid 8
|
||||
|
||||
tLightFade :: Int -> Float -> (Int -> Float) -> Point2 -> TempLightSource
|
||||
tLightFade 0 rmax intensityF (x,y) = TLS
|
||||
{ _tlsPos = (x,y,0)
|
||||
tLightFade 0 rmax intensityF (V2 x y) = TLS
|
||||
{ _tlsPos = (V3 x y 0)
|
||||
, _tlsRad = rmax
|
||||
, _tlsIntensity = intensityF 0
|
||||
, _tlsUpdate = \w _ -> (w, Nothing)
|
||||
}
|
||||
tLightFade i rmax intensityF p@(x,y) = TLS
|
||||
{ _tlsPos = (x,y,0)
|
||||
tLightFade i rmax intensityF p@(V2 x y) = TLS
|
||||
{ _tlsPos = (V3 x y 0)
|
||||
, _tlsRad = rmax
|
||||
, _tlsIntensity = intensityF i
|
||||
, _tlsUpdate = \w _ -> (w, Just $ tLightFade (i-1) rmax intensityF p)
|
||||
@@ -43,14 +43,14 @@ tLightRad
|
||||
-> Float -- ^ minimal radius (unused)
|
||||
-> Point2
|
||||
-> TempLightSource
|
||||
tLightRad 0 rmax _ (x,y) = TLS
|
||||
{ _tlsPos = (x,y,0)
|
||||
tLightRad 0 rmax _ (V2 x y) = TLS
|
||||
{ _tlsPos = (V3 x y 0)
|
||||
, _tlsRad = rmax
|
||||
, _tlsIntensity = 0.5
|
||||
, _tlsUpdate = \w _ -> (w, Nothing)
|
||||
}
|
||||
tLightRad i rmax rmin p@(x,y) = TLS
|
||||
{ _tlsPos = (x,y,0)
|
||||
tLightRad i rmax rmin p@(V2 x y) = TLS
|
||||
{ _tlsPos = (V3 x y 0)
|
||||
, _tlsRad = rmax
|
||||
, _tlsIntensity = 0.5
|
||||
, _tlsUpdate = \w _ -> (w, Just $ tLightRad (i-1) rmax rmin p)
|
||||
|
||||
Reference in New Issue
Block a user