-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
40 lines (29 loc) · 1.05 KB
/
index.html
File metadata and controls
40 lines (29 loc) · 1.05 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><lmv-viewer></title>
<!-- Import polyfill -->
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
<!-- Import firefly.js -->
<script src="http://autodeskviewer.com/viewers-staging/latest/firefly.js"></script>
<!-- Import lmv-viewer element -->
<link rel="import" href="lmv-viewer.html">
</head>
<body>
<lmv-viewer url="http://lmv.rocks/data/engineraw/0.svf"></lmv-viewer>
<p><a href="#" data-url="http://lmv.rocks/data/engineraw/0.svf">Engine</a></p>
<p><a href="#" data-url="http://lmv.rocks/data/rally/1/RallyFighter2.svf">Rally Fighter</a></p>
<p><a href="#" data-url="http://lmv.rocks/data/gears/output/bubble.json">Diff Gears</a></p>
<script>
(function() {
var viewerElem = document.querySelector("lmv-viewer");
Array.prototype.forEach.call(document.querySelectorAll("a"), function(elem) {
elem.addEventListener("click", function() {
viewerElem.setAttribute("url", this.dataset.url);
});
});
})();
</script>
</body>
</html>