Given a three.js scene, how does one calculate the theta
and phi
polar coordinates from the x, y and z position
and rotation
property values of a THREE.PerspectiveCamera
?
You just need to take your x
, y
, and z
coordinates and plug them into the following equations:
Source: https://en.wikipedia.org/wiki/Spherical_coordinate_system