Make Shapes use Streaming rather than Vector streaming

This commit is contained in:
2022-07-03 23:04:58 +01:00
parent 02fcb5f072
commit f9a904d52b
11 changed files with 54 additions and 47 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ teslaGun = defaultBatteryGun
teslaGunPic :: Item -> SPic
teslaGunPic _ = noPic $ colorSH blue $
upperPrismPoly 5 (rectNESW xb 8 xa 0)
++ upperPrismPoly 5 (rectNESW (-xa) 8 (-xb) 0)
<> upperPrismPoly 5 (rectNESW (-xa) 8 (-xb) 0)
where
xa = 1
xb = 9
+1 -1
View File
@@ -302,7 +302,7 @@ miniGunXPict i spin _ =
)
where
aBarrel = translateSH (V3 15 2 2) baseCaneShape
barrels = concatMap (\an -> aBarrel & rotateSHx (2*pi * fromIntegral an / fromIntegral i)) [1..i]
barrels = foldMap (\an -> aBarrel & rotateSHx (2*pi * fromIntegral an / fromIntegral i)) [1..i]
a = fromIntegral spin / 100
--x = fromIntegral am / 10
-- clip y z = translateSH (V3 0 (-1) z) (rotateSHx (negate $ pi/4)
+1 -1
View File
@@ -41,7 +41,7 @@ shatterGun = defaultWeapon
shatterGunSPic :: Item -> SPic
shatterGunSPic _ = noPic $ colorSH blue $
upperPrismPoly 5 (rectNESW xb 8 xa 0)
++ upperPrismPoly 5 (rectNESW (-xa) 8 (-xb) 0)
<> upperPrismPoly 5 (rectNESW (-xa) 8 (-xb) 0)
where
xa = 1
xb = 9
+1 -1
View File
@@ -56,7 +56,7 @@ flamerPic :: Item -> SPic
flamerPic it =
( colorSH yellow $
translateSHf tx ty (upperPrismPoly tz $ polyCirc 3 r)
++ upperPrismPoly 5 (rectNESW 2 18 (-2) 0)
<> upperPrismPoly 5 (rectNESW 2 18 (-2) 0)
, color black $ translate3 (V3 tx ty (tz+0.01)) $ circleSolid (r * am)
)
where