Spaces:
Running
Running
Update index.html
Browse files- index.html +15 -11
index.html
CHANGED
|
@@ -154,17 +154,21 @@
|
|
| 154 |
.arcDashAnimateTime(() => 2000);
|
| 155 |
|
| 156 |
// Borders
|
| 157 |
-
fetch('
|
| 158 |
-
|
| 159 |
-
.
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
|
| 169 |
// Orbit controls tuning (zoom/rotate)
|
| 170 |
const ctrl = globe.controls();
|
|
|
|
| 154 |
.arcDashAnimateTime(() => 2000);
|
| 155 |
|
| 156 |
// Borders
|
| 157 |
+
fetch('./geocountries.json', { cache: 'no-cache' })
|
| 158 |
+
.then(r => {
|
| 159 |
+
if (!r.ok) throw new Error(`HTTP ${r.status}`);
|
| 160 |
+
return r.json();
|
| 161 |
+
})
|
| 162 |
+
.then(({ features }) => {
|
| 163 |
+
globe
|
| 164 |
+
.polygonsData(features)
|
| 165 |
+
.polygonCapColor(() => 'rgba(0,0,0,0)')
|
| 166 |
+
.polygonSideColor(() => 'rgba(0,0,0,0)')
|
| 167 |
+
.polygonStrokeColor(() => 'rgba(255,255,255,0.28)')
|
| 168 |
+
.polygonAltitude(() => 0.002);
|
| 169 |
+
})
|
| 170 |
+
.catch(err => showErr(`Failed to load polygons: ${err.message}`));
|
| 171 |
+
|
| 172 |
|
| 173 |
// Orbit controls tuning (zoom/rotate)
|
| 174 |
const ctrl = globe.controls();
|