-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathindex.html
More file actions
232 lines (223 loc) · 9.3 KB
/
index.html
File metadata and controls
232 lines (223 loc) · 9.3 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Paleograph</title>
<link rel="stylesheet" href="/src/style.css" />
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.163/build/three.module.js",
"three/examples/jsm/": "https://cdn.jsdelivr.net/npm/three@0.163/examples/jsm/",
"papaparse": "https://cdn.jsdelivr.net/npm/papaparse@5.4.1/+esm"
}
}
</script>
<script type="module" src="/src/main.js"></script>
</head>
<body>
<div id="ui-root" class="ui-panel">
<header class="panel-header">
<h1>Paleograph</h1>
<p>Load excavation data and map it onto the 3D scene.</p>
</header>
<nav class="tab-bar" role="tablist">
<button class="tab-button active" role="tab" aria-selected="true" data-tab="io-tab">Import & Export</button>
<button class="tab-button" role="tab" aria-selected="false" data-tab="view-tab">View</button>
</nav>
<div class="tab-panels">
<section id="io-tab" class="tab-panel active" role="tabpanel">
<section class="panel-section">
<h2>Data import</h2>
<label class="field">
<span class="field-label">CSV file</span>
<input id="csv-input" type="file" accept=".csv,text/csv" />
</label>
<div id="dropzone" class="dropzone">Drop CSV file here</div>
<output id="load-status" class="status"></output>
<div class="axis-row">
<div class="axis-block">
<label class="field">
<span class="field-label">East (X)</span>
<select id="x-column"></select>
</label>
<label class="toggle axis-toggle">
<input type="checkbox" id="flip-east" />
<span>Flip East</span>
</label>
</div>
<div class="axis-block">
<label class="field">
<span class="field-label">North (Y)</span>
<select id="y-column"></select>
</label>
<label class="toggle axis-toggle">
<input type="checkbox" id="flip-north" />
<span>Flip North</span>
</label>
</div>
<div class="axis-block">
<label class="field">
<span class="field-label">Elevation (Z)</span>
<select id="z-column"></select>
</label>
<label class="toggle axis-toggle">
<input type="checkbox" id="flip-elevation" />
<span>Flip Elevation</span>
</label>
</div>
</div>
</section>
<section class="panel-section">
<h2>Mesh import</h2>
<label class="field">
<span class="field-label">OBJ file</span>
<input id="obj-input" type="file" accept=".obj" />
</label>
<label class="field">
<span class="field-label">MTL file (optional)</span>
<input id="mtl-input" type="file" accept=".mtl" />
</label>
<label class="field">
<span class="field-label">Textures (optional)</span>
<input id="texture-input" type="file" accept="image/*" multiple />
</label>
<div class="field-pair">
<label class="field">
<span class="field-label">Forward axis</span>
<select id="obj-forward-axis">
<option value="+X">+X</option>
<option value="-X">-X</option>
<option value="+Y" selected>+Y</option>
<option value="-Y">-Y</option>
<option value="+Z">+Z</option>
<option value="-Z">-Z</option>
</select>
</label>
<label class="field">
<span class="field-label">Up axis</span>
<select id="obj-up-axis">
<option value="+X">+X</option>
<option value="-X">-X</option>
<option value="+Y">+Y</option>
<option value="-Y">-Y</option>
<option value="+Z" selected>+Z</option>
<option value="-Z">-Z</option>
</select>
</label>
</div>
<button id="import-obj" class="primary-button" type="button">Import OBJ</button>
</section>
<section class="panel-section">
<h2>Export</h2>
<div class="button-row">
<button id="export-ply-visible" class="primary-button" type="button">Export Visible (PLY)</button>
<button id="export-ply-all" class="secondary-button" type="button">Export All (PLY)</button>
</div>
</section>
</section>
<section id="view-tab" class="tab-panel" role="tabpanel" hidden>
<section class="panel-section">
<h2>Color Styling</h2>
<label class="field">
<span class="field-label">Color source</span>
<select id="color-mode">
<option value="category">Categories</option>
<option value="layer">Layers</option>
</select>
</label>
<label class="field">
<span class="field-label">Category column</span>
<select id="category-column"></select>
</label>
<label class="toggle">
<input type="checkbox" id="category-toggle-all" checked />
<span>Show all categories</span>
</label>
<div id="category-config" class="category-config"></div>
</section>
<section class="panel-section">
<h2>Stratigraphy</h2>
<label class="field">
<span class="field-label">Layer column</span>
<select id="layer-column"></select>
</label>
<label class="toggle">
<input type="checkbox" id="layer-toggle-all" checked />
<span>Show all layers</span>
</label>
<div id="layer-filters" class="layer-filters"></div>
</section>
<section class="panel-section">
<h2>Appearance</h2>
<label class="field">
<span class="field-label">Point scale</span>
<input id="point-scale" type="range" min="0" max="1" step="0.01" value="1" />
</label>
<div class="range-settings">
<label>
<span>Min</span>
<input id="point-scale-min" type="number" step="0.01" value="0" />
</label>
<label>
<span>Max</span>
<input id="point-scale-max" type="number" step="0.01" value="1" />
</label>
</div>
<label class="field">
<span class="field-label">Label size</span>
<input id="label-scale" type="range" min="0" max="1" step="0.01" value="1" />
</label>
<div class="range-settings">
<label>
<span>Min</span>
<input id="label-scale-min" type="number" step="0.01" value="0" />
</label>
<label>
<span>Max</span>
<input id="label-scale-max" type="number" step="0.01" value="1" />
</label>
</div>
<label class="field">
<span class="field-label">Background color</span>
<input id="background-color" type="color" value="#05080f" />
</label>
<label class="field">
<span class="field-label">Grid color</span>
<input id="grid-color" type="color" value="#b4ccff" />
</label>
<label class="field">
<span class="field-label">Grid spacing (m)</span>
<input id="grid-spacing" type="number" step="0.01" min="0" value="1" />
</label>
</section>
</section>
</div>
</div>
<div class="camera-controls">
<div class="camera-section">
<h3>Camera Mode</h3>
<div class="camera-buttons">
<button type="button" class="camera-button active" data-camera-mode="perspective">Perspective</button>
<button type="button" class="camera-button" data-camera-mode="orthographic">Orthographic</button>
</div>
</div>
<div class="camera-section">
<h3>Views</h3>
<div class="camera-buttons">
<button type="button" class="camera-button active" data-camera-view="free">Free</button>
<button type="button" class="camera-button" data-camera-view="top">Top</button>
<button type="button" class="camera-button" data-camera-view="north">Front</button>
<button type="button" class="camera-button" data-camera-view="east">Side</button>
</div>
</div>
</div>
<footer class="site-footer">
Paleograph - MIT License -
<a href="https://github.com/DFin/palaeograph" target="_blank" rel="noopener noreferrer"
>github.com/DFin/palaeograph</a
>
</footer>
</body>
</html>