[Fencommits] fenfire-hs: interpolate but don't bounce width & height, it usually doesn't look good
Benja Fallenstein
benja.fallenstein at gmail.com
Thu Feb 15 15:54:20 EET 2007
Thu Feb 15 14:50:14 EET 2007 Benja Fallenstein <benja.fallenstein at gmail.com>
* interpolate but don't bounce width & height, it usually doesn't look good
diff -rN -u old-fenfire-hs/Vobs.fhs new-fenfire-hs/Vobs.fhs
--- old-fenfire-hs/Vobs.fhs 2007-02-15 15:54:18.000000000 +0200
+++ new-fenfire-hs/Vobs.fhs 2007-02-15 15:54:19.000000000 +0200
@@ -274,8 +274,10 @@
fromList [(key, liftM2 f (sc1 Map.! key) (sc2 Map.! key))
| key <- interpKeys] where
interpKeys = intersect (keys sc1) (keys sc2)
- f (m1,(w1,h1)) (m2,(w2,h2)) = (i m1 m2, (i w1 w2, i h1 h2))
+ f (m1,(w1,h1)) (m2,(w2,h2)) = (i m1 m2, (j w1 w2, j h1 h2))
i x y = interpolate fract x y
+ -- don't bounce width and height, it usually doesn't look good:
+ j x y = interpolate (max 0 $ min 1 $ fract) x y
isInterpUseful :: Ord k => Scene k -> Scene k -> Bool
More information about the Fencommits
mailing list