-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path3d Imaging
225 lines (200 loc) · 5.02 KB
/
3d Imaging
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>3D Object</title>
<script src='https://kit.fontawesome.com/a076d05399.js' />
<link rel="stylesheet" href="css/style.css">
</head>
<body>
</body>
</html>
<code>http://127.0.0.1:5501/</code>
<!--Imports a model-viewer JavaScript code -->
<!--It helps to handle how the 3D Object would be displayed -->
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
<script nomodule src="https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js"></script>
<!-- Main Container -->
<div id="container">
<!-- Navbar container -->
<div id="navbar">
<div id="logo">
<img src="assets/logo.png" alt="logo">
</div>
<ul>
<li class="active">
<a href="#">Home</a>
</li>
<li><a href="#">Tech</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Help</a></li>
</ul>
</div>
<!-- An aside -->
<!-- This is for holding the 3D object -->
<div id="aSide">
</div>
<!-- Content container -->
<!-- This is for holding some brief description about the 3D object -->
<div id="content">
<h2>3D VR LIVE</h2>
<p>The modern headsets, boost your pleasure to the MAX!</p>
<button>Shop</button>
</div>
<!-- Social media icons -->
<!-- This is for holding some company's social media icons and related links -->
<div id="icons">
<div id="iconsLogo">
<i class="fab fa-facebook-f"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-youtube"></i>
<i class="fab fa-twitter"></i>
</div>
</div>
</div>
/* The webpage overall styling */
* {
padding: 0;
margin: 0;
font-family: sans-serif;
box-sizing: border-box;
color: grey;
}
/* This is for styling the main container that holds everything */
#container {
height: 100vh;
width: 100%;
position: relative;
background: #f7f7f7;
}
/* This styles the navbar and its contents */
#navbar {
height: 60px;
width: 100%;
position: absolute;
top: 20px;
left: 0;
}
/* This styles the logo in the navbar */
#navbar #logo {
height: 60px;
width: 60px;
position: absolute;
left: 3%;
top: -5px;
}
/* This styles the logo image to be used in the navbar */
#navbar #logo img {
height: 60px;
width: 60px;
}
/* This styles the unlisted links in the navbar */
#navbar ul {
list-style: none;
display: flex;
flex-direction: row;
position: absolute;
right: 5%;
top: 0;
}
/* This changes the appearance of the listed links in the navbar */
#navbar ul li {
height: 60px;
width: 80px;
margin: 0 30px;
display: grid;
place-items: center;
color: grey;
}
/* This sets the hover action of the navbar links */
#navbar ul:hover .active {
background: none;
border: none;
}
/* This styles the descriptions of the 3D object */
#content {
height: 500px;
width: 700px;
position: absolute;
left: 12%;
top: calc(50% - 250px);
}
/* This styles the heading in the 3D description */
#content h2 {
font-size: 140px;
color: grey;
}
/* This styles the paragraph in the 3D description*/
#content p {
font-size: 20px;
color: rgb(189, 189, 189);
}
/* This styles the button in the 3D description*/
#content button {
width: 35%;
height: 40px;
font-size: 16px;
font-family: sans-serif;
margin-top: 5vh;
margin-left: center;
border: none;
outline: none;
border-radius: 20px;
background: dodgerblue;
color: white;
}
/* This adds some hover effects over the button */
#content button:hover {
background: navy;
}
/* This styles the social media icons*/
#icons {
height: 500px;
width: 140px;
background: none;
position: absolute;
left: 0;
top: calc(50% - 250px);
display: flex;
align-items: center;
filter: drop-shadow(2px 2px 2px grey);
}
/* This styles the social media icons logos*/
#icons #iconsLogo {
height: 300px;
width: 50px;
display: flex;
flex-direction: column;
}
/* This styles the social media icons logos images*/
#icons #iconsLogo i {
height: 50px;
width: 50px;
font-size: 30px;
margin: 10px;
color: grey;
display: grid;
place-items: center;
cursor: pointer;
}
<!-- 3D objsect -->
<!-- This inserts the 3D object inside the aside container -->
<model-viewer src="assets/HTC_Vive_Headset.gltf" alt="VR Headset" auto-rotate camera-controls ar ios-src="assets/HTC_Vive_Headset.gltf"></model-viewer>
/* This styles the aside container */
#aSide {
height: 600px;
width: 600px;
position: absolute;
top: calc(50% - 250px);
right: 7%;
}
/* This styles the 3D object inserted in the aside container */
#aSide model-viewer {
height: 600px;
width: 600px;
position: absolute;
top: 0;
left: 0;
border: none;
}