This commit is contained in:
2025-10-27 00:09:11 +00:00
parent aa82519e05
commit c676005219
4 changed files with 17 additions and 14 deletions
+4 -3
View File
@@ -314,13 +314,14 @@ drawDDATest w =
<> foldMap (drawZone f 50) qs
<> foldMap (drawZone g 50) rs
<> foldMap (drawCrossCol yellow) xs
-- <> foldMap (drawCrossCol cyan) xs'
<> setLayer DebugLayer (color yellow (line [x, y]))
where
x = w ^. wCam . camViewFrom
y = mouseWorldPos (w ^. input) (w ^. wCam)
f [a,b,c,d] = color red $ thickLine 2 [a,c]
g [a,b,c,d] = color blue $ thickLine 2 [b,d]
f [a,_,c,_] = color red $ thickLine 2 [a,c]
f _ = undefined
g [_,b,_,d] = color blue $ thickLine 2 [b,d]
g _ = undefined
ps = zoneOfSeg 50 x y
qs = map (zoneOfPoint 50) $ xIntercepts' 50 x y
rs = map (zoneOfPoint 50) $ yIntercepts' 50 x y