Reify block drawing
This commit is contained in:
@@ -8,11 +8,13 @@ import Shape
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.Default.Block
|
||||
|
||||
decoratedBlock :: (Block -> Shape) -> Material -> Color -> Float -> [Point2] -> PSType
|
||||
--decoratedBlock :: (Block -> Shape) -> Material -> Color -> Float -> [Point2] -> PSType
|
||||
decoratedBlock :: BlSh -> Material -> Color -> Float -> [Point2] -> PSType
|
||||
decoratedBlock decf mat col h ps = PutBlock bl wl $ reverse ps
|
||||
where
|
||||
bl = defaultBlock
|
||||
& blDraw .~ (\bl' -> noPic (colorSH col (upperPrismPoly h $ reverse ps) <> decf bl'))
|
||||
& blDraw .~ BlockDraws [BlockDrawColHeightPoss col h (reverse ps),BlockDrawBlSh decf]
|
||||
--(\bl' -> noPic (colorSH col (upperPrismPoly h $ reverse ps) <> decf bl'))
|
||||
& blHeight .~ h
|
||||
& blMaterial .~ mat
|
||||
wl = defaultWall
|
||||
@@ -23,4 +25,4 @@ decoratedBlock decf mat col h ps = PutBlock bl wl $ reverse ps
|
||||
& wlHeight .~ h
|
||||
|
||||
lowBlock :: Material -> Color -> Float -> [Point2] -> PSType
|
||||
lowBlock = decoratedBlock (const mempty)
|
||||
lowBlock = decoratedBlock BlShMempty
|
||||
|
||||
Reference in New Issue
Block a user