-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
56 lines (42 loc) · 2.02 KB
/
index.html
File metadata and controls
56 lines (42 loc) · 2.02 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8" />
<title>三维页面</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml"
href="https://z2586300277.github.io/three-cesium-examples/files/site/logo.svg" />
<script>window.HOST = (window.origin + window.location.pathname).replace(/\/index.html$/, '/')</script>
<script type="module">
import GITHUB_EXAMPLES from './githubExamples.js';
window.GITHUB_EXAMPLES = GITHUB_EXAMPLES;
window.FIX_HOST = 'https://z2586300277.github.io/three-cesium-examples/'
</script>
<script type="module" src="https://z2586300277.github.io/three-cesium-examples/config/config.js"></script>
</head>
<body>
<div id="app"></div>
<script type="module">
// console.log('GITHUB_EXAMPLES', GITHUB_EXAMPLES);
const index = window.THREE_CESIUM_NAVIGATION.findIndex(i => i.name === 'ThreeJS');
if (index !== -1) window.THREE_CESIUM_NAVIGATION.splice(index, 1);
const index2 = window.THREE_CESIUM_NAVIGATION.findIndex(i => i.name === 'CesiumJS');
if (index2 !== -1) window.THREE_CESIUM_NAVIGATION.splice(index2, 1);
const githubExamples = window.THREE_CESIUM_NAVIGATION.find(i => i.name === 'Github');
if (githubExamples) githubExamples.examples = window.GITHUB_EXAMPLES;
/* 语言切换 */
if (localStorage.getItem('langEn') === 'true') {
window.THREE_CESIUM_NAVIGATION.forEach(item => {
item.label = item.label_en || item.label
item.examples?.forEach(example => {
example.name = example.name_en || example.name
example.group = example.group_en || example.group
example.children?.forEach(child => (child.name = child.name_en || child.name))
})
})
}
</script>
</body>
</html>