-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
209 lines (185 loc) · 5.89 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Kinemaker</title>
<!-- p5.js for UI elements -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/addons/p5.dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/addons/p5.sound.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"></link>
<!-- jQuery library -->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> -->
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script type="javascript/text" src="server.js"></script>
</head>
<style>
#container {
position:relative;
left:150px;
}
#gallery {
position:fixed;
width:150px;
height: 100%;
top:0;
left:0;
background-color: white;
/*overflow: auto;*/
overflow-y: scroll !important;
}
#bbox_shape {
position: fixed;
top: 0;
right: 0;
width: 300px;
height: 100px;
background-color: grey;
display: none;
}
#loadSTL {
position: fixed;
top: 105px;
right: 0;
width: 300px;
height: 60px;
background-color: grey;
display: none;
}
#model_rotation {
position: fixed;
top: 170px;
right: 0;
width: 300px;
height: 100px;
background-color: grey;
display: none;
}
#drop_zone {
border: 0px solid blue;
background-color: gray;
position:fixed;
width:400px;
height:200px;
top:0;
left:50px;
}
.box__dragndrop,
.box__uploading,
.box__success,
.box__error {
display: none;
}
.draggable {
width:150px;
}
.btn {
background-color: #555555; /* Green */
border: none;
color: white;
padding: 5px 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
}
</style>
<body>
<div id="container" left="150px" top="0px" class="droppable">
<script src="./build/three.js"></script>
<script src="./build/csg.js"></script>
<script src="./build/ThreeCSG.js"></script>
<script src="./js/loaders/DDSLoader.js"></script>
<script src="./js/loaders/MTLLoader.js"></script>
<script src="./js/loaders/OBJLoader.js"></script>
<script src="./js/loaders/STLLoader.js"></script>
<script src="./js/Detector.js"></script>
<script src="./js/controls/OrbitControls.js"></script>
<script src="./js/libs/dat.gui.min.js"></script>
<script src="./js/libs/stats.min.js"></script>
<script src="./js/controls/DragControls.js"></script>
<script src="./js/controls/TrackballControls.js"></script>
<script src="eventHandler.js"></script>
<script src="./gears/gear_units.js"></script>
<script src="./stl_loader.js"></script>
<script src="./paramUI.js"></script>
<script src="./editor.js"></script>
<!-- #gearbox gallery -->
<div id="gallery" onclick="returnGearSelected(event)">
<!-- <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> -->
<div>
<img src="assets/jumper.png" name="1" class="draggable"/>
</div>
<div>
<img src="assets/swing.png" name="2" class="draggable"/>
</div>
<div>
<img src="assets/bevel.png" name="3" class="draggable"/>
</div>
<div>
<img src="assets/cam.png" name="4" class="draggable"/>
</div>
<div>
<img src="assets/dcam.png" name="5" class="draggable"/>
</div>
<div>
<img src="assets/friction-gear.png" name="6" class="draggable"/>
</div>
<div>
<img src="assets/pulley.png" name="7" class="draggable"/>
</div>
<div>
<img src="assets/slider.png" name="8" class="draggable"/>
</div>
</div>
<script type="text/javascript">
$( function() {
$( ".draggable" ).draggable({
helper: 'clone',
cursor: 'move',
// tolerance: 'fit',
// stack: '.drag',
revert: "invalid",
refrecshPositions: true,
});
$(".droppable").droppable({
drop: function(event, ui) {
console.log(event)
}
});
});
</script>
<!-- file saver -->
<!-- <script src="./js/minjs/FileSaver.min.js"></script>
<script src="./drop_handler.js"></script>
<div id="drop_zone" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">
<strong>Drag one or more files to this Drop Zone ...</strong>
</div> -->
<!-- menu -->
<!-- <div id="bbox_shape">
Bounding Box Shape <br/>
<div align="center" valign="center">
<img src="assets/cube.png" width="70px" height="70px">
<img src="assets/sphere.png" width="70px" height="70px">
<img src="assets/cylinder.png" width="70px" height="70px">
</div>
</div> -->
<!-- <div id="loadSTL">
Load a Host Model <br/>
<button type="button" id="stl" onchange="browseSTL()" class="btn">Load STL</button>
<button type="button" id="craftml" onchange="browseCraftML()" class="btn">Search CraftML</button>
<div> -->
<!-- <div id="model_rotation">
Host Model rotation <br/>
<div>
X: <input type="range" min="0" max="360" step="1" value="0" width="280px"> <br/>
Y: <input type="range" min="0" max="360" step="1" value="0" data-orientation="vertical" width="280px"> <br/>
Z: <input type="range" min="0" max="360" step="1" value="0" data-orientation="vertical" width="280px">
</div>
</div> -->
<input id="myInput" type="file" style="visibility:hidden" />
</body>
</html>