Initial pass at shadows from level geometry

This commit is contained in:
jgk
2021-06-29 15:27:26 +02:00
parent 089dcc3f5d
commit 3d16c33d33
20 changed files with 181 additions and 74 deletions
+2 -1
View File
@@ -21,6 +21,7 @@ import Dodge.LevelGen.Data
import Geometry
import Geometry.Data
import Picture
import Polyhedra
import qualified IntMapHelp as IM
--import System.Random
@@ -93,7 +94,7 @@ 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 pic -> w & foregroundDecorations %~ (uncurry translate p (rotate rot pic) :)
PutForeground poly -> w & foregroundDecorations %~ (map (uncurry translateXY p . rotateXY rot) poly ++)
PutNothing -> w
PutID _ -> w
--_ -> w