baselode 0.1.19 → 0.1.21
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.
- package/dist/baselode.js +1423 -1233
- package/dist/baselode.js.map +1 -1
- package/dist/{baselode3dScene-DbELmWnr.js → baselode3dScene-CLEvddGM.js} +678 -617
- package/dist/baselode3dScene-CLEvddGM.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tool-ui.js +35 -35
- package/package.json +1 -1
- package/dist/baselode3dScene-DbELmWnr.js.map +0 -1
|
@@ -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 lr = "datasource", H = "hole_id", dt = "_collar_id", we = "datasource_hole_id", cr = "hole_type", ur = "max_depth", mr = "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", dr = "date_start", fr = "date_end", W = "azimuth", K = "dip", hr = "survey_type", pt = "sample_id", br = "datasource_sample_id", ne = "from", Q = "to", pe = "mid", ge = "depth", gt = "strike", Fe = "alpha", ve = "beta", Ie = "geology_code", Ce = "geology_description", yt = "comments", G = "extra", pr = -999.25, gr = -999.25, yr = {
|
|
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
|
+
}, _r = {
|
|
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
|
+
}, Mr = {
|
|
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
|
+
}, Er = {
|
|
51
66
|
[H]: "string",
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
|
|
67
|
+
[ne]: "number",
|
|
68
|
+
[Q]: "number",
|
|
69
|
+
[pe]: "number",
|
|
70
|
+
[Ie]: "string",
|
|
71
|
+
[Ce]: "string",
|
|
72
|
+
// Per-row dict of source-specific fields outside the canonical schema.
|
|
73
|
+
[G]: "object"
|
|
74
|
+
}, zr = {
|
|
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
|
+
}, Nr = {
|
|
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
|
+
}, Or = {
|
|
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
|
+
[Ie]: [
|
|
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
|
+
[Ce]: [
|
|
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 kr(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 Lr(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 Dr(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
|
+
}, Pe = {};
|
|
307
|
+
Object.entries(kt).forEach(([e, t]) => {
|
|
273
308
|
t.forEach((n) => {
|
|
274
|
-
|
|
309
|
+
Pe[n.toLowerCase()] = e;
|
|
275
310
|
});
|
|
276
311
|
});
|
|
277
|
-
function
|
|
312
|
+
function Lt(e) {
|
|
278
313
|
const t = {};
|
|
279
314
|
return Object.entries(e).forEach(([n, r]) => {
|
|
280
|
-
const o =
|
|
315
|
+
const o = Pe[n.toLowerCase().trim()] || n;
|
|
281
316
|
t[o] = r;
|
|
282
317
|
}), t;
|
|
283
318
|
}
|
|
284
|
-
function
|
|
319
|
+
function Sr(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(Lt).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 wr(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 At(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 xr(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] = At(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 Fr(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) {
|
|
@@ -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, L = Number.isFinite(g) && Number.isFinite(N) ? d + a * (N - d) : d, y = b * Math.PI / 180, E = L * 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), L = Number(i.y) - Number(o.y), y = Number(i.z) - Number(o.z),
|
|
387
|
-
if (
|
|
388
|
-
u = b /
|
|
421
|
+
const b = Number(i.x) - Number(o.x), L = Number(i.y) - Number(o.y), y = Number(i.z) - Number(o.z), E = Math.sqrt(b * b + L * L + 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 = L / 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, L = t * Math.PI / 180 * i, y = Math.cos(L), E = Math.sin(L), 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
|
+
], A = (90 - e) * Math.PI / 180, x = Math.cos(A), S = Math.sin(A), v = x * w[0] + S * s[0], C = x * w[1] + S * s[1], I = x * w[2] + S * s[2], P = Math.sqrt(v * v + C * C + I * I);
|
|
450
|
+
return P < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: v / P, ny: C / P, nz: I / P };
|
|
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,
|
|
471
|
+
const { x: u, y: p, z: m, dx: h, dy: d, dz: g } = s;
|
|
472
|
+
let N, O, b;
|
|
438
473
|
const L = i.alpha != null ? Number(i.alpha) : null, y = i.beta != null ? Number(i.beta) : null;
|
|
439
474
|
if (Number.isFinite(L)) {
|
|
440
|
-
const
|
|
441
|
-
N =
|
|
475
|
+
const E = Number.isFinite(y) ? y : 0, k = xt(L, 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", vr = vt, It = [
|
|
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: It,
|
|
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
|
+
}, Ir = ye, _ = {
|
|
609
644
|
bg: "#1b1b1f",
|
|
610
645
|
panel: "#25252a",
|
|
611
646
|
ink: "#f0f0e4",
|
|
@@ -617,19 +652,18 @@ 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", Tr = {
|
|
621
656
|
layout: {
|
|
622
657
|
font: {
|
|
623
|
-
family: "Inter,
|
|
658
|
+
family: "Inter, system-ui, sans-serif",
|
|
624
659
|
color: _.ink,
|
|
625
|
-
size:
|
|
660
|
+
size: 12
|
|
626
661
|
},
|
|
627
662
|
title: {
|
|
628
|
-
x: 0.
|
|
629
|
-
xanchor: "left",
|
|
663
|
+
x: 0.05,
|
|
630
664
|
font: {
|
|
631
|
-
family: "Inter,
|
|
632
|
-
size:
|
|
665
|
+
family: "Inter, system-ui, sans-serif",
|
|
666
|
+
size: 14,
|
|
633
667
|
color: _.ink
|
|
634
668
|
}
|
|
635
669
|
},
|
|
@@ -649,9 +683,9 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
649
683
|
bgcolor: _.panel,
|
|
650
684
|
bordercolor: _.accent,
|
|
651
685
|
font: {
|
|
652
|
-
family: "Inter,
|
|
686
|
+
family: "Inter, system-ui, sans-serif",
|
|
653
687
|
color: _.ink,
|
|
654
|
-
size:
|
|
688
|
+
size: 12
|
|
655
689
|
}
|
|
656
690
|
},
|
|
657
691
|
legend: {
|
|
@@ -659,9 +693,9 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
659
693
|
bordercolor: _.line,
|
|
660
694
|
borderwidth: 1,
|
|
661
695
|
font: {
|
|
662
|
-
family: "Inter,
|
|
696
|
+
family: "Inter, system-ui, sans-serif",
|
|
663
697
|
color: _.ink,
|
|
664
|
-
size:
|
|
698
|
+
size: 11
|
|
665
699
|
},
|
|
666
700
|
orientation: "h",
|
|
667
701
|
yanchor: "bottom",
|
|
@@ -670,7 +704,10 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
670
704
|
x: 0
|
|
671
705
|
},
|
|
672
706
|
xaxis: {
|
|
673
|
-
showline: !
|
|
707
|
+
showline: !0,
|
|
708
|
+
linewidth: 1,
|
|
709
|
+
linecolor: _.line,
|
|
710
|
+
mirror: !1,
|
|
674
711
|
ticks: "outside",
|
|
675
712
|
tickwidth: 1,
|
|
676
713
|
tickcolor: _.muted_1,
|
|
@@ -679,11 +716,14 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
679
716
|
gridcolor: _.grid,
|
|
680
717
|
gridwidth: 1,
|
|
681
718
|
zeroline: !1,
|
|
682
|
-
title_font: { color: _.ink },
|
|
683
|
-
tickfont: { color: _.ink_soft }
|
|
719
|
+
title_font: { color: _.ink, size: 12 },
|
|
720
|
+
tickfont: { color: _.ink_soft, size: 10 }
|
|
684
721
|
},
|
|
685
722
|
yaxis: {
|
|
686
|
-
showline: !
|
|
723
|
+
showline: !0,
|
|
724
|
+
linewidth: 1,
|
|
725
|
+
linecolor: _.line,
|
|
726
|
+
mirror: !1,
|
|
687
727
|
ticks: "outside",
|
|
688
728
|
tickwidth: 1,
|
|
689
729
|
tickcolor: _.muted_1,
|
|
@@ -692,8 +732,8 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
692
732
|
gridcolor: _.grid,
|
|
693
733
|
gridwidth: 1,
|
|
694
734
|
zeroline: !1,
|
|
695
|
-
title_font: { color: _.ink },
|
|
696
|
-
tickfont: { color: _.ink_soft }
|
|
735
|
+
title_font: { color: _.ink, size: 12 },
|
|
736
|
+
tickfont: { color: _.ink_soft, size: 10 }
|
|
697
737
|
},
|
|
698
738
|
bargap: 0.18,
|
|
699
739
|
bargroupgap: 0.08
|
|
@@ -760,7 +800,7 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
760
800
|
}
|
|
761
801
|
}]
|
|
762
802
|
}
|
|
763
|
-
},
|
|
803
|
+
}, Ct = "#7f7f7f", te = {
|
|
764
804
|
Au: "#FFD700",
|
|
765
805
|
// gold
|
|
766
806
|
Ag: "#C0C0C0",
|
|
@@ -797,7 +837,7 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
797
837
|
// aluminium / yellow
|
|
798
838
|
U: "#8BC34A"
|
|
799
839
|
// uranium / lime green
|
|
800
|
-
},
|
|
840
|
+
}, Tt = {
|
|
801
841
|
// Sedimentary
|
|
802
842
|
shale: "#607D8B",
|
|
803
843
|
mudstone: "#78909C",
|
|
@@ -836,11 +876,11 @@ const Ot = "baselode", hr = Ot, Lt = [
|
|
|
836
876
|
calcite: "#F9FBE7",
|
|
837
877
|
vein: "#FFFFFF",
|
|
838
878
|
unknown: "#9E9E9E"
|
|
839
|
-
},
|
|
840
|
-
commodity:
|
|
841
|
-
lithology:
|
|
879
|
+
}, re = {
|
|
880
|
+
commodity: te,
|
|
881
|
+
lithology: Tt
|
|
842
882
|
};
|
|
843
|
-
function
|
|
883
|
+
function Pt(e, t, n = Ct) {
|
|
844
884
|
if (!t || e == null) return n;
|
|
845
885
|
const r = String(e).trim();
|
|
846
886
|
if (Object.prototype.hasOwnProperty.call(t, r)) return t[r];
|
|
@@ -849,13 +889,13 @@ function wt(e, t, n = Dt) {
|
|
|
849
889
|
if (String(i).trim().toLowerCase() === o) return a;
|
|
850
890
|
return n;
|
|
851
891
|
}
|
|
852
|
-
function
|
|
892
|
+
function Bt(e) {
|
|
853
893
|
if (e == null) return {};
|
|
854
894
|
if (typeof e == "string") {
|
|
855
895
|
const t = e.trim().toLowerCase();
|
|
856
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
857
|
-
return
|
|
858
|
-
const n = Object.keys(
|
|
896
|
+
if (Object.prototype.hasOwnProperty.call(re, t))
|
|
897
|
+
return re[t];
|
|
898
|
+
const n = Object.keys(re).sort().join(", ");
|
|
859
899
|
throw new RangeError(
|
|
860
900
|
`Unknown built-in colour map '${e}'. Available maps: ${n}`
|
|
861
901
|
);
|
|
@@ -865,39 +905,40 @@ function xt(e) {
|
|
|
865
905
|
`colourMap must be null, a string, or a plain object; got ${Array.isArray(e) ? "Array" : Object.prototype.toString.call(e)}`
|
|
866
906
|
);
|
|
867
907
|
}
|
|
868
|
-
const
|
|
869
|
-
function
|
|
908
|
+
const Rt = "#8b1e3f", Vt = "#a8324f";
|
|
909
|
+
function Ht(e) {
|
|
870
910
|
if (!e) return null;
|
|
871
911
|
const t = e.split(/[_\-/\s]+/);
|
|
872
912
|
for (const n of t) {
|
|
873
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
874
|
-
return
|
|
913
|
+
if (Object.prototype.hasOwnProperty.call(te, n))
|
|
914
|
+
return te[n];
|
|
875
915
|
const r = n.toLowerCase();
|
|
876
|
-
for (const [o, i] of Object.entries(
|
|
916
|
+
for (const [o, i] of Object.entries(te))
|
|
877
917
|
if (o.toLowerCase() === r) return i;
|
|
878
918
|
}
|
|
879
919
|
return null;
|
|
880
920
|
}
|
|
881
|
-
const
|
|
882
|
-
function
|
|
921
|
+
const Gt = "#6b7280", jt = { l: 42, r: 4, t: 4, b: 36 }, Oe = 10, ke = 11, Ut = 6;
|
|
922
|
+
function Le(e) {
|
|
883
923
|
return e ? typeof e == "string" ? { text: e } : e : {};
|
|
884
924
|
}
|
|
885
925
|
function Be(e = {}) {
|
|
886
|
-
const t =
|
|
926
|
+
const t = Le(e.xaxis && e.xaxis.title), n = Le(e.yaxis && e.yaxis.title);
|
|
887
927
|
return {
|
|
888
928
|
...e,
|
|
889
|
-
margin:
|
|
929
|
+
margin: jt,
|
|
890
930
|
autosize: !0,
|
|
891
931
|
width: void 0,
|
|
892
932
|
xaxis: {
|
|
893
933
|
...e.xaxis || {},
|
|
894
934
|
tickfont: {
|
|
895
935
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
896
|
-
size:
|
|
936
|
+
size: Oe
|
|
897
937
|
},
|
|
898
938
|
title: {
|
|
899
939
|
...t,
|
|
900
|
-
font: { ...t.font || {}, size:
|
|
940
|
+
font: { ...t.font || {}, size: ke },
|
|
941
|
+
standoff: t.standoff ?? Ut
|
|
901
942
|
}
|
|
902
943
|
},
|
|
903
944
|
yaxis: {
|
|
@@ -905,16 +946,16 @@ function Be(e = {}) {
|
|
|
905
946
|
automargin: !0,
|
|
906
947
|
tickfont: {
|
|
907
948
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
908
|
-
size:
|
|
949
|
+
size: Oe
|
|
909
950
|
},
|
|
910
951
|
title: {
|
|
911
952
|
...n,
|
|
912
|
-
font: { ...n.font || {}, size:
|
|
953
|
+
font: { ...n.font || {}, size: ke }
|
|
913
954
|
}
|
|
914
955
|
}
|
|
915
956
|
};
|
|
916
957
|
}
|
|
917
|
-
function
|
|
958
|
+
function Pr(e, t) {
|
|
918
959
|
var r;
|
|
919
960
|
if (!e || !t) return !1;
|
|
920
961
|
const n = e.points || [];
|
|
@@ -925,7 +966,7 @@ function yr(e, t) {
|
|
|
925
966
|
}
|
|
926
967
|
return !1;
|
|
927
968
|
}
|
|
928
|
-
function
|
|
969
|
+
function Br(e, t, n) {
|
|
929
970
|
if (!e || !t) return [];
|
|
930
971
|
const r = (e == null ? void 0 : e.points) || [], o = [], i = /* @__PURE__ */ new Set();
|
|
931
972
|
return r.forEach((a) => {
|
|
@@ -943,22 +984,22 @@ function _r(e, t, n) {
|
|
|
943
984
|
const u = `${t}:${c}-${l}:${String(s)}`;
|
|
944
985
|
if (i.has(u)) return;
|
|
945
986
|
i.add(u);
|
|
946
|
-
const
|
|
987
|
+
const p = (c + l) / 2, m = n ? s : Number(s);
|
|
947
988
|
!n && !Number.isFinite(m) || o.push({
|
|
948
|
-
z:
|
|
989
|
+
z: p,
|
|
949
990
|
val: m,
|
|
950
991
|
from: c,
|
|
951
992
|
to: l,
|
|
952
|
-
errorPlus: l -
|
|
953
|
-
errorMinus:
|
|
993
|
+
errorPlus: l - p,
|
|
994
|
+
errorMinus: p - c
|
|
954
995
|
});
|
|
955
996
|
}), o.sort((a, c) => c.z - a.z);
|
|
956
997
|
}
|
|
957
|
-
function
|
|
998
|
+
function Yt(e, t, n, r) {
|
|
958
999
|
if (!e.length) return { data: [], layout: {} };
|
|
959
1000
|
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
1001
|
if (!o.length) return { data: [], layout: {} };
|
|
961
|
-
const i =
|
|
1002
|
+
const i = Bt(n), a = [
|
|
962
1003
|
"#1f77b4",
|
|
963
1004
|
// blue
|
|
964
1005
|
"#ff7f0e",
|
|
@@ -990,7 +1031,7 @@ function Bt(e, t, n, r) {
|
|
|
990
1031
|
], c = [...new Set(o.map((m) => m.category))];
|
|
991
1032
|
function l(m, h) {
|
|
992
1033
|
if (i && Object.keys(i).length > 0) {
|
|
993
|
-
const d =
|
|
1034
|
+
const d = Pt(m, i, null);
|
|
994
1035
|
if (d !== null) return d;
|
|
995
1036
|
}
|
|
996
1037
|
return a[h % a.length];
|
|
@@ -1019,54 +1060,54 @@ function Bt(e, t, n, r) {
|
|
|
1019
1060
|
yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
|
|
1020
1061
|
showlegend: !1,
|
|
1021
1062
|
title: t || void 0,
|
|
1022
|
-
template: r !== void 0 ? r :
|
|
1063
|
+
template: r !== void 0 ? r : ye
|
|
1023
1064
|
}) };
|
|
1024
1065
|
}
|
|
1025
|
-
function
|
|
1066
|
+
function $t(e, t, n, r, o) {
|
|
1026
1067
|
if (!e.length) return { data: [], layout: {} };
|
|
1027
|
-
const i = n === "bar", a = n === "markers", c = n === "line", l = r ||
|
|
1068
|
+
const i = n === "bar", a = n === "markers", c = n === "line", l = r || Rt, s = r || Vt, u = {
|
|
1028
1069
|
x: e.map((d) => d.val),
|
|
1029
1070
|
y: e.map((d) => d.z),
|
|
1030
1071
|
hovertemplate: `${t}: %{x}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`,
|
|
1031
1072
|
customdata: e.map((d) => [Math.min(d.from, d.to), Math.max(d.from, d.to)])
|
|
1032
|
-
},
|
|
1073
|
+
}, p = {
|
|
1033
1074
|
type: "data",
|
|
1034
1075
|
symmetric: !1,
|
|
1035
1076
|
array: e.map((d) => d.errorPlus),
|
|
1036
1077
|
arrayminus: e.map((d) => d.errorMinus),
|
|
1037
1078
|
thickness: 1.5,
|
|
1038
1079
|
width: 2,
|
|
1039
|
-
color:
|
|
1080
|
+
color: Gt
|
|
1040
1081
|
};
|
|
1041
1082
|
return { data: [i ? {
|
|
1042
1083
|
...u,
|
|
1043
1084
|
type: "bar",
|
|
1044
1085
|
orientation: "h",
|
|
1045
1086
|
marker: { color: l },
|
|
1046
|
-
error_y:
|
|
1087
|
+
error_y: p
|
|
1047
1088
|
} : {
|
|
1048
1089
|
...u,
|
|
1049
1090
|
type: "scatter",
|
|
1050
1091
|
mode: a ? "markers" : c ? "lines" : "lines+markers",
|
|
1051
1092
|
line: { color: l, width: 2 },
|
|
1052
1093
|
marker: { size: 7, color: s },
|
|
1053
|
-
error_y: c ? void 0 :
|
|
1094
|
+
error_y: c ? void 0 : p
|
|
1054
1095
|
}], layout: Be({
|
|
1055
1096
|
xaxis: { title: t, zeroline: !1 },
|
|
1056
1097
|
yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
|
|
1057
1098
|
barmode: "overlay",
|
|
1058
1099
|
showlegend: !1,
|
|
1059
|
-
template: o !== void 0 ? o :
|
|
1100
|
+
template: o !== void 0 ? o : ye
|
|
1060
1101
|
}) };
|
|
1061
1102
|
}
|
|
1062
|
-
function
|
|
1103
|
+
function Xt({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
|
|
1063
1104
|
if (!e || !e.length || !n) return { data: [], layout: {} };
|
|
1064
1105
|
if (t || r === "categorical")
|
|
1065
|
-
return
|
|
1066
|
-
const a =
|
|
1067
|
-
return
|
|
1106
|
+
return Yt(e, n, o, i);
|
|
1107
|
+
const a = Ht(n);
|
|
1108
|
+
return $t(e, n, r, a, i);
|
|
1068
1109
|
}
|
|
1069
|
-
function
|
|
1110
|
+
function Rr(e = [], {
|
|
1070
1111
|
fromCol: t = "from",
|
|
1071
1112
|
toCol: n = "to",
|
|
1072
1113
|
categoryCol: r = "geology_code",
|
|
@@ -1077,16 +1118,16 @@ function Mr(e = [], {
|
|
|
1077
1118
|
return e.forEach((c) => {
|
|
1078
1119
|
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
1120
|
if (!Number.isFinite(l) || !Number.isFinite(s) || s <= l || u == null || `${u}`.trim() === "") return;
|
|
1080
|
-
const
|
|
1121
|
+
const p = (l + s) / 2;
|
|
1081
1122
|
a.push({
|
|
1082
|
-
z:
|
|
1123
|
+
z: p,
|
|
1083
1124
|
val: `${u}`,
|
|
1084
1125
|
from: l,
|
|
1085
1126
|
to: s,
|
|
1086
|
-
errorPlus: s -
|
|
1087
|
-
errorMinus:
|
|
1127
|
+
errorPlus: s - p,
|
|
1128
|
+
errorMinus: p - l
|
|
1088
1129
|
});
|
|
1089
|
-
}), a.sort((c, l) => l.z - c.z),
|
|
1130
|
+
}), a.sort((c, l) => l.z - c.z), Xt({
|
|
1090
1131
|
points: a,
|
|
1091
1132
|
isCategorical: !0,
|
|
1092
1133
|
property: r,
|
|
@@ -1095,7 +1136,7 @@ function Mr(e = [], {
|
|
|
1095
1136
|
template: i
|
|
1096
1137
|
});
|
|
1097
1138
|
}
|
|
1098
|
-
const
|
|
1139
|
+
const qt = [
|
|
1099
1140
|
"#313695",
|
|
1100
1141
|
"#4575b4",
|
|
1101
1142
|
"#74add1",
|
|
@@ -1107,7 +1148,7 @@ const Rt = [
|
|
|
1107
1148
|
"#d73027",
|
|
1108
1149
|
"#a50026"
|
|
1109
1150
|
];
|
|
1110
|
-
function
|
|
1151
|
+
function Zt(e = [], t = qt) {
|
|
1111
1152
|
const n = e.filter((s) => Number.isFinite(s));
|
|
1112
1153
|
if (!n.length)
|
|
1113
1154
|
return {
|
|
@@ -1119,8 +1160,8 @@ function Vt(e = [], t = Rt) {
|
|
|
1119
1160
|
};
|
|
1120
1161
|
const r = n.slice().sort((s, u) => s - u), o = r[0], i = r[r.length - 1], a = t.length;
|
|
1121
1162
|
if (i === o) {
|
|
1122
|
-
const s = t.map((u,
|
|
1123
|
-
index:
|
|
1163
|
+
const s = t.map((u, p) => ({
|
|
1164
|
+
index: p,
|
|
1124
1165
|
min: o,
|
|
1125
1166
|
max: i,
|
|
1126
1167
|
label: `${o}`
|
|
@@ -1134,12 +1175,12 @@ function Vt(e = [], t = Rt) {
|
|
|
1134
1175
|
};
|
|
1135
1176
|
}
|
|
1136
1177
|
const c = t.map((s, u) => {
|
|
1137
|
-
const
|
|
1178
|
+
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
1179
|
return {
|
|
1139
1180
|
index: u,
|
|
1140
|
-
min:
|
|
1181
|
+
min: g,
|
|
1141
1182
|
max: N,
|
|
1142
|
-
label:
|
|
1183
|
+
label: Wt(g, N)
|
|
1143
1184
|
};
|
|
1144
1185
|
}), l = (i - o) / a;
|
|
1145
1186
|
return {
|
|
@@ -1150,11 +1191,11 @@ function Vt(e = [], t = Rt) {
|
|
|
1150
1191
|
colors: t
|
|
1151
1192
|
};
|
|
1152
1193
|
}
|
|
1153
|
-
function
|
|
1194
|
+
function Wt(e, t) {
|
|
1154
1195
|
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
1196
|
return `${n(e)} – ${n(t)}`;
|
|
1156
1197
|
}
|
|
1157
|
-
function
|
|
1198
|
+
function Re(e, t) {
|
|
1158
1199
|
if (!Number.isFinite(e) || !t || !Array.isArray(t.bins) || !t.bins.length)
|
|
1159
1200
|
return -1;
|
|
1160
1201
|
if (t.max === t.min)
|
|
@@ -1166,18 +1207,18 @@ function Te(e, t) {
|
|
|
1166
1207
|
}
|
|
1167
1208
|
return -1;
|
|
1168
1209
|
}
|
|
1169
|
-
function
|
|
1170
|
-
const r =
|
|
1210
|
+
function Kt(e, t, n = "#8b1e3f") {
|
|
1211
|
+
const r = Re(e, t);
|
|
1171
1212
|
return r < 0 ? n : t.colors[r] || n;
|
|
1172
1213
|
}
|
|
1173
|
-
function
|
|
1214
|
+
function j(e) {
|
|
1174
1215
|
e.selectables = [
|
|
1175
1216
|
...e.blocks,
|
|
1176
1217
|
...e.drillMeshes,
|
|
1177
1218
|
...e.structuralMeshes
|
|
1178
1219
|
];
|
|
1179
1220
|
}
|
|
1180
|
-
const
|
|
1221
|
+
const Jt = {
|
|
1181
1222
|
bedding: "#2563eb",
|
|
1182
1223
|
foliation: "#16a34a",
|
|
1183
1224
|
joint: "#9333ea",
|
|
@@ -1186,11 +1227,11 @@ const jt = {
|
|
|
1186
1227
|
"shear zone": "#0ea5e9",
|
|
1187
1228
|
"fault zone": "#ef4444"
|
|
1188
1229
|
};
|
|
1189
|
-
function
|
|
1190
|
-
const n = t ||
|
|
1230
|
+
function Qt(e, t) {
|
|
1231
|
+
const n = t || Jt, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
|
|
1191
1232
|
return new f.Color(o).getHex();
|
|
1192
1233
|
}
|
|
1193
|
-
function
|
|
1234
|
+
function en(e, t) {
|
|
1194
1235
|
const n = e * Math.PI / 180, r = t * Math.PI / 180;
|
|
1195
1236
|
return new f.Vector3(
|
|
1196
1237
|
Math.sin(r) * Math.sin(n),
|
|
@@ -1201,7 +1242,7 @@ function Ut(e, t) {
|
|
|
1201
1242
|
// Up component
|
|
1202
1243
|
).normalize();
|
|
1203
1244
|
}
|
|
1204
|
-
function
|
|
1245
|
+
function tn(e, t = {}) {
|
|
1205
1246
|
const {
|
|
1206
1247
|
radius: n = 5,
|
|
1207
1248
|
discThickness: r = 0.2,
|
|
@@ -1210,23 +1251,23 @@ function $t(e, t = {}) {
|
|
|
1210
1251
|
colorMap: a = null
|
|
1211
1252
|
} = t, c = new f.Group(), l = new f.Vector3(0, 1, 0);
|
|
1212
1253
|
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
|
|
1254
|
+
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;
|
|
1255
|
+
if (u == null || p == null || m == null || !Number.isFinite(u) || !Number.isFinite(p) || !Number.isFinite(m)) continue;
|
|
1256
|
+
const h = s[K] != null ? Number(s[K]) : null, d = s[W] != null ? Number(s[W]) : null;
|
|
1257
|
+
let g;
|
|
1217
1258
|
if (s.nx != null && Number.isFinite(s.nx) && s.ny != null && Number.isFinite(s.ny) && s.nz != null && Number.isFinite(s.nz))
|
|
1218
|
-
|
|
1259
|
+
g = new f.Vector3(s.nx, s.ny, s.nz).normalize();
|
|
1219
1260
|
else {
|
|
1220
1261
|
if (h == null || d == null || !Number.isFinite(h) || !Number.isFinite(d)) continue;
|
|
1221
|
-
|
|
1262
|
+
g = en(h, d);
|
|
1222
1263
|
}
|
|
1223
|
-
const N = new f.CylinderGeometry(n, n, r, i, 1, !1),
|
|
1224
|
-
color:
|
|
1264
|
+
const N = new f.CylinderGeometry(n, n, r, i, 1, !1), O = new f.MeshStandardMaterial({
|
|
1265
|
+
color: Qt(s.structure_type, a),
|
|
1225
1266
|
transparent: !0,
|
|
1226
1267
|
opacity: o,
|
|
1227
1268
|
side: f.DoubleSide
|
|
1228
|
-
}), b = new f.Mesh(N,
|
|
1229
|
-
b.position.set(u,
|
|
1269
|
+
}), b = new f.Mesh(N, O);
|
|
1270
|
+
b.position.set(u, p, m), b.quaternion.setFromUnitVectors(l, g), b.userData = {
|
|
1230
1271
|
type: "structure",
|
|
1231
1272
|
hole_id: s.hole_id,
|
|
1232
1273
|
depth: s.depth ?? s.mid,
|
|
@@ -1238,8 +1279,8 @@ function $t(e, t = {}) {
|
|
|
1238
1279
|
}
|
|
1239
1280
|
return c;
|
|
1240
1281
|
}
|
|
1241
|
-
function
|
|
1242
|
-
if (!e.scene || (
|
|
1282
|
+
function nn(e, t, n, r = {}) {
|
|
1283
|
+
if (!e.scene || (Ve(e), !(t != null && t.length) || !(n != null && n.length))) return;
|
|
1243
1284
|
const { maxDiscs: o = 3e3 } = r;
|
|
1244
1285
|
let i = t;
|
|
1245
1286
|
if (i.length > o) {
|
|
@@ -1248,21 +1289,21 @@ function Xt(e, t, n, r = {}) {
|
|
|
1248
1289
|
s.push(i[Math.floor(u * l)]);
|
|
1249
1290
|
i = s;
|
|
1250
1291
|
}
|
|
1251
|
-
const a = n.flatMap((l) => (l.points || []).map((s) => ({ ...s, hole_id: l.id }))), c =
|
|
1252
|
-
c.length && (e.structuralGroup =
|
|
1292
|
+
const a = n.flatMap((l) => (l.points || []).map((s) => ({ ...s, hole_id: l.id }))), c = Ft(i, a, r);
|
|
1293
|
+
c.length && (e.structuralGroup = tn(c, r), e.scene.add(e.structuralGroup), e.structuralGroup.traverse((l) => {
|
|
1253
1294
|
l.isMesh && e.structuralMeshes.push(l);
|
|
1254
|
-
}),
|
|
1295
|
+
}), j(e));
|
|
1255
1296
|
}
|
|
1256
|
-
function
|
|
1297
|
+
function Ve(e) {
|
|
1257
1298
|
e.structuralGroup && (e.scene.remove(e.structuralGroup), e.structuralGroup.traverse((t) => {
|
|
1258
1299
|
t.isMesh && (t.geometry.dispose(), t.material.dispose());
|
|
1259
|
-
}), e.structuralGroup = null), e.structuralMeshes = [],
|
|
1300
|
+
}), e.structuralGroup = null), e.structuralMeshes = [], j(e);
|
|
1260
1301
|
}
|
|
1261
|
-
function
|
|
1302
|
+
function rn(e, t) {
|
|
1262
1303
|
e.structuralGroup && (e.structuralGroup.visible = !!t);
|
|
1263
1304
|
}
|
|
1264
|
-
let
|
|
1265
|
-
function
|
|
1305
|
+
let on = 0;
|
|
1306
|
+
function sn(e) {
|
|
1266
1307
|
let t, n, r, o;
|
|
1267
1308
|
if ("width" in e || "height" in e || "x" in e && !("maxX" in e)) {
|
|
1268
1309
|
const i = Number(e.x ?? 0), a = Number(e.y ?? 0), c = Number(e.width ?? 0), l = Number(e.height ?? 0);
|
|
@@ -1279,7 +1320,7 @@ function Wt(e) {
|
|
|
1279
1320
|
);
|
|
1280
1321
|
return { minX: t, minY: n, maxX: r, maxY: o };
|
|
1281
1322
|
}
|
|
1282
|
-
function
|
|
1323
|
+
function an(e) {
|
|
1283
1324
|
if (e.type === "texture")
|
|
1284
1325
|
return Promise.resolve(e.texture);
|
|
1285
1326
|
let t, n = !1;
|
|
@@ -1308,58 +1349,58 @@ function Kt(e) {
|
|
|
1308
1349
|
);
|
|
1309
1350
|
});
|
|
1310
1351
|
}
|
|
1311
|
-
async function
|
|
1312
|
-
const { source: t, bounds: n, elevation: r = 0, visible: o = !0, renderOrder: i = 0 } = e, a = e.id ?? `raster-overlay-${++
|
|
1352
|
+
async function Vr(e) {
|
|
1353
|
+
const { source: t, bounds: n, elevation: r = 0, visible: o = !0, renderOrder: i = 0 } = e, a = e.id ?? `raster-overlay-${++on}`, c = e.name ?? a;
|
|
1313
1354
|
let l = e.opacity ?? 1;
|
|
1314
1355
|
if ((l < 0 || l > 1) && (console.warn(
|
|
1315
1356
|
`[baselode] raster overlay "${a}": opacity ${l} is outside [0, 1] — clamped`
|
|
1316
1357
|
), l = Math.max(0, Math.min(1, l))), !t) throw new Error("raster overlay: options.source is required");
|
|
1317
1358
|
if (!n) throw new Error("raster overlay: options.bounds is required");
|
|
1318
|
-
const s =
|
|
1359
|
+
const s = sn(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 an(t), L = new f.PlaneGeometry(d, g), y = new f.MeshBasicMaterial({
|
|
1319
1360
|
map: b,
|
|
1320
1361
|
transparent: !0,
|
|
1321
1362
|
opacity: l,
|
|
1322
1363
|
side: f.DoubleSide,
|
|
1323
1364
|
depthWrite: !1
|
|
1324
|
-
}),
|
|
1325
|
-
return
|
|
1365
|
+
}), E = new f.Mesh(L, y);
|
|
1366
|
+
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
1367
|
}
|
|
1327
|
-
function
|
|
1328
|
-
e.scene && (e.rasterOverlays.has(t.id) &&
|
|
1368
|
+
function ln(e, t) {
|
|
1369
|
+
e.scene && (e.rasterOverlays.has(t.id) && _e(e, t.id), e.rasterOverlays.set(t.id, t), e.scene.add(t.mesh));
|
|
1329
1370
|
}
|
|
1330
|
-
function
|
|
1371
|
+
function _e(e, t) {
|
|
1331
1372
|
var r;
|
|
1332
1373
|
const n = e.rasterOverlays.get(t);
|
|
1333
1374
|
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
1375
|
}
|
|
1335
|
-
function
|
|
1376
|
+
function cn(e, t, n) {
|
|
1336
1377
|
const r = e.rasterOverlays.get(t);
|
|
1337
1378
|
if (!r) return;
|
|
1338
1379
|
const o = Math.max(0, Math.min(1, Number(n)));
|
|
1339
1380
|
r.opacity = o, r.mesh.material.opacity = o, r.mesh.material.needsUpdate = !0;
|
|
1340
1381
|
}
|
|
1341
|
-
function
|
|
1382
|
+
function un(e, t, n) {
|
|
1342
1383
|
const r = e.rasterOverlays.get(t);
|
|
1343
1384
|
r && (r.visible = !!n, r.mesh.visible = r.visible);
|
|
1344
1385
|
}
|
|
1345
|
-
function
|
|
1386
|
+
function mn(e, t, n) {
|
|
1346
1387
|
const r = e.rasterOverlays.get(t);
|
|
1347
1388
|
r && (r.elevation = Number(n), r.mesh.position.setZ(r.elevation));
|
|
1348
1389
|
}
|
|
1349
|
-
function
|
|
1390
|
+
function dn(e, t) {
|
|
1350
1391
|
return e.rasterOverlays.get(t);
|
|
1351
1392
|
}
|
|
1352
|
-
function
|
|
1393
|
+
function fn(e) {
|
|
1353
1394
|
return Array.from(e.rasterOverlays.values());
|
|
1354
1395
|
}
|
|
1355
|
-
function
|
|
1396
|
+
function hn(e) {
|
|
1356
1397
|
for (const t of [...e.rasterOverlays.keys()])
|
|
1357
|
-
|
|
1398
|
+
_e(e, t);
|
|
1358
1399
|
}
|
|
1359
|
-
function
|
|
1400
|
+
function Me(e) {
|
|
1360
1401
|
var n, r, o, i, a, c, l, s, u;
|
|
1361
1402
|
if (!e) return "";
|
|
1362
|
-
const t = (
|
|
1403
|
+
const t = (p) => Number.isFinite(p) ? p.toFixed(3) : "nan";
|
|
1363
1404
|
return [
|
|
1364
1405
|
t((n = e.camera) == null ? void 0 : n.x),
|
|
1365
1406
|
t((r = e.camera) == null ? void 0 : r.y),
|
|
@@ -1372,7 +1413,7 @@ function fe(e) {
|
|
|
1372
1413
|
t((u = e.up) == null ? void 0 : u.z)
|
|
1373
1414
|
].join("|");
|
|
1374
1415
|
}
|
|
1375
|
-
function
|
|
1416
|
+
function He(e) {
|
|
1376
1417
|
return !e.camera || !e.controls ? null : {
|
|
1377
1418
|
camera: {
|
|
1378
1419
|
x: e.camera.position.x,
|
|
@@ -1391,37 +1432,37 @@ function Re(e) {
|
|
|
1391
1432
|
}
|
|
1392
1433
|
};
|
|
1393
1434
|
}
|
|
1394
|
-
function
|
|
1435
|
+
function bn(e, t) {
|
|
1395
1436
|
if (!e.camera || !e.controls || !t) return !1;
|
|
1396
1437
|
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 =
|
|
1438
|
+
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
1439
|
}
|
|
1399
|
-
function
|
|
1440
|
+
function pn(e) {
|
|
1400
1441
|
if (!e.viewChangeHandler) return;
|
|
1401
1442
|
const t = Date.now();
|
|
1402
1443
|
if (t - e._lastViewEmitMs < 250) return;
|
|
1403
|
-
const n =
|
|
1444
|
+
const n = He(e);
|
|
1404
1445
|
if (!n) return;
|
|
1405
|
-
const r =
|
|
1446
|
+
const r = Me(n);
|
|
1406
1447
|
r !== e._lastViewSignature && (e._lastViewSignature = r, e._lastViewEmitMs = t, e.viewChangeHandler(n));
|
|
1407
1448
|
}
|
|
1408
|
-
function
|
|
1409
|
-
const c = (t + n) / 2, l = (r + o) / 2, s = (i + a) / 2, u = n - t,
|
|
1449
|
+
function Ee(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
|
|
1450
|
+
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
1451
|
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
1452
|
}
|
|
1412
|
-
function
|
|
1453
|
+
function gn(e, t = 1e3) {
|
|
1413
1454
|
!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
1455
|
}
|
|
1415
|
-
function
|
|
1456
|
+
function yn(e, t = 2e3) {
|
|
1416
1457
|
!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
1458
|
}
|
|
1418
|
-
function
|
|
1459
|
+
function _n(e, t = 0, n = 0) {
|
|
1419
1460
|
e.controls && typeof e.controls.pan == "function" && (e.controls.pan(t, n), e.controls.update());
|
|
1420
1461
|
}
|
|
1421
|
-
function
|
|
1462
|
+
function Mn(e, t = 1.1) {
|
|
1422
1463
|
!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
1464
|
}
|
|
1424
|
-
function
|
|
1465
|
+
function En(e, t = 1.2) {
|
|
1425
1466
|
if (!e.lastBounds) return;
|
|
1426
1467
|
const {
|
|
1427
1468
|
minX: n,
|
|
@@ -1430,16 +1471,16 @@ function dn(e, t = 1.2) {
|
|
|
1430
1471
|
maxY: i,
|
|
1431
1472
|
minZ: a,
|
|
1432
1473
|
maxZ: c
|
|
1433
|
-
} = e.lastBounds, l = (r - n) * t, s = (i - o) * t, u = (c - a) * t,
|
|
1434
|
-
e.controls.target.set(
|
|
1474
|
+
} = 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;
|
|
1475
|
+
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
1476
|
}
|
|
1436
|
-
const
|
|
1437
|
-
function
|
|
1477
|
+
const zn = 1, Nn = 120;
|
|
1478
|
+
function On(e, t) {
|
|
1438
1479
|
if (!e.camera || !e.controls || !Number.isFinite(t)) return !1;
|
|
1439
|
-
const n = Math.min(
|
|
1480
|
+
const n = Math.min(Nn, Math.max(zn, 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
1481
|
return e.camera.position.copy(r).addScaledVector(s, l), e.camera.fov = n, e.camera.updateProjectionMatrix(), e.controls.update(), !0;
|
|
1441
1482
|
}
|
|
1442
|
-
function
|
|
1483
|
+
function kn(e, t = "orbit") {
|
|
1443
1484
|
if (e.controlMode = t === "fly" ? "fly" : "orbit", e.controlMode === "fly")
|
|
1444
1485
|
e.controls && (e.controls.enabled = !1), e.flyControls && (e.flyControls.enabled = !0);
|
|
1445
1486
|
else if (e.flyControls && (e.flyControls.enabled = !1), e.controls) {
|
|
@@ -1448,37 +1489,37 @@ function gn(e, t = "orbit") {
|
|
|
1448
1489
|
e.controls.target.copy(n), e.controls.update();
|
|
1449
1490
|
}
|
|
1450
1491
|
}
|
|
1451
|
-
const
|
|
1452
|
-
function
|
|
1492
|
+
const T = "#9ca3af";
|
|
1493
|
+
function Ae(e, t) {
|
|
1453
1494
|
const n = Number(e == null ? void 0 : e.md), r = Number(t == null ? void 0 : t.md);
|
|
1454
1495
|
if (!Number.isFinite(n) || !Number.isFinite(r)) return null;
|
|
1455
1496
|
const o = Math.min(n, r), i = Math.max(n, r);
|
|
1456
1497
|
return i <= o ? null : { segStart: o, segEnd: i };
|
|
1457
1498
|
}
|
|
1458
|
-
function
|
|
1499
|
+
function Ln(e, t, n) {
|
|
1459
1500
|
let r = 0, o = 0;
|
|
1460
1501
|
for (let a = 0; a < e.length; a += 1) {
|
|
1461
1502
|
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
1503
|
if (!Number.isFinite(l) || !Number.isFinite(s) || !Number.isFinite(u) || s <= l) continue;
|
|
1463
|
-
const
|
|
1504
|
+
const p = Math.max(t, l), h = Math.min(n, s) - p;
|
|
1464
1505
|
h <= 0 || (r += u * h, o += h);
|
|
1465
1506
|
}
|
|
1466
1507
|
if (o <= 0) return null;
|
|
1467
1508
|
const i = r / o;
|
|
1468
1509
|
return Number.isFinite(i) ? i : null;
|
|
1469
1510
|
}
|
|
1470
|
-
function
|
|
1471
|
-
if (!Number.isFinite(e)) return new f.Color(
|
|
1472
|
-
if (
|
|
1473
|
-
const r =
|
|
1511
|
+
function An(e, t) {
|
|
1512
|
+
if (!Number.isFinite(e)) return new f.Color(T);
|
|
1513
|
+
if (Re(e, t) < 0) return new f.Color(T);
|
|
1514
|
+
const r = Kt(e, t, T);
|
|
1474
1515
|
return new f.Color(r);
|
|
1475
1516
|
}
|
|
1476
|
-
function
|
|
1477
|
-
if (!e || !String(e).trim()) return
|
|
1478
|
-
const t =
|
|
1517
|
+
function Dn(e) {
|
|
1518
|
+
if (!e || !String(e).trim()) return T;
|
|
1519
|
+
const t = Ge(String(e).toLowerCase().trim());
|
|
1479
1520
|
return "#" + new f.Color().setHSL(t, 0.7, 0.5).getHexString();
|
|
1480
1521
|
}
|
|
1481
|
-
function
|
|
1522
|
+
function Sn(e = {}) {
|
|
1482
1523
|
return {
|
|
1483
1524
|
preserveView: !!e.preserveView,
|
|
1484
1525
|
assayIntervalsByHole: e.assayIntervalsByHole || null,
|
|
@@ -1486,7 +1527,7 @@ function Mn(e = {}) {
|
|
|
1486
1527
|
isCategoricalVariable: !!e.isCategoricalVariable
|
|
1487
1528
|
};
|
|
1488
1529
|
}
|
|
1489
|
-
function
|
|
1530
|
+
function wn(e, t) {
|
|
1490
1531
|
if (!e || !t) return [];
|
|
1491
1532
|
const n = [];
|
|
1492
1533
|
return Object.values(e).forEach((r) => {
|
|
@@ -1496,27 +1537,27 @@ function zn(e, t) {
|
|
|
1496
1537
|
});
|
|
1497
1538
|
}), n;
|
|
1498
1539
|
}
|
|
1499
|
-
function
|
|
1540
|
+
function oe(e) {
|
|
1500
1541
|
return {
|
|
1501
1542
|
holeId: e.id,
|
|
1502
1543
|
project: e.project
|
|
1503
1544
|
};
|
|
1504
1545
|
}
|
|
1505
|
-
function
|
|
1546
|
+
function xn(e) {
|
|
1506
1547
|
return `${e ?? ""}`.trim().toLowerCase();
|
|
1507
1548
|
}
|
|
1508
|
-
function
|
|
1509
|
-
const n = `${e ?? ""}:${t ?? 0}`, r =
|
|
1549
|
+
function Fn(e, t) {
|
|
1550
|
+
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
1551
|
return a.setHSL(i, 1, 0.5), a;
|
|
1511
1552
|
}
|
|
1512
|
-
function
|
|
1553
|
+
function Ge(e) {
|
|
1513
1554
|
const t = `${e ?? ""}`;
|
|
1514
1555
|
let n = 2166136261;
|
|
1515
1556
|
for (let r = 0; r < t.length; r += 1)
|
|
1516
1557
|
n ^= t.charCodeAt(r), n = Math.imul(n, 16777619);
|
|
1517
1558
|
return (n >>> 0) / 4294967295;
|
|
1518
1559
|
}
|
|
1519
|
-
function
|
|
1560
|
+
function vn(e, t, n) {
|
|
1520
1561
|
let r = null, o = 0;
|
|
1521
1562
|
for (const i of e) {
|
|
1522
1563
|
const a = Number(i == null ? void 0 : i.from), c = Number(i == null ? void 0 : i.to);
|
|
@@ -1526,108 +1567,108 @@ function kn(e, t, n) {
|
|
|
1526
1567
|
}
|
|
1527
1568
|
return r;
|
|
1528
1569
|
}
|
|
1529
|
-
function
|
|
1570
|
+
function In(e, t) {
|
|
1530
1571
|
if (!t || !e) return [];
|
|
1531
1572
|
const n = e.id || e.holeId;
|
|
1532
1573
|
if (!n) return [];
|
|
1533
1574
|
const r = t[n];
|
|
1534
1575
|
if (Array.isArray(r) && r.length) return r;
|
|
1535
|
-
const o =
|
|
1576
|
+
const o = xn(n);
|
|
1536
1577
|
if (o) {
|
|
1537
1578
|
const i = t[o];
|
|
1538
1579
|
if (Array.isArray(i) && i.length) return i;
|
|
1539
1580
|
}
|
|
1540
1581
|
return [];
|
|
1541
1582
|
}
|
|
1542
|
-
function
|
|
1583
|
+
function Cn({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId: r, segmentIndex: o, p1: i, p2: a, isCategorical: c }) {
|
|
1543
1584
|
if (!e)
|
|
1544
|
-
return
|
|
1585
|
+
return Fn(r, o);
|
|
1545
1586
|
if (e === "__HAS_ASSAY__") {
|
|
1546
|
-
if (!(t != null && t.length)) return new f.Color(
|
|
1547
|
-
const u =
|
|
1587
|
+
if (!(t != null && t.length)) return new f.Color(T);
|
|
1588
|
+
const u = Ae(i, a);
|
|
1548
1589
|
return u ? t.some((m) => {
|
|
1549
1590
|
const h = Number(m == null ? void 0 : m.from), d = Number(m == null ? void 0 : m.to);
|
|
1550
1591
|
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(
|
|
1592
|
+
const g = Math.max(u.segStart, h);
|
|
1593
|
+
return Math.min(u.segEnd, d) > g;
|
|
1594
|
+
}) ? new f.Color("#ff8c42") : new f.Color(T) : new f.Color(T);
|
|
1554
1595
|
}
|
|
1555
|
-
if (!(t != null && t.length)) return new f.Color(
|
|
1556
|
-
const l =
|
|
1557
|
-
if (!l) return new f.Color(
|
|
1596
|
+
if (!(t != null && t.length)) return new f.Color(T);
|
|
1597
|
+
const l = Ae(i, a);
|
|
1598
|
+
if (!l) return new f.Color(T);
|
|
1558
1599
|
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
|
|
1600
|
+
const u = vn(t, l.segStart, l.segEnd);
|
|
1601
|
+
return new f.Color(Dn(u));
|
|
1602
|
+
}
|
|
1603
|
+
const s = Ln(t, l.segStart, l.segEnd);
|
|
1604
|
+
return An(s, n);
|
|
1605
|
+
}
|
|
1606
|
+
function Tn(e, t, n = {}) {
|
|
1607
|
+
if (!e.scene || (je(e), !t || t.length === 0)) return;
|
|
1608
|
+
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: a } = Sn(n), c = a ? [] : wn(o, i), l = Zt(c);
|
|
1609
|
+
let s = 1 / 0, u = -1 / 0, p = 1 / 0, m = -1 / 0, h = 1 / 0, d = -1 / 0;
|
|
1610
|
+
const g = new f.Vector3(), N = new f.Vector3(0, 1, 0);
|
|
1611
|
+
t.forEach((O, b) => {
|
|
1612
|
+
const y = b * 137.5 % 360 / 360, E = new f.Color().setHSL(y, 0.75, 0.55), k = (O.points || []).map((A) => {
|
|
1613
|
+
s = Math.min(s, A.x), u = Math.max(u, A.x), p = Math.min(p, A.y), m = Math.max(m, A.y), h = Math.min(h, A.z), d = Math.max(d, A.z);
|
|
1614
|
+
const x = new f.Vector3(A.x, A.y, A.z);
|
|
1615
|
+
return x.md = A.md, x;
|
|
1575
1616
|
});
|
|
1576
|
-
if (
|
|
1577
|
-
if (
|
|
1578
|
-
const
|
|
1579
|
-
color:
|
|
1580
|
-
emissive:
|
|
1617
|
+
if (k.length < 2) {
|
|
1618
|
+
if (k.length === 1) {
|
|
1619
|
+
const A = new f.SphereGeometry(5, 12, 12), x = new f.MeshLambertMaterial({
|
|
1620
|
+
color: E,
|
|
1621
|
+
emissive: E,
|
|
1581
1622
|
emissiveIntensity: 0.2
|
|
1582
|
-
}),
|
|
1583
|
-
|
|
1623
|
+
}), S = new f.Mesh(A, x);
|
|
1624
|
+
S.position.copy(k[0]), S.userData = oe(O), e.scene.add(S), e.drillLines.push(S), e.drillMeshes.push(S);
|
|
1584
1625
|
}
|
|
1585
1626
|
return;
|
|
1586
1627
|
}
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1589
|
-
const
|
|
1590
|
-
for (let
|
|
1591
|
-
const
|
|
1628
|
+
const D = new f.Group();
|
|
1629
|
+
D.userData = oe(O);
|
|
1630
|
+
const w = i ? In(O, o) : [];
|
|
1631
|
+
for (let A = 0; A < k.length - 1; A += 1) {
|
|
1632
|
+
const x = k[A], S = k[A + 1], v = g.subVectors(S, x), C = v.length();
|
|
1592
1633
|
if (C <= 1e-3) continue;
|
|
1593
|
-
const I = 2.2,
|
|
1634
|
+
const I = 2.2, P = new f.CylinderGeometry(I, I, C, 6, 1, !0), B = Cn({
|
|
1594
1635
|
selectedAssayVariable: i,
|
|
1595
|
-
assayIntervals:
|
|
1636
|
+
assayIntervals: w,
|
|
1596
1637
|
assayScale: l,
|
|
1597
|
-
holeId:
|
|
1598
|
-
segmentIndex:
|
|
1599
|
-
p1:
|
|
1600
|
-
p2:
|
|
1638
|
+
holeId: O.id,
|
|
1639
|
+
segmentIndex: A,
|
|
1640
|
+
p1: x,
|
|
1641
|
+
p2: S,
|
|
1601
1642
|
isCategorical: a
|
|
1602
|
-
}),
|
|
1603
|
-
color:
|
|
1643
|
+
}), z = new f.MeshLambertMaterial({
|
|
1644
|
+
color: B,
|
|
1604
1645
|
flatShading: !0,
|
|
1605
|
-
emissive:
|
|
1646
|
+
emissive: B,
|
|
1606
1647
|
emissiveIntensity: 0.15
|
|
1607
|
-
}),
|
|
1608
|
-
|
|
1648
|
+
}), F = new f.Mesh(P, z);
|
|
1649
|
+
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
1650
|
}
|
|
1610
|
-
e.scene.add(
|
|
1611
|
-
}), e.camera && e.controls && (e.lastBounds = { minX: s, maxX: u, minY:
|
|
1651
|
+
e.scene.add(D), e.drillLines.push(D);
|
|
1652
|
+
}), 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
1653
|
}
|
|
1613
|
-
function
|
|
1654
|
+
function je(e) {
|
|
1614
1655
|
e.drillLines.forEach((t) => {
|
|
1615
1656
|
e.scene.remove(t), t.isGroup ? t.traverse((n) => {
|
|
1616
1657
|
n.isMesh && (n.geometry.dispose(), n.material.dispose());
|
|
1617
1658
|
}) : t.isMesh && (t.geometry.dispose(), t.material.dispose());
|
|
1618
|
-
}), e.drillLines = [], e.drillMeshes = [],
|
|
1659
|
+
}), e.drillLines = [], e.drillMeshes = [], j(e);
|
|
1619
1660
|
}
|
|
1620
|
-
const
|
|
1621
|
-
function
|
|
1661
|
+
const Pn = 20, Bn = 15, Rn = "#00bcd4";
|
|
1662
|
+
function Vn(e = {}) {
|
|
1622
1663
|
return {
|
|
1623
|
-
panelWidth: e.panelWidth != null ? Number(e.panelWidth) :
|
|
1624
|
-
lateralOffset: e.lateralOffset != null ? Number(e.lateralOffset) :
|
|
1625
|
-
color: e.color ||
|
|
1664
|
+
panelWidth: e.panelWidth != null ? Number(e.panelWidth) : Pn,
|
|
1665
|
+
lateralOffset: e.lateralOffset != null ? Number(e.lateralOffset) : Bn,
|
|
1666
|
+
color: e.color || Rn,
|
|
1626
1667
|
valueMin: e.valueMin != null ? Number(e.valueMin) : null,
|
|
1627
1668
|
valueMax: e.valueMax != null ? Number(e.valueMax) : null
|
|
1628
1669
|
};
|
|
1629
1670
|
}
|
|
1630
|
-
function
|
|
1671
|
+
function Hr(e) {
|
|
1631
1672
|
if (!e || e.length < 2) return null;
|
|
1632
1673
|
let t = -1 / 0, n = 1 / 0;
|
|
1633
1674
|
for (const o of e)
|
|
@@ -1635,47 +1676,47 @@ function Er(e) {
|
|
|
1635
1676
|
const r = t - n;
|
|
1636
1677
|
return r < 1e-3 ? null : { topZ: t, botZ: n, height: r };
|
|
1637
1678
|
}
|
|
1638
|
-
function
|
|
1679
|
+
function Hn(e, t, n, r, o, i, a) {
|
|
1639
1680
|
if (!Array.isArray(e) || !Array.isArray(t)) return [];
|
|
1640
1681
|
const c = Math.min(e.length, t.length), l = [];
|
|
1641
1682
|
for (let b = 0; b < c; b++)
|
|
1642
1683
|
Number.isFinite(e[b]) && Number.isFinite(t[b]) && l.push({ d: e[b], v: t[b] });
|
|
1643
1684
|
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)),
|
|
1685
|
+
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;
|
|
1645
1686
|
return l.map(({ d: b, v: L }) => {
|
|
1646
|
-
const y = (b - u) / m,
|
|
1647
|
-
return new f.Vector3(
|
|
1687
|
+
const y = (b - u) / m, E = Math.max(0, Math.min(1, (L - g) / O)), k = -n / 2 + E * n, D = y * r;
|
|
1688
|
+
return new f.Vector3(k, D, 0.01);
|
|
1648
1689
|
});
|
|
1649
1690
|
}
|
|
1650
|
-
function
|
|
1691
|
+
function Gn(e, t) {
|
|
1651
1692
|
const n = e.length;
|
|
1652
1693
|
if (n < 2) return null;
|
|
1653
1694
|
const r = [], o = [];
|
|
1654
1695
|
let i = 0;
|
|
1655
1696
|
for (let c = 0; c < n - 1; c++) {
|
|
1656
|
-
const l = e[c], s = e[c + 1], u = s.x - l.x,
|
|
1697
|
+
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
1698
|
if (m < 1e-6) continue;
|
|
1658
|
-
const h = -
|
|
1699
|
+
const h = -p / m * t, d = u / m * t, g = 0.01;
|
|
1659
1700
|
r.push(
|
|
1660
1701
|
l.x + h,
|
|
1661
1702
|
l.y + d,
|
|
1662
|
-
|
|
1703
|
+
g,
|
|
1663
1704
|
l.x - h,
|
|
1664
1705
|
l.y - d,
|
|
1665
|
-
|
|
1706
|
+
g,
|
|
1666
1707
|
s.x + h,
|
|
1667
1708
|
s.y + d,
|
|
1668
|
-
|
|
1709
|
+
g,
|
|
1669
1710
|
s.x - h,
|
|
1670
1711
|
s.y - d,
|
|
1671
|
-
|
|
1712
|
+
g
|
|
1672
1713
|
), o.push(i, i + 1, i + 2, i + 1, i + 3, i + 2), i += 4;
|
|
1673
1714
|
}
|
|
1674
1715
|
if (r.length === 0) return null;
|
|
1675
1716
|
const a = new f.BufferGeometry();
|
|
1676
1717
|
return a.setAttribute("position", new f.Float32BufferAttribute(r, 3)), a.setIndex(o), a;
|
|
1677
1718
|
}
|
|
1678
|
-
function
|
|
1719
|
+
function jn(e, t) {
|
|
1679
1720
|
const n = e.points || [];
|
|
1680
1721
|
if (n.length < 2) return null;
|
|
1681
1722
|
const r = n[0], o = n[n.length - 1], i = new f.Vector3(
|
|
@@ -1684,67 +1725,67 @@ function In(e, t) {
|
|
|
1684
1725
|
o.z - r.z
|
|
1685
1726
|
), a = i.length();
|
|
1686
1727
|
if (a < 1e-3) return null;
|
|
1687
|
-
const c = i.clone().normalize(), l =
|
|
1688
|
-
let
|
|
1689
|
-
|
|
1690
|
-
const N = new f.Vector3().crossVectors(
|
|
1728
|
+
const c = i.clone().normalize(), l = Vn(t.options), { panelWidth: s, lateralOffset: u, color: p, valueMin: m, valueMax: h } = l, d = new f.Vector3(0, 0, 1);
|
|
1729
|
+
let g = new f.Vector3().crossVectors(c, d);
|
|
1730
|
+
g.lengthSq() < 1e-6 ? g.set(1, 0, 0) : g.normalize();
|
|
1731
|
+
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), L = new f.Quaternion().setFromRotationMatrix(b), y = n.map((v) => v.md).filter(Number.isFinite), E = y.length > 0 ? Math.max(...y) : a, k = Hn(
|
|
1691
1732
|
t.depths,
|
|
1692
1733
|
t.values,
|
|
1693
1734
|
s,
|
|
1694
1735
|
a,
|
|
1695
1736
|
m,
|
|
1696
1737
|
h,
|
|
1697
|
-
|
|
1738
|
+
E
|
|
1698
1739
|
);
|
|
1699
|
-
if (
|
|
1700
|
-
const
|
|
1701
|
-
|
|
1702
|
-
const
|
|
1703
|
-
if (!
|
|
1704
|
-
const
|
|
1705
|
-
color: new f.Color(
|
|
1740
|
+
if (k.length < 2) return null;
|
|
1741
|
+
const D = new f.Group();
|
|
1742
|
+
D.userData = { holeId: e.id, isStripLog: !0 };
|
|
1743
|
+
const w = s * 0.025, A = Gn(k, w);
|
|
1744
|
+
if (!A) return null;
|
|
1745
|
+
const x = new f.MeshBasicMaterial({
|
|
1746
|
+
color: new f.Color(p),
|
|
1706
1747
|
side: f.DoubleSide
|
|
1707
|
-
}),
|
|
1708
|
-
return
|
|
1748
|
+
}), S = new f.Mesh(A, x);
|
|
1749
|
+
return S.position.copy(O), S.quaternion.copy(L), D.add(S), D;
|
|
1709
1750
|
}
|
|
1710
|
-
function
|
|
1711
|
-
if (!e.scene || (
|
|
1751
|
+
function Un(e, t, n) {
|
|
1752
|
+
if (!e.scene || (ce(e), !n || n.length === 0) || !t || t.length === 0) return;
|
|
1712
1753
|
const r = /* @__PURE__ */ new Map();
|
|
1713
1754
|
t.forEach((o) => {
|
|
1714
1755
|
o.id != null && r.set(o.id, o);
|
|
1715
1756
|
}), n.forEach((o) => {
|
|
1716
1757
|
const i = r.get(o.holeId);
|
|
1717
1758
|
if (!i) return;
|
|
1718
|
-
const a =
|
|
1759
|
+
const a = jn(i, o);
|
|
1719
1760
|
a && (e.scene.add(a), e.stripLogGroups.push(a));
|
|
1720
1761
|
});
|
|
1721
1762
|
}
|
|
1722
|
-
function
|
|
1763
|
+
function ce(e) {
|
|
1723
1764
|
e.stripLogGroups && (e.stripLogGroups.forEach((t) => {
|
|
1724
1765
|
e.scene && e.scene.remove(t), t.traverse((n) => {
|
|
1725
1766
|
n.geometry && n.geometry.dispose(), n.material && n.material.dispose();
|
|
1726
1767
|
});
|
|
1727
1768
|
}), e.stripLogGroups = []);
|
|
1728
1769
|
}
|
|
1729
|
-
const
|
|
1730
|
-
function
|
|
1770
|
+
const De = "#ffffbb", Yn = 2, $n = 1.5, Xn = 1;
|
|
1771
|
+
function qn(e) {
|
|
1731
1772
|
const { renderer: t, scene: n, camera: r, container: o } = e;
|
|
1732
1773
|
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
|
|
1774
|
+
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
1775
|
c.addPass(l);
|
|
1735
|
-
const s = new f.Vector2(i, a), u = new
|
|
1736
|
-
u.visibleEdgeColor.set(
|
|
1776
|
+
const s = new f.Vector2(i, a), u = new ut(s, n, r);
|
|
1777
|
+
u.visibleEdgeColor.set(De), u.hiddenEdgeColor.set(De), u.edgeStrength = Yn, u.edgeThickness = $n, u.edgeGlow = Xn, u.pulsePeriod = 0, u.selectedObjects = [], c.addPass(u), c.setSize(i, a), e._composer = c, e._outlinePass = u;
|
|
1737
1778
|
}
|
|
1738
|
-
function
|
|
1779
|
+
function Zn(e, t, n) {
|
|
1739
1780
|
!e._composer || !e._outlinePass || (e._composer.setSize(t, n), e._outlinePass.resolution.set(t, n));
|
|
1740
1781
|
}
|
|
1741
|
-
function
|
|
1782
|
+
function Z(e, t) {
|
|
1742
1783
|
e._outlinePass && (e._outlinePass.selectedObjects = t ? [t] : [], e._selectedObject = t || null);
|
|
1743
1784
|
}
|
|
1744
|
-
function
|
|
1785
|
+
function Se(e) {
|
|
1745
1786
|
e._composer && (e._composer.dispose(), e._composer = null), e._outlinePass = null, e._selectedObject = null, e.selectables = [];
|
|
1746
1787
|
}
|
|
1747
|
-
const
|
|
1788
|
+
const Wn = [
|
|
1748
1789
|
{ normal: [1, 0, 0], neibDir: [1, 0, 0], verts: [[1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1]] },
|
|
1749
1790
|
{ normal: [-1, 0, 0], neibDir: [-1, 0, 0], verts: [[-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [-1, -1, -1]] },
|
|
1750
1791
|
{ normal: [0, 1, 0], neibDir: [0, 1, 0], verts: [[-1, 1, 1], [1, 1, 1], [1, 1, -1], [-1, 1, -1]] },
|
|
@@ -1752,86 +1793,86 @@ const Hn = [
|
|
|
1752
1793
|
{ normal: [0, 0, 1], neibDir: [0, 0, 1], verts: [[-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]] },
|
|
1753
1794
|
{ normal: [0, 0, -1], neibDir: [0, 0, -1], verts: [[1, -1, -1], [-1, -1, -1], [-1, 1, -1], [1, 1, -1]] }
|
|
1754
1795
|
];
|
|
1755
|
-
function
|
|
1756
|
-
if (!e.scene || (
|
|
1796
|
+
function Kn(e, t, n, r, o = {}) {
|
|
1797
|
+
if (!e.scene || (Ue(e), !t || !n || !r)) return;
|
|
1757
1798
|
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,
|
|
1799
|
+
let c = 1 / 0, l = -1 / 0, s = 1 / 0, u = -1 / 0, p = 1 / 0, m = -1 / 0;
|
|
1800
|
+
t.forEach((z) => {
|
|
1801
|
+
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);
|
|
1802
|
+
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
1803
|
});
|
|
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
|
-
),
|
|
1804
|
+
let h = 0, d = 0, g = 0;
|
|
1805
|
+
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));
|
|
1806
|
+
const N = c + h, O = l + h, b = s + d, L = u + d, y = p + g, E = m + g, k = (z, F, R) => `${Math.round(z)},${Math.round(F)},${Math.round(R)}`, D = new Set(
|
|
1807
|
+
t.map((z) => k(Number(z.x ?? 0), Number(z.y ?? 0), Number(z.z ?? 0)))
|
|
1808
|
+
), w = [], A = [], x = [], S = [], v = [];
|
|
1768
1809
|
let C = 0;
|
|
1769
|
-
if (t.forEach((
|
|
1770
|
-
const
|
|
1771
|
-
|
|
1772
|
-
const
|
|
1773
|
-
if (
|
|
1774
|
-
const
|
|
1775
|
-
V.verts.forEach(([
|
|
1776
|
-
|
|
1777
|
-
}),
|
|
1810
|
+
if (t.forEach((z) => {
|
|
1811
|
+
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;
|
|
1812
|
+
Wn.forEach((V) => {
|
|
1813
|
+
const Qe = F + V.neibDir[0] * $, et = R + V.neibDir[1] * X, tt = Y + V.neibDir[2] * q;
|
|
1814
|
+
if (D.has(k(Qe, et, tt))) return;
|
|
1815
|
+
const U = C;
|
|
1816
|
+
V.verts.forEach(([nt, rt, ot]) => {
|
|
1817
|
+
w.push($e + nt * $ / 2, Xe + rt * X / 2, qe + ot * q / 2), A.push(V.normal[0], V.normal[1], V.normal[2]), x.push(We, Ke, Je), C++;
|
|
1818
|
+
}), S.push(U, U + 1, U + 2, U, U + 2, U + 3), v.push(z);
|
|
1778
1819
|
});
|
|
1779
|
-
}),
|
|
1820
|
+
}), w.length === 0) return;
|
|
1780
1821
|
const I = new f.BufferGeometry();
|
|
1781
|
-
I.setAttribute("position", new f.Float32BufferAttribute(
|
|
1782
|
-
const
|
|
1822
|
+
I.setAttribute("position", new f.Float32BufferAttribute(w, 3)), I.setAttribute("normal", new f.Float32BufferAttribute(A, 3)), I.setAttribute("color", new f.Float32BufferAttribute(x, 3)), I.setIndex(S);
|
|
1823
|
+
const P = new f.MeshLambertMaterial({
|
|
1783
1824
|
vertexColors: !0,
|
|
1784
1825
|
transparent: a < 1,
|
|
1785
1826
|
opacity: a,
|
|
1786
1827
|
side: f.DoubleSide
|
|
1787
|
-
}),
|
|
1788
|
-
|
|
1828
|
+
}), B = new f.Mesh(I, P);
|
|
1829
|
+
B.userData._isMergedBlocks = !0, B.userData._quadToBlock = v, B.userData._offset = { x: h, y: d, z: g }, e.scene.add(B), e.blocks.push(B), j(e), e.camera && e.controls && (e.lastBounds = { minX: N, maxX: O, minY: b, maxY: L, minZ: y, maxZ: E }, Ee(e, { minX: N, maxX: O, minY: b, maxY: L, minZ: y, maxZ: E }));
|
|
1789
1830
|
}
|
|
1790
|
-
function
|
|
1831
|
+
function Ue(e) {
|
|
1791
1832
|
var t;
|
|
1792
1833
|
e.blocks.forEach((n) => {
|
|
1793
1834
|
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),
|
|
1835
|
+
}), 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
1836
|
}
|
|
1796
|
-
function
|
|
1837
|
+
function Jn(e, t) {
|
|
1797
1838
|
const n = Math.max(0, Math.min(1, Number(t)));
|
|
1798
1839
|
e.blocks.forEach((r) => {
|
|
1799
1840
|
r.material && (r.material.opacity = n, r.material.transparent = n < 1, r.material.needsUpdate = !0);
|
|
1800
1841
|
});
|
|
1801
1842
|
}
|
|
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),
|
|
1843
|
+
function Qn(e, t, n) {
|
|
1844
|
+
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
1845
|
if (!e._blockHighlightMesh) {
|
|
1805
1846
|
const m = new f.BoxGeometry(1, 1, 1), h = new f.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1 });
|
|
1806
1847
|
e._blockHighlightMesh = new f.Mesh(m, h), e.scene.add(e._blockHighlightMesh);
|
|
1807
1848
|
}
|
|
1808
|
-
return e._blockHighlightMesh.position.set(a, c, l), e._blockHighlightMesh.scale.set(s, u,
|
|
1849
|
+
return e._blockHighlightMesh.position.set(a, c, l), e._blockHighlightMesh.scale.set(s, u, p), e._blockHighlightMesh;
|
|
1809
1850
|
}
|
|
1810
|
-
function
|
|
1851
|
+
function Ye(e) {
|
|
1811
1852
|
var o, i;
|
|
1812
1853
|
if (!e._outlinePass || e.selectables.length === 0) {
|
|
1813
|
-
e._outlinePass &&
|
|
1854
|
+
e._outlinePass && Z(e, null);
|
|
1814
1855
|
return;
|
|
1815
1856
|
}
|
|
1816
1857
|
const t = e.raycaster.intersectObjects(e.selectables, !0);
|
|
1817
1858
|
if (t.length === 0) {
|
|
1818
|
-
|
|
1859
|
+
Z(e, null);
|
|
1819
1860
|
return;
|
|
1820
1861
|
}
|
|
1821
1862
|
const n = t[0], r = n.object;
|
|
1822
1863
|
if ((o = r == null ? void 0 : r.userData) != null && o._isMergedBlocks) {
|
|
1823
1864
|
const a = Math.floor(n.faceIndex / 2), c = (i = r.userData._quadToBlock) == null ? void 0 : i[a];
|
|
1824
1865
|
if (c) {
|
|
1825
|
-
|
|
1866
|
+
Z(e, Qn(e, c, r.userData._offset));
|
|
1826
1867
|
return;
|
|
1827
1868
|
}
|
|
1828
1869
|
}
|
|
1829
|
-
|
|
1870
|
+
Z(e, r);
|
|
1830
1871
|
}
|
|
1831
|
-
function
|
|
1872
|
+
function er(e) {
|
|
1832
1873
|
const t = e.renderer;
|
|
1833
1874
|
t && (e.handleCanvasClick = (n) => {
|
|
1834
|
-
var h, d,
|
|
1875
|
+
var h, d, g, N, O, b, L;
|
|
1835
1876
|
if (n.button !== 0) return;
|
|
1836
1877
|
if ((h = e.gizmo) != null && h.domElement) {
|
|
1837
1878
|
const y = e.gizmo.domElement.getBoundingClientRect();
|
|
@@ -1839,18 +1880,18 @@ function Un(e) {
|
|
|
1839
1880
|
return;
|
|
1840
1881
|
}
|
|
1841
1882
|
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),
|
|
1883
|
+
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
1884
|
const y = e.raycaster.intersectObjects(e.blocks, !1);
|
|
1844
1885
|
if (y.length > 0) {
|
|
1845
|
-
const
|
|
1846
|
-
if ((d =
|
|
1847
|
-
const
|
|
1848
|
-
|
|
1886
|
+
const E = y[0], k = E.object;
|
|
1887
|
+
if ((d = k == null ? void 0 : k.userData) != null && d._isMergedBlocks && e.blockClickHandler) {
|
|
1888
|
+
const D = Math.floor(E.faceIndex / 2), w = k.userData._quadToBlock[D];
|
|
1889
|
+
w && e.blockClickHandler(w);
|
|
1849
1890
|
}
|
|
1850
1891
|
return;
|
|
1851
1892
|
}
|
|
1852
1893
|
}
|
|
1853
|
-
const a = e.raycaster.intersectObjects(e.drillMeshes, !0), c = e.raycaster.intersectObjects(e.structuralMeshes, !0), l = ((
|
|
1894
|
+
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
1895
|
if ((((N = c[0]) == null ? void 0 : N.distance) ?? 1 / 0) < l && c.length > 0) {
|
|
1855
1896
|
const y = c[0].object;
|
|
1856
1897
|
e.drillholeClickHandler && e.drillholeClickHandler({ type: "structure", ...y.userData });
|
|
@@ -1858,13 +1899,13 @@ function Un(e) {
|
|
|
1858
1899
|
}
|
|
1859
1900
|
if (a.length === 0) return;
|
|
1860
1901
|
let u = a[0].object;
|
|
1861
|
-
for (; u && u.parent && !((
|
|
1902
|
+
for (; u && u.parent && !((O = u.userData) != null && O.holeId); )
|
|
1862
1903
|
u = u.parent;
|
|
1863
|
-
const
|
|
1864
|
-
|
|
1904
|
+
const p = (b = u == null ? void 0 : u.userData) == null ? void 0 : b.holeId, m = (L = u == null ? void 0 : u.userData) == null ? void 0 : L.project;
|
|
1905
|
+
p && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: p, project: m });
|
|
1865
1906
|
}, t.domElement.addEventListener("click", e.handleCanvasClick));
|
|
1866
1907
|
}
|
|
1867
|
-
class
|
|
1908
|
+
class Gr {
|
|
1868
1909
|
constructor() {
|
|
1869
1910
|
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
1911
|
}
|
|
@@ -1878,21 +1919,21 @@ class Nr {
|
|
|
1878
1919
|
const i = new f.DirectionalLight(16777215, 1.5);
|
|
1879
1920
|
i.position.set(10, 10, 5), this.scene.add(i);
|
|
1880
1921
|
const a = new f.AxesHelper(20);
|
|
1881
|
-
this.scene.add(a), this.controls = new
|
|
1922
|
+
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
1923
|
LEFT: f.MOUSE.PAN,
|
|
1883
1924
|
MIDDLE: f.MOUSE.DOLLY,
|
|
1884
1925
|
RIGHT: f.MOUSE.ROTATE
|
|
1885
1926
|
}, this.controls.touches = {
|
|
1886
1927
|
ONE: f.TOUCH.ROTATE,
|
|
1887
1928
|
TWO: f.TOUCH.DOLLY_PAN
|
|
1888
|
-
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new
|
|
1929
|
+
}, 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
1930
|
container: this.container,
|
|
1890
1931
|
placement: "top-right",
|
|
1891
1932
|
size: 110,
|
|
1892
1933
|
offset: { top: 12, right: 12 },
|
|
1893
1934
|
animated: !0,
|
|
1894
1935
|
speed: 1.5
|
|
1895
|
-
}), this.gizmo.attachControls(this.controls),
|
|
1936
|
+
}), this.gizmo.attachControls(this.controls), er(this), this._wheelRelay = (l) => {
|
|
1896
1937
|
l.target !== this.renderer.domElement && (l.preventDefault(), this.renderer.domElement.dispatchEvent(new WheelEvent("wheel", {
|
|
1897
1938
|
clientX: l.clientX,
|
|
1898
1939
|
clientY: l.clientY,
|
|
@@ -1905,7 +1946,7 @@ class Nr {
|
|
|
1905
1946
|
altKey: l.altKey,
|
|
1906
1947
|
bubbles: !1
|
|
1907
1948
|
})));
|
|
1908
|
-
}, this.container.addEventListener("wheel", this._wheelRelay, { passive: !1 }),
|
|
1949
|
+
}, this.container.addEventListener("wheel", this._wheelRelay, { passive: !1 }), qn(this);
|
|
1909
1950
|
const c = () => {
|
|
1910
1951
|
var s;
|
|
1911
1952
|
this.frameId = requestAnimationFrame(c);
|
|
@@ -1917,16 +1958,16 @@ class Nr {
|
|
|
1917
1958
|
resize() {
|
|
1918
1959
|
if (!this.container || !this.camera || !this.renderer) return;
|
|
1919
1960
|
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(),
|
|
1961
|
+
this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), Zn(this, t, n);
|
|
1921
1962
|
}
|
|
1922
1963
|
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,
|
|
1964
|
+
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), hn(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
1965
|
}
|
|
1925
1966
|
// ---------------------------------------------------------------------------
|
|
1926
1967
|
// Data renderers — delegate to domain modules
|
|
1927
1968
|
// ---------------------------------------------------------------------------
|
|
1928
1969
|
setDrillholes(t, n = {}) {
|
|
1929
|
-
|
|
1970
|
+
Tn(this, t, n);
|
|
1930
1971
|
}
|
|
1931
1972
|
/**
|
|
1932
1973
|
* Add floating 2D strip log panels beside drillholes in the 3D scene.
|
|
@@ -1941,13 +1982,13 @@ class Nr {
|
|
|
1941
1982
|
* - `options` {object} — optional: panelWidth, lateralOffset, color, valueMin, valueMax
|
|
1942
1983
|
*/
|
|
1943
1984
|
setStripLogs(t, n) {
|
|
1944
|
-
|
|
1985
|
+
Un(this, t, n);
|
|
1945
1986
|
}
|
|
1946
1987
|
/**
|
|
1947
1988
|
* Remove all strip log panels from the scene and free GPU resources.
|
|
1948
1989
|
*/
|
|
1949
1990
|
clearStripLogs() {
|
|
1950
|
-
|
|
1991
|
+
ce(this);
|
|
1951
1992
|
}
|
|
1952
1993
|
/**
|
|
1953
1994
|
* Render block model data as a single merged mesh of exterior faces only.
|
|
@@ -1957,20 +1998,20 @@ class Nr {
|
|
|
1957
1998
|
* @param {Object} [options]
|
|
1958
1999
|
*/
|
|
1959
2000
|
setBlocks(t, n, r, o = {}) {
|
|
1960
|
-
|
|
2001
|
+
Kn(this, t, n, r, o);
|
|
1961
2002
|
}
|
|
1962
2003
|
/**
|
|
1963
2004
|
* Update the opacity of all currently rendered blocks.
|
|
1964
2005
|
* @param {number} opacity - New opacity value between 0 and 1
|
|
1965
2006
|
*/
|
|
1966
2007
|
setBlockOpacity(t) {
|
|
1967
|
-
|
|
2008
|
+
Jn(this, t);
|
|
1968
2009
|
}
|
|
1969
2010
|
setStructuralDiscs(t, n, r = {}) {
|
|
1970
|
-
|
|
2011
|
+
nn(this, t, n, r);
|
|
1971
2012
|
}
|
|
1972
2013
|
setStructuralDiscsVisible(t) {
|
|
1973
|
-
|
|
2014
|
+
rn(this, t);
|
|
1974
2015
|
}
|
|
1975
2016
|
// ---------------------------------------------------------------------------
|
|
1976
2017
|
// Click handlers
|
|
@@ -1992,41 +2033,41 @@ class Nr {
|
|
|
1992
2033
|
this.viewChangeHandler = typeof t == "function" ? t : null;
|
|
1993
2034
|
}
|
|
1994
2035
|
getViewState() {
|
|
1995
|
-
return
|
|
2036
|
+
return He(this);
|
|
1996
2037
|
}
|
|
1997
2038
|
setViewState(t) {
|
|
1998
|
-
return
|
|
2039
|
+
return bn(this, t);
|
|
1999
2040
|
}
|
|
2000
2041
|
_buildViewSignature(t) {
|
|
2001
|
-
return
|
|
2042
|
+
return Me(t);
|
|
2002
2043
|
}
|
|
2003
2044
|
_emitViewChangeIfNeeded() {
|
|
2004
|
-
|
|
2045
|
+
pn(this);
|
|
2005
2046
|
}
|
|
2006
2047
|
_fitCameraToBounds({ minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a }) {
|
|
2007
|
-
|
|
2048
|
+
Ee(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: a });
|
|
2008
2049
|
}
|
|
2009
2050
|
recenterCameraToOrigin(t = 1e3) {
|
|
2010
|
-
|
|
2051
|
+
gn(this, t);
|
|
2011
2052
|
}
|
|
2012
2053
|
lookDown(t = 2e3) {
|
|
2013
|
-
|
|
2054
|
+
yn(this, t);
|
|
2014
2055
|
}
|
|
2015
2056
|
pan(t = 0, n = 0) {
|
|
2016
|
-
|
|
2057
|
+
_n(this, t, n);
|
|
2017
2058
|
}
|
|
2018
2059
|
dolly(t = 1.1) {
|
|
2019
|
-
|
|
2060
|
+
Mn(this, t);
|
|
2020
2061
|
}
|
|
2021
2062
|
focusOnLastBounds(t = 1.2) {
|
|
2022
|
-
|
|
2063
|
+
En(this, t);
|
|
2023
2064
|
}
|
|
2024
2065
|
/**
|
|
2025
2066
|
* Change the camera field-of-view while keeping the visible scene the same apparent size.
|
|
2026
2067
|
* @param {number} fovDeg - Desired FOV in degrees
|
|
2027
2068
|
*/
|
|
2028
2069
|
setCameraFov(t) {
|
|
2029
|
-
|
|
2070
|
+
On(this, t);
|
|
2030
2071
|
}
|
|
2031
2072
|
/**
|
|
2032
2073
|
* Set the scene background colour.
|
|
@@ -2036,13 +2077,13 @@ class Nr {
|
|
|
2036
2077
|
this.scene && (this.scene.background = new f.Color(t === "black" ? 0 : 16777215));
|
|
2037
2078
|
}
|
|
2038
2079
|
setControlMode(t = "orbit") {
|
|
2039
|
-
|
|
2080
|
+
kn(this, t);
|
|
2040
2081
|
}
|
|
2041
2082
|
// ---------------------------------------------------------------------------
|
|
2042
2083
|
// Selection glow public API
|
|
2043
2084
|
// ---------------------------------------------------------------------------
|
|
2044
2085
|
_syncSelectables() {
|
|
2045
|
-
|
|
2086
|
+
j(this);
|
|
2046
2087
|
}
|
|
2047
2088
|
/**
|
|
2048
2089
|
* Register the objects that are candidates for click-select glow.
|
|
@@ -2056,7 +2097,7 @@ class Nr {
|
|
|
2056
2097
|
* @param {THREE.Object3D|null} object
|
|
2057
2098
|
*/
|
|
2058
2099
|
selectObject(t) {
|
|
2059
|
-
|
|
2100
|
+
Z(this, t || null);
|
|
2060
2101
|
}
|
|
2061
2102
|
/**
|
|
2062
2103
|
* Return the currently selected object, or null if nothing is selected.
|
|
@@ -2069,11 +2110,11 @@ class Nr {
|
|
|
2069
2110
|
* Dispose the effect composer and all GPU resources used by the selection glow.
|
|
2070
2111
|
*/
|
|
2071
2112
|
disposeGlow() {
|
|
2072
|
-
|
|
2113
|
+
Se(this);
|
|
2073
2114
|
}
|
|
2074
2115
|
/** @private */
|
|
2075
2116
|
_updateSelectionFromPointer() {
|
|
2076
|
-
|
|
2117
|
+
Ye(this);
|
|
2077
2118
|
}
|
|
2078
2119
|
// ---------------------------------------------------------------------------
|
|
2079
2120
|
// Raster overlay API — delegate to rasterOverlayScene
|
|
@@ -2083,14 +2124,14 @@ class Nr {
|
|
|
2083
2124
|
* @param {object} layer - Layer descriptor returned by createRasterOverlay()
|
|
2084
2125
|
*/
|
|
2085
2126
|
addRasterOverlay(t) {
|
|
2086
|
-
|
|
2127
|
+
ln(this, t);
|
|
2087
2128
|
}
|
|
2088
2129
|
/**
|
|
2089
2130
|
* Remove a raster overlay from the scene and dispose its GPU resources.
|
|
2090
2131
|
* @param {string} id - Overlay id
|
|
2091
2132
|
*/
|
|
2092
2133
|
removeRasterOverlay(t) {
|
|
2093
|
-
|
|
2134
|
+
_e(this, t);
|
|
2094
2135
|
}
|
|
2095
2136
|
/**
|
|
2096
2137
|
* Set the opacity of a raster overlay at runtime.
|
|
@@ -2098,7 +2139,7 @@ class Nr {
|
|
|
2098
2139
|
* @param {number} opacity - New opacity [0, 1]
|
|
2099
2140
|
*/
|
|
2100
2141
|
setRasterOverlayOpacity(t, n) {
|
|
2101
|
-
|
|
2142
|
+
cn(this, t, n);
|
|
2102
2143
|
}
|
|
2103
2144
|
/**
|
|
2104
2145
|
* Show or hide a raster overlay.
|
|
@@ -2106,7 +2147,7 @@ class Nr {
|
|
|
2106
2147
|
* @param {boolean} visible
|
|
2107
2148
|
*/
|
|
2108
2149
|
setRasterOverlayVisibility(t, n) {
|
|
2109
|
-
|
|
2150
|
+
un(this, t, n);
|
|
2110
2151
|
}
|
|
2111
2152
|
/**
|
|
2112
2153
|
* Update the elevation (Z position) of a raster overlay.
|
|
@@ -2114,7 +2155,7 @@ class Nr {
|
|
|
2114
2155
|
* @param {number} elevation
|
|
2115
2156
|
*/
|
|
2116
2157
|
setRasterOverlayElevation(t, n) {
|
|
2117
|
-
|
|
2158
|
+
mn(this, t, n);
|
|
2118
2159
|
}
|
|
2119
2160
|
/**
|
|
2120
2161
|
* Return a raster overlay by id, or undefined if not found.
|
|
@@ -2122,131 +2163,151 @@ class Nr {
|
|
|
2122
2163
|
* @returns {object|undefined}
|
|
2123
2164
|
*/
|
|
2124
2165
|
getRasterOverlay(t) {
|
|
2125
|
-
return
|
|
2166
|
+
return dn(this, t);
|
|
2126
2167
|
}
|
|
2127
2168
|
/**
|
|
2128
2169
|
* Return all raster overlay layers in insertion order.
|
|
2129
2170
|
* @returns {object[]}
|
|
2130
2171
|
*/
|
|
2131
2172
|
listRasterOverlays() {
|
|
2132
|
-
return
|
|
2173
|
+
return fn(this);
|
|
2133
2174
|
}
|
|
2134
2175
|
}
|
|
2135
2176
|
export {
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2177
|
+
be as $,
|
|
2178
|
+
W as A,
|
|
2179
|
+
Er as B,
|
|
2180
|
+
zr as C,
|
|
2181
|
+
ge as D,
|
|
2182
|
+
fe as E,
|
|
2183
|
+
ne as F,
|
|
2184
|
+
Ie as G,
|
|
2144
2185
|
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
|
-
|
|
2186
|
+
Or as I,
|
|
2187
|
+
M as J,
|
|
2188
|
+
Ir as K,
|
|
2189
|
+
ue as L,
|
|
2190
|
+
pe as M,
|
|
2191
|
+
he as N,
|
|
2192
|
+
vr as O,
|
|
2193
|
+
xe as P,
|
|
2194
|
+
vt as Q,
|
|
2195
|
+
ve as R,
|
|
2196
|
+
re as S,
|
|
2197
|
+
Q as T,
|
|
2198
|
+
Gr as U,
|
|
2199
|
+
ze as V,
|
|
2200
|
+
dt as W,
|
|
2201
|
+
yt as X,
|
|
2202
|
+
Nt as Y,
|
|
2203
|
+
te as Z,
|
|
2204
|
+
Mt as _,
|
|
2205
|
+
me as a,
|
|
2206
|
+
kr as a$,
|
|
2207
|
+
lr as a0,
|
|
2208
|
+
we as a1,
|
|
2209
|
+
br as a2,
|
|
2210
|
+
ht as a3,
|
|
2211
|
+
fr as a4,
|
|
2212
|
+
dr as a5,
|
|
2213
|
+
_t as a6,
|
|
2214
|
+
ee as a7,
|
|
2215
|
+
Gt as a8,
|
|
2216
|
+
G as a9,
|
|
2217
|
+
Me as aA,
|
|
2218
|
+
Fr as aB,
|
|
2219
|
+
At as aC,
|
|
2220
|
+
hn as aD,
|
|
2221
|
+
ce as aE,
|
|
2222
|
+
Ft as aF,
|
|
2223
|
+
Vr as aG,
|
|
2224
|
+
Dr as aH,
|
|
2225
|
+
en as aI,
|
|
2226
|
+
Mn as aJ,
|
|
2227
|
+
pn as aK,
|
|
2228
|
+
Dt as aL,
|
|
2229
|
+
Ee as aM,
|
|
2230
|
+
En as aN,
|
|
2231
|
+
xr as aO,
|
|
2232
|
+
Dn as aP,
|
|
2233
|
+
St as aQ,
|
|
2234
|
+
Pt as aR,
|
|
2235
|
+
Re as aS,
|
|
2236
|
+
Kt as aT,
|
|
2237
|
+
Hr as aU,
|
|
2238
|
+
dn as aV,
|
|
2239
|
+
He as aW,
|
|
2240
|
+
wt as aX,
|
|
2241
|
+
fn as aY,
|
|
2242
|
+
wr as aZ,
|
|
2243
|
+
Lr as a_,
|
|
2244
|
+
Ct as aa,
|
|
2245
|
+
Nn as ab,
|
|
2246
|
+
zn as ac,
|
|
2247
|
+
gr as ad,
|
|
2248
|
+
Ne as ae,
|
|
2249
|
+
cr as af,
|
|
2250
|
+
Tt as ag,
|
|
2251
|
+
ur as ah,
|
|
2252
|
+
Rt as ai,
|
|
2253
|
+
Vt as aj,
|
|
2254
|
+
bt as ak,
|
|
2255
|
+
pt as al,
|
|
2256
|
+
gt as am,
|
|
2257
|
+
Rn as an,
|
|
2258
|
+
Bn as ao,
|
|
2259
|
+
Pn as ap,
|
|
2260
|
+
mr as aq,
|
|
2261
|
+
ft as ar,
|
|
2262
|
+
hr as as,
|
|
2263
|
+
ln as at,
|
|
2264
|
+
xt as au,
|
|
2265
|
+
Rr as av,
|
|
2266
|
+
Zt as aw,
|
|
2267
|
+
jn as ax,
|
|
2268
|
+
Hn as ay,
|
|
2269
|
+
tn as az,
|
|
2270
|
+
K as b,
|
|
2271
|
+
yn as b0,
|
|
2272
|
+
Lt as b1,
|
|
2273
|
+
sn as b2,
|
|
2274
|
+
Vn as b3,
|
|
2275
|
+
_n as b4,
|
|
2276
|
+
Sr as b5,
|
|
2277
|
+
gn as b6,
|
|
2278
|
+
_e as b7,
|
|
2279
|
+
Bt as b8,
|
|
2280
|
+
kn as b9,
|
|
2281
|
+
On as ba,
|
|
2282
|
+
mn as bb,
|
|
2283
|
+
cn as bc,
|
|
2284
|
+
un as bd,
|
|
2285
|
+
Un as be,
|
|
2286
|
+
bn as bf,
|
|
2287
|
+
Et as bg,
|
|
2288
|
+
Ar as c,
|
|
2289
|
+
de as d,
|
|
2290
|
+
Ce as e,
|
|
2291
|
+
pr as f,
|
|
2292
|
+
ye as g,
|
|
2293
|
+
le as h,
|
|
2294
|
+
zt as i,
|
|
2295
|
+
ae as j,
|
|
2296
|
+
J as k,
|
|
2297
|
+
Ot as l,
|
|
2298
|
+
Xt as m,
|
|
2299
|
+
Pr as n,
|
|
2300
|
+
Br as o,
|
|
2301
|
+
Fe as p,
|
|
2302
|
+
qt as q,
|
|
2303
|
+
It as r,
|
|
2304
|
+
_ as s,
|
|
2305
|
+
Tr as t,
|
|
2306
|
+
Cr as u,
|
|
2307
|
+
Mr as v,
|
|
2308
|
+
se as w,
|
|
2309
|
+
yr as x,
|
|
2310
|
+
_r as y,
|
|
2311
|
+
Nr as z
|
|
2251
2312
|
};
|
|
2252
|
-
//# sourceMappingURL=baselode3dScene-
|
|
2313
|
+
//# sourceMappingURL=baselode3dScene-CLEvddGM.js.map
|