Add flavour text, start smoke, support for different reload sounds

This commit is contained in:
2021-06-22 14:42:23 +02:00
parent 52eaeead5d
commit 39218ed3b5
31 changed files with 128 additions and 57 deletions
+11 -8
View File
@@ -69,8 +69,8 @@ girderZ w x y = setDepth (-0.1) $ color red $ pictures $
dia = rotateV (pi/4) n
ps' = map (\p -> intersectSegLine' xt yt p (p +.+ dia)) ps
ls = catMaybes $ zipWith (fmap . (,)) ps ps'
girderV :: Float -> Point2 -> Point2 -> Picture
girderV w x y = setDepth (-0.1) $ color red $ pictures $
girderV :: Color -> Float -> Point2 -> Point2 -> Picture
girderV col w x y = setDepth (-0.1) $ color col $ pictures $
[ thickLine [xt,yt] 3
, thickLine [xb,yb] 3
]
@@ -83,16 +83,19 @@ girderV w x y = setDepth (-0.1) $ color red $ pictures $
xt = x -.- n
yt = y -.- n
ps = divideLineExact (w*2) xb yb
(as,bs) = evenOddSplit ps
(as,_) = evenOddSplit ps
f a = map (\p -> intersectSegLine' xt yt p (p +.+ (rotateV a n)))
as' = catMaybes $ zipWith (fmap . (,)) as $ f (pi/4) as
bs' = catMaybes $ zipWith (fmap . (,)) as $ f (3*pi/4) as
girder :: Float -> Point2 -> Point2 -> Picture
girder w x y = setDepth (-0.1) $ color red $ pictures $
[ thickLine [xt,yt] 3
, thickLine [xb,yb] 3
girder :: Color -> Float -> Point2 -> Point2 -> Picture
girder col w x y = pictures $
[ setDepth (-0.1) $ color col $ pictures $
[ thickLine [xt,yt] 3
, thickLine [xb,yb] 3
]
++ map (flip thickLine 3 . flat2) ls
]
++ map (flip thickLine 3 . flat2) ls
++ map (\p -> verticalPipe 1.5 col p 0 (-0.1)) [xb,xt,yb,yt]
where
n = w *.* (normalizeV $ vNormal $ y -.- x)
xb = x +.+ n