Cleanup creature shape
This commit is contained in:
@@ -51,14 +51,11 @@ basicCrShape cr
|
|||||||
feet :: Creature -> Shape
|
feet :: Creature -> Shape
|
||||||
{-# INLINE feet #-}
|
{-# INLINE feet #-}
|
||||||
feet cr = case cr ^? crStance . carriage of
|
feet cr = case cr ^? crStance . carriage of
|
||||||
Just (Walking sa LeftForward) ->
|
Just (Walking sa LeftForward) -> sh (f sa)
|
||||||
translateSHxy (f sa) off aFoot
|
Just (Walking sa RightForward) -> sh (-f sa)
|
||||||
<> translateSHxy (- f sa) (- off) aFoot
|
_ -> sh 0
|
||||||
Just (Walking sa RightForward) ->
|
|
||||||
translateSHxy (- f sa) off aFoot
|
|
||||||
<> translateSHxy (f sa) (- off) aFoot
|
|
||||||
_ -> translateSHxy 0 off aFoot <> translateSHxy 0 (- off) aFoot
|
|
||||||
where
|
where
|
||||||
|
sh x = translateSHxy x off aFoot <> translateSHxy (- x) (- off) aFoot
|
||||||
aFoot = upperPrismPolyST 10 $ polyCirc 3 4
|
aFoot = upperPrismPolyST 10 $ polyCirc 3 4
|
||||||
off = 5
|
off = 5
|
||||||
sLen = _strideLength $ _crStance cr
|
sLen = _strideLength $ _crStance cr
|
||||||
@@ -113,14 +110,12 @@ deadUpperBody cr = deadRot cr . translateSHz (negate 10) . upperBody $ cr
|
|||||||
|
|
||||||
baseShoulder :: Shape
|
baseShoulder :: Shape
|
||||||
{-# INLINE baseShoulder #-}
|
{-# INLINE baseShoulder #-}
|
||||||
baseShoulder = translateSHz (-20) . scaleSH (V3 0.5 1 1) . upperPrismPolyHalfMI 10 $ polyCirc 3 1
|
--baseShoulder = translateSHz (-20) . scaleSH (V3 0.5 1 1) . upperPrismPolyHalfMI 10 $ polyCirc 3 1
|
||||||
|
baseShoulder = scaleSH (V3 0.5 1 1) . upperPrismPolyHalfMI 10 $ polyCirc 3 1
|
||||||
|
|
||||||
upperBody :: Creature -> Shape
|
upperBody :: Creature -> Shape
|
||||||
{-# INLINE upperBody #-}
|
{-# INLINE upperBody #-}
|
||||||
upperBody cr = arms cr <> shoulderSH (torso cr)
|
upperBody cr = arms cr <> torso cr
|
||||||
|
|
||||||
shoulderSH :: Shape -> Shape
|
|
||||||
shoulderSH = translateSHz 20
|
|
||||||
|
|
||||||
drawEquipment :: IM.IntMap Item -> Creature -> SPic
|
drawEquipment :: IM.IntMap Item -> Creature -> SPic
|
||||||
{-# INLINE drawEquipment #-}
|
{-# INLINE drawEquipment #-}
|
||||||
|
|||||||
Reference in New Issue
Block a user