Reogranise drawing in main
This commit is contained in:
@@ -59,7 +59,7 @@ glareBetween t len wdth col a b w
|
||||
|
||||
lowLightPic :: Float -> Float -> Color -> (Point2, Point2) -> World -> Picture
|
||||
lowLightPic len wdth col (a,b) w
|
||||
= case thingsHitLongLine a b w of
|
||||
= case thingsHit a b w of
|
||||
((p, E3x2 wall):_)
|
||||
-> setCol . lineOfThickness wdth $ [alongLineBy len p wa, alongLineBy len p wb]
|
||||
where x = len *.* (normalizeV $ wa -.- wb)
|
||||
|
||||
@@ -17,6 +17,7 @@ thingsHit sp ep w
|
||||
where
|
||||
hitCrs = IM.elems $ IM.filter (\cr -> circOnLine sp ep (_crPos cr) (_crRad cr))
|
||||
$ _creatures w
|
||||
-- $ creaturesAlongLine sp ep w
|
||||
crPs = map (\cr -> ssaTriPoint ep (_crPos cr) sp (_crRad cr)) hitCrs
|
||||
crs = zip crPs (map E3x1 hitCrs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user