Skip to content

Commit e81d307

Browse files
author
Zhanarbek Osmonaliev
committed
Add backdrop glow
1 parent d95adf6 commit e81d307

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ function initGlobe() {
105105
.hexPolygonsData(countries.features)
106106
.hexPolygonResolution(3)
107107
.hexPolygonMargin(0.7)
108-
.showAtmosphere(false)
108+
.showAtmosphere(true)
109+
.atmosphereColor("#3a228a")
110+
.atmosphereAltitude(0.25)
109111
.hexPolygonColor((e) => {
110112
if (
111113
["KGZ", "KOR", "THA", "RUS", "UZB", "IDN", "KAZ", "MYS"].includes(
@@ -116,6 +118,7 @@ function initGlobe() {
116118
} else return "rgba(255,255,255, 0.7)";
117119
});
118120

121+
// NOTE Arc animations are followed after the globe enters the scene
119122
setTimeout(() => {
120123
Globe.arcsData(travelHistory.flights)
121124
.arcColor((e) => {
@@ -156,23 +159,10 @@ function initGlobe() {
156159
globeMaterial.emissive = new Color(0x220038);
157160
globeMaterial.emissiveIntensity = 0.1;
158161
globeMaterial.shininess = 0.7;
162+
159163
// NOTE Cool stuff
160164
// globeMaterial.wireframe = true;
161165

162-
// Initialize the glow
163-
var options = {
164-
backside: true,
165-
color: "#3a228a",
166-
size: 100 * 0.25,
167-
power: 6,
168-
coefficient: 0.3,
169-
};
170-
try {
171-
var glowMesh = createGlowMesh(new SphereGeometry(100, 75, 75), options);
172-
Globe.add(glowMesh);
173-
} catch (err) {
174-
console.log("Your threeJS version does not support three-glow-mesh");
175-
}
176166
scene.add(Globe);
177167
}
178168

0 commit comments

Comments
 (0)