Working implementation of light change when door opens
This commit is contained in:
@@ -8,6 +8,7 @@ module Dodge.LightSources
|
||||
, lampCoverWhen
|
||||
, doubleLampCover
|
||||
, verticalLampCover
|
||||
, chain
|
||||
)
|
||||
where
|
||||
import Dodge.Data
|
||||
@@ -26,7 +27,13 @@ colorLightAt col pos i =
|
||||
,_lsDir = 0
|
||||
,_lsRad = 700
|
||||
,_lsIntensity = col
|
||||
,_lsPict = lightSourcePicture
|
||||
}
|
||||
lightSourcePicture :: LightSource -> Picture
|
||||
lightSourcePicture ls = setLayer 1 . translate3 (_lsPos ls) . color col $ circleSolid 3
|
||||
where
|
||||
col = V4 r g b 1
|
||||
V3 r g b = _lsIntensity ls
|
||||
|
||||
lightAt :: Point3 -> Int -> LightSource
|
||||
lightAt = colorLightAt 0.75
|
||||
|
||||
Reference in New Issue
Block a user