Move stride/footforward datatypes
This commit is contained in:
@@ -91,9 +91,9 @@ chaseUpperBody cr = colorSH (_skinUpper cskin)
|
||||
_ -> 0
|
||||
sLen = strideLength cr
|
||||
tbob = 5 * (1 - oneSmooth (abs llegpos))
|
||||
llegpos = case cr ^? crStance . carriage of
|
||||
Just (Walking sa LeftForward) -> f sa
|
||||
Just (Walking sa RightForward) -> -f sa
|
||||
llegpos = case (cr ^? crType . strideAmount,cr ^? crType . footForward) of
|
||||
(Just sa, Just LeftForward) -> f sa
|
||||
(Just sa, Just RightForward) -> -f sa
|
||||
_ -> 0
|
||||
--tbob = 2 * oneSmooth ((sLen - 2*i) / sLen)
|
||||
f i = (sLen - 2*i) / sLen
|
||||
@@ -104,9 +104,9 @@ oneSmooth x = sin (pi * x * 0.5)
|
||||
|
||||
feet :: Creature -> Shape
|
||||
{-# INLINE feet #-}
|
||||
feet cr = case cr ^? crStance . carriage of
|
||||
Just (Walking sa LeftForward) -> sh (f sa)
|
||||
Just (Walking sa RightForward) -> sh (-f sa)
|
||||
feet cr = case (cr ^? crType . strideAmount,cr ^? crType . footForward) of
|
||||
(Just sa,Just LeftForward) -> sh (f sa)
|
||||
(Just sa,Just RightForward) -> sh (-f sa)
|
||||
_ -> sh 0
|
||||
where
|
||||
sh x = translateSHxy x off aFoot <> translateSHxy (- x) (- off) aFoot
|
||||
|
||||
Reference in New Issue
Block a user