Various refactoring
This commit is contained in:
@@ -24,6 +24,7 @@ import Polyhedra
|
||||
|
||||
import Control.Lens
|
||||
import qualified Control.Foldl as L
|
||||
--import qualified Data.Vector.Fusion.Stream.Monadic as VS
|
||||
|
||||
defaultInanimate :: Creature
|
||||
defaultInanimate = defaultCreature & crActionPlan .~ Inanimate
|
||||
@@ -39,8 +40,10 @@ lamp h = defaultInanimate
|
||||
-- it is not clear that any of the attempts with Foldl help at all here
|
||||
lampPic :: Float -> Picture
|
||||
--{-# INLINE lampPic #-}
|
||||
lampPic h = setLayer 1 (setDepth h . color white $ circleSolid 3)
|
||||
++ (concatMap (preTriFold f) $ boxXYZnobase 5 5 (h-1))
|
||||
lampPic h = pictures
|
||||
[ setLayer 1 (setDepth h . color white $ circleSolid 3)
|
||||
, concatMap (polyToTris . map f) $ boxXYZnobase 5 5 (h-1)
|
||||
]
|
||||
where
|
||||
f pos = Verx (pos -.-.- V3 2.5 2.5 0) blue [] 0 polyNum
|
||||
|
||||
|
||||
Reference in New Issue
Block a user