forked from Shoray2002/molars
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.html
92 lines (84 loc) · 3.12 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
<!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" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Kanit&display=swap" rel="stylesheet">
</head>
<link rel="stylesheet" href="./style.css" />
<link rel="icon" type="image/x-icon" href="./Favicon.jpg">
<body>
<canvas id="webgl"></canvas>
<div class="upper interactives distribution">
<div class="opacity-slider">
<div class="slider container">
<label for="wireframe-check" class="font-color">Wireframe Visible : </label>
<input type="checkbox" name="wireframe-check" id="wireframe-check" checked>
<br>
<label for="wireframe-check" class="font-color">Lattice Visible : </label>
<input type="checkbox" name="lattice-check" id="lattice-check" checked>
<br>
<label for="opacity" class="font-color">Opacity : </label>
<input type="range" id="opacity" name="opacity" min="0.01" max="1" step="0.01" value="1">
</div>
</div>
<div class="selection container">
<label id="span_count-label" for="span-dropdown" class="font-color">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 filenames = ["jaw.obj", "front_incisor1.obj", "front_canine1.obj", "front_canine2.obj", "front_canine3.obj", "front_canine4.obj", "front_incisor2.obj"]
let folderpath = "./models/"
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>