Cleanup, improve auto wall rotate
This commit is contained in:
@@ -36,15 +36,14 @@ mntLSOn ::
|
||||
-- | function describing the mount shape
|
||||
(Point2 -> Point3 -> Shape) ->
|
||||
-- | describing a possible color override for the shape
|
||||
Maybe Color ->
|
||||
LightSource ->
|
||||
Point2 ->
|
||||
Point3 ->
|
||||
(Placement -> Maybe Placement) ->
|
||||
Placement
|
||||
mntLSOn shapeF mcol ls wallp lsp@(V3 lx ly _) =
|
||||
mntLSOn shapeF ls wallp lsp@(V3 lx ly _) =
|
||||
ps0jPushPS (PutLabel "light") .
|
||||
ps0jPushPS (putShape . setCol $ shapeF wallp lsp)
|
||||
ps0jPushPS (putShape $ shapeF wallp lsp)
|
||||
--ps0j (PutLabel "light") .
|
||||
--ps0j (putShape . setCol $ shapeF wallp lsp)
|
||||
. pt0 (PutLS $ ls & lsParam . lsPos .~ lsp')
|
||||
@@ -52,7 +51,7 @@ mntLSOn shapeF mcol ls wallp lsp@(V3 lx ly _) =
|
||||
lsp' = lsp -.-.- V3 x y 1
|
||||
-- hack! perturb the light position
|
||||
V2 x y = rotateV 1 . (0.1 *.*) . normalizeV $ wallp -.- V2 lx ly
|
||||
setCol = maybe id colorSH mcol
|
||||
-- setCol = maybe id colorSH mcol
|
||||
|
||||
iShape :: Point2 -> Point3 -> Shape
|
||||
iShape wp (V3 x y z) = thinHighBar z wp (V2 x y)
|
||||
@@ -107,7 +106,7 @@ vShape wallpos (V3 x y z) =
|
||||
wallposDown = wallpos -.- n
|
||||
|
||||
mntLS :: (Point2 -> Point3 -> Shape) -> Point2 -> Point3 -> Placement
|
||||
mntLS shp wallp lampp = mntLSOn shp Nothing defaultLS wallp lampp (const Nothing)
|
||||
mntLS shp wallp lampp = mntLSOn shp defaultLS wallp lampp (const Nothing)
|
||||
where
|
||||
defaultLS = LS 0 $ LSParam 0 300 0.6
|
||||
|
||||
@@ -152,7 +151,7 @@ mntLightLnkCond ps = do
|
||||
return $ mntLSCond (fmap (fmap $ colorSH black) shp) ps
|
||||
|
||||
mntLightLnkShape :: (Point2 -> Point3 -> Shape) -> PlacementSpot -> Placement
|
||||
mntLightLnkShape shp ps = mntLSCond (fmap (fmap $ colorSH black) shp) ps
|
||||
mntLightLnkShape shp = mntLSCond (fmap (fmap $ colorSH black) shp)
|
||||
|
||||
mntLightLnkCond' :: PlacementSpot -> Placement
|
||||
mntLightLnkCond' = mntLSCond (fmap (fmap $ colorSH black) vShape)
|
||||
|
||||
Reference in New Issue
Block a user