pythreejs
pythreejs copied to clipboard
Getter methods for Azimuthal and Polar Angles in OrbitControl
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.
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:
- add the three variables in js/scripts/three-class-config.js
- add another listener to
endin js/src/controls/OrbitControls.js that extracts the value from the three.js object and out it into the model. - add the appropriate code to apply any changes to those values from the kernel onto the three.js object