-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
33 lines (28 loc) · 884 Bytes
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./index.css">
<script src="https://cdn.bootcss.com/three.js/r62/three.min.js"></script>
<script src="./3dearth.js"></script>
<title>3D 地球</title>
</head>
<body>
<div class="v-line"></div>
<div class="h-line"></div>
<script>
var earth = new Earth({
width: window.innerWidth,
height: window.innerHeight,
fps: 25
});
document.body.appendChild(earth.canvas);
window.addEventListener("mousedown", function (event) {
console.log(window.earthMesh.rotation.y)
earth.onDocumentMouseDown(event);
})
</script>
</body>
</html>