Implement simple sweep light
This commit is contained in:
@@ -70,6 +70,7 @@ placeSpots pss w = foldr (placeSpot . _placementSpot) w' singlePlacements
|
||||
{- | -}
|
||||
placeSpot :: PlacementSpot -> World -> World
|
||||
placeSpot ps w = case _psType ps of
|
||||
PutProp prop -> placeProp prop p rot w
|
||||
PutButton bt -> placeBt bt p rot w
|
||||
PutFlIt itm -> placeFlIt itm p rot w
|
||||
PutCrit cr -> placeCr cr p rot w
|
||||
@@ -146,6 +147,17 @@ addPane wl (p0,p1) wls = IM.insert (IM.newKey wls) (wl
|
||||
})
|
||||
wls
|
||||
|
||||
-- TODO make rotation of props sensible
|
||||
placeProp
|
||||
:: Prop
|
||||
-> Point2
|
||||
-> Float -- ^ Rotation
|
||||
-> World
|
||||
-> World
|
||||
placeProp pr p a = over props addProp
|
||||
where
|
||||
addProp prs = IM.insert (IM.newKey prs) (over pjRot (+a) pr {_pjPos = p, _pjID = IM.newKey prs}) prs
|
||||
|
||||
placeBt
|
||||
:: Button
|
||||
-> Point2
|
||||
|
||||
Reference in New Issue
Block a user