Enable right click menu while using OrbitControls

100 Views Asked by At

In Three.js, I would like to enable the context menu in order to let the user save the canvas upon right click on the image, while using OrbitControls.

Disabling OrbitControls with controls.enabled = false; makes the right click menu come back, but obviously disables the controls. Only disabling the right click pan doing controls.enablePan = false; does not enable the right click menu.

1

There are 1 best solutions below

0
Mugen87 On BEST ANSWER

You can't configure the behavior that you are looking for. So you have to modify OrbitControls by simply removing the internal onContextMenu() event listener.