Further strictifying
This commit is contained in:
@@ -94,13 +94,13 @@ placeSpot ps w = case _psType ps of
|
||||
where
|
||||
(q:qs) = map (shiftPointBy (p,rot)) ps'
|
||||
rmCrossPaths w' = foldr (uncurry removePathsCrossing) w' $ zip (q:qs) (qs++[q])
|
||||
PutForeground poly -> w & foregroundDecorations %~ (map (uncurry translateXY p . rotateXY rot) poly ++)
|
||||
PutForeground poly -> w & foregroundDecorations %~ (map (uncurryV translateXY p . rotateXY rot) poly ++)
|
||||
PutNothing -> w
|
||||
PutID _ -> w
|
||||
--_ -> w
|
||||
where
|
||||
p@(px,py) = _psPos ps
|
||||
p' = (px,py,0)
|
||||
p@(V2 px py) = _psPos ps
|
||||
p' = (V3 px py 0)
|
||||
rot = _psRot ps
|
||||
|
||||
-- TODO: remove this typeclass
|
||||
@@ -192,11 +192,11 @@ placeCr crF p rot = over creatures addCr
|
||||
crs
|
||||
|
||||
placeLS :: LightSource -> Picture -> Point3 -> Float -> World -> World
|
||||
placeLS ls dec (x,y,z) rot w = over lightSources addLS $ over decorations addDec w
|
||||
placeLS ls dec (V3 x y z) rot w = over lightSources addLS $ over decorations addDec w
|
||||
where
|
||||
addLS lss = IM.insert
|
||||
(IM.newKey lss)
|
||||
(ls {_lsPos = (x,y,z),_lsDir = rot,_lsID = IM.newKey lss})
|
||||
(ls {_lsPos = (V3 x y z),_lsDir = rot,_lsID = IM.newKey lss})
|
||||
lss
|
||||
addDec decs = IM.insert
|
||||
(IM.newKey decs)
|
||||
|
||||
Reference in New Issue
Block a user