After searching for a solution to change the color of a Three.js globe, I came across a link that didn't work as expected: Change the color of a Three.js globe. My goal is to change the globe color from black to white using .
I attempted to use the following code to change the color, but I didn't achieve the desired outcome:
var container = document.getElementById("globalArea");
var configs = {
"control": {
"stats": false,
"disableUnmentioned": false,
"lightenMentioned": true,
"inOnly": false,
"outOnly": false,
"initCountry": "PK,CN",
"halo": true,
"transparentBackground": true,
"autoRotation": false,
"rotationRatio": 0
},
"color": {
"surface": 10334380,
"selected": 14853451,
"in": 11247212,
"out": 14823329,
"halo": 9539985,
},
"brightness": {
"ocean": 0,
"mentioned": 0,
"related": 0
}
};
var controller = new GIO.Controller(container, configs);
console.log(controller);
//controller.setHaloColor("#7E8084");
controller.removeHalo();
controller.setTransparentBackground(true);
controller.setInitCountry("BE");
controller.lightenMentioned(true);
controller.adjustOceanBrightness(0.8);
controller.setSurfaceColor("#FFFFFF");
controller.adjustRelatedBrightness(0.8);
controller.adjustMentionedBrightness(0.8);
//controller.addData(data);
controller.init();