@thatopen/components 2.1.12 → 2.1.14
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/index.cjs +5 -5
- package/dist/index.mjs +357 -284
- package/dist/namespace.d.ts +2363 -2317
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ 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
8
|
import * as x from "web-ifc";
|
|
@@ -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], U = l[A + 5], b = y - U, B = y + U;
|
|
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, U = L - m;
|
|
323
|
+
p.left = D, D.boundingData = new Float32Array(6), Gs(f, y, U, D.boundingData, u), F(D, y, U, u, _ + 1);
|
|
324
|
+
const b = new qe(), B = L, H = g - U;
|
|
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
|
}
|
|
@@ -556,8 +556,8 @@ Ft.prototype.intersectsTriangle = function() {
|
|
|
556
556
|
let U = E.start;
|
|
557
557
|
E.start = E.end, E.end = U;
|
|
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], U = t[T], b = U.start, B = U.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
|
|
789
|
+
let L = function(y) {
|
|
790
790
|
const { uint16Array: U, uint32Array: b } = Z;
|
|
791
|
-
let B =
|
|
791
|
+
let B = y * 2;
|
|
792
792
|
for (; !Et(B, U); )
|
|
793
|
-
|
|
794
|
-
return dt(
|
|
795
|
-
},
|
|
793
|
+
y = pt(y), B = y * 2;
|
|
794
|
+
return dt(y, b);
|
|
795
|
+
}, D = function(y) {
|
|
796
796
|
const { uint16Array: U, uint32Array: b } = Z;
|
|
797
|
-
let B =
|
|
797
|
+
let B = y * 2;
|
|
798
798
|
for (; !Et(B, U); )
|
|
799
|
-
|
|
800
|
-
return dt(
|
|
799
|
+
y = Ct(y, b), B = y * 2;
|
|
800
|
+
return dt(y, b) + ft(B, U);
|
|
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), U = i.getY(D), b = i.getZ(D);
|
|
940
|
+
y < F && (F = y), y > g && (g = y), U < p && (p = U), U > S && (S = U), 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 (
|
|
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
954
|
for (let U = 0; U < 3; U++) {
|
|
955
955
|
const b = C + U, B = A + U, H = a[b], q = a[b + 3], st = a[B], Q = a[B + 3];
|
|
956
956
|
a[E + U] = H < st ? H : st, a[E + U + 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, U = m + g; y < U; 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,10 +1122,10 @@ 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 U =
|
|
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 U = D + y;
|
|
1129
1129
|
U = e ? e[U] : U;
|
|
1130
1130
|
const b = i.getX(U), B = i.getY(U), H = i.getZ(U);
|
|
1131
1131
|
b < F && (F = b), b > g && (g = b), B < p && (p = B), B > S && (S = B), H < m && (m = H), H > _ && (_ = H);
|
|
@@ -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 (
|
|
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
1146
|
for (let U = 0; U < 3; U++) {
|
|
1147
1147
|
const b = C + U, B = A + U, H = a[b], q = a[b + 3], st = a[B], Q = a[B + 3];
|
|
1148
1148
|
a[E + U] = H < st ? H : st, a[E + U + 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 *
|
|
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
1254
|
for (let U = m, b = m + g; U < b; U++) {
|
|
1255
1255
|
const B = l.resolveTriangleIndex(U);
|
|
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 = U, p =
|
|
1258
|
+
if (H < A && (T.copy(f), C && C.copy(R), A = H, F = U, 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 *
|
|
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
1271
|
const U = E.distanceToTriangle(u, f, R);
|
|
1272
|
-
if (U < A && (T.copy(f), C && C.copy(R), A = U, F =
|
|
1272
|
+
if (U < A && (T.copy(f), C && C.copy(R), A = U, F = L, p = _), U < 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,11 +1414,11 @@ 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
|
-
|
|
1417
|
+
const y = vt.getPrimitive();
|
|
1418
|
+
y.copy(Xs).applyMatrix4(t);
|
|
1419
1419
|
const U = pt(l), b = Ct(l, f);
|
|
1420
1420
|
K(U, u, ae), K(b, u, ce);
|
|
1421
|
-
const B =
|
|
1421
|
+
const B = y.intersectsBox(ae), H = y.intersectsBox(ce);
|
|
1422
1422
|
S = B && Tt(
|
|
1423
1423
|
_,
|
|
1424
1424
|
U,
|
|
@@ -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,11 +1461,11 @@ 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
|
-
|
|
1464
|
+
const y = vt.getPrimitive();
|
|
1465
|
+
y.copy(Zs).applyMatrix4(t);
|
|
1466
1466
|
const U = pt(l), b = Ct(l, f);
|
|
1467
1467
|
K(U, u, ae), K(b, u, ce);
|
|
1468
|
-
const B =
|
|
1468
|
+
const B = y.intersectsBox(ae), H = y.intersectsBox(ce);
|
|
1469
1469
|
S = B && Tt(
|
|
1470
1470
|
N,
|
|
1471
1471
|
U,
|
|
@@ -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, U = -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), U = Math.max(L.dot(J), U), 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 + U));
|
|
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 = U - 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.14");
|
|
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, U = n.y - C, b = n.z - A;
|
|
3501
|
+
return N * y + L * U + 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, U = 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, U), this._isUserControllingDolly = !0) : (this._zoomInternal(D * Es, y, U), 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.
|
|
@@ -4845,7 +4892,7 @@ class We extends cr {
|
|
|
4845
4892
|
throw new Error("This camera needs a renderer to work!");
|
|
4846
4893
|
ot.install({ THREE: We.getSubsetOfThree() });
|
|
4847
4894
|
const { domElement: t } = this.currentWorld.renderer.three, e = new ot(this.three, t);
|
|
4848
|
-
return e.smoothTime = 0.2, e.dollyToCursor = !0, e.infinityDolly = !0, e;
|
|
4895
|
+
return e.smoothTime = 0.2, e.dollyToCursor = !0, e.infinityDolly = !0, e.minDistance = 6, e;
|
|
4849
4896
|
}
|
|
4850
4897
|
setupEvents(t) {
|
|
4851
4898
|
t ? window.addEventListener("resize", this.updateAspect) : window.removeEventListener("resize", this.updateAspect);
|
|
@@ -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]]
|
|
@@ -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(U)), 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
|
/**
|
|
@@ -6903,7 +6974,7 @@ const Zr = /* @__PURE__ */ new Map([
|
|
|
6903
6974
|
constructor(t) {
|
|
6904
6975
|
super(t);
|
|
6905
6976
|
/** {@link Disposable.onDisposed} */
|
|
6906
|
-
I(this, "onDisposed", new
|
|
6977
|
+
I(this, "onDisposed", new w());
|
|
6907
6978
|
/**
|
|
6908
6979
|
* Event triggered when relations for a model have been indexed.
|
|
6909
6980
|
* This event provides the model's UUID and the relations map generated for that model.
|
|
@@ -6912,7 +6983,7 @@ const Zr = /* @__PURE__ */ new Map([
|
|
|
6912
6983
|
* @property {RelationsMap} relationsMap - The relations map generated for the specified model.
|
|
6913
6984
|
* 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
6985
|
*/
|
|
6915
|
-
I(this, "onRelationsIndexed", new
|
|
6986
|
+
I(this, "onRelationsIndexed", new w());
|
|
6916
6987
|
/**
|
|
6917
6988
|
* Holds the relationship mappings for each model processed by the indexer.
|
|
6918
6989
|
* The structure is a map where each key is a model's UUID, and the value is another map.
|
|
@@ -6965,7 +7036,7 @@ const Zr = /* @__PURE__ */ new Map([
|
|
|
6965
7036
|
if (!(n && r))
|
|
6966
7037
|
return;
|
|
6967
7038
|
const a = e[n].value, c = e[r].map((E) => E.value), h = t.get(a) ?? /* @__PURE__ */ new Map(), d = this.getAttributeIndex(o);
|
|
6968
|
-
d && (h.set(d, c), t.set(a, h));
|
|
7039
|
+
d !== null && (h.set(d, c), t.set(a, h));
|
|
6969
7040
|
for (const E of c) {
|
|
6970
7041
|
const u = t.get(E) ?? /* @__PURE__ */ new Map(), f = this.getAttributeIndex(i);
|
|
6971
7042
|
if (!f)
|
|
@@ -7230,15 +7301,15 @@ const Ns = class Ns extends et {
|
|
|
7230
7301
|
constructor(t) {
|
|
7231
7302
|
super(t);
|
|
7232
7303
|
/** {@link Disposable.onDisposed} */
|
|
7233
|
-
I(this, "onDisposed", new
|
|
7304
|
+
I(this, "onDisposed", new w());
|
|
7234
7305
|
/**
|
|
7235
7306
|
* Event triggered when fragments are loaded.
|
|
7236
7307
|
*/
|
|
7237
|
-
I(this, "onFragmentsLoaded", new
|
|
7308
|
+
I(this, "onFragmentsLoaded", new w());
|
|
7238
7309
|
/**
|
|
7239
7310
|
* Event triggered when fragments are disposed.
|
|
7240
7311
|
*/
|
|
7241
|
-
I(this, "onFragmentsDisposed", new
|
|
7312
|
+
I(this, "onFragmentsDisposed", new w());
|
|
7242
7313
|
/**
|
|
7243
7314
|
* Map containing all loaded fragments.
|
|
7244
7315
|
* The key is the fragment's unique identifier, and the value is the fragment itself.
|
|
@@ -7402,7 +7473,7 @@ const At = class At extends et {
|
|
|
7402
7473
|
/** {@link Component.enabled} */
|
|
7403
7474
|
I(this, "enabled", !0);
|
|
7404
7475
|
/** {@link Disposable.onDisposed} */
|
|
7405
|
-
I(this, "onDisposed", new
|
|
7476
|
+
I(this, "onDisposed", new w());
|
|
7406
7477
|
I(this, "_absoluteMin");
|
|
7407
7478
|
I(this, "_absoluteMax");
|
|
7408
7479
|
I(this, "_meshes", []);
|
|
@@ -7987,7 +8058,7 @@ const Qr = {
|
|
|
7987
8058
|
4292641817: "IFCUNITARYEQUIPMENT",
|
|
7988
8059
|
3009204131: "IFCGRID"
|
|
7989
8060
|
};
|
|
7990
|
-
class
|
|
8061
|
+
class ca {
|
|
7991
8062
|
getAll(s, t) {
|
|
7992
8063
|
const e = {}, i = Object.keys(Qr).map((o) => parseInt(o, 10));
|
|
7993
8064
|
for (let o = 0; o < i.length; o++) {
|
|
@@ -9403,7 +9474,7 @@ class Yn {
|
|
|
9403
9474
|
this.itemsByFloor = {};
|
|
9404
9475
|
}
|
|
9405
9476
|
}
|
|
9406
|
-
class
|
|
9477
|
+
class Li {
|
|
9407
9478
|
constructor() {
|
|
9408
9479
|
/** Whether to extract the IFC properties into a JSON. */
|
|
9409
9480
|
I(this, "includeProperties", !0);
|
|
@@ -9559,20 +9630,20 @@ const Ge = class Ge extends et {
|
|
|
9559
9630
|
constructor(t) {
|
|
9560
9631
|
super(t);
|
|
9561
9632
|
/** {@link Disposable.onDisposed} */
|
|
9562
|
-
I(this, "onDisposed", new
|
|
9633
|
+
I(this, "onDisposed", new w());
|
|
9563
9634
|
/**
|
|
9564
9635
|
* An event triggered when the IFC file starts loading.
|
|
9565
9636
|
*/
|
|
9566
|
-
I(this, "onIfcStartedLoading", new
|
|
9637
|
+
I(this, "onIfcStartedLoading", new w());
|
|
9567
9638
|
/**
|
|
9568
9639
|
* An event triggered when the setup process is completed.
|
|
9569
9640
|
*/
|
|
9570
|
-
I(this, "onSetup", new
|
|
9641
|
+
I(this, "onSetup", new w());
|
|
9571
9642
|
/**
|
|
9572
9643
|
* The settings for the IfcLoader.
|
|
9573
9644
|
* It includes options for excluding categories, setting WASM paths, and more.
|
|
9574
9645
|
*/
|
|
9575
|
-
I(this, "settings", new
|
|
9646
|
+
I(this, "settings", new Li());
|
|
9576
9647
|
/**
|
|
9577
9648
|
* The instance of the Web-IFC library used for handling IFC data.
|
|
9578
9649
|
*/
|
|
@@ -9805,11 +9876,11 @@ const Bt = class Bt extends et {
|
|
|
9805
9876
|
constructor(t) {
|
|
9806
9877
|
super(t);
|
|
9807
9878
|
/** {@link Disposable.onDisposed} */
|
|
9808
|
-
I(this, "onDisposed", new
|
|
9879
|
+
I(this, "onDisposed", new w());
|
|
9809
9880
|
/**
|
|
9810
9881
|
* Event triggered when a file is requested for export.
|
|
9811
9882
|
*/
|
|
9812
|
-
I(this, "onRequestFile", new
|
|
9883
|
+
I(this, "onRequestFile", new w());
|
|
9813
9884
|
/**
|
|
9814
9885
|
* ArrayBuffer containing the IFC data to be exported.
|
|
9815
9886
|
*/
|
|
@@ -9817,19 +9888,19 @@ const Bt = class Bt extends et {
|
|
|
9817
9888
|
/**
|
|
9818
9889
|
* Event triggered when an element is added to a Pset.
|
|
9819
9890
|
*/
|
|
9820
|
-
I(this, "onElementToPset", new
|
|
9891
|
+
I(this, "onElementToPset", new w());
|
|
9821
9892
|
/**
|
|
9822
9893
|
* Event triggered when a property is added to a Pset.
|
|
9823
9894
|
*/
|
|
9824
|
-
I(this, "onPropToPset", new
|
|
9895
|
+
I(this, "onPropToPset", new w());
|
|
9825
9896
|
/**
|
|
9826
9897
|
* Event triggered when a Pset is removed.
|
|
9827
9898
|
*/
|
|
9828
|
-
I(this, "onPsetRemoved", new
|
|
9899
|
+
I(this, "onPsetRemoved", new w());
|
|
9829
9900
|
/**
|
|
9830
9901
|
* Event triggered when data in the model changes.
|
|
9831
9902
|
*/
|
|
9832
|
-
I(this, "onDataChanged", new
|
|
9903
|
+
I(this, "onDataChanged", new w());
|
|
9833
9904
|
/**
|
|
9834
9905
|
* Configuration for the WebAssembly module.
|
|
9835
9906
|
*/
|
|
@@ -10111,7 +10182,7 @@ const Bt = class Bt extends et {
|
|
|
10111
10182
|
const a = r.value;
|
|
10112
10183
|
if (a === void 0 || a == null)
|
|
10113
10184
|
throw new Error(`Attribute ${i} has a badly defined handle.`);
|
|
10114
|
-
const c = new
|
|
10185
|
+
const c = new w();
|
|
10115
10186
|
return Object.defineProperty(n[i], "value", {
|
|
10116
10187
|
get() {
|
|
10117
10188
|
return this._value;
|
|
@@ -10158,7 +10229,7 @@ const Bt = class Bt extends et {
|
|
|
10158
10229
|
*/
|
|
10159
10230
|
I(Bt, "uuid", "58c2d9f0-183c-48d6-a402-dfcf5b9a34df");
|
|
10160
10231
|
let gn = Bt;
|
|
10161
|
-
const
|
|
10232
|
+
const Ls = class Ls extends et {
|
|
10162
10233
|
constructor(t) {
|
|
10163
10234
|
super(t);
|
|
10164
10235
|
/** {@link Component.enabled} */
|
|
@@ -10169,7 +10240,7 @@ const ys = class ys extends et {
|
|
|
10169
10240
|
*/
|
|
10170
10241
|
I(this, "list", {});
|
|
10171
10242
|
/** {@link Disposable.onDisposed} */
|
|
10172
|
-
I(this, "onDisposed", new
|
|
10243
|
+
I(this, "onDisposed", new w());
|
|
10173
10244
|
I(this, "onFragmentsDisposed", (t) => {
|
|
10174
10245
|
const { groupID: e, fragmentIDs: i } = t;
|
|
10175
10246
|
for (const o in this.list) {
|
|
@@ -10185,7 +10256,7 @@ const ys = class ys extends et {
|
|
|
10185
10256
|
}
|
|
10186
10257
|
}
|
|
10187
10258
|
});
|
|
10188
|
-
t.add(
|
|
10259
|
+
t.add(Ls.uuid, this), t.get(ht).onFragmentsDisposed.add(this.onFragmentsDisposed);
|
|
10189
10260
|
}
|
|
10190
10261
|
/** {@link Disposable.dispose} */
|
|
10191
10262
|
dispose() {
|
|
@@ -10513,13 +10584,13 @@ const ys = class ys extends et {
|
|
|
10513
10584
|
* A unique identifier for the component.
|
|
10514
10585
|
* This UUID is used to register the component within the Components system.
|
|
10515
10586
|
*/
|
|
10516
|
-
I(
|
|
10517
|
-
let Ai =
|
|
10518
|
-
const
|
|
10587
|
+
I(Ls, "uuid", "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");
|
|
10588
|
+
let Ai = Ls;
|
|
10589
|
+
const ys = class ys extends et {
|
|
10519
10590
|
constructor(t) {
|
|
10520
10591
|
super(t);
|
|
10521
10592
|
/** {@link Disposable.onDisposed} */
|
|
10522
|
-
I(this, "onDisposed", new
|
|
10593
|
+
I(this, "onDisposed", new w());
|
|
10523
10594
|
/** {@link Component.enabled} */
|
|
10524
10595
|
I(this, "enabled", !0);
|
|
10525
10596
|
/**
|
|
@@ -10539,7 +10610,7 @@ const Ls = class Ls extends et {
|
|
|
10539
10610
|
* This set is used to keep track of which items have been exploded.
|
|
10540
10611
|
*/
|
|
10541
10612
|
I(this, "list", /* @__PURE__ */ new Set());
|
|
10542
|
-
t.add(
|
|
10613
|
+
t.add(ys.uuid, this);
|
|
10543
10614
|
}
|
|
10544
10615
|
/** {@link Disposable.dispose} */
|
|
10545
10616
|
dispose() {
|
|
@@ -10583,8 +10654,8 @@ const Ls = class Ls extends et {
|
|
|
10583
10654
|
* A unique identifier for the component.
|
|
10584
10655
|
* This UUID is used to register the component within the Components system.
|
|
10585
10656
|
*/
|
|
10586
|
-
I(
|
|
10587
|
-
let On =
|
|
10657
|
+
I(ys, "uuid", "d260618b-ce88-4c7d-826c-6debb91de3e2");
|
|
10658
|
+
let On = ys;
|
|
10588
10659
|
const Ms = class Ms extends et {
|
|
10589
10660
|
constructor(t) {
|
|
10590
10661
|
super(t);
|
|
@@ -10641,7 +10712,7 @@ const Ms = class Ms extends et {
|
|
|
10641
10712
|
*/
|
|
10642
10713
|
I(Ms, "uuid", "dd9ccf2d-8a21-4821-b7f6-2949add16a29");
|
|
10643
10714
|
let Sn = Ms;
|
|
10644
|
-
class qr extends
|
|
10715
|
+
class qr extends Li {
|
|
10645
10716
|
constructor() {
|
|
10646
10717
|
super(...arguments);
|
|
10647
10718
|
/**
|
|
@@ -10663,24 +10734,24 @@ const ws = class ws extends et {
|
|
|
10663
10734
|
* Event triggered when geometry is streamed.
|
|
10664
10735
|
* Contains the streamed geometry data and its buffer.
|
|
10665
10736
|
*/
|
|
10666
|
-
I(this, "onGeometryStreamed", new
|
|
10737
|
+
I(this, "onGeometryStreamed", new w());
|
|
10667
10738
|
/**
|
|
10668
10739
|
* Event triggered when assets are streamed.
|
|
10669
10740
|
* Contains the streamed assets.
|
|
10670
10741
|
*/
|
|
10671
|
-
I(this, "onAssetStreamed", new
|
|
10742
|
+
I(this, "onAssetStreamed", new w());
|
|
10672
10743
|
/**
|
|
10673
10744
|
* Event triggered to indicate the progress of the streaming process.
|
|
10674
10745
|
* Contains the progress percentage.
|
|
10675
10746
|
*/
|
|
10676
|
-
I(this, "onProgress", new
|
|
10747
|
+
I(this, "onProgress", new w());
|
|
10677
10748
|
/**
|
|
10678
10749
|
* Event triggered when the IFC file is loaded.
|
|
10679
10750
|
* Contains the loaded IFC file data.
|
|
10680
10751
|
*/
|
|
10681
|
-
I(this, "onIfcLoaded", new
|
|
10752
|
+
I(this, "onIfcLoaded", new w());
|
|
10682
10753
|
/** {@link Disposable.onDisposed} */
|
|
10683
|
-
I(this, "onDisposed", new
|
|
10754
|
+
I(this, "onDisposed", new w());
|
|
10684
10755
|
/**
|
|
10685
10756
|
* Settings for the IfcGeometryTiler.
|
|
10686
10757
|
*/
|
|
@@ -10864,7 +10935,7 @@ const ws = class ws extends et {
|
|
|
10864
10935
|
*/
|
|
10865
10936
|
I(ws, "uuid", "d9999a00-e1f5-4d3f-8cfe-c56e08609764");
|
|
10866
10937
|
let _n = ws;
|
|
10867
|
-
class Kr extends
|
|
10938
|
+
class Kr extends Li {
|
|
10868
10939
|
constructor() {
|
|
10869
10940
|
super(...arguments);
|
|
10870
10941
|
/**
|
|
@@ -10893,7 +10964,7 @@ class $r extends et {
|
|
|
10893
10964
|
*/
|
|
10894
10965
|
I(this, "onIndicesStreamed", new Ts());
|
|
10895
10966
|
/** {@link Disposable.onDisposed} */
|
|
10896
|
-
I(this, "onDisposed", new
|
|
10967
|
+
I(this, "onDisposed", new w());
|
|
10897
10968
|
/** {@link Component.enabled} */
|
|
10898
10969
|
I(this, "enabled", !0);
|
|
10899
10970
|
/**
|
|
@@ -11075,11 +11146,11 @@ const Ds = class Ds extends et {
|
|
|
11075
11146
|
g.add(m);
|
|
11076
11147
|
}
|
|
11077
11148
|
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
|
-
|
|
11149
|
+
const g = d.get(m), { edges: S, indices: _ } = g, N = d.get(R), { edges: L, indices: D } = N;
|
|
11150
|
+
for (const y of S)
|
|
11151
|
+
L.add(y), h.set(y, R);
|
|
11152
|
+
for (const y of _)
|
|
11153
|
+
D.add(y);
|
|
11083
11154
|
d.delete(m);
|
|
11084
11155
|
}
|
|
11085
11156
|
}
|
|
@@ -11266,18 +11337,20 @@ export {
|
|
|
11266
11337
|
pi as Components,
|
|
11267
11338
|
Vr as CullerRenderer,
|
|
11268
11339
|
Ti as Cullers,
|
|
11340
|
+
ia as DataMap,
|
|
11341
|
+
sa as DataSet,
|
|
11269
11342
|
zt as Disposer,
|
|
11270
|
-
|
|
11343
|
+
w as Event,
|
|
11271
11344
|
On as Exploder,
|
|
11272
11345
|
Hr as FirstPersonMode,
|
|
11273
11346
|
ht as FragmentsManager,
|
|
11274
11347
|
vn as GeometryTypes,
|
|
11275
11348
|
dn as Grids,
|
|
11276
11349
|
Sn as Hider,
|
|
11277
|
-
|
|
11350
|
+
ca as IfcCategories,
|
|
11278
11351
|
Bn as IfcCategoryMap,
|
|
11279
11352
|
Qr as IfcElements,
|
|
11280
|
-
|
|
11353
|
+
Li as IfcFragmentSettings,
|
|
11281
11354
|
_n as IfcGeometryTiler,
|
|
11282
11355
|
mi as IfcJsonExporter,
|
|
11283
11356
|
Ri as IfcLoader,
|
|
@@ -11293,7 +11366,7 @@ export {
|
|
|
11293
11366
|
An as MiniMaps,
|
|
11294
11367
|
Ar as Mouse,
|
|
11295
11368
|
Wr as OrbitMode,
|
|
11296
|
-
|
|
11369
|
+
aa as OrthoPerspectiveCamera,
|
|
11297
11370
|
kr as PlanMode,
|
|
11298
11371
|
Xr as ProjectionManager,
|
|
11299
11372
|
Kr as PropertiesStreamingSettings,
|
|
@@ -11302,11 +11375,11 @@ export {
|
|
|
11302
11375
|
Pr as SimpleGrid,
|
|
11303
11376
|
Pi as SimplePlane,
|
|
11304
11377
|
Fr as SimpleRaycaster,
|
|
11305
|
-
|
|
11306
|
-
|
|
11378
|
+
ra as SimpleRenderer,
|
|
11379
|
+
oa as SimpleScene,
|
|
11307
11380
|
gr as SimpleWorld,
|
|
11308
11381
|
ze as UUID,
|
|
11309
|
-
|
|
11382
|
+
na as VertexPicker,
|
|
11310
11383
|
Ci as Worlds,
|
|
11311
11384
|
Rr as isPointInFrontOfPlane,
|
|
11312
11385
|
mr as obbFromPoints,
|