Disable double click to change view angle.
Disable double click to change view angle. Im not a dev myself but when using the viewer and double clicking the mouse, the camera changes angle accordingly. Our issue is that we dont want users to be able to place the model off it's center, this affects the rotation centerpoint.
So i asked my dev to disable the double click and he responded that it is coded in the viewer and can't be tuned off. Is that so? And if so, can we keep the double click but not let the anchor point change when using it. This way the camera angle changes but rotation still happends in the center of the model.
Thx
One way would be to use the DropInViewer in a THREE.Scene and implement custom controls. It's well documented.
Or disable useBuiltInControls (linked to splat interaction). Guess it does serve its purpose though, when you disable the re-center, the object needs to be perfectly aligned from the start.
Thanks! But this also disables rotation which we do want to have.
I used a little hack to prevent the click in some cases that I want the viewer to ignore a click/press:
Add an eventhandler to your code for mousedown, and in that handler set:
viewer.mouseDownTime = 0
Where viewer is your instance of the GaussianSplats3D viewer.
Then when the viewer mouseUp code is executed (see https://github.com/mkkellogg/GaussianSplats3D/blob/2dfc83e497bd76e558fe970c54464b17b5f5c689/src/Viewer.js#L542)
It won't register it as a click (it won't call the onMouseClick method)
Alternatively you could disable useBuiltInControls and set autoRotate on your own orbit control object , since autoRotate is a default property, see: https://threejs.org/docs/#examples/en/controls/OrbitControls