Refactor, move towards adding cylinders

This commit is contained in:
2023-03-16 17:01:58 +00:00
parent 24c1264f96
commit 46d6d91138
4 changed files with 70 additions and 62 deletions
+10 -10
View File
@@ -26,22 +26,22 @@ basicCrPict :: Creature -> SPic
basicCrPict cr = uncurryV translateSPf (_crPos cr) (rotateSP (_crDir cr) $ drawEquipment cr)
<> (basicCrShape cr, mempty)
testShape :: Shape
testShape = translateSHz 10 . rotateSHx 1 . upperBox 20 $ polyCirc 2 10
--testShape :: Shape
--testShape = translateSHz 10 . rotateSHx 0 . upperCylinder 20 $ polyCirc 2 10
basicCrShape ::
Creature ->
Shape
basicCrShape cr
| _crCamouflage cr == Invisible = mempty
| otherwise = colorSH white $ tr $ rotdir testShape
-- | otherwise =
-- tr . scaleSH (V3 crsize crsize crsize) $
-- mconcat
-- [ rotdir . colorSH (_skinHead cskin) . translateSHz 20 $ scalp cr
-- , rotdir $ colorSH (_skinUpper cskin) $ upperBody cr
-- , rotmdir $ colorSH (_skinLower cskin) $ feet cr
-- ]
-- | otherwise = colorSH white $ tr $ rotdir testShape
| otherwise =
tr . scaleSH (V3 crsize crsize crsize) $
mconcat
[ rotdir . colorSH (_skinHead cskin) . translateSHz 20 $ scalp cr
, rotdir $ colorSH (_skinUpper cskin) $ upperBody cr
, rotmdir $ colorSH (_skinLower cskin) $ feet cr
]
where
cskin = _crType cr
crsize = 0.1 * _crRad cr