Add general smooth scrolling, move camera into world
This commit is contained in:
@@ -15,9 +15,9 @@ import Geometry
|
||||
--worldPosToScreenNorm :: Configuration -> World -> Point2 -> Point2
|
||||
--worldPosToScreenNorm cfig w = doWindowScale cfig . doRotate . doZoom . doTranslate
|
||||
-- where
|
||||
-- doTranslate p = p -.- (w ^. cWorld . lWorld . cwCam . cwcCenter)
|
||||
-- doZoom p = (w ^. cWorld . lWorld . cwCam . cwcZoom) *.* p
|
||||
-- doRotate p = rotateV (negate (w ^. cWorld . lWorld . cwCam . cwcRot)) p
|
||||
-- doTranslate p = p -.- (w ^. cWorld . lWorld . wCam . cwcCenter)
|
||||
-- doZoom p = (w ^. cWorld . lWorld . wCam . cwcZoom) *.* p
|
||||
-- doRotate p = rotateV (negate (w ^. cWorld . lWorld . wCam . cwcRot)) p
|
||||
|
||||
{- | Transform world coordinates to scaled screen coordinates.
|
||||
- These have to be scaled according to the size of the window to get actual screen positions.
|
||||
|
||||
Reference in New Issue
Block a user