-
Notifications
You must be signed in to change notification settings - Fork 0
/
x3d_viewer.htm
48 lines (45 loc) · 2.43 KB
/
x3d_viewer.htm
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- version 0.1 2014-07-12-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>X3D Viewer</title>
<link rel="stylesheet" href="js/colorpicker/css/colorpicker.css" type="text/css" />
<link rel="stylesheet" type="text/css"
href="x3dom.css" />
<script type="text/javascript" src="js/x3dom-full.js"></script>
<script src="js/jquery-3.6.0.min.js" type="text/javascript"></script>
<!--http://www.eyecon.ro/colorpicker -->
<script type="text/javascript" src="js/colorpicker/js/colorpicker.js"></script>
<style>H1 {font-family:Verdana;color:midnight-blue;font-size:large}</style>
<script type="text/javascript">
function show() {
$("scene").append($('#txtx3d').val());
}
function clearResults() {
$("scene").html("")
}
</script>
</head>
<body>
<h1>Minimalist X3D Viewer</h1>
<form><input type="hidden" id="txtbands" value="255,0,0" /><b>Detailed instructions at <a href="http://www.x3dom.org/?page_id=293" target="_blank">X3Dom camera navigation</a></b><blockquote>Use mouse and mouse scroll wheel to move in and around the scene. <b>a</b> show all in scene, <b>u</b> upright, <b>r</b> reset position</blockquote>
<table>
<tr><td><textarea id="txtx3d" name="txtx3d" runat="server" rows="8" cols="100" style="font-size:12px;font-family:Courier"><Transform><Shape><Appearance>
<Material emissiveColor='0 0 1'/>
</Appearance> <IndexedFaceSet convex='false' coordIndex='0 1 2 3 -1 4 5 6 7 -1 8 9 10 11 -1 12 13 14 15 -1 16 17 18 19 -1 20 21 22 23'><Coordinate point='0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 0 0 1 1 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 0 1 1' /></IndexedFaceSet></Shape>
</Transform></textarea></td>
</tr>
</table>
<input type="button" id="cmdShow" value="Show" onclick="show()" />
<input type="button" id="cmdClearResults" value="Clear Results" onclick="clearResults()" />
</form>
<table width="100%">
<tr style='background-color:ThreeDDarkShadow;color:white'><th>Results</th></tr>
<tr><td><div id="result" style="width:60%"><x3d width="100%" height="600px">
<scene>
<NavigationInfo type='"EXAMINE" "WALK" "FLY" "ANY"'/>
</scene>
</x3d></div></td></tr>
</table>
</body>
</html>