-
Notifications
You must be signed in to change notification settings - Fork 0
/
globe.html
36 lines (34 loc) · 1.38 KB
/
globe.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<style>
body { margin: 0 }
#imageurl { position: fixed; top: 1ex; left: 1ex }
</style>
<script src="https://unpkg.com/globe.gl"></script>
</head>
<body>
<div id="globeViz"></div>
<select id="imageurl" onchange="globe.globeImageUrl(document.getElementById('imageurl').value)">
<option value="kethira.jpg" selected="selected">Canon</option>
<option value="p-kethira.jpg">Corrected</option>
<option value="equirectangular.jpg">Equirectangular</option>
<option value="pokep-proposal.jpg">Pokep proposal</option>
<option value="sebkha-proposal.jpg">Sebkha proposal</option>
<option value="kp.jpg">Kelestia Productions</option>
</select>
<script>
const globe = Globe()(document.getElementById('globeViz'))
globe.globeImageUrl('kethira.jpg')
.backgroundImageUrl('https://unpkg.com/three-globe/example/img/night-sky.png')
const url = new URL(window.location.toLocaleString())
switch (url.searchParams.get('projection')) {
case 'p-kethira': imageurl.value = 'p-kethira.jpg'; break;
case 'equirectangular': imageurl.value = 'equirectangular.jpg'; break;
case 'pokep-proposal': imageurl.value = 'pokep-proposal.jpg'; break;
case 'sebkha-proposal': imageurl.value = 'sebkha-proposal.jpg'; break;
case 'kp': imageurl.value = 'kp.jpg'; break;
}
globe.globeImageUrl(document.getElementById('imageurl').value);
</script>
</body>