@thatopen/components 2.3.17 → 2.3.19
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/core/Components/index.d.ts +1 -1
- package/dist/core/Viewpoints/src/viewpoint.d.ts +2 -2
- package/dist/ifc/IfcIsolator/index.d.ts +24 -0
- package/dist/ifc/IfcPropertiesManager/index.d.ts +3 -3
- package/dist/ifc/index.d.ts +1 -0
- package/dist/index.cjs +23 -23
- package/dist/index.mjs +892 -831
- package/dist/namespace.d.ts +2736 -2708
- package/dist/openbim/BCFTopics/src/Topic.d.ts +5 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var C = (c, i, t) => (
|
|
1
|
+
var Oo = Object.defineProperty;
|
|
2
|
+
var No = (c, i, t) => i in c ? Oo(c, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[i] = t;
|
|
3
|
+
var C = (c, i, t) => (No(c, typeof i != "symbol" ? i + "" : i, t), t);
|
|
4
4
|
import * as D from "three";
|
|
5
|
-
import { BufferAttribute as
|
|
5
|
+
import { BufferAttribute as Qr, Vector3 as Q, Plane as Un, Line3 as Ee, Vector2 as ai, Triangle as ii, Sphere as yo, Matrix4 as pe, Box3 as ae, BackSide as Lo, DoubleSide as Kr, FrontSide as jn, Ray as Po, Mesh as rt, Object3D as En, MeshBasicMaterial as Jr, LineBasicMaterial as _o, CylinderGeometry as Vt, BoxGeometry as Ut, BufferGeometry as qn, Float32BufferAttribute as Qn, OctahedronGeometry as Gi, Line as Fe, TorusGeometry as Ii, SphereGeometry as wo, Quaternion as de, Euler as Mo, PlaneGeometry as Do, Raycaster as bo } from "three";
|
|
6
6
|
import * as Qt from "@thatopen/fragments";
|
|
7
|
-
import { FragmentsGroup as
|
|
7
|
+
import { FragmentsGroup as Xs, Serializer as vo } from "@thatopen/fragments";
|
|
8
8
|
import * as k from "web-ifc";
|
|
9
|
-
const
|
|
10
|
-
function
|
|
9
|
+
const to = 0, Uo = 1, xo = 2, Kn = 2, $s = 1.25, Jn = 1, Is = 6 * 4 + 4 + 4, Gs = 65535, Bo = Math.pow(2, -24), Zs = Symbol("SKIP_GENERATION");
|
|
10
|
+
function Vo(c) {
|
|
11
11
|
return c.index ? c.index.count : c.attributes.position.count;
|
|
12
12
|
}
|
|
13
13
|
function li(c) {
|
|
14
|
-
return
|
|
14
|
+
return Vo(c) / 3;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Yo(c, i = ArrayBuffer) {
|
|
17
17
|
return c > 65535 ? new Uint32Array(new i(4 * c)) : new Uint16Array(new i(2 * c));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Go(c, i) {
|
|
20
20
|
if (!c.index) {
|
|
21
|
-
const t = c.attributes.position.count, e = i.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s =
|
|
22
|
-
c.setIndex(new
|
|
21
|
+
const t = c.attributes.position.count, e = i.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = Yo(t, e);
|
|
22
|
+
c.setIndex(new Qr(s, 1));
|
|
23
23
|
for (let n = 0; n < t; n++)
|
|
24
24
|
s[n] = n;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function eo(c) {
|
|
28
28
|
const i = li(c), t = c.drawRange, e = t.start / 3, s = (t.start + t.count) / 3, n = Math.max(0, e), r = Math.min(i, s) - n;
|
|
29
29
|
return [{
|
|
30
30
|
offset: Math.floor(n),
|
|
31
31
|
count: Math.floor(r)
|
|
32
32
|
}];
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function io(c) {
|
|
35
35
|
if (!c.groups || !c.groups.length)
|
|
36
|
-
return
|
|
36
|
+
return eo(c);
|
|
37
37
|
const i = [], t = /* @__PURE__ */ new Set(), e = c.drawRange, s = e.start / 3, n = (e.start + e.count) / 3;
|
|
38
38
|
for (const o of c.groups) {
|
|
39
39
|
const a = o.start / 3, l = (o.start + o.count) / 3;
|
|
@@ -49,10 +49,10 @@ function to(c) {
|
|
|
49
49
|
}
|
|
50
50
|
return i;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function zo(c) {
|
|
53
53
|
if (c.groups.length === 0)
|
|
54
54
|
return !1;
|
|
55
|
-
const i = li(c), t =
|
|
55
|
+
const i = li(c), t = io(c).sort((n, r) => n.offset - r.offset), e = t[t.length - 1];
|
|
56
56
|
e.count = Math.min(i - e.offset, e.count);
|
|
57
57
|
let s = 0;
|
|
58
58
|
return t.forEach(({ count: n }) => s += n), i !== s;
|
|
@@ -60,10 +60,10 @@ function Yo(c) {
|
|
|
60
60
|
function Nt(c, i, t) {
|
|
61
61
|
return t.min.x = i[c], t.min.y = i[c + 1], t.min.z = i[c + 2], t.max.x = i[c + 3], t.max.y = i[c + 4], t.max.z = i[c + 5], t;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function ko(c) {
|
|
64
64
|
c[0] = c[1] = c[2] = 1 / 0, c[3] = c[4] = c[5] = -1 / 0;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function tr(c) {
|
|
67
67
|
let i = -1, t = -1 / 0;
|
|
68
68
|
for (let e = 0; e < 3; e++) {
|
|
69
69
|
const s = c[e + 3] - c[e];
|
|
@@ -71,10 +71,10 @@ function Jn(c) {
|
|
|
71
71
|
}
|
|
72
72
|
return i;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function er(c, i) {
|
|
75
75
|
i.set(c);
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function ir(c, i, t) {
|
|
78
78
|
let e, s;
|
|
79
79
|
for (let n = 0; n < 3; n++) {
|
|
80
80
|
const r = n + 3;
|
|
@@ -91,7 +91,7 @@ function di(c) {
|
|
|
91
91
|
const i = c[3] - c[0], t = c[4] - c[1], e = c[5] - c[2];
|
|
92
92
|
return 2 * (i * t + t * e + e * i);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function js(c, i, t, e, s = null) {
|
|
95
95
|
let n = 1 / 0, r = 1 / 0, o = 1 / 0, a = -1 / 0, l = -1 / 0, h = -1 / 0, f = 1 / 0, I = 1 / 0, u = 1 / 0, d = -1 / 0, E = -1 / 0, T = -1 / 0;
|
|
96
96
|
const p = s !== null;
|
|
97
97
|
for (let R = i * 6, S = (i + t) * 6; R < S; R += 6) {
|
|
@@ -104,7 +104,7 @@ function Zs(c, i, t, e, s = null) {
|
|
|
104
104
|
}
|
|
105
105
|
e[0] = n, e[1] = r, e[2] = o, e[3] = a, e[4] = l, e[5] = h, p && (s[0] = f, s[1] = I, s[2] = u, s[3] = d, s[4] = E, s[5] = T);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Ho(c, i, t, e) {
|
|
108
108
|
let s = 1 / 0, n = 1 / 0, r = 1 / 0, o = -1 / 0, a = -1 / 0, l = -1 / 0;
|
|
109
109
|
for (let h = i * 6, f = (i + t) * 6; h < f; h += 6) {
|
|
110
110
|
const I = c[h + 0];
|
|
@@ -116,8 +116,8 @@ function zo(c, i, t, e) {
|
|
|
116
116
|
}
|
|
117
117
|
e[0] = s, e[1] = n, e[2] = r, e[3] = o, e[4] = a, e[5] = l;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
|
|
119
|
+
function Wo(c, i) {
|
|
120
|
+
ko(i);
|
|
121
121
|
const t = c.attributes.position, e = c.index ? c.index.array : null, s = li(c), n = new Float32Array(s * 6), r = t.normalized, o = t.array, a = t.offset || 0;
|
|
122
122
|
let l = 3;
|
|
123
123
|
t.isInterleavedBufferAttribute && (l = t.data.stride);
|
|
@@ -134,27 +134,27 @@ function ko(c, i) {
|
|
|
134
134
|
let O = R;
|
|
135
135
|
S > O && (O = S), m > O && (O = m);
|
|
136
136
|
const y = (O - F) / 2, w = p * 2;
|
|
137
|
-
n[u + w + 0] = F + y, n[u + w + 1] = y + (Math.abs(F) + y) *
|
|
137
|
+
n[u + w + 0] = F + y, n[u + w + 1] = y + (Math.abs(F) + y) * Bo, F < i[p] && (i[p] = F), O > i[p + 3] && (i[p + 3] = O);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
return n;
|
|
141
141
|
}
|
|
142
|
-
const Te = 32,
|
|
142
|
+
const Te = 32, Xo = (c, i) => c.candidate - i.candidate, Se = new Array(Te).fill().map(() => ({
|
|
143
143
|
count: 0,
|
|
144
144
|
bounds: new Float32Array(6),
|
|
145
145
|
rightCacheBounds: new Float32Array(6),
|
|
146
146
|
leftCacheBounds: new Float32Array(6),
|
|
147
147
|
candidate: 0
|
|
148
148
|
})), ki = new Float32Array(6);
|
|
149
|
-
function
|
|
149
|
+
function $o(c, i, t, e, s, n) {
|
|
150
150
|
let r = -1, o = 0;
|
|
151
|
-
if (n ===
|
|
152
|
-
r =
|
|
153
|
-
else if (n ===
|
|
154
|
-
r =
|
|
155
|
-
else if (n ===
|
|
151
|
+
if (n === to)
|
|
152
|
+
r = tr(i), r !== -1 && (o = (i[r] + i[r + 3]) / 2);
|
|
153
|
+
else if (n === Uo)
|
|
154
|
+
r = tr(c), r !== -1 && (o = Zo(t, e, s, r));
|
|
155
|
+
else if (n === xo) {
|
|
156
156
|
const a = di(c);
|
|
157
|
-
let l =
|
|
157
|
+
let l = $s * s;
|
|
158
158
|
const h = e * 6, f = (e + s) * 6;
|
|
159
159
|
for (let I = 0; I < 3; I++) {
|
|
160
160
|
const u = i[I], T = (i[I + 3] - u) / Te;
|
|
@@ -174,7 +174,7 @@ function Wo(c, i, t, e, s, n) {
|
|
|
174
174
|
w[L] = 1 / 0, w[L + 3] = -1 / 0, y[L] = 1 / 0, y[L + 3] = -1 / 0, O[L] = 1 / 0, O[L + 3] = -1 / 0;
|
|
175
175
|
zi(m, t, O);
|
|
176
176
|
}
|
|
177
|
-
p.sort(
|
|
177
|
+
p.sort(Xo);
|
|
178
178
|
let S = s;
|
|
179
179
|
for (let m = 0; m < S; m++) {
|
|
180
180
|
const F = p[m];
|
|
@@ -194,7 +194,7 @@ function Wo(c, i, t, e, s, n) {
|
|
|
194
194
|
O !== 0 && (b = di(w) / a);
|
|
195
195
|
let Y = 0;
|
|
196
196
|
y !== 0 && (Y = di(L) / a);
|
|
197
|
-
const N =
|
|
197
|
+
const N = Jn + $s * (b * O + Y * y);
|
|
198
198
|
N < l && (r = I, l = N, o = F.candidate);
|
|
199
199
|
}
|
|
200
200
|
} else {
|
|
@@ -212,20 +212,20 @@ function Wo(c, i, t, e, s, n) {
|
|
|
212
212
|
y.count++, zi(S, t, y.bounds);
|
|
213
213
|
}
|
|
214
214
|
const p = Se[Te - 1];
|
|
215
|
-
|
|
215
|
+
er(p.bounds, p.rightCacheBounds);
|
|
216
216
|
for (let S = Te - 2; S >= 0; S--) {
|
|
217
217
|
const m = Se[S], F = Se[S + 1];
|
|
218
|
-
|
|
218
|
+
ir(m.bounds, F.rightCacheBounds, m.rightCacheBounds);
|
|
219
219
|
}
|
|
220
220
|
let R = 0;
|
|
221
221
|
for (let S = 0; S < Te - 1; S++) {
|
|
222
222
|
const m = Se[S], F = m.count, O = m.bounds, w = Se[S + 1].rightCacheBounds;
|
|
223
|
-
F !== 0 && (R === 0 ?
|
|
223
|
+
F !== 0 && (R === 0 ? er(O, ki) : ir(O, ki, ki)), R += F;
|
|
224
224
|
let L = 0, b = 0;
|
|
225
225
|
R !== 0 && (L = di(ki) / a);
|
|
226
226
|
const Y = s - R;
|
|
227
227
|
Y !== 0 && (b = di(w) / a);
|
|
228
|
-
const N =
|
|
228
|
+
const N = Jn + $s * (L * R + b * Y);
|
|
229
229
|
N < l && (r = I, l = N, o = m.candidate);
|
|
230
230
|
}
|
|
231
231
|
}
|
|
@@ -234,7 +234,7 @@ function Wo(c, i, t, e, s, n) {
|
|
|
234
234
|
console.warn(`MeshBVH: Invalid build strategy value ${n} used.`);
|
|
235
235
|
return { axis: r, pos: o };
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Zo(c, i, t, e) {
|
|
238
238
|
let s = 0;
|
|
239
239
|
for (let n = i, r = i + t; n < r; n++)
|
|
240
240
|
s += c[n * 6 + e * 2];
|
|
@@ -244,7 +244,7 @@ class Hi {
|
|
|
244
244
|
constructor() {
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function jo(c, i, t, e, s, n) {
|
|
248
248
|
let r = e, o = e + s - 1;
|
|
249
249
|
const a = n.pos, l = n.axis * 2;
|
|
250
250
|
for (; ; ) {
|
|
@@ -266,7 +266,7 @@ function $o(c, i, t, e, s, n) {
|
|
|
266
266
|
return r;
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function qo(c, i, t, e, s, n) {
|
|
270
270
|
let r = e, o = e + s - 1;
|
|
271
271
|
const a = n.pos, l = n.axis * 2;
|
|
272
272
|
for (; ; ) {
|
|
@@ -286,23 +286,23 @@ function Zo(c, i, t, e, s, n) {
|
|
|
286
286
|
return r;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function Qo(c, i) {
|
|
290
290
|
const t = (c.index ? c.index.count : c.attributes.position.count) / 3, e = t > 2 ** 16, s = e ? 4 : 2, n = i ? new SharedArrayBuffer(t * s) : new ArrayBuffer(t * s), r = e ? new Uint32Array(n) : new Uint16Array(n);
|
|
291
291
|
for (let o = 0, a = r.length; o < a; o++)
|
|
292
292
|
r[o] = o;
|
|
293
293
|
return r;
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Ko(c, i) {
|
|
296
296
|
const t = c.geometry, e = t.index ? t.index.array : null, s = i.maxDepth, n = i.verbose, r = i.maxLeafTris, o = i.strategy, a = i.onProgress, l = li(t), h = c._indirectBuffer;
|
|
297
297
|
let f = !1;
|
|
298
|
-
const I = new Float32Array(6), u = new Float32Array(6), d =
|
|
298
|
+
const I = new Float32Array(6), u = new Float32Array(6), d = Wo(t, I), E = i.indirect ? qo : jo, T = [], p = i.indirect ? eo(t) : io(t);
|
|
299
299
|
if (p.length === 1) {
|
|
300
300
|
const m = p[0], F = new Hi();
|
|
301
|
-
F.boundingData = I,
|
|
301
|
+
F.boundingData = I, Ho(d, m.offset, m.count, u), S(F, m.offset, m.count, u), T.push(F);
|
|
302
302
|
} else
|
|
303
303
|
for (let m of p) {
|
|
304
304
|
const F = new Hi();
|
|
305
|
-
F.boundingData = new Float32Array(6),
|
|
305
|
+
F.boundingData = new Float32Array(6), js(d, m.offset, m.count, F.boundingData, u), S(F, m.offset, m.count, u), T.push(F);
|
|
306
306
|
}
|
|
307
307
|
return T;
|
|
308
308
|
function R(m) {
|
|
@@ -311,7 +311,7 @@ function qo(c, i) {
|
|
|
311
311
|
function S(m, F, O, y = null, w = 0) {
|
|
312
312
|
if (!f && w >= s && (f = !0, n && (console.warn(`MeshBVH: Max depth of ${s} reached when generating BVH. Consider increasing maxDepth.`), console.warn(t))), O <= r || w >= s)
|
|
313
313
|
return R(F + O), m.offset = F, m.count = O, m;
|
|
314
|
-
const L =
|
|
314
|
+
const L = $o(m.boundingData, y, d, F, O, o);
|
|
315
315
|
if (L.axis === -1)
|
|
316
316
|
return R(F + O), m.offset = F, m.count = O, m;
|
|
317
317
|
const b = E(h, e, d, F, O, L);
|
|
@@ -320,19 +320,19 @@ function qo(c, i) {
|
|
|
320
320
|
else {
|
|
321
321
|
m.splitAxis = L.axis;
|
|
322
322
|
const Y = new Hi(), N = F, M = b - F;
|
|
323
|
-
m.left = Y, Y.boundingData = new Float32Array(6),
|
|
323
|
+
m.left = Y, Y.boundingData = new Float32Array(6), js(d, N, M, Y.boundingData, u), S(Y, N, M, u, w + 1);
|
|
324
324
|
const g = new Hi(), v = b, q = O - M;
|
|
325
|
-
m.right = g, g.boundingData = new Float32Array(6),
|
|
325
|
+
m.right = g, g.boundingData = new Float32Array(6), js(d, v, q, g.boundingData, u), S(g, v, q, u, w + 1);
|
|
326
326
|
}
|
|
327
327
|
return m;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function Jo(c, i) {
|
|
331
331
|
const t = c.geometry;
|
|
332
|
-
i.indirect && (c._indirectBuffer =
|
|
332
|
+
i.indirect && (c._indirectBuffer = Qo(t, i.useSharedArrayBuffer), zo(t) && !i.verbose && console.warn(
|
|
333
333
|
'MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.'
|
|
334
|
-
)), c._indirectBuffer ||
|
|
335
|
-
const e =
|
|
334
|
+
)), c._indirectBuffer || Go(t, i);
|
|
335
|
+
const e = Ko(c, i);
|
|
336
336
|
let s, n, r;
|
|
337
337
|
const o = [], a = i.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer;
|
|
338
338
|
for (let f = 0; f < e.length; f++) {
|
|
@@ -352,7 +352,7 @@ function Qo(c, i) {
|
|
|
352
352
|
s[u + p] = T[p];
|
|
353
353
|
if (E) {
|
|
354
354
|
const p = I.offset, R = I.count;
|
|
355
|
-
return n[u + 6] = p, r[d + 14] = R, r[d + 15] =
|
|
355
|
+
return n[u + 6] = p, r[d + 14] = R, r[d + 15] = Gs, f + Is;
|
|
356
356
|
} else {
|
|
357
357
|
const p = I.left, R = I.right, S = I.splitAxis;
|
|
358
358
|
let m;
|
|
@@ -401,7 +401,7 @@ Ae.prototype.setFromBox = function() {
|
|
|
401
401
|
this.min = r, this.max = o;
|
|
402
402
|
};
|
|
403
403
|
}();
|
|
404
|
-
const
|
|
404
|
+
const ta = function() {
|
|
405
405
|
const c = new Q(), i = new Q(), t = new Q();
|
|
406
406
|
return function(s, n, r) {
|
|
407
407
|
const o = s.start, a = c, l = n.start, h = i;
|
|
@@ -410,10 +410,10 @@ const Ko = function() {
|
|
|
410
410
|
let p, R;
|
|
411
411
|
T !== 0 ? p = (f * I - d * u) / T : p = 0, R = (f + p * I) / u, r.x = p, r.y = R;
|
|
412
412
|
};
|
|
413
|
-
}(),
|
|
413
|
+
}(), xn = function() {
|
|
414
414
|
const c = new ai(), i = new Q(), t = new Q();
|
|
415
415
|
return function(s, n, r, o) {
|
|
416
|
-
|
|
416
|
+
ta(s, n, c);
|
|
417
417
|
let a = c.x, l = c.y;
|
|
418
418
|
if (a >= 0 && a <= 1 && l >= 0 && l <= 1) {
|
|
419
419
|
s.at(a, r), n.at(l, o);
|
|
@@ -439,8 +439,8 @@ const Ko = function() {
|
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
|
-
}(),
|
|
443
|
-
const c = new Q(), i = new Q(), t = new
|
|
442
|
+
}(), ea = function() {
|
|
443
|
+
const c = new Q(), i = new Q(), t = new Un(), e = new Ee();
|
|
444
444
|
return function(n, r) {
|
|
445
445
|
const { radius: o, center: a } = n, { a: l, b: h, c: f } = r;
|
|
446
446
|
if (e.start = l, e.end = h, e.closestPointToPoint(a, !0, c).distanceTo(a) <= o || (e.start = l, e.end = f, e.closestPointToPoint(a, !0, c).distanceTo(a) <= o) || (e.start = h, e.end = f, e.closestPointToPoint(a, !0, c).distanceTo(a) <= o))
|
|
@@ -453,16 +453,16 @@ const Ko = function() {
|
|
|
453
453
|
}
|
|
454
454
|
return !1;
|
|
455
455
|
};
|
|
456
|
-
}(),
|
|
457
|
-
function
|
|
458
|
-
return Math.abs(c) <
|
|
456
|
+
}(), ia = 1e-15;
|
|
457
|
+
function qs(c) {
|
|
458
|
+
return Math.abs(c) < ia;
|
|
459
459
|
}
|
|
460
460
|
class ne extends ii {
|
|
461
461
|
constructor(...i) {
|
|
462
|
-
super(...i), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new Q()), this.satBounds = new Array(4).fill().map(() => new Ae()), this.points = [this.a, this.b, this.c], this.sphere = new
|
|
462
|
+
super(...i), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new Q()), this.satBounds = new Array(4).fill().map(() => new Ae()), this.points = [this.a, this.b, this.c], this.sphere = new yo(), this.plane = new Un(), this.needsUpdate = !0;
|
|
463
463
|
}
|
|
464
464
|
intersectsSphere(i) {
|
|
465
|
-
return
|
|
465
|
+
return ea(i, this);
|
|
466
466
|
}
|
|
467
467
|
update() {
|
|
468
468
|
const i = this.a, t = this.b, e = this.c, s = this.points, n = this.satAxes, r = this.satBounds, o = n[0], a = r[0];
|
|
@@ -482,7 +482,7 @@ ne.prototype.closestPointToSegment = function() {
|
|
|
482
482
|
let h, f = 1 / 0;
|
|
483
483
|
for (let I = 0; I < 3; I++) {
|
|
484
484
|
const u = (I + 1) % 3;
|
|
485
|
-
t.start.copy(l[I]), t.end.copy(l[u]),
|
|
485
|
+
t.start.copy(l[I]), t.end.copy(l[u]), xn(t, s, c, i), h = c.distanceToSquared(i), h < f && (f = h, n && n.copy(c), r && r.copy(i));
|
|
486
486
|
}
|
|
487
487
|
return this.closestPointToPoint(o, c), h = o.distanceToSquared(c), h < f && (f = h, n && n.copy(c), r && r.copy(o)), this.closestPointToPoint(a, c), h = a.distanceToSquared(c), h < f && (f = h, n && n.copy(c), r && r.copy(a)), Math.sqrt(f);
|
|
488
488
|
};
|
|
@@ -495,13 +495,13 @@ ne.prototype.intersectsTriangle = function() {
|
|
|
495
495
|
for (let F = 0; F < 3; F++) {
|
|
496
496
|
const { start: O, end: y } = h;
|
|
497
497
|
O.copy(R[F]), y.copy(R[(F + 1) % 3]), h.delta(r);
|
|
498
|
-
const w =
|
|
499
|
-
if (
|
|
498
|
+
const w = qs(T.distanceToPoint(O));
|
|
499
|
+
if (qs(T.normal.dot(r)) && w) {
|
|
500
500
|
p.copy(h), S = 2;
|
|
501
501
|
break;
|
|
502
502
|
}
|
|
503
503
|
const L = T.intersectLine(h, u);
|
|
504
|
-
if (!L && w && u.copy(O), (L || w) && !
|
|
504
|
+
if (!L && w && u.copy(O), (L || w) && !qs(u.distanceTo(y))) {
|
|
505
505
|
if (S <= 1)
|
|
506
506
|
(S === 1 ? p.start : p.end).copy(u), w && (m = S);
|
|
507
507
|
else if (S >= 2) {
|
|
@@ -586,7 +586,7 @@ ne.prototype.distanceToTriangle = function() {
|
|
|
586
586
|
e.set(this[I], this[u]);
|
|
587
587
|
for (let d = 0; d < 3; d++) {
|
|
588
588
|
const E = t[d], T = t[(d + 1) % 3];
|
|
589
|
-
s.set(r[E], r[T]),
|
|
589
|
+
s.set(r[E], r[T]), xn(e, s, c, i);
|
|
590
590
|
const p = c.distanceToSquared(i);
|
|
591
591
|
p < h && (h = p, o && o.copy(c), a && a.copy(i));
|
|
592
592
|
}
|
|
@@ -712,7 +712,7 @@ Bt.prototype.distanceToBox = function() {
|
|
|
712
712
|
const p = i[T];
|
|
713
713
|
for (let R = 0; R < 12; R++) {
|
|
714
714
|
const S = t[R];
|
|
715
|
-
|
|
715
|
+
xn(p, S, e, s);
|
|
716
716
|
const m = e.distanceToSquared(s);
|
|
717
717
|
if (m < d && (d = m, a && a.copy(e), l && l.copy(s), m < h))
|
|
718
718
|
return Math.sqrt(m);
|
|
@@ -721,7 +721,7 @@ Bt.prototype.distanceToBox = function() {
|
|
|
721
721
|
return Math.sqrt(d);
|
|
722
722
|
};
|
|
723
723
|
}();
|
|
724
|
-
class
|
|
724
|
+
class Bn {
|
|
725
725
|
constructor(i) {
|
|
726
726
|
this._getNewPrimitive = i, this._primitives = [];
|
|
727
727
|
}
|
|
@@ -733,12 +733,12 @@ class xn {
|
|
|
733
733
|
this._primitives.push(i);
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
class
|
|
736
|
+
class sa extends Bn {
|
|
737
737
|
constructor() {
|
|
738
738
|
super(() => new ne());
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
-
const $t = /* @__PURE__ */ new
|
|
741
|
+
const $t = /* @__PURE__ */ new sa();
|
|
742
742
|
function zt(c, i) {
|
|
743
743
|
return i[c + 15] === 65535;
|
|
744
744
|
}
|
|
@@ -754,10 +754,10 @@ function jt(c) {
|
|
|
754
754
|
function qt(c, i) {
|
|
755
755
|
return i[c + 6];
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function so(c, i) {
|
|
758
758
|
return i[c + 7];
|
|
759
759
|
}
|
|
760
|
-
class
|
|
760
|
+
class na {
|
|
761
761
|
constructor() {
|
|
762
762
|
this.float32Array = null, this.uint16Array = null, this.uint32Array = null;
|
|
763
763
|
const i = [];
|
|
@@ -769,17 +769,17 @@ class ia {
|
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
|
-
const Ft = new
|
|
772
|
+
const Ft = new na();
|
|
773
773
|
let Pe, si;
|
|
774
|
-
const ze = [], Wi = /* @__PURE__ */ new
|
|
775
|
-
function
|
|
774
|
+
const ze = [], Wi = /* @__PURE__ */ new Bn(() => new ae());
|
|
775
|
+
function ra(c, i, t, e, s, n) {
|
|
776
776
|
Pe = Wi.getPrimitive(), si = Wi.getPrimitive(), ze.push(Pe, si), Ft.setBuffer(c._roots[i]);
|
|
777
|
-
const r =
|
|
777
|
+
const r = pn(0, c.geometry, t, e, s, n);
|
|
778
778
|
Ft.clearBuffer(), Wi.releasePrimitive(Pe), Wi.releasePrimitive(si), ze.pop(), ze.pop();
|
|
779
779
|
const o = ze.length;
|
|
780
780
|
return o > 0 && (si = ze[o - 1], Pe = ze[o - 2]), r;
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function pn(c, i, t, e, s = null, n = 0, r = 0) {
|
|
783
783
|
const { float32Array: o, uint16Array: a, uint32Array: l } = Ft;
|
|
784
784
|
let h = c * 2;
|
|
785
785
|
if (zt(h, a)) {
|
|
@@ -809,11 +809,11 @@ function En(c, i, t, e, s = null, n = 0, r = 0) {
|
|
|
809
809
|
R || (R = Pe, Nt(d, o, R));
|
|
810
810
|
const m = zt(d * 2, a), F = t(R, m, T, r + 1, n + d);
|
|
811
811
|
let O;
|
|
812
|
-
if (F ===
|
|
812
|
+
if (F === Kn) {
|
|
813
813
|
const N = b(d), g = Y(d) - N;
|
|
814
814
|
O = e(N, g, !0, r + 1, n + d, R);
|
|
815
815
|
} else
|
|
816
|
-
O = F &&
|
|
816
|
+
O = F && pn(
|
|
817
817
|
d,
|
|
818
818
|
i,
|
|
819
819
|
t,
|
|
@@ -827,11 +827,11 @@ function En(c, i, t, e, s = null, n = 0, r = 0) {
|
|
|
827
827
|
S = si, Nt(E, o, S);
|
|
828
828
|
const y = zt(E * 2, a), w = t(S, y, p, r + 1, n + E);
|
|
829
829
|
let L;
|
|
830
|
-
if (w ===
|
|
830
|
+
if (w === Kn) {
|
|
831
831
|
const N = b(E), g = Y(E) - N;
|
|
832
832
|
L = e(N, g, !0, r + 1, n + E, S);
|
|
833
833
|
} else
|
|
834
|
-
L = w &&
|
|
834
|
+
L = w && pn(
|
|
835
835
|
E,
|
|
836
836
|
i,
|
|
837
837
|
t,
|
|
@@ -843,8 +843,8 @@ function En(c, i, t, e, s = null, n = 0, r = 0) {
|
|
|
843
843
|
return !!L;
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
|
-
const Ei = /* @__PURE__ */ new Q(),
|
|
847
|
-
function
|
|
846
|
+
const Ei = /* @__PURE__ */ new Q(), Qs = /* @__PURE__ */ new Q();
|
|
847
|
+
function oa(c, i, t = {}, e = 0, s = 1 / 0) {
|
|
848
848
|
const n = e * e, r = s * s;
|
|
849
849
|
let o = 1 / 0, a = null;
|
|
850
850
|
if (c.shapecast(
|
|
@@ -854,27 +854,27 @@ function na(c, i, t = {}, e = 0, s = 1 / 0) {
|
|
|
854
854
|
intersectsTriangle: (h, f) => {
|
|
855
855
|
h.closestPointToPoint(i, Ei);
|
|
856
856
|
const I = i.distanceToSquared(Ei);
|
|
857
|
-
return I < o && (
|
|
857
|
+
return I < o && (Qs.copy(Ei), o = I, a = f), I < n;
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
), o === 1 / 0)
|
|
861
861
|
return null;
|
|
862
862
|
const l = Math.sqrt(o);
|
|
863
|
-
return t.point ? t.point.copy(
|
|
863
|
+
return t.point ? t.point.copy(Qs) : t.point = Qs.clone(), t.distance = l, t.faceIndex = a, t;
|
|
864
864
|
}
|
|
865
|
-
const ke = /* @__PURE__ */ new Q(), He = /* @__PURE__ */ new Q(), We = /* @__PURE__ */ new Q(), Xi = /* @__PURE__ */ new ai(), $i = /* @__PURE__ */ new ai(), Zi = /* @__PURE__ */ new ai(),
|
|
866
|
-
function
|
|
865
|
+
const ke = /* @__PURE__ */ new Q(), He = /* @__PURE__ */ new Q(), We = /* @__PURE__ */ new Q(), Xi = /* @__PURE__ */ new ai(), $i = /* @__PURE__ */ new ai(), Zi = /* @__PURE__ */ new ai(), sr = /* @__PURE__ */ new Q(), nr = /* @__PURE__ */ new Q(), rr = /* @__PURE__ */ new Q(), ji = /* @__PURE__ */ new Q();
|
|
866
|
+
function aa(c, i, t, e, s, n) {
|
|
867
867
|
let r;
|
|
868
|
-
return n ===
|
|
868
|
+
return n === Lo ? r = c.intersectTriangle(e, t, i, !0, s) : r = c.intersectTriangle(i, t, e, n !== Kr, s), r === null ? null : {
|
|
869
869
|
distance: c.origin.distanceTo(s),
|
|
870
870
|
point: s.clone()
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function ca(c, i, t, e, s, n, r, o, a) {
|
|
874
874
|
ke.fromBufferAttribute(i, n), He.fromBufferAttribute(i, r), We.fromBufferAttribute(i, o);
|
|
875
|
-
const l =
|
|
875
|
+
const l = aa(c, ke, He, We, ji, a);
|
|
876
876
|
if (l) {
|
|
877
|
-
e && (Xi.fromBufferAttribute(e, n), $i.fromBufferAttribute(e, r), Zi.fromBufferAttribute(e, o), l.uv = ii.getInterpolation(ji, ke, He, We, Xi, $i, Zi, new ai())), s && (Xi.fromBufferAttribute(s, n), $i.fromBufferAttribute(s, r), Zi.fromBufferAttribute(s, o), l.uv1 = ii.getInterpolation(ji, ke, He, We, Xi, $i, Zi, new ai())), t && (
|
|
877
|
+
e && (Xi.fromBufferAttribute(e, n), $i.fromBufferAttribute(e, r), Zi.fromBufferAttribute(e, o), l.uv = ii.getInterpolation(ji, ke, He, We, Xi, $i, Zi, new ai())), s && (Xi.fromBufferAttribute(s, n), $i.fromBufferAttribute(s, r), Zi.fromBufferAttribute(s, o), l.uv1 = ii.getInterpolation(ji, ke, He, We, Xi, $i, Zi, new ai())), t && (sr.fromBufferAttribute(t, n), nr.fromBufferAttribute(t, r), rr.fromBufferAttribute(t, o), l.normal = ii.getInterpolation(ji, ke, He, We, sr, nr, rr, new Q()), l.normal.dot(c.direction) > 0 && l.normal.multiplyScalar(-1));
|
|
878
878
|
const h = {
|
|
879
879
|
a: n,
|
|
880
880
|
b: r,
|
|
@@ -886,12 +886,12 @@ function oa(c, i, t, e, s, n, r, o, a) {
|
|
|
886
886
|
}
|
|
887
887
|
return l;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function zs(c, i, t, e, s) {
|
|
890
890
|
const n = e * 3;
|
|
891
891
|
let r = n + 0, o = n + 1, a = n + 2;
|
|
892
892
|
const l = c.index;
|
|
893
893
|
c.index && (r = l.getX(r), o = l.getX(o), a = l.getX(a));
|
|
894
|
-
const { position: h, normal: f, uv: I, uv1: u } = c.attributes, d =
|
|
894
|
+
const { position: h, normal: f, uv: I, uv1: u } = c.attributes, d = ca(t, h, f, I, u, r, o, a, i);
|
|
895
895
|
return d ? (d.faceIndex = e, s && s.push(d), d) : null;
|
|
896
896
|
}
|
|
897
897
|
function wt(c, i, t, e) {
|
|
@@ -899,21 +899,21 @@ function wt(c, i, t, e) {
|
|
|
899
899
|
let o = i, a = i + 1, l = i + 2;
|
|
900
900
|
t && (o = t.getX(o), a = t.getX(a), l = t.getX(l)), s.x = e.getX(o), s.y = e.getY(o), s.z = e.getZ(o), n.x = e.getX(a), n.y = e.getY(a), n.z = e.getZ(a), r.x = e.getX(l), r.y = e.getY(l), r.z = e.getZ(l);
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function la(c, i, t, e, s, n) {
|
|
903
903
|
const { geometry: r, _indirectBuffer: o } = c;
|
|
904
904
|
for (let a = e, l = e + s; a < l; a++)
|
|
905
|
-
|
|
905
|
+
zs(r, i, t, a, n);
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function ha(c, i, t, e, s) {
|
|
908
908
|
const { geometry: n, _indirectBuffer: r } = c;
|
|
909
909
|
let o = 1 / 0, a = null;
|
|
910
910
|
for (let l = e, h = e + s; l < h; l++) {
|
|
911
911
|
let f;
|
|
912
|
-
f =
|
|
912
|
+
f = zs(n, i, t, l), f && f.distance < o && (a = f, o = f.distance);
|
|
913
913
|
}
|
|
914
914
|
return a;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function ua(c, i, t, e, s, n, r) {
|
|
917
917
|
const { geometry: o } = t, { index: a } = o, l = o.attributes.position;
|
|
918
918
|
for (let h = c, f = i + c; h < f; h++) {
|
|
919
919
|
let I;
|
|
@@ -922,7 +922,7 @@ function la(c, i, t, e, s, n, r) {
|
|
|
922
922
|
}
|
|
923
923
|
return !1;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function fa(c, i = null) {
|
|
926
926
|
i && Array.isArray(i) && (i = new Set(i));
|
|
927
927
|
const t = c.geometry, e = t.index ? t.index.array : null, s = t.attributes.position;
|
|
928
928
|
let n, r, o, a, l = 0;
|
|
@@ -931,7 +931,7 @@ function ha(c, i = null) {
|
|
|
931
931
|
n = h[I], r = new Uint32Array(n), o = new Uint16Array(n), a = new Float32Array(n), f(0, l), l += n.byteLength;
|
|
932
932
|
function f(I, u, d = !1) {
|
|
933
933
|
const E = I * 2;
|
|
934
|
-
if (o[E + 15] ===
|
|
934
|
+
if (o[E + 15] === Gs) {
|
|
935
935
|
const p = r[I + 6], R = o[E + 14];
|
|
936
936
|
let S = 1 / 0, m = 1 / 0, F = 1 / 0, O = -1 / 0, y = -1 / 0, w = -1 / 0;
|
|
937
937
|
for (let L = 3 * p, b = 3 * (p + R); L < b; L++) {
|
|
@@ -959,27 +959,27 @@ function ha(c, i = null) {
|
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
|
-
const
|
|
962
|
+
const or = /* @__PURE__ */ new ae();
|
|
963
963
|
function Me(c, i, t, e) {
|
|
964
|
-
return Nt(c, i,
|
|
964
|
+
return Nt(c, i, or), t.intersectBox(or, e);
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function Ia(c, i, t, e, s, n) {
|
|
967
967
|
const { geometry: r, _indirectBuffer: o } = c;
|
|
968
968
|
for (let a = e, l = e + s; a < l; a++) {
|
|
969
969
|
let h = o ? o[a] : a;
|
|
970
|
-
|
|
970
|
+
zs(r, i, t, h, n);
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function da(c, i, t, e, s) {
|
|
974
974
|
const { geometry: n, _indirectBuffer: r } = c;
|
|
975
975
|
let o = 1 / 0, a = null;
|
|
976
976
|
for (let l = e, h = e + s; l < h; l++) {
|
|
977
977
|
let f;
|
|
978
|
-
f =
|
|
978
|
+
f = zs(n, i, t, r ? r[l] : l), f && f.distance < o && (a = f, o = f.distance);
|
|
979
979
|
}
|
|
980
980
|
return a;
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function Ea(c, i, t, e, s, n, r) {
|
|
983
983
|
const { geometry: o } = t, { index: a } = o, l = o.attributes.position;
|
|
984
984
|
for (let h = c, f = i + c; h < f; h++) {
|
|
985
985
|
let I;
|
|
@@ -988,39 +988,39 @@ function Ia(c, i, t, e, s, n, r) {
|
|
|
988
988
|
}
|
|
989
989
|
return !1;
|
|
990
990
|
}
|
|
991
|
-
const
|
|
992
|
-
function
|
|
993
|
-
Ft.setBuffer(c._roots[i]),
|
|
991
|
+
const ar = /* @__PURE__ */ new Q();
|
|
992
|
+
function pa(c, i, t, e, s) {
|
|
993
|
+
Ft.setBuffer(c._roots[i]), Cn(0, c, t, e, s), Ft.clearBuffer();
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function Cn(c, i, t, e, s) {
|
|
996
996
|
const { float32Array: n, uint16Array: r, uint32Array: o } = Ft, a = c * 2;
|
|
997
997
|
if (zt(a, r)) {
|
|
998
998
|
const h = kt(c, o), f = Zt(a, r);
|
|
999
|
-
|
|
999
|
+
la(i, t, e, h, f, s);
|
|
1000
1000
|
} else {
|
|
1001
1001
|
const h = jt(c);
|
|
1002
|
-
Me(h, n, e,
|
|
1002
|
+
Me(h, n, e, ar) && Cn(h, i, t, e, s);
|
|
1003
1003
|
const f = qt(c, o);
|
|
1004
|
-
Me(f, n, e,
|
|
1004
|
+
Me(f, n, e, ar) && Cn(f, i, t, e, s);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
|
-
const
|
|
1008
|
-
function
|
|
1007
|
+
const cr = /* @__PURE__ */ new Q(), Ca = ["x", "y", "z"];
|
|
1008
|
+
function Ta(c, i, t, e) {
|
|
1009
1009
|
Ft.setBuffer(c._roots[i]);
|
|
1010
|
-
const s =
|
|
1010
|
+
const s = Tn(0, c, t, e);
|
|
1011
1011
|
return Ft.clearBuffer(), s;
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function Tn(c, i, t, e) {
|
|
1014
1014
|
const { float32Array: s, uint16Array: n, uint32Array: r } = Ft;
|
|
1015
1015
|
let o = c * 2;
|
|
1016
1016
|
if (zt(o, n)) {
|
|
1017
1017
|
const l = kt(c, r), h = Zt(o, n);
|
|
1018
|
-
return
|
|
1018
|
+
return ha(i, t, e, l, h);
|
|
1019
1019
|
} else {
|
|
1020
|
-
const l =
|
|
1020
|
+
const l = so(c, r), h = Ca[l], I = e.direction[h] >= 0;
|
|
1021
1021
|
let u, d;
|
|
1022
1022
|
I ? (u = jt(c), d = qt(c, r)) : (u = qt(c, r), d = jt(c));
|
|
1023
|
-
const T = Me(u, s, e,
|
|
1023
|
+
const T = Me(u, s, e, cr) ? Tn(u, i, t, e) : null;
|
|
1024
1024
|
if (T) {
|
|
1025
1025
|
const S = T.point[h];
|
|
1026
1026
|
if (I ? S <= s[d + l] : (
|
|
@@ -1029,20 +1029,20 @@ function Cn(c, i, t, e) {
|
|
|
1029
1029
|
))
|
|
1030
1030
|
return T;
|
|
1031
1031
|
}
|
|
1032
|
-
const R = Me(d, s, e,
|
|
1032
|
+
const R = Me(d, s, e, cr) ? Tn(d, i, t, e) : null;
|
|
1033
1033
|
return T && R ? T.distance <= R.distance ? T : R : T || R || null;
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
const qi = /* @__PURE__ */ new ae(), Xe = /* @__PURE__ */ new ne(), $e = /* @__PURE__ */ new ne(), pi = /* @__PURE__ */ new pe(),
|
|
1037
|
-
function
|
|
1036
|
+
const qi = /* @__PURE__ */ new ae(), Xe = /* @__PURE__ */ new ne(), $e = /* @__PURE__ */ new ne(), pi = /* @__PURE__ */ new pe(), lr = /* @__PURE__ */ new Bt(), Qi = /* @__PURE__ */ new Bt();
|
|
1037
|
+
function ma(c, i, t, e) {
|
|
1038
1038
|
Ft.setBuffer(c._roots[i]);
|
|
1039
|
-
const s =
|
|
1039
|
+
const s = mn(0, c, t, e);
|
|
1040
1040
|
return Ft.clearBuffer(), s;
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function mn(c, i, t, e, s = null) {
|
|
1043
1043
|
const { float32Array: n, uint16Array: r, uint32Array: o } = Ft;
|
|
1044
1044
|
let a = c * 2;
|
|
1045
|
-
if (s === null && (t.boundingBox || t.computeBoundingBox(),
|
|
1045
|
+
if (s === null && (t.boundingBox || t.computeBoundingBox(), lr.set(t.boundingBox.min, t.boundingBox.max, e), s = lr), zt(a, r)) {
|
|
1046
1046
|
const h = i.geometry, f = h.index, I = h.attributes.position, u = t.index, d = t.attributes.position, E = kt(c, o), T = Zt(a, r);
|
|
1047
1047
|
if (pi.copy(e).invert(), t.boundsTree)
|
|
1048
1048
|
return Nt(c, n, Qi), Qi.matrix.copy(pi), Qi.needsUpdate = !0, t.boundsTree.shapecast({
|
|
@@ -1063,19 +1063,19 @@ function Tn(c, i, t, e, s = null) {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
} else {
|
|
1065
1065
|
const h = c + 8, f = o[c + 6];
|
|
1066
|
-
return Nt(h, n, qi), !!(s.intersectsBox(qi) &&
|
|
1066
|
+
return Nt(h, n, qi), !!(s.intersectsBox(qi) && mn(h, i, t, e, s) || (Nt(f, n, qi), s.intersectsBox(qi) && mn(f, i, t, e, s)));
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
|
-
const Ki = /* @__PURE__ */ new pe(),
|
|
1070
|
-
function
|
|
1071
|
-
i.boundingBox || i.computeBoundingBox(),
|
|
1069
|
+
const Ki = /* @__PURE__ */ new pe(), Ks = /* @__PURE__ */ new Bt(), Ci = /* @__PURE__ */ new Bt(), Ra = /* @__PURE__ */ new Q(), ga = /* @__PURE__ */ new Q(), Aa = /* @__PURE__ */ new Q(), Fa = /* @__PURE__ */ new Q();
|
|
1070
|
+
function Sa(c, i, t, e = {}, s = {}, n = 0, r = 1 / 0) {
|
|
1071
|
+
i.boundingBox || i.computeBoundingBox(), Ks.set(i.boundingBox.min, i.boundingBox.max, t), Ks.needsUpdate = !0;
|
|
1072
1072
|
const o = c.geometry, a = o.attributes.position, l = o.index, h = i.attributes.position, f = i.index, I = $t.getPrimitive(), u = $t.getPrimitive();
|
|
1073
|
-
let d =
|
|
1074
|
-
s && (T =
|
|
1073
|
+
let d = Ra, E = ga, T = null, p = null;
|
|
1074
|
+
s && (T = Aa, p = Fa);
|
|
1075
1075
|
let R = 1 / 0, S = null, m = null;
|
|
1076
1076
|
return Ki.copy(t).invert(), Ci.matrix.copy(Ki), c.shapecast(
|
|
1077
1077
|
{
|
|
1078
|
-
boundsTraverseOrder: (F) =>
|
|
1078
|
+
boundsTraverseOrder: (F) => Ks.distanceToBox(F),
|
|
1079
1079
|
intersectsBounds: (F, O, y) => y < R && y < r ? (O && (Ci.min.copy(F.min), Ci.max.copy(F.max), Ci.needsUpdate = !0), !0) : !1,
|
|
1080
1080
|
intersectsRange: (F, O) => {
|
|
1081
1081
|
if (i.boundsTree)
|
|
@@ -1110,7 +1110,7 @@ function Aa(c, i, t, e = {}, s = {}, n = 0, r = 1 / 0) {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
), $t.releasePrimitive(I), $t.releasePrimitive(u), R === 1 / 0 ? null : (e.point ? e.point.copy(E) : e.point = E.clone(), e.distance = R, e.faceIndex = S, s && (s.point ? s.point.copy(p) : s.point = p.clone(), s.point.applyMatrix4(Ki), E.applyMatrix4(Ki), s.distance = E.sub(s.point).length(), s.faceIndex = m), e);
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function Oa(c, i = null) {
|
|
1114
1114
|
i && Array.isArray(i) && (i = new Set(i));
|
|
1115
1115
|
const t = c.geometry, e = t.index ? t.index.array : null, s = t.attributes.position;
|
|
1116
1116
|
let n, r, o, a, l = 0;
|
|
@@ -1119,7 +1119,7 @@ function Fa(c, i = null) {
|
|
|
1119
1119
|
n = h[I], r = new Uint32Array(n), o = new Uint16Array(n), a = new Float32Array(n), f(0, l), l += n.byteLength;
|
|
1120
1120
|
function f(I, u, d = !1) {
|
|
1121
1121
|
const E = I * 2;
|
|
1122
|
-
if (o[E + 15] ===
|
|
1122
|
+
if (o[E + 15] === Gs) {
|
|
1123
1123
|
const p = r[I + 6], R = o[E + 14];
|
|
1124
1124
|
let S = 1 / 0, m = 1 / 0, F = 1 / 0, O = -1 / 0, y = -1 / 0, w = -1 / 0;
|
|
1125
1125
|
for (let L = p, b = p + R; L < b; L++) {
|
|
@@ -1151,39 +1151,39 @@ function Fa(c, i = null) {
|
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
|
-
const
|
|
1155
|
-
function
|
|
1156
|
-
Ft.setBuffer(c._roots[i]),
|
|
1154
|
+
const hr = /* @__PURE__ */ new Q();
|
|
1155
|
+
function Na(c, i, t, e, s) {
|
|
1156
|
+
Ft.setBuffer(c._roots[i]), Rn(0, c, t, e, s), Ft.clearBuffer();
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function Rn(c, i, t, e, s) {
|
|
1159
1159
|
const { float32Array: n, uint16Array: r, uint32Array: o } = Ft, a = c * 2;
|
|
1160
1160
|
if (zt(a, r)) {
|
|
1161
1161
|
const h = kt(c, o), f = Zt(a, r);
|
|
1162
|
-
|
|
1162
|
+
Ia(i, t, e, h, f, s);
|
|
1163
1163
|
} else {
|
|
1164
1164
|
const h = jt(c);
|
|
1165
|
-
Me(h, n, e,
|
|
1165
|
+
Me(h, n, e, hr) && Rn(h, i, t, e, s);
|
|
1166
1166
|
const f = qt(c, o);
|
|
1167
|
-
Me(f, n, e,
|
|
1167
|
+
Me(f, n, e, hr) && Rn(f, i, t, e, s);
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
|
-
const
|
|
1171
|
-
function
|
|
1170
|
+
const ur = /* @__PURE__ */ new Q(), ya = ["x", "y", "z"];
|
|
1171
|
+
function La(c, i, t, e) {
|
|
1172
1172
|
Ft.setBuffer(c._roots[i]);
|
|
1173
|
-
const s =
|
|
1173
|
+
const s = gn(0, c, t, e);
|
|
1174
1174
|
return Ft.clearBuffer(), s;
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function gn(c, i, t, e) {
|
|
1177
1177
|
const { float32Array: s, uint16Array: n, uint32Array: r } = Ft;
|
|
1178
1178
|
let o = c * 2;
|
|
1179
1179
|
if (zt(o, n)) {
|
|
1180
1180
|
const l = kt(c, r), h = Zt(o, n);
|
|
1181
|
-
return
|
|
1181
|
+
return da(i, t, e, l, h);
|
|
1182
1182
|
} else {
|
|
1183
|
-
const l =
|
|
1183
|
+
const l = so(c, r), h = ya[l], I = e.direction[h] >= 0;
|
|
1184
1184
|
let u, d;
|
|
1185
1185
|
I ? (u = jt(c), d = qt(c, r)) : (u = qt(c, r), d = jt(c));
|
|
1186
|
-
const T = Me(u, s, e,
|
|
1186
|
+
const T = Me(u, s, e, ur) ? gn(u, i, t, e) : null;
|
|
1187
1187
|
if (T) {
|
|
1188
1188
|
const S = T.point[h];
|
|
1189
1189
|
if (I ? S <= s[d + l] : (
|
|
@@ -1192,20 +1192,20 @@ function Rn(c, i, t, e) {
|
|
|
1192
1192
|
))
|
|
1193
1193
|
return T;
|
|
1194
1194
|
}
|
|
1195
|
-
const R = Me(d, s, e,
|
|
1195
|
+
const R = Me(d, s, e, ur) ? gn(d, i, t, e) : null;
|
|
1196
1196
|
return T && R ? T.distance <= R.distance ? T : R : T || R || null;
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
|
-
const Ji = /* @__PURE__ */ new ae(), Ze = /* @__PURE__ */ new ne(), je = /* @__PURE__ */ new ne(), Ti = /* @__PURE__ */ new pe(),
|
|
1200
|
-
function
|
|
1199
|
+
const Ji = /* @__PURE__ */ new ae(), Ze = /* @__PURE__ */ new ne(), je = /* @__PURE__ */ new ne(), Ti = /* @__PURE__ */ new pe(), fr = /* @__PURE__ */ new Bt(), ts = /* @__PURE__ */ new Bt();
|
|
1200
|
+
function Pa(c, i, t, e) {
|
|
1201
1201
|
Ft.setBuffer(c._roots[i]);
|
|
1202
|
-
const s =
|
|
1202
|
+
const s = An(0, c, t, e);
|
|
1203
1203
|
return Ft.clearBuffer(), s;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function An(c, i, t, e, s = null) {
|
|
1206
1206
|
const { float32Array: n, uint16Array: r, uint32Array: o } = Ft;
|
|
1207
1207
|
let a = c * 2;
|
|
1208
|
-
if (s === null && (t.boundingBox || t.computeBoundingBox(),
|
|
1208
|
+
if (s === null && (t.boundingBox || t.computeBoundingBox(), fr.set(t.boundingBox.min, t.boundingBox.max, e), s = fr), zt(a, r)) {
|
|
1209
1209
|
const h = i.geometry, f = h.index, I = h.attributes.position, u = t.index, d = t.attributes.position, E = kt(c, o), T = Zt(a, r);
|
|
1210
1210
|
if (Ti.copy(e).invert(), t.boundsTree)
|
|
1211
1211
|
return Nt(c, n, ts), ts.matrix.copy(Ti), ts.needsUpdate = !0, t.boundsTree.shapecast({
|
|
@@ -1227,19 +1227,19 @@ function gn(c, i, t, e, s = null) {
|
|
|
1227
1227
|
}
|
|
1228
1228
|
} else {
|
|
1229
1229
|
const h = c + 8, f = o[c + 6];
|
|
1230
|
-
return Nt(h, n, Ji), !!(s.intersectsBox(Ji) &&
|
|
1230
|
+
return Nt(h, n, Ji), !!(s.intersectsBox(Ji) && An(h, i, t, e, s) || (Nt(f, n, Ji), s.intersectsBox(Ji) && An(f, i, t, e, s)));
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
|
-
const es = /* @__PURE__ */ new pe(),
|
|
1234
|
-
function
|
|
1235
|
-
i.boundingBox || i.computeBoundingBox(),
|
|
1233
|
+
const es = /* @__PURE__ */ new pe(), Js = /* @__PURE__ */ new Bt(), mi = /* @__PURE__ */ new Bt(), _a = /* @__PURE__ */ new Q(), wa = /* @__PURE__ */ new Q(), Ma = /* @__PURE__ */ new Q(), Da = /* @__PURE__ */ new Q();
|
|
1234
|
+
function ba(c, i, t, e = {}, s = {}, n = 0, r = 1 / 0) {
|
|
1235
|
+
i.boundingBox || i.computeBoundingBox(), Js.set(i.boundingBox.min, i.boundingBox.max, t), Js.needsUpdate = !0;
|
|
1236
1236
|
const o = c.geometry, a = o.attributes.position, l = o.index, h = i.attributes.position, f = i.index, I = $t.getPrimitive(), u = $t.getPrimitive();
|
|
1237
|
-
let d =
|
|
1238
|
-
s && (T =
|
|
1237
|
+
let d = _a, E = wa, T = null, p = null;
|
|
1238
|
+
s && (T = Ma, p = Da);
|
|
1239
1239
|
let R = 1 / 0, S = null, m = null;
|
|
1240
1240
|
return es.copy(t).invert(), mi.matrix.copy(es), c.shapecast(
|
|
1241
1241
|
{
|
|
1242
|
-
boundsTraverseOrder: (F) =>
|
|
1242
|
+
boundsTraverseOrder: (F) => Js.distanceToBox(F),
|
|
1243
1243
|
intersectsBounds: (F, O, y) => y < R && y < r ? (O && (mi.min.copy(F.min), mi.max.copy(F.max), mi.needsUpdate = !0), !0) : !1,
|
|
1244
1244
|
intersectsRange: (F, O) => {
|
|
1245
1245
|
if (i.boundsTree) {
|
|
@@ -1278,15 +1278,15 @@ function Ma(c, i, t, e = {}, s = {}, n = 0, r = 1 / 0) {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
), $t.releasePrimitive(I), $t.releasePrimitive(u), R === 1 / 0 ? null : (e.point ? e.point.copy(E) : e.point = E.clone(), e.distance = R, e.faceIndex = S, s && (s.point ? s.point.copy(p) : s.point = p.clone(), s.point.applyMatrix4(es), E.applyMatrix4(es), s.distance = E.sub(s.point).length(), s.faceIndex = m), e);
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function va() {
|
|
1282
1282
|
return typeof SharedArrayBuffer < "u";
|
|
1283
1283
|
}
|
|
1284
|
-
const wi = new Ft.constructor(), ps = new Ft.constructor(), ye = new
|
|
1285
|
-
let
|
|
1286
|
-
function
|
|
1287
|
-
if (
|
|
1284
|
+
const wi = new Ft.constructor(), ps = new Ft.constructor(), ye = new Bn(() => new ae()), qe = new ae(), Qe = new ae(), tn = new ae(), en = new ae();
|
|
1285
|
+
let sn = !1;
|
|
1286
|
+
function Ua(c, i, t, e) {
|
|
1287
|
+
if (sn)
|
|
1288
1288
|
throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");
|
|
1289
|
-
|
|
1289
|
+
sn = !0;
|
|
1290
1290
|
const s = c._roots, n = i._roots;
|
|
1291
1291
|
let r, o = 0, a = 0;
|
|
1292
1292
|
const l = new pe().copy(t).invert();
|
|
@@ -1310,7 +1310,7 @@ function ba(c, i, t, e) {
|
|
|
1310
1310
|
if (ye.releasePrimitive(I), wi.clearBuffer(), o += s[h].length, r)
|
|
1311
1311
|
break;
|
|
1312
1312
|
}
|
|
1313
|
-
return
|
|
1313
|
+
return sn = !1, r;
|
|
1314
1314
|
}
|
|
1315
1315
|
function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
1316
1316
|
let f, I;
|
|
@@ -1370,8 +1370,8 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1370
1370
|
), ye.releasePrimitive(w);
|
|
1371
1371
|
} else {
|
|
1372
1372
|
const w = jt(i), L = qt(i, p);
|
|
1373
|
-
Nt(w, T,
|
|
1374
|
-
const b = l.intersectsBox(
|
|
1373
|
+
Nt(w, T, tn), Nt(L, T, en);
|
|
1374
|
+
const b = l.intersectsBox(tn), Y = l.intersectsBox(en);
|
|
1375
1375
|
if (b && Y)
|
|
1376
1376
|
y = Kt(
|
|
1377
1377
|
c,
|
|
@@ -1415,7 +1415,7 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1415
1415
|
);
|
|
1416
1416
|
else {
|
|
1417
1417
|
const N = ye.getPrimitive();
|
|
1418
|
-
N.copy(
|
|
1418
|
+
N.copy(tn).applyMatrix4(t);
|
|
1419
1419
|
const M = jt(c), g = qt(c, d);
|
|
1420
1420
|
Nt(M, u, qe), Nt(g, u, Qe);
|
|
1421
1421
|
const v = N.intersectsBox(qe), q = N.intersectsBox(Qe);
|
|
@@ -1462,7 +1462,7 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1462
1462
|
);
|
|
1463
1463
|
else {
|
|
1464
1464
|
const N = ye.getPrimitive();
|
|
1465
|
-
N.copy(
|
|
1465
|
+
N.copy(en).applyMatrix4(t);
|
|
1466
1466
|
const M = jt(c), g = qt(c, d);
|
|
1467
1467
|
Nt(M, u, qe), Nt(g, u, Qe);
|
|
1468
1468
|
const v = N.intersectsBox(qe), q = N.intersectsBox(Qe);
|
|
@@ -1495,8 +1495,8 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1495
1495
|
}
|
|
1496
1496
|
return y;
|
|
1497
1497
|
}
|
|
1498
|
-
const is = /* @__PURE__ */ new Bt(),
|
|
1499
|
-
class
|
|
1498
|
+
const is = /* @__PURE__ */ new Bt(), Ir = /* @__PURE__ */ new ae();
|
|
1499
|
+
class Vn {
|
|
1500
1500
|
static serialize(i, t = {}) {
|
|
1501
1501
|
t = {
|
|
1502
1502
|
cloneBuffers: !0,
|
|
@@ -1520,11 +1520,11 @@ class Bn {
|
|
|
1520
1520
|
indirect: !!i.indirectBuffer,
|
|
1521
1521
|
...e
|
|
1522
1522
|
};
|
|
1523
|
-
const { index: s, roots: n, indirectBuffer: r } = i, o = new
|
|
1523
|
+
const { index: s, roots: n, indirectBuffer: r } = i, o = new Vn(t, { ...e, [Zs]: !0 });
|
|
1524
1524
|
if (o._roots = n, o._indirectBuffer = r || null, e.setIndex) {
|
|
1525
1525
|
const a = t.getIndex();
|
|
1526
1526
|
if (a === null) {
|
|
1527
|
-
const l = new
|
|
1527
|
+
const l = new Qr(i.index, 1, !1);
|
|
1528
1528
|
t.setIndex(l);
|
|
1529
1529
|
} else
|
|
1530
1530
|
a.array !== s && (a.array.set(s), a.needsUpdate = !0);
|
|
@@ -1541,7 +1541,7 @@ class Bn {
|
|
|
1541
1541
|
} else
|
|
1542
1542
|
throw new Error("MeshBVH: Only BufferGeometries are supported.");
|
|
1543
1543
|
if (t = Object.assign({
|
|
1544
|
-
strategy:
|
|
1544
|
+
strategy: to,
|
|
1545
1545
|
maxDepth: 40,
|
|
1546
1546
|
maxLeafTris: 10,
|
|
1547
1547
|
verbose: !0,
|
|
@@ -1551,21 +1551,21 @@ class Bn {
|
|
|
1551
1551
|
indirect: !1,
|
|
1552
1552
|
// undocumented options
|
|
1553
1553
|
// Whether to skip generating the tree. Used for deserialization.
|
|
1554
|
-
[
|
|
1555
|
-
}, t), t.useSharedArrayBuffer && !
|
|
1554
|
+
[Zs]: !1
|
|
1555
|
+
}, t), t.useSharedArrayBuffer && !va())
|
|
1556
1556
|
throw new Error("MeshBVH: SharedArrayBuffer is not available.");
|
|
1557
|
-
this.geometry = i, this._roots = null, this._indirectBuffer = null, t[
|
|
1557
|
+
this.geometry = i, this._roots = null, this._indirectBuffer = null, t[Zs] || (Jo(this, t), !i.boundingBox && t.setBoundingBox && (i.boundingBox = this.getBoundingBox(new ae())));
|
|
1558
1558
|
const { _indirectBuffer: e } = this;
|
|
1559
1559
|
this.resolveTriangleIndex = t.indirect ? (s) => e[s] : (s) => s;
|
|
1560
1560
|
}
|
|
1561
1561
|
refit(i = null) {
|
|
1562
|
-
return (this.indirect ?
|
|
1562
|
+
return (this.indirect ? Oa : fa)(this, i);
|
|
1563
1563
|
}
|
|
1564
1564
|
traverse(i, t = 0) {
|
|
1565
1565
|
const e = this._roots[t], s = new Uint32Array(e), n = new Uint16Array(e);
|
|
1566
1566
|
r(0);
|
|
1567
1567
|
function r(o, a = 0) {
|
|
1568
|
-
const l = o * 2, h = n[l + 15] ===
|
|
1568
|
+
const l = o * 2, h = n[l + 15] === Gs;
|
|
1569
1569
|
if (h) {
|
|
1570
1570
|
const f = s[o + 6], I = n[l + 14];
|
|
1571
1571
|
i(a, h, new Float32Array(e, o * 4, 6), f, I);
|
|
@@ -1576,8 +1576,8 @@ class Bn {
|
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
1578
|
/* Core Cast Functions */
|
|
1579
|
-
raycast(i, t =
|
|
1580
|
-
const e = this._roots, s = this.geometry, n = [], r = t.isMaterial, o = Array.isArray(t), a = s.groups, l = r ? t.side : t, h = this.indirect ?
|
|
1579
|
+
raycast(i, t = jn) {
|
|
1580
|
+
const e = this._roots, s = this.geometry, n = [], r = t.isMaterial, o = Array.isArray(t), a = s.groups, l = r ? t.side : t, h = this.indirect ? Na : pa;
|
|
1581
1581
|
for (let f = 0, I = e.length; f < I; f++) {
|
|
1582
1582
|
const u = o ? t[a[f].materialIndex].side : l, d = n.length;
|
|
1583
1583
|
if (h(this, f, u, i, n), o) {
|
|
@@ -1588,10 +1588,10 @@ class Bn {
|
|
|
1588
1588
|
}
|
|
1589
1589
|
return n;
|
|
1590
1590
|
}
|
|
1591
|
-
raycastFirst(i, t =
|
|
1591
|
+
raycastFirst(i, t = jn) {
|
|
1592
1592
|
const e = this._roots, s = this.geometry, n = t.isMaterial, r = Array.isArray(t);
|
|
1593
1593
|
let o = null;
|
|
1594
|
-
const a = s.groups, l = n ? t.side : t, h = this.indirect ?
|
|
1594
|
+
const a = s.groups, l = n ? t.side : t, h = this.indirect ? La : Ta;
|
|
1595
1595
|
for (let f = 0, I = e.length; f < I; f++) {
|
|
1596
1596
|
const u = r ? t[a[f].materialIndex].side : l, d = h(this, f, u, i);
|
|
1597
1597
|
d != null && (o == null || d.distance < o.distance) && (o = d, r && (d.face.materialIndex = a[f].materialIndex));
|
|
@@ -1600,13 +1600,13 @@ class Bn {
|
|
|
1600
1600
|
}
|
|
1601
1601
|
intersectsGeometry(i, t) {
|
|
1602
1602
|
let e = !1;
|
|
1603
|
-
const s = this._roots, n = this.indirect ?
|
|
1603
|
+
const s = this._roots, n = this.indirect ? Pa : ma;
|
|
1604
1604
|
for (let r = 0, o = s.length; r < o && (e = n(this, r, i, t), !e); r++)
|
|
1605
1605
|
;
|
|
1606
1606
|
return e;
|
|
1607
1607
|
}
|
|
1608
1608
|
shapecast(i) {
|
|
1609
|
-
const t = $t.getPrimitive(), e = this.indirect ?
|
|
1609
|
+
const t = $t.getPrimitive(), e = this.indirect ? Ea : ua;
|
|
1610
1610
|
let {
|
|
1611
1611
|
boundsTraverseOrder: s,
|
|
1612
1612
|
intersectsBounds: n,
|
|
@@ -1622,7 +1622,7 @@ class Bn {
|
|
|
1622
1622
|
const h = this._roots;
|
|
1623
1623
|
for (let f = 0, I = h.length; f < I; f++) {
|
|
1624
1624
|
const u = h[f];
|
|
1625
|
-
if (a =
|
|
1625
|
+
if (a = ra(this, f, n, r, s, l), a)
|
|
1626
1626
|
break;
|
|
1627
1627
|
l += u.byteLength;
|
|
1628
1628
|
}
|
|
@@ -1662,7 +1662,7 @@ class Bn {
|
|
|
1662
1662
|
} else
|
|
1663
1663
|
s = d;
|
|
1664
1664
|
}
|
|
1665
|
-
return
|
|
1665
|
+
return Ua(this, i, t, s);
|
|
1666
1666
|
}
|
|
1667
1667
|
/* Derived Cast Functions */
|
|
1668
1668
|
intersectsBox(i, t) {
|
|
@@ -1682,7 +1682,7 @@ class Bn {
|
|
|
1682
1682
|
);
|
|
1683
1683
|
}
|
|
1684
1684
|
closestPointToGeometry(i, t, e = {}, s = {}, n = 0, r = 1 / 0) {
|
|
1685
|
-
return (this.indirect ?
|
|
1685
|
+
return (this.indirect ? ba : Sa)(
|
|
1686
1686
|
this,
|
|
1687
1687
|
i,
|
|
1688
1688
|
t,
|
|
@@ -1693,7 +1693,7 @@ class Bn {
|
|
|
1693
1693
|
);
|
|
1694
1694
|
}
|
|
1695
1695
|
closestPointToPoint(i, t = {}, e = 0, s = 1 / 0) {
|
|
1696
|
-
return
|
|
1696
|
+
return oa(
|
|
1697
1697
|
this,
|
|
1698
1698
|
i,
|
|
1699
1699
|
t,
|
|
@@ -1703,37 +1703,37 @@ class Bn {
|
|
|
1703
1703
|
}
|
|
1704
1704
|
getBoundingBox(i) {
|
|
1705
1705
|
return i.makeEmpty(), this._roots.forEach((e) => {
|
|
1706
|
-
Nt(0, new Float32Array(e),
|
|
1706
|
+
Nt(0, new Float32Array(e), Ir), i.union(Ir);
|
|
1707
1707
|
}), i;
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function dr(c, i, t) {
|
|
1711
1711
|
return c === null || (c.point.applyMatrix4(i.matrixWorld), c.distance = c.point.distanceTo(t.ray.origin), c.object = i, c.distance < t.near || c.distance > t.far) ? null : c;
|
|
1712
1712
|
}
|
|
1713
|
-
const
|
|
1714
|
-
function
|
|
1713
|
+
const nn = /* @__PURE__ */ new Po(), Er = /* @__PURE__ */ new pe(), xa = rt.prototype.raycast;
|
|
1714
|
+
function Ba(c, i) {
|
|
1715
1715
|
if (this.geometry.boundsTree) {
|
|
1716
1716
|
if (this.material === void 0)
|
|
1717
1717
|
return;
|
|
1718
|
-
|
|
1718
|
+
Er.copy(this.matrixWorld).invert(), nn.copy(c.ray).applyMatrix4(Er);
|
|
1719
1719
|
const t = this.geometry.boundsTree;
|
|
1720
1720
|
if (c.firstHitOnly === !0) {
|
|
1721
|
-
const e =
|
|
1721
|
+
const e = dr(t.raycastFirst(nn, this.material), this, c);
|
|
1722
1722
|
e && i.push(e);
|
|
1723
1723
|
} else {
|
|
1724
|
-
const e = t.raycast(
|
|
1724
|
+
const e = t.raycast(nn, this.material);
|
|
1725
1725
|
for (let s = 0, n = e.length; s < n; s++) {
|
|
1726
|
-
const r =
|
|
1726
|
+
const r = dr(e[s], this, c);
|
|
1727
1727
|
r && i.push(r);
|
|
1728
1728
|
}
|
|
1729
1729
|
}
|
|
1730
1730
|
} else
|
|
1731
|
-
|
|
1731
|
+
xa.call(this, c, i);
|
|
1732
1732
|
}
|
|
1733
|
-
function
|
|
1734
|
-
return this.boundsTree = new
|
|
1733
|
+
function Va(c) {
|
|
1734
|
+
return this.boundsTree = new Vn(this, c), this.boundsTree;
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1736
|
+
function Ya() {
|
|
1737
1737
|
this.boundsTree = null;
|
|
1738
1738
|
}
|
|
1739
1739
|
class j {
|
|
@@ -1794,7 +1794,7 @@ class _e {
|
|
|
1794
1794
|
this.handlers.length = 0;
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
1797
|
-
class
|
|
1797
|
+
class Yn {
|
|
1798
1798
|
constructor(i) {
|
|
1799
1799
|
/** Whether is component is {@link Disposable}. */
|
|
1800
1800
|
C(this, "isDisposeable", () => "dispose" in this && "onDisposed" in this);
|
|
@@ -1809,9 +1809,9 @@ class Vn {
|
|
|
1809
1809
|
this.components = i;
|
|
1810
1810
|
}
|
|
1811
1811
|
}
|
|
1812
|
-
class
|
|
1812
|
+
class Rt extends Yn {
|
|
1813
1813
|
}
|
|
1814
|
-
class
|
|
1814
|
+
class Gn extends Yn {
|
|
1815
1815
|
constructor(t) {
|
|
1816
1816
|
super(t);
|
|
1817
1817
|
C(this, "worlds", /* @__PURE__ */ new Map());
|
|
@@ -1829,7 +1829,7 @@ class Yn extends Vn {
|
|
|
1829
1829
|
});
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
|
-
class
|
|
1832
|
+
class Ga extends Gn {
|
|
1833
1833
|
constructor() {
|
|
1834
1834
|
super(...arguments);
|
|
1835
1835
|
/**
|
|
@@ -1840,7 +1840,7 @@ class Va extends Yn {
|
|
|
1840
1840
|
C(this, "hasCameraControls", () => "controls" in this);
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
|
-
class
|
|
1843
|
+
class za extends Gn {
|
|
1844
1844
|
constructor() {
|
|
1845
1845
|
super(...arguments);
|
|
1846
1846
|
/** {@link Updateable.onBeforeUpdate} */
|
|
@@ -1893,7 +1893,7 @@ class Ya extends Yn {
|
|
|
1893
1893
|
);
|
|
1894
1894
|
}
|
|
1895
1895
|
}
|
|
1896
|
-
const Mi = class Mi extends
|
|
1896
|
+
const Mi = class Mi extends Rt {
|
|
1897
1897
|
constructor(t) {
|
|
1898
1898
|
super(t);
|
|
1899
1899
|
C(this, "_disposedComponents", /* @__PURE__ */ new Set());
|
|
@@ -1958,7 +1958,7 @@ const Mi = class Mi extends At {
|
|
|
1958
1958
|
*/
|
|
1959
1959
|
C(Mi, "uuid", "76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");
|
|
1960
1960
|
let De = Mi;
|
|
1961
|
-
class
|
|
1961
|
+
class ka extends Gn {
|
|
1962
1962
|
constructor(t) {
|
|
1963
1963
|
super(t);
|
|
1964
1964
|
/** {@link Disposable.onDisposed} */
|
|
@@ -2126,18 +2126,18 @@ class re extends Map {
|
|
|
2126
2126
|
this.clear(), this.onItemSet.reset(), this.onItemDeleted.reset(), this.onCleared.reset();
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
|
-
class
|
|
2129
|
+
class Th extends Rt {
|
|
2130
2130
|
}
|
|
2131
|
-
const ds = 0,
|
|
2132
|
-
class
|
|
2131
|
+
const ds = 0, Ha = 1, Wa = new Q(), pr = new Ee(), rn = new Un(), Cr = new Q(), ss = new ii();
|
|
2132
|
+
class Xa {
|
|
2133
2133
|
constructor() {
|
|
2134
|
-
this.tolerance = -1, this.faces = [], this.newFaces = [], this.assigned = new
|
|
2134
|
+
this.tolerance = -1, this.faces = [], this.newFaces = [], this.assigned = new Tr(), this.unassigned = new Tr(), this.vertices = [];
|
|
2135
2135
|
}
|
|
2136
2136
|
setFromPoints(i) {
|
|
2137
2137
|
if (i.length >= 4) {
|
|
2138
2138
|
this.makeEmpty();
|
|
2139
2139
|
for (let t = 0, e = i.length; t < e; t++)
|
|
2140
|
-
this.vertices.push(new
|
|
2140
|
+
this.vertices.push(new $a(i[t]));
|
|
2141
2141
|
this.compute();
|
|
2142
2142
|
}
|
|
2143
2143
|
return this;
|
|
@@ -2177,7 +2177,7 @@ class Ha {
|
|
|
2177
2177
|
return s !== -1 / 0 ? i.at(s, t) : i.at(n, t), t;
|
|
2178
2178
|
}
|
|
2179
2179
|
intersectsRay(i) {
|
|
2180
|
-
return this.intersectRay(i,
|
|
2180
|
+
return this.intersectRay(i, Wa) !== null;
|
|
2181
2181
|
}
|
|
2182
2182
|
makeEmpty() {
|
|
2183
2183
|
return this.faces = [], this.vertices = [], this;
|
|
@@ -2261,25 +2261,25 @@ class Ha {
|
|
|
2261
2261
|
}
|
|
2262
2262
|
const o = e[r], a = s[r];
|
|
2263
2263
|
let l, h;
|
|
2264
|
-
n = 0,
|
|
2264
|
+
n = 0, pr.set(o.point, a.point);
|
|
2265
2265
|
for (let I = 0, u = this.vertices.length; I < u; I++) {
|
|
2266
2266
|
const d = i[I];
|
|
2267
2267
|
if (d !== o && d !== a) {
|
|
2268
|
-
|
|
2269
|
-
const E =
|
|
2268
|
+
pr.closestPointToPoint(d.point, !0, Cr);
|
|
2269
|
+
const E = Cr.distanceToSquared(d.point);
|
|
2270
2270
|
E > n && (n = E, l = d);
|
|
2271
2271
|
}
|
|
2272
2272
|
}
|
|
2273
|
-
n = -1,
|
|
2273
|
+
n = -1, rn.setFromCoplanarPoints(o.point, a.point, l.point);
|
|
2274
2274
|
for (let I = 0, u = this.vertices.length; I < u; I++) {
|
|
2275
2275
|
const d = i[I];
|
|
2276
2276
|
if (d !== o && d !== a && d !== l) {
|
|
2277
|
-
const E = Math.abs(
|
|
2277
|
+
const E = Math.abs(rn.distanceToPoint(d.point));
|
|
2278
2278
|
E > n && (n = E, h = d);
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
2281
|
const f = [];
|
|
2282
|
-
if (
|
|
2282
|
+
if (rn.distanceToPoint(h.point) < 0) {
|
|
2283
2283
|
f.push(
|
|
2284
2284
|
te.create(o, a, l),
|
|
2285
2285
|
te.create(h, a, o),
|
|
@@ -2344,7 +2344,7 @@ class Ha {
|
|
|
2344
2344
|
// For an edge to be part of the horizon it must join a face that can see
|
|
2345
2345
|
// 'eyePoint' and a face that cannot see 'eyePoint'.
|
|
2346
2346
|
computeHorizon(i, t, e, s) {
|
|
2347
|
-
this.deleteFaceVertices(e), e.mark =
|
|
2347
|
+
this.deleteFaceVertices(e), e.mark = Ha;
|
|
2348
2348
|
let n;
|
|
2349
2349
|
t === null ? n = t = e.getEdge(0) : n = t.next;
|
|
2350
2350
|
do {
|
|
@@ -2389,7 +2389,7 @@ class te {
|
|
|
2389
2389
|
this.normal = new Q(), this.midpoint = new Q(), this.area = 0, this.constant = 0, this.outside = null, this.mark = ds, this.edge = null;
|
|
2390
2390
|
}
|
|
2391
2391
|
static create(i, t, e) {
|
|
2392
|
-
const s = new te(), n = new
|
|
2392
|
+
const s = new te(), n = new on(i, s), r = new on(t, s), o = new on(e, s);
|
|
2393
2393
|
return n.next = o.prev = r, r.next = n.prev = o, o.next = r.prev = n, s.edge = n, s.compute();
|
|
2394
2394
|
}
|
|
2395
2395
|
getEdge(i) {
|
|
@@ -2408,7 +2408,7 @@ class te {
|
|
|
2408
2408
|
return this.normal.dot(i) - this.constant;
|
|
2409
2409
|
}
|
|
2410
2410
|
}
|
|
2411
|
-
class
|
|
2411
|
+
class on {
|
|
2412
2412
|
constructor(i, t) {
|
|
2413
2413
|
this.vertex = i, this.prev = null, this.next = null, this.twin = null, this.face = t;
|
|
2414
2414
|
}
|
|
@@ -2430,12 +2430,12 @@ class rn {
|
|
|
2430
2430
|
return this.twin = i, i.twin = this, this;
|
|
2431
2431
|
}
|
|
2432
2432
|
}
|
|
2433
|
-
class
|
|
2433
|
+
class $a {
|
|
2434
2434
|
constructor(i) {
|
|
2435
2435
|
this.point = i, this.prev = null, this.next = null, this.face = null;
|
|
2436
2436
|
}
|
|
2437
2437
|
}
|
|
2438
|
-
class
|
|
2438
|
+
class Tr {
|
|
2439
2439
|
constructor() {
|
|
2440
2440
|
this.head = null, this.tail = null;
|
|
2441
2441
|
}
|
|
@@ -2478,35 +2478,35 @@ class Cr {
|
|
|
2478
2478
|
return this.head === null;
|
|
2479
2479
|
}
|
|
2480
2480
|
}
|
|
2481
|
-
const
|
|
2481
|
+
const Fn = [2, 2, 1], Sn = [1, 0, 0];
|
|
2482
2482
|
function fe(c, i) {
|
|
2483
2483
|
return c * 3 + i;
|
|
2484
2484
|
}
|
|
2485
|
-
function
|
|
2485
|
+
function Za(c) {
|
|
2486
2486
|
const i = c.elements;
|
|
2487
2487
|
let t = 0;
|
|
2488
2488
|
for (let e = 0; e < 9; e++)
|
|
2489
2489
|
t += i[e] * i[e];
|
|
2490
2490
|
return Math.sqrt(t);
|
|
2491
2491
|
}
|
|
2492
|
-
function
|
|
2492
|
+
function ja(c) {
|
|
2493
2493
|
const i = c.elements;
|
|
2494
2494
|
let t = 0;
|
|
2495
2495
|
for (let e = 0; e < 3; e++) {
|
|
2496
|
-
const s = i[fe(
|
|
2496
|
+
const s = i[fe(Fn[e], Sn[e])];
|
|
2497
2497
|
t += 2 * s * s;
|
|
2498
2498
|
}
|
|
2499
2499
|
return Math.sqrt(t);
|
|
2500
2500
|
}
|
|
2501
|
-
function
|
|
2501
|
+
function qa(c, i) {
|
|
2502
2502
|
let t = 0, e = 1;
|
|
2503
2503
|
const s = c.elements;
|
|
2504
2504
|
for (let l = 0; l < 3; l++) {
|
|
2505
|
-
const h = Math.abs(s[fe(
|
|
2505
|
+
const h = Math.abs(s[fe(Fn[l], Sn[l])]);
|
|
2506
2506
|
h > t && (t = h, e = l);
|
|
2507
2507
|
}
|
|
2508
2508
|
let n = 1, r = 0;
|
|
2509
|
-
const o =
|
|
2509
|
+
const o = Sn[e], a = Fn[e];
|
|
2510
2510
|
if (Math.abs(s[fe(a, o)]) > Number.EPSILON) {
|
|
2511
2511
|
const l = s[fe(a, a)], h = s[fe(o, o)], f = s[fe(a, o)], I = (l - h) / 2 / f;
|
|
2512
2512
|
let u;
|
|
@@ -2514,22 +2514,22 @@ function Za(c, i) {
|
|
|
2514
2514
|
}
|
|
2515
2515
|
return i.identity(), i.elements[fe(o, o)] = n, i.elements[fe(a, a)] = n, i.elements[fe(a, o)] = r, i.elements[fe(o, a)] = -r, i;
|
|
2516
2516
|
}
|
|
2517
|
-
function
|
|
2517
|
+
function Qa(c, i) {
|
|
2518
2518
|
let t = 0, e = 0;
|
|
2519
2519
|
const s = 10;
|
|
2520
2520
|
i.unitary.identity(), i.diagonal.copy(c);
|
|
2521
|
-
const n = i.unitary, r = i.diagonal, o = new D.Matrix3(), a = new D.Matrix3(), l = Number.EPSILON *
|
|
2522
|
-
for (; e < s &&
|
|
2523
|
-
|
|
2521
|
+
const n = i.unitary, r = i.diagonal, o = new D.Matrix3(), a = new D.Matrix3(), l = Number.EPSILON * Za(r);
|
|
2522
|
+
for (; e < s && ja(r) > l; )
|
|
2523
|
+
qa(r, o), a.copy(o).transpose(), r.multiply(o), r.premultiply(a), n.multiply(o), ++t > 2 && (e++, t = 0);
|
|
2524
2524
|
return i;
|
|
2525
2525
|
}
|
|
2526
|
-
function
|
|
2526
|
+
function Ka(c) {
|
|
2527
2527
|
const i = [];
|
|
2528
2528
|
for (let at = 0; at < c.length - 2; at += 3) {
|
|
2529
2529
|
const It = c[at], ft = c[at + 1], Ct = c[at + 2];
|
|
2530
2530
|
i.push(new D.Vector3(It, ft, Ct));
|
|
2531
2531
|
}
|
|
2532
|
-
const t = new
|
|
2532
|
+
const t = new Xa();
|
|
2533
2533
|
t.setFromPoints(i);
|
|
2534
2534
|
const e = {
|
|
2535
2535
|
unitary: new D.Matrix3(),
|
|
@@ -2557,7 +2557,7 @@ function qa(c) {
|
|
|
2557
2557
|
}
|
|
2558
2558
|
d.divideScalar(E), T /= E, p /= E, R /= E, S /= E, m /= E, F /= E, T -= d.x * d.x, p -= d.x * d.y, R -= d.x * d.z, S -= d.y * d.y, m -= d.y * d.z, F -= d.z * d.z;
|
|
2559
2559
|
const O = new D.Matrix3();
|
|
2560
|
-
O.elements[0] = T, O.elements[1] = p, O.elements[2] = R, O.elements[3] = p, O.elements[4] = S, O.elements[5] = m, O.elements[6] = R, O.elements[7] = m, O.elements[8] = F,
|
|
2560
|
+
O.elements[0] = T, O.elements[1] = p, O.elements[2] = R, O.elements[3] = p, O.elements[4] = S, O.elements[5] = m, O.elements[6] = R, O.elements[7] = m, O.elements[8] = F, Qa(O, e);
|
|
2561
2561
|
const y = e.unitary, w = new D.Vector3(), L = new D.Vector3(), b = new D.Vector3();
|
|
2562
2562
|
y.extractBasis(w, L, b);
|
|
2563
2563
|
let Y = -1 / 0, N = -1 / 0, M = -1 / 0, g = 1 / 0, v = 1 / 0, q = 1 / 0;
|
|
@@ -2579,7 +2579,7 @@ function qa(c) {
|
|
|
2579
2579
|
const yt = new D.Matrix4();
|
|
2580
2580
|
return yt.multiply(tt), yt.multiply(St), yt.multiply(it), yt.multiply(ot), { center: G, halfSizes: et, rotation: W, transformation: yt };
|
|
2581
2581
|
}
|
|
2582
|
-
function
|
|
2582
|
+
function mh(c, i, t) {
|
|
2583
2583
|
const e = [
|
|
2584
2584
|
c[0] - i[0],
|
|
2585
2585
|
c[1] - i[1],
|
|
@@ -2587,7 +2587,7 @@ function Ch(c, i, t) {
|
|
|
2587
2587
|
];
|
|
2588
2588
|
return t[0] * e[0] + t[1] * e[1] + t[2] * e[2] > 0;
|
|
2589
2589
|
}
|
|
2590
|
-
class
|
|
2590
|
+
class mr {
|
|
2591
2591
|
static isTransparent(i) {
|
|
2592
2592
|
return i.transparent && i.opacity < 1;
|
|
2593
2593
|
}
|
|
@@ -2870,7 +2870,7 @@ C(Pt, "_lut", [
|
|
|
2870
2870
|
"ff"
|
|
2871
2871
|
]);
|
|
2872
2872
|
let oe = Pt;
|
|
2873
|
-
class
|
|
2873
|
+
class Rh extends Rt {
|
|
2874
2874
|
constructor(t, e) {
|
|
2875
2875
|
super(t);
|
|
2876
2876
|
/** {@link Disposable.onDisposed} */
|
|
@@ -3133,15 +3133,15 @@ const Fs = class Fs {
|
|
|
3133
3133
|
this._clock.stop(), this.onDisposed.trigger(), this.onDisposed.reset();
|
|
3134
3134
|
}
|
|
3135
3135
|
static setupBVH() {
|
|
3136
|
-
D.BufferGeometry.prototype.computeBoundsTree =
|
|
3136
|
+
D.BufferGeometry.prototype.computeBoundsTree = Va, D.BufferGeometry.prototype.disposeBoundsTree = Ya, D.Mesh.prototype.raycast = Ba;
|
|
3137
3137
|
}
|
|
3138
3138
|
};
|
|
3139
3139
|
/**
|
|
3140
3140
|
* The version of the @thatopen/components library.
|
|
3141
3141
|
*/
|
|
3142
|
-
C(Fs, "release", "2.3.
|
|
3142
|
+
C(Fs, "release", "2.3.19");
|
|
3143
3143
|
let Cs = Fs;
|
|
3144
|
-
class
|
|
3144
|
+
class Ja extends Yn {
|
|
3145
3145
|
constructor() {
|
|
3146
3146
|
super(...arguments);
|
|
3147
3147
|
/**
|
|
@@ -3321,7 +3321,7 @@ class Ge {
|
|
|
3321
3321
|
throw new Error("Invalid entry!");
|
|
3322
3322
|
}
|
|
3323
3323
|
}
|
|
3324
|
-
const Ss = class Ss extends
|
|
3324
|
+
const Ss = class Ss extends Rt {
|
|
3325
3325
|
constructor(t) {
|
|
3326
3326
|
super(t);
|
|
3327
3327
|
/**
|
|
@@ -3339,7 +3339,7 @@ const Ss = class Ss extends At {
|
|
|
3339
3339
|
*/
|
|
3340
3340
|
C(Ss, "uuid", "b8c764e0-6b24-4e77-9a32-35fa728ee5b4");
|
|
3341
3341
|
let Ye = Ss;
|
|
3342
|
-
class
|
|
3342
|
+
class tc {
|
|
3343
3343
|
constructor(i, t) {
|
|
3344
3344
|
C(this, "_list");
|
|
3345
3345
|
C(this, "_scene");
|
|
@@ -3370,7 +3370,7 @@ class Ka {
|
|
|
3370
3370
|
t.position.copy(i);
|
|
3371
3371
|
}
|
|
3372
3372
|
}
|
|
3373
|
-
class
|
|
3373
|
+
class ec {
|
|
3374
3374
|
constructor(i, t) {
|
|
3375
3375
|
C(this, "_list");
|
|
3376
3376
|
C(this, "_scene");
|
|
@@ -3393,7 +3393,7 @@ class Ja {
|
|
|
3393
3393
|
t.intensity = i;
|
|
3394
3394
|
}
|
|
3395
3395
|
}
|
|
3396
|
-
class
|
|
3396
|
+
class ic extends Ge {
|
|
3397
3397
|
constructor() {
|
|
3398
3398
|
super(...arguments);
|
|
3399
3399
|
C(this, "_config", {
|
|
@@ -3432,8 +3432,8 @@ class tc extends Ge {
|
|
|
3432
3432
|
}
|
|
3433
3433
|
}
|
|
3434
3434
|
});
|
|
3435
|
-
C(this, "ambientLight", new
|
|
3436
|
-
C(this, "directionalLight", new
|
|
3435
|
+
C(this, "ambientLight", new ec(this._config, this._component));
|
|
3436
|
+
C(this, "directionalLight", new tc(this._config, this._component));
|
|
3437
3437
|
}
|
|
3438
3438
|
get backgroundColor() {
|
|
3439
3439
|
return this._config.backgroundColor.value;
|
|
@@ -3442,7 +3442,7 @@ class tc extends Ge {
|
|
|
3442
3442
|
this._config.backgroundColor.value = t, this._component.three.background = t;
|
|
3443
3443
|
}
|
|
3444
3444
|
}
|
|
3445
|
-
class
|
|
3445
|
+
class sc extends ka {
|
|
3446
3446
|
constructor(t) {
|
|
3447
3447
|
super(t);
|
|
3448
3448
|
/** {@link Configurable.onSetup} */
|
|
@@ -3455,7 +3455,7 @@ class ec extends Ga {
|
|
|
3455
3455
|
*/
|
|
3456
3456
|
C(this, "three");
|
|
3457
3457
|
/** {@link Configurable.config} */
|
|
3458
|
-
C(this, "config", new
|
|
3458
|
+
C(this, "config", new ic(this, this.components, "Scene"));
|
|
3459
3459
|
C(this, "_defaultConfig", {
|
|
3460
3460
|
backgroundColor: new D.Color(2107698),
|
|
3461
3461
|
directionalLight: {
|
|
@@ -3487,7 +3487,7 @@ class ec extends Ga {
|
|
|
3487
3487
|
super.dispose(), this.components.get(Ye).list.delete(this.config.uuid);
|
|
3488
3488
|
}
|
|
3489
3489
|
}
|
|
3490
|
-
class
|
|
3490
|
+
class gh extends za {
|
|
3491
3491
|
/**
|
|
3492
3492
|
* Constructor for the SimpleRenderer class.
|
|
3493
3493
|
*
|
|
@@ -3620,17 +3620,17 @@ function ve(c) {
|
|
|
3620
3620
|
function Ne(c) {
|
|
3621
3621
|
return c.isOrthographicCamera;
|
|
3622
3622
|
}
|
|
3623
|
-
const Je = Math.PI * 2,
|
|
3623
|
+
const Je = Math.PI * 2, Rr = Math.PI / 2, no = 1e-5, Ri = Math.PI / 180;
|
|
3624
3624
|
function Jt(c, i, t) {
|
|
3625
3625
|
return Math.max(i, Math.min(t, c));
|
|
3626
3626
|
}
|
|
3627
|
-
function
|
|
3627
|
+
function At(c, i = no) {
|
|
3628
3628
|
return Math.abs(c) < i;
|
|
3629
3629
|
}
|
|
3630
|
-
function pt(c, i, t =
|
|
3631
|
-
return
|
|
3630
|
+
function pt(c, i, t = no) {
|
|
3631
|
+
return At(c - i, t);
|
|
3632
3632
|
}
|
|
3633
|
-
function
|
|
3633
|
+
function gr(c, i) {
|
|
3634
3634
|
return Math.round(c / i) * i;
|
|
3635
3635
|
}
|
|
3636
3636
|
function gi(c) {
|
|
@@ -3650,7 +3650,7 @@ function ns(c, i, t, e, s = 1 / 0, n) {
|
|
|
3650
3650
|
let u = i + (l + I) * a;
|
|
3651
3651
|
return h - c > 0 == u > h && (u = h, t.value = (u - h) / n), u;
|
|
3652
3652
|
}
|
|
3653
|
-
function
|
|
3653
|
+
function Ar(c, i, t, e, s = 1 / 0, n, r) {
|
|
3654
3654
|
e = Math.max(1e-4, e);
|
|
3655
3655
|
const o = 2 / e, a = o * n, l = 1 / (1 + a + 0.48 * a * a + 0.235 * a * a * a);
|
|
3656
3656
|
let h = i.x, f = i.y, I = i.z, u = c.x - h, d = c.y - f, E = c.z - I;
|
|
@@ -3665,15 +3665,15 @@ function gr(c, i, t, e, s = 1 / 0, n, r) {
|
|
|
3665
3665
|
const L = T - c.x, b = p - c.y, Y = R - c.z, N = r.x - T, M = r.y - p, g = r.z - R;
|
|
3666
3666
|
return L * N + b * M + Y * g > 0 && (r.x = T, r.y = p, r.z = R, t.x = (r.x - T) / n, t.y = (r.y - p) / n, t.z = (r.z - R) / n), r;
|
|
3667
3667
|
}
|
|
3668
|
-
function
|
|
3668
|
+
function an(c, i) {
|
|
3669
3669
|
i.set(0, 0), c.forEach((t) => {
|
|
3670
3670
|
i.x += t.clientX, i.y += t.clientY;
|
|
3671
3671
|
}), i.x /= c.length, i.y /= c.length;
|
|
3672
3672
|
}
|
|
3673
|
-
function
|
|
3673
|
+
function cn(c, i) {
|
|
3674
3674
|
return Ne(c) ? (console.warn(`${i} is not supported in OrthographicCamera`), !0) : !1;
|
|
3675
3675
|
}
|
|
3676
|
-
class
|
|
3676
|
+
class nc {
|
|
3677
3677
|
constructor() {
|
|
3678
3678
|
this._listeners = {};
|
|
3679
3679
|
}
|
|
@@ -3737,9 +3737,9 @@ class ic {
|
|
|
3737
3737
|
}
|
|
3738
3738
|
}
|
|
3739
3739
|
}
|
|
3740
|
-
const
|
|
3741
|
-
let lt,
|
|
3742
|
-
class vt extends
|
|
3740
|
+
const rc = "2.7.3", rs = 1 / 8, ro = typeof window < "u", oc = ro && /Mac/.test(navigator.platform), ac = !(ro && "PointerEvent" in window);
|
|
3741
|
+
let lt, Fr, os, ln, Yt, ut, Et, ti, Fi, le, he, Ue, Sr, Or, Xt, Si, ei, Nr, hn, yr, un, fn, as;
|
|
3742
|
+
class vt extends nc {
|
|
3743
3743
|
/**
|
|
3744
3744
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
3745
3745
|
*
|
|
@@ -3781,7 +3781,7 @@ class vt extends ic {
|
|
|
3781
3781
|
* @category Statics
|
|
3782
3782
|
*/
|
|
3783
3783
|
static install(i) {
|
|
3784
|
-
lt = i.THREE,
|
|
3784
|
+
lt = i.THREE, Fr = Object.freeze(new lt.Vector3(0, 0, 0)), os = Object.freeze(new lt.Vector3(0, 1, 0)), ln = Object.freeze(new lt.Vector3(0, 0, 1)), Yt = new lt.Vector2(), ut = new lt.Vector3(), Et = new lt.Vector3(), ti = new lt.Vector3(), Fi = new lt.Vector3(), le = new lt.Vector3(), he = new lt.Vector3(), Ue = new lt.Vector3(), Sr = new lt.Vector3(), Or = new lt.Vector3(), Xt = new lt.Spherical(), Si = new lt.Spherical(), ei = new lt.Box3(), Nr = new lt.Box3(), hn = new lt.Sphere(), yr = new lt.Quaternion(), un = new lt.Quaternion(), fn = new lt.Matrix4(), as = new lt.Raycaster();
|
|
3785
3785
|
}
|
|
3786
3786
|
/**
|
|
3787
3787
|
* list all ACTIONs
|
|
@@ -3952,7 +3952,7 @@ class vt extends ic {
|
|
|
3952
3952
|
const L = performance.now();
|
|
3953
3953
|
I - L < 1e3 && this._getClientRect(this._elementRect), I = L;
|
|
3954
3954
|
}
|
|
3955
|
-
const F =
|
|
3955
|
+
const F = oc ? -1 : -3, O = m.deltaMode === 1 ? m.deltaY / F : m.deltaY / (F * 10), y = this.dollyToCursor ? (m.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, w = this.dollyToCursor ? (m.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
3956
3956
|
switch (this.mouseButtons.wheel) {
|
|
3957
3957
|
case H.ROTATE: {
|
|
3958
3958
|
this._rotateInternal(m.deltaX, m.deltaY), this._isUserControllingRotate = !0;
|
|
@@ -3988,7 +3988,7 @@ class vt extends ic {
|
|
|
3988
3988
|
}, E = (m) => {
|
|
3989
3989
|
if (!this._enabled)
|
|
3990
3990
|
return;
|
|
3991
|
-
if (
|
|
3991
|
+
if (an(this._activePointers, Yt), this._getClientRect(this._elementRect), e.copy(Yt), s.copy(Yt), this._activePointers.length >= 2) {
|
|
3992
3992
|
const O = Yt.x - this._activePointers[1].clientX, y = Yt.y - this._activePointers[1].clientY, w = Math.sqrt(O * O + y * y);
|
|
3993
3993
|
n.set(0, w);
|
|
3994
3994
|
const L = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, b = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
|
|
@@ -4014,7 +4014,7 @@ class vt extends ic {
|
|
|
4014
4014
|
}, T = () => {
|
|
4015
4015
|
if (!this._enabled || !this._dragNeedsUpdate)
|
|
4016
4016
|
return;
|
|
4017
|
-
this._dragNeedsUpdate = !1,
|
|
4017
|
+
this._dragNeedsUpdate = !1, an(this._activePointers, Yt);
|
|
4018
4018
|
const F = this._domElement && document.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, O = F ? -F.deltaX : s.x - Yt.x, y = F ? -F.deltaY : s.y - Yt.y;
|
|
4019
4019
|
if (s.copy(Yt), ((this._state & H.ROTATE) === H.ROTATE || (this._state & H.TOUCH_ROTATE) === H.TOUCH_ROTATE || (this._state & H.TOUCH_DOLLY_ROTATE) === H.TOUCH_DOLLY_ROTATE || (this._state & H.TOUCH_ZOOM_ROTATE) === H.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(O, y), this._isUserControllingRotate = !0), (this._state & H.DOLLY) === H.DOLLY || (this._state & H.ZOOM) === H.ZOOM) {
|
|
4020
4020
|
const w = this.dollyToCursor ? (e.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, L = this.dollyToCursor ? (e.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, b = this.dollyDragInverted ? -1 : 1;
|
|
@@ -4028,7 +4028,7 @@ class vt extends ic {
|
|
|
4028
4028
|
}
|
|
4029
4029
|
((this._state & H.TRUCK) === H.TRUCK || (this._state & H.TOUCH_TRUCK) === H.TOUCH_TRUCK || (this._state & H.TOUCH_DOLLY_TRUCK) === H.TOUCH_DOLLY_TRUCK || (this._state & H.TOUCH_ZOOM_TRUCK) === H.TOUCH_ZOOM_TRUCK) && (this._truckInternal(O, y, !1), this._isUserControllingTruck = !0), ((this._state & H.OFFSET) === H.OFFSET || (this._state & H.TOUCH_OFFSET) === H.TOUCH_OFFSET || (this._state & H.TOUCH_DOLLY_OFFSET) === H.TOUCH_DOLLY_OFFSET || (this._state & H.TOUCH_ZOOM_OFFSET) === H.TOUCH_ZOOM_OFFSET) && (this._truckInternal(O, y, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
|
4030
4030
|
}, p = () => {
|
|
4031
|
-
|
|
4031
|
+
an(this._activePointers, Yt), s.copy(Yt), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", a, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.removeEventListener("mouseup", f), this.dispatchEvent({ type: "controlend" }));
|
|
4032
4032
|
};
|
|
4033
4033
|
this.lockPointer = () => {
|
|
4034
4034
|
!this._enabled || !this._domElement || (this.cancel(), this._lockedPointer = {
|
|
@@ -4048,7 +4048,7 @@ class vt extends ic {
|
|
|
4048
4048
|
this.unlockPointer();
|
|
4049
4049
|
};
|
|
4050
4050
|
this._addAllEventListeners = (m) => {
|
|
4051
|
-
this._domElement = m, this._domElement.style.touchAction = "none", this._domElement.style.userSelect = "none", this._domElement.style.webkitUserSelect = "none", this._domElement.addEventListener("pointerdown", r),
|
|
4051
|
+
this._domElement = m, this._domElement.style.touchAction = "none", this._domElement.style.userSelect = "none", this._domElement.style.webkitUserSelect = "none", this._domElement.addEventListener("pointerdown", r), ac && this._domElement.addEventListener("mousedown", o), this._domElement.addEventListener("pointercancel", h), this._domElement.addEventListener("wheel", u, { passive: !1 }), this._domElement.addEventListener("contextmenu", d);
|
|
4052
4052
|
}, this._removeAllEventListeners = () => {
|
|
4053
4053
|
this._domElement && (this._domElement.style.touchAction = "", this._domElement.style.userSelect = "", this._domElement.style.webkitUserSelect = "", this._domElement.removeEventListener("pointerdown", r), this._domElement.removeEventListener("mousedown", o), this._domElement.removeEventListener("pointercancel", h), this._domElement.removeEventListener("wheel", u, { passive: !1 }), this._domElement.removeEventListener("contextmenu", d), this._domElement.ownerDocument.removeEventListener("pointermove", a, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.removeEventListener("mouseup", f), this._domElement.ownerDocument.removeEventListener("pointerlockchange", R), this._domElement.ownerDocument.removeEventListener("pointerlockerror", S));
|
|
4054
4054
|
}, this.cancel = () => {
|
|
@@ -4417,12 +4417,12 @@ class vt extends ic {
|
|
|
4417
4417
|
fitToBox(i, t, { cover: e = !1, paddingLeft: s = 0, paddingRight: n = 0, paddingBottom: r = 0, paddingTop: o = 0 } = {}) {
|
|
4418
4418
|
const a = [], l = i.isBox3 ? ei.copy(i) : ei.setFromObject(i);
|
|
4419
4419
|
l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
|
|
4420
|
-
const h =
|
|
4420
|
+
const h = gr(this._sphericalEnd.theta, Rr), f = gr(this._sphericalEnd.phi, Rr);
|
|
4421
4421
|
a.push(this.rotateTo(h, f, t));
|
|
4422
|
-
const I = ut.setFromSpherical(this._sphericalEnd).normalize(), u =
|
|
4423
|
-
d && u.multiply(
|
|
4424
|
-
const E =
|
|
4425
|
-
Et.copy(l.min).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.min).setX(l.max.x).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.min).setY(l.max.y).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).setZ(l.min.z).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.min).setZ(l.max.z).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).setY(l.min.y).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).setX(l.min.x).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).applyQuaternion(u), E.expandByPoint(Et), E.min.x -= s, E.min.y -= r, E.max.x += n, E.max.y += o, u.setFromUnitVectors(
|
|
4422
|
+
const I = ut.setFromSpherical(this._sphericalEnd).normalize(), u = yr.setFromUnitVectors(I, ln), d = pt(Math.abs(I.y), 1);
|
|
4423
|
+
d && u.multiply(un.setFromAxisAngle(os, h)), u.multiply(this._yAxisUpSpaceInverse);
|
|
4424
|
+
const E = Nr.makeEmpty();
|
|
4425
|
+
Et.copy(l.min).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.min).setX(l.max.x).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.min).setY(l.max.y).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).setZ(l.min.z).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.min).setZ(l.max.z).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).setY(l.min.y).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).setX(l.min.x).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).applyQuaternion(u), E.expandByPoint(Et), E.min.x -= s, E.min.y -= r, E.max.x += n, E.max.y += o, u.setFromUnitVectors(ln, I), d && u.premultiply(un.invert()), u.premultiply(this._yAxisUpSpace);
|
|
4426
4426
|
const T = E.getSize(ut), p = E.getCenter(Et).applyQuaternion(u);
|
|
4427
4427
|
if (ve(this._camera)) {
|
|
4428
4428
|
const R = this.getDistanceToFitBox(T.x, T.y, T.z, e);
|
|
@@ -4440,7 +4440,7 @@ class vt extends ic {
|
|
|
4440
4440
|
* @category Methods
|
|
4441
4441
|
*/
|
|
4442
4442
|
fitToSphere(i, t) {
|
|
4443
|
-
const e = [], n = i instanceof lt.Sphere ?
|
|
4443
|
+
const e = [], n = i instanceof lt.Sphere ? hn.copy(i) : vt.createBoundingSphere(i, hn);
|
|
4444
4444
|
if (e.push(this.moveTo(n.center.x, n.center.y, n.center.z, t)), ve(this._camera)) {
|
|
4445
4445
|
const r = this.getDistanceToFitSphere(n.radius);
|
|
4446
4446
|
e.push(this.dollyTo(r, t));
|
|
@@ -4585,7 +4585,7 @@ class vt extends ic {
|
|
|
4585
4585
|
* @category Methods
|
|
4586
4586
|
*/
|
|
4587
4587
|
getDistanceToFitBox(i, t, e, s = !1) {
|
|
4588
|
-
if (
|
|
4588
|
+
if (cn(this._camera, "getDistanceToFitBox"))
|
|
4589
4589
|
return this._spherical.radius;
|
|
4590
4590
|
const n = i / t, r = this._camera.getEffectiveFOV() * Ri, o = this._camera.aspect;
|
|
4591
4591
|
return ((s ? n > o : n < o) ? t : i / o) * 0.5 / Math.tan(r * 0.5) + e * 0.5;
|
|
@@ -4597,7 +4597,7 @@ class vt extends ic {
|
|
|
4597
4597
|
* @category Methods
|
|
4598
4598
|
*/
|
|
4599
4599
|
getDistanceToFitSphere(i) {
|
|
4600
|
-
if (
|
|
4600
|
+
if (cn(this._camera, "getDistanceToFitSphere"))
|
|
4601
4601
|
return this._spherical.radius;
|
|
4602
4602
|
const t = this._camera.getEffectiveFOV() * Ri, e = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, s = 1 < this._camera.aspect ? t : e;
|
|
4603
4603
|
return i / Math.sin(s * 0.5);
|
|
@@ -4697,38 +4697,38 @@ class vt extends ic {
|
|
|
4697
4697
|
* @category Methods
|
|
4698
4698
|
*/
|
|
4699
4699
|
update(i) {
|
|
4700
|
-
const t = this._sphericalEnd.theta - this._spherical.theta, e = this._sphericalEnd.phi - this._spherical.phi, s = this._sphericalEnd.radius - this._spherical.radius, n =
|
|
4701
|
-
if (
|
|
4700
|
+
const t = this._sphericalEnd.theta - this._spherical.theta, e = this._sphericalEnd.phi - this._spherical.phi, s = this._sphericalEnd.radius - this._spherical.radius, n = Sr.subVectors(this._targetEnd, this._target), r = Or.subVectors(this._focalOffsetEnd, this._focalOffset), o = this._zoomEnd - this._zoom;
|
|
4701
|
+
if (At(t))
|
|
4702
4702
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
|
4703
4703
|
else {
|
|
4704
4704
|
const f = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
4705
4705
|
this._spherical.theta = ns(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, f, 1 / 0, i), this._needsUpdate = !0;
|
|
4706
4706
|
}
|
|
4707
|
-
if (
|
|
4707
|
+
if (At(e))
|
|
4708
4708
|
this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
|
|
4709
4709
|
else {
|
|
4710
4710
|
const f = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
4711
4711
|
this._spherical.phi = ns(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, f, 1 / 0, i), this._needsUpdate = !0;
|
|
4712
4712
|
}
|
|
4713
|
-
if (
|
|
4713
|
+
if (At(s))
|
|
4714
4714
|
this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
|
|
4715
4715
|
else {
|
|
4716
4716
|
const f = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
|
|
4717
4717
|
this._spherical.radius = ns(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, f, this.maxSpeed, i), this._needsUpdate = !0;
|
|
4718
4718
|
}
|
|
4719
|
-
if (
|
|
4719
|
+
if (At(n.x) && At(n.y) && At(n.z))
|
|
4720
4720
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
|
4721
4721
|
else {
|
|
4722
4722
|
const f = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
|
|
4723
|
-
|
|
4723
|
+
Ar(this._target, this._targetEnd, this._targetVelocity, f, this.maxSpeed, i, this._target), this._needsUpdate = !0;
|
|
4724
4724
|
}
|
|
4725
|
-
if (
|
|
4725
|
+
if (At(r.x) && At(r.y) && At(r.z))
|
|
4726
4726
|
this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
|
|
4727
4727
|
else {
|
|
4728
4728
|
const f = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
|
|
4729
|
-
|
|
4729
|
+
Ar(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, f, this.maxSpeed, i, this._focalOffset), this._needsUpdate = !0;
|
|
4730
4730
|
}
|
|
4731
|
-
if (
|
|
4731
|
+
if (At(o))
|
|
4732
4732
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
|
4733
4733
|
else {
|
|
4734
4734
|
const f = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
|
|
@@ -4746,19 +4746,19 @@ class vt extends ic {
|
|
|
4746
4746
|
}
|
|
4747
4747
|
this._boundary.clampPoint(m, m);
|
|
4748
4748
|
const y = Et.subVectors(m, this._targetEnd);
|
|
4749
|
-
this._targetEnd.copy(m), this._target.add(y), this._changedDolly -= f,
|
|
4749
|
+
this._targetEnd.copy(m), this._target.add(y), this._changedDolly -= f, At(this._changedDolly) && (this._changedDolly = 0);
|
|
4750
4750
|
} else if (Ne(this._camera) && this._changedZoom !== 0) {
|
|
4751
4751
|
const f = this._zoom - this._lastZoom, I = this._camera, u = ut.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (I.near + I.far) / (I.near - I.far)).unproject(I), d = Et.set(0, 0, -1).applyQuaternion(I.quaternion), E = ti.copy(u).add(d.multiplyScalar(-u.dot(I.up))), p = -(this._zoom - f - this._zoom) / this._zoom, R = this._getCameraDirection(Fi), S = this._targetEnd.dot(R), m = ut.copy(this._targetEnd).lerp(E, p), F = m.dot(R), O = R.multiplyScalar(F - S);
|
|
4752
4752
|
m.sub(O), this._boundary.clampPoint(m, m);
|
|
4753
4753
|
const y = Et.subVectors(m, this._targetEnd);
|
|
4754
|
-
this._targetEnd.copy(m), this._target.add(y), this._changedZoom -= f,
|
|
4754
|
+
this._targetEnd.copy(m), this._target.add(y), this._changedZoom -= f, At(this._changedZoom) && (this._changedZoom = 0);
|
|
4755
4755
|
}
|
|
4756
4756
|
}
|
|
4757
4757
|
this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
|
|
4758
4758
|
const a = this._collisionTest();
|
|
4759
|
-
this._spherical.radius = Math.min(this._spherical.radius, a), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!
|
|
4759
|
+
this._spherical.radius = Math.min(this._spherical.radius, a), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!At(this._focalOffset.x) || !At(this._focalOffset.y) || !At(this._focalOffset.z)) && (this._camera.updateMatrixWorld(), le.setFromMatrixColumn(this._camera.matrix, 0), he.setFromMatrixColumn(this._camera.matrix, 1), Ue.setFromMatrixColumn(this._camera.matrix, 2), le.multiplyScalar(this._focalOffset.x), he.multiplyScalar(-this._focalOffset.y), Ue.multiplyScalar(this._focalOffset.z), ut.copy(le).add(he).add(Ue), this._camera.position.add(ut)), this._boundaryEnclosesCamera && this._encloseToBoundary(this._camera.position.copy(this._target), ut.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse), 1);
|
|
4760
4760
|
const h = this._needsUpdate;
|
|
4761
|
-
return h && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : h ? (this.dispatchEvent({ type: "update" }),
|
|
4761
|
+
return h && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : h ? (this.dispatchEvent({ type: "update" }), At(t, this.restThreshold) && At(e, this.restThreshold) && At(s, this.restThreshold) && At(n.x, this.restThreshold) && At(n.y, this.restThreshold) && At(n.z, this.restThreshold) && At(r.x, this.restThreshold) && At(r.y, this.restThreshold) && At(r.z, this.restThreshold) && At(o, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !h && this._updatedLastTime && this.dispatchEvent({ type: "sleep" }), this._lastDistance = this._spherical.radius, this._lastZoom = this._zoom, this._updatedLastTime = h, this._needsUpdate = !1, h;
|
|
4762
4762
|
}
|
|
4763
4763
|
/**
|
|
4764
4764
|
* Get all state in JSON string
|
|
@@ -4810,7 +4810,7 @@ class vt extends ic {
|
|
|
4810
4810
|
console.warn("camera-controls is already connected.");
|
|
4811
4811
|
return;
|
|
4812
4812
|
}
|
|
4813
|
-
i.setAttribute("data-camera-controls-version",
|
|
4813
|
+
i.setAttribute("data-camera-controls-version", rc), this._addAllEventListeners(i), this._getClientRect(this._elementRect);
|
|
4814
4814
|
}
|
|
4815
4815
|
/**
|
|
4816
4816
|
* Detach all internal event handlers to disable drag control.
|
|
@@ -4870,13 +4870,13 @@ class vt extends ic {
|
|
|
4870
4870
|
// lateUpdate
|
|
4871
4871
|
_collisionTest() {
|
|
4872
4872
|
let i = 1 / 0;
|
|
4873
|
-
if (!(this.colliderMeshes.length >= 1) ||
|
|
4873
|
+
if (!(this.colliderMeshes.length >= 1) || cn(this._camera, "_collisionTest"))
|
|
4874
4874
|
return i;
|
|
4875
4875
|
const e = this._getTargetDirection(Fi);
|
|
4876
|
-
|
|
4876
|
+
fn.lookAt(Fr, e, this._camera.up);
|
|
4877
4877
|
for (let s = 0; s < 4; s++) {
|
|
4878
4878
|
const n = Et.copy(this._nearPlaneCorners[s]);
|
|
4879
|
-
n.applyMatrix4(
|
|
4879
|
+
n.applyMatrix4(fn);
|
|
4880
4880
|
const r = ti.addVectors(this._target, n);
|
|
4881
4881
|
as.set(r, e), as.far = this._spherical.radius + 1;
|
|
4882
4882
|
const o = as.intersectObjects(this.colliderMeshes);
|
|
@@ -4955,7 +4955,7 @@ class vt extends ic {
|
|
|
4955
4955
|
}), e.radius = Math.sqrt(n), e;
|
|
4956
4956
|
}
|
|
4957
4957
|
}
|
|
4958
|
-
class xi extends
|
|
4958
|
+
class xi extends Ga {
|
|
4959
4959
|
constructor(t) {
|
|
4960
4960
|
super(t);
|
|
4961
4961
|
/** {@link Updateable.onBeforeUpdate} */
|
|
@@ -5078,7 +5078,7 @@ class xi extends Va {
|
|
|
5078
5078
|
};
|
|
5079
5079
|
}
|
|
5080
5080
|
}
|
|
5081
|
-
const Os = class Os extends
|
|
5081
|
+
const Os = class Os extends Rt {
|
|
5082
5082
|
constructor(t) {
|
|
5083
5083
|
super(t);
|
|
5084
5084
|
/** {@link Updateable.onAfterUpdate} */
|
|
@@ -5106,7 +5106,7 @@ const Os = class Os extends At {
|
|
|
5106
5106
|
* @throws {Error} - Throws an error if a world with the same UUID already exists in the list.
|
|
5107
5107
|
*/
|
|
5108
5108
|
create() {
|
|
5109
|
-
const t = new
|
|
5109
|
+
const t = new Ja(this.components), e = t.uuid;
|
|
5110
5110
|
if (this.list.has(e))
|
|
5111
5111
|
throw new Error("There is already a world with this name!");
|
|
5112
5112
|
return this.list.set(e, t), t;
|
|
@@ -5147,7 +5147,7 @@ const Os = class Os extends At {
|
|
|
5147
5147
|
*/
|
|
5148
5148
|
C(Os, "uuid", "fdb61dc4-2ec1-4966-b83d-54ea795fad4a");
|
|
5149
5149
|
let Ts = Os;
|
|
5150
|
-
function
|
|
5150
|
+
function cc(c, i, t, e) {
|
|
5151
5151
|
return new Promise((s, n) => {
|
|
5152
5152
|
function r() {
|
|
5153
5153
|
const o = c.clientWaitSync(i, t, 0);
|
|
@@ -5164,15 +5164,15 @@ function oc(c, i, t, e) {
|
|
|
5164
5164
|
r();
|
|
5165
5165
|
});
|
|
5166
5166
|
}
|
|
5167
|
-
async function
|
|
5167
|
+
async function lc(c, i, t, e, s, n, r) {
|
|
5168
5168
|
const o = c.fenceSync(c.SYNC_GPU_COMMANDS_COMPLETE, 0);
|
|
5169
|
-
c.flush(), await
|
|
5169
|
+
c.flush(), await cc(c, o, 0, 10), c.deleteSync(o), c.bindBuffer(i, t), c.getBufferSubData(i, e, s, n, r), c.bindBuffer(i, null);
|
|
5170
5170
|
}
|
|
5171
|
-
async function
|
|
5171
|
+
async function oo(c, i, t, e, s, n, r, o) {
|
|
5172
5172
|
const a = c.createBuffer();
|
|
5173
|
-
return c.bindBuffer(c.PIXEL_PACK_BUFFER, a), c.bufferData(c.PIXEL_PACK_BUFFER, o.byteLength, c.STREAM_READ), c.readPixels(i, t, e, s, n, r, 0), c.bindBuffer(c.PIXEL_PACK_BUFFER, null), await
|
|
5173
|
+
return c.bindBuffer(c.PIXEL_PACK_BUFFER, a), c.bufferData(c.PIXEL_PACK_BUFFER, o.byteLength, c.STREAM_READ), c.readPixels(i, t, e, s, n, r, 0), c.bindBuffer(c.PIXEL_PACK_BUFFER, null), await lc(c, c.PIXEL_PACK_BUFFER, a, 0, o), c.deleteBuffer(a), o;
|
|
5174
5174
|
}
|
|
5175
|
-
class
|
|
5175
|
+
class hc extends Ge {
|
|
5176
5176
|
constructor() {
|
|
5177
5177
|
super(...arguments);
|
|
5178
5178
|
C(this, "_config", {
|
|
@@ -5287,7 +5287,7 @@ class cc extends Ge {
|
|
|
5287
5287
|
}, this.updateInterval));
|
|
5288
5288
|
}
|
|
5289
5289
|
}
|
|
5290
|
-
class
|
|
5290
|
+
class uc {
|
|
5291
5291
|
constructor(i, t) {
|
|
5292
5292
|
/** {@link Configurable.onSetup} */
|
|
5293
5293
|
C(this, "onSetup", new j());
|
|
@@ -5361,7 +5361,7 @@ class lc {
|
|
|
5361
5361
|
const { width: e, height: s } = this.config;
|
|
5362
5362
|
this.renderer.setSize(e, s), this.renderer.setRenderTarget(this.renderTarget), this.renderer.render(this.scene, t);
|
|
5363
5363
|
const n = this.renderer.getContext();
|
|
5364
|
-
await
|
|
5364
|
+
await oo(
|
|
5365
5365
|
n,
|
|
5366
5366
|
0,
|
|
5367
5367
|
0,
|
|
@@ -5376,7 +5376,7 @@ class lc {
|
|
|
5376
5376
|
});
|
|
5377
5377
|
if (!t.renderer)
|
|
5378
5378
|
throw new Error("The given world must have a renderer!");
|
|
5379
|
-
this.components = i, this.config = new
|
|
5379
|
+
this.components = i, this.config = new hc(
|
|
5380
5380
|
this,
|
|
5381
5381
|
this.components,
|
|
5382
5382
|
"Culler renderer"
|
|
@@ -5440,7 +5440,7 @@ class lc {
|
|
|
5440
5440
|
this._availableColor--;
|
|
5441
5441
|
}
|
|
5442
5442
|
}
|
|
5443
|
-
class
|
|
5443
|
+
class fc extends uc {
|
|
5444
5444
|
constructor(t, e) {
|
|
5445
5445
|
super(t, e);
|
|
5446
5446
|
/**
|
|
@@ -5524,13 +5524,13 @@ class hc extends lc {
|
|
|
5524
5524
|
let f = !0;
|
|
5525
5525
|
const I = [];
|
|
5526
5526
|
for (const u of n)
|
|
5527
|
-
|
|
5527
|
+
mr.isTransparent(u) ? I.push(this._transparentMat) : (f = !1, I.push(r));
|
|
5528
5528
|
if (f) {
|
|
5529
5529
|
r.dispose(), this.preventUpdate = !1;
|
|
5530
5530
|
return;
|
|
5531
5531
|
}
|
|
5532
5532
|
a = I;
|
|
5533
|
-
} else if (
|
|
5533
|
+
} else if (mr.isTransparent(n)) {
|
|
5534
5534
|
r.dispose(), this.preventUpdate = !1;
|
|
5535
5535
|
return;
|
|
5536
5536
|
} else
|
|
@@ -5586,7 +5586,7 @@ class hc extends lc {
|
|
|
5586
5586
|
return D.ColorManagement.enabled = r, { colorMaterial: l, code: n };
|
|
5587
5587
|
}
|
|
5588
5588
|
}
|
|
5589
|
-
const Di = class Di extends
|
|
5589
|
+
const Di = class Di extends Rt {
|
|
5590
5590
|
constructor(t) {
|
|
5591
5591
|
super(t);
|
|
5592
5592
|
/**
|
|
@@ -5621,7 +5621,7 @@ const Di = class Di extends At {
|
|
|
5621
5621
|
create(t) {
|
|
5622
5622
|
if (this.list.has(t.uuid))
|
|
5623
5623
|
return this.list.get(t.uuid);
|
|
5624
|
-
const e = new
|
|
5624
|
+
const e = new fc(this.components, t);
|
|
5625
5625
|
return this.list.set(t.uuid, e), e;
|
|
5626
5626
|
}
|
|
5627
5627
|
/**
|
|
@@ -5659,8 +5659,8 @@ const Di = class Di extends At {
|
|
|
5659
5659
|
* This UUID is used to register the component within the Components system.
|
|
5660
5660
|
*/
|
|
5661
5661
|
C(Di, "uuid", "69f2a50d-c266-44fc-b1bd-fa4d34be89e6");
|
|
5662
|
-
let
|
|
5663
|
-
class
|
|
5662
|
+
let On = Di;
|
|
5663
|
+
class Ic {
|
|
5664
5664
|
constructor(i, t) {
|
|
5665
5665
|
/** {@link Disposable.onDisposed} */
|
|
5666
5666
|
C(this, "onDisposed", new j());
|
|
@@ -5730,7 +5730,7 @@ class uc {
|
|
|
5730
5730
|
this.depthMaterial.uniforms.tDiffuse.value = this.tempRT.texture, this.depthMaterial.uniforms.tDepth.value = this.tempRT.depthTexture, this.renderer.setRenderTarget(this.resultRT), this.renderer.render(this.scene, this.camera);
|
|
5731
5731
|
const t = this.renderer.getContext();
|
|
5732
5732
|
try {
|
|
5733
|
-
await
|
|
5733
|
+
await oo(
|
|
5734
5734
|
t,
|
|
5735
5735
|
0,
|
|
5736
5736
|
0,
|
|
@@ -5830,7 +5830,7 @@ void main() {
|
|
|
5830
5830
|
this._postQuad.geometry.dispose(), this._postQuad.removeFromParent(), this._buffer = null, this.onDisposed.reset();
|
|
5831
5831
|
}
|
|
5832
5832
|
}
|
|
5833
|
-
class
|
|
5833
|
+
class Ah extends sc {
|
|
5834
5834
|
constructor() {
|
|
5835
5835
|
super(...arguments);
|
|
5836
5836
|
C(this, "_distanceRenderer");
|
|
@@ -5937,7 +5937,7 @@ class Rh extends ec {
|
|
|
5937
5937
|
);
|
|
5938
5938
|
for (const [, s] of this.directionalLights)
|
|
5939
5939
|
s.target.removeFromParent(), s.removeFromParent(), s.dispose();
|
|
5940
|
-
this.directionalLights.clear(), this._distanceRenderer || (this._distanceRenderer = new
|
|
5940
|
+
this.directionalLights.clear(), this._distanceRenderer || (this._distanceRenderer = new Ic(
|
|
5941
5941
|
this.components,
|
|
5942
5942
|
this.currentWorld
|
|
5943
5943
|
), this._distanceRenderer.onDistanceComputed.add(this.recomputeShadows)), this._lightsWithShadow.clear();
|
|
@@ -5955,7 +5955,7 @@ class Rh extends ec {
|
|
|
5955
5955
|
this._isComputingShadows || !this._shadowsEnabled || (this._isComputingShadows = !0, await this.distanceRenderer.compute());
|
|
5956
5956
|
}
|
|
5957
5957
|
}
|
|
5958
|
-
class
|
|
5958
|
+
class dc {
|
|
5959
5959
|
constructor(i) {
|
|
5960
5960
|
C(this, "_event");
|
|
5961
5961
|
C(this, "_position", new D.Vector2());
|
|
@@ -5993,7 +5993,7 @@ class fc {
|
|
|
5993
5993
|
i ? (this.dom.addEventListener("pointermove", this.updateMouseInfo), this.dom.addEventListener("touchstart", this.updateMouseInfo)) : (this.dom.removeEventListener("pointermove", this.updateMouseInfo), this.dom.removeEventListener("touchstart", this.updateMouseInfo));
|
|
5994
5994
|
}
|
|
5995
5995
|
}
|
|
5996
|
-
class
|
|
5996
|
+
class Ec {
|
|
5997
5997
|
constructor(i, t) {
|
|
5998
5998
|
/** {@link Component.enabled} */
|
|
5999
5999
|
C(this, "enabled", !0);
|
|
@@ -6016,7 +6016,7 @@ class Ic {
|
|
|
6016
6016
|
const e = t.renderer;
|
|
6017
6017
|
if (!e)
|
|
6018
6018
|
throw new Error("A renderer is needed for the raycaster to work!");
|
|
6019
|
-
this.world = t, this.mouse = new
|
|
6019
|
+
this.world = t, this.mouse = new dc(e.three.domElement), this.components = i;
|
|
6020
6020
|
}
|
|
6021
6021
|
/** {@link Disposable.dispose} */
|
|
6022
6022
|
dispose() {
|
|
@@ -6065,7 +6065,7 @@ class Ic {
|
|
|
6065
6065
|
);
|
|
6066
6066
|
}
|
|
6067
6067
|
}
|
|
6068
|
-
const Ns = class Ns extends
|
|
6068
|
+
const Ns = class Ns extends Rt {
|
|
6069
6069
|
constructor(t) {
|
|
6070
6070
|
super(t);
|
|
6071
6071
|
/** {@link Component.enabled} */
|
|
@@ -6090,7 +6090,7 @@ const Ns = class Ns extends At {
|
|
|
6090
6090
|
get(t) {
|
|
6091
6091
|
if (this.list.has(t.uuid))
|
|
6092
6092
|
return this.list.get(t.uuid);
|
|
6093
|
-
const e = new
|
|
6093
|
+
const e = new Ec(this.components, t);
|
|
6094
6094
|
return this.list.set(t.uuid, e), t.onDisposed.add(() => {
|
|
6095
6095
|
this.delete(t);
|
|
6096
6096
|
}), e;
|
|
@@ -6119,7 +6119,7 @@ const Ns = class Ns extends At {
|
|
|
6119
6119
|
*/
|
|
6120
6120
|
C(Ns, "uuid", "d5d8bdf0-db25-4952-b951-b643af207ace");
|
|
6121
6121
|
let ci = Ns;
|
|
6122
|
-
class
|
|
6122
|
+
class pc extends Ge {
|
|
6123
6123
|
constructor() {
|
|
6124
6124
|
super(...arguments);
|
|
6125
6125
|
C(this, "_config", {
|
|
@@ -6215,7 +6215,7 @@ class dc extends Ge {
|
|
|
6215
6215
|
this._config.distance.value = t, this._component.material.uniforms.uDistance.value = t, this._component.material.uniformsNeedUpdate = !0;
|
|
6216
6216
|
}
|
|
6217
6217
|
}
|
|
6218
|
-
class
|
|
6218
|
+
class Cc {
|
|
6219
6219
|
constructor(i, t) {
|
|
6220
6220
|
/** {@link Disposable.onDisposed} */
|
|
6221
6221
|
C(this, "onDisposed", new j());
|
|
@@ -6244,7 +6244,7 @@ class Ec {
|
|
|
6244
6244
|
});
|
|
6245
6245
|
this.world = t;
|
|
6246
6246
|
const { color: e, primarySize: s, secondarySize: n, distance: r } = this._defaultConfig;
|
|
6247
|
-
this.components = i, this.config = new
|
|
6247
|
+
this.components = i, this.config = new pc(this, this.components, "Grid");
|
|
6248
6248
|
const o = new D.PlaneGeometry(2, 2, 1, 1), a = new D.ShaderMaterial({
|
|
6249
6249
|
side: D.DoubleSide,
|
|
6250
6250
|
uniforms: {
|
|
@@ -6379,7 +6379,7 @@ class Ec {
|
|
|
6379
6379
|
i ? t.addEventListener("update", this.updateZoom) : t.removeEventListener("update", this.updateZoom);
|
|
6380
6380
|
}
|
|
6381
6381
|
}
|
|
6382
|
-
const ys = class ys extends
|
|
6382
|
+
const ys = class ys extends Rt {
|
|
6383
6383
|
constructor(t) {
|
|
6384
6384
|
super(t);
|
|
6385
6385
|
/**
|
|
@@ -6404,7 +6404,7 @@ const ys = class ys extends At {
|
|
|
6404
6404
|
create(t) {
|
|
6405
6405
|
if (this.list.has(t.uuid))
|
|
6406
6406
|
throw new Error("This world already has a grid!");
|
|
6407
|
-
const e = new
|
|
6407
|
+
const e = new Cc(this.components, t);
|
|
6408
6408
|
return this.list.set(t.uuid, e), t.onDisposed.add(() => {
|
|
6409
6409
|
this.delete(t);
|
|
6410
6410
|
}), e;
|
|
@@ -6435,18 +6435,18 @@ const ys = class ys extends At {
|
|
|
6435
6435
|
* This UUID is used to register the component within the Components system.
|
|
6436
6436
|
*/
|
|
6437
6437
|
C(ys, "uuid", "d1e814d5-b81c-4452-87a2-f039375e0489");
|
|
6438
|
-
let
|
|
6439
|
-
const xe = new
|
|
6438
|
+
let Lr = ys;
|
|
6439
|
+
const xe = new bo(), bt = new Q(), Oe = new Q(), Ot = new de(), Pr = {
|
|
6440
6440
|
X: new Q(1, 0, 0),
|
|
6441
6441
|
Y: new Q(0, 1, 0),
|
|
6442
6442
|
Z: new Q(0, 0, 1)
|
|
6443
|
-
},
|
|
6444
|
-
class
|
|
6443
|
+
}, In = { type: "change" }, _r = { type: "mouseDown" }, wr = { type: "mouseUp", mode: null }, Mr = { type: "objectChange" };
|
|
6444
|
+
class Tc extends En {
|
|
6445
6445
|
constructor(i, t) {
|
|
6446
6446
|
super(), t === void 0 && (console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'), t = document), this.isTransformControls = !0, this.visible = !1, this.domElement = t, this.domElement.style.touchAction = "none";
|
|
6447
|
-
const e = new
|
|
6447
|
+
const e = new Sc();
|
|
6448
6448
|
this._gizmo = e, this.add(e);
|
|
6449
|
-
const s = new
|
|
6449
|
+
const s = new Oc();
|
|
6450
6450
|
this._plane = s, this.add(s);
|
|
6451
6451
|
const n = this;
|
|
6452
6452
|
function r(R, S) {
|
|
@@ -6456,13 +6456,13 @@ class pc extends dn {
|
|
|
6456
6456
|
return m !== void 0 ? m : S;
|
|
6457
6457
|
},
|
|
6458
6458
|
set: function(F) {
|
|
6459
|
-
m !== F && (m = F, s[R] = F, e[R] = F, n.dispatchEvent({ type: R + "-changed", value: F }), n.dispatchEvent(
|
|
6459
|
+
m !== F && (m = F, s[R] = F, e[R] = F, n.dispatchEvent({ type: R + "-changed", value: F }), n.dispatchEvent(In));
|
|
6460
6460
|
}
|
|
6461
6461
|
}), n[R] = S, s[R] = S, e[R] = S;
|
|
6462
6462
|
}
|
|
6463
6463
|
r("camera", i), r("object", void 0), r("enabled", !0), r("axis", null), r("mode", "translate"), r("translationSnap", null), r("rotationSnap", null), r("scaleSnap", null), r("space", "world"), r("size", 1), r("dragging", !1), r("showX", !0), r("showY", !0), r("showZ", !0);
|
|
6464
6464
|
const o = new Q(), a = new Q(), l = new de(), h = new de(), f = new Q(), I = new de(), u = new Q(), d = new Q(), E = new Q(), T = 0, p = new Q();
|
|
6465
|
-
r("worldPosition", o), r("worldPositionStart", a), r("worldQuaternion", l), r("worldQuaternionStart", h), r("cameraPosition", f), r("cameraQuaternion", I), r("pointStart", u), r("pointEnd", d), r("rotationAxis", E), r("rotationAngle", T), r("eye", p), this._offset = new Q(), this._startNorm = new Q(), this._endNorm = new Q(), this._cameraScale = new Q(), this._parentPosition = new Q(), this._parentQuaternion = new de(), this._parentQuaternionInv = new de(), this._parentScale = new Q(), this._worldScaleStart = new Q(), this._worldQuaternionInv = new de(), this._worldScale = new Q(), this._positionStart = new Q(), this._quaternionStart = new de(), this._scaleStart = new Q(), this._getPointer =
|
|
6465
|
+
r("worldPosition", o), r("worldPositionStart", a), r("worldQuaternion", l), r("worldQuaternionStart", h), r("cameraPosition", f), r("cameraQuaternion", I), r("pointStart", u), r("pointEnd", d), r("rotationAxis", E), r("rotationAngle", T), r("eye", p), this._offset = new Q(), this._startNorm = new Q(), this._endNorm = new Q(), this._cameraScale = new Q(), this._parentPosition = new Q(), this._parentQuaternion = new de(), this._parentQuaternionInv = new de(), this._parentScale = new Q(), this._worldScaleStart = new Q(), this._worldQuaternionInv = new de(), this._worldScale = new Q(), this._positionStart = new Q(), this._quaternionStart = new de(), this._scaleStart = new Q(), this._getPointer = mc.bind(this), this._onPointerDown = gc.bind(this), this._onPointerHover = Rc.bind(this), this._onPointerMove = Ac.bind(this), this._onPointerUp = Fc.bind(this), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp);
|
|
6466
6466
|
}
|
|
6467
6467
|
// updateMatrixWorld updates key transformation variables
|
|
6468
6468
|
updateMatrixWorld() {
|
|
@@ -6472,14 +6472,14 @@ class pc extends dn {
|
|
|
6472
6472
|
if (this.object === void 0 || this.dragging === !0)
|
|
6473
6473
|
return;
|
|
6474
6474
|
xe.setFromCamera(i, this.camera);
|
|
6475
|
-
const t =
|
|
6475
|
+
const t = dn(this._gizmo.picker[this.mode], xe);
|
|
6476
6476
|
t ? this.axis = t.object.name : this.axis = null;
|
|
6477
6477
|
}
|
|
6478
6478
|
pointerDown(i) {
|
|
6479
6479
|
if (!(this.object === void 0 || this.dragging === !0 || i.button !== 0) && this.axis !== null) {
|
|
6480
6480
|
xe.setFromCamera(i, this.camera);
|
|
6481
|
-
const t =
|
|
6482
|
-
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0,
|
|
6481
|
+
const t = dn(this._plane, xe, !0);
|
|
6482
|
+
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, _r.mode = this.mode, this.dispatchEvent(_r);
|
|
6483
6483
|
}
|
|
6484
6484
|
}
|
|
6485
6485
|
pointerMove(i) {
|
|
@@ -6488,7 +6488,7 @@ class pc extends dn {
|
|
|
6488
6488
|
if (e === "scale" ? n = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (n = "world"), s === void 0 || t === null || this.dragging === !1 || i.button !== -1)
|
|
6489
6489
|
return;
|
|
6490
6490
|
xe.setFromCamera(i, this.camera);
|
|
6491
|
-
const r =
|
|
6491
|
+
const r = dn(this._plane, xe, !0);
|
|
6492
6492
|
if (r) {
|
|
6493
6493
|
if (this.pointEnd.copy(r.point).sub(this.worldPositionStart), e === "translate")
|
|
6494
6494
|
this._offset.copy(this.pointEnd).sub(this.pointStart), n === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), n === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), s.position.copy(this._offset).add(this._positionStart), this.translationSnap && (n === "local" && (s.position.applyQuaternion(Ot.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (s.position.x = Math.round(s.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (s.position.y = Math.round(s.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (s.position.z = Math.round(s.position.z / this.translationSnap) * this.translationSnap), s.position.applyQuaternion(this._quaternionStart)), n === "world" && (s.parent && s.position.add(bt.setFromMatrixPosition(s.parent.matrixWorld)), t.search("X") !== -1 && (s.position.x = Math.round(s.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (s.position.y = Math.round(s.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (s.position.z = Math.round(s.position.z / this.translationSnap) * this.translationSnap), s.parent && s.position.sub(bt.setFromMatrixPosition(s.parent.matrixWorld))));
|
|
@@ -6503,13 +6503,13 @@ class pc extends dn {
|
|
|
6503
6503
|
this._offset.copy(this.pointEnd).sub(this.pointStart);
|
|
6504
6504
|
const o = 20 / this.worldPosition.distanceTo(bt.setFromMatrixPosition(this.camera.matrixWorld));
|
|
6505
6505
|
let a = !1;
|
|
6506
|
-
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(bt.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(
|
|
6506
|
+
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(bt.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(Pr[t]), bt.copy(Pr[t]), n === "local" && bt.applyQuaternion(this.worldQuaternion), bt.cross(this.eye), bt.length() === 0 ? a = !0 : this.rotationAngle = this._offset.dot(bt.normalize()) * o), (t === "E" || a) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), n === "local" && t !== "E" && t !== "XYZE" ? (s.quaternion.copy(this._quaternionStart), s.quaternion.multiply(Ot.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), s.quaternion.copy(Ot.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), s.quaternion.multiply(this._quaternionStart).normalize());
|
|
6507
6507
|
}
|
|
6508
|
-
this.dispatchEvent(
|
|
6508
|
+
this.dispatchEvent(In), this.dispatchEvent(Mr);
|
|
6509
6509
|
}
|
|
6510
6510
|
}
|
|
6511
6511
|
pointerUp(i) {
|
|
6512
|
-
i.button === 0 && (this.dragging && this.axis !== null && (
|
|
6512
|
+
i.button === 0 && (this.dragging && this.axis !== null && (wr.mode = this.mode, this.dispatchEvent(wr)), this.dragging = !1, this.axis = null);
|
|
6513
6513
|
}
|
|
6514
6514
|
dispose() {
|
|
6515
6515
|
this.domElement.removeEventListener("pointerdown", this._onPointerDown), this.domElement.removeEventListener("pointermove", this._onPointerHover), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.traverse(function(i) {
|
|
@@ -6525,7 +6525,7 @@ class pc extends dn {
|
|
|
6525
6525
|
return this.object = void 0, this.visible = !1, this.axis = null, this;
|
|
6526
6526
|
}
|
|
6527
6527
|
reset() {
|
|
6528
|
-
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(
|
|
6528
|
+
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(In), this.dispatchEvent(Mr), this.pointStart.copy(this.pointEnd));
|
|
6529
6529
|
}
|
|
6530
6530
|
getRaycaster() {
|
|
6531
6531
|
return xe;
|
|
@@ -6553,7 +6553,7 @@ class pc extends dn {
|
|
|
6553
6553
|
this.space = i;
|
|
6554
6554
|
}
|
|
6555
6555
|
}
|
|
6556
|
-
function
|
|
6556
|
+
function mc(c) {
|
|
6557
6557
|
if (this.domElement.ownerDocument.pointerLockElement)
|
|
6558
6558
|
return {
|
|
6559
6559
|
x: 0,
|
|
@@ -6569,7 +6569,7 @@ function Cc(c) {
|
|
|
6569
6569
|
};
|
|
6570
6570
|
}
|
|
6571
6571
|
}
|
|
6572
|
-
function
|
|
6572
|
+
function Rc(c) {
|
|
6573
6573
|
if (this.enabled)
|
|
6574
6574
|
switch (c.pointerType) {
|
|
6575
6575
|
case "mouse":
|
|
@@ -6578,27 +6578,27 @@ function Tc(c) {
|
|
|
6578
6578
|
break;
|
|
6579
6579
|
}
|
|
6580
6580
|
}
|
|
6581
|
-
function
|
|
6581
|
+
function gc(c) {
|
|
6582
6582
|
this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(c.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(c)), this.pointerDown(this._getPointer(c)));
|
|
6583
6583
|
}
|
|
6584
|
-
function
|
|
6584
|
+
function Ac(c) {
|
|
6585
6585
|
this.enabled && this.pointerMove(this._getPointer(c));
|
|
6586
6586
|
}
|
|
6587
|
-
function
|
|
6587
|
+
function Fc(c) {
|
|
6588
6588
|
this.enabled && (this.domElement.releasePointerCapture(c.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(c)));
|
|
6589
6589
|
}
|
|
6590
|
-
function
|
|
6590
|
+
function dn(c, i, t) {
|
|
6591
6591
|
const e = i.intersectObject(c, !0);
|
|
6592
6592
|
for (let s = 0; s < e.length; s++)
|
|
6593
6593
|
if (e[s].object.visible || t)
|
|
6594
6594
|
return e[s];
|
|
6595
6595
|
return !1;
|
|
6596
6596
|
}
|
|
6597
|
-
const cs = new
|
|
6598
|
-
class
|
|
6597
|
+
const cs = new Mo(), mt = new Q(0, 1, 0), Dr = new Q(0, 0, 0), br = new pe(), ls = new de(), Es = new de(), ue = new Q(), vr = new pe(), Pi = new Q(1, 0, 0), Be = new Q(0, 1, 0), _i = new Q(0, 0, 1), hs = new Q(), Oi = new Q(), Ni = new Q();
|
|
6598
|
+
class Sc extends En {
|
|
6599
6599
|
constructor() {
|
|
6600
6600
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
|
6601
|
-
const i = new
|
|
6601
|
+
const i = new Jr({
|
|
6602
6602
|
depthTest: !1,
|
|
6603
6603
|
depthWrite: !1,
|
|
6604
6604
|
fog: !1,
|
|
@@ -6636,8 +6636,8 @@ class Ac extends dn {
|
|
|
6636
6636
|
E.translate(0, 0.05, 0);
|
|
6637
6637
|
const T = new Ut(0.08, 0.08, 0.08);
|
|
6638
6638
|
T.translate(0, 0.04, 0);
|
|
6639
|
-
const p = new
|
|
6640
|
-
p.setAttribute("position", new
|
|
6639
|
+
const p = new qn();
|
|
6640
|
+
p.setAttribute("position", new Qn([0, 0, 0, 1, 0, 0], 3));
|
|
6641
6641
|
const R = new Vt(75e-4, 75e-4, 0.5, 3);
|
|
6642
6642
|
R.translate(0, 0.25, 0);
|
|
6643
6643
|
function S(v, q) {
|
|
@@ -6645,8 +6645,8 @@ class Ac extends dn {
|
|
|
6645
6645
|
return G.rotateY(Math.PI / 2), G.rotateX(Math.PI / 2), G;
|
|
6646
6646
|
}
|
|
6647
6647
|
function m() {
|
|
6648
|
-
const v = new
|
|
6649
|
-
return v.setAttribute("position", new
|
|
6648
|
+
const v = new qn();
|
|
6649
|
+
return v.setAttribute("position", new Qn([0, 0, 0, 1, 1, 1], 3)), v;
|
|
6650
6650
|
}
|
|
6651
6651
|
const F = {
|
|
6652
6652
|
X: [
|
|
@@ -6821,7 +6821,7 @@ class Ac extends dn {
|
|
|
6821
6821
|
]
|
|
6822
6822
|
};
|
|
6823
6823
|
function g(v) {
|
|
6824
|
-
const q = new
|
|
6824
|
+
const q = new En();
|
|
6825
6825
|
for (const G in v)
|
|
6826
6826
|
for (let et = v[G].length; et--; ) {
|
|
6827
6827
|
const W = v[G][et][0].clone(), nt = v[G][et][1], V = v[G][et][2], x = v[G][et][3], ot = v[G][et][4];
|
|
@@ -6844,21 +6844,21 @@ class Ac extends dn {
|
|
|
6844
6844
|
r.visible = !0, r.rotation.set(0, 0, 0), r.position.copy(this.worldPosition);
|
|
6845
6845
|
let o;
|
|
6846
6846
|
if (this.camera.isOrthographicCamera ? o = (this.camera.top - this.camera.bottom) / this.camera.zoom : o = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), r.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), r.tag === "helper") {
|
|
6847
|
-
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (Ot.setFromEuler(cs.set(0, 0, 0)), r.quaternion.copy(e).multiply(Ot), Math.abs(mt.copy(Pi).applyQuaternion(e).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (Ot.setFromEuler(cs.set(0, 0, Math.PI / 2)), r.quaternion.copy(e).multiply(Ot), Math.abs(mt.copy(Be).applyQuaternion(e).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (Ot.setFromEuler(cs.set(0, Math.PI / 2, 0)), r.quaternion.copy(e).multiply(Ot), Math.abs(mt.copy(_i).applyQuaternion(e).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (Ot.setFromEuler(cs.set(0, Math.PI / 2, 0)), mt.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(
|
|
6847
|
+
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (Ot.setFromEuler(cs.set(0, 0, 0)), r.quaternion.copy(e).multiply(Ot), Math.abs(mt.copy(Pi).applyQuaternion(e).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (Ot.setFromEuler(cs.set(0, 0, Math.PI / 2)), r.quaternion.copy(e).multiply(Ot), Math.abs(mt.copy(Be).applyQuaternion(e).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (Ot.setFromEuler(cs.set(0, Math.PI / 2, 0)), r.quaternion.copy(e).multiply(Ot), Math.abs(mt.copy(_i).applyQuaternion(e).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (Ot.setFromEuler(cs.set(0, Math.PI / 2, 0)), mt.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(br.lookAt(Dr, mt, Be)), r.quaternion.multiply(Ot), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.quaternion.copy(this.worldQuaternionStart), bt.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), bt.applyQuaternion(this.worldQuaternionStart.clone().invert()), r.scale.copy(bt), r.visible = this.dragging) : (r.quaternion.copy(e), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
|
|
6848
6848
|
continue;
|
|
6849
6849
|
}
|
|
6850
|
-
r.quaternion.copy(e), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(mt.copy(Pi).applyQuaternion(e).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(mt.copy(Be).applyQuaternion(e).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(mt.copy(_i).applyQuaternion(e).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(mt.copy(_i).applyQuaternion(e).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(mt.copy(Pi).applyQuaternion(e).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(mt.copy(Be).applyQuaternion(e).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (ls.copy(e), mt.copy(this.eye).applyQuaternion(Ot.copy(e).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(
|
|
6850
|
+
r.quaternion.copy(e), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(mt.copy(Pi).applyQuaternion(e).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(mt.copy(Be).applyQuaternion(e).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(mt.copy(_i).applyQuaternion(e).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(mt.copy(_i).applyQuaternion(e).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(mt.copy(Pi).applyQuaternion(e).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(mt.copy(Be).applyQuaternion(e).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (ls.copy(e), mt.copy(this.eye).applyQuaternion(Ot.copy(e).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(br.lookAt(this.eye, Dr, Be)), r.name === "X" && (Ot.setFromAxisAngle(Pi, Math.atan2(-mt.y, mt.z)), Ot.multiplyQuaternions(ls, Ot), r.quaternion.copy(Ot)), r.name === "Y" && (Ot.setFromAxisAngle(Be, Math.atan2(mt.x, mt.z)), Ot.multiplyQuaternions(ls, Ot), r.quaternion.copy(Ot)), r.name === "Z" && (Ot.setFromAxisAngle(_i, Math.atan2(mt.y, mt.x)), Ot.multiplyQuaternions(ls, Ot), r.quaternion.copy(Ot))), r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(a) {
|
|
6851
6851
|
return r.name === a;
|
|
6852
6852
|
})) && (r.material.color.setHex(16776960), r.material.opacity = 1);
|
|
6853
6853
|
}
|
|
6854
6854
|
super.updateMatrixWorld(i);
|
|
6855
6855
|
}
|
|
6856
6856
|
}
|
|
6857
|
-
class
|
|
6857
|
+
class Oc extends rt {
|
|
6858
6858
|
constructor() {
|
|
6859
6859
|
super(
|
|
6860
|
-
new
|
|
6861
|
-
new
|
|
6860
|
+
new Do(1e5, 1e5, 2, 2),
|
|
6861
|
+
new Jr({ visible: !1, wireframe: !0, side: Kr, transparent: !0, opacity: 0.1, toneMapped: !1 })
|
|
6862
6862
|
), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
|
|
6863
6863
|
}
|
|
6864
6864
|
updateMatrixWorld(i) {
|
|
@@ -6895,10 +6895,10 @@ class Fc extends rt {
|
|
|
6895
6895
|
default:
|
|
6896
6896
|
ue.set(0, 0, 0);
|
|
6897
6897
|
}
|
|
6898
|
-
ue.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (
|
|
6898
|
+
ue.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (vr.lookAt(bt.set(0, 0, 0), ue, mt), this.quaternion.setFromRotationMatrix(vr)), super.updateMatrixWorld(i);
|
|
6899
6899
|
}
|
|
6900
6900
|
}
|
|
6901
|
-
class
|
|
6901
|
+
class zn {
|
|
6902
6902
|
constructor(i, t, e, s, n, r = 5, o = !0) {
|
|
6903
6903
|
/** Event that fires when the user starts dragging a clipping plane. */
|
|
6904
6904
|
C(this, "onDraggingStarted", new j());
|
|
@@ -6946,7 +6946,7 @@ class Gn {
|
|
|
6946
6946
|
});
|
|
6947
6947
|
if (this.components = i, this.world = t, !t.renderer)
|
|
6948
6948
|
throw new Error("The given world must have a renderer!");
|
|
6949
|
-
this.normal = s, this.origin = e, t.renderer.setPlane(!0, this.three), this._planeMesh =
|
|
6949
|
+
this.normal = s, this.origin = e, t.renderer.setPlane(!0, this.three), this._planeMesh = zn.newPlaneMesh(r, n), this._helper = this.newHelper(), this._controls = this.newTransformControls(), this.three.setFromNormalAndCoplanarPoint(s, e), o && this.toggleControls(!0);
|
|
6950
6950
|
}
|
|
6951
6951
|
/**
|
|
6952
6952
|
* Getter for the enabled state of the clipping plane.
|
|
@@ -7038,7 +7038,7 @@ class Gn {
|
|
|
7038
7038
|
newTransformControls() {
|
|
7039
7039
|
if (!this.world.renderer)
|
|
7040
7040
|
throw new Error("No renderer found for clipping plane!");
|
|
7041
|
-
const i = this.world.camera.three, t = this.world.renderer.three.domElement, e = new
|
|
7041
|
+
const i = this.world.camera.three, t = this.world.renderer.three.domElement, e = new Tc(i, t);
|
|
7042
7042
|
return this.initializeControls(e), this.world.scene.three.add(e), e;
|
|
7043
7043
|
}
|
|
7044
7044
|
initializeControls(i) {
|
|
@@ -7062,7 +7062,7 @@ class Gn {
|
|
|
7062
7062
|
return s.scale.set(i, i, i), s;
|
|
7063
7063
|
}
|
|
7064
7064
|
}
|
|
7065
|
-
class
|
|
7065
|
+
class Nc extends Ge {
|
|
7066
7066
|
constructor() {
|
|
7067
7067
|
super(...arguments);
|
|
7068
7068
|
C(this, "_config", {
|
|
@@ -7125,7 +7125,7 @@ class Sc extends Ge {
|
|
|
7125
7125
|
this._config.size.value = t, this._component.size = t;
|
|
7126
7126
|
}
|
|
7127
7127
|
}
|
|
7128
|
-
const ni = class ni extends
|
|
7128
|
+
const ni = class ni extends Rt {
|
|
7129
7129
|
constructor(t) {
|
|
7130
7130
|
super(t);
|
|
7131
7131
|
/** {@link Configurable.onSetup} */
|
|
@@ -7181,13 +7181,13 @@ const ni = class ni extends At {
|
|
|
7181
7181
|
* The type of clipping plane to be created.
|
|
7182
7182
|
* Default is {@link SimplePlane}.
|
|
7183
7183
|
*/
|
|
7184
|
-
C(this, "Type",
|
|
7184
|
+
C(this, "Type", zn);
|
|
7185
7185
|
/**
|
|
7186
7186
|
* A list of all the clipping planes created by this component.
|
|
7187
7187
|
*/
|
|
7188
7188
|
C(this, "list", []);
|
|
7189
7189
|
/** {@link Configurable.config} */
|
|
7190
|
-
C(this, "config", new
|
|
7190
|
+
C(this, "config", new Nc(
|
|
7191
7191
|
this,
|
|
7192
7192
|
this.components,
|
|
7193
7193
|
"Clipper",
|
|
@@ -7387,8 +7387,8 @@ const ni = class ni extends At {
|
|
|
7387
7387
|
* This UUID is used to register the component within the Components system.
|
|
7388
7388
|
*/
|
|
7389
7389
|
C(ni, "uuid", "66290bc5-18c4-4cd1-9379-2e17a0617611");
|
|
7390
|
-
let
|
|
7391
|
-
class
|
|
7390
|
+
let Nn = ni;
|
|
7391
|
+
class yc {
|
|
7392
7392
|
constructor(i) {
|
|
7393
7393
|
/** {@link NavigationMode.enabled} */
|
|
7394
7394
|
C(this, "enabled", !1);
|
|
@@ -7415,7 +7415,7 @@ class Oc {
|
|
|
7415
7415
|
), i.truckSpeed = 50, i.mouseButtons.wheel = vt.ACTION.DOLLY, i.touches.two = vt.ACTION.TOUCH_ZOOM_TRUCK;
|
|
7416
7416
|
}
|
|
7417
7417
|
}
|
|
7418
|
-
class
|
|
7418
|
+
class Lc {
|
|
7419
7419
|
constructor(i) {
|
|
7420
7420
|
/** {@link NavigationMode.enabled} */
|
|
7421
7421
|
C(this, "enabled", !0);
|
|
@@ -7438,7 +7438,7 @@ class Nc {
|
|
|
7438
7438
|
i.moveTo(r.x, r.y, r.z);
|
|
7439
7439
|
}
|
|
7440
7440
|
}
|
|
7441
|
-
class
|
|
7441
|
+
class Pc {
|
|
7442
7442
|
constructor(i) {
|
|
7443
7443
|
/** {@link NavigationMode.enabled} */
|
|
7444
7444
|
C(this, "enabled", !1);
|
|
@@ -7458,7 +7458,7 @@ class yc {
|
|
|
7458
7458
|
t.azimuthRotateSpeed = i ? 0 : this.defaultAzimuthSpeed, t.polarRotateSpeed = i ? 0 : this.defaultPolarSpeed, this.mouseInitialized || (this.mouseAction1 = t.touches.one, this.mouseAction2 = t.touches.two, this.mouseInitialized = !0), i ? (t.mouseButtons.left = vt.ACTION.TRUCK, t.touches.one = vt.ACTION.TOUCH_TRUCK, t.touches.two = vt.ACTION.TOUCH_ZOOM) : (t.mouseButtons.left = vt.ACTION.ROTATE, t.touches.one = this.mouseAction1, t.touches.two = this.mouseAction2);
|
|
7459
7459
|
}
|
|
7460
7460
|
}
|
|
7461
|
-
class
|
|
7461
|
+
class _c {
|
|
7462
7462
|
constructor(i) {
|
|
7463
7463
|
/**
|
|
7464
7464
|
* Event that fires when the {@link CameraProjection} changes.
|
|
@@ -7533,7 +7533,7 @@ class Lc {
|
|
|
7533
7533
|
i.position.copy(t.position), i.quaternion.copy(t.quaternion), this._component.controls.mouseButtons.wheel = vt.ACTION.DOLLY, this.matchOrthoDistanceEnabled ? this._component.controls.distance = this.getDistance() : this._component.controls.distance = this._previousDistance, await this._component.controls.zoomTo(1), i.updateProjectionMatrix(), this._component.controls.camera = i, this.camera = i, this.current = "Perspective";
|
|
7534
7534
|
}
|
|
7535
7535
|
}
|
|
7536
|
-
class
|
|
7536
|
+
class wc extends xi {
|
|
7537
7537
|
constructor(t) {
|
|
7538
7538
|
super(t);
|
|
7539
7539
|
/**
|
|
@@ -7555,14 +7555,14 @@ class Pc extends xi {
|
|
|
7555
7555
|
C(this, "_navigationModes", /* @__PURE__ */ new Map());
|
|
7556
7556
|
C(this, "_mode", null);
|
|
7557
7557
|
C(this, "previousSize", null);
|
|
7558
|
-
this.threePersp = this.three, this.threeOrtho = this.newOrthoCamera(), this.projection = new
|
|
7558
|
+
this.threePersp = this.three, this.threeOrtho = this.newOrthoCamera(), this.projection = new _c(this), this.onAspectUpdated.add(() => {
|
|
7559
7559
|
this.setOrthoPerspCameraAspect();
|
|
7560
7560
|
}), this.projection.onChanged.add(
|
|
7561
7561
|
(e) => {
|
|
7562
7562
|
this.three = e, this.updateAspect();
|
|
7563
7563
|
}
|
|
7564
7564
|
), this.onWorldChanged.add(({ action: e }) => {
|
|
7565
|
-
e === "added" && (this._navigationModes.clear(), this._navigationModes.set("Orbit", new
|
|
7565
|
+
e === "added" && (this._navigationModes.clear(), this._navigationModes.set("Orbit", new Lc(this)), this._navigationModes.set("FirstPerson", new yc(this)), this._navigationModes.set("Plan", new Pc(this)), this._mode = this._navigationModes.get("Orbit"), this.mode.set(!0, { preventTargetAdjustment: !0 }), this.currentWorld && this.currentWorld.renderer && (this.previousSize = this.currentWorld.renderer.getSize().clone()));
|
|
7566
7566
|
});
|
|
7567
7567
|
}
|
|
7568
7568
|
/**
|
|
@@ -7648,7 +7648,7 @@ class Pc extends xi {
|
|
|
7648
7648
|
this.threeOrtho.left = -a, this.threeOrtho.right = a, this.threeOrtho.top = o, this.threeOrtho.bottom = -o, this.threeOrtho.updateProjectionMatrix(), this.previousSize.copy(t);
|
|
7649
7649
|
}
|
|
7650
7650
|
}
|
|
7651
|
-
const
|
|
7651
|
+
const Ur = /* @__PURE__ */ new Map([
|
|
7652
7652
|
[
|
|
7653
7653
|
k.IFCRELAGGREGATES,
|
|
7654
7654
|
{
|
|
@@ -7754,7 +7754,7 @@ const vr = /* @__PURE__ */ new Map([
|
|
|
7754
7754
|
forRelating: "DocumentRefForObjects"
|
|
7755
7755
|
}
|
|
7756
7756
|
]
|
|
7757
|
-
]),
|
|
7757
|
+
]), Mc = {
|
|
7758
7758
|
103090709: "IFCPROJECT",
|
|
7759
7759
|
4097777520: "IFCSITE",
|
|
7760
7760
|
4031249490: "IFCBUILDING",
|
|
@@ -7893,9 +7893,9 @@ const vr = /* @__PURE__ */ new Map([
|
|
|
7893
7893
|
4292641817: "IFCUNITARYEQUIPMENT",
|
|
7894
7894
|
3009204131: "IFCGRID"
|
|
7895
7895
|
};
|
|
7896
|
-
class
|
|
7896
|
+
class Fh {
|
|
7897
7897
|
getAll(i, t) {
|
|
7898
|
-
const e = {}, s = Object.keys(
|
|
7898
|
+
const e = {}, s = Object.keys(Mc).map((n) => parseInt(n, 10));
|
|
7899
7899
|
for (let n = 0; n < s.length; n++) {
|
|
7900
7900
|
const r = s[n], o = i.GetLineIDsWithType(t, r), a = o.size();
|
|
7901
7901
|
for (let l = 0; l < a; l++)
|
|
@@ -9181,7 +9181,7 @@ class oi {
|
|
|
9181
9181
|
// return propertyInstance;
|
|
9182
9182
|
// }
|
|
9183
9183
|
}
|
|
9184
|
-
const
|
|
9184
|
+
const Dc = {
|
|
9185
9185
|
IFCURIREFERENCE: "IfcUriReference",
|
|
9186
9186
|
IFCTIME: "IfcTime",
|
|
9187
9187
|
IFCTEMPERATURERATEOFCHANGEMEASURE: "IfcTemperatureRateOfChangeMeasure",
|
|
@@ -10320,7 +10320,7 @@ const wc = {
|
|
|
10320
10320
|
IFCADDRESS: "IfcAddress",
|
|
10321
10321
|
IFCACTORROLE: "IfcActorRole"
|
|
10322
10322
|
};
|
|
10323
|
-
class
|
|
10323
|
+
class bc {
|
|
10324
10324
|
constructor() {
|
|
10325
10325
|
C(this, "factor", 1);
|
|
10326
10326
|
C(this, "complement", 1);
|
|
@@ -10378,10 +10378,10 @@ class Mc {
|
|
|
10378
10378
|
]);
|
|
10379
10379
|
}
|
|
10380
10380
|
}
|
|
10381
|
-
class
|
|
10381
|
+
class ao {
|
|
10382
10382
|
constructor() {
|
|
10383
10383
|
C(this, "itemsByFloor", {});
|
|
10384
|
-
C(this, "_units", new
|
|
10384
|
+
C(this, "_units", new bc());
|
|
10385
10385
|
}
|
|
10386
10386
|
// TODO: Maybe make this more flexible so that it also support more exotic spatial structures?
|
|
10387
10387
|
setUp(i) {
|
|
@@ -10448,7 +10448,7 @@ class ro {
|
|
|
10448
10448
|
this.itemsByFloor = {};
|
|
10449
10449
|
}
|
|
10450
10450
|
}
|
|
10451
|
-
class
|
|
10451
|
+
class kn {
|
|
10452
10452
|
constructor() {
|
|
10453
10453
|
/** Whether to extract the IFC properties into a JSON. */
|
|
10454
10454
|
C(this, "includeProperties", !0);
|
|
@@ -10492,7 +10492,7 @@ class zn {
|
|
|
10492
10492
|
C(this, "customLocateFileHandler", null);
|
|
10493
10493
|
}
|
|
10494
10494
|
}
|
|
10495
|
-
class
|
|
10495
|
+
class co {
|
|
10496
10496
|
constructor() {
|
|
10497
10497
|
C(this, "defLineMat", new D.LineBasicMaterial({ color: 16777215 }));
|
|
10498
10498
|
}
|
|
@@ -10543,7 +10543,7 @@ class oo {
|
|
|
10543
10543
|
return e;
|
|
10544
10544
|
}
|
|
10545
10545
|
}
|
|
10546
|
-
class
|
|
10546
|
+
class lo {
|
|
10547
10547
|
getNameInfo(i) {
|
|
10548
10548
|
var f;
|
|
10549
10549
|
const t = {}, { arguments: e } = i.GetHeaderLine(0, k.FILE_NAME) || {};
|
|
@@ -10578,7 +10578,7 @@ class ao {
|
|
|
10578
10578
|
return n != null && n.value && (t.implementationLevel = n.value), t;
|
|
10579
10579
|
}
|
|
10580
10580
|
}
|
|
10581
|
-
class
|
|
10581
|
+
class ho {
|
|
10582
10582
|
static get(i, t) {
|
|
10583
10583
|
const e = [
|
|
10584
10584
|
k.IFCPROJECT,
|
|
@@ -10600,7 +10600,7 @@ class co {
|
|
|
10600
10600
|
}
|
|
10601
10601
|
}
|
|
10602
10602
|
}
|
|
10603
|
-
const
|
|
10603
|
+
const uo = /* @__PURE__ */ new Set([
|
|
10604
10604
|
1123145078,
|
|
10605
10605
|
574549367,
|
|
10606
10606
|
1675464909,
|
|
@@ -10733,7 +10733,7 @@ const lo = /* @__PURE__ */ new Set([
|
|
|
10733
10733
|
2513912981,
|
|
10734
10734
|
2830218821,
|
|
10735
10735
|
427810014
|
|
10736
|
-
]), Ls = class Ls extends
|
|
10736
|
+
]), Ls = class Ls extends Rt {
|
|
10737
10737
|
constructor(t) {
|
|
10738
10738
|
super(t);
|
|
10739
10739
|
/** {@link Component.enabled} */
|
|
@@ -10759,7 +10759,7 @@ const lo = /* @__PURE__ */ new Set([
|
|
|
10759
10759
|
for (const l of a)
|
|
10760
10760
|
o.add(l);
|
|
10761
10761
|
for (const l of o) {
|
|
10762
|
-
if (
|
|
10762
|
+
if (uo.has(l))
|
|
10763
10763
|
continue;
|
|
10764
10764
|
const h = a.has(l) && n, f = t.GetLineIDsWithType(e, l);
|
|
10765
10765
|
for (const I of f)
|
|
@@ -10780,8 +10780,8 @@ const lo = /* @__PURE__ */ new Set([
|
|
|
10780
10780
|
* This UUID is used to register the component within the Components system.
|
|
10781
10781
|
*/
|
|
10782
10782
|
C(Ls, "uuid", "b32c4332-cd67-436e-ba7f-196646c7a635");
|
|
10783
|
-
let
|
|
10784
|
-
const bi = class bi extends
|
|
10783
|
+
let yn = Ls;
|
|
10784
|
+
const bi = class bi extends Rt {
|
|
10785
10785
|
constructor(t) {
|
|
10786
10786
|
super(t);
|
|
10787
10787
|
/** {@link Disposable.onDisposed} */
|
|
@@ -10798,7 +10798,7 @@ const bi = class bi extends At {
|
|
|
10798
10798
|
* The settings for the IfcLoader.
|
|
10799
10799
|
* It includes options for excluding categories, setting WASM paths, and more.
|
|
10800
10800
|
*/
|
|
10801
|
-
C(this, "settings", new
|
|
10801
|
+
C(this, "settings", new kn());
|
|
10802
10802
|
/**
|
|
10803
10803
|
* The instance of the Web-IFC library used for handling IFC data.
|
|
10804
10804
|
*/
|
|
@@ -10806,10 +10806,10 @@ const bi = class bi extends At {
|
|
|
10806
10806
|
/** {@link Component.enabled} */
|
|
10807
10807
|
C(this, "enabled", !0);
|
|
10808
10808
|
C(this, "_material", new D.MeshLambertMaterial());
|
|
10809
|
-
C(this, "_spatialTree", new
|
|
10810
|
-
C(this, "_metaData", new
|
|
10809
|
+
C(this, "_spatialTree", new ao());
|
|
10810
|
+
C(this, "_metaData", new lo());
|
|
10811
10811
|
C(this, "_fragmentInstances", /* @__PURE__ */ new Map());
|
|
10812
|
-
C(this, "_civil", new
|
|
10812
|
+
C(this, "_civil", new co());
|
|
10813
10813
|
C(this, "_visitedFragments", /* @__PURE__ */ new Map());
|
|
10814
10814
|
C(this, "_materialT", new D.MeshLambertMaterial({
|
|
10815
10815
|
transparent: !0,
|
|
@@ -10861,7 +10861,7 @@ const bi = class bi extends At {
|
|
|
10861
10861
|
this.onIfcStartedLoading.trigger(), await this.readIfcFile(t);
|
|
10862
10862
|
const r = await this.getAllGeometries();
|
|
10863
10863
|
r.name = s;
|
|
10864
|
-
const a = await this.components.get(
|
|
10864
|
+
const a = await this.components.get(yn).export(this.webIfc, 0);
|
|
10865
10865
|
r.setLocalProperties(a);
|
|
10866
10866
|
const l = this.components.get(Tt);
|
|
10867
10867
|
l.groups.set(r.uuid, r);
|
|
@@ -10875,7 +10875,7 @@ const bi = class bi extends At {
|
|
|
10875
10875
|
const I = f.GlobalId.value || f.GlobalId;
|
|
10876
10876
|
r.globalToExpressIDs.set(I, h);
|
|
10877
10877
|
}
|
|
10878
|
-
return
|
|
10878
|
+
return ho.get(r, this.webIfc), this.cleanUp(), console.log(`Streaming the IFC took ${performance.now() - n} ms!`), r;
|
|
10879
10879
|
}
|
|
10880
10880
|
/**
|
|
10881
10881
|
* Reads an IFC file and initializes the Web-IFC library.
|
|
@@ -11038,8 +11038,8 @@ const bi = class bi extends At {
|
|
|
11038
11038
|
* This UUID is used to register the component within the Components system.
|
|
11039
11039
|
*/
|
|
11040
11040
|
C(bi, "uuid", "a659add7-1418-4771-a0d6-7d4d438e4624");
|
|
11041
|
-
let
|
|
11042
|
-
const
|
|
11041
|
+
let Ln = bi;
|
|
11042
|
+
const vc = {
|
|
11043
11043
|
// IfcRelAssigns
|
|
11044
11044
|
IfcRelAssignsToControl: { related: 5, relating: 7 },
|
|
11045
11045
|
IfcRelAssignsToGroup: { related: 5, relating: 7 },
|
|
@@ -11061,7 +11061,7 @@ const Dc = {
|
|
|
11061
11061
|
IfcRelDefinesByProperties: { related: 5, relating: 6 },
|
|
11062
11062
|
IfcRelDefinesByType: { related: 5, relating: 6 },
|
|
11063
11063
|
IfcRelDefinesByTemplate: { related: 5, relating: 6 }
|
|
11064
|
-
},
|
|
11064
|
+
}, Uc = {
|
|
11065
11065
|
// IfcRelAssigns
|
|
11066
11066
|
[k.IFCRELASSIGNSTOCONTROL]: "IfcRelAssignsToControl",
|
|
11067
11067
|
[k.IFCRELASSIGNSTOGROUP]: "IfcRelAssignsToGroup",
|
|
@@ -11083,7 +11083,7 @@ const Dc = {
|
|
|
11083
11083
|
[k.IFCRELDEFINESBYPROPERTIES]: "IfcRelDefinesByProperties",
|
|
11084
11084
|
[k.IFCRELDEFINESBYTYPE]: "IfcRelDefinesByType",
|
|
11085
11085
|
[k.IFCRELDEFINESBYTEMPLATE]: "IfcRelDefinesByTemplate"
|
|
11086
|
-
}, me = class me extends
|
|
11086
|
+
}, me = class me extends Rt {
|
|
11087
11087
|
constructor(t) {
|
|
11088
11088
|
super(t);
|
|
11089
11089
|
/** {@link Disposable.onDisposed} */
|
|
@@ -11183,7 +11183,7 @@ const Dc = {
|
|
|
11183
11183
|
* @throws Will throw an error if no OwnerHistory is found in the model.
|
|
11184
11184
|
*/
|
|
11185
11185
|
async newPset(t, e, s) {
|
|
11186
|
-
const n = me.getIFCSchema(t), {
|
|
11186
|
+
const n = me.getIFCSchema(t), { handle: r } = await this.getOwnerHistory(t), o = this.newGUID(t), a = new k[n].IfcLabel(e), l = s ? new k[n].IfcText(s) : null, h = new k[n].IfcPropertySet(
|
|
11187
11187
|
o,
|
|
11188
11188
|
r,
|
|
11189
11189
|
a,
|
|
@@ -11330,10 +11330,10 @@ const Dc = {
|
|
|
11330
11330
|
* @throws Will throw an error if the relationship type is unsupported.
|
|
11331
11331
|
*/
|
|
11332
11332
|
async createIfcRel(t, e, s, n) {
|
|
11333
|
-
const r =
|
|
11333
|
+
const r = Uc[e];
|
|
11334
11334
|
if (!r)
|
|
11335
11335
|
throw new Error(`IfcPropertiesManager: ${r} is unsoported.`);
|
|
11336
|
-
const o = me.getIFCSchema(t), a =
|
|
11336
|
+
const o = me.getIFCSchema(t), a = vc[r], l = k[o][r];
|
|
11337
11337
|
if (!(a && l))
|
|
11338
11338
|
throw new Error(`IfcPropertiesManager: ${r} is unsoported.`);
|
|
11339
11339
|
const h = [new k[o].IfcGloballyUniqueId(oe.create())], { related: f, relating: I } = a, d = [...new Set(n)].map(
|
|
@@ -11357,7 +11357,7 @@ const Dc = {
|
|
|
11357
11357
|
* @throws Will throw an error if any issues occur during the saving process.
|
|
11358
11358
|
*/
|
|
11359
11359
|
async saveToIfc(t, e) {
|
|
11360
|
-
const s = this.components.get(
|
|
11360
|
+
const s = this.components.get(Ln), n = s.webIfc, r = await s.readIfcFile(e);
|
|
11361
11361
|
await this.components.get(Gt).applyRelationChanges();
|
|
11362
11362
|
const a = this.changeMap[t.uuid] ?? [];
|
|
11363
11363
|
for (const h of a) {
|
|
@@ -11442,7 +11442,7 @@ const Dc = {
|
|
|
11442
11442
|
if (!e)
|
|
11443
11443
|
throw new Error("No OwnerHistory was found.");
|
|
11444
11444
|
const s = Object.keys(e).map((o) => parseInt(o, 10)), n = e[s[0]], r = new k.Handle(n.expressID);
|
|
11445
|
-
return {
|
|
11445
|
+
return { entity: n, handle: r };
|
|
11446
11446
|
}
|
|
11447
11447
|
registerChange(t, ...e) {
|
|
11448
11448
|
this.changeMap[t.uuid] || (this.changeMap[t.uuid] = /* @__PURE__ */ new Set());
|
|
@@ -11464,8 +11464,8 @@ const Dc = {
|
|
|
11464
11464
|
* This UUID is used to register the component within the Components system.
|
|
11465
11465
|
*/
|
|
11466
11466
|
C(me, "uuid", "58c2d9f0-183c-48d6-a402-dfcf5b9a34df");
|
|
11467
|
-
let
|
|
11468
|
-
const vi = class vi extends
|
|
11467
|
+
let Pn = me;
|
|
11468
|
+
const vi = class vi extends Rt {
|
|
11469
11469
|
constructor(t) {
|
|
11470
11470
|
super(t);
|
|
11471
11471
|
/** {@link Disposable.onDisposed} */
|
|
@@ -11490,7 +11490,7 @@ const vi = class vi extends At {
|
|
|
11490
11490
|
C(this, "relationMaps", {});
|
|
11491
11491
|
/** {@link Component.enabled} */
|
|
11492
11492
|
C(this, "enabled", !0);
|
|
11493
|
-
C(this, "_relToAttributesMap",
|
|
11493
|
+
C(this, "_relToAttributesMap", Ur);
|
|
11494
11494
|
C(this, "_inverseAttributes", [
|
|
11495
11495
|
"IsDecomposedBy",
|
|
11496
11496
|
"Decomposes",
|
|
@@ -11665,9 +11665,9 @@ const vi = class vi extends At {
|
|
|
11665
11665
|
getEntityRelations(t, e, s) {
|
|
11666
11666
|
const n = this.getAttributeIndex(s);
|
|
11667
11667
|
let r;
|
|
11668
|
-
if (t instanceof
|
|
11668
|
+
if (t instanceof Xs ? r = this.relationMaps[t.uuid] : typeof t == "string" ? r = this.relationMaps[t] : r = t, !r && (t instanceof Xs || typeof t == "string")) {
|
|
11669
11669
|
r = /* @__PURE__ */ new Map();
|
|
11670
|
-
const l = t instanceof
|
|
11670
|
+
const l = t instanceof Xs ? t.uuid : t;
|
|
11671
11671
|
this.relationMaps[l] = r;
|
|
11672
11672
|
}
|
|
11673
11673
|
let o = r.get(e);
|
|
@@ -11814,7 +11814,7 @@ const vi = class vi extends At {
|
|
|
11814
11814
|
* @returns A promise that resolves when all the relation changes have been applied.
|
|
11815
11815
|
*/
|
|
11816
11816
|
async applyRelationChanges() {
|
|
11817
|
-
const t = this.components.get(Tt), e = this.components.get(
|
|
11817
|
+
const t = this.components.get(Tt), e = this.components.get(Pn);
|
|
11818
11818
|
for (const s in this._changeMap) {
|
|
11819
11819
|
const n = t.groups.get(s);
|
|
11820
11820
|
if (!n)
|
|
@@ -11850,7 +11850,7 @@ const vi = class vi extends At {
|
|
|
11850
11850
|
let a = this.relationMaps[t.uuid];
|
|
11851
11851
|
if (a || (a = /* @__PURE__ */ new Map(), this.relationMaps[t.uuid] = a), !this._ifcRels.includes(r))
|
|
11852
11852
|
return;
|
|
11853
|
-
const l =
|
|
11853
|
+
const l = Ur.get(r);
|
|
11854
11854
|
if (!l)
|
|
11855
11855
|
return;
|
|
11856
11856
|
const { forRelated: h, forRelating: f } = l;
|
|
@@ -11919,7 +11919,7 @@ const vi = class vi extends At {
|
|
|
11919
11919
|
*/
|
|
11920
11920
|
C(vi, "uuid", "23a889ab-83b3-44a4-8bee-ead83438370b");
|
|
11921
11921
|
let Gt = vi;
|
|
11922
|
-
const Ps = class Ps extends
|
|
11922
|
+
const Ps = class Ps extends Rt {
|
|
11923
11923
|
constructor(t) {
|
|
11924
11924
|
super(t);
|
|
11925
11925
|
/** {@link Disposable.onDisposed} */
|
|
@@ -11946,7 +11946,7 @@ const Ps = class Ps extends At {
|
|
|
11946
11946
|
C(this, "baseCoordinationMatrix", new D.Matrix4());
|
|
11947
11947
|
/** {@link Component.enabled} */
|
|
11948
11948
|
C(this, "enabled", !0);
|
|
11949
|
-
C(this, "_loader", new
|
|
11949
|
+
C(this, "_loader", new vo());
|
|
11950
11950
|
this.components.add(Ps.uuid, this);
|
|
11951
11951
|
}
|
|
11952
11952
|
/**
|
|
@@ -12146,13 +12146,13 @@ const Ps = class Ps extends At {
|
|
|
12146
12146
|
C(Ps, "uuid", "fef46874-46a3-461b-8c44-2922ab77c806");
|
|
12147
12147
|
let Tt = Ps;
|
|
12148
12148
|
var us = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
12149
|
-
function
|
|
12149
|
+
function xc(c) {
|
|
12150
12150
|
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
12151
12151
|
}
|
|
12152
12152
|
function fs(c) {
|
|
12153
12153
|
throw new Error('Could not dynamically require "' + c + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
12154
12154
|
}
|
|
12155
|
-
var
|
|
12155
|
+
var fo = { exports: {} };
|
|
12156
12156
|
/*!
|
|
12157
12157
|
|
|
12158
12158
|
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
@@ -13691,10 +13691,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13691
13691
|
A.pending_buf[A.pending++] = X >>> 8 & 255, A.pending_buf[A.pending++] = 255 & X;
|
|
13692
13692
|
}
|
|
13693
13693
|
function tt(A, X) {
|
|
13694
|
-
var z, _, P = A.max_chain_length, U = A.strstart, $ = A.prev_length, Z = A.nice_match, B = A.strstart > A.w_size - Y ? A.strstart - (A.w_size - Y) : 0, K = A.window, st = A.w_mask, J = A.prev, ct = A.strstart + b,
|
|
13694
|
+
var z, _, P = A.max_chain_length, U = A.strstart, $ = A.prev_length, Z = A.nice_match, B = A.strstart > A.w_size - Y ? A.strstart - (A.w_size - Y) : 0, K = A.window, st = A.w_mask, J = A.prev, ct = A.strstart + b, gt = K[U + $ - 1], dt = K[U + $];
|
|
13695
13695
|
A.prev_length >= A.good_match && (P >>= 2), Z > A.lookahead && (Z = A.lookahead);
|
|
13696
13696
|
do
|
|
13697
|
-
if (K[(z = X) + $] === dt && K[z + $ - 1] ===
|
|
13697
|
+
if (K[(z = X) + $] === dt && K[z + $ - 1] === gt && K[z] === K[U] && K[++z] === K[U + 1]) {
|
|
13698
13698
|
U += 2, z++;
|
|
13699
13699
|
do
|
|
13700
13700
|
;
|
|
@@ -13702,7 +13702,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13702
13702
|
if (_ = b - (ct - U), U = ct - b, $ < _) {
|
|
13703
13703
|
if (A.match_start = X, Z <= ($ = _))
|
|
13704
13704
|
break;
|
|
13705
|
-
|
|
13705
|
+
gt = K[U + $ - 1], dt = K[U + $];
|
|
13706
13706
|
}
|
|
13707
13707
|
}
|
|
13708
13708
|
while ((X = J[X & st]) > B && --P != 0);
|
|
@@ -13879,7 +13879,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13879
13879
|
}
|
|
13880
13880
|
return B.insert = 0, K === I ? (x(B, !0), B.strm.avail_out === 0 ? q : G) : B.last_lit && (x(B, !1), B.strm.avail_out === 0) ? g : v;
|
|
13881
13881
|
}(_, X) : _.strategy === 3 ? function(B, K) {
|
|
13882
|
-
for (var st, J, ct,
|
|
13882
|
+
for (var st, J, ct, gt, dt = B.window; ; ) {
|
|
13883
13883
|
if (B.lookahead <= b) {
|
|
13884
13884
|
if (St(B), B.lookahead <= b && K === f)
|
|
13885
13885
|
return g;
|
|
@@ -13887,11 +13887,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13887
13887
|
break;
|
|
13888
13888
|
}
|
|
13889
13889
|
if (B.match_length = 0, B.lookahead >= L && 0 < B.strstart && (J = dt[ct = B.strstart - 1]) === dt[++ct] && J === dt[++ct] && J === dt[++ct]) {
|
|
13890
|
-
|
|
13890
|
+
gt = B.strstart + b;
|
|
13891
13891
|
do
|
|
13892
13892
|
;
|
|
13893
|
-
while (J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && ct <
|
|
13894
|
-
B.match_length = b - (
|
|
13893
|
+
while (J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && J === dt[++ct] && ct < gt);
|
|
13894
|
+
B.match_length = b - (gt - ct), B.match_length > B.lookahead && (B.match_length = B.lookahead);
|
|
13895
13895
|
}
|
|
13896
13896
|
if (B.match_length >= L ? (st = o._tr_tally(B, 1, B.match_length - L), B.lookahead -= B.match_length, B.strstart += B.match_length, B.match_length = 0) : (st = o._tr_tally(B, 0, B.window[B.strstart]), B.lookahead--, B.strstart++), st && (x(B, !1), B.strm.avail_out === 0))
|
|
13897
13897
|
return g;
|
|
@@ -14596,21 +14596,21 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14596
14596
|
tt(P, S, U);
|
|
14597
14597
|
}
|
|
14598
14598
|
function Dt(P, U) {
|
|
14599
|
-
var $, Z, B, K = U.dyn_tree, st = U.stat_desc.static_tree, J = U.stat_desc.has_stree, ct = U.stat_desc.elems,
|
|
14599
|
+
var $, Z, B, K = U.dyn_tree, st = U.stat_desc.static_tree, J = U.stat_desc.has_stree, ct = U.stat_desc.elems, gt = -1;
|
|
14600
14600
|
for (P.heap_len = 0, P.heap_max = E, $ = 0; $ < ct; $++)
|
|
14601
|
-
K[2 * $] !== 0 ? (P.heap[++P.heap_len] =
|
|
14601
|
+
K[2 * $] !== 0 ? (P.heap[++P.heap_len] = gt = $, P.depth[$] = 0) : K[2 * $ + 1] = 0;
|
|
14602
14602
|
for (; P.heap_len < 2; )
|
|
14603
|
-
K[2 * (B = P.heap[++P.heap_len] =
|
|
14604
|
-
for (U.max_code =
|
|
14603
|
+
K[2 * (B = P.heap[++P.heap_len] = gt < 2 ? ++gt : 0)] = 1, P.depth[B] = 0, P.opt_len--, J && (P.static_len -= st[2 * B + 1]);
|
|
14604
|
+
for (U.max_code = gt, $ = P.heap_len >> 1; 1 <= $; $--)
|
|
14605
14605
|
Ct(P, K, $);
|
|
14606
14606
|
for (B = ct; $ = P.heap[1], P.heap[1] = P.heap[P.heap_len--], Ct(P, K, 1), Z = P.heap[1], P.heap[--P.heap_max] = $, P.heap[--P.heap_max] = Z, K[2 * B] = K[2 * $] + K[2 * Z], P.depth[B] = (P.depth[$] >= P.depth[Z] ? P.depth[$] : P.depth[Z]) + 1, K[2 * $ + 1] = K[2 * Z + 1] = B, P.heap[1] = B++, Ct(P, K, 1), 2 <= P.heap_len; )
|
|
14607
14607
|
;
|
|
14608
14608
|
P.heap[--P.heap_max] = P.heap[1], function(dt, Wt) {
|
|
14609
|
-
var hi, ce, ui, Lt, Vi,
|
|
14609
|
+
var hi, ce, ui, Lt, Vi, Ws, Ce = Wt.dyn_tree, $n = Wt.max_code, Ao = Wt.stat_desc.static_tree, Fo = Wt.stat_desc.has_stree, So = Wt.stat_desc.extra_bits, Zn = Wt.stat_desc.extra_base, fi = Wt.stat_desc.max_length, Yi = 0;
|
|
14610
14610
|
for (Lt = 0; Lt <= T; Lt++)
|
|
14611
14611
|
dt.bl_count[Lt] = 0;
|
|
14612
14612
|
for (Ce[2 * dt.heap[dt.heap_max] + 1] = 0, hi = dt.heap_max + 1; hi < E; hi++)
|
|
14613
|
-
fi < (Lt = Ce[2 * Ce[2 * (ce = dt.heap[hi]) + 1] + 1] + 1) && (Lt = fi, Yi++), Ce[2 * ce + 1] = Lt,
|
|
14613
|
+
fi < (Lt = Ce[2 * Ce[2 * (ce = dt.heap[hi]) + 1] + 1] + 1) && (Lt = fi, Yi++), Ce[2 * ce + 1] = Lt, $n < ce || (dt.bl_count[Lt]++, Vi = 0, Zn <= ce && (Vi = So[ce - Zn]), Ws = Ce[2 * ce], dt.opt_len += Ws * (Lt + Vi), Fo && (dt.static_len += Ws * (Ao[2 * ce + 1] + Vi)));
|
|
14614
14614
|
if (Yi !== 0) {
|
|
14615
14615
|
do {
|
|
14616
14616
|
for (Lt = fi - 1; dt.bl_count[Lt] === 0; )
|
|
@@ -14619,25 +14619,25 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14619
14619
|
} while (0 < Yi);
|
|
14620
14620
|
for (Lt = fi; Lt !== 0; Lt--)
|
|
14621
14621
|
for (ce = dt.bl_count[Lt]; ce !== 0; )
|
|
14622
|
-
|
|
14622
|
+
$n < (ui = dt.heap[--hi]) || (Ce[2 * ui + 1] !== Lt && (dt.opt_len += (Lt - Ce[2 * ui + 1]) * Ce[2 * ui], Ce[2 * ui + 1] = Lt), ce--);
|
|
14623
14623
|
}
|
|
14624
|
-
}(P, U), yt(K,
|
|
14624
|
+
}(P, U), yt(K, gt, P.bl_count);
|
|
14625
14625
|
}
|
|
14626
14626
|
function A(P, U, $) {
|
|
14627
|
-
var Z, B, K = -1, st = U[1], J = 0, ct = 7,
|
|
14628
|
-
for (st === 0 && (ct = 138,
|
|
14629
|
-
B = st, st = U[2 * (Z + 1) + 1], ++J < ct && B === st || (J <
|
|
14627
|
+
var Z, B, K = -1, st = U[1], J = 0, ct = 7, gt = 4;
|
|
14628
|
+
for (st === 0 && (ct = 138, gt = 3), U[2 * ($ + 1) + 1] = 65535, Z = 0; Z <= $; Z++)
|
|
14629
|
+
B = st, st = U[2 * (Z + 1) + 1], ++J < ct && B === st || (J < gt ? P.bl_tree[2 * B] += J : B !== 0 ? (B !== K && P.bl_tree[2 * B]++, P.bl_tree[2 * m]++) : J <= 10 ? P.bl_tree[2 * F]++ : P.bl_tree[2 * O]++, K = B, gt = (J = 0) === st ? (ct = 138, 3) : B === st ? (ct = 6, 3) : (ct = 7, 4));
|
|
14630
14630
|
}
|
|
14631
14631
|
function X(P, U, $) {
|
|
14632
|
-
var Z, B, K = -1, st = U[1], J = 0, ct = 7,
|
|
14633
|
-
for (st === 0 && (ct = 138,
|
|
14632
|
+
var Z, B, K = -1, st = U[1], J = 0, ct = 7, gt = 4;
|
|
14633
|
+
for (st === 0 && (ct = 138, gt = 3), Z = 0; Z <= $; Z++)
|
|
14634
14634
|
if (B = st, st = U[2 * (Z + 1) + 1], !(++J < ct && B === st)) {
|
|
14635
|
-
if (J <
|
|
14635
|
+
if (J < gt)
|
|
14636
14636
|
for (; tt(P, B, P.bl_tree), --J != 0; )
|
|
14637
14637
|
;
|
|
14638
14638
|
else
|
|
14639
14639
|
B !== 0 ? (B !== K && (tt(P, B, P.bl_tree), J--), tt(P, m, P.bl_tree), it(P, J - 3, 2)) : J <= 10 ? (tt(P, F, P.bl_tree), it(P, J - 3, 3)) : (tt(P, O, P.bl_tree), it(P, J - 11, 7));
|
|
14640
|
-
K = B,
|
|
14640
|
+
K = B, gt = (J = 0) === st ? (ct = 138, 3) : B === st ? (ct = 6, 3) : (ct = 7, 4);
|
|
14641
14641
|
}
|
|
14642
14642
|
}
|
|
14643
14643
|
a(W);
|
|
@@ -14676,9 +14676,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14676
14676
|
}, s._tr_stored_block = _, s._tr_flush_block = function(P, U, $, Z) {
|
|
14677
14677
|
var B, K, st = 0;
|
|
14678
14678
|
0 < P.level ? (P.strm.data_type === 2 && (P.strm.data_type = function(J) {
|
|
14679
|
-
var ct,
|
|
14680
|
-
for (ct = 0; ct <= 31; ct++,
|
|
14681
|
-
if (1 &
|
|
14679
|
+
var ct, gt = 4093624447;
|
|
14680
|
+
for (ct = 0; ct <= 31; ct++, gt >>>= 1)
|
|
14681
|
+
if (1 & gt && J.dyn_ltree[2 * ct] !== 0)
|
|
14682
14682
|
return r;
|
|
14683
14683
|
if (J.dyn_ltree[18] !== 0 || J.dyn_ltree[20] !== 0 || J.dyn_ltree[26] !== 0)
|
|
14684
14684
|
return o;
|
|
@@ -14691,11 +14691,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14691
14691
|
for (A(J, J.dyn_ltree, J.l_desc.max_code), A(J, J.dyn_dtree, J.d_desc.max_code), Dt(J, J.bl_desc), ct = d - 1; 3 <= ct && J.bl_tree[2 * b[ct] + 1] === 0; ct--)
|
|
14692
14692
|
;
|
|
14693
14693
|
return J.opt_len += 3 * (ct + 1) + 5 + 5 + 4, ct;
|
|
14694
|
-
}(P), B = P.opt_len + 3 + 7 >>> 3, (K = P.static_len + 3 + 7 >>> 3) <= B && (B = K)) : B = K = $ + 5, $ + 4 <= B && U !== -1 ? _(P, U, $, Z) : P.strategy === 4 || K === B ? (it(P, 2 + (Z ? 1 : 0), 3), Ht(P, Y, N)) : (it(P, 4 + (Z ? 1 : 0), 3), function(J, ct,
|
|
14694
|
+
}(P), B = P.opt_len + 3 + 7 >>> 3, (K = P.static_len + 3 + 7 >>> 3) <= B && (B = K)) : B = K = $ + 5, $ + 4 <= B && U !== -1 ? _(P, U, $, Z) : P.strategy === 4 || K === B ? (it(P, 2 + (Z ? 1 : 0), 3), Ht(P, Y, N)) : (it(P, 4 + (Z ? 1 : 0), 3), function(J, ct, gt, dt) {
|
|
14695
14695
|
var Wt;
|
|
14696
|
-
for (it(J, ct - 257, 5), it(J,
|
|
14696
|
+
for (it(J, ct - 257, 5), it(J, gt - 1, 5), it(J, dt - 4, 4), Wt = 0; Wt < dt; Wt++)
|
|
14697
14697
|
it(J, J.bl_tree[2 * b[Wt] + 1], 3);
|
|
14698
|
-
X(J, J.dyn_ltree, ct - 1), X(J, J.dyn_dtree,
|
|
14698
|
+
X(J, J.dyn_ltree, ct - 1), X(J, J.dyn_dtree, gt - 1);
|
|
14699
14699
|
}(P, P.l_desc.max_code + 1, P.d_desc.max_code + 1, st + 1), Ht(P, P.dyn_ltree, P.dyn_dtree)), at(P), Z && It(P);
|
|
14700
14700
|
}, s._tr_tally = function(P, U, $) {
|
|
14701
14701
|
return P.pending_buf[P.d_buf + 2 * P.last_lit] = U >>> 8 & 255, P.pending_buf[P.d_buf + 2 * P.last_lit + 1] = 255 & U, P.pending_buf[P.l_buf + P.last_lit] = 255 & $, P.last_lit++, U === 0 ? P.dyn_ltree[2 * $]++ : (P.matches++, U--, P.dyn_ltree[2 * (g[$] + f + 1)]++, P.dyn_dtree[2 * x(U)]++), P.last_lit === P.lit_bufsize - 1;
|
|
@@ -14788,10 +14788,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14788
14788
|
}).call(this, typeof us < "u" ? us : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
14789
14789
|
}, {}] }, {}, [10])(10);
|
|
14790
14790
|
});
|
|
14791
|
-
})(
|
|
14792
|
-
var
|
|
14793
|
-
const
|
|
14794
|
-
var
|
|
14791
|
+
})(fo);
|
|
14792
|
+
var Bc = fo.exports;
|
|
14793
|
+
const xr = /* @__PURE__ */ xc(Bc);
|
|
14794
|
+
var Hn = {}, ks = {};
|
|
14795
14795
|
(function(c) {
|
|
14796
14796
|
const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", t = i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040", e = "[" + i + "][" + t + "]*", s = new RegExp("^" + e + "$"), n = function(o, a) {
|
|
14797
14797
|
const l = [];
|
|
@@ -14822,25 +14822,25 @@ var kn = {}, zs = {};
|
|
|
14822
14822
|
}, c.getValue = function(o) {
|
|
14823
14823
|
return c.isExist(o) ? o : "";
|
|
14824
14824
|
}, c.isName = r, c.getAllMatches = n, c.nameRegexp = e;
|
|
14825
|
-
})(
|
|
14826
|
-
const
|
|
14825
|
+
})(ks);
|
|
14826
|
+
const Wn = ks, Vc = {
|
|
14827
14827
|
allowBooleanAttributes: !1,
|
|
14828
14828
|
//A tag can have attributes without any value
|
|
14829
14829
|
unpairedTags: []
|
|
14830
14830
|
};
|
|
14831
|
-
|
|
14832
|
-
i = Object.assign({},
|
|
14831
|
+
Hn.validate = function(c, i) {
|
|
14832
|
+
i = Object.assign({}, Vc, i);
|
|
14833
14833
|
const t = [];
|
|
14834
14834
|
let e = !1, s = !1;
|
|
14835
14835
|
c[0] === "\uFEFF" && (c = c.substr(1));
|
|
14836
14836
|
for (let n = 0; n < c.length; n++)
|
|
14837
14837
|
if (c[n] === "<" && c[n + 1] === "?") {
|
|
14838
|
-
if (n += 2, n =
|
|
14838
|
+
if (n += 2, n = Vr(c, n), n.err)
|
|
14839
14839
|
return n;
|
|
14840
14840
|
} else if (c[n] === "<") {
|
|
14841
14841
|
let r = n;
|
|
14842
14842
|
if (n++, c[n] === "!") {
|
|
14843
|
-
n =
|
|
14843
|
+
n = Yr(c, n);
|
|
14844
14844
|
continue;
|
|
14845
14845
|
} else {
|
|
14846
14846
|
let o = !1;
|
|
@@ -14849,18 +14849,18 @@ kn.validate = function(c, i) {
|
|
|
14849
14849
|
for (; n < c.length && c[n] !== ">" && c[n] !== " " && c[n] !== " " && c[n] !== `
|
|
14850
14850
|
` && c[n] !== "\r"; n++)
|
|
14851
14851
|
a += c[n];
|
|
14852
|
-
if (a = a.trim(), a[a.length - 1] === "/" && (a = a.substring(0, a.length - 1), n--),
|
|
14852
|
+
if (a = a.trim(), a[a.length - 1] === "/" && (a = a.substring(0, a.length - 1), n--), !$c(a)) {
|
|
14853
14853
|
let f;
|
|
14854
14854
|
return a.trim().length === 0 ? f = "Invalid space after '<'." : f = "Tag '" + a + "' is an invalid name.", _t("InvalidTag", f, xt(c, n));
|
|
14855
14855
|
}
|
|
14856
|
-
const l =
|
|
14856
|
+
const l = zc(c, n);
|
|
14857
14857
|
if (l === !1)
|
|
14858
14858
|
return _t("InvalidAttr", "Attributes for '" + a + "' have open quote.", xt(c, n));
|
|
14859
14859
|
let h = l.value;
|
|
14860
14860
|
if (n = l.index, h[h.length - 1] === "/") {
|
|
14861
14861
|
const f = n - h.length;
|
|
14862
14862
|
h = h.substring(0, h.length - 1);
|
|
14863
|
-
const I =
|
|
14863
|
+
const I = Gr(h, i);
|
|
14864
14864
|
if (I === !0)
|
|
14865
14865
|
e = !0;
|
|
14866
14866
|
else
|
|
@@ -14886,7 +14886,7 @@ kn.validate = function(c, i) {
|
|
|
14886
14886
|
} else
|
|
14887
14887
|
return _t("InvalidTag", "Closing tag '" + a + "' doesn't have proper closing.", xt(c, n));
|
|
14888
14888
|
else {
|
|
14889
|
-
const f =
|
|
14889
|
+
const f = Gr(h, i);
|
|
14890
14890
|
if (f !== !0)
|
|
14891
14891
|
return _t(f.err.code, f.err.msg, xt(c, n - h.length + f.err.line));
|
|
14892
14892
|
if (s === !0)
|
|
@@ -14896,24 +14896,24 @@ kn.validate = function(c, i) {
|
|
|
14896
14896
|
for (n++; n < c.length; n++)
|
|
14897
14897
|
if (c[n] === "<")
|
|
14898
14898
|
if (c[n + 1] === "!") {
|
|
14899
|
-
n++, n =
|
|
14899
|
+
n++, n = Yr(c, n);
|
|
14900
14900
|
continue;
|
|
14901
14901
|
} else if (c[n + 1] === "?") {
|
|
14902
|
-
if (n =
|
|
14902
|
+
if (n = Vr(c, ++n), n.err)
|
|
14903
14903
|
return n;
|
|
14904
14904
|
} else
|
|
14905
14905
|
break;
|
|
14906
14906
|
else if (c[n] === "&") {
|
|
14907
|
-
const f =
|
|
14907
|
+
const f = Wc(c, n);
|
|
14908
14908
|
if (f == -1)
|
|
14909
14909
|
return _t("InvalidChar", "char '&' is not expected.", xt(c, n));
|
|
14910
14910
|
n = f;
|
|
14911
|
-
} else if (s === !0 && !
|
|
14911
|
+
} else if (s === !0 && !Br(c[n]))
|
|
14912
14912
|
return _t("InvalidXml", "Extra text at the end", xt(c, n));
|
|
14913
14913
|
c[n] === "<" && n--;
|
|
14914
14914
|
}
|
|
14915
14915
|
} else {
|
|
14916
|
-
if (
|
|
14916
|
+
if (Br(c[n]))
|
|
14917
14917
|
continue;
|
|
14918
14918
|
return _t("InvalidChar", "char '" + c[n] + "' is not expected.", xt(c, n));
|
|
14919
14919
|
}
|
|
@@ -14926,11 +14926,11 @@ kn.validate = function(c, i) {
|
|
|
14926
14926
|
return _t("InvalidXml", "Start tag expected.", 1);
|
|
14927
14927
|
return !0;
|
|
14928
14928
|
};
|
|
14929
|
-
function
|
|
14929
|
+
function Br(c) {
|
|
14930
14930
|
return c === " " || c === " " || c === `
|
|
14931
14931
|
` || c === "\r";
|
|
14932
14932
|
}
|
|
14933
|
-
function
|
|
14933
|
+
function Vr(c, i) {
|
|
14934
14934
|
const t = i;
|
|
14935
14935
|
for (; i < c.length; i++)
|
|
14936
14936
|
if (c[i] == "?" || c[i] == " ") {
|
|
@@ -14945,7 +14945,7 @@ function Br(c, i) {
|
|
|
14945
14945
|
}
|
|
14946
14946
|
return i;
|
|
14947
14947
|
}
|
|
14948
|
-
function
|
|
14948
|
+
function Yr(c, i) {
|
|
14949
14949
|
if (c.length > i + 5 && c[i + 1] === "-" && c[i + 2] === "-") {
|
|
14950
14950
|
for (i += 3; i < c.length; i++)
|
|
14951
14951
|
if (c[i] === "-" && c[i + 1] === "-" && c[i + 2] === ">") {
|
|
@@ -14968,11 +14968,11 @@ function Vr(c, i) {
|
|
|
14968
14968
|
}
|
|
14969
14969
|
return i;
|
|
14970
14970
|
}
|
|
14971
|
-
const
|
|
14972
|
-
function
|
|
14971
|
+
const Yc = '"', Gc = "'";
|
|
14972
|
+
function zc(c, i) {
|
|
14973
14973
|
let t = "", e = "", s = !1;
|
|
14974
14974
|
for (; i < c.length; i++) {
|
|
14975
|
-
if (c[i] ===
|
|
14975
|
+
if (c[i] === Yc || c[i] === Gc)
|
|
14976
14976
|
e === "" ? e = c[i] : e !== c[i] || (e = "");
|
|
14977
14977
|
else if (c[i] === ">" && e === "") {
|
|
14978
14978
|
s = !0;
|
|
@@ -14986,9 +14986,9 @@ function Yc(c, i) {
|
|
|
14986
14986
|
tagClosed: s
|
|
14987
14987
|
};
|
|
14988
14988
|
}
|
|
14989
|
-
const
|
|
14990
|
-
function
|
|
14991
|
-
const t =
|
|
14989
|
+
const kc = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
|
|
14990
|
+
function Gr(c, i) {
|
|
14991
|
+
const t = Wn.getAllMatches(c, kc), e = {};
|
|
14992
14992
|
for (let s = 0; s < t.length; s++) {
|
|
14993
14993
|
if (t[s][1].length === 0)
|
|
14994
14994
|
return _t("InvalidAttr", "Attribute '" + t[s][2] + "' has no space in starting.", yi(t[s]));
|
|
@@ -14997,7 +14997,7 @@ function Yr(c, i) {
|
|
|
14997
14997
|
if (t[s][3] === void 0 && !i.allowBooleanAttributes)
|
|
14998
14998
|
return _t("InvalidAttr", "boolean attribute '" + t[s][2] + "' is not allowed.", yi(t[s]));
|
|
14999
14999
|
const n = t[s][2];
|
|
15000
|
-
if (!
|
|
15000
|
+
if (!Xc(n))
|
|
15001
15001
|
return _t("InvalidAttr", "Attribute '" + n + "' is an invalid name.", yi(t[s]));
|
|
15002
15002
|
if (!e.hasOwnProperty(n))
|
|
15003
15003
|
e[n] = 1;
|
|
@@ -15006,7 +15006,7 @@ function Yr(c, i) {
|
|
|
15006
15006
|
}
|
|
15007
15007
|
return !0;
|
|
15008
15008
|
}
|
|
15009
|
-
function
|
|
15009
|
+
function Hc(c, i) {
|
|
15010
15010
|
let t = /\d/;
|
|
15011
15011
|
for (c[i] === "x" && (i++, t = /[\da-fA-F]/); i < c.length; i++) {
|
|
15012
15012
|
if (c[i] === ";")
|
|
@@ -15016,11 +15016,11 @@ function zc(c, i) {
|
|
|
15016
15016
|
}
|
|
15017
15017
|
return -1;
|
|
15018
15018
|
}
|
|
15019
|
-
function
|
|
15019
|
+
function Wc(c, i) {
|
|
15020
15020
|
if (i++, c[i] === ";")
|
|
15021
15021
|
return -1;
|
|
15022
15022
|
if (c[i] === "#")
|
|
15023
|
-
return i++,
|
|
15023
|
+
return i++, Hc(c, i);
|
|
15024
15024
|
let t = 0;
|
|
15025
15025
|
for (; i < c.length; i++, t++)
|
|
15026
15026
|
if (!(c[i].match(/\w/) && t < 20)) {
|
|
@@ -15040,11 +15040,11 @@ function _t(c, i, t) {
|
|
|
15040
15040
|
}
|
|
15041
15041
|
};
|
|
15042
15042
|
}
|
|
15043
|
-
function
|
|
15044
|
-
return
|
|
15043
|
+
function Xc(c) {
|
|
15044
|
+
return Wn.isName(c);
|
|
15045
15045
|
}
|
|
15046
|
-
function
|
|
15047
|
-
return
|
|
15046
|
+
function $c(c) {
|
|
15047
|
+
return Wn.isName(c);
|
|
15048
15048
|
}
|
|
15049
15049
|
function xt(c, i) {
|
|
15050
15050
|
const t = c.substring(0, i).split(/\r?\n/);
|
|
@@ -15057,8 +15057,8 @@ function xt(c, i) {
|
|
|
15057
15057
|
function yi(c) {
|
|
15058
15058
|
return c.startIndex + c[1].length;
|
|
15059
15059
|
}
|
|
15060
|
-
var
|
|
15061
|
-
const
|
|
15060
|
+
var Xn = {};
|
|
15061
|
+
const Io = {
|
|
15062
15062
|
preserveOrder: !1,
|
|
15063
15063
|
attributeNamePrefix: "@_",
|
|
15064
15064
|
attributesGroupName: !1,
|
|
@@ -15101,12 +15101,12 @@ const uo = {
|
|
|
15101
15101
|
return c;
|
|
15102
15102
|
}
|
|
15103
15103
|
// skipEmptyListItem: false
|
|
15104
|
-
},
|
|
15105
|
-
return Object.assign({},
|
|
15104
|
+
}, Zc = function(c) {
|
|
15105
|
+
return Object.assign({}, Io, c);
|
|
15106
15106
|
};
|
|
15107
|
-
|
|
15108
|
-
|
|
15109
|
-
class
|
|
15107
|
+
Xn.buildOptions = Zc;
|
|
15108
|
+
Xn.defaultOptions = Io;
|
|
15109
|
+
class jc {
|
|
15110
15110
|
constructor(i) {
|
|
15111
15111
|
this.tagname = i, this.child = [], this[":@"] = {};
|
|
15112
15112
|
}
|
|
@@ -15117,27 +15117,27 @@ class $c {
|
|
|
15117
15117
|
i.tagname === "__proto__" && (i.tagname = "#__proto__"), i[":@"] && Object.keys(i[":@"]).length > 0 ? this.child.push({ [i.tagname]: i.child, ":@": i[":@"] }) : this.child.push({ [i.tagname]: i.child });
|
|
15118
15118
|
}
|
|
15119
15119
|
}
|
|
15120
|
-
var
|
|
15121
|
-
const
|
|
15122
|
-
function
|
|
15120
|
+
var qc = jc;
|
|
15121
|
+
const Qc = ks;
|
|
15122
|
+
function Kc(c, i) {
|
|
15123
15123
|
const t = {};
|
|
15124
15124
|
if (c[i + 3] === "O" && c[i + 4] === "C" && c[i + 5] === "T" && c[i + 6] === "Y" && c[i + 7] === "P" && c[i + 8] === "E") {
|
|
15125
15125
|
i = i + 9;
|
|
15126
15126
|
let e = 1, s = !1, n = !1, r = "";
|
|
15127
15127
|
for (; i < c.length; i++)
|
|
15128
15128
|
if (c[i] === "<" && !n) {
|
|
15129
|
-
if (s &&
|
|
15130
|
-
i += 7, [entityName, val, i] =
|
|
15129
|
+
if (s && el(c, i))
|
|
15130
|
+
i += 7, [entityName, val, i] = Jc(c, i + 1), val.indexOf("&") === -1 && (t[rl(entityName)] = {
|
|
15131
15131
|
regx: RegExp(`&${entityName};`, "g"),
|
|
15132
15132
|
val
|
|
15133
15133
|
});
|
|
15134
|
-
else if (s &&
|
|
15134
|
+
else if (s && il(c, i))
|
|
15135
15135
|
i += 8;
|
|
15136
|
-
else if (s &&
|
|
15136
|
+
else if (s && sl(c, i))
|
|
15137
15137
|
i += 8;
|
|
15138
|
-
else if (s &&
|
|
15138
|
+
else if (s && nl(c, i))
|
|
15139
15139
|
i += 9;
|
|
15140
|
-
else if (
|
|
15140
|
+
else if (tl)
|
|
15141
15141
|
n = !0;
|
|
15142
15142
|
else
|
|
15143
15143
|
throw new Error("Invalid DOCTYPE");
|
|
@@ -15153,7 +15153,7 @@ function qc(c, i) {
|
|
|
15153
15153
|
throw new Error("Invalid Tag instead of DOCTYPE");
|
|
15154
15154
|
return { entities: t, i };
|
|
15155
15155
|
}
|
|
15156
|
-
function
|
|
15156
|
+
function Jc(c, i) {
|
|
15157
15157
|
let t = "";
|
|
15158
15158
|
for (; i < c.length && c[i] !== "'" && c[i] !== '"'; i++)
|
|
15159
15159
|
t += c[i];
|
|
@@ -15165,50 +15165,50 @@ function Qc(c, i) {
|
|
|
15165
15165
|
s += c[i];
|
|
15166
15166
|
return [t, s, i];
|
|
15167
15167
|
}
|
|
15168
|
-
function
|
|
15168
|
+
function tl(c, i) {
|
|
15169
15169
|
return c[i + 1] === "!" && c[i + 2] === "-" && c[i + 3] === "-";
|
|
15170
15170
|
}
|
|
15171
|
-
function
|
|
15171
|
+
function el(c, i) {
|
|
15172
15172
|
return c[i + 1] === "!" && c[i + 2] === "E" && c[i + 3] === "N" && c[i + 4] === "T" && c[i + 5] === "I" && c[i + 6] === "T" && c[i + 7] === "Y";
|
|
15173
15173
|
}
|
|
15174
|
-
function
|
|
15174
|
+
function il(c, i) {
|
|
15175
15175
|
return c[i + 1] === "!" && c[i + 2] === "E" && c[i + 3] === "L" && c[i + 4] === "E" && c[i + 5] === "M" && c[i + 6] === "E" && c[i + 7] === "N" && c[i + 8] === "T";
|
|
15176
15176
|
}
|
|
15177
|
-
function
|
|
15177
|
+
function sl(c, i) {
|
|
15178
15178
|
return c[i + 1] === "!" && c[i + 2] === "A" && c[i + 3] === "T" && c[i + 4] === "T" && c[i + 5] === "L" && c[i + 6] === "I" && c[i + 7] === "S" && c[i + 8] === "T";
|
|
15179
15179
|
}
|
|
15180
|
-
function
|
|
15180
|
+
function nl(c, i) {
|
|
15181
15181
|
return c[i + 1] === "!" && c[i + 2] === "N" && c[i + 3] === "O" && c[i + 4] === "T" && c[i + 5] === "A" && c[i + 6] === "T" && c[i + 7] === "I" && c[i + 8] === "O" && c[i + 9] === "N";
|
|
15182
15182
|
}
|
|
15183
|
-
function
|
|
15184
|
-
if (
|
|
15183
|
+
function rl(c) {
|
|
15184
|
+
if (Qc.isName(c))
|
|
15185
15185
|
return c;
|
|
15186
15186
|
throw new Error(`Invalid entity name ${c}`);
|
|
15187
15187
|
}
|
|
15188
|
-
var
|
|
15189
|
-
const
|
|
15188
|
+
var ol = Kc;
|
|
15189
|
+
const al = /^[-+]?0x[a-fA-F0-9]+$/, cl = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;
|
|
15190
15190
|
!Number.parseInt && window.parseInt && (Number.parseInt = window.parseInt);
|
|
15191
15191
|
!Number.parseFloat && window.parseFloat && (Number.parseFloat = window.parseFloat);
|
|
15192
|
-
const
|
|
15192
|
+
const ll = {
|
|
15193
15193
|
hex: !0,
|
|
15194
15194
|
leadingZeros: !0,
|
|
15195
15195
|
decimalPoint: ".",
|
|
15196
15196
|
eNotation: !0
|
|
15197
15197
|
//skipLike: /regex/
|
|
15198
15198
|
};
|
|
15199
|
-
function
|
|
15200
|
-
if (i = Object.assign({},
|
|
15199
|
+
function hl(c, i = {}) {
|
|
15200
|
+
if (i = Object.assign({}, ll, i), !c || typeof c != "string")
|
|
15201
15201
|
return c;
|
|
15202
15202
|
let t = c.trim();
|
|
15203
15203
|
if (i.skipLike !== void 0 && i.skipLike.test(t))
|
|
15204
15204
|
return c;
|
|
15205
|
-
if (i.hex &&
|
|
15205
|
+
if (i.hex && al.test(t))
|
|
15206
15206
|
return Number.parseInt(t, 16);
|
|
15207
15207
|
{
|
|
15208
|
-
const e =
|
|
15208
|
+
const e = cl.exec(t);
|
|
15209
15209
|
if (e) {
|
|
15210
15210
|
const s = e[1], n = e[2];
|
|
15211
|
-
let r =
|
|
15211
|
+
let r = ul(e[3]);
|
|
15212
15212
|
const o = e[4] || e[6];
|
|
15213
15213
|
if (!i.leadingZeros && n.length > 0 && s && t[2] !== ".")
|
|
15214
15214
|
return c;
|
|
@@ -15222,12 +15222,12 @@ function cl(c, i = {}) {
|
|
|
15222
15222
|
return c;
|
|
15223
15223
|
}
|
|
15224
15224
|
}
|
|
15225
|
-
function
|
|
15225
|
+
function ul(c) {
|
|
15226
15226
|
return c && c.indexOf(".") !== -1 && (c = c.replace(/0+$/, ""), c === "." ? c = "0" : c[0] === "." ? c = "0" + c : c[c.length - 1] === "." && (c = c.substr(0, c.length - 1))), c;
|
|
15227
15227
|
}
|
|
15228
|
-
var
|
|
15229
|
-
const
|
|
15230
|
-
let
|
|
15228
|
+
var fl = hl;
|
|
15229
|
+
const Eo = ks, Li = qc, Il = ol, dl = fl;
|
|
15230
|
+
let El = class {
|
|
15231
15231
|
constructor(i) {
|
|
15232
15232
|
this.options = i, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
|
|
15233
15233
|
apos: { regex: /&(apos|#39|#x27);/g, val: "'" },
|
|
@@ -15250,10 +15250,10 @@ let Il = class {
|
|
|
15250
15250
|
inr: { regex: /&(inr|#8377);/g, val: "₹" },
|
|
15251
15251
|
num_dec: { regex: /&#([0-9]{1,7});/g, val: (t, e) => String.fromCharCode(Number.parseInt(e, 10)) },
|
|
15252
15252
|
num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t, e) => String.fromCharCode(Number.parseInt(e, 16)) }
|
|
15253
|
-
}, this.addExternalEntities =
|
|
15253
|
+
}, this.addExternalEntities = pl, this.parseXml = gl, this.parseTextData = Cl, this.resolveNameSpace = Tl, this.buildAttributesMap = Rl, this.isItStopNode = Ol, this.replaceEntitiesValue = Fl, this.readStopNodeData = yl, this.saveTextToParentTag = Sl, this.addChild = Al;
|
|
15254
15254
|
}
|
|
15255
15255
|
};
|
|
15256
|
-
function
|
|
15256
|
+
function pl(c) {
|
|
15257
15257
|
const i = Object.keys(c);
|
|
15258
15258
|
for (let t = 0; t < i.length; t++) {
|
|
15259
15259
|
const e = i[t];
|
|
@@ -15263,14 +15263,14 @@ function dl(c) {
|
|
|
15263
15263
|
};
|
|
15264
15264
|
}
|
|
15265
15265
|
}
|
|
15266
|
-
function
|
|
15266
|
+
function Cl(c, i, t, e, s, n, r) {
|
|
15267
15267
|
if (c !== void 0 && (this.options.trimValues && !e && (c = c.trim()), c.length > 0)) {
|
|
15268
15268
|
r || (c = this.replaceEntitiesValue(c));
|
|
15269
15269
|
const o = this.options.tagValueProcessor(i, c, t, s, n);
|
|
15270
|
-
return o == null ? c : typeof o != typeof c || o !== c ? o : this.options.trimValues ?
|
|
15270
|
+
return o == null ? c : typeof o != typeof c || o !== c ? o : this.options.trimValues ? wn(c, this.options.parseTagValue, this.options.numberParseOptions) : c.trim() === c ? wn(c, this.options.parseTagValue, this.options.numberParseOptions) : c;
|
|
15271
15271
|
}
|
|
15272
15272
|
}
|
|
15273
|
-
function
|
|
15273
|
+
function Tl(c) {
|
|
15274
15274
|
if (this.options.removeNSPrefix) {
|
|
15275
15275
|
const i = c.split(":"), t = c.charAt(0) === "/" ? "/" : "";
|
|
15276
15276
|
if (i[0] === "xmlns")
|
|
@@ -15279,10 +15279,10 @@ function pl(c) {
|
|
|
15279
15279
|
}
|
|
15280
15280
|
return c;
|
|
15281
15281
|
}
|
|
15282
|
-
const
|
|
15283
|
-
function
|
|
15282
|
+
const ml = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
|
|
15283
|
+
function Rl(c, i, t) {
|
|
15284
15284
|
if (!this.options.ignoreAttributes && typeof c == "string") {
|
|
15285
|
-
const e =
|
|
15285
|
+
const e = Eo.getAllMatches(c, ml), s = e.length, n = {};
|
|
15286
15286
|
for (let r = 0; r < s; r++) {
|
|
15287
15287
|
const o = this.resolveNameSpace(e[r][1]);
|
|
15288
15288
|
let a = e[r][4], l = this.options.attributeNamePrefix + o;
|
|
@@ -15290,7 +15290,7 @@ function Tl(c, i, t) {
|
|
|
15290
15290
|
if (this.options.transformAttributeName && (l = this.options.transformAttributeName(l)), l === "__proto__" && (l = "#__proto__"), a !== void 0) {
|
|
15291
15291
|
this.options.trimValues && (a = a.trim()), a = this.replaceEntitiesValue(a);
|
|
15292
15292
|
const h = this.options.attributeValueProcessor(o, a, i);
|
|
15293
|
-
h == null ? n[l] = a : typeof h != typeof a || h !== a ? n[l] = h : n[l] =
|
|
15293
|
+
h == null ? n[l] = a : typeof h != typeof a || h !== a ? n[l] = h : n[l] = wn(
|
|
15294
15294
|
a,
|
|
15295
15295
|
this.options.parseAttributeValue,
|
|
15296
15296
|
this.options.numberParseOptions
|
|
@@ -15307,7 +15307,7 @@ function Tl(c, i, t) {
|
|
|
15307
15307
|
return n;
|
|
15308
15308
|
}
|
|
15309
15309
|
}
|
|
15310
|
-
const
|
|
15310
|
+
const gl = function(c) {
|
|
15311
15311
|
c = c.replace(/\r\n?/g, `
|
|
15312
15312
|
`);
|
|
15313
15313
|
const i = new Li("!xml");
|
|
@@ -15328,7 +15328,7 @@ const ml = function(c) {
|
|
|
15328
15328
|
let h = 0;
|
|
15329
15329
|
l && this.options.unpairedTags.indexOf(l) !== -1 ? (h = s.lastIndexOf(".", s.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : h = s.lastIndexOf("."), s = s.substring(0, h), t = this.tagsNodeStack.pop(), e = "", n = o;
|
|
15330
15330
|
} else if (c[n + 1] === "?") {
|
|
15331
|
-
let o =
|
|
15331
|
+
let o = _n(c, n, !1, "?>");
|
|
15332
15332
|
if (!o)
|
|
15333
15333
|
throw new Error("Pi Tag is not closed.");
|
|
15334
15334
|
if (e = this.saveTextToParentTag(e, t, s), !(this.options.ignoreDeclaration && o.tagName === "?xml" || this.options.ignorePiTags)) {
|
|
@@ -15344,7 +15344,7 @@ const ml = function(c) {
|
|
|
15344
15344
|
}
|
|
15345
15345
|
n = o;
|
|
15346
15346
|
} else if (c.substr(n + 1, 2) === "!D") {
|
|
15347
|
-
const o =
|
|
15347
|
+
const o = Il(c, n);
|
|
15348
15348
|
this.docTypeEntities = o.entities, n = o.i;
|
|
15349
15349
|
} else if (c.substr(n + 1, 2) === "![") {
|
|
15350
15350
|
const o = Ve(c, "]]>", n, "CDATA is not closed.") - 2, a = c.substring(n + 9, o);
|
|
@@ -15352,7 +15352,7 @@ const ml = function(c) {
|
|
|
15352
15352
|
let l = this.parseTextData(a, t.tagname, s, !0, !1, !0, !0);
|
|
15353
15353
|
l == null && (l = ""), this.options.cdataPropName ? t.add(this.options.cdataPropName, [{ [this.options.textNodeName]: a }]) : t.add(this.options.textNodeName, l), n = o + 2;
|
|
15354
15354
|
} else {
|
|
15355
|
-
let o =
|
|
15355
|
+
let o = _n(c, n, this.options.removeNSPrefix), a = o.tagName;
|
|
15356
15356
|
const l = o.rawTagName;
|
|
15357
15357
|
let h = o.tagExp, f = o.attrExpPresent, I = o.closeIndex;
|
|
15358
15358
|
this.options.transformTagName && (a = this.options.transformTagName(a)), t && e && t.tagname !== "!xml" && (e = this.saveTextToParentTag(e, t, s, !1));
|
|
@@ -15387,11 +15387,11 @@ const ml = function(c) {
|
|
|
15387
15387
|
e += c[n];
|
|
15388
15388
|
return i.child;
|
|
15389
15389
|
};
|
|
15390
|
-
function
|
|
15390
|
+
function Al(c, i, t) {
|
|
15391
15391
|
const e = this.options.updateTag(i.tagname, t, i[":@"]);
|
|
15392
15392
|
e === !1 || (typeof e == "string" && (i.tagname = e), c.addChild(i));
|
|
15393
15393
|
}
|
|
15394
|
-
const
|
|
15394
|
+
const Fl = function(c) {
|
|
15395
15395
|
if (this.options.processEntities) {
|
|
15396
15396
|
for (let i in this.docTypeEntities) {
|
|
15397
15397
|
const t = this.docTypeEntities[i];
|
|
@@ -15410,7 +15410,7 @@ const gl = function(c) {
|
|
|
15410
15410
|
}
|
|
15411
15411
|
return c;
|
|
15412
15412
|
};
|
|
15413
|
-
function
|
|
15413
|
+
function Sl(c, i, t, e) {
|
|
15414
15414
|
return c && (e === void 0 && (e = Object.keys(i.child).length === 0), c = this.parseTextData(
|
|
15415
15415
|
c,
|
|
15416
15416
|
i.tagname,
|
|
@@ -15420,7 +15420,7 @@ function Al(c, i, t, e) {
|
|
|
15420
15420
|
e
|
|
15421
15421
|
), c !== void 0 && c !== "" && i.add(this.options.textNodeName, c), c = ""), c;
|
|
15422
15422
|
}
|
|
15423
|
-
function
|
|
15423
|
+
function Ol(c, i, t) {
|
|
15424
15424
|
const e = "*." + t;
|
|
15425
15425
|
for (const s in c) {
|
|
15426
15426
|
const n = c[s];
|
|
@@ -15429,7 +15429,7 @@ function Fl(c, i, t) {
|
|
|
15429
15429
|
}
|
|
15430
15430
|
return !1;
|
|
15431
15431
|
}
|
|
15432
|
-
function
|
|
15432
|
+
function Nl(c, i, t = ">") {
|
|
15433
15433
|
let e, s = "";
|
|
15434
15434
|
for (let n = i; n < c.length; n++) {
|
|
15435
15435
|
let r = c[n];
|
|
@@ -15460,8 +15460,8 @@ function Ve(c, i, t, e) {
|
|
|
15460
15460
|
throw new Error(e);
|
|
15461
15461
|
return s + i.length - 1;
|
|
15462
15462
|
}
|
|
15463
|
-
function
|
|
15464
|
-
const s =
|
|
15463
|
+
function _n(c, i, t, e = ">") {
|
|
15464
|
+
const s = Nl(c, i + 1, e);
|
|
15465
15465
|
if (!s)
|
|
15466
15466
|
return;
|
|
15467
15467
|
let n = s.data;
|
|
@@ -15481,7 +15481,7 @@ function Pn(c, i, t, e = ">") {
|
|
|
15481
15481
|
rawTagName: h
|
|
15482
15482
|
};
|
|
15483
15483
|
}
|
|
15484
|
-
function
|
|
15484
|
+
function yl(c, i, t) {
|
|
15485
15485
|
const e = t;
|
|
15486
15486
|
let s = 1;
|
|
15487
15487
|
for (; t < c.length; t++)
|
|
@@ -15501,26 +15501,26 @@ function Ol(c, i, t) {
|
|
|
15501
15501
|
else if (c.substr(t + 1, 2) === "![")
|
|
15502
15502
|
t = Ve(c, "]]>", t, "StopNode is not closed.") - 2;
|
|
15503
15503
|
else {
|
|
15504
|
-
const n =
|
|
15504
|
+
const n = _n(c, t, ">");
|
|
15505
15505
|
n && ((n && n.tagName) === i && n.tagExp[n.tagExp.length - 1] !== "/" && s++, t = n.closeIndex);
|
|
15506
15506
|
}
|
|
15507
15507
|
}
|
|
15508
|
-
function
|
|
15508
|
+
function wn(c, i, t) {
|
|
15509
15509
|
if (i && typeof c == "string") {
|
|
15510
15510
|
const e = c.trim();
|
|
15511
|
-
return e === "true" ? !0 : e === "false" ? !1 :
|
|
15511
|
+
return e === "true" ? !0 : e === "false" ? !1 : dl(c, t);
|
|
15512
15512
|
} else
|
|
15513
|
-
return
|
|
15513
|
+
return Eo.isExist(c) ? c : "";
|
|
15514
15514
|
}
|
|
15515
|
-
var
|
|
15516
|
-
function
|
|
15517
|
-
return
|
|
15515
|
+
var Ll = El, po = {};
|
|
15516
|
+
function Pl(c, i) {
|
|
15517
|
+
return Co(c, i);
|
|
15518
15518
|
}
|
|
15519
|
-
function
|
|
15519
|
+
function Co(c, i, t) {
|
|
15520
15520
|
let e;
|
|
15521
15521
|
const s = {};
|
|
15522
15522
|
for (let n = 0; n < c.length; n++) {
|
|
15523
|
-
const r = c[n], o =
|
|
15523
|
+
const r = c[n], o = _l(r);
|
|
15524
15524
|
let a = "";
|
|
15525
15525
|
if (t === void 0 ? a = o : a = t + "." + o, o === i.textNodeName)
|
|
15526
15526
|
e === void 0 ? e = r[o] : e += "" + r[o];
|
|
@@ -15528,15 +15528,15 @@ function Eo(c, i, t) {
|
|
|
15528
15528
|
if (o === void 0)
|
|
15529
15529
|
continue;
|
|
15530
15530
|
if (r[o]) {
|
|
15531
|
-
let l =
|
|
15532
|
-
const h =
|
|
15533
|
-
r[":@"] ?
|
|
15531
|
+
let l = Co(r[o], i, a);
|
|
15532
|
+
const h = Ml(l, i);
|
|
15533
|
+
r[":@"] ? wl(l, r[":@"], a, i) : Object.keys(l).length === 1 && l[i.textNodeName] !== void 0 && !i.alwaysCreateTextNode ? l = l[i.textNodeName] : Object.keys(l).length === 0 && (i.alwaysCreateTextNode ? l[i.textNodeName] = "" : l = ""), s[o] !== void 0 && s.hasOwnProperty(o) ? (Array.isArray(s[o]) || (s[o] = [s[o]]), s[o].push(l)) : i.isArray(o, a, h) ? s[o] = [l] : s[o] = l;
|
|
15534
15534
|
}
|
|
15535
15535
|
}
|
|
15536
15536
|
}
|
|
15537
15537
|
return typeof e == "string" ? e.length > 0 && (s[i.textNodeName] = e) : e !== void 0 && (s[i.textNodeName] = e), s;
|
|
15538
15538
|
}
|
|
15539
|
-
function
|
|
15539
|
+
function _l(c) {
|
|
15540
15540
|
const i = Object.keys(c);
|
|
15541
15541
|
for (let t = 0; t < i.length; t++) {
|
|
15542
15542
|
const e = i[t];
|
|
@@ -15544,7 +15544,7 @@ function Ll(c) {
|
|
|
15544
15544
|
return e;
|
|
15545
15545
|
}
|
|
15546
15546
|
}
|
|
15547
|
-
function
|
|
15547
|
+
function wl(c, i, t, e) {
|
|
15548
15548
|
if (i) {
|
|
15549
15549
|
const s = Object.keys(i), n = s.length;
|
|
15550
15550
|
for (let r = 0; r < n; r++) {
|
|
@@ -15553,15 +15553,15 @@ function Pl(c, i, t, e) {
|
|
|
15553
15553
|
}
|
|
15554
15554
|
}
|
|
15555
15555
|
}
|
|
15556
|
-
function
|
|
15556
|
+
function Ml(c, i) {
|
|
15557
15557
|
const { textNodeName: t } = i, e = Object.keys(c).length;
|
|
15558
15558
|
return !!(e === 0 || e === 1 && (c[t] || typeof c[t] == "boolean" || c[t] === 0));
|
|
15559
15559
|
}
|
|
15560
|
-
|
|
15561
|
-
const { buildOptions:
|
|
15562
|
-
let
|
|
15560
|
+
po.prettify = Pl;
|
|
15561
|
+
const { buildOptions: Dl } = Xn, bl = Ll, { prettify: vl } = po, Ul = Hn;
|
|
15562
|
+
let xl = class {
|
|
15563
15563
|
constructor(i) {
|
|
15564
|
-
this.externalEntities = {}, this.options =
|
|
15564
|
+
this.externalEntities = {}, this.options = Dl(i);
|
|
15565
15565
|
}
|
|
15566
15566
|
/**
|
|
15567
15567
|
* Parse XML dats to JS object
|
|
@@ -15576,14 +15576,14 @@ let vl = class {
|
|
|
15576
15576
|
throw new Error("XML data is accepted in String or Bytes[] form.");
|
|
15577
15577
|
if (t) {
|
|
15578
15578
|
t === !0 && (t = {});
|
|
15579
|
-
const n =
|
|
15579
|
+
const n = Ul.validate(i, t);
|
|
15580
15580
|
if (n !== !0)
|
|
15581
15581
|
throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
|
|
15582
15582
|
}
|
|
15583
|
-
const e = new
|
|
15583
|
+
const e = new bl(this.options);
|
|
15584
15584
|
e.addExternalEntities(this.externalEntities);
|
|
15585
15585
|
const s = e.parseXml(i);
|
|
15586
|
-
return this.options.preserveOrder || s === void 0 ? s :
|
|
15586
|
+
return this.options.preserveOrder || s === void 0 ? s : vl(s, this.options);
|
|
15587
15587
|
}
|
|
15588
15588
|
/**
|
|
15589
15589
|
* Add Entity which is not by default supported by this library
|
|
@@ -15600,23 +15600,23 @@ let vl = class {
|
|
|
15600
15600
|
this.externalEntities[i] = t;
|
|
15601
15601
|
}
|
|
15602
15602
|
};
|
|
15603
|
-
var
|
|
15604
|
-
const
|
|
15603
|
+
var Bl = xl;
|
|
15604
|
+
const Vl = `
|
|
15605
15605
|
`;
|
|
15606
|
-
function
|
|
15606
|
+
function Yl(c, i) {
|
|
15607
15607
|
let t = "";
|
|
15608
|
-
return i.format && i.indentBy.length > 0 && (t =
|
|
15608
|
+
return i.format && i.indentBy.length > 0 && (t = Vl), To(c, i, "", t);
|
|
15609
15609
|
}
|
|
15610
|
-
function
|
|
15610
|
+
function To(c, i, t, e) {
|
|
15611
15611
|
let s = "", n = !1;
|
|
15612
15612
|
for (let r = 0; r < c.length; r++) {
|
|
15613
|
-
const o = c[r], a =
|
|
15613
|
+
const o = c[r], a = Gl(o);
|
|
15614
15614
|
if (a === void 0)
|
|
15615
15615
|
continue;
|
|
15616
15616
|
let l = "";
|
|
15617
15617
|
if (t.length === 0 ? l = a : l = `${t}.${a}`, a === i.textNodeName) {
|
|
15618
15618
|
let d = o[a];
|
|
15619
|
-
|
|
15619
|
+
zl(l, i) || (d = i.tagValueProcessor(a, d), d = mo(d, i)), n && (s += e), s += d, n = !1;
|
|
15620
15620
|
continue;
|
|
15621
15621
|
} else if (a === i.cdataPropName) {
|
|
15622
15622
|
n && (s += e), s += `<![CDATA[${o[a][0][i.textNodeName]}]]>`, n = !1;
|
|
@@ -15625,19 +15625,19 @@ function po(c, i, t, e) {
|
|
|
15625
15625
|
s += e + `<!--${o[a][0][i.textNodeName]}-->`, n = !0;
|
|
15626
15626
|
continue;
|
|
15627
15627
|
} else if (a[0] === "?") {
|
|
15628
|
-
const d =
|
|
15628
|
+
const d = zr(o[":@"], i), E = a === "?xml" ? "" : e;
|
|
15629
15629
|
let T = o[a][0][i.textNodeName];
|
|
15630
15630
|
T = T.length !== 0 ? " " + T : "", s += E + `<${a}${T}${d}?>`, n = !0;
|
|
15631
15631
|
continue;
|
|
15632
15632
|
}
|
|
15633
15633
|
let h = e;
|
|
15634
15634
|
h !== "" && (h += i.indentBy);
|
|
15635
|
-
const f =
|
|
15635
|
+
const f = zr(o[":@"], i), I = e + `<${a}${f}`, u = To(o[a], i, l, h);
|
|
15636
15636
|
i.unpairedTags.indexOf(a) !== -1 ? i.suppressUnpairedNode ? s += I + ">" : s += I + "/>" : (!u || u.length === 0) && i.suppressEmptyNode ? s += I + "/>" : u && u.endsWith(">") ? s += I + `>${u}${e}</${a}>` : (s += I + ">", u && e !== "" && (u.includes("/>") || u.includes("</")) ? s += e + i.indentBy + u + e : s += u, s += `</${a}>`), n = !0;
|
|
15637
15637
|
}
|
|
15638
15638
|
return s;
|
|
15639
15639
|
}
|
|
15640
|
-
function
|
|
15640
|
+
function Gl(c) {
|
|
15641
15641
|
const i = Object.keys(c);
|
|
15642
15642
|
for (let t = 0; t < i.length; t++) {
|
|
15643
15643
|
const e = i[t];
|
|
@@ -15645,18 +15645,18 @@ function Vl(c) {
|
|
|
15645
15645
|
return e;
|
|
15646
15646
|
}
|
|
15647
15647
|
}
|
|
15648
|
-
function
|
|
15648
|
+
function zr(c, i) {
|
|
15649
15649
|
let t = "";
|
|
15650
15650
|
if (c && !i.ignoreAttributes)
|
|
15651
15651
|
for (let e in c) {
|
|
15652
15652
|
if (!c.hasOwnProperty(e))
|
|
15653
15653
|
continue;
|
|
15654
15654
|
let s = i.attributeValueProcessor(e, c[e]);
|
|
15655
|
-
s =
|
|
15655
|
+
s = mo(s, i), s === !0 && i.suppressBooleanAttributes ? t += ` ${e.substr(i.attributeNamePrefix.length)}` : t += ` ${e.substr(i.attributeNamePrefix.length)}="${s}"`;
|
|
15656
15656
|
}
|
|
15657
15657
|
return t;
|
|
15658
15658
|
}
|
|
15659
|
-
function
|
|
15659
|
+
function zl(c, i) {
|
|
15660
15660
|
c = c.substr(0, c.length - i.textNodeName.length - 1);
|
|
15661
15661
|
let t = c.substr(c.lastIndexOf(".") + 1);
|
|
15662
15662
|
for (let e in i.stopNodes)
|
|
@@ -15664,7 +15664,7 @@ function Yl(c, i) {
|
|
|
15664
15664
|
return !0;
|
|
15665
15665
|
return !1;
|
|
15666
15666
|
}
|
|
15667
|
-
function
|
|
15667
|
+
function mo(c, i) {
|
|
15668
15668
|
if (c && c.length > 0 && i.processEntities)
|
|
15669
15669
|
for (let t = 0; t < i.entities.length; t++) {
|
|
15670
15670
|
const e = i.entities[t];
|
|
@@ -15672,8 +15672,8 @@ function Co(c, i) {
|
|
|
15672
15672
|
}
|
|
15673
15673
|
return c;
|
|
15674
15674
|
}
|
|
15675
|
-
var
|
|
15676
|
-
const
|
|
15675
|
+
var kl = Yl;
|
|
15676
|
+
const Hl = kl, Wl = {
|
|
15677
15677
|
attributeNamePrefix: "@_",
|
|
15678
15678
|
attributesGroupName: !1,
|
|
15679
15679
|
textNodeName: "#text",
|
|
@@ -15708,16 +15708,16 @@ const zl = Gl, kl = {
|
|
|
15708
15708
|
oneListGroup: !1
|
|
15709
15709
|
};
|
|
15710
15710
|
function be(c) {
|
|
15711
|
-
this.options = Object.assign({},
|
|
15711
|
+
this.options = Object.assign({}, Wl, c), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
|
|
15712
15712
|
return !1;
|
|
15713
|
-
} : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute =
|
|
15713
|
+
} : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Zl), this.processTextOrObjNode = Xl, this.options.format ? (this.indentate = $l, this.tagEndChar = `>
|
|
15714
15714
|
`, this.newLine = `
|
|
15715
15715
|
`) : (this.indentate = function() {
|
|
15716
15716
|
return "";
|
|
15717
15717
|
}, this.tagEndChar = ">", this.newLine = "");
|
|
15718
15718
|
}
|
|
15719
15719
|
be.prototype.build = function(c) {
|
|
15720
|
-
return this.options.preserveOrder ?
|
|
15720
|
+
return this.options.preserveOrder ? Hl(c, this.options) : (Array.isArray(c) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (c = {
|
|
15721
15721
|
[this.options.arrayNodeName]: c
|
|
15722
15722
|
}), this.j2x(c, 0).val);
|
|
15723
15723
|
};
|
|
@@ -15772,7 +15772,7 @@ be.prototype.j2x = function(c, i) {
|
|
|
15772
15772
|
be.prototype.buildAttrPairStr = function(c, i) {
|
|
15773
15773
|
return i = this.options.attributeValueProcessor(c, "" + i), i = this.replaceEntitiesValue(i), this.options.suppressBooleanAttributes && i === "true" ? " " + c : " " + c + '="' + i + '"';
|
|
15774
15774
|
};
|
|
15775
|
-
function
|
|
15775
|
+
function Xl(c, i, t) {
|
|
15776
15776
|
const e = this.j2x(c, t + 1);
|
|
15777
15777
|
return c[this.options.textNodeName] !== void 0 && Object.keys(c).length === 1 ? this.buildTextValNode(c[this.options.textNodeName], i, e.attrStr, t) : this.buildObjectNode(e.val, i, e.attrStr, t);
|
|
15778
15778
|
}
|
|
@@ -15808,20 +15808,20 @@ be.prototype.replaceEntitiesValue = function(c) {
|
|
|
15808
15808
|
}
|
|
15809
15809
|
return c;
|
|
15810
15810
|
};
|
|
15811
|
-
function
|
|
15811
|
+
function $l(c) {
|
|
15812
15812
|
return this.options.indentBy.repeat(c);
|
|
15813
15813
|
}
|
|
15814
|
-
function
|
|
15814
|
+
function Zl(c) {
|
|
15815
15815
|
return c.startsWith(this.options.attributeNamePrefix) && c !== this.options.textNodeName ? c.substr(this.attrPrefixLen) : !1;
|
|
15816
15816
|
}
|
|
15817
|
-
var
|
|
15818
|
-
const
|
|
15819
|
-
var
|
|
15820
|
-
XMLParser:
|
|
15821
|
-
XMLValidator:
|
|
15822
|
-
XMLBuilder:
|
|
15817
|
+
var jl = be;
|
|
15818
|
+
const ql = Hn, Ql = Bl, Kl = jl;
|
|
15819
|
+
var Ro = {
|
|
15820
|
+
XMLParser: Ql,
|
|
15821
|
+
XMLValidator: ql,
|
|
15822
|
+
XMLBuilder: Kl
|
|
15823
15823
|
};
|
|
15824
|
-
class
|
|
15824
|
+
class Mn {
|
|
15825
15825
|
/**
|
|
15826
15826
|
* Constructs a new BCF Topic Comment instance.
|
|
15827
15827
|
* @param components - The Components instance.
|
|
@@ -15921,7 +15921,7 @@ const Ie = class Ie {
|
|
|
15921
15921
|
C(this, "_priority", Ie.default.priority);
|
|
15922
15922
|
C(this, "_stage", Ie.default.stage);
|
|
15923
15923
|
C(this, "_assignedTo", Ie.default.assignedTo);
|
|
15924
|
-
C(this, "_labels", Ie.default.labels);
|
|
15924
|
+
C(this, "_labels", Ie.default.labels ?? /* @__PURE__ */ new Set());
|
|
15925
15925
|
C(this, "_components");
|
|
15926
15926
|
this._components = i;
|
|
15927
15927
|
const t = i.get(Mt);
|
|
@@ -16043,7 +16043,7 @@ const Ie = class Ie {
|
|
|
16043
16043
|
* ```
|
|
16044
16044
|
*/
|
|
16045
16045
|
createComment(i, t) {
|
|
16046
|
-
const e = new
|
|
16046
|
+
const e = new Mn(this._components, i);
|
|
16047
16047
|
return e.viewpoint = t, e.topic = this, this.comments.set(e.guid, e), e;
|
|
16048
16048
|
}
|
|
16049
16049
|
createLabelTags(i = this._managerVersion) {
|
|
@@ -16161,11 +16161,10 @@ ${t}
|
|
|
16161
16161
|
C(Ie, "default", {
|
|
16162
16162
|
title: "BCF Topic",
|
|
16163
16163
|
type: "Issue",
|
|
16164
|
-
status: "Active"
|
|
16165
|
-
labels: /* @__PURE__ */ new Set()
|
|
16164
|
+
status: "Active"
|
|
16166
16165
|
});
|
|
16167
16166
|
let Rs = Ie;
|
|
16168
|
-
const
|
|
16167
|
+
const Jl = (c, i) => {
|
|
16169
16168
|
if (i.trim() === "")
|
|
16170
16169
|
return;
|
|
16171
16170
|
const t = Mt.xmlParser.parse(i).Extensions;
|
|
@@ -16193,7 +16192,7 @@ const Ql = (c, i) => {
|
|
|
16193
16192
|
c.config.users.add(a);
|
|
16194
16193
|
}
|
|
16195
16194
|
};
|
|
16196
|
-
class
|
|
16195
|
+
class th extends Ge {
|
|
16197
16196
|
constructor() {
|
|
16198
16197
|
super(...arguments);
|
|
16199
16198
|
C(this, "_config", {
|
|
@@ -16344,7 +16343,7 @@ class Kl extends Ge {
|
|
|
16344
16343
|
this._config.ignoreIncompleteTopicsOnImport.value = t;
|
|
16345
16344
|
}
|
|
16346
16345
|
}
|
|
16347
|
-
const Le = class Le extends
|
|
16346
|
+
const Le = class Le extends Rt {
|
|
16348
16347
|
constructor() {
|
|
16349
16348
|
super(...arguments);
|
|
16350
16349
|
C(this, "enabled", !1);
|
|
@@ -16372,7 +16371,7 @@ const Le = class Le extends At {
|
|
|
16372
16371
|
fallbackVersionOnImport: "2.1",
|
|
16373
16372
|
ignoreIncompleteTopicsOnImport: !1
|
|
16374
16373
|
});
|
|
16375
|
-
C(this, "config", new
|
|
16374
|
+
C(this, "config", new th(
|
|
16376
16375
|
this,
|
|
16377
16376
|
this.components,
|
|
16378
16377
|
"BCF Topics",
|
|
@@ -16399,7 +16398,7 @@ const Le = class Le extends At {
|
|
|
16399
16398
|
*/
|
|
16400
16399
|
create(t) {
|
|
16401
16400
|
const e = new Rs(this.components);
|
|
16402
|
-
return t
|
|
16401
|
+
return t ? (e.guid = t.guid ?? e.guid, e.set(t)) : this.list.set(e.guid, e), e;
|
|
16403
16402
|
}
|
|
16404
16403
|
/**
|
|
16405
16404
|
* Disposes of the BCFTopics component and triggers the onDisposed event.
|
|
@@ -16506,7 +16505,7 @@ const Le = class Le extends At {
|
|
|
16506
16505
|
* @returns A promise that resolves to a Blob containing the exported BCF zip file.
|
|
16507
16506
|
*/
|
|
16508
16507
|
async export(t = this.list.values()) {
|
|
16509
|
-
const e = new
|
|
16508
|
+
const e = new xr();
|
|
16510
16509
|
e.file(
|
|
16511
16510
|
"bcf.version",
|
|
16512
16511
|
`<?xml version="1.0" encoding="UTF-8"?>
|
|
@@ -16569,9 +16568,9 @@ ${o}
|
|
|
16569
16568
|
Comment: r,
|
|
16570
16569
|
Viewpoint: o
|
|
16571
16570
|
} = t;
|
|
16572
|
-
if (!(e && s && n && (
|
|
16571
|
+
if (!(e && s && n && (Mn || o)))
|
|
16573
16572
|
return null;
|
|
16574
|
-
const a = this.components.get(ie), l = new
|
|
16573
|
+
const a = this.components.get(ie), l = new Mn(this.components, r ?? "");
|
|
16575
16574
|
return l.guid = e, l.date = new Date(s), l.author = n, l.viewpoint = o != null && o.Guid ? a.list.get(o.Guid) : void 0, l.modifiedAuthor = t.ModifiedAuthor, l.modifiedDate = t.ModifiedDate ? new Date(t.ModifiedDate) : void 0, l;
|
|
16576
16575
|
}
|
|
16577
16576
|
getMarkupComments(t, e) {
|
|
@@ -16614,7 +16613,7 @@ ${o}
|
|
|
16614
16613
|
fallbackVersionOnImport: s,
|
|
16615
16614
|
ignoreIncompleteTopicsOnImport: n,
|
|
16616
16615
|
updateExtensionsOnImport: r
|
|
16617
|
-
} = this.config, o = new
|
|
16616
|
+
} = this.config, o = new xr();
|
|
16618
16617
|
await o.loadAsync(t);
|
|
16619
16618
|
const a = Object.values(o.files);
|
|
16620
16619
|
let l = s;
|
|
@@ -16630,7 +16629,7 @@ ${o}
|
|
|
16630
16629
|
);
|
|
16631
16630
|
if (r && f) {
|
|
16632
16631
|
const S = await f.async("string");
|
|
16633
|
-
|
|
16632
|
+
Jl(this, S);
|
|
16634
16633
|
}
|
|
16635
16634
|
const I = [], u = this.components.get(ie), d = a.filter((S) => S.name.endsWith(".bcfv"));
|
|
16636
16635
|
for (const S of d) {
|
|
@@ -16682,7 +16681,7 @@ ${o}
|
|
|
16682
16681
|
fov: M.FieldOfView
|
|
16683
16682
|
});
|
|
16684
16683
|
}
|
|
16685
|
-
const N = new
|
|
16684
|
+
const N = new go(this.components, e, {
|
|
16686
16685
|
data: O,
|
|
16687
16686
|
setCamera: !1
|
|
16688
16687
|
});
|
|
@@ -16697,7 +16696,7 @@ ${o}
|
|
|
16697
16696
|
}
|
|
16698
16697
|
}
|
|
16699
16698
|
if (I.push(N), w) {
|
|
16700
|
-
const M = this.components.get(
|
|
16699
|
+
const M = this.components.get(Nn), g = Array.isArray(w.ClippingPlane) ? w.ClippingPlane : [w.ClippingPlane];
|
|
16701
16700
|
for (const v of g) {
|
|
16702
16701
|
const { Location: q, Direction: G } = v;
|
|
16703
16702
|
if (!(q && G))
|
|
@@ -16761,7 +16760,7 @@ ${o}
|
|
|
16761
16760
|
return this.onBCFImported.trigger(T), { viewpoints: I, topics: T };
|
|
16762
16761
|
}
|
|
16763
16762
|
};
|
|
16764
|
-
C(Le, "uuid", "de977976-e4f6-4e4f-a01a-204727839802"), C(Le, "xmlParser", new
|
|
16763
|
+
C(Le, "uuid", "de977976-e4f6-4e4f-a01a-204727839802"), C(Le, "xmlParser", new Ro.XMLParser({
|
|
16765
16764
|
allowBooleanAttributes: !0,
|
|
16766
16765
|
attributeNamePrefix: "",
|
|
16767
16766
|
ignoreAttributes: !1,
|
|
@@ -16775,7 +16774,7 @@ C(Le, "uuid", "de977976-e4f6-4e4f-a01a-204727839802"), C(Le, "xmlParser", new To
|
|
|
16775
16774
|
trimValues: !0
|
|
16776
16775
|
}));
|
|
16777
16776
|
let Mt = Le;
|
|
16778
|
-
const ee = class ee extends
|
|
16777
|
+
const ee = class ee extends Rt {
|
|
16779
16778
|
constructor(t) {
|
|
16780
16779
|
super(t);
|
|
16781
16780
|
/** {@link Component.enabled} */
|
|
@@ -17051,8 +17050,69 @@ const ee = class ee extends At {
|
|
|
17051
17050
|
}
|
|
17052
17051
|
};
|
|
17053
17052
|
C(ee, "uuid", "d1444724-dba6-4cdd-a0c7-68ee1450d166");
|
|
17054
|
-
let
|
|
17055
|
-
const _s = class _s {
|
|
17053
|
+
let Dn = ee;
|
|
17054
|
+
const _s = class _s extends Rt {
|
|
17055
|
+
constructor(t) {
|
|
17056
|
+
super(t);
|
|
17057
|
+
/** {@link Component.enabled} */
|
|
17058
|
+
C(this, "enabled", !0);
|
|
17059
|
+
t.add(_s.uuid, this);
|
|
17060
|
+
}
|
|
17061
|
+
async getIsolatedElements(t, e, s) {
|
|
17062
|
+
const n = /* @__PURE__ */ new Set();
|
|
17063
|
+
function r(l) {
|
|
17064
|
+
if (n.has(l))
|
|
17065
|
+
return;
|
|
17066
|
+
const h = t.GetLine(e, l);
|
|
17067
|
+
if (h) {
|
|
17068
|
+
n.add(l);
|
|
17069
|
+
for (const f in h) {
|
|
17070
|
+
const I = h[f];
|
|
17071
|
+
I && I.constructor.name === "Handle" && I.value > 0 ? r(I.value) : Array.isArray(I) && I.forEach((u) => {
|
|
17072
|
+
u && u.constructor.name === "Handle" && u.value > 0 && r(u.value);
|
|
17073
|
+
});
|
|
17074
|
+
}
|
|
17075
|
+
}
|
|
17076
|
+
}
|
|
17077
|
+
for (const l of s)
|
|
17078
|
+
r(l);
|
|
17079
|
+
const o = [];
|
|
17080
|
+
for (const l of n)
|
|
17081
|
+
o.push(l);
|
|
17082
|
+
o.sort((l, h) => l - h);
|
|
17083
|
+
const a = [];
|
|
17084
|
+
return o.forEach((l) => {
|
|
17085
|
+
const h = t.GetLine(e, l);
|
|
17086
|
+
a.push(h);
|
|
17087
|
+
}), a;
|
|
17088
|
+
}
|
|
17089
|
+
/**
|
|
17090
|
+
* Exports isolated elements to the new model.
|
|
17091
|
+
* @param webIfc The instance of [web-ifc](https://github.com/ThatOpen/engine_web-ifc) to use.
|
|
17092
|
+
* @param modelID ID of the new IFC model.
|
|
17093
|
+
* @param isolatedElements The array of isolated elements
|
|
17094
|
+
*/
|
|
17095
|
+
async export(t, e, s) {
|
|
17096
|
+
return s.forEach((r) => {
|
|
17097
|
+
t.WriteLine(e, r);
|
|
17098
|
+
}), t.SaveModel(e);
|
|
17099
|
+
}
|
|
17100
|
+
async splitIfc(t, e, s) {
|
|
17101
|
+
const n = new Uint8Array(e), r = t.OpenModel(n), o = await this.getIsolatedElements(
|
|
17102
|
+
t,
|
|
17103
|
+
r,
|
|
17104
|
+
s
|
|
17105
|
+
), a = t.CreateModel({ schema: k.Schemas.IFC2X3 });
|
|
17106
|
+
return await this.export(t, a, o);
|
|
17107
|
+
}
|
|
17108
|
+
};
|
|
17109
|
+
/**
|
|
17110
|
+
* A unique identifier for the component.
|
|
17111
|
+
* This UUID is used to register the component within the Components system.
|
|
17112
|
+
*/
|
|
17113
|
+
C(_s, "uuid", "6eb0ba2f-71c0-464e-bcec-2d7c335186b2");
|
|
17114
|
+
let kr = _s;
|
|
17115
|
+
const ws = class ws {
|
|
17056
17116
|
constructor(i) {
|
|
17057
17117
|
/**
|
|
17058
17118
|
* Event used to notify the progress when performing a query on an IFC file.
|
|
@@ -17084,7 +17144,7 @@ const _s = class _s {
|
|
|
17084
17144
|
* @param data the data of the query to import as a serializable object.
|
|
17085
17145
|
*/
|
|
17086
17146
|
static import(i, t) {
|
|
17087
|
-
const e =
|
|
17147
|
+
const e = ws.importers.get(t.type);
|
|
17088
17148
|
return e ? e(i, t) : (console.warn("Invalid query data:.", t), null);
|
|
17089
17149
|
}
|
|
17090
17150
|
/**
|
|
@@ -17276,7 +17336,7 @@ const _s = class _s {
|
|
|
17276
17336
|
return n;
|
|
17277
17337
|
}
|
|
17278
17338
|
getCategoryFromLine(i) {
|
|
17279
|
-
const t = i.indexOf("=") + 1, e = i.indexOf("("), s = i.slice(t, e).trim(), n =
|
|
17339
|
+
const t = i.indexOf("=") + 1, e = i.indexOf("("), s = i.slice(t, e).trim(), n = Dc[s];
|
|
17280
17340
|
return n || null;
|
|
17281
17341
|
}
|
|
17282
17342
|
getAttributesFromLine(i) {
|
|
@@ -17290,9 +17350,9 @@ const _s = class _s {
|
|
|
17290
17350
|
/**
|
|
17291
17351
|
* The list of functions to import the queries. If you create your own custom query, you should add its importer here. See the other queries provided by the library for reference.
|
|
17292
17352
|
*/
|
|
17293
|
-
C(
|
|
17294
|
-
let se =
|
|
17295
|
-
class
|
|
17353
|
+
C(ws, "importers", /* @__PURE__ */ new Map());
|
|
17354
|
+
let se = ws;
|
|
17355
|
+
class Hr {
|
|
17296
17356
|
constructor(i) {
|
|
17297
17357
|
/**
|
|
17298
17358
|
* The list of queries contained in this group.
|
|
@@ -17381,7 +17441,7 @@ class zr {
|
|
|
17381
17441
|
}
|
|
17382
17442
|
}
|
|
17383
17443
|
}
|
|
17384
|
-
const
|
|
17444
|
+
const Ms = class Ms extends se {
|
|
17385
17445
|
constructor(t, e) {
|
|
17386
17446
|
super(t);
|
|
17387
17447
|
/**
|
|
@@ -17411,7 +17471,7 @@ const ws = class ws extends se {
|
|
|
17411
17471
|
*/
|
|
17412
17472
|
export() {
|
|
17413
17473
|
const t = this.getData();
|
|
17414
|
-
return t.type =
|
|
17474
|
+
return t.type = Ms.type, t;
|
|
17415
17475
|
}
|
|
17416
17476
|
/**
|
|
17417
17477
|
* {@link IfcFinderQuery.update}
|
|
@@ -17430,8 +17490,8 @@ const ws = class ws extends se {
|
|
|
17430
17490
|
/**
|
|
17431
17491
|
* The type of this query.
|
|
17432
17492
|
*/
|
|
17433
|
-
C(
|
|
17434
|
-
let gs =
|
|
17493
|
+
C(Ms, "type", "IfcBasicQuery");
|
|
17494
|
+
let gs = Ms;
|
|
17435
17495
|
se.importers.set(
|
|
17436
17496
|
gs.type,
|
|
17437
17497
|
(c, i) => {
|
|
@@ -17443,7 +17503,7 @@ se.importers.set(
|
|
|
17443
17503
|
return t.ids = se.importIds(i), t;
|
|
17444
17504
|
}
|
|
17445
17505
|
);
|
|
17446
|
-
const
|
|
17506
|
+
const Ds = class Ds extends se {
|
|
17447
17507
|
constructor(t, e) {
|
|
17448
17508
|
super(t);
|
|
17449
17509
|
/**
|
|
@@ -17484,7 +17544,7 @@ const Ms = class Ms extends se {
|
|
|
17484
17544
|
*/
|
|
17485
17545
|
export() {
|
|
17486
17546
|
const t = this.getData();
|
|
17487
|
-
return t.type =
|
|
17547
|
+
return t.type = Ds.type, t;
|
|
17488
17548
|
}
|
|
17489
17549
|
/**
|
|
17490
17550
|
* {@link IfcFinderQuery.update}
|
|
@@ -17527,8 +17587,8 @@ const Ms = class Ms extends se {
|
|
|
17527
17587
|
/**
|
|
17528
17588
|
* The type of this query.
|
|
17529
17589
|
*/
|
|
17530
|
-
C(
|
|
17531
|
-
let As =
|
|
17590
|
+
C(Ds, "type", "IfcPropertyQuery");
|
|
17591
|
+
let As = Ds;
|
|
17532
17592
|
se.importers.set(
|
|
17533
17593
|
As.type,
|
|
17534
17594
|
(c, i) => {
|
|
@@ -17540,7 +17600,7 @@ se.importers.set(
|
|
|
17540
17600
|
return t.ids = se.importIds(i), t;
|
|
17541
17601
|
}
|
|
17542
17602
|
);
|
|
17543
|
-
const
|
|
17603
|
+
const bs = class bs extends Rt {
|
|
17544
17604
|
constructor(t) {
|
|
17545
17605
|
super(t);
|
|
17546
17606
|
/** {@link Component.enabled} */
|
|
@@ -17549,7 +17609,7 @@ const Ds = class Ds extends At {
|
|
|
17549
17609
|
* List of all created {@link IfcQueryGroup} instances.
|
|
17550
17610
|
*/
|
|
17551
17611
|
C(this, "list", /* @__PURE__ */ new Map());
|
|
17552
|
-
t.add(
|
|
17612
|
+
t.add(bs.uuid, this);
|
|
17553
17613
|
}
|
|
17554
17614
|
/**
|
|
17555
17615
|
* List of all queries from all created {@link IfcQueryGroup} instances.
|
|
@@ -17567,7 +17627,7 @@ const Ds = class Ds extends At {
|
|
|
17567
17627
|
*/
|
|
17568
17628
|
import(t) {
|
|
17569
17629
|
for (const e in t) {
|
|
17570
|
-
const s = new
|
|
17630
|
+
const s = new Hr(this.components);
|
|
17571
17631
|
s.import(t[e]), this.list.set(e, s);
|
|
17572
17632
|
}
|
|
17573
17633
|
}
|
|
@@ -17584,7 +17644,7 @@ const Ds = class Ds extends At {
|
|
|
17584
17644
|
* Creates a new {@link IfcQueryGroup}.
|
|
17585
17645
|
*/
|
|
17586
17646
|
create() {
|
|
17587
|
-
const t = new
|
|
17647
|
+
const t = new Hr(this.components);
|
|
17588
17648
|
return this.list.set(t.id, t), t;
|
|
17589
17649
|
}
|
|
17590
17650
|
/**
|
|
@@ -17604,9 +17664,9 @@ const Ds = class Ds extends At {
|
|
|
17604
17664
|
* A unique identifier for the component.
|
|
17605
17665
|
* This UUID is used to register the component within the Components system.
|
|
17606
17666
|
*/
|
|
17607
|
-
C(
|
|
17608
|
-
let
|
|
17609
|
-
const
|
|
17667
|
+
C(bs, "uuid", "0da7ad77-f734-42ca-942f-a074adfd1e3a");
|
|
17668
|
+
let Wr = bs;
|
|
17669
|
+
const vs = class vs extends Rt {
|
|
17610
17670
|
constructor(t) {
|
|
17611
17671
|
super(t);
|
|
17612
17672
|
/** {@link Component.enabled} */
|
|
@@ -17633,7 +17693,7 @@ const bs = class bs extends At {
|
|
|
17633
17693
|
}
|
|
17634
17694
|
}
|
|
17635
17695
|
});
|
|
17636
|
-
t.add(
|
|
17696
|
+
t.add(vs.uuid, this), t.get(Tt).onFragmentsDisposed.add(this.onFragmentsDisposed);
|
|
17637
17697
|
}
|
|
17638
17698
|
/** {@link Disposable.dispose} */
|
|
17639
17699
|
dispose() {
|
|
@@ -17961,9 +18021,9 @@ const bs = class bs extends At {
|
|
|
17961
18021
|
* A unique identifier for the component.
|
|
17962
18022
|
* This UUID is used to register the component within the Components system.
|
|
17963
18023
|
*/
|
|
17964
|
-
C(
|
|
17965
|
-
let Bi =
|
|
17966
|
-
const
|
|
18024
|
+
C(vs, "uuid", "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");
|
|
18025
|
+
let Bi = vs;
|
|
18026
|
+
const Us = class Us extends Rt {
|
|
17967
18027
|
constructor(t) {
|
|
17968
18028
|
super(t);
|
|
17969
18029
|
/** {@link Disposable.onDisposed} */
|
|
@@ -17987,7 +18047,7 @@ const vs = class vs extends At {
|
|
|
17987
18047
|
* This set is used to keep track of which items have been exploded.
|
|
17988
18048
|
*/
|
|
17989
18049
|
C(this, "list", /* @__PURE__ */ new Set());
|
|
17990
|
-
t.add(
|
|
18050
|
+
t.add(Us.uuid, this);
|
|
17991
18051
|
}
|
|
17992
18052
|
/** {@link Disposable.dispose} */
|
|
17993
18053
|
dispose() {
|
|
@@ -18031,14 +18091,14 @@ const vs = class vs extends At {
|
|
|
18031
18091
|
* A unique identifier for the component.
|
|
18032
18092
|
* This UUID is used to register the component within the Components system.
|
|
18033
18093
|
*/
|
|
18034
|
-
C(
|
|
18035
|
-
let
|
|
18036
|
-
const
|
|
18094
|
+
C(Us, "uuid", "d260618b-ce88-4c7d-826c-6debb91de3e2");
|
|
18095
|
+
let Xr = Us;
|
|
18096
|
+
const xs = class xs extends Rt {
|
|
18037
18097
|
constructor(t) {
|
|
18038
18098
|
super(t);
|
|
18039
18099
|
/** {@link Component.enabled} */
|
|
18040
18100
|
C(this, "enabled", !0);
|
|
18041
|
-
this.components.add(
|
|
18101
|
+
this.components.add(xs.uuid, this);
|
|
18042
18102
|
}
|
|
18043
18103
|
/**
|
|
18044
18104
|
* Sets the visibility of fragments within the 3D scene.
|
|
@@ -18076,7 +18136,7 @@ const Us = class Us extends At {
|
|
|
18076
18136
|
this.set(!1), this.set(!0, t);
|
|
18077
18137
|
}
|
|
18078
18138
|
updateCulledVisibility(t) {
|
|
18079
|
-
const e = this.components.get(
|
|
18139
|
+
const e = this.components.get(On);
|
|
18080
18140
|
for (const [s, n] of e.list) {
|
|
18081
18141
|
const r = n.colorMeshes.get(t.id);
|
|
18082
18142
|
r && (r.count = t.mesh.count);
|
|
@@ -18087,9 +18147,9 @@ const Us = class Us extends At {
|
|
|
18087
18147
|
* A unique identifier for the component.
|
|
18088
18148
|
* This UUID is used to register the component within the Components system.
|
|
18089
18149
|
*/
|
|
18090
|
-
C(
|
|
18091
|
-
let
|
|
18092
|
-
class
|
|
18150
|
+
C(xs, "uuid", "dd9ccf2d-8a21-4821-b7f6-2949add16a29");
|
|
18151
|
+
let bn = xs;
|
|
18152
|
+
class eh extends kn {
|
|
18093
18153
|
constructor() {
|
|
18094
18154
|
super(...arguments);
|
|
18095
18155
|
/**
|
|
@@ -18108,7 +18168,7 @@ class Jl extends zn {
|
|
|
18108
18168
|
C(this, "maxTriangles", null);
|
|
18109
18169
|
}
|
|
18110
18170
|
}
|
|
18111
|
-
const
|
|
18171
|
+
const Bs = class Bs extends Rt {
|
|
18112
18172
|
constructor(t) {
|
|
18113
18173
|
super(t);
|
|
18114
18174
|
/**
|
|
@@ -18136,7 +18196,7 @@ const xs = class xs extends At {
|
|
|
18136
18196
|
/**
|
|
18137
18197
|
* Settings for the IfcGeometryTiler.
|
|
18138
18198
|
*/
|
|
18139
|
-
C(this, "settings", new
|
|
18199
|
+
C(this, "settings", new eh());
|
|
18140
18200
|
/** {@link Component.enabled} */
|
|
18141
18201
|
C(this, "enabled", !0);
|
|
18142
18202
|
/**
|
|
@@ -18145,17 +18205,17 @@ const xs = class xs extends At {
|
|
|
18145
18205
|
C(this, "webIfc", new k.IfcAPI());
|
|
18146
18206
|
C(this, "_nextAvailableID", 0);
|
|
18147
18207
|
C(this, "_splittedGeometries", /* @__PURE__ */ new Map());
|
|
18148
|
-
C(this, "_spatialTree", new
|
|
18149
|
-
C(this, "_metaData", new
|
|
18208
|
+
C(this, "_spatialTree", new ao());
|
|
18209
|
+
C(this, "_metaData", new lo());
|
|
18150
18210
|
C(this, "_visitedGeometries", /* @__PURE__ */ new Map());
|
|
18151
18211
|
C(this, "_streamSerializer", new Qt.StreamSerializer());
|
|
18152
18212
|
C(this, "_geometries", /* @__PURE__ */ new Map());
|
|
18153
18213
|
C(this, "_geometryCount", 0);
|
|
18154
|
-
C(this, "_civil", new
|
|
18214
|
+
C(this, "_civil", new co());
|
|
18155
18215
|
C(this, "_groupSerializer", new Qt.Serializer());
|
|
18156
18216
|
C(this, "_assets", []);
|
|
18157
18217
|
C(this, "_meshesWithHoles", /* @__PURE__ */ new Set());
|
|
18158
|
-
this.components.add(
|
|
18218
|
+
this.components.add(Bs.uuid, this), this.settings.excludedCategories.add(k.IFCOPENINGELEMENT);
|
|
18159
18219
|
}
|
|
18160
18220
|
/** {@link Disposable.dispose} */
|
|
18161
18221
|
dispose() {
|
|
@@ -18245,7 +18305,7 @@ const xs = class xs extends At {
|
|
|
18245
18305
|
const { opaque: f, transparent: I } = r.geometryIDs;
|
|
18246
18306
|
for (const [E, { index: T, uuid: p }] of this._visitedGeometries)
|
|
18247
18307
|
r.keyFragments.set(T, p), (E > 1 ? f : I).set(E, T);
|
|
18248
|
-
|
|
18308
|
+
ho.get(r, this.webIfc);
|
|
18249
18309
|
const u = this.webIfc.GetCoordinationMatrix(0);
|
|
18250
18310
|
r.coordinationMatrix.fromArray(u), r.civilData = this._civil.read(this.webIfc);
|
|
18251
18311
|
const d = this._groupSerializer.export(r);
|
|
@@ -18327,7 +18387,7 @@ const xs = class xs extends At {
|
|
|
18327
18387
|
const v = r[g];
|
|
18328
18388
|
R.push(a[v * 3]), R.push(a[v * 3 + 1]), R.push(a[v * 3 + 2]), S.push(l[v * 3]), S.push(l[v * 3 + 1]), S.push(l[v * 3 + 2]);
|
|
18329
18389
|
}
|
|
18330
|
-
const F = new Uint32Array(p), O = new Float32Array(R), y = new Float32Array(S), w =
|
|
18390
|
+
const F = new Uint32Array(p), O = new Float32Array(R), y = new Float32Array(S), w = Ka(O), L = new Float32Array(w.transformation.elements), b = !1, Y = I ? e : this._nextAvailableID++;
|
|
18331
18391
|
this._geometries.set(Y, {
|
|
18332
18392
|
position: O,
|
|
18333
18393
|
normal: y,
|
|
@@ -18365,9 +18425,9 @@ const xs = class xs extends At {
|
|
|
18365
18425
|
* A unique identifier for the component.
|
|
18366
18426
|
* This UUID is used to register the component within the Components system.
|
|
18367
18427
|
*/
|
|
18368
|
-
C(
|
|
18369
|
-
let
|
|
18370
|
-
class
|
|
18428
|
+
C(Bs, "uuid", "d9999a00-e1f5-4d3f-8cfe-c56e08609764");
|
|
18429
|
+
let $r = Bs;
|
|
18430
|
+
class ih extends kn {
|
|
18371
18431
|
constructor() {
|
|
18372
18432
|
super(...arguments);
|
|
18373
18433
|
/**
|
|
@@ -18377,7 +18437,7 @@ class th extends zn {
|
|
|
18377
18437
|
C(this, "propertiesSize", 100);
|
|
18378
18438
|
}
|
|
18379
18439
|
}
|
|
18380
|
-
class
|
|
18440
|
+
class sh extends Rt {
|
|
18381
18441
|
constructor() {
|
|
18382
18442
|
super(...arguments);
|
|
18383
18443
|
/**
|
|
@@ -18402,7 +18462,7 @@ class eh extends At {
|
|
|
18402
18462
|
/**
|
|
18403
18463
|
* An instance of the PropertiesStreamingSettings class, which holds the settings for the streaming process.
|
|
18404
18464
|
*/
|
|
18405
|
-
C(this, "settings", new
|
|
18465
|
+
C(this, "settings", new ih());
|
|
18406
18466
|
/**
|
|
18407
18467
|
* An instance of the IfcAPI class from the Web-IFC library, which provides methods for reading and processing IFC data.
|
|
18408
18468
|
*/
|
|
@@ -18450,7 +18510,7 @@ class eh extends At {
|
|
|
18450
18510
|
e.add(l);
|
|
18451
18511
|
let n = 0.01, r = 0;
|
|
18452
18512
|
for (const l of e) {
|
|
18453
|
-
if (r++,
|
|
18513
|
+
if (r++, uo.has(l))
|
|
18454
18514
|
continue;
|
|
18455
18515
|
const h = s.has(l), f = this.webIfc.GetLineIDsWithType(0, l), I = f.size();
|
|
18456
18516
|
let u = 0;
|
|
@@ -18495,8 +18555,8 @@ class eh extends At {
|
|
|
18495
18555
|
* A unique identifier for the component.
|
|
18496
18556
|
* This UUID is used to register the component within the Components system.
|
|
18497
18557
|
*/
|
|
18498
|
-
C(
|
|
18499
|
-
class
|
|
18558
|
+
C(sh, "uuid", "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");
|
|
18559
|
+
class go {
|
|
18500
18560
|
constructor(i, t, e) {
|
|
18501
18561
|
C(this, "title");
|
|
18502
18562
|
C(this, "guid", oe.create());
|
|
@@ -18701,46 +18761,46 @@ class mo {
|
|
|
18701
18761
|
*
|
|
18702
18762
|
* @returns A Promise that resolves when the camera has been set.
|
|
18703
18763
|
*/
|
|
18704
|
-
async go(i = !0) {
|
|
18705
|
-
const { camera:
|
|
18706
|
-
if (!
|
|
18764
|
+
async go(i, t = !0) {
|
|
18765
|
+
const { camera: e } = i ?? this.world;
|
|
18766
|
+
if (!e.hasCameraControls())
|
|
18707
18767
|
throw new Error(
|
|
18708
18768
|
"Viewpoint: the world's camera need controls to set the viewpoint."
|
|
18709
18769
|
);
|
|
18710
|
-
|
|
18711
|
-
const
|
|
18770
|
+
e instanceof wc && e.projection.set(this.projection);
|
|
18771
|
+
const s = new D.Vector3(
|
|
18712
18772
|
this.camera.position.x,
|
|
18713
18773
|
this.camera.position.y,
|
|
18714
18774
|
this.camera.position.z
|
|
18715
|
-
),
|
|
18775
|
+
), n = new D.Vector3(
|
|
18716
18776
|
this.camera.direction.x,
|
|
18717
18777
|
this.camera.direction.y,
|
|
18718
18778
|
this.camera.direction.z
|
|
18719
18779
|
);
|
|
18720
|
-
if (
|
|
18780
|
+
if (s.equals(new D.Vector3()) && n.equals(new D.Vector3()))
|
|
18721
18781
|
return;
|
|
18722
|
-
const
|
|
18723
|
-
let
|
|
18724
|
-
x:
|
|
18725
|
-
y:
|
|
18726
|
-
z:
|
|
18782
|
+
const r = this.position, o = this.direction;
|
|
18783
|
+
let a = {
|
|
18784
|
+
x: r.x + o.x * 80,
|
|
18785
|
+
y: r.y + o.y * 80,
|
|
18786
|
+
z: r.z + o.z * 80
|
|
18727
18787
|
};
|
|
18728
|
-
const
|
|
18729
|
-
if (Object.keys(
|
|
18730
|
-
const
|
|
18731
|
-
|
|
18788
|
+
const l = this.selection;
|
|
18789
|
+
if (Object.keys(l).length === 0) {
|
|
18790
|
+
const I = this._components.get(ci).get(this.world).castRayFromVector(r, this.direction);
|
|
18791
|
+
I && (a = I.point);
|
|
18732
18792
|
} else {
|
|
18733
|
-
const
|
|
18734
|
-
|
|
18735
|
-
}
|
|
18736
|
-
await
|
|
18737
|
-
|
|
18738
|
-
|
|
18739
|
-
|
|
18740
|
-
|
|
18741
|
-
|
|
18742
|
-
|
|
18743
|
-
|
|
18793
|
+
const h = this._components.get(Dn);
|
|
18794
|
+
h.reset(), h.addFragmentIdMap(l), a = h.getSphere().center, h.reset();
|
|
18795
|
+
}
|
|
18796
|
+
await e.controls.setLookAt(
|
|
18797
|
+
r.x,
|
|
18798
|
+
r.y,
|
|
18799
|
+
r.z,
|
|
18800
|
+
a.x,
|
|
18801
|
+
a.y,
|
|
18802
|
+
a.z,
|
|
18803
|
+
t
|
|
18744
18804
|
);
|
|
18745
18805
|
}
|
|
18746
18806
|
/**
|
|
@@ -18754,36 +18814,36 @@ class mo {
|
|
|
18754
18814
|
* @throws An error if the world's camera does not have camera controls.
|
|
18755
18815
|
* @throws An error if the world's renderer is not available.
|
|
18756
18816
|
*/
|
|
18757
|
-
updateCamera() {
|
|
18758
|
-
const { camera:
|
|
18759
|
-
if (!
|
|
18817
|
+
updateCamera(i) {
|
|
18818
|
+
const { camera: t, renderer: e } = i ?? this.world;
|
|
18819
|
+
if (!e)
|
|
18760
18820
|
throw new Error("Viewpoint: the world needs to have a renderer!");
|
|
18761
|
-
if (!
|
|
18821
|
+
if (!t.hasCameraControls())
|
|
18762
18822
|
throw new Error("Viewpoint: world's camera need camera controls!");
|
|
18763
|
-
const
|
|
18764
|
-
|
|
18765
|
-
const
|
|
18766
|
-
|
|
18767
|
-
), { width:
|
|
18768
|
-
let
|
|
18769
|
-
Number.isNaN(
|
|
18770
|
-
const
|
|
18771
|
-
|
|
18772
|
-
const
|
|
18773
|
-
aspectRatio:
|
|
18774
|
-
position: { x:
|
|
18775
|
-
direction: { x:
|
|
18823
|
+
const s = new D.Vector3();
|
|
18824
|
+
t.controls.getPosition(s);
|
|
18825
|
+
const n = t.three, r = new D.Vector3(0, 0, -1).applyEuler(
|
|
18826
|
+
n.rotation
|
|
18827
|
+
), { width: o, height: a } = e.getSize();
|
|
18828
|
+
let l = o / a;
|
|
18829
|
+
Number.isNaN(l) && (l = 1);
|
|
18830
|
+
const h = this._components.get(Tt);
|
|
18831
|
+
s.applyMatrix4(h.baseCoordinationMatrix.clone().invert());
|
|
18832
|
+
const f = {
|
|
18833
|
+
aspectRatio: l,
|
|
18834
|
+
position: { x: s.x, y: s.y, z: s.z },
|
|
18835
|
+
direction: { x: r.x, y: r.y, z: r.z }
|
|
18776
18836
|
};
|
|
18777
|
-
|
|
18778
|
-
...
|
|
18779
|
-
fov:
|
|
18780
|
-
} :
|
|
18781
|
-
...
|
|
18782
|
-
viewToWorldScale:
|
|
18837
|
+
n instanceof D.PerspectiveCamera ? this.camera = {
|
|
18838
|
+
...f,
|
|
18839
|
+
fov: n.fov
|
|
18840
|
+
} : n instanceof D.OrthographicCamera && (this.camera = {
|
|
18841
|
+
...f,
|
|
18842
|
+
viewToWorldScale: n.top - n.bottom
|
|
18783
18843
|
}), this._components.get(ie).list.set(this.guid, this);
|
|
18784
18844
|
}
|
|
18785
18845
|
applyVisibility() {
|
|
18786
|
-
const i = this._components.get(
|
|
18846
|
+
const i = this._components.get(bn);
|
|
18787
18847
|
i.set(this.defaultVisibility), i.set(!this.defaultVisibility, this.exception), i.set(!0, this.selection);
|
|
18788
18848
|
}
|
|
18789
18849
|
/**
|
|
@@ -18918,7 +18978,7 @@ ${i}
|
|
|
18918
18978
|
</VisualizationInfo>`;
|
|
18919
18979
|
}
|
|
18920
18980
|
}
|
|
18921
|
-
class
|
|
18981
|
+
class nh extends Ge {
|
|
18922
18982
|
constructor() {
|
|
18923
18983
|
super(...arguments);
|
|
18924
18984
|
C(this, "_config", {
|
|
@@ -18935,7 +18995,7 @@ class ih extends Ge {
|
|
|
18935
18995
|
this._config.overwriteColors.value = t;
|
|
18936
18996
|
}
|
|
18937
18997
|
}
|
|
18938
|
-
const Ui = class Ui extends
|
|
18998
|
+
const Ui = class Ui extends Rt {
|
|
18939
18999
|
constructor(t) {
|
|
18940
19000
|
super(t);
|
|
18941
19001
|
C(this, "enabled", !0);
|
|
@@ -18946,7 +19006,7 @@ const Ui = class Ui extends At {
|
|
|
18946
19006
|
C(this, "list", new re());
|
|
18947
19007
|
C(this, "isSetup", !1);
|
|
18948
19008
|
C(this, "onSetup", new j());
|
|
18949
|
-
C(this, "config", new
|
|
19009
|
+
C(this, "config", new nh(
|
|
18950
19010
|
this,
|
|
18951
19011
|
this.components,
|
|
18952
19012
|
"Viewpoints",
|
|
@@ -18965,7 +19025,7 @@ const Ui = class Ui extends At {
|
|
|
18965
19025
|
* @returns The newly created Viewpoint instance.
|
|
18966
19026
|
*/
|
|
18967
19027
|
create(t, e) {
|
|
18968
|
-
const s = new
|
|
19028
|
+
const s = new go(this.components, t, { data: e });
|
|
18969
19029
|
return e || this.list.set(s.guid, s), s;
|
|
18970
19030
|
}
|
|
18971
19031
|
setup() {
|
|
@@ -18983,7 +19043,7 @@ const Ui = class Ui extends At {
|
|
|
18983
19043
|
};
|
|
18984
19044
|
C(Ui, "uuid", "ee867824-a796-408d-8aa0-4e5962a83c66");
|
|
18985
19045
|
let ie = Ui;
|
|
18986
|
-
class
|
|
19046
|
+
class rh extends Ge {
|
|
18987
19047
|
constructor() {
|
|
18988
19048
|
super(...arguments);
|
|
18989
19049
|
C(this, "_config", {
|
|
@@ -19124,7 +19184,7 @@ class sh extends Ge {
|
|
|
19124
19184
|
this._config.backgroundColor.value = t, this._component.backgroundColor = t;
|
|
19125
19185
|
}
|
|
19126
19186
|
}
|
|
19127
|
-
class
|
|
19187
|
+
class oh {
|
|
19128
19188
|
constructor(i, t) {
|
|
19129
19189
|
/** {@link Disposable.onDisposed} */
|
|
19130
19190
|
C(this, "onDisposed", new j());
|
|
@@ -19205,7 +19265,7 @@ class nh {
|
|
|
19205
19265
|
e * s / 2,
|
|
19206
19266
|
e / 2,
|
|
19207
19267
|
e / -2
|
|
19208
|
-
), this.world.renderer.onClippingPlanesUpdated.add(this.updatePlanes), this._camera.position.set(0, 200, 0), this._camera.zoom = 0.1, this._camera.rotation.x = -Math.PI / 2, this._plane = new D.Plane(this.down, 200), this.updatePlanes(), this.config = new
|
|
19268
|
+
), this.world.renderer.onClippingPlanesUpdated.add(this.updatePlanes), this._camera.position.set(0, 200, 0), this._camera.zoom = 0.1, this._camera.rotation.x = -Math.PI / 2, this._plane = new D.Plane(this.down, 200), this.updatePlanes(), this.config = new rh(this, t, "MiniMap");
|
|
19209
19269
|
}
|
|
19210
19270
|
/**
|
|
19211
19271
|
* Gets or sets whether the minimap rotation is locked.
|
|
@@ -19285,7 +19345,7 @@ class nh {
|
|
|
19285
19345
|
this.config.visible = !0, this.config.lockRotation = t.lockRotation, this.config.zoom = t.zoom, this.config.frontOffset = t.frontOffset, this.config.sizeX = t.sizeX, this.config.sizeY = t.sizeY, this.config.backgroundColor = t.backgroundColor, this.isSetup = !0, this.onSetup.trigger();
|
|
19286
19346
|
}
|
|
19287
19347
|
}
|
|
19288
|
-
const
|
|
19348
|
+
const Vs = class Vs extends Rt {
|
|
19289
19349
|
constructor(t) {
|
|
19290
19350
|
super(t);
|
|
19291
19351
|
/** {@link Updateable.onAfterUpdate} */
|
|
@@ -19302,7 +19362,7 @@ const Bs = class Bs extends At {
|
|
|
19302
19362
|
* A collection of {@link MiniMap} instances, each associated with a unique world ID.
|
|
19303
19363
|
*/
|
|
19304
19364
|
C(this, "list", /* @__PURE__ */ new Map());
|
|
19305
|
-
this.components.add(
|
|
19365
|
+
this.components.add(Vs.uuid, this);
|
|
19306
19366
|
}
|
|
19307
19367
|
/**
|
|
19308
19368
|
* Creates a new {@link MiniMap} instance associated with the given world.
|
|
@@ -19315,7 +19375,7 @@ const Bs = class Bs extends At {
|
|
|
19315
19375
|
create(t) {
|
|
19316
19376
|
if (this.list.has(t.uuid))
|
|
19317
19377
|
throw new Error("This world already has a minimap!");
|
|
19318
|
-
const e = new
|
|
19378
|
+
const e = new oh(t, this.components);
|
|
19319
19379
|
return this.list.set(t.uuid, e), e;
|
|
19320
19380
|
}
|
|
19321
19381
|
/**
|
|
@@ -19345,14 +19405,14 @@ const Bs = class Bs extends At {
|
|
|
19345
19405
|
* A unique identifier for the component.
|
|
19346
19406
|
* This UUID is used to register the component within the Components system.
|
|
19347
19407
|
*/
|
|
19348
|
-
C(
|
|
19349
|
-
let
|
|
19350
|
-
const
|
|
19408
|
+
C(Vs, "uuid", "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f");
|
|
19409
|
+
let Zr = Vs;
|
|
19410
|
+
const Ys = class Ys extends Rt {
|
|
19351
19411
|
constructor(t) {
|
|
19352
19412
|
super(t);
|
|
19353
19413
|
/** {@link Component.enabled} */
|
|
19354
19414
|
C(this, "enabled", !0);
|
|
19355
|
-
t.add(
|
|
19415
|
+
t.add(Ys.uuid, this);
|
|
19356
19416
|
}
|
|
19357
19417
|
/**
|
|
19358
19418
|
* Utility method to calculate the distance from a point to a line segment.
|
|
@@ -19604,9 +19664,9 @@ const Vs = class Vs extends At {
|
|
|
19604
19664
|
* A unique identifier for the component.
|
|
19605
19665
|
* This UUID is used to register the component within the Components system.
|
|
19606
19666
|
*/
|
|
19607
|
-
C(
|
|
19608
|
-
let
|
|
19609
|
-
class
|
|
19667
|
+
C(Ys, "uuid", "267ca032-672f-4cb0-afa9-d24e904f39d6");
|
|
19668
|
+
let jr = Ys;
|
|
19669
|
+
class Hs {
|
|
19610
19670
|
constructor(i) {
|
|
19611
19671
|
// Used when the facet is a requirement
|
|
19612
19672
|
// On IDSEntity is always required
|
|
@@ -19666,7 +19726,7 @@ const Re = (c, i) => {
|
|
|
19666
19726
|
${t}
|
|
19667
19727
|
</ids:${c[0].toLowerCase() + c.slice(1)}>`) : t;
|
|
19668
19728
|
};
|
|
19669
|
-
class
|
|
19729
|
+
class ah extends Hs {
|
|
19670
19730
|
constructor(t, e) {
|
|
19671
19731
|
super(t);
|
|
19672
19732
|
C(this, "facetType", "Attribute");
|
|
@@ -19768,7 +19828,7 @@ class rh extends ks {
|
|
|
19768
19828
|
return this.testResult = [], e;
|
|
19769
19829
|
}
|
|
19770
19830
|
}
|
|
19771
|
-
class
|
|
19831
|
+
class ch extends Hs {
|
|
19772
19832
|
constructor(t, e) {
|
|
19773
19833
|
super(t);
|
|
19774
19834
|
C(this, "facetType", "Classification");
|
|
@@ -19968,7 +20028,7 @@ class oh extends ks {
|
|
|
19968
20028
|
) : !0;
|
|
19969
20029
|
}
|
|
19970
20030
|
}
|
|
19971
|
-
class
|
|
20031
|
+
class lh extends Hs {
|
|
19972
20032
|
constructor(t, e) {
|
|
19973
20033
|
super(t);
|
|
19974
20034
|
C(this, "facetType", "Entity");
|
|
@@ -20065,7 +20125,7 @@ class ah extends ks {
|
|
|
20065
20125
|
);
|
|
20066
20126
|
}
|
|
20067
20127
|
}
|
|
20068
|
-
class
|
|
20128
|
+
class hh extends Hs {
|
|
20069
20129
|
constructor(t, e, s) {
|
|
20070
20130
|
super(t);
|
|
20071
20131
|
C(this, "facetType", "Property");
|
|
@@ -20344,7 +20404,7 @@ class ch extends ks {
|
|
|
20344
20404
|
return !0;
|
|
20345
20405
|
}
|
|
20346
20406
|
}
|
|
20347
|
-
class
|
|
20407
|
+
class uh {
|
|
20348
20408
|
constructor(i, t, e) {
|
|
20349
20409
|
C(this, "name");
|
|
20350
20410
|
C(this, "ifcVersion", /* @__PURE__ */ new Set());
|
|
@@ -20367,7 +20427,7 @@ class lh {
|
|
|
20367
20427
|
const r = t[n];
|
|
20368
20428
|
n in this && (e[n] = r);
|
|
20369
20429
|
}
|
|
20370
|
-
return this.components.get(
|
|
20430
|
+
return this.components.get(vn).list.set(this.identifier, this), this;
|
|
20371
20431
|
}
|
|
20372
20432
|
/**
|
|
20373
20433
|
* Tests the model to test against the specification's requirements.
|
|
@@ -20420,51 +20480,51 @@ const ge = (c) => {
|
|
|
20420
20480
|
}
|
|
20421
20481
|
if (i.parameter !== void 0)
|
|
20422
20482
|
return i;
|
|
20423
|
-
},
|
|
20483
|
+
}, qr = (c, i) => {
|
|
20424
20484
|
const t = [];
|
|
20425
20485
|
for (const e of i) {
|
|
20426
20486
|
const s = e.name, n = ge(s);
|
|
20427
20487
|
if (!n)
|
|
20428
20488
|
continue;
|
|
20429
|
-
const r = new
|
|
20489
|
+
const r = new lh(c, n);
|
|
20430
20490
|
e.cardinality && (r.cardinality = e.cardinality), r.predefinedType = ge(e.predefinedType), r.instructions = e.instructions, t.push(r);
|
|
20431
20491
|
}
|
|
20432
20492
|
return t;
|
|
20433
|
-
},
|
|
20493
|
+
}, fh = (c, i) => {
|
|
20434
20494
|
const t = [];
|
|
20435
20495
|
for (const e of i) {
|
|
20436
20496
|
const s = e.name, n = ge(s);
|
|
20437
20497
|
if (!n)
|
|
20438
20498
|
continue;
|
|
20439
|
-
const r = new
|
|
20499
|
+
const r = new ah(c, n);
|
|
20440
20500
|
e.cardinality && (r.cardinality = e.cardinality), r.value = ge(e.value), r.instructions = e.instructions, t.push(r);
|
|
20441
20501
|
}
|
|
20442
20502
|
return t;
|
|
20443
|
-
},
|
|
20503
|
+
}, Ih = (c, i) => {
|
|
20444
20504
|
const t = [];
|
|
20445
20505
|
for (const e of i) {
|
|
20446
20506
|
const s = e.system, n = ge(s);
|
|
20447
20507
|
if (!n)
|
|
20448
20508
|
continue;
|
|
20449
|
-
const r = new
|
|
20509
|
+
const r = new ch(c, n);
|
|
20450
20510
|
e.cardinality && (r.cardinality = e.cardinality);
|
|
20451
20511
|
const o = ge(e.value);
|
|
20452
20512
|
(o == null ? void 0 : o.type) === "simple" && (o.parameter = String(o.parameter)), (o == null ? void 0 : o.type) === "enumeration" && Array.isArray(o.parameter) && (o.parameter = o.parameter.map(String)), r.value = o, r.uri = e.uri, r.instructions = e.instructions, t.push(r);
|
|
20453
20513
|
}
|
|
20454
20514
|
return t;
|
|
20455
|
-
},
|
|
20515
|
+
}, dh = (c, i) => {
|
|
20456
20516
|
const t = [];
|
|
20457
20517
|
for (const e of i) {
|
|
20458
20518
|
const s = e.propertySet, n = e.baseName, r = ge(s), o = ge(n);
|
|
20459
20519
|
if (!(o && r))
|
|
20460
20520
|
continue;
|
|
20461
|
-
const a = new
|
|
20521
|
+
const a = new hh(c, r, o);
|
|
20462
20522
|
e.cardinality && (a.cardinality = e.cardinality);
|
|
20463
20523
|
const l = ge(e.value);
|
|
20464
20524
|
(l == null ? void 0 : l.type) === "enumeration" && Array.isArray(l.parameter) && (l.parameter = l.parameter.map(String)), a.value = l, a.dataType = e.dataType, a.uri = e.uri, a.instructions = e.instructions, t.push(a);
|
|
20465
20525
|
}
|
|
20466
20526
|
return t;
|
|
20467
|
-
}, ri = class ri extends
|
|
20527
|
+
}, ri = class ri extends Rt {
|
|
20468
20528
|
constructor(t) {
|
|
20469
20529
|
super(t);
|
|
20470
20530
|
C(this, "enabled", !0);
|
|
@@ -20495,7 +20555,7 @@ const ge = (c) => {
|
|
|
20495
20555
|
* @returns The newly created IDSSpecification instance.
|
|
20496
20556
|
*/
|
|
20497
20557
|
create(t, e, s) {
|
|
20498
|
-
const n = new
|
|
20558
|
+
const n = new uh(
|
|
20499
20559
|
this.components,
|
|
20500
20560
|
t,
|
|
20501
20561
|
e
|
|
@@ -20526,7 +20586,7 @@ const ge = (c) => {
|
|
|
20526
20586
|
for (const O in F) {
|
|
20527
20587
|
const y = Array.isArray(F[O]) ? F[O] : [F[O]];
|
|
20528
20588
|
if (O === "entity") {
|
|
20529
|
-
const w =
|
|
20589
|
+
const w = qr(this.components, y);
|
|
20530
20590
|
u.push(...w);
|
|
20531
20591
|
}
|
|
20532
20592
|
}
|
|
@@ -20540,22 +20600,22 @@ const ge = (c) => {
|
|
|
20540
20600
|
for (const O in F) {
|
|
20541
20601
|
const y = Array.isArray(F[O]) ? F[O] : [F[O]];
|
|
20542
20602
|
if (O === "entity") {
|
|
20543
|
-
const w =
|
|
20603
|
+
const w = qr(this.components, y);
|
|
20544
20604
|
d.push(...w);
|
|
20545
20605
|
}
|
|
20546
20606
|
if (O === "attribute") {
|
|
20547
|
-
const w =
|
|
20607
|
+
const w = fh(this.components, y);
|
|
20548
20608
|
d.push(...w);
|
|
20549
20609
|
}
|
|
20550
20610
|
if (O === "classification") {
|
|
20551
|
-
const w =
|
|
20611
|
+
const w = Ih(
|
|
20552
20612
|
this.components,
|
|
20553
20613
|
y
|
|
20554
20614
|
);
|
|
20555
20615
|
d.push(...w);
|
|
20556
20616
|
}
|
|
20557
20617
|
if (O === "property") {
|
|
20558
|
-
const w =
|
|
20618
|
+
const w = dh(this.components, y);
|
|
20559
20619
|
d.push(...w);
|
|
20560
20620
|
}
|
|
20561
20621
|
}
|
|
@@ -20602,7 +20662,7 @@ const ge = (c) => {
|
|
|
20602
20662
|
</ids:ids>`;
|
|
20603
20663
|
}
|
|
20604
20664
|
};
|
|
20605
|
-
C(ri, "uuid", "9f0b9f78-9b2e-481a-b766-2fbfd01f342c"), C(ri, "xmlParser", new
|
|
20665
|
+
C(ri, "uuid", "9f0b9f78-9b2e-481a-b766-2fbfd01f342c"), C(ri, "xmlParser", new Ro.XMLParser({
|
|
20606
20666
|
allowBooleanAttributes: !0,
|
|
20607
20667
|
attributeNamePrefix: "",
|
|
20608
20668
|
ignoreAttributes: !1,
|
|
@@ -20615,95 +20675,96 @@ C(ri, "uuid", "9f0b9f78-9b2e-481a-b766-2fbfd01f342c"), C(ri, "xmlParser", new To
|
|
|
20615
20675
|
removeNSPrefix: !0,
|
|
20616
20676
|
trimValues: !0
|
|
20617
20677
|
}));
|
|
20618
|
-
let
|
|
20678
|
+
let vn = ri;
|
|
20619
20679
|
export {
|
|
20620
20680
|
_e as AsyncEvent,
|
|
20621
20681
|
Mt as BCFTopics,
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20625
|
-
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20682
|
+
th as BCFTopicsConfigManager,
|
|
20683
|
+
Yn as Base,
|
|
20684
|
+
Ga as BaseCamera,
|
|
20685
|
+
za as BaseRenderer,
|
|
20686
|
+
ka as BaseScene,
|
|
20687
|
+
Gn as BaseWorldItem,
|
|
20688
|
+
Dn as BoundingBoxer,
|
|
20629
20689
|
Bi as Classifier,
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20690
|
+
Nn as Clipper,
|
|
20691
|
+
Mn as Comment,
|
|
20692
|
+
Rt as Component,
|
|
20693
|
+
Th as ComponentWithUI,
|
|
20634
20694
|
Cs as Components,
|
|
20635
20695
|
Ye as ConfigManager,
|
|
20636
20696
|
Ge as Configurator,
|
|
20637
|
-
|
|
20638
|
-
|
|
20697
|
+
uc as CullerRenderer,
|
|
20698
|
+
On as Cullers,
|
|
20639
20699
|
re as DataMap,
|
|
20640
20700
|
we as DataSet,
|
|
20641
20701
|
De as Disposer,
|
|
20642
20702
|
j as Event,
|
|
20643
|
-
|
|
20644
|
-
|
|
20703
|
+
Xr as Exploder,
|
|
20704
|
+
yc as FirstPersonMode,
|
|
20645
20705
|
Tt as FragmentsManager,
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20706
|
+
uo as GeometryTypes,
|
|
20707
|
+
Lr as Grids,
|
|
20708
|
+
bn as Hider,
|
|
20709
|
+
ah as IDSAttribute,
|
|
20710
|
+
ch as IDSClassification,
|
|
20711
|
+
lh as IDSEntity,
|
|
20712
|
+
Hs as IDSFacet,
|
|
20713
|
+
hh as IDSProperty,
|
|
20714
|
+
uh as IDSSpecification,
|
|
20715
|
+
vn as IDSSpecifications,
|
|
20656
20716
|
gs as IfcBasicQuery,
|
|
20657
|
-
|
|
20717
|
+
Fh as IfcCategories,
|
|
20658
20718
|
ms as IfcCategoryMap,
|
|
20659
|
-
|
|
20660
|
-
|
|
20719
|
+
Mc as IfcElements,
|
|
20720
|
+
Wr as IfcFinder,
|
|
20661
20721
|
se as IfcFinderQuery,
|
|
20662
|
-
|
|
20663
|
-
|
|
20664
|
-
|
|
20665
|
-
yn as
|
|
20666
|
-
Ln as
|
|
20667
|
-
|
|
20722
|
+
kn as IfcFragmentSettings,
|
|
20723
|
+
$r as IfcGeometryTiler,
|
|
20724
|
+
kr as IfcIsolator,
|
|
20725
|
+
yn as IfcJsonExporter,
|
|
20726
|
+
Ln as IfcLoader,
|
|
20727
|
+
Pn as IfcPropertiesManager,
|
|
20728
|
+
sh as IfcPropertiesTiler,
|
|
20668
20729
|
oi as IfcPropertiesUtils,
|
|
20669
20730
|
As as IfcPropertyQuery,
|
|
20670
20731
|
Gt as IfcRelationsIndexer,
|
|
20671
|
-
|
|
20672
|
-
|
|
20673
|
-
|
|
20674
|
-
|
|
20675
|
-
|
|
20676
|
-
|
|
20677
|
-
|
|
20678
|
-
|
|
20679
|
-
|
|
20680
|
-
|
|
20681
|
-
|
|
20682
|
-
|
|
20683
|
-
|
|
20732
|
+
eh as IfcStreamingSettings,
|
|
20733
|
+
mr as MaterialsUtils,
|
|
20734
|
+
jr as MeasurementUtils,
|
|
20735
|
+
fc as MeshCullerRenderer,
|
|
20736
|
+
oh as MiniMap,
|
|
20737
|
+
rh as MiniMapConfigManager,
|
|
20738
|
+
Zr as MiniMaps,
|
|
20739
|
+
dc as Mouse,
|
|
20740
|
+
Lc as OrbitMode,
|
|
20741
|
+
wc as OrthoPerspectiveCamera,
|
|
20742
|
+
Pc as PlanMode,
|
|
20743
|
+
_c as ProjectionManager,
|
|
20744
|
+
ih as PropertiesStreamingSettings,
|
|
20684
20745
|
ci as Raycasters,
|
|
20685
|
-
|
|
20746
|
+
Ah as ShadowedScene,
|
|
20686
20747
|
xi as SimpleCamera,
|
|
20687
|
-
|
|
20688
|
-
|
|
20689
|
-
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
|
|
20748
|
+
Cc as SimpleGrid,
|
|
20749
|
+
pc as SimpleGridConfigManager,
|
|
20750
|
+
zn as SimplePlane,
|
|
20751
|
+
Ec as SimpleRaycaster,
|
|
20752
|
+
gh as SimpleRenderer,
|
|
20753
|
+
sc as SimpleScene,
|
|
20754
|
+
ic as SimpleSceneConfigManager,
|
|
20755
|
+
Ja as SimpleWorld,
|
|
20695
20756
|
Rs as Topic,
|
|
20696
20757
|
oe as UUID,
|
|
20697
|
-
|
|
20698
|
-
|
|
20758
|
+
Rh as VertexPicker,
|
|
20759
|
+
go as Viewpoint,
|
|
20699
20760
|
ie as Viewpoints,
|
|
20700
20761
|
Ts as Worlds,
|
|
20701
|
-
|
|
20702
|
-
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20706
|
-
|
|
20707
|
-
|
|
20708
|
-
|
|
20762
|
+
Jl as extensionsImporter,
|
|
20763
|
+
Dc as ifcCategoryCase,
|
|
20764
|
+
vc as ifcRelAttrsPosition,
|
|
20765
|
+
Uc as ifcRelClassNames,
|
|
20766
|
+
mh as isPointInFrontOfPlane,
|
|
20767
|
+
Ka as obbFromPoints,
|
|
20768
|
+
oo as readPixelsAsync,
|
|
20769
|
+
Ur as relToAttributesMap
|
|
20709
20770
|
};
|