Open vorg opened 5 years ago
What can we do:
Current pex-renderer behaviour. Longitute 0 is on the right +X to make it match longitue 0 on a equirectangular earth texture (given primitive-sphere uv coords)
Three JS
The conclusion is not to touch lon
and lat
and introduce theta = lon - 90deg
and phi = lat
v4: move this to pex-cam
Currently orbiter is using latlon-to-xyz and xyz-to-latlon to convert spherical coordinates to xyz position. How those 2 relate to each other is matter of convention. The convention assumed in the current implementation assumes that lat:0, lon:0 is point [0, 0, 1] therefore orbiter is located at +X axis looking towards -X axis. This is to make it compatible with lat/lon coordinates of a textured sphere from https://github.com/glo-js/primitive-sphere often used for globe rendering. The problem is that this is agains default OpenGL convention where default camera is positioned +Z axis looking towards -Z axis.