Simplify facade shape coloring
This commit is contained in:
@@ -13,25 +13,24 @@ import Geometry
|
||||
import Shape
|
||||
|
||||
tankSquareDec ::
|
||||
(Float -> Float -> Float -> Color -> Shape) ->
|
||||
(Float -> Float -> Float -> Shape) ->
|
||||
Color ->
|
||||
Color ->
|
||||
Placement
|
||||
--tankSquareDec dec = tankShape (reverse . orderPolygon $ square 20) (dec 20 20 31)
|
||||
tankSquareDec dec = tankShape (orderPolygon $ square 20) (dec 20 20 31)
|
||||
|
||||
tankShape :: [Point2] -> (Color -> Shape) -> Color -> Color -> Placement
|
||||
tankShape baseshape facade col col' = sps0 $ decoratedBlock (facade col') Metal col 31 baseshape
|
||||
tankShape :: [Point2] -> Shape -> Color -> Color -> Placement
|
||||
tankShape baseshape facade col col' = sps0 $ decoratedBlock (colorSH col' facade) Metal col 31 baseshape
|
||||
|
||||
roundTank :: Color -> Color -> Placement
|
||||
roundTank = tankShape (polyCirc 4 20) $
|
||||
\c' -> colorSH c' $ foldMap toprail (take 8 [0, pi / 4 ..])
|
||||
roundTank c c' = tankShape (polyCirc 4 20)
|
||||
(colorSH c' $ foldMap toprail (take 8 [0, pi / 4 ..])) c c'
|
||||
where
|
||||
toprail a = rotateSH a $ thinHighBar 31 (V2 0 20) (rotateV (pi / 4) $ V2 0 20)
|
||||
|
||||
roundTankCross :: Color -> Color -> Placement
|
||||
roundTankCross = tankShape (polyCirc 4 20) $
|
||||
\c ->
|
||||
colorSH c $
|
||||
roundTankCross c' c = tankShape (polyCirc 4 20)
|
||||
(colorSH c $
|
||||
thinHighBar 31 (V2 20 0) (V2 (-20) 0)
|
||||
<> thinHighBar 31 (V2 0 20) (V2 0 (-20))
|
||||
<> thinHighBar 31 (V2 0 20) (V2 0 (-20))) c' c
|
||||
|
||||
Reference in New Issue
Block a user