-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
141 lines (132 loc) · 3.62 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
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
<html>
<!-- These links are fragile. Using compiled code instead -->
<!--
<script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/base.js"></script>
<script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/events/events.js"></script>
<script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/style/style.js"></script>
-->
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/three.js/r61/three.js"></script>
<link rel="stylesheet" text="text/css" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<style>
#vid {
width: 800px;
height: 32px;
}
.main {
width: 800px;
height: 600px;
float: left;
}
.controls {
padding: 10px;
font-size: 10pt;
float: left;
width: 220px;
height: 600px;
}
.controls-content-no {
height: 500px;
}
#depth-map, #shaded, #background {
width: 250px;
}
#num-vertices, #alpha, #normal {
width: 125px;
float: right;
}
.ui-button-text {
font-size: 9pt;
}
</style>
<body>
<div class='main'>
<div id='container' title='Depth map demo'></div>
<video id='vid' src='videos/video8.webm' controls loop></video>
</div>
<div class='controls'>
<h3> Geometry </h3>
<div class='controls-content'>
<p>
<div>
<span>Num vertices:</span><div id="num-vertices"></div>
</div>
<br>
<input type="checkbox" id="wireframe"><label for="wireframe">Wireframe</label>
</p>
</div>
<h3> Rendering </h3>
<div class='controls-content'>
<p>
<input type="checkbox" id="depth-map"><label for="depth-map">Show depth map</label>
<input type="checkbox" id="shaded"><label for="shaded">Shaded</label>
<input type="checkbox" id="background" checked>
<label for="background">Show background</label><br>
<div>
<span>Alpha thresh:</span><div id="alpha"></div>
</div>
</p>
</div>
<h3> Threed </h3>
<p>
<div>
<span>Rotate:</span><div id="rotate"></div>
</div>
<input type="button" id="pop" value="Pop">
</p>
</div>
<script src='calib.js'></script>
<script src='depthmesh.bin.js'></script>
<script>
var containerEl = container;
var videoEl = vid;
var demo = new DepthMeshDemo(containerEl, videoEl, calib);
$(function() {
$("#num-vertices").slider({
min: 10,
max: 200,
step: 5,
value: DepthMeshDemo.DEFAULT_NUM_VERTICES,
change: function(event, ui) {
demo.createPlane(ui.value);
}
});
$("#wireframe").button().change(function(event) {
demo.setWireframe($(this).is(":checked"));
});
$("#depth-map").button().change(function() {
demo.setShowDepthMap($(this).is(":checked"));
});
$("#alpha").slider({
min: 1,
step: 1,
max: 100,
value: 2,
change: function(event, ui) {
demo.setAlphaThresh(Math.log(ui.value) / 10);
}
});
$("#shaded").button().change(function() {
demo.setShaded($(this).is(":checked"));
});
$("#background").button({checked: true}).attr('checked', true).change(function() {
demo.setShowBackground($(this).is(":checked"));
}).prop('checked', true);
$("#background").attr('checked', true);
$("#pop").button().click(function() {
demo.pop();
});
$("#rotate").slider({
min: -1,
max: 1,
step: 0.01,
value: 0.0,
change: function(event, ui) {
demo.setRotation(ui.value);
}
});
$(".controls").show();
});
</script>
</html>