forked from google/model-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
317 lines (289 loc) · 14.1 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
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<!--
/* @license
* Copyright 2020 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title><model-viewer></title>
<meta charset="utf-8">
<meta name="description" content="Easily display interactive 3D models on the web and in AR">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="text/css" href="styles/examples.css" rel="stylesheet" />
<link rel="shortcut icon" type="image/png" href="assets/favicon.png"/>
<!-- The following libraries and polyfills are recommended to maximize browser support -->
<!-- 🚨 REQUIRED: Web Components polyfill to support Edge and Firefox < 63 -->
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<!-- 💁 OPTIONAL: Intersection Observer polyfill for better performance in Safari and IE11 -->
<script src="node_modules/intersection-observer/intersection-observer.js"></script>
<!-- 💁 OPTIONAL: Resize Observer polyfill improves resize behavior in non-Chrome browsers -->
<script src="node_modules/resize-observer-polyfill/dist/ResizeObserver.js"></script>
<!-- 💁 OPTIONAL: The :focus-visible polyfill removes the focus ring for some input types -->
<script src="node_modules/focus-visible/dist/focus-visible.js" defer></script>
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-169901325-1', { 'storage': 'none' });
ga('set', 'referrer', document.referrer.split('?')[0]);
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
</head>
<body>
<div class="sample">
<div id="demo-container" class="demo"></div>
<div class="content">
<div class="wrapper">
<div class="heading">
<div class="lockup zero-interaction"><div class="icon-button icon-modelviewer-black"></div><h1><span class="attribute"><model-viewer></span></h1></div>
<h3 class="slogan" style="font-weight:400;">Easily display interactive 3D models on the web & in AR</h3>
</div>
<div id="section-quick-start">
<h3 class="grouping-title grouping-title-new quick-start">Quick Start</h3>
<div class="quick-start-example">
<example-snippet inert-script stamp-to="demo-container" highlight-as="html">
<template>
<!-- Import the component -->
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.js"></script>
<script type="noexecute" nomodule src="https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js"></script>
<!-- Use it like any other HTML element -->
<model-viewer src="shared-assets/models/Astronaut.glb" alt="A 3D model of an astronaut" auto-rotate camera-controls></model-viewer>
</template>
</example-snippet>
</div>
</div>
<a href="https://bundlephobia.com/result?p=@google/model-viewer">
<img src="https://badgen.net/bundlephobia/minzip/@google/model-viewer" alt="Min Zip" />
</a>
<a href="https://spectrum.chat/model-viewer">
<img src="https://withspectrum.github.io/badge/badge.svg" alt="Spectrum" />
</a>
<br />
<a href="https://twitter.com/intent/follow?screen_name=modelviewer">
<img src="https://img.shields.io/twitter/follow/modelviewer?style=social&logo=twitter" alt="follow on Twitter" />
</a>
<a href="https://github.com/google/model-viewer">
<img src="https://img.shields.io/github/stars/google/model-viewer.svg?style=social&label=Star&maxAge=2592000" alt="Github" />
</a>
<div id="section-documentation">
<h3 class="grouping-title grouping-title-new border-bottom">Documentation</h3>
<ol class="new-list-example">
<li>
<h4>
API <a href="docs/index.html">documentation</a> & <a href="examples/loading/index.html">examples</a>
</h4>
</li>
</ol>
</div>
<div id="section-editor">
<h3 class="grouping-title grouping-title-new border-bottom">Model Editor</h3>
<ol class="new-list-example">
<li>
<h4>
Use the <a href="editor">Model Editor</a> to prepare your GLB models for the web
</h4>
</li>
<li>
<h4>
<a href="examples/tester.html">Interactive Viewer</a> (Legacy)
</h4>
</li>
</ol>
</div>
<div id="section-metrics">
<h3 class="grouping-title grouping-title-new border-bottom">Metrics</h3>
<ol class="new-list-example">
<li>
<h4>
<a href="examples/lighthouse.html">Performance</a>
</h4>
</li>
<li>
<h4>
<a href="fidelity">glTF Fidelity Comparison</a>
</h4>
</li>
</ol>
</div>
<div id="section-browser-support">
<h3 class="grouping-title grouping-title-new border-bottom">Browser Support</h3>
<div id="browser-support-icon-group">
<div class="icon-desc"><img class="size-24 icon-check" alt="icon-check"><div>Natively supported</div></div>
<div class="icon-desc"><img class="size-24 icon-warning" alt="icon-warning"><div>Available with polyfill</div></div>
<div class="icon-desc"><img class="size-24 icon-flag" alt="icon-flag"><div>Behind a flag, unstable</div></div>
<div class="icon-desc"><img class="size-24 icon-na" alt="icon-na"><div>Not available</div></div>
</div>
<div style="clear:both"></div>
<p class="browser-support-desc">These browser features are
<b>required</b> for <span
class="attribute"><model-viewer></span> to work correctly:</p>
<table class="browser-support">
<tr>
<th>Feature</th>
<th><img class="logo-chrome" title="Chrome" alt="Chrome"></th>
<th><img class="logo-canary" title="Canary" alt="Canary"></th>
<th><img class="logo-safari" title="Safari" alt="Safari"></th>
<th><img class="logo-firefox" title="Firefox" alt="Firefox"></th>
<th><img class="logo-edge" title="Edge" alt="Edge"></th>
<th><img class="logo-ie" title="IE 11" alt="IE 11"></th>
<th><img class="logo-samsung" title="Samsung Internet" alt="Samsung Internet"></th>
</tr>
<tr>
<td>Custom Elements</td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-warning" alt="icon-warning"></td>
<td><img class="icon-check" alt="icon-check"></td>
</tr>
<tr>
<td>Shadow DOM</td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-warning" alt="icon-warning"></td>
<td><img class="icon-check" alt="icon-check"></td>
</tr>
</table>
<p class="browser-support-desc">These browser features are
<b>optional</b> and are only used if available for performance
optimization or specific features:</p>
<table class="browser-support">
<tr>
<th>Feature</th>
<th><img class="logo-chrome" title="Chrome" alt="Chrome"></th>
<th><img class="logo-canary" title="Canary" alt="Canary"></th>
<th><img class="logo-safari" title="Safari" alt="Safari"></th>
<th><img class="logo-firefox" title="Firefox" alt="Firefox"></th>
<th><img class="logo-edge" title="Edge" alt="Edge"></th>
<th><img class="logo-ie" title="IE 11" alt="IE 11"></th>
<th><img class="logo-samsung" title="Samsung Internet" alt="Samsung Internet"></th>
</tr>
<tr>
<td>Resize Observer</td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-warning" alt="icon-warning"></td>
<td><img class="icon-check" alt="icon-check"></td>
</tr>
<tr>
<td>Intersection Observer</td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-warning" alt="icon-warning"></td>
<td><img class="icon-check" alt="icon-check"></td>
</tr>
<tr>
<td>:focus-visible</td>
<td><img class="icon-warning" alt="icon-warning"></td>
<td><img class="icon-warning" alt="icon-warning"></td>
<td><img class="icon-warning" alt="icon-warning"></td>
<td><img class="icon-warning" alt="icon-warning"></td>
<td><img class="icon-warning" alt="icon-warning"></td>
<td><img class="icon-warning" alt="icon-warning"></td>
<td><img class="icon-warning" alt="icon-warning"></td>
</tr>
</table>
<p class="browser-support-desc">These browser features are
<b>optional</b> and are only needed if you wish to use
webxr in ar-modes:</p>
<table class="browser-support">
<tr>
<th>Feature</th>
<th><img class="logo-chrome" title="Chrome" alt="Chrome"></th>
<th><img class="logo-canary" title="Canary" alt="Canary"></th>
<th><img class="logo-safari" title="Safari" alt="Safari"></th>
<th><img class="logo-firefox" title="Firefox" alt="Firefox"></th>
<th><img class="logo-edge" title="Edge" alt="Edge"></th>
<th><img class="logo-ie" title="IE 11" alt="IE 11"></th>
<th><img class="logo-samsung" title="Samsung Internet" alt="Samsung Internet"></th>
</tr>
<tr>
<td>WebXR Device API</td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-na" alt="icon-na"></td>
<td><img class="icon-na" alt="icon-na"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-na" alt="icon-na"></td>
<td><img class="icon-check" alt="icon-check"></td>
</tr>
<tr>
<td>WebXR HitTest API</td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-na" alt="icon-na"></td>
<td><img class="icon-na" alt="icon-na"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-na" alt="icon-na"></td>
<td><img class="icon-check" alt="icon-check"></td>
</tr>
<tr>
<td>WebXR DOM Overlay API</td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-check" alt="icon-check"></td>
<td><img class="icon-na" alt="icon-na"></td>
<td><img class="icon-na" alt="icon-na"></td>
<td><img class="icon-na" alt="icon-na"></td>
<td><img class="icon-na" alt="icon-na"></td>
<td><img class="icon-na" alt="icon-na"></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="footer">
<ul>
<li class="attribution">
<a href="https://poly.google.com/view/dLHpzNdygsg">Astronaut</a> by <a href="https://poly.google.com/user/4aEd8rQgKu2">Poly</a>,
licensed under <a href="https://creativecommons.org/licenses/by/2.0/">CC-BY</a>.
</li>
</ul>
<div style="margin-top:24px;" class="copyright">©Copyright 2018-2020 Google Inc. Licensed under the Apache License 2.0.</div>
<div id='footer-links'></div>
</div>
<script type="module" src="./examples/built/docs-and-examples.js">
</script>
<script type="module">
(() => { initFooterLinks();})();
</script>
<!-- Documentation-specific dependencies: -->
<script type="module"
src="examples/built/dependencies.js">
</script>
<script nomodule
src="examples/built/dependencies-legacy.js">
</script>
<!-- Loads <model-viewer> only on modern browsers: -->
<script type="module"
src="node_modules/@google/model-viewer/dist/model-viewer.js">
</script>
<!-- Loads <model-viewer> only on old browsers like IE11: -->
<script nomodule
src="node_modules/@google/model-viewer/dist/model-viewer-legacy.js">
</script>
</body>
</html>