Improve pathing debugging, work on door pathing
This commit is contained in:
@@ -2,11 +2,20 @@ module Picture.Composite where
|
||||
import Picture.Data
|
||||
import Picture.Base
|
||||
import Geometry
|
||||
--import Color
|
||||
|
||||
import Data.Foldable
|
||||
|
||||
arrowPath :: [Point2] -> Picture
|
||||
arrowPath xs = mconcat $ zipWith arrow xs $ tail xs
|
||||
|
||||
multiArrow :: Foldable t => Point2 -> Point2 -> Color -> t Color -> Picture
|
||||
multiArrow sp ep col' cols
|
||||
| null cols = color col' (arrow sp ep)
|
||||
| otherwise = foldl' f mempty cols
|
||||
where
|
||||
f pic col = uncurryV translate offset pic <> color col (arrow sp ep)
|
||||
offset = normalizeV (vNormal (ep -.- sp))
|
||||
|
||||
arrow :: Point2 -> Point2 -> Picture
|
||||
arrow a b = line [a,b]
|
||||
<> line [b +.+ n -.- v,b]
|
||||
|
||||
Reference in New Issue
Block a user