Files
loop/src/Dodge/Tesla/Draw.hs
T
2024-12-22 15:36:45 +00:00

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