Refactor light sources
This commit is contained in:
+12
-8
@@ -272,22 +272,26 @@ defaultPP = PressPlate
|
||||
defaultLS :: LightSource
|
||||
defaultLS = LS
|
||||
{ _lsID = 0
|
||||
, _lsPos = V3 0 0 50
|
||||
, _lsParam = LSParam
|
||||
{ _lsPos = V3 0 0 50
|
||||
, _lsRad = 700
|
||||
, _lsCol = 0.6
|
||||
}
|
||||
, _lsDir = 0
|
||||
, _lsRad = 700
|
||||
, _lsIntensity = 0.6
|
||||
, _lsPict = defLSPic
|
||||
}
|
||||
defLSPic :: LightSource -> Picture
|
||||
defLSPic ls = setLayer 1 . translate3 (_lsPos ls) . color col $ circleSolid 4
|
||||
defLSPic ls = setLayer 1 . translate3 (_lsPos $ _lsParam ls) . color col $ circleSolid 4
|
||||
where
|
||||
col = V4 r g b 2
|
||||
V3 r g b = _lsIntensity ls
|
||||
V3 r g b = _lsCol $ _lsParam ls
|
||||
defaultTLS :: TempLightSource
|
||||
defaultTLS = TLS
|
||||
{ _tlsPos = 0
|
||||
, _tlsRad = 0
|
||||
, _tlsIntensity = 0.5
|
||||
{ _tlsParam = LSParam
|
||||
{ _lsPos = 0
|
||||
, _lsRad = 0
|
||||
, _lsCol = 0.5
|
||||
}
|
||||
, _tlsUpdate = f
|
||||
, _tlsTime = 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user