Separate out concrete part of world

This commit is contained in:
2022-07-25 12:10:50 +01:00
parent 3354d108be
commit b2efbd2b3e
134 changed files with 933 additions and 930 deletions
+8 -8
View File
@@ -20,9 +20,9 @@ fixedSizePicAt pic p w
. scale theScale theScale
$ pic
where
campos = _cameraViewFrom w
campos = _cameraViewFrom (_cWorld w)
v = p -.- campos
theScale = 1 / _cameraZoom w
theScale = 1 / _cameraZoom (_cWorld w)
(V2 x y) = campos +.+ v
fixedSizePicClamp
@@ -40,11 +40,11 @@ fixedSizePicClamp xbord ybord pic p cfig w
. scale theScale theScale
$ pic
where
r = negate $ _cameraRot w
z = _cameraZoom w
campos = _cameraViewFrom w
r = negate $ _cameraRot (_cWorld w)
z = _cameraZoom (_cWorld w)
campos = _cameraViewFrom (_cWorld w)
v = p -.- campos
theScale = 1 / _cameraZoom w
theScale = 1 / _cameraZoom (_cWorld w)
(V2 x y) = campos +.+ rotateV (negate r) (V2 xr' yr')
(V2 xr yr) = rotateV r v
xr' = absClamp ((halfWidth cfig - fromIntegral xbord) / z) xr
@@ -71,8 +71,8 @@ fixedSizePicClampArrow xbord ybord pic p cfig w = pictures
Nothing -> blank
Just bp -> thickLine 5 [bp, fromMaybe p windowPoint]
(V2 x y) = fromMaybe p borderPoint
campos = _cameraCenter w
theScale = 1 / _cameraZoom w
campos = _cameraCenter (_cWorld w)
theScale = 1 / _cameraZoom (_cWorld w)
absClamp
:: Float -- ^ clamping value, assumed positive