-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
164 lines (158 loc) · 8.4 KB
/
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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<head>
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'"> -->
<title>Solar System</title>
</head>
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<script type="text/javascript" src="Common/webgl-utils.js"></script>
<script type="text/javascript" src="Common/initShaders.js"></script>
<script type="text/javascript" src="Common/MV.js"></script>
<script type="text/javascript" src="sphere_textures_class.js"></script>
<script type="text/javascript" src="Common/torus_new.js"></script>
<script type="text/javascript" src="Common/bunny.js"></script>
<script type="text/javascript" src="Common/bunny-data.js"></script>
<script type="text/json" src="solar_system/solar_system.json"></script>
<script type="text/javascript" src="index.js"></script>
<script type="text/javascript" src="jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="hammer.js"></script>
<script src="popper.min.js" ></script>
<script src="bootstrap.min.js" ></script>
<body style="margin: 0px">
<div>
<nav class="navbar navbar-expand-md navbar-dark" id="nav" style="background-color: rgb(3, 3, 48);">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#planetsNavbar">
<span class="navbar-toggler-icon" ></span>
</button>
<a class="navbar-brand" style="width: 100px">Solar System</a>
<div class="collapse navbar-collapse" id="planetsNavbar">
<ul class="navbar-nav mr-auto" id="planetsNavbarBtnsCont">
<!-- <li class="nav-item">
<a class="nav-link" href="#">Sun</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Mercury</a>
</li> -->
</ul>
<ul class="navbar-nav mr-auto">
<li class="nav-item" data-toggle="tooltip" data-placement="bottom" title="Show/hide controls">
<a class="nav-link bi bi-toggles2" style="color:rgb(42, 94, 172)" id="toggles" href="#"></a>
</li>
</ul>
<ul class="navbar-nav mr-auto" id="moreNavbarBtnCont">
<li class="nav-item dropdown" data-toggle="tooltip" data-placement="bottom" title="More options">
<a class="nav-link bi bi-three-dots" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a id="overlay_switch" class="dropdown-item" href="#">Hide overlay</a>
<a id="backfaceculling_switch" class="dropdown-item" href="#">Enable backface culling (b)</a>
<a id="zbuffer_switch" class="dropdown-item" href="#">Disable zbuffer (z)</a>
<a class="dropdown-item bi bi-question-circle-fill" href="#" data-toggle="modal" data-target="#exampleModal"> Help</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item bi bi-github" target="_blank" href="https://github.com/ftmateus/solar_system"> Github</a>
</div>
</li>
</ul>
</div>
</nav>
</div>
<div>
<div style="position:relative">
<canvas id="gl-canvas" width="100%" height="100%" style="background: url('solar_system/2k_stars_milky_way.jpg')">
Ooops! Your browser doesn't support WebGL!
</canvas>
<div id="overlay">
<span id="days"></span> days
<span id="months"></span> months
<span id="years"></span> years
<span id="seconds_start"></span> seconds since start
Using <span id="shading_method"></span> shading
</div>
<div id = "timeContainer" >
<button id = "v0" class="btn btn-danger" speed=0>
<i class="bi bi-pause" aria-hidden="false"></i>
</button>
<button id = "v1" class="btn btn-danger" speed=1>
<i class="bi bi-play-fill"></i>
</button>
<button id = "v2" class="btn btn-danger" speed=2>
<i class="bi bi-skip-end-fill"></i>
</button>
<button id = "v3" class="btn btn-danger" speed=3>
<i class="bi bi-skip-forward-fill"></i>
</button>
<button id = "v9" class="btn btn-danger" speed=9>
<i class="bi bi-skip-forward-fill"></i>
<i class="bi bi-skip-forward-fill"></i>
</button>
</div>
<div id="scalesContainer" class = "slidersStyle">
<button id="wiki" class="btn btn-success">Wikipedia</button>
<div>
<button id = "resetScale" class="btn btn-success">Reset Scale</button>
<button id = "realScale" class="btn btn-success">Real Scale</button>
<br>
planets:<input type="range" min="1" max="100" step="0.05" value="10" class="form-range" id="planetRange">
orbits:<input type="range" min="0.025" max="1" step="0.001" value="0.025" class="form-range" id="orbitRange">
</div>
</div>
<div id="directionsContainer" hidden="true">
<p>
<button id = "up" class="btn btn-success" style="position: relative; left: 46px;">
<i class="bi bi-caret-up-fill"></i>
</button>
</p>
<p>
<button id = "left" class="btn btn-success" style="position: relative;">
<i class="bi bi-caret-left-fill"></i>
</button>
<button id = "center" class="btn btn-success" style="position: relative;">
<i class="bi bi-circle-fill"></i>
</button>
<button id = "right" class="btn btn-success" style="position: relative;">
<i class="bi bi-caret-right-fill"></i>
</button>
</p>
<p>
<button id = "down" class="btn btn-success" style="position: relative; left: 46px;">
<i class="bi bi-caret-down-fill"></i>
</button>
</p>
</div>
</div>
<!-- Modal -->
<div class="modal fade bd-example-modal-sm" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
<div class="modal-dialog" role="document">
<div class="modal-content" style="background-color: rgba(2, 34, 104, 0.822); color: white">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Help</h5>
<button type="button" class="btn-close btn-close-white" data-dismiss="modal" aria-label="Close">
<!-- <span aria-hidden="true">×</span> -->
</button>
</div>
<div class="modal-body">
Keys:
<br>
0/1/2/3/9 - Time increase
<br>
Space - stop time increase
<br>
z - switch zbuffer
<br>
b - switch backface culling
<br>
w - wired frame
<br>
f - filled
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>