Files
loop/src/Dodge/Wall/Draw.hs
T

24 lines
518 B
Haskell

{-# LANGUAGE LambdaCase #-}
module Dodge.Wall.Draw (drawWall) where
import Control.Lens
import Dodge.Data.Wall
import Dodge.Material.Color
import Picture.Base
import ShapePicture
drawWall :: WallDraw -> Wall -> SPic
drawWall = \case
DrawForceField -> drawForceField
drawForceField :: Wall -> SPic
drawForceField wl =
noShape
. setLayer BloomLayer
. setDepth 20
. color (withAlpha 0.5 $ materialColor (wl ^. wlMaterial))
$ thickLine 5 [a, b]
where
(a, b) = _wlLine wl