use & strokeLineCap .~ pure CapSquare

This commit is contained in:
Anjali Smith 2022-06-11 12:44:00 -04:00
commit f5c3c0b9f4

View file

@ -18,7 +18,7 @@ data Segment = Segment Point Point
animatePart :: Segment -> Animation animatePart :: Segment -> Animation
animatePart (Segment (Point startx starty) (Point endx endy)) = signalA (curveS 2) $ setDuration customDuration $ animatePart (Segment (Point startx starty) (Point endx endy)) = signalA (curveS 2) $ setDuration customDuration $
animate $ \t -> animate $ \t ->
partialSvg t $ pathify $ mkLine (startx, starty) (endx, endy) partialSvg t $ pathify (mkLine (startx, starty) (endx, endy) & strokeLineCap .~ (pure CapSquare))
-- Helper function to create coordinates for a specific line -- Helper function to create coordinates for a specific line
splitSegments :: Segment -> Int -> [Segment] splitSegments :: Segment -> Int -> [Segment]