-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewer.html
160 lines (148 loc) · 5.97 KB
/
viewer.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
<!DOCTYPE html>
<!--
Miniport by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>Cheng Feng Wen @ Stony Brook University</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="" />
<meta name="keywords" content="" />
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<script src="js/jquery.min.js"></script>
<script src="js/jquery.scrolly.min.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/init.js"></script>
<noscript>
<link rel="stylesheet" href="css/skel.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/style-desktop.css" />
<link rel="stylesheet" href="ModelViewer/ModelViewer.css" />
</noscript>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
<!--[if lte IE 9]><link rel="stylesheet" href="css/ie/v9.css" /><![endif]-->
</head>
<body>
<!-- Nav -->
<nav id="nav">
<ul class="container">
<li><a href="index.html">Home</a></li>
<li><a href="research.html">Research</a></li>
<li><a href="misc.html">Misc</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<!-- Work -->
<div class="wrapper style2 first">
<article id="research">
<header>
<h2>Model Viewer Online</h2>
<section class="container">
<p>simple webgl model viewer based on <a href="http://threejs.org" target="_blank">three.js</a>.</p>
browser compatibility:
</section>
</header>
<div class="container">
<div class="row">
<div class="2u">
<section class="box style2">
<ul>
<li><a href="#" class="button">disk</a></li>
<li><a href="#" class="button">kitten</a></li>
<li><a href="#" class="button">david</a></li>
</ul>
</section>
</div>
<div class="6u">
<section class="box style2">
<div id="modelviewer" data-type-modelviewer></div>
<!--<h4>source mesh</h4>-->
</section>
</div>
<div class="4u">
<section class="box style2">
<a href="#" class="button">Reset View</a>
<a href="#" class="button toggle">Enable Rotation</a>
</section>
</div>
</div>
<div class="row">
<div class="2u"></div>
<div class="6u">
<section class="box style2">
<div id="log"></div>
</section>
</div>
</div>
<script src="ModelViewer/three.min.js"></script>
<script src="ModelViewer/TrackballControls.js"></script>
<script src="ModelViewer/loaders/PLYLoader.js"></script>
<script src="ModelViewer/Detector.js"></script>
<script src="ModelViewer/ModelViewer.js"></script>
<script>
function $$(id) {
return document.getElementById(id);
}
function myLog(msg) {
var name = '';
try {
var caller = arguments.callee.caller.name;
}
catch (e) {
}
$$('log').innerHTML += "#" + name + "> " + msg + "<br/>";
}
window.onload = function () {
try {
window.console.log = myLog;
}
catch (e) {
$$('log').style.display = none;
}
if (!Detector.webgl) {
console.log('your browser does not support webgl');
Detector.addGetWebGLMessage();
}
mv = new ModelViewer($$('modelviewer'));
mv.load('ModelViewer/cp.ply');
}
</script>
</div>
</article>
</div>
<div class="wrapper style2">
<article id="howto">
<header>
<h2>How to Use</h2>
<section class="container">
<p>simple webgl model viewer based on <a href="http://threejs.org" target="_blank">three.js</a>.</p>
browser compatibility:
</section>
</header>
<div class="container">
<div class="row">
</div>
</div>
</article>
</div>
<!-- Contact -->
<div class="wrapper style4">
<article id="contact" class="container 75%">
<header>
<h2>Have me make stuff for you.</h2>
<p>Ornare nulla proin odio consequat sapien vestibulum ipsum sed lorem.</p>
</header>
<footer>
<ul id="copyright">
<li>© Untitled. All rights reserved.</li>
<li>Design: <a href="http://html5up.net">HTML5 UP</a></li>
</ul>
</footer>
</article>
</div>
</body>
</html>