@thatopen/components 2.1.13 → 2.1.15
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/Cullers/index.d.ts +9 -0
- package/dist/core/Cullers/src/mesh-culler-renderer.d.ts +8 -0
- package/dist/core/Types/src/data-map.d.ts +18 -0
- package/dist/core/Types/src/data-set.d.ts +11 -0
- package/dist/core/Types/src/index.d.ts +2 -0
- package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +5 -1
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +467 -376
- package/dist/namespace.d.ts +2217 -2167
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2,10 +2,10 @@ var kn = Object.defineProperty;
|
|
|
2
2
|
var Xn = (l, s, t) => s in l ? kn(l, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[s] = t;
|
|
3
3
|
var I = (l, s, t) => (Xn(l, typeof s != "symbol" ? s + "" : s, t), t);
|
|
4
4
|
import * as O from "three";
|
|
5
|
-
import { BufferAttribute as Pn, Vector3 as M, Vector2 as fe, Plane as Fi, Line3 as
|
|
5
|
+
import { BufferAttribute as Pn, Vector3 as M, Vector2 as fe, Plane as Fi, Line3 as Lt, Triangle as ue, Sphere as Zn, Matrix4 as yt, Box3 as gt, BackSide as Qn, DoubleSide as Ln, FrontSide as wi, Mesh as v, Ray as jn, Raycaster as qn, Quaternion as Pt, Object3D as ri, Euler as Kn, MeshBasicMaterial as yn, LineBasicMaterial as $n, CylinderGeometry as ct, BoxGeometry as rt, BufferGeometry as Di, Float32BufferAttribute as Ui, OctahedronGeometry as Ze, Line as Dt, SphereGeometry as Jn, TorusGeometry as Re, PlaneGeometry as to } from "three";
|
|
6
6
|
import * as Vt from "@thatopen/fragments";
|
|
7
7
|
import { Serializer as eo } from "@thatopen/fragments";
|
|
8
|
-
import * as
|
|
8
|
+
import * as U from "web-ifc";
|
|
9
9
|
const Mn = 0, so = 1, io = 2, xi = 2, Ys = 1.25, bi = 1, Cs = 6 * 4 + 4 + 4, Us = 65535, no = Math.pow(2, -24), Vs = Symbol("SKIP_GENERATION");
|
|
10
10
|
function oo(l) {
|
|
11
11
|
return l.index ? l.index.count : l.attributes.position.count;
|
|
@@ -97,10 +97,10 @@ function Gs(l, s, t, e, i = null) {
|
|
|
97
97
|
for (let A = s * 6, F = (s + t) * 6; A < F; A += 6) {
|
|
98
98
|
const p = l[A + 0], m = l[A + 1], g = p - m, S = p + m;
|
|
99
99
|
g < o && (o = g), S > a && (a = S), C && p < d && (d = p), C && p > f && (f = p);
|
|
100
|
-
const _ = l[A + 2], N = l[A + 3],
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
b < r && (r = b), B > h && (h = B), C &&
|
|
100
|
+
const _ = l[A + 2], N = l[A + 3], L = _ - N, D = _ + N;
|
|
101
|
+
L < n && (n = L), D > c && (c = D), C && _ < E && (E = _), C && _ > T && (T = _);
|
|
102
|
+
const y = l[A + 4], x = l[A + 5], b = y - x, B = y + x;
|
|
103
|
+
b < r && (r = b), B > h && (h = B), C && y < u && (u = y), C && y > R && (R = y);
|
|
104
104
|
}
|
|
105
105
|
e[0] = o, e[1] = n, e[2] = r, e[3] = a, e[4] = c, e[5] = h, C && (i[0] = d, i[1] = E, i[2] = u, i[3] = f, i[4] = T, i[5] = R);
|
|
106
106
|
}
|
|
@@ -190,12 +190,12 @@ function Io(l, s, t, e, i, o) {
|
|
|
190
190
|
}
|
|
191
191
|
for (let p = 0; p < F; p++) {
|
|
192
192
|
const m = C[p], g = m.count, S = i - m.count, _ = m.leftCacheBounds, N = m.rightCacheBounds;
|
|
193
|
-
let
|
|
194
|
-
g !== 0 && (
|
|
195
|
-
let
|
|
196
|
-
S !== 0 && (
|
|
197
|
-
const
|
|
198
|
-
|
|
193
|
+
let L = 0;
|
|
194
|
+
g !== 0 && (L = Ae(_) / a);
|
|
195
|
+
let D = 0;
|
|
196
|
+
S !== 0 && (D = Ae(N) / a);
|
|
197
|
+
const y = bi + Ys * (L * g + D * S);
|
|
198
|
+
y < c && (n = E, c = y, r = m.candidate);
|
|
199
199
|
}
|
|
200
200
|
} else {
|
|
201
201
|
for (let F = 0; F < Mt; F++) {
|
|
@@ -221,12 +221,12 @@ function Io(l, s, t, e, i, o) {
|
|
|
221
221
|
for (let F = 0; F < Mt - 1; F++) {
|
|
222
222
|
const p = Ut[F], m = p.count, g = p.bounds, _ = Ut[F + 1].rightCacheBounds;
|
|
223
223
|
m !== 0 && (A === 0 ? Bi(g, je) : Yi(g, je, je)), A += m;
|
|
224
|
-
let N = 0,
|
|
224
|
+
let N = 0, L = 0;
|
|
225
225
|
A !== 0 && (N = Ae(je) / a);
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
const
|
|
229
|
-
|
|
226
|
+
const D = i - A;
|
|
227
|
+
D !== 0 && (L = Ae(_) / a);
|
|
228
|
+
const y = bi + Ys * (N * A + L * D);
|
|
229
|
+
y < c && (n = E, c = y, r = p.candidate);
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
}
|
|
@@ -314,14 +314,14 @@ function mo(l, s) {
|
|
|
314
314
|
const N = Io(p.boundingData, S, f, m, g, r);
|
|
315
315
|
if (N.axis === -1)
|
|
316
316
|
return A(m + g), p.offset = m, p.count = g, p;
|
|
317
|
-
const
|
|
318
|
-
if (
|
|
317
|
+
const L = T(h, e, f, m, g, N);
|
|
318
|
+
if (L === m || L === m + g)
|
|
319
319
|
A(m + g), p.offset = m, p.count = g;
|
|
320
320
|
else {
|
|
321
321
|
p.splitAxis = N.axis;
|
|
322
|
-
const
|
|
323
|
-
p.left =
|
|
324
|
-
const b = new qe(), B =
|
|
322
|
+
const D = new qe(), y = m, x = L - m;
|
|
323
|
+
p.left = D, D.boundingData = new Float32Array(6), Gs(f, y, x, D.boundingData, u), F(D, y, x, u, _ + 1);
|
|
324
|
+
const b = new qe(), B = L, H = g - x;
|
|
325
325
|
p.right = b, b.boundingData = new Float32Array(6), Gs(f, B, H, b.boundingData, u), F(b, B, H, u, _ + 1);
|
|
326
326
|
}
|
|
327
327
|
return p;
|
|
@@ -440,7 +440,7 @@ const Ao = function() {
|
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
442
|
}(), Fo = function() {
|
|
443
|
-
const l = new M(), s = new M(), t = new Fi(), e = new
|
|
443
|
+
const l = new M(), s = new M(), t = new Fi(), e = new Lt();
|
|
444
444
|
return function(o, n) {
|
|
445
445
|
const { radius: r, center: a } = o, { a: c, b: h, c: d } = n;
|
|
446
446
|
if (e.start = c, e.end = h, e.closestPointToPoint(a, !0, l).distanceTo(a) <= r || (e.start = c, e.end = d, e.closestPointToPoint(a, !0, l).distanceTo(a) <= r) || (e.start = h, e.end = d, e.closestPointToPoint(a, !0, l).distanceTo(a) <= r))
|
|
@@ -476,7 +476,7 @@ class Ft extends ue {
|
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
Ft.prototype.closestPointToSegment = function() {
|
|
479
|
-
const l = new M(), s = new M(), t = new
|
|
479
|
+
const l = new M(), s = new M(), t = new Lt();
|
|
480
480
|
return function(i, o = null, n = null) {
|
|
481
481
|
const { start: r, end: a } = i, c = this.points;
|
|
482
482
|
let h, d = 1 / 0;
|
|
@@ -488,7 +488,7 @@ Ft.prototype.closestPointToSegment = function() {
|
|
|
488
488
|
};
|
|
489
489
|
}();
|
|
490
490
|
Ft.prototype.intersectsTriangle = function() {
|
|
491
|
-
const l = new Ft(), s = new Array(3), t = new Array(3), e = new wt(), i = new wt(), o = new M(), n = new M(), r = new M(), a = new M(), c = new M(), h = new
|
|
491
|
+
const l = new Ft(), s = new Array(3), t = new Array(3), e = new wt(), i = new wt(), o = new M(), n = new M(), r = new M(), a = new M(), c = new M(), h = new Lt(), d = new Lt(), E = new Lt(), u = new M();
|
|
492
492
|
function f(T, R, C) {
|
|
493
493
|
const A = T.points;
|
|
494
494
|
let F = 0, p = -1;
|
|
@@ -521,22 +521,22 @@ Ft.prototype.intersectsTriangle = function() {
|
|
|
521
521
|
const m = this.satBounds, g = this.satAxes;
|
|
522
522
|
t[0] = R.a, t[1] = R.b, t[2] = R.c;
|
|
523
523
|
for (let N = 0; N < 4; N++) {
|
|
524
|
-
const
|
|
525
|
-
if (e.setFromPoints(
|
|
524
|
+
const L = m[N], D = g[N];
|
|
525
|
+
if (e.setFromPoints(D, t), L.isSeparated(e))
|
|
526
526
|
return !1;
|
|
527
527
|
}
|
|
528
528
|
const S = R.satBounds, _ = R.satAxes;
|
|
529
529
|
s[0] = this.a, s[1] = this.b, s[2] = this.c;
|
|
530
530
|
for (let N = 0; N < 4; N++) {
|
|
531
|
-
const
|
|
532
|
-
if (e.setFromPoints(
|
|
531
|
+
const L = S[N], D = _[N];
|
|
532
|
+
if (e.setFromPoints(D, s), L.isSeparated(e))
|
|
533
533
|
return !1;
|
|
534
534
|
}
|
|
535
535
|
for (let N = 0; N < 4; N++) {
|
|
536
|
-
const
|
|
537
|
-
for (let
|
|
538
|
-
const
|
|
539
|
-
if (o.crossVectors(
|
|
536
|
+
const L = g[N];
|
|
537
|
+
for (let D = 0; D < 4; D++) {
|
|
538
|
+
const y = _[D];
|
|
539
|
+
if (o.crossVectors(L, y), e.setFromPoints(o, s), i.setFromPoints(o, t), e.isSeparated(i))
|
|
540
540
|
return !1;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
@@ -553,11 +553,11 @@ Ft.prototype.intersectsTriangle = function() {
|
|
|
553
553
|
if (g !== 2)
|
|
554
554
|
return !1;
|
|
555
555
|
if (d.delta(r), E.delta(a), r.dot(a) < 0) {
|
|
556
|
-
let
|
|
557
|
-
E.start = E.end, E.end =
|
|
556
|
+
let x = E.start;
|
|
557
|
+
E.start = E.end, E.end = x;
|
|
558
558
|
}
|
|
559
|
-
const S = d.start.dot(r), _ = d.end.dot(r), N = E.start.dot(r),
|
|
560
|
-
return S !==
|
|
559
|
+
const S = d.start.dot(r), _ = d.end.dot(r), N = E.start.dot(r), L = E.end.dot(r), D = _ < N, y = S < L;
|
|
560
|
+
return S !== L && N !== _ && D === y ? !1 : (C && (c.subVectors(d.start, E.start), c.dot(r) > 0 ? C.start.copy(d.start) : C.start.copy(E.start), c.subVectors(d.end, E.end), c.dot(r) < 0 ? C.end.copy(d.end) : C.end.copy(E.end)), !0);
|
|
561
561
|
}
|
|
562
562
|
};
|
|
563
563
|
}();
|
|
@@ -568,7 +568,7 @@ Ft.prototype.distanceToPoint = function() {
|
|
|
568
568
|
};
|
|
569
569
|
}();
|
|
570
570
|
Ft.prototype.distanceToTriangle = function() {
|
|
571
|
-
const l = new M(), s = new M(), t = ["a", "b", "c"], e = new
|
|
571
|
+
const l = new M(), s = new M(), t = ["a", "b", "c"], e = new Lt(), i = new Lt();
|
|
572
572
|
return function(n, r = null, a = null) {
|
|
573
573
|
const c = r || a ? e : null;
|
|
574
574
|
if (this.intersectsTriangle(n, c))
|
|
@@ -596,7 +596,7 @@ Ft.prototype.distanceToTriangle = function() {
|
|
|
596
596
|
}();
|
|
597
597
|
class at {
|
|
598
598
|
constructor(s, t, e) {
|
|
599
|
-
this.isOrientedBox = !0, this.min = new M(), this.max = new M(), this.matrix = new
|
|
599
|
+
this.isOrientedBox = !0, this.min = new M(), this.max = new M(), this.matrix = new yt(), this.invMatrix = new yt(), this.points = new Array(8).fill().map(() => new M()), this.satAxes = new Array(3).fill().map(() => new M()), this.satBounds = new Array(3).fill().map(() => new wt()), this.alignedSatBounds = new Array(3).fill().map(() => new wt()), this.needsUpdate = !1, s && this.min.copy(s), t && this.max.copy(t), e && this.matrix.copy(e);
|
|
600
600
|
}
|
|
601
601
|
set(s, t, e) {
|
|
602
602
|
this.min.copy(s), this.max.copy(t), this.matrix.copy(e), this.needsUpdate = !0;
|
|
@@ -678,7 +678,7 @@ at.prototype.distanceToPoint = function() {
|
|
|
678
678
|
};
|
|
679
679
|
}();
|
|
680
680
|
at.prototype.distanceToBox = function() {
|
|
681
|
-
const l = ["x", "y", "z"], s = new Array(12).fill().map(() => new
|
|
681
|
+
const l = ["x", "y", "z"], s = new Array(12).fill().map(() => new Lt()), t = new Array(12).fill().map(() => new Lt()), e = new M(), i = new M();
|
|
682
682
|
return function(n, r = 0, a = null, c = null) {
|
|
683
683
|
if (this.needsUpdate && this.update(), this.intersectsBox(n))
|
|
684
684
|
return (a || c) && (n.getCenter(i), this.closestPointToPoint(i, e), n.closestPointToPoint(e, i), a && a.copy(e), c && c.copy(i)), 0;
|
|
@@ -697,8 +697,8 @@ at.prototype.distanceToBox = function() {
|
|
|
697
697
|
for (let A = 0; A <= 1; A++) {
|
|
698
698
|
const F = (R + 1) % 3, p = (R + 2) % 3, m = C << F | A << p, g = 1 << R | C << F | A << p, S = u[m], _ = u[g];
|
|
699
699
|
s[T].set(S, _);
|
|
700
|
-
const
|
|
701
|
-
b[
|
|
700
|
+
const L = l[R], D = l[F], y = l[p], x = t[T], b = x.start, B = x.end;
|
|
701
|
+
b[L] = d[L], b[D] = C ? d[D] : E[D], b[y] = A ? d[y] : E[D], B[L] = E[L], B[D] = C ? d[D] : E[D], B[y] = A ? d[y] : E[D], T++;
|
|
702
702
|
}
|
|
703
703
|
for (let R = 0; R <= 1; R++)
|
|
704
704
|
for (let C = 0; C <= 1; C++)
|
|
@@ -786,32 +786,32 @@ function ai(l, s, t, e, i = null, o = 0, n = 0) {
|
|
|
786
786
|
const E = dt(l, c), u = ft(h, a);
|
|
787
787
|
return K(l, r, Yt), e(E, u, !1, n, o + l, Yt);
|
|
788
788
|
} else {
|
|
789
|
-
let
|
|
790
|
-
const { uint16Array:
|
|
791
|
-
let B =
|
|
792
|
-
for (; !Et(B,
|
|
793
|
-
|
|
794
|
-
return dt(
|
|
795
|
-
},
|
|
796
|
-
const { uint16Array:
|
|
797
|
-
let B =
|
|
798
|
-
for (; !Et(B,
|
|
799
|
-
|
|
800
|
-
return dt(
|
|
789
|
+
let L = function(y) {
|
|
790
|
+
const { uint16Array: x, uint32Array: b } = Z;
|
|
791
|
+
let B = y * 2;
|
|
792
|
+
for (; !Et(B, x); )
|
|
793
|
+
y = pt(y), B = y * 2;
|
|
794
|
+
return dt(y, b);
|
|
795
|
+
}, D = function(y) {
|
|
796
|
+
const { uint16Array: x, uint32Array: b } = Z;
|
|
797
|
+
let B = y * 2;
|
|
798
|
+
for (; !Et(B, x); )
|
|
799
|
+
y = Ct(y, b), B = y * 2;
|
|
800
|
+
return dt(y, b) + ft(B, x);
|
|
801
801
|
};
|
|
802
802
|
const E = pt(l), u = Ct(l, c);
|
|
803
803
|
let f = E, T = u, R, C, A, F;
|
|
804
804
|
if (i && (A = Yt, F = Ie, K(f, r, A), K(T, r, F), R = i(A), C = i(F), C < R)) {
|
|
805
805
|
f = u, T = E;
|
|
806
|
-
const
|
|
807
|
-
R = C, C =
|
|
806
|
+
const y = R;
|
|
807
|
+
R = C, C = y, A = F;
|
|
808
808
|
}
|
|
809
809
|
A || (A = Yt, K(f, r, A));
|
|
810
810
|
const p = Et(f * 2, a), m = t(A, p, R, n + 1, o + f);
|
|
811
811
|
let g;
|
|
812
812
|
if (m === xi) {
|
|
813
|
-
const
|
|
814
|
-
g = e(
|
|
813
|
+
const y = L(f), b = D(f) - y;
|
|
814
|
+
g = e(y, b, !0, n + 1, o + f, A);
|
|
815
815
|
} else
|
|
816
816
|
g = m && ai(
|
|
817
817
|
f,
|
|
@@ -828,8 +828,8 @@ function ai(l, s, t, e, i = null, o = 0, n = 0) {
|
|
|
828
828
|
const S = Et(T * 2, a), _ = t(F, S, C, n + 1, o + T);
|
|
829
829
|
let N;
|
|
830
830
|
if (_ === xi) {
|
|
831
|
-
const
|
|
832
|
-
N = e(
|
|
831
|
+
const y = L(T), b = D(T) - y;
|
|
832
|
+
N = e(y, b, !0, n + 1, o + T, F);
|
|
833
833
|
} else
|
|
834
834
|
N = _ && ai(
|
|
835
835
|
T,
|
|
@@ -865,12 +865,12 @@ function No(l, s, t = {}, e = 0, i = 1 / 0) {
|
|
|
865
865
|
const te = /* @__PURE__ */ new M(), ee = /* @__PURE__ */ new M(), se = /* @__PURE__ */ new M(), $e = /* @__PURE__ */ new fe(), Je = /* @__PURE__ */ new fe(), ts = /* @__PURE__ */ new fe(), Vi = /* @__PURE__ */ new M(), Gi = /* @__PURE__ */ new M(), zi = /* @__PURE__ */ new M(), es = /* @__PURE__ */ new M();
|
|
866
866
|
function Po(l, s, t, e, i, o) {
|
|
867
867
|
let n;
|
|
868
|
-
return o === Qn ? n = l.intersectTriangle(e, t, s, !0, i) : n = l.intersectTriangle(s, t, e, o !==
|
|
868
|
+
return o === Qn ? n = l.intersectTriangle(e, t, s, !0, i) : n = l.intersectTriangle(s, t, e, o !== Ln, i), n === null ? null : {
|
|
869
869
|
distance: l.origin.distanceTo(i),
|
|
870
870
|
point: i.clone()
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Lo(l, s, t, e, i, o, n, r, a) {
|
|
874
874
|
te.fromBufferAttribute(s, o), ee.fromBufferAttribute(s, n), se.fromBufferAttribute(s, r);
|
|
875
875
|
const c = Po(l, te, ee, se, es, a);
|
|
876
876
|
if (c) {
|
|
@@ -891,7 +891,7 @@ function xs(l, s, t, e, i) {
|
|
|
891
891
|
let n = o + 0, r = o + 1, a = o + 2;
|
|
892
892
|
const c = l.index;
|
|
893
893
|
l.index && (n = c.getX(n), r = c.getX(r), a = c.getX(a));
|
|
894
|
-
const { position: h, normal: d, uv: E, uv1: u } = l.attributes, f =
|
|
894
|
+
const { position: h, normal: d, uv: E, uv1: u } = l.attributes, f = Lo(t, h, d, E, u, n, r, a, s);
|
|
895
895
|
return f ? (f.faceIndex = e, i && i.push(f), f) : null;
|
|
896
896
|
}
|
|
897
897
|
function tt(l, s, t, e) {
|
|
@@ -899,7 +899,7 @@ function tt(l, s, t, e) {
|
|
|
899
899
|
let r = s, a = s + 1, c = s + 2;
|
|
900
900
|
t && (r = t.getX(r), a = t.getX(a), c = t.getX(c)), i.x = e.getX(r), i.y = e.getY(r), i.z = e.getZ(r), o.x = e.getX(a), o.y = e.getY(a), o.z = e.getZ(a), n.x = e.getX(c), n.y = e.getY(c), n.z = e.getZ(c);
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function yo(l, s, t, e, i, o) {
|
|
903
903
|
const { geometry: n, _indirectBuffer: r } = l;
|
|
904
904
|
for (let a = e, c = e + i; a < c; a++)
|
|
905
905
|
xs(n, s, t, a, o);
|
|
@@ -934,10 +934,10 @@ function Do(l, s = null) {
|
|
|
934
934
|
if (r[T + 15] === Us) {
|
|
935
935
|
const C = n[E + 6], A = r[T + 14];
|
|
936
936
|
let F = 1 / 0, p = 1 / 0, m = 1 / 0, g = -1 / 0, S = -1 / 0, _ = -1 / 0;
|
|
937
|
-
for (let N = 3 * C,
|
|
938
|
-
let
|
|
939
|
-
const
|
|
940
|
-
|
|
937
|
+
for (let N = 3 * C, L = 3 * (C + A); N < L; N++) {
|
|
938
|
+
let D = e[N];
|
|
939
|
+
const y = i.getX(D), x = i.getY(D), b = i.getZ(D);
|
|
940
|
+
y < F && (F = y), y > g && (g = y), x < p && (p = x), x > S && (S = x), b < m && (m = b), b > _ && (_ = b);
|
|
941
941
|
}
|
|
942
942
|
return a[E + 0] !== F || a[E + 1] !== p || a[E + 2] !== m || a[E + 3] !== g || a[E + 4] !== S || a[E + 5] !== _ ? (a[E + 0] = F, a[E + 1] = p, a[E + 2] = m, a[E + 3] = g, a[E + 4] = S, a[E + 5] = _, !0) : !1;
|
|
943
943
|
} else {
|
|
@@ -945,17 +945,17 @@ function Do(l, s = null) {
|
|
|
945
945
|
let m = f, g = !1, S = !1;
|
|
946
946
|
s ? m || (g = s.has(F), S = s.has(p), m = !g && !S) : (g = !0, S = !0);
|
|
947
947
|
const _ = m || g, N = m || S;
|
|
948
|
-
let
|
|
949
|
-
_ && (
|
|
950
|
-
let
|
|
951
|
-
N && (
|
|
952
|
-
const
|
|
953
|
-
if (
|
|
954
|
-
for (let
|
|
955
|
-
const b = C +
|
|
956
|
-
a[E +
|
|
948
|
+
let L = !1;
|
|
949
|
+
_ && (L = d(C, u, m));
|
|
950
|
+
let D = !1;
|
|
951
|
+
N && (D = d(A, u, m));
|
|
952
|
+
const y = L || D;
|
|
953
|
+
if (y)
|
|
954
|
+
for (let x = 0; x < 3; x++) {
|
|
955
|
+
const b = C + x, B = A + x, H = a[b], q = a[b + 3], st = a[B], Q = a[B + 3];
|
|
956
|
+
a[E + x] = H < st ? H : st, a[E + x + 3] = q > Q ? q : Q;
|
|
957
957
|
}
|
|
958
|
-
return
|
|
958
|
+
return y;
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
}
|
|
@@ -996,7 +996,7 @@ function ci(l, s, t, e, i) {
|
|
|
996
996
|
const { float32Array: o, uint16Array: n, uint32Array: r } = Z, a = l * 2;
|
|
997
997
|
if (Et(a, n)) {
|
|
998
998
|
const h = dt(l, r), d = ft(a, n);
|
|
999
|
-
|
|
999
|
+
yo(s, t, e, h, d, i);
|
|
1000
1000
|
} else {
|
|
1001
1001
|
const h = pt(l);
|
|
1002
1002
|
Gt(h, o, e, Wi) && ci(h, s, t, e, i);
|
|
@@ -1033,7 +1033,7 @@ function li(l, s, t, e) {
|
|
|
1033
1033
|
return R && A ? R.distance <= A.distance ? R : A : R || A || null;
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
const ss = /* @__PURE__ */ new gt(), ie = /* @__PURE__ */ new Ft(), ne = /* @__PURE__ */ new Ft(), ge = /* @__PURE__ */ new
|
|
1036
|
+
const ss = /* @__PURE__ */ new gt(), ie = /* @__PURE__ */ new Ft(), ne = /* @__PURE__ */ new Ft(), ge = /* @__PURE__ */ new yt(), Xi = /* @__PURE__ */ new at(), is = /* @__PURE__ */ new at();
|
|
1037
1037
|
function Vo(l, s, t, e) {
|
|
1038
1038
|
Z.setBuffer(l._roots[s]);
|
|
1039
1039
|
const i = hi(0, l, t, e);
|
|
@@ -1066,7 +1066,7 @@ function hi(l, s, t, e, i = null) {
|
|
|
1066
1066
|
return K(h, o, ss), !!(i.intersectsBox(ss) && hi(h, s, t, e, i) || (K(d, o, ss), i.intersectsBox(ss) && hi(d, s, t, e, i)));
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
|
-
const ns = /* @__PURE__ */ new
|
|
1069
|
+
const ns = /* @__PURE__ */ new yt(), Ws = /* @__PURE__ */ new at(), Oe = /* @__PURE__ */ new at(), Go = /* @__PURE__ */ new M(), zo = /* @__PURE__ */ new M(), Ho = /* @__PURE__ */ new M(), Wo = /* @__PURE__ */ new M();
|
|
1070
1070
|
function ko(l, s, t, e = {}, i = {}, o = 0, n = 1 / 0) {
|
|
1071
1071
|
s.boundingBox || s.computeBoundingBox(), Ws.set(s.boundingBox.min, s.boundingBox.max, t), Ws.needsUpdate = !0;
|
|
1072
1072
|
const r = l.geometry, a = r.attributes.position, c = r.index, h = s.attributes.position, d = s.index, E = It.getPrimitive(), u = It.getPrimitive();
|
|
@@ -1081,14 +1081,14 @@ function ko(l, s, t, e = {}, i = {}, o = 0, n = 1 / 0) {
|
|
|
1081
1081
|
if (s.boundsTree)
|
|
1082
1082
|
return s.boundsTree.shapecast({
|
|
1083
1083
|
boundsTraverseOrder: (_) => Oe.distanceToBox(_),
|
|
1084
|
-
intersectsBounds: (_, N,
|
|
1084
|
+
intersectsBounds: (_, N, L) => L < A && L < n,
|
|
1085
1085
|
intersectsRange: (_, N) => {
|
|
1086
|
-
for (let
|
|
1087
|
-
tt(u, 3 *
|
|
1088
|
-
for (let
|
|
1089
|
-
tt(E, 3 *
|
|
1086
|
+
for (let L = _, D = _ + N; L < D; L++) {
|
|
1087
|
+
tt(u, 3 * L, d, h), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
1088
|
+
for (let y = m, x = m + g; y < x; y++) {
|
|
1089
|
+
tt(E, 3 * y, c, a), E.needsUpdate = !0;
|
|
1090
1090
|
const b = E.distanceToTriangle(u, f, R);
|
|
1091
|
-
if (b < A && (T.copy(f), C && C.copy(R), A = b, F =
|
|
1091
|
+
if (b < A && (T.copy(f), C && C.copy(R), A = b, F = y, p = L), b < o)
|
|
1092
1092
|
return !0;
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
@@ -1098,10 +1098,10 @@ function ko(l, s, t, e = {}, i = {}, o = 0, n = 1 / 0) {
|
|
|
1098
1098
|
const S = Ce(s);
|
|
1099
1099
|
for (let _ = 0, N = S; _ < N; _++) {
|
|
1100
1100
|
tt(u, 3 * _, d, h), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
1101
|
-
for (let
|
|
1102
|
-
tt(E, 3 *
|
|
1103
|
-
const
|
|
1104
|
-
if (
|
|
1101
|
+
for (let L = m, D = m + g; L < D; L++) {
|
|
1102
|
+
tt(E, 3 * L, c, a), E.needsUpdate = !0;
|
|
1103
|
+
const y = E.distanceToTriangle(u, f, R);
|
|
1104
|
+
if (y < A && (T.copy(f), C && C.copy(R), A = y, F = L, p = _), y < o)
|
|
1105
1105
|
return !0;
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
@@ -1122,12 +1122,12 @@ function Xo(l, s = null) {
|
|
|
1122
1122
|
if (r[T + 15] === Us) {
|
|
1123
1123
|
const C = n[E + 6], A = r[T + 14];
|
|
1124
1124
|
let F = 1 / 0, p = 1 / 0, m = 1 / 0, g = -1 / 0, S = -1 / 0, _ = -1 / 0;
|
|
1125
|
-
for (let N = C,
|
|
1126
|
-
const
|
|
1127
|
-
for (let
|
|
1128
|
-
let
|
|
1129
|
-
|
|
1130
|
-
const b = i.getX(
|
|
1125
|
+
for (let N = C, L = C + A; N < L; N++) {
|
|
1126
|
+
const D = 3 * l.resolveTriangleIndex(N);
|
|
1127
|
+
for (let y = 0; y < 3; y++) {
|
|
1128
|
+
let x = D + y;
|
|
1129
|
+
x = e ? e[x] : x;
|
|
1130
|
+
const b = i.getX(x), B = i.getY(x), H = i.getZ(x);
|
|
1131
1131
|
b < F && (F = b), b > g && (g = b), B < p && (p = B), B > S && (S = B), H < m && (m = H), H > _ && (_ = H);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
@@ -1137,17 +1137,17 @@ function Xo(l, s = null) {
|
|
|
1137
1137
|
let m = f, g = !1, S = !1;
|
|
1138
1138
|
s ? m || (g = s.has(F), S = s.has(p), m = !g && !S) : (g = !0, S = !0);
|
|
1139
1139
|
const _ = m || g, N = m || S;
|
|
1140
|
-
let
|
|
1141
|
-
_ && (
|
|
1142
|
-
let
|
|
1143
|
-
N && (
|
|
1144
|
-
const
|
|
1145
|
-
if (
|
|
1146
|
-
for (let
|
|
1147
|
-
const b = C +
|
|
1148
|
-
a[E +
|
|
1140
|
+
let L = !1;
|
|
1141
|
+
_ && (L = d(C, u, m));
|
|
1142
|
+
let D = !1;
|
|
1143
|
+
N && (D = d(A, u, m));
|
|
1144
|
+
const y = L || D;
|
|
1145
|
+
if (y)
|
|
1146
|
+
for (let x = 0; x < 3; x++) {
|
|
1147
|
+
const b = C + x, B = A + x, H = a[b], q = a[b + 3], st = a[B], Q = a[B + 3];
|
|
1148
|
+
a[E + x] = H < st ? H : st, a[E + x + 3] = q > Q ? q : Q;
|
|
1149
1149
|
}
|
|
1150
|
-
return
|
|
1150
|
+
return y;
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
@@ -1196,7 +1196,7 @@ function di(l, s, t, e) {
|
|
|
1196
1196
|
return R && A ? R.distance <= A.distance ? R : A : R || A || null;
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
|
-
const os = /* @__PURE__ */ new gt(), oe = /* @__PURE__ */ new Ft(), re = /* @__PURE__ */ new Ft(), Se = /* @__PURE__ */ new
|
|
1199
|
+
const os = /* @__PURE__ */ new gt(), oe = /* @__PURE__ */ new Ft(), re = /* @__PURE__ */ new Ft(), Se = /* @__PURE__ */ new yt(), ji = /* @__PURE__ */ new at(), rs = /* @__PURE__ */ new at();
|
|
1200
1200
|
function qo(l, s, t, e) {
|
|
1201
1201
|
Z.setBuffer(l._roots[s]);
|
|
1202
1202
|
const i = ui(0, l, t, e);
|
|
@@ -1230,7 +1230,7 @@ function ui(l, s, t, e, i = null) {
|
|
|
1230
1230
|
return K(h, o, os), !!(i.intersectsBox(os) && ui(h, s, t, e, i) || (K(d, o, os), i.intersectsBox(os) && ui(d, s, t, e, i)));
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
|
-
const as = /* @__PURE__ */ new
|
|
1233
|
+
const as = /* @__PURE__ */ new yt(), ks = /* @__PURE__ */ new at(), _e = /* @__PURE__ */ new at(), Ko = /* @__PURE__ */ new M(), $o = /* @__PURE__ */ new M(), Jo = /* @__PURE__ */ new M(), tr = /* @__PURE__ */ new M();
|
|
1234
1234
|
function er(l, s, t, e = {}, i = {}, o = 0, n = 1 / 0) {
|
|
1235
1235
|
s.boundingBox || s.computeBoundingBox(), ks.set(s.boundingBox.min, s.boundingBox.max, t), ks.needsUpdate = !0;
|
|
1236
1236
|
const r = l.geometry, a = r.attributes.position, c = r.index, h = s.attributes.position, d = s.index, E = It.getPrimitive(), u = It.getPrimitive();
|
|
@@ -1246,16 +1246,16 @@ function er(l, s, t, e = {}, i = {}, o = 0, n = 1 / 0) {
|
|
|
1246
1246
|
const S = s.boundsTree;
|
|
1247
1247
|
return S.shapecast({
|
|
1248
1248
|
boundsTraverseOrder: (_) => _e.distanceToBox(_),
|
|
1249
|
-
intersectsBounds: (_, N,
|
|
1249
|
+
intersectsBounds: (_, N, L) => L < A && L < n,
|
|
1250
1250
|
intersectsRange: (_, N) => {
|
|
1251
|
-
for (let
|
|
1252
|
-
const
|
|
1253
|
-
tt(u, 3 *
|
|
1254
|
-
for (let
|
|
1255
|
-
const B = l.resolveTriangleIndex(
|
|
1251
|
+
for (let L = _, D = _ + N; L < D; L++) {
|
|
1252
|
+
const y = S.resolveTriangleIndex(L);
|
|
1253
|
+
tt(u, 3 * y, d, h), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
1254
|
+
for (let x = m, b = m + g; x < b; x++) {
|
|
1255
|
+
const B = l.resolveTriangleIndex(x);
|
|
1256
1256
|
tt(E, 3 * B, c, a), E.needsUpdate = !0;
|
|
1257
1257
|
const H = E.distanceToTriangle(u, f, R);
|
|
1258
|
-
if (H < A && (T.copy(f), C && C.copy(R), A = H, F =
|
|
1258
|
+
if (H < A && (T.copy(f), C && C.copy(R), A = H, F = x, p = L), H < o)
|
|
1259
1259
|
return !0;
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
@@ -1265,11 +1265,11 @@ function er(l, s, t, e = {}, i = {}, o = 0, n = 1 / 0) {
|
|
|
1265
1265
|
const S = Ce(s);
|
|
1266
1266
|
for (let _ = 0, N = S; _ < N; _++) {
|
|
1267
1267
|
tt(u, 3 * _, d, h), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
1268
|
-
for (let
|
|
1269
|
-
const
|
|
1270
|
-
tt(E, 3 *
|
|
1271
|
-
const
|
|
1272
|
-
if (
|
|
1268
|
+
for (let L = m, D = m + g; L < D; L++) {
|
|
1269
|
+
const y = l.resolveTriangleIndex(L);
|
|
1270
|
+
tt(E, 3 * y, c, a), E.needsUpdate = !0;
|
|
1271
|
+
const x = E.distanceToTriangle(u, f, R);
|
|
1272
|
+
if (x < A && (T.copy(f), C && C.copy(R), A = x, F = L, p = _), x < o)
|
|
1273
1273
|
return !0;
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
@@ -1289,7 +1289,7 @@ function ir(l, s, t, e) {
|
|
|
1289
1289
|
Qs = !0;
|
|
1290
1290
|
const i = l._roots, o = s._roots;
|
|
1291
1291
|
let n, r = 0, a = 0;
|
|
1292
|
-
const c = new
|
|
1292
|
+
const c = new yt().copy(t).invert();
|
|
1293
1293
|
for (let h = 0, d = i.length; h < d; h++) {
|
|
1294
1294
|
be.setBuffer(i[h]), a = 0;
|
|
1295
1295
|
const E = vt.getPrimitive();
|
|
@@ -1340,10 +1340,10 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1340
1340
|
else if (g) {
|
|
1341
1341
|
const _ = vt.getPrimitive();
|
|
1342
1342
|
K(s, R, _), _.applyMatrix4(t);
|
|
1343
|
-
const N = pt(l),
|
|
1344
|
-
K(N, u, ae), K(
|
|
1345
|
-
const
|
|
1346
|
-
S =
|
|
1343
|
+
const N = pt(l), L = Ct(l, f);
|
|
1344
|
+
K(N, u, ae), K(L, u, ce);
|
|
1345
|
+
const D = _.intersectsBox(ae), y = _.intersectsBox(ce);
|
|
1346
|
+
S = D && Tt(
|
|
1347
1347
|
s,
|
|
1348
1348
|
N,
|
|
1349
1349
|
e,
|
|
@@ -1355,9 +1355,9 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1355
1355
|
r + 1,
|
|
1356
1356
|
_,
|
|
1357
1357
|
!h
|
|
1358
|
-
) ||
|
|
1358
|
+
) || y && Tt(
|
|
1359
1359
|
s,
|
|
1360
|
-
|
|
1360
|
+
L,
|
|
1361
1361
|
e,
|
|
1362
1362
|
t,
|
|
1363
1363
|
i,
|
|
@@ -1371,8 +1371,8 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1371
1371
|
} else {
|
|
1372
1372
|
const _ = pt(s), N = Ct(s, C);
|
|
1373
1373
|
K(_, R, Xs), K(N, R, Zs);
|
|
1374
|
-
const
|
|
1375
|
-
if (
|
|
1374
|
+
const L = c.intersectsBox(Xs), D = c.intersectsBox(Zs);
|
|
1375
|
+
if (L && D)
|
|
1376
1376
|
S = Tt(
|
|
1377
1377
|
l,
|
|
1378
1378
|
_,
|
|
@@ -1398,7 +1398,7 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1398
1398
|
c,
|
|
1399
1399
|
h
|
|
1400
1400
|
);
|
|
1401
|
-
else if (
|
|
1401
|
+
else if (L)
|
|
1402
1402
|
if (m)
|
|
1403
1403
|
S = Tt(
|
|
1404
1404
|
l,
|
|
@@ -1414,14 +1414,14 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1414
1414
|
h
|
|
1415
1415
|
);
|
|
1416
1416
|
else {
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
const
|
|
1420
|
-
K(
|
|
1421
|
-
const B =
|
|
1417
|
+
const y = vt.getPrimitive();
|
|
1418
|
+
y.copy(Xs).applyMatrix4(t);
|
|
1419
|
+
const x = pt(l), b = Ct(l, f);
|
|
1420
|
+
K(x, u, ae), K(b, u, ce);
|
|
1421
|
+
const B = y.intersectsBox(ae), H = y.intersectsBox(ce);
|
|
1422
1422
|
S = B && Tt(
|
|
1423
1423
|
_,
|
|
1424
|
-
|
|
1424
|
+
x,
|
|
1425
1425
|
e,
|
|
1426
1426
|
t,
|
|
1427
1427
|
i,
|
|
@@ -1429,7 +1429,7 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1429
1429
|
o,
|
|
1430
1430
|
a,
|
|
1431
1431
|
r + 1,
|
|
1432
|
-
|
|
1432
|
+
y,
|
|
1433
1433
|
!h
|
|
1434
1434
|
) || H && Tt(
|
|
1435
1435
|
_,
|
|
@@ -1441,11 +1441,11 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1441
1441
|
o,
|
|
1442
1442
|
a,
|
|
1443
1443
|
r + 1,
|
|
1444
|
-
|
|
1444
|
+
y,
|
|
1445
1445
|
!h
|
|
1446
|
-
), vt.releasePrimitive(
|
|
1446
|
+
), vt.releasePrimitive(y);
|
|
1447
1447
|
}
|
|
1448
|
-
else if (
|
|
1448
|
+
else if (D)
|
|
1449
1449
|
if (m)
|
|
1450
1450
|
S = Tt(
|
|
1451
1451
|
l,
|
|
@@ -1461,14 +1461,14 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1461
1461
|
h
|
|
1462
1462
|
);
|
|
1463
1463
|
else {
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1466
|
-
const
|
|
1467
|
-
K(
|
|
1468
|
-
const B =
|
|
1464
|
+
const y = vt.getPrimitive();
|
|
1465
|
+
y.copy(Zs).applyMatrix4(t);
|
|
1466
|
+
const x = pt(l), b = Ct(l, f);
|
|
1467
|
+
K(x, u, ae), K(b, u, ce);
|
|
1468
|
+
const B = y.intersectsBox(ae), H = y.intersectsBox(ce);
|
|
1469
1469
|
S = B && Tt(
|
|
1470
1470
|
N,
|
|
1471
|
-
|
|
1471
|
+
x,
|
|
1472
1472
|
e,
|
|
1473
1473
|
t,
|
|
1474
1474
|
i,
|
|
@@ -1476,7 +1476,7 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1476
1476
|
o,
|
|
1477
1477
|
a,
|
|
1478
1478
|
r + 1,
|
|
1479
|
-
|
|
1479
|
+
y,
|
|
1480
1480
|
!h
|
|
1481
1481
|
) || H && Tt(
|
|
1482
1482
|
N,
|
|
@@ -1488,9 +1488,9 @@ function Tt(l, s, t, e, i, o = 0, n = 0, r = 0, a = 0, c = null, h = !1) {
|
|
|
1488
1488
|
o,
|
|
1489
1489
|
a,
|
|
1490
1490
|
r + 1,
|
|
1491
|
-
|
|
1491
|
+
y,
|
|
1492
1492
|
!h
|
|
1493
|
-
), vt.releasePrimitive(
|
|
1493
|
+
), vt.releasePrimitive(y);
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
return S;
|
|
@@ -1648,7 +1648,7 @@ class Si {
|
|
|
1648
1648
|
const f = (T, R, C, A, F, p, m, g) => {
|
|
1649
1649
|
for (let S = C, _ = C + A; S < _; S++) {
|
|
1650
1650
|
u(S), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
|
|
1651
|
-
for (let N = T,
|
|
1651
|
+
for (let N = T, L = T + R; N < L; N++)
|
|
1652
1652
|
if (c(N), n.needsUpdate = !0, o(n, h, N, S, F, p, m, g))
|
|
1653
1653
|
return !0;
|
|
1654
1654
|
}
|
|
@@ -1710,7 +1710,7 @@ class Si {
|
|
|
1710
1710
|
function Ki(l, s, t) {
|
|
1711
1711
|
return l === null || (l.point.applyMatrix4(s.matrixWorld), l.distance = l.point.distanceTo(t.ray.origin), l.object = s, l.distance < t.near || l.distance > t.far) ? null : l;
|
|
1712
1712
|
}
|
|
1713
|
-
const js = /* @__PURE__ */ new jn(), $i = /* @__PURE__ */ new
|
|
1713
|
+
const js = /* @__PURE__ */ new jn(), $i = /* @__PURE__ */ new yt(), nr = v.prototype.raycast;
|
|
1714
1714
|
function or(l, s) {
|
|
1715
1715
|
if (this.geometry.boundsTree) {
|
|
1716
1716
|
if (this.material === void 0)
|
|
@@ -1736,7 +1736,7 @@ function rr(l) {
|
|
|
1736
1736
|
function ar() {
|
|
1737
1737
|
this.boundsTree = null;
|
|
1738
1738
|
}
|
|
1739
|
-
class
|
|
1739
|
+
class w {
|
|
1740
1740
|
constructor() {
|
|
1741
1741
|
/** Triggers all the callbacks assigned to this event. */
|
|
1742
1742
|
I(this, "trigger", (s) => {
|
|
@@ -1819,7 +1819,7 @@ class Ni extends _i {
|
|
|
1819
1819
|
* Event that is triggered when a world is added or removed from the `worlds` map.
|
|
1820
1820
|
* The event payload contains the world instance and the action ("added" or "removed").
|
|
1821
1821
|
*/
|
|
1822
|
-
I(this, "onWorldChanged", new
|
|
1822
|
+
I(this, "onWorldChanged", new w());
|
|
1823
1823
|
/**
|
|
1824
1824
|
* The current world this item is associated with. It can be null if no world is currently active.
|
|
1825
1825
|
*/
|
|
@@ -1844,18 +1844,18 @@ class lr extends Ni {
|
|
|
1844
1844
|
constructor() {
|
|
1845
1845
|
super(...arguments);
|
|
1846
1846
|
/** {@link Updateable.onBeforeUpdate} */
|
|
1847
|
-
I(this, "onAfterUpdate", new
|
|
1847
|
+
I(this, "onAfterUpdate", new w());
|
|
1848
1848
|
/** {@link Updateable.onAfterUpdate} */
|
|
1849
|
-
I(this, "onBeforeUpdate", new
|
|
1849
|
+
I(this, "onBeforeUpdate", new w());
|
|
1850
1850
|
/** {@link Disposable.onDisposed} */
|
|
1851
|
-
I(this, "onDisposed", new
|
|
1851
|
+
I(this, "onDisposed", new w());
|
|
1852
1852
|
/** {@link Resizeable.onResize} */
|
|
1853
|
-
I(this, "onResize", new
|
|
1853
|
+
I(this, "onResize", new w());
|
|
1854
1854
|
/**
|
|
1855
1855
|
* Event that fires when there has been a change to the list of clipping
|
|
1856
1856
|
* planes used by the active renderer.
|
|
1857
1857
|
*/
|
|
1858
|
-
I(this, "onClippingPlanesUpdated", new
|
|
1858
|
+
I(this, "onClippingPlanesUpdated", new w());
|
|
1859
1859
|
/**
|
|
1860
1860
|
* The list of [clipping planes](https://threejs.org/docs/#api/en/renderers/WebGLRenderer.clippingPlanes) used by this instance of the renderer.
|
|
1861
1861
|
*/
|
|
@@ -1962,7 +1962,7 @@ class hr extends Ni {
|
|
|
1962
1962
|
constructor(t) {
|
|
1963
1963
|
super(t);
|
|
1964
1964
|
/** {@link Disposable.onDisposed} */
|
|
1965
|
-
I(this, "onDisposed", new
|
|
1965
|
+
I(this, "onDisposed", new w());
|
|
1966
1966
|
}
|
|
1967
1967
|
/** {@link Disposable.dispose} */
|
|
1968
1968
|
dispose() {
|
|
@@ -1974,7 +1974,54 @@ class hr extends Ni {
|
|
|
1974
1974
|
this.three.children = [], this.onDisposed.trigger(), this.onDisposed.reset();
|
|
1975
1975
|
}
|
|
1976
1976
|
}
|
|
1977
|
-
|
|
1977
|
+
class sa extends Set {
|
|
1978
|
+
constructor(t) {
|
|
1979
|
+
super(t);
|
|
1980
|
+
I(this, "onItemAdded", new w());
|
|
1981
|
+
I(this, "onItemDeleted", new w());
|
|
1982
|
+
I(this, "onCleared", new w());
|
|
1983
|
+
}
|
|
1984
|
+
clear() {
|
|
1985
|
+
super.clear(), this.onCleared.trigger();
|
|
1986
|
+
}
|
|
1987
|
+
add(t) {
|
|
1988
|
+
if (this.has(t))
|
|
1989
|
+
return this;
|
|
1990
|
+
const i = super.add(t);
|
|
1991
|
+
return this.onItemAdded || (this.onItemAdded = new w()), this.onItemAdded.trigger(t), i;
|
|
1992
|
+
}
|
|
1993
|
+
delete(t) {
|
|
1994
|
+
const e = super.delete(t);
|
|
1995
|
+
return e && this.onItemDeleted.trigger(), e;
|
|
1996
|
+
}
|
|
1997
|
+
dispose() {
|
|
1998
|
+
this.clear(), this.onItemAdded.reset(), this.onItemDeleted.reset(), this.onCleared.reset();
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
class ia extends Map {
|
|
2002
|
+
constructor(t) {
|
|
2003
|
+
super(t);
|
|
2004
|
+
I(this, "onItemSet", new w());
|
|
2005
|
+
I(this, "onItemUpdated", new w());
|
|
2006
|
+
I(this, "onItemDeleted", new w());
|
|
2007
|
+
I(this, "onCleared", new w());
|
|
2008
|
+
}
|
|
2009
|
+
clear() {
|
|
2010
|
+
super.clear(), this.onCleared.trigger();
|
|
2011
|
+
}
|
|
2012
|
+
set(t, e) {
|
|
2013
|
+
const i = this.has(t), o = super.set(t, e);
|
|
2014
|
+
return i ? (this.onItemUpdated || (this.onItemUpdated = new w()), this.onItemUpdated.trigger({ key: t, value: e })) : (this.onItemSet || (this.onItemSet = new w()), this.onItemSet.trigger({ key: t, value: e })), o;
|
|
2015
|
+
}
|
|
2016
|
+
delete(t) {
|
|
2017
|
+
const e = super.delete(t);
|
|
2018
|
+
return e && this.onItemDeleted.trigger(), e;
|
|
2019
|
+
}
|
|
2020
|
+
dispose() {
|
|
2021
|
+
this.clear(), this.onItemSet.reset(), this.onItemDeleted.reset(), this.onCleared.reset();
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
const ms = 0, Er = 1, dr = new M(), Ji = new Lt(), qs = new Fi(), tn = new M(), ls = new ue();
|
|
1978
2025
|
class ur {
|
|
1979
2026
|
constructor() {
|
|
1980
2027
|
this.tolerance = -1, this.faces = [], this.newFaces = [], this.assigned = new en(), this.unassigned = new en(), this.vertices = [];
|
|
@@ -2404,26 +2451,26 @@ function mr(l) {
|
|
|
2404
2451
|
f.divideScalar(T), R /= T, C /= T, A /= T, F /= T, p /= T, m /= T, R -= f.x * f.x, C -= f.x * f.y, A -= f.x * f.z, F -= f.y * f.y, p -= f.y * f.z, m -= f.z * f.z;
|
|
2405
2452
|
const g = new O.Matrix3();
|
|
2406
2453
|
g.elements[0] = R, g.elements[1] = C, g.elements[2] = A, g.elements[3] = C, g.elements[4] = F, g.elements[5] = p, g.elements[6] = A, g.elements[7] = p, g.elements[8] = m, Tr(g, e);
|
|
2407
|
-
const S = e.unitary, _ = new O.Vector3(), N = new O.Vector3(),
|
|
2408
|
-
S.extractBasis(_, N,
|
|
2409
|
-
let
|
|
2454
|
+
const S = e.unitary, _ = new O.Vector3(), N = new O.Vector3(), L = new O.Vector3();
|
|
2455
|
+
S.extractBasis(_, N, L);
|
|
2456
|
+
let D = -1 / 0, y = -1 / 0, x = -1 / 0, b = 1 / 0, B = 1 / 0, H = 1 / 0;
|
|
2410
2457
|
for (let it = 0, Xt = s.length; it < Xt; it++) {
|
|
2411
2458
|
const J = s[it];
|
|
2412
|
-
|
|
2459
|
+
D = Math.max(_.dot(J), D), y = Math.max(N.dot(J), y), x = Math.max(L.dot(J), x), b = Math.min(_.dot(J), b), B = Math.min(N.dot(J), B), H = Math.min(L.dot(J), H);
|
|
2413
2460
|
}
|
|
2414
|
-
_.multiplyScalar(0.5 * (b +
|
|
2461
|
+
_.multiplyScalar(0.5 * (b + D)), N.multiplyScalar(0.5 * (B + y)), L.multiplyScalar(0.5 * (H + x));
|
|
2415
2462
|
const q = new O.Vector3(), st = new O.Vector3(), Q = new O.Matrix3();
|
|
2416
|
-
q.add(_).add(N).add(
|
|
2463
|
+
q.add(_).add(N).add(L), st.x = D - b, st.y = y - B, st.z = x - H, st.multiplyScalar(0.5), Q.copy(S);
|
|
2417
2464
|
const { x: Ht, y: Wt, z: kt } = st, ke = new O.Matrix4();
|
|
2418
2465
|
ke.makeScale(Ht * 2, Wt * 2, kt * 2);
|
|
2419
2466
|
const Te = new O.Matrix4();
|
|
2420
2467
|
Te.makeTranslation(-Ht, -Wt, -kt);
|
|
2421
|
-
const
|
|
2422
|
-
|
|
2468
|
+
const yi = new O.Matrix4();
|
|
2469
|
+
yi.makeTranslation(q.x, q.y, q.z);
|
|
2423
2470
|
const Mi = new O.Matrix4();
|
|
2424
2471
|
Mi.setFromMatrix3(Q);
|
|
2425
2472
|
const me = new O.Matrix4();
|
|
2426
|
-
return me.multiply(
|
|
2473
|
+
return me.multiply(yi), me.multiply(Mi), me.multiply(Te), me.multiply(ke), { center: q, halfSizes: st, rotation: Q, transformation: me };
|
|
2427
2474
|
}
|
|
2428
2475
|
function Rr(l, s, t) {
|
|
2429
2476
|
const e = [
|
|
@@ -2716,25 +2763,25 @@ I($, "_lut", [
|
|
|
2716
2763
|
"ff"
|
|
2717
2764
|
]);
|
|
2718
2765
|
let ze = $;
|
|
2719
|
-
class
|
|
2766
|
+
class na extends et {
|
|
2720
2767
|
constructor(t, e) {
|
|
2721
2768
|
super(t);
|
|
2722
2769
|
/** {@link Disposable.onDisposed} */
|
|
2723
|
-
I(this, "onDisposed", new
|
|
2770
|
+
I(this, "onDisposed", new w());
|
|
2724
2771
|
/**
|
|
2725
2772
|
* An event that is triggered when a vertex is found.
|
|
2726
2773
|
* The event passes a THREE.Vector3 representing the position of the found vertex.
|
|
2727
2774
|
*/
|
|
2728
|
-
I(this, "onVertexFound", new
|
|
2775
|
+
I(this, "onVertexFound", new w());
|
|
2729
2776
|
/**
|
|
2730
2777
|
* An event that is triggered when a vertex is lost.
|
|
2731
2778
|
* The event passes a THREE.Vector3 representing the position of the lost vertex.
|
|
2732
2779
|
*/
|
|
2733
|
-
I(this, "onVertexLost", new
|
|
2780
|
+
I(this, "onVertexLost", new w());
|
|
2734
2781
|
/**
|
|
2735
2782
|
* An event that is triggered when the picker is enabled or disabled
|
|
2736
2783
|
*/
|
|
2737
|
-
I(this, "onEnabled", new
|
|
2784
|
+
I(this, "onEnabled", new w());
|
|
2738
2785
|
/**
|
|
2739
2786
|
* A reference to the Components instance associated with this VertexPicker.
|
|
2740
2787
|
*/
|
|
@@ -2869,7 +2916,7 @@ class sa extends et {
|
|
|
2869
2916
|
const Fs = class Fs {
|
|
2870
2917
|
constructor() {
|
|
2871
2918
|
/** {@link Disposable.onDisposed} */
|
|
2872
|
-
I(this, "onDisposed", new
|
|
2919
|
+
I(this, "onDisposed", new w());
|
|
2873
2920
|
/**
|
|
2874
2921
|
* The list of components created in this app.
|
|
2875
2922
|
* The keys are UUIDs and the values are instances of the components.
|
|
@@ -2968,14 +3015,14 @@ const Fs = class Fs {
|
|
|
2968
3015
|
/**
|
|
2969
3016
|
* The version of the @thatopen/components library.
|
|
2970
3017
|
*/
|
|
2971
|
-
I(Fs, "release", "2.1.
|
|
3018
|
+
I(Fs, "release", "2.1.15");
|
|
2972
3019
|
let pi = Fs;
|
|
2973
3020
|
class Ar {
|
|
2974
3021
|
constructor(s) {
|
|
2975
3022
|
I(this, "_event");
|
|
2976
3023
|
I(this, "_position", new O.Vector2());
|
|
2977
3024
|
/** {@link Disposable.onDisposed} */
|
|
2978
|
-
I(this, "onDisposed", new
|
|
3025
|
+
I(this, "onDisposed", new w());
|
|
2979
3026
|
I(this, "updateMouseInfo", (s) => {
|
|
2980
3027
|
this._event = s;
|
|
2981
3028
|
});
|
|
@@ -3012,7 +3059,7 @@ class Fr {
|
|
|
3012
3059
|
/** The components instance to which this Raycaster belongs. */
|
|
3013
3060
|
I(this, "components");
|
|
3014
3061
|
/** {@link Disposable.onDisposed} */
|
|
3015
|
-
I(this, "onDisposed", new
|
|
3062
|
+
I(this, "onDisposed", new w());
|
|
3016
3063
|
/** The position of the mouse in the screen. */
|
|
3017
3064
|
I(this, "mouse");
|
|
3018
3065
|
/**
|
|
@@ -3088,7 +3135,7 @@ const gs = class gs extends et {
|
|
|
3088
3135
|
*/
|
|
3089
3136
|
I(this, "list", /* @__PURE__ */ new Map());
|
|
3090
3137
|
/** {@link Disposable.onDisposed} */
|
|
3091
|
-
I(this, "onDisposed", new
|
|
3138
|
+
I(this, "onDisposed", new w());
|
|
3092
3139
|
t.add(gs.uuid, this);
|
|
3093
3140
|
}
|
|
3094
3141
|
/**
|
|
@@ -3139,11 +3186,11 @@ class gr extends _i {
|
|
|
3139
3186
|
*/
|
|
3140
3187
|
I(this, "meshes", /* @__PURE__ */ new Set());
|
|
3141
3188
|
/** {@link Updateable.onAfterUpdate} */
|
|
3142
|
-
I(this, "onAfterUpdate", new
|
|
3189
|
+
I(this, "onAfterUpdate", new w());
|
|
3143
3190
|
/** {@link Updateable.onBeforeUpdate} */
|
|
3144
|
-
I(this, "onBeforeUpdate", new
|
|
3191
|
+
I(this, "onBeforeUpdate", new w());
|
|
3145
3192
|
/** {@link Disposable.onDisposed} */
|
|
3146
|
-
I(this, "onDisposed", new
|
|
3193
|
+
I(this, "onDisposed", new w());
|
|
3147
3194
|
/**
|
|
3148
3195
|
* Indicates whether the world is currently being disposed. This is useful to prevent trying to access world's elements when it's being disposed, which could cause errors when you dispose a world.
|
|
3149
3196
|
*/
|
|
@@ -3231,7 +3278,7 @@ class gr extends _i {
|
|
|
3231
3278
|
this._scene = null, this._camera = null, this._renderer = null, this.onDisposed.trigger();
|
|
3232
3279
|
}
|
|
3233
3280
|
}
|
|
3234
|
-
class
|
|
3281
|
+
class oa extends hr {
|
|
3235
3282
|
constructor(t) {
|
|
3236
3283
|
super(t);
|
|
3237
3284
|
/** {@link Configurable.isSetup} */
|
|
@@ -3242,7 +3289,7 @@ class ia extends hr {
|
|
|
3242
3289
|
*/
|
|
3243
3290
|
I(this, "three");
|
|
3244
3291
|
/** {@link Configurable.onSetup} */
|
|
3245
|
-
I(this, "onSetup", new
|
|
3292
|
+
I(this, "onSetup", new w());
|
|
3246
3293
|
/**
|
|
3247
3294
|
* Configuration interface for the {@link SimpleScene}.
|
|
3248
3295
|
* Defines properties for directional and ambient lights.
|
|
@@ -3275,7 +3322,7 @@ class ia extends hr {
|
|
|
3275
3322
|
this.three.add(e, i), this.isSetup = !0, this.onSetup.trigger(this);
|
|
3276
3323
|
}
|
|
3277
3324
|
}
|
|
3278
|
-
class
|
|
3325
|
+
class ra extends lr {
|
|
3279
3326
|
/**
|
|
3280
3327
|
* Constructor for the SimpleRenderer class.
|
|
3281
3328
|
*
|
|
@@ -3301,7 +3348,7 @@ class na extends lr {
|
|
|
3301
3348
|
I(this, "_canvas");
|
|
3302
3349
|
I(this, "_parameters");
|
|
3303
3350
|
I(this, "_resizeObserver", null);
|
|
3304
|
-
I(this, "onContainerUpdated", new
|
|
3351
|
+
I(this, "onContainerUpdated", new w());
|
|
3305
3352
|
I(this, "_resizing", !1);
|
|
3306
3353
|
/** {@link Resizeable.resize} */
|
|
3307
3354
|
I(this, "resize", (t) => {
|
|
@@ -3424,7 +3471,7 @@ function on(l, s) {
|
|
|
3424
3471
|
function Pe(l) {
|
|
3425
3472
|
return isFinite(l) ? l : l < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
|
|
3426
3473
|
}
|
|
3427
|
-
function
|
|
3474
|
+
function Le(l) {
|
|
3428
3475
|
return Math.abs(l) < Number.MAX_VALUE ? l : l * (1 / 0);
|
|
3429
3476
|
}
|
|
3430
3477
|
function hs(l, s, t, e, i = 1 / 0, o) {
|
|
@@ -3450,8 +3497,8 @@ function rn(l, s, t, e, i = 1 / 0, o, n) {
|
|
|
3450
3497
|
h = l.x - u, d = l.y - f, E = l.z - T;
|
|
3451
3498
|
const g = (t.x + r * u) * o, S = (t.y + r * f) * o, _ = (t.z + r * T) * o;
|
|
3452
3499
|
t.x = (t.x - r * g) * c, t.y = (t.y - r * S) * c, t.z = (t.z - r * _) * c, n.x = h + (u + g) * c, n.y = d + (f + S) * c, n.z = E + (T + _) * c;
|
|
3453
|
-
const N = R - l.x,
|
|
3454
|
-
return N *
|
|
3500
|
+
const N = R - l.x, L = C - l.y, D = A - l.z, y = n.x - R, x = n.y - C, b = n.z - A;
|
|
3501
|
+
return N * y + L * x + D * b > 0 && (n.x = R, n.y = C, n.z = A, t.x = (n.x - R) / o, t.y = (n.y - C) / o, t.z = (n.z - A) / o), n;
|
|
3455
3502
|
}
|
|
3456
3503
|
function $s(l, s) {
|
|
3457
3504
|
s.set(0, 0), l.forEach((t) => {
|
|
@@ -3526,7 +3573,7 @@ class Or {
|
|
|
3526
3573
|
}
|
|
3527
3574
|
}
|
|
3528
3575
|
const Sr = "2.7.3", Es = 1 / 8, bn = typeof window < "u", _r = bn && /Mac/.test(navigator.platform), Nr = !(bn && "PointerEvent" in window);
|
|
3529
|
-
let Y, an, ds, ti, lt, G, z, Ee,
|
|
3576
|
+
let Y, an, ds, ti, lt, G, z, Ee, ye, Ot, St, Qt, cn, ln, ut, Me, de, hn, ei, En, si, ii, us;
|
|
3530
3577
|
class ot extends Or {
|
|
3531
3578
|
/**
|
|
3532
3579
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -3569,7 +3616,7 @@ class ot extends Or {
|
|
|
3569
3616
|
* @category Statics
|
|
3570
3617
|
*/
|
|
3571
3618
|
static install(s) {
|
|
3572
|
-
Y = s.THREE, an = Object.freeze(new Y.Vector3(0, 0, 0)), ds = Object.freeze(new Y.Vector3(0, 1, 0)), ti = Object.freeze(new Y.Vector3(0, 0, 1)), lt = new Y.Vector2(), G = new Y.Vector3(), z = new Y.Vector3(), Ee = new Y.Vector3(),
|
|
3619
|
+
Y = s.THREE, an = Object.freeze(new Y.Vector3(0, 0, 0)), ds = Object.freeze(new Y.Vector3(0, 1, 0)), ti = Object.freeze(new Y.Vector3(0, 0, 1)), lt = new Y.Vector2(), G = new Y.Vector3(), z = new Y.Vector3(), Ee = new Y.Vector3(), ye = new Y.Vector3(), Ot = new Y.Vector3(), St = new Y.Vector3(), Qt = new Y.Vector3(), cn = new Y.Vector3(), ln = new Y.Vector3(), ut = new Y.Spherical(), Me = new Y.Spherical(), de = new Y.Box3(), hn = new Y.Box3(), ei = new Y.Sphere(), En = new Y.Quaternion(), si = new Y.Quaternion(), ii = new Y.Matrix4(), us = new Y.Raycaster();
|
|
3573
3620
|
}
|
|
3574
3621
|
/**
|
|
3575
3622
|
* list all ACTIONs
|
|
@@ -3600,8 +3647,8 @@ class ot extends Or {
|
|
|
3600
3647
|
}, this._enabled = !0, this._state = P.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = le.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new Y.Vector3(), this._focalOffsetVelocity = new Y.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (p, m, g) => {
|
|
3601
3648
|
let S, _;
|
|
3602
3649
|
if (Zt(this._camera)) {
|
|
3603
|
-
const N = G.copy(this._camera.position).sub(this._target),
|
|
3604
|
-
S = this.truckSpeed * p *
|
|
3650
|
+
const N = G.copy(this._camera.position).sub(this._target), L = this._camera.getEffectiveFOV() * Ne, D = N.length() * Math.tan(L * 0.5);
|
|
3651
|
+
S = this.truckSpeed * p * D / this._elementRect.height, _ = this.truckSpeed * m * D / this._elementRect.height;
|
|
3605
3652
|
} else if (bt(this._camera)) {
|
|
3606
3653
|
const N = this._camera;
|
|
3607
3654
|
S = p * (N.right - N.left) / N.zoom / this._elementRect.width, _ = m * (N.top - N.bottom) / N.zoom / this._elementRect.height;
|
|
@@ -3612,8 +3659,8 @@ class ot extends Or {
|
|
|
3612
3659
|
const g = he * this.azimuthRotateSpeed * p / this._elementRect.height, S = he * this.polarRotateSpeed * m / this._elementRect.height;
|
|
3613
3660
|
this.rotate(g, S, !0);
|
|
3614
3661
|
}, this._dollyInternal = (p, m, g) => {
|
|
3615
|
-
const S = Math.pow(0.95, -p * this.dollySpeed), _ = this._sphericalEnd.radius, N = this._sphericalEnd.radius * S,
|
|
3616
|
-
this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(N, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(
|
|
3662
|
+
const S = Math.pow(0.95, -p * this.dollySpeed), _ = this._sphericalEnd.radius, N = this._sphericalEnd.radius * S, L = mt(N, this.minDistance, this.maxDistance), D = L - N;
|
|
3663
|
+
this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(N, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(D, !0), this._dollyToNoClamp(L, !0)) : this._dollyToNoClamp(L, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? N : L) - _, this._dollyControlCoord.set(m, g)), this._lastDollyDirection = Math.sign(-p);
|
|
3617
3664
|
}, this._zoomInternal = (p, m, g) => {
|
|
3618
3665
|
const S = Math.pow(0.95, p * this.dollySpeed), _ = this._zoom, N = this._zoom * S;
|
|
3619
3666
|
this.zoomTo(N, !0), this.dollyToCursor && (this._changedZoom += N - _, this._dollyControlCoord.set(m, g));
|
|
@@ -3732,8 +3779,8 @@ class ot extends Or {
|
|
|
3732
3779
|
if (!this._domElement || !this._enabled || this.mouseButtons.wheel === P.NONE)
|
|
3733
3780
|
return;
|
|
3734
3781
|
if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
|
|
3735
|
-
const N = this._domElement.getBoundingClientRect(),
|
|
3736
|
-
if (
|
|
3782
|
+
const N = this._domElement.getBoundingClientRect(), L = p.clientX / N.width, D = p.clientY / N.height;
|
|
3783
|
+
if (L < this._interactiveArea.left || L > this._interactiveArea.right || D < this._interactiveArea.top || D > this._interactiveArea.bottom)
|
|
3737
3784
|
return;
|
|
3738
3785
|
}
|
|
3739
3786
|
if (p.preventDefault(), this.dollyToCursor || this.mouseButtons.wheel === P.ROTATE || this.mouseButtons.wheel === P.TRUCK) {
|
|
@@ -3779,8 +3826,8 @@ class ot extends Or {
|
|
|
3779
3826
|
if ($s(this._activePointers, lt), this._getClientRect(this._elementRect), e.copy(lt), i.copy(lt), this._activePointers.length >= 2) {
|
|
3780
3827
|
const g = lt.x - this._activePointers[1].clientX, S = lt.y - this._activePointers[1].clientY, _ = Math.sqrt(g * g + S * S);
|
|
3781
3828
|
o.set(0, _);
|
|
3782
|
-
const N = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5,
|
|
3783
|
-
i.set(N,
|
|
3829
|
+
const N = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, L = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
|
|
3830
|
+
i.set(N, L);
|
|
3784
3831
|
}
|
|
3785
3832
|
if (this._state = 0, !p)
|
|
3786
3833
|
this._lockedPointer && (this._state = this._state | this.mouseButtons.left);
|
|
@@ -3805,14 +3852,14 @@ class ot extends Or {
|
|
|
3805
3852
|
this._dragNeedsUpdate = !1, $s(this._activePointers, lt);
|
|
3806
3853
|
const m = this._domElement && document.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, g = m ? -m.deltaX : i.x - lt.x, S = m ? -m.deltaY : i.y - lt.y;
|
|
3807
3854
|
if (i.copy(lt), ((this._state & P.ROTATE) === P.ROTATE || (this._state & P.TOUCH_ROTATE) === P.TOUCH_ROTATE || (this._state & P.TOUCH_DOLLY_ROTATE) === P.TOUCH_DOLLY_ROTATE || (this._state & P.TOUCH_ZOOM_ROTATE) === P.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(g, S), this._isUserControllingRotate = !0), (this._state & P.DOLLY) === P.DOLLY || (this._state & P.ZOOM) === P.ZOOM) {
|
|
3808
|
-
const _ = this.dollyToCursor ? (e.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, N = this.dollyToCursor ? (e.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0,
|
|
3809
|
-
(this._state & P.DOLLY) === P.DOLLY ? (this._dollyInternal(
|
|
3855
|
+
const _ = this.dollyToCursor ? (e.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, N = this.dollyToCursor ? (e.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, L = this.dollyDragInverted ? -1 : 1;
|
|
3856
|
+
(this._state & P.DOLLY) === P.DOLLY ? (this._dollyInternal(L * S * Es, _, N), this._isUserControllingDolly = !0) : (this._zoomInternal(L * S * Es, _, N), this._isUserControllingZoom = !0);
|
|
3810
3857
|
}
|
|
3811
3858
|
if ((this._state & P.TOUCH_DOLLY) === P.TOUCH_DOLLY || (this._state & P.TOUCH_ZOOM) === P.TOUCH_ZOOM || (this._state & P.TOUCH_DOLLY_TRUCK) === P.TOUCH_DOLLY_TRUCK || (this._state & P.TOUCH_ZOOM_TRUCK) === P.TOUCH_ZOOM_TRUCK || (this._state & P.TOUCH_DOLLY_OFFSET) === P.TOUCH_DOLLY_OFFSET || (this._state & P.TOUCH_ZOOM_OFFSET) === P.TOUCH_ZOOM_OFFSET || (this._state & P.TOUCH_DOLLY_ROTATE) === P.TOUCH_DOLLY_ROTATE || (this._state & P.TOUCH_ZOOM_ROTATE) === P.TOUCH_ZOOM_ROTATE) {
|
|
3812
|
-
const _ = lt.x - this._activePointers[1].clientX, N = lt.y - this._activePointers[1].clientY,
|
|
3813
|
-
o.set(0,
|
|
3814
|
-
const
|
|
3815
|
-
(this._state & P.TOUCH_DOLLY) === P.TOUCH_DOLLY || (this._state & P.TOUCH_DOLLY_ROTATE) === P.TOUCH_DOLLY_ROTATE || (this._state & P.TOUCH_DOLLY_TRUCK) === P.TOUCH_DOLLY_TRUCK || (this._state & P.TOUCH_DOLLY_OFFSET) === P.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(
|
|
3859
|
+
const _ = lt.x - this._activePointers[1].clientX, N = lt.y - this._activePointers[1].clientY, L = Math.sqrt(_ * _ + N * N), D = o.y - L;
|
|
3860
|
+
o.set(0, L);
|
|
3861
|
+
const y = this.dollyToCursor ? (i.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, x = this.dollyToCursor ? (i.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
3862
|
+
(this._state & P.TOUCH_DOLLY) === P.TOUCH_DOLLY || (this._state & P.TOUCH_DOLLY_ROTATE) === P.TOUCH_DOLLY_ROTATE || (this._state & P.TOUCH_DOLLY_TRUCK) === P.TOUCH_DOLLY_TRUCK || (this._state & P.TOUCH_DOLLY_OFFSET) === P.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(D * Es, y, x), this._isUserControllingDolly = !0) : (this._zoomInternal(D * Es, y, x), this._isUserControllingZoom = !0);
|
|
3816
3863
|
}
|
|
3817
3864
|
((this._state & P.TRUCK) === P.TRUCK || (this._state & P.TOUCH_TRUCK) === P.TOUCH_TRUCK || (this._state & P.TOUCH_DOLLY_TRUCK) === P.TOUCH_DOLLY_TRUCK || (this._state & P.TOUCH_ZOOM_TRUCK) === P.TOUCH_ZOOM_TRUCK) && (this._truckInternal(g, S, !1), this._isUserControllingTruck = !0), ((this._state & P.OFFSET) === P.OFFSET || (this._state & P.TOUCH_OFFSET) === P.TOUCH_OFFSET || (this._state & P.TOUCH_DOLLY_OFFSET) === P.TOUCH_DOLLY_OFFSET || (this._state & P.TOUCH_ZOOM_OFFSET) === P.TOUCH_ZOOM_OFFSET) && (this._truckInternal(g, S, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
|
3818
3865
|
}, C = () => {
|
|
@@ -4096,7 +4143,7 @@ class ot extends Or {
|
|
|
4096
4143
|
* @category Methods
|
|
4097
4144
|
*/
|
|
4098
4145
|
dollyInFixed(s, t = !1) {
|
|
4099
|
-
this._targetEnd.add(this._getCameraDirection(
|
|
4146
|
+
this._targetEnd.add(this._getCameraDirection(ye).multiplyScalar(s)), t || this._target.copy(this._targetEnd);
|
|
4100
4147
|
const e = !t || W(this._target.x, this._targetEnd.x, this.restThreshold) && W(this._target.y, this._targetEnd.y, this.restThreshold) && W(this._target.z, this._targetEnd.z, this.restThreshold);
|
|
4101
4148
|
return this._createOnRestPromise(e);
|
|
4102
4149
|
}
|
|
@@ -4524,7 +4571,7 @@ class ot extends Or {
|
|
|
4524
4571
|
}
|
|
4525
4572
|
if (this.dollyToCursor) {
|
|
4526
4573
|
if (Zt(this._camera) && this._changedDolly !== 0) {
|
|
4527
|
-
const d = this._spherical.radius - this._lastDistance, E = this._camera, u = this._getCameraDirection(
|
|
4574
|
+
const d = this._spherical.radius - this._lastDistance, E = this._camera, u = this._getCameraDirection(ye), f = G.copy(u).cross(E.up).normalize();
|
|
4528
4575
|
f.lengthSq() === 0 && (f.x = 1);
|
|
4529
4576
|
const T = z.crossVectors(f, u), R = this._sphericalEnd.radius * Math.tan(E.getEffectiveFOV() * Ne * 0.5), A = (this._sphericalEnd.radius - d - this._sphericalEnd.radius) / this._sphericalEnd.radius, F = Ee.copy(this._targetEnd).add(f.multiplyScalar(this._dollyControlCoord.x * R * E.aspect)).add(T.multiplyScalar(this._dollyControlCoord.y * R)), p = G.copy(this._targetEnd).lerp(F, A), m = this._lastDollyDirection === le.IN && this._spherical.radius <= this.minDistance, g = this._lastDollyDirection === le.OUT && this.maxDistance <= this._spherical.radius;
|
|
4530
4577
|
if (this.infinityDolly && (m || g)) {
|
|
@@ -4536,7 +4583,7 @@ class ot extends Or {
|
|
|
4536
4583
|
const S = z.subVectors(p, this._targetEnd);
|
|
4537
4584
|
this._targetEnd.copy(p), this._target.add(S), this._changedDolly -= d, X(this._changedDolly) && (this._changedDolly = 0);
|
|
4538
4585
|
} else if (bt(this._camera) && this._changedZoom !== 0) {
|
|
4539
|
-
const d = this._zoom - this._lastZoom, E = this._camera, u = G.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (E.near + E.far) / (E.near - E.far)).unproject(E), f = z.set(0, 0, -1).applyQuaternion(E.quaternion), T = Ee.copy(u).add(f.multiplyScalar(-u.dot(E.up))), C = -(this._zoom - d - this._zoom) / this._zoom, A = this._getCameraDirection(
|
|
4586
|
+
const d = this._zoom - this._lastZoom, E = this._camera, u = G.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (E.near + E.far) / (E.near - E.far)).unproject(E), f = z.set(0, 0, -1).applyQuaternion(E.quaternion), T = Ee.copy(u).add(f.multiplyScalar(-u.dot(E.up))), C = -(this._zoom - d - this._zoom) / this._zoom, A = this._getCameraDirection(ye), F = this._targetEnd.dot(A), p = G.copy(this._targetEnd).lerp(T, C), m = p.dot(A), g = A.multiplyScalar(m - F);
|
|
4540
4587
|
p.sub(g), this._boundary.clampPoint(p, p);
|
|
4541
4588
|
const S = z.subVectors(p, this._targetEnd);
|
|
4542
4589
|
this._targetEnd.copy(p), this._target.add(S), this._changedZoom -= d, X(this._changedZoom) && (this._changedZoom = 0);
|
|
@@ -4587,7 +4634,7 @@ class ot extends Or {
|
|
|
4587
4634
|
*/
|
|
4588
4635
|
fromJSON(s, t = !1) {
|
|
4589
4636
|
const e = JSON.parse(s);
|
|
4590
|
-
this.enabled = e.enabled, this.minDistance = e.minDistance, this.maxDistance =
|
|
4637
|
+
this.enabled = e.enabled, this.minDistance = e.minDistance, this.maxDistance = Le(e.maxDistance), this.minZoom = e.minZoom, this.maxZoom = Le(e.maxZoom), this.minPolarAngle = e.minPolarAngle, this.maxPolarAngle = Le(e.maxPolarAngle), this.minAzimuthAngle = Le(e.minAzimuthAngle), this.maxAzimuthAngle = Le(e.maxAzimuthAngle), this.smoothTime = e.smoothTime, this.draggingSmoothTime = e.draggingSmoothTime, this.dollySpeed = e.dollySpeed, this.truckSpeed = e.truckSpeed, this.dollyToCursor = e.dollyToCursor, this.verticalDragToForward = e.verticalDragToForward, this._target0.fromArray(e.target0), this._position0.fromArray(e.position0), this._zoom0 = e.zoom0, this._focalOffset0.fromArray(e.focalOffset0), this.moveTo(e.target[0], e.target[1], e.target[2], t), ut.setFromVector3(G.fromArray(e.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(ut.theta, ut.phi, t), this.dollyTo(ut.radius, t), this.zoomTo(e.zoom, t), this.setFocalOffset(e.focalOffset[0], e.focalOffset[1], e.focalOffset[2], t), this._needsUpdate = !0;
|
|
4591
4638
|
}
|
|
4592
4639
|
/**
|
|
4593
4640
|
* Attach all internal event handlers to enable drag control.
|
|
@@ -4660,7 +4707,7 @@ class ot extends Or {
|
|
|
4660
4707
|
let s = 1 / 0;
|
|
4661
4708
|
if (!(this.colliderMeshes.length >= 1) || Js(this._camera, "_collisionTest"))
|
|
4662
4709
|
return s;
|
|
4663
|
-
const e = this._getTargetDirection(
|
|
4710
|
+
const e = this._getTargetDirection(ye);
|
|
4664
4711
|
ii.lookAt(an, e, this._camera.up);
|
|
4665
4712
|
for (let i = 0; i < 4; i++) {
|
|
4666
4713
|
const o = z.copy(this._nearPlaneCorners[i]);
|
|
@@ -4747,16 +4794,16 @@ class We extends cr {
|
|
|
4747
4794
|
constructor(t) {
|
|
4748
4795
|
super(t);
|
|
4749
4796
|
/** {@link Updateable.onBeforeUpdate} */
|
|
4750
|
-
I(this, "onBeforeUpdate", new
|
|
4797
|
+
I(this, "onBeforeUpdate", new w());
|
|
4751
4798
|
/** {@link Updateable.onAfterUpdate} */
|
|
4752
|
-
I(this, "onAfterUpdate", new
|
|
4799
|
+
I(this, "onAfterUpdate", new w());
|
|
4753
4800
|
/**
|
|
4754
4801
|
* Event that is triggered when the aspect of the camera has been updated.
|
|
4755
4802
|
* This event is useful when you need to perform actions after the aspect of the camera has been changed.
|
|
4756
4803
|
*/
|
|
4757
|
-
I(this, "onAspectUpdated", new
|
|
4804
|
+
I(this, "onAspectUpdated", new w());
|
|
4758
4805
|
/** {@link Disposable.onDisposed} */
|
|
4759
|
-
I(this, "onDisposed", new
|
|
4806
|
+
I(this, "onDisposed", new w());
|
|
4760
4807
|
/**
|
|
4761
4808
|
* A three.js PerspectiveCamera or OrthographicCamera instance.
|
|
4762
4809
|
* This camera is used for rendering the scene.
|
|
@@ -4870,21 +4917,21 @@ const Os = class Os extends et {
|
|
|
4870
4917
|
constructor(t) {
|
|
4871
4918
|
super(t);
|
|
4872
4919
|
/** {@link Updateable.onAfterUpdate} */
|
|
4873
|
-
I(this, "onAfterUpdate", new
|
|
4920
|
+
I(this, "onAfterUpdate", new w());
|
|
4874
4921
|
/** {@link Updateable.onBeforeUpdate} */
|
|
4875
|
-
I(this, "onBeforeUpdate", new
|
|
4922
|
+
I(this, "onBeforeUpdate", new w());
|
|
4876
4923
|
/** {@link Disposable.onDisposed} */
|
|
4877
|
-
I(this, "onDisposed", new
|
|
4924
|
+
I(this, "onDisposed", new w());
|
|
4878
4925
|
/**
|
|
4879
4926
|
* An event that is triggered when a new world is created.
|
|
4880
4927
|
* The event passes the newly created world as a parameter.
|
|
4881
4928
|
*/
|
|
4882
|
-
I(this, "onWorldCreated", new
|
|
4929
|
+
I(this, "onWorldCreated", new w());
|
|
4883
4930
|
/**
|
|
4884
4931
|
* An event that is triggered when a world is deleted.
|
|
4885
4932
|
* The event passes the UUID of the deleted world as a parameter.
|
|
4886
4933
|
*/
|
|
4887
|
-
I(this, "onWorldDeleted", new
|
|
4934
|
+
I(this, "onWorldDeleted", new w());
|
|
4888
4935
|
/**
|
|
4889
4936
|
* A collection of worlds managed by this component.
|
|
4890
4937
|
* The key is the unique identifier (UUID) of the world, and the value is the World instance.
|
|
@@ -4953,7 +5000,7 @@ let Ci = Os;
|
|
|
4953
5000
|
class Pr {
|
|
4954
5001
|
constructor(s, t, e) {
|
|
4955
5002
|
/** {@link Disposable.onDisposed} */
|
|
4956
|
-
I(this, "onDisposed", new
|
|
5003
|
+
I(this, "onDisposed", new w());
|
|
4957
5004
|
/** The world instance to which this Raycaster belongs. */
|
|
4958
5005
|
I(this, "world");
|
|
4959
5006
|
/** The components instance to which this grid belongs. */
|
|
@@ -5113,7 +5160,7 @@ const Ss = class Ss extends et {
|
|
|
5113
5160
|
distance: 500
|
|
5114
5161
|
});
|
|
5115
5162
|
/** {@link Disposable.onDisposed} */
|
|
5116
|
-
I(this, "onDisposed", new
|
|
5163
|
+
I(this, "onDisposed", new w());
|
|
5117
5164
|
/** {@link Component.enabled} */
|
|
5118
5165
|
I(this, "enabled", !0);
|
|
5119
5166
|
t.add(Ss.uuid, this);
|
|
@@ -5167,7 +5214,7 @@ const jt = new qn(), nt = new M(), xt = new M(), j = new Pt(), un = {
|
|
|
5167
5214
|
Y: new M(0, 1, 0),
|
|
5168
5215
|
Z: new M(0, 0, 1)
|
|
5169
5216
|
}, ni = { type: "change" }, In = { type: "mouseDown" }, fn = { type: "mouseUp", mode: null }, pn = { type: "objectChange" };
|
|
5170
|
-
class
|
|
5217
|
+
class Lr extends ri {
|
|
5171
5218
|
constructor(s, t) {
|
|
5172
5219
|
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";
|
|
5173
5220
|
const e = new xr();
|
|
@@ -5188,7 +5235,7 @@ class yr extends ri {
|
|
|
5188
5235
|
}
|
|
5189
5236
|
n("camera", s), n("object", void 0), n("enabled", !0), n("axis", null), n("mode", "translate"), n("translationSnap", null), n("rotationSnap", null), n("scaleSnap", null), n("space", "world"), n("size", 1), n("dragging", !1), n("showX", !0), n("showY", !0), n("showZ", !0);
|
|
5190
5237
|
const r = new M(), a = new M(), c = new Pt(), h = new Pt(), d = new M(), E = new Pt(), u = new M(), f = new M(), T = new M(), R = 0, C = new M();
|
|
5191
|
-
n("worldPosition", r), n("worldPositionStart", a), n("worldQuaternion", c), n("worldQuaternionStart", h), n("cameraPosition", d), n("cameraQuaternion", E), n("pointStart", u), n("pointEnd", f), n("rotationAxis", T), n("rotationAngle", R), n("eye", C), this._offset = new M(), this._startNorm = new M(), this._endNorm = new M(), this._cameraScale = new M(), this._parentPosition = new M(), this._parentQuaternion = new Pt(), this._parentQuaternionInv = new Pt(), this._parentScale = new M(), this._worldScaleStart = new M(), this._worldQuaternionInv = new Pt(), this._worldScale = new M(), this._positionStart = new M(), this._quaternionStart = new Pt(), this._scaleStart = new M(), this._getPointer =
|
|
5238
|
+
n("worldPosition", r), n("worldPositionStart", a), n("worldQuaternion", c), n("worldQuaternionStart", h), n("cameraPosition", d), n("cameraQuaternion", E), n("pointStart", u), n("pointEnd", f), n("rotationAxis", T), n("rotationAngle", R), n("eye", C), this._offset = new M(), this._startNorm = new M(), this._endNorm = new M(), this._cameraScale = new M(), this._parentPosition = new M(), this._parentQuaternion = new Pt(), this._parentQuaternionInv = new Pt(), this._parentScale = new M(), this._worldScaleStart = new M(), this._worldQuaternionInv = new Pt(), this._worldScale = new M(), this._positionStart = new M(), this._quaternionStart = new Pt(), this._scaleStart = new M(), this._getPointer = yr.bind(this), this._onPointerDown = wr.bind(this), this._onPointerHover = Mr.bind(this), this._onPointerMove = Dr.bind(this), this._onPointerUp = Ur.bind(this), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp);
|
|
5192
5239
|
}
|
|
5193
5240
|
// updateMatrixWorld updates key transformation variables
|
|
5194
5241
|
updateMatrixWorld() {
|
|
@@ -5279,7 +5326,7 @@ class yr extends ri {
|
|
|
5279
5326
|
this.space = s;
|
|
5280
5327
|
}
|
|
5281
5328
|
}
|
|
5282
|
-
function
|
|
5329
|
+
function yr(l) {
|
|
5283
5330
|
if (this.domElement.ownerDocument.pointerLockElement)
|
|
5284
5331
|
return {
|
|
5285
5332
|
x: 0,
|
|
@@ -5320,11 +5367,11 @@ function oi(l, s, t) {
|
|
|
5320
5367
|
return e[i];
|
|
5321
5368
|
return !1;
|
|
5322
5369
|
}
|
|
5323
|
-
const Is = new Kn(), k = new M(0, 1, 0), Cn = new M(0, 0, 0), Tn = new
|
|
5370
|
+
const Is = new Kn(), k = new M(0, 1, 0), Cn = new M(0, 0, 0), Tn = new yt(), fs = new Pt(), Rs = new Pt(), _t = new M(), mn = new yt(), Ue = new M(1, 0, 0), qt = new M(0, 1, 0), xe = new M(0, 0, 1), ps = new M(), we = new M(), De = new M();
|
|
5324
5371
|
class xr extends ri {
|
|
5325
5372
|
constructor() {
|
|
5326
5373
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
|
5327
|
-
const s = new
|
|
5374
|
+
const s = new yn({
|
|
5328
5375
|
depthTest: !1,
|
|
5329
5376
|
depthWrite: !1,
|
|
5330
5377
|
fog: !1,
|
|
@@ -5466,7 +5513,7 @@ class xr extends ri {
|
|
|
5466
5513
|
AXIS: [
|
|
5467
5514
|
[new Dt(C, i.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
|
|
5468
5515
|
]
|
|
5469
|
-
},
|
|
5516
|
+
}, L = {
|
|
5470
5517
|
XYZE: [
|
|
5471
5518
|
[new v(new Jn(0.25, 10, 8), e)]
|
|
5472
5519
|
],
|
|
@@ -5482,7 +5529,7 @@ class xr extends ri {
|
|
|
5482
5529
|
E: [
|
|
5483
5530
|
[new v(new Re(0.75, 0.1, 2, 24), e)]
|
|
5484
5531
|
]
|
|
5485
|
-
},
|
|
5532
|
+
}, D = {
|
|
5486
5533
|
X: [
|
|
5487
5534
|
[new v(R, o), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
|
|
5488
5535
|
[new v(A, o), [0, 0, 0], [0, 0, -Math.PI / 2]],
|
|
@@ -5510,7 +5557,7 @@ class xr extends ri {
|
|
|
5510
5557
|
XYZ: [
|
|
5511
5558
|
[new v(new rt(0.1, 0.1, 0.1), d.clone())]
|
|
5512
5559
|
]
|
|
5513
|
-
},
|
|
5560
|
+
}, y = {
|
|
5514
5561
|
X: [
|
|
5515
5562
|
[new v(new ct(0.2, 0, 0.6, 4), e), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
|
|
5516
5563
|
[new v(new ct(0.2, 0, 0.6, 4), e), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
|
|
@@ -5535,7 +5582,7 @@ class xr extends ri {
|
|
|
5535
5582
|
XYZ: [
|
|
5536
5583
|
[new v(new rt(0.2, 0.2, 0.2), e), [0, 0, 0]]
|
|
5537
5584
|
]
|
|
5538
|
-
},
|
|
5585
|
+
}, x = {
|
|
5539
5586
|
X: [
|
|
5540
5587
|
[new Dt(C, i.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
|
|
5541
5588
|
],
|
|
@@ -5557,7 +5604,7 @@ class xr extends ri {
|
|
|
5557
5604
|
}
|
|
5558
5605
|
return H;
|
|
5559
5606
|
}
|
|
5560
|
-
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = b(m)), this.add(this.gizmo.rotate = b(_)), this.add(this.gizmo.scale = b(
|
|
5607
|
+
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = b(m)), this.add(this.gizmo.rotate = b(_)), this.add(this.gizmo.scale = b(D)), this.add(this.picker.translate = b(g)), this.add(this.picker.rotate = b(L)), this.add(this.picker.scale = b(y)), this.add(this.helper.translate = b(S)), this.add(this.helper.rotate = b(N)), this.add(this.helper.scale = b(x)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
|
|
5561
5608
|
}
|
|
5562
5609
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
|
5563
5610
|
updateMatrixWorld(s) {
|
|
@@ -5584,7 +5631,7 @@ class br extends v {
|
|
|
5584
5631
|
constructor() {
|
|
5585
5632
|
super(
|
|
5586
5633
|
new to(1e5, 1e5, 2, 2),
|
|
5587
|
-
new
|
|
5634
|
+
new yn({ visible: !1, wireframe: !0, side: Ln, transparent: !0, opacity: 0.1, toneMapped: !1 })
|
|
5588
5635
|
), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
|
|
5589
5636
|
}
|
|
5590
5637
|
updateMatrixWorld(s) {
|
|
@@ -5627,11 +5674,11 @@ class br extends v {
|
|
|
5627
5674
|
class Pi {
|
|
5628
5675
|
constructor(s, t, e, i, o, n = 5, r = !0) {
|
|
5629
5676
|
/** Event that fires when the user starts dragging a clipping plane. */
|
|
5630
|
-
I(this, "onDraggingStarted", new
|
|
5677
|
+
I(this, "onDraggingStarted", new w());
|
|
5631
5678
|
/** Event that fires when the user stops dragging a clipping plane. */
|
|
5632
|
-
I(this, "onDraggingEnded", new
|
|
5679
|
+
I(this, "onDraggingEnded", new w());
|
|
5633
5680
|
/** {@link Disposable.onDisposed} */
|
|
5634
|
-
I(this, "onDisposed", new
|
|
5681
|
+
I(this, "onDisposed", new w());
|
|
5635
5682
|
/**
|
|
5636
5683
|
* The normal vector of the clipping plane.
|
|
5637
5684
|
*/
|
|
@@ -5762,7 +5809,7 @@ class Pi {
|
|
|
5762
5809
|
newTransformControls() {
|
|
5763
5810
|
if (!this.world.renderer)
|
|
5764
5811
|
throw new Error("No renderer found for clipping plane!");
|
|
5765
|
-
const s = this.world.camera.three, t = this.world.renderer.three.domElement, e = new
|
|
5812
|
+
const s = this.world.camera.three, t = this.world.renderer.three.domElement, e = new Lr(s, t);
|
|
5766
5813
|
return this.initializeControls(e), this.world.scene.three.add(e), e;
|
|
5767
5814
|
}
|
|
5768
5815
|
initializeControls(s) {
|
|
@@ -5790,37 +5837,37 @@ const Be = class Be extends et {
|
|
|
5790
5837
|
constructor(t) {
|
|
5791
5838
|
super(t);
|
|
5792
5839
|
/** Event that fires when the user starts dragging a clipping plane. */
|
|
5793
|
-
I(this, "onBeforeDrag", new
|
|
5840
|
+
I(this, "onBeforeDrag", new w());
|
|
5794
5841
|
/** Event that fires when the user stops dragging a clipping plane. */
|
|
5795
|
-
I(this, "onAfterDrag", new
|
|
5842
|
+
I(this, "onAfterDrag", new w());
|
|
5796
5843
|
/**
|
|
5797
5844
|
* Event that fires when the user starts creating a clipping plane.
|
|
5798
5845
|
*/
|
|
5799
|
-
I(this, "onBeforeCreate", new
|
|
5846
|
+
I(this, "onBeforeCreate", new w());
|
|
5800
5847
|
/**
|
|
5801
5848
|
* Event that fires when the user cancels the creation of a clipping plane.
|
|
5802
5849
|
*/
|
|
5803
|
-
I(this, "onBeforeCancel", new
|
|
5850
|
+
I(this, "onBeforeCancel", new w());
|
|
5804
5851
|
/**
|
|
5805
5852
|
* Event that fires after the user cancels the creation of a clipping plane.
|
|
5806
5853
|
*/
|
|
5807
|
-
I(this, "onAfterCancel", new
|
|
5854
|
+
I(this, "onAfterCancel", new w());
|
|
5808
5855
|
/**
|
|
5809
5856
|
* Event that fires when the user starts deleting a clipping plane.
|
|
5810
5857
|
*/
|
|
5811
|
-
I(this, "onBeforeDelete", new
|
|
5858
|
+
I(this, "onBeforeDelete", new w());
|
|
5812
5859
|
/**
|
|
5813
5860
|
* Event that fires after a clipping plane has been created.
|
|
5814
5861
|
* @param plane - The newly created clipping plane.
|
|
5815
5862
|
*/
|
|
5816
|
-
I(this, "onAfterCreate", new
|
|
5863
|
+
I(this, "onAfterCreate", new w());
|
|
5817
5864
|
/**
|
|
5818
5865
|
* Event that fires after a clipping plane has been deleted.
|
|
5819
5866
|
* @param plane - The deleted clipping plane.
|
|
5820
5867
|
*/
|
|
5821
|
-
I(this, "onAfterDelete", new
|
|
5868
|
+
I(this, "onAfterDelete", new w());
|
|
5822
5869
|
/** {@link Disposable.onDisposed} */
|
|
5823
|
-
I(this, "onDisposed", new
|
|
5870
|
+
I(this, "onDisposed", new w());
|
|
5824
5871
|
/**
|
|
5825
5872
|
* Whether to force the clipping plane to be orthogonal in the Y direction
|
|
5826
5873
|
* (up). This is desirable when clipping a building horizontally and a
|
|
@@ -6056,7 +6103,7 @@ async function Yr(l, s, t, e, i, o, n, r) {
|
|
|
6056
6103
|
class Vr {
|
|
6057
6104
|
constructor(s, t, e) {
|
|
6058
6105
|
/** {@link Disposable.onDisposed} */
|
|
6059
|
-
I(this, "onDisposed", new
|
|
6106
|
+
I(this, "onDisposed", new w());
|
|
6060
6107
|
/**
|
|
6061
6108
|
* Fires after making the visibility check to the meshes. It lists the
|
|
6062
6109
|
* meshes that are currently visible, and the ones that were visible
|
|
@@ -6187,7 +6234,7 @@ class Gr extends Vr {
|
|
|
6187
6234
|
* Event triggered when the visibility of meshes is updated.
|
|
6188
6235
|
* Contains two sets: seen and unseen.
|
|
6189
6236
|
*/
|
|
6190
|
-
I(this, "onViewUpdated", new
|
|
6237
|
+
I(this, "onViewUpdated", new w());
|
|
6191
6238
|
/**
|
|
6192
6239
|
* Pixels in screen a geometry must occupy to be considered "seen".
|
|
6193
6240
|
* Default value is 100.
|
|
@@ -6302,6 +6349,19 @@ class Gr extends Vr {
|
|
|
6302
6349
|
}
|
|
6303
6350
|
this._colorCodeMeshMap.delete(o), this._meshIDColorCodeMap.delete(t.uuid), this.colorMeshes.delete(t.uuid), i.geometry = void 0, i.material = [], e.destroy(i, !0), this._recentlyHiddenMeshes.delete(t), this._currentVisibleMeshes.delete(t), this.isProcessing = !1;
|
|
6304
6351
|
}
|
|
6352
|
+
/**
|
|
6353
|
+
* Updates the given instanced meshes inside the culler. You should use this if you change the count property, e.g. when changing the visibility of fragments.
|
|
6354
|
+
*
|
|
6355
|
+
* @param meshes - The meshes to update.
|
|
6356
|
+
*
|
|
6357
|
+
* @returns {void}
|
|
6358
|
+
*/
|
|
6359
|
+
updateInstanced(t) {
|
|
6360
|
+
for (const e of t) {
|
|
6361
|
+
const i = this.colorMeshes.get(e.uuid);
|
|
6362
|
+
i && (i.count = e.count);
|
|
6363
|
+
}
|
|
6364
|
+
}
|
|
6305
6365
|
getAvailableMaterial() {
|
|
6306
6366
|
const { r: t, g: e, b: i, code: o } = this.getAvailableColor(), n = O.ColorManagement.enabled;
|
|
6307
6367
|
O.ColorManagement.enabled = !1;
|
|
@@ -6322,7 +6382,7 @@ const Ye = class Ye extends et {
|
|
|
6322
6382
|
/**
|
|
6323
6383
|
* An event that is triggered when the Cullers component is disposed.
|
|
6324
6384
|
*/
|
|
6325
|
-
I(this, "onDisposed", new
|
|
6385
|
+
I(this, "onDisposed", new w());
|
|
6326
6386
|
I(this, "_enabled", !0);
|
|
6327
6387
|
/**
|
|
6328
6388
|
* A map of MeshCullerRenderer instances, keyed by their world UUIDs.
|
|
@@ -6374,6 +6434,17 @@ const Ye = class Ye extends et {
|
|
|
6374
6434
|
e.dispose();
|
|
6375
6435
|
this.list.clear();
|
|
6376
6436
|
}
|
|
6437
|
+
/**
|
|
6438
|
+
* Updates the given instanced meshes inside the all the cullers. You should use this if you change the count property, e.g. when changing the visibility of fragments.
|
|
6439
|
+
*
|
|
6440
|
+
* @param meshes - The meshes to update.
|
|
6441
|
+
*
|
|
6442
|
+
* @returns {void}
|
|
6443
|
+
*/
|
|
6444
|
+
updateInstanced(t) {
|
|
6445
|
+
for (const [, e] of this.list)
|
|
6446
|
+
e.updateInstanced(t);
|
|
6447
|
+
}
|
|
6377
6448
|
};
|
|
6378
6449
|
/**
|
|
6379
6450
|
* A unique identifier for the component.
|
|
@@ -6384,13 +6455,13 @@ let Ti = Ye;
|
|
|
6384
6455
|
class zr {
|
|
6385
6456
|
constructor(s) {
|
|
6386
6457
|
/** {@link Disposable.onDisposed} */
|
|
6387
|
-
I(this, "onDisposed", new
|
|
6458
|
+
I(this, "onDisposed", new w());
|
|
6388
6459
|
/** {@link Updateable.onAfterUpdate} */
|
|
6389
|
-
I(this, "onAfterUpdate", new
|
|
6460
|
+
I(this, "onAfterUpdate", new w());
|
|
6390
6461
|
/** {@link Updateable.onBeforeUpdate} */
|
|
6391
|
-
I(this, "onBeforeUpdate", new
|
|
6462
|
+
I(this, "onBeforeUpdate", new w());
|
|
6392
6463
|
/** {@link Resizeable.onResize} */
|
|
6393
|
-
I(this, "onResize", new
|
|
6464
|
+
I(this, "onResize", new w());
|
|
6394
6465
|
/**
|
|
6395
6466
|
* The front offset of the minimap.
|
|
6396
6467
|
* It determines how much the minimap's view is offset from the camera's view.
|
|
@@ -6526,11 +6597,11 @@ const _s = class _s extends et {
|
|
|
6526
6597
|
constructor(t) {
|
|
6527
6598
|
super(t);
|
|
6528
6599
|
/** {@link Updateable.onAfterUpdate} */
|
|
6529
|
-
I(this, "onAfterUpdate", new
|
|
6600
|
+
I(this, "onAfterUpdate", new w());
|
|
6530
6601
|
/** {@link Updateable.onBeforeUpdate} */
|
|
6531
|
-
I(this, "onBeforeUpdate", new
|
|
6602
|
+
I(this, "onBeforeUpdate", new w());
|
|
6532
6603
|
/** {@link Disposable.onDisposed} */
|
|
6533
|
-
I(this, "onDisposed", new
|
|
6604
|
+
I(this, "onDisposed", new w());
|
|
6534
6605
|
/** {@link Component.enabled} */
|
|
6535
6606
|
I(this, "enabled", !0);
|
|
6536
6607
|
/**
|
|
@@ -6657,7 +6728,7 @@ class Xr {
|
|
|
6657
6728
|
/**
|
|
6658
6729
|
* Event that fires when the {@link CameraProjection} changes.
|
|
6659
6730
|
*/
|
|
6660
|
-
I(this, "onChanged", new
|
|
6731
|
+
I(this, "onChanged", new w());
|
|
6661
6732
|
/**
|
|
6662
6733
|
* Current projection mode of the camera.
|
|
6663
6734
|
* Default is "Perspective".
|
|
@@ -6727,7 +6798,7 @@ class Xr {
|
|
|
6727
6798
|
s.position.copy(t.position), s.quaternion.copy(t.quaternion), this._component.controls.mouseButtons.wheel = ot.ACTION.DOLLY, this.matchOrthoDistanceEnabled ? this._component.controls.distance = this.getDistance() : this._component.controls.distance = this._previousDistance, await this._component.controls.zoomTo(1), s.updateProjectionMatrix(), this._component.controls.camera = s, this.camera = s, this.current = "Perspective";
|
|
6728
6799
|
}
|
|
6729
6800
|
}
|
|
6730
|
-
class
|
|
6801
|
+
class aa extends We {
|
|
6731
6802
|
constructor(t) {
|
|
6732
6803
|
super(t);
|
|
6733
6804
|
/**
|
|
@@ -6844,66 +6915,80 @@ class oa extends We {
|
|
|
6844
6915
|
}
|
|
6845
6916
|
const Zr = /* @__PURE__ */ new Map([
|
|
6846
6917
|
[
|
|
6847
|
-
|
|
6918
|
+
U.IFCRELAGGREGATES,
|
|
6848
6919
|
{
|
|
6849
6920
|
forRelating: "IsDecomposedBy",
|
|
6850
6921
|
forRelated: "Decomposes"
|
|
6851
6922
|
}
|
|
6852
6923
|
],
|
|
6853
6924
|
[
|
|
6854
|
-
|
|
6925
|
+
U.IFCRELASSOCIATESMATERIAL,
|
|
6855
6926
|
{
|
|
6856
6927
|
forRelating: "AssociatedTo",
|
|
6857
6928
|
forRelated: "HasAssociations"
|
|
6858
6929
|
}
|
|
6859
6930
|
],
|
|
6860
6931
|
[
|
|
6861
|
-
|
|
6932
|
+
U.IFCRELASSOCIATESCLASSIFICATION,
|
|
6862
6933
|
{
|
|
6863
6934
|
forRelating: "ClassificationForObjects",
|
|
6864
6935
|
forRelated: "HasAssociations"
|
|
6865
6936
|
}
|
|
6866
6937
|
],
|
|
6867
6938
|
[
|
|
6868
|
-
|
|
6939
|
+
U.IFCRELASSIGNSTOGROUP,
|
|
6869
6940
|
{
|
|
6870
6941
|
forRelating: "IsGroupedBy",
|
|
6871
6942
|
forRelated: "HasAssignments"
|
|
6872
6943
|
}
|
|
6873
6944
|
],
|
|
6874
6945
|
[
|
|
6875
|
-
|
|
6946
|
+
U.IFCRELDEFINESBYPROPERTIES,
|
|
6876
6947
|
{
|
|
6877
6948
|
forRelated: "IsDefinedBy",
|
|
6878
6949
|
forRelating: "DefinesOcurrence"
|
|
6879
6950
|
}
|
|
6880
6951
|
],
|
|
6881
6952
|
[
|
|
6882
|
-
|
|
6953
|
+
U.IFCRELDEFINESBYTYPE,
|
|
6883
6954
|
{
|
|
6884
6955
|
forRelated: "IsTypedBy",
|
|
6885
6956
|
forRelating: "Types"
|
|
6886
6957
|
}
|
|
6887
6958
|
],
|
|
6888
6959
|
[
|
|
6889
|
-
|
|
6960
|
+
U.IFCRELDEFINESBYTEMPLATE,
|
|
6890
6961
|
{
|
|
6891
6962
|
forRelated: "IsDefinedBy",
|
|
6892
6963
|
forRelating: "Defines"
|
|
6893
6964
|
}
|
|
6894
6965
|
],
|
|
6895
6966
|
[
|
|
6896
|
-
|
|
6967
|
+
U.IFCRELCONTAINEDINSPATIALSTRUCTURE,
|
|
6897
6968
|
{
|
|
6898
6969
|
forRelated: "ContainedInStructure",
|
|
6899
6970
|
forRelating: "ContainsElements"
|
|
6900
6971
|
}
|
|
6972
|
+
],
|
|
6973
|
+
[
|
|
6974
|
+
U.IFCRELFLOWCONTROLELEMENTS,
|
|
6975
|
+
{
|
|
6976
|
+
forRelated: "AssignedToFlowElement",
|
|
6977
|
+
forRelating: "HasControlElements"
|
|
6978
|
+
}
|
|
6979
|
+
],
|
|
6980
|
+
[
|
|
6981
|
+
U.IFCRELCONNECTSELEMENTS,
|
|
6982
|
+
{
|
|
6983
|
+
forRelated: "ConnectedFrom",
|
|
6984
|
+
forRelating: "ConnectedTo"
|
|
6985
|
+
}
|
|
6901
6986
|
]
|
|
6902
6987
|
]), Ve = class Ve extends et {
|
|
6903
6988
|
constructor(t) {
|
|
6904
6989
|
super(t);
|
|
6905
6990
|
/** {@link Disposable.onDisposed} */
|
|
6906
|
-
I(this, "onDisposed", new
|
|
6991
|
+
I(this, "onDisposed", new w());
|
|
6907
6992
|
/**
|
|
6908
6993
|
* Event triggered when relations for a model have been indexed.
|
|
6909
6994
|
* This event provides the model's UUID and the relations map generated for that model.
|
|
@@ -6912,7 +6997,7 @@ const Zr = /* @__PURE__ */ new Map([
|
|
|
6912
6997
|
* @property {RelationsMap} relationsMap - The relations map generated for the specified model.
|
|
6913
6998
|
* The map keys are expressIDs of entities, and the values are maps where each key is a relation type ID and its value is an array of expressIDs of entities related through that relation type.
|
|
6914
6999
|
*/
|
|
6915
|
-
I(this, "onRelationsIndexed", new
|
|
7000
|
+
I(this, "onRelationsIndexed", new w());
|
|
6916
7001
|
/**
|
|
6917
7002
|
* Holds the relationship mappings for each model processed by the indexer.
|
|
6918
7003
|
* The structure is a map where each key is a model's UUID, and the value is another map.
|
|
@@ -6939,17 +7024,21 @@ const Zr = /* @__PURE__ */ new Map([
|
|
|
6939
7024
|
"Types",
|
|
6940
7025
|
"Defines",
|
|
6941
7026
|
"ContainedInStructure",
|
|
6942
|
-
"ContainsElements"
|
|
7027
|
+
"ContainsElements",
|
|
7028
|
+
"HasControlElements",
|
|
7029
|
+
"AssignedToFlowElement",
|
|
7030
|
+
"ConnectedTo",
|
|
7031
|
+
"ConnectedFrom"
|
|
6943
7032
|
]);
|
|
6944
7033
|
I(this, "_ifcRels", [
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
7034
|
+
U.IFCRELAGGREGATES,
|
|
7035
|
+
U.IFCRELASSOCIATESMATERIAL,
|
|
7036
|
+
U.IFCRELASSOCIATESCLASSIFICATION,
|
|
7037
|
+
U.IFCRELASSIGNSTOGROUP,
|
|
7038
|
+
U.IFCRELDEFINESBYPROPERTIES,
|
|
7039
|
+
U.IFCRELDEFINESBYTYPE,
|
|
7040
|
+
U.IFCRELDEFINESBYTEMPLATE,
|
|
7041
|
+
U.IFCRELCONTAINEDINSPATIALSTRUCTURE
|
|
6953
7042
|
]);
|
|
6954
7043
|
I(this, "onFragmentsDisposed", (t) => {
|
|
6955
7044
|
delete this.relationMaps[t.groupID];
|
|
@@ -7230,15 +7319,15 @@ const Ns = class Ns extends et {
|
|
|
7230
7319
|
constructor(t) {
|
|
7231
7320
|
super(t);
|
|
7232
7321
|
/** {@link Disposable.onDisposed} */
|
|
7233
|
-
I(this, "onDisposed", new
|
|
7322
|
+
I(this, "onDisposed", new w());
|
|
7234
7323
|
/**
|
|
7235
7324
|
* Event triggered when fragments are loaded.
|
|
7236
7325
|
*/
|
|
7237
|
-
I(this, "onFragmentsLoaded", new
|
|
7326
|
+
I(this, "onFragmentsLoaded", new w());
|
|
7238
7327
|
/**
|
|
7239
7328
|
* Event triggered when fragments are disposed.
|
|
7240
7329
|
*/
|
|
7241
|
-
I(this, "onFragmentsDisposed", new
|
|
7330
|
+
I(this, "onFragmentsDisposed", new w());
|
|
7242
7331
|
/**
|
|
7243
7332
|
* Map containing all loaded fragments.
|
|
7244
7333
|
* The key is the fragment's unique identifier, and the value is the fragment itself.
|
|
@@ -7402,7 +7491,7 @@ const At = class At extends et {
|
|
|
7402
7491
|
/** {@link Component.enabled} */
|
|
7403
7492
|
I(this, "enabled", !0);
|
|
7404
7493
|
/** {@link Disposable.onDisposed} */
|
|
7405
|
-
I(this, "onDisposed", new
|
|
7494
|
+
I(this, "onDisposed", new w());
|
|
7406
7495
|
I(this, "_absoluteMin");
|
|
7407
7496
|
I(this, "_absoluteMax");
|
|
7408
7497
|
I(this, "_meshes", []);
|
|
@@ -7822,11 +7911,11 @@ const vn = /* @__PURE__ */ new Set([
|
|
|
7822
7911
|
*/
|
|
7823
7912
|
async export(t, e, i = !1, o = !0) {
|
|
7824
7913
|
const n = {}, r = new Set(t.GetIfcEntityList(e)), a = /* @__PURE__ */ new Set([
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7914
|
+
U.IFCPROJECT,
|
|
7915
|
+
U.IFCSITE,
|
|
7916
|
+
U.IFCBUILDING,
|
|
7917
|
+
U.IFCBUILDINGSTOREY,
|
|
7918
|
+
U.IFCSPACE
|
|
7830
7919
|
]);
|
|
7831
7920
|
for (const c of a)
|
|
7832
7921
|
r.add(c);
|
|
@@ -7987,7 +8076,7 @@ const Qr = {
|
|
|
7987
8076
|
4292641817: "IFCUNITARYEQUIPMENT",
|
|
7988
8077
|
3009204131: "IFCGRID"
|
|
7989
8078
|
};
|
|
7990
|
-
class
|
|
8079
|
+
class ca {
|
|
7991
8080
|
getAll(s, t) {
|
|
7992
8081
|
const e = {}, i = Object.keys(Qr).map((o) => parseInt(o, 10));
|
|
7993
8082
|
for (let o = 0; o < i.length; o++) {
|
|
@@ -9143,7 +9232,7 @@ const Bn = {
|
|
|
9143
9232
|
class Kt {
|
|
9144
9233
|
static async getUnits(s) {
|
|
9145
9234
|
var n, r, a;
|
|
9146
|
-
const { IFCUNITASSIGNMENT: t } =
|
|
9235
|
+
const { IFCUNITASSIGNMENT: t } = U, e = await s.getAllPropertiesOfType(t);
|
|
9147
9236
|
if (!e)
|
|
9148
9237
|
return 1;
|
|
9149
9238
|
const i = Object.keys(e), o = e[parseInt(i[0], 10)];
|
|
@@ -9194,19 +9283,19 @@ class Kt {
|
|
|
9194
9283
|
static async getQsetQuantities(s, t, e) {
|
|
9195
9284
|
const o = e ?? (() => {
|
|
9196
9285
|
}), n = await s.getProperties(t);
|
|
9197
|
-
return !n || n.type !==
|
|
9286
|
+
return !n || n.type !== U.IFCELEMENTQUANTITY ? null : (n.Quantities ?? [{}]).map((c) => (c.value && o(c.value), c.value)).filter((c) => c !== null);
|
|
9198
9287
|
}
|
|
9199
9288
|
static async getPsetProps(s, t, e) {
|
|
9200
9289
|
const o = e ?? (() => {
|
|
9201
9290
|
}), n = await s.getProperties(t);
|
|
9202
|
-
return !n || n.type !==
|
|
9291
|
+
return !n || n.type !== U.IFCPROPERTYSET ? null : (n.HasProperties ?? [{}]).map((c) => (c.value && o(c.value), c.value)).filter((c) => c !== null);
|
|
9203
9292
|
}
|
|
9204
9293
|
static async getPsetRel(s, t) {
|
|
9205
9294
|
var r;
|
|
9206
9295
|
if (!await s.getProperties(t))
|
|
9207
9296
|
return null;
|
|
9208
9297
|
const i = await s.getAllPropertiesOfType(
|
|
9209
|
-
|
|
9298
|
+
U.IFCRELDEFINESBYPROPERTIES
|
|
9210
9299
|
);
|
|
9211
9300
|
if (!i)
|
|
9212
9301
|
return null;
|
|
@@ -9297,7 +9386,7 @@ class jr {
|
|
|
9297
9386
|
try {
|
|
9298
9387
|
const e = s.GetLineIDsWithType(
|
|
9299
9388
|
0,
|
|
9300
|
-
|
|
9389
|
+
U.IFCUNITASSIGNMENT
|
|
9301
9390
|
).get(0), i = s.GetLine(0, e);
|
|
9302
9391
|
for (const o of i.Units) {
|
|
9303
9392
|
if (!o || o.value === null || o.value === void 0)
|
|
@@ -9344,11 +9433,11 @@ class Yn {
|
|
|
9344
9433
|
try {
|
|
9345
9434
|
const t = s.GetLineIDsWithType(
|
|
9346
9435
|
0,
|
|
9347
|
-
|
|
9348
|
-
), e = /* @__PURE__ */ new Set(), i = s.GetLineIDsWithType(0,
|
|
9436
|
+
U.IFCRELCONTAINEDINSPATIALSTRUCTURE
|
|
9437
|
+
), e = /* @__PURE__ */ new Set(), i = s.GetLineIDsWithType(0, U.IFCSPACE);
|
|
9349
9438
|
for (let c = 0; c < i.size(); c++)
|
|
9350
9439
|
e.add(i.get(c));
|
|
9351
|
-
const o = s.GetLineIDsWithType(0,
|
|
9440
|
+
const o = s.GetLineIDsWithType(0, U.IFCRELAGGREGATES), n = o.size();
|
|
9352
9441
|
for (let c = 0; c < n; c++) {
|
|
9353
9442
|
const h = o.get(c), d = s.GetLine(0, h);
|
|
9354
9443
|
if (!d || !d.RelatingObject || !d.RelatedObjects)
|
|
@@ -9403,7 +9492,7 @@ class Yn {
|
|
|
9403
9492
|
this.itemsByFloor = {};
|
|
9404
9493
|
}
|
|
9405
9494
|
}
|
|
9406
|
-
class
|
|
9495
|
+
class Li {
|
|
9407
9496
|
constructor() {
|
|
9408
9497
|
/** Whether to extract the IFC properties into a JSON. */
|
|
9409
9498
|
I(this, "includeProperties", !0);
|
|
@@ -9411,14 +9500,14 @@ class yi {
|
|
|
9411
9500
|
* Generate the geometry for categories that are not included by default,
|
|
9412
9501
|
* like IFCSPACE.
|
|
9413
9502
|
*/
|
|
9414
|
-
I(this, "optionalCategories", [
|
|
9503
|
+
I(this, "optionalCategories", [U.IFCSPACE]);
|
|
9415
9504
|
/** Whether to use the coordination data coming from the IFC files. */
|
|
9416
9505
|
I(this, "coordinate", !0);
|
|
9417
9506
|
/** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
9418
9507
|
I(this, "wasm", {
|
|
9419
9508
|
path: "",
|
|
9420
9509
|
absolute: !1,
|
|
9421
|
-
logLevel:
|
|
9510
|
+
logLevel: U.LogLevel.LOG_LEVEL_OFF
|
|
9422
9511
|
});
|
|
9423
9512
|
/** List of categories that won't be converted to fragments. */
|
|
9424
9513
|
I(this, "excludedCategories", /* @__PURE__ */ new Set());
|
|
@@ -9501,7 +9590,7 @@ class Vn {
|
|
|
9501
9590
|
class Gn {
|
|
9502
9591
|
getNameInfo(s) {
|
|
9503
9592
|
var d;
|
|
9504
|
-
const t = {}, { arguments: e } = s.GetHeaderLine(0,
|
|
9593
|
+
const t = {}, { arguments: e } = s.GetHeaderLine(0, U.FILE_NAME) || {};
|
|
9505
9594
|
if (!e)
|
|
9506
9595
|
return t;
|
|
9507
9596
|
const [
|
|
@@ -9522,7 +9611,7 @@ class Gn {
|
|
|
9522
9611
|
}
|
|
9523
9612
|
getDescriptionInfo(s) {
|
|
9524
9613
|
var n;
|
|
9525
|
-
const t = {}, { arguments: e } = s.GetHeaderLine(0,
|
|
9614
|
+
const t = {}, { arguments: e } = s.GetHeaderLine(0, U.FILE_DESCRIPTION) || {};
|
|
9526
9615
|
if (!e)
|
|
9527
9616
|
return t;
|
|
9528
9617
|
const [i, o] = e;
|
|
@@ -9536,15 +9625,15 @@ class Gn {
|
|
|
9536
9625
|
class zn {
|
|
9537
9626
|
static get(s, t) {
|
|
9538
9627
|
const e = [
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9628
|
+
U.IFCPROJECT,
|
|
9629
|
+
U.IFCSITE,
|
|
9630
|
+
U.IFCBUILDING,
|
|
9631
|
+
U.IFCBUILDINGSTOREY,
|
|
9632
|
+
U.IFCSPACE,
|
|
9633
|
+
U.IFCROAD,
|
|
9634
|
+
U.IFCFACILITY,
|
|
9635
|
+
U.IFCFACILITYPART,
|
|
9636
|
+
U.IFCBRIDGE
|
|
9548
9637
|
], i = s.data;
|
|
9549
9638
|
for (const o of e) {
|
|
9550
9639
|
const n = t.GetLineIDsWithType(0, o), r = n.size();
|
|
@@ -9559,24 +9648,24 @@ const Ge = class Ge extends et {
|
|
|
9559
9648
|
constructor(t) {
|
|
9560
9649
|
super(t);
|
|
9561
9650
|
/** {@link Disposable.onDisposed} */
|
|
9562
|
-
I(this, "onDisposed", new
|
|
9651
|
+
I(this, "onDisposed", new w());
|
|
9563
9652
|
/**
|
|
9564
9653
|
* An event triggered when the IFC file starts loading.
|
|
9565
9654
|
*/
|
|
9566
|
-
I(this, "onIfcStartedLoading", new
|
|
9655
|
+
I(this, "onIfcStartedLoading", new w());
|
|
9567
9656
|
/**
|
|
9568
9657
|
* An event triggered when the setup process is completed.
|
|
9569
9658
|
*/
|
|
9570
|
-
I(this, "onSetup", new
|
|
9659
|
+
I(this, "onSetup", new w());
|
|
9571
9660
|
/**
|
|
9572
9661
|
* The settings for the IfcLoader.
|
|
9573
9662
|
* It includes options for excluding categories, setting WASM paths, and more.
|
|
9574
9663
|
*/
|
|
9575
|
-
I(this, "settings", new
|
|
9664
|
+
I(this, "settings", new Li());
|
|
9576
9665
|
/**
|
|
9577
9666
|
* The instance of the Web-IFC library used for handling IFC data.
|
|
9578
9667
|
*/
|
|
9579
|
-
I(this, "webIfc", new
|
|
9668
|
+
I(this, "webIfc", new U.IfcAPI());
|
|
9580
9669
|
/** {@link Component.enabled} */
|
|
9581
9670
|
I(this, "enabled", !0);
|
|
9582
9671
|
I(this, "_material", new O.MeshLambertMaterial());
|
|
@@ -9589,7 +9678,7 @@ const Ge = class Ge extends et {
|
|
|
9589
9678
|
transparent: !0,
|
|
9590
9679
|
opacity: 0.5
|
|
9591
9680
|
}));
|
|
9592
|
-
this.components.add(Ge.uuid, this), this.settings.excludedCategories.add(
|
|
9681
|
+
this.components.add(Ge.uuid, this), this.settings.excludedCategories.add(U.IFCOPENINGELEMENT);
|
|
9593
9682
|
}
|
|
9594
9683
|
/** {@link Disposable.dispose} */
|
|
9595
9684
|
dispose() {
|
|
@@ -9684,7 +9773,7 @@ const Ge = class Ge extends et {
|
|
|
9684
9773
|
* ```
|
|
9685
9774
|
*/
|
|
9686
9775
|
cleanUp() {
|
|
9687
|
-
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new
|
|
9776
|
+
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new U.IfcAPI(), this._visitedFragments.clear(), this._fragmentInstances.clear();
|
|
9688
9777
|
}
|
|
9689
9778
|
async getAllGeometries() {
|
|
9690
9779
|
this._spatialTree.setUp(this.webIfc);
|
|
@@ -9699,7 +9788,7 @@ const Ge = class Ge extends et {
|
|
|
9699
9788
|
};
|
|
9700
9789
|
const i = [];
|
|
9701
9790
|
for (const n of t) {
|
|
9702
|
-
if (!this.webIfc.IsIfcElement(n) && n !==
|
|
9791
|
+
if (!this.webIfc.IsIfcElement(n) && n !== U.IFCSPACE || this.settings.excludedCategories.has(n))
|
|
9703
9792
|
continue;
|
|
9704
9793
|
const r = this.webIfc.GetLineIDsWithType(0, n), a = r.size();
|
|
9705
9794
|
for (let c = 0; c < a; c++) {
|
|
@@ -9805,11 +9894,11 @@ const Bt = class Bt extends et {
|
|
|
9805
9894
|
constructor(t) {
|
|
9806
9895
|
super(t);
|
|
9807
9896
|
/** {@link Disposable.onDisposed} */
|
|
9808
|
-
I(this, "onDisposed", new
|
|
9897
|
+
I(this, "onDisposed", new w());
|
|
9809
9898
|
/**
|
|
9810
9899
|
* Event triggered when a file is requested for export.
|
|
9811
9900
|
*/
|
|
9812
|
-
I(this, "onRequestFile", new
|
|
9901
|
+
I(this, "onRequestFile", new w());
|
|
9813
9902
|
/**
|
|
9814
9903
|
* ArrayBuffer containing the IFC data to be exported.
|
|
9815
9904
|
*/
|
|
@@ -9817,19 +9906,19 @@ const Bt = class Bt extends et {
|
|
|
9817
9906
|
/**
|
|
9818
9907
|
* Event triggered when an element is added to a Pset.
|
|
9819
9908
|
*/
|
|
9820
|
-
I(this, "onElementToPset", new
|
|
9909
|
+
I(this, "onElementToPset", new w());
|
|
9821
9910
|
/**
|
|
9822
9911
|
* Event triggered when a property is added to a Pset.
|
|
9823
9912
|
*/
|
|
9824
|
-
I(this, "onPropToPset", new
|
|
9913
|
+
I(this, "onPropToPset", new w());
|
|
9825
9914
|
/**
|
|
9826
9915
|
* Event triggered when a Pset is removed.
|
|
9827
9916
|
*/
|
|
9828
|
-
I(this, "onPsetRemoved", new
|
|
9917
|
+
I(this, "onPsetRemoved", new w());
|
|
9829
9918
|
/**
|
|
9830
9919
|
* Event triggered when data in the model changes.
|
|
9831
9920
|
*/
|
|
9832
|
-
I(this, "onDataChanged", new
|
|
9921
|
+
I(this, "onDataChanged", new w());
|
|
9833
9922
|
/**
|
|
9834
9923
|
* Configuration for the WebAssembly module.
|
|
9835
9924
|
*/
|
|
@@ -9901,7 +9990,7 @@ const Bt = class Bt extends et {
|
|
|
9901
9990
|
* @throws Will throw an error if no OwnerHistory is found in the model.
|
|
9902
9991
|
*/
|
|
9903
9992
|
async newPset(t, e, i) {
|
|
9904
|
-
const o = Bt.getIFCSchema(t), { ownerHistoryHandle: n } = await this.getOwnerHistory(t), r = this.newGUID(t), a = new
|
|
9993
|
+
const o = Bt.getIFCSchema(t), { ownerHistoryHandle: n } = await this.getOwnerHistory(t), r = this.newGUID(t), a = new U[o].IfcLabel(e), c = i ? new U[o].IfcText(i) : null, h = new U[o].IfcPropertySet(
|
|
9905
9994
|
r,
|
|
9906
9995
|
n,
|
|
9907
9996
|
a,
|
|
@@ -9909,13 +9998,13 @@ const Bt = class Bt extends et {
|
|
|
9909
9998
|
[]
|
|
9910
9999
|
);
|
|
9911
10000
|
h.expressID = this.increaseMaxID(t);
|
|
9912
|
-
const d = this.newGUID(t), E = new
|
|
10001
|
+
const d = this.newGUID(t), E = new U[o].IfcRelDefinesByProperties(
|
|
9913
10002
|
d,
|
|
9914
10003
|
n,
|
|
9915
10004
|
null,
|
|
9916
10005
|
null,
|
|
9917
10006
|
[],
|
|
9918
|
-
new
|
|
10007
|
+
new U.Handle(h.expressID)
|
|
9919
10008
|
);
|
|
9920
10009
|
return E.expressID = this.increaseMaxID(t), await this.setData(t, h, E), { pset: h, rel: E };
|
|
9921
10010
|
}
|
|
@@ -9934,7 +10023,7 @@ const Bt = class Bt extends et {
|
|
|
9934
10023
|
async removePset(t, ...e) {
|
|
9935
10024
|
for (const i of e) {
|
|
9936
10025
|
const o = await t.getProperties(i);
|
|
9937
|
-
if ((o == null ? void 0 : o.type) !==
|
|
10026
|
+
if ((o == null ? void 0 : o.type) !== U.IFCPROPERTYSET)
|
|
9938
10027
|
continue;
|
|
9939
10028
|
const n = await Kt.getPsetRel(t, i);
|
|
9940
10029
|
if (n && (await t.setProperties(n, null), this.registerChange(t, n)), o) {
|
|
@@ -10006,7 +10095,7 @@ const Bt = class Bt extends et {
|
|
|
10006
10095
|
*/
|
|
10007
10096
|
async removePsetProp(t, e, i) {
|
|
10008
10097
|
const o = await t.getProperties(e), n = await t.getProperties(i);
|
|
10009
|
-
!o || !n || o.type ===
|
|
10098
|
+
!o || !n || o.type === U.IFCPROPERTYSET && n && (o.HasProperties = o.HasProperties.filter((r) => r.value !== i), await t.setProperties(i, null), this.registerChange(t, e, i));
|
|
10010
10099
|
}
|
|
10011
10100
|
async addElementToPset(t, e, ...i) {
|
|
10012
10101
|
const o = await Kt.getPsetRel(t, e);
|
|
@@ -10016,7 +10105,7 @@ const Bt = class Bt extends et {
|
|
|
10016
10105
|
if (!n)
|
|
10017
10106
|
return;
|
|
10018
10107
|
for (const a of i) {
|
|
10019
|
-
const c = new
|
|
10108
|
+
const c = new U.Handle(a);
|
|
10020
10109
|
n.RelatedObjects.push(c), this.onElementToPset.trigger({
|
|
10021
10110
|
model: t,
|
|
10022
10111
|
psetID: e,
|
|
@@ -10047,7 +10136,7 @@ const Bt = class Bt extends et {
|
|
|
10047
10136
|
for (const n of i) {
|
|
10048
10137
|
if (o.HasProperties.includes(n))
|
|
10049
10138
|
continue;
|
|
10050
|
-
const r = new
|
|
10139
|
+
const r = new U.Handle(n);
|
|
10051
10140
|
o.HasProperties.push(r), this.onPropToPset.trigger({ model: t, psetID: e, propID: n });
|
|
10052
10141
|
}
|
|
10053
10142
|
this.registerChange(t, e);
|
|
@@ -10111,7 +10200,7 @@ const Bt = class Bt extends et {
|
|
|
10111
10200
|
const a = r.value;
|
|
10112
10201
|
if (a === void 0 || a == null)
|
|
10113
10202
|
throw new Error(`Attribute ${i} has a badly defined handle.`);
|
|
10114
|
-
const c = new
|
|
10203
|
+
const c = new w();
|
|
10115
10204
|
return Object.defineProperty(n[i], "value", {
|
|
10116
10205
|
get() {
|
|
10117
10206
|
return this._value;
|
|
@@ -10126,15 +10215,15 @@ const Bt = class Bt extends et {
|
|
|
10126
10215
|
}
|
|
10127
10216
|
newGUID(t) {
|
|
10128
10217
|
const e = Bt.getIFCSchema(t);
|
|
10129
|
-
return new
|
|
10218
|
+
return new U[e].IfcGloballyUniqueId(ze.create());
|
|
10130
10219
|
}
|
|
10131
10220
|
async getOwnerHistory(t) {
|
|
10132
10221
|
const e = await t.getAllPropertiesOfType(
|
|
10133
|
-
|
|
10222
|
+
U.IFCOWNERHISTORY
|
|
10134
10223
|
);
|
|
10135
10224
|
if (!e)
|
|
10136
10225
|
throw new Error("No OwnerHistory was found.");
|
|
10137
|
-
const i = Object.keys(e).map((r) => parseInt(r, 10)), o = e[i[0]], n = new
|
|
10226
|
+
const i = Object.keys(e).map((r) => parseInt(r, 10)), o = e[i[0]], n = new U.Handle(o.expressID);
|
|
10138
10227
|
return { ownerHistory: o, ownerHistoryHandle: n };
|
|
10139
10228
|
}
|
|
10140
10229
|
registerChange(t, ...e) {
|
|
@@ -10143,7 +10232,7 @@ const Bt = class Bt extends et {
|
|
|
10143
10232
|
this.changeMap[t.uuid].add(i), this.onDataChanged.trigger({ model: t, expressID: i });
|
|
10144
10233
|
}
|
|
10145
10234
|
async newSingleProperty(t, e, i, o) {
|
|
10146
|
-
const n = Bt.getIFCSchema(t), r = new
|
|
10235
|
+
const n = Bt.getIFCSchema(t), r = new U[n].IfcIdentifier(i), a = new U[n][e](o), c = new U[n].IfcPropertySingleValue(
|
|
10147
10236
|
r,
|
|
10148
10237
|
null,
|
|
10149
10238
|
a,
|
|
@@ -10158,7 +10247,7 @@ const Bt = class Bt extends et {
|
|
|
10158
10247
|
*/
|
|
10159
10248
|
I(Bt, "uuid", "58c2d9f0-183c-48d6-a402-dfcf5b9a34df");
|
|
10160
10249
|
let gn = Bt;
|
|
10161
|
-
const
|
|
10250
|
+
const Ls = class Ls extends et {
|
|
10162
10251
|
constructor(t) {
|
|
10163
10252
|
super(t);
|
|
10164
10253
|
/** {@link Component.enabled} */
|
|
@@ -10169,7 +10258,7 @@ const ys = class ys extends et {
|
|
|
10169
10258
|
*/
|
|
10170
10259
|
I(this, "list", {});
|
|
10171
10260
|
/** {@link Disposable.onDisposed} */
|
|
10172
|
-
I(this, "onDisposed", new
|
|
10261
|
+
I(this, "onDisposed", new w());
|
|
10173
10262
|
I(this, "onFragmentsDisposed", (t) => {
|
|
10174
10263
|
const { groupID: e, fragmentIDs: i } = t;
|
|
10175
10264
|
for (const o in this.list) {
|
|
@@ -10185,7 +10274,7 @@ const ys = class ys extends et {
|
|
|
10185
10274
|
}
|
|
10186
10275
|
}
|
|
10187
10276
|
});
|
|
10188
|
-
t.add(
|
|
10277
|
+
t.add(Ls.uuid, this), t.get(ht).onFragmentsDisposed.add(this.onFragmentsDisposed);
|
|
10189
10278
|
}
|
|
10190
10279
|
/** {@link Disposable.dispose} */
|
|
10191
10280
|
dispose() {
|
|
@@ -10513,13 +10602,13 @@ const ys = class ys extends et {
|
|
|
10513
10602
|
* A unique identifier for the component.
|
|
10514
10603
|
* This UUID is used to register the component within the Components system.
|
|
10515
10604
|
*/
|
|
10516
|
-
I(
|
|
10517
|
-
let Ai =
|
|
10518
|
-
const
|
|
10605
|
+
I(Ls, "uuid", "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");
|
|
10606
|
+
let Ai = Ls;
|
|
10607
|
+
const ys = class ys extends et {
|
|
10519
10608
|
constructor(t) {
|
|
10520
10609
|
super(t);
|
|
10521
10610
|
/** {@link Disposable.onDisposed} */
|
|
10522
|
-
I(this, "onDisposed", new
|
|
10611
|
+
I(this, "onDisposed", new w());
|
|
10523
10612
|
/** {@link Component.enabled} */
|
|
10524
10613
|
I(this, "enabled", !0);
|
|
10525
10614
|
/**
|
|
@@ -10539,7 +10628,7 @@ const Ls = class Ls extends et {
|
|
|
10539
10628
|
* This set is used to keep track of which items have been exploded.
|
|
10540
10629
|
*/
|
|
10541
10630
|
I(this, "list", /* @__PURE__ */ new Set());
|
|
10542
|
-
t.add(
|
|
10631
|
+
t.add(ys.uuid, this);
|
|
10543
10632
|
}
|
|
10544
10633
|
/** {@link Disposable.dispose} */
|
|
10545
10634
|
dispose() {
|
|
@@ -10583,8 +10672,8 @@ const Ls = class Ls extends et {
|
|
|
10583
10672
|
* A unique identifier for the component.
|
|
10584
10673
|
* This UUID is used to register the component within the Components system.
|
|
10585
10674
|
*/
|
|
10586
|
-
I(
|
|
10587
|
-
let On =
|
|
10675
|
+
I(ys, "uuid", "d260618b-ce88-4c7d-826c-6debb91de3e2");
|
|
10676
|
+
let On = ys;
|
|
10588
10677
|
const Ms = class Ms extends et {
|
|
10589
10678
|
constructor(t) {
|
|
10590
10679
|
super(t);
|
|
@@ -10641,7 +10730,7 @@ const Ms = class Ms extends et {
|
|
|
10641
10730
|
*/
|
|
10642
10731
|
I(Ms, "uuid", "dd9ccf2d-8a21-4821-b7f6-2949add16a29");
|
|
10643
10732
|
let Sn = Ms;
|
|
10644
|
-
class qr extends
|
|
10733
|
+
class qr extends Li {
|
|
10645
10734
|
constructor() {
|
|
10646
10735
|
super(...arguments);
|
|
10647
10736
|
/**
|
|
@@ -10663,24 +10752,24 @@ const ws = class ws extends et {
|
|
|
10663
10752
|
* Event triggered when geometry is streamed.
|
|
10664
10753
|
* Contains the streamed geometry data and its buffer.
|
|
10665
10754
|
*/
|
|
10666
|
-
I(this, "onGeometryStreamed", new
|
|
10755
|
+
I(this, "onGeometryStreamed", new w());
|
|
10667
10756
|
/**
|
|
10668
10757
|
* Event triggered when assets are streamed.
|
|
10669
10758
|
* Contains the streamed assets.
|
|
10670
10759
|
*/
|
|
10671
|
-
I(this, "onAssetStreamed", new
|
|
10760
|
+
I(this, "onAssetStreamed", new w());
|
|
10672
10761
|
/**
|
|
10673
10762
|
* Event triggered to indicate the progress of the streaming process.
|
|
10674
10763
|
* Contains the progress percentage.
|
|
10675
10764
|
*/
|
|
10676
|
-
I(this, "onProgress", new
|
|
10765
|
+
I(this, "onProgress", new w());
|
|
10677
10766
|
/**
|
|
10678
10767
|
* Event triggered when the IFC file is loaded.
|
|
10679
10768
|
* Contains the loaded IFC file data.
|
|
10680
10769
|
*/
|
|
10681
|
-
I(this, "onIfcLoaded", new
|
|
10770
|
+
I(this, "onIfcLoaded", new w());
|
|
10682
10771
|
/** {@link Disposable.onDisposed} */
|
|
10683
|
-
I(this, "onDisposed", new
|
|
10772
|
+
I(this, "onDisposed", new w());
|
|
10684
10773
|
/**
|
|
10685
10774
|
* Settings for the IfcGeometryTiler.
|
|
10686
10775
|
*/
|
|
@@ -10690,7 +10779,7 @@ const ws = class ws extends et {
|
|
|
10690
10779
|
/**
|
|
10691
10780
|
* The WebIFC API instance used for IFC file processing.
|
|
10692
10781
|
*/
|
|
10693
|
-
I(this, "webIfc", new
|
|
10782
|
+
I(this, "webIfc", new U.IfcAPI());
|
|
10694
10783
|
I(this, "_spatialTree", new Yn());
|
|
10695
10784
|
I(this, "_metaData", new Gn());
|
|
10696
10785
|
I(this, "_visitedGeometries", /* @__PURE__ */ new Map());
|
|
@@ -10701,7 +10790,7 @@ const ws = class ws extends et {
|
|
|
10701
10790
|
I(this, "_groupSerializer", new Vt.Serializer());
|
|
10702
10791
|
I(this, "_assets", []);
|
|
10703
10792
|
I(this, "_meshesWithHoles", /* @__PURE__ */ new Set());
|
|
10704
|
-
this.components.add(ws.uuid, this), this.settings.excludedCategories.add(
|
|
10793
|
+
this.components.add(ws.uuid, this), this.settings.excludedCategories.add(U.IFCOPENINGELEMENT);
|
|
10705
10794
|
}
|
|
10706
10795
|
/** {@link Disposable.dispose} */
|
|
10707
10796
|
dispose() {
|
|
@@ -10762,7 +10851,7 @@ const ws = class ws extends et {
|
|
|
10762
10851
|
};
|
|
10763
10852
|
let r = 0, a = 0;
|
|
10764
10853
|
for (const T of i) {
|
|
10765
|
-
if (!this.webIfc.IsIfcElement(T) && T !==
|
|
10854
|
+
if (!this.webIfc.IsIfcElement(T) && T !== U.IFCSPACE || this.settings.excludedCategories.has(T))
|
|
10766
10855
|
continue;
|
|
10767
10856
|
const R = this.webIfc.GetLineIDsWithType(0, T), C = R.size();
|
|
10768
10857
|
for (let A = 0; A < C; A++) {
|
|
@@ -10798,7 +10887,7 @@ const ws = class ws extends et {
|
|
|
10798
10887
|
this.onIfcLoaded.trigger(f), n.dispose(!0);
|
|
10799
10888
|
}
|
|
10800
10889
|
cleanUp() {
|
|
10801
|
-
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new
|
|
10890
|
+
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new U.IfcAPI(), this._visitedGeometries.clear(), this._geometries.clear(), this._assets = [], this._meshesWithHoles.clear();
|
|
10802
10891
|
}
|
|
10803
10892
|
getMesh(t, e, i) {
|
|
10804
10893
|
const o = e.geometries.size(), n = e.expressID, r = { id: n, geometries: [] };
|
|
@@ -10864,7 +10953,7 @@ const ws = class ws extends et {
|
|
|
10864
10953
|
*/
|
|
10865
10954
|
I(ws, "uuid", "d9999a00-e1f5-4d3f-8cfe-c56e08609764");
|
|
10866
10955
|
let _n = ws;
|
|
10867
|
-
class Kr extends
|
|
10956
|
+
class Kr extends Li {
|
|
10868
10957
|
constructor() {
|
|
10869
10958
|
super(...arguments);
|
|
10870
10959
|
/**
|
|
@@ -10893,7 +10982,7 @@ class $r extends et {
|
|
|
10893
10982
|
*/
|
|
10894
10983
|
I(this, "onIndicesStreamed", new Ts());
|
|
10895
10984
|
/** {@link Disposable.onDisposed} */
|
|
10896
|
-
I(this, "onDisposed", new
|
|
10985
|
+
I(this, "onDisposed", new w());
|
|
10897
10986
|
/** {@link Component.enabled} */
|
|
10898
10987
|
I(this, "enabled", !0);
|
|
10899
10988
|
/**
|
|
@@ -10903,7 +10992,7 @@ class $r extends et {
|
|
|
10903
10992
|
/**
|
|
10904
10993
|
* An instance of the IfcAPI class from the Web-IFC library, which provides methods for reading and processing IFC data.
|
|
10905
10994
|
*/
|
|
10906
|
-
I(this, "webIfc", new
|
|
10995
|
+
I(this, "webIfc", new U.IfcAPI());
|
|
10907
10996
|
}
|
|
10908
10997
|
/** {@link Disposable.dispose} */
|
|
10909
10998
|
async dispose() {
|
|
@@ -10937,11 +11026,11 @@ class $r extends et {
|
|
|
10937
11026
|
}
|
|
10938
11027
|
async streamAllProperties() {
|
|
10939
11028
|
const { propertiesSize: t } = this.settings, e = new Set(this.webIfc.GetIfcEntityList(0)), i = /* @__PURE__ */ new Set([
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
11029
|
+
U.IFCPROJECT,
|
|
11030
|
+
U.IFCSITE,
|
|
11031
|
+
U.IFCBUILDING,
|
|
11032
|
+
U.IFCBUILDINGSTOREY,
|
|
11033
|
+
U.IFCSPACE
|
|
10945
11034
|
]);
|
|
10946
11035
|
for (const c of i)
|
|
10947
11036
|
e.add(c);
|
|
@@ -10985,7 +11074,7 @@ class $r extends et {
|
|
|
10985
11074
|
await this.onIndicesStreamed.trigger(a);
|
|
10986
11075
|
}
|
|
10987
11076
|
cleanUp() {
|
|
10988
|
-
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new
|
|
11077
|
+
this.webIfc.Dispose(), this.webIfc = null, this.webIfc = new U.IfcAPI();
|
|
10989
11078
|
}
|
|
10990
11079
|
}
|
|
10991
11080
|
/**
|
|
@@ -11075,11 +11164,11 @@ const Ds = class Ds extends et {
|
|
|
11075
11164
|
g.add(m);
|
|
11076
11165
|
}
|
|
11077
11166
|
for (const m of C) {
|
|
11078
|
-
const g = d.get(m), { edges: S, indices: _ } = g, N = d.get(R), { edges:
|
|
11079
|
-
for (const
|
|
11080
|
-
|
|
11081
|
-
for (const
|
|
11082
|
-
|
|
11167
|
+
const g = d.get(m), { edges: S, indices: _ } = g, N = d.get(R), { edges: L, indices: D } = N;
|
|
11168
|
+
for (const y of S)
|
|
11169
|
+
L.add(y), h.set(y, R);
|
|
11170
|
+
for (const y of _)
|
|
11171
|
+
D.add(y);
|
|
11083
11172
|
d.delete(m);
|
|
11084
11173
|
}
|
|
11085
11174
|
}
|
|
@@ -11266,18 +11355,20 @@ export {
|
|
|
11266
11355
|
pi as Components,
|
|
11267
11356
|
Vr as CullerRenderer,
|
|
11268
11357
|
Ti as Cullers,
|
|
11358
|
+
ia as DataMap,
|
|
11359
|
+
sa as DataSet,
|
|
11269
11360
|
zt as Disposer,
|
|
11270
|
-
|
|
11361
|
+
w as Event,
|
|
11271
11362
|
On as Exploder,
|
|
11272
11363
|
Hr as FirstPersonMode,
|
|
11273
11364
|
ht as FragmentsManager,
|
|
11274
11365
|
vn as GeometryTypes,
|
|
11275
11366
|
dn as Grids,
|
|
11276
11367
|
Sn as Hider,
|
|
11277
|
-
|
|
11368
|
+
ca as IfcCategories,
|
|
11278
11369
|
Bn as IfcCategoryMap,
|
|
11279
11370
|
Qr as IfcElements,
|
|
11280
|
-
|
|
11371
|
+
Li as IfcFragmentSettings,
|
|
11281
11372
|
_n as IfcGeometryTiler,
|
|
11282
11373
|
mi as IfcJsonExporter,
|
|
11283
11374
|
Ri as IfcLoader,
|
|
@@ -11293,7 +11384,7 @@ export {
|
|
|
11293
11384
|
An as MiniMaps,
|
|
11294
11385
|
Ar as Mouse,
|
|
11295
11386
|
Wr as OrbitMode,
|
|
11296
|
-
|
|
11387
|
+
aa as OrthoPerspectiveCamera,
|
|
11297
11388
|
kr as PlanMode,
|
|
11298
11389
|
Xr as ProjectionManager,
|
|
11299
11390
|
Kr as PropertiesStreamingSettings,
|
|
@@ -11302,11 +11393,11 @@ export {
|
|
|
11302
11393
|
Pr as SimpleGrid,
|
|
11303
11394
|
Pi as SimplePlane,
|
|
11304
11395
|
Fr as SimpleRaycaster,
|
|
11305
|
-
|
|
11306
|
-
|
|
11396
|
+
ra as SimpleRenderer,
|
|
11397
|
+
oa as SimpleScene,
|
|
11307
11398
|
gr as SimpleWorld,
|
|
11308
11399
|
ze as UUID,
|
|
11309
|
-
|
|
11400
|
+
na as VertexPicker,
|
|
11310
11401
|
Ci as Worlds,
|
|
11311
11402
|
Rr as isPointInFrontOfPlane,
|
|
11312
11403
|
mr as obbFromPoints,
|