I want to develop a Python function that automatically limits the maximum height of the camera, which is the Z-value
Thank you very much for your work. Now I have a big scene and I want to limit the maximum height of the camera, which is the Z-value. I should modify this: viser/src/viser/client/src/CameraControls.tsx Write some codes: const boundaryBox = new THREE.Box3(); boundaryBox.min.set(-999.0, -999.0, -0.49); boundaryBox.max.set(999.0, 999.0, 0.49);
However, every time I change a scene, I need to manually set boundaryBox.min.set, boundaryBox.max.set。 I want to create a Python function to automatically set the height of the camera. This seems to be related to web development, unfortunately I know nothing about it Can you teach me or provide me with some reference materials? Thank you very much.
Hi! One thing you could do is trace how messages in viser are defined, wrapped, and ultimately handled.
One relatively simple example I can recommend is the ResetSceneMessage: https://github.com/search?q=repo%3Anerfstudio-project%2Fviser+ResetSceneMessage&type=code
You could define your own message with the functionality that you're looking for.