viser icon indicating copy to clipboard operation
viser copied to clipboard

how this project achieves mouse wheel scaling?

Open smart4654154 opened this issue 1 year ago • 4 comments

Hello, thank you very much for your work, I want to control the display range. I would like to ask how this project achieves mouse wheel scaling, left mouse button or keyboard up, down, left and right keys to control rotation, and right mouse button or WASD keys to control position movement. (Example as shown in the figure) As a beginner, I cannot find the corresponding code. Can you tell me what the relevant code is so that I can modify it? Thank you? 滚轮

smart4654154 avatar Mar 14 '24 01:03 smart4654154

Hi! You can find it in CameraControls.tsx: https://github.com/nerfstudio-project/viser/blob/main/src/viser/client/src/CameraControls.tsx

brentyi avatar Mar 14 '24 02:03 brentyi

Thank you very much. Specifically, I want to implement my features in the new version of the viewer in nerfstudio, But there is no CameraControls.tsx in nerfstudio. Can you tell me the code in nerfstudio that controls this feature?

By the way, I have a question about Crop scale. Do you have time to take a look at this issue? https://github.com/nerfstudio-project/nerfstudio/issues/1606 image

smart4654154 avatar Mar 14 '24 03:03 smart4654154

The latest version of nerfstudio just uses viser as a dependency, so if you make a change to viser (eg a clone of it that you do an editable install of with pip install -e .) it should be reflected there!

Other issue: will take a look and respond in the other repo.

brentyi avatar Mar 15 '24 23:03 brentyi

thank you very much. I have successfully implemented the control of the roller, and this is my process to share with those in need Viser can be installed on Linux and can be installed on Win10(fellow this https://github.com/nerfstudio-project/viser/issues/179)

This is my experimental procedure: I should have installed nerfstudio properly Then pip uninstall viser And then git clone https://github.com/nerfstudio-project/viser.git cd/ viser Pip install - e. if you use Win10, I think you may encounter error. You can fellow this https://github.com/nerfstudio-project/viser/issues/179 Find viser/blob/main/src/visitor/client/src/CameraControls.tsx and modify CameraControls.tsx Run ns-viewer –load-config data/path in nerfstudio you will be able to control the range of the scroll wheel.

smart4654154 avatar Mar 16 '24 15:03 smart4654154