summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MeshSketch.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/MeshSketch.hs b/MeshSketch.hs
index 8c46d54..6d7e757 100644
--- a/MeshSketch.hs
+++ b/MeshSketch.hs
@@ -310,6 +310,16 @@ onEvent w realized ev = do
310 EventTypeScroll -> do 310 EventTypeScroll -> do
311 sev <- get ev #scroll 311 sev <- get ev #scroll
312 d <- get sev #direction 312 d <- get sev #direction
313 let δ = case d of
314 ScrollDirectionDown -> - pi/180
315 ScrollDirectionUp -> pi/180
316 _ -> 0
317 when (δ /= 0) $ do
318 modifyIORef (stCamera st) $ \cam -> cam
319 { camHeightAngle = δ + camHeightAngle cam
320 , camWorldToScreen = Nothing
321 , camScreenToWorld = Nothing
322 }
313 put d 323 put d
314 return () 324 return ()
315 325