Molbap HF Staff commited on
Commit
d10f435
·
verified ·
1 Parent(s): efac26f

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +15 -11
index.html CHANGED
@@ -154,17 +154,21 @@
154
  .arcDashAnimateTime(() => 2000);
155
 
156
  // Borders
157
- fetch('https://unpkg.com/three-globe/example/datasets/ne_110m_admin_0_countries.geojson')
158
- .then(r => r.json())
159
- .then(({ features }) => {
160
- globe
161
- .polygonsData(features)
162
- .polygonCapColor(() => 'rgba(0,0,0,0)') // transparent fill
163
- .polygonSideColor(() => 'rgba(0,0,0,0)') // no sides
164
- .polygonStrokeColor(() => 'rgba(255,255,255,0.25)')
165
- .polygonAltitude(() => 0.002); // small lift to avoid z-fighting
166
- })
167
- .catch(() => {/* ignore */});
 
 
 
 
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();