Refactor light sources
This commit is contained in:
@@ -2,24 +2,32 @@
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.LightSource where
|
||||
import Geometry
|
||||
import Picture.Data
|
||||
import Control.Lens
|
||||
|
||||
data LightSourceDraw = DefaultLightSourceDraw
|
||||
|
||||
data TLSIntensity = ConstantIntensity
|
||||
| TLSFade Point3 Int
|
||||
|
||||
data TLSUpdate = DestroyTLS
|
||||
| TimerTLS
|
||||
| IntensityTLS TLSIntensity
|
||||
|
||||
data LSParam = LSParam
|
||||
{ _lsPos :: !Point3
|
||||
, _lsRad :: !Float
|
||||
, _lsCol :: !Point3
|
||||
}
|
||||
data LightSource = LS
|
||||
{ _lsID :: !Int
|
||||
{ _lsID :: Int
|
||||
, _lsParam :: LSParam
|
||||
, _lsDir :: !Float
|
||||
, _lsPict :: LightSource -> Picture
|
||||
, _lsDir :: Float
|
||||
, _lsPict :: LightSourceDraw --LightSource -> Picture
|
||||
}
|
||||
data TempLightSource = TLS
|
||||
{ _tlsParam :: LSParam
|
||||
, _tlsUpdate :: TempLightSource -> Maybe TempLightSource
|
||||
, _tlsTime :: !Int
|
||||
, _tlsUpdate :: TLSUpdate --TempLightSource -> Maybe TempLightSource
|
||||
, _tlsTime :: Int
|
||||
}
|
||||
makeLenses ''LSParam
|
||||
makeLenses ''LightSource
|
||||
|
||||
Reference in New Issue
Block a user