Add view debug option
This commit is contained in:
+7
-10
@@ -25,20 +25,17 @@ import qualified IntMapHelp as IM
|
||||
import Control.Monad.State
|
||||
import Control.Lens
|
||||
|
||||
placeSpot' :: World -> ((Point2,Float) , Placement) -> World
|
||||
placeSpot' w (shift, plmnt) =
|
||||
let (i,w') = placeSpotID (shiftPSBy' shift (_placementSpot plmnt)) w
|
||||
in maybe w' (curry (placeSpot' w') shift) (_idPlacement plmnt i)
|
||||
placeSpot :: World -> ((Point2,Float) , Placement) -> World
|
||||
placeSpot w (shift, plmnt) =
|
||||
let (i,w') = placeSpotID (shiftPSBy shift (_placementSpot plmnt)) w
|
||||
in maybe w' (curry (placeSpot w') shift) (_idPlacement plmnt i)
|
||||
|
||||
shiftPlacement :: (Point2,Float) -> Placement -> Placement
|
||||
shiftPlacement shift (Placement ps f) = Placement (shiftPSBy' shift ps)
|
||||
shiftPlacement shift (Placement ps f) = Placement (shiftPSBy shift ps)
|
||||
(fmap (fmap $ shiftPlacement shift) f)
|
||||
|
||||
shiftPSBy'
|
||||
:: (Point2,Float)
|
||||
-> PlacementSpot
|
||||
-> PlacementSpot
|
||||
shiftPSBy' (pos,rot) ps = ps
|
||||
shiftPSBy :: (Point2,Float) -> PlacementSpot -> PlacementSpot
|
||||
shiftPSBy (pos,rot) ps = ps
|
||||
& psPos %~ shiftPointBy (pos,rot)
|
||||
& psRot %~ (+ rot)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user