-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
185 lines (167 loc) · 6.54 KB
/
index.html
File metadata and controls
185 lines (167 loc) · 6.54 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
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
<!DOCTYPE html>
<html lang="en">
<!– This (index.html) is an autogenerated compiled file by Gulp.js If you want to edit make it at sections/ –>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>ORION | IFC Handgesture | e-verse</title>
<link rel="icon" type="image/png" href="./assets/images/Background.ico" />
<link rel="stylesheet" type="text/css" href="./styles.css" />
<link rel="stylesheet" type="text/css" href="./main.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="Hand Gesture (Orion) is a 3D viewer that enables users to move the model using Image gesture recognition">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<section class="banner">
<header class="home-header">
<!-- Company Logo !-->
<a href="https://www.e-verse.com" target="_blank">
<img src="./assets/images/Logo2x.svg" alt="logo" class="home-header__logo">
</a>
<ul class="home-header__menu">
<li class="home-header__menu--item" id="how-to-use">
How To Use
</li>
<li class="home-header__menu--item">
<img src="./assets/icons/info.svg" id="info-logo" alt="logo" title="Information" />
</li>
</ul>
</div>
</header>
<!-- Start Modal -->
<div id="info-modal"></div>
<!-- End Modal -->
<div id="how-to-modal"></div>
<script>
const infoLogo = document.getElementById('info-logo')
const howToUseBtn = document.getElementById('how-to-use')
document.addEventListener("DOMContentLoaded", function (event) {
new InfoModal({
target: document.getElementById("info-modal"),
props: {
activator: infoLogo,
}
});
new HowToModal({
target: document.getElementById("home-modal"),
props: {
activator: howToUseBtn,
}
});
});
</script>
<div id="home-modal"></div>
<canvas id="threeCanvas"></canvas>\
<script type="module" src="bundle.js"></script>
<script src="https://unpkg.com/carbon-components@latest/scripts/carbon-components.js"></script>
<div class="video__frame" draggable="true">
<button class="video__top-btn" id="down-arrow" onclick="hideVideo()" ontouchstart="hideVideo()">
<img src="./assets/icons/down-arrow.svg" alt="logo" title="Hide video" />
</button>
<div class="video-wrapper">
<div id="turn-on-video"></div>
<video class="videobox canvasbox" autoplay="autoplay" id="myvideo" style="display: none"></video>
<canvas id="canvas" class="border canvasbox"></canvas>
</div>
<div id="updatenote" class="updatenote mt10" style="display: none"></div>
</div>
<div>
</div>
<button class="video__left-btn hidden" onclick="showVideo()" ontouchstart="showVideo()" id="left-arrow" title="Show video">
<img src="./assets/icons/left-arrow.svg" alt="logo" title="left" />
</button>
<script>
var myListener = function() {
document.querySelector('.video__frame').style.right = 0
document.querySelector('.video__frame').style.left = 'auto'
};
var myListenerWithContext = myListener.bind(this);
window.addEventListener('resize', myListenerWithContext);
function hideVideo() {
document.querySelector('.video__frame').classList.add("hidden");
document.getElementById("left-arrow").classList.remove("hidden");
}
function showVideo() {
document.querySelector('.video__frame').classList.remove("hidden");
document.getElementById("left-arrow").classList.add("hidden");
}
const dragMe = document.querySelector('.video__frame');
dragElement(dragMe);
function dragElement(elmnt) {
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
var touchToTopElement = 0, touchToLeftElement = 0
// otherwise, move the DIV from anywhere inside the DIV:
elmnt.onmousedown = dragMouseDown;
elmnt.ontouchmove = touchMove;
elmnt.ontouchstart = touchstart;
function dragMouseDown(e) {
e = e || window.event;
e.preventDefault();
// get the mouse cursor position at startup:
pos3 = e.clientX;
pos4 = e.clientY;
document.onmouseup = closeDragElement;
// call a function whenever the cursor moves:
document.onmousemove = elementDrag;
}
function touchstart(e) {
e.preventDefault();
touchToTopElement = e.touches[0].pageY - elmnt.offsetTop
touchToLeftElement = e.touches[0].pageX - elmnt.offsetLeft
}
function touchMove(e) {
e.preventDefault();
elmnt.style.top = (e.touches[0].pageY - touchToTopElement) + "px";
elmnt.style.left = (e.touches[0].pageX - touchToLeftElement ) + "px";
}
function elementDrag(e) {
e = e || window.event;
e.preventDefault();
// calculate the new cursor position:
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
// set the element's new position:
elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
}
function closeDragElement() {
// stop moving when mouse button is released:
document.onmouseup = null;
document.onmousemove = null;
}
}
</script>
<script>
document.addEventListener("DOMContentLoaded", function () {
const track = window.track
track.setupUploadModelInput()
track.setupTrackButton()
new HomeModal({
target: document.getElementById("home-modal"),
});
});
</script>
<script src="https://cdn.jsdelivr.net/npm/handtrackjs/dist/handtrack.min.js"></script>
<div class="banner__footer">
<div class="banner__footer--container">
<label for="upload-model-input" class="fab-primary">
<img src="./assets/icons/upload.svg" alt="upload" title="Upload file">
<input type="file" accept=".ifc" id="upload-model-input">
</label>
<button id="trackButtonON" type="button" class="fab-primary hidden">
<img src="./assets/icons/camera.svg" alt="camera" title="Turn ON camera">
</button>
<button id="trackButtonOFF" type="button" class="fab-primary">
<img src="./assets/icons/camera-off.svg" alt="camera-off" title="Turn OFF camera">
</button>
</div>
</div>
</section>
</body>
</html>