Refactor light sources
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
module Dodge.LightSource.Draw where
|
||||
import Dodge.Data.LightSource
|
||||
import Picture
|
||||
import Geometry.Data
|
||||
|
||||
drawLightSource :: LightSourceDraw -> LightSource -> Picture
|
||||
drawLightSource lsd = case lsd of
|
||||
DefaultLightSourceDraw -> defLSPic
|
||||
defLSPic :: LightSource -> Picture
|
||||
defLSPic ls = setLayer BloomNoZWrite . translate3 (_lsPos $ _lsParam ls) . color col $ circleSolid 4
|
||||
where
|
||||
col = V4 r g b 2
|
||||
V3 r g b = _lsCol $ _lsParam ls
|
||||
Reference in New Issue
Block a user