Hello. We created 3d presentation with Babylon JS Engine and tested with various Internet browsers: Firefox, Edge, Safari, Opera, Chrome. We don’t understand why zoom function in Edge with computer mouse not working at all. I think It’s a bug but maybe some problem with code. For this reason I have added slider for manipulating of radius of ArcRotateCamera.
Our presentation in 3d: https://bialasana.cba.pl/engine/indexLast.html
Please check our code and zoom function in Microsoft Edge.
Thx for response.
Ok for some reason I had it to work with:
scene.activeCamera.wheelDeltaPercentage = 0.01
@PolygonalSun do you know why?
It works of course but I don’t know why
I’m not sure why off the top of my head so lemme take a quick look
Okay, here’s what’s happening. The reason why you’re seeing such a big difference between Edge and the other browsers is because of the delta values that Edge provides in a wheel event are much bigger than other browsers (eg. Edge: +/- 125, Chrome: +/- 100). We try to use Chrome as the standard for movement and tend to consider differences from what Chrome has, to be differences in the amount of zoom the wheel is doing (eg. Edge is doing 1.25x more movement). This is specifically to account for how Safari handles wheel type events.
Furthermore, with the way that percentage movement works with inertia, wheelDeltaPercentage
will have a much larger overall movement (eg. value of 0.01/1% with an inertia
of 0.9 will move of around 10%). With the limits that you’ve set up, if you use a percentage of 0.1 (assuming default inertia), it will normally max out the movement on Chrome but because the delta is bigger on Edge, it will cancel the movement because the total movement will exceed your limits. At least I believe that’s what going on. With a much smaller value of 0.01, you should have ideal results across all browsers.
Thank you for support and comprehensive explanation. Topic to be closed.