21 lines
497 B
Haskell
21 lines
497 B
Haskell
module Dodge.Tesla.Draw (
|
|
drawTeslaArc,
|
|
) where
|
|
|
|
import Picture.Base
|
|
import Dodge.Data.TeslaArc
|
|
import Control.Lens
|
|
|
|
drawTeslaArc :: TeslaArc -> Picture
|
|
drawTeslaArc pt =
|
|
setLayer BloomNoZWrite $
|
|
fold
|
|
[ setDepth 20.5 $ color (brightX 2 1 $ _taColor pt) $ thickLine x ps
|
|
-- , setDepth 20 $ color (V4 0 0 0 0.5) $ thickLine 10 ps
|
|
]
|
|
where
|
|
x | pt ^. taTimer > 0 = 3
|
|
| pt ^. taTimer >= 0 = 2
|
|
| otherwise = 0.5
|
|
ps = _taPoints pt
|