-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
179 lines (136 loc) Β· 5.75 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
175
176
177
178
179
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" href="favicon.ico" />
<title>Festo 3D - AR</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css" />
<!-- The following libraries and polyfills are recommended to maximize browser support -->
<!-- NOTE: you must adjust the paths as appropriate for your project -->
<!-- π¨ REQUIRED: Web Components polyfill to support Edge and Firefox < 63 -->
<script src="https://unpkg.com/@webcomponents/[email protected]/webcomponents-loader.js"></script>
<!-- π OPTIONAL: Intersection Observer polyfill for better performance in Safari and IE11 -->
<script src="https://unpkg.com/[email protected]/intersection-observer.js"></script>
<!-- π OPTIONAL: Resize Observer polyfill improves resize behavior in non-Chrome browsers -->
<script src="https://unpkg.com/[email protected]/dist/ResizeObserver.js"></script>
<!-- π OPTIONAL: The :focus-visible polyfill removes the focus ring for some input types -->
<script src="https://unpkg.com/[email protected]/dist/focus-visible.js" defer></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-CM44RJ0JTT"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-CM44RJ0JTT');
</script>
</head>
<body>
<div id="card">
<model-viewer
Content-Disposition: attachment
src="assets/models/Demo3D.glb"
ios-src="assets/models/Demo3D.usdz"
alt="Festo 3D Demo Model"
ar-modes= "quick-look webxr scene-viewer"
shadow-intensity="1"
camera-controls
autoplay
exposure="1"
ar
>
<button slot="ar-button" id="ar-button">
View in your space
</button>
<div id="ar-prompt">
<img src="assets/images/hand.png" />
</div>
<button id="ar-failure">
AR is not tracking!
</button>
</model-viewer>
<div>
<section class="attribution">
<span>
<h1>Festo 3D Gantry</h1>
<span>
3D Model
</span>
</span>
<a
class="cc"
href="https://www.festo.com"
target="_blank"
>
<img
src="assets/images/LogoFesto.png"
/>
</a>
</section>
</div>
<div class="slider">
<div class="slides">
<button
class="slide selected"
onclick="switchSrc(this, 'Demo3D')"
style="background-image: url('assets/images/HGO1.png');"
></button
><button
class="slide"
onclick="switchSrc(this, 'Demo3D_2')"
style="background-image: url('assets/images/HGO2.png');"
></button>
</div>
</div>
</div>
<script type="module">
const modelViewer = document.querySelector("model-viewer");
window.switchSrc = (element, name) => {
const base = "assets/models/" + name;
modelViewer.src = base + ".glb";
modelViewer.iosSrc = base + ".usdz"
modelViewer.alt = name;
const slides = document.querySelectorAll(".slide");
slides.forEach(element => {
element.classList.remove("selected");
});
element.classList.add("selected");
};
document
.querySelector(".slider")
.addEventListener("beforexrselect", ev => {
// Keep slider interactions from affecting the XR scene.
ev.preventDefault();
});
</script>
<!-- π Include both scripts below to support all browsers! -->
<!-- Loads <model-viewer> for modern browsers: -->
<script type="module"
src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js">
</script>
<!-- Loads <model-viewer> for old browsers like IE11: -->
<script nomodule
src="https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js">
</script>
</body>
<footer>
<span style="display: flex; align-items: center; justify-content: center;">Developed by: <a href="https://www.linkedin.com/in/hugo-ben/" target="_blank" style="padding-left: 10px;">
Hugo Ben </a>
<!-- <a href="https://www.facebook.com/HBAugmentedReality" target="_blank"><img src="assets/images/HB_Logo_final_v2.png" style="height: 2.5em; padding-left: 20px;">
</a> -->
<a target="_blank" href="https://www.linkedin.com/in/hugo-ben/">
<img style="padding-right: 1px; padding-left: 10px; height: 26px;" alt="LinkedIn" src="assets/images/LinkedInIcon.png"></a>
</span>
<span><a> (c) 2022 </a>
</span>
<!-- <span><a target="_blank" href="https://www.facebook.com/HBAugmentedReality">
<img style="padding-right: 3px; padding-left: 10px; height: 21px;" alt="Facebook" src="assets/images/FacebookIcon.png"></a>
</span>
<span><a target="_blank" href=https://www.instagram.com/hbaugmentedreality>
<img style="padding-right: 1px; padding-left: 1px; height: 23px;" alt="LinkedIn" src="assets/images/InstagramIcon.png"></a>
</span>
-->
</span>
</footer>
</html>