Spaces:
Running
Running
Update index.html
Browse files- index.html +3 -0
index.html
CHANGED
|
@@ -55,6 +55,8 @@
|
|
| 55 |
<noscript style="color:#fff; position:fixed; left:12px; bottom:48px;">Enable JavaScript.</noscript>
|
| 56 |
|
| 57 |
<!-- Load UMD build that bundles dependencies; avoids ESM/CSP pitfalls on Static Spaces -->
|
|
|
|
|
|
|
| 58 |
<script src="https://unpkg.com/globe.gl" defer></script>
|
| 59 |
|
| 60 |
<script>
|
|
@@ -133,6 +135,7 @@
|
|
| 133 |
copyBtn.onclick = async () => { try { await navigator.clipboard.writeText(location.href); } catch(e){} };
|
| 134 |
|
| 135 |
function boot() {
|
|
|
|
| 136 |
if (!window.Globe || typeof window.Globe !== 'function') { showErr('globe.gl failed to load. Check network/CSP.'); return; }
|
| 137 |
const globe = safe(() => window.Globe()
|
| 138 |
.width(window.innerWidth)
|
|
|
|
| 55 |
<noscript style="color:#fff; position:fixed; left:12px; bottom:48px;">Enable JavaScript.</noscript>
|
| 56 |
|
| 57 |
<!-- Load UMD build that bundles dependencies; avoids ESM/CSP pitfalls on Static Spaces -->
|
| 58 |
+
<!-- three.js must be loaded globally for globe.gl UMD -->
|
| 59 |
+
<script src="https://unpkg.com/three@0.160.0/build/three.min.js" defer></script>
|
| 60 |
<script src="https://unpkg.com/globe.gl" defer></script>
|
| 61 |
|
| 62 |
<script>
|
|
|
|
| 135 |
copyBtn.onclick = async () => { try { await navigator.clipboard.writeText(location.href); } catch(e){} };
|
| 136 |
|
| 137 |
function boot() {
|
| 138 |
+
if (!window.THREE) { showErr('three.js failed to load.'); return; }
|
| 139 |
if (!window.Globe || typeof window.Globe !== 'function') { showErr('globe.gl failed to load. Check network/CSP.'); return; }
|
| 140 |
const globe = safe(() => window.Globe()
|
| 141 |
.width(window.innerWidth)
|