jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
934 stars 185 forks source link

Getter methods for Azimuthal and Polar Angles in OrbitControl #328

Open AdilRabbani opened 4 years ago

AdilRabbani commented 4 years ago

Hello pythreejs team :wave:

I found out that the getter methods, getAzimuthalAngle() and getPolarAngle(), are not available in OrbitControls for pythreejs which are already available in OrbitControls for Three.js. Was there a specific reason to left these out? I am working on a project and these methods are an important part of it.

vidartf commented 3 years ago

It would be nice if you were able to be a little more specific about the underlying problem you are trying to solve. Maybe what you are trying to achieve is better achieved by processing the projectionMatrix trait of the camera that the OrbitControl is controlling?

If you want to add support for azimuth, polar and zoom (i.e. all three properties), here is what I would do: