Make pictures use Streaming
This commit is contained in:
@@ -16,6 +16,8 @@ import Polyhedra
|
||||
import qualified IntMapHelp as IM
|
||||
import LensHelp
|
||||
|
||||
import qualified Streaming.Prelude as S
|
||||
|
||||
colorLamp
|
||||
:: Point3 -- color of lamp
|
||||
-> Float -- height of lamp
|
||||
@@ -39,7 +41,7 @@ lamp h = defaultInanimate
|
||||
lampCrPic :: Float -> Picture
|
||||
lampCrPic h = pictures
|
||||
[ setLayer BloomLayer (setDepth h . color white $ circleSolid 3)
|
||||
, concatMap (polyToTris . map f) $ boxXYZnobase 5 5 (h-1)
|
||||
, foldMap (S.each . polyToTris . map f) $ boxXYZnobase 5 5 (h-1)
|
||||
]
|
||||
where
|
||||
f pos = Verx (pos -.-.- V3 2.5 2.5 0) blue [] BottomLayer polyNum
|
||||
|
||||
Reference in New Issue
Block a user