-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.html
85 lines (77 loc) · 2.53 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>MOLARS</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
</head>
<link rel="stylesheet" href="./style.css" />
<body>
<canvas id="webgl"></canvas>
<div class="upper interactives distribution">
<div class="opacity-slider">
<div class="slider">
<label for="wireframe-check">Wireframe Visible : </label>
<input type="checkbox" name="wireframe-check" id="wireframe-check" checked>
<br>
<label for="opacity">Opacity : </label>
<input type="range" id="opacity" name="opacity" min="0.01" max="1" step="0.01" value="1">
</div>
</div>
<div class="selection">
<label id="span_count-label" for="span-dropdown">Deformation Points : </label>
<select name="span_dropdown" id="span-dropdown">
<option value="1">2</option>
<option value="2" selected>3</option>
<option value="3">4</option>
</select>
</div>
</div>
<div class="lower interactives centerised">
<div class="buttons">
<div id="exportSTL" class="button">Apply 2 Design</div>
</div>
<div class="buttons">
<div id="TEST_M" class="button">TEST SHOW</div>
</div>
<div class="buttons hidebutton">
<div id="SAVE_M" class="button">MATRIX</div>
</div>
</div>
<script src="threejs/three.js"></script>
<script src="threejs/OrbitControls.js"></script>
<script src="threejs/TransformControls.js"></script>
<script src="threejs/SubdivisionModifier.js"></script>
<script src="threejs/STLBinaryExporter.js"></script>
<script src="threejs/OBJLoader.js"></script>
<script src="threejs/STLLoader.js"></script>
<script src="ffd.js"></script>
<script>
let folderpath = "./models/"
let filenames = ["jaw.obj", "t6.obj", "t7.obj", "t8.obj", "t9.obj", "t10.obj", "t11.obj"]
var base64Models = {}
var linkData = new Array();
var blobIDs = new Array();
let matrixFileName = ""
let fMatrix = []
function loadALL_Files(file, array) {
console.log(array)
console.log(file)
filenames = array
folderpath = file
}
function getSavedData() {
return linkData.toString();
}
function getBlobIds() {
return blobIDs.toString();
}
function applyTransform(fileName, matrix) {
console.log("APPLY TRANSFORM TO TOOTH");
matrixFileName = fileName;
fMatrix = matrix;
};
</script>
<script type="module" src="./main.js"></script>
</body>
</html>