-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
101 lines (93 loc) · 2.88 KB
/
index.html
File metadata and controls
101 lines (93 loc) · 2.88 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width">
<title>3D Solar System</title>
<style>
body {
margin: 0 auto;
background: black;
font-family: Arial, Helvetica, sans-serif;
background-image: url(stars.jpg);
background-size:cover;
}
canvas {
width: 100vw;
height: 85vh;
}
.menu {
display: flex;
color: #ffffff;
list-style: none;
align-items: center;
justify-content: space-around;
}
.menu li{
display: flex;
align-items: center;
justify-content: center;
}
.menu li h4 {
float: left;
display: block;
}
.menu li input {
float: left;
width: auto;
display: block;
margin-left: 10px;
}
.menu .ref {
left: 10px;
bottom: 15px;
display: block;
position: absolute;
}
.menu .ref h5 {
margin: 0;
padding: 0;
font-size: 12px;
color: #c7c2c2;
}
.menu .ref h5 a {
font-size: 12px;
color: #c7c2c2;
}
@media (max-width: 767px) {
.menu {
display: block;
position: relative;
}
.ref {
bottom: 0!important;
display: flex!important;
position: relative!important;
}
}
</style>
</head>
<body>
<canvas id="canvas" ></canvas>
<ul class="menu">
<li>
<h4>Speed:</h4><input type="range" id="speedRange" value="10" min="1" max="100" oninput="speedRangeChanged(this.value)" onchange="speedRangeChanged(this.value)" />
</li>
<li>
<h4>View Angle:</h4><input id="viewAngleRange" value="90" min="-200" max="200" oninput="viewAngleChanged(this.value)" onchange="viewAngleChanged(this.value)"
type="range" />
</li>
<li>
<h4>Zoom:</h4><input id="zoomRange" min="10" max="100" oninput="zoomRangeChanged(this.value)" onchange="zoomRangeChanged(this.value)" type="range" />
</li>
<li>
<h4>Line Mode:</h4><input id="lineModeRange" onchange="lineModeChanged()" type="checkbox" />
</li>
<li class="ref">
<h5>Ref: <a target="_blank" href="https://webglfundamentals.org/">webglfundamentals.org</a></h5>
</li>
</ul>
<script src="solarSystem.js" ></script>
</body>
</html>