@miris-inc/core 0.0.7-5eecc45 → 0.0.7-d7b324c
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/core.mjs +140 -135
- package/package.json +1 -1
package/core.mjs
CHANGED
|
@@ -420,23 +420,23 @@ function ZI() {
|
|
|
420
420
|
if (kg) return OA;
|
|
421
421
|
kg = 1;
|
|
422
422
|
var I = O(), A = eB(), g = LC(), B = $B(), C = vB(), E = TypeError, Q = Object.defineProperty, G = Object.getOwnPropertyDescriptor, R = "enumerable", D = "configurable", M = "writable";
|
|
423
|
-
return OA.f = I ? g ? function(
|
|
424
|
-
if (B(
|
|
425
|
-
var b = G(
|
|
426
|
-
b && b[M] && (
|
|
427
|
-
configurable: D in
|
|
428
|
-
enumerable: R in
|
|
423
|
+
return OA.f = I ? g ? function(o, i, w) {
|
|
424
|
+
if (B(o), i = C(i), B(w), typeof o == "function" && i === "prototype" && "value" in w && M in w && !w[M]) {
|
|
425
|
+
var b = G(o, i);
|
|
426
|
+
b && b[M] && (o[i] = w.value, w = {
|
|
427
|
+
configurable: D in w ? w[D] : b[D],
|
|
428
|
+
enumerable: R in w ? w[R] : b[R],
|
|
429
429
|
writable: !1
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
|
-
return Q(
|
|
433
|
-
} : Q : function(
|
|
434
|
-
if (B(
|
|
435
|
-
return Q(
|
|
432
|
+
return Q(o, i, w);
|
|
433
|
+
} : Q : function(o, i, w) {
|
|
434
|
+
if (B(o), i = C(i), B(w), A) try {
|
|
435
|
+
return Q(o, i, w);
|
|
436
436
|
} catch {
|
|
437
437
|
}
|
|
438
|
-
if ("get" in
|
|
439
|
-
return "value" in
|
|
438
|
+
if ("get" in w || "set" in w) throw new E("Accessors not supported");
|
|
439
|
+
return "value" in w && (o[i] = w.value), o;
|
|
440
440
|
}, OA;
|
|
441
441
|
}
|
|
442
442
|
var TA, Kg;
|
|
@@ -495,42 +495,42 @@ var rA, dg;
|
|
|
495
495
|
function kC() {
|
|
496
496
|
if (dg) return rA;
|
|
497
497
|
dg = 1;
|
|
498
|
-
var I = SC(), A = j(), g = p(), B = AC(), C = d(), E = JI(), Q = HC(), G = IC(), R = "Object already initialized", D = A.TypeError, M = A.WeakMap, F,
|
|
499
|
-
return
|
|
498
|
+
var I = SC(), A = j(), g = p(), B = AC(), C = d(), E = JI(), Q = HC(), G = IC(), R = "Object already initialized", D = A.TypeError, M = A.WeakMap, F, o, i, w = function(U) {
|
|
499
|
+
return i(U) ? o(U) : F(U, {});
|
|
500
500
|
}, b = function(U) {
|
|
501
501
|
return function(y) {
|
|
502
502
|
var N;
|
|
503
|
-
if (!g(y) || (N =
|
|
503
|
+
if (!g(y) || (N = o(y)).type !== U)
|
|
504
504
|
throw new D("Incompatible receiver, " + U + " required");
|
|
505
505
|
return N;
|
|
506
506
|
};
|
|
507
507
|
};
|
|
508
508
|
if (I || E.state) {
|
|
509
|
-
var
|
|
510
|
-
|
|
511
|
-
if (
|
|
512
|
-
return y.facade = U,
|
|
513
|
-
},
|
|
514
|
-
return
|
|
515
|
-
},
|
|
516
|
-
return
|
|
509
|
+
var s = E.state || (E.state = new M());
|
|
510
|
+
s.get = s.get, s.has = s.has, s.set = s.set, F = function(U, y) {
|
|
511
|
+
if (s.has(U)) throw new D(R);
|
|
512
|
+
return y.facade = U, s.set(U, y), y;
|
|
513
|
+
}, o = function(U) {
|
|
514
|
+
return s.get(U) || {};
|
|
515
|
+
}, i = function(U) {
|
|
516
|
+
return s.has(U);
|
|
517
517
|
};
|
|
518
518
|
} else {
|
|
519
519
|
var x = Q("state");
|
|
520
520
|
G[x] = !0, F = function(U, y) {
|
|
521
521
|
if (C(U, x)) throw new D(R);
|
|
522
522
|
return y.facade = U, B(U, x, y), y;
|
|
523
|
-
},
|
|
523
|
+
}, o = function(U) {
|
|
524
524
|
return C(U, x) ? U[x] : {};
|
|
525
|
-
},
|
|
525
|
+
}, i = function(U) {
|
|
526
526
|
return C(U, x);
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
529
|
return rA = {
|
|
530
530
|
set: F,
|
|
531
|
-
get:
|
|
532
|
-
has:
|
|
533
|
-
enforce:
|
|
531
|
+
get: o,
|
|
532
|
+
has: i,
|
|
533
|
+
enforce: w,
|
|
534
534
|
getterFor: b
|
|
535
535
|
}, rA;
|
|
536
536
|
}
|
|
@@ -538,17 +538,17 @@ var qg;
|
|
|
538
538
|
function KC() {
|
|
539
539
|
if (qg) return WA.exports;
|
|
540
540
|
qg = 1;
|
|
541
|
-
var I = H(), A = n(), g = K(), B = d(), C = O(), E = jC().CONFIGURABLE, Q = hC(), G = kC(), R = G.enforce, D = G.get, M = String, F = Object.defineProperty,
|
|
541
|
+
var I = H(), A = n(), g = K(), B = d(), C = O(), E = jC().CONFIGURABLE, Q = hC(), G = kC(), R = G.enforce, D = G.get, M = String, F = Object.defineProperty, o = I("".slice), i = I("".replace), w = I([].join), b = C && !A(function() {
|
|
542
542
|
return F(function() {
|
|
543
543
|
}, "length", { value: 8 }).length !== 8;
|
|
544
|
-
}),
|
|
545
|
-
|
|
544
|
+
}), s = String(String).split("String"), x = WA.exports = function(U, y, N) {
|
|
545
|
+
o(M(y), 0, 7) === "Symbol(" && (y = "[" + i(M(y), /^Symbol\(([^)]*)\).*$/, "$1") + "]"), N && N.getter && (y = "get " + y), N && N.setter && (y = "set " + y), (!B(U, "name") || E && U.name !== y) && (C ? F(U, "name", { value: y, configurable: !0 }) : U.name = y), b && N && B(N, "arity") && U.length !== N.arity && F(U, "length", { value: N.arity });
|
|
546
546
|
try {
|
|
547
547
|
N && B(N, "constructor") && N.constructor ? C && F(U, "prototype", { writable: !1 }) : U.prototype && (U.prototype = void 0);
|
|
548
548
|
} catch {
|
|
549
549
|
}
|
|
550
550
|
var Y = R(U);
|
|
551
|
-
return B(Y, "source") || (Y.source =
|
|
551
|
+
return B(Y, "source") || (Y.source = w(s, typeof y == "string" ? y : "")), U;
|
|
552
552
|
};
|
|
553
553
|
return Function.prototype.toString = x(function() {
|
|
554
554
|
return g(this) && D(this).source || Q(this);
|
|
@@ -731,13 +731,13 @@ function T() {
|
|
|
731
731
|
eg = 1;
|
|
732
732
|
var I = j(), A = _B().f, g = AC(), B = tC(), C = tI(), E = pC(), Q = TC();
|
|
733
733
|
return DI = function(G, R) {
|
|
734
|
-
var D = G.target, M = G.global, F = G.stat,
|
|
735
|
-
if (M ?
|
|
736
|
-
if (
|
|
737
|
-
if (typeof
|
|
738
|
-
E(
|
|
734
|
+
var D = G.target, M = G.global, F = G.stat, o, i, w, b, s, x;
|
|
735
|
+
if (M ? i = I : F ? i = I[D] || C(D, {}) : i = I[D] && I[D].prototype, i) for (w in R) {
|
|
736
|
+
if (s = R[w], G.dontCallGetSet ? (x = A(i, w), b = x && x.value) : b = i[w], o = Q(M ? w : D + (F ? "." : "#") + w, G.forced), !o && b !== void 0) {
|
|
737
|
+
if (typeof s == typeof b) continue;
|
|
738
|
+
E(s, b);
|
|
739
739
|
}
|
|
740
|
-
(G.sham || b && b.sham) && g(
|
|
740
|
+
(G.sham || b && b.sham) && g(s, "sham", !0), B(i, w, s, G);
|
|
741
741
|
}
|
|
742
742
|
}, DI;
|
|
743
743
|
}
|
|
@@ -851,17 +851,17 @@ var cI, RB;
|
|
|
851
851
|
function GC() {
|
|
852
852
|
if (RB) return cI;
|
|
853
853
|
RB = 1;
|
|
854
|
-
var I = j(), A = H(), g = CC(), B = nI(), C = d(), E = QC(), Q = EC(), G = e(), R = E.c2i, D = E.c2iUrl, M = I.SyntaxError, F = I.TypeError,
|
|
855
|
-
for (var U =
|
|
856
|
-
var y =
|
|
854
|
+
var I = j(), A = H(), g = CC(), B = nI(), C = d(), E = QC(), Q = EC(), G = e(), R = E.c2i, D = E.c2iUrl, M = I.SyntaxError, F = I.TypeError, o = A("".charAt), i = function(s, x) {
|
|
855
|
+
for (var U = s.length; x < U; x++) {
|
|
856
|
+
var y = o(s, x);
|
|
857
857
|
if (y !== " " && y !== " " && y !== `
|
|
858
858
|
` && y !== "\f" && y !== "\r") break;
|
|
859
859
|
}
|
|
860
860
|
return x;
|
|
861
|
-
},
|
|
862
|
-
var y =
|
|
863
|
-
y < 4 && (
|
|
864
|
-
var N = (x[
|
|
861
|
+
}, w = function(s, x, U) {
|
|
862
|
+
var y = s.length;
|
|
863
|
+
y < 4 && (s += y === 2 ? "AA" : "A");
|
|
864
|
+
var N = (x[o(s, 0)] << 18) + (x[o(s, 1)] << 12) + (x[o(s, 2)] << 6) + x[o(s, 3)], Y = [
|
|
865
865
|
N >> 16 & 255,
|
|
866
866
|
N >> 8 & 255,
|
|
867
867
|
N & 255
|
|
@@ -877,54 +877,54 @@ function GC() {
|
|
|
877
877
|
return [Y[0], Y[1]];
|
|
878
878
|
}
|
|
879
879
|
return Y;
|
|
880
|
-
}, b = function(
|
|
880
|
+
}, b = function(s, x, U) {
|
|
881
881
|
for (var y = x.length, N = 0; N < y; N++)
|
|
882
|
-
|
|
882
|
+
s[U + N] = x[N];
|
|
883
883
|
return U + y;
|
|
884
884
|
};
|
|
885
|
-
return cI = function(
|
|
886
|
-
B(
|
|
885
|
+
return cI = function(s, x, U, y) {
|
|
886
|
+
B(s), g(x);
|
|
887
887
|
var N = Q(x) === "base64" ? R : D, Y = x ? x.lastChunkHandling : void 0;
|
|
888
888
|
if (Y === void 0 && (Y = "loose"), Y !== "loose" && Y !== "strict" && Y !== "stop-before-partial")
|
|
889
889
|
throw new F("Incorrect `lastChunkHandling` option");
|
|
890
890
|
U && G(U.buffer);
|
|
891
|
-
var h =
|
|
891
|
+
var h = s.length, V = U || [], J = 0, f = 0, k = "", S = 0;
|
|
892
892
|
if (y) for (; ; ) {
|
|
893
|
-
if (S = s
|
|
893
|
+
if (S = i(s, S), S === h) {
|
|
894
894
|
if (k.length > 0) {
|
|
895
895
|
if (Y === "stop-before-partial")
|
|
896
896
|
break;
|
|
897
897
|
if (Y === "loose") {
|
|
898
898
|
if (k.length === 1)
|
|
899
899
|
throw new M("Malformed padding: exactly one additional character");
|
|
900
|
-
J = b(V,
|
|
900
|
+
J = b(V, w(k, N, !1), J);
|
|
901
901
|
} else
|
|
902
902
|
throw new M("Missing padding");
|
|
903
903
|
}
|
|
904
904
|
f = h;
|
|
905
905
|
break;
|
|
906
906
|
}
|
|
907
|
-
var $ =
|
|
907
|
+
var $ = o(s, S);
|
|
908
908
|
if (++S, $ === "=") {
|
|
909
909
|
if (k.length < 2)
|
|
910
910
|
throw new M("Padding is too early");
|
|
911
|
-
if (S = s
|
|
911
|
+
if (S = i(s, S), k.length === 2) {
|
|
912
912
|
if (S === h) {
|
|
913
913
|
if (Y === "stop-before-partial")
|
|
914
914
|
break;
|
|
915
915
|
throw new M("Malformed padding: only one =");
|
|
916
916
|
}
|
|
917
|
-
|
|
917
|
+
o(s, S) === "=" && (++S, S = i(s, S));
|
|
918
918
|
}
|
|
919
919
|
if (S < h)
|
|
920
920
|
throw new M("Unexpected character after padding");
|
|
921
|
-
J = b(V,
|
|
921
|
+
J = b(V, w(k, N, Y === "strict"), J), f = h;
|
|
922
922
|
break;
|
|
923
923
|
}
|
|
924
924
|
if (!C(N, $))
|
|
925
925
|
throw new M("Unexpected character");
|
|
926
926
|
var qI = y - J;
|
|
927
|
-
if (qI === 1 && k.length === 2 || qI === 2 && k.length === 3 || (k += $, k.length === 4 && (J = b(V,
|
|
927
|
+
if (qI === 1 && k.length === 2 || qI === 2 && k.length === 3 || (k += $, k.length === 4 && (J = b(V, w(k, N, !1), J), k = "", f = S, J === y)))
|
|
928
928
|
break;
|
|
929
929
|
}
|
|
930
930
|
return { bytes: V, read: f, written: J };
|
|
@@ -965,12 +965,12 @@ function RC() {
|
|
|
965
965
|
return bI = function(D, M) {
|
|
966
966
|
var F = D.length;
|
|
967
967
|
if (F % 2 !== 0) throw new B("String should be an even number of characters");
|
|
968
|
-
for (var
|
|
969
|
-
var
|
|
970
|
-
if (G(Q,
|
|
971
|
-
|
|
968
|
+
for (var o = M ? E(M.length, F / 2) : F / 2, i = M || new g(o), w = 0, b = 0; b < o; ) {
|
|
969
|
+
var s = R(D, w, w += 2);
|
|
970
|
+
if (G(Q, s)) throw new B("String should only contain hex characters");
|
|
971
|
+
i[b++] = C(s, 16);
|
|
972
972
|
}
|
|
973
|
-
return { bytes:
|
|
973
|
+
return { bytes: i, read: w };
|
|
974
974
|
}, bI;
|
|
975
975
|
}
|
|
976
976
|
var wB;
|
|
@@ -1085,23 +1085,23 @@ var HB = {}, kB = {}, KB;
|
|
|
1085
1085
|
function BQ() {
|
|
1086
1086
|
if (KB) return kB;
|
|
1087
1087
|
KB = 1;
|
|
1088
|
-
var I = T(), A = j(), g = H(), B = CC(), C = _(), E = e(), Q = QC(), G = EC(), R = Q.i2c, D = Q.i2cUrl, M = g("".charAt), F = A.Uint8Array,
|
|
1088
|
+
var I = T(), A = j(), g = H(), B = CC(), C = _(), E = e(), Q = QC(), G = EC(), R = Q.i2c, D = Q.i2cUrl, M = g("".charAt), F = A.Uint8Array, o = !F || !F.prototype.toBase64 || !(function() {
|
|
1089
1089
|
try {
|
|
1090
|
-
var
|
|
1091
|
-
|
|
1090
|
+
var i = new F();
|
|
1091
|
+
i.toBase64(null);
|
|
1092
1092
|
} catch {
|
|
1093
1093
|
return !0;
|
|
1094
1094
|
}
|
|
1095
1095
|
})();
|
|
1096
|
-
return F && I({ target: "Uint8Array", proto: !0, forced:
|
|
1096
|
+
return F && I({ target: "Uint8Array", proto: !0, forced: o }, {
|
|
1097
1097
|
toBase64: function() {
|
|
1098
|
-
var
|
|
1098
|
+
var w = C(this), b = arguments.length ? B(arguments[0]) : void 0, s = G(b) === "base64" ? R : D, x = !!b && !!b.omitPadding;
|
|
1099
1099
|
E(this.buffer);
|
|
1100
|
-
for (var U = "", y = 0, N =
|
|
1101
|
-
return M(
|
|
1100
|
+
for (var U = "", y = 0, N = w.length, Y, h = function(V) {
|
|
1101
|
+
return M(s, Y >> 6 * V & 63);
|
|
1102
1102
|
}; y + 2 < N; y += 3)
|
|
1103
|
-
Y = (
|
|
1104
|
-
return y + 2 === N ? (Y = (
|
|
1103
|
+
Y = (w[y] << 16) + (w[y + 1] << 8) + w[y + 2], U += h(3) + h(2) + h(1) + h(0);
|
|
1104
|
+
return y + 2 === N ? (Y = (w[y] << 16) + (w[y + 1] << 8), U += h(3) + h(2) + h(1) + (x ? "" : "=")) : y + 1 === N && (Y = w[y] << 16, U += h(3) + h(2) + (x ? "" : "==")), U;
|
|
1105
1105
|
}
|
|
1106
1106
|
}), kB;
|
|
1107
1107
|
}
|
|
@@ -1125,8 +1125,8 @@ function QQ() {
|
|
|
1125
1125
|
toHex: function() {
|
|
1126
1126
|
B(this), C(this.buffer);
|
|
1127
1127
|
for (var D = "", M = 0, F = this.length; M < F; M++) {
|
|
1128
|
-
var
|
|
1129
|
-
D +=
|
|
1128
|
+
var o = E(this[M], 16);
|
|
1129
|
+
D += o.length === 1 ? "0" + o : o;
|
|
1130
1130
|
}
|
|
1131
1131
|
return D;
|
|
1132
1132
|
}
|
|
@@ -1234,13 +1234,13 @@ const lQ = L("GetLodIndex", "number", ["number", "number"]), SI = L("GetTransfor
|
|
|
1234
1234
|
"number"
|
|
1235
1235
|
]), { SpatialFormat: OQ } = c, { UpAxis: VQ } = c, { MatrixOrder: pQ } = c, { Handedness: TQ } = c, { SetClientSpatialFormat: WQ } = c;
|
|
1236
1236
|
class t {
|
|
1237
|
-
static #g = /* @__PURE__ */ new Map();
|
|
1238
1237
|
static #I = /* @__PURE__ */ new Map();
|
|
1238
|
+
static #g = /* @__PURE__ */ new Map();
|
|
1239
1239
|
static forKey(A) {
|
|
1240
|
-
return this.#
|
|
1240
|
+
return this.#I.get(A);
|
|
1241
1241
|
}
|
|
1242
1242
|
static forId(A) {
|
|
1243
|
-
return this.#
|
|
1243
|
+
return this.#g.get(A);
|
|
1244
1244
|
}
|
|
1245
1245
|
#A;
|
|
1246
1246
|
#B;
|
|
@@ -1260,7 +1260,7 @@ class t {
|
|
|
1260
1260
|
return this.#A ?? null;
|
|
1261
1261
|
}
|
|
1262
1262
|
set key(A) {
|
|
1263
|
-
t.#
|
|
1263
|
+
t.#I.delete(this.key), (A || A === 0) && t.#I.set(A, this), this.#A = A;
|
|
1264
1264
|
}
|
|
1265
1265
|
set splats(A) {
|
|
1266
1266
|
this.#B = A;
|
|
@@ -1296,13 +1296,13 @@ class t {
|
|
|
1296
1296
|
this.sh3Data = A, this.sh3Min = g, this.sh3Max = B;
|
|
1297
1297
|
}
|
|
1298
1298
|
dispose() {
|
|
1299
|
-
t.#
|
|
1299
|
+
t.#I.delete(this.key), t.#g.delete(this.id), this.#A = null, this.#B = null, this.#C = null, this.#Q = null, this.sh1Data = null, this.sh2Data = null, this.sh3Data = null, this.chunk?.lods?.delete(this);
|
|
1300
1300
|
}
|
|
1301
1301
|
constructor({ id: A, chunk: g }) {
|
|
1302
1302
|
Object.defineProperties(this, {
|
|
1303
1303
|
id: { value: A },
|
|
1304
1304
|
chunk: { value: g }
|
|
1305
|
-
}), t.#
|
|
1305
|
+
}), t.#g.set(A, this), g.add(this);
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
1308
|
class P {
|
|
@@ -1314,20 +1314,20 @@ class P {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
1316
|
class l {
|
|
1317
|
-
static #g = /* @__PURE__ */ new Map();
|
|
1318
1317
|
static #I = /* @__PURE__ */ new Map();
|
|
1318
|
+
static #g = /* @__PURE__ */ new Map();
|
|
1319
1319
|
static forKey(A) {
|
|
1320
|
-
return this.#
|
|
1320
|
+
return this.#I.get(A);
|
|
1321
1321
|
}
|
|
1322
1322
|
static forId(A) {
|
|
1323
|
-
return this.#
|
|
1323
|
+
return this.#g.get(A);
|
|
1324
1324
|
}
|
|
1325
1325
|
#A;
|
|
1326
1326
|
get key() {
|
|
1327
1327
|
return this.#A ?? null;
|
|
1328
1328
|
}
|
|
1329
1329
|
set key(A) {
|
|
1330
|
-
l.#
|
|
1330
|
+
l.#I.delete(this.key), (A || A === 0) && l.#I.set(A, this), this.#A = A;
|
|
1331
1331
|
}
|
|
1332
1332
|
#B = /* @__PURE__ */ new Set();
|
|
1333
1333
|
get lods() {
|
|
@@ -1344,7 +1344,7 @@ class l {
|
|
|
1344
1344
|
Object.defineProperties(this, {
|
|
1345
1345
|
id: { value: A },
|
|
1346
1346
|
stream: { value: g }
|
|
1347
|
-
}), l.#
|
|
1347
|
+
}), l.#g.set(A, this), g.add(this);
|
|
1348
1348
|
}
|
|
1349
1349
|
add(A) {
|
|
1350
1350
|
this.#B.add(A);
|
|
@@ -1354,7 +1354,7 @@ class l {
|
|
|
1354
1354
|
this.#B.clear();
|
|
1355
1355
|
for (const g of A)
|
|
1356
1356
|
g.dispose();
|
|
1357
|
-
l.#
|
|
1357
|
+
l.#I.delete(this.key), l.#g.delete(this.id), this.#A = null;
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
1360
|
class Z {
|
|
@@ -1367,15 +1367,16 @@ class Z {
|
|
|
1367
1367
|
static forKey(A) {
|
|
1368
1368
|
return this._keyMap.get(A);
|
|
1369
1369
|
}
|
|
1370
|
-
#
|
|
1370
|
+
#I;
|
|
1371
|
+
#g = !1;
|
|
1371
1372
|
get key() {
|
|
1372
|
-
return this.#
|
|
1373
|
+
return this.#I ?? null;
|
|
1373
1374
|
}
|
|
1374
1375
|
set key(A) {
|
|
1375
|
-
Z._keyMap.delete(this.key), (A || A === 0) && Z._keyMap.set(A, this), this.#
|
|
1376
|
+
Z._keyMap.delete(this.key), (A || A === 0) && Z._keyMap.set(A, this), this.#I = A;
|
|
1376
1377
|
}
|
|
1377
1378
|
// prettier-ignore
|
|
1378
|
-
#
|
|
1379
|
+
#A = [
|
|
1379
1380
|
1,
|
|
1380
1381
|
0,
|
|
1381
1382
|
0,
|
|
@@ -1394,12 +1395,12 @@ class Z {
|
|
|
1394
1395
|
1
|
|
1395
1396
|
];
|
|
1396
1397
|
get matrix() {
|
|
1397
|
-
return this.#
|
|
1398
|
+
return this.#A;
|
|
1398
1399
|
}
|
|
1399
1400
|
set matrix(A) {
|
|
1400
|
-
this.#
|
|
1401
|
-
const g = v(this.#
|
|
1402
|
-
u.set(Float32Array.from(this.#
|
|
1401
|
+
this.#A = A;
|
|
1402
|
+
const g = v(this.#A.length * 4);
|
|
1403
|
+
u.set(Float32Array.from(this.#A), g / 4), ZQ(this.scene.handle, this.id, g), dI(g);
|
|
1403
1404
|
}
|
|
1404
1405
|
get boundingBox() {
|
|
1405
1406
|
const A = v(24);
|
|
@@ -1422,9 +1423,9 @@ class Z {
|
|
|
1422
1423
|
};
|
|
1423
1424
|
return Object.freeze(R), R;
|
|
1424
1425
|
}
|
|
1425
|
-
#
|
|
1426
|
+
#B = /* @__PURE__ */ new Set();
|
|
1426
1427
|
get chunks() {
|
|
1427
|
-
return new Set(this.#
|
|
1428
|
+
return new Set(this.#B);
|
|
1428
1429
|
}
|
|
1429
1430
|
constructor(A) {
|
|
1430
1431
|
this.init(A), Z._idMap.set(this.id, this), A.scene.add(this);
|
|
@@ -1437,14 +1438,17 @@ class Z {
|
|
|
1437
1438
|
id: { value: C }
|
|
1438
1439
|
});
|
|
1439
1440
|
}
|
|
1441
|
+
onStreamLoaded() {
|
|
1442
|
+
this.#g || (this.key?.onStreamLoaded(), this.#g = !0);
|
|
1443
|
+
}
|
|
1440
1444
|
add(A) {
|
|
1441
|
-
this.#
|
|
1445
|
+
this.#B.add(A);
|
|
1442
1446
|
}
|
|
1443
1447
|
end() {
|
|
1444
1448
|
kQ(this.scene.handle, this.id);
|
|
1445
|
-
for (const A of this.#
|
|
1449
|
+
for (const A of this.#B)
|
|
1446
1450
|
A.dispose();
|
|
1447
|
-
this.#
|
|
1451
|
+
this.#B.clear(), Z._idMap.delete(this.id), Z._keyMap.delete(this.key), this.scene.streams.has(this) && this.scene.delete(this);
|
|
1448
1452
|
}
|
|
1449
1453
|
}
|
|
1450
1454
|
const fQ = 2048, zQ = 4, OB = fQ * zQ;
|
|
@@ -1502,23 +1506,23 @@ function PQ(I, A, g, B) {
|
|
|
1502
1506
|
}
|
|
1503
1507
|
}
|
|
1504
1508
|
class XQ {
|
|
1505
|
-
#
|
|
1506
|
-
#
|
|
1509
|
+
#I = /* @__PURE__ */ new Set();
|
|
1510
|
+
#g = [];
|
|
1507
1511
|
#A = null;
|
|
1508
1512
|
#B = /* @__PURE__ */ new Set();
|
|
1509
1513
|
// prettier-ignore
|
|
1510
1514
|
get handle() {
|
|
1511
|
-
return this.#
|
|
1515
|
+
return this.#I.values().next().value ?? null;
|
|
1512
1516
|
}
|
|
1513
1517
|
// prettier-ignore
|
|
1514
1518
|
constructor() {
|
|
1515
|
-
Object.defineProperty(this, "scenes", { value: this.#
|
|
1519
|
+
Object.defineProperty(this, "scenes", { value: this.#I }), navigator.userAgent.includes("iPhone") && lB(128 * 1024 * 1024), navigator.userAgent.includes("Android") && lB(256 * 1024 * 1024), this.#Q();
|
|
1516
1520
|
}
|
|
1517
1521
|
updateChunkTransform(A, g) {
|
|
1518
1522
|
}
|
|
1519
1523
|
#C = this.#Q.bind(this);
|
|
1520
1524
|
#Q() {
|
|
1521
|
-
for (const A of this.#
|
|
1525
|
+
for (const A of this.#I) {
|
|
1522
1526
|
if (dQ(A.handle), !SQ(A.handle)) {
|
|
1523
1527
|
requestAnimationFrame(this.#C);
|
|
1524
1528
|
return;
|
|
@@ -1529,7 +1533,7 @@ class XQ {
|
|
|
1529
1533
|
nQ(A.handle);
|
|
1530
1534
|
}
|
|
1531
1535
|
}
|
|
1532
|
-
this.#
|
|
1536
|
+
this.#g.length && (this.update(this.#g), this.#g.length = 0), requestAnimationFrame(this.#C);
|
|
1533
1537
|
}
|
|
1534
1538
|
#E(A, g, B, C) {
|
|
1535
1539
|
const Q = v(B * 4);
|
|
@@ -1584,34 +1588,35 @@ class XQ {
|
|
|
1584
1588
|
A.handle,
|
|
1585
1589
|
B
|
|
1586
1590
|
) === q.GaussianSplats) {
|
|
1587
|
-
|
|
1591
|
+
A.getStreamForDescendentId(B)?.onStreamLoaded();
|
|
1592
|
+
const Q = this.#E(
|
|
1588
1593
|
A.handle,
|
|
1589
1594
|
B,
|
|
1590
1595
|
6,
|
|
1591
1596
|
MC
|
|
1592
|
-
),
|
|
1597
|
+
), G = lQ(A.handle, B), R = new m();
|
|
1593
1598
|
try {
|
|
1594
|
-
const { ptr:
|
|
1595
|
-
r(A.handle, B, "sparkPackedSplats",
|
|
1596
|
-
const
|
|
1597
|
-
|
|
1598
|
-
const
|
|
1599
|
-
if (!
|
|
1599
|
+
const { ptr: D } = R.$$;
|
|
1600
|
+
r(A.handle, B, "sparkPackedSplats", D);
|
|
1601
|
+
const M = X(R), F = Math.ceil(M.length / OB) * OB, o = new Uint32Array(F);
|
|
1602
|
+
o.set(M);
|
|
1603
|
+
const i = t.forId(B);
|
|
1604
|
+
if (!i) {
|
|
1600
1605
|
console.warn(
|
|
1601
1606
|
`Received modified event for LOD ${B} which does not exist.`
|
|
1602
1607
|
);
|
|
1603
1608
|
continue;
|
|
1604
1609
|
}
|
|
1605
|
-
|
|
1610
|
+
i.splats = o, i.bounds = Q, i.lodIndex = G, PQ(
|
|
1606
1611
|
A.handle,
|
|
1607
1612
|
B,
|
|
1608
|
-
|
|
1609
|
-
|
|
1613
|
+
F,
|
|
1614
|
+
i
|
|
1610
1615
|
);
|
|
1611
|
-
const
|
|
1612
|
-
this.#
|
|
1616
|
+
const w = new P({ type: "created", lod: i });
|
|
1617
|
+
this.#g.push(w), this.#B.delete(B) && this.#g.push(new P({ type: "activated", lod: i }));
|
|
1613
1618
|
} finally {
|
|
1614
|
-
|
|
1619
|
+
R.delete();
|
|
1615
1620
|
}
|
|
1616
1621
|
}
|
|
1617
1622
|
for (const B of wQ(this.#A))
|
|
@@ -1622,7 +1627,7 @@ class XQ {
|
|
|
1622
1627
|
const E = t.forId(B);
|
|
1623
1628
|
if (E && E.splats) {
|
|
1624
1629
|
const Q = new P({ type: "activated", lod: E });
|
|
1625
|
-
this.#
|
|
1630
|
+
this.#g.push(Q);
|
|
1626
1631
|
} else E && this.#B.add(B);
|
|
1627
1632
|
}
|
|
1628
1633
|
for (const B of cQ(this.#A))
|
|
@@ -1633,7 +1638,7 @@ class XQ {
|
|
|
1633
1638
|
const E = t.forId(B);
|
|
1634
1639
|
if (E && E.splats) {
|
|
1635
1640
|
const Q = new P({ type: "deactivated", lod: E });
|
|
1636
|
-
this.#
|
|
1641
|
+
this.#g.push(Q);
|
|
1637
1642
|
}
|
|
1638
1643
|
}
|
|
1639
1644
|
}
|
|
@@ -1641,21 +1646,21 @@ class XQ {
|
|
|
1641
1646
|
}
|
|
1642
1647
|
// prettier-ignore
|
|
1643
1648
|
add(A) {
|
|
1644
|
-
this.#
|
|
1649
|
+
this.#I.add(A);
|
|
1645
1650
|
}
|
|
1646
1651
|
delete(A) {
|
|
1647
|
-
this.#
|
|
1652
|
+
this.#I.delete(A), A.miris && A.close(), this.#I.size === 0 && this.#A !== null && (this.#A.delete(), this.#A = null);
|
|
1648
1653
|
}
|
|
1649
1654
|
}
|
|
1650
1655
|
class rQ {
|
|
1651
|
-
static #g = /* @__PURE__ */ new Map();
|
|
1652
1656
|
static #I = /* @__PURE__ */ new Map();
|
|
1657
|
+
static #g = /* @__PURE__ */ new Map();
|
|
1653
1658
|
static forId(A) {
|
|
1654
1659
|
if (A)
|
|
1655
|
-
return this.#
|
|
1660
|
+
return this.#I.get(A);
|
|
1656
1661
|
}
|
|
1657
1662
|
static forKey(A) {
|
|
1658
|
-
return this.#
|
|
1663
|
+
return this.#g.get(A);
|
|
1659
1664
|
}
|
|
1660
1665
|
update() {
|
|
1661
1666
|
const A = v(this.#E.length * 4);
|
|
@@ -1707,8 +1712,8 @@ class rQ {
|
|
|
1707
1712
|
}
|
|
1708
1713
|
}
|
|
1709
1714
|
class a {
|
|
1710
|
-
static #g = /* @__PURE__ */ new Map();
|
|
1711
1715
|
static #I = /* @__PURE__ */ new Map();
|
|
1716
|
+
static #g = /* @__PURE__ */ new Map();
|
|
1712
1717
|
// Associated camera
|
|
1713
1718
|
#A = null;
|
|
1714
1719
|
get camera() {
|
|
@@ -1719,11 +1724,11 @@ class a {
|
|
|
1719
1724
|
}
|
|
1720
1725
|
//prettier-ignore
|
|
1721
1726
|
static forId(A) {
|
|
1722
|
-
return a.#
|
|
1727
|
+
return a.#I.get(A);
|
|
1723
1728
|
}
|
|
1724
1729
|
// prettier-ignore
|
|
1725
1730
|
static forKey(A) {
|
|
1726
|
-
return a.#
|
|
1731
|
+
return a.#g.get(A);
|
|
1727
1732
|
}
|
|
1728
1733
|
#B;
|
|
1729
1734
|
// prettier-ignore
|
|
@@ -1731,7 +1736,7 @@ class a {
|
|
|
1731
1736
|
return this.#B ?? null;
|
|
1732
1737
|
}
|
|
1733
1738
|
set key(A) {
|
|
1734
|
-
a.#
|
|
1739
|
+
a.#g.delete(this.key), (A || A === 0) && a.#g.set(A, this), this.#B = A;
|
|
1735
1740
|
}
|
|
1736
1741
|
#C = /* @__PURE__ */ new Set();
|
|
1737
1742
|
#Q = /* @__PURE__ */ new Map();
|
|
@@ -1747,7 +1752,7 @@ class a {
|
|
|
1747
1752
|
const B = g;
|
|
1748
1753
|
B && this.setViewerKey(B);
|
|
1749
1754
|
let C = new OQ();
|
|
1750
|
-
C.metersPerUnit = 1, C.upAxis = VQ.Y, C.matrixOrder = pQ.ColumnMajor, C.handedness = TQ.Right, WQ(this.handle, C), C.delete(), a.#
|
|
1755
|
+
C.metersPerUnit = 1, C.upAxis = VQ.Y, C.matrixOrder = pQ.ColumnMajor, C.handedness = TQ.Right, WQ(this.handle, C), C.delete(), a.#I.set(this.id, this), A.add(this);
|
|
1751
1756
|
}
|
|
1752
1757
|
setViewerKey(A) {
|
|
1753
1758
|
tQ(this.handle, A);
|
|
@@ -1765,10 +1770,10 @@ class a {
|
|
|
1765
1770
|
thumbnailUrl: D,
|
|
1766
1771
|
uuid: M,
|
|
1767
1772
|
tags: []
|
|
1768
|
-
},
|
|
1769
|
-
for (let
|
|
1770
|
-
const
|
|
1771
|
-
F.tags.push(
|
|
1773
|
+
}, o = R.size();
|
|
1774
|
+
for (let i = 0; i < o; i += 1) {
|
|
1775
|
+
const w = R.get(i);
|
|
1776
|
+
F.tags.push(w);
|
|
1772
1777
|
}
|
|
1773
1778
|
E.push(F);
|
|
1774
1779
|
}
|
|
@@ -1797,7 +1802,7 @@ class a {
|
|
|
1797
1802
|
this.#C.delete(A), this.#Q.delete(A.id), Z.forId(A.id) && A.end();
|
|
1798
1803
|
}
|
|
1799
1804
|
close() {
|
|
1800
|
-
bQ(this.handle), a.#
|
|
1805
|
+
bQ(this.handle), a.#I.delete(this.id), a.#g.delete(this.key), this.miris.scenes.has(this) && this.miris.delete(this);
|
|
1801
1806
|
}
|
|
1802
1807
|
}
|
|
1803
1808
|
export {
|
package/package.json
CHANGED