-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
174 lines (174 loc) · 6.29 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
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GUPGPU resonaTHOR</title>
<link rel="icon" type="image/x-icon" href="./assets/favicon.png"> <!-- source: https://en.wikipedia.org/wiki/Hammer#/media/File:Claw-hammer.jpg -->
<style>
body {
margin: 0;
overflow: hidden;
position: relative; /* Ensure canvas and image are positioned relative to the body */
}
a {
color: #fff;
text-decoration: none;
}
canvas {
display: block; /* Make the canvas a block element to fill its container */
}
#info {
position: absolute;
background-color: rgba(0, 0, 0, 0.3); /* semi-transparent black */
color: White;
font-family: Arial;
font-size: 9pt;
top: 60px;
/* bottom: 60px; */
left: 0px;
z-index: 2;
visibility: hidden;
}
#status {
position: absolute;
background-color: rgba(0, 0, 0, 0.3); /* semi-transparent black */
color: White;
font-family: Arial;
font-size: 9pt;
bottom: 0px;
left: 0px;
z-index: 5;
}
#takePhotoButton {
position: absolute;
bottom: 80px;
left: 50%;
transform: translateX(-50%); /* see https://stackoverflow.com/questions/19461521/how-to-center-an-element-horizontally-and-vertically */
width: 80px; /* Set the width of the image */
cursor: pointer;
z-index: 5; /* Ensure image is above the canvas */
}
#infoButton {
position: absolute; /* Position the image absolutely */
left: 20px;
top: 20px;
width: 30px; /* Set the width of the image */
cursor: pointer;
z-index: 5; /* Ensure image is above the canvas */
}
#backButton {
position: absolute; /* Position the image absolutely */
left: 80px;
top: 20px;
width: 30px; /* Set the width of the image */
cursor: pointer;
visibility: hidden; /* hide this button for the moment */
z-index: 5; /* Ensure image is above the canvas */
}
#shareButton {
position: absolute; /* Position the image absolutely */
left: 140px;
top: 20px;
width: 30px; /* Set the width of the image */
cursor: pointer;
visibility: hidden; /* hide this button for the moment */
z-index: 5; /* Ensure image is above the canvas */
}
#deleteButton {
position: absolute; /* Position the image absolutely */
left: 200px;
top: 20px;
width: 30px; /* Set the width of the image */
cursor: pointer;
visibility: hidden; /* hide this button for the moment */
z-index: 5; /* Ensure image is above the canvas */
}
#fullscreenButton {
position: absolute; /* Position the image absolutely */
right: 20px;
bottom: 20px;
width: 30px; /* Set the width of the image */
cursor: pointer;
z-index: 5; /* Ensure image is above the canvas */
}
#storedPhotoThumbnail {
position: absolute;
bottom: 20px;
left: 10px;
max-width: 15%; /* Set the width of the image */
max-height: 15%;
border-style: solid;
border-color: #FFFFFF9A;
border-width: 2px;
cursor: pointer;
visibility: hidden; /* hide this button for the moment */
z-index: 1; /* Ensure image is above the canvas */
}
#storedPhoto {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%); /* see https://stackoverflow.com/questions/19461521/how-to-center-an-element-horizontally-and-vertically */
max-width: 100%;
max-height: 100%;
visibility: hidden; /* hide this button for the moment */
z-index: 1; /* Ensure image is above the canvas */
}
#livePhoto {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
/* height: 100%; */
z-index: 0; /* Ensure image is above the canvas */
}
/* Tooltip -- see https://www.w3schools.com/css/css_tooltip.asp#:~:text=HTML%3A%20Use%20a%20container%20element,with%20class%3D%22tooltiptext%22%20. */
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted rgb(255, 255, 255); /* If you want dots under the hoverable text */
}
/* Tooltip text */
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: rgba(0, 0, 0, 0.9);
color: #eee;
text-align: center;
padding: 5px 0;
border-radius: 6px;
/* Position the tooltip text - see examples below! */
position: absolute;
z-index: 6;
}
/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
visibility: visible;
}
</style>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@latest/build/three.module.js",
"three/addons/": "https://unpkg.com/three@latest/examples/jsm/"
}
}
</script>
</head>
<body>
<video id="videoFeedU" style="display:none" autoplay playsinline></video>
<video id="videoFeedE" style="display:none" autoplay playsinline></video>
<img id="infoButton" src="./assets/infoButton.png" alt="Show/hide info" title="Show/hide info">
<img id="backButton" src="./assets/backButton.png" alt="Back to live view" title="Back to live view">
<img id="shareButton" src="./assets/shareButton.png" alt="Share photo..." title="Share photo...">
<img id="deleteButton" src="./assets/deleteButton.png" alt="Delete stored photo" title="Delete stored photo">
<img id="fullscreenButton" src="./assets/fullscreenButton.png" alt="Toggle fullscreen" title="Toggle fullscreen">
<img id="takePhotoButton" src="./assets/takePhotoButton.png" alt="Take photo" title="Take photo">
<img id="storedPhoto" alt="Stored photo">
<img id="storedPhotoThumbnail" alt="Thumbnail of stored photo" title="Show stored photo">
<div id="info" alt="Information">Information</div>
<div id="status" alt="Status information">Status</div>
<script type="module" src="./main.js"></script>
</body>
</html>