Add flavour text, start smoke, support for different reload sounds
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user