I've hit a roadblock trying to implement a right-click context menu in my Three.js scene. The trouble arises when I introduce the following lines of code, as it causes the HTML sliders in my page header to malfunction:
document.addEventListener('mousemove', onDocumentMouseMove, false);
document.addEventListener('mousedown', onMouseDown, false);
Most solutions I've come across focus on right-clicking specific objects in the scene. However, all I need is a straightforward method where I can right-click anywhere in the scene for the menu to appear.
Does anyone have an example that fits this criteria? Your help would be greatly appreciated!