Unify matrix uniform assignment, move towards uniform block
This commit is contained in:
+5
-5
@@ -122,7 +122,7 @@ extrapolate (ox,oy) (ax,ay) (bx,by) (x,y) =
|
||||
|
||||
color :: RGBA -> Picture -> Picture
|
||||
{-# INLINE color #-}
|
||||
color c = OverPic id 0 (const c)
|
||||
color c = OverPic id (const c)
|
||||
|
||||
translate3 :: Float -> Float -> Point3 -> Point3
|
||||
{-# INLINE translate3 #-}
|
||||
@@ -130,11 +130,11 @@ translate3 a b (x,y,z) = (x+a,y+b,z)
|
||||
|
||||
translate :: Float -> Float -> Picture -> Picture
|
||||
{-# INLINE translate #-}
|
||||
translate x y = OverPic (translate3 x y) 0 id
|
||||
translate x y = OverPic (translate3 x y) id
|
||||
|
||||
setDepth :: Float -> Picture -> Picture
|
||||
{-# INLINE setDepth #-}
|
||||
setDepth d = OverPic (\(x,y,_) -> (x,y,d)) 0 id
|
||||
setDepth d = OverPic (\(x,y,_) -> (x,y,d)) id
|
||||
|
||||
setLayer :: Int -> Picture -> Picture
|
||||
{-# INLINE setLayer #-}
|
||||
@@ -146,7 +146,7 @@ scale3 a b (x,y,z) = (x*a,y*b,z)
|
||||
|
||||
scale :: Float -> Float -> Picture -> Picture
|
||||
{-# INLINE scale #-}
|
||||
scale x y = OverPic (scale3 x y) 0 id
|
||||
scale x y = OverPic (scale3 x y) id
|
||||
|
||||
rotate3 :: Float -> Point3 -> Point3
|
||||
{-# INLINE rotate3 #-}
|
||||
@@ -156,7 +156,7 @@ rotate3 a (x,y,z) = (x',y',z)
|
||||
|
||||
rotate :: Float -> Picture -> Picture
|
||||
{-# INLINE rotate #-}
|
||||
rotate a = OverPic (rotate3 a) a id
|
||||
rotate a = OverPic (rotate3 a) id
|
||||
|
||||
pictures :: [Picture] -> Picture
|
||||
{-# INLINE pictures #-}
|
||||
|
||||
Reference in New Issue
Block a user