Allow for random choice between placements in different rooms
This commit is contained in:
@@ -20,7 +20,7 @@ mntLSOn
|
||||
-> Maybe Color -- ^ describing a possible color override for the shape
|
||||
-> LightSource -> Point2 -> Point3 -> (Placement -> Maybe Placement) -> Placement
|
||||
mntLSOn shapeF mcol ls wallp lsp@(V3 lx ly _)
|
||||
= ps0jPushPS (PutForeground . setCol $ shapeF wallp lsp)
|
||||
= ps0jPushPS (PutShape . setCol $ shapeF wallp lsp)
|
||||
. pt0 (PutLS $ ls {_lsPos = lsp'})
|
||||
where
|
||||
lsp' = lsp -.-.- V3 x y 1
|
||||
@@ -106,20 +106,20 @@ unusedLnkToPS rp _ = case rp of
|
||||
|
||||
spanLSLightI :: LightSource -> Float -> Point2 -> Point2 -> Placement
|
||||
spanLSLightI ls h a b = ps0j (PutLS ls {_lsPos = V3 x y h})
|
||||
$ sps0 $ PutForeground $ thinHighBar h a b
|
||||
$ sps0 $ PutShape $ thinHighBar h a b
|
||||
where
|
||||
V2 x y = 0.5 *.* (a +.+ b)
|
||||
|
||||
spanLS :: LightSource -> Point2 -> Point2 -> Placement
|
||||
spanLS ls a b = Placement (PS (V2 x y) 0) (PutLS ls) Nothing
|
||||
$ const $ Just $ sps0 $ PutForeground $ thinHighBar h a b
|
||||
$ const $ Just $ sps0 $ PutShape $ thinHighBar h a b
|
||||
where
|
||||
V3 _ _ h = _lsPos ls + 5
|
||||
V2 x y = 0.5 *.* (a +.+ b)
|
||||
|
||||
spanColLightI :: Point3 -> Float -> Point2 -> Point2 -> Placement
|
||||
spanColLightI col h a b = ps0j (PutLS $ colorLightAt col (V3 x y (h-5)) 0)
|
||||
$ sps0 $ PutForeground $ thinHighBar h a b
|
||||
$ sps0 $ PutShape $ thinHighBar h a b
|
||||
where
|
||||
V2 x y = 0.5 *.* (a +.+ b)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user