I was able to create a globe similar to this example. However, I am facing an issue when trying to retrieve the countries visible in the scene in Three.js when the globe is stationary. I can successfully retrieve the color code of a specific country when hovering or clicking on it using the readPixels method as shown below
var gl = renderer.context;
var mx = ( mouseX + renderer.context.canvas.width/2 );
var my = ( -mouseY + renderer.context.canvas.height/2 );
mx = Math.floor( mx );
my = Math.floor( my );
var buf = new Uint8Array( 4 );
gl.readPixels( mx, my, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf );
However, when the globe is not rotating and I need to retrieve a list of visible countries from the scene, using Raycaster to scan through all the pixels and obtain the country code proves to be a performance issue for us
I would greatly appreciate any insights or suggestions on this matter