This commit is contained in:
2023-03-16 21:56:34 +00:00
parent bbbddb844d
commit 9e89dcebe7
7 changed files with 351 additions and 300 deletions
+23 -23
View File
@@ -44,7 +44,7 @@ basicCrShape cr
where
cskin = _crType cr
crsize = 0.1 * _crRad cr
tr = uncurryV translateSHf (_crPos cr)
tr = uncurryV translateSHxy (_crPos cr)
rotdir = rotateSH (_crDir cr)
rotmdir = rotateSH (_crMvDir cr)
@@ -53,18 +53,18 @@ feet :: Creature -> Shape
feet cr = case cr ^? crStance . carriage of
Just (Walking sa LeftForward) ->
mconcat
[ translateSHf (f sa) off aFoot
, translateSHf (- f sa) (- off) aFoot
[ translateSHxy (f sa) off aFoot
, translateSHxy (- f sa) (- off) aFoot
]
Just (Walking sa RightForward) ->
mconcat
[ translateSHf (- f sa) off aFoot
, translateSHf (f sa) (- off) aFoot
[ translateSHxy (- f sa) off aFoot
, translateSHxy (f sa) (- off) aFoot
]
_ ->
mconcat
[ translateSHf 0 off aFoot
, translateSHf 0 (- off) aFoot
[ translateSHxy 0 off aFoot
, translateSHxy 0 (- off) aFoot
]
where
aFoot :: Shape
@@ -78,18 +78,18 @@ deadFeet :: Creature -> Shape
deadFeet cr = case cr ^? crStance . carriage of
Just (Walking sa LeftForward) ->
mconcat
[ translateSHf (f sa) off aFoot
, translateSHf (- f sa) (- off) aFoot
[ translateSHxy (f sa) off aFoot
, translateSHxy (- f sa) (- off) aFoot
]
Just (Walking sa RightForward) ->
mconcat
[ translateSHf (- f sa) off aFoot
, translateSHf (f sa) (- off) aFoot
[ translateSHxy (- f sa) off aFoot
, translateSHxy (f sa) (- off) aFoot
]
_ ->
mconcat
[ translateSHf 0 off aFoot
, translateSHf 0 (- off) aFoot
[ translateSHxy 0 off aFoot
, translateSHxy 0 (- off) aFoot
]
where
aFoot :: Shape
@@ -122,9 +122,9 @@ deadRot cr = overPosSH (Q.rotateToZ d)
scalp :: Creature -> Shape
{-# INLINE scalp #-}
scalp cr
| twists cr = translateSHf 0 5 . rotateSH (-1) $ translateSHf (negate 2.5) 0.25 fhead
| oneH cr = rotateSH 0.5 $ translateSHf 2.5 0 fhead
| otherwise = translateSHf 2.5 0 fhead
| twists cr = translateSHxy 0 5 . rotateSH (-1) $ translateSHxy (negate 2.5) 0.25 fhead
| oneH cr = rotateSH 0.5 $ translateSHxy 2.5 0 fhead
| otherwise = translateSHxy 2.5 0 fhead
where
fhead = colorSH (greyN 0.9) . upperPrismPolyHalf 5 $ polyCirc 4 5
@@ -134,19 +134,19 @@ torso cr
| oneH cr =
rotateSH 0.5 $
mconcat
[ translateSHf 0 3 . rotateSH (negate 0.2) $ aShoulder
, translateSHf 0 (negate 3) . rotateSH 0.2 $ aShoulder
[ translateSHxy 0 3 . rotateSH (negate 0.2) $ aShoulder
, translateSHxy 0 (negate 3) . rotateSH 0.2 $ aShoulder
]
| twists cr =
translateSHf 0 5 . rotateSH (-1) $
translateSHxy 0 5 . rotateSH (-1) $
mconcat
[ rotateSH (negate 0.2) . translateSHf 2 3 . rotateSH (negate 0.4) $ aShoulder
, rotateSH (negate 0.2) . translateSHf 0 (negate 3) . rotateSH 0.2 $ aShoulder
[ rotateSH (negate 0.2) . translateSHxy 2 3 . rotateSH (negate 0.4) $ aShoulder
, rotateSH (negate 0.2) . translateSHxy 0 (negate 3) . rotateSH 0.2 $ aShoulder
]
| otherwise =
mconcat
[ translateSHf 0 3 . rotateSH (negate 0.2) $ aShoulder
, translateSHf 0 (negate 3) . rotateSH 0.2 $ aShoulder
[ translateSHxy 0 3 . rotateSH (negate 0.2) $ aShoulder
, translateSHxy 0 (negate 3) . rotateSH 0.2 $ aShoulder
]
where
aShoulder = scaleSH (V3 10 10 1) baseShoulder