baselode 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,86 +1,121 @@
|
|
|
1
1
|
import * as f from "three";
|
|
2
|
-
import { OrbitControls as
|
|
3
|
-
import { FlyControls as
|
|
4
|
-
import { ViewportGizmo as
|
|
5
|
-
import { EffectComposer as
|
|
6
|
-
import { RenderPass as
|
|
7
|
-
import { OutlinePass as
|
|
8
|
-
import
|
|
9
|
-
const H = "hole_id",
|
|
2
|
+
import { OrbitControls as it } from "three/examples/jsm/controls/OrbitControls";
|
|
3
|
+
import { FlyControls as st } from "three/examples/jsm/controls/FlyControls";
|
|
4
|
+
import { ViewportGizmo as at } from "three-viewport-gizmo";
|
|
5
|
+
import { EffectComposer as lt } from "three/examples/jsm/postprocessing/EffectComposer.js";
|
|
6
|
+
import { RenderPass as ct } from "three/examples/jsm/postprocessing/RenderPass.js";
|
|
7
|
+
import { OutlinePass as ut } from "three/examples/jsm/postprocessing/OutlinePass.js";
|
|
8
|
+
import mt from "papaparse";
|
|
9
|
+
const ar = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole_id", lr = "hole_type", cr = "max_depth", ur = "surface_sample_id", ft = "surface_sample_type", ht = "datasource_surface_sample_id", xe = "project_id", bt = "report_number", ue = "latitude", me = "longitude", de = "elevation", fe = "easting", he = "northing", be = "crs", mr = "date_start", dr = "date_end", W = "azimuth", K = "dip", fr = "survey_type", pt = "sample_id", hr = "datasource_sample_id", ne = "from", Q = "to", pe = "mid", ge = "depth", gt = "strike", Fe = "alpha", ve = "beta", Ce = "geology_code", Ie = "geology_description", yt = "comments", G = "extra", br = -999.25, pr = -999.25, gr = {
|
|
10
10
|
// A unique hole identifier across the entire dataset and all future data sets
|
|
11
11
|
[H]: "string",
|
|
12
12
|
// The hole ID from the original collar source
|
|
13
|
-
|
|
13
|
+
[we]: "string",
|
|
14
14
|
// The project ID or project code from the original collar source, if available
|
|
15
|
-
[
|
|
15
|
+
[xe]: "string",
|
|
16
16
|
// The latitude of the collar, in decimal degrees (WGS84)
|
|
17
|
-
[
|
|
17
|
+
[ue]: "number",
|
|
18
18
|
// The longitude of the collar, in decimal degrees (WGS84)
|
|
19
|
-
[
|
|
19
|
+
[me]: "number",
|
|
20
20
|
// The elevation of the collar, in meters above sea level (WGS84)
|
|
21
|
-
[
|
|
21
|
+
[de]: "number",
|
|
22
22
|
// The easting coordinate of the collar, in meters (projected CRS)
|
|
23
|
-
[
|
|
23
|
+
[fe]: "number",
|
|
24
24
|
// The northing coordinate of the collar, in meters (projected CRS)
|
|
25
|
-
[
|
|
26
|
-
// The coordinate reference system of the collar coordinates for easting/northing,
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
[he]: "number",
|
|
26
|
+
// The coordinate reference system of the collar coordinates for easting/northing,
|
|
27
|
+
// as an EPSG code or proj string
|
|
28
|
+
[be]: "string",
|
|
29
|
+
// Internal join key used by source schemas (e.g. raw_gswa) — distinct from
|
|
30
|
+
// the public hole_id.
|
|
31
|
+
[dt]: "string",
|
|
32
|
+
// Per-row dict of source-specific fields outside the canonical schema
|
|
33
|
+
// (populated by `bundleExtras`; empty object when the source had nothing extra).
|
|
34
|
+
[G]: "object"
|
|
35
|
+
}, yr = {
|
|
29
36
|
// The unique hole id that maps to the collar and any other data tables
|
|
30
37
|
[H]: "string",
|
|
31
38
|
// The depth along the hole where the survey measurement was taken / started
|
|
32
|
-
[
|
|
33
|
-
// The depth along the hole where the survey measurement ended, if applicable
|
|
34
|
-
|
|
39
|
+
[ge]: "number",
|
|
40
|
+
// The depth along the hole where the survey measurement ended, if applicable
|
|
41
|
+
// (some surveys are point measurements and may not have a 'to' depth)
|
|
42
|
+
[Q]: "number",
|
|
35
43
|
// The azimuth of the hole at the survey depth, in degrees from north
|
|
36
|
-
[
|
|
37
|
-
// The dip of the hole at the survey depth, in degrees from horizontal
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
[W]: "number",
|
|
45
|
+
// The dip of the hole at the survey depth, in degrees from horizontal
|
|
46
|
+
// (negative values indicate downward inclination)
|
|
47
|
+
[K]: "number",
|
|
48
|
+
// Per-row dict of source-specific fields outside the canonical schema.
|
|
49
|
+
[G]: "object"
|
|
50
|
+
}, _r = {
|
|
40
51
|
// The unique hole id that maps to the collar and any other data tables
|
|
41
52
|
[H]: "string",
|
|
42
53
|
// The depth along the hole where the assay interval starts
|
|
43
|
-
[
|
|
54
|
+
[ne]: "number",
|
|
44
55
|
// The depth along the hole where the assay interval ends
|
|
45
|
-
[
|
|
56
|
+
[Q]: "number",
|
|
46
57
|
// The midpoint depth of the assay interval
|
|
47
|
-
[
|
|
48
|
-
// assay value columns are variable and not standardized here.
|
|
49
|
-
// Assays may be flattened (one column per assay type) or long
|
|
50
|
-
|
|
58
|
+
[pe]: "number",
|
|
59
|
+
// assay value columns are variable and not standardized here.
|
|
60
|
+
// Assays may be flattened (one column per assay type) or long
|
|
61
|
+
// (one row per assay type with an additional 'assay_type' column).
|
|
62
|
+
// Per-row dict of source-specific fields outside the canonical schema
|
|
63
|
+
// (sample identifiers, lab metadata, detection-limit flags, etc.).
|
|
64
|
+
[G]: "object"
|
|
65
|
+
}, Mr = {
|
|
51
66
|
[H]: "string",
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
|
|
67
|
+
[ne]: "number",
|
|
68
|
+
[Q]: "number",
|
|
69
|
+
[pe]: "number",
|
|
70
|
+
[Ce]: "string",
|
|
71
|
+
[Ie]: "string",
|
|
72
|
+
// Per-row dict of source-specific fields outside the canonical schema.
|
|
73
|
+
[G]: "object"
|
|
74
|
+
}, Er = {
|
|
58
75
|
[H]: "string",
|
|
59
|
-
[
|
|
76
|
+
[ge]: "number",
|
|
77
|
+
[K]: "number",
|
|
60
78
|
[W]: "number",
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
|
|
65
|
-
|
|
79
|
+
[Fe]: "number",
|
|
80
|
+
[ve]: "number",
|
|
81
|
+
[yt]: "string",
|
|
82
|
+
// Per-row dict of source-specific fields outside the canonical schema.
|
|
83
|
+
[G]: "object"
|
|
84
|
+
}, zr = {
|
|
66
85
|
[H]: "string",
|
|
67
|
-
[
|
|
68
|
-
[
|
|
69
|
-
[
|
|
86
|
+
[ne]: "number",
|
|
87
|
+
[Q]: "number",
|
|
88
|
+
[pe]: "number",
|
|
70
89
|
// value columns are variable — not standardized here
|
|
71
|
-
|
|
90
|
+
// Per-row dict of source-specific fields outside the canonical schema.
|
|
91
|
+
[G]: "object"
|
|
92
|
+
}, Nr = {
|
|
93
|
+
[pt]: "string",
|
|
94
|
+
[ht]: "string",
|
|
95
|
+
[bt]: "string",
|
|
96
|
+
[ue]: "number",
|
|
97
|
+
[me]: "number",
|
|
98
|
+
[de]: "number",
|
|
99
|
+
[fe]: "number",
|
|
100
|
+
[he]: "number",
|
|
101
|
+
[be]: "string",
|
|
102
|
+
[ft]: "string",
|
|
103
|
+
// Per-row dict of source-specific fields outside the canonical schema
|
|
104
|
+
// (analyte values, lab metadata, detection-limit flags, anumber, ...).
|
|
105
|
+
[G]: "object"
|
|
106
|
+
}, _t = {
|
|
72
107
|
[H]: ["hole_id", "holeid", "hole id", "hole-id"],
|
|
73
|
-
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
81
|
-
[
|
|
82
|
-
[
|
|
83
|
-
[
|
|
108
|
+
[we]: ["datasource_hole_id", "datasourceholeid", "datasource hole id", "datasource-hole-id", "company_hole_id", "companyholeid", "company hole id", "company-hole-id"],
|
|
109
|
+
[xe]: ["project_id", "projectid", "project id", "project-id", "project_code", "projectcode", "project code", "project-code", "companyId", "company_id", "companyid", "company id", "company-id", "dataset", "project"],
|
|
110
|
+
[ue]: ["latitude", "lat"],
|
|
111
|
+
[me]: ["longitude", "lon"],
|
|
112
|
+
[de]: ["elevation", "rl", "elev", "z"],
|
|
113
|
+
[fe]: ["easting", "x"],
|
|
114
|
+
[he]: ["northing", "y"],
|
|
115
|
+
[be]: ["crs", "epsg", "projection"],
|
|
116
|
+
[ne]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
|
|
117
|
+
[Q]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
|
|
118
|
+
[Ce]: [
|
|
84
119
|
"geology_code",
|
|
85
120
|
"geologycode",
|
|
86
121
|
"lith1",
|
|
@@ -90,7 +125,7 @@ const H = "hole_id", Ne = "latitude", ke = "longitude", Oe = "elevation", Z = "a
|
|
|
90
125
|
"plot_lithology",
|
|
91
126
|
"rock1"
|
|
92
127
|
],
|
|
93
|
-
[
|
|
128
|
+
[Ie]: [
|
|
94
129
|
"geology_description",
|
|
95
130
|
"geologydescription",
|
|
96
131
|
"geology_comment",
|
|
@@ -101,57 +136,57 @@ const H = "hole_id", Ne = "latitude", ke = "longitude", Oe = "elevation", Z = "a
|
|
|
101
136
|
"description",
|
|
102
137
|
"comments"
|
|
103
138
|
],
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[
|
|
139
|
+
[W]: ["azimuth", "az", "dip_direction", "dipdir", "dip direction", "dipdrn", "dipdirection", "dip_dir", "computed_plane_azimuth", "calc_dipdir", "calc_dipdir_deg", "dipdir_calc", "dipdirect_calc"],
|
|
140
|
+
[K]: ["dip", "computed_plane_dip", "calc_dip", "calc_dip_deg", "dip_calc"],
|
|
141
|
+
[Fe]: ["alpha", "alpha_angle", "alpha_angle_deg", "alpha_2"],
|
|
142
|
+
[ve]: ["beta", "beta_angle", "beta_angle_deg", "beta_2"],
|
|
108
143
|
declination: ["declination", "dec"],
|
|
109
|
-
[
|
|
110
|
-
[
|
|
111
|
-
},
|
|
112
|
-
for (const [e, t] of Object.entries(
|
|
144
|
+
[ge]: ["depth", "survey_depth", "surveydepth", "md", "measured_depth", "dept"],
|
|
145
|
+
[gt]: ["strike", "str"]
|
|
146
|
+
}, Mt = {};
|
|
147
|
+
for (const [e, t] of Object.entries(_t))
|
|
113
148
|
for (const n of t) {
|
|
114
149
|
const r = n.toLowerCase().trim();
|
|
115
|
-
|
|
150
|
+
Mt[r] = e;
|
|
116
151
|
}
|
|
117
|
-
const
|
|
118
|
-
function
|
|
152
|
+
const ie = "[baselode:data]";
|
|
153
|
+
function Et(e, t = "Unknown error") {
|
|
119
154
|
if (e instanceof Error) return e;
|
|
120
155
|
const n = typeof e == "string" && e.trim() ? e : t;
|
|
121
156
|
return new Error(n);
|
|
122
157
|
}
|
|
123
|
-
function
|
|
124
|
-
const r =
|
|
158
|
+
function se(e, t, n = "Operation failed") {
|
|
159
|
+
const r = Et(t, n), o = new Error(`${e}: ${r.message}`);
|
|
125
160
|
return o.cause = r, o;
|
|
126
161
|
}
|
|
127
|
-
function
|
|
162
|
+
function Or(e, t) {
|
|
128
163
|
if (t !== void 0) {
|
|
129
|
-
console.warn(`${
|
|
164
|
+
console.warn(`${ie} ${e}`, t);
|
|
130
165
|
return;
|
|
131
166
|
}
|
|
132
|
-
console.warn(`${
|
|
167
|
+
console.warn(`${ie} ${e}`);
|
|
133
168
|
}
|
|
134
|
-
function
|
|
135
|
-
console.info(`${
|
|
169
|
+
function kr(e) {
|
|
170
|
+
console.info(`${ie} ${e}`);
|
|
136
171
|
}
|
|
137
|
-
const
|
|
138
|
-
[
|
|
172
|
+
const J = "numeric", ae = "categorical", le = "comment", ee = "hidden", zt = "tadpole", ze = {
|
|
173
|
+
[J]: [
|
|
139
174
|
{ value: "bar", label: "Bars" },
|
|
140
175
|
{ value: "markers", label: "Markers" },
|
|
141
176
|
{ value: "markers+line", label: "Markers + Line" },
|
|
142
177
|
{ value: "line", label: "Line only" }
|
|
143
178
|
],
|
|
144
|
-
[
|
|
179
|
+
[ae]: [
|
|
145
180
|
{ value: "categorical", label: "Categorical bands" }
|
|
146
181
|
],
|
|
147
|
-
[
|
|
182
|
+
[le]: [
|
|
148
183
|
{ value: "comment", label: "Comments" }
|
|
149
184
|
],
|
|
150
|
-
[
|
|
185
|
+
[zt]: [
|
|
151
186
|
{ value: "tadpole", label: "Tadpole" }
|
|
152
187
|
],
|
|
153
|
-
[
|
|
154
|
-
},
|
|
188
|
+
[ee]: []
|
|
189
|
+
}, Ne = /* @__PURE__ */ new Set([
|
|
155
190
|
// Hole identifiers
|
|
156
191
|
"hole_id",
|
|
157
192
|
"holeid",
|
|
@@ -206,7 +241,7 @@ const K = "numeric", se = "categorical", ae = "comment", Q = "hidden", ht = "tad
|
|
|
206
241
|
"data_source",
|
|
207
242
|
"_hole_key",
|
|
208
243
|
"_hole_id_key"
|
|
209
|
-
]),
|
|
244
|
+
]), Nt = /* @__PURE__ */ new Set([
|
|
210
245
|
"comments",
|
|
211
246
|
"comment",
|
|
212
247
|
"notes",
|
|
@@ -219,22 +254,22 @@ const K = "numeric", se = "categorical", ae = "comment", Q = "hidden", ht = "tad
|
|
|
219
254
|
"structcomment",
|
|
220
255
|
"geology_description"
|
|
221
256
|
]);
|
|
222
|
-
function
|
|
257
|
+
function Ar(e) {
|
|
223
258
|
if (!(e != null && e.length))
|
|
224
259
|
return { byType: {}, numericCols: [], categoricalCols: [], commentCols: [] };
|
|
225
260
|
const t = new Set(e.flatMap((r) => Object.keys(r || {}))), n = {};
|
|
226
261
|
for (const r of t) {
|
|
227
262
|
const o = r.toLowerCase().trim();
|
|
228
|
-
if (
|
|
229
|
-
n[r] =
|
|
263
|
+
if (Ne.has(o) || Ne.has(r)) {
|
|
264
|
+
n[r] = ee;
|
|
230
265
|
continue;
|
|
231
266
|
}
|
|
232
|
-
if (
|
|
267
|
+
if (Nt.has(o)) {
|
|
233
268
|
const c = e.some((l) => {
|
|
234
269
|
const s = l[r];
|
|
235
270
|
return s != null && String(s).trim() !== "" && String(s) !== "null";
|
|
236
271
|
});
|
|
237
|
-
n[r] = c ?
|
|
272
|
+
n[r] = c ? le : ee;
|
|
238
273
|
continue;
|
|
239
274
|
}
|
|
240
275
|
let i = !1, a = !1;
|
|
@@ -245,73 +280,73 @@ function lr(e) {
|
|
|
245
280
|
break;
|
|
246
281
|
}
|
|
247
282
|
}
|
|
248
|
-
a ? i ? n[r] =
|
|
283
|
+
a ? i ? n[r] = J : n[r] = ae : n[r] = ee;
|
|
249
284
|
}
|
|
250
285
|
return {
|
|
251
286
|
byType: n,
|
|
252
|
-
numericCols: Object.entries(n).filter(([, r]) => r ===
|
|
253
|
-
categoricalCols: Object.entries(n).filter(([, r]) => r ===
|
|
254
|
-
commentCols: Object.entries(n).filter(([, r]) => r ===
|
|
287
|
+
numericCols: Object.entries(n).filter(([, r]) => r === J).map(([r]) => r),
|
|
288
|
+
categoricalCols: Object.entries(n).filter(([, r]) => r === ae).map(([r]) => r),
|
|
289
|
+
commentCols: Object.entries(n).filter(([, r]) => r === le).map(([r]) => r)
|
|
255
290
|
};
|
|
256
291
|
}
|
|
257
|
-
function
|
|
258
|
-
return
|
|
292
|
+
function Ot(e) {
|
|
293
|
+
return ze[e] ?? ze[J];
|
|
259
294
|
}
|
|
260
|
-
function
|
|
261
|
-
const t =
|
|
262
|
-
return t.length ? e ===
|
|
295
|
+
function Lr(e) {
|
|
296
|
+
const t = Ot(e);
|
|
297
|
+
return t.length ? e === J ? "line" : t[0].value : "markers+line";
|
|
263
298
|
}
|
|
264
|
-
const
|
|
299
|
+
const Te = ["x", "y", "z", "dx", "dy", "dz"], kt = {
|
|
265
300
|
x: ["x", "easting", "center_x", "xc", "xcentre", "xcenter", "x_centre", "x_center", "cx"],
|
|
266
301
|
y: ["y", "northing", "center_y", "yc", "ycentre", "ycenter", "y_centre", "y_center", "cy"],
|
|
267
302
|
z: ["z", "elevation", "center_z", "zc", "zcentre", "zcenter", "z_centre", "z_center", "cz"],
|
|
268
303
|
dx: ["dx", "size_x", "sx", "sizex", "dim_x", "block_size_x"],
|
|
269
304
|
dy: ["dy", "size_y", "sy", "sizey", "dim_y", "block_size_y"],
|
|
270
305
|
dz: ["dz", "size_z", "sz", "sizez", "dim_z", "block_size_z"]
|
|
271
|
-
},
|
|
272
|
-
Object.entries(
|
|
306
|
+
}, Be = {};
|
|
307
|
+
Object.entries(kt).forEach(([e, t]) => {
|
|
273
308
|
t.forEach((n) => {
|
|
274
|
-
|
|
309
|
+
Be[n.toLowerCase()] = e;
|
|
275
310
|
});
|
|
276
311
|
});
|
|
277
|
-
function
|
|
312
|
+
function At(e) {
|
|
278
313
|
const t = {};
|
|
279
314
|
return Object.entries(e).forEach(([n, r]) => {
|
|
280
|
-
const o =
|
|
315
|
+
const o = Be[n.toLowerCase().trim()] || n;
|
|
281
316
|
t[o] = r;
|
|
282
317
|
}), t;
|
|
283
318
|
}
|
|
284
|
-
function
|
|
319
|
+
function Dr(e) {
|
|
285
320
|
return new Promise((t, n) => {
|
|
286
|
-
|
|
321
|
+
mt.parse(e, {
|
|
287
322
|
header: !0,
|
|
288
323
|
dynamicTyping: !0,
|
|
289
324
|
skipEmptyLines: !0,
|
|
290
325
|
complete: (r) => {
|
|
291
|
-
const i = (r.data || []).map(
|
|
326
|
+
const i = (r.data || []).map(At).filter(
|
|
292
327
|
(c) => c.x !== null && c.y !== null && c.z !== null
|
|
293
328
|
), a = Object.keys(i[0] || {}).filter(
|
|
294
|
-
(c) => !
|
|
329
|
+
(c) => !Te.includes(c)
|
|
295
330
|
);
|
|
296
331
|
t({ data: i, properties: a });
|
|
297
332
|
},
|
|
298
333
|
error: (r) => {
|
|
299
|
-
n(
|
|
334
|
+
n(se("parseBlockModelCSV", r));
|
|
300
335
|
}
|
|
301
336
|
});
|
|
302
337
|
});
|
|
303
338
|
}
|
|
304
|
-
function
|
|
339
|
+
function Sr(e) {
|
|
305
340
|
if (typeof e == "string")
|
|
306
341
|
try {
|
|
307
342
|
return JSON.parse(e);
|
|
308
343
|
} catch (t) {
|
|
309
|
-
throw
|
|
344
|
+
throw se("loadBlockModelMetadata", t);
|
|
310
345
|
}
|
|
311
346
|
if (e && typeof e == "object") return e;
|
|
312
|
-
throw
|
|
347
|
+
throw se("loadBlockModelMetadata", new Error("Invalid metadata source"));
|
|
313
348
|
}
|
|
314
|
-
function
|
|
349
|
+
function Lt(e, t) {
|
|
315
350
|
const n = e.map((i) => i[t]).filter((i) => i != null);
|
|
316
351
|
if (n.length > 0 && n.every((i) => typeof i == "number")) {
|
|
317
352
|
const i = Math.min(...n), a = Math.max(...n);
|
|
@@ -319,16 +354,16 @@ function _t(e, t) {
|
|
|
319
354
|
}
|
|
320
355
|
return { type: "categorical", categories: [...new Set(n)], values: n };
|
|
321
356
|
}
|
|
322
|
-
function
|
|
357
|
+
function wr(e) {
|
|
323
358
|
if (!e || e.length === 0) return {};
|
|
324
359
|
const t = Object.keys(e[0]).filter(
|
|
325
|
-
(r) => !
|
|
360
|
+
(r) => !Te.includes(r)
|
|
326
361
|
), n = {};
|
|
327
362
|
return t.forEach((r) => {
|
|
328
|
-
n[r] =
|
|
363
|
+
n[r] = Lt(e, r);
|
|
329
364
|
}), n;
|
|
330
365
|
}
|
|
331
|
-
function
|
|
366
|
+
function Dt(e, t) {
|
|
332
367
|
return !t || typeof t != "object" ? e : e.filter(
|
|
333
368
|
(n) => Object.entries(t).every(([r, o]) => {
|
|
334
369
|
const i = n[r];
|
|
@@ -336,13 +371,13 @@ function Mt(e, t) {
|
|
|
336
371
|
})
|
|
337
372
|
);
|
|
338
373
|
}
|
|
339
|
-
function
|
|
340
|
-
return (t ?
|
|
374
|
+
function xr(e, t = null) {
|
|
375
|
+
return (t ? Dt(e, t) : e).reduce((r, o) => {
|
|
341
376
|
const i = Number(o.dx) || 0, a = Number(o.dy) || 0, c = Number(o.dz) || 0;
|
|
342
377
|
return r + i * a * c;
|
|
343
378
|
}, 0);
|
|
344
379
|
}
|
|
345
|
-
function
|
|
380
|
+
function St(e, t, n) {
|
|
346
381
|
if (!t) return new n.Color("#888888");
|
|
347
382
|
if (t.type === "numeric") {
|
|
348
383
|
const i = t.max - t.min, c = (1 - (i === 0 ? 0.5 : (e - t.min) / i)) * 240;
|
|
@@ -351,7 +386,7 @@ function zt(e, t, n) {
|
|
|
351
386
|
const o = t.categories.indexOf(e) / Math.max(t.categories.length, 1) * 360;
|
|
352
387
|
return new n.Color().setHSL(o / 360, 0.7, 0.5);
|
|
353
388
|
}
|
|
354
|
-
function
|
|
389
|
+
function wt(e, t) {
|
|
355
390
|
if (!e || e.length === 0 || !Number.isFinite(t)) return null;
|
|
356
391
|
const n = e.length;
|
|
357
392
|
if (n === 1) {
|
|
@@ -360,8 +395,8 @@ function Et(e, t) {
|
|
|
360
395
|
}
|
|
361
396
|
let r = -1;
|
|
362
397
|
for (let b = 0; b < n - 1; b++) {
|
|
363
|
-
const
|
|
364
|
-
if (t >=
|
|
398
|
+
const A = Number(e[b].md), y = Number(e[b + 1].md);
|
|
399
|
+
if (t >= A && t <= y) {
|
|
365
400
|
r = b;
|
|
366
401
|
break;
|
|
367
402
|
}
|
|
@@ -377,44 +412,44 @@ function Et(e, t) {
|
|
|
377
412
|
a = y > 0 ? (t - b) / y : 0;
|
|
378
413
|
}
|
|
379
414
|
const c = Number(o.x) + a * (Number(i.x) - Number(o.x)), l = Number(o.y) + a * (Number(i.y) - Number(o.y)), s = Number(o.z) + a * (Number(i.z) - Number(o.z));
|
|
380
|
-
let u,
|
|
381
|
-
const h = Number(o.azimuth), d = Number(o.dip),
|
|
415
|
+
let u, p, m;
|
|
416
|
+
const h = Number(o.azimuth), d = Number(o.dip), g = Number(i.azimuth), N = Number(i.dip);
|
|
382
417
|
if (Number.isFinite(h) && Number.isFinite(d)) {
|
|
383
|
-
const b = Number.isFinite(
|
|
384
|
-
u = Math.cos(
|
|
418
|
+
const b = Number.isFinite(g) && Number.isFinite(N) ? h + a * (g - h) : h, A = Number.isFinite(g) && Number.isFinite(N) ? d + a * (N - d) : d, y = b * Math.PI / 180, E = A * Math.PI / 180;
|
|
419
|
+
u = Math.cos(E) * Math.sin(y), p = Math.cos(E) * Math.cos(y), m = -Math.sin(E);
|
|
385
420
|
} else {
|
|
386
|
-
const b = Number(i.x) - Number(o.x),
|
|
387
|
-
if (
|
|
388
|
-
u = b /
|
|
421
|
+
const b = Number(i.x) - Number(o.x), A = Number(i.y) - Number(o.y), y = Number(i.z) - Number(o.z), E = Math.sqrt(b * b + A * A + y * y);
|
|
422
|
+
if (E < 1e-10) return { x: c, y: l, z: s, dx: 0, dy: 0, dz: -1 };
|
|
423
|
+
u = b / E, p = A / E, m = y / E;
|
|
389
424
|
}
|
|
390
|
-
const
|
|
391
|
-
return
|
|
425
|
+
const O = Math.sqrt(u * u + p * p + m * m);
|
|
426
|
+
return O < 1e-10 ? { x: c, y: l, z: s, dx: 0, dy: 0, dz: -1 } : { x: c, y: l, z: s, dx: u / O, dy: p / O, dz: m / O };
|
|
392
427
|
}
|
|
393
|
-
function
|
|
428
|
+
function xt(e, t, n, r = {}) {
|
|
394
429
|
const { betaZeroAxis: o = "B", betaHandedness: i = 1 } = r, { dx: a, dy: c, dz: l } = n, s = [a, c, l];
|
|
395
430
|
let u = [0, 0, 1];
|
|
396
|
-
const
|
|
397
|
-
Math.abs(
|
|
431
|
+
const p = s[0] * u[0] + s[1] * u[1] + s[2] * u[2];
|
|
432
|
+
Math.abs(p) > 0.99 && (u = [0, 1, 0]);
|
|
398
433
|
const m = [
|
|
399
434
|
u[1] * s[2] - u[2] * s[1],
|
|
400
435
|
u[2] * s[0] - u[0] * s[2],
|
|
401
436
|
u[0] * s[1] - u[1] * s[0]
|
|
402
|
-
], h = Math.sqrt(m[0] ** 2 + m[1] ** 2 + m[2] ** 2), d = h > 1e-10 ? [m[0] / h, m[1] / h, m[2] / h] : [1, 0, 0],
|
|
437
|
+
], h = Math.sqrt(m[0] ** 2 + m[1] ** 2 + m[2] ** 2), d = h > 1e-10 ? [m[0] / h, m[1] / h, m[2] / h] : [1, 0, 0], g = [
|
|
403
438
|
s[1] * d[2] - s[2] * d[1],
|
|
404
439
|
s[2] * d[0] - s[0] * d[2],
|
|
405
440
|
s[0] * d[1] - s[1] * d[0]
|
|
406
|
-
], N = Math.sqrt(
|
|
441
|
+
], N = Math.sqrt(g[0] ** 2 + g[1] ** 2 + g[2] ** 2), O = N > 1e-10 ? [g[0] / N, g[1] / N, g[2] / N] : [0, 1, 0], b = o === "R" ? d : O, A = t * Math.PI / 180 * i, y = Math.cos(A), E = Math.sin(A), k = b[0] * s[0] + b[1] * s[1] + b[2] * s[2], D = [
|
|
407
442
|
s[1] * b[2] - s[2] * b[1],
|
|
408
443
|
s[2] * b[0] - s[0] * b[2],
|
|
409
444
|
s[0] * b[1] - s[1] * b[0]
|
|
410
|
-
],
|
|
411
|
-
b[0] * y +
|
|
412
|
-
b[1] * y +
|
|
413
|
-
b[2] * y +
|
|
414
|
-
],
|
|
415
|
-
return
|
|
416
|
-
}
|
|
417
|
-
function
|
|
445
|
+
], w = [
|
|
446
|
+
b[0] * y + D[0] * E + s[0] * k * (1 - y),
|
|
447
|
+
b[1] * y + D[1] * E + s[1] * k * (1 - y),
|
|
448
|
+
b[2] * y + D[2] * E + s[2] * k * (1 - y)
|
|
449
|
+
], L = (90 - e) * Math.PI / 180, x = Math.cos(L), S = Math.sin(L), v = x * w[0] + S * s[0], I = x * w[1] + S * s[1], C = x * w[2] + S * s[2], B = Math.sqrt(v * v + I * I + C * C);
|
|
450
|
+
return B < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: v / B, ny: I / B, nz: C / B };
|
|
451
|
+
}
|
|
452
|
+
function Ft(e, t, n = {}) {
|
|
418
453
|
if (!(e != null && e.length) || !(t != null && t.length)) return [];
|
|
419
454
|
const r = /* @__PURE__ */ new Map();
|
|
420
455
|
for (const i of t) {
|
|
@@ -431,25 +466,25 @@ function kt(e, t, n = {}) {
|
|
|
431
466
|
if (!c || c.length === 0) continue;
|
|
432
467
|
const l = i.depth != null ? Number(i.depth) : i.mid != null ? Number(i.mid) : null;
|
|
433
468
|
if (!Number.isFinite(l)) continue;
|
|
434
|
-
const s =
|
|
469
|
+
const s = wt(c, l);
|
|
435
470
|
if (!s) continue;
|
|
436
|
-
const { x: u, y:
|
|
437
|
-
let N,
|
|
438
|
-
const
|
|
439
|
-
if (Number.isFinite(
|
|
440
|
-
const
|
|
441
|
-
N =
|
|
471
|
+
const { x: u, y: p, z: m, dx: h, dy: d, dz: g } = s;
|
|
472
|
+
let N, O, b;
|
|
473
|
+
const A = i.alpha != null ? Number(i.alpha) : null, y = i.beta != null ? Number(i.beta) : null;
|
|
474
|
+
if (Number.isFinite(A)) {
|
|
475
|
+
const E = Number.isFinite(y) ? y : 0, k = xt(A, E, { dx: h, dy: d, dz: g }, n);
|
|
476
|
+
N = k.nx, O = k.ny, b = k.nz;
|
|
442
477
|
} else {
|
|
443
|
-
const
|
|
444
|
-
if (!Number.isFinite(
|
|
445
|
-
const
|
|
446
|
-
N = Math.sin(
|
|
478
|
+
const E = i.dip != null ? Number(i.dip) : null, k = i.azimuth != null ? Number(i.azimuth) : null;
|
|
479
|
+
if (!Number.isFinite(E) || !Number.isFinite(k)) continue;
|
|
480
|
+
const D = E * Math.PI / 180, w = k * Math.PI / 180;
|
|
481
|
+
N = Math.sin(w) * Math.sin(D), O = Math.cos(w) * Math.sin(D), b = Math.cos(D);
|
|
447
482
|
}
|
|
448
|
-
o.push({ ...i, x: u, y:
|
|
483
|
+
o.push({ ...i, x: u, y: p, z: m, nx: N, ny: O, nz: b });
|
|
449
484
|
}
|
|
450
485
|
return o;
|
|
451
486
|
}
|
|
452
|
-
const
|
|
487
|
+
const vt = "baselode", Fr = vt, Ct = [
|
|
453
488
|
"#8b1e3f",
|
|
454
489
|
"#2563eb",
|
|
455
490
|
"#16a34a",
|
|
@@ -474,11 +509,11 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
474
509
|
muted_3: "#e2e8f0",
|
|
475
510
|
primary: "#8b1e3f",
|
|
476
511
|
primary_2: "#a8324f"
|
|
477
|
-
},
|
|
512
|
+
}, ye = {
|
|
478
513
|
layout: {
|
|
479
514
|
paper_bgcolor: M.bg,
|
|
480
515
|
plot_bgcolor: M.bg,
|
|
481
|
-
colorway:
|
|
516
|
+
colorway: Ct,
|
|
482
517
|
font: {
|
|
483
518
|
family: "Inter, system-ui, sans-serif",
|
|
484
519
|
size: 12,
|
|
@@ -605,7 +640,7 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
605
640
|
}
|
|
606
641
|
}]
|
|
607
642
|
}
|
|
608
|
-
},
|
|
643
|
+
}, vr = ye, _ = {
|
|
609
644
|
bg: "#1b1b1f",
|
|
610
645
|
panel: "#25252a",
|
|
611
646
|
ink: "#f0f0e4",
|
|
@@ -617,7 +652,7 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
617
652
|
muted_1: "#8a8a80",
|
|
618
653
|
muted_2: "#5e5e56",
|
|
619
654
|
muted_3: "#3a3a34"
|
|
620
|
-
},
|
|
655
|
+
}, Cr = "baselode-dark", Ir = {
|
|
621
656
|
layout: {
|
|
622
657
|
font: {
|
|
623
658
|
family: "Inter, Arial, sans-serif",
|
|
@@ -760,7 +795,7 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
760
795
|
}
|
|
761
796
|
}]
|
|
762
797
|
}
|
|
763
|
-
},
|
|
798
|
+
}, It = "#7f7f7f", te = {
|
|
764
799
|
Au: "#FFD700",
|
|
765
800
|
// gold
|
|
766
801
|
Ag: "#C0C0C0",
|
|
@@ -797,7 +832,7 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
797
832
|
// aluminium / yellow
|
|
798
833
|
U: "#8BC34A"
|
|
799
834
|
// uranium / lime green
|
|
800
|
-
},
|
|
835
|
+
}, Tt = {
|
|
801
836
|
// Sedimentary
|
|
802
837
|
shale: "#607D8B",
|
|
803
838
|
mudstone: "#78909C",
|
|
@@ -836,11 +871,11 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
836
871
|
calcite: "#F9FBE7",
|
|
837
872
|
vein: "#FFFFFF",
|
|
838
873
|
unknown: "#9E9E9E"
|
|
839
|
-
},
|
|
840
|
-
commodity:
|
|
841
|
-
lithology:
|
|
874
|
+
}, re = {
|
|
875
|
+
commodity: te,
|
|
876
|
+
lithology: Tt
|
|
842
877
|
};
|
|
843
|
-
function
|
|
878
|
+
function Bt(e, t, n = It) {
|
|
844
879
|
if (!t || e == null) return n;
|
|
845
880
|
const r = String(e).trim();
|
|
846
881
|
if (Object.prototype.hasOwnProperty.call(t, r)) return t[r];
|
|
@@ -849,13 +884,13 @@ function wt(e, t, n = Dt) {
|
|
|
849
884
|
if (String(i).trim().toLowerCase() === o) return a;
|
|
850
885
|
return n;
|
|
851
886
|
}
|
|
852
|
-
function
|
|
887
|
+
function Pt(e) {
|
|
853
888
|
if (e == null) return {};
|
|
854
889
|
if (typeof e == "string") {
|
|
855
890
|
const t = e.trim().toLowerCase();
|
|
856
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
857
|
-
return
|
|
858
|
-
const n = Object.keys(
|
|
891
|
+
if (Object.prototype.hasOwnProperty.call(re, t))
|
|
892
|
+
return re[t];
|
|
893
|
+
const n = Object.keys(re).sort().join(", ");
|
|
859
894
|
throw new RangeError(
|
|
860
895
|
`Unknown built-in colour map '${e}'. Available maps: ${n}`
|
|
861
896
|
);
|
|
@@ -865,39 +900,39 @@ function xt(e) {
|
|
|
865
900
|
`colourMap must be null, a string, or a plain object; got ${Array.isArray(e) ? "Array" : Object.prototype.toString.call(e)}`
|
|
866
901
|
);
|
|
867
902
|
}
|
|
868
|
-
const
|
|
869
|
-
function
|
|
903
|
+
const Rt = "#8b1e3f", Vt = "#a8324f";
|
|
904
|
+
function Ht(e) {
|
|
870
905
|
if (!e) return null;
|
|
871
906
|
const t = e.split(/[_\-/\s]+/);
|
|
872
907
|
for (const n of t) {
|
|
873
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
874
|
-
return
|
|
908
|
+
if (Object.prototype.hasOwnProperty.call(te, n))
|
|
909
|
+
return te[n];
|
|
875
910
|
const r = n.toLowerCase();
|
|
876
|
-
for (const [o, i] of Object.entries(
|
|
911
|
+
for (const [o, i] of Object.entries(te))
|
|
877
912
|
if (o.toLowerCase() === r) return i;
|
|
878
913
|
}
|
|
879
914
|
return null;
|
|
880
915
|
}
|
|
881
|
-
const
|
|
882
|
-
function
|
|
916
|
+
const Gt = "#6b7280", jt = { l: 42, r: 4, t: 4, b: 30 }, Oe = 10, ke = 12;
|
|
917
|
+
function Ae(e) {
|
|
883
918
|
return e ? typeof e == "string" ? { text: e } : e : {};
|
|
884
919
|
}
|
|
885
|
-
function
|
|
886
|
-
const t =
|
|
920
|
+
function Pe(e = {}) {
|
|
921
|
+
const t = Ae(e.xaxis && e.xaxis.title), n = Ae(e.yaxis && e.yaxis.title);
|
|
887
922
|
return {
|
|
888
923
|
...e,
|
|
889
|
-
margin:
|
|
924
|
+
margin: jt,
|
|
890
925
|
autosize: !0,
|
|
891
926
|
width: void 0,
|
|
892
927
|
xaxis: {
|
|
893
928
|
...e.xaxis || {},
|
|
894
929
|
tickfont: {
|
|
895
930
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
896
|
-
size:
|
|
931
|
+
size: Oe
|
|
897
932
|
},
|
|
898
933
|
title: {
|
|
899
934
|
...t,
|
|
900
|
-
font: { ...t.font || {}, size:
|
|
935
|
+
font: { ...t.font || {}, size: ke }
|
|
901
936
|
}
|
|
902
937
|
},
|
|
903
938
|
yaxis: {
|
|
@@ -905,16 +940,16 @@ function Be(e = {}) {
|
|
|
905
940
|
automargin: !0,
|
|
906
941
|
tickfont: {
|
|
907
942
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
908
|
-
size:
|
|
943
|
+
size: Oe
|
|
909
944
|
},
|
|
910
945
|
title: {
|
|
911
946
|
...n,
|
|
912
|
-
font: { ...n.font || {}, size:
|
|
947
|
+
font: { ...n.font || {}, size: ke }
|
|
913
948
|
}
|
|
914
949
|
}
|
|
915
950
|
};
|
|
916
951
|
}
|
|
917
|
-
function
|
|
952
|
+
function Tr(e, t) {
|
|
918
953
|
var r;
|
|
919
954
|
if (!e || !t) return !1;
|
|
920
955
|
const n = e.points || [];
|
|
@@ -925,7 +960,7 @@ function yr(e, t) {
|
|
|
925
960
|
}
|
|
926
961
|
return !1;
|
|
927
962
|
}
|
|
928
|
-
function
|
|
963
|
+
function Br(e, t, n) {
|
|
929
964
|
if (!e || !t) return [];
|
|
930
965
|
const r = (e == null ? void 0 : e.points) || [], o = [], i = /* @__PURE__ */ new Set();
|
|
931
966
|
return r.forEach((a) => {
|
|
@@ -943,22 +978,22 @@ function _r(e, t, n) {
|
|
|
943
978
|
const u = `${t}:${c}-${l}:${String(s)}`;
|
|
944
979
|
if (i.has(u)) return;
|
|
945
980
|
i.add(u);
|
|
946
|
-
const
|
|
981
|
+
const p = (c + l) / 2, m = n ? s : Number(s);
|
|
947
982
|
!n && !Number.isFinite(m) || o.push({
|
|
948
|
-
z:
|
|
983
|
+
z: p,
|
|
949
984
|
val: m,
|
|
950
985
|
from: c,
|
|
951
986
|
to: l,
|
|
952
|
-
errorPlus: l -
|
|
953
|
-
errorMinus:
|
|
987
|
+
errorPlus: l - p,
|
|
988
|
+
errorMinus: p - c
|
|
954
989
|
});
|
|
955
990
|
}), o.sort((a, c) => c.z - a.z);
|
|
956
991
|
}
|
|
957
|
-
function
|
|
992
|
+
function Ut(e, t, n, r) {
|
|
958
993
|
if (!e.length) return { data: [], layout: {} };
|
|
959
994
|
const o = e.filter((m) => Number.isFinite(m == null ? void 0 : m.from) && Number.isFinite(m == null ? void 0 : m.to) && m.to > m.from).map((m) => ({ ...m, category: `${(m == null ? void 0 : m.val) ?? ""}`.trim() })).filter((m) => m.category !== "" && !/^(nan|null|none)$/i.test(m.category)).sort((m, h) => m.from - h.from || m.to - h.to);
|
|
960
995
|
if (!o.length) return { data: [], layout: {} };
|
|
961
|
-
const i =
|
|
996
|
+
const i = Pt(n), a = [
|
|
962
997
|
"#1f77b4",
|
|
963
998
|
// blue
|
|
964
999
|
"#ff7f0e",
|
|
@@ -990,7 +1025,7 @@ function Bt(e, t, n, r) {
|
|
|
990
1025
|
], c = [...new Set(o.map((m) => m.category))];
|
|
991
1026
|
function l(m, h) {
|
|
992
1027
|
if (i && Object.keys(i).length > 0) {
|
|
993
|
-
const d =
|
|
1028
|
+
const d = Bt(m, i, null);
|
|
994
1029
|
if (d !== null) return d;
|
|
995
1030
|
}
|
|
996
1031
|
return a[h % a.length];
|
|
@@ -1012,61 +1047,61 @@ function Bt(e, t, n, r) {
|
|
|
1012
1047
|
customdata: h.map((d) => [d.from, d.to]),
|
|
1013
1048
|
hovertemplate: `${t}: ${m}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`
|
|
1014
1049
|
};
|
|
1015
|
-
}), layout:
|
|
1050
|
+
}), layout: Pe({
|
|
1016
1051
|
barmode: "overlay",
|
|
1017
1052
|
bargap: 0,
|
|
1018
1053
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1019
1054
|
yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
|
|
1020
1055
|
showlegend: !1,
|
|
1021
1056
|
title: t || void 0,
|
|
1022
|
-
template: r !== void 0 ? r :
|
|
1057
|
+
template: r !== void 0 ? r : ye
|
|
1023
1058
|
}) };
|
|
1024
1059
|
}
|
|
1025
|
-
function
|
|
1060
|
+
function Yt(e, t, n, r, o) {
|
|
1026
1061
|
if (!e.length) return { data: [], layout: {} };
|
|
1027
|
-
const i = n === "bar", a = n === "markers", c = n === "line", l = r ||
|
|
1062
|
+
const i = n === "bar", a = n === "markers", c = n === "line", l = r || Rt, s = r || Vt, u = {
|
|
1028
1063
|
x: e.map((d) => d.val),
|
|
1029
1064
|
y: e.map((d) => d.z),
|
|
1030
1065
|
hovertemplate: `${t}: %{x}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`,
|
|
1031
1066
|
customdata: e.map((d) => [Math.min(d.from, d.to), Math.max(d.from, d.to)])
|
|
1032
|
-
},
|
|
1067
|
+
}, p = {
|
|
1033
1068
|
type: "data",
|
|
1034
1069
|
symmetric: !1,
|
|
1035
1070
|
array: e.map((d) => d.errorPlus),
|
|
1036
1071
|
arrayminus: e.map((d) => d.errorMinus),
|
|
1037
1072
|
thickness: 1.5,
|
|
1038
1073
|
width: 2,
|
|
1039
|
-
color:
|
|
1074
|
+
color: Gt
|
|
1040
1075
|
};
|
|
1041
1076
|
return { data: [i ? {
|
|
1042
1077
|
...u,
|
|
1043
1078
|
type: "bar",
|
|
1044
1079
|
orientation: "h",
|
|
1045
1080
|
marker: { color: l },
|
|
1046
|
-
error_y:
|
|
1081
|
+
error_y: p
|
|
1047
1082
|
} : {
|
|
1048
1083
|
...u,
|
|
1049
1084
|
type: "scatter",
|
|
1050
1085
|
mode: a ? "markers" : c ? "lines" : "lines+markers",
|
|
1051
1086
|
line: { color: l, width: 2 },
|
|
1052
1087
|
marker: { size: 7, color: s },
|
|
1053
|
-
error_y: c ? void 0 :
|
|
1054
|
-
}], layout:
|
|
1088
|
+
error_y: c ? void 0 : p
|
|
1089
|
+
}], layout: Pe({
|
|
1055
1090
|
xaxis: { title: t, zeroline: !1 },
|
|
1056
1091
|
yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
|
|
1057
1092
|
barmode: "overlay",
|
|
1058
1093
|
showlegend: !1,
|
|
1059
|
-
template: o !== void 0 ? o :
|
|
1094
|
+
template: o !== void 0 ? o : ye
|
|
1060
1095
|
}) };
|
|
1061
1096
|
}
|
|
1062
|
-
function
|
|
1097
|
+
function $t({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
|
|
1063
1098
|
if (!e || !e.length || !n) return { data: [], layout: {} };
|
|
1064
1099
|
if (t || r === "categorical")
|
|
1065
|
-
return
|
|
1066
|
-
const a =
|
|
1067
|
-
return
|
|
1100
|
+
return Ut(e, n, o, i);
|
|
1101
|
+
const a = Ht(n);
|
|
1102
|
+
return Yt(e, n, r, a, i);
|
|
1068
1103
|
}
|
|
1069
|
-
function
|
|
1104
|
+
function Pr(e = [], {
|
|
1070
1105
|
fromCol: t = "from",
|
|
1071
1106
|
toCol: n = "to",
|
|
1072
1107
|
categoryCol: r = "geology_code",
|
|
@@ -1077,16 +1112,16 @@ function Mr(e = [], {
|
|
|
1077
1112
|
return e.forEach((c) => {
|
|
1078
1113
|
const l = Number(c == null ? void 0 : c[t]), s = Number(c == null ? void 0 : c[n]), u = c == null ? void 0 : c[r];
|
|
1079
1114
|
if (!Number.isFinite(l) || !Number.isFinite(s) || s <= l || u == null || `${u}`.trim() === "") return;
|
|
1080
|
-
const
|
|
1115
|
+
const p = (l + s) / 2;
|
|
1081
1116
|
a.push({
|
|
1082
|
-
z:
|
|
1117
|
+
z: p,
|
|
1083
1118
|
val: `${u}`,
|
|
1084
1119
|
from: l,
|
|
1085
1120
|
to: s,
|
|
1086
|
-
errorPlus: s -
|
|
1087
|
-
errorMinus:
|
|
1121
|
+
errorPlus: s - p,
|
|
1122
|
+
errorMinus: p - l
|
|
1088
1123
|
});
|
|
1089
|
-
}), a.sort((c, l) => l.z - c.z),
|
|
1124
|
+
}), a.sort((c, l) => l.z - c.z), $t({
|
|
1090
1125
|
points: a,
|
|
1091
1126
|
isCategorical: !0,
|
|
1092
1127
|
property: r,
|
|
@@ -1095,7 +1130,7 @@ function Mr(e = [], {
|
|
|
1095
1130
|
template: i
|
|
1096
1131
|
});
|
|
1097
1132
|
}
|
|
1098
|
-
const
|
|
1133
|
+
const Xt = [
|
|
1099
1134
|
"#313695",
|
|
1100
1135
|
"#4575b4",
|
|
1101
1136
|
"#74add1",
|
|
@@ -1107,7 +1142,7 @@ const Rt = [
|
|
|
1107
1142
|
"#d73027",
|
|
1108
1143
|
"#a50026"
|
|
1109
1144
|
];
|
|
1110
|
-
function
|
|
1145
|
+
function qt(e = [], t = Xt) {
|
|
1111
1146
|
const n = e.filter((s) => Number.isFinite(s));
|
|
1112
1147
|
if (!n.length)
|
|
1113
1148
|
return {
|
|
@@ -1119,8 +1154,8 @@ function Vt(e = [], t = Rt) {
|
|
|
1119
1154
|
};
|
|
1120
1155
|
const r = n.slice().sort((s, u) => s - u), o = r[0], i = r[r.length - 1], a = t.length;
|
|
1121
1156
|
if (i === o) {
|
|
1122
|
-
const s = t.map((u,
|
|
1123
|
-
index:
|
|
1157
|
+
const s = t.map((u, p) => ({
|
|
1158
|
+
index: p,
|
|
1124
1159
|
min: o,
|
|
1125
1160
|
max: i,
|
|
1126
1161
|
label: `${o}`
|
|
@@ -1134,12 +1169,12 @@ function Vt(e = [], t = Rt) {
|
|
|
1134
1169
|
};
|
|
1135
1170
|
}
|
|
1136
1171
|
const c = t.map((s, u) => {
|
|
1137
|
-
const
|
|
1172
|
+
const p = u / a, m = (u + 1) / a, h = Math.floor(p * r.length), d = Math.min(r.length - 1, Math.floor(m * r.length)), g = r[h], N = u === a - 1 ? i : r[d];
|
|
1138
1173
|
return {
|
|
1139
1174
|
index: u,
|
|
1140
|
-
min:
|
|
1175
|
+
min: g,
|
|
1141
1176
|
max: N,
|
|
1142
|
-
label:
|
|
1177
|
+
label: Zt(g, N)
|
|
1143
1178
|
};
|
|
1144
1179
|
}), l = (i - o) / a;
|
|
1145
1180
|
return {
|
|
@@ -1150,11 +1185,11 @@ function Vt(e = [], t = Rt) {
|
|
|
1150
1185
|
colors: t
|
|
1151
1186
|
};
|
|
1152
1187
|
}
|
|
1153
|
-
function
|
|
1188
|
+
function Zt(e, t) {
|
|
1154
1189
|
const n = (r) => Number.isFinite(r) ? Math.abs(r) >= 1e3 ? r.toFixed(0) : Math.abs(r) >= 10 ? r.toFixed(1) : Math.abs(r) >= 0.1 ? r.toFixed(2) : r.toFixed(3) : "n/a";
|
|
1155
1190
|
return `${n(e)} – ${n(t)}`;
|
|
1156
1191
|
}
|
|
1157
|
-
function
|
|
1192
|
+
function Re(e, t) {
|
|
1158
1193
|
if (!Number.isFinite(e) || !t || !Array.isArray(t.bins) || !t.bins.length)
|
|
1159
1194
|
return -1;
|
|
1160
1195
|
if (t.max === t.min)
|
|
@@ -1166,18 +1201,18 @@ function Te(e, t) {
|
|
|
1166
1201
|
}
|
|
1167
1202
|
return -1;
|
|
1168
1203
|
}
|
|
1169
|
-
function
|
|
1170
|
-
const r =
|
|
1204
|
+
function Wt(e, t, n = "#8b1e3f") {
|
|
1205
|
+
const r = Re(e, t);
|
|
1171
1206
|
return r < 0 ? n : t.colors[r] || n;
|
|
1172
1207
|
}
|
|
1173
|
-
function
|
|
1208
|
+
function j(e) {
|
|
1174
1209
|
e.selectables = [
|
|
1175
1210
|
...e.blocks,
|
|
1176
1211
|
...e.drillMeshes,
|
|
1177
1212
|
...e.structuralMeshes
|
|
1178
1213
|
];
|
|
1179
1214
|
}
|
|
1180
|
-
const
|
|
1215
|
+
const Kt = {
|
|
1181
1216
|
bedding: "#2563eb",
|
|
1182
1217
|
foliation: "#16a34a",
|
|
1183
1218
|
joint: "#9333ea",
|
|
@@ -1186,11 +1221,11 @@ const jt = {
|
|
|
1186
1221
|
"shear zone": "#0ea5e9",
|
|
1187
1222
|
"fault zone": "#ef4444"
|
|
1188
1223
|
};
|
|
1189
|
-
function
|
|
1190
|
-
const n = t ||
|
|
1224
|
+
function Jt(e, t) {
|
|
1225
|
+
const n = t || Kt, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
|
|
1191
1226
|
return new f.Color(o).getHex();
|
|
1192
1227
|
}
|
|
1193
|
-
function
|
|
1228
|
+
function Qt(e, t) {
|
|
1194
1229
|
const n = e * Math.PI / 180, r = t * Math.PI / 180;
|
|
1195
1230
|
return new f.Vector3(
|
|
1196
1231
|
Math.sin(r) * Math.sin(n),
|
|
@@ -1201,7 +1236,7 @@ function Ut(e, t) {
|
|
|
1201
1236
|
// Up component
|
|
1202
1237
|
).normalize();
|
|
1203
1238
|
}
|
|
1204
|
-
function
|
|
1239
|
+
function en(e, t = {}) {
|
|
1205
1240
|
const {
|
|
1206
1241
|
radius: n = 5,
|
|
1207
1242
|
discThickness: r = 0.2,
|
|
@@ -1210,23 +1245,23 @@ function $t(e, t = {}) {
|
|
|
1210
1245
|
colorMap: a = null
|
|
1211
1246
|
} = t, c = new f.Group(), l = new f.Vector3(0, 1, 0);
|
|
1212
1247
|
for (const s of e) {
|
|
1213
|
-
const u = s.x != null ? s.x : s.easting != null ? s.easting : null,
|
|
1214
|
-
if (u == null ||
|
|
1215
|
-
const h = s[
|
|
1216
|
-
let
|
|
1248
|
+
const u = s.x != null ? s.x : s.easting != null ? s.easting : null, p = s.y != null ? s.y : s.northing != null ? s.northing : null, m = s.z != null ? s.z : s.elevation != null ? s.elevation : null;
|
|
1249
|
+
if (u == null || p == null || m == null || !Number.isFinite(u) || !Number.isFinite(p) || !Number.isFinite(m)) continue;
|
|
1250
|
+
const h = s[K] != null ? Number(s[K]) : null, d = s[W] != null ? Number(s[W]) : null;
|
|
1251
|
+
let g;
|
|
1217
1252
|
if (s.nx != null && Number.isFinite(s.nx) && s.ny != null && Number.isFinite(s.ny) && s.nz != null && Number.isFinite(s.nz))
|
|
1218
|
-
|
|
1253
|
+
g = new f.Vector3(s.nx, s.ny, s.nz).normalize();
|
|
1219
1254
|
else {
|
|
1220
1255
|
if (h == null || d == null || !Number.isFinite(h) || !Number.isFinite(d)) continue;
|
|
1221
|
-
|
|
1256
|
+
g = Qt(h, d);
|
|
1222
1257
|
}
|
|
1223
|
-
const N = new f.CylinderGeometry(n, n, r, i, 1, !1),
|
|
1224
|
-
color:
|
|
1258
|
+
const N = new f.CylinderGeometry(n, n, r, i, 1, !1), O = new f.MeshStandardMaterial({
|
|
1259
|
+
color: Jt(s.structure_type, a),
|
|
1225
1260
|
transparent: !0,
|
|
1226
1261
|
opacity: o,
|
|
1227
1262
|
side: f.DoubleSide
|
|
1228
|
-
}), b = new f.Mesh(N,
|
|
1229
|
-
b.position.set(u,
|
|
1263
|
+
}), b = new f.Mesh(N, O);
|
|
1264
|
+
b.position.set(u, p, m), b.quaternion.setFromUnitVectors(l, g), b.userData = {
|
|
1230
1265
|
type: "structure",
|
|
1231
1266
|
hole_id: s.hole_id,
|
|
1232
1267
|
depth: s.depth ?? s.mid,
|
|
@@ -1238,8 +1273,8 @@ function $t(e, t = {}) {
|
|
|
1238
1273
|
}
|
|
1239
1274
|
return c;
|
|
1240
1275
|
}
|
|
1241
|
-
function
|
|
1242
|
-
if (!e.scene || (
|
|
1276
|
+
function tn(e, t, n, r = {}) {
|
|
1277
|
+
if (!e.scene || (Ve(e), !(t != null && t.length) || !(n != null && n.length))) return;
|
|
1243
1278
|
const { maxDiscs: o = 3e3 } = r;
|
|
1244
1279
|
let i = t;
|
|
1245
1280
|
if (i.length > o) {
|
|
@@ -1248,21 +1283,21 @@ function Xt(e, t, n, r = {}) {
|
|
|
1248
1283
|
s.push(i[Math.floor(u * l)]);
|
|
1249
1284
|
i = s;
|
|
1250
1285
|
}
|
|
1251
|
-
const a = n.flatMap((l) => (l.points || []).map((s) => ({ ...s, hole_id: l.id }))), c =
|
|
1252
|
-
c.length && (e.structuralGroup =
|
|
1286
|
+
const a = n.flatMap((l) => (l.points || []).map((s) => ({ ...s, hole_id: l.id }))), c = Ft(i, a, r);
|
|
1287
|
+
c.length && (e.structuralGroup = en(c, r), e.scene.add(e.structuralGroup), e.structuralGroup.traverse((l) => {
|
|
1253
1288
|
l.isMesh && e.structuralMeshes.push(l);
|
|
1254
|
-
}),
|
|
1289
|
+
}), j(e));
|
|
1255
1290
|
}
|
|
1256
|
-
function
|
|
1291
|
+
function Ve(e) {
|
|
1257
1292
|
e.structuralGroup && (e.scene.remove(e.structuralGroup), e.structuralGroup.traverse((t) => {
|
|
1258
1293
|
t.isMesh && (t.geometry.dispose(), t.material.dispose());
|
|
1259
|
-
}), e.structuralGroup = null), e.structuralMeshes = [],
|
|
1294
|
+
}), e.structuralGroup = null), e.structuralMeshes = [], j(e);
|
|
1260
1295
|
}
|
|
1261
|
-
function
|
|
1296
|
+
function nn(e, t) {
|
|
1262
1297
|
e.structuralGroup && (e.structuralGroup.visible = !!t);
|
|
1263
1298
|
}
|
|
1264
|
-
let
|
|
1265
|
-
function
|
|
1299
|
+
let rn = 0;
|
|
1300
|
+
function on(e) {
|
|
1266
1301
|
let t, n, r, o;
|
|
1267
1302
|
if ("width" in e || "height" in e || "x" in e && !("maxX" in e)) {
|
|
1268
1303
|
const i = Number(e.x ?? 0), a = Number(e.y ?? 0), c = Number(e.width ?? 0), l = Number(e.height ?? 0);
|
|
@@ -1279,7 +1314,7 @@ function Wt(e) {
|
|
|
1279
1314
|
);
|
|
1280
1315
|
return { minX: t, minY: n, maxX: r, maxY: o };
|
|
1281
1316
|
}
|
|
1282
|
-
function
|
|
1317
|
+
function sn(e) {
|
|
1283
1318
|
if (e.type === "texture")
|
|
1284
1319
|
return Promise.resolve(e.texture);
|
|
1285
1320
|
let t, n = !1;
|
|
@@ -1308,58 +1343,58 @@ function Kt(e) {
|
|
|
1308
1343
|
);
|
|
1309
1344
|
});
|
|
1310
1345
|
}
|
|
1311
|
-
async function
|
|
1312
|
-
const { source: t, bounds: n, elevation: r = 0, visible: o = !0, renderOrder: i = 0 } = e, a = e.id ?? `raster-overlay-${++
|
|
1346
|
+
async function Rr(e) {
|
|
1347
|
+
const { source: t, bounds: n, elevation: r = 0, visible: o = !0, renderOrder: i = 0 } = e, a = e.id ?? `raster-overlay-${++rn}`, c = e.name ?? a;
|
|
1313
1348
|
let l = e.opacity ?? 1;
|
|
1314
1349
|
if ((l < 0 || l > 1) && (console.warn(
|
|
1315
1350
|
`[baselode] raster overlay "${a}": opacity ${l} is outside [0, 1] — clamped`
|
|
1316
1351
|
), l = Math.max(0, Math.min(1, l))), !t) throw new Error("raster overlay: options.source is required");
|
|
1317
1352
|
if (!n) throw new Error("raster overlay: options.bounds is required");
|
|
1318
|
-
const s =
|
|
1353
|
+
const s = on(n), { minX: u, minY: p, maxX: m, maxY: h } = s, d = m - u, g = h - p, N = (u + m) / 2, O = (p + h) / 2, b = await sn(t), A = new f.PlaneGeometry(d, g), y = new f.MeshBasicMaterial({
|
|
1319
1354
|
map: b,
|
|
1320
1355
|
transparent: !0,
|
|
1321
1356
|
opacity: l,
|
|
1322
1357
|
side: f.DoubleSide,
|
|
1323
1358
|
depthWrite: !1
|
|
1324
|
-
}),
|
|
1325
|
-
return
|
|
1359
|
+
}), E = new f.Mesh(A, y);
|
|
1360
|
+
return E.position.set(N, O, r), E.renderOrder = i, E.visible = o, { id: a, name: c, mesh: E, texture: b, bounds: s, elevation: r, opacity: l, visible: o };
|
|
1326
1361
|
}
|
|
1327
|
-
function
|
|
1328
|
-
e.scene && (e.rasterOverlays.has(t.id) &&
|
|
1362
|
+
function an(e, t) {
|
|
1363
|
+
e.scene && (e.rasterOverlays.has(t.id) && _e(e, t.id), e.rasterOverlays.set(t.id, t), e.scene.add(t.mesh));
|
|
1329
1364
|
}
|
|
1330
|
-
function
|
|
1365
|
+
function _e(e, t) {
|
|
1331
1366
|
var r;
|
|
1332
1367
|
const n = e.rasterOverlays.get(t);
|
|
1333
1368
|
n && ((r = e.scene) == null || r.remove(n.mesh), n.mesh.geometry.dispose(), n.mesh.material.dispose(), n.texture && n.texture.dispose(), e.rasterOverlays.delete(t));
|
|
1334
1369
|
}
|
|
1335
|
-
function
|
|
1370
|
+
function ln(e, t, n) {
|
|
1336
1371
|
const r = e.rasterOverlays.get(t);
|
|
1337
1372
|
if (!r) return;
|
|
1338
1373
|
const o = Math.max(0, Math.min(1, Number(n)));
|
|
1339
1374
|
r.opacity = o, r.mesh.material.opacity = o, r.mesh.material.needsUpdate = !0;
|
|
1340
1375
|
}
|
|
1341
|
-
function
|
|
1376
|
+
function cn(e, t, n) {
|
|
1342
1377
|
const r = e.rasterOverlays.get(t);
|
|
1343
1378
|
r && (r.visible = !!n, r.mesh.visible = r.visible);
|
|
1344
1379
|
}
|
|
1345
|
-
function
|
|
1380
|
+
function un(e, t, n) {
|
|
1346
1381
|
const r = e.rasterOverlays.get(t);
|
|
1347
1382
|
r && (r.elevation = Number(n), r.mesh.position.setZ(r.elevation));
|
|
1348
1383
|
}
|
|
1349
|
-
function
|
|
1384
|
+
function mn(e, t) {
|
|
1350
1385
|
return e.rasterOverlays.get(t);
|
|
1351
1386
|
}
|
|
1352
|
-
function
|
|
1387
|
+
function dn(e) {
|
|
1353
1388
|
return Array.from(e.rasterOverlays.values());
|
|
1354
1389
|
}
|
|
1355
|
-
function
|
|
1390
|
+
function fn(e) {
|
|
1356
1391
|
for (const t of [...e.rasterOverlays.keys()])
|
|
1357
|
-
|
|
1392
|
+
_e(e, t);
|
|
1358
1393
|
}
|
|
1359
|
-
function
|
|
1394
|
+
function Me(e) {
|
|
1360
1395
|
var n, r, o, i, a, c, l, s, u;
|
|
1361
1396
|
if (!e) return "";
|
|
1362
|
-
const t = (
|
|
1397
|
+
const t = (p) => Number.isFinite(p) ? p.toFixed(3) : "nan";
|
|
1363
1398
|
return [
|
|
1364
1399
|
t((n = e.camera) == null ? void 0 : n.x),
|
|
1365
1400
|
t((r = e.camera) == null ? void 0 : r.y),
|
|
@@ -1372,7 +1407,7 @@ function fe(e) {
|
|
|
1372
1407
|
t((u = e.up) == null ? void 0 : u.z)
|
|
1373
1408
|
].join("|");
|
|
1374
1409
|
}
|
|
1375
|
-
function
|
|
1410
|
+
function He(e) {
|
|
1376
1411
|
return !e.camera || !e.controls ? null : {
|
|
1377
1412
|
camera: {
|
|
1378
1413
|
x: e.camera.position.x,
|
|
@@ -1391,37 +1426,37 @@ function Re(e) {
|
|
|
1391
1426
|
}
|
|
1392
1427
|
};
|
|
1393
1428
|
}
|
|
1394
|
-
function
|
|
1429
|
+
function hn(e, t) {
|
|
1395
1430
|
if (!e.camera || !e.controls || !t) return !1;
|
|
1396
1431
|
const n = t.camera || {}, r = t.target || {}, o = t.up || {};
|
|
1397
|
-
return [n.x, n.y, n.z, r.x, r.y, r.z, o.x, o.y, o.z].every(Number.isFinite) ? (e.camera.position.set(n.x, n.y, n.z), e.controls.target.set(r.x, r.y, r.z), e.camera.up.set(o.x, o.y, o.z), e.camera.lookAt(r.x, r.y, r.z), e.controls.update(), e._lastViewSignature =
|
|
1432
|
+
return [n.x, n.y, n.z, r.x, r.y, r.z, o.x, o.y, o.z].every(Number.isFinite) ? (e.camera.position.set(n.x, n.y, n.z), e.controls.target.set(r.x, r.y, r.z), e.camera.up.set(o.x, o.y, o.z), e.camera.lookAt(r.x, r.y, r.z), e.controls.update(), e._lastViewSignature = Me(t), !0) : !1;
|
|
1398
1433
|
}
|
|
1399
|
-
function
|
|
1434
|
+
function bn(e) {
|
|
1400
1435
|
if (!e.viewChangeHandler) return;
|
|
1401
1436
|
const t = Date.now();
|
|
1402
1437
|
if (t - e._lastViewEmitMs < 250) return;
|
|
1403
|
-
const n =
|
|
1438
|
+
const n = He(e);
|
|
1404
1439
|
if (!n) return;
|
|
1405
|
-
const r =
|
|
1440
|
+
const r = Me(n);
|
|
1406
1441
|
r !== e._lastViewSignature && (e._lastViewSignature = r, e._lastViewEmitMs = t, e.viewChangeHandler(n));
|
|
1407
1442
|
}
|
|
1408
|
-
function
|
|
1409
|
-
const c = (t + n) / 2, l = (r + o) / 2, s = (i + a) / 2, u = n - t,
|
|
1443
|
+
function Ee(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
|
|
1444
|
+
const c = (t + n) / 2, l = (r + o) / 2, s = (i + a) / 2, u = n - t, p = o - r, m = a - i, d = Math.max(u, p, m, 1) * 2;
|
|
1410
1445
|
e.controls.target.set(c, l, s), e.camera.position.set(c + d, l + d, s + d), e.camera.lookAt(c, l, s), e.controls.update();
|
|
1411
1446
|
}
|
|
1412
|
-
function
|
|
1447
|
+
function pn(e, t = 1e3) {
|
|
1413
1448
|
!e.camera || !e.controls || (e.controls.target.set(0, 0, 0), e.camera.position.set(t, t, t), e.camera.lookAt(0, 0, 0), e.controls.update());
|
|
1414
1449
|
}
|
|
1415
|
-
function
|
|
1450
|
+
function gn(e, t = 2e3) {
|
|
1416
1451
|
!e.camera || !e.controls || (e.controls.target.set(0, 0, 0), e.camera.position.set(0, 0, t), e.camera.up.set(0, 1, 0), e.camera.lookAt(0, 0, 0), e.controls.update());
|
|
1417
1452
|
}
|
|
1418
|
-
function
|
|
1453
|
+
function yn(e, t = 0, n = 0) {
|
|
1419
1454
|
e.controls && typeof e.controls.pan == "function" && (e.controls.pan(t, n), e.controls.update());
|
|
1420
1455
|
}
|
|
1421
|
-
function
|
|
1456
|
+
function _n(e, t = 1.1) {
|
|
1422
1457
|
!e.controls || typeof e.controls.dollyIn != "function" || typeof e.controls.dollyOut != "function" || (t > 1 ? e.controls.dollyOut(t) : e.controls.dollyIn(1 / t), e.controls.update());
|
|
1423
1458
|
}
|
|
1424
|
-
function
|
|
1459
|
+
function Mn(e, t = 1.2) {
|
|
1425
1460
|
if (!e.lastBounds) return;
|
|
1426
1461
|
const {
|
|
1427
1462
|
minX: n,
|
|
@@ -1430,16 +1465,16 @@ function dn(e, t = 1.2) {
|
|
|
1430
1465
|
maxY: i,
|
|
1431
1466
|
minZ: a,
|
|
1432
1467
|
maxZ: c
|
|
1433
|
-
} = e.lastBounds, l = (r - n) * t, s = (i - o) * t, u = (c - a) * t,
|
|
1434
|
-
e.controls.target.set(
|
|
1468
|
+
} = e.lastBounds, l = (r - n) * t, s = (i - o) * t, u = (c - a) * t, p = (n + r) / 2, m = (o + i) / 2, h = (a + c) / 2, g = Math.max(l, s, u, 1) * 2;
|
|
1469
|
+
e.controls.target.set(p, m, h), e.camera.position.set(p + g, m + g, h + g), e.camera.lookAt(p, m, h), e.controls.update();
|
|
1435
1470
|
}
|
|
1436
|
-
const
|
|
1437
|
-
function
|
|
1471
|
+
const En = 1, zn = 120;
|
|
1472
|
+
function Nn(e, t) {
|
|
1438
1473
|
if (!e.camera || !e.controls || !Number.isFinite(t)) return !1;
|
|
1439
|
-
const n = Math.min(
|
|
1474
|
+
const n = Math.min(zn, Math.max(En, t)), r = e.controls.target, o = e.camera.position.distanceTo(r), i = e.camera.fov * Math.PI / 180, a = 2 * o * Math.tan(i / 2), c = n * Math.PI / 180, l = a / (2 * Math.tan(c / 2)), s = e.camera.position.clone().sub(r).normalize();
|
|
1440
1475
|
return e.camera.position.copy(r).addScaledVector(s, l), e.camera.fov = n, e.camera.updateProjectionMatrix(), e.controls.update(), !0;
|
|
1441
1476
|
}
|
|
1442
|
-
function
|
|
1477
|
+
function On(e, t = "orbit") {
|
|
1443
1478
|
if (e.controlMode = t === "fly" ? "fly" : "orbit", e.controlMode === "fly")
|
|
1444
1479
|
e.controls && (e.controls.enabled = !1), e.flyControls && (e.flyControls.enabled = !0);
|
|
1445
1480
|
else if (e.flyControls && (e.flyControls.enabled = !1), e.controls) {
|
|
@@ -1448,37 +1483,37 @@ function gn(e, t = "orbit") {
|
|
|
1448
1483
|
e.controls.target.copy(n), e.controls.update();
|
|
1449
1484
|
}
|
|
1450
1485
|
}
|
|
1451
|
-
const
|
|
1452
|
-
function
|
|
1486
|
+
const T = "#9ca3af";
|
|
1487
|
+
function Le(e, t) {
|
|
1453
1488
|
const n = Number(e == null ? void 0 : e.md), r = Number(t == null ? void 0 : t.md);
|
|
1454
1489
|
if (!Number.isFinite(n) || !Number.isFinite(r)) return null;
|
|
1455
1490
|
const o = Math.min(n, r), i = Math.max(n, r);
|
|
1456
1491
|
return i <= o ? null : { segStart: o, segEnd: i };
|
|
1457
1492
|
}
|
|
1458
|
-
function
|
|
1493
|
+
function kn(e, t, n) {
|
|
1459
1494
|
let r = 0, o = 0;
|
|
1460
1495
|
for (let a = 0; a < e.length; a += 1) {
|
|
1461
1496
|
const c = e[a], l = Number(c == null ? void 0 : c.from), s = Number(c == null ? void 0 : c.to), u = Number(c == null ? void 0 : c.value);
|
|
1462
1497
|
if (!Number.isFinite(l) || !Number.isFinite(s) || !Number.isFinite(u) || s <= l) continue;
|
|
1463
|
-
const
|
|
1498
|
+
const p = Math.max(t, l), h = Math.min(n, s) - p;
|
|
1464
1499
|
h <= 0 || (r += u * h, o += h);
|
|
1465
1500
|
}
|
|
1466
1501
|
if (o <= 0) return null;
|
|
1467
1502
|
const i = r / o;
|
|
1468
1503
|
return Number.isFinite(i) ? i : null;
|
|
1469
1504
|
}
|
|
1470
|
-
function
|
|
1471
|
-
if (!Number.isFinite(e)) return new f.Color(
|
|
1472
|
-
if (
|
|
1473
|
-
const r =
|
|
1505
|
+
function An(e, t) {
|
|
1506
|
+
if (!Number.isFinite(e)) return new f.Color(T);
|
|
1507
|
+
if (Re(e, t) < 0) return new f.Color(T);
|
|
1508
|
+
const r = Wt(e, t, T);
|
|
1474
1509
|
return new f.Color(r);
|
|
1475
1510
|
}
|
|
1476
|
-
function
|
|
1477
|
-
if (!e || !String(e).trim()) return
|
|
1478
|
-
const t =
|
|
1511
|
+
function Ln(e) {
|
|
1512
|
+
if (!e || !String(e).trim()) return T;
|
|
1513
|
+
const t = Ge(String(e).toLowerCase().trim());
|
|
1479
1514
|
return "#" + new f.Color().setHSL(t, 0.7, 0.5).getHexString();
|
|
1480
1515
|
}
|
|
1481
|
-
function
|
|
1516
|
+
function Dn(e = {}) {
|
|
1482
1517
|
return {
|
|
1483
1518
|
preserveView: !!e.preserveView,
|
|
1484
1519
|
assayIntervalsByHole: e.assayIntervalsByHole || null,
|
|
@@ -1486,7 +1521,7 @@ function Mn(e = {}) {
|
|
|
1486
1521
|
isCategoricalVariable: !!e.isCategoricalVariable
|
|
1487
1522
|
};
|
|
1488
1523
|
}
|
|
1489
|
-
function
|
|
1524
|
+
function Sn(e, t) {
|
|
1490
1525
|
if (!e || !t) return [];
|
|
1491
1526
|
const n = [];
|
|
1492
1527
|
return Object.values(e).forEach((r) => {
|
|
@@ -1496,27 +1531,27 @@ function zn(e, t) {
|
|
|
1496
1531
|
});
|
|
1497
1532
|
}), n;
|
|
1498
1533
|
}
|
|
1499
|
-
function
|
|
1534
|
+
function oe(e) {
|
|
1500
1535
|
return {
|
|
1501
1536
|
holeId: e.id,
|
|
1502
1537
|
project: e.project
|
|
1503
1538
|
};
|
|
1504
1539
|
}
|
|
1505
|
-
function
|
|
1540
|
+
function wn(e) {
|
|
1506
1541
|
return `${e ?? ""}`.trim().toLowerCase();
|
|
1507
1542
|
}
|
|
1508
|
-
function
|
|
1509
|
-
const n = `${e ?? ""}:${t ?? 0}`, r =
|
|
1543
|
+
function xn(e, t) {
|
|
1544
|
+
const n = `${e ?? ""}:${t ?? 0}`, r = Ge(n), o = (t ?? 0) % 14 / 14, i = (r * 0.15 + o * 0.85) % 1, a = new f.Color();
|
|
1510
1545
|
return a.setHSL(i, 1, 0.5), a;
|
|
1511
1546
|
}
|
|
1512
|
-
function
|
|
1547
|
+
function Ge(e) {
|
|
1513
1548
|
const t = `${e ?? ""}`;
|
|
1514
1549
|
let n = 2166136261;
|
|
1515
1550
|
for (let r = 0; r < t.length; r += 1)
|
|
1516
1551
|
n ^= t.charCodeAt(r), n = Math.imul(n, 16777619);
|
|
1517
1552
|
return (n >>> 0) / 4294967295;
|
|
1518
1553
|
}
|
|
1519
|
-
function
|
|
1554
|
+
function Fn(e, t, n) {
|
|
1520
1555
|
let r = null, o = 0;
|
|
1521
1556
|
for (const i of e) {
|
|
1522
1557
|
const a = Number(i == null ? void 0 : i.from), c = Number(i == null ? void 0 : i.to);
|
|
@@ -1526,108 +1561,108 @@ function kn(e, t, n) {
|
|
|
1526
1561
|
}
|
|
1527
1562
|
return r;
|
|
1528
1563
|
}
|
|
1529
|
-
function
|
|
1564
|
+
function vn(e, t) {
|
|
1530
1565
|
if (!t || !e) return [];
|
|
1531
1566
|
const n = e.id || e.holeId;
|
|
1532
1567
|
if (!n) return [];
|
|
1533
1568
|
const r = t[n];
|
|
1534
1569
|
if (Array.isArray(r) && r.length) return r;
|
|
1535
|
-
const o =
|
|
1570
|
+
const o = wn(n);
|
|
1536
1571
|
if (o) {
|
|
1537
1572
|
const i = t[o];
|
|
1538
1573
|
if (Array.isArray(i) && i.length) return i;
|
|
1539
1574
|
}
|
|
1540
1575
|
return [];
|
|
1541
1576
|
}
|
|
1542
|
-
function
|
|
1577
|
+
function Cn({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId: r, segmentIndex: o, p1: i, p2: a, isCategorical: c }) {
|
|
1543
1578
|
if (!e)
|
|
1544
|
-
return
|
|
1579
|
+
return xn(r, o);
|
|
1545
1580
|
if (e === "__HAS_ASSAY__") {
|
|
1546
|
-
if (!(t != null && t.length)) return new f.Color(
|
|
1547
|
-
const u =
|
|
1581
|
+
if (!(t != null && t.length)) return new f.Color(T);
|
|
1582
|
+
const u = Le(i, a);
|
|
1548
1583
|
return u ? t.some((m) => {
|
|
1549
1584
|
const h = Number(m == null ? void 0 : m.from), d = Number(m == null ? void 0 : m.to);
|
|
1550
1585
|
if (!Number.isFinite(h) || !Number.isFinite(d)) return !1;
|
|
1551
|
-
const
|
|
1552
|
-
return Math.min(u.segEnd, d) >
|
|
1553
|
-
}) ? new f.Color("#ff8c42") : new f.Color(
|
|
1586
|
+
const g = Math.max(u.segStart, h);
|
|
1587
|
+
return Math.min(u.segEnd, d) > g;
|
|
1588
|
+
}) ? new f.Color("#ff8c42") : new f.Color(T) : new f.Color(T);
|
|
1554
1589
|
}
|
|
1555
|
-
if (!(t != null && t.length)) return new f.Color(
|
|
1556
|
-
const l =
|
|
1557
|
-
if (!l) return new f.Color(
|
|
1590
|
+
if (!(t != null && t.length)) return new f.Color(T);
|
|
1591
|
+
const l = Le(i, a);
|
|
1592
|
+
if (!l) return new f.Color(T);
|
|
1558
1593
|
if (c) {
|
|
1559
|
-
const u =
|
|
1560
|
-
return new f.Color(
|
|
1561
|
-
}
|
|
1562
|
-
const s =
|
|
1563
|
-
return
|
|
1564
|
-
}
|
|
1565
|
-
function
|
|
1566
|
-
if (!e.scene || (
|
|
1567
|
-
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: a } =
|
|
1568
|
-
let s = 1 / 0, u = -1 / 0,
|
|
1569
|
-
const
|
|
1570
|
-
t.forEach((
|
|
1571
|
-
const y = b * 137.5 % 360 / 360,
|
|
1572
|
-
s = Math.min(s,
|
|
1573
|
-
const
|
|
1574
|
-
return
|
|
1594
|
+
const u = Fn(t, l.segStart, l.segEnd);
|
|
1595
|
+
return new f.Color(Ln(u));
|
|
1596
|
+
}
|
|
1597
|
+
const s = kn(t, l.segStart, l.segEnd);
|
|
1598
|
+
return An(s, n);
|
|
1599
|
+
}
|
|
1600
|
+
function In(e, t, n = {}) {
|
|
1601
|
+
if (!e.scene || (je(e), !t || t.length === 0)) return;
|
|
1602
|
+
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: a } = Dn(n), c = a ? [] : Sn(o, i), l = qt(c);
|
|
1603
|
+
let s = 1 / 0, u = -1 / 0, p = 1 / 0, m = -1 / 0, h = 1 / 0, d = -1 / 0;
|
|
1604
|
+
const g = new f.Vector3(), N = new f.Vector3(0, 1, 0);
|
|
1605
|
+
t.forEach((O, b) => {
|
|
1606
|
+
const y = b * 137.5 % 360 / 360, E = new f.Color().setHSL(y, 0.75, 0.55), k = (O.points || []).map((L) => {
|
|
1607
|
+
s = Math.min(s, L.x), u = Math.max(u, L.x), p = Math.min(p, L.y), m = Math.max(m, L.y), h = Math.min(h, L.z), d = Math.max(d, L.z);
|
|
1608
|
+
const x = new f.Vector3(L.x, L.y, L.z);
|
|
1609
|
+
return x.md = L.md, x;
|
|
1575
1610
|
});
|
|
1576
|
-
if (
|
|
1577
|
-
if (
|
|
1578
|
-
const
|
|
1579
|
-
color:
|
|
1580
|
-
emissive:
|
|
1611
|
+
if (k.length < 2) {
|
|
1612
|
+
if (k.length === 1) {
|
|
1613
|
+
const L = new f.SphereGeometry(5, 12, 12), x = new f.MeshLambertMaterial({
|
|
1614
|
+
color: E,
|
|
1615
|
+
emissive: E,
|
|
1581
1616
|
emissiveIntensity: 0.2
|
|
1582
|
-
}),
|
|
1583
|
-
|
|
1617
|
+
}), S = new f.Mesh(L, x);
|
|
1618
|
+
S.position.copy(k[0]), S.userData = oe(O), e.scene.add(S), e.drillLines.push(S), e.drillMeshes.push(S);
|
|
1584
1619
|
}
|
|
1585
1620
|
return;
|
|
1586
1621
|
}
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1589
|
-
const
|
|
1590
|
-
for (let
|
|
1591
|
-
const
|
|
1592
|
-
if (
|
|
1593
|
-
const
|
|
1622
|
+
const D = new f.Group();
|
|
1623
|
+
D.userData = oe(O);
|
|
1624
|
+
const w = i ? vn(O, o) : [];
|
|
1625
|
+
for (let L = 0; L < k.length - 1; L += 1) {
|
|
1626
|
+
const x = k[L], S = k[L + 1], v = g.subVectors(S, x), I = v.length();
|
|
1627
|
+
if (I <= 1e-3) continue;
|
|
1628
|
+
const C = 2.2, B = new f.CylinderGeometry(C, C, I, 6, 1, !0), P = Cn({
|
|
1594
1629
|
selectedAssayVariable: i,
|
|
1595
|
-
assayIntervals:
|
|
1630
|
+
assayIntervals: w,
|
|
1596
1631
|
assayScale: l,
|
|
1597
|
-
holeId:
|
|
1598
|
-
segmentIndex:
|
|
1599
|
-
p1:
|
|
1600
|
-
p2:
|
|
1632
|
+
holeId: O.id,
|
|
1633
|
+
segmentIndex: L,
|
|
1634
|
+
p1: x,
|
|
1635
|
+
p2: S,
|
|
1601
1636
|
isCategorical: a
|
|
1602
|
-
}),
|
|
1637
|
+
}), z = new f.MeshLambertMaterial({
|
|
1603
1638
|
color: P,
|
|
1604
1639
|
flatShading: !0,
|
|
1605
1640
|
emissive: P,
|
|
1606
1641
|
emissiveIntensity: 0.15
|
|
1607
|
-
}),
|
|
1608
|
-
|
|
1642
|
+
}), F = new f.Mesh(B, z);
|
|
1643
|
+
F.position.copy(x.clone().addScaledVector(v, 0.5)), F.quaternion.setFromUnitVectors(N, v.clone().normalize()), F.userData = oe(O), D.add(F), e.drillMeshes.push(F);
|
|
1609
1644
|
}
|
|
1610
|
-
e.scene.add(
|
|
1611
|
-
}), e.camera && e.controls && (e.lastBounds = { minX: s, maxX: u, minY:
|
|
1645
|
+
e.scene.add(D), e.drillLines.push(D);
|
|
1646
|
+
}), e.camera && e.controls && (e.lastBounds = { minX: s, maxX: u, minY: p, maxY: m, minZ: h, maxZ: d }, r || Ee(e, { minX: s, maxX: u, minY: p, maxY: m, minZ: h, maxZ: d })), j(e);
|
|
1612
1647
|
}
|
|
1613
|
-
function
|
|
1648
|
+
function je(e) {
|
|
1614
1649
|
e.drillLines.forEach((t) => {
|
|
1615
1650
|
e.scene.remove(t), t.isGroup ? t.traverse((n) => {
|
|
1616
1651
|
n.isMesh && (n.geometry.dispose(), n.material.dispose());
|
|
1617
1652
|
}) : t.isMesh && (t.geometry.dispose(), t.material.dispose());
|
|
1618
|
-
}), e.drillLines = [], e.drillMeshes = [],
|
|
1653
|
+
}), e.drillLines = [], e.drillMeshes = [], j(e);
|
|
1619
1654
|
}
|
|
1620
|
-
const
|
|
1621
|
-
function
|
|
1655
|
+
const Tn = 20, Bn = 15, Pn = "#00bcd4";
|
|
1656
|
+
function Rn(e = {}) {
|
|
1622
1657
|
return {
|
|
1623
|
-
panelWidth: e.panelWidth != null ? Number(e.panelWidth) :
|
|
1624
|
-
lateralOffset: e.lateralOffset != null ? Number(e.lateralOffset) :
|
|
1625
|
-
color: e.color ||
|
|
1658
|
+
panelWidth: e.panelWidth != null ? Number(e.panelWidth) : Tn,
|
|
1659
|
+
lateralOffset: e.lateralOffset != null ? Number(e.lateralOffset) : Bn,
|
|
1660
|
+
color: e.color || Pn,
|
|
1626
1661
|
valueMin: e.valueMin != null ? Number(e.valueMin) : null,
|
|
1627
1662
|
valueMax: e.valueMax != null ? Number(e.valueMax) : null
|
|
1628
1663
|
};
|
|
1629
1664
|
}
|
|
1630
|
-
function
|
|
1665
|
+
function Vr(e) {
|
|
1631
1666
|
if (!e || e.length < 2) return null;
|
|
1632
1667
|
let t = -1 / 0, n = 1 / 0;
|
|
1633
1668
|
for (const o of e)
|
|
@@ -1635,47 +1670,47 @@ function Er(e) {
|
|
|
1635
1670
|
const r = t - n;
|
|
1636
1671
|
return r < 1e-3 ? null : { topZ: t, botZ: n, height: r };
|
|
1637
1672
|
}
|
|
1638
|
-
function
|
|
1673
|
+
function Vn(e, t, n, r, o, i, a) {
|
|
1639
1674
|
if (!Array.isArray(e) || !Array.isArray(t)) return [];
|
|
1640
1675
|
const c = Math.min(e.length, t.length), l = [];
|
|
1641
1676
|
for (let b = 0; b < c; b++)
|
|
1642
1677
|
Number.isFinite(e[b]) && Number.isFinite(t[b]) && l.push({ d: e[b], v: t[b] });
|
|
1643
1678
|
if (l.length < 2) return [];
|
|
1644
|
-
const s = a != null && a > 0 ? a : null, u = s != null ? 0 : Math.min(...l.map((b) => b.d)), m = (s ?? Math.max(...l.map((b) => b.d))) - u || 1, h = Math.min(...l.map((b) => b.v)), d = Math.max(...l.map((b) => b.v)),
|
|
1645
|
-
return l.map(({ d: b, v:
|
|
1646
|
-
const y = (b - u) / m,
|
|
1647
|
-
return new f.Vector3(
|
|
1679
|
+
const s = a != null && a > 0 ? a : null, u = s != null ? 0 : Math.min(...l.map((b) => b.d)), m = (s ?? Math.max(...l.map((b) => b.d))) - u || 1, h = Math.min(...l.map((b) => b.v)), d = Math.max(...l.map((b) => b.v)), g = o ?? h, O = (i ?? d) - g || 1;
|
|
1680
|
+
return l.map(({ d: b, v: A }) => {
|
|
1681
|
+
const y = (b - u) / m, E = Math.max(0, Math.min(1, (A - g) / O)), k = -n / 2 + E * n, D = y * r;
|
|
1682
|
+
return new f.Vector3(k, D, 0.01);
|
|
1648
1683
|
});
|
|
1649
1684
|
}
|
|
1650
|
-
function
|
|
1685
|
+
function Hn(e, t) {
|
|
1651
1686
|
const n = e.length;
|
|
1652
1687
|
if (n < 2) return null;
|
|
1653
1688
|
const r = [], o = [];
|
|
1654
1689
|
let i = 0;
|
|
1655
1690
|
for (let c = 0; c < n - 1; c++) {
|
|
1656
|
-
const l = e[c], s = e[c + 1], u = s.x - l.x,
|
|
1691
|
+
const l = e[c], s = e[c + 1], u = s.x - l.x, p = s.y - l.y, m = Math.sqrt(u * u + p * p);
|
|
1657
1692
|
if (m < 1e-6) continue;
|
|
1658
|
-
const h = -
|
|
1693
|
+
const h = -p / m * t, d = u / m * t, g = 0.01;
|
|
1659
1694
|
r.push(
|
|
1660
1695
|
l.x + h,
|
|
1661
1696
|
l.y + d,
|
|
1662
|
-
|
|
1697
|
+
g,
|
|
1663
1698
|
l.x - h,
|
|
1664
1699
|
l.y - d,
|
|
1665
|
-
|
|
1700
|
+
g,
|
|
1666
1701
|
s.x + h,
|
|
1667
1702
|
s.y + d,
|
|
1668
|
-
|
|
1703
|
+
g,
|
|
1669
1704
|
s.x - h,
|
|
1670
1705
|
s.y - d,
|
|
1671
|
-
|
|
1706
|
+
g
|
|
1672
1707
|
), o.push(i, i + 1, i + 2, i + 1, i + 3, i + 2), i += 4;
|
|
1673
1708
|
}
|
|
1674
1709
|
if (r.length === 0) return null;
|
|
1675
1710
|
const a = new f.BufferGeometry();
|
|
1676
1711
|
return a.setAttribute("position", new f.Float32BufferAttribute(r, 3)), a.setIndex(o), a;
|
|
1677
1712
|
}
|
|
1678
|
-
function
|
|
1713
|
+
function Gn(e, t) {
|
|
1679
1714
|
const n = e.points || [];
|
|
1680
1715
|
if (n.length < 2) return null;
|
|
1681
1716
|
const r = n[0], o = n[n.length - 1], i = new f.Vector3(
|
|
@@ -1684,67 +1719,67 @@ function In(e, t) {
|
|
|
1684
1719
|
o.z - r.z
|
|
1685
1720
|
), a = i.length();
|
|
1686
1721
|
if (a < 1e-3) return null;
|
|
1687
|
-
const c = i.clone().normalize(), l =
|
|
1688
|
-
let
|
|
1689
|
-
|
|
1690
|
-
const N = new f.Vector3().crossVectors(
|
|
1722
|
+
const c = i.clone().normalize(), l = Rn(t.options), { panelWidth: s, lateralOffset: u, color: p, valueMin: m, valueMax: h } = l, d = new f.Vector3(0, 0, 1);
|
|
1723
|
+
let g = new f.Vector3().crossVectors(c, d);
|
|
1724
|
+
g.lengthSq() < 1e-6 ? g.set(1, 0, 0) : g.normalize();
|
|
1725
|
+
const N = new f.Vector3().crossVectors(g, c).normalize(), O = new f.Vector3(r.x, r.y, r.z).addScaledVector(g, u), b = new f.Matrix4().makeBasis(g, c, N), A = new f.Quaternion().setFromRotationMatrix(b), y = n.map((v) => v.md).filter(Number.isFinite), E = y.length > 0 ? Math.max(...y) : a, k = Vn(
|
|
1691
1726
|
t.depths,
|
|
1692
1727
|
t.values,
|
|
1693
1728
|
s,
|
|
1694
1729
|
a,
|
|
1695
1730
|
m,
|
|
1696
1731
|
h,
|
|
1697
|
-
|
|
1732
|
+
E
|
|
1698
1733
|
);
|
|
1699
|
-
if (
|
|
1700
|
-
const
|
|
1701
|
-
|
|
1702
|
-
const
|
|
1703
|
-
if (!
|
|
1704
|
-
const
|
|
1705
|
-
color: new f.Color(
|
|
1734
|
+
if (k.length < 2) return null;
|
|
1735
|
+
const D = new f.Group();
|
|
1736
|
+
D.userData = { holeId: e.id, isStripLog: !0 };
|
|
1737
|
+
const w = s * 0.025, L = Hn(k, w);
|
|
1738
|
+
if (!L) return null;
|
|
1739
|
+
const x = new f.MeshBasicMaterial({
|
|
1740
|
+
color: new f.Color(p),
|
|
1706
1741
|
side: f.DoubleSide
|
|
1707
|
-
}),
|
|
1708
|
-
return
|
|
1742
|
+
}), S = new f.Mesh(L, x);
|
|
1743
|
+
return S.position.copy(O), S.quaternion.copy(A), D.add(S), D;
|
|
1709
1744
|
}
|
|
1710
|
-
function
|
|
1711
|
-
if (!e.scene || (
|
|
1745
|
+
function jn(e, t, n) {
|
|
1746
|
+
if (!e.scene || (ce(e), !n || n.length === 0) || !t || t.length === 0) return;
|
|
1712
1747
|
const r = /* @__PURE__ */ new Map();
|
|
1713
1748
|
t.forEach((o) => {
|
|
1714
1749
|
o.id != null && r.set(o.id, o);
|
|
1715
1750
|
}), n.forEach((o) => {
|
|
1716
1751
|
const i = r.get(o.holeId);
|
|
1717
1752
|
if (!i) return;
|
|
1718
|
-
const a =
|
|
1753
|
+
const a = Gn(i, o);
|
|
1719
1754
|
a && (e.scene.add(a), e.stripLogGroups.push(a));
|
|
1720
1755
|
});
|
|
1721
1756
|
}
|
|
1722
|
-
function
|
|
1757
|
+
function ce(e) {
|
|
1723
1758
|
e.stripLogGroups && (e.stripLogGroups.forEach((t) => {
|
|
1724
1759
|
e.scene && e.scene.remove(t), t.traverse((n) => {
|
|
1725
1760
|
n.geometry && n.geometry.dispose(), n.material && n.material.dispose();
|
|
1726
1761
|
});
|
|
1727
1762
|
}), e.stripLogGroups = []);
|
|
1728
1763
|
}
|
|
1729
|
-
const
|
|
1730
|
-
function
|
|
1764
|
+
const De = "#ffffbb", Un = 2, Yn = 1.5, $n = 1;
|
|
1765
|
+
function Xn(e) {
|
|
1731
1766
|
const { renderer: t, scene: n, camera: r, container: o } = e;
|
|
1732
1767
|
if (!t || !n || !r) return;
|
|
1733
|
-
const i = (o == null ? void 0 : o.clientWidth) || t.domElement.clientWidth || 1, a = (o == null ? void 0 : o.clientHeight) || t.domElement.clientHeight || 1, c = new
|
|
1768
|
+
const i = (o == null ? void 0 : o.clientWidth) || t.domElement.clientWidth || 1, a = (o == null ? void 0 : o.clientHeight) || t.domElement.clientHeight || 1, c = new lt(t), l = new ct(n, r);
|
|
1734
1769
|
c.addPass(l);
|
|
1735
|
-
const s = new f.Vector2(i, a), u = new
|
|
1736
|
-
u.visibleEdgeColor.set(
|
|
1770
|
+
const s = new f.Vector2(i, a), u = new ut(s, n, r);
|
|
1771
|
+
u.visibleEdgeColor.set(De), u.hiddenEdgeColor.set(De), u.edgeStrength = Un, u.edgeThickness = Yn, u.edgeGlow = $n, u.pulsePeriod = 0, u.selectedObjects = [], c.addPass(u), c.setSize(i, a), e._composer = c, e._outlinePass = u;
|
|
1737
1772
|
}
|
|
1738
|
-
function
|
|
1773
|
+
function qn(e, t, n) {
|
|
1739
1774
|
!e._composer || !e._outlinePass || (e._composer.setSize(t, n), e._outlinePass.resolution.set(t, n));
|
|
1740
1775
|
}
|
|
1741
|
-
function
|
|
1776
|
+
function Z(e, t) {
|
|
1742
1777
|
e._outlinePass && (e._outlinePass.selectedObjects = t ? [t] : [], e._selectedObject = t || null);
|
|
1743
1778
|
}
|
|
1744
|
-
function
|
|
1779
|
+
function Se(e) {
|
|
1745
1780
|
e._composer && (e._composer.dispose(), e._composer = null), e._outlinePass = null, e._selectedObject = null, e.selectables = [];
|
|
1746
1781
|
}
|
|
1747
|
-
const
|
|
1782
|
+
const Zn = [
|
|
1748
1783
|
{ normal: [1, 0, 0], neibDir: [1, 0, 0], verts: [[1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1]] },
|
|
1749
1784
|
{ normal: [-1, 0, 0], neibDir: [-1, 0, 0], verts: [[-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [-1, -1, -1]] },
|
|
1750
1785
|
{ normal: [0, 1, 0], neibDir: [0, 1, 0], verts: [[-1, 1, 1], [1, 1, 1], [1, 1, -1], [-1, 1, -1]] },
|
|
@@ -1752,86 +1787,86 @@ const Hn = [
|
|
|
1752
1787
|
{ normal: [0, 0, 1], neibDir: [0, 0, 1], verts: [[-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]] },
|
|
1753
1788
|
{ normal: [0, 0, -1], neibDir: [0, 0, -1], verts: [[1, -1, -1], [-1, -1, -1], [-1, 1, -1], [1, 1, -1]] }
|
|
1754
1789
|
];
|
|
1755
|
-
function
|
|
1756
|
-
if (!e.scene || (
|
|
1790
|
+
function Wn(e, t, n, r, o = {}) {
|
|
1791
|
+
if (!e.scene || (Ue(e), !t || !n || !r)) return;
|
|
1757
1792
|
const { autoCenter: i = !0, opacity: a = 1 } = o;
|
|
1758
|
-
let c = 1 / 0, l = -1 / 0, s = 1 / 0, u = -1 / 0,
|
|
1759
|
-
t.forEach((
|
|
1760
|
-
const
|
|
1761
|
-
c = Math.min(c,
|
|
1793
|
+
let c = 1 / 0, l = -1 / 0, s = 1 / 0, u = -1 / 0, p = 1 / 0, m = -1 / 0;
|
|
1794
|
+
t.forEach((z) => {
|
|
1795
|
+
const F = Number(z.x ?? z.center_x ?? 0), R = Number(z.y ?? z.center_y ?? 0), Y = Number(z.z ?? z.center_z ?? 0), $ = Number(z.dx ?? z.size_x ?? 1), X = Number(z.dy ?? z.size_y ?? 1), q = Number(z.dz ?? z.size_z ?? 1);
|
|
1796
|
+
c = Math.min(c, F - $ / 2), l = Math.max(l, F + $ / 2), s = Math.min(s, R - X / 2), u = Math.max(u, R + X / 2), p = Math.min(p, Y - q / 2), m = Math.max(m, Y + q / 2);
|
|
1762
1797
|
});
|
|
1763
|
-
let h = 0, d = 0,
|
|
1764
|
-
o.offset ? (h = Number(o.offset.x ?? 0), d = Number(o.offset.y ?? 0),
|
|
1765
|
-
const N = c + h,
|
|
1766
|
-
t.map((
|
|
1767
|
-
),
|
|
1768
|
-
let
|
|
1769
|
-
if (t.forEach((
|
|
1770
|
-
const
|
|
1771
|
-
|
|
1772
|
-
const
|
|
1773
|
-
if (
|
|
1774
|
-
const
|
|
1775
|
-
V.verts.forEach(([
|
|
1776
|
-
|
|
1777
|
-
}),
|
|
1798
|
+
let h = 0, d = 0, g = 0;
|
|
1799
|
+
o.offset ? (h = Number(o.offset.x ?? 0), d = Number(o.offset.y ?? 0), g = Number(o.offset.z ?? 0)) : i && (h = -((c + l) / 2), d = -((s + u) / 2), g = -((p + m) / 2));
|
|
1800
|
+
const N = c + h, O = l + h, b = s + d, A = u + d, y = p + g, E = m + g, k = (z, F, R) => `${Math.round(z)},${Math.round(F)},${Math.round(R)}`, D = new Set(
|
|
1801
|
+
t.map((z) => k(Number(z.x ?? 0), Number(z.y ?? 0), Number(z.z ?? 0)))
|
|
1802
|
+
), w = [], L = [], x = [], S = [], v = [];
|
|
1803
|
+
let I = 0;
|
|
1804
|
+
if (t.forEach((z) => {
|
|
1805
|
+
const F = Number(z.x ?? z.center_x ?? 0), R = Number(z.y ?? z.center_y ?? 0), Y = Number(z.z ?? z.center_z ?? 0), $ = Number(z.dx ?? z.size_x ?? 1), X = Number(z.dy ?? z.size_y ?? 1), q = Number(z.dz ?? z.size_z ?? 1), $e = F + h, Xe = R + d, qe = Y + g, Ze = St(z[n], r, f), { r: We, g: Ke, b: Je } = Ze;
|
|
1806
|
+
Zn.forEach((V) => {
|
|
1807
|
+
const Qe = F + V.neibDir[0] * $, et = R + V.neibDir[1] * X, tt = Y + V.neibDir[2] * q;
|
|
1808
|
+
if (D.has(k(Qe, et, tt))) return;
|
|
1809
|
+
const U = I;
|
|
1810
|
+
V.verts.forEach(([nt, rt, ot]) => {
|
|
1811
|
+
w.push($e + nt * $ / 2, Xe + rt * X / 2, qe + ot * q / 2), L.push(V.normal[0], V.normal[1], V.normal[2]), x.push(We, Ke, Je), I++;
|
|
1812
|
+
}), S.push(U, U + 1, U + 2, U, U + 2, U + 3), v.push(z);
|
|
1778
1813
|
});
|
|
1779
|
-
}),
|
|
1780
|
-
const
|
|
1781
|
-
|
|
1782
|
-
const
|
|
1814
|
+
}), w.length === 0) return;
|
|
1815
|
+
const C = new f.BufferGeometry();
|
|
1816
|
+
C.setAttribute("position", new f.Float32BufferAttribute(w, 3)), C.setAttribute("normal", new f.Float32BufferAttribute(L, 3)), C.setAttribute("color", new f.Float32BufferAttribute(x, 3)), C.setIndex(S);
|
|
1817
|
+
const B = new f.MeshLambertMaterial({
|
|
1783
1818
|
vertexColors: !0,
|
|
1784
1819
|
transparent: a < 1,
|
|
1785
1820
|
opacity: a,
|
|
1786
1821
|
side: f.DoubleSide
|
|
1787
|
-
}), P = new f.Mesh(
|
|
1788
|
-
P.userData._isMergedBlocks = !0, P.userData._quadToBlock =
|
|
1822
|
+
}), P = new f.Mesh(C, B);
|
|
1823
|
+
P.userData._isMergedBlocks = !0, P.userData._quadToBlock = v, P.userData._offset = { x: h, y: d, z: g }, e.scene.add(P), e.blocks.push(P), j(e), e.camera && e.controls && (e.lastBounds = { minX: N, maxX: O, minY: b, maxY: A, minZ: y, maxZ: E }, Ee(e, { minX: N, maxX: O, minY: b, maxY: A, minZ: y, maxZ: E }));
|
|
1789
1824
|
}
|
|
1790
|
-
function
|
|
1825
|
+
function Ue(e) {
|
|
1791
1826
|
var t;
|
|
1792
1827
|
e.blocks.forEach((n) => {
|
|
1793
1828
|
e.scene.remove(n), n.geometry.dispose(), n.material.dispose();
|
|
1794
|
-
}), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null),
|
|
1829
|
+
}), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null), j(e);
|
|
1795
1830
|
}
|
|
1796
|
-
function
|
|
1831
|
+
function Kn(e, t) {
|
|
1797
1832
|
const n = Math.max(0, Math.min(1, Number(t)));
|
|
1798
1833
|
e.blocks.forEach((r) => {
|
|
1799
1834
|
r.material && (r.material.opacity = n, r.material.transparent = n < 1, r.material.needsUpdate = !0);
|
|
1800
1835
|
});
|
|
1801
1836
|
}
|
|
1802
|
-
function
|
|
1803
|
-
const r = (n == null ? void 0 : n.x) ?? 0, o = (n == null ? void 0 : n.y) ?? 0, i = (n == null ? void 0 : n.z) ?? 0, a = Number(t.x ?? t.center_x ?? 0) + r, c = Number(t.y ?? t.center_y ?? 0) + o, l = Number(t.z ?? t.center_z ?? 0) + i, s = Number(t.dx ?? t.size_x ?? 1), u = Number(t.dy ?? t.size_y ?? 1),
|
|
1837
|
+
function Jn(e, t, n) {
|
|
1838
|
+
const r = (n == null ? void 0 : n.x) ?? 0, o = (n == null ? void 0 : n.y) ?? 0, i = (n == null ? void 0 : n.z) ?? 0, a = Number(t.x ?? t.center_x ?? 0) + r, c = Number(t.y ?? t.center_y ?? 0) + o, l = Number(t.z ?? t.center_z ?? 0) + i, s = Number(t.dx ?? t.size_x ?? 1), u = Number(t.dy ?? t.size_y ?? 1), p = Number(t.dz ?? t.size_z ?? 1);
|
|
1804
1839
|
if (!e._blockHighlightMesh) {
|
|
1805
1840
|
const m = new f.BoxGeometry(1, 1, 1), h = new f.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1 });
|
|
1806
1841
|
e._blockHighlightMesh = new f.Mesh(m, h), e.scene.add(e._blockHighlightMesh);
|
|
1807
1842
|
}
|
|
1808
|
-
return e._blockHighlightMesh.position.set(a, c, l), e._blockHighlightMesh.scale.set(s, u,
|
|
1843
|
+
return e._blockHighlightMesh.position.set(a, c, l), e._blockHighlightMesh.scale.set(s, u, p), e._blockHighlightMesh;
|
|
1809
1844
|
}
|
|
1810
|
-
function
|
|
1845
|
+
function Ye(e) {
|
|
1811
1846
|
var o, i;
|
|
1812
1847
|
if (!e._outlinePass || e.selectables.length === 0) {
|
|
1813
|
-
e._outlinePass &&
|
|
1848
|
+
e._outlinePass && Z(e, null);
|
|
1814
1849
|
return;
|
|
1815
1850
|
}
|
|
1816
1851
|
const t = e.raycaster.intersectObjects(e.selectables, !0);
|
|
1817
1852
|
if (t.length === 0) {
|
|
1818
|
-
|
|
1853
|
+
Z(e, null);
|
|
1819
1854
|
return;
|
|
1820
1855
|
}
|
|
1821
1856
|
const n = t[0], r = n.object;
|
|
1822
1857
|
if ((o = r == null ? void 0 : r.userData) != null && o._isMergedBlocks) {
|
|
1823
1858
|
const a = Math.floor(n.faceIndex / 2), c = (i = r.userData._quadToBlock) == null ? void 0 : i[a];
|
|
1824
1859
|
if (c) {
|
|
1825
|
-
|
|
1860
|
+
Z(e, Jn(e, c, r.userData._offset));
|
|
1826
1861
|
return;
|
|
1827
1862
|
}
|
|
1828
1863
|
}
|
|
1829
|
-
|
|
1864
|
+
Z(e, r);
|
|
1830
1865
|
}
|
|
1831
|
-
function
|
|
1866
|
+
function Qn(e) {
|
|
1832
1867
|
const t = e.renderer;
|
|
1833
1868
|
t && (e.handleCanvasClick = (n) => {
|
|
1834
|
-
var h, d,
|
|
1869
|
+
var h, d, g, N, O, b, A;
|
|
1835
1870
|
if (n.button !== 0) return;
|
|
1836
1871
|
if ((h = e.gizmo) != null && h.domElement) {
|
|
1837
1872
|
const y = e.gizmo.domElement.getBoundingClientRect();
|
|
@@ -1839,18 +1874,18 @@ function Un(e) {
|
|
|
1839
1874
|
return;
|
|
1840
1875
|
}
|
|
1841
1876
|
const r = t.domElement.getBoundingClientRect(), o = n.clientX - r.left, i = n.clientY - r.top;
|
|
1842
|
-
if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera),
|
|
1877
|
+
if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera), Ye(e), e.blocks.length > 0) {
|
|
1843
1878
|
const y = e.raycaster.intersectObjects(e.blocks, !1);
|
|
1844
1879
|
if (y.length > 0) {
|
|
1845
|
-
const
|
|
1846
|
-
if ((d =
|
|
1847
|
-
const
|
|
1848
|
-
|
|
1880
|
+
const E = y[0], k = E.object;
|
|
1881
|
+
if ((d = k == null ? void 0 : k.userData) != null && d._isMergedBlocks && e.blockClickHandler) {
|
|
1882
|
+
const D = Math.floor(E.faceIndex / 2), w = k.userData._quadToBlock[D];
|
|
1883
|
+
w && e.blockClickHandler(w);
|
|
1849
1884
|
}
|
|
1850
1885
|
return;
|
|
1851
1886
|
}
|
|
1852
1887
|
}
|
|
1853
|
-
const a = e.raycaster.intersectObjects(e.drillMeshes, !0), c = e.raycaster.intersectObjects(e.structuralMeshes, !0), l = ((
|
|
1888
|
+
const a = e.raycaster.intersectObjects(e.drillMeshes, !0), c = e.raycaster.intersectObjects(e.structuralMeshes, !0), l = ((g = a[0]) == null ? void 0 : g.distance) ?? 1 / 0;
|
|
1854
1889
|
if ((((N = c[0]) == null ? void 0 : N.distance) ?? 1 / 0) < l && c.length > 0) {
|
|
1855
1890
|
const y = c[0].object;
|
|
1856
1891
|
e.drillholeClickHandler && e.drillholeClickHandler({ type: "structure", ...y.userData });
|
|
@@ -1858,13 +1893,13 @@ function Un(e) {
|
|
|
1858
1893
|
}
|
|
1859
1894
|
if (a.length === 0) return;
|
|
1860
1895
|
let u = a[0].object;
|
|
1861
|
-
for (; u && u.parent && !((
|
|
1896
|
+
for (; u && u.parent && !((O = u.userData) != null && O.holeId); )
|
|
1862
1897
|
u = u.parent;
|
|
1863
|
-
const
|
|
1864
|
-
|
|
1898
|
+
const p = (b = u == null ? void 0 : u.userData) == null ? void 0 : b.holeId, m = (A = u == null ? void 0 : u.userData) == null ? void 0 : A.project;
|
|
1899
|
+
p && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: p, project: m });
|
|
1865
1900
|
}, t.domElement.addEventListener("click", e.handleCanvasClick));
|
|
1866
1901
|
}
|
|
1867
|
-
class
|
|
1902
|
+
class Hr {
|
|
1868
1903
|
constructor() {
|
|
1869
1904
|
this.container = null, this.scene = null, this.camera = null, this.renderer = null, this.controls = null, this.flyControls = null, this.gizmo = null, this.blocks = [], this.drillLines = [], this.drillMeshes = [], this.structuralGroup = null, this.structuralMeshes = [], this.stripLogGroups = [], this.frameId = null, this.clock = new f.Clock(), this.handleCanvasClick = null, this.raycaster = new f.Raycaster(), this.pointer = new f.Vector2(), this.drillholeClickHandler = null, this.blockClickHandler = null, this.controlMode = "orbit", this._tmpDir = new f.Vector3(), this.viewChangeHandler = null, this._lastViewSignature = "", this._lastViewEmitMs = 0, this.selectables = [], this._selectedObject = null, this._composer = null, this._blockHighlightMesh = null, this._outlinePass = null, this.rasterOverlays = /* @__PURE__ */ new Map();
|
|
1870
1905
|
}
|
|
@@ -1878,21 +1913,21 @@ class Nr {
|
|
|
1878
1913
|
const i = new f.DirectionalLight(16777215, 1.5);
|
|
1879
1914
|
i.position.set(10, 10, 5), this.scene.add(i);
|
|
1880
1915
|
const a = new f.AxesHelper(20);
|
|
1881
|
-
this.scene.add(a), this.controls = new
|
|
1916
|
+
this.scene.add(a), this.controls = new it(this.camera, this.renderer.domElement), this.controls.enableDamping = !1, this.controls.screenSpacePanning = !0, this.controls.enableZoom = !0, this.controls.zoomSpeed = 10, this.controls.minDistance = 1e-4, this.controls.maxDistance = 5e6, this.controls.mouseButtons = {
|
|
1882
1917
|
LEFT: f.MOUSE.PAN,
|
|
1883
1918
|
MIDDLE: f.MOUSE.DOLLY,
|
|
1884
1919
|
RIGHT: f.MOUSE.ROTATE
|
|
1885
1920
|
}, this.controls.touches = {
|
|
1886
1921
|
ONE: f.TOUCH.ROTATE,
|
|
1887
1922
|
TWO: f.TOUCH.DOLLY_PAN
|
|
1888
|
-
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new
|
|
1923
|
+
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new st(this.camera, this.renderer.domElement), this.flyControls.movementSpeed = 2e3, this.flyControls.rollSpeed = Math.PI / 12, this.flyControls.dragToLook = !0, this.flyControls.enabled = !1, this.gizmo = new at(this.camera, this.renderer, {
|
|
1889
1924
|
container: this.container,
|
|
1890
1925
|
placement: "top-right",
|
|
1891
1926
|
size: 110,
|
|
1892
1927
|
offset: { top: 12, right: 12 },
|
|
1893
1928
|
animated: !0,
|
|
1894
1929
|
speed: 1.5
|
|
1895
|
-
}), this.gizmo.attachControls(this.controls),
|
|
1930
|
+
}), this.gizmo.attachControls(this.controls), Qn(this), this._wheelRelay = (l) => {
|
|
1896
1931
|
l.target !== this.renderer.domElement && (l.preventDefault(), this.renderer.domElement.dispatchEvent(new WheelEvent("wheel", {
|
|
1897
1932
|
clientX: l.clientX,
|
|
1898
1933
|
clientY: l.clientY,
|
|
@@ -1905,7 +1940,7 @@ class Nr {
|
|
|
1905
1940
|
altKey: l.altKey,
|
|
1906
1941
|
bubbles: !1
|
|
1907
1942
|
})));
|
|
1908
|
-
}, this.container.addEventListener("wheel", this._wheelRelay, { passive: !1 }),
|
|
1943
|
+
}, this.container.addEventListener("wheel", this._wheelRelay, { passive: !1 }), Xn(this);
|
|
1909
1944
|
const c = () => {
|
|
1910
1945
|
var s;
|
|
1911
1946
|
this.frameId = requestAnimationFrame(c);
|
|
@@ -1917,16 +1952,16 @@ class Nr {
|
|
|
1917
1952
|
resize() {
|
|
1918
1953
|
if (!this.container || !this.camera || !this.renderer) return;
|
|
1919
1954
|
const t = this.container.clientWidth, n = this.container.clientHeight;
|
|
1920
|
-
this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(),
|
|
1955
|
+
this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), qn(this, t, n);
|
|
1921
1956
|
}
|
|
1922
1957
|
dispose() {
|
|
1923
|
-
this.frameId && cancelAnimationFrame(this.frameId), this.renderer && this.handleCanvasClick && this.renderer.domElement.removeEventListener("click", this.handleCanvasClick), this.gizmo && (this.gizmo.dispose(), this.gizmo = null), this.viewChangeHandler = null,
|
|
1958
|
+
this.frameId && cancelAnimationFrame(this.frameId), this.renderer && this.handleCanvasClick && this.renderer.domElement.removeEventListener("click", this.handleCanvasClick), this.gizmo && (this.gizmo.dispose(), this.gizmo = null), this.viewChangeHandler = null, Ue(this), je(this), ce(this), Ve(this), fn(this), Se(this), this.container && this._wheelRelay && this.container.removeEventListener("wheel", this._wheelRelay), this.controls && this.controls.dispose(), this.flyControls && this.flyControls.dispose(), this.renderer && (this.renderer.dispose(), this.container && this.renderer.domElement && this.container.removeChild(this.renderer.domElement));
|
|
1924
1959
|
}
|
|
1925
1960
|
// ---------------------------------------------------------------------------
|
|
1926
1961
|
// Data renderers — delegate to domain modules
|
|
1927
1962
|
// ---------------------------------------------------------------------------
|
|
1928
1963
|
setDrillholes(t, n = {}) {
|
|
1929
|
-
|
|
1964
|
+
In(this, t, n);
|
|
1930
1965
|
}
|
|
1931
1966
|
/**
|
|
1932
1967
|
* Add floating 2D strip log panels beside drillholes in the 3D scene.
|
|
@@ -1941,13 +1976,13 @@ class Nr {
|
|
|
1941
1976
|
* - `options` {object} — optional: panelWidth, lateralOffset, color, valueMin, valueMax
|
|
1942
1977
|
*/
|
|
1943
1978
|
setStripLogs(t, n) {
|
|
1944
|
-
|
|
1979
|
+
jn(this, t, n);
|
|
1945
1980
|
}
|
|
1946
1981
|
/**
|
|
1947
1982
|
* Remove all strip log panels from the scene and free GPU resources.
|
|
1948
1983
|
*/
|
|
1949
1984
|
clearStripLogs() {
|
|
1950
|
-
|
|
1985
|
+
ce(this);
|
|
1951
1986
|
}
|
|
1952
1987
|
/**
|
|
1953
1988
|
* Render block model data as a single merged mesh of exterior faces only.
|
|
@@ -1957,20 +1992,20 @@ class Nr {
|
|
|
1957
1992
|
* @param {Object} [options]
|
|
1958
1993
|
*/
|
|
1959
1994
|
setBlocks(t, n, r, o = {}) {
|
|
1960
|
-
|
|
1995
|
+
Wn(this, t, n, r, o);
|
|
1961
1996
|
}
|
|
1962
1997
|
/**
|
|
1963
1998
|
* Update the opacity of all currently rendered blocks.
|
|
1964
1999
|
* @param {number} opacity - New opacity value between 0 and 1
|
|
1965
2000
|
*/
|
|
1966
2001
|
setBlockOpacity(t) {
|
|
1967
|
-
|
|
2002
|
+
Kn(this, t);
|
|
1968
2003
|
}
|
|
1969
2004
|
setStructuralDiscs(t, n, r = {}) {
|
|
1970
|
-
|
|
2005
|
+
tn(this, t, n, r);
|
|
1971
2006
|
}
|
|
1972
2007
|
setStructuralDiscsVisible(t) {
|
|
1973
|
-
|
|
2008
|
+
nn(this, t);
|
|
1974
2009
|
}
|
|
1975
2010
|
// ---------------------------------------------------------------------------
|
|
1976
2011
|
// Click handlers
|
|
@@ -1992,41 +2027,41 @@ class Nr {
|
|
|
1992
2027
|
this.viewChangeHandler = typeof t == "function" ? t : null;
|
|
1993
2028
|
}
|
|
1994
2029
|
getViewState() {
|
|
1995
|
-
return
|
|
2030
|
+
return He(this);
|
|
1996
2031
|
}
|
|
1997
2032
|
setViewState(t) {
|
|
1998
|
-
return
|
|
2033
|
+
return hn(this, t);
|
|
1999
2034
|
}
|
|
2000
2035
|
_buildViewSignature(t) {
|
|
2001
|
-
return
|
|
2036
|
+
return Me(t);
|
|
2002
2037
|
}
|
|
2003
2038
|
_emitViewChangeIfNeeded() {
|
|
2004
|
-
|
|
2039
|
+
bn(this);
|
|
2005
2040
|
}
|
|
2006
2041
|
_fitCameraToBounds({ minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
|
|
2007
|
-
|
|
2042
|
+
Ee(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a });
|
|
2008
2043
|
}
|
|
2009
2044
|
recenterCameraToOrigin(t = 1e3) {
|
|
2010
|
-
|
|
2045
|
+
pn(this, t);
|
|
2011
2046
|
}
|
|
2012
2047
|
lookDown(t = 2e3) {
|
|
2013
|
-
|
|
2048
|
+
gn(this, t);
|
|
2014
2049
|
}
|
|
2015
2050
|
pan(t = 0, n = 0) {
|
|
2016
|
-
|
|
2051
|
+
yn(this, t, n);
|
|
2017
2052
|
}
|
|
2018
2053
|
dolly(t = 1.1) {
|
|
2019
|
-
|
|
2054
|
+
_n(this, t);
|
|
2020
2055
|
}
|
|
2021
2056
|
focusOnLastBounds(t = 1.2) {
|
|
2022
|
-
|
|
2057
|
+
Mn(this, t);
|
|
2023
2058
|
}
|
|
2024
2059
|
/**
|
|
2025
2060
|
* Change the camera field-of-view while keeping the visible scene the same apparent size.
|
|
2026
2061
|
* @param {number} fovDeg - Desired FOV in degrees
|
|
2027
2062
|
*/
|
|
2028
2063
|
setCameraFov(t) {
|
|
2029
|
-
|
|
2064
|
+
Nn(this, t);
|
|
2030
2065
|
}
|
|
2031
2066
|
/**
|
|
2032
2067
|
* Set the scene background colour.
|
|
@@ -2036,13 +2071,13 @@ class Nr {
|
|
|
2036
2071
|
this.scene && (this.scene.background = new f.Color(t === "black" ? 0 : 16777215));
|
|
2037
2072
|
}
|
|
2038
2073
|
setControlMode(t = "orbit") {
|
|
2039
|
-
|
|
2074
|
+
On(this, t);
|
|
2040
2075
|
}
|
|
2041
2076
|
// ---------------------------------------------------------------------------
|
|
2042
2077
|
// Selection glow public API
|
|
2043
2078
|
// ---------------------------------------------------------------------------
|
|
2044
2079
|
_syncSelectables() {
|
|
2045
|
-
|
|
2080
|
+
j(this);
|
|
2046
2081
|
}
|
|
2047
2082
|
/**
|
|
2048
2083
|
* Register the objects that are candidates for click-select glow.
|
|
@@ -2056,7 +2091,7 @@ class Nr {
|
|
|
2056
2091
|
* @param {THREE.Object3D|null} object
|
|
2057
2092
|
*/
|
|
2058
2093
|
selectObject(t) {
|
|
2059
|
-
|
|
2094
|
+
Z(this, t || null);
|
|
2060
2095
|
}
|
|
2061
2096
|
/**
|
|
2062
2097
|
* Return the currently selected object, or null if nothing is selected.
|
|
@@ -2069,11 +2104,11 @@ class Nr {
|
|
|
2069
2104
|
* Dispose the effect composer and all GPU resources used by the selection glow.
|
|
2070
2105
|
*/
|
|
2071
2106
|
disposeGlow() {
|
|
2072
|
-
|
|
2107
|
+
Se(this);
|
|
2073
2108
|
}
|
|
2074
2109
|
/** @private */
|
|
2075
2110
|
_updateSelectionFromPointer() {
|
|
2076
|
-
|
|
2111
|
+
Ye(this);
|
|
2077
2112
|
}
|
|
2078
2113
|
// ---------------------------------------------------------------------------
|
|
2079
2114
|
// Raster overlay API — delegate to rasterOverlayScene
|
|
@@ -2083,14 +2118,14 @@ class Nr {
|
|
|
2083
2118
|
* @param {object} layer - Layer descriptor returned by createRasterOverlay()
|
|
2084
2119
|
*/
|
|
2085
2120
|
addRasterOverlay(t) {
|
|
2086
|
-
|
|
2121
|
+
an(this, t);
|
|
2087
2122
|
}
|
|
2088
2123
|
/**
|
|
2089
2124
|
* Remove a raster overlay from the scene and dispose its GPU resources.
|
|
2090
2125
|
* @param {string} id - Overlay id
|
|
2091
2126
|
*/
|
|
2092
2127
|
removeRasterOverlay(t) {
|
|
2093
|
-
|
|
2128
|
+
_e(this, t);
|
|
2094
2129
|
}
|
|
2095
2130
|
/**
|
|
2096
2131
|
* Set the opacity of a raster overlay at runtime.
|
|
@@ -2098,7 +2133,7 @@ class Nr {
|
|
|
2098
2133
|
* @param {number} opacity - New opacity [0, 1]
|
|
2099
2134
|
*/
|
|
2100
2135
|
setRasterOverlayOpacity(t, n) {
|
|
2101
|
-
|
|
2136
|
+
ln(this, t, n);
|
|
2102
2137
|
}
|
|
2103
2138
|
/**
|
|
2104
2139
|
* Show or hide a raster overlay.
|
|
@@ -2106,7 +2141,7 @@ class Nr {
|
|
|
2106
2141
|
* @param {boolean} visible
|
|
2107
2142
|
*/
|
|
2108
2143
|
setRasterOverlayVisibility(t, n) {
|
|
2109
|
-
|
|
2144
|
+
cn(this, t, n);
|
|
2110
2145
|
}
|
|
2111
2146
|
/**
|
|
2112
2147
|
* Update the elevation (Z position) of a raster overlay.
|
|
@@ -2114,7 +2149,7 @@ class Nr {
|
|
|
2114
2149
|
* @param {number} elevation
|
|
2115
2150
|
*/
|
|
2116
2151
|
setRasterOverlayElevation(t, n) {
|
|
2117
|
-
|
|
2152
|
+
un(this, t, n);
|
|
2118
2153
|
}
|
|
2119
2154
|
/**
|
|
2120
2155
|
* Return a raster overlay by id, or undefined if not found.
|
|
@@ -2122,131 +2157,151 @@ class Nr {
|
|
|
2122
2157
|
* @returns {object|undefined}
|
|
2123
2158
|
*/
|
|
2124
2159
|
getRasterOverlay(t) {
|
|
2125
|
-
return
|
|
2160
|
+
return mn(this, t);
|
|
2126
2161
|
}
|
|
2127
2162
|
/**
|
|
2128
2163
|
* Return all raster overlay layers in insertion order.
|
|
2129
2164
|
* @returns {object[]}
|
|
2130
2165
|
*/
|
|
2131
2166
|
listRasterOverlays() {
|
|
2132
|
-
return
|
|
2167
|
+
return dn(this);
|
|
2133
2168
|
}
|
|
2134
2169
|
}
|
|
2135
2170
|
export {
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2171
|
+
be as $,
|
|
2172
|
+
W as A,
|
|
2173
|
+
Mr as B,
|
|
2174
|
+
Er as C,
|
|
2175
|
+
ge as D,
|
|
2176
|
+
fe as E,
|
|
2177
|
+
ne as F,
|
|
2178
|
+
Ce as G,
|
|
2144
2179
|
H,
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2180
|
+
Nr as I,
|
|
2181
|
+
M as J,
|
|
2182
|
+
vr as K,
|
|
2183
|
+
ue as L,
|
|
2184
|
+
pe as M,
|
|
2185
|
+
he as N,
|
|
2186
|
+
Fr as O,
|
|
2187
|
+
xe as P,
|
|
2188
|
+
vt as Q,
|
|
2189
|
+
ve as R,
|
|
2190
|
+
re as S,
|
|
2191
|
+
Q as T,
|
|
2192
|
+
Hr as U,
|
|
2193
|
+
ze as V,
|
|
2194
|
+
dt as W,
|
|
2195
|
+
yt as X,
|
|
2196
|
+
Nt as Y,
|
|
2197
|
+
te as Z,
|
|
2198
|
+
Mt as _,
|
|
2199
|
+
me as a,
|
|
2200
|
+
Or as a$,
|
|
2201
|
+
ar as a0,
|
|
2202
|
+
we as a1,
|
|
2203
|
+
hr as a2,
|
|
2204
|
+
ht as a3,
|
|
2205
|
+
dr as a4,
|
|
2206
|
+
mr as a5,
|
|
2207
|
+
_t as a6,
|
|
2208
|
+
ee as a7,
|
|
2209
|
+
Gt as a8,
|
|
2210
|
+
G as a9,
|
|
2211
|
+
Me as aA,
|
|
2212
|
+
xr as aB,
|
|
2213
|
+
Lt as aC,
|
|
2214
|
+
fn as aD,
|
|
2215
|
+
ce as aE,
|
|
2216
|
+
Ft as aF,
|
|
2217
|
+
Rr as aG,
|
|
2218
|
+
Lr as aH,
|
|
2219
|
+
Qt as aI,
|
|
2220
|
+
_n as aJ,
|
|
2221
|
+
bn as aK,
|
|
2222
|
+
Dt as aL,
|
|
2223
|
+
Ee as aM,
|
|
2224
|
+
Mn as aN,
|
|
2225
|
+
wr as aO,
|
|
2226
|
+
Ln as aP,
|
|
2227
|
+
St as aQ,
|
|
2228
|
+
Bt as aR,
|
|
2229
|
+
Re as aS,
|
|
2230
|
+
Wt as aT,
|
|
2231
|
+
Vr as aU,
|
|
2232
|
+
mn as aV,
|
|
2233
|
+
He as aW,
|
|
2234
|
+
wt as aX,
|
|
2235
|
+
dn as aY,
|
|
2236
|
+
Sr as aZ,
|
|
2237
|
+
kr as a_,
|
|
2238
|
+
It as aa,
|
|
2239
|
+
zn as ab,
|
|
2240
|
+
En as ac,
|
|
2241
|
+
pr as ad,
|
|
2242
|
+
Ne as ae,
|
|
2243
|
+
lr as af,
|
|
2244
|
+
Tt as ag,
|
|
2245
|
+
cr as ah,
|
|
2246
|
+
Rt as ai,
|
|
2247
|
+
Vt as aj,
|
|
2248
|
+
bt as ak,
|
|
2249
|
+
pt as al,
|
|
2250
|
+
gt as am,
|
|
2251
|
+
Pn as an,
|
|
2252
|
+
Bn as ao,
|
|
2253
|
+
Tn as ap,
|
|
2254
|
+
ur as aq,
|
|
2255
|
+
ft as ar,
|
|
2256
|
+
fr as as,
|
|
2257
|
+
an as at,
|
|
2258
|
+
xt as au,
|
|
2259
|
+
Pr as av,
|
|
2260
|
+
qt as aw,
|
|
2261
|
+
Gn as ax,
|
|
2262
|
+
Vn as ay,
|
|
2263
|
+
en as az,
|
|
2264
|
+
K as b,
|
|
2265
|
+
gn as b0,
|
|
2266
|
+
At as b1,
|
|
2267
|
+
on as b2,
|
|
2268
|
+
Rn as b3,
|
|
2269
|
+
yn as b4,
|
|
2270
|
+
Dr as b5,
|
|
2271
|
+
pn as b6,
|
|
2272
|
+
_e as b7,
|
|
2273
|
+
Pt as b8,
|
|
2274
|
+
On as b9,
|
|
2275
|
+
Nn as ba,
|
|
2276
|
+
un as bb,
|
|
2277
|
+
ln as bc,
|
|
2278
|
+
cn as bd,
|
|
2279
|
+
jn as be,
|
|
2280
|
+
hn as bf,
|
|
2281
|
+
Et as bg,
|
|
2282
|
+
Ar as c,
|
|
2283
|
+
de as d,
|
|
2284
|
+
Ie as e,
|
|
2285
|
+
br as f,
|
|
2286
|
+
ye as g,
|
|
2287
|
+
le as h,
|
|
2288
|
+
ae as i,
|
|
2289
|
+
J as j,
|
|
2290
|
+
Ot as k,
|
|
2291
|
+
$t as l,
|
|
2292
|
+
zt as m,
|
|
2293
|
+
Tr as n,
|
|
2294
|
+
Br as o,
|
|
2295
|
+
Fe as p,
|
|
2296
|
+
Xt as q,
|
|
2297
|
+
Ct as r,
|
|
2298
|
+
_ as s,
|
|
2299
|
+
Ir as t,
|
|
2300
|
+
Cr as u,
|
|
2301
|
+
_r as v,
|
|
2302
|
+
se as w,
|
|
2303
|
+
gr as x,
|
|
2304
|
+
yr as y,
|
|
2305
|
+
zr as z
|
|
2251
2306
|
};
|
|
2252
|
-
//# sourceMappingURL=baselode3dScene-
|
|
2307
|
+
//# sourceMappingURL=baselode3dScene-qMfVRKxK.js.map
|