I have a three.js application embedded within a div on a webpage. The issue I am facing is that when using the OrbitControls.js for zooming with the mouse wheel, it also scrolls the entire page. To overcome this, I need to prevent scrolling when the mouse is over the canvas.
After researching, I discovered a workaround in this post which involved modifying some code in OrbitControls.js. While this solution was effective in Chrome and Internet Explorer, it did not work in Firefox (the only browsers I tested).
Do you have any suggestions for a workaround that would be compatible with Firefox as well?
You can see an example of the desired functionality by visiting this provided link mentioned in the question above (excluding Firefox users).
JavaScript:
var container = document.getElementById("container");
container.appendChild(renderer.domElement);
controls = new THREE.OrbitControls(camera, renderer.domElement);
HTML:
<div id="container"></div>