-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
33 lines (29 loc) · 958 Bytes
/
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
<html>
<head>
<title>WebGL</title>
<script type="text/javascript" src="js/jdataview.js"> </script>
<script type="text/javascript" src="js/lib3ds.js"> </script>
<script type="text/javascript">
function loadFile(url) {
var req = new XMLHttpRequest();
if(req.overrideMimeType) {
req.overrideMimeType("text/plain; charset=x-user-defined");
}
req.onreadystatechange = function() {
if(req.readyState == 4) {
if(req.status == 0 || req.status == 200) {
// Note that turning on debugging makes reading the file much slower.
var lib3ds = new Lib3ds(document.getElementById("dbg"), true);
lib3ds.readFile(req.responseText);
}
}
}
req.open("GET", url, true);
req.send(null);
}
</script>
</head>
<body onload="loadFile('MIG-21.3ds')">
<div id="dbg"></div>
</body>
</html>