Working cloud shadows (slow)
This commit is contained in:
+10
-5
@@ -27,6 +27,7 @@ module Picture
|
||||
, appendPic
|
||||
, tranRot
|
||||
, translate
|
||||
, translate3
|
||||
, rotate
|
||||
, scale
|
||||
, color
|
||||
@@ -161,17 +162,21 @@ color :: RGBA -> Picture -> Picture
|
||||
{-# INLINE color #-}
|
||||
color c = map $ overCol (const c)
|
||||
|
||||
translate3 :: Float -> Float -> Point3 -> Point3
|
||||
{-# INLINE translate3 #-}
|
||||
translate3 !a !b (V3 x y z) = V3 (x+a) (y+b) z
|
||||
translateH :: Float -> Float -> Point3 -> Point3
|
||||
{-# INLINE translateH #-}
|
||||
translateH !a !b (V3 x y z) = V3 (x+a) (y+b) z
|
||||
|
||||
translate :: Float -> Float -> Picture -> Picture
|
||||
{-# INLINE translate #-}
|
||||
translate x = map . overPos . translate3 x
|
||||
translate x = map . overPos . translateH x
|
||||
|
||||
translate3 :: Point3 -> Picture -> Picture
|
||||
{-# INLINE translate3 #-}
|
||||
translate3 v = map $ overPos (+.+.+ v)
|
||||
|
||||
tranRot :: V2 Float -> Float -> Picture -> Picture
|
||||
{-# INLINE tranRot #-}
|
||||
tranRot (V2 x y) r = map $ overPos (translate3 x y . rotate3 r)
|
||||
tranRot (V2 x y) r = map $ overPos (translateH x y . rotate3 r)
|
||||
|
||||
setDepth :: Float -> Picture -> Picture
|
||||
{-# INLINE setDepth #-}
|
||||
|
||||
Reference in New Issue
Block a user