This commit is contained in:
2022-07-10 12:51:20 +01:00
parent 23022d85a1
commit 7a1dbbb3f9
13 changed files with 35 additions and 198 deletions
-8
View File
@@ -22,19 +22,11 @@ import LensHelp
aTeslaArcAt :: Color -> [ArcStep] -> Particle
aTeslaArcAt col thearc = PtTeslaArc
{ _ptPoints = map (^. asPos) thearc
, _ptDraw = drawTeslaArc
, _ptUpdate = moveTeslaArc thearc
, _ptTimer = 2
, _ptColor = brightX 100 1.5 col
}
drawTeslaArc :: Particle -> Picture
drawTeslaArc pt = setLayer BloomNoZWrite $ pictures
[ setDepth 20.5 $ color (brightX 2 1 $ _ptColor pt) $ thickLine 3 ps
, setDepth 20 $ color (V4 0 0 0 0.5) $ thickLine 10 ps
]
where
ps = _ptPoints pt
moveTeslaArc :: [ArcStep]
-> World
-> Particle