I am currently working on a project with a sphere displaying a map using Three.js. The image I'm using has dimensions of 1024*2048.
However, I have encountered an issue where the CircleGeometries placed on the sphere to indicate certain points of interest are not aligning correctly with the countries on the map. Simply loading the image onto the sphere is not providing the desired result.
My solution is to rotate the map slightly so that it lines up with the points of interest, but I am struggling to make this adjustment successfully.
I attempted to use texture.offset.x = 0.5;
, setting the offset to half of the globe's circumference (Math.PI / (2 * Math.PI) = 0.5) in order to rotate the map half a globe. However, this resulted in only half of the globe being covered by the image.
Next, I tried using
texture.wrapS = THREE.RepeatWrapping;
which led to multiple images overlapping on the globe, creating a visually unappealing outcome.
I researched solutions such as rotating a sphere texture in Three.js, but unfortunately, these did not resolve my specific problem. Additionally, I am curious if having a power-of-two image is necessary for this process?
If anyone has any suggestions or ideas on how to address this issue, I would greatly appreciate it.