Allow tweaking z buffer when rendering polygon, improve explosion render

This commit is contained in:
2021-07-03 23:56:01 +02:00
parent 532f491327
commit 9df19a9e85
33 changed files with 339 additions and 82 deletions
+15 -4
View File
@@ -1,8 +1,11 @@
{-# LANGUAGE TupleSections #-}
module Picture
( module Picture.Data
, polygon
, polygonZ
, polygonCol
, poly3D
, poly3
, poly3Col
, bezierQuad
, arc
, arcSolid
@@ -63,13 +66,21 @@ polygon :: [Point2] -> Picture
{-# INLINE polygon #-}
polygon = Polygon 0
polygonZ :: [Point2] -> Float -> Picture
{-# INLINE polygonZ #-}
polygonZ = PolygonZ 0
polygonCol :: [(Point2,RGBA)] -> Picture
{-# INLINE polygonCol #-}
polygonCol = PolygonCol 0
poly3D :: [(Point3,RGBA)] -> Picture
{-# INLINE poly3D #-}
poly3D = Poly3D 0
poly3 :: [Point3] -> Picture
{-# INLINE poly3 #-}
poly3 = poly3Col . map (, black)
poly3Col :: [(Point3,RGBA)] -> Picture
{-# INLINE poly3Col #-}
poly3Col = Poly3D 0
-- note that much of work computing the width of the bezier curve is done here
bezierQuad :: Color -> Color -> Float -> Float -> Point2 -> Point2 -> Point2 -> Picture