-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
237 lines (225 loc) · 11 KB
/
index.html
File metadata and controls
237 lines (225 loc) · 11 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Probe Web Demo</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div id="title" class="title">
Probe Web Demo
</div>
<div class="container" id="container">
<div class="controls-section" id="controlsSection">
<div class="menu-label" id="controlsLabel">
Controls
</div>
<hr>
<div class="menu" id="controlsMenu">
<!-- Object Import/Export Controls -->
<div class="submenu-label" id="objectLoadingLabel">
Object Import/Export
</div>
<div class="submenu" id="objectLoadingControls">
<div class="submenu-item">
<label for="resetToCube"> Reset to Default Cube: </label>
<button class="submenu-button" id="resetToCube"> Cube </button>
</div>
<div class="submenu-item">
<label for="loadObjectFileEntry"> Load Object: </label>
<input class="submenu-button" type="file" id="loadObjectFileEntry"/>
</div>
<div class="subsubmenu-item">
<label for="loadObjectFitToFrustumCheckbox"> Fit Loaded Object to Default Frustum: </label>
<input class="checkbox" type="checkbox" id="loadObjectFitToFrustumCheckbox" checked>
</div>
<div class="submenu-item">
<label for="exportObjectButton"> Export Distorted Object: </label>
<button class="submenu-button" id="exportObjectButton"> Export </button>
</div>
</div>
<!-- Frustum Controls -->
<div class="submenu-label" id="frustumControlsLabel">
Frustum
</div>
<div class="submenu" id="frustumControls">
<div class="submenu-item">
<label for="projectionDropdown"> Projection Type: </label>
<select id="projectionDropdown">
<option value="perspective">Perspective</option>
<option value="ortho">Parallel (Axonometric)</option>
</select>
</div>
<div id="perspectiveFrustumControls">
<div class="subsubmenu-item">
<label for="fovSlider"> Field of View (FOV): </label>
<input type="number" id="fovEntry" min="0.1" max="179.9" value="45" title="FOV (in degrees)" class="standard-number">
<input type="range" id="fovSlider" min="1" max="179" step="1" value="45" class="standard-slider">
</div>
</div>
<div class="hidden" id="orthoFrustumControls">
<div class="subsubmenu-item">
<label for="orthoSideSlider"> Frustum Side Length: </label>
<input type="number" id="orthoSideEntry" min="0" max="10" value="2.5" title="Ortho Side Length" class="standard-number">
<input type="range" id="orthoSideSlider" min="0" max="10" step="0.1" value="2.5" class="standard-slider">
</div>
</div>
<br>
<div class="submenu-item">
<label for="nearEntry"> Near Plane: </label>
<input type="number" id="nearEntry" min="0.001" max="20" value="1" title="Near Plane" class="standard-number">
</div>
<div class="submenu-item">
<label for="farEntry"> Far Plane: </label>
<input type="number" id="farEntry" min="0.001" max="20" value="5" title="Near Plane" class="standard-number">
</div>
</div>
<!-- Transformation Controls -->
<div class="submenu-label" id="transformationControlsLabel">
Transformation <br> Widget
</div>
<div class="submenu" id="transformationControls">
<div class="submenu-item">
<div class="submenu-item-no-indent">
<button class="submenu-button" id="transformResetButton"> Reset to Default Transform (Q) </button>
</div>
<div class="submenu-item-no-indent">
<button class="submenu-button" id="transformSetDefaultButton"> Set Current Transform As Default (Shift + Q) </button>
</div>
<div class="submenu-item-no-indent" id="translationControlsMenu">
<button class="transform-button-clicked" id="translateButton"> Translate (W) </button>
<label for="translationXEntry"> X: </label>
<input type="number" id="translationXEntry" value="0" title="Translation X Value" class="standard-number">
<label for="translationYEntry"> Y: </label>
<input type="number" id="translationYEntry" value="0" title="Translation Y Value" class="standard-number">
<label for="translationZEntry"> Z: </label>
<input type="number" id="translationZEntry" value="0" title="Translation Z Value" class="standard-number">
</div>
<div class="submenu-item-no-indent" id="rotationControlsMenu">
<button class="transform-button" id="rotateButton"> Rotate (E) </button>
<label for="rotationXEntry"> X: </label>
<input type="number" id="rotationXEntry" value="0" title="Rotation around X-Axis (Degrees)" class="standard-number">
<label for="rotationYEntry"> Y: </label>
<input type="number" id="rotationYEntry" value="0" title="Rotation around Y-Axis (Degrees)" class="standard-number">
<label for="rotationZEntry"> Z: </label>
<input type="number" id="rotationZEntry" value="0" title="Rotation around Z-Axis (Degrees)" class="standard-number">
</div>
<div class="submenu-item-no-indent" id="scaleControlsMenu">
<button class="transform-button" id="scaleButton"> Scale (R) </button>
<label for="scaleXEntry"> X: </label>
<input type="number" id="scaleXEntry" value="1" title="Scale X Value" class="standard-number">
<label for="scaleYEntry"> Y: </label>
<input type="number" id="scaleYEntry" value="1" title="Scale Y Value" class="standard-number">
<label for="scaleZEntry"> Z: </label>
<input type="number" id="scaleZEntry" value="1" title="Scale Z Value" class="standard-number">
</div>
</div>
</div>
<!-- Shading Controls -->
<div class="submenu-label" id="shadingControlsLabel">
Shading
</div>
<div class="submenu" id="shadingControls">
<div class="submenu-item">
<label for="shadingDropdown"> Shading Mode: </label>
<select id="shadingDropdown">
<option value="wire">Wireframe </option>
<option value="flat" selected>Flat Shading </option>
<option value="smooth">Smooth Shading </option>
<option value="normal">Normal Shading </option>
</select>
</div>
<div class="hidden" id="wireframeControlsMenu">
<div><button class="submenu-button" id="detriangulateWireframeButton">Generate De-Triangulated Wireframe</button></div>
<div class="hidden" id="useDetriangulatedWireframeMenu">
<input type="checkbox" id="useDetriangulatedWireframeCheckbox" class="checkbox" checked>Use De-Triangulated Wireframe</input>
</div>
</div>
<div class="hidden" id="wireframeControlsMenu">
</div>
<div class="subsubmenu-item" id="colorPickObjMenu">
<label for="colorpickObjColor">Object Color:</label>
<input type='color' id="colorpickObjColor" class="colorpicker" value="#FFFFFF">
</div>
<div class="submenu-item">
<label for="shadingDoubleSidedCheckbox">Double-Sided Material:</label>
<input type='checkbox' id="shadingDoubleSidedCheckbox" class="checkbox" checked>
</div>
</div>
<!-- UI Settings -->
<div class="submenu-label" id="uiControlsLabel">
UI Settings
</div>
<div class="submenu" id="shadingControls">
<div class="submenu-item">
<label for="showAxesCheckbox"> Show Axes: </label>
<input type='checkbox' id="showAxesCheckbox" class="checkbox">
</div>
<div class="submenu-item">
<label for="nearFarPlaneOpacitySlider"> Clipping Plane Opacity: </label>
<input type="number" id="nearFarPlaneOpacityEntry" min="0" max="1" value="0.2" title="Clipping Plane Opacity" class="standard-number">
<input type="range" id="nearFarPlaneOpacitySlider" min="0" max="1" step="0.01" value="0.2" class="standard-slider">
</div>
</div>
<br>
<br>
</div>
</div>
<div class="render-section" id="renderSection">
<div class="overall-views-container" id="viewsContainer">
<!-- Real World View Elements -->
<div class="individual-view-container" id="realViewContainer">
<div class="view-header" id="realViewHeader">
<label class="header-label"> Real View </label>
<button class="header-button" id="realViewButton" onclick="onFullscreenButtonPressed('realView')" title="Click to make this view fullscreen"> Fullscreen </button>
</div>
<div class="view-render-area" id="realView"></div>
</div>
<!-- Camera View Elements -->
<div class="individual-view-container" id="cameraViewContainer">
<div class="view-header">
<label class="header-label" id="cameraViewHeader"> Camera View </label>
<button class="header-button" id="cameraViewButton" onclick="onFullscreenButtonPressed('cameraView')" title="Click to make this view fullscreen"> Fullscreen </button>
</div>
<div class="view-render-area" id="cameraView"></div>
</div>
<!-- Orthographic View Elements -->
<div class="individual-view-container" id="orthoViewContainer">
<div class="view-header" id="orthoViewHeader">
<label class="header-label"> Orthographic View </label>
<div class="header-button-section">
<!-- <button class="header_button" id="orthoSwapRealImageButton" onclick="onOrthoSwapRealImageButtonPressed('orthoView', 'orthoSwapRealImageButton')" style="height:100%" title="Click to Sync with Imagespace View"> Real View </button> -->
<button class="header-button" id="orthoSwapButton" onclick="onOrthoSwapButtonPressed('orthoView', 'orthoSwapButton')" style="height:100%" title="Click to swap to a plan view"> Elevation </button>
<button class="header-button" id="orthoViewButton" onclick="onFullscreenButtonPressed('orthoView')" style="height:100%" title="Click to make this view fullscreen"> Fullscreen </button>
</div>
</div>
<div class="view-render-area" id="orthoView"></div>
</div>
<!-- Imagespace View Element -->
<div class="individual-view-container" id="imageViewContainer">
<div class="view-header" id="imageViewHeader">
<label class="header-label"> Imagespace View </label>
<div class="header-button-section">
<button class="header-button" id="imageSwapButton" onclick="onImageSwapButtonPressed()" style="height:100%" title="Click to undistort the scene">Undistort (D)</button>
<button class="header-button" id="imageViewButton" onclick="onFullscreenButtonPressed('imageView')" style="height:100%" title="Click to make this view fullscreen"> Fullscreen </button>
</div>
</div>
<div class="view-render-area" id="imageView"></div>
</div>
</div>
<div id="loadingPopup" class="hidden">
<div>Generating Simplified Wireframe...</div>
</div>
</div>
</div>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.156.1/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.156.1/examples/jsm/"
}
}
</script>
<script type="module" src="./js/main.js"></script>
</body>
</html>