-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
348 lines (348 loc) · 14.6 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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MoodyJS</title>
<script type="module" src="main.js"></script>
<style>
:root {
--l1-color: #F44336;
--l2-color: #FFEB3B;
--l3-color: #4CAF50;
--l4-color: #FF7F50;
--l5-color: #2196F3;
--l6-color: #FF80AB;
--l7-color: #00BCD4;
--l8-color: #9C27B0;
}
table {
table-layout: fixed;
width: 50%;
border-collapse: collapse;
margin-top: 20px;
}
thead th:nth-child(1) {
width: 4%;
}
thead th:nth-child(2) {
width: 12%;
}
thead th:nth-child(3) {
width: 12%;
}
thead th:nth-child(4) {
width: 12%;
}
thead th:nth-child(5) {
width: 12%;
}
thead th:nth-child(6) {
width: 12%;
}
thead th:nth-child(7) {
width: 12%;
}
thead th:nth-child(8) {
width: 12%;
}
thead th:nth-child(9) {
width: 12%;
}
th, td {
padding: 2px;
}
tbody td {
text-align: center;
}
input:user-invalid {
border: red solid 2px;
}
</style>
</head>
<body>
<label for="plateHeight">Surface plate length: </label>
<input type="number" placeholder="48" name="plateHeight" id="plateHeight" maxlength="5"/><br/>
<label for="plateWidth">Surface plate width: </label>
<input type="number" placeholder="72" name="plateWidth" id="plateWidth" maxlength="5"/><br/>
<label for="reflectorFootSpacing">Reflector foot spacing: </label>
<input type="number" placeholder="4" name="reflectorFootSpacing" id="reflectorFootSpacing" maxlength="5"/><br/><br/>
<button type="button" id="createTables">Create Tables</button>
<button type="button" id="fillTestData">Fill Test Data</button>
<br/><br/>
<label for="plateDiagonal">Surface plate diagonal length: </label>
<input name="plateDiagonal" id="plateDiagonal" readonly/><br/>
<label for="diagonalInset">Diagonal inset: </label>
<input name="diagonalInset" id="diagonalInset" readonly/><br/>
<label for="numHorizontalStations">Number of Horizontal Stations: </label>
<input name="numHorizontalStations" id="numHorizontalStations" readonly/><br/>
<label for="numVerticalStations">Number of Vertical Stations: </label>
<input name="numVerticalStations" id="numVerticalStations" readonly/><br/>
<label for="numDiagonalStations">Number of Diagonal Stations: </label>
<input name="numDiagonalStations" id="numDiagonalStations" readonly/><br/><br/>
ASME Overall Flatness Requirements:<br/>
<label for="gradeAA">Grade AA (µinch): </label>
<input name="gradeAA" id="gradeAA" readonly/><br/>
<label for="gradeA">Grade A (µinch): </label>
<input name="gradeA" id="gradeA" readonly/><br/>
<label for="gradeB">Grade B (µinch): </label>
<input name="gradeB" id="gradeB" readonly/><br/><br/>
ISO Overall Flatness Requirements:<br/>
<label for="grade0">Grade 0 (µinch): </label>
<input name="grade0" id="grade0" readonly/><br/>
<label for="grade1">Grade 1 (µinch): </label>
<input name="grade1" id="grade1" readonly/><br/>
<label for="grade2">Grade 2 (µinch): </label>
<input name="grade2" id="grade2" readonly/><br/>
<label for="grade3">Grade 3 (µinch): </label>
<input name="grade3" id="grade3" readonly/><br/><br/>
<label for="overallFlatness">Overall flatness (µinch): </label>
<input name="overallFlatness" id="overallFlatness" readonly/><br/>
<label for="zMultiplier">Height multiplier (default: 50,000x): </label>
<input id="zMultiplier" type="range" value="50000" min="10000" max="100000" step="any" list="markers"/>
<datalist id="markers">
<option value="50000"></option>
</datalist><br/><br/>
<label for="lightPower">Light power: </label>
<input id="lightPower" type="range" value="400" min="0" max="10000" step="any"/><br/>
<label for="lightPosX">Light position X: </label>
<input id="lightPosX" type="range" value="0" min="-100" max="100" step="any"/><br/>
<label for="lightPosY">Light position Y: </label>
<input id="lightPosY" type="range" value="0" min="-100" max="100" step="any"/><br/>
<label for="lightPosZ">Light position Z: </label>
<input id="lightPosZ" type="range" value="-40" min="-200" max="0" step="any"/><br/>
<br/>
<input type="checkbox" id="showLines" name="showLines" checked/>
<label for="showLines">Show Union Jack Lines</label><br/>
<input type="checkbox" id="showHeatmap" name="showHeatmap" checked/>
<label for="showHeatmap">Show Heatmap</label><br/>
<input type="checkbox" id="lightingOn" name="lightingOn" checked/>
<label for="lightingOn">Lighting On</label><br/>
<div>FPS: <span id="fps"></span></div>
<div>Avg FPS: <span id="avg"></span></div>
<br/>
<svg id="tableGraphic" preserveAspectRatio="xMaxYMid meet" style="visibility: hidden; max-width: 500px">
<rect id="outsideRect" x="0" y="0" fill="white" stroke="black" stroke-width="0.01em"/>
<rect id="insideRect" fill="white" stroke="black" stroke-width="0.01em"/>
<g id="topStartingDiagonalLineGroup" stroke="var(--l1-color)" fill="var(--l1-color)" stroke-width="0.018em">
<path id="topStartingDiagonalLine"/>
<text style="font-size: 3px; dominant-baseline: central" dx="-0.05em" dy="-0.05em">
<textPath href="#topStartingDiagonalLine" startOffset="25%">⮞</textPath>
</text>
</g>
<g id="bottomStartingDiagonalLineGroup" stroke="var(--l2-color)" fill="var(--l2-color)" stroke-width="0.018em">
<path id="bottomStartingDiagonalLine"/>
<text style="font-size: 3px; dominant-baseline: central" dx="-0.05em" dy="-0.05em">
<textPath href="#bottomStartingDiagonalLine" startOffset="75%">⮜</textPath>
</text>
</g>
<g id="northPerimeterLineGroup" stroke="var(--l3-color)" fill="var(--l3-color)" stroke-width="0.018em">
<path id="northPerimeterLine"/>
<text style="font-size: 3px; dominant-baseline: central" dy="-0.055em">
<textPath href="#northPerimeterLine" startOffset="75%">⮜</textPath>
</text>
</g>
<g id="eastPerimeterLineGroup" stroke="var(--l4-color)" fill="var(--l4-color)" stroke-width="0.018em">
<path id="eastPerimeterLine"/>
<text style="font-size: 3px; dominant-baseline: central; writing-mode: vertical-lr"
dx="0.045em">
<textPath href="#eastPerimeterLine" startOffset="25%">⮞</textPath>
</text>
</g>
<g id="southPerimeterLineGroup" stroke="var(--l5-color)" fill="var(--l5-color)" stroke-width="0.018em">
<path id="southPerimeterLine"/>
<text style="font-size: 3px; dominant-baseline: central;" dy="-0.07em">
<textPath href="#southPerimeterLine" startOffset="25%">⮞</textPath>
</text>
</g>
<g id="westPerimeterLineGroup" stroke="var(--l6-color)" fill="var(--l6-color)" stroke-width="0.018em">
<path id="westPerimeterLine"/>
<text style="font-size: 3px; dominant-baseline: central; writing-mode: vertical-lr"
dx="0.045em">
<textPath href="#westPerimeterLine" startOffset="75%">⮜</textPath>
</text>
</g>
<g id="horizontalCenterLineGroup" stroke="var(--l7-color)" fill="var(--l7-color)" stroke-width="0.018em">
<path id="horizontalCenterLine"/>
<text style="font-size: 3px; dominant-baseline: central;" dy="-0.055em">
<textPath href="#horizontalCenterLine" startOffset="25%">⮞</textPath>
</text>
</g>
<g id="verticalCenterLineGroup" stroke="var(--l8-color)" fill="var(--l8-color)" stroke-width="0.018em">
<path id="verticalCenterLine"/>
<text style="font-size: 3px; dominant-baseline: central; writing-mode: vertical-lr"
dx="0.045em">
<textPath href="#verticalCenterLine" startOffset="25%">⮞</textPath>
</text>
</g>
</svg>
<canvas id="glcanvas" width="800" height="600"></canvas>
<div style="display: flex; flex-direction: row-reverse; align-items: center; justify-content: center;">
<div style="flex: 10;">
<table id="topStartingDiagonalTable" style="visibility: hidden; border: 3px solid var(--l1-color);">
<thead>
<tr>
<th scope="col">Station No.</th>
<th scope="col">Autcollimator Readings (1″ arc)</th>
<th scope="col">Angular Displacements (1″ arc)</th>
<th scope="col">Sum of Displacements (1″ arc)</th>
<th scope="col">Cumulative Correction Factor (1″ arc)</th>
<th scope="col">Displacement from Datum Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (0.0001")</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div id="topStartingDiagonalTableSvgContainer" style="flex: 2;">
</div>
</div>
<div style="display: flex; flex-direction: row-reverse; align-items: center; justify-content: center;">
<div style="flex: 10;">
<table id="bottomStartingDiagonalTable" style="visibility: hidden; border: 3px solid var(--l2-color);">
<thead>
<tr>
<th scope="col">Station No.</th>
<th scope="col">Autcollimator Readings (1″ arc)</th>
<th scope="col">Angular Displacements (1″ arc)</th>
<th scope="col">Sum of Displacements (1″ arc)</th>
<th scope="col">Cumulative Correction Factor (1″ arc)</th>
<th scope="col">Displacement from Datum Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (0.0001")</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div id="bottomStartingDiagonalTableSvgContainer" style="flex: 2;">
</div>
</div>
<div style="display: flex; flex-direction: row-reverse; align-items: center; justify-content: center;">
<div style="flex: 10;">
<table id="northPerimeterTable" style="visibility: hidden; border: 3px solid var(--l3-color);">
<thead>
<tr>
<th scope="col">Station No.</th>
<th scope="col">Autcollimator Readings (1″ arc)</th>
<th scope="col">Angular Displacements (1″ arc)</th>
<th scope="col">Sum of Displacements (1″ arc)</th>
<th scope="col">Cumulative Correction Factor (1″ arc)</th>
<th scope="col">Displacement from Datum Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (0.0001")</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div id="northPerimeterTableSvgContainer" style="flex: 2;">
</div>
</div>
<div style="display: flex; flex-direction: row-reverse; align-items: center; justify-content: center;">
<div style="flex: 10;">
<table id="eastPerimeterTable" style="visibility: hidden; border: 3px solid var(--l4-color);">
<thead>
<tr>
<th scope="col">Station No.</th>
<th scope="col">Autcollimator Readings (1″ arc)</th>
<th scope="col">Angular Displacements (1″ arc)</th>
<th scope="col">Sum of Displacements (1″ arc)</th>
<th scope="col">Cumulative Correction Factor (1″ arc)</th>
<th scope="col">Displacement from Datum Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (0.0001")</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div id="eastPerimeterTableSvgContainer" style="flex: 2;">
</div>
</div>
<div style="display: flex; flex-direction: row-reverse; align-items: center; justify-content: center;">
<div style="flex: 10;">
<table id="southPerimeterTable" style="visibility: hidden; border: 3px solid var(--l5-color);">
<thead>
<tr>
<th scope="col">Station No.</th>
<th scope="col">Autcollimator Readings (1″ arc)</th>
<th scope="col">Angular Displacements (1″ arc)</th>
<th scope="col">Sum of Displacements (1″ arc)</th>
<th scope="col">Cumulative Correction Factor (1″ arc)</th>
<th scope="col">Displacement from Datum Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (0.0001")</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div id="southPerimeterTableSvgContainer" style="flex: 2;">
</div>
</div>
<div style="display: flex; flex-direction: row-reverse; align-items: center; justify-content: center;">
<div style="flex: 10;">
<table id="westPerimeterTable" style="visibility: hidden; border: 3px solid var(--l6-color);">
<thead>
<tr>
<th scope="col">Station No.</th>
<th scope="col">Autcollimator Readings (1″ arc)</th>
<th scope="col">Angular Displacements (1″ arc)</th>
<th scope="col">Sum of Displacements (1″ arc)</th>
<th scope="col">Cumulative Correction Factor (1″ arc)</th>
<th scope="col">Displacement from Datum Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (0.0001")</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div id="westPerimeterTableSvgContainer" style="flex: 2;">
</div>
</div>
<div style="display: flex; flex-direction: row-reverse; align-items: center; justify-content: center;">
<div style="flex: 10;">
<table id="horizontalCenterTable" style="visibility: hidden; border: 3px solid var(--l7-color);">
<thead>
<tr>
<th scope="col">Station No.</th>
<th scope="col">Autcollimator Readings (1″ arc)</th>
<th scope="col">Angular Displacements (1″ arc)</th>
<th scope="col">Sum of Displacements (1″ arc)</th>
<th scope="col">Cumulative Correction Factor (1″ arc)</th>
<th scope="col">Displacement from Datum Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (0.0001")</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div id="horizontalCenterTableSvgContainer" style="flex: 2;">
</div>
</div>
<div style="display: flex; flex-direction: row-reverse; align-items: center; justify-content: center;">
<div style="flex: 10;">
<table id="verticalCenterTable" style="visibility: hidden; border: 3px solid var(--l8-color);">
<thead>
<tr>
<th scope="col">Station No.</th>
<th scope="col">Autcollimator Readings (1″ arc)</th>
<th scope="col">Angular Displacements (1″ arc)</th>
<th scope="col">Sum of Displacements (1″ arc)</th>
<th scope="col">Cumulative Correction Factor (1″ arc)</th>
<th scope="col">Displacement from Datum Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (1″ arc)</th>
<th scope="col">Displacement from Base Plane (0.0001")</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div id="verticalCenterTableSvgContainer" style="flex: 2;">
</div>
</div>
</body>
</html>