Revert pictures to using lists rather than streams of Verx

This commit is contained in:
2022-07-10 09:30:00 +01:00
parent dc803b64b0
commit 21f814ede1
5 changed files with 30 additions and 21 deletions
+8 -2
View File
@@ -18,7 +18,13 @@ import Data.Maybe
import Data.List
import Data.Bifunctor
import Control.Lens
import qualified Streaming.Prelude as S
--import qualified Streaming.Prelude as S
--picMap :: (Verx -> Verx) -> Picture -> Picture
--picMap = map
picFormat :: [Verx] -> Picture
picFormat = id
translateXY :: Float -> Float -> Polyhedra -> Polyhedra
translateXY x y = pyFaces %~ map (map $ first tran)
@@ -120,7 +126,7 @@ polyToPics :: Polyhedra -> [Picture]
polyToPics = map helpPoly3D . _pyFaces
helpPoly3D :: [(Point3, Point4)] -> Picture
helpPoly3D = S.each . map f . polyToTris
helpPoly3D = picFormat . map f . polyToTris
where
f (pos,col) = Verx pos col [] BottomLayer polyNum