Molbap HF Staff commited on
Commit
4a4e5b6
·
verified ·
1 Parent(s): bf54c19

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +13 -0
index.html CHANGED
@@ -153,6 +153,19 @@
153
  .arcDashGap(() => 0.2)
154
  .arcDashAnimateTime(() => 2000);
155
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  // Orbit controls tuning (zoom/rotate)
157
  const ctrl = globe.controls();
158
  ctrl.enableDamping = true;
 
153
  .arcDashGap(() => 0.2)
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();
171
  ctrl.enableDamping = true;