-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
106 lines (106 loc) · 4.45 KB
/
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
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>jQuery Wireframe</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="title" content="jQuery Wireframe" />
<meta name="description" content="jQuery Wireframe Plugin" />
<meta name="keywords" content="jquery, wireframe, 3d, webgl" />
<meta name="language" content="en" />
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script type="text/javascript" src="jquery.wireframe.src.js"></script>
<script type="text/javascript">
function render(){
$("#wireframe").wireframe({
url: 'models/'+$("#url").val()+'.off',
zoom: $("#zoom").val(),
fps: $("#fps").val(),
fill: $("#fill").val(),
stroke: $("#stroke").val(),
line: $("#line").val()
});
}
jQuery(document).ready(function($){
$("#menu").find('select,input').change(function(e){
e.preventDefault();
if($("#url").val()){
render();
}
});
});
</script>
<style type="text/css">
body { font-family:Calibri,Arial,sans-serif;margin:0;padding:0; }
#menu { position:fixed;z-index:2;top:10px;left:10px;width:200px; }
#menu h1 { margin:0 0 10px 0;padding:0; }
#menu ul { list-style:none;margin:0;padding:0; }
#wireframe { display:block;position:absolute;z-index:1;top:0;bottom:0;left:0;right:0;height:100%;width:100%; }
label { display:block; }
select { width: 195px; }
input { width:190px; }
</style>
</head>
<body>
<div id="menu">
<h1>jQuery Wireframe</h1>
<ul>
<li>
<label>Model</label>
<select id="url">
<option value="">Please Select</option>
<optgroup label="Complex">
<option value="complex/apple">apple</option>
<option value="complex/dragon">dragon</option>
<option value="complex/formula">formula</option>
<option value="complex/goblet">goblet</option>
<option value="complex/head">head</option>
<option value="complex/king">king</option>
<option value="complex/klingon">klingon</option>
<option value="complex/pear">pear</option>
<option value="complex/plane">plane</option>
<option value="complex/seashell">seashell</option>
<option value="complex/spacestation">spacestation</option>
<option value="complex/sword">sword</option>
<option value="complex/teapot">teapot</option>
<option value="complex/helix">helix</option>
</optgroup>
<optgroup label="Geometric">
<option value="geometric/boxcube">boxcube</option>
<option value="geometric/cone">cone</option>
<option value="geometric/cuboctahedron">cuboctahedron</option>
<option value="geometric/epcot">epcot</option>
<option value="geometric/icosahedron">icosahedron</option>
<option value="geometric/octahedron">octahedron</option>
<option value="geometric/octtorus">octtorus</option>
<option value="geometric/rhombicosidodecahedron">rhombicosidodecahedron</option>
<option value="geometric/rhombicubeoctahedron">rhombicubeoctahedron</option>
<option value="geometric/sphere">sphere</option>
<option value="geometric/truncicosahedron">truncicosahedron</option>
</optgroup>
</select>
</li>
<li>
<label>Zoom</label>
<input type="text" id="zoom" value="10000" />
</li>
<li>
<label>FPS</label>
<input type="text" id="fps" value="37" />
</li>
<li>
<label>Stroke Style</label>
<input type="text" id="stroke" value="rgba(0, 0, 0, 1)" />
</li>
<li>
<label>Fill Style</label>
<input type="text" id="fill" value="rgba(60, 60, 60, 0.1)" />
</li>
<li>
<label>Line Width</label>
<input type="text" id="line" value="0.2" />
</li>
</ul>
</div>
<canvas id="wireframe"></canvas>
</body>
</html>