@thatopen/components 2.2.9 → 2.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/Components/index.d.ts +1 -1
- package/dist/core/Viewpoints/index.d.ts +1 -0
- package/dist/core/Viewpoints/src/Viewpoint.d.ts +12 -5
- package/dist/core/Viewpoints/src/types.d.ts +3 -0
- package/dist/core/Worlds/index.d.ts +2 -16
- package/dist/core/Worlds/src/simple-world.d.ts +2 -2
- package/dist/fragments/FragmentsManager/index.d.ts +8 -0
- package/dist/fragments/IfcLoader/index.d.ts +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.mjs +1012 -1007
- package/dist/namespace.d.ts +2965 -2956
- package/dist/openbim/BCFTopics/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var so = Object.defineProperty;
|
|
2
2
|
var io = (c, s, t) => s in c ? so(c, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[s] = t;
|
|
3
|
-
var
|
|
3
|
+
var _ = (c, s, t) => (io(c, typeof s != "symbol" ? s + "" : s, t), t);
|
|
4
4
|
import * as M from "three";
|
|
5
|
-
import { BufferAttribute as Nr, Vector3 as q, Vector2 as Je, Plane as gn, Line3 as he, Triangle as je, Sphere as no, Matrix4 as de, Box3 as se, BackSide as ro, DoubleSide as br, FrontSide as Pn, Mesh as rt, Ray as oo, Raycaster as ao, Quaternion as le, Object3D as
|
|
6
|
-
import * as
|
|
5
|
+
import { BufferAttribute as Nr, Vector3 as q, Vector2 as Je, Plane as gn, Line3 as he, Triangle as je, Sphere as no, Matrix4 as de, Box3 as se, BackSide as ro, DoubleSide as br, FrontSide as Pn, Mesh as rt, Ray as oo, Raycaster as ao, Quaternion as le, Object3D as Qi, Euler as co, MeshBasicMaterial as Pr, LineBasicMaterial as lo, CylinderGeometry as zt, BoxGeometry as Dt, BufferGeometry as Ln, Float32BufferAttribute as Mn, OctahedronGeometry as Ms, Line as Ie, SphereGeometry as ho, TorusGeometry as rs, PlaneGeometry as uo } from "three";
|
|
6
|
+
import * as ye from "@thatopen/fragments";
|
|
7
7
|
import { Serializer as fo } from "@thatopen/fragments";
|
|
8
8
|
import * as X from "web-ifc";
|
|
9
|
-
const Lr = 0, po = 1, Eo = 2, xn = 2,
|
|
9
|
+
const Lr = 0, po = 1, Eo = 2, xn = 2, Ni = 1.25, vn = 1, ri = 6 * 4 + 4 + 4, wi = 65535, mo = Math.pow(2, -24), bi = Symbol("SKIP_GENERATION");
|
|
10
10
|
function Io(c) {
|
|
11
11
|
return c.index ? c.index.count : c.attributes.position.count;
|
|
12
12
|
}
|
|
@@ -91,7 +91,7 @@ function os(c) {
|
|
|
91
91
|
const s = c[3] - c[0], t = c[4] - c[1], e = c[5] - c[2];
|
|
92
92
|
return 2 * (s * t + t * e + e * s);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Pi(c, s, t, e, i = null) {
|
|
95
95
|
let n = 1 / 0, r = 1 / 0, o = 1 / 0, a = -1 / 0, l = -1 / 0, h = -1 / 0, d = 1 / 0, u = 1 / 0, f = 1 / 0, E = -1 / 0, p = -1 / 0, I = -1 / 0;
|
|
96
96
|
const m = i !== null;
|
|
97
97
|
for (let C = s * 6, R = (s + t) * 6; C < R; C += 6) {
|
|
@@ -99,8 +99,8 @@ function bi(c, s, t, e, i = null) {
|
|
|
99
99
|
F < n && (n = F), S > a && (a = S), m && g < d && (d = g), m && g > E && (E = g);
|
|
100
100
|
const L = c[C + 2], N = c[C + 3], x = L - N, k = L + N;
|
|
101
101
|
x < r && (r = x), k > l && (l = k), m && L < u && (u = L), m && L > p && (p = L);
|
|
102
|
-
const w = c[C + 4], P = c[C + 5],
|
|
103
|
-
|
|
102
|
+
const w = c[C + 4], P = c[C + 5], T = w - P, v = w + P;
|
|
103
|
+
T < o && (o = T), v > h && (h = v), m && w < f && (f = w), m && w > I && (I = w);
|
|
104
104
|
}
|
|
105
105
|
e[0] = n, e[1] = r, e[2] = o, e[3] = a, e[4] = l, e[5] = h, m && (i[0] = d, i[1] = u, i[2] = f, i[3] = E, i[4] = p, i[5] = I);
|
|
106
106
|
}
|
|
@@ -139,7 +139,7 @@ function Ro(c, s) {
|
|
|
139
139
|
}
|
|
140
140
|
return n;
|
|
141
141
|
}
|
|
142
|
-
const fe = 32, yo = (c, s) => c.candidate - s.candidate,
|
|
142
|
+
const fe = 32, yo = (c, s) => c.candidate - s.candidate, ge = new Array(fe).fill().map(() => ({
|
|
143
143
|
count: 0,
|
|
144
144
|
bounds: new Float32Array(6),
|
|
145
145
|
rightCacheBounds: new Float32Array(6),
|
|
@@ -154,12 +154,12 @@ function wo(c, s, t, e, i, n) {
|
|
|
154
154
|
r = Dn(c), r !== -1 && (o = Fo(t, e, i, r));
|
|
155
155
|
else if (n === Eo) {
|
|
156
156
|
const a = os(c);
|
|
157
|
-
let l =
|
|
157
|
+
let l = Ni * i;
|
|
158
158
|
const h = e * 6, d = (e + i) * 6;
|
|
159
159
|
for (let u = 0; u < 3; u++) {
|
|
160
160
|
const f = s[u], I = (s[u + 3] - f) / fe;
|
|
161
161
|
if (i < fe / 4) {
|
|
162
|
-
const m = [...
|
|
162
|
+
const m = [...ge];
|
|
163
163
|
m.length = i;
|
|
164
164
|
let C = 0;
|
|
165
165
|
for (let g = h; g < d; g += 6, C++) {
|
|
@@ -194,12 +194,12 @@ function wo(c, s, t, e, i, n) {
|
|
|
194
194
|
F !== 0 && (x = os(L) / a);
|
|
195
195
|
let k = 0;
|
|
196
196
|
S !== 0 && (k = os(N) / a);
|
|
197
|
-
const w = vn +
|
|
197
|
+
const w = vn + Ni * (x * F + k * S);
|
|
198
198
|
w < l && (r = u, l = w, o = y.candidate);
|
|
199
199
|
}
|
|
200
200
|
} else {
|
|
201
201
|
for (let R = 0; R < fe; R++) {
|
|
202
|
-
const g =
|
|
202
|
+
const g = ge[R];
|
|
203
203
|
g.count = 0, g.candidate = f + I + R * I;
|
|
204
204
|
const y = g.bounds;
|
|
205
205
|
for (let F = 0; F < 3; F++)
|
|
@@ -208,24 +208,24 @@ function wo(c, s, t, e, i, n) {
|
|
|
208
208
|
for (let R = h; R < d; R += 6) {
|
|
209
209
|
let F = ~~((t[R + 2 * u] - f) / I);
|
|
210
210
|
F >= fe && (F = fe - 1);
|
|
211
|
-
const S =
|
|
211
|
+
const S = ge[F];
|
|
212
212
|
S.count++, xs(R, t, S.bounds);
|
|
213
213
|
}
|
|
214
|
-
const m =
|
|
214
|
+
const m = ge[fe - 1];
|
|
215
215
|
Un(m.bounds, m.rightCacheBounds);
|
|
216
216
|
for (let R = fe - 2; R >= 0; R--) {
|
|
217
|
-
const g =
|
|
217
|
+
const g = ge[R], y = ge[R + 1];
|
|
218
218
|
Bn(g.bounds, y.rightCacheBounds, g.rightCacheBounds);
|
|
219
219
|
}
|
|
220
220
|
let C = 0;
|
|
221
221
|
for (let R = 0; R < fe - 1; R++) {
|
|
222
|
-
const g =
|
|
222
|
+
const g = ge[R], y = g.count, F = g.bounds, L = ge[R + 1].rightCacheBounds;
|
|
223
223
|
y !== 0 && (C === 0 ? Un(F, vs) : Bn(F, vs, vs)), C += y;
|
|
224
224
|
let N = 0, x = 0;
|
|
225
225
|
C !== 0 && (N = os(vs) / a);
|
|
226
226
|
const k = i - C;
|
|
227
227
|
k !== 0 && (x = os(L) / a);
|
|
228
|
-
const w = vn +
|
|
228
|
+
const w = vn + Ni * (N * C + x * k);
|
|
229
229
|
w < l && (r = u, l = w, o = g.candidate);
|
|
230
230
|
}
|
|
231
231
|
}
|
|
@@ -302,7 +302,7 @@ function bo(c, s) {
|
|
|
302
302
|
} else
|
|
303
303
|
for (let g of m) {
|
|
304
304
|
const y = new Ds();
|
|
305
|
-
y.boundingData = new Float32Array(6),
|
|
305
|
+
y.boundingData = new Float32Array(6), Pi(E, g.offset, g.count, y.boundingData, f), R(y, g.offset, g.count, f), I.push(y);
|
|
306
306
|
}
|
|
307
307
|
return I;
|
|
308
308
|
function C(g) {
|
|
@@ -320,9 +320,9 @@ function bo(c, s) {
|
|
|
320
320
|
else {
|
|
321
321
|
g.splitAxis = N.axis;
|
|
322
322
|
const k = new Ds(), w = y, P = x - y;
|
|
323
|
-
g.left = k, k.boundingData = new Float32Array(6),
|
|
324
|
-
const
|
|
325
|
-
g.right =
|
|
323
|
+
g.left = k, k.boundingData = new Float32Array(6), Pi(E, w, P, k.boundingData, f), R(k, w, P, f, L + 1);
|
|
324
|
+
const T = new Ds(), v = x, j = F - P;
|
|
325
|
+
g.right = T, T.boundingData = new Float32Array(6), Pi(E, v, j, T.boundingData, f), R(T, v, j, f, L + 1);
|
|
326
326
|
}
|
|
327
327
|
return g;
|
|
328
328
|
}
|
|
@@ -352,7 +352,7 @@ function Po(c, s) {
|
|
|
352
352
|
i[f + m] = I[m];
|
|
353
353
|
if (p) {
|
|
354
354
|
const m = u.offset, C = u.count;
|
|
355
|
-
return n[f + 6] = m, r[E + 14] = C, r[E + 15] =
|
|
355
|
+
return n[f + 6] = m, r[E + 14] = C, r[E + 15] = wi, d + ri;
|
|
356
356
|
} else {
|
|
357
357
|
const m = u.left, C = u.right, R = u.splitAxis;
|
|
358
358
|
let g;
|
|
@@ -454,7 +454,7 @@ const Lo = function() {
|
|
|
454
454
|
return !1;
|
|
455
455
|
};
|
|
456
456
|
}(), xo = 1e-15;
|
|
457
|
-
function
|
|
457
|
+
function Li(c) {
|
|
458
458
|
return Math.abs(c) < xo;
|
|
459
459
|
}
|
|
460
460
|
class ee extends je {
|
|
@@ -495,13 +495,13 @@ ee.prototype.intersectsTriangle = function() {
|
|
|
495
495
|
for (let y = 0; y < 3; y++) {
|
|
496
496
|
const { start: F, end: S } = h;
|
|
497
497
|
F.copy(C[y]), S.copy(C[(y + 1) % 3]), h.delta(r);
|
|
498
|
-
const L =
|
|
499
|
-
if (
|
|
498
|
+
const L = Li(I.distanceToPoint(F));
|
|
499
|
+
if (Li(I.normal.dot(r)) && L) {
|
|
500
500
|
m.copy(h), R = 2;
|
|
501
501
|
break;
|
|
502
502
|
}
|
|
503
503
|
const N = I.intersectLine(h, f);
|
|
504
|
-
if (!N && L && f.copy(F), (N || L) && !
|
|
504
|
+
if (!N && L && f.copy(F), (N || L) && !Li(f.distanceTo(S))) {
|
|
505
505
|
if (R <= 1)
|
|
506
506
|
(R === 1 ? m.start : m.end).copy(f), L && (g = R);
|
|
507
507
|
else if (R >= 2) {
|
|
@@ -697,8 +697,8 @@ Bt.prototype.distanceToBox = function() {
|
|
|
697
697
|
for (let C = 0; C <= 1; C++) {
|
|
698
698
|
const R = (I + 1) % 3, g = (I + 2) % 3, y = m << R | C << g, F = 1 << I | m << R | C << g, S = f[y], L = f[F];
|
|
699
699
|
s[p].set(S, L);
|
|
700
|
-
const x = c[I], k = c[R], w = c[g], P = t[p],
|
|
701
|
-
|
|
700
|
+
const x = c[I], k = c[R], w = c[g], P = t[p], T = P.start, v = P.end;
|
|
701
|
+
T[x] = d[x], T[k] = m ? d[k] : u[k], T[w] = C ? d[w] : u[k], v[x] = u[x], v[k] = m ? d[k] : u[k], v[w] = C ? d[w] : u[k], p++;
|
|
702
702
|
}
|
|
703
703
|
for (let I = 0; I <= 1; I++)
|
|
704
704
|
for (let m = 0; m <= 1; m++)
|
|
@@ -770,50 +770,50 @@ class Do {
|
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
772
|
const At = new Do();
|
|
773
|
-
let
|
|
773
|
+
let Re, Qe;
|
|
774
774
|
const ve = [], Us = /* @__PURE__ */ new Tn(() => new se());
|
|
775
775
|
function Uo(c, s, t, e, i, n) {
|
|
776
|
-
|
|
777
|
-
const r =
|
|
778
|
-
At.clearBuffer(), Us.releasePrimitive(
|
|
776
|
+
Re = Us.getPrimitive(), Qe = Us.getPrimitive(), ve.push(Re, Qe), At.setBuffer(c._roots[s]);
|
|
777
|
+
const r = qi(0, c.geometry, t, e, i, n);
|
|
778
|
+
At.clearBuffer(), Us.releasePrimitive(Re), Us.releasePrimitive(Qe), ve.pop(), ve.pop();
|
|
779
779
|
const o = ve.length;
|
|
780
|
-
return o > 0 && (Qe = ve[o - 1],
|
|
780
|
+
return o > 0 && (Qe = ve[o - 1], Re = ve[o - 2]), r;
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function qi(c, s, t, e, i = null, n = 0, r = 0) {
|
|
783
783
|
const { float32Array: o, uint16Array: a, uint32Array: l } = At;
|
|
784
784
|
let h = c * 2;
|
|
785
785
|
if (Vt(h, a)) {
|
|
786
786
|
const u = Yt(c, l), f = Zt(h, a);
|
|
787
|
-
return wt(c, o,
|
|
787
|
+
return wt(c, o, Re), e(u, f, !1, r, n + c, Re);
|
|
788
788
|
} else {
|
|
789
789
|
let x = function(w) {
|
|
790
|
-
const { uint16Array: P, uint32Array:
|
|
790
|
+
const { uint16Array: P, uint32Array: T } = At;
|
|
791
791
|
let v = w * 2;
|
|
792
792
|
for (; !Vt(v, P); )
|
|
793
793
|
w = $t(w), v = w * 2;
|
|
794
|
-
return Yt(w,
|
|
794
|
+
return Yt(w, T);
|
|
795
795
|
}, k = function(w) {
|
|
796
|
-
const { uint16Array: P, uint32Array:
|
|
796
|
+
const { uint16Array: P, uint32Array: T } = At;
|
|
797
797
|
let v = w * 2;
|
|
798
798
|
for (; !Vt(v, P); )
|
|
799
|
-
w = jt(w,
|
|
800
|
-
return Yt(w,
|
|
799
|
+
w = jt(w, T), v = w * 2;
|
|
800
|
+
return Yt(w, T) + Zt(v, P);
|
|
801
801
|
};
|
|
802
802
|
const u = $t(c), f = jt(c, l);
|
|
803
803
|
let E = u, p = f, I, m, C, R;
|
|
804
|
-
if (i && (C =
|
|
804
|
+
if (i && (C = Re, R = Qe, wt(E, o, C), wt(p, o, R), I = i(C), m = i(R), m < I)) {
|
|
805
805
|
E = f, p = u;
|
|
806
806
|
const w = I;
|
|
807
807
|
I = m, m = w, C = R;
|
|
808
808
|
}
|
|
809
|
-
C || (C =
|
|
809
|
+
C || (C = Re, wt(E, o, C));
|
|
810
810
|
const g = Vt(E * 2, a), y = t(C, g, I, r + 1, n + E);
|
|
811
811
|
let F;
|
|
812
812
|
if (y === xn) {
|
|
813
|
-
const w = x(E),
|
|
814
|
-
F = e(w,
|
|
813
|
+
const w = x(E), T = k(E) - w;
|
|
814
|
+
F = e(w, T, !0, r + 1, n + E, C);
|
|
815
815
|
} else
|
|
816
|
-
F = y &&
|
|
816
|
+
F = y && qi(
|
|
817
817
|
E,
|
|
818
818
|
s,
|
|
819
819
|
t,
|
|
@@ -828,10 +828,10 @@ function Qi(c, s, t, e, i = null, n = 0, r = 0) {
|
|
|
828
828
|
const S = Vt(p * 2, a), L = t(R, S, m, r + 1, n + p);
|
|
829
829
|
let N;
|
|
830
830
|
if (L === xn) {
|
|
831
|
-
const w = x(p),
|
|
832
|
-
N = e(w,
|
|
831
|
+
const w = x(p), T = k(p) - w;
|
|
832
|
+
N = e(w, T, !0, r + 1, n + p, R);
|
|
833
833
|
} else
|
|
834
|
-
N = L &&
|
|
834
|
+
N = L && qi(
|
|
835
835
|
p,
|
|
836
836
|
s,
|
|
837
837
|
t,
|
|
@@ -843,7 +843,7 @@ function Qi(c, s, t, e, i = null, n = 0, r = 0) {
|
|
|
843
843
|
return !!N;
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
|
-
const as = /* @__PURE__ */ new q(),
|
|
846
|
+
const as = /* @__PURE__ */ new q(), Mi = /* @__PURE__ */ new q();
|
|
847
847
|
function Bo(c, s, t = {}, e = 0, i = 1 / 0) {
|
|
848
848
|
const n = e * e, r = i * i;
|
|
849
849
|
let o = 1 / 0, a = null;
|
|
@@ -854,13 +854,13 @@ function Bo(c, s, t = {}, e = 0, i = 1 / 0) {
|
|
|
854
854
|
intersectsTriangle: (h, d) => {
|
|
855
855
|
h.closestPointToPoint(s, as);
|
|
856
856
|
const u = s.distanceToSquared(as);
|
|
857
|
-
return u < o && (
|
|
857
|
+
return u < o && (Mi.copy(as), o = u, a = d), u < n;
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
), o === 1 / 0)
|
|
861
861
|
return null;
|
|
862
862
|
const l = Math.sqrt(o);
|
|
863
|
-
return t.point ? t.point.copy(
|
|
863
|
+
return t.point ? t.point.copy(Mi) : t.point = Mi.clone(), t.distance = l, t.faceIndex = a, t;
|
|
864
864
|
}
|
|
865
865
|
const De = /* @__PURE__ */ new q(), Ue = /* @__PURE__ */ new q(), Be = /* @__PURE__ */ new q(), Bs = /* @__PURE__ */ new Je(), zs = /* @__PURE__ */ new Je(), ks = /* @__PURE__ */ new Je(), zn = /* @__PURE__ */ new q(), kn = /* @__PURE__ */ new q(), Vn = /* @__PURE__ */ new q(), Vs = /* @__PURE__ */ new q();
|
|
866
866
|
function zo(c, s, t, e, i, n) {
|
|
@@ -886,7 +886,7 @@ function ko(c, s, t, e, i, n, r, o, a) {
|
|
|
886
886
|
}
|
|
887
887
|
return l;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function Fi(c, s, t, e, i) {
|
|
890
890
|
const n = e * 3;
|
|
891
891
|
let r = n + 0, o = n + 1, a = n + 2;
|
|
892
892
|
const l = c.index;
|
|
@@ -902,14 +902,14 @@ function Pt(c, s, t, e) {
|
|
|
902
902
|
function Vo(c, s, t, e, i, n) {
|
|
903
903
|
const { geometry: r, _indirectBuffer: o } = c;
|
|
904
904
|
for (let a = e, l = e + i; a < l; a++)
|
|
905
|
-
|
|
905
|
+
Fi(r, s, t, a, n);
|
|
906
906
|
}
|
|
907
907
|
function Yo(c, s, t, e, i) {
|
|
908
908
|
const { geometry: n, _indirectBuffer: r } = c;
|
|
909
909
|
let o = 1 / 0, a = null;
|
|
910
910
|
for (let l = e, h = e + i; l < h; l++) {
|
|
911
911
|
let d;
|
|
912
|
-
d =
|
|
912
|
+
d = Fi(n, s, t, l), d && d.distance < o && (a = d, o = d.distance);
|
|
913
913
|
}
|
|
914
914
|
return a;
|
|
915
915
|
}
|
|
@@ -931,13 +931,13 @@ function Ho(c, s = null) {
|
|
|
931
931
|
n = h[u], r = new Uint32Array(n), o = new Uint16Array(n), a = new Float32Array(n), d(0, l), l += n.byteLength;
|
|
932
932
|
function d(u, f, E = !1) {
|
|
933
933
|
const p = u * 2;
|
|
934
|
-
if (o[p + 15] ===
|
|
934
|
+
if (o[p + 15] === wi) {
|
|
935
935
|
const m = r[u + 6], C = o[p + 14];
|
|
936
936
|
let R = 1 / 0, g = 1 / 0, y = 1 / 0, F = -1 / 0, S = -1 / 0, L = -1 / 0;
|
|
937
937
|
for (let N = 3 * m, x = 3 * (m + C); N < x; N++) {
|
|
938
938
|
let k = e[N];
|
|
939
|
-
const w = i.getX(k), P = i.getY(k),
|
|
940
|
-
w < R && (R = w), w > F && (F = w), P < g && (g = P), P > S && (S = P),
|
|
939
|
+
const w = i.getX(k), P = i.getY(k), T = i.getZ(k);
|
|
940
|
+
w < R && (R = w), w > F && (F = w), P < g && (g = P), P > S && (S = P), T < y && (y = T), T > L && (L = T);
|
|
941
941
|
}
|
|
942
942
|
return a[u + 0] !== R || a[u + 1] !== g || a[u + 2] !== y || a[u + 3] !== F || a[u + 4] !== S || a[u + 5] !== L ? (a[u + 0] = R, a[u + 1] = g, a[u + 2] = y, a[u + 3] = F, a[u + 4] = S, a[u + 5] = L, !0) : !1;
|
|
943
943
|
} else {
|
|
@@ -952,22 +952,22 @@ function Ho(c, s = null) {
|
|
|
952
952
|
const w = x || k;
|
|
953
953
|
if (w)
|
|
954
954
|
for (let P = 0; P < 3; P++) {
|
|
955
|
-
const
|
|
956
|
-
a[u + P] =
|
|
955
|
+
const T = m + P, v = C + P, j = a[T], V = a[T + 3], et = a[v], H = a[v + 3];
|
|
956
|
+
a[u + P] = j < et ? j : et, a[u + P + 3] = V > H ? V : H;
|
|
957
957
|
}
|
|
958
958
|
return w;
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
const Yn = /* @__PURE__ */ new se();
|
|
963
|
-
function
|
|
963
|
+
function we(c, s, t, e) {
|
|
964
964
|
return wt(c, s, Yn), t.intersectBox(Yn, e);
|
|
965
965
|
}
|
|
966
966
|
function Wo(c, s, t, e, i, n) {
|
|
967
967
|
const { geometry: r, _indirectBuffer: o } = c;
|
|
968
968
|
for (let a = e, l = e + i; a < l; a++) {
|
|
969
969
|
let h = o ? o[a] : a;
|
|
970
|
-
|
|
970
|
+
Fi(r, s, t, h, n);
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
function Xo(c, s, t, e, i) {
|
|
@@ -975,7 +975,7 @@ function Xo(c, s, t, e, i) {
|
|
|
975
975
|
let o = 1 / 0, a = null;
|
|
976
976
|
for (let l = e, h = e + i; l < h; l++) {
|
|
977
977
|
let d;
|
|
978
|
-
d =
|
|
978
|
+
d = Fi(n, s, t, r ? r[l] : l), d && d.distance < o && (a = d, o = d.distance);
|
|
979
979
|
}
|
|
980
980
|
return a;
|
|
981
981
|
}
|
|
@@ -990,27 +990,27 @@ function Zo(c, s, t, e, i, n, r) {
|
|
|
990
990
|
}
|
|
991
991
|
const Gn = /* @__PURE__ */ new q();
|
|
992
992
|
function $o(c, s, t, e, i) {
|
|
993
|
-
At.setBuffer(c._roots[s]),
|
|
993
|
+
At.setBuffer(c._roots[s]), Ki(0, c, t, e, i), At.clearBuffer();
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function Ki(c, s, t, e, i) {
|
|
996
996
|
const { float32Array: n, uint16Array: r, uint32Array: o } = At, a = c * 2;
|
|
997
997
|
if (Vt(a, r)) {
|
|
998
998
|
const h = Yt(c, o), d = Zt(a, r);
|
|
999
999
|
Vo(s, t, e, h, d, i);
|
|
1000
1000
|
} else {
|
|
1001
1001
|
const h = $t(c);
|
|
1002
|
-
|
|
1002
|
+
we(h, n, e, Gn) && Ki(h, s, t, e, i);
|
|
1003
1003
|
const d = jt(c, o);
|
|
1004
|
-
|
|
1004
|
+
we(d, n, e, Gn) && Ki(d, s, t, e, i);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
const Hn = /* @__PURE__ */ new q(), jo = ["x", "y", "z"];
|
|
1008
1008
|
function Qo(c, s, t, e) {
|
|
1009
1009
|
At.setBuffer(c._roots[s]);
|
|
1010
|
-
const i =
|
|
1010
|
+
const i = Ji(0, c, t, e);
|
|
1011
1011
|
return At.clearBuffer(), i;
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function Ji(c, s, t, e) {
|
|
1014
1014
|
const { float32Array: i, uint16Array: n, uint32Array: r } = At;
|
|
1015
1015
|
let o = c * 2;
|
|
1016
1016
|
if (Vt(o, n)) {
|
|
@@ -1020,7 +1020,7 @@ function Ki(c, s, t, e) {
|
|
|
1020
1020
|
const l = vr(c, r), h = jo[l], u = e.direction[h] >= 0;
|
|
1021
1021
|
let f, E;
|
|
1022
1022
|
u ? (f = $t(c), E = jt(c, r)) : (f = jt(c, r), E = $t(c));
|
|
1023
|
-
const I =
|
|
1023
|
+
const I = we(f, i, e, Hn) ? Ji(f, s, t, e) : null;
|
|
1024
1024
|
if (I) {
|
|
1025
1025
|
const R = I.point[h];
|
|
1026
1026
|
if (u ? R <= i[E + l] : (
|
|
@@ -1029,17 +1029,17 @@ function Ki(c, s, t, e) {
|
|
|
1029
1029
|
))
|
|
1030
1030
|
return I;
|
|
1031
1031
|
}
|
|
1032
|
-
const C =
|
|
1032
|
+
const C = we(E, i, e, Hn) ? Ji(E, s, t, e) : null;
|
|
1033
1033
|
return I && C ? I.distance <= C.distance ? I : C : I || C || null;
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
1036
|
const Ys = /* @__PURE__ */ new se(), ze = /* @__PURE__ */ new ee(), ke = /* @__PURE__ */ new ee(), cs = /* @__PURE__ */ new de(), Wn = /* @__PURE__ */ new Bt(), Gs = /* @__PURE__ */ new Bt();
|
|
1037
1037
|
function qo(c, s, t, e) {
|
|
1038
1038
|
At.setBuffer(c._roots[s]);
|
|
1039
|
-
const i =
|
|
1039
|
+
const i = tn(0, c, t, e);
|
|
1040
1040
|
return At.clearBuffer(), i;
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function tn(c, s, t, e, i = null) {
|
|
1043
1043
|
const { float32Array: n, uint16Array: r, uint32Array: o } = At;
|
|
1044
1044
|
let a = c * 2;
|
|
1045
1045
|
if (i === null && (t.boundingBox || t.computeBoundingBox(), Wn.set(t.boundingBox.min, t.boundingBox.max, e), i = Wn), Vt(a, r)) {
|
|
@@ -1063,19 +1063,19 @@ function Ji(c, s, t, e, i = null) {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
} else {
|
|
1065
1065
|
const h = c + 8, d = o[c + 6];
|
|
1066
|
-
return wt(h, n, Ys), !!(i.intersectsBox(Ys) &&
|
|
1066
|
+
return wt(h, n, Ys), !!(i.intersectsBox(Ys) && tn(h, s, t, e, i) || (wt(d, n, Ys), i.intersectsBox(Ys) && tn(d, s, t, e, i)));
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
|
-
const Hs = /* @__PURE__ */ new de(),
|
|
1069
|
+
const Hs = /* @__PURE__ */ new de(), xi = /* @__PURE__ */ new Bt(), ls = /* @__PURE__ */ new Bt(), Ko = /* @__PURE__ */ new q(), Jo = /* @__PURE__ */ new q(), ta = /* @__PURE__ */ new q(), ea = /* @__PURE__ */ new q();
|
|
1070
1070
|
function sa(c, s, t, e = {}, i = {}, n = 0, r = 1 / 0) {
|
|
1071
|
-
s.boundingBox || s.computeBoundingBox(),
|
|
1071
|
+
s.boundingBox || s.computeBoundingBox(), xi.set(s.boundingBox.min, s.boundingBox.max, t), xi.needsUpdate = !0;
|
|
1072
1072
|
const o = c.geometry, a = o.attributes.position, l = o.index, h = s.attributes.position, d = s.index, u = Xt.getPrimitive(), f = Xt.getPrimitive();
|
|
1073
1073
|
let E = Ko, p = Jo, I = null, m = null;
|
|
1074
1074
|
i && (I = ta, m = ea);
|
|
1075
1075
|
let C = 1 / 0, R = null, g = null;
|
|
1076
1076
|
return Hs.copy(t).invert(), ls.matrix.copy(Hs), c.shapecast(
|
|
1077
1077
|
{
|
|
1078
|
-
boundsTraverseOrder: (y) =>
|
|
1078
|
+
boundsTraverseOrder: (y) => xi.distanceToBox(y),
|
|
1079
1079
|
intersectsBounds: (y, F, S) => S < C && S < r ? (F && (ls.min.copy(y.min), ls.max.copy(y.max), ls.needsUpdate = !0), !0) : !1,
|
|
1080
1080
|
intersectsRange: (y, F) => {
|
|
1081
1081
|
if (s.boundsTree)
|
|
@@ -1087,8 +1087,8 @@ function sa(c, s, t, e = {}, i = {}, n = 0, r = 1 / 0) {
|
|
|
1087
1087
|
Pt(f, 3 * x, d, h), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
|
|
1088
1088
|
for (let w = y, P = y + F; w < P; w++) {
|
|
1089
1089
|
Pt(u, 3 * w, l, a), u.needsUpdate = !0;
|
|
1090
|
-
const
|
|
1091
|
-
if (
|
|
1090
|
+
const T = u.distanceToTriangle(f, E, I);
|
|
1091
|
+
if (T < C && (p.copy(E), m && m.copy(I), C = T, R = w, g = x), T < n)
|
|
1092
1092
|
return !0;
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
@@ -1119,7 +1119,7 @@ function ia(c, s = null) {
|
|
|
1119
1119
|
n = h[u], r = new Uint32Array(n), o = new Uint16Array(n), a = new Float32Array(n), d(0, l), l += n.byteLength;
|
|
1120
1120
|
function d(u, f, E = !1) {
|
|
1121
1121
|
const p = u * 2;
|
|
1122
|
-
if (o[p + 15] ===
|
|
1122
|
+
if (o[p + 15] === wi) {
|
|
1123
1123
|
const m = r[u + 6], C = o[p + 14];
|
|
1124
1124
|
let R = 1 / 0, g = 1 / 0, y = 1 / 0, F = -1 / 0, S = -1 / 0, L = -1 / 0;
|
|
1125
1125
|
for (let N = m, x = m + C; N < x; N++) {
|
|
@@ -1127,8 +1127,8 @@ function ia(c, s = null) {
|
|
|
1127
1127
|
for (let w = 0; w < 3; w++) {
|
|
1128
1128
|
let P = k + w;
|
|
1129
1129
|
P = e ? e[P] : P;
|
|
1130
|
-
const
|
|
1131
|
-
|
|
1130
|
+
const T = i.getX(P), v = i.getY(P), j = i.getZ(P);
|
|
1131
|
+
T < R && (R = T), T > F && (F = T), v < g && (g = v), v > S && (S = v), j < y && (y = j), j > L && (L = j);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
1134
|
return a[u + 0] !== R || a[u + 1] !== g || a[u + 2] !== y || a[u + 3] !== F || a[u + 4] !== S || a[u + 5] !== L ? (a[u + 0] = R, a[u + 1] = g, a[u + 2] = y, a[u + 3] = F, a[u + 4] = S, a[u + 5] = L, !0) : !1;
|
|
@@ -1144,8 +1144,8 @@ function ia(c, s = null) {
|
|
|
1144
1144
|
const w = x || k;
|
|
1145
1145
|
if (w)
|
|
1146
1146
|
for (let P = 0; P < 3; P++) {
|
|
1147
|
-
const
|
|
1148
|
-
a[u + P] =
|
|
1147
|
+
const T = m + P, v = C + P, j = a[T], V = a[T + 3], et = a[v], H = a[v + 3];
|
|
1148
|
+
a[u + P] = j < et ? j : et, a[u + P + 3] = V > H ? V : H;
|
|
1149
1149
|
}
|
|
1150
1150
|
return w;
|
|
1151
1151
|
}
|
|
@@ -1153,27 +1153,27 @@ function ia(c, s = null) {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
const Xn = /* @__PURE__ */ new q();
|
|
1155
1155
|
function na(c, s, t, e, i) {
|
|
1156
|
-
At.setBuffer(c._roots[s]),
|
|
1156
|
+
At.setBuffer(c._roots[s]), en(0, c, t, e, i), At.clearBuffer();
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function en(c, s, t, e, i) {
|
|
1159
1159
|
const { float32Array: n, uint16Array: r, uint32Array: o } = At, a = c * 2;
|
|
1160
1160
|
if (Vt(a, r)) {
|
|
1161
1161
|
const h = Yt(c, o), d = Zt(a, r);
|
|
1162
1162
|
Wo(s, t, e, h, d, i);
|
|
1163
1163
|
} else {
|
|
1164
1164
|
const h = $t(c);
|
|
1165
|
-
|
|
1165
|
+
we(h, n, e, Xn) && en(h, s, t, e, i);
|
|
1166
1166
|
const d = jt(c, o);
|
|
1167
|
-
|
|
1167
|
+
we(d, n, e, Xn) && en(d, s, t, e, i);
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
1170
|
const Zn = /* @__PURE__ */ new q(), ra = ["x", "y", "z"];
|
|
1171
1171
|
function oa(c, s, t, e) {
|
|
1172
1172
|
At.setBuffer(c._roots[s]);
|
|
1173
|
-
const i =
|
|
1173
|
+
const i = sn(0, c, t, e);
|
|
1174
1174
|
return At.clearBuffer(), i;
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function sn(c, s, t, e) {
|
|
1177
1177
|
const { float32Array: i, uint16Array: n, uint32Array: r } = At;
|
|
1178
1178
|
let o = c * 2;
|
|
1179
1179
|
if (Vt(o, n)) {
|
|
@@ -1183,7 +1183,7 @@ function en(c, s, t, e) {
|
|
|
1183
1183
|
const l = vr(c, r), h = ra[l], u = e.direction[h] >= 0;
|
|
1184
1184
|
let f, E;
|
|
1185
1185
|
u ? (f = $t(c), E = jt(c, r)) : (f = jt(c, r), E = $t(c));
|
|
1186
|
-
const I =
|
|
1186
|
+
const I = we(f, i, e, Zn) ? sn(f, s, t, e) : null;
|
|
1187
1187
|
if (I) {
|
|
1188
1188
|
const R = I.point[h];
|
|
1189
1189
|
if (u ? R <= i[E + l] : (
|
|
@@ -1192,17 +1192,17 @@ function en(c, s, t, e) {
|
|
|
1192
1192
|
))
|
|
1193
1193
|
return I;
|
|
1194
1194
|
}
|
|
1195
|
-
const C =
|
|
1195
|
+
const C = we(E, i, e, Zn) ? sn(E, s, t, e) : null;
|
|
1196
1196
|
return I && C ? I.distance <= C.distance ? I : C : I || C || null;
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
1199
|
const Ws = /* @__PURE__ */ new se(), Ve = /* @__PURE__ */ new ee(), Ye = /* @__PURE__ */ new ee(), hs = /* @__PURE__ */ new de(), $n = /* @__PURE__ */ new Bt(), Xs = /* @__PURE__ */ new Bt();
|
|
1200
1200
|
function aa(c, s, t, e) {
|
|
1201
1201
|
At.setBuffer(c._roots[s]);
|
|
1202
|
-
const i =
|
|
1202
|
+
const i = nn(0, c, t, e);
|
|
1203
1203
|
return At.clearBuffer(), i;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function nn(c, s, t, e, i = null) {
|
|
1206
1206
|
const { float32Array: n, uint16Array: r, uint32Array: o } = At;
|
|
1207
1207
|
let a = c * 2;
|
|
1208
1208
|
if (i === null && (t.boundingBox || t.computeBoundingBox(), $n.set(t.boundingBox.min, t.boundingBox.max, e), i = $n), Vt(a, r)) {
|
|
@@ -1227,19 +1227,19 @@ function sn(c, s, t, e, i = null) {
|
|
|
1227
1227
|
}
|
|
1228
1228
|
} else {
|
|
1229
1229
|
const h = c + 8, d = o[c + 6];
|
|
1230
|
-
return wt(h, n, Ws), !!(i.intersectsBox(Ws) &&
|
|
1230
|
+
return wt(h, n, Ws), !!(i.intersectsBox(Ws) && nn(h, s, t, e, i) || (wt(d, n, Ws), i.intersectsBox(Ws) && nn(d, s, t, e, i)));
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
|
-
const Zs = /* @__PURE__ */ new de(),
|
|
1233
|
+
const Zs = /* @__PURE__ */ new de(), vi = /* @__PURE__ */ new Bt(), ds = /* @__PURE__ */ new Bt(), ca = /* @__PURE__ */ new q(), la = /* @__PURE__ */ new q(), ha = /* @__PURE__ */ new q(), da = /* @__PURE__ */ new q();
|
|
1234
1234
|
function ua(c, s, t, e = {}, i = {}, n = 0, r = 1 / 0) {
|
|
1235
|
-
s.boundingBox || s.computeBoundingBox(),
|
|
1235
|
+
s.boundingBox || s.computeBoundingBox(), vi.set(s.boundingBox.min, s.boundingBox.max, t), vi.needsUpdate = !0;
|
|
1236
1236
|
const o = c.geometry, a = o.attributes.position, l = o.index, h = s.attributes.position, d = s.index, u = Xt.getPrimitive(), f = Xt.getPrimitive();
|
|
1237
1237
|
let E = ca, p = la, I = null, m = null;
|
|
1238
1238
|
i && (I = ha, m = da);
|
|
1239
1239
|
let C = 1 / 0, R = null, g = null;
|
|
1240
1240
|
return Zs.copy(t).invert(), ds.matrix.copy(Zs), c.shapecast(
|
|
1241
1241
|
{
|
|
1242
|
-
boundsTraverseOrder: (y) =>
|
|
1242
|
+
boundsTraverseOrder: (y) => vi.distanceToBox(y),
|
|
1243
1243
|
intersectsBounds: (y, F, S) => S < C && S < r ? (F && (ds.min.copy(y.min), ds.max.copy(y.max), ds.needsUpdate = !0), !0) : !1,
|
|
1244
1244
|
intersectsRange: (y, F) => {
|
|
1245
1245
|
if (s.boundsTree) {
|
|
@@ -1251,11 +1251,11 @@ function ua(c, s, t, e = {}, i = {}, n = 0, r = 1 / 0) {
|
|
|
1251
1251
|
for (let x = L, k = L + N; x < k; x++) {
|
|
1252
1252
|
const w = S.resolveTriangleIndex(x);
|
|
1253
1253
|
Pt(f, 3 * w, d, h), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
|
|
1254
|
-
for (let P = y,
|
|
1254
|
+
for (let P = y, T = y + F; P < T; P++) {
|
|
1255
1255
|
const v = c.resolveTriangleIndex(P);
|
|
1256
1256
|
Pt(u, 3 * v, l, a), u.needsUpdate = !0;
|
|
1257
|
-
const
|
|
1258
|
-
if (
|
|
1257
|
+
const j = u.distanceToTriangle(f, E, I);
|
|
1258
|
+
if (j < C && (p.copy(E), m && m.copy(I), C = j, R = P, g = x), j < n)
|
|
1259
1259
|
return !0;
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
@@ -1281,18 +1281,18 @@ function ua(c, s, t, e = {}, i = {}, n = 0, r = 1 / 0) {
|
|
|
1281
1281
|
function fa() {
|
|
1282
1282
|
return typeof SharedArrayBuffer < "u";
|
|
1283
1283
|
}
|
|
1284
|
-
const Rs = new At.constructor(), li = new At.constructor(),
|
|
1285
|
-
let
|
|
1284
|
+
const Rs = new At.constructor(), li = new At.constructor(), _e = new Tn(() => new se()), Ge = new se(), He = new se(), Di = new se(), Ui = new se();
|
|
1285
|
+
let Bi = !1;
|
|
1286
1286
|
function pa(c, s, t, e) {
|
|
1287
|
-
if (
|
|
1287
|
+
if (Bi)
|
|
1288
1288
|
throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");
|
|
1289
|
-
|
|
1289
|
+
Bi = !0;
|
|
1290
1290
|
const i = c._roots, n = s._roots;
|
|
1291
1291
|
let r, o = 0, a = 0;
|
|
1292
1292
|
const l = new de().copy(t).invert();
|
|
1293
1293
|
for (let h = 0, d = i.length; h < d; h++) {
|
|
1294
1294
|
Rs.setBuffer(i[h]), a = 0;
|
|
1295
|
-
const u =
|
|
1295
|
+
const u = _e.getPrimitive();
|
|
1296
1296
|
wt(0, Rs.float32Array, u), u.applyMatrix4(l);
|
|
1297
1297
|
for (let f = 0, E = n.length; f < E && (li.setBuffer(n[h]), r = Qt(
|
|
1298
1298
|
0,
|
|
@@ -1307,10 +1307,10 @@ function pa(c, s, t, e) {
|
|
|
1307
1307
|
u
|
|
1308
1308
|
), li.clearBuffer(), a += n[f].length, !r); f++)
|
|
1309
1309
|
;
|
|
1310
|
-
if (
|
|
1310
|
+
if (_e.releasePrimitive(u), Rs.clearBuffer(), o += i[h].length, r)
|
|
1311
1311
|
break;
|
|
1312
1312
|
}
|
|
1313
|
-
return
|
|
1313
|
+
return Bi = !1, r;
|
|
1314
1314
|
}
|
|
1315
1315
|
function Qt(c, s, t, e, i, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
1316
1316
|
let d, u;
|
|
@@ -1338,7 +1338,7 @@ function Qt(c, s, t, e, i, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1338
1338
|
r + s
|
|
1339
1339
|
);
|
|
1340
1340
|
else if (F) {
|
|
1341
|
-
const L =
|
|
1341
|
+
const L = _e.getPrimitive();
|
|
1342
1342
|
wt(s, I, L), L.applyMatrix4(t);
|
|
1343
1343
|
const N = $t(c), x = jt(c, E);
|
|
1344
1344
|
wt(N, f, Ge), wt(x, f, He);
|
|
@@ -1367,11 +1367,11 @@ function Qt(c, s, t, e, i, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1367
1367
|
o + 1,
|
|
1368
1368
|
L,
|
|
1369
1369
|
!h
|
|
1370
|
-
),
|
|
1370
|
+
), _e.releasePrimitive(L);
|
|
1371
1371
|
} else {
|
|
1372
1372
|
const L = $t(s), N = jt(s, m);
|
|
1373
|
-
wt(L, I,
|
|
1374
|
-
const x = l.intersectsBox(
|
|
1373
|
+
wt(L, I, Di), wt(N, I, Ui);
|
|
1374
|
+
const x = l.intersectsBox(Di), k = l.intersectsBox(Ui);
|
|
1375
1375
|
if (x && k)
|
|
1376
1376
|
S = Qt(
|
|
1377
1377
|
c,
|
|
@@ -1414,11 +1414,11 @@ function Qt(c, s, t, e, i, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1414
1414
|
h
|
|
1415
1415
|
);
|
|
1416
1416
|
else {
|
|
1417
|
-
const w =
|
|
1418
|
-
w.copy(
|
|
1419
|
-
const P = $t(c),
|
|
1420
|
-
wt(P, f, Ge), wt(
|
|
1421
|
-
const v = w.intersectsBox(Ge),
|
|
1417
|
+
const w = _e.getPrimitive();
|
|
1418
|
+
w.copy(Di).applyMatrix4(t);
|
|
1419
|
+
const P = $t(c), T = jt(c, E);
|
|
1420
|
+
wt(P, f, Ge), wt(T, f, He);
|
|
1421
|
+
const v = w.intersectsBox(Ge), j = w.intersectsBox(He);
|
|
1422
1422
|
S = v && Qt(
|
|
1423
1423
|
L,
|
|
1424
1424
|
P,
|
|
@@ -1431,9 +1431,9 @@ function Qt(c, s, t, e, i, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1431
1431
|
o + 1,
|
|
1432
1432
|
w,
|
|
1433
1433
|
!h
|
|
1434
|
-
) ||
|
|
1434
|
+
) || j && Qt(
|
|
1435
1435
|
L,
|
|
1436
|
-
|
|
1436
|
+
T,
|
|
1437
1437
|
e,
|
|
1438
1438
|
t,
|
|
1439
1439
|
i,
|
|
@@ -1443,7 +1443,7 @@ function Qt(c, s, t, e, i, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1443
1443
|
o + 1,
|
|
1444
1444
|
w,
|
|
1445
1445
|
!h
|
|
1446
|
-
),
|
|
1446
|
+
), _e.releasePrimitive(w);
|
|
1447
1447
|
}
|
|
1448
1448
|
else if (k)
|
|
1449
1449
|
if (y)
|
|
@@ -1461,11 +1461,11 @@ function Qt(c, s, t, e, i, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1461
1461
|
h
|
|
1462
1462
|
);
|
|
1463
1463
|
else {
|
|
1464
|
-
const w =
|
|
1465
|
-
w.copy(
|
|
1466
|
-
const P = $t(c),
|
|
1467
|
-
wt(P, f, Ge), wt(
|
|
1468
|
-
const v = w.intersectsBox(Ge),
|
|
1464
|
+
const w = _e.getPrimitive();
|
|
1465
|
+
w.copy(Ui).applyMatrix4(t);
|
|
1466
|
+
const P = $t(c), T = jt(c, E);
|
|
1467
|
+
wt(P, f, Ge), wt(T, f, He);
|
|
1468
|
+
const v = w.intersectsBox(Ge), j = w.intersectsBox(He);
|
|
1469
1469
|
S = v && Qt(
|
|
1470
1470
|
N,
|
|
1471
1471
|
P,
|
|
@@ -1478,9 +1478,9 @@ function Qt(c, s, t, e, i, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1478
1478
|
o + 1,
|
|
1479
1479
|
w,
|
|
1480
1480
|
!h
|
|
1481
|
-
) ||
|
|
1481
|
+
) || j && Qt(
|
|
1482
1482
|
N,
|
|
1483
|
-
|
|
1483
|
+
T,
|
|
1484
1484
|
e,
|
|
1485
1485
|
t,
|
|
1486
1486
|
i,
|
|
@@ -1490,7 +1490,7 @@ function Qt(c, s, t, e, i, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1490
1490
|
o + 1,
|
|
1491
1491
|
w,
|
|
1492
1492
|
!h
|
|
1493
|
-
),
|
|
1493
|
+
), _e.releasePrimitive(w);
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
return S;
|
|
@@ -1520,7 +1520,7 @@ class _n {
|
|
|
1520
1520
|
indirect: !!s.indirectBuffer,
|
|
1521
1521
|
...e
|
|
1522
1522
|
};
|
|
1523
|
-
const { index: i, roots: n, indirectBuffer: r } = s, o = new _n(t, { ...e, [
|
|
1523
|
+
const { index: i, roots: n, indirectBuffer: r } = s, o = new _n(t, { ...e, [bi]: !0 });
|
|
1524
1524
|
if (o._roots = n, o._indirectBuffer = r || null, e.setIndex) {
|
|
1525
1525
|
const a = t.getIndex();
|
|
1526
1526
|
if (a === null) {
|
|
@@ -1551,10 +1551,10 @@ class _n {
|
|
|
1551
1551
|
indirect: !1,
|
|
1552
1552
|
// undocumented options
|
|
1553
1553
|
// Whether to skip generating the tree. Used for deserialization.
|
|
1554
|
-
[
|
|
1554
|
+
[bi]: !1
|
|
1555
1555
|
}, t), t.useSharedArrayBuffer && !fa())
|
|
1556
1556
|
throw new Error("MeshBVH: SharedArrayBuffer is not available.");
|
|
1557
|
-
this.geometry = s, this._roots = null, this._indirectBuffer = null, t[
|
|
1557
|
+
this.geometry = s, this._roots = null, this._indirectBuffer = null, t[bi] || (Po(this, t), !s.boundingBox && t.setBoundingBox && (s.boundingBox = this.getBoundingBox(new se())));
|
|
1558
1558
|
const { _indirectBuffer: e } = this;
|
|
1559
1559
|
this.resolveTriangleIndex = t.indirect ? (i) => e[i] : (i) => i;
|
|
1560
1560
|
}
|
|
@@ -1565,7 +1565,7 @@ class _n {
|
|
|
1565
1565
|
const e = this._roots[t], i = new Uint32Array(e), n = new Uint16Array(e);
|
|
1566
1566
|
r(0);
|
|
1567
1567
|
function r(o, a = 0) {
|
|
1568
|
-
const l = o * 2, h = n[l + 15] ===
|
|
1568
|
+
const l = o * 2, h = n[l + 15] === wi;
|
|
1569
1569
|
if (h) {
|
|
1570
1570
|
const d = i[o + 6], u = n[l + 14];
|
|
1571
1571
|
s(a, h, new Float32Array(e, o * 4, 6), d, u);
|
|
@@ -1710,18 +1710,18 @@ class _n {
|
|
|
1710
1710
|
function Qn(c, s, t) {
|
|
1711
1711
|
return c === null || (c.point.applyMatrix4(s.matrixWorld), c.distance = c.point.distanceTo(t.ray.origin), c.object = s, c.distance < t.near || c.distance > t.far) ? null : c;
|
|
1712
1712
|
}
|
|
1713
|
-
const
|
|
1713
|
+
const zi = /* @__PURE__ */ new oo(), qn = /* @__PURE__ */ new de(), Ea = rt.prototype.raycast;
|
|
1714
1714
|
function ma(c, s) {
|
|
1715
1715
|
if (this.geometry.boundsTree) {
|
|
1716
1716
|
if (this.material === void 0)
|
|
1717
1717
|
return;
|
|
1718
|
-
qn.copy(this.matrixWorld).invert(),
|
|
1718
|
+
qn.copy(this.matrixWorld).invert(), zi.copy(c.ray).applyMatrix4(qn);
|
|
1719
1719
|
const t = this.geometry.boundsTree;
|
|
1720
1720
|
if (c.firstHitOnly === !0) {
|
|
1721
|
-
const e = Qn(t.raycastFirst(
|
|
1721
|
+
const e = Qn(t.raycastFirst(zi, this.material), this, c);
|
|
1722
1722
|
e && s.push(e);
|
|
1723
1723
|
} else {
|
|
1724
|
-
const e = t.raycast(
|
|
1724
|
+
const e = t.raycast(zi, this.material);
|
|
1725
1725
|
for (let i = 0, n = e.length; i < n; i++) {
|
|
1726
1726
|
const r = Qn(e[i], this, c);
|
|
1727
1727
|
r && s.push(r);
|
|
@@ -1736,15 +1736,15 @@ function Ia(c) {
|
|
|
1736
1736
|
function ga() {
|
|
1737
1737
|
this.boundsTree = null;
|
|
1738
1738
|
}
|
|
1739
|
-
class
|
|
1739
|
+
class Q {
|
|
1740
1740
|
constructor() {
|
|
1741
1741
|
/** Triggers all the callbacks assigned to this event. */
|
|
1742
|
-
|
|
1742
|
+
_(this, "trigger", (s) => {
|
|
1743
1743
|
const t = this.handlers.slice(0);
|
|
1744
1744
|
for (const e of t)
|
|
1745
1745
|
e(s);
|
|
1746
1746
|
});
|
|
1747
|
-
|
|
1747
|
+
_(this, "handlers", []);
|
|
1748
1748
|
}
|
|
1749
1749
|
/**
|
|
1750
1750
|
* Add a callback to this event instance.
|
|
@@ -1768,12 +1768,12 @@ class j {
|
|
|
1768
1768
|
class oi {
|
|
1769
1769
|
constructor() {
|
|
1770
1770
|
/** Triggers all the callbacks assigned to this event. */
|
|
1771
|
-
|
|
1771
|
+
_(this, "trigger", async (s) => {
|
|
1772
1772
|
const t = this.handlers.slice(0);
|
|
1773
1773
|
for (const e of t)
|
|
1774
1774
|
await e(s);
|
|
1775
1775
|
});
|
|
1776
|
-
|
|
1776
|
+
_(this, "handlers", []);
|
|
1777
1777
|
}
|
|
1778
1778
|
/**
|
|
1779
1779
|
* Add a callback to this event instance.
|
|
@@ -1797,15 +1797,15 @@ class oi {
|
|
|
1797
1797
|
class An {
|
|
1798
1798
|
constructor(s) {
|
|
1799
1799
|
/** Whether is component is {@link Disposable}. */
|
|
1800
|
-
|
|
1800
|
+
_(this, "isDisposeable", () => "dispose" in this && "onDisposed" in this);
|
|
1801
1801
|
/** Whether is component is {@link Resizeable}. */
|
|
1802
|
-
|
|
1802
|
+
_(this, "isResizeable", () => "resize" in this && "getSize" in this);
|
|
1803
1803
|
/** Whether is component is {@link Updateable}. */
|
|
1804
|
-
|
|
1804
|
+
_(this, "isUpdateable", () => "onAfterUpdate" in this && "onBeforeUpdate" in this && "update" in this);
|
|
1805
1805
|
/** Whether is component is {@link Hideable}. */
|
|
1806
|
-
|
|
1806
|
+
_(this, "isHideable", () => "visible" in this);
|
|
1807
1807
|
/** Whether is component is {@link Configurable}. */
|
|
1808
|
-
|
|
1808
|
+
_(this, "isConfigurable", () => "setup" in this && "config" in this && "onSetup" in this);
|
|
1809
1809
|
this.components = s;
|
|
1810
1810
|
}
|
|
1811
1811
|
}
|
|
@@ -1814,16 +1814,16 @@ class St extends An {
|
|
|
1814
1814
|
class Rn extends An {
|
|
1815
1815
|
constructor(t) {
|
|
1816
1816
|
super(t);
|
|
1817
|
-
|
|
1817
|
+
_(this, "worlds", /* @__PURE__ */ new Map());
|
|
1818
1818
|
/**
|
|
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
|
-
|
|
1822
|
+
_(this, "onWorldChanged", new Q());
|
|
1823
1823
|
/**
|
|
1824
1824
|
* The current world this item is associated with. It can be null if no world is currently active.
|
|
1825
1825
|
*/
|
|
1826
|
-
|
|
1826
|
+
_(this, "currentWorld", null);
|
|
1827
1827
|
this.onWorldChanged.add(({ world: e, action: i }) => {
|
|
1828
1828
|
i === "removed" && this.worlds.delete(e.uuid);
|
|
1829
1829
|
});
|
|
@@ -1837,29 +1837,29 @@ class Ca extends Rn {
|
|
|
1837
1837
|
*
|
|
1838
1838
|
* @returns True if the instance is controllable, false otherwise.
|
|
1839
1839
|
*/
|
|
1840
|
-
|
|
1840
|
+
_(this, "hasCameraControls", () => "controls" in this);
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
1843
|
class Ta extends Rn {
|
|
1844
1844
|
constructor() {
|
|
1845
1845
|
super(...arguments);
|
|
1846
1846
|
/** {@link Updateable.onBeforeUpdate} */
|
|
1847
|
-
|
|
1847
|
+
_(this, "onAfterUpdate", new Q());
|
|
1848
1848
|
/** {@link Updateable.onAfterUpdate} */
|
|
1849
|
-
|
|
1849
|
+
_(this, "onBeforeUpdate", new Q());
|
|
1850
1850
|
/** {@link Disposable.onDisposed} */
|
|
1851
|
-
|
|
1851
|
+
_(this, "onDisposed", new Q());
|
|
1852
1852
|
/** {@link Resizeable.onResize} */
|
|
1853
|
-
|
|
1853
|
+
_(this, "onResize", new Q());
|
|
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
|
-
|
|
1858
|
+
_(this, "onClippingPlanesUpdated", new Q());
|
|
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
|
*/
|
|
1862
|
-
|
|
1862
|
+
_(this, "clippingPlanes", []);
|
|
1863
1863
|
}
|
|
1864
1864
|
/**
|
|
1865
1865
|
* Updates the clipping planes and triggers the `onClippingPlanesUpdated` event.
|
|
@@ -1896,9 +1896,9 @@ class Ta extends Rn {
|
|
|
1896
1896
|
const ys = class ys extends St {
|
|
1897
1897
|
constructor(t) {
|
|
1898
1898
|
super(t);
|
|
1899
|
-
|
|
1899
|
+
_(this, "_disposedComponents", /* @__PURE__ */ new Set());
|
|
1900
1900
|
/** {@link Component.enabled} */
|
|
1901
|
-
|
|
1901
|
+
_(this, "enabled", !0);
|
|
1902
1902
|
t.add(ys.uuid, this);
|
|
1903
1903
|
}
|
|
1904
1904
|
// TODO: Remove this?
|
|
@@ -1956,21 +1956,21 @@ const ys = class ys extends St {
|
|
|
1956
1956
|
* A unique identifier for the component.
|
|
1957
1957
|
* This UUID is used to register the component within the Components system.
|
|
1958
1958
|
*/
|
|
1959
|
-
|
|
1960
|
-
let
|
|
1959
|
+
_(ys, "uuid", "76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");
|
|
1960
|
+
let Fe = ys;
|
|
1961
1961
|
class _a extends Rn {
|
|
1962
1962
|
constructor(t) {
|
|
1963
1963
|
super(t);
|
|
1964
1964
|
/** {@link Disposable.onDisposed} */
|
|
1965
|
-
|
|
1965
|
+
_(this, "onDisposed", new Q());
|
|
1966
1966
|
/** The set of directional lights managed by this scene component. */
|
|
1967
|
-
|
|
1967
|
+
_(this, "directionalLights", /* @__PURE__ */ new Map());
|
|
1968
1968
|
/** The set of ambient lights managed by this scene component. */
|
|
1969
|
-
|
|
1969
|
+
_(this, "ambientLights", /* @__PURE__ */ new Map());
|
|
1970
1970
|
}
|
|
1971
1971
|
/** {@link Disposable.dispose} */
|
|
1972
1972
|
dispose() {
|
|
1973
|
-
const t = this.components.get(
|
|
1973
|
+
const t = this.components.get(Fe);
|
|
1974
1974
|
for (const e of this.three.children) {
|
|
1975
1975
|
const i = e;
|
|
1976
1976
|
i.geometry && t.destroy(i);
|
|
@@ -1993,15 +1993,15 @@ class qe extends Set {
|
|
|
1993
1993
|
/**
|
|
1994
1994
|
* An event that is triggered when a new item is added to the set.
|
|
1995
1995
|
*/
|
|
1996
|
-
|
|
1996
|
+
_(this, "onItemAdded", new Q());
|
|
1997
1997
|
/**
|
|
1998
1998
|
* An event that is triggered when an item is deleted from the set.
|
|
1999
1999
|
*/
|
|
2000
|
-
|
|
2000
|
+
_(this, "onItemDeleted", new Q());
|
|
2001
2001
|
/**
|
|
2002
2002
|
* An event that is triggered when the set is cleared.
|
|
2003
2003
|
*/
|
|
2004
|
-
|
|
2004
|
+
_(this, "onCleared", new Q());
|
|
2005
2005
|
/**
|
|
2006
2006
|
* A function that acts as a guard for adding items to the set.
|
|
2007
2007
|
* It determines whether a given value should be allowed to be added to the set.
|
|
@@ -2011,7 +2011,7 @@ class qe extends Set {
|
|
|
2011
2011
|
* By default, this function always returns true, allowing all values to be added.
|
|
2012
2012
|
* You can override this behavior by providing a custom implementation.
|
|
2013
2013
|
*/
|
|
2014
|
-
|
|
2014
|
+
_(this, "guard", () => !0);
|
|
2015
2015
|
}
|
|
2016
2016
|
/**
|
|
2017
2017
|
* Clears the set and triggers the onCleared event.
|
|
@@ -2027,7 +2027,7 @@ class qe extends Set {
|
|
|
2027
2027
|
*/
|
|
2028
2028
|
add(...t) {
|
|
2029
2029
|
for (const e of t)
|
|
2030
|
-
this.has(e) || !this.guard(e) || (super.add(e), this.onItemAdded || (this.onItemAdded = new
|
|
2030
|
+
this.has(e) || !this.guard(e) || (super.add(e), this.onItemAdded || (this.onItemAdded = new Q()), this.onItemAdded.trigger(e));
|
|
2031
2031
|
return this;
|
|
2032
2032
|
}
|
|
2033
2033
|
/**
|
|
@@ -2047,7 +2047,7 @@ class qe extends Set {
|
|
|
2047
2047
|
this.clear(), this.onItemAdded.reset(), this.onItemDeleted.reset(), this.onCleared.reset();
|
|
2048
2048
|
}
|
|
2049
2049
|
}
|
|
2050
|
-
class
|
|
2050
|
+
class Ee extends Map {
|
|
2051
2051
|
/**
|
|
2052
2052
|
* Constructs a new DataMap instance.
|
|
2053
2053
|
*
|
|
@@ -2058,19 +2058,19 @@ class Fe extends Map {
|
|
|
2058
2058
|
/**
|
|
2059
2059
|
* An event triggered when a new item is set in the map.
|
|
2060
2060
|
*/
|
|
2061
|
-
|
|
2061
|
+
_(this, "onItemSet", new Q());
|
|
2062
2062
|
/**
|
|
2063
2063
|
* An event triggered when an existing item in the map is updated.
|
|
2064
2064
|
*/
|
|
2065
|
-
|
|
2065
|
+
_(this, "onItemUpdated", new Q());
|
|
2066
2066
|
/**
|
|
2067
2067
|
* An event triggered when an item is deleted from the map.
|
|
2068
2068
|
*/
|
|
2069
|
-
|
|
2069
|
+
_(this, "onItemDeleted", new Q());
|
|
2070
2070
|
/**
|
|
2071
2071
|
* An event triggered when the map is cleared.
|
|
2072
2072
|
*/
|
|
2073
|
-
|
|
2073
|
+
_(this, "onCleared", new Q());
|
|
2074
2074
|
/**
|
|
2075
2075
|
* A function that acts as a guard for adding items to the set.
|
|
2076
2076
|
* It determines whether a given value should be allowed to be added to the set.
|
|
@@ -2081,7 +2081,7 @@ class Fe extends Map {
|
|
|
2081
2081
|
* By default, this function always returns true, allowing all values to be added.
|
|
2082
2082
|
* You can override this behavior by providing a custom implementation.
|
|
2083
2083
|
*/
|
|
2084
|
-
|
|
2084
|
+
_(this, "guard", () => !0);
|
|
2085
2085
|
}
|
|
2086
2086
|
/**
|
|
2087
2087
|
* Clears the map and triggers the onCleared event.
|
|
@@ -2101,7 +2101,7 @@ class Fe extends Map {
|
|
|
2101
2101
|
if (!(this.guard ?? (() => !0))(t, e))
|
|
2102
2102
|
return this;
|
|
2103
2103
|
const o = super.set(t, e);
|
|
2104
|
-
return i ? (this.onItemUpdated || (this.onItemUpdated = new
|
|
2104
|
+
return i ? (this.onItemUpdated || (this.onItemUpdated = new Q()), this.onItemUpdated.trigger({ key: t, value: e })) : (this.onItemSet || (this.onItemSet = new Q()), this.onItemSet.trigger({ key: t, value: e })), o;
|
|
2105
2105
|
}
|
|
2106
2106
|
/**
|
|
2107
2107
|
* Deletes the specified key from the map and triggers the onItemDeleted event if the key was found.
|
|
@@ -2120,7 +2120,7 @@ class Fe extends Map {
|
|
|
2120
2120
|
this.clear(), this.onItemSet.reset(), this.onItemDeleted.reset(), this.onCleared.reset();
|
|
2121
2121
|
}
|
|
2122
2122
|
}
|
|
2123
|
-
const ai = 0, Aa = 1, Ra = new q(), Kn = new he(),
|
|
2123
|
+
const ai = 0, Aa = 1, Ra = new q(), Kn = new he(), ki = new gn(), Jn = new q(), js = new je();
|
|
2124
2124
|
class ya {
|
|
2125
2125
|
constructor() {
|
|
2126
2126
|
this.tolerance = -1, this.faces = [], this.newFaces = [], this.assigned = new tr(), this.unassigned = new tr(), this.vertices = [];
|
|
@@ -2262,16 +2262,16 @@ class ya {
|
|
|
2262
2262
|
p > n && (n = p, l = E);
|
|
2263
2263
|
}
|
|
2264
2264
|
}
|
|
2265
|
-
n = -1,
|
|
2265
|
+
n = -1, ki.setFromCoplanarPoints(o.point, a.point, l.point);
|
|
2266
2266
|
for (let u = 0, f = this.vertices.length; u < f; u++) {
|
|
2267
2267
|
const E = s[u];
|
|
2268
2268
|
if (E !== o && E !== a && E !== l) {
|
|
2269
|
-
const p = Math.abs(
|
|
2269
|
+
const p = Math.abs(ki.distanceToPoint(E.point));
|
|
2270
2270
|
p > n && (n = p, h = E);
|
|
2271
2271
|
}
|
|
2272
2272
|
}
|
|
2273
2273
|
const d = [];
|
|
2274
|
-
if (
|
|
2274
|
+
if (ki.distanceToPoint(h.point) < 0) {
|
|
2275
2275
|
d.push(
|
|
2276
2276
|
Kt.create(o, a, l),
|
|
2277
2277
|
Kt.create(h, a, o),
|
|
@@ -2381,7 +2381,7 @@ class Kt {
|
|
|
2381
2381
|
this.normal = new q(), this.midpoint = new q(), this.area = 0, this.constant = 0, this.outside = null, this.mark = ai, this.edge = null;
|
|
2382
2382
|
}
|
|
2383
2383
|
static create(s, t, e) {
|
|
2384
|
-
const i = new Kt(), n = new
|
|
2384
|
+
const i = new Kt(), n = new Vi(s, i), r = new Vi(t, i), o = new Vi(e, i);
|
|
2385
2385
|
return n.next = o.prev = r, r.next = n.prev = o, o.next = r.prev = n, i.edge = n, i.compute();
|
|
2386
2386
|
}
|
|
2387
2387
|
getEdge(s) {
|
|
@@ -2400,7 +2400,7 @@ class Kt {
|
|
|
2400
2400
|
return this.normal.dot(s) - this.constant;
|
|
2401
2401
|
}
|
|
2402
2402
|
}
|
|
2403
|
-
class
|
|
2403
|
+
class Vi {
|
|
2404
2404
|
constructor(s, t) {
|
|
2405
2405
|
this.vertex = s, this.prev = null, this.next = null, this.twin = null, this.face = t;
|
|
2406
2406
|
}
|
|
@@ -2470,7 +2470,7 @@ class tr {
|
|
|
2470
2470
|
return this.head === null;
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
2473
|
-
const
|
|
2473
|
+
const rn = [2, 2, 1], on = [1, 0, 0];
|
|
2474
2474
|
function ae(c, s) {
|
|
2475
2475
|
return c * 3 + s;
|
|
2476
2476
|
}
|
|
@@ -2485,7 +2485,7 @@ function Sa(c) {
|
|
|
2485
2485
|
const s = c.elements;
|
|
2486
2486
|
let t = 0;
|
|
2487
2487
|
for (let e = 0; e < 3; e++) {
|
|
2488
|
-
const i = s[ae(
|
|
2488
|
+
const i = s[ae(rn[e], on[e])];
|
|
2489
2489
|
t += 2 * i * i;
|
|
2490
2490
|
}
|
|
2491
2491
|
return Math.sqrt(t);
|
|
@@ -2494,11 +2494,11 @@ function Oa(c, s) {
|
|
|
2494
2494
|
let t = 0, e = 1;
|
|
2495
2495
|
const i = c.elements;
|
|
2496
2496
|
for (let l = 0; l < 3; l++) {
|
|
2497
|
-
const h = Math.abs(i[ae(
|
|
2497
|
+
const h = Math.abs(i[ae(rn[l], on[l])]);
|
|
2498
2498
|
h > t && (t = h, e = l);
|
|
2499
2499
|
}
|
|
2500
2500
|
let n = 1, r = 0;
|
|
2501
|
-
const o =
|
|
2501
|
+
const o = on[e], a = rn[e];
|
|
2502
2502
|
if (Math.abs(i[ae(a, o)]) > Number.EPSILON) {
|
|
2503
2503
|
const l = i[ae(a, a)], h = i[ae(o, o)], d = i[ae(a, o)], u = (l - h) / 2 / d;
|
|
2504
2504
|
let f;
|
|
@@ -2552,14 +2552,14 @@ function ba(c) {
|
|
|
2552
2552
|
F.elements[0] = I, F.elements[1] = m, F.elements[2] = C, F.elements[3] = m, F.elements[4] = R, F.elements[5] = g, F.elements[6] = C, F.elements[7] = g, F.elements[8] = y, Na(F, e);
|
|
2553
2553
|
const S = e.unitary, L = new M.Vector3(), N = new M.Vector3(), x = new M.Vector3();
|
|
2554
2554
|
S.extractBasis(L, N, x);
|
|
2555
|
-
let k = -1 / 0, w = -1 / 0, P = -1 / 0,
|
|
2555
|
+
let k = -1 / 0, w = -1 / 0, P = -1 / 0, T = 1 / 0, v = 1 / 0, j = 1 / 0;
|
|
2556
2556
|
for (let at = 0, ft = s.length; at < ft; at++) {
|
|
2557
2557
|
const ut = s[at];
|
|
2558
|
-
k = Math.max(L.dot(ut), k), w = Math.max(N.dot(ut), w), P = Math.max(x.dot(ut), P),
|
|
2558
|
+
k = Math.max(L.dot(ut), k), w = Math.max(N.dot(ut), w), P = Math.max(x.dot(ut), P), T = Math.min(L.dot(ut), T), v = Math.min(N.dot(ut), v), j = Math.min(x.dot(ut), j);
|
|
2559
2559
|
}
|
|
2560
|
-
L.multiplyScalar(0.5 * (
|
|
2560
|
+
L.multiplyScalar(0.5 * (T + k)), N.multiplyScalar(0.5 * (v + w)), x.multiplyScalar(0.5 * (j + P));
|
|
2561
2561
|
const V = new M.Vector3(), et = new M.Vector3(), H = new M.Matrix3();
|
|
2562
|
-
V.add(L).add(N).add(x), et.x = k -
|
|
2562
|
+
V.add(L).add(N).add(x), et.x = k - T, et.y = w - v, et.z = P - j, et.multiplyScalar(0.5), H.copy(S);
|
|
2563
2563
|
const { x: nt, y: z, z: U } = et, ot = new M.Matrix4();
|
|
2564
2564
|
ot.makeScale(nt * 2, z * 2, U * 2);
|
|
2565
2565
|
const st = new M.Matrix4();
|
|
@@ -2602,8 +2602,8 @@ const Nt = class Nt {
|
|
|
2602
2602
|
);
|
|
2603
2603
|
}
|
|
2604
2604
|
};
|
|
2605
|
-
|
|
2606
|
-
|
|
2605
|
+
_(Nt, "_pattern", /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/), // prettier-ignore
|
|
2606
|
+
_(Nt, "_lut", [
|
|
2607
2607
|
"00",
|
|
2608
2608
|
"01",
|
|
2609
2609
|
"02",
|
|
@@ -2861,39 +2861,39 @@ T(Nt, "_lut", [
|
|
|
2861
2861
|
"fe",
|
|
2862
2862
|
"ff"
|
|
2863
2863
|
]);
|
|
2864
|
-
let
|
|
2864
|
+
let me = Nt;
|
|
2865
2865
|
class xl extends St {
|
|
2866
2866
|
constructor(t, e) {
|
|
2867
2867
|
super(t);
|
|
2868
2868
|
/** {@link Disposable.onDisposed} */
|
|
2869
|
-
|
|
2869
|
+
_(this, "onDisposed", new Q());
|
|
2870
2870
|
/**
|
|
2871
2871
|
* An event that is triggered when a vertex is found.
|
|
2872
2872
|
* The event passes a THREE.Vector3 representing the position of the found vertex.
|
|
2873
2873
|
*/
|
|
2874
|
-
|
|
2874
|
+
_(this, "onVertexFound", new Q());
|
|
2875
2875
|
/**
|
|
2876
2876
|
* An event that is triggered when a vertex is lost.
|
|
2877
2877
|
* The event passes a THREE.Vector3 representing the position of the lost vertex.
|
|
2878
2878
|
*/
|
|
2879
|
-
|
|
2879
|
+
_(this, "onVertexLost", new Q());
|
|
2880
2880
|
/**
|
|
2881
2881
|
* An event that is triggered when the picker is enabled or disabled
|
|
2882
2882
|
*/
|
|
2883
|
-
|
|
2883
|
+
_(this, "onEnabled", new Q());
|
|
2884
2884
|
/**
|
|
2885
2885
|
* A reference to the Components instance associated with this VertexPicker.
|
|
2886
2886
|
*/
|
|
2887
|
-
|
|
2887
|
+
_(this, "components");
|
|
2888
2888
|
/**
|
|
2889
2889
|
* A reference to the working plane used for vertex picking.
|
|
2890
2890
|
* This plane is used to determine which vertices are considered valid for picking.
|
|
2891
2891
|
* If this value is null, all vertices are considered valid.
|
|
2892
2892
|
*/
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2893
|
+
_(this, "workingPlane", null);
|
|
2894
|
+
_(this, "_pickedPoint", null);
|
|
2895
|
+
_(this, "_config");
|
|
2896
|
+
_(this, "_enabled", !1);
|
|
2897
2897
|
this.components = t, this.config = {
|
|
2898
2898
|
snapDistance: 0.25,
|
|
2899
2899
|
showOnlyVertex: !1,
|
|
@@ -3012,22 +3012,22 @@ class xl extends St {
|
|
|
3012
3012
|
);
|
|
3013
3013
|
}
|
|
3014
3014
|
}
|
|
3015
|
-
const
|
|
3015
|
+
const ui = class ui {
|
|
3016
3016
|
constructor() {
|
|
3017
3017
|
/** {@link Disposable.onDisposed} */
|
|
3018
|
-
|
|
3018
|
+
_(this, "onDisposed", new Q());
|
|
3019
3019
|
/**
|
|
3020
3020
|
* The list of components created in this app.
|
|
3021
3021
|
* The keys are UUIDs and the values are instances of the components.
|
|
3022
3022
|
*/
|
|
3023
|
-
|
|
3023
|
+
_(this, "list", /* @__PURE__ */ new Map());
|
|
3024
3024
|
/**
|
|
3025
3025
|
* If disabled, the animation loop will be stopped.
|
|
3026
3026
|
* Default value is false.
|
|
3027
3027
|
*/
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3028
|
+
_(this, "enabled", !1);
|
|
3029
|
+
_(this, "_clock");
|
|
3030
|
+
_(this, "update", () => {
|
|
3031
3031
|
if (!this.enabled)
|
|
3032
3032
|
return;
|
|
3033
3033
|
const s = this._clock.getDelta();
|
|
@@ -3035,7 +3035,7 @@ const di = class di {
|
|
|
3035
3035
|
e.enabled && e.isUpdateable() && e.update(s);
|
|
3036
3036
|
requestAnimationFrame(this.update);
|
|
3037
3037
|
});
|
|
3038
|
-
this._clock = new M.Clock(),
|
|
3038
|
+
this._clock = new M.Clock(), ui.setupBVH();
|
|
3039
3039
|
}
|
|
3040
3040
|
/**
|
|
3041
3041
|
* Adds a component to the list of components.
|
|
@@ -3053,7 +3053,7 @@ const di = class di {
|
|
|
3053
3053
|
throw new Error(
|
|
3054
3054
|
"You're trying to add a component that already exists in the components instance. Use Components.get() instead."
|
|
3055
3055
|
);
|
|
3056
|
-
|
|
3056
|
+
me.validate(s), this.list.set(s, t);
|
|
3057
3057
|
}
|
|
3058
3058
|
/**
|
|
3059
3059
|
* Retrieves a component instance by its constructor function.
|
|
@@ -3114,41 +3114,41 @@ const di = class di {
|
|
|
3114
3114
|
/**
|
|
3115
3115
|
* The version of the @thatopen/components library.
|
|
3116
3116
|
*/
|
|
3117
|
-
|
|
3118
|
-
let
|
|
3117
|
+
_(ui, "release", "2.2.11");
|
|
3118
|
+
let an = ui;
|
|
3119
3119
|
class La extends An {
|
|
3120
3120
|
constructor() {
|
|
3121
3121
|
super(...arguments);
|
|
3122
3122
|
/**
|
|
3123
3123
|
* All the loaded [meshes](https://threejs.org/docs/#api/en/objects/Mesh). These meshes will be taken into account in operations like raycasting.
|
|
3124
3124
|
*/
|
|
3125
|
-
|
|
3125
|
+
_(this, "meshes", /* @__PURE__ */ new Set());
|
|
3126
3126
|
/** {@link Updateable.onAfterUpdate} */
|
|
3127
|
-
|
|
3127
|
+
_(this, "onAfterUpdate", new Q());
|
|
3128
3128
|
/** {@link Updateable.onBeforeUpdate} */
|
|
3129
|
-
|
|
3129
|
+
_(this, "onBeforeUpdate", new Q());
|
|
3130
3130
|
/** {@link Disposable.onDisposed} */
|
|
3131
|
-
|
|
3131
|
+
_(this, "onDisposed", new Q());
|
|
3132
3132
|
/**
|
|
3133
3133
|
* 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.
|
|
3134
3134
|
*/
|
|
3135
|
-
|
|
3135
|
+
_(this, "isDisposing", !1);
|
|
3136
3136
|
/**
|
|
3137
3137
|
* Indicates whether the world is currently enabled.
|
|
3138
3138
|
* When disabled, the world will not be updated.
|
|
3139
3139
|
*/
|
|
3140
|
-
|
|
3140
|
+
_(this, "enabled", !0);
|
|
3141
3141
|
/**
|
|
3142
|
-
* A unique identifier for the world.
|
|
3142
|
+
* A unique identifier for the world. Is not meant to be changed at any moment.
|
|
3143
3143
|
*/
|
|
3144
|
-
|
|
3144
|
+
_(this, "uuid", me.create());
|
|
3145
3145
|
/**
|
|
3146
3146
|
* An optional name for the world.
|
|
3147
3147
|
*/
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3148
|
+
_(this, "name");
|
|
3149
|
+
_(this, "_scene");
|
|
3150
|
+
_(this, "_camera");
|
|
3151
|
+
_(this, "_renderer", null);
|
|
3152
3152
|
}
|
|
3153
3153
|
/**
|
|
3154
3154
|
* Getter for the scene. If no scene is initialized, it throws an error.
|
|
@@ -3207,32 +3207,32 @@ class La extends An {
|
|
|
3207
3207
|
/** {@link Disposable.dispose} */
|
|
3208
3208
|
dispose(t = !0) {
|
|
3209
3209
|
if (this.enabled = !1, this.isDisposing = !0, this.scene.onWorldChanged.trigger({ world: this, action: "removed" }), this.camera.onWorldChanged.trigger({ world: this, action: "removed" }), this.renderer && this.renderer.onWorldChanged.trigger({ world: this, action: "removed" }), t) {
|
|
3210
|
-
const
|
|
3210
|
+
const i = this.components.get(Fe);
|
|
3211
3211
|
this.scene.dispose(), this.camera.isDisposeable() && this.camera.dispose(), this.renderer && this.renderer.dispose();
|
|
3212
|
-
for (const
|
|
3213
|
-
|
|
3212
|
+
for (const n of this.meshes)
|
|
3213
|
+
i.destroy(n);
|
|
3214
3214
|
this.meshes.clear();
|
|
3215
3215
|
}
|
|
3216
|
-
this._scene = null, this._camera = null, this._renderer = null, this.onDisposed.trigger();
|
|
3216
|
+
this._scene = null, this._camera = null, this._renderer = null, this.components.get(hi).list.delete(this.uuid), this.onDisposed.trigger(), this.onDisposed.reset();
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
3219
|
class Ma extends _a {
|
|
3220
3220
|
constructor(t) {
|
|
3221
3221
|
super(t);
|
|
3222
3222
|
/** {@link Configurable.isSetup} */
|
|
3223
|
-
|
|
3223
|
+
_(this, "isSetup", !1);
|
|
3224
3224
|
/**
|
|
3225
3225
|
* The underlying Three.js scene object.
|
|
3226
3226
|
* It is used to define the 3D space containing objects, lights, and cameras.
|
|
3227
3227
|
*/
|
|
3228
|
-
|
|
3228
|
+
_(this, "three");
|
|
3229
3229
|
/** {@link Configurable.onSetup} */
|
|
3230
|
-
|
|
3230
|
+
_(this, "onSetup", new Q());
|
|
3231
3231
|
/**
|
|
3232
3232
|
* Configuration interface for the {@link SimpleScene}.
|
|
3233
3233
|
* Defines properties for directional and ambient lights.
|
|
3234
3234
|
*/
|
|
3235
|
-
|
|
3235
|
+
_(this, "config", {
|
|
3236
3236
|
directionalLight: {
|
|
3237
3237
|
color: new M.Color("white"),
|
|
3238
3238
|
intensity: 1.5,
|
|
@@ -3274,35 +3274,35 @@ class vl extends Ta {
|
|
|
3274
3274
|
* Indicates whether the renderer is enabled. If it's not, it won't be updated.
|
|
3275
3275
|
* Default is `true`.
|
|
3276
3276
|
*/
|
|
3277
|
-
|
|
3277
|
+
_(this, "enabled", !0);
|
|
3278
3278
|
/**
|
|
3279
3279
|
* The HTML container of the THREE.js canvas where the scene is rendered.
|
|
3280
3280
|
*/
|
|
3281
|
-
|
|
3281
|
+
_(this, "container");
|
|
3282
3282
|
/**
|
|
3283
3283
|
* The THREE.js WebGLRenderer instance.
|
|
3284
3284
|
*/
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3285
|
+
_(this, "three");
|
|
3286
|
+
_(this, "_canvas");
|
|
3287
|
+
_(this, "_parameters");
|
|
3288
|
+
_(this, "_resizeObserver", null);
|
|
3289
|
+
_(this, "onContainerUpdated", new Q());
|
|
3290
|
+
_(this, "_resizing", !1);
|
|
3291
3291
|
/** {@link Resizeable.resize} */
|
|
3292
|
-
|
|
3292
|
+
_(this, "resize", (t) => {
|
|
3293
3293
|
if (this._resizing)
|
|
3294
3294
|
return;
|
|
3295
3295
|
this._resizing = !0, this.onContainerUpdated.trigger();
|
|
3296
3296
|
const e = t ? t.x : this.container.clientWidth, i = t ? t.y : this.container.clientHeight;
|
|
3297
3297
|
this.three.setSize(e, i), this.onResize.trigger(new M.Vector2(e, i)), this._resizing = !1;
|
|
3298
3298
|
});
|
|
3299
|
-
|
|
3299
|
+
_(this, "resizeEvent", () => {
|
|
3300
3300
|
this.resize();
|
|
3301
3301
|
});
|
|
3302
|
-
|
|
3302
|
+
_(this, "onContextLost", (t) => {
|
|
3303
3303
|
t.preventDefault(), this.enabled = !1;
|
|
3304
3304
|
});
|
|
3305
|
-
|
|
3305
|
+
_(this, "onContextBack", () => {
|
|
3306
3306
|
this.three.setRenderTarget(null), this.three.dispose(), this.three = new M.WebGLRenderer({
|
|
3307
3307
|
canvas: this._canvas,
|
|
3308
3308
|
antialias: !0,
|
|
@@ -3390,7 +3390,7 @@ const ht = {
|
|
|
3390
3390
|
function Oe(c) {
|
|
3391
3391
|
return c.isPerspectiveCamera;
|
|
3392
3392
|
}
|
|
3393
|
-
function
|
|
3393
|
+
function Te(c) {
|
|
3394
3394
|
return c.isOrthographicCamera;
|
|
3395
3395
|
}
|
|
3396
3396
|
const Xe = Math.PI * 2, sr = Math.PI / 2, Dr = 1e-5, us = Math.PI / 180;
|
|
@@ -3435,16 +3435,16 @@ function nr(c, s, t, e, i = 1 / 0, n, r) {
|
|
|
3435
3435
|
h = c.x - f, d = c.y - E, u = c.z - p;
|
|
3436
3436
|
const F = (t.x + o * f) * n, S = (t.y + o * E) * n, L = (t.z + o * p) * n;
|
|
3437
3437
|
t.x = (t.x - o * F) * l, t.y = (t.y - o * S) * l, t.z = (t.z - o * L) * l, r.x = h + (f + F) * l, r.y = d + (E + S) * l, r.z = u + (p + L) * l;
|
|
3438
|
-
const N = I - c.x, x = m - c.y, k = C - c.z, w = r.x - I, P = r.y - m,
|
|
3439
|
-
return N * w + x * P + k *
|
|
3438
|
+
const N = I - c.x, x = m - c.y, k = C - c.z, w = r.x - I, P = r.y - m, T = r.z - C;
|
|
3439
|
+
return N * w + x * P + k * T > 0 && (r.x = I, r.y = m, r.z = C, t.x = (r.x - I) / n, t.y = (r.y - m) / n, t.z = (r.z - C) / n), r;
|
|
3440
3440
|
}
|
|
3441
|
-
function
|
|
3441
|
+
function Yi(c, s) {
|
|
3442
3442
|
s.set(0, 0), c.forEach((t) => {
|
|
3443
3443
|
s.x += t.clientX, s.y += t.clientY;
|
|
3444
3444
|
}), s.x /= c.length, s.y /= c.length;
|
|
3445
3445
|
}
|
|
3446
|
-
function
|
|
3447
|
-
return
|
|
3446
|
+
function Gi(c, s) {
|
|
3447
|
+
return Te(c) ? (console.warn(`${s} is not supported in OrthographicCamera`), !0) : !1;
|
|
3448
3448
|
}
|
|
3449
3449
|
class xa {
|
|
3450
3450
|
constructor() {
|
|
@@ -3511,7 +3511,7 @@ class xa {
|
|
|
3511
3511
|
}
|
|
3512
3512
|
}
|
|
3513
3513
|
const va = "2.7.3", qs = 1 / 8, Ur = typeof window < "u", Da = Ur && /Mac/.test(navigator.platform), Ua = !(Ur && "PointerEvent" in window);
|
|
3514
|
-
let lt, rr, Ks,
|
|
3514
|
+
let lt, rr, Ks, Hi, kt, dt, Et, Ze, Es, ne, re, Ne, or, ar, Wt, ms, $e, cr, Wi, lr, Xi, Zi, Js;
|
|
3515
3515
|
class vt extends xa {
|
|
3516
3516
|
/**
|
|
3517
3517
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -3554,7 +3554,7 @@ class vt extends xa {
|
|
|
3554
3554
|
* @category Statics
|
|
3555
3555
|
*/
|
|
3556
3556
|
static install(s) {
|
|
3557
|
-
lt = s.THREE, rr = Object.freeze(new lt.Vector3(0, 0, 0)), Ks = Object.freeze(new lt.Vector3(0, 1, 0)),
|
|
3557
|
+
lt = s.THREE, rr = Object.freeze(new lt.Vector3(0, 0, 0)), Ks = Object.freeze(new lt.Vector3(0, 1, 0)), Hi = Object.freeze(new lt.Vector3(0, 0, 1)), kt = new lt.Vector2(), dt = new lt.Vector3(), Et = new lt.Vector3(), Ze = new lt.Vector3(), Es = new lt.Vector3(), ne = new lt.Vector3(), re = new lt.Vector3(), Ne = new lt.Vector3(), or = new lt.Vector3(), ar = new lt.Vector3(), Wt = new lt.Spherical(), ms = new lt.Spherical(), $e = new lt.Box3(), cr = new lt.Box3(), Wi = new lt.Sphere(), lr = new lt.Quaternion(), Xi = new lt.Quaternion(), Zi = new lt.Matrix4(), Js = new lt.Raycaster();
|
|
3558
3558
|
}
|
|
3559
3559
|
/**
|
|
3560
3560
|
* list all ACTIONs
|
|
@@ -3587,7 +3587,7 @@ class vt extends xa {
|
|
|
3587
3587
|
if (Oe(this._camera)) {
|
|
3588
3588
|
const N = dt.copy(this._camera.position).sub(this._target), x = this._camera.getEffectiveFOV() * us, k = N.length() * Math.tan(x * 0.5);
|
|
3589
3589
|
S = this.truckSpeed * g * k / this._elementRect.height, L = this.truckSpeed * y * k / this._elementRect.height;
|
|
3590
|
-
} else if (
|
|
3590
|
+
} else if (Te(this._camera)) {
|
|
3591
3591
|
const N = this._camera;
|
|
3592
3592
|
S = g * (N.right - N.left) / N.zoom / this._elementRect.width, L = y * (N.top - N.bottom) / N.zoom / this._elementRect.height;
|
|
3593
3593
|
} else
|
|
@@ -3611,10 +3611,10 @@ class vt extends xa {
|
|
|
3611
3611
|
left: G.ROTATE,
|
|
3612
3612
|
middle: G.DOLLY,
|
|
3613
3613
|
right: G.TRUCK,
|
|
3614
|
-
wheel: Oe(this._camera) ? G.DOLLY :
|
|
3614
|
+
wheel: Oe(this._camera) ? G.DOLLY : Te(this._camera) ? G.ZOOM : G.NONE
|
|
3615
3615
|
}, this.touches = {
|
|
3616
3616
|
one: G.TOUCH_ROTATE,
|
|
3617
|
-
two: Oe(this._camera) ? G.TOUCH_DOLLY_TRUCK :
|
|
3617
|
+
two: Oe(this._camera) ? G.TOUCH_DOLLY_TRUCK : Te(this._camera) ? G.TOUCH_ZOOM_TRUCK : G.NONE,
|
|
3618
3618
|
three: G.TOUCH_TRUCK
|
|
3619
3619
|
};
|
|
3620
3620
|
const e = new lt.Vector2(), i = new lt.Vector2(), n = new lt.Vector2(), r = (g) => {
|
|
@@ -3761,7 +3761,7 @@ class vt extends xa {
|
|
|
3761
3761
|
}, p = (g) => {
|
|
3762
3762
|
if (!this._enabled)
|
|
3763
3763
|
return;
|
|
3764
|
-
if (
|
|
3764
|
+
if (Yi(this._activePointers, kt), this._getClientRect(this._elementRect), e.copy(kt), i.copy(kt), this._activePointers.length >= 2) {
|
|
3765
3765
|
const F = kt.x - this._activePointers[1].clientX, S = kt.y - this._activePointers[1].clientY, L = Math.sqrt(F * F + S * S);
|
|
3766
3766
|
n.set(0, L);
|
|
3767
3767
|
const N = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, x = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
|
|
@@ -3787,7 +3787,7 @@ class vt extends xa {
|
|
|
3787
3787
|
}, I = () => {
|
|
3788
3788
|
if (!this._enabled || !this._dragNeedsUpdate)
|
|
3789
3789
|
return;
|
|
3790
|
-
this._dragNeedsUpdate = !1,
|
|
3790
|
+
this._dragNeedsUpdate = !1, Yi(this._activePointers, kt);
|
|
3791
3791
|
const y = this._domElement && document.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, F = y ? -y.deltaX : i.x - kt.x, S = y ? -y.deltaY : i.y - kt.y;
|
|
3792
3792
|
if (i.copy(kt), ((this._state & G.ROTATE) === G.ROTATE || (this._state & G.TOUCH_ROTATE) === G.TOUCH_ROTATE || (this._state & G.TOUCH_DOLLY_ROTATE) === G.TOUCH_DOLLY_ROTATE || (this._state & G.TOUCH_ZOOM_ROTATE) === G.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(F, S), this._isUserControllingRotate = !0), (this._state & G.DOLLY) === G.DOLLY || (this._state & G.ZOOM) === G.ZOOM) {
|
|
3793
3793
|
const L = 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, x = this.dollyDragInverted ? -1 : 1;
|
|
@@ -3801,7 +3801,7 @@ class vt extends xa {
|
|
|
3801
3801
|
}
|
|
3802
3802
|
((this._state & G.TRUCK) === G.TRUCK || (this._state & G.TOUCH_TRUCK) === G.TOUCH_TRUCK || (this._state & G.TOUCH_DOLLY_TRUCK) === G.TOUCH_DOLLY_TRUCK || (this._state & G.TOUCH_ZOOM_TRUCK) === G.TOUCH_ZOOM_TRUCK) && (this._truckInternal(F, S, !1), this._isUserControllingTruck = !0), ((this._state & G.OFFSET) === G.OFFSET || (this._state & G.TOUCH_OFFSET) === G.TOUCH_OFFSET || (this._state & G.TOUCH_DOLLY_OFFSET) === G.TOUCH_DOLLY_OFFSET || (this._state & G.TOUCH_ZOOM_OFFSET) === G.TOUCH_ZOOM_OFFSET) && (this._truckInternal(F, S, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
|
3803
3803
|
}, m = () => {
|
|
3804
|
-
|
|
3804
|
+
Yi(this._activePointers, kt), i.copy(kt), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", a, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.removeEventListener("mouseup", d), this.dispatchEvent({ type: "controlend" }));
|
|
3805
3805
|
};
|
|
3806
3806
|
this.lockPointer = () => {
|
|
3807
3807
|
!this._enabled || !this._domElement || (this.cancel(), this._lockedPointer = {
|
|
@@ -4192,15 +4192,15 @@ class vt extends xa {
|
|
|
4192
4192
|
l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
|
|
4193
4193
|
const h = ir(this._sphericalEnd.theta, sr), d = ir(this._sphericalEnd.phi, sr);
|
|
4194
4194
|
a.push(this.rotateTo(h, d, t));
|
|
4195
|
-
const u = dt.setFromSpherical(this._sphericalEnd).normalize(), f = lr.setFromUnitVectors(u,
|
|
4196
|
-
E && f.multiply(
|
|
4195
|
+
const u = dt.setFromSpherical(this._sphericalEnd).normalize(), f = lr.setFromUnitVectors(u, Hi), E = mt(Math.abs(u.y), 1);
|
|
4196
|
+
E && f.multiply(Xi.setFromAxisAngle(Ks, h)), f.multiply(this._yAxisUpSpaceInverse);
|
|
4197
4197
|
const p = cr.makeEmpty();
|
|
4198
|
-
Et.copy(l.min).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setX(l.max.x).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setY(l.max.y).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setZ(l.min.z).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setZ(l.max.z).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setY(l.min.y).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setX(l.min.x).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).applyQuaternion(f), p.expandByPoint(Et), p.min.x -= i, p.min.y -= r, p.max.x += n, p.max.y += o, f.setFromUnitVectors(
|
|
4198
|
+
Et.copy(l.min).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setX(l.max.x).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setY(l.max.y).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setZ(l.min.z).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setZ(l.max.z).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setY(l.min.y).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setX(l.min.x).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).applyQuaternion(f), p.expandByPoint(Et), p.min.x -= i, p.min.y -= r, p.max.x += n, p.max.y += o, f.setFromUnitVectors(Hi, u), E && f.premultiply(Xi.invert()), f.premultiply(this._yAxisUpSpace);
|
|
4199
4199
|
const I = p.getSize(dt), m = p.getCenter(Et).applyQuaternion(f);
|
|
4200
4200
|
if (Oe(this._camera)) {
|
|
4201
4201
|
const C = this.getDistanceToFitBox(I.x, I.y, I.z, e);
|
|
4202
4202
|
a.push(this.moveTo(m.x, m.y, m.z, t)), a.push(this.dollyTo(C, t)), a.push(this.setFocalOffset(0, 0, 0, t));
|
|
4203
|
-
} else if (
|
|
4203
|
+
} else if (Te(this._camera)) {
|
|
4204
4204
|
const C = this._camera, R = C.right - C.left, g = C.top - C.bottom, y = e ? Math.max(R / I.x, g / I.y) : Math.min(R / I.x, g / I.y);
|
|
4205
4205
|
a.push(this.moveTo(m.x, m.y, m.z, t)), a.push(this.zoomTo(y, t)), a.push(this.setFocalOffset(0, 0, 0, t));
|
|
4206
4206
|
}
|
|
@@ -4213,11 +4213,11 @@ class vt extends xa {
|
|
|
4213
4213
|
* @category Methods
|
|
4214
4214
|
*/
|
|
4215
4215
|
fitToSphere(s, t) {
|
|
4216
|
-
const e = [], n = s instanceof lt.Sphere ?
|
|
4216
|
+
const e = [], n = s instanceof lt.Sphere ? Wi.copy(s) : vt.createBoundingSphere(s, Wi);
|
|
4217
4217
|
if (e.push(this.moveTo(n.center.x, n.center.y, n.center.z, t)), Oe(this._camera)) {
|
|
4218
4218
|
const r = this.getDistanceToFitSphere(n.radius);
|
|
4219
4219
|
e.push(this.dollyTo(r, t));
|
|
4220
|
-
} else if (
|
|
4220
|
+
} else if (Te(this._camera)) {
|
|
4221
4221
|
const r = this._camera.right - this._camera.left, o = this._camera.top - this._camera.bottom, a = 2 * n.radius, l = Math.min(r / a, o / a);
|
|
4222
4222
|
e.push(this.zoomTo(l, t));
|
|
4223
4223
|
}
|
|
@@ -4358,7 +4358,7 @@ class vt extends xa {
|
|
|
4358
4358
|
* @category Methods
|
|
4359
4359
|
*/
|
|
4360
4360
|
getDistanceToFitBox(s, t, e, i = !1) {
|
|
4361
|
-
if (
|
|
4361
|
+
if (Gi(this._camera, "getDistanceToFitBox"))
|
|
4362
4362
|
return this._spherical.radius;
|
|
4363
4363
|
const n = s / t, r = this._camera.getEffectiveFOV() * us, o = this._camera.aspect;
|
|
4364
4364
|
return ((i ? n > o : n < o) ? t : s / o) * 0.5 / Math.tan(r * 0.5) + e * 0.5;
|
|
@@ -4370,7 +4370,7 @@ class vt extends xa {
|
|
|
4370
4370
|
* @category Methods
|
|
4371
4371
|
*/
|
|
4372
4372
|
getDistanceToFitSphere(s) {
|
|
4373
|
-
if (
|
|
4373
|
+
if (Gi(this._camera, "getDistanceToFitSphere"))
|
|
4374
4374
|
return this._spherical.radius;
|
|
4375
4375
|
const t = this._camera.getEffectiveFOV() * us, e = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, i = 1 < this._camera.aspect ? t : e;
|
|
4376
4376
|
return s / Math.sin(i * 0.5);
|
|
@@ -4520,7 +4520,7 @@ class vt extends xa {
|
|
|
4520
4520
|
this._boundary.clampPoint(g, g);
|
|
4521
4521
|
const S = Et.subVectors(g, this._targetEnd);
|
|
4522
4522
|
this._targetEnd.copy(g), this._target.add(S), this._changedDolly -= d, Tt(this._changedDolly) && (this._changedDolly = 0);
|
|
4523
|
-
} else if (
|
|
4523
|
+
} else if (Te(this._camera) && this._changedZoom !== 0) {
|
|
4524
4524
|
const d = this._zoom - this._lastZoom, u = this._camera, f = dt.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (u.near + u.far) / (u.near - u.far)).unproject(u), E = Et.set(0, 0, -1).applyQuaternion(u.quaternion), p = Ze.copy(f).add(E.multiplyScalar(-f.dot(u.up))), m = -(this._zoom - d - this._zoom) / this._zoom, C = this._getCameraDirection(Es), R = this._targetEnd.dot(C), g = dt.copy(this._targetEnd).lerp(p, m), y = g.dot(C), F = C.multiplyScalar(y - R);
|
|
4525
4525
|
g.sub(F), this._boundary.clampPoint(g, g);
|
|
4526
4526
|
const S = Et.subVectors(g, this._targetEnd);
|
|
@@ -4635,7 +4635,7 @@ class vt extends xa {
|
|
|
4635
4635
|
if (Oe(this._camera)) {
|
|
4636
4636
|
const s = this._camera, t = s.near, e = s.getEffectiveFOV() * us, i = Math.tan(e * 0.5) * t, n = i * s.aspect;
|
|
4637
4637
|
this._nearPlaneCorners[0].set(-n, -i, 0), this._nearPlaneCorners[1].set(n, -i, 0), this._nearPlaneCorners[2].set(n, i, 0), this._nearPlaneCorners[3].set(-n, i, 0);
|
|
4638
|
-
} else if (
|
|
4638
|
+
} else if (Te(this._camera)) {
|
|
4639
4639
|
const s = this._camera, t = 1 / s.zoom, e = s.left * t, i = s.right * t, n = s.top * t, r = s.bottom * t;
|
|
4640
4640
|
this._nearPlaneCorners[0].set(e, n, 0), this._nearPlaneCorners[1].set(i, n, 0), this._nearPlaneCorners[2].set(i, r, 0), this._nearPlaneCorners[3].set(e, r, 0);
|
|
4641
4641
|
}
|
|
@@ -4643,13 +4643,13 @@ class vt extends xa {
|
|
|
4643
4643
|
// lateUpdate
|
|
4644
4644
|
_collisionTest() {
|
|
4645
4645
|
let s = 1 / 0;
|
|
4646
|
-
if (!(this.colliderMeshes.length >= 1) ||
|
|
4646
|
+
if (!(this.colliderMeshes.length >= 1) || Gi(this._camera, "_collisionTest"))
|
|
4647
4647
|
return s;
|
|
4648
4648
|
const e = this._getTargetDirection(Es);
|
|
4649
|
-
|
|
4649
|
+
Zi.lookAt(rr, e, this._camera.up);
|
|
4650
4650
|
for (let i = 0; i < 4; i++) {
|
|
4651
4651
|
const n = Et.copy(this._nearPlaneCorners[i]);
|
|
4652
|
-
n.applyMatrix4(
|
|
4652
|
+
n.applyMatrix4(Zi);
|
|
4653
4653
|
const r = Ze.addVectors(this._target, n);
|
|
4654
4654
|
Js.set(r, e), Js.far = this._spherical.radius + 1;
|
|
4655
4655
|
const o = Js.intersectObjects(this.colliderMeshes);
|
|
@@ -4732,27 +4732,27 @@ class Ns extends Ca {
|
|
|
4732
4732
|
constructor(t) {
|
|
4733
4733
|
super(t);
|
|
4734
4734
|
/** {@link Updateable.onBeforeUpdate} */
|
|
4735
|
-
|
|
4735
|
+
_(this, "onBeforeUpdate", new Q());
|
|
4736
4736
|
/** {@link Updateable.onAfterUpdate} */
|
|
4737
|
-
|
|
4737
|
+
_(this, "onAfterUpdate", new Q());
|
|
4738
4738
|
/**
|
|
4739
4739
|
* Event that is triggered when the aspect of the camera has been updated.
|
|
4740
4740
|
* This event is useful when you need to perform actions after the aspect of the camera has been changed.
|
|
4741
4741
|
*/
|
|
4742
|
-
|
|
4742
|
+
_(this, "onAspectUpdated", new Q());
|
|
4743
4743
|
/** {@link Disposable.onDisposed} */
|
|
4744
|
-
|
|
4744
|
+
_(this, "onDisposed", new Q());
|
|
4745
4745
|
/**
|
|
4746
4746
|
* A three.js PerspectiveCamera or OrthographicCamera instance.
|
|
4747
4747
|
* This camera is used for rendering the scene.
|
|
4748
4748
|
*/
|
|
4749
|
-
|
|
4750
|
-
|
|
4749
|
+
_(this, "three");
|
|
4750
|
+
_(this, "_allControls", /* @__PURE__ */ new Map());
|
|
4751
4751
|
/**
|
|
4752
4752
|
* Updates the aspect of the camera to match the size of the
|
|
4753
4753
|
* {@link Components.renderer}.
|
|
4754
4754
|
*/
|
|
4755
|
-
|
|
4755
|
+
_(this, "updateAspect", () => {
|
|
4756
4756
|
var t;
|
|
4757
4757
|
if (!(!this.currentWorld || !this.currentWorld.renderer)) {
|
|
4758
4758
|
if (this.three instanceof M.OrthographicCamera) {
|
|
@@ -4851,33 +4851,23 @@ class Ns extends Ca {
|
|
|
4851
4851
|
};
|
|
4852
4852
|
}
|
|
4853
4853
|
}
|
|
4854
|
-
const
|
|
4854
|
+
const fi = class fi extends St {
|
|
4855
4855
|
constructor(t) {
|
|
4856
4856
|
super(t);
|
|
4857
4857
|
/** {@link Updateable.onAfterUpdate} */
|
|
4858
|
-
|
|
4858
|
+
_(this, "onAfterUpdate", new Q());
|
|
4859
4859
|
/** {@link Updateable.onBeforeUpdate} */
|
|
4860
|
-
|
|
4860
|
+
_(this, "onBeforeUpdate", new Q());
|
|
4861
4861
|
/** {@link Disposable.onDisposed} */
|
|
4862
|
-
|
|
4863
|
-
/**
|
|
4864
|
-
* An event that is triggered when a new world is created.
|
|
4865
|
-
* The event passes the newly created world as a parameter.
|
|
4866
|
-
*/
|
|
4867
|
-
T(this, "onWorldCreated", new j());
|
|
4868
|
-
/**
|
|
4869
|
-
* An event that is triggered when a world is deleted.
|
|
4870
|
-
* The event passes the UUID of the deleted world as a parameter.
|
|
4871
|
-
*/
|
|
4872
|
-
T(this, "onWorldDeleted", new j());
|
|
4862
|
+
_(this, "onDisposed", new Q());
|
|
4873
4863
|
/**
|
|
4874
4864
|
* A collection of worlds managed by this component.
|
|
4875
4865
|
* The key is the unique identifier (UUID) of the world, and the value is the World instance.
|
|
4876
4866
|
*/
|
|
4877
|
-
|
|
4867
|
+
_(this, "list", new Ee());
|
|
4878
4868
|
/** {@link Component.enabled} */
|
|
4879
|
-
|
|
4880
|
-
t.add(
|
|
4869
|
+
_(this, "enabled", !0);
|
|
4870
|
+
t.add(fi.uuid, this);
|
|
4881
4871
|
}
|
|
4882
4872
|
/**
|
|
4883
4873
|
* Creates a new instance of a SimpleWorld and adds it to the list of worlds.
|
|
@@ -4892,7 +4882,7 @@ const ui = class ui extends St {
|
|
|
4892
4882
|
const t = new La(this.components), e = t.uuid;
|
|
4893
4883
|
if (this.list.has(e))
|
|
4894
4884
|
throw new Error("There is already a world with this name!");
|
|
4895
|
-
return this.list.set(e, t),
|
|
4885
|
+
return this.list.set(e, t), t;
|
|
4896
4886
|
}
|
|
4897
4887
|
/**
|
|
4898
4888
|
* Deletes a world from the list of worlds.
|
|
@@ -4900,21 +4890,16 @@ const ui = class ui extends St {
|
|
|
4900
4890
|
* @param {World} world - The world to be deleted.
|
|
4901
4891
|
*
|
|
4902
4892
|
* @throws {Error} - Throws an error if the provided world is not found in the list.
|
|
4903
|
-
*
|
|
4904
|
-
* @returns {void}
|
|
4905
4893
|
*/
|
|
4906
4894
|
delete(t) {
|
|
4907
4895
|
if (!this.list.has(t.uuid))
|
|
4908
4896
|
throw new Error("The provided world is not found in the list!");
|
|
4909
|
-
|
|
4910
|
-
this.list.delete(t.uuid), t.dispose(), this.onWorldDeleted.trigger(e);
|
|
4897
|
+
this.list.delete(t.uuid), t.dispose();
|
|
4911
4898
|
}
|
|
4912
4899
|
/**
|
|
4913
4900
|
* Disposes of the Worlds component and all its managed worlds.
|
|
4914
4901
|
* This method sets the enabled flag to false, disposes of all worlds, clears the list,
|
|
4915
4902
|
* and triggers the onDisposed event.
|
|
4916
|
-
*
|
|
4917
|
-
* @returns {void}
|
|
4918
4903
|
*/
|
|
4919
4904
|
dispose() {
|
|
4920
4905
|
this.enabled = !1;
|
|
@@ -4933,8 +4918,8 @@ const ui = class ui extends St {
|
|
|
4933
4918
|
* A unique identifier for the component.
|
|
4934
4919
|
* This UUID is used to register the component within the Components system.
|
|
4935
4920
|
*/
|
|
4936
|
-
|
|
4937
|
-
let
|
|
4921
|
+
_(fi, "uuid", "fdb61dc4-2ec1-4966-b83d-54ea795fad4a");
|
|
4922
|
+
let hi = fi;
|
|
4938
4923
|
function Ba(c, s, t, e) {
|
|
4939
4924
|
return new Promise((i, n) => {
|
|
4940
4925
|
function r() {
|
|
@@ -4963,52 +4948,52 @@ async function Br(c, s, t, e, i, n, r, o) {
|
|
|
4963
4948
|
class ka {
|
|
4964
4949
|
constructor(s, t, e) {
|
|
4965
4950
|
/** {@link Disposable.onDisposed} */
|
|
4966
|
-
|
|
4951
|
+
_(this, "onDisposed", new Q());
|
|
4967
4952
|
/**
|
|
4968
4953
|
* Fires after making the visibility check to the meshes. It lists the
|
|
4969
4954
|
* meshes that are currently visible, and the ones that were visible
|
|
4970
4955
|
* just before but not anymore.
|
|
4971
4956
|
*/
|
|
4972
|
-
|
|
4957
|
+
_(this, "onViewUpdated", new oi());
|
|
4973
4958
|
/**
|
|
4974
4959
|
* Whether this renderer is active or not. If not, it won't render anything.
|
|
4975
4960
|
*/
|
|
4976
|
-
|
|
4961
|
+
_(this, "enabled", !0);
|
|
4977
4962
|
/**
|
|
4978
4963
|
* Needs to check whether there are objects that need to be hidden or shown.
|
|
4979
4964
|
* You can bind this to the camera movement, to a certain interval, etc.
|
|
4980
4965
|
*/
|
|
4981
|
-
|
|
4966
|
+
_(this, "needsUpdate", !1);
|
|
4982
4967
|
/**
|
|
4983
4968
|
* Render the internal scene used to determine the object visibility. Used
|
|
4984
4969
|
* for debugging purposes.
|
|
4985
4970
|
*/
|
|
4986
|
-
|
|
4971
|
+
_(this, "renderDebugFrame", !1);
|
|
4987
4972
|
/** The components instance to which this renderer belongs. */
|
|
4988
|
-
|
|
4973
|
+
_(this, "components");
|
|
4989
4974
|
/** The world instance to which this renderer belongs. */
|
|
4990
|
-
|
|
4975
|
+
_(this, "world");
|
|
4991
4976
|
/** The THREE.js renderer used to make the visibility test. */
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
4977
|
+
_(this, "renderer");
|
|
4978
|
+
_(this, "autoUpdate", !0);
|
|
4979
|
+
_(this, "updateInterval", 1e3);
|
|
4980
|
+
_(this, "worker");
|
|
4981
|
+
_(this, "scene", new M.Scene());
|
|
4982
|
+
_(this, "_width", 512);
|
|
4983
|
+
_(this, "_height", 512);
|
|
4984
|
+
_(this, "_availableColor", 1);
|
|
4985
|
+
_(this, "renderTarget");
|
|
4986
|
+
_(this, "bufferSize");
|
|
4987
|
+
_(this, "_buffer");
|
|
5003
4988
|
// Prevents worker being fired multiple times
|
|
5004
|
-
|
|
4989
|
+
_(this, "_isWorkerBusy", !1);
|
|
5005
4990
|
/**
|
|
5006
4991
|
* The function that the culler uses to reprocess the scene. Generally it's
|
|
5007
4992
|
* better to call needsUpdate, but you can also call this to force it.
|
|
5008
4993
|
* @param force if true, it will refresh the scene even if needsUpdate is
|
|
5009
4994
|
* not true.
|
|
5010
4995
|
*/
|
|
5011
|
-
|
|
4996
|
+
_(this, "updateVisibility", async (s) => {
|
|
5012
4997
|
if (!this.enabled || !this.needsUpdate && !s || this._isWorkerBusy)
|
|
5013
4998
|
return;
|
|
5014
4999
|
this._isWorkerBusy = !0;
|
|
@@ -5100,33 +5085,33 @@ class Va extends ka {
|
|
|
5100
5085
|
* Event triggered when the visibility of meshes is updated.
|
|
5101
5086
|
* Contains two sets: seen and unseen.
|
|
5102
5087
|
*/
|
|
5103
|
-
|
|
5088
|
+
_(this, "onViewUpdated", new Q());
|
|
5104
5089
|
/**
|
|
5105
5090
|
* Pixels in screen a geometry must occupy to be considered "seen".
|
|
5106
5091
|
* Default value is 100.
|
|
5107
5092
|
*/
|
|
5108
|
-
|
|
5093
|
+
_(this, "threshold", 100);
|
|
5109
5094
|
/**
|
|
5110
5095
|
* Map of color code to THREE.InstancedMesh.
|
|
5111
5096
|
* Used to keep track of color-coded meshes.
|
|
5112
5097
|
*/
|
|
5113
|
-
|
|
5098
|
+
_(this, "colorMeshes", /* @__PURE__ */ new Map());
|
|
5114
5099
|
/**
|
|
5115
5100
|
* Flag to indicate if the renderer is currently processing.
|
|
5116
5101
|
* Used to prevent concurrent processing.
|
|
5117
5102
|
*/
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5103
|
+
_(this, "isProcessing", !1);
|
|
5104
|
+
_(this, "_interval", null);
|
|
5105
|
+
_(this, "_colorCodeMeshMap", /* @__PURE__ */ new Map());
|
|
5106
|
+
_(this, "_meshIDColorCodeMap", /* @__PURE__ */ new Map());
|
|
5107
|
+
_(this, "_currentVisibleMeshes", /* @__PURE__ */ new Set());
|
|
5108
|
+
_(this, "_recentlyHiddenMeshes", /* @__PURE__ */ new Set());
|
|
5109
|
+
_(this, "_intervalID", null);
|
|
5110
|
+
_(this, "_transparentMat", new M.MeshBasicMaterial({
|
|
5126
5111
|
transparent: !0,
|
|
5127
5112
|
opacity: 0
|
|
5128
5113
|
}));
|
|
5129
|
-
|
|
5114
|
+
_(this, "handleWorkerMessage", async (t) => {
|
|
5130
5115
|
if (this.isProcessing)
|
|
5131
5116
|
return;
|
|
5132
5117
|
const e = t.data.colors;
|
|
@@ -5154,7 +5139,7 @@ class Va extends ka {
|
|
|
5154
5139
|
/** {@link Disposable.dispose} */
|
|
5155
5140
|
dispose() {
|
|
5156
5141
|
super.dispose(), this._intervalID !== null && (window.clearInterval(this._intervalID), this._intervalID = null), this._interval !== null && (window.clearInterval(this._interval), this._intervalID = null), this._currentVisibleMeshes.clear(), this._recentlyHiddenMeshes.clear(), this._meshIDColorCodeMap.clear(), this._transparentMat.dispose(), this._colorCodeMeshMap.clear();
|
|
5157
|
-
const t = this.components.get(
|
|
5142
|
+
const t = this.components.get(Fe);
|
|
5158
5143
|
for (const e in this.colorMeshes) {
|
|
5159
5144
|
const i = this.colorMeshes.get(e);
|
|
5160
5145
|
i && t.destroy(i, !0);
|
|
@@ -5207,7 +5192,7 @@ class Va extends ka {
|
|
|
5207
5192
|
return;
|
|
5208
5193
|
}
|
|
5209
5194
|
this.isProcessing = !0;
|
|
5210
|
-
const e = this.components.get(
|
|
5195
|
+
const e = this.components.get(Fe);
|
|
5211
5196
|
this._currentVisibleMeshes.delete(t), this._recentlyHiddenMeshes.delete(t);
|
|
5212
5197
|
const i = this.colorMeshes.get(t.uuid), n = this._meshIDColorCodeMap.get(t.uuid);
|
|
5213
5198
|
if (!i || !n) {
|
|
@@ -5249,12 +5234,12 @@ const ws = class ws extends St {
|
|
|
5249
5234
|
/**
|
|
5250
5235
|
* An event that is triggered when the Cullers component is disposed.
|
|
5251
5236
|
*/
|
|
5252
|
-
|
|
5253
|
-
|
|
5237
|
+
_(this, "onDisposed", new Q());
|
|
5238
|
+
_(this, "_enabled", !0);
|
|
5254
5239
|
/**
|
|
5255
5240
|
* A map of MeshCullerRenderer instances, keyed by their world UUIDs.
|
|
5256
5241
|
*/
|
|
5257
|
-
|
|
5242
|
+
_(this, "list", /* @__PURE__ */ new Map());
|
|
5258
5243
|
t.add(ws.uuid, this);
|
|
5259
5244
|
}
|
|
5260
5245
|
/** {@link Component.enabled} */
|
|
@@ -5317,66 +5302,66 @@ const ws = class ws extends St {
|
|
|
5317
5302
|
* A unique identifier for the component.
|
|
5318
5303
|
* This UUID is used to register the component within the Components system.
|
|
5319
5304
|
*/
|
|
5320
|
-
|
|
5305
|
+
_(ws, "uuid", "69f2a50d-c266-44fc-b1bd-fa4d34be89e6");
|
|
5321
5306
|
let cn = ws;
|
|
5322
5307
|
class Ya {
|
|
5323
5308
|
constructor(s, t) {
|
|
5324
5309
|
/** {@link Disposable.onDisposed} */
|
|
5325
|
-
|
|
5310
|
+
_(this, "onDisposed", new Q());
|
|
5326
5311
|
/**
|
|
5327
5312
|
* Fires after making the visibility check to the meshes. It lists the
|
|
5328
5313
|
* meshes that are currently visible, and the ones that were visible
|
|
5329
5314
|
* just before but not anymore.
|
|
5330
5315
|
*/
|
|
5331
|
-
|
|
5316
|
+
_(this, "onDistanceComputed", new Q());
|
|
5332
5317
|
/**
|
|
5333
5318
|
* Objects that won't be taken into account in the distance check.
|
|
5334
5319
|
*/
|
|
5335
|
-
|
|
5320
|
+
_(this, "excludedObjects", /* @__PURE__ */ new Set());
|
|
5336
5321
|
/**
|
|
5337
5322
|
* Whether this renderer is active or not. If not, it won't render anything.
|
|
5338
5323
|
*/
|
|
5339
|
-
|
|
5324
|
+
_(this, "enabled", !0);
|
|
5340
5325
|
/**
|
|
5341
5326
|
* Render the internal scene used to determine the object visibility. Used
|
|
5342
5327
|
* for debugging purposes.
|
|
5343
5328
|
*/
|
|
5344
|
-
|
|
5329
|
+
_(this, "renderDebugFrame", !1);
|
|
5345
5330
|
/** The components instance to which this renderer belongs. */
|
|
5346
|
-
|
|
5331
|
+
_(this, "components");
|
|
5347
5332
|
/**
|
|
5348
5333
|
* The scene where the distance is computed.
|
|
5349
5334
|
*/
|
|
5350
|
-
|
|
5335
|
+
_(this, "scene", new M.Scene());
|
|
5351
5336
|
/**
|
|
5352
5337
|
* The camera used to compute the distance.
|
|
5353
5338
|
*/
|
|
5354
|
-
|
|
5339
|
+
_(this, "camera", new M.OrthographicCamera(-1, 1, 1, -1, 0, 1));
|
|
5355
5340
|
/**
|
|
5356
5341
|
* The material used to compute the distance.
|
|
5357
5342
|
*/
|
|
5358
|
-
|
|
5343
|
+
_(this, "depthMaterial");
|
|
5359
5344
|
/** The world instance to which this renderer belongs. */
|
|
5360
|
-
|
|
5345
|
+
_(this, "world");
|
|
5361
5346
|
/** The THREE.js renderer used to make the visibility test. */
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5347
|
+
_(this, "renderer");
|
|
5348
|
+
_(this, "worker");
|
|
5349
|
+
_(this, "_width", 512);
|
|
5350
|
+
_(this, "_height", 512);
|
|
5351
|
+
_(this, "_postQuad");
|
|
5352
|
+
_(this, "tempRT");
|
|
5353
|
+
_(this, "resultRT");
|
|
5354
|
+
_(this, "bufferSize");
|
|
5355
|
+
_(this, "_buffer");
|
|
5371
5356
|
// Prevents worker being fired multiple times
|
|
5372
|
-
|
|
5357
|
+
_(this, "_isWorkerBusy", !1);
|
|
5373
5358
|
/**
|
|
5374
5359
|
* The function that the culler uses to reprocess the scene. Generally it's
|
|
5375
5360
|
* better to call needsUpdate, but you can also call this to force it.
|
|
5376
5361
|
* @param force if true, it will refresh the scene even if needsUpdate is
|
|
5377
5362
|
* not true.
|
|
5378
5363
|
*/
|
|
5379
|
-
|
|
5364
|
+
_(this, "compute", async () => {
|
|
5380
5365
|
if (!this.enabled || this.world.isDisposing || this._isWorkerBusy)
|
|
5381
5366
|
return;
|
|
5382
5367
|
this._isWorkerBusy = !0, this.world.camera.three.updateMatrix(), this.renderer.setSize(this._width, this._height), this.renderer.setRenderTarget(this.tempRT);
|
|
@@ -5407,7 +5392,7 @@ class Ya {
|
|
|
5407
5392
|
buffer: this._buffer
|
|
5408
5393
|
});
|
|
5409
5394
|
});
|
|
5410
|
-
|
|
5395
|
+
_(this, "handleWorkerMessage", (s) => {
|
|
5411
5396
|
if (!this.enabled || this.world.isDisposing)
|
|
5412
5397
|
return;
|
|
5413
5398
|
const t = s.data.colors;
|
|
@@ -5492,16 +5477,16 @@ void main() {
|
|
|
5492
5477
|
class Dl extends Ma {
|
|
5493
5478
|
constructor() {
|
|
5494
5479
|
super(...arguments);
|
|
5495
|
-
|
|
5480
|
+
_(this, "_distanceRenderer");
|
|
5496
5481
|
/**
|
|
5497
5482
|
* Whether the bias property should be set automatically depending on the shadow distance.
|
|
5498
5483
|
*/
|
|
5499
|
-
|
|
5484
|
+
_(this, "autoBias", !0);
|
|
5500
5485
|
/**
|
|
5501
5486
|
* Configuration interface for the {@link ShadowedScene}.
|
|
5502
5487
|
* Defines properties for directional and ambient lights, as well as shadows.
|
|
5503
5488
|
*/
|
|
5504
|
-
|
|
5489
|
+
_(this, "config", {
|
|
5505
5490
|
directionalLight: {
|
|
5506
5491
|
color: new M.Color("white"),
|
|
5507
5492
|
intensity: 1.5,
|
|
@@ -5516,11 +5501,11 @@ class Dl extends Ma {
|
|
|
5516
5501
|
resolution: 512
|
|
5517
5502
|
}
|
|
5518
5503
|
});
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5504
|
+
_(this, "_lightsWithShadow", /* @__PURE__ */ new Map());
|
|
5505
|
+
_(this, "_isComputingShadows", !1);
|
|
5506
|
+
_(this, "_shadowsEnabled", !0);
|
|
5507
|
+
_(this, "_bias", 0);
|
|
5508
|
+
_(this, "recomputeShadows", (t) => {
|
|
5524
5509
|
if (!this._shadowsEnabled)
|
|
5525
5510
|
return;
|
|
5526
5511
|
if (this.autoBias && (this.bias = t / -1e5), t *= 1.5, !this.currentWorld)
|
|
@@ -5625,11 +5610,11 @@ class Dl extends Ma {
|
|
|
5625
5610
|
}
|
|
5626
5611
|
class Ga {
|
|
5627
5612
|
constructor(s) {
|
|
5628
|
-
|
|
5629
|
-
|
|
5613
|
+
_(this, "_event");
|
|
5614
|
+
_(this, "_position", new M.Vector2());
|
|
5630
5615
|
/** {@link Disposable.onDisposed} */
|
|
5631
|
-
|
|
5632
|
-
|
|
5616
|
+
_(this, "onDisposed", new Q());
|
|
5617
|
+
_(this, "updateMouseInfo", (s) => {
|
|
5633
5618
|
this._event = s;
|
|
5634
5619
|
});
|
|
5635
5620
|
this.dom = s, this.setupEvents(!0);
|
|
@@ -5661,23 +5646,23 @@ class Ga {
|
|
|
5661
5646
|
class Ha {
|
|
5662
5647
|
constructor(s, t) {
|
|
5663
5648
|
/** {@link Component.enabled} */
|
|
5664
|
-
|
|
5649
|
+
_(this, "enabled", !0);
|
|
5665
5650
|
/** The components instance to which this Raycaster belongs. */
|
|
5666
|
-
|
|
5651
|
+
_(this, "components");
|
|
5667
5652
|
/** {@link Disposable.onDisposed} */
|
|
5668
|
-
|
|
5653
|
+
_(this, "onDisposed", new Q());
|
|
5669
5654
|
/** The position of the mouse in the screen. */
|
|
5670
|
-
|
|
5655
|
+
_(this, "mouse");
|
|
5671
5656
|
/**
|
|
5672
5657
|
* A reference to the Three.js Raycaster instance.
|
|
5673
5658
|
* This is used for raycasting operations.
|
|
5674
5659
|
*/
|
|
5675
|
-
|
|
5660
|
+
_(this, "three", new M.Raycaster());
|
|
5676
5661
|
/**
|
|
5677
5662
|
* A reference to the world instance to which this Raycaster belongs.
|
|
5678
5663
|
* This is used to access the camera and meshes.
|
|
5679
5664
|
*/
|
|
5680
|
-
|
|
5665
|
+
_(this, "world");
|
|
5681
5666
|
const e = t.renderer;
|
|
5682
5667
|
if (!e)
|
|
5683
5668
|
throw new Error("A renderer is needed for the raycaster to work!");
|
|
@@ -5730,19 +5715,19 @@ class Ha {
|
|
|
5730
5715
|
);
|
|
5731
5716
|
}
|
|
5732
5717
|
}
|
|
5733
|
-
const
|
|
5718
|
+
const pi = class pi extends St {
|
|
5734
5719
|
constructor(t) {
|
|
5735
5720
|
super(t);
|
|
5736
5721
|
/** {@link Component.enabled} */
|
|
5737
|
-
|
|
5722
|
+
_(this, "enabled", !0);
|
|
5738
5723
|
/**
|
|
5739
5724
|
* A Map that stores raycasters for each world.
|
|
5740
5725
|
* The key is the world's UUID, and the value is the corresponding SimpleRaycaster instance.
|
|
5741
5726
|
*/
|
|
5742
|
-
|
|
5727
|
+
_(this, "list", /* @__PURE__ */ new Map());
|
|
5743
5728
|
/** {@link Disposable.onDisposed} */
|
|
5744
|
-
|
|
5745
|
-
t.add(
|
|
5729
|
+
_(this, "onDisposed", new Q());
|
|
5730
|
+
t.add(pi.uuid, this);
|
|
5746
5731
|
}
|
|
5747
5732
|
/**
|
|
5748
5733
|
* Retrieves a SimpleRaycaster instance for the given world.
|
|
@@ -5782,20 +5767,20 @@ const fi = class fi extends St {
|
|
|
5782
5767
|
* A unique identifier for the component.
|
|
5783
5768
|
* This UUID is used to register the component within the Components system.
|
|
5784
5769
|
*/
|
|
5785
|
-
|
|
5786
|
-
let ts =
|
|
5770
|
+
_(pi, "uuid", "d5d8bdf0-db25-4952-b951-b643af207ace");
|
|
5771
|
+
let ts = pi;
|
|
5787
5772
|
class Wa {
|
|
5788
5773
|
constructor(s, t, e) {
|
|
5789
5774
|
/** {@link Disposable.onDisposed} */
|
|
5790
|
-
|
|
5775
|
+
_(this, "onDisposed", new Q());
|
|
5791
5776
|
/** The world instance to which this Raycaster belongs. */
|
|
5792
|
-
|
|
5777
|
+
_(this, "world");
|
|
5793
5778
|
/** The components instance to which this grid belongs. */
|
|
5794
|
-
|
|
5779
|
+
_(this, "components");
|
|
5795
5780
|
/** The Three.js mesh that contains the infinite grid. */
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5781
|
+
_(this, "three");
|
|
5782
|
+
_(this, "_fade", 3);
|
|
5783
|
+
_(this, "updateZoom", () => {
|
|
5799
5784
|
this.world.camera instanceof Ns && (this.material.uniforms.uZoom.value = this.world.camera.three.zoom);
|
|
5800
5785
|
});
|
|
5801
5786
|
this.world = t;
|
|
@@ -5921,7 +5906,7 @@ class Wa {
|
|
|
5921
5906
|
}
|
|
5922
5907
|
/** {@link Disposable.dispose} */
|
|
5923
5908
|
dispose() {
|
|
5924
|
-
this.setupEvents(!1), this.components.get(
|
|
5909
|
+
this.setupEvents(!1), this.components.get(Fe).destroy(this.three), this.onDisposed.trigger(), this.onDisposed.reset(), this.world = null, this.components = null;
|
|
5925
5910
|
}
|
|
5926
5911
|
setupEvents(s) {
|
|
5927
5912
|
if (this.world.isDisposing || !(this.world.camera instanceof Ns))
|
|
@@ -5930,27 +5915,27 @@ class Wa {
|
|
|
5930
5915
|
s ? t.addEventListener("update", this.updateZoom) : t.removeEventListener("update", this.updateZoom);
|
|
5931
5916
|
}
|
|
5932
5917
|
}
|
|
5933
|
-
const
|
|
5918
|
+
const Ei = class Ei extends St {
|
|
5934
5919
|
constructor(t) {
|
|
5935
5920
|
super(t);
|
|
5936
5921
|
/**
|
|
5937
5922
|
* A map of world UUIDs to their corresponding grid instances.
|
|
5938
5923
|
*/
|
|
5939
|
-
|
|
5924
|
+
_(this, "list", /* @__PURE__ */ new Map());
|
|
5940
5925
|
/**
|
|
5941
5926
|
* The default configuration for grid creation.
|
|
5942
5927
|
*/
|
|
5943
|
-
|
|
5928
|
+
_(this, "config", {
|
|
5944
5929
|
color: new M.Color(12303291),
|
|
5945
5930
|
size1: 1,
|
|
5946
5931
|
size2: 10,
|
|
5947
5932
|
distance: 500
|
|
5948
5933
|
});
|
|
5949
5934
|
/** {@link Disposable.onDisposed} */
|
|
5950
|
-
|
|
5935
|
+
_(this, "onDisposed", new Q());
|
|
5951
5936
|
/** {@link Component.enabled} */
|
|
5952
|
-
|
|
5953
|
-
t.add(
|
|
5937
|
+
_(this, "enabled", !0);
|
|
5938
|
+
t.add(Ei.uuid, this);
|
|
5954
5939
|
}
|
|
5955
5940
|
/**
|
|
5956
5941
|
* Creates a new grid for the given world.
|
|
@@ -5994,14 +5979,14 @@ const pi = class pi extends St {
|
|
|
5994
5979
|
* A unique identifier for the component.
|
|
5995
5980
|
* This UUID is used to register the component within the Components system.
|
|
5996
5981
|
*/
|
|
5997
|
-
|
|
5998
|
-
let hr =
|
|
5999
|
-
const be = new ao(), xt = new q(),
|
|
5982
|
+
_(Ei, "uuid", "d1e814d5-b81c-4452-87a2-f039375e0489");
|
|
5983
|
+
let hr = Ei;
|
|
5984
|
+
const be = new ao(), xt = new q(), Ce = new q(), yt = new le(), dr = {
|
|
6000
5985
|
X: new q(1, 0, 0),
|
|
6001
5986
|
Y: new q(0, 1, 0),
|
|
6002
5987
|
Z: new q(0, 0, 1)
|
|
6003
|
-
},
|
|
6004
|
-
class Xa extends
|
|
5988
|
+
}, $i = { type: "change" }, ur = { type: "mouseDown" }, fr = { type: "mouseUp", mode: null }, pr = { type: "objectChange" };
|
|
5989
|
+
class Xa extends Qi {
|
|
6005
5990
|
constructor(s, t) {
|
|
6006
5991
|
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";
|
|
6007
5992
|
const e = new Ka();
|
|
@@ -6016,7 +6001,7 @@ class Xa extends ji {
|
|
|
6016
6001
|
return g !== void 0 ? g : R;
|
|
6017
6002
|
},
|
|
6018
6003
|
set: function(y) {
|
|
6019
|
-
g !== y && (g = y, i[C] = y, e[C] = y, n.dispatchEvent({ type: C + "-changed", value: y }), n.dispatchEvent(
|
|
6004
|
+
g !== y && (g = y, i[C] = y, e[C] = y, n.dispatchEvent({ type: C + "-changed", value: y }), n.dispatchEvent($i));
|
|
6020
6005
|
}
|
|
6021
6006
|
}), n[C] = R, i[C] = R, e[C] = R;
|
|
6022
6007
|
}
|
|
@@ -6032,13 +6017,13 @@ class Xa extends ji {
|
|
|
6032
6017
|
if (this.object === void 0 || this.dragging === !0)
|
|
6033
6018
|
return;
|
|
6034
6019
|
be.setFromCamera(s, this.camera);
|
|
6035
|
-
const t =
|
|
6020
|
+
const t = ji(this._gizmo.picker[this.mode], be);
|
|
6036
6021
|
t ? this.axis = t.object.name : this.axis = null;
|
|
6037
6022
|
}
|
|
6038
6023
|
pointerDown(s) {
|
|
6039
6024
|
if (!(this.object === void 0 || this.dragging === !0 || s.button !== 0) && this.axis !== null) {
|
|
6040
6025
|
be.setFromCamera(s, this.camera);
|
|
6041
|
-
const t =
|
|
6026
|
+
const t = ji(this._plane, be, !0);
|
|
6042
6027
|
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, ur.mode = this.mode, this.dispatchEvent(ur);
|
|
6043
6028
|
}
|
|
6044
6029
|
}
|
|
@@ -6048,24 +6033,24 @@ class Xa extends ji {
|
|
|
6048
6033
|
if (e === "scale" ? n = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (n = "world"), i === void 0 || t === null || this.dragging === !1 || s.button !== -1)
|
|
6049
6034
|
return;
|
|
6050
6035
|
be.setFromCamera(s, this.camera);
|
|
6051
|
-
const r =
|
|
6036
|
+
const r = ji(this._plane, be, !0);
|
|
6052
6037
|
if (r) {
|
|
6053
6038
|
if (this.pointEnd.copy(r.point).sub(this.worldPositionStart), e === "translate")
|
|
6054
6039
|
this._offset.copy(this.pointEnd).sub(this.pointStart), n === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), n === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), i.position.copy(this._offset).add(this._positionStart), this.translationSnap && (n === "local" && (i.position.applyQuaternion(yt.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (i.position.x = Math.round(i.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (i.position.y = Math.round(i.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (i.position.z = Math.round(i.position.z / this.translationSnap) * this.translationSnap), i.position.applyQuaternion(this._quaternionStart)), n === "world" && (i.parent && i.position.add(xt.setFromMatrixPosition(i.parent.matrixWorld)), t.search("X") !== -1 && (i.position.x = Math.round(i.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (i.position.y = Math.round(i.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (i.position.z = Math.round(i.position.z / this.translationSnap) * this.translationSnap), i.parent && i.position.sub(xt.setFromMatrixPosition(i.parent.matrixWorld))));
|
|
6055
6040
|
else if (e === "scale") {
|
|
6056
6041
|
if (t.search("XYZ") !== -1) {
|
|
6057
6042
|
let o = this.pointEnd.length() / this.pointStart.length();
|
|
6058
|
-
this.pointEnd.dot(this.pointStart) < 0 && (o *= -1),
|
|
6043
|
+
this.pointEnd.dot(this.pointStart) < 0 && (o *= -1), Ce.set(o, o, o);
|
|
6059
6044
|
} else
|
|
6060
|
-
xt.copy(this.pointStart),
|
|
6061
|
-
i.scale.copy(this._scaleStart).multiply(
|
|
6045
|
+
xt.copy(this.pointStart), Ce.copy(this.pointEnd), xt.applyQuaternion(this._worldQuaternionInv), Ce.applyQuaternion(this._worldQuaternionInv), Ce.divide(xt), t.search("X") === -1 && (Ce.x = 1), t.search("Y") === -1 && (Ce.y = 1), t.search("Z") === -1 && (Ce.z = 1);
|
|
6046
|
+
i.scale.copy(this._scaleStart).multiply(Ce), this.scaleSnap && (t.search("X") !== -1 && (i.scale.x = Math.round(i.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Y") !== -1 && (i.scale.y = Math.round(i.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Z") !== -1 && (i.scale.z = Math.round(i.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
|
|
6062
6047
|
} else if (e === "rotate") {
|
|
6063
6048
|
this._offset.copy(this.pointEnd).sub(this.pointStart);
|
|
6064
6049
|
const o = 20 / this.worldPosition.distanceTo(xt.setFromMatrixPosition(this.camera.matrixWorld));
|
|
6065
6050
|
let a = !1;
|
|
6066
6051
|
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(xt.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(dr[t]), xt.copy(dr[t]), n === "local" && xt.applyQuaternion(this.worldQuaternion), xt.cross(this.eye), xt.length() === 0 ? a = !0 : this.rotationAngle = this._offset.dot(xt.normalize()) * o), (t === "E" || a) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), n === "local" && t !== "E" && t !== "XYZE" ? (i.quaternion.copy(this._quaternionStart), i.quaternion.multiply(yt.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), i.quaternion.copy(yt.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), i.quaternion.multiply(this._quaternionStart).normalize());
|
|
6067
6052
|
}
|
|
6068
|
-
this.dispatchEvent(
|
|
6053
|
+
this.dispatchEvent($i), this.dispatchEvent(pr);
|
|
6069
6054
|
}
|
|
6070
6055
|
}
|
|
6071
6056
|
pointerUp(s) {
|
|
@@ -6085,7 +6070,7 @@ class Xa extends ji {
|
|
|
6085
6070
|
return this.object = void 0, this.visible = !1, this.axis = null, this;
|
|
6086
6071
|
}
|
|
6087
6072
|
reset() {
|
|
6088
|
-
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(
|
|
6073
|
+
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent($i), this.dispatchEvent(pr), this.pointStart.copy(this.pointEnd));
|
|
6089
6074
|
}
|
|
6090
6075
|
getRaycaster() {
|
|
6091
6076
|
return be;
|
|
@@ -6147,7 +6132,7 @@ function Qa(c) {
|
|
|
6147
6132
|
function qa(c) {
|
|
6148
6133
|
this.enabled && (this.domElement.releasePointerCapture(c.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(c)));
|
|
6149
6134
|
}
|
|
6150
|
-
function
|
|
6135
|
+
function ji(c, s, t) {
|
|
6151
6136
|
const e = s.intersectObject(c, !0);
|
|
6152
6137
|
for (let i = 0; i < e.length; i++)
|
|
6153
6138
|
if (e[i].object.visible || t)
|
|
@@ -6155,7 +6140,7 @@ function $i(c, s, t) {
|
|
|
6155
6140
|
return !1;
|
|
6156
6141
|
}
|
|
6157
6142
|
const ti = new co(), gt = new q(0, 1, 0), Er = new q(0, 0, 0), mr = new de(), ei = new le(), ci = new le(), oe = new q(), Ir = new de(), _s = new q(1, 0, 0), Pe = new q(0, 1, 0), As = new q(0, 0, 1), si = new q(), Is = new q(), gs = new q();
|
|
6158
|
-
class Ka extends
|
|
6143
|
+
class Ka extends Qi {
|
|
6159
6144
|
constructor() {
|
|
6160
6145
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
|
6161
6146
|
const s = new Pr({
|
|
@@ -6200,8 +6185,8 @@ class Ka extends ji {
|
|
|
6200
6185
|
m.setAttribute("position", new Mn([0, 0, 0, 1, 0, 0], 3));
|
|
6201
6186
|
const C = new zt(75e-4, 75e-4, 0.5, 3);
|
|
6202
6187
|
C.translate(0, 0.25, 0);
|
|
6203
|
-
function R(v,
|
|
6204
|
-
const V = new rs(v, 75e-4, 3, 64,
|
|
6188
|
+
function R(v, j) {
|
|
6189
|
+
const V = new rs(v, 75e-4, 3, 64, j * Math.PI * 2);
|
|
6205
6190
|
return V.rotateY(Math.PI / 2), V.rotateX(Math.PI / 2), V;
|
|
6206
6191
|
}
|
|
6207
6192
|
function g() {
|
|
@@ -6269,16 +6254,16 @@ class Ka extends ji {
|
|
|
6269
6254
|
[new rt(new Ms(0.01, 2), i), null, null, null, "helper"]
|
|
6270
6255
|
],
|
|
6271
6256
|
DELTA: [
|
|
6272
|
-
[new
|
|
6257
|
+
[new Ie(g(), i), null, null, null, "helper"]
|
|
6273
6258
|
],
|
|
6274
6259
|
X: [
|
|
6275
|
-
[new
|
|
6260
|
+
[new Ie(m, i.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
|
|
6276
6261
|
],
|
|
6277
6262
|
Y: [
|
|
6278
|
-
[new
|
|
6263
|
+
[new Ie(m, i.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
|
|
6279
6264
|
],
|
|
6280
6265
|
Z: [
|
|
6281
|
-
[new
|
|
6266
|
+
[new Ie(m, i.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
|
|
6282
6267
|
]
|
|
6283
6268
|
}, L = {
|
|
6284
6269
|
XYZE: [
|
|
@@ -6298,7 +6283,7 @@ class Ka extends ji {
|
|
|
6298
6283
|
]
|
|
6299
6284
|
}, N = {
|
|
6300
6285
|
AXIS: [
|
|
6301
|
-
[new
|
|
6286
|
+
[new Ie(m, i.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
|
|
6302
6287
|
]
|
|
6303
6288
|
}, x = {
|
|
6304
6289
|
XYZE: [
|
|
@@ -6371,27 +6356,27 @@ class Ka extends ji {
|
|
|
6371
6356
|
]
|
|
6372
6357
|
}, P = {
|
|
6373
6358
|
X: [
|
|
6374
|
-
[new
|
|
6359
|
+
[new Ie(m, i.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
|
|
6375
6360
|
],
|
|
6376
6361
|
Y: [
|
|
6377
|
-
[new
|
|
6362
|
+
[new Ie(m, i.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
|
|
6378
6363
|
],
|
|
6379
6364
|
Z: [
|
|
6380
|
-
[new
|
|
6365
|
+
[new Ie(m, i.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
|
|
6381
6366
|
]
|
|
6382
6367
|
};
|
|
6383
|
-
function
|
|
6384
|
-
const
|
|
6368
|
+
function T(v) {
|
|
6369
|
+
const j = new Qi();
|
|
6385
6370
|
for (const V in v)
|
|
6386
6371
|
for (let et = v[V].length; et--; ) {
|
|
6387
6372
|
const H = v[V][et][0].clone(), nt = v[V][et][1], z = v[V][et][2], U = v[V][et][3], ot = v[V][et][4];
|
|
6388
6373
|
H.name = V, H.tag = ot, nt && H.position.set(nt[0], nt[1], nt[2]), z && H.rotation.set(z[0], z[1], z[2]), U && H.scale.set(U[0], U[1], U[2]), H.updateMatrix();
|
|
6389
6374
|
const st = H.geometry.clone();
|
|
6390
|
-
st.applyMatrix4(H.matrix), H.geometry = st, H.renderOrder = 1 / 0, H.position.set(0, 0, 0), H.rotation.set(0, 0, 0), H.scale.set(1, 1, 1),
|
|
6375
|
+
st.applyMatrix4(H.matrix), H.geometry = st, H.renderOrder = 1 / 0, H.position.set(0, 0, 0), H.rotation.set(0, 0, 0), H.scale.set(1, 1, 1), j.add(H);
|
|
6391
6376
|
}
|
|
6392
|
-
return
|
|
6377
|
+
return j;
|
|
6393
6378
|
}
|
|
6394
|
-
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate =
|
|
6379
|
+
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = T(y)), this.add(this.gizmo.rotate = T(L)), this.add(this.gizmo.scale = T(k)), this.add(this.picker.translate = T(F)), this.add(this.picker.rotate = T(x)), this.add(this.picker.scale = T(w)), this.add(this.helper.translate = T(S)), this.add(this.helper.rotate = T(N)), this.add(this.helper.scale = T(P)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
|
|
6395
6380
|
}
|
|
6396
6381
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
|
6397
6382
|
updateMatrixWorld(s) {
|
|
@@ -6461,47 +6446,47 @@ class Ja extends rt {
|
|
|
6461
6446
|
class yn {
|
|
6462
6447
|
constructor(s, t, e, i, n, r = 5, o = !0) {
|
|
6463
6448
|
/** Event that fires when the user starts dragging a clipping plane. */
|
|
6464
|
-
|
|
6449
|
+
_(this, "onDraggingStarted", new Q());
|
|
6465
6450
|
/** Event that fires when the user stops dragging a clipping plane. */
|
|
6466
|
-
|
|
6451
|
+
_(this, "onDraggingEnded", new Q());
|
|
6467
6452
|
/** {@link Disposable.onDisposed} */
|
|
6468
|
-
|
|
6453
|
+
_(this, "onDisposed", new Q());
|
|
6469
6454
|
/**
|
|
6470
6455
|
* The normal vector of the clipping plane.
|
|
6471
6456
|
*/
|
|
6472
|
-
|
|
6457
|
+
_(this, "normal");
|
|
6473
6458
|
/**
|
|
6474
6459
|
* The origin point of the clipping plane.
|
|
6475
6460
|
*/
|
|
6476
|
-
|
|
6461
|
+
_(this, "origin");
|
|
6477
6462
|
/**
|
|
6478
6463
|
* The THREE.js Plane object representing the clipping plane.
|
|
6479
6464
|
*/
|
|
6480
|
-
|
|
6465
|
+
_(this, "three", new M.Plane());
|
|
6481
6466
|
/** The components instance to which this plane belongs. */
|
|
6482
|
-
|
|
6467
|
+
_(this, "components");
|
|
6483
6468
|
/** The world instance to which this plane belongs. */
|
|
6484
|
-
|
|
6469
|
+
_(this, "world");
|
|
6485
6470
|
/** A custom string to identify what this plane is used for. */
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6471
|
+
_(this, "type", "default");
|
|
6472
|
+
_(this, "_helper");
|
|
6473
|
+
_(this, "_visible", !0);
|
|
6474
|
+
_(this, "_enabled", !0);
|
|
6475
|
+
_(this, "_controlsActive", !1);
|
|
6476
|
+
_(this, "_arrowBoundBox", new M.Mesh());
|
|
6477
|
+
_(this, "_planeMesh");
|
|
6478
|
+
_(this, "_controls");
|
|
6479
|
+
_(this, "_hiddenMaterial", new M.MeshBasicMaterial({
|
|
6495
6480
|
visible: !1
|
|
6496
6481
|
}));
|
|
6497
6482
|
/** {@link Updateable.update} */
|
|
6498
|
-
|
|
6483
|
+
_(this, "update", () => {
|
|
6499
6484
|
this._enabled && this.three.setFromNormalAndCoplanarPoint(
|
|
6500
6485
|
this.normal,
|
|
6501
6486
|
this._helper.position
|
|
6502
6487
|
);
|
|
6503
6488
|
});
|
|
6504
|
-
|
|
6489
|
+
_(this, "changeDrag", (s) => {
|
|
6505
6490
|
this._visible = !s.value, this.preventCameraMovement(), this.notifyDraggingChanged(s);
|
|
6506
6491
|
});
|
|
6507
6492
|
if (this.components = s, this.world = t, !t.renderer)
|
|
@@ -6624,73 +6609,73 @@ const Fs = class Fs extends St {
|
|
|
6624
6609
|
constructor(t) {
|
|
6625
6610
|
super(t);
|
|
6626
6611
|
/** Event that fires when the user starts dragging a clipping plane. */
|
|
6627
|
-
|
|
6612
|
+
_(this, "onBeforeDrag", new Q());
|
|
6628
6613
|
/** Event that fires when the user stops dragging a clipping plane. */
|
|
6629
|
-
|
|
6614
|
+
_(this, "onAfterDrag", new Q());
|
|
6630
6615
|
/**
|
|
6631
6616
|
* Event that fires when the user starts creating a clipping plane.
|
|
6632
6617
|
*/
|
|
6633
|
-
|
|
6618
|
+
_(this, "onBeforeCreate", new Q());
|
|
6634
6619
|
/**
|
|
6635
6620
|
* Event that fires when the user cancels the creation of a clipping plane.
|
|
6636
6621
|
*/
|
|
6637
|
-
|
|
6622
|
+
_(this, "onBeforeCancel", new Q());
|
|
6638
6623
|
/**
|
|
6639
6624
|
* Event that fires after the user cancels the creation of a clipping plane.
|
|
6640
6625
|
*/
|
|
6641
|
-
|
|
6626
|
+
_(this, "onAfterCancel", new Q());
|
|
6642
6627
|
/**
|
|
6643
6628
|
* Event that fires when the user starts deleting a clipping plane.
|
|
6644
6629
|
*/
|
|
6645
|
-
|
|
6630
|
+
_(this, "onBeforeDelete", new Q());
|
|
6646
6631
|
/**
|
|
6647
6632
|
* Event that fires after a clipping plane has been created.
|
|
6648
6633
|
* @param plane - The newly created clipping plane.
|
|
6649
6634
|
*/
|
|
6650
|
-
|
|
6635
|
+
_(this, "onAfterCreate", new Q());
|
|
6651
6636
|
/**
|
|
6652
6637
|
* Event that fires after a clipping plane has been deleted.
|
|
6653
6638
|
* @param plane - The deleted clipping plane.
|
|
6654
6639
|
*/
|
|
6655
|
-
|
|
6640
|
+
_(this, "onAfterDelete", new Q());
|
|
6656
6641
|
/** {@link Disposable.onDisposed} */
|
|
6657
|
-
|
|
6642
|
+
_(this, "onDisposed", new Q());
|
|
6658
6643
|
/**
|
|
6659
6644
|
* Whether to force the clipping plane to be orthogonal in the Y direction
|
|
6660
6645
|
* (up). This is desirable when clipping a building horizontally and a
|
|
6661
6646
|
* clipping plane is created in its roof, which might have a slight
|
|
6662
6647
|
* slope for draining purposes.
|
|
6663
6648
|
*/
|
|
6664
|
-
|
|
6649
|
+
_(this, "orthogonalY", !1);
|
|
6665
6650
|
/**
|
|
6666
6651
|
* The tolerance that determines whether an almost-horizontal clipping plane
|
|
6667
6652
|
* will be forced to be orthogonal to the Y direction. {@link orthogonalY}
|
|
6668
6653
|
* has to be `true` for this to apply.
|
|
6669
6654
|
*/
|
|
6670
|
-
|
|
6655
|
+
_(this, "toleranceOrthogonalY", 0.7);
|
|
6671
6656
|
/**
|
|
6672
6657
|
* The type of clipping plane to be created.
|
|
6673
6658
|
* Default is {@link SimplePlane}.
|
|
6674
6659
|
*/
|
|
6675
|
-
|
|
6660
|
+
_(this, "Type", yn);
|
|
6676
6661
|
/**
|
|
6677
6662
|
* A list of all the clipping planes created by this component.
|
|
6678
6663
|
*/
|
|
6679
|
-
|
|
6664
|
+
_(this, "list", []);
|
|
6680
6665
|
/** The material used in all the clipping planes. */
|
|
6681
|
-
|
|
6666
|
+
_(this, "_material", new M.MeshBasicMaterial({
|
|
6682
6667
|
color: 12255487,
|
|
6683
6668
|
side: M.DoubleSide,
|
|
6684
6669
|
transparent: !0,
|
|
6685
6670
|
opacity: 0.2
|
|
6686
6671
|
}));
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6672
|
+
_(this, "_size", 5);
|
|
6673
|
+
_(this, "_enabled", !1);
|
|
6674
|
+
_(this, "_visible", !0);
|
|
6675
|
+
_(this, "_onStartDragging", () => {
|
|
6691
6676
|
this.onBeforeDrag.trigger();
|
|
6692
6677
|
});
|
|
6693
|
-
|
|
6678
|
+
_(this, "_onEndDragging", () => {
|
|
6694
6679
|
this.onAfterDrag.trigger();
|
|
6695
6680
|
});
|
|
6696
6681
|
this.components.add(Fs.uuid, this);
|
|
@@ -6840,7 +6825,7 @@ const Fs = class Fs extends St {
|
|
|
6840
6825
|
return n.onDraggingStarted.add(this._onStartDragging), n.onDraggingEnded.add(this._onEndDragging), this.list.push(n), this.onAfterCreate.trigger(n), n;
|
|
6841
6826
|
}
|
|
6842
6827
|
updateMaterialsAndPlanes() {
|
|
6843
|
-
const t = this.components.get(
|
|
6828
|
+
const t = this.components.get(hi);
|
|
6844
6829
|
for (const [e, i] of t.list) {
|
|
6845
6830
|
if (!i.renderer)
|
|
6846
6831
|
continue;
|
|
@@ -6860,14 +6845,14 @@ const Fs = class Fs extends St {
|
|
|
6860
6845
|
* A unique identifier for the component.
|
|
6861
6846
|
* This UUID is used to register the component within the Components system.
|
|
6862
6847
|
*/
|
|
6863
|
-
|
|
6848
|
+
_(Fs, "uuid", "66290bc5-18c4-4cd1-9379-2e17a0617611");
|
|
6864
6849
|
let ln = Fs;
|
|
6865
6850
|
class tc {
|
|
6866
6851
|
constructor(s) {
|
|
6867
6852
|
/** {@link NavigationMode.enabled} */
|
|
6868
|
-
|
|
6853
|
+
_(this, "enabled", !1);
|
|
6869
6854
|
/** {@link NavigationMode.id} */
|
|
6870
|
-
|
|
6855
|
+
_(this, "id", "FirstPerson");
|
|
6871
6856
|
this.camera = s;
|
|
6872
6857
|
}
|
|
6873
6858
|
/** {@link NavigationMode.set} */
|
|
@@ -6892,9 +6877,9 @@ class tc {
|
|
|
6892
6877
|
class ec {
|
|
6893
6878
|
constructor(s) {
|
|
6894
6879
|
/** {@link NavigationMode.enabled} */
|
|
6895
|
-
|
|
6880
|
+
_(this, "enabled", !0);
|
|
6896
6881
|
/** {@link NavigationMode.id} */
|
|
6897
|
-
|
|
6882
|
+
_(this, "id", "Orbit");
|
|
6898
6883
|
this.camera = s, this.activateOrbitControls();
|
|
6899
6884
|
}
|
|
6900
6885
|
/** {@link NavigationMode.set} */
|
|
@@ -6915,14 +6900,14 @@ class ec {
|
|
|
6915
6900
|
class sc {
|
|
6916
6901
|
constructor(s) {
|
|
6917
6902
|
/** {@link NavigationMode.enabled} */
|
|
6918
|
-
|
|
6903
|
+
_(this, "enabled", !1);
|
|
6919
6904
|
/** {@link NavigationMode.id} */
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6905
|
+
_(this, "id", "Plan");
|
|
6906
|
+
_(this, "mouseAction1");
|
|
6907
|
+
_(this, "mouseAction2");
|
|
6908
|
+
_(this, "mouseInitialized", !1);
|
|
6909
|
+
_(this, "defaultAzimuthSpeed");
|
|
6910
|
+
_(this, "defaultPolarSpeed");
|
|
6926
6911
|
this.camera = s, this.defaultAzimuthSpeed = s.controls.azimuthRotateSpeed, this.defaultPolarSpeed = s.controls.polarRotateSpeed;
|
|
6927
6912
|
}
|
|
6928
6913
|
/** {@link NavigationMode.set} */
|
|
@@ -6937,21 +6922,21 @@ class ic {
|
|
|
6937
6922
|
/**
|
|
6938
6923
|
* Event that fires when the {@link CameraProjection} changes.
|
|
6939
6924
|
*/
|
|
6940
|
-
|
|
6925
|
+
_(this, "onChanged", new Q());
|
|
6941
6926
|
/**
|
|
6942
6927
|
* Current projection mode of the camera.
|
|
6943
6928
|
* Default is "Perspective".
|
|
6944
6929
|
*/
|
|
6945
|
-
|
|
6930
|
+
_(this, "current", "Perspective");
|
|
6946
6931
|
/**
|
|
6947
6932
|
* The camera controlled by this ProjectionManager.
|
|
6948
6933
|
* It can be either a PerspectiveCamera or an OrthographicCamera.
|
|
6949
6934
|
*/
|
|
6950
|
-
|
|
6935
|
+
_(this, "camera");
|
|
6951
6936
|
/** Match Ortho zoom with Perspective distance when changing projection mode */
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6937
|
+
_(this, "matchOrthoDistanceEnabled", !1);
|
|
6938
|
+
_(this, "_component");
|
|
6939
|
+
_(this, "_previousDistance", -1);
|
|
6955
6940
|
this._component = s, this.camera = s.three;
|
|
6956
6941
|
}
|
|
6957
6942
|
/**
|
|
@@ -7013,22 +6998,22 @@ class nc extends Ns {
|
|
|
7013
6998
|
/**
|
|
7014
6999
|
* A ProjectionManager instance that manages the projection modes of the camera.
|
|
7015
7000
|
*/
|
|
7016
|
-
|
|
7001
|
+
_(this, "projection");
|
|
7017
7002
|
/**
|
|
7018
7003
|
* A THREE.OrthographicCamera instance that represents the orthographic camera.
|
|
7019
7004
|
* This camera is used when the projection mode is set to orthographic.
|
|
7020
7005
|
*/
|
|
7021
|
-
|
|
7006
|
+
_(this, "threeOrtho");
|
|
7022
7007
|
/**
|
|
7023
7008
|
* A THREE.PerspectiveCamera instance that represents the perspective camera.
|
|
7024
7009
|
* This camera is used when the projection mode is set to perspective.
|
|
7025
7010
|
*/
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7011
|
+
_(this, "threePersp");
|
|
7012
|
+
_(this, "_userInputButtons", {});
|
|
7013
|
+
_(this, "_frustumSize", 50);
|
|
7014
|
+
_(this, "_navigationModes", /* @__PURE__ */ new Map());
|
|
7015
|
+
_(this, "_mode", null);
|
|
7016
|
+
_(this, "previousSize", null);
|
|
7032
7017
|
this.threePersp = this.three, this.threeOrtho = this.newOrthoCamera(), this.projection = new ic(this), this.onAspectUpdated.add(() => {
|
|
7033
7018
|
this.setOrthoPerspCameraAspect();
|
|
7034
7019
|
}), this.projection.onChanged.add(
|
|
@@ -8657,8 +8642,8 @@ class Ke {
|
|
|
8657
8642
|
}
|
|
8658
8643
|
class oc {
|
|
8659
8644
|
constructor() {
|
|
8660
|
-
|
|
8661
|
-
|
|
8645
|
+
_(this, "factor", 1);
|
|
8646
|
+
_(this, "complement", 1);
|
|
8662
8647
|
}
|
|
8663
8648
|
apply(s) {
|
|
8664
8649
|
const e = this.getScaleMatrix().multiply(s);
|
|
@@ -8715,8 +8700,8 @@ class oc {
|
|
|
8715
8700
|
}
|
|
8716
8701
|
class kr {
|
|
8717
8702
|
constructor() {
|
|
8718
|
-
|
|
8719
|
-
|
|
8703
|
+
_(this, "itemsByFloor", {});
|
|
8704
|
+
_(this, "_units", new oc());
|
|
8720
8705
|
}
|
|
8721
8706
|
// TODO: Maybe make this more flexible so that it also support more exotic spatial structures?
|
|
8722
8707
|
setUp(s) {
|
|
@@ -8786,28 +8771,28 @@ class kr {
|
|
|
8786
8771
|
class wn {
|
|
8787
8772
|
constructor() {
|
|
8788
8773
|
/** Whether to extract the IFC properties into a JSON. */
|
|
8789
|
-
|
|
8774
|
+
_(this, "includeProperties", !0);
|
|
8790
8775
|
/**
|
|
8791
8776
|
* Generate the geometry for categories that are not included by default,
|
|
8792
8777
|
* like IFCSPACE.
|
|
8793
8778
|
*/
|
|
8794
|
-
|
|
8779
|
+
_(this, "optionalCategories", [X.IFCSPACE]);
|
|
8795
8780
|
/** Whether to use the coordination data coming from the IFC files. */
|
|
8796
|
-
|
|
8781
|
+
_(this, "coordinate", !0);
|
|
8797
8782
|
/** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
8798
|
-
|
|
8783
|
+
_(this, "wasm", {
|
|
8799
8784
|
path: "",
|
|
8800
8785
|
absolute: !1,
|
|
8801
8786
|
logLevel: X.LogLevel.LOG_LEVEL_OFF
|
|
8802
8787
|
});
|
|
8803
8788
|
/** List of categories that won't be converted to fragments. */
|
|
8804
|
-
|
|
8789
|
+
_(this, "excludedCategories", /* @__PURE__ */ new Set());
|
|
8805
8790
|
/** Exclusive list of categories that will be converted to fragments. If this contains any category, any other categories will be ignored. */
|
|
8806
|
-
|
|
8791
|
+
_(this, "includedCategories", /* @__PURE__ */ new Set());
|
|
8807
8792
|
/** Whether to save the absolute location of all IFC items. */
|
|
8808
|
-
|
|
8793
|
+
_(this, "saveLocations", !1);
|
|
8809
8794
|
/** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
8810
|
-
|
|
8795
|
+
_(this, "webIfc", {
|
|
8811
8796
|
COORDINATE_TO_ORIGIN: !0
|
|
8812
8797
|
// OPTIMIZE_PROFILES: true,
|
|
8813
8798
|
});
|
|
@@ -8817,7 +8802,7 @@ class wn {
|
|
|
8817
8802
|
* If set to false, the path must be provided manually in the `wasm.path` property.
|
|
8818
8803
|
* Default value is true.
|
|
8819
8804
|
*/
|
|
8820
|
-
|
|
8805
|
+
_(this, "autoSetWasm", !0);
|
|
8821
8806
|
/**
|
|
8822
8807
|
* Custom function to handle the file location for [web-ifc](https://github.com/ThatOpen/engine_web-ifc).
|
|
8823
8808
|
* This function will be called when [web-ifc](https://github.com/ThatOpen/engine_web-ifc) needs to locate a file.
|
|
@@ -8826,12 +8811,12 @@ class wn {
|
|
|
8826
8811
|
* @param url - The URL of the file to locate.
|
|
8827
8812
|
* @returns The absolute path of the file.
|
|
8828
8813
|
*/
|
|
8829
|
-
|
|
8814
|
+
_(this, "customLocateFileHandler", null);
|
|
8830
8815
|
}
|
|
8831
8816
|
}
|
|
8832
8817
|
class Vr {
|
|
8833
8818
|
constructor() {
|
|
8834
|
-
|
|
8819
|
+
_(this, "defLineMat", new M.LineBasicMaterial({ color: 16777215 }));
|
|
8835
8820
|
}
|
|
8836
8821
|
read(s) {
|
|
8837
8822
|
const t = s.GetAllAlignments(0), e = s.GetAllCrossSections2D(0), i = s.GetAllCrossSections3D(0), n = {
|
|
@@ -8845,7 +8830,7 @@ class Vr {
|
|
|
8845
8830
|
if (s.IfcAlignment) {
|
|
8846
8831
|
const t = /* @__PURE__ */ new Map();
|
|
8847
8832
|
for (const e of s.IfcAlignment) {
|
|
8848
|
-
const i = new
|
|
8833
|
+
const i = new ye.Alignment();
|
|
8849
8834
|
i.absolute = this.getCurves(e.curve3D, i), i.horizontal = this.getCurves(e.horizontal, i), i.vertical = this.getCurves(e.vertical, i), t.set(t.size, i);
|
|
8850
8835
|
}
|
|
8851
8836
|
return { alignments: t, coordinationMatrix: new M.Matrix4() };
|
|
@@ -8868,7 +8853,7 @@ class Vr {
|
|
|
8868
8853
|
}
|
|
8869
8854
|
const l = new M.BufferAttribute(a, 3), h = new M.EdgesGeometry();
|
|
8870
8855
|
h.setAttribute("position", l);
|
|
8871
|
-
const d = new
|
|
8856
|
+
const d = new ye.CurveMesh(
|
|
8872
8857
|
i,
|
|
8873
8858
|
r,
|
|
8874
8859
|
t,
|
|
@@ -9070,12 +9055,12 @@ const Hr = /* @__PURE__ */ new Set([
|
|
|
9070
9055
|
2513912981,
|
|
9071
9056
|
2830218821,
|
|
9072
9057
|
427810014
|
|
9073
|
-
]),
|
|
9058
|
+
]), mi = class mi extends St {
|
|
9074
9059
|
constructor(t) {
|
|
9075
9060
|
super(t);
|
|
9076
9061
|
/** {@link Component.enabled} */
|
|
9077
|
-
|
|
9078
|
-
t.add(
|
|
9062
|
+
_(this, "enabled", !0);
|
|
9063
|
+
t.add(mi.uuid, this);
|
|
9079
9064
|
}
|
|
9080
9065
|
/**
|
|
9081
9066
|
* Exports all the properties of an IFC into an array of JS objects.
|
|
@@ -9111,39 +9096,39 @@ const Hr = /* @__PURE__ */ new Set([
|
|
|
9111
9096
|
* A unique identifier for the component.
|
|
9112
9097
|
* This UUID is used to register the component within the Components system.
|
|
9113
9098
|
*/
|
|
9114
|
-
|
|
9115
|
-
let hn =
|
|
9099
|
+
_(mi, "uuid", "b32c4332-cd67-436e-ba7f-196646c7a635");
|
|
9100
|
+
let hn = mi;
|
|
9116
9101
|
const Ss = class Ss extends St {
|
|
9117
9102
|
constructor(t) {
|
|
9118
9103
|
super(t);
|
|
9119
9104
|
/** {@link Disposable.onDisposed} */
|
|
9120
|
-
|
|
9105
|
+
_(this, "onDisposed", new Q());
|
|
9121
9106
|
/**
|
|
9122
9107
|
* An event triggered when the IFC file starts loading.
|
|
9123
9108
|
*/
|
|
9124
|
-
|
|
9109
|
+
_(this, "onIfcStartedLoading", new Q());
|
|
9125
9110
|
/**
|
|
9126
9111
|
* An event triggered when the setup process is completed.
|
|
9127
9112
|
*/
|
|
9128
|
-
|
|
9113
|
+
_(this, "onSetup", new Q());
|
|
9129
9114
|
/**
|
|
9130
9115
|
* The settings for the IfcLoader.
|
|
9131
9116
|
* It includes options for excluding categories, setting WASM paths, and more.
|
|
9132
9117
|
*/
|
|
9133
|
-
|
|
9118
|
+
_(this, "settings", new wn());
|
|
9134
9119
|
/**
|
|
9135
9120
|
* The instance of the Web-IFC library used for handling IFC data.
|
|
9136
9121
|
*/
|
|
9137
|
-
|
|
9122
|
+
_(this, "webIfc", new X.IfcAPI());
|
|
9138
9123
|
/** {@link Component.enabled} */
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9124
|
+
_(this, "enabled", !0);
|
|
9125
|
+
_(this, "_material", new M.MeshLambertMaterial());
|
|
9126
|
+
_(this, "_spatialTree", new kr());
|
|
9127
|
+
_(this, "_metaData", new Yr());
|
|
9128
|
+
_(this, "_fragmentInstances", /* @__PURE__ */ new Map());
|
|
9129
|
+
_(this, "_civil", new Vr());
|
|
9130
|
+
_(this, "_visitedFragments", /* @__PURE__ */ new Map());
|
|
9131
|
+
_(this, "_materialT", new M.MeshLambertMaterial({
|
|
9147
9132
|
transparent: !0,
|
|
9148
9133
|
opacity: 0.5
|
|
9149
9134
|
}));
|
|
@@ -9188,24 +9173,26 @@ const Ss = class Ss extends St {
|
|
|
9188
9173
|
* const group = await ifcLoader.load(ifcData);
|
|
9189
9174
|
* ```
|
|
9190
9175
|
*/
|
|
9191
|
-
async load(t, e = !0) {
|
|
9192
|
-
const
|
|
9176
|
+
async load(t, e = !0, i = "") {
|
|
9177
|
+
const n = performance.now();
|
|
9193
9178
|
this.onIfcStartedLoading.trigger(), await this.readIfcFile(t);
|
|
9194
|
-
const
|
|
9195
|
-
|
|
9196
|
-
const a = this.components.get(
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9179
|
+
const r = await this.getAllGeometries();
|
|
9180
|
+
r.name = i;
|
|
9181
|
+
const a = await this.components.get(hn).export(this.webIfc, 0);
|
|
9182
|
+
r.setLocalProperties(a);
|
|
9183
|
+
const l = this.components.get(_t);
|
|
9184
|
+
l.groups.set(r.uuid, r);
|
|
9185
|
+
for (const h of r.items)
|
|
9186
|
+
l.list.set(h.id, h), h.mesh.uuid = h.id, h.group = r;
|
|
9187
|
+
l.onFragmentsLoaded.trigger(r), e && l.coordinate([r]);
|
|
9188
|
+
for (const [h] of r.data) {
|
|
9189
|
+
const d = a[h];
|
|
9190
|
+
if (!d || !d.GlobalId)
|
|
9204
9191
|
continue;
|
|
9205
|
-
const
|
|
9206
|
-
|
|
9192
|
+
const u = d.GlobalId.value || d.GlobalId;
|
|
9193
|
+
r.globalToExpressIDs.set(u, h);
|
|
9207
9194
|
}
|
|
9208
|
-
return Gr.get(
|
|
9195
|
+
return Gr.get(r, this.webIfc), this.cleanUp(), console.log(`Streaming the IFC took ${performance.now() - n} ms!`), r;
|
|
9209
9196
|
}
|
|
9210
9197
|
/**
|
|
9211
9198
|
* Reads an IFC file and initializes the Web-IFC library.
|
|
@@ -9251,7 +9238,7 @@ const Ss = class Ss extends St {
|
|
|
9251
9238
|
}
|
|
9252
9239
|
async getAllGeometries() {
|
|
9253
9240
|
this._spatialTree.setUp(this.webIfc);
|
|
9254
|
-
const t = this.webIfc.GetIfcEntityList(0), e = new
|
|
9241
|
+
const t = this.webIfc.GetIfcEntityList(0), e = new ye.FragmentsGroup();
|
|
9255
9242
|
e.ifcMetadata = {
|
|
9256
9243
|
name: "",
|
|
9257
9244
|
description: "",
|
|
@@ -9301,7 +9288,7 @@ const Ss = class Ss extends St {
|
|
|
9301
9288
|
for (let r = 0; r < i; r++) {
|
|
9302
9289
|
const o = t.geometries.get(r), { x: a, y: l, z: h, w: d } = o.color, u = d !== 1, { geometryExpressID: f } = o, E = `${f}-${u}`;
|
|
9303
9290
|
if (!this._visitedFragments.has(E)) {
|
|
9304
|
-
const y = this.getGeometry(this.webIfc, f), F = u ? this._materialT : this._material, S = new
|
|
9291
|
+
const y = this.getGeometry(this.webIfc, f), F = u ? this._materialT : this._material, S = new ye.Fragment(y, F, 1);
|
|
9305
9292
|
e.add(S.mesh), e.items.push(S);
|
|
9306
9293
|
const L = this._visitedFragments.size;
|
|
9307
9294
|
this._visitedFragments.set(E, { index: L, fragment: S });
|
|
@@ -9344,7 +9331,7 @@ const Ss = class Ss extends St {
|
|
|
9344
9331
|
}
|
|
9345
9332
|
async autoSetWasm() {
|
|
9346
9333
|
const t = await fetch(
|
|
9347
|
-
`https://unpkg.com/@thatopen/components@${
|
|
9334
|
+
`https://unpkg.com/@thatopen/components@${an.release}/package.json`
|
|
9348
9335
|
);
|
|
9349
9336
|
if (!t.ok) {
|
|
9350
9337
|
console.warn(
|
|
@@ -9367,7 +9354,7 @@ const Ss = class Ss extends St {
|
|
|
9367
9354
|
* A unique identifier for the component.
|
|
9368
9355
|
* This UUID is used to register the component within the Components system.
|
|
9369
9356
|
*/
|
|
9370
|
-
|
|
9357
|
+
_(Ss, "uuid", "a659add7-1418-4771-a0d6-7d4d438e4624");
|
|
9371
9358
|
let dn = Ss;
|
|
9372
9359
|
const ac = {
|
|
9373
9360
|
// IfcRelAssigns
|
|
@@ -9413,61 +9400,61 @@ const ac = {
|
|
|
9413
9400
|
[X.IFCRELDEFINESBYPROPERTIES]: "IfcRelDefinesByProperties",
|
|
9414
9401
|
[X.IFCRELDEFINESBYTYPE]: "IfcRelDefinesByType",
|
|
9415
9402
|
[X.IFCRELDEFINESBYTEMPLATE]: "IfcRelDefinesByTemplate"
|
|
9416
|
-
},
|
|
9403
|
+
}, Ae = class Ae extends St {
|
|
9417
9404
|
constructor(t) {
|
|
9418
9405
|
super(t);
|
|
9419
9406
|
/** {@link Disposable.onDisposed} */
|
|
9420
|
-
|
|
9407
|
+
_(this, "onDisposed", new Q());
|
|
9421
9408
|
/**
|
|
9422
9409
|
* Event triggered when a file is requested for export.
|
|
9423
9410
|
*/
|
|
9424
|
-
|
|
9411
|
+
_(this, "onRequestFile", new Q());
|
|
9425
9412
|
/**
|
|
9426
9413
|
* ArrayBuffer containing the IFC data to be exported.
|
|
9427
9414
|
*/
|
|
9428
|
-
|
|
9415
|
+
_(this, "ifcToExport", null);
|
|
9429
9416
|
/**
|
|
9430
9417
|
* Event triggered when an element is added to a Pset.
|
|
9431
9418
|
*/
|
|
9432
|
-
|
|
9419
|
+
_(this, "onElementToPset", new Q());
|
|
9433
9420
|
/**
|
|
9434
9421
|
* Event triggered when a property is added to a Pset.
|
|
9435
9422
|
*/
|
|
9436
|
-
|
|
9423
|
+
_(this, "onPropToPset", new Q());
|
|
9437
9424
|
/**
|
|
9438
9425
|
* Event triggered when a Pset is removed.
|
|
9439
9426
|
*/
|
|
9440
|
-
|
|
9427
|
+
_(this, "onPsetRemoved", new Q());
|
|
9441
9428
|
/**
|
|
9442
9429
|
* Event triggered when data in the model changes.
|
|
9443
9430
|
*/
|
|
9444
|
-
|
|
9431
|
+
_(this, "onDataChanged", new Q());
|
|
9445
9432
|
/**
|
|
9446
9433
|
* Configuration for the WebAssembly module.
|
|
9447
9434
|
*/
|
|
9448
|
-
|
|
9435
|
+
_(this, "wasm", {
|
|
9449
9436
|
path: "/",
|
|
9450
9437
|
absolute: !1
|
|
9451
9438
|
});
|
|
9452
9439
|
/** {@link Component.enabled} */
|
|
9453
|
-
|
|
9440
|
+
_(this, "enabled", !0);
|
|
9454
9441
|
/**
|
|
9455
9442
|
* Map of attribute listeners.
|
|
9456
9443
|
*/
|
|
9457
|
-
|
|
9444
|
+
_(this, "attributeListeners", {});
|
|
9458
9445
|
/**
|
|
9459
9446
|
* The currently selected model.
|
|
9460
9447
|
*/
|
|
9461
|
-
|
|
9448
|
+
_(this, "selectedModel");
|
|
9462
9449
|
/**
|
|
9463
9450
|
* Map of changed entities in the model.
|
|
9464
9451
|
*/
|
|
9465
|
-
|
|
9466
|
-
this.components.add(
|
|
9452
|
+
_(this, "changeMap", {});
|
|
9453
|
+
this.components.add(Ae.uuid, this);
|
|
9467
9454
|
}
|
|
9468
9455
|
/** {@link Disposable.dispose} */
|
|
9469
9456
|
dispose() {
|
|
9470
|
-
this.selectedModel = void 0, this.attributeListeners = {}, this.changeMap = {}, this.onElementToPset.reset(), this.onPropToPset.reset(), this.onPsetRemoved.reset(), this.onDataChanged.reset(), this.onDisposed.trigger(
|
|
9457
|
+
this.selectedModel = void 0, this.attributeListeners = {}, this.changeMap = {}, this.onElementToPset.reset(), this.onPropToPset.reset(), this.onPsetRemoved.reset(), this.onDataChanged.reset(), this.onDisposed.trigger(Ae.uuid), this.onDisposed.reset();
|
|
9471
9458
|
}
|
|
9472
9459
|
/**
|
|
9473
9460
|
* Static method to retrieve the IFC schema from a given model.
|
|
@@ -9513,7 +9500,7 @@ const ac = {
|
|
|
9513
9500
|
* @throws Will throw an error if no OwnerHistory is found in the model.
|
|
9514
9501
|
*/
|
|
9515
9502
|
async newPset(t, e, i) {
|
|
9516
|
-
const n =
|
|
9503
|
+
const n = Ae.getIFCSchema(t), { ownerHistoryHandle: r } = await this.getOwnerHistory(t), o = this.newGUID(t), a = new X[n].IfcLabel(e), l = i ? new X[n].IfcText(i) : null, h = new X[n].IfcPropertySet(
|
|
9517
9504
|
o,
|
|
9518
9505
|
r,
|
|
9519
9506
|
a,
|
|
@@ -9675,7 +9662,7 @@ const ac = {
|
|
|
9675
9662
|
const o = t.ifcMetadata.schema, a = ac[r], l = X[o][r];
|
|
9676
9663
|
if (!(a && l))
|
|
9677
9664
|
throw new Error(`IfcPropertiesManager: ${r} is unsoported.`);
|
|
9678
|
-
const h = [new X[o].IfcGloballyUniqueId(
|
|
9665
|
+
const h = [new X[o].IfcGloballyUniqueId(me.create())], { related: d, relating: u } = a, E = [...new Set(n)].map(
|
|
9679
9666
|
(m) => new X.Handle(m)
|
|
9680
9667
|
), p = (m, C) => {
|
|
9681
9668
|
for (let R = m; R < C - 1; R++)
|
|
@@ -9757,7 +9744,7 @@ const ac = {
|
|
|
9757
9744
|
const a = o.value;
|
|
9758
9745
|
if (a === void 0 || a == null)
|
|
9759
9746
|
throw new Error(`Attribute ${i} has a badly defined handle.`);
|
|
9760
|
-
const l = new
|
|
9747
|
+
const l = new Q();
|
|
9761
9748
|
return Object.defineProperty(r[i], "value", {
|
|
9762
9749
|
get() {
|
|
9763
9750
|
return this._value;
|
|
@@ -9771,8 +9758,8 @@ const ac = {
|
|
|
9771
9758
|
return t.ifcMetadata.maxExpressID++, t.ifcMetadata.maxExpressID;
|
|
9772
9759
|
}
|
|
9773
9760
|
newGUID(t) {
|
|
9774
|
-
const e =
|
|
9775
|
-
return new X[e].IfcGloballyUniqueId(
|
|
9761
|
+
const e = Ae.getIFCSchema(t);
|
|
9762
|
+
return new X[e].IfcGloballyUniqueId(me.create());
|
|
9776
9763
|
}
|
|
9777
9764
|
async getOwnerHistory(t) {
|
|
9778
9765
|
const e = await t.getAllPropertiesOfType(
|
|
@@ -9789,7 +9776,7 @@ const ac = {
|
|
|
9789
9776
|
this.changeMap[t.uuid].add(i), this.onDataChanged.trigger({ model: t, expressID: i });
|
|
9790
9777
|
}
|
|
9791
9778
|
async newSingleProperty(t, e, i, n) {
|
|
9792
|
-
const r =
|
|
9779
|
+
const r = Ae.getIFCSchema(t), o = new X[r].IfcIdentifier(i), a = new X[r][e](n), l = new X[r].IfcPropertySingleValue(
|
|
9793
9780
|
o,
|
|
9794
9781
|
null,
|
|
9795
9782
|
a,
|
|
@@ -9802,13 +9789,13 @@ const ac = {
|
|
|
9802
9789
|
* A unique identifier for the component.
|
|
9803
9790
|
* This UUID is used to register the component within the Components system.
|
|
9804
9791
|
*/
|
|
9805
|
-
|
|
9806
|
-
let un =
|
|
9792
|
+
_(Ae, "uuid", "58c2d9f0-183c-48d6-a402-dfcf5b9a34df");
|
|
9793
|
+
let un = Ae;
|
|
9807
9794
|
const Os = class Os extends St {
|
|
9808
9795
|
constructor(t) {
|
|
9809
9796
|
super(t);
|
|
9810
9797
|
/** {@link Disposable.onDisposed} */
|
|
9811
|
-
|
|
9798
|
+
_(this, "onDisposed", new Q());
|
|
9812
9799
|
/**
|
|
9813
9800
|
* Event triggered when relations for a model have been indexed.
|
|
9814
9801
|
* This event provides the model's UUID and the relations map generated for that model.
|
|
@@ -9817,7 +9804,7 @@ const Os = class Os extends St {
|
|
|
9817
9804
|
* @property {RelationsMap} relationsMap - The relations map generated for the specified model.
|
|
9818
9805
|
* 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.
|
|
9819
9806
|
*/
|
|
9820
|
-
|
|
9807
|
+
_(this, "onRelationsIndexed", new Q());
|
|
9821
9808
|
/**
|
|
9822
9809
|
* Holds the relationship mappings for each model processed by the indexer.
|
|
9823
9810
|
* The structure is a map where each key is a model's UUID, and the value is another map.
|
|
@@ -9826,11 +9813,11 @@ const Os = class Os extends St {
|
|
|
9826
9813
|
* that are related through that relation type. This structure allows for efficient querying
|
|
9827
9814
|
* of entity relationships within a model.
|
|
9828
9815
|
*/
|
|
9829
|
-
|
|
9816
|
+
_(this, "relationMaps", {});
|
|
9830
9817
|
/** {@link Component.enabled} */
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
|
|
9818
|
+
_(this, "enabled", !0);
|
|
9819
|
+
_(this, "_relToAttributesMap", gr);
|
|
9820
|
+
_(this, "_inverseAttributes", [
|
|
9834
9821
|
"IsDecomposedBy",
|
|
9835
9822
|
"Decomposes",
|
|
9836
9823
|
"AssociatedTo",
|
|
@@ -9857,7 +9844,7 @@ const Os = class Os extends St {
|
|
|
9857
9844
|
"Nests",
|
|
9858
9845
|
"DocumentRefForObjects"
|
|
9859
9846
|
]);
|
|
9860
|
-
|
|
9847
|
+
_(this, "_ifcRels", [
|
|
9861
9848
|
X.IFCRELAGGREGATES,
|
|
9862
9849
|
X.IFCRELASSOCIATESMATERIAL,
|
|
9863
9850
|
X.IFCRELASSOCIATESCLASSIFICATION,
|
|
@@ -9874,17 +9861,17 @@ const Os = class Os extends St {
|
|
|
9874
9861
|
X.IFCRELNESTS,
|
|
9875
9862
|
X.IFCRELASSOCIATESDOCUMENT
|
|
9876
9863
|
]);
|
|
9877
|
-
|
|
9864
|
+
_(this, "onFragmentsDisposed", (t) => {
|
|
9878
9865
|
delete this.relationMaps[t.groupID];
|
|
9879
9866
|
});
|
|
9880
9867
|
// Use to create the corresponding IfcRelationship
|
|
9881
|
-
|
|
9868
|
+
_(this, "_changeMap", {});
|
|
9882
9869
|
/**
|
|
9883
9870
|
* An event that is triggered when entities are related in a BIM model.
|
|
9884
9871
|
* The event provides information about the type of relation, the inverse attribute,
|
|
9885
9872
|
* the IDs of the entities related, and the IDs of the entities that are being related.
|
|
9886
9873
|
*/
|
|
9887
|
-
|
|
9874
|
+
_(this, "onEntitiesRelated", new Q());
|
|
9888
9875
|
this.components.add(Os.uuid, this), t.get(_t).onFragmentsDisposed.add(this.onFragmentsDisposed);
|
|
9889
9876
|
}
|
|
9890
9877
|
indexRelations(t, e, i, n) {
|
|
@@ -10214,10 +10201,10 @@ const Os = class Os extends St {
|
|
|
10214
10201
|
if (!(h === o || d === o))
|
|
10215
10202
|
return;
|
|
10216
10203
|
let u = this._changeMap[t.uuid];
|
|
10217
|
-
u || (u = new
|
|
10204
|
+
u || (u = new Ee(), this._changeMap[t.uuid] = u);
|
|
10218
10205
|
const f = d === o ? [e] : n, E = h === o ? [e] : n;
|
|
10219
10206
|
let p = u.get(r);
|
|
10220
|
-
p || (p = new
|
|
10207
|
+
p || (p = new Ee(), p.onItemSet.add(
|
|
10221
10208
|
() => this.onEntitiesRelated.trigger({
|
|
10222
10209
|
invAttribute: o,
|
|
10223
10210
|
relType: r,
|
|
@@ -10288,37 +10275,37 @@ const Os = class Os extends St {
|
|
|
10288
10275
|
* A unique identifier for the component.
|
|
10289
10276
|
* This UUID is used to register the component within the Components system.
|
|
10290
10277
|
*/
|
|
10291
|
-
|
|
10278
|
+
_(Os, "uuid", "23a889ab-83b3-44a4-8bee-ead83438370b");
|
|
10292
10279
|
let xe = Os;
|
|
10293
|
-
const
|
|
10280
|
+
const Ii = class Ii extends St {
|
|
10294
10281
|
constructor(t) {
|
|
10295
10282
|
super(t);
|
|
10296
10283
|
/** {@link Disposable.onDisposed} */
|
|
10297
|
-
|
|
10284
|
+
_(this, "onDisposed", new Q());
|
|
10298
10285
|
/**
|
|
10299
10286
|
* Event triggered when fragments are loaded.
|
|
10300
10287
|
*/
|
|
10301
|
-
|
|
10288
|
+
_(this, "onFragmentsLoaded", new Q());
|
|
10302
10289
|
/**
|
|
10303
10290
|
* Event triggered when fragments are disposed.
|
|
10304
10291
|
*/
|
|
10305
|
-
|
|
10292
|
+
_(this, "onFragmentsDisposed", new Q());
|
|
10306
10293
|
/**
|
|
10307
10294
|
* DataMap containing all loaded fragments.
|
|
10308
10295
|
* The key is the fragment's unique identifier, and the value is the fragment itself.
|
|
10309
10296
|
*/
|
|
10310
|
-
|
|
10297
|
+
_(this, "list", new Ee());
|
|
10311
10298
|
/**
|
|
10312
10299
|
* DataMap containing all loaded fragment groups.
|
|
10313
10300
|
* The key is the group's unique identifier, and the value is the group itself.
|
|
10314
10301
|
*/
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10302
|
+
_(this, "groups", new Ee());
|
|
10303
|
+
_(this, "baseCoordinationModel", "");
|
|
10304
|
+
_(this, "baseCoordinationMatrix", new M.Matrix4());
|
|
10318
10305
|
/** {@link Component.enabled} */
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
this.components.add(
|
|
10306
|
+
_(this, "enabled", !0);
|
|
10307
|
+
_(this, "_loader", new fo());
|
|
10308
|
+
this.components.add(Ii.uuid, this);
|
|
10322
10309
|
}
|
|
10323
10310
|
/**
|
|
10324
10311
|
* Getter for the meshes of all fragments in the FragmentsManager.
|
|
@@ -10435,6 +10422,29 @@ const mi = class mi extends St {
|
|
|
10435
10422
|
}
|
|
10436
10423
|
return this.modelIdToFragmentIdMap(e);
|
|
10437
10424
|
}
|
|
10425
|
+
/**
|
|
10426
|
+
* Converts a fragment ID map to a collection of IFC GUIDs.
|
|
10427
|
+
*
|
|
10428
|
+
* @param fragmentIdMap - A fragment ID map to be converted to a collection of IFC GUIDs.
|
|
10429
|
+
*
|
|
10430
|
+
* @returns An array of IFC GUIDs.
|
|
10431
|
+
*/
|
|
10432
|
+
fragmentIdMapToGuids(t) {
|
|
10433
|
+
const e = [], i = this.getModelIdMap(t);
|
|
10434
|
+
for (const n in i) {
|
|
10435
|
+
const r = this.groups.get(n);
|
|
10436
|
+
if (!r)
|
|
10437
|
+
continue;
|
|
10438
|
+
const o = i[n];
|
|
10439
|
+
for (const a of o)
|
|
10440
|
+
for (const [l, h] of r.globalToExpressIDs.entries())
|
|
10441
|
+
if (h === a) {
|
|
10442
|
+
e.push(l);
|
|
10443
|
+
break;
|
|
10444
|
+
}
|
|
10445
|
+
}
|
|
10446
|
+
return e;
|
|
10447
|
+
}
|
|
10438
10448
|
/**
|
|
10439
10449
|
* Applies coordinate transformation to the provided models.
|
|
10440
10450
|
* If no models are provided, all groups are used.
|
|
@@ -10491,8 +10501,8 @@ const mi = class mi extends St {
|
|
|
10491
10501
|
* A unique identifier for the component.
|
|
10492
10502
|
* This UUID is used to register the component within the Components system.
|
|
10493
10503
|
*/
|
|
10494
|
-
|
|
10495
|
-
let _t =
|
|
10504
|
+
_(Ii, "uuid", "fef46874-46a3-461b-8c44-2922ab77c806");
|
|
10505
|
+
let _t = Ii;
|
|
10496
10506
|
var ii = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
10497
10507
|
function lc(c) {
|
|
10498
10508
|
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
@@ -10639,17 +10649,17 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10639
10649
|
return I;
|
|
10640
10650
|
}
|
|
10641
10651
|
function r(f, E, p, I, m, C) {
|
|
10642
|
-
var R, g, y = f.file, F = f.compression, S = C !== l.utf8encode, L = o.transformTo("string", C(y.name)), N = o.transformTo("string", l.utf8encode(y.name)), x = y.comment, k = o.transformTo("string", C(x)), w = o.transformTo("string", l.utf8encode(x)), P = N.length !== y.name.length,
|
|
10652
|
+
var R, g, y = f.file, F = f.compression, S = C !== l.utf8encode, L = o.transformTo("string", C(y.name)), N = o.transformTo("string", l.utf8encode(y.name)), x = y.comment, k = o.transformTo("string", C(x)), w = o.transformTo("string", l.utf8encode(x)), P = N.length !== y.name.length, T = w.length !== x.length, v = "", j = "", V = "", et = y.dir, H = y.date, nt = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
10643
10653
|
E && !p || (nt.crc32 = f.crc32, nt.compressedSize = f.compressedSize, nt.uncompressedSize = f.uncompressedSize);
|
|
10644
10654
|
var z = 0;
|
|
10645
|
-
E && (z |= 8), S || !P && !
|
|
10655
|
+
E && (z |= 8), S || !P && !T || (z |= 2048);
|
|
10646
10656
|
var U = 0, ot = 0;
|
|
10647
10657
|
et && (U |= 16), m === "UNIX" ? (ot = 798, U |= function(tt, Rt) {
|
|
10648
10658
|
var Ft = tt;
|
|
10649
10659
|
return tt || (Ft = Rt ? 16893 : 33204), (65535 & Ft) << 16;
|
|
10650
10660
|
}(y.unixPermissions, et)) : (ot = 20, U |= function(tt) {
|
|
10651
10661
|
return 63 & (tt || 0);
|
|
10652
|
-
}(y.dosPermissions)), R = H.getUTCHours(), R <<= 6, R |= H.getUTCMinutes(), R <<= 5, R |= H.getUTCSeconds() / 2, g = H.getUTCFullYear() - 1980, g <<= 4, g |= H.getUTCMonth() + 1, g <<= 5, g |= H.getUTCDate(), P && (
|
|
10662
|
+
}(y.dosPermissions)), R = H.getUTCHours(), R <<= 6, R |= H.getUTCMinutes(), R <<= 5, R |= H.getUTCSeconds() / 2, g = H.getUTCFullYear() - 1980, g <<= 4, g |= H.getUTCMonth() + 1, g <<= 5, g |= H.getUTCDate(), P && (j = n(1, 1) + n(h(L), 4) + N, v += "up" + n(j.length, 2) + j), T && (V = n(1, 1) + n(h(k), 4) + w, v += "uc" + n(V.length, 2) + V);
|
|
10653
10663
|
var st = "";
|
|
10654
10664
|
return st += `
|
|
10655
10665
|
\0`, st += n(z, 2), st += F.magic, st += n(R, 2), st += n(g, 2), st += n(nt.crc32, 4), st += n(nt.compressedSize, 4), st += n(nt.uncompressedSize, 4), st += n(L.length, 2), st += n(v.length, 2), { fileRecord: d.LOCAL_FILE_HEADER + st + L + v, dirRecord: d.CENTRAL_FILE_HEADER + n(ot, 2) + st + n(k.length, 2) + "\0\0\0\0" + n(U, 4) + n(I, 4) + L + v + k };
|
|
@@ -12014,7 +12024,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12014
12024
|
return -1 ^ r;
|
|
12015
12025
|
};
|
|
12016
12026
|
}, {}], 46: [function(t, e, i) {
|
|
12017
|
-
var n, r = t("../utils/common"), o = t("./trees"), a = t("./adler32"), l = t("./crc32"), h = t("./messages"), d = 0, u = 4, f = 0, E = -2, p = -1, I = 4, m = 2, C = 8, R = 9, g = 286, y = 30, F = 19, S = 2 * g + 1, L = 15, N = 3, x = 258, k = x + N + 1, w = 42, P = 113,
|
|
12027
|
+
var n, r = t("../utils/common"), o = t("./trees"), a = t("./adler32"), l = t("./crc32"), h = t("./messages"), d = 0, u = 4, f = 0, E = -2, p = -1, I = 4, m = 2, C = 8, R = 9, g = 286, y = 30, F = 19, S = 2 * g + 1, L = 15, N = 3, x = 258, k = x + N + 1, w = 42, P = 113, T = 1, v = 2, j = 3, V = 4;
|
|
12018
12028
|
function et(A, W) {
|
|
12019
12029
|
return A.msg = h[W], W;
|
|
12020
12030
|
}
|
|
@@ -12077,7 +12087,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12077
12087
|
for (var Y, b; ; ) {
|
|
12078
12088
|
if (A.lookahead < k) {
|
|
12079
12089
|
if (Rt(A), A.lookahead < k && W === d)
|
|
12080
|
-
return
|
|
12090
|
+
return T;
|
|
12081
12091
|
if (A.lookahead === 0)
|
|
12082
12092
|
break;
|
|
12083
12093
|
}
|
|
@@ -12091,15 +12101,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12091
12101
|
else
|
|
12092
12102
|
b = o._tr_tally(A, 0, A.window[A.strstart]), A.lookahead--, A.strstart++;
|
|
12093
12103
|
if (b && (U(A, !1), A.strm.avail_out === 0))
|
|
12094
|
-
return
|
|
12104
|
+
return T;
|
|
12095
12105
|
}
|
|
12096
|
-
return A.insert = A.strstart < N - 1 ? A.strstart : N - 1, W === u ? (U(A, !0), A.strm.avail_out === 0 ?
|
|
12106
|
+
return A.insert = A.strstart < N - 1 ? A.strstart : N - 1, W === u ? (U(A, !0), A.strm.avail_out === 0 ? j : V) : A.last_lit && (U(A, !1), A.strm.avail_out === 0) ? T : v;
|
|
12097
12107
|
}
|
|
12098
12108
|
function at(A, W) {
|
|
12099
12109
|
for (var Y, b, O; ; ) {
|
|
12100
12110
|
if (A.lookahead < k) {
|
|
12101
12111
|
if (Rt(A), A.lookahead < k && W === d)
|
|
12102
|
-
return
|
|
12112
|
+
return T;
|
|
12103
12113
|
if (A.lookahead === 0)
|
|
12104
12114
|
break;
|
|
12105
12115
|
}
|
|
@@ -12107,14 +12117,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12107
12117
|
for (O = A.strstart + A.lookahead - N, b = o._tr_tally(A, A.strstart - 1 - A.prev_match, A.prev_length - N), A.lookahead -= A.prev_length - 1, A.prev_length -= 2; ++A.strstart <= O && (A.ins_h = (A.ins_h << A.hash_shift ^ A.window[A.strstart + N - 1]) & A.hash_mask, Y = A.prev[A.strstart & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = A.strstart), --A.prev_length != 0; )
|
|
12108
12118
|
;
|
|
12109
12119
|
if (A.match_available = 0, A.match_length = N - 1, A.strstart++, b && (U(A, !1), A.strm.avail_out === 0))
|
|
12110
|
-
return
|
|
12120
|
+
return T;
|
|
12111
12121
|
} else if (A.match_available) {
|
|
12112
12122
|
if ((b = o._tr_tally(A, 0, A.window[A.strstart - 1])) && U(A, !1), A.strstart++, A.lookahead--, A.strm.avail_out === 0)
|
|
12113
|
-
return
|
|
12123
|
+
return T;
|
|
12114
12124
|
} else
|
|
12115
12125
|
A.match_available = 1, A.strstart++, A.lookahead--;
|
|
12116
12126
|
}
|
|
12117
|
-
return A.match_available && (b = o._tr_tally(A, 0, A.window[A.strstart - 1]), A.match_available = 0), A.insert = A.strstart < N - 1 ? A.strstart : N - 1, W === u ? (U(A, !0), A.strm.avail_out === 0 ?
|
|
12127
|
+
return A.match_available && (b = o._tr_tally(A, 0, A.window[A.strstart - 1]), A.match_available = 0), A.insert = A.strstart < N - 1 ? A.strstart : N - 1, W === u ? (U(A, !0), A.strm.avail_out === 0 ? j : V) : A.last_lit && (U(A, !1), A.strm.avail_out === 0) ? T : v;
|
|
12118
12128
|
}
|
|
12119
12129
|
function ft(A, W, Y, b, O) {
|
|
12120
12130
|
this.good_length = A, this.max_lazy = W, this.nice_length = Y, this.max_chain = b, this.func = O;
|
|
@@ -12147,16 +12157,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12147
12157
|
for (Y > A.pending_buf_size - 5 && (Y = A.pending_buf_size - 5); ; ) {
|
|
12148
12158
|
if (A.lookahead <= 1) {
|
|
12149
12159
|
if (Rt(A), A.lookahead === 0 && W === d)
|
|
12150
|
-
return
|
|
12160
|
+
return T;
|
|
12151
12161
|
if (A.lookahead === 0)
|
|
12152
12162
|
break;
|
|
12153
12163
|
}
|
|
12154
12164
|
A.strstart += A.lookahead, A.lookahead = 0;
|
|
12155
12165
|
var b = A.block_start + Y;
|
|
12156
12166
|
if ((A.strstart === 0 || A.strstart >= b) && (A.lookahead = A.strstart - b, A.strstart = b, U(A, !1), A.strm.avail_out === 0) || A.strstart - A.block_start >= A.w_size - k && (U(A, !1), A.strm.avail_out === 0))
|
|
12157
|
-
return
|
|
12167
|
+
return T;
|
|
12158
12168
|
}
|
|
12159
|
-
return A.insert = 0, W === u ? (U(A, !0), A.strm.avail_out === 0 ?
|
|
12169
|
+
return A.insert = 0, W === u ? (U(A, !0), A.strm.avail_out === 0 ? j : V) : (A.strstart > A.block_start && (U(A, !1), A.strm.avail_out), T);
|
|
12160
12170
|
}), new ft(4, 4, 8, 4, Ft), new ft(4, 5, 16, 8, Ft), new ft(4, 6, 32, 32, Ft), new ft(4, 4, 16, 16, at), new ft(8, 16, 32, 32, at), new ft(8, 16, 128, 128, at), new ft(8, 32, 128, 256, at), new ft(32, 128, 258, 1024, at), new ft(32, 258, 258, 4096, at)], i.deflateInit = function(A, W) {
|
|
12161
12171
|
return Mt(A, W, C, 15, 8, 0);
|
|
12162
12172
|
}, i.deflateInit2 = Mt, i.deflateReset = Gt, i.deflateResetKeep = It, i.deflateSetHeader = function(A, W) {
|
|
@@ -12219,18 +12229,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12219
12229
|
for (var it; ; ) {
|
|
12220
12230
|
if (B.lookahead === 0 && (Rt(B), B.lookahead === 0)) {
|
|
12221
12231
|
if (K === d)
|
|
12222
|
-
return
|
|
12232
|
+
return T;
|
|
12223
12233
|
break;
|
|
12224
12234
|
}
|
|
12225
12235
|
if (B.match_length = 0, it = o._tr_tally(B, 0, B.window[B.strstart]), B.lookahead--, B.strstart++, it && (U(B, !1), B.strm.avail_out === 0))
|
|
12226
|
-
return
|
|
12236
|
+
return T;
|
|
12227
12237
|
}
|
|
12228
|
-
return B.insert = 0, K === u ? (U(B, !0), B.strm.avail_out === 0 ?
|
|
12238
|
+
return B.insert = 0, K === u ? (U(B, !0), B.strm.avail_out === 0 ? j : V) : B.last_lit && (U(B, !1), B.strm.avail_out === 0) ? T : v;
|
|
12229
12239
|
}(b, W) : b.strategy === 3 ? function(B, K) {
|
|
12230
12240
|
for (var it, J, ct, Ct, pt = B.window; ; ) {
|
|
12231
12241
|
if (B.lookahead <= x) {
|
|
12232
12242
|
if (Rt(B), B.lookahead <= x && K === d)
|
|
12233
|
-
return
|
|
12243
|
+
return T;
|
|
12234
12244
|
if (B.lookahead === 0)
|
|
12235
12245
|
break;
|
|
12236
12246
|
}
|
|
@@ -12242,11 +12252,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12242
12252
|
B.match_length = x - (Ct - ct), B.match_length > B.lookahead && (B.match_length = B.lookahead);
|
|
12243
12253
|
}
|
|
12244
12254
|
if (B.match_length >= N ? (it = o._tr_tally(B, 1, B.match_length - N), B.lookahead -= B.match_length, B.strstart += B.match_length, B.match_length = 0) : (it = o._tr_tally(B, 0, B.window[B.strstart]), B.lookahead--, B.strstart++), it && (U(B, !1), B.strm.avail_out === 0))
|
|
12245
|
-
return
|
|
12255
|
+
return T;
|
|
12246
12256
|
}
|
|
12247
|
-
return B.insert = 0, K === u ? (U(B, !0), B.strm.avail_out === 0 ?
|
|
12257
|
+
return B.insert = 0, K === u ? (U(B, !0), B.strm.avail_out === 0 ? j : V) : B.last_lit && (U(B, !1), B.strm.avail_out === 0) ? T : v;
|
|
12248
12258
|
}(b, W) : n[b.level].func(b, W);
|
|
12249
|
-
if ($ !==
|
|
12259
|
+
if ($ !== j && $ !== V || (b.status = 666), $ === T || $ === j)
|
|
12250
12260
|
return A.avail_out === 0 && (b.last_flush = -1), f;
|
|
12251
12261
|
if ($ === v && (W === 1 ? o._tr_align(b) : W !== 5 && (o._tr_stored_block(b, 0, 0, !1), W === 3 && (nt(b.head), b.lookahead === 0 && (b.strstart = 0, b.block_start = 0, b.insert = 0))), z(A), A.avail_out === 0))
|
|
12252
12262
|
return b.last_flush = -1, f;
|
|
@@ -12272,11 +12282,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12272
12282
|
};
|
|
12273
12283
|
}, {}], 48: [function(t, e, i) {
|
|
12274
12284
|
e.exports = function(n, r) {
|
|
12275
|
-
var o, a, l, h, d, u, f, E, p, I, m, C, R, g, y, F, S, L, N, x, k, w, P,
|
|
12276
|
-
o = n.state, a = n.next_in,
|
|
12285
|
+
var o, a, l, h, d, u, f, E, p, I, m, C, R, g, y, F, S, L, N, x, k, w, P, T, v;
|
|
12286
|
+
o = n.state, a = n.next_in, T = n.input, l = a + (n.avail_in - 5), h = n.next_out, v = n.output, d = h - (r - n.avail_out), u = h + (n.avail_out - 257), f = o.dmax, E = o.wsize, p = o.whave, I = o.wnext, m = o.window, C = o.hold, R = o.bits, g = o.lencode, y = o.distcode, F = (1 << o.lenbits) - 1, S = (1 << o.distbits) - 1;
|
|
12277
12287
|
t:
|
|
12278
12288
|
do {
|
|
12279
|
-
R < 15 && (C +=
|
|
12289
|
+
R < 15 && (C += T[a++] << R, R += 8, C += T[a++] << R, R += 8), L = g[C & F];
|
|
12280
12290
|
e:
|
|
12281
12291
|
for (; ; ) {
|
|
12282
12292
|
if (C >>>= N = L >>> 24, R -= N, (N = L >>> 16 & 255) === 0)
|
|
@@ -12294,7 +12304,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12294
12304
|
n.msg = "invalid literal/length code", o.mode = 30;
|
|
12295
12305
|
break t;
|
|
12296
12306
|
}
|
|
12297
|
-
x = 65535 & L, (N &= 15) && (R < N && (C +=
|
|
12307
|
+
x = 65535 & L, (N &= 15) && (R < N && (C += T[a++] << R, R += 8), x += C & (1 << N) - 1, C >>>= N, R -= N), R < 15 && (C += T[a++] << R, R += 8, C += T[a++] << R, R += 8), L = y[C & S];
|
|
12298
12308
|
s:
|
|
12299
12309
|
for (; ; ) {
|
|
12300
12310
|
if (C >>>= N = L >>> 24, R -= N, !(16 & (N = L >>> 16 & 255))) {
|
|
@@ -12305,7 +12315,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12305
12315
|
n.msg = "invalid distance code", o.mode = 30;
|
|
12306
12316
|
break t;
|
|
12307
12317
|
}
|
|
12308
|
-
if (k = 65535 & L, R < (N &= 15) && (C +=
|
|
12318
|
+
if (k = 65535 & L, R < (N &= 15) && (C += T[a++] << R, (R += 8) < N && (C += T[a++] << R, R += 8)), f < (k += C & (1 << N) - 1)) {
|
|
12309
12319
|
n.msg = "invalid distance too far back", o.mode = 30;
|
|
12310
12320
|
break t;
|
|
12311
12321
|
}
|
|
@@ -12368,12 +12378,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12368
12378
|
return w && w.state ? ((P = w.state).wsize = 0, P.whave = 0, P.wnext = 0, R(w)) : f;
|
|
12369
12379
|
}
|
|
12370
12380
|
function y(w, P) {
|
|
12371
|
-
var
|
|
12372
|
-
return w && w.state ? (v = w.state, P < 0 ? (
|
|
12381
|
+
var T, v;
|
|
12382
|
+
return w && w.state ? (v = w.state, P < 0 ? (T = 0, P = -P) : (T = 1 + (P >> 4), P < 48 && (P &= 15)), P && (P < 8 || 15 < P) ? f : (v.window !== null && v.wbits !== P && (v.window = null), v.wrap = T, v.wbits = P, g(w))) : f;
|
|
12373
12383
|
}
|
|
12374
12384
|
function F(w, P) {
|
|
12375
|
-
var
|
|
12376
|
-
return w ? (v = new C(), (w.state = v).window = null, (
|
|
12385
|
+
var T, v;
|
|
12386
|
+
return w ? (v = new C(), (w.state = v).window = null, (T = y(w, P)) !== u && (w.state = null), T) : f;
|
|
12377
12387
|
}
|
|
12378
12388
|
var S, L, N = !0;
|
|
12379
12389
|
function x(w) {
|
|
@@ -12393,23 +12403,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12393
12403
|
}
|
|
12394
12404
|
w.lencode = S, w.lenbits = 9, w.distcode = L, w.distbits = 5;
|
|
12395
12405
|
}
|
|
12396
|
-
function k(w, P,
|
|
12397
|
-
var
|
|
12398
|
-
return V.window === null && (V.wsize = 1 << V.wbits, V.wnext = 0, V.whave = 0, V.window = new n.Buf8(V.wsize)), v >= V.wsize ? (n.arraySet(V.window, P,
|
|
12406
|
+
function k(w, P, T, v) {
|
|
12407
|
+
var j, V = w.state;
|
|
12408
|
+
return V.window === null && (V.wsize = 1 << V.wbits, V.wnext = 0, V.whave = 0, V.window = new n.Buf8(V.wsize)), v >= V.wsize ? (n.arraySet(V.window, P, T - V.wsize, V.wsize, 0), V.wnext = 0, V.whave = V.wsize) : (v < (j = V.wsize - V.wnext) && (j = v), n.arraySet(V.window, P, T - v, j, V.wnext), (v -= j) ? (n.arraySet(V.window, P, T - v, v, 0), V.wnext = v, V.whave = V.wsize) : (V.wnext += j, V.wnext === V.wsize && (V.wnext = 0), V.whave < V.wsize && (V.whave += j))), 0;
|
|
12399
12409
|
}
|
|
12400
12410
|
i.inflateReset = g, i.inflateReset2 = y, i.inflateResetKeep = R, i.inflateInit = function(w) {
|
|
12401
12411
|
return F(w, 15);
|
|
12402
12412
|
}, i.inflateInit2 = F, i.inflate = function(w, P) {
|
|
12403
|
-
var
|
|
12413
|
+
var T, v, j, V, et, H, nt, z, U, ot, st, tt, Rt, Ft, at, ft, ut, It, Gt, Mt, A, W, Y, b, O = 0, D = new n.Buf8(4), Z = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
12404
12414
|
if (!w || !w.state || !w.output || !w.input && w.avail_in !== 0)
|
|
12405
12415
|
return f;
|
|
12406
|
-
(
|
|
12416
|
+
(T = w.state).mode === 12 && (T.mode = 13), et = w.next_out, j = w.output, nt = w.avail_out, V = w.next_in, v = w.input, H = w.avail_in, z = T.hold, U = T.bits, ot = H, st = nt, W = u;
|
|
12407
12417
|
t:
|
|
12408
12418
|
for (; ; )
|
|
12409
|
-
switch (
|
|
12419
|
+
switch (T.mode) {
|
|
12410
12420
|
case E:
|
|
12411
|
-
if (
|
|
12412
|
-
|
|
12421
|
+
if (T.wrap === 0) {
|
|
12422
|
+
T.mode = 13;
|
|
12413
12423
|
break;
|
|
12414
12424
|
}
|
|
12415
12425
|
for (; U < 16; ) {
|
|
@@ -12417,25 +12427,25 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12417
12427
|
break t;
|
|
12418
12428
|
H--, z += v[V++] << U, U += 8;
|
|
12419
12429
|
}
|
|
12420
|
-
if (2 &
|
|
12421
|
-
D[
|
|
12430
|
+
if (2 & T.wrap && z === 35615) {
|
|
12431
|
+
D[T.check = 0] = 255 & z, D[1] = z >>> 8 & 255, T.check = o(T.check, D, 2, 0), U = z = 0, T.mode = 2;
|
|
12422
12432
|
break;
|
|
12423
12433
|
}
|
|
12424
|
-
if (
|
|
12425
|
-
w.msg = "incorrect header check",
|
|
12434
|
+
if (T.flags = 0, T.head && (T.head.done = !1), !(1 & T.wrap) || (((255 & z) << 8) + (z >> 8)) % 31) {
|
|
12435
|
+
w.msg = "incorrect header check", T.mode = 30;
|
|
12426
12436
|
break;
|
|
12427
12437
|
}
|
|
12428
12438
|
if ((15 & z) != 8) {
|
|
12429
|
-
w.msg = "unknown compression method",
|
|
12439
|
+
w.msg = "unknown compression method", T.mode = 30;
|
|
12430
12440
|
break;
|
|
12431
12441
|
}
|
|
12432
|
-
if (U -= 4, A = 8 + (15 & (z >>>= 4)),
|
|
12433
|
-
|
|
12434
|
-
else if (A >
|
|
12435
|
-
w.msg = "invalid window size",
|
|
12442
|
+
if (U -= 4, A = 8 + (15 & (z >>>= 4)), T.wbits === 0)
|
|
12443
|
+
T.wbits = A;
|
|
12444
|
+
else if (A > T.wbits) {
|
|
12445
|
+
w.msg = "invalid window size", T.mode = 30;
|
|
12436
12446
|
break;
|
|
12437
12447
|
}
|
|
12438
|
-
|
|
12448
|
+
T.dmax = 1 << A, w.adler = T.check = 1, T.mode = 512 & z ? 10 : 12, U = z = 0;
|
|
12439
12449
|
break;
|
|
12440
12450
|
case 2:
|
|
12441
12451
|
for (; U < 16; ) {
|
|
@@ -12443,80 +12453,80 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12443
12453
|
break t;
|
|
12444
12454
|
H--, z += v[V++] << U, U += 8;
|
|
12445
12455
|
}
|
|
12446
|
-
if (
|
|
12447
|
-
w.msg = "unknown compression method",
|
|
12456
|
+
if (T.flags = z, (255 & T.flags) != 8) {
|
|
12457
|
+
w.msg = "unknown compression method", T.mode = 30;
|
|
12448
12458
|
break;
|
|
12449
12459
|
}
|
|
12450
|
-
if (57344 &
|
|
12451
|
-
w.msg = "unknown header flags set",
|
|
12460
|
+
if (57344 & T.flags) {
|
|
12461
|
+
w.msg = "unknown header flags set", T.mode = 30;
|
|
12452
12462
|
break;
|
|
12453
12463
|
}
|
|
12454
|
-
|
|
12464
|
+
T.head && (T.head.text = z >> 8 & 1), 512 & T.flags && (D[0] = 255 & z, D[1] = z >>> 8 & 255, T.check = o(T.check, D, 2, 0)), U = z = 0, T.mode = 3;
|
|
12455
12465
|
case 3:
|
|
12456
12466
|
for (; U < 32; ) {
|
|
12457
12467
|
if (H === 0)
|
|
12458
12468
|
break t;
|
|
12459
12469
|
H--, z += v[V++] << U, U += 8;
|
|
12460
12470
|
}
|
|
12461
|
-
|
|
12471
|
+
T.head && (T.head.time = z), 512 & T.flags && (D[0] = 255 & z, D[1] = z >>> 8 & 255, D[2] = z >>> 16 & 255, D[3] = z >>> 24 & 255, T.check = o(T.check, D, 4, 0)), U = z = 0, T.mode = 4;
|
|
12462
12472
|
case 4:
|
|
12463
12473
|
for (; U < 16; ) {
|
|
12464
12474
|
if (H === 0)
|
|
12465
12475
|
break t;
|
|
12466
12476
|
H--, z += v[V++] << U, U += 8;
|
|
12467
12477
|
}
|
|
12468
|
-
|
|
12478
|
+
T.head && (T.head.xflags = 255 & z, T.head.os = z >> 8), 512 & T.flags && (D[0] = 255 & z, D[1] = z >>> 8 & 255, T.check = o(T.check, D, 2, 0)), U = z = 0, T.mode = 5;
|
|
12469
12479
|
case 5:
|
|
12470
|
-
if (1024 &
|
|
12480
|
+
if (1024 & T.flags) {
|
|
12471
12481
|
for (; U < 16; ) {
|
|
12472
12482
|
if (H === 0)
|
|
12473
12483
|
break t;
|
|
12474
12484
|
H--, z += v[V++] << U, U += 8;
|
|
12475
12485
|
}
|
|
12476
|
-
|
|
12486
|
+
T.length = z, T.head && (T.head.extra_len = z), 512 & T.flags && (D[0] = 255 & z, D[1] = z >>> 8 & 255, T.check = o(T.check, D, 2, 0)), U = z = 0;
|
|
12477
12487
|
} else
|
|
12478
|
-
|
|
12479
|
-
|
|
12488
|
+
T.head && (T.head.extra = null);
|
|
12489
|
+
T.mode = 6;
|
|
12480
12490
|
case 6:
|
|
12481
|
-
if (1024 &
|
|
12491
|
+
if (1024 & T.flags && (H < (tt = T.length) && (tt = H), tt && (T.head && (A = T.head.extra_len - T.length, T.head.extra || (T.head.extra = new Array(T.head.extra_len)), n.arraySet(T.head.extra, v, V, tt, A)), 512 & T.flags && (T.check = o(T.check, v, tt, V)), H -= tt, V += tt, T.length -= tt), T.length))
|
|
12482
12492
|
break t;
|
|
12483
|
-
|
|
12493
|
+
T.length = 0, T.mode = 7;
|
|
12484
12494
|
case 7:
|
|
12485
|
-
if (2048 &
|
|
12495
|
+
if (2048 & T.flags) {
|
|
12486
12496
|
if (H === 0)
|
|
12487
12497
|
break t;
|
|
12488
|
-
for (tt = 0; A = v[V + tt++],
|
|
12498
|
+
for (tt = 0; A = v[V + tt++], T.head && A && T.length < 65536 && (T.head.name += String.fromCharCode(A)), A && tt < H; )
|
|
12489
12499
|
;
|
|
12490
|
-
if (512 &
|
|
12500
|
+
if (512 & T.flags && (T.check = o(T.check, v, tt, V)), H -= tt, V += tt, A)
|
|
12491
12501
|
break t;
|
|
12492
12502
|
} else
|
|
12493
|
-
|
|
12494
|
-
|
|
12503
|
+
T.head && (T.head.name = null);
|
|
12504
|
+
T.length = 0, T.mode = 8;
|
|
12495
12505
|
case 8:
|
|
12496
|
-
if (4096 &
|
|
12506
|
+
if (4096 & T.flags) {
|
|
12497
12507
|
if (H === 0)
|
|
12498
12508
|
break t;
|
|
12499
|
-
for (tt = 0; A = v[V + tt++],
|
|
12509
|
+
for (tt = 0; A = v[V + tt++], T.head && A && T.length < 65536 && (T.head.comment += String.fromCharCode(A)), A && tt < H; )
|
|
12500
12510
|
;
|
|
12501
|
-
if (512 &
|
|
12511
|
+
if (512 & T.flags && (T.check = o(T.check, v, tt, V)), H -= tt, V += tt, A)
|
|
12502
12512
|
break t;
|
|
12503
12513
|
} else
|
|
12504
|
-
|
|
12505
|
-
|
|
12514
|
+
T.head && (T.head.comment = null);
|
|
12515
|
+
T.mode = 9;
|
|
12506
12516
|
case 9:
|
|
12507
|
-
if (512 &
|
|
12517
|
+
if (512 & T.flags) {
|
|
12508
12518
|
for (; U < 16; ) {
|
|
12509
12519
|
if (H === 0)
|
|
12510
12520
|
break t;
|
|
12511
12521
|
H--, z += v[V++] << U, U += 8;
|
|
12512
12522
|
}
|
|
12513
|
-
if (z !== (65535 &
|
|
12514
|
-
w.msg = "header crc mismatch",
|
|
12523
|
+
if (z !== (65535 & T.check)) {
|
|
12524
|
+
w.msg = "header crc mismatch", T.mode = 30;
|
|
12515
12525
|
break;
|
|
12516
12526
|
}
|
|
12517
12527
|
U = z = 0;
|
|
12518
12528
|
}
|
|
12519
|
-
|
|
12529
|
+
T.head && (T.head.hcrc = T.flags >> 9 & 1, T.head.done = !0), w.adler = T.check = 0, T.mode = 12;
|
|
12520
12530
|
break;
|
|
12521
12531
|
case 10:
|
|
12522
12532
|
for (; U < 32; ) {
|
|
@@ -12524,17 +12534,17 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12524
12534
|
break t;
|
|
12525
12535
|
H--, z += v[V++] << U, U += 8;
|
|
12526
12536
|
}
|
|
12527
|
-
w.adler =
|
|
12537
|
+
w.adler = T.check = m(z), U = z = 0, T.mode = 11;
|
|
12528
12538
|
case 11:
|
|
12529
|
-
if (
|
|
12530
|
-
return w.next_out = et, w.avail_out = nt, w.next_in = V, w.avail_in = H,
|
|
12531
|
-
w.adler =
|
|
12539
|
+
if (T.havedict === 0)
|
|
12540
|
+
return w.next_out = et, w.avail_out = nt, w.next_in = V, w.avail_in = H, T.hold = z, T.bits = U, 2;
|
|
12541
|
+
w.adler = T.check = 1, T.mode = 12;
|
|
12532
12542
|
case 12:
|
|
12533
12543
|
if (P === 5 || P === 6)
|
|
12534
12544
|
break t;
|
|
12535
12545
|
case 13:
|
|
12536
|
-
if (
|
|
12537
|
-
z >>>= 7 & U, U -= 7 & U,
|
|
12546
|
+
if (T.last) {
|
|
12547
|
+
z >>>= 7 & U, U -= 7 & U, T.mode = 27;
|
|
12538
12548
|
break;
|
|
12539
12549
|
}
|
|
12540
12550
|
for (; U < 3; ) {
|
|
@@ -12542,20 +12552,20 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12542
12552
|
break t;
|
|
12543
12553
|
H--, z += v[V++] << U, U += 8;
|
|
12544
12554
|
}
|
|
12545
|
-
switch (
|
|
12555
|
+
switch (T.last = 1 & z, U -= 1, 3 & (z >>>= 1)) {
|
|
12546
12556
|
case 0:
|
|
12547
|
-
|
|
12557
|
+
T.mode = 14;
|
|
12548
12558
|
break;
|
|
12549
12559
|
case 1:
|
|
12550
|
-
if (x(
|
|
12560
|
+
if (x(T), T.mode = 20, P !== 6)
|
|
12551
12561
|
break;
|
|
12552
12562
|
z >>>= 2, U -= 2;
|
|
12553
12563
|
break t;
|
|
12554
12564
|
case 2:
|
|
12555
|
-
|
|
12565
|
+
T.mode = 17;
|
|
12556
12566
|
break;
|
|
12557
12567
|
case 3:
|
|
12558
|
-
w.msg = "invalid block type",
|
|
12568
|
+
w.msg = "invalid block type", T.mode = 30;
|
|
12559
12569
|
}
|
|
12560
12570
|
z >>>= 2, U -= 2;
|
|
12561
12571
|
break;
|
|
@@ -12566,21 +12576,21 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12566
12576
|
H--, z += v[V++] << U, U += 8;
|
|
12567
12577
|
}
|
|
12568
12578
|
if ((65535 & z) != (z >>> 16 ^ 65535)) {
|
|
12569
|
-
w.msg = "invalid stored block lengths",
|
|
12579
|
+
w.msg = "invalid stored block lengths", T.mode = 30;
|
|
12570
12580
|
break;
|
|
12571
12581
|
}
|
|
12572
|
-
if (
|
|
12582
|
+
if (T.length = 65535 & z, U = z = 0, T.mode = 15, P === 6)
|
|
12573
12583
|
break t;
|
|
12574
12584
|
case 15:
|
|
12575
|
-
|
|
12585
|
+
T.mode = 16;
|
|
12576
12586
|
case 16:
|
|
12577
|
-
if (tt =
|
|
12587
|
+
if (tt = T.length) {
|
|
12578
12588
|
if (H < tt && (tt = H), nt < tt && (tt = nt), tt === 0)
|
|
12579
12589
|
break t;
|
|
12580
|
-
n.arraySet(
|
|
12590
|
+
n.arraySet(j, v, V, tt, et), H -= tt, V += tt, nt -= tt, et += tt, T.length -= tt;
|
|
12581
12591
|
break;
|
|
12582
12592
|
}
|
|
12583
|
-
|
|
12593
|
+
T.mode = 12;
|
|
12584
12594
|
break;
|
|
12585
12595
|
case 17:
|
|
12586
12596
|
for (; U < 14; ) {
|
|
@@ -12588,36 +12598,36 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12588
12598
|
break t;
|
|
12589
12599
|
H--, z += v[V++] << U, U += 8;
|
|
12590
12600
|
}
|
|
12591
|
-
if (
|
|
12592
|
-
w.msg = "too many length or distance symbols",
|
|
12601
|
+
if (T.nlen = 257 + (31 & z), z >>>= 5, U -= 5, T.ndist = 1 + (31 & z), z >>>= 5, U -= 5, T.ncode = 4 + (15 & z), z >>>= 4, U -= 4, 286 < T.nlen || 30 < T.ndist) {
|
|
12602
|
+
w.msg = "too many length or distance symbols", T.mode = 30;
|
|
12593
12603
|
break;
|
|
12594
12604
|
}
|
|
12595
|
-
|
|
12605
|
+
T.have = 0, T.mode = 18;
|
|
12596
12606
|
case 18:
|
|
12597
|
-
for (;
|
|
12607
|
+
for (; T.have < T.ncode; ) {
|
|
12598
12608
|
for (; U < 3; ) {
|
|
12599
12609
|
if (H === 0)
|
|
12600
12610
|
break t;
|
|
12601
12611
|
H--, z += v[V++] << U, U += 8;
|
|
12602
12612
|
}
|
|
12603
|
-
|
|
12613
|
+
T.lens[Z[T.have++]] = 7 & z, z >>>= 3, U -= 3;
|
|
12604
12614
|
}
|
|
12605
|
-
for (;
|
|
12606
|
-
|
|
12607
|
-
if (
|
|
12608
|
-
w.msg = "invalid code lengths set",
|
|
12615
|
+
for (; T.have < 19; )
|
|
12616
|
+
T.lens[Z[T.have++]] = 0;
|
|
12617
|
+
if (T.lencode = T.lendyn, T.lenbits = 7, Y = { bits: T.lenbits }, W = l(0, T.lens, 0, 19, T.lencode, 0, T.work, Y), T.lenbits = Y.bits, W) {
|
|
12618
|
+
w.msg = "invalid code lengths set", T.mode = 30;
|
|
12609
12619
|
break;
|
|
12610
12620
|
}
|
|
12611
|
-
|
|
12621
|
+
T.have = 0, T.mode = 19;
|
|
12612
12622
|
case 19:
|
|
12613
|
-
for (;
|
|
12614
|
-
for (; ft = (O =
|
|
12623
|
+
for (; T.have < T.nlen + T.ndist; ) {
|
|
12624
|
+
for (; ft = (O = T.lencode[z & (1 << T.lenbits) - 1]) >>> 16 & 255, ut = 65535 & O, !((at = O >>> 24) <= U); ) {
|
|
12615
12625
|
if (H === 0)
|
|
12616
12626
|
break t;
|
|
12617
12627
|
H--, z += v[V++] << U, U += 8;
|
|
12618
12628
|
}
|
|
12619
12629
|
if (ut < 16)
|
|
12620
|
-
z >>>= at, U -= at,
|
|
12630
|
+
z >>>= at, U -= at, T.lens[T.have++] = ut;
|
|
12621
12631
|
else {
|
|
12622
12632
|
if (ut === 16) {
|
|
12623
12633
|
for (b = at + 2; U < b; ) {
|
|
@@ -12625,11 +12635,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12625
12635
|
break t;
|
|
12626
12636
|
H--, z += v[V++] << U, U += 8;
|
|
12627
12637
|
}
|
|
12628
|
-
if (z >>>= at, U -= at,
|
|
12629
|
-
w.msg = "invalid bit length repeat",
|
|
12638
|
+
if (z >>>= at, U -= at, T.have === 0) {
|
|
12639
|
+
w.msg = "invalid bit length repeat", T.mode = 30;
|
|
12630
12640
|
break;
|
|
12631
12641
|
}
|
|
12632
|
-
A =
|
|
12642
|
+
A = T.lens[T.have - 1], tt = 3 + (3 & z), z >>>= 2, U -= 2;
|
|
12633
12643
|
} else if (ut === 17) {
|
|
12634
12644
|
for (b = at + 3; U < b; ) {
|
|
12635
12645
|
if (H === 0)
|
|
@@ -12645,154 +12655,154 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12645
12655
|
}
|
|
12646
12656
|
U -= at, A = 0, tt = 11 + (127 & (z >>>= at)), z >>>= 7, U -= 7;
|
|
12647
12657
|
}
|
|
12648
|
-
if (
|
|
12649
|
-
w.msg = "invalid bit length repeat",
|
|
12658
|
+
if (T.have + tt > T.nlen + T.ndist) {
|
|
12659
|
+
w.msg = "invalid bit length repeat", T.mode = 30;
|
|
12650
12660
|
break;
|
|
12651
12661
|
}
|
|
12652
12662
|
for (; tt--; )
|
|
12653
|
-
|
|
12663
|
+
T.lens[T.have++] = A;
|
|
12654
12664
|
}
|
|
12655
12665
|
}
|
|
12656
|
-
if (
|
|
12666
|
+
if (T.mode === 30)
|
|
12657
12667
|
break;
|
|
12658
|
-
if (
|
|
12659
|
-
w.msg = "invalid code -- missing end-of-block",
|
|
12668
|
+
if (T.lens[256] === 0) {
|
|
12669
|
+
w.msg = "invalid code -- missing end-of-block", T.mode = 30;
|
|
12660
12670
|
break;
|
|
12661
12671
|
}
|
|
12662
|
-
if (
|
|
12663
|
-
w.msg = "invalid literal/lengths set",
|
|
12672
|
+
if (T.lenbits = 9, Y = { bits: T.lenbits }, W = l(h, T.lens, 0, T.nlen, T.lencode, 0, T.work, Y), T.lenbits = Y.bits, W) {
|
|
12673
|
+
w.msg = "invalid literal/lengths set", T.mode = 30;
|
|
12664
12674
|
break;
|
|
12665
12675
|
}
|
|
12666
|
-
if (
|
|
12667
|
-
w.msg = "invalid distances set",
|
|
12676
|
+
if (T.distbits = 6, T.distcode = T.distdyn, Y = { bits: T.distbits }, W = l(d, T.lens, T.nlen, T.ndist, T.distcode, 0, T.work, Y), T.distbits = Y.bits, W) {
|
|
12677
|
+
w.msg = "invalid distances set", T.mode = 30;
|
|
12668
12678
|
break;
|
|
12669
12679
|
}
|
|
12670
|
-
if (
|
|
12680
|
+
if (T.mode = 20, P === 6)
|
|
12671
12681
|
break t;
|
|
12672
12682
|
case 20:
|
|
12673
|
-
|
|
12683
|
+
T.mode = 21;
|
|
12674
12684
|
case 21:
|
|
12675
12685
|
if (6 <= H && 258 <= nt) {
|
|
12676
|
-
w.next_out = et, w.avail_out = nt, w.next_in = V, w.avail_in = H,
|
|
12686
|
+
w.next_out = et, w.avail_out = nt, w.next_in = V, w.avail_in = H, T.hold = z, T.bits = U, a(w, st), et = w.next_out, j = w.output, nt = w.avail_out, V = w.next_in, v = w.input, H = w.avail_in, z = T.hold, U = T.bits, T.mode === 12 && (T.back = -1);
|
|
12677
12687
|
break;
|
|
12678
12688
|
}
|
|
12679
|
-
for (
|
|
12689
|
+
for (T.back = 0; ft = (O = T.lencode[z & (1 << T.lenbits) - 1]) >>> 16 & 255, ut = 65535 & O, !((at = O >>> 24) <= U); ) {
|
|
12680
12690
|
if (H === 0)
|
|
12681
12691
|
break t;
|
|
12682
12692
|
H--, z += v[V++] << U, U += 8;
|
|
12683
12693
|
}
|
|
12684
12694
|
if (ft && !(240 & ft)) {
|
|
12685
|
-
for (It = at, Gt = ft, Mt = ut; ft = (O =
|
|
12695
|
+
for (It = at, Gt = ft, Mt = ut; ft = (O = T.lencode[Mt + ((z & (1 << It + Gt) - 1) >> It)]) >>> 16 & 255, ut = 65535 & O, !(It + (at = O >>> 24) <= U); ) {
|
|
12686
12696
|
if (H === 0)
|
|
12687
12697
|
break t;
|
|
12688
12698
|
H--, z += v[V++] << U, U += 8;
|
|
12689
12699
|
}
|
|
12690
|
-
z >>>= It, U -= It,
|
|
12700
|
+
z >>>= It, U -= It, T.back += It;
|
|
12691
12701
|
}
|
|
12692
|
-
if (z >>>= at, U -= at,
|
|
12693
|
-
|
|
12702
|
+
if (z >>>= at, U -= at, T.back += at, T.length = ut, ft === 0) {
|
|
12703
|
+
T.mode = 26;
|
|
12694
12704
|
break;
|
|
12695
12705
|
}
|
|
12696
12706
|
if (32 & ft) {
|
|
12697
|
-
|
|
12707
|
+
T.back = -1, T.mode = 12;
|
|
12698
12708
|
break;
|
|
12699
12709
|
}
|
|
12700
12710
|
if (64 & ft) {
|
|
12701
|
-
w.msg = "invalid literal/length code",
|
|
12711
|
+
w.msg = "invalid literal/length code", T.mode = 30;
|
|
12702
12712
|
break;
|
|
12703
12713
|
}
|
|
12704
|
-
|
|
12714
|
+
T.extra = 15 & ft, T.mode = 22;
|
|
12705
12715
|
case 22:
|
|
12706
|
-
if (
|
|
12707
|
-
for (b =
|
|
12716
|
+
if (T.extra) {
|
|
12717
|
+
for (b = T.extra; U < b; ) {
|
|
12708
12718
|
if (H === 0)
|
|
12709
12719
|
break t;
|
|
12710
12720
|
H--, z += v[V++] << U, U += 8;
|
|
12711
12721
|
}
|
|
12712
|
-
|
|
12722
|
+
T.length += z & (1 << T.extra) - 1, z >>>= T.extra, U -= T.extra, T.back += T.extra;
|
|
12713
12723
|
}
|
|
12714
|
-
|
|
12724
|
+
T.was = T.length, T.mode = 23;
|
|
12715
12725
|
case 23:
|
|
12716
|
-
for (; ft = (O =
|
|
12726
|
+
for (; ft = (O = T.distcode[z & (1 << T.distbits) - 1]) >>> 16 & 255, ut = 65535 & O, !((at = O >>> 24) <= U); ) {
|
|
12717
12727
|
if (H === 0)
|
|
12718
12728
|
break t;
|
|
12719
12729
|
H--, z += v[V++] << U, U += 8;
|
|
12720
12730
|
}
|
|
12721
12731
|
if (!(240 & ft)) {
|
|
12722
|
-
for (It = at, Gt = ft, Mt = ut; ft = (O =
|
|
12732
|
+
for (It = at, Gt = ft, Mt = ut; ft = (O = T.distcode[Mt + ((z & (1 << It + Gt) - 1) >> It)]) >>> 16 & 255, ut = 65535 & O, !(It + (at = O >>> 24) <= U); ) {
|
|
12723
12733
|
if (H === 0)
|
|
12724
12734
|
break t;
|
|
12725
12735
|
H--, z += v[V++] << U, U += 8;
|
|
12726
12736
|
}
|
|
12727
|
-
z >>>= It, U -= It,
|
|
12737
|
+
z >>>= It, U -= It, T.back += It;
|
|
12728
12738
|
}
|
|
12729
|
-
if (z >>>= at, U -= at,
|
|
12730
|
-
w.msg = "invalid distance code",
|
|
12739
|
+
if (z >>>= at, U -= at, T.back += at, 64 & ft) {
|
|
12740
|
+
w.msg = "invalid distance code", T.mode = 30;
|
|
12731
12741
|
break;
|
|
12732
12742
|
}
|
|
12733
|
-
|
|
12743
|
+
T.offset = ut, T.extra = 15 & ft, T.mode = 24;
|
|
12734
12744
|
case 24:
|
|
12735
|
-
if (
|
|
12736
|
-
for (b =
|
|
12745
|
+
if (T.extra) {
|
|
12746
|
+
for (b = T.extra; U < b; ) {
|
|
12737
12747
|
if (H === 0)
|
|
12738
12748
|
break t;
|
|
12739
12749
|
H--, z += v[V++] << U, U += 8;
|
|
12740
12750
|
}
|
|
12741
|
-
|
|
12751
|
+
T.offset += z & (1 << T.extra) - 1, z >>>= T.extra, U -= T.extra, T.back += T.extra;
|
|
12742
12752
|
}
|
|
12743
|
-
if (
|
|
12744
|
-
w.msg = "invalid distance too far back",
|
|
12753
|
+
if (T.offset > T.dmax) {
|
|
12754
|
+
w.msg = "invalid distance too far back", T.mode = 30;
|
|
12745
12755
|
break;
|
|
12746
12756
|
}
|
|
12747
|
-
|
|
12757
|
+
T.mode = 25;
|
|
12748
12758
|
case 25:
|
|
12749
12759
|
if (nt === 0)
|
|
12750
12760
|
break t;
|
|
12751
|
-
if (tt = st - nt,
|
|
12752
|
-
if ((tt =
|
|
12753
|
-
w.msg = "invalid distance too far back",
|
|
12761
|
+
if (tt = st - nt, T.offset > tt) {
|
|
12762
|
+
if ((tt = T.offset - tt) > T.whave && T.sane) {
|
|
12763
|
+
w.msg = "invalid distance too far back", T.mode = 30;
|
|
12754
12764
|
break;
|
|
12755
12765
|
}
|
|
12756
|
-
Rt = tt >
|
|
12766
|
+
Rt = tt > T.wnext ? (tt -= T.wnext, T.wsize - tt) : T.wnext - tt, tt > T.length && (tt = T.length), Ft = T.window;
|
|
12757
12767
|
} else
|
|
12758
|
-
Ft =
|
|
12759
|
-
for (nt < tt && (tt = nt), nt -= tt,
|
|
12768
|
+
Ft = j, Rt = et - T.offset, tt = T.length;
|
|
12769
|
+
for (nt < tt && (tt = nt), nt -= tt, T.length -= tt; j[et++] = Ft[Rt++], --tt; )
|
|
12760
12770
|
;
|
|
12761
|
-
|
|
12771
|
+
T.length === 0 && (T.mode = 21);
|
|
12762
12772
|
break;
|
|
12763
12773
|
case 26:
|
|
12764
12774
|
if (nt === 0)
|
|
12765
12775
|
break t;
|
|
12766
|
-
|
|
12776
|
+
j[et++] = T.length, nt--, T.mode = 21;
|
|
12767
12777
|
break;
|
|
12768
12778
|
case 27:
|
|
12769
|
-
if (
|
|
12779
|
+
if (T.wrap) {
|
|
12770
12780
|
for (; U < 32; ) {
|
|
12771
12781
|
if (H === 0)
|
|
12772
12782
|
break t;
|
|
12773
12783
|
H--, z |= v[V++] << U, U += 8;
|
|
12774
12784
|
}
|
|
12775
|
-
if (st -= nt, w.total_out += st,
|
|
12776
|
-
w.msg = "incorrect data check",
|
|
12785
|
+
if (st -= nt, w.total_out += st, T.total += st, st && (w.adler = T.check = T.flags ? o(T.check, j, st, et - st) : r(T.check, j, st, et - st)), st = nt, (T.flags ? z : m(z)) !== T.check) {
|
|
12786
|
+
w.msg = "incorrect data check", T.mode = 30;
|
|
12777
12787
|
break;
|
|
12778
12788
|
}
|
|
12779
12789
|
U = z = 0;
|
|
12780
12790
|
}
|
|
12781
|
-
|
|
12791
|
+
T.mode = 28;
|
|
12782
12792
|
case 28:
|
|
12783
|
-
if (
|
|
12793
|
+
if (T.wrap && T.flags) {
|
|
12784
12794
|
for (; U < 32; ) {
|
|
12785
12795
|
if (H === 0)
|
|
12786
12796
|
break t;
|
|
12787
12797
|
H--, z += v[V++] << U, U += 8;
|
|
12788
12798
|
}
|
|
12789
|
-
if (z !== (4294967295 &
|
|
12790
|
-
w.msg = "incorrect length check",
|
|
12799
|
+
if (z !== (4294967295 & T.total)) {
|
|
12800
|
+
w.msg = "incorrect length check", T.mode = 30;
|
|
12791
12801
|
break;
|
|
12792
12802
|
}
|
|
12793
12803
|
U = z = 0;
|
|
12794
12804
|
}
|
|
12795
|
-
|
|
12805
|
+
T.mode = 29;
|
|
12796
12806
|
case 29:
|
|
12797
12807
|
W = 1;
|
|
12798
12808
|
break t;
|
|
@@ -12805,34 +12815,34 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12805
12815
|
default:
|
|
12806
12816
|
return f;
|
|
12807
12817
|
}
|
|
12808
|
-
return w.next_out = et, w.avail_out = nt, w.next_in = V, w.avail_in = H,
|
|
12818
|
+
return w.next_out = et, w.avail_out = nt, w.next_in = V, w.avail_in = H, T.hold = z, T.bits = U, (T.wsize || st !== w.avail_out && T.mode < 30 && (T.mode < 27 || P !== 4)) && k(w, w.output, w.next_out, st - w.avail_out) ? (T.mode = 31, -4) : (ot -= w.avail_in, st -= w.avail_out, w.total_in += ot, w.total_out += st, T.total += st, T.wrap && st && (w.adler = T.check = T.flags ? o(T.check, j, st, w.next_out - st) : r(T.check, j, st, w.next_out - st)), w.data_type = T.bits + (T.last ? 64 : 0) + (T.mode === 12 ? 128 : 0) + (T.mode === 20 || T.mode === 15 ? 256 : 0), (ot == 0 && st === 0 || P === 4) && W === u && (W = -5), W);
|
|
12809
12819
|
}, i.inflateEnd = function(w) {
|
|
12810
12820
|
if (!w || !w.state)
|
|
12811
12821
|
return f;
|
|
12812
12822
|
var P = w.state;
|
|
12813
12823
|
return P.window && (P.window = null), w.state = null, u;
|
|
12814
12824
|
}, i.inflateGetHeader = function(w, P) {
|
|
12815
|
-
var
|
|
12816
|
-
return w && w.state && 2 & (
|
|
12825
|
+
var T;
|
|
12826
|
+
return w && w.state && 2 & (T = w.state).wrap ? ((T.head = P).done = !1, u) : f;
|
|
12817
12827
|
}, i.inflateSetDictionary = function(w, P) {
|
|
12818
|
-
var
|
|
12819
|
-
return w && w.state ? (
|
|
12828
|
+
var T, v = P.length;
|
|
12829
|
+
return w && w.state ? (T = w.state).wrap !== 0 && T.mode !== 11 ? f : T.mode === 11 && r(1, P, v, 0) !== T.check ? -3 : k(w, P, v, v) ? (T.mode = 31, -4) : (T.havedict = 1, u) : f;
|
|
12820
12830
|
}, i.inflateInfo = "pako inflate (from Nodeca project)";
|
|
12821
12831
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(t, e, i) {
|
|
12822
12832
|
var n = t("../utils/common"), r = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], o = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], a = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], l = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
12823
12833
|
e.exports = function(h, d, u, f, E, p, I, m) {
|
|
12824
|
-
var C, R, g, y, F, S, L, N, x, k = m.bits, w = 0, P = 0,
|
|
12834
|
+
var C, R, g, y, F, S, L, N, x, k = m.bits, w = 0, P = 0, T = 0, v = 0, j = 0, V = 0, et = 0, H = 0, nt = 0, z = 0, U = null, ot = 0, st = new n.Buf16(16), tt = new n.Buf16(16), Rt = null, Ft = 0;
|
|
12825
12835
|
for (w = 0; w <= 15; w++)
|
|
12826
12836
|
st[w] = 0;
|
|
12827
12837
|
for (P = 0; P < f; P++)
|
|
12828
12838
|
st[d[u + P]]++;
|
|
12829
|
-
for (
|
|
12839
|
+
for (j = k, v = 15; 1 <= v && st[v] === 0; v--)
|
|
12830
12840
|
;
|
|
12831
|
-
if (v <
|
|
12841
|
+
if (v < j && (j = v), v === 0)
|
|
12832
12842
|
return E[p++] = 20971520, E[p++] = 20971520, m.bits = 1, 0;
|
|
12833
|
-
for (
|
|
12843
|
+
for (T = 1; T < v && st[T] === 0; T++)
|
|
12834
12844
|
;
|
|
12835
|
-
for (
|
|
12845
|
+
for (j < T && (j = T), w = H = 1; w <= 15; w++)
|
|
12836
12846
|
if (H <<= 1, (H -= st[w]) < 0)
|
|
12837
12847
|
return -1;
|
|
12838
12848
|
if (0 < H && (h === 0 || v !== 1))
|
|
@@ -12841,10 +12851,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12841
12851
|
tt[w + 1] = tt[w] + st[w];
|
|
12842
12852
|
for (P = 0; P < f; P++)
|
|
12843
12853
|
d[u + P] !== 0 && (I[tt[d[u + P]]++] = P);
|
|
12844
|
-
if (S = h === 0 ? (U = Rt = I, 19) : h === 1 ? (U = r, ot -= 257, Rt = o, Ft -= 257, 256) : (U = a, Rt = l, -1), w =
|
|
12854
|
+
if (S = h === 0 ? (U = Rt = I, 19) : h === 1 ? (U = r, ot -= 257, Rt = o, Ft -= 257, 256) : (U = a, Rt = l, -1), w = T, F = p, et = P = z = 0, g = -1, y = (nt = 1 << (V = j)) - 1, h === 1 && 852 < nt || h === 2 && 592 < nt)
|
|
12845
12855
|
return 1;
|
|
12846
12856
|
for (; ; ) {
|
|
12847
|
-
for (L = w - et, x = I[P] < S ? (N = 0, I[P]) : I[P] > S ? (N = Rt[Ft + I[P]], U[ot + I[P]]) : (N = 96, 0), C = 1 << w - et,
|
|
12857
|
+
for (L = w - et, x = I[P] < S ? (N = 0, I[P]) : I[P] > S ? (N = Rt[Ft + I[P]], U[ot + I[P]]) : (N = 96, 0), C = 1 << w - et, T = R = 1 << V; E[F + (z >> et) + (R -= C)] = L << 24 | N << 16 | x | 0, R !== 0; )
|
|
12848
12858
|
;
|
|
12849
12859
|
for (C = 1 << w - 1; z & C; )
|
|
12850
12860
|
C >>= 1;
|
|
@@ -12853,15 +12863,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12853
12863
|
break;
|
|
12854
12864
|
w = d[u + I[P]];
|
|
12855
12865
|
}
|
|
12856
|
-
if (
|
|
12857
|
-
for (et === 0 && (et =
|
|
12866
|
+
if (j < w && (z & y) !== g) {
|
|
12867
|
+
for (et === 0 && (et = j), F += T, H = 1 << (V = w - et); V + et < v && !((H -= st[V + et]) <= 0); )
|
|
12858
12868
|
V++, H <<= 1;
|
|
12859
12869
|
if (nt += 1 << V, h === 1 && 852 < nt || h === 2 && 592 < nt)
|
|
12860
12870
|
return 1;
|
|
12861
|
-
E[g = z & y] =
|
|
12871
|
+
E[g = z & y] = j << 24 | V << 16 | F - p | 0;
|
|
12862
12872
|
}
|
|
12863
12873
|
}
|
|
12864
|
-
return z !== 0 && (E[F + z] = w - et << 24 | 64 << 16 | 0), m.bits =
|
|
12874
|
+
return z !== 0 && (E[F + z] = w - et << 24 | 64 << 16 | 0), m.bits = j, 0;
|
|
12865
12875
|
};
|
|
12866
12876
|
}, { "../utils/common": 41 }], 51: [function(t, e, i) {
|
|
12867
12877
|
e.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
|
|
@@ -12877,11 +12887,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12877
12887
|
a(w);
|
|
12878
12888
|
var P = new Array(512);
|
|
12879
12889
|
a(P);
|
|
12880
|
-
var
|
|
12881
|
-
a(
|
|
12890
|
+
var T = new Array(256);
|
|
12891
|
+
a(T);
|
|
12882
12892
|
var v = new Array(h);
|
|
12883
12893
|
a(v);
|
|
12884
|
-
var
|
|
12894
|
+
var j, V, et, H = new Array(f);
|
|
12885
12895
|
function nt(O, D, Z, $, B) {
|
|
12886
12896
|
this.static_tree = O, this.extra_bits = D, this.extra_base = Z, this.elems = $, this.max_length = B, this.has_stree = O && O.length;
|
|
12887
12897
|
}
|
|
@@ -12939,7 +12949,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12939
12949
|
function Gt(O, D, Z) {
|
|
12940
12950
|
var $, B, K, it, J = 0;
|
|
12941
12951
|
if (O.last_lit !== 0)
|
|
12942
|
-
for (; $ = O.pending_buf[O.d_buf + 2 * J] << 8 | O.pending_buf[O.d_buf + 2 * J + 1], B = O.pending_buf[O.l_buf + J], J++, $ === 0 ? tt(O, B, D) : (tt(O, (K =
|
|
12952
|
+
for (; $ = O.pending_buf[O.d_buf + 2 * J] << 8 | O.pending_buf[O.d_buf + 2 * J + 1], B = O.pending_buf[O.l_buf + J], J++, $ === 0 ? tt(O, B, D) : (tt(O, (K = T[B]) + d + 1, D), (it = S[K]) !== 0 && st(O, B -= v[K], it), tt(O, K = U(--$), Z), (it = L[K]) !== 0 && st(O, $ -= H[K], it)), J < O.last_lit; )
|
|
12943
12953
|
;
|
|
12944
12954
|
tt(O, R, D);
|
|
12945
12955
|
}
|
|
@@ -12954,11 +12964,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12954
12964
|
for (B = ct; Z = O.heap[1], O.heap[1] = O.heap[O.heap_len--], It(O, K, 1), $ = O.heap[1], O.heap[--O.heap_max] = Z, O.heap[--O.heap_max] = $, K[2 * B] = K[2 * Z] + K[2 * $], O.depth[B] = (O.depth[Z] >= O.depth[$] ? O.depth[Z] : O.depth[$]) + 1, K[2 * Z + 1] = K[2 * $ + 1] = B, O.heap[1] = B++, It(O, K, 1), 2 <= O.heap_len; )
|
|
12955
12965
|
;
|
|
12956
12966
|
O.heap[--O.heap_max] = O.heap[1], function(pt, Ht) {
|
|
12957
|
-
var ss, ie, is, Ot, Ps,
|
|
12967
|
+
var ss, ie, is, Ot, Ps, Oi, ue = Ht.dyn_tree, Nn = Ht.max_code, Jr = Ht.stat_desc.static_tree, to = Ht.stat_desc.has_stree, eo = Ht.stat_desc.extra_bits, bn = Ht.stat_desc.extra_base, ns = Ht.stat_desc.max_length, Ls = 0;
|
|
12958
12968
|
for (Ot = 0; Ot <= I; Ot++)
|
|
12959
12969
|
pt.bl_count[Ot] = 0;
|
|
12960
12970
|
for (ue[2 * pt.heap[pt.heap_max] + 1] = 0, ss = pt.heap_max + 1; ss < p; ss++)
|
|
12961
|
-
ns < (Ot = ue[2 * ue[2 * (ie = pt.heap[ss]) + 1] + 1] + 1) && (Ot = ns, Ls++), ue[2 * ie + 1] = Ot, Nn < ie || (pt.bl_count[Ot]++, Ps = 0, bn <= ie && (Ps = eo[ie - bn]),
|
|
12971
|
+
ns < (Ot = ue[2 * ue[2 * (ie = pt.heap[ss]) + 1] + 1] + 1) && (Ot = ns, Ls++), ue[2 * ie + 1] = Ot, Nn < ie || (pt.bl_count[Ot]++, Ps = 0, bn <= ie && (Ps = eo[ie - bn]), Oi = ue[2 * ie], pt.opt_len += Oi * (Ot + Ps), to && (pt.static_len += Oi * (Jr[2 * ie + 1] + Ps)));
|
|
12962
12972
|
if (Ls !== 0) {
|
|
12963
12973
|
do {
|
|
12964
12974
|
for (Ot = ns - 1; pt.bl_count[Ot] === 0; )
|
|
@@ -13000,8 +13010,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13000
13010
|
var D, Z, $, B, K, it = new Array(I + 1);
|
|
13001
13011
|
for (B = $ = 0; B < h - 1; B++)
|
|
13002
13012
|
for (v[B] = $, D = 0; D < 1 << S[B]; D++)
|
|
13003
|
-
|
|
13004
|
-
for (
|
|
13013
|
+
T[$++] = B;
|
|
13014
|
+
for (T[$ - 1] = B, B = K = 0; B < 16; B++)
|
|
13005
13015
|
for (H[B] = K, D = 0; D < 1 << L[B]; D++)
|
|
13006
13016
|
P[K++] = B;
|
|
13007
13017
|
for (K >>= 7; B < f; B++)
|
|
@@ -13019,8 +13029,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13019
13029
|
k[2 * D + 1] = 8, D++, it[8]++;
|
|
13020
13030
|
for (Ft(k, u + 1, it), D = 0; D < f; D++)
|
|
13021
13031
|
w[2 * D + 1] = 5, w[2 * D] = Rt(D, 5);
|
|
13022
|
-
|
|
13023
|
-
}(), Y = !0), O.l_desc = new z(O.dyn_ltree,
|
|
13032
|
+
j = new nt(k, S, d + 1, u, I), V = new nt(w, L, 0, f, I), et = new nt(new Array(0), N, 0, E, C);
|
|
13033
|
+
}(), Y = !0), O.l_desc = new z(O.dyn_ltree, j), O.d_desc = new z(O.dyn_dtree, V), O.bl_desc = new z(O.bl_tree, et), O.bi_buf = 0, O.bi_valid = 0, at(O);
|
|
13024
13034
|
}, i._tr_stored_block = b, i._tr_flush_block = function(O, D, Z, $) {
|
|
13025
13035
|
var B, K, it = 0;
|
|
13026
13036
|
0 < O.level ? (O.strm.data_type === 2 && (O.strm.data_type = function(J) {
|
|
@@ -13046,7 +13056,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13046
13056
|
W(J, J.dyn_ltree, ct - 1), W(J, J.dyn_dtree, Ct - 1);
|
|
13047
13057
|
}(O, O.l_desc.max_code + 1, O.d_desc.max_code + 1, it + 1), Gt(O, O.dyn_ltree, O.dyn_dtree)), at(O), $ && ft(O);
|
|
13048
13058
|
}, i._tr_tally = function(O, D, Z) {
|
|
13049
|
-
return O.pending_buf[O.d_buf + 2 * O.last_lit] = D >>> 8 & 255, O.pending_buf[O.d_buf + 2 * O.last_lit + 1] = 255 & D, O.pending_buf[O.l_buf + O.last_lit] = 255 & Z, O.last_lit++, D === 0 ? O.dyn_ltree[2 * Z]++ : (O.matches++, D--, O.dyn_ltree[2 * (
|
|
13059
|
+
return O.pending_buf[O.d_buf + 2 * O.last_lit] = D >>> 8 & 255, O.pending_buf[O.d_buf + 2 * O.last_lit + 1] = 255 & D, O.pending_buf[O.l_buf + O.last_lit] = 255 & Z, O.last_lit++, D === 0 ? O.dyn_ltree[2 * Z]++ : (O.matches++, D--, O.dyn_ltree[2 * (T[Z] + d + 1)]++, O.dyn_dtree[2 * U(D)]++), O.last_lit === O.lit_bufsize - 1;
|
|
13050
13060
|
}, i._tr_align = function(O) {
|
|
13051
13061
|
st(O, 2, 3), tt(O, R, k), function(D) {
|
|
13052
13062
|
D.bi_valid === 16 ? (ot(D, D.bi_buf), D.bi_buf = 0, D.bi_valid = 0) : 8 <= D.bi_valid && (D.pending_buf[D.pending++] = 255 & D.bi_buf, D.bi_buf >>= 8, D.bi_valid -= 8);
|
|
@@ -13139,7 +13149,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13139
13149
|
})(Wr);
|
|
13140
13150
|
var hc = Wr.exports;
|
|
13141
13151
|
const Cr = /* @__PURE__ */ lc(hc);
|
|
13142
|
-
var Fn = {},
|
|
13152
|
+
var Fn = {}, Si = {};
|
|
13143
13153
|
(function(c) {
|
|
13144
13154
|
const s = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", t = s + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040", e = "[" + s + "][" + t + "]*", i = new RegExp("^" + e + "$"), n = function(o, a) {
|
|
13145
13155
|
const l = [];
|
|
@@ -13170,8 +13180,8 @@ var Fn = {}, Fi = {};
|
|
|
13170
13180
|
}, c.getValue = function(o) {
|
|
13171
13181
|
return c.isExist(o) ? o : "";
|
|
13172
13182
|
}, c.isName = r, c.getAllMatches = n, c.nameRegexp = e;
|
|
13173
|
-
})(
|
|
13174
|
-
const Sn =
|
|
13183
|
+
})(Si);
|
|
13184
|
+
const Sn = Si, dc = {
|
|
13175
13185
|
allowBooleanAttributes: !1,
|
|
13176
13186
|
//A tag can have attributes without any value
|
|
13177
13187
|
unpairedTags: []
|
|
@@ -13466,7 +13476,7 @@ class _c {
|
|
|
13466
13476
|
}
|
|
13467
13477
|
}
|
|
13468
13478
|
var Ac = _c;
|
|
13469
|
-
const Rc =
|
|
13479
|
+
const Rc = Si;
|
|
13470
13480
|
function yc(c, s) {
|
|
13471
13481
|
const t = {};
|
|
13472
13482
|
if (c[s + 3] === "O" && c[s + 4] === "C" && c[s + 5] === "T" && c[s + 6] === "Y" && c[s + 7] === "P" && c[s + 8] === "E") {
|
|
@@ -13574,7 +13584,7 @@ function Uc(c) {
|
|
|
13574
13584
|
return c && c.indexOf(".") !== -1 && (c = c.replace(/0+$/, ""), c === "." ? c = "0" : c[0] === "." ? c = "0" + c : c[c.length - 1] === "." && (c = c.substr(0, c.length - 1))), c;
|
|
13575
13585
|
}
|
|
13576
13586
|
var Bc = Dc;
|
|
13577
|
-
const Zr =
|
|
13587
|
+
const Zr = Si, Ts = Ac, zc = Lc, kc = Bc;
|
|
13578
13588
|
let Vc = class {
|
|
13579
13589
|
constructor(s) {
|
|
13580
13590
|
this.options = s, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
|
|
@@ -14176,15 +14186,15 @@ class En {
|
|
|
14176
14186
|
* @param text - The initial comment text.
|
|
14177
14187
|
*/
|
|
14178
14188
|
constructor(s, t) {
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14182
|
-
|
|
14183
|
-
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
|
|
14189
|
+
_(this, "date", /* @__PURE__ */ new Date());
|
|
14190
|
+
_(this, "author");
|
|
14191
|
+
_(this, "guid", me.create());
|
|
14192
|
+
_(this, "viewpoint");
|
|
14193
|
+
_(this, "modifiedAuthor");
|
|
14194
|
+
_(this, "modifiedDate");
|
|
14195
|
+
_(this, "topic");
|
|
14196
|
+
_(this, "_components");
|
|
14197
|
+
_(this, "_comment", "");
|
|
14188
14198
|
this._components = s, this._comment = t;
|
|
14189
14199
|
const e = this._components.get(Lt);
|
|
14190
14200
|
this.author = e.config.author;
|
|
@@ -14247,30 +14257,30 @@ const ce = class ce {
|
|
|
14247
14257
|
* @remarks
|
|
14248
14258
|
* The `guid` is automatically generated upon topic creation and by no means it should change.
|
|
14249
14259
|
*/
|
|
14250
|
-
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14260
|
+
_(this, "guid", me.create());
|
|
14261
|
+
_(this, "title", ce.default.title);
|
|
14262
|
+
_(this, "creationDate", /* @__PURE__ */ new Date());
|
|
14263
|
+
_(this, "creationAuthor", "");
|
|
14254
14264
|
// Store viewpoint guids instead of the actual Viewpoint to prevent a possible memory leak
|
|
14255
|
-
|
|
14265
|
+
_(this, "viewpoints", new qe());
|
|
14256
14266
|
// Store topic guids instead of the actual Topic to prevent a possible memory leak
|
|
14257
|
-
|
|
14267
|
+
_(this, "relatedTopics", new qe());
|
|
14258
14268
|
// There is no problem to store the comment it-self as it is not referenced anywhere else
|
|
14259
|
-
|
|
14260
|
-
|
|
14261
|
-
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14265
|
-
|
|
14266
|
-
|
|
14267
|
-
|
|
14268
|
-
|
|
14269
|
-
|
|
14270
|
-
|
|
14271
|
-
|
|
14272
|
-
|
|
14273
|
-
|
|
14269
|
+
_(this, "comments", new Ee());
|
|
14270
|
+
_(this, "customData", {});
|
|
14271
|
+
_(this, "description");
|
|
14272
|
+
_(this, "serverAssignedId");
|
|
14273
|
+
_(this, "dueDate");
|
|
14274
|
+
_(this, "modifiedAuthor");
|
|
14275
|
+
_(this, "modifiedDate");
|
|
14276
|
+
_(this, "index");
|
|
14277
|
+
_(this, "_type", ce.default.type);
|
|
14278
|
+
_(this, "_status", ce.default.status);
|
|
14279
|
+
_(this, "_priority", ce.default.priority);
|
|
14280
|
+
_(this, "_stage", ce.default.priority);
|
|
14281
|
+
_(this, "_assignedTo", ce.default.assignedTo);
|
|
14282
|
+
_(this, "_labels", ce.default.labels);
|
|
14283
|
+
_(this, "_components");
|
|
14274
14284
|
this._components = s;
|
|
14275
14285
|
const t = s.get(Lt);
|
|
14276
14286
|
this.creationAuthor = t.config.author, this.relatedTopics.guard = (e) => e !== this.guid;
|
|
@@ -14506,13 +14516,13 @@ ${t}
|
|
|
14506
14516
|
/**
|
|
14507
14517
|
* Default values for a BCF Topic, excluding `guid`, `creationDate`, and `creationAuthor`.
|
|
14508
14518
|
*/
|
|
14509
|
-
|
|
14519
|
+
_(ce, "default", {
|
|
14510
14520
|
title: "BCF Topic",
|
|
14511
14521
|
type: "Issue",
|
|
14512
14522
|
status: "Active",
|
|
14513
14523
|
labels: /* @__PURE__ */ new Set()
|
|
14514
14524
|
});
|
|
14515
|
-
let
|
|
14525
|
+
let di = ce;
|
|
14516
14526
|
const Fl = (c, s) => {
|
|
14517
14527
|
if (s.trim() === "")
|
|
14518
14528
|
return;
|
|
@@ -14543,8 +14553,8 @@ const Fl = (c, s) => {
|
|
|
14543
14553
|
}, Le = class Le extends St {
|
|
14544
14554
|
constructor() {
|
|
14545
14555
|
super(...arguments);
|
|
14546
|
-
|
|
14547
|
-
|
|
14556
|
+
_(this, "enabled", !1);
|
|
14557
|
+
_(this, "config", {
|
|
14548
14558
|
author: "jhon.doe@example.com",
|
|
14549
14559
|
version: "2.1",
|
|
14550
14560
|
types: /* @__PURE__ */ new Set([
|
|
@@ -14568,11 +14578,11 @@ const Fl = (c, s) => {
|
|
|
14568
14578
|
fallbackVersionOnImport: "2.1",
|
|
14569
14579
|
ignoreIncompleteTopicsOnImport: !1
|
|
14570
14580
|
});
|
|
14571
|
-
|
|
14572
|
-
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
|
|
14581
|
+
_(this, "list", new Ee());
|
|
14582
|
+
_(this, "onSetup", new Q());
|
|
14583
|
+
_(this, "isSetup", !1);
|
|
14584
|
+
_(this, "onBCFImported", new Q());
|
|
14585
|
+
_(this, "onDisposed", new Q());
|
|
14576
14586
|
}
|
|
14577
14587
|
setup(t) {
|
|
14578
14588
|
this.isSetup || (this.config = { ...this.config, ...t }, this.isSetup = !0, this.enabled = !0, this.onSetup.trigger());
|
|
@@ -14585,7 +14595,7 @@ const Fl = (c, s) => {
|
|
|
14585
14595
|
* @returns The newly created BCFTopic instance.
|
|
14586
14596
|
*/
|
|
14587
14597
|
create(t) {
|
|
14588
|
-
const e = new
|
|
14598
|
+
const e = new di(this.components);
|
|
14589
14599
|
return t && (e.guid = t.guid ?? e.guid, e.set(t)), this.list.set(e.guid, e), e;
|
|
14590
14600
|
}
|
|
14591
14601
|
/**
|
|
@@ -14834,29 +14844,29 @@ ${o}
|
|
|
14834
14844
|
PerspectiveCamera: k
|
|
14835
14845
|
} = y;
|
|
14836
14846
|
if (S && (F.guid = S), N) {
|
|
14837
|
-
const { Selection: P, Visibility:
|
|
14847
|
+
const { Selection: P, Visibility: T } = N;
|
|
14838
14848
|
if (P && P.Component) {
|
|
14839
|
-
const
|
|
14840
|
-
F.selectionComponents =
|
|
14849
|
+
const j = Array.isArray(P.Component) ? P.Component : [P.Component];
|
|
14850
|
+
F.selectionComponents = j.map((V) => V.IfcGuid).filter((V) => V);
|
|
14841
14851
|
}
|
|
14842
|
-
if (
|
|
14843
|
-
const { Component:
|
|
14852
|
+
if (T && "DefaultVisibility" in T && (F.defaultVisibility = T.DefaultVisibility), T && T.Exceptions && "Component" in T.Exceptions) {
|
|
14853
|
+
const { Component: j } = T.Exceptions, V = Array.isArray(j) ? j : [j];
|
|
14844
14854
|
F.exceptionComponents = V.map((et) => et.IfcGuid).filter((et) => et);
|
|
14845
14855
|
}
|
|
14846
14856
|
let v;
|
|
14847
14857
|
l === "2.1" && (v = N.ViewSetupHints), l === "3" && (v = (C = N.Visibility) == null ? void 0 : C.ViewSetupHints), v && ("OpeningsVisible" in v && (F.openingsVisible = v.OpeningsVisible), "SpacesVisible" in v && (F.spacesVisible = v.SpacesVisible), "SpaceBoundariesVisible" in v && (F.spaceBoundariesVisible = v.SpaceBoundariesVisible));
|
|
14848
14858
|
}
|
|
14849
14859
|
if (x || k) {
|
|
14850
|
-
const P = y.PerspectiveCamera ?? y.OrthogonalCamera, { CameraViewPoint:
|
|
14851
|
-
Number(
|
|
14852
|
-
Number(
|
|
14853
|
-
Number(-
|
|
14860
|
+
const P = y.PerspectiveCamera ?? y.OrthogonalCamera, { CameraViewPoint: T, CameraDirection: v } = P, j = new M.Vector3(
|
|
14861
|
+
Number(T.X),
|
|
14862
|
+
Number(T.Z),
|
|
14863
|
+
Number(-T.Y)
|
|
14854
14864
|
), V = new M.Vector3(
|
|
14855
14865
|
Number(v.X),
|
|
14856
14866
|
Number(v.Z),
|
|
14857
14867
|
Number(-v.Y)
|
|
14858
14868
|
), et = {
|
|
14859
|
-
position: { x:
|
|
14869
|
+
position: { x: j.x, y: j.y, z: j.z },
|
|
14860
14870
|
direction: { x: V.x, y: V.y, z: V.z },
|
|
14861
14871
|
aspectRatio: "AspectRatio" in P ? P.AspectRatio : 1
|
|
14862
14872
|
// Temporal simplification
|
|
@@ -14876,23 +14886,23 @@ ${o}
|
|
|
14876
14886
|
if (N) {
|
|
14877
14887
|
const { Coloring: P } = N;
|
|
14878
14888
|
if (P && P.Color) {
|
|
14879
|
-
const
|
|
14880
|
-
for (const v of
|
|
14881
|
-
const { Color:
|
|
14882
|
-
w.componentColors.set(
|
|
14889
|
+
const T = Array.isArray(P.Color) ? P.Color : [P.Color];
|
|
14890
|
+
for (const v of T) {
|
|
14891
|
+
const { Color: j, Component: V } = v, H = (Array.isArray(V) ? V : [V]).map((nt) => nt.IfcGuid);
|
|
14892
|
+
w.componentColors.set(j, H);
|
|
14883
14893
|
}
|
|
14884
14894
|
}
|
|
14885
14895
|
}
|
|
14886
14896
|
if (u.push(w), L) {
|
|
14887
|
-
const P = this.components.get(ln),
|
|
14888
|
-
for (const v of
|
|
14889
|
-
const { Location:
|
|
14890
|
-
if (!(
|
|
14897
|
+
const P = this.components.get(ln), T = Array.isArray(L.ClippingPlane) ? L.ClippingPlane : [L.ClippingPlane];
|
|
14898
|
+
for (const v of T) {
|
|
14899
|
+
const { Location: j, Direction: V } = v;
|
|
14900
|
+
if (!(j && V))
|
|
14891
14901
|
continue;
|
|
14892
14902
|
const et = new M.Vector3(
|
|
14893
|
-
|
|
14894
|
-
|
|
14895
|
-
-
|
|
14903
|
+
j.X,
|
|
14904
|
+
j.Z,
|
|
14905
|
+
-j.Y
|
|
14896
14906
|
), H = new M.Vector3(
|
|
14897
14907
|
V.X,
|
|
14898
14908
|
-V.Z,
|
|
@@ -14918,15 +14928,15 @@ ${o}
|
|
|
14918
14928
|
} = F;
|
|
14919
14929
|
if (n && !(S && L && N && x && k && w))
|
|
14920
14930
|
continue;
|
|
14921
|
-
const P = new
|
|
14931
|
+
const P = new di(this.components);
|
|
14922
14932
|
P.guid = S ?? P.guid;
|
|
14923
|
-
const
|
|
14924
|
-
p[P.guid] = new Set(
|
|
14933
|
+
const T = this.getMarkupRelatedTopics(y, l);
|
|
14934
|
+
p[P.guid] = new Set(T), P.type = L ?? P.type, P.status = N ?? P.status, P.title = x ?? P.title, P.creationDate = k ? new Date(k) : P.creationDate, P.creationAuthor = w ?? P.creationAuthor, P.serverAssignedId = F.ServerAssignedId, P.priority = F.Priority, P.index = F.Index, P.modifiedDate = F.ModifiedDate ? new Date(F.ModifiedDate) : void 0, P.modifiedAuthor = F.ModifiedAuthor, P.dueDate = F.DueDate ? new Date(F.DueDate) : void 0, P.assignedTo = F.AssignedTo, P.description = F.Description, P.stage = F.Stage;
|
|
14925
14935
|
const v = this.getMarkupLabels(y, l);
|
|
14926
14936
|
for (const et of v)
|
|
14927
14937
|
P.labels.add(et);
|
|
14928
|
-
const
|
|
14929
|
-
for (const et of
|
|
14938
|
+
const j = this.getMarkupComments(y, l);
|
|
14939
|
+
for (const et of j)
|
|
14930
14940
|
P.comments.set(et.guid, et);
|
|
14931
14941
|
const V = this.getMarkupViewpoints(y, l);
|
|
14932
14942
|
for (const et of V) {
|
|
@@ -14948,7 +14958,7 @@ ${o}
|
|
|
14948
14958
|
return this.onBCFImported.trigger(I), { viewpoints: u, topics: I };
|
|
14949
14959
|
}
|
|
14950
14960
|
};
|
|
14951
|
-
|
|
14961
|
+
_(Le, "uuid", "de977976-e4f6-4e4f-a01a-204727839802"), _(Le, "xmlParser", new wl.XMLParser({
|
|
14952
14962
|
allowBooleanAttributes: !0,
|
|
14953
14963
|
attributeNamePrefix: "",
|
|
14954
14964
|
ignoreAttributes: !1,
|
|
@@ -14966,12 +14976,12 @@ const Jt = class Jt extends St {
|
|
|
14966
14976
|
constructor(t) {
|
|
14967
14977
|
super(t);
|
|
14968
14978
|
/** {@link Component.enabled} */
|
|
14969
|
-
|
|
14979
|
+
_(this, "enabled", !0);
|
|
14970
14980
|
/** {@link Disposable.onDisposed} */
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14981
|
+
_(this, "onDisposed", new Q());
|
|
14982
|
+
_(this, "_absoluteMin");
|
|
14983
|
+
_(this, "_absoluteMax");
|
|
14984
|
+
_(this, "_meshes", []);
|
|
14975
14985
|
this.components.add(Jt.uuid, this), this._absoluteMin = Jt.newBound(!0), this._absoluteMax = Jt.newBound(!1);
|
|
14976
14986
|
}
|
|
14977
14987
|
/**
|
|
@@ -15044,7 +15054,7 @@ const Jt = class Jt extends St {
|
|
|
15044
15054
|
}
|
|
15045
15055
|
/** {@link Disposable.dispose} */
|
|
15046
15056
|
dispose() {
|
|
15047
|
-
const t = this.components.get(
|
|
15057
|
+
const t = this.components.get(Fe);
|
|
15048
15058
|
for (const e of this._meshes)
|
|
15049
15059
|
t.destroy(e);
|
|
15050
15060
|
this._meshes = [], this.onDisposed.trigger(Jt.uuid), this.onDisposed.reset();
|
|
@@ -15174,7 +15184,7 @@ const Jt = class Jt extends St {
|
|
|
15174
15184
|
const i = Jt.getFragmentBounds(t);
|
|
15175
15185
|
t.updateMatrixWorld();
|
|
15176
15186
|
const n = t.matrixWorld, r = new M.Matrix4(), o = t instanceof M.InstancedMesh, a = /* @__PURE__ */ new Set();
|
|
15177
|
-
if (t instanceof
|
|
15187
|
+
if (t instanceof ye.FragmentMesh) {
|
|
15178
15188
|
e || (e = t.fragment.ids);
|
|
15179
15189
|
for (const l of e) {
|
|
15180
15190
|
const h = t.fragment.getInstancesIDs(l);
|
|
@@ -15237,21 +15247,21 @@ const Jt = class Jt extends St {
|
|
|
15237
15247
|
return new M.Box3(r, o);
|
|
15238
15248
|
}
|
|
15239
15249
|
};
|
|
15240
|
-
|
|
15250
|
+
_(Jt, "uuid", "d1444724-dba6-4cdd-a0c7-68ee1450d166");
|
|
15241
15251
|
let mn = Jt;
|
|
15242
|
-
const
|
|
15252
|
+
const gi = class gi extends St {
|
|
15243
15253
|
constructor(t) {
|
|
15244
15254
|
super(t);
|
|
15245
15255
|
/** {@link Component.enabled} */
|
|
15246
|
-
|
|
15256
|
+
_(this, "enabled", !0);
|
|
15247
15257
|
/**
|
|
15248
15258
|
* A map representing the classification systems.
|
|
15249
15259
|
* The key is the system name, and the value is an object representing the classes within the system.
|
|
15250
15260
|
*/
|
|
15251
|
-
|
|
15261
|
+
_(this, "list", {});
|
|
15252
15262
|
/** {@link Disposable.onDisposed} */
|
|
15253
|
-
|
|
15254
|
-
|
|
15263
|
+
_(this, "onDisposed", new Q());
|
|
15264
|
+
_(this, "onFragmentsDisposed", (t) => {
|
|
15255
15265
|
const { groupID: e, fragmentIDs: i } = t;
|
|
15256
15266
|
for (const n in this.list) {
|
|
15257
15267
|
const r = this.list[n], o = Object.keys(r);
|
|
@@ -15266,7 +15276,7 @@ const Ii = class Ii extends St {
|
|
|
15266
15276
|
}
|
|
15267
15277
|
}
|
|
15268
15278
|
});
|
|
15269
|
-
t.add(
|
|
15279
|
+
t.add(gi.uuid, this), t.get(_t).onFragmentsDisposed.add(this.onFragmentsDisposed);
|
|
15270
15280
|
}
|
|
15271
15281
|
/** {@link Disposable.dispose} */
|
|
15272
15282
|
dispose() {
|
|
@@ -15594,33 +15604,33 @@ const Ii = class Ii extends St {
|
|
|
15594
15604
|
* A unique identifier for the component.
|
|
15595
15605
|
* This UUID is used to register the component within the Components system.
|
|
15596
15606
|
*/
|
|
15597
|
-
|
|
15598
|
-
let bs =
|
|
15599
|
-
const
|
|
15607
|
+
_(gi, "uuid", "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");
|
|
15608
|
+
let bs = gi;
|
|
15609
|
+
const Ci = class Ci extends St {
|
|
15600
15610
|
constructor(t) {
|
|
15601
15611
|
super(t);
|
|
15602
15612
|
/** {@link Disposable.onDisposed} */
|
|
15603
|
-
|
|
15613
|
+
_(this, "onDisposed", new Q());
|
|
15604
15614
|
/** {@link Component.enabled} */
|
|
15605
|
-
|
|
15615
|
+
_(this, "enabled", !0);
|
|
15606
15616
|
/**
|
|
15607
15617
|
* The height of the explosion animation.
|
|
15608
15618
|
* This property determines the vertical distance by which fragments are moved during the explosion.
|
|
15609
15619
|
* Default value is 10.
|
|
15610
15620
|
*/
|
|
15611
|
-
|
|
15621
|
+
_(this, "height", 10);
|
|
15612
15622
|
/**
|
|
15613
15623
|
* The group name used for the explosion animation.
|
|
15614
15624
|
* This property specifies the group of fragments that will be affected by the explosion.
|
|
15615
15625
|
* Default value is "storeys".
|
|
15616
15626
|
*/
|
|
15617
|
-
|
|
15627
|
+
_(this, "groupName", "spatialStructures");
|
|
15618
15628
|
/**
|
|
15619
15629
|
* A set of strings representing the exploded items.
|
|
15620
15630
|
* This set is used to keep track of which items have been exploded.
|
|
15621
15631
|
*/
|
|
15622
|
-
|
|
15623
|
-
t.add(
|
|
15632
|
+
_(this, "list", /* @__PURE__ */ new Set());
|
|
15633
|
+
t.add(Ci.uuid, this);
|
|
15624
15634
|
}
|
|
15625
15635
|
/** {@link Disposable.dispose} */
|
|
15626
15636
|
dispose() {
|
|
@@ -15664,14 +15674,14 @@ const gi = class gi extends St {
|
|
|
15664
15674
|
* A unique identifier for the component.
|
|
15665
15675
|
* This UUID is used to register the component within the Components system.
|
|
15666
15676
|
*/
|
|
15667
|
-
|
|
15668
|
-
let wr =
|
|
15669
|
-
const
|
|
15677
|
+
_(Ci, "uuid", "d260618b-ce88-4c7d-826c-6debb91de3e2");
|
|
15678
|
+
let wr = Ci;
|
|
15679
|
+
const Ti = class Ti extends St {
|
|
15670
15680
|
constructor(t) {
|
|
15671
15681
|
super(t);
|
|
15672
15682
|
/** {@link Component.enabled} */
|
|
15673
|
-
|
|
15674
|
-
this.components.add(
|
|
15683
|
+
_(this, "enabled", !0);
|
|
15684
|
+
this.components.add(Ti.uuid, this);
|
|
15675
15685
|
}
|
|
15676
15686
|
/**
|
|
15677
15687
|
* Sets the visibility of fragments within the 3D scene.
|
|
@@ -15720,8 +15730,8 @@ const Ci = class Ci extends St {
|
|
|
15720
15730
|
* A unique identifier for the component.
|
|
15721
15731
|
* This UUID is used to register the component within the Components system.
|
|
15722
15732
|
*/
|
|
15723
|
-
|
|
15724
|
-
let In =
|
|
15733
|
+
_(Ti, "uuid", "dd9ccf2d-8a21-4821-b7f6-2949add16a29");
|
|
15734
|
+
let In = Ti;
|
|
15725
15735
|
class Sl extends wn {
|
|
15726
15736
|
constructor() {
|
|
15727
15737
|
super(...arguments);
|
|
@@ -15729,60 +15739,60 @@ class Sl extends wn {
|
|
|
15729
15739
|
* Minimum number of geometries to be streamed.
|
|
15730
15740
|
* Defaults to 10 geometries.
|
|
15731
15741
|
*/
|
|
15732
|
-
|
|
15742
|
+
_(this, "minGeometrySize", 10);
|
|
15733
15743
|
/**
|
|
15734
15744
|
* Minimum amount of assets to be streamed.
|
|
15735
15745
|
* Defaults to 1000 assets.
|
|
15736
15746
|
*/
|
|
15737
|
-
|
|
15747
|
+
_(this, "minAssetsSize", 1e3);
|
|
15738
15748
|
}
|
|
15739
15749
|
}
|
|
15740
|
-
const
|
|
15750
|
+
const _i = class _i extends St {
|
|
15741
15751
|
constructor(t) {
|
|
15742
15752
|
super(t);
|
|
15743
15753
|
/**
|
|
15744
15754
|
* Event triggered when geometry is streamed.
|
|
15745
15755
|
* Contains the streamed geometry data and its buffer.
|
|
15746
15756
|
*/
|
|
15747
|
-
|
|
15757
|
+
_(this, "onGeometryStreamed", new Q());
|
|
15748
15758
|
/**
|
|
15749
15759
|
* Event triggered when assets are streamed.
|
|
15750
15760
|
* Contains the streamed assets.
|
|
15751
15761
|
*/
|
|
15752
|
-
|
|
15762
|
+
_(this, "onAssetStreamed", new Q());
|
|
15753
15763
|
/**
|
|
15754
15764
|
* Event triggered to indicate the progress of the streaming process.
|
|
15755
15765
|
* Contains the progress percentage.
|
|
15756
15766
|
*/
|
|
15757
|
-
|
|
15767
|
+
_(this, "onProgress", new Q());
|
|
15758
15768
|
/**
|
|
15759
15769
|
* Event triggered when the IFC file is loaded.
|
|
15760
15770
|
* Contains the loaded IFC file data.
|
|
15761
15771
|
*/
|
|
15762
|
-
|
|
15772
|
+
_(this, "onIfcLoaded", new Q());
|
|
15763
15773
|
/** {@link Disposable.onDisposed} */
|
|
15764
|
-
|
|
15774
|
+
_(this, "onDisposed", new Q());
|
|
15765
15775
|
/**
|
|
15766
15776
|
* Settings for the IfcGeometryTiler.
|
|
15767
15777
|
*/
|
|
15768
|
-
|
|
15778
|
+
_(this, "settings", new Sl());
|
|
15769
15779
|
/** {@link Component.enabled} */
|
|
15770
|
-
|
|
15780
|
+
_(this, "enabled", !0);
|
|
15771
15781
|
/**
|
|
15772
15782
|
* The WebIFC API instance used for IFC file processing.
|
|
15773
15783
|
*/
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
|
|
15782
|
-
|
|
15783
|
-
|
|
15784
|
-
|
|
15785
|
-
this.components.add(
|
|
15784
|
+
_(this, "webIfc", new X.IfcAPI());
|
|
15785
|
+
_(this, "_spatialTree", new kr());
|
|
15786
|
+
_(this, "_metaData", new Yr());
|
|
15787
|
+
_(this, "_visitedGeometries", /* @__PURE__ */ new Map());
|
|
15788
|
+
_(this, "_streamSerializer", new ye.StreamSerializer());
|
|
15789
|
+
_(this, "_geometries", /* @__PURE__ */ new Map());
|
|
15790
|
+
_(this, "_geometryCount", 0);
|
|
15791
|
+
_(this, "_civil", new Vr());
|
|
15792
|
+
_(this, "_groupSerializer", new ye.Serializer());
|
|
15793
|
+
_(this, "_assets", []);
|
|
15794
|
+
_(this, "_meshesWithHoles", /* @__PURE__ */ new Set());
|
|
15795
|
+
this.components.add(_i.uuid, this), this.settings.excludedCategories.add(X.IFCOPENINGELEMENT);
|
|
15786
15796
|
}
|
|
15787
15797
|
/** {@link Disposable.dispose} */
|
|
15788
15798
|
dispose() {
|
|
@@ -15832,7 +15842,7 @@ const Ti = class Ti extends St {
|
|
|
15832
15842
|
async streamAllGeometries() {
|
|
15833
15843
|
const { minGeometrySize: t, minAssetsSize: e } = this.settings;
|
|
15834
15844
|
this._spatialTree.setUp(this.webIfc);
|
|
15835
|
-
const i = this.webIfc.GetIfcEntityList(0), n = [[]], r = new
|
|
15845
|
+
const i = this.webIfc.GetIfcEntityList(0), n = [[]], r = new ye.FragmentsGroup();
|
|
15836
15846
|
r.ifcMetadata = {
|
|
15837
15847
|
name: "",
|
|
15838
15848
|
description: "",
|
|
@@ -15947,8 +15957,8 @@ const Ti = class Ti extends St {
|
|
|
15947
15957
|
* A unique identifier for the component.
|
|
15948
15958
|
* This UUID is used to register the component within the Components system.
|
|
15949
15959
|
*/
|
|
15950
|
-
|
|
15951
|
-
let Fr =
|
|
15960
|
+
_(_i, "uuid", "d9999a00-e1f5-4d3f-8cfe-c56e08609764");
|
|
15961
|
+
let Fr = _i;
|
|
15952
15962
|
class Ol extends wn {
|
|
15953
15963
|
constructor() {
|
|
15954
15964
|
super(...arguments);
|
|
@@ -15956,7 +15966,7 @@ class Ol extends wn {
|
|
|
15956
15966
|
* Amount of properties to be streamed.
|
|
15957
15967
|
* Defaults to 100 properties.
|
|
15958
15968
|
*/
|
|
15959
|
-
|
|
15969
|
+
_(this, "propertiesSize", 100);
|
|
15960
15970
|
}
|
|
15961
15971
|
}
|
|
15962
15972
|
class Nl extends St {
|
|
@@ -15966,29 +15976,29 @@ class Nl extends St {
|
|
|
15966
15976
|
* An event that is triggered when properties are streamed from the IFC file.
|
|
15967
15977
|
* The event provides the type of the IFC entity and the corresponding data.
|
|
15968
15978
|
*/
|
|
15969
|
-
|
|
15979
|
+
_(this, "onPropertiesStreamed", new oi());
|
|
15970
15980
|
/**
|
|
15971
15981
|
* An event that is triggered to indicate the progress of the streaming process.
|
|
15972
15982
|
* The event provides a number between 0 and 1 representing the progress percentage.
|
|
15973
15983
|
*/
|
|
15974
|
-
|
|
15984
|
+
_(this, "onProgress", new oi());
|
|
15975
15985
|
/**
|
|
15976
15986
|
* An event that is triggered when indices are streamed from the IFC file.
|
|
15977
15987
|
* The event provides a map of indices, where the key is the entity type and the value is another map of indices.
|
|
15978
15988
|
*/
|
|
15979
|
-
|
|
15989
|
+
_(this, "onIndicesStreamed", new oi());
|
|
15980
15990
|
/** {@link Disposable.onDisposed} */
|
|
15981
|
-
|
|
15991
|
+
_(this, "onDisposed", new Q());
|
|
15982
15992
|
/** {@link Component.enabled} */
|
|
15983
|
-
|
|
15993
|
+
_(this, "enabled", !0);
|
|
15984
15994
|
/**
|
|
15985
15995
|
* An instance of the PropertiesStreamingSettings class, which holds the settings for the streaming process.
|
|
15986
15996
|
*/
|
|
15987
|
-
|
|
15997
|
+
_(this, "settings", new Ol());
|
|
15988
15998
|
/**
|
|
15989
15999
|
* An instance of the IfcAPI class from the Web-IFC library, which provides methods for reading and processing IFC data.
|
|
15990
16000
|
*/
|
|
15991
|
-
|
|
16001
|
+
_(this, "webIfc", new X.IfcAPI());
|
|
15992
16002
|
}
|
|
15993
16003
|
/** {@link Disposable.dispose} */
|
|
15994
16004
|
async dispose() {
|
|
@@ -16077,18 +16087,19 @@ class Nl extends St {
|
|
|
16077
16087
|
* A unique identifier for the component.
|
|
16078
16088
|
* This UUID is used to register the component within the Components system.
|
|
16079
16089
|
*/
|
|
16080
|
-
|
|
16090
|
+
_(Nl, "uuid", "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");
|
|
16081
16091
|
class Kr {
|
|
16082
16092
|
constructor(s, t, e) {
|
|
16083
|
-
|
|
16084
|
-
|
|
16093
|
+
_(this, "title");
|
|
16094
|
+
_(this, "guid", me.create());
|
|
16085
16095
|
/**
|
|
16086
16096
|
* ClippingPlanes can be used to define a subsection of a building model that is related to the topic.
|
|
16087
16097
|
* Each clipping plane is defined by Location and Direction.
|
|
16088
16098
|
* The Direction vector points in the invisible direction meaning the half-space that is clipped.
|
|
16099
|
+
* @experimental
|
|
16089
16100
|
*/
|
|
16090
|
-
|
|
16091
|
-
|
|
16101
|
+
_(this, "clippingPlanes", new qe());
|
|
16102
|
+
_(this, "camera", {
|
|
16092
16103
|
aspectRatio: 0,
|
|
16093
16104
|
fov: 0,
|
|
16094
16105
|
direction: { x: 0, y: 0, z: 80 },
|
|
@@ -16097,44 +16108,44 @@ class Kr {
|
|
|
16097
16108
|
/**
|
|
16098
16109
|
* A list of components GUIDs to hide when defaultVisibility = true or to show when defaultVisibility = false
|
|
16099
16110
|
*/
|
|
16100
|
-
|
|
16111
|
+
_(this, "exceptionComponents", new qe());
|
|
16101
16112
|
/**
|
|
16102
16113
|
* A list of components GUIDs that should be selected (highlighted) when displaying a viewpoint.
|
|
16103
16114
|
*/
|
|
16104
|
-
|
|
16115
|
+
_(this, "selectionComponents", new qe());
|
|
16105
16116
|
/**
|
|
16106
16117
|
* A map of colors and components GUIDs that should be colorized when displaying a viewpoint.
|
|
16107
16118
|
* For this to work, call viewpoint.colorize()
|
|
16108
16119
|
*/
|
|
16109
|
-
|
|
16120
|
+
_(this, "componentColors", new Ee());
|
|
16110
16121
|
/**
|
|
16111
16122
|
* Boolean flags to allow fine control over the visibility of spaces.
|
|
16112
16123
|
* A typical use of these flags is when DefaultVisibility=true but spaces should remain hidden.
|
|
16113
16124
|
* @default false
|
|
16114
16125
|
*/
|
|
16115
|
-
|
|
16126
|
+
_(this, "spacesVisible", !1);
|
|
16116
16127
|
/**
|
|
16117
16128
|
* Boolean flags to allow fine control over the visibility of space boundaries.
|
|
16118
16129
|
* A typical use of these flags is when DefaultVisibility=true but space boundaries should remain hidden.
|
|
16119
16130
|
* @default false
|
|
16120
16131
|
*/
|
|
16121
|
-
|
|
16132
|
+
_(this, "spaceBoundariesVisible", !1);
|
|
16122
16133
|
/**
|
|
16123
16134
|
* Boolean flags to allow fine control over the visibility of openings.
|
|
16124
16135
|
* A typical use of these flags is when DefaultVisibility=true but openings should remain hidden.
|
|
16125
16136
|
* @default false
|
|
16126
16137
|
*/
|
|
16127
|
-
|
|
16138
|
+
_(this, "openingsVisible", !1);
|
|
16128
16139
|
/**
|
|
16129
16140
|
* When true, all components should be visible unless listed in the exceptions
|
|
16130
16141
|
* When false all components should be invisible unless listed in the exceptions
|
|
16131
16142
|
*/
|
|
16132
|
-
|
|
16133
|
-
|
|
16143
|
+
_(this, "defaultVisibility", !0);
|
|
16144
|
+
_(this, "_components");
|
|
16134
16145
|
/**
|
|
16135
16146
|
* Represents the world in which the viewpoints are created and managed.
|
|
16136
16147
|
*/
|
|
16137
|
-
|
|
16148
|
+
_(this, "world");
|
|
16138
16149
|
const i = { setCamera: !0, ...e }, { data: n, setCamera: r } = i;
|
|
16139
16150
|
this._components = s, this.world = t, n && (this.guid = n.guid ?? this.guid, this.set(n)), r && this.updateCamera();
|
|
16140
16151
|
}
|
|
@@ -16234,31 +16245,16 @@ class Kr {
|
|
|
16234
16245
|
* Adds components to the viewpoint based on the provided fragment ID map.
|
|
16235
16246
|
*
|
|
16236
16247
|
* @param fragmentIdMap - A map containing fragment IDs as keys and arrays of express IDs as values.
|
|
16237
|
-
*
|
|
16238
|
-
* @returns A Promise that resolves when the components have been added to the viewpoint.
|
|
16239
16248
|
*/
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
|
|
16243
|
-
for (const n in s) {
|
|
16244
|
-
const r = t.list.get(n);
|
|
16245
|
-
if (!(r && r.group))
|
|
16246
|
-
continue;
|
|
16247
|
-
const o = r.group, a = s[n];
|
|
16248
|
-
for (const l of a) {
|
|
16249
|
-
const h = await o.getProperties(l);
|
|
16250
|
-
if (!h)
|
|
16251
|
-
continue;
|
|
16252
|
-
const d = (i = h.GlobalId) == null ? void 0 : i.value;
|
|
16253
|
-
d && this.selectionComponents.add(d);
|
|
16254
|
-
}
|
|
16255
|
-
}
|
|
16256
|
-
this._components.get(te).list.set(this.guid, this);
|
|
16249
|
+
addComponentsFromMap(s) {
|
|
16250
|
+
const e = this._components.get(_t).fragmentIdMapToGuids(s);
|
|
16251
|
+
this.selectionComponents.add(...e), this._components.get(te).list.set(this.guid, this);
|
|
16257
16252
|
}
|
|
16258
16253
|
/**
|
|
16259
|
-
*
|
|
16254
|
+
* Replace the properties of the viewpoint with the provided data.
|
|
16260
16255
|
*
|
|
16261
16256
|
* @remarks The guid will be ommited as it shouldn't change after it has been initially set.
|
|
16257
|
+
* @remarks The existing selection and exception components will be fully replaced in case new ones are provided.
|
|
16262
16258
|
*
|
|
16263
16259
|
* @param data - An object containing the properties to be set.
|
|
16264
16260
|
* The properties not included in the object will remain unchanged.
|
|
@@ -16271,6 +16267,14 @@ class Kr {
|
|
|
16271
16267
|
if (n === "guid")
|
|
16272
16268
|
continue;
|
|
16273
16269
|
const r = t[n];
|
|
16270
|
+
if (n === "selectionComponents") {
|
|
16271
|
+
this.selectionComponents.clear(), this.selectionComponents.add(...r);
|
|
16272
|
+
continue;
|
|
16273
|
+
}
|
|
16274
|
+
if (n === "exceptionComponents") {
|
|
16275
|
+
this.exceptionComponents.clear(), this.exceptionComponents.add(...r);
|
|
16276
|
+
continue;
|
|
16277
|
+
}
|
|
16274
16278
|
n in this && (e[n] = r);
|
|
16275
16279
|
}
|
|
16276
16280
|
return this._components.get(te).list.set(this.guid, this), this;
|
|
@@ -16483,20 +16487,21 @@ class Kr {
|
|
|
16483
16487
|
</VisualizationInfo>`;
|
|
16484
16488
|
}
|
|
16485
16489
|
}
|
|
16486
|
-
const
|
|
16490
|
+
const Ai = class Ai extends St {
|
|
16487
16491
|
constructor(t) {
|
|
16488
16492
|
super(t);
|
|
16489
|
-
|
|
16493
|
+
_(this, "enabled", !0);
|
|
16490
16494
|
/**
|
|
16491
16495
|
* A DataMap that stores Viewpoint instances, indexed by their unique identifiers (guid).
|
|
16492
16496
|
* This map is used to manage and retrieve Viewpoint instances within the Viewpoints component.
|
|
16493
16497
|
*/
|
|
16494
|
-
|
|
16495
|
-
|
|
16496
|
-
|
|
16497
|
-
|
|
16498
|
-
|
|
16499
|
-
|
|
16498
|
+
_(this, "list", new Ee());
|
|
16499
|
+
_(this, "isSetup", !1);
|
|
16500
|
+
_(this, "onSetup", new Q());
|
|
16501
|
+
_(this, "config", { overwriteColors: !1 });
|
|
16502
|
+
/** {@link Disposable.onDisposed} */
|
|
16503
|
+
_(this, "onDisposed", new Q());
|
|
16504
|
+
t.add(Ai.uuid, this);
|
|
16500
16505
|
}
|
|
16501
16506
|
/**
|
|
16502
16507
|
* Creates a new Viewpoint instance and adds it to the list.
|
|
@@ -16523,58 +16528,58 @@ const _i = class _i extends St {
|
|
|
16523
16528
|
this.list.dispose(), this.onDisposed.trigger(), this.onDisposed.reset();
|
|
16524
16529
|
}
|
|
16525
16530
|
};
|
|
16526
|
-
|
|
16527
|
-
let te =
|
|
16531
|
+
_(Ai, "uuid", "ee867824-a796-408d-8aa0-4e5962a83c66");
|
|
16532
|
+
let te = Ai;
|
|
16528
16533
|
class bl {
|
|
16529
16534
|
constructor(s) {
|
|
16530
16535
|
/** {@link Disposable.onDisposed} */
|
|
16531
|
-
|
|
16536
|
+
_(this, "onDisposed", new Q());
|
|
16532
16537
|
/** {@link Updateable.onAfterUpdate} */
|
|
16533
|
-
|
|
16538
|
+
_(this, "onAfterUpdate", new Q());
|
|
16534
16539
|
/** {@link Updateable.onBeforeUpdate} */
|
|
16535
|
-
|
|
16540
|
+
_(this, "onBeforeUpdate", new Q());
|
|
16536
16541
|
/** {@link Resizeable.onResize} */
|
|
16537
|
-
|
|
16542
|
+
_(this, "onResize", new Q());
|
|
16538
16543
|
/**
|
|
16539
16544
|
* The front offset of the minimap.
|
|
16540
16545
|
* It determines how much the minimap's view is offset from the camera's view.
|
|
16541
16546
|
* By pushing the map to the front, what the user sees on screen corresponds with what they see on the map
|
|
16542
16547
|
*/
|
|
16543
|
-
|
|
16548
|
+
_(this, "frontOffset", 0);
|
|
16544
16549
|
/**
|
|
16545
16550
|
* The override material for the minimap.
|
|
16546
16551
|
* It is used to render the depth information of the world onto the minimap.
|
|
16547
16552
|
*/
|
|
16548
|
-
|
|
16553
|
+
_(this, "overrideMaterial", new M.MeshDepthMaterial());
|
|
16549
16554
|
/**
|
|
16550
16555
|
* The background color of the minimap.
|
|
16551
16556
|
* It is used to set the background color of the minimap's renderer.
|
|
16552
16557
|
*/
|
|
16553
|
-
|
|
16558
|
+
_(this, "backgroundColor", new M.Color(395274));
|
|
16554
16559
|
/**
|
|
16555
16560
|
* The WebGL renderer for the minimap.
|
|
16556
16561
|
* It is used to render the minimap onto the screen.
|
|
16557
16562
|
*/
|
|
16558
|
-
|
|
16563
|
+
_(this, "renderer");
|
|
16559
16564
|
/**
|
|
16560
16565
|
* A flag indicating whether the minimap is enabled.
|
|
16561
16566
|
* If disabled, the minimap will not update or render.
|
|
16562
16567
|
*/
|
|
16563
|
-
|
|
16568
|
+
_(this, "enabled", !0);
|
|
16564
16569
|
/**
|
|
16565
16570
|
* The world in which the minimap is displayed.
|
|
16566
16571
|
* It provides access to the 3D scene, camera, and other relevant world elements.
|
|
16567
16572
|
*/
|
|
16568
|
-
|
|
16569
|
-
|
|
16570
|
-
|
|
16571
|
-
|
|
16572
|
-
|
|
16573
|
-
|
|
16574
|
-
|
|
16575
|
-
|
|
16576
|
-
|
|
16577
|
-
|
|
16573
|
+
_(this, "world");
|
|
16574
|
+
_(this, "_lockRotation", !0);
|
|
16575
|
+
_(this, "_camera");
|
|
16576
|
+
_(this, "_plane");
|
|
16577
|
+
_(this, "_size", new M.Vector2(320, 160));
|
|
16578
|
+
_(this, "_tempVector1", new M.Vector3());
|
|
16579
|
+
_(this, "_tempVector2", new M.Vector3());
|
|
16580
|
+
_(this, "_tempTarget", new M.Vector3());
|
|
16581
|
+
_(this, "down", new M.Vector3(0, -1, 0));
|
|
16582
|
+
_(this, "updatePlanes", () => {
|
|
16578
16583
|
if (!this.world.renderer)
|
|
16579
16584
|
throw new Error("The given world must have a renderer!");
|
|
16580
16585
|
const s = [], t = this.world.renderer.three;
|
|
@@ -16666,22 +16671,22 @@ class bl {
|
|
|
16666
16671
|
this._camera.left = e * t / -2, this._camera.right = e * t / 2, this._camera.top = e / 2, this._camera.bottom = -e / 2, this._camera.updateProjectionMatrix(), this.onResize.trigger(s);
|
|
16667
16672
|
}
|
|
16668
16673
|
}
|
|
16669
|
-
const
|
|
16674
|
+
const Ri = class Ri extends St {
|
|
16670
16675
|
constructor(t) {
|
|
16671
16676
|
super(t);
|
|
16672
16677
|
/** {@link Updateable.onAfterUpdate} */
|
|
16673
|
-
|
|
16678
|
+
_(this, "onAfterUpdate", new Q());
|
|
16674
16679
|
/** {@link Updateable.onBeforeUpdate} */
|
|
16675
|
-
|
|
16680
|
+
_(this, "onBeforeUpdate", new Q());
|
|
16676
16681
|
/** {@link Disposable.onDisposed} */
|
|
16677
|
-
|
|
16682
|
+
_(this, "onDisposed", new Q());
|
|
16678
16683
|
/** {@link Component.enabled} */
|
|
16679
|
-
|
|
16684
|
+
_(this, "enabled", !0);
|
|
16680
16685
|
/**
|
|
16681
16686
|
* A collection of {@link MiniMap} instances, each associated with a unique world ID.
|
|
16682
16687
|
*/
|
|
16683
|
-
|
|
16684
|
-
this.components.add(
|
|
16688
|
+
_(this, "list", /* @__PURE__ */ new Map());
|
|
16689
|
+
this.components.add(Ri.uuid, this);
|
|
16685
16690
|
}
|
|
16686
16691
|
/**
|
|
16687
16692
|
* Creates a new {@link MiniMap} instance associated with the given world.
|
|
@@ -16724,14 +16729,14 @@ const Ai = class Ai extends St {
|
|
|
16724
16729
|
* A unique identifier for the component.
|
|
16725
16730
|
* This UUID is used to register the component within the Components system.
|
|
16726
16731
|
*/
|
|
16727
|
-
|
|
16728
|
-
let Sr =
|
|
16729
|
-
const
|
|
16732
|
+
_(Ri, "uuid", "39ad6aad-84c8-4adf-a1e0-7f25313a9e7f");
|
|
16733
|
+
let Sr = Ri;
|
|
16734
|
+
const yi = class yi extends St {
|
|
16730
16735
|
constructor(t) {
|
|
16731
16736
|
super(t);
|
|
16732
16737
|
/** {@link Component.enabled} */
|
|
16733
|
-
|
|
16734
|
-
t.add(
|
|
16738
|
+
_(this, "enabled", !0);
|
|
16739
|
+
t.add(yi.uuid, this);
|
|
16735
16740
|
}
|
|
16736
16741
|
/**
|
|
16737
16742
|
* Utility method to calculate the distance from a point to a line segment.
|
|
@@ -16983,8 +16988,8 @@ const Ri = class Ri extends St {
|
|
|
16983
16988
|
* A unique identifier for the component.
|
|
16984
16989
|
* This UUID is used to register the component within the Components system.
|
|
16985
16990
|
*/
|
|
16986
|
-
|
|
16987
|
-
let Or =
|
|
16991
|
+
_(yi, "uuid", "267ca032-672f-4cb0-afa9-d24e904f39d6");
|
|
16992
|
+
let Or = yi;
|
|
16988
16993
|
export {
|
|
16989
16994
|
oi as AsyncEvent,
|
|
16990
16995
|
Lt as BCFTopics,
|
|
@@ -16998,13 +17003,13 @@ export {
|
|
|
16998
17003
|
ln as Clipper,
|
|
16999
17004
|
En as Comment,
|
|
17000
17005
|
St as Component,
|
|
17001
|
-
|
|
17006
|
+
an as Components,
|
|
17002
17007
|
ka as CullerRenderer,
|
|
17003
17008
|
cn as Cullers,
|
|
17004
|
-
|
|
17009
|
+
Ee as DataMap,
|
|
17005
17010
|
qe as DataSet,
|
|
17006
|
-
|
|
17007
|
-
|
|
17011
|
+
Fe as Disposer,
|
|
17012
|
+
Q as Event,
|
|
17008
17013
|
wr as Exploder,
|
|
17009
17014
|
tc as FirstPersonMode,
|
|
17010
17015
|
_t as FragmentsManager,
|
|
@@ -17043,12 +17048,12 @@ export {
|
|
|
17043
17048
|
vl as SimpleRenderer,
|
|
17044
17049
|
Ma as SimpleScene,
|
|
17045
17050
|
La as SimpleWorld,
|
|
17046
|
-
|
|
17047
|
-
|
|
17051
|
+
di as Topic,
|
|
17052
|
+
me as UUID,
|
|
17048
17053
|
xl as VertexPicker,
|
|
17049
17054
|
Kr as Viewpoint,
|
|
17050
17055
|
te as Viewpoints,
|
|
17051
|
-
|
|
17056
|
+
hi as Worlds,
|
|
17052
17057
|
Fl as extensionsImporter,
|
|
17053
17058
|
ac as ifcRelAttrsPosition,
|
|
17054
17059
|
cc as ifcRelClassNames,
|