summaryrefslogtreecommitdiff
path: root/public/assets/test/ortho.html
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/test/ortho.html')
-rw-r--r--public/assets/test/ortho.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/public/assets/test/ortho.html b/public/assets/test/ortho.html
index 1ca7e06..2257006 100644
--- a/public/assets/test/ortho.html
+++ b/public/assets/test/ortho.html
@@ -99,6 +99,15 @@ Map.UI.Ortho = function(map){
new_cursor.y.div(map.dimensions.b).sub(0.5).mul(map.dimensions.b / map.zoom).sub(map.center.b)
}
})
+
+ base.wheel = new wheel({
+ el: map.el,
+ update: mousewheel,
+ })
+
+ function mousewheel (e, deltaY, deltaX){
+ map.set_zoom(map.zoom_exponent - deltaY/20)
+ }
}
var scene, map, controls