-
Notifications
You must be signed in to change notification settings - Fork 0
/
load.html
85 lines (69 loc) · 2.09 KB
/
load.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
<html>
<head>
<title>Cesium Quantized Mesh Terrain Format Logger</title>
</head>
<body>
<script src="cesium-quantized-mesh-terrain-format-logger.js"></script>
<script>
function loadTerrain() {
var xhr = new XMLHttpRequest();
xhr.addEventListener('load', function(){
if (xhr.status == 200){
loadQuantizedMeshTerrainData(xhr.response);
document.getElementById("result").style.display = "block";
}
});
xhr.open('GET', document.terrain['url'].value);
xhr.setRequestHeader('Accept', 'application/vnd.quantized-mesh;extensions=octvertexnormals,application/octet-stream;q=0.9');
xhr.responseType = 'arraybuffer';
xhr.send(null);
return false;
}
</script>
<form name="terrain" action="javascript:loadTerrain();">
<input type="text" name="url" value="URL" />
<input name="Submit" type="submit" value="Load" />
</form>
<div id="result" style="display:none;">
<div id="headerTitle">QuantizedMeshHeader</div>
<table border="1" id="header">
<tr><th>Field</th><th>Value</th></tr>
</table>
<br/><br/>
<div id="verticesTitle">Vertices</div>
<table border="1" id="vertices">
<tr><th colspan="3">Encoded (u, v, h)</th><th colspan="3">Decoded (u, v, h)</th></tr>
</table>
<br/><br/>
<div id="trianglesTitle">Triangles</div>
<table border="1" id="triangles">
<tr><th>#</th><th colspan="3">Indices</th></tr>
</table>
<br/><br/>
<div id="westTitle">West indices</div>
<table border="1" id="west">
<tr><th>#</th><th>Indices</th></tr>
</table>
<br/><br/>
<div id="southTitle">South indices</div>
<table border="1" id="south">
<tr><th>#</th><th>Indices</th></tr>
</table>
<br/><br/>
<div id="eastTitle">East indices</div>
<table border="1" id="east">
<tr><th>#</th><th>Indices</th></tr>
</table>
<br/><br/>
<div id="northTitle">North indices</div>
<table border="1" id="north">
<tr><th>#</th><th>Indices</th></tr>
</table>
<br/><br/>
<div id="extNormalsTitle">Extension: vertex normals</div>
<table border="1" id="normals">
<tr><th colspan="2">Encoded (x, y)</th><th colspan="3">Decoded (x, y, z)</th></tr>
</table>
</div>
</body>
</html>