Add visuals for wrist equipment
This commit is contained in:
@@ -18,6 +18,7 @@ import Dodge.Creature.Test
|
||||
--import Dodge.Creature.AlertLevel.Data
|
||||
--import Dodge.Picture.Layer
|
||||
import Dodge.Clock
|
||||
import Dodge.Creature.HandPos (translateToRightHand,translateToLeftHand)
|
||||
--import Dodge.Debug.Picture
|
||||
import Picture
|
||||
import Geometry
|
||||
@@ -166,21 +167,23 @@ feet cr = case cr ^? crStance . carriage of
|
||||
|
||||
arms :: Creature -> Shape
|
||||
{-# INLINE arms #-}
|
||||
arms cr
|
||||
| oneH cr = shoulderSH . translateSHf 11 (-3) . rotateSH (-0.5) $ scaleSH (V3 1 1.5 1) aHand
|
||||
| twists cr = shoulderSH . translateSHf 0 5 . rotateSH (-1) $ mconcat
|
||||
[ translateSHf 12 4 aHand
|
||||
, translateSHf 4 (-10) aHand
|
||||
]
|
||||
| twoFlat cr = waistSH $ translateSHf 4 8 aHand
|
||||
<> translateSHf 4 (-8) aHand
|
||||
| otherwise = case cr ^? crStance . carriage of
|
||||
Just (Walking sa LeftForward) -> waistSH $ translateSHf (-f sa) (-off) aHand
|
||||
Just (Walking sa RightForward) -> waistSH $ translateSHf (-f sa) off aHand
|
||||
_ -> emptySH
|
||||
arms cr = fst $ translateToRightHand cr aHand
|
||||
<> translateToLeftHand cr aHand
|
||||
--arms cr
|
||||
-- | oneH cr = shoulderSH . translateSHf 11 (-3) . rotateSH (-0.5) $ scaleSH (V3 1 1.5 1) aHand
|
||||
-- | twists cr = shoulderSH . translateSHf 0 5 . rotateSH (-1) $ mconcat
|
||||
-- [ translateSHf 12 4 aHand
|
||||
-- , translateSHf 4 (-10) aHand
|
||||
-- ]
|
||||
-- | twoFlat cr = waistSH $ translateSHf 4 8 aHand
|
||||
-- <> translateSHf 4 (-8) aHand
|
||||
-- | otherwise = case cr ^? crStance . carriage of
|
||||
-- Just (Walking sa LeftForward) -> waistSH $ translateSHf (-f sa) (-off) aHand
|
||||
-- Just (Walking sa RightForward) -> waistSH $ translateSHf (-f sa) off aHand
|
||||
-- _ -> emptySH
|
||||
where
|
||||
aHand :: Shape
|
||||
aHand = translateSHz (-4) . upperPrismPolyHalf 4 $ polyCirc 3 4
|
||||
aHand :: SPic
|
||||
aHand = noPic $ translateSHz (-4) . upperPrismPolyHalf 4 $ polyCirc 3 4
|
||||
off = 8
|
||||
sLen = _strideLength $ _crStance cr
|
||||
f i = negate 2 + negate 6 * fromIntegral (sLen - i) / fromIntegral sLen
|
||||
@@ -237,6 +240,7 @@ baseShoulder = translateSHz (-10) . scaleSH (V3 0.5 1 1) . upperPrismPolyHalf 10
|
||||
|
||||
upperBody :: Color -> Creature -> Shape
|
||||
{-# INLINE upperBody #-}
|
||||
--upperBody col cr = colorSH (light4 col) $ mconcat
|
||||
upperBody col cr = colorSH (light4 col) $ mconcat
|
||||
[ arms cr
|
||||
, shoulderSH $ torso cr
|
||||
|
||||
Reference in New Issue
Block a user