Refactor, move towards adding cylinders
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user