This commit is contained in:
2023-05-20 15:06:05 +01:00
parent 6c71e1d5bb
commit f2183e9954
25 changed files with 69 additions and 86 deletions
+2 -2
View File
@@ -22,13 +22,13 @@ addRoomLinkDecorations rms w =
%~ IM.insertWithNewKeys (map roomLinkDecorations rms)
roomLinkDecorations :: Room -> Picture
roomLinkDecorations rm = pictures . map (linkDecoration . lnkPosDir) $ _rmLinks rm
roomLinkDecorations rm = foldMap (linkDecoration . lnkPosDir) $ _rmLinks rm
linkDecoration :: (Point2, Float) -> Picture
linkDecoration (p, a) = setLayer DebugLayer . color red $ line [p, p +.+ 20 *.* unitVectorAtAngle (a - pi / 2)]
roomPolyDecorations :: Room -> Picture
roomPolyDecorations rm = pictures . map polyWireFrame $ _rmPolys rm
roomPolyDecorations rm = foldMap polyWireFrame $ _rmPolys rm
polyWireFrame :: [Point2] -> Picture
polyWireFrame (x : xs) = setLayer DebugLayer . setDepth 50 . color green $ line $ (x : xs) ++ [x]