Refactor beams
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
module Dodge.Beam.Draw where
|
||||
import Dodge.Data.Beam
|
||||
import Picture
|
||||
|
||||
drawBeam :: BeamDraw -> Beam -> Picture
|
||||
drawBeam bd = case bd of
|
||||
BasicBeamDraw -> basicDrawBeam
|
||||
BeamDrawColor _ -> basicDrawBeam
|
||||
|
||||
basicDrawBeam :: Beam -> Picture
|
||||
basicDrawBeam bm = setLayer BloomNoZWrite $ pictures
|
||||
[ setDepth 19 . color (brightX 0 0.5 col) $ thickLine 20 ps
|
||||
, setDepth 19.5 . color (brightX 10 1 col) $ thickLine 3 ps
|
||||
]
|
||||
where
|
||||
col = _bmColor bm
|
||||
ps = _bmFirstPoints bm
|
||||
Reference in New Issue
Block a user