@realsee/five 6.6.0-alpha.16 → 6.6.0-alpha.18
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/docs/classes/five.Five.html +57 -56
- package/docs/interfaces/react.FiveInjectionTypes.html +1 -0
- package/five/index.d.ts +1 -0
- package/five/index.js +37 -37
- package/five/index.mjs +989 -874
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +3 -3
- package/line/index.js +3 -3
- package/line/index.mjs +3 -3
- package/package.json +1 -1
- package/plugins/index.js +2 -2
- package/plugins/index.mjs +2 -2
- package/react/index.js +2 -2
- package/react/index.mjs +2 -2
- package/shader-lib/index.js +2 -2
- package/shader-lib/index.mjs +2 -2
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +3 -3
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +2 -2
- package/umd/five-react.js +2 -2
- package/umd/five-shader-lib.js +2 -2
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five-vue.js +2 -2
- package/umd/five.js +37 -37
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +2 -2
- package/work-downloader/index.mjs +2 -2
package/five/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated: 9/
|
|
5
|
-
* Version: 6.6.0-alpha.
|
|
4
|
+
* Generated: 2025/9/22
|
|
5
|
+
* Version: 6.6.0-alpha.18
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -453,14 +453,14 @@ var KJUR = {}, CryptoJS = CryptoJS || (function(n, t) {
|
|
|
453
453
|
_process: function(p) {
|
|
454
454
|
var m = this._data, A = m.words, g = m.sigBytes, E = this.blockSize, v = E * 4, y = g / v;
|
|
455
455
|
p ? y = n.ceil(y) : y = n.max((y | 0) - this._minBufferSize, 0);
|
|
456
|
-
var
|
|
457
|
-
if (
|
|
458
|
-
for (var S = 0; S <
|
|
456
|
+
var T = y * E, b = n.min(T * 4, g);
|
|
457
|
+
if (T) {
|
|
458
|
+
for (var S = 0; S < T; S += E)
|
|
459
459
|
this._doProcessBlock(A, S);
|
|
460
|
-
var R = A.splice(0,
|
|
461
|
-
m.sigBytes -=
|
|
460
|
+
var R = A.splice(0, T);
|
|
461
|
+
m.sigBytes -= b;
|
|
462
462
|
}
|
|
463
|
-
return new s.init(R,
|
|
463
|
+
return new s.init(R, b);
|
|
464
464
|
},
|
|
465
465
|
clone: function() {
|
|
466
466
|
var p = o.clone.call(this);
|
|
@@ -520,16 +520,16 @@ var KJUR = {}, CryptoJS = CryptoJS || (function(n, t) {
|
|
|
520
520
|
this._hash = new e.init(o.slice(0));
|
|
521
521
|
},
|
|
522
522
|
_doProcessBlock: function(A, g) {
|
|
523
|
-
for (var E = this._hash.words, v = E[0], y = E[1],
|
|
523
|
+
for (var E = this._hash.words, v = E[0], y = E[1], T = E[2], b = E[3], S = E[4], R = E[5], C = E[6], w = E[7], I = 0; 64 > I; I++) {
|
|
524
524
|
if (16 > I)
|
|
525
525
|
p[I] = A[g + I] | 0;
|
|
526
526
|
else {
|
|
527
527
|
var H = p[I - 15], M = p[I - 2];
|
|
528
528
|
p[I] = ((H << 25 | H >>> 7) ^ (H << 14 | H >>> 18) ^ H >>> 3) + p[I - 7] + ((M << 15 | M >>> 17) ^ (M << 13 | M >>> 19) ^ M >>> 10) + p[I - 16];
|
|
529
529
|
}
|
|
530
|
-
H = w + ((S << 26 | S >>> 6) ^ (S << 21 | S >>> 11) ^ (S << 7 | S >>> 25)) + (S & R ^ ~S & C) + s[I] + p[I], M = ((v << 30 | v >>> 2) ^ (v << 19 | v >>> 13) ^ (v << 10 | v >>> 22)) + (v & y ^ v &
|
|
530
|
+
H = w + ((S << 26 | S >>> 6) ^ (S << 21 | S >>> 11) ^ (S << 7 | S >>> 25)) + (S & R ^ ~S & C) + s[I] + p[I], M = ((v << 30 | v >>> 2) ^ (v << 19 | v >>> 13) ^ (v << 10 | v >>> 22)) + (v & y ^ v & T ^ y & T), w = C, C = R, R = S, S = b + H | 0, b = T, T = y, y = v, v = H + M | 0;
|
|
531
531
|
}
|
|
532
|
-
E[0] = E[0] + v | 0, E[1] = E[1] + y | 0, E[2] = E[2] +
|
|
532
|
+
E[0] = E[0] + v | 0, E[1] = E[1] + y | 0, E[2] = E[2] + T | 0, E[3] = E[3] + b | 0, E[4] = E[4] + S | 0, E[5] = E[5] + R | 0, E[6] = E[6] + C | 0, E[7] = E[7] + w | 0;
|
|
533
533
|
},
|
|
534
534
|
_doFinalize: function() {
|
|
535
535
|
var A = this._data, g = A.words, E = 8 * this._nDataBytes, v = 8 * A.sigBytes;
|
|
@@ -587,8 +587,8 @@ CryptoJS.lib.Cipher || (function(n) {
|
|
|
587
587
|
var h = m.mode = {}, c = function(g, E, v) {
|
|
588
588
|
var y = this._iv;
|
|
589
589
|
y ? this._iv = n : y = this._prevBlock;
|
|
590
|
-
for (var
|
|
591
|
-
g[E +
|
|
590
|
+
for (var T = 0; T < v; T++)
|
|
591
|
+
g[E + T] ^= y[T];
|
|
592
592
|
}, f = (t.BlockCipherMode = e.extend({
|
|
593
593
|
createEncryptor: function(g, E) {
|
|
594
594
|
return this.Encryptor.create(g, E);
|
|
@@ -607,14 +607,14 @@ CryptoJS.lib.Cipher || (function(n) {
|
|
|
607
607
|
}
|
|
608
608
|
}), f.Decryptor = f.extend({
|
|
609
609
|
processBlock: function(g, E) {
|
|
610
|
-
var v = this._cipher, y = v.blockSize,
|
|
611
|
-
v.decryptBlock(g, E), c.call(this, g, E, y), this._prevBlock =
|
|
610
|
+
var v = this._cipher, y = v.blockSize, T = g.slice(E, E + y);
|
|
611
|
+
v.decryptBlock(g, E), c.call(this, g, E, y), this._prevBlock = T;
|
|
612
612
|
}
|
|
613
613
|
}), h = h.CBC = f, f = (m.pad = {}).Pkcs7 = {
|
|
614
614
|
pad: function(g, E) {
|
|
615
|
-
for (var v = 4 * E, v = v - g.sigBytes % v, y = v << 24 | v << 16 | v << 8 | v,
|
|
616
|
-
|
|
617
|
-
v = r.create(
|
|
615
|
+
for (var v = 4 * E, v = v - g.sigBytes % v, y = v << 24 | v << 16 | v << 8 | v, T = [], b = 0; b < v; b += 4)
|
|
616
|
+
T.push(y);
|
|
617
|
+
v = r.create(T, v), g.concat(v);
|
|
618
618
|
},
|
|
619
619
|
unpad: function(g) {
|
|
620
620
|
g.sigBytes -= g.words[g.sigBytes - 1 >>> 2] & 255;
|
|
@@ -677,14 +677,14 @@ CryptoJS.lib.Cipher || (function(n) {
|
|
|
677
677
|
}),
|
|
678
678
|
encrypt: function(g, E, v, y) {
|
|
679
679
|
y = this.cfg.extend(y);
|
|
680
|
-
var
|
|
681
|
-
return E =
|
|
680
|
+
var T = g.createEncryptor(v, y);
|
|
681
|
+
return E = T.finalize(E), T = T.cfg, d.create({
|
|
682
682
|
ciphertext: E,
|
|
683
683
|
key: v,
|
|
684
|
-
iv:
|
|
684
|
+
iv: T.iv,
|
|
685
685
|
algorithm: g,
|
|
686
|
-
mode:
|
|
687
|
-
padding:
|
|
686
|
+
mode: T.mode,
|
|
687
|
+
padding: T.padding,
|
|
688
688
|
blockSize: g.blockSize,
|
|
689
689
|
formatter: y.format
|
|
690
690
|
});
|
|
@@ -723,8 +723,8 @@ CryptoJS.lib.Cipher || (function(n) {
|
|
|
723
723
|
for (var A = 0, g = 0, m = 0; 256 > m; m++) {
|
|
724
724
|
var E = g ^ g << 1 ^ g << 2 ^ g << 3 ^ g << 4, E = E >>> 8 ^ E & 255 ^ 99;
|
|
725
725
|
e[A] = E, r[E] = A;
|
|
726
|
-
var v = p[A], y = p[v],
|
|
727
|
-
o[A] =
|
|
726
|
+
var v = p[A], y = p[v], T = p[y], b = 257 * p[E] ^ 16843008 * E;
|
|
727
|
+
o[A] = b << 24 | b >>> 8, s[A] = b << 16 | b >>> 16, u[A] = b << 8 | b >>> 24, l[A] = b, b = 16843009 * T ^ 65537 * y ^ 257 * v ^ 16843008 * A, c[E] = b << 24 | b >>> 8, f[E] = b << 16 | b >>> 16, d[E] = b << 8 | b >>> 24, h[E] = b, A ? (A = v ^ p[p[p[T ^ v]]], g ^= p[p[g]]) : A = g = 1;
|
|
728
728
|
}
|
|
729
729
|
var S = [
|
|
730
730
|
0,
|
|
@@ -1715,10 +1715,10 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1715
1715
|
}, e = function(A, g, E) {
|
|
1716
1716
|
return r(CryptoJS.DES, A, g, E);
|
|
1717
1717
|
}, r = function(A, g, E, v) {
|
|
1718
|
-
var y = CryptoJS.enc.Hex.parse(g),
|
|
1719
|
-
S.key =
|
|
1720
|
-
var R = A.decrypt(S,
|
|
1721
|
-
iv:
|
|
1718
|
+
var y = CryptoJS.enc.Hex.parse(g), T = CryptoJS.enc.Hex.parse(E), b = CryptoJS.enc.Hex.parse(v), S = {};
|
|
1719
|
+
S.key = T, S.iv = b, S.ciphertext = y;
|
|
1720
|
+
var R = A.decrypt(S, T, {
|
|
1721
|
+
iv: b
|
|
1722
1722
|
});
|
|
1723
1723
|
return CryptoJS.enc.Hex.stringify(R);
|
|
1724
1724
|
}, o = function(A, g, E) {
|
|
@@ -1728,8 +1728,8 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1728
1728
|
}, u = function(A, g, E) {
|
|
1729
1729
|
return l(CryptoJS.DES, A, g, E);
|
|
1730
1730
|
}, l = function(A, g, E, v) {
|
|
1731
|
-
var y = CryptoJS.enc.Hex.parse(g),
|
|
1732
|
-
iv:
|
|
1731
|
+
var y = CryptoJS.enc.Hex.parse(g), T = CryptoJS.enc.Hex.parse(E), b = CryptoJS.enc.Hex.parse(v), S = A.encrypt(y, T, {
|
|
1732
|
+
iv: b
|
|
1733
1733
|
}), R = CryptoJS.enc.Hex.parse(S.toString()), C = CryptoJS.enc.Base64.stringify(R);
|
|
1734
1734
|
return C;
|
|
1735
1735
|
}, c = {
|
|
@@ -1771,36 +1771,36 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1771
1771
|
E && (g.cipher = E[1], g.ivsalt = E[2]);
|
|
1772
1772
|
var v = A.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));
|
|
1773
1773
|
v && (g.type = v[1]);
|
|
1774
|
-
var y = -1,
|
|
1774
|
+
var y = -1, T = 0;
|
|
1775
1775
|
A.indexOf(`\r
|
|
1776
1776
|
\r
|
|
1777
1777
|
`) != -1 && (y = A.indexOf(`\r
|
|
1778
1778
|
\r
|
|
1779
|
-
`),
|
|
1779
|
+
`), T = 2), A.indexOf(`
|
|
1780
1780
|
|
|
1781
1781
|
`) != -1 && (y = A.indexOf(`
|
|
1782
1782
|
|
|
1783
|
-
`),
|
|
1784
|
-
var
|
|
1785
|
-
if (y != -1 &&
|
|
1786
|
-
var S = A.substring(y +
|
|
1783
|
+
`), T = 1);
|
|
1784
|
+
var b = A.indexOf("-----END");
|
|
1785
|
+
if (y != -1 && b != -1) {
|
|
1786
|
+
var S = A.substring(y + T * 2, b - T);
|
|
1787
1787
|
S = S.replace(/\s+/g, ""), g.data = S;
|
|
1788
1788
|
}
|
|
1789
1789
|
return g;
|
|
1790
1790
|
}, h = function(A, g, E) {
|
|
1791
|
-
for (var v = E.substring(0, 16), y = CryptoJS.enc.Hex.parse(v),
|
|
1791
|
+
for (var v = E.substring(0, 16), y = CryptoJS.enc.Hex.parse(v), T = CryptoJS.enc.Utf8.parse(g), b = c[A].keylen + c[A].ivlen, S = "", R = null; ; ) {
|
|
1792
1792
|
var C = CryptoJS.algo.MD5.create();
|
|
1793
|
-
if (R != null && C.update(R), C.update(
|
|
1793
|
+
if (R != null && C.update(R), C.update(T), C.update(y), R = C.finalize(), S = S + CryptoJS.enc.Hex.stringify(R), S.length >= b * 2)
|
|
1794
1794
|
break;
|
|
1795
1795
|
}
|
|
1796
1796
|
var w = {};
|
|
1797
1797
|
return w.keyhex = S.substr(0, c[A].keylen * 2), w.ivhex = S.substr(c[A].keylen * 2, c[A].ivlen * 2), w;
|
|
1798
1798
|
}, p = function(A, g, E, v) {
|
|
1799
|
-
var y = CryptoJS.enc.Base64.parse(A),
|
|
1799
|
+
var y = CryptoJS.enc.Base64.parse(A), T = CryptoJS.enc.Hex.stringify(y), b = c[g].proc, S = b(T, E, v);
|
|
1800
1800
|
return S;
|
|
1801
1801
|
}, m = function(A, g, E, v) {
|
|
1802
|
-
var y = c[g].eproc,
|
|
1803
|
-
return
|
|
1802
|
+
var y = c[g].eproc, T = y(A, E, v);
|
|
1803
|
+
return T;
|
|
1804
1804
|
};
|
|
1805
1805
|
return {
|
|
1806
1806
|
version: "1.0.0",
|
|
@@ -1814,7 +1814,7 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1814
1814
|
return p(A, g, E, v);
|
|
1815
1815
|
},
|
|
1816
1816
|
getDecryptedKeyHex: function(A, g) {
|
|
1817
|
-
var E = d(A), v = E.cipher, y = E.ivsalt,
|
|
1817
|
+
var E = d(A), v = E.cipher, y = E.ivsalt, T = E.data, b = h(v, g, y), S = b.keyhex, R = p(T, v, S, y);
|
|
1818
1818
|
return R;
|
|
1819
1819
|
},
|
|
1820
1820
|
getEncryptedPKCS5PEMFromPrvKeyHex: function(A, g, E, v, y) {
|
|
@@ -1822,8 +1822,8 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1822
1822
|
if ((typeof v == "undefined" || v == null) && (v = "AES-256-CBC"), typeof c[v] == "undefined")
|
|
1823
1823
|
throw "KEYUTIL unsupported algorithm: " + v;
|
|
1824
1824
|
if (typeof y == "undefined" || y == null) {
|
|
1825
|
-
var
|
|
1826
|
-
y =
|
|
1825
|
+
var T = c[v].ivlen, b = f(T);
|
|
1826
|
+
y = b.toUpperCase();
|
|
1827
1827
|
}
|
|
1828
1828
|
var S = h(v, E, y), R = S.keyhex, C = m(g, v, R, y), w = C.replace(/(.{64})/g, `$1\r
|
|
1829
1829
|
`), I = "-----BEGIN " + A + ` PRIVATE KEY-----\r
|
|
@@ -1836,17 +1836,17 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1836
1836
|
`, I;
|
|
1837
1837
|
},
|
|
1838
1838
|
parseHexOfEncryptedPKCS8: function(A) {
|
|
1839
|
-
var g = ASN1HEX, E = g.getChildIdx, v = g.getV, y = {},
|
|
1840
|
-
if (b.length != 2)
|
|
1841
|
-
throw "malformed format: SEQUENCE(0).items != 2: " + b.length;
|
|
1842
|
-
y.ciphertext = v(A, b[1]);
|
|
1843
|
-
var T = E(A, b[0]);
|
|
1839
|
+
var g = ASN1HEX, E = g.getChildIdx, v = g.getV, y = {}, T = E(A, 0);
|
|
1844
1840
|
if (T.length != 2)
|
|
1845
|
-
throw "malformed format: SEQUENCE(0
|
|
1846
|
-
|
|
1841
|
+
throw "malformed format: SEQUENCE(0).items != 2: " + T.length;
|
|
1842
|
+
y.ciphertext = v(A, T[1]);
|
|
1843
|
+
var b = E(A, T[0]);
|
|
1844
|
+
if (b.length != 2)
|
|
1845
|
+
throw "malformed format: SEQUENCE(0.0).items != 2: " + b.length;
|
|
1846
|
+
if (v(A, b[0]) != "2a864886f70d01050d")
|
|
1847
1847
|
throw "this only supports pkcs5PBES2";
|
|
1848
|
-
var S = E(A,
|
|
1849
|
-
if (
|
|
1848
|
+
var S = E(A, b[1]);
|
|
1849
|
+
if (b.length != 2)
|
|
1850
1850
|
throw "malformed format: SEQUENCE(0.0.1).items != 2: " + S.length;
|
|
1851
1851
|
var R = E(A, S[1]);
|
|
1852
1852
|
if (R.length != 2)
|
|
@@ -1875,13 +1875,13 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1875
1875
|
var E = CryptoJS.enc.Hex.parse(A.pbkdf2Salt), v = A.pbkdf2Iter, y = CryptoJS.PBKDF2(g, E, {
|
|
1876
1876
|
keySize: 192 / 32,
|
|
1877
1877
|
iterations: v
|
|
1878
|
-
}),
|
|
1879
|
-
return
|
|
1878
|
+
}), T = CryptoJS.enc.Hex.stringify(y);
|
|
1879
|
+
return T;
|
|
1880
1880
|
},
|
|
1881
1881
|
_getPlainPKCS8HexFromEncryptedPKCS8PEM: function(A, g) {
|
|
1882
|
-
var E = pemtohex(A, "ENCRYPTED PRIVATE KEY"), v = this.parseHexOfEncryptedPKCS8(E), y = KEYUTIL.getPBKDF2KeyHexFromParam(v, g),
|
|
1883
|
-
|
|
1884
|
-
var
|
|
1882
|
+
var E = pemtohex(A, "ENCRYPTED PRIVATE KEY"), v = this.parseHexOfEncryptedPKCS8(E), y = KEYUTIL.getPBKDF2KeyHexFromParam(v, g), T = {};
|
|
1883
|
+
T.ciphertext = CryptoJS.enc.Hex.parse(v.ciphertext);
|
|
1884
|
+
var b = CryptoJS.enc.Hex.parse(y), S = CryptoJS.enc.Hex.parse(v.encryptionSchemeIV), R = CryptoJS.TripleDES.decrypt(T, b, {
|
|
1885
1885
|
iv: S
|
|
1886
1886
|
}), C = CryptoJS.enc.Hex.stringify(R);
|
|
1887
1887
|
return C;
|
|
@@ -1894,19 +1894,19 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1894
1894
|
var g = ASN1HEX, E = g.getChildIdx, v = g.getV, y = {};
|
|
1895
1895
|
if (y.algparam = null, A.substr(0, 2) != "30")
|
|
1896
1896
|
throw new Error("malformed plain PKCS8 private key(code:001)");
|
|
1897
|
-
var
|
|
1898
|
-
if (
|
|
1897
|
+
var T = E(A, 0);
|
|
1898
|
+
if (T.length < 3)
|
|
1899
1899
|
throw new Error("malformed plain PKCS8 private key(code:002)");
|
|
1900
|
-
if (A.substr(
|
|
1900
|
+
if (A.substr(T[1], 2) != "30")
|
|
1901
1901
|
throw new Error("malformed PKCS8 private key(code:003)");
|
|
1902
|
-
var
|
|
1903
|
-
if (
|
|
1902
|
+
var b = E(A, T[1]);
|
|
1903
|
+
if (b.length != 2)
|
|
1904
1904
|
throw new Error("malformed PKCS8 private key(code:004)");
|
|
1905
|
-
if (A.substr(
|
|
1905
|
+
if (A.substr(b[0], 2) != "06")
|
|
1906
1906
|
throw new Error("malformed PKCS8 private key(code:005)");
|
|
1907
|
-
if (y.algoid = v(A,
|
|
1907
|
+
if (y.algoid = v(A, b[0]), A.substr(b[1], 2) == "06" && (y.algparam = v(A, b[1])), A.substr(T[2], 2) != "04")
|
|
1908
1908
|
throw new Error("malformed PKCS8 private key(code:006)");
|
|
1909
|
-
return y.keyidx = g.getVidx(A,
|
|
1909
|
+
return y.keyidx = g.getVidx(A, T[2]), y;
|
|
1910
1910
|
},
|
|
1911
1911
|
getKeyFromPlainPrivatePKCS8PEM: function(A) {
|
|
1912
1912
|
var g = pemtohex(A, "PRIVATE KEY"), E = this.getKeyFromPlainPrivatePKCS8Hex(g);
|
|
@@ -1940,32 +1940,32 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1940
1940
|
var g = ASN1HEX, E = g.getChildIdx, v = g.getV, y = {};
|
|
1941
1941
|
if (A.substr(0, 2) != "30")
|
|
1942
1942
|
throw "malformed RSA key(code:001)";
|
|
1943
|
-
var
|
|
1944
|
-
if (
|
|
1943
|
+
var T = E(A, 0);
|
|
1944
|
+
if (T.length != 2)
|
|
1945
1945
|
throw "malformed RSA key(code:002)";
|
|
1946
|
-
if (A.substr(
|
|
1946
|
+
if (A.substr(T[0], 2) != "02")
|
|
1947
1947
|
throw "malformed RSA key(code:003)";
|
|
1948
|
-
if (y.n = v(A,
|
|
1948
|
+
if (y.n = v(A, T[0]), A.substr(T[1], 2) != "02")
|
|
1949
1949
|
throw "malformed RSA key(code:004)";
|
|
1950
|
-
return y.e = v(A,
|
|
1950
|
+
return y.e = v(A, T[1]), y;
|
|
1951
1951
|
},
|
|
1952
1952
|
parsePublicPKCS8Hex: function(A) {
|
|
1953
1953
|
var g = ASN1HEX, E = g.getChildIdx, v = g.getV, y = {};
|
|
1954
1954
|
y.algparam = null;
|
|
1955
|
-
var
|
|
1956
|
-
if (
|
|
1957
|
-
throw "outer DERSequence shall have 2 elements: " +
|
|
1958
|
-
var
|
|
1959
|
-
if (A.substr(
|
|
1955
|
+
var T = E(A, 0);
|
|
1956
|
+
if (T.length != 2)
|
|
1957
|
+
throw "outer DERSequence shall have 2 elements: " + T.length;
|
|
1958
|
+
var b = T[0];
|
|
1959
|
+
if (A.substr(b, 2) != "30")
|
|
1960
1960
|
throw "malformed PKCS8 public key(code:001)";
|
|
1961
|
-
var S = E(A,
|
|
1961
|
+
var S = E(A, b);
|
|
1962
1962
|
if (S.length != 2)
|
|
1963
1963
|
throw "malformed PKCS8 public key(code:002)";
|
|
1964
1964
|
if (A.substr(S[0], 2) != "06")
|
|
1965
1965
|
throw "malformed PKCS8 public key(code:003)";
|
|
1966
|
-
if (y.algoid = v(A, S[0]), A.substr(S[1], 2) == "06" ? y.algparam = v(A, S[1]) : A.substr(S[1], 2) == "30" && (y.algparam = {}, y.algparam.p = g.getVbyList(A, S[1], [0], "02"), y.algparam.q = g.getVbyList(A, S[1], [1], "02"), y.algparam.g = g.getVbyList(A, S[1], [2], "02")), A.substr(
|
|
1966
|
+
if (y.algoid = v(A, S[0]), A.substr(S[1], 2) == "06" ? y.algparam = v(A, S[1]) : A.substr(S[1], 2) == "30" && (y.algparam = {}, y.algparam.p = g.getVbyList(A, S[1], [0], "02"), y.algparam.q = g.getVbyList(A, S[1], [1], "02"), y.algparam.g = g.getVbyList(A, S[1], [2], "02")), A.substr(T[1], 2) != "03")
|
|
1967
1967
|
throw "malformed PKCS8 public key(code:004)";
|
|
1968
|
-
return y.key = v(A,
|
|
1968
|
+
return y.key = v(A, T[1]).substr(2), y;
|
|
1969
1969
|
}
|
|
1970
1970
|
};
|
|
1971
1971
|
})();
|
|
@@ -2030,13 +2030,13 @@ KEYUTIL.getKey = function(n, t, e) {
|
|
|
2030
2030
|
return m.setPublicKeyHex(v), m.setPrivateKeyHex(y), m;
|
|
2031
2031
|
}
|
|
2032
2032
|
if (e === "pkcs5prv") {
|
|
2033
|
-
var
|
|
2034
|
-
if (
|
|
2035
|
-
p = new f(), p.readPKCS5PrvKeyHex(
|
|
2036
|
-
else if (
|
|
2037
|
-
p = new c(), p.readPKCS5PrvKeyHex(
|
|
2038
|
-
else if (
|
|
2039
|
-
p = new l(), p.readPKCS5PrvKeyHex(
|
|
2033
|
+
var T = n, r = ASN1HEX, b, p;
|
|
2034
|
+
if (b = o(T, 0), b.length === 9)
|
|
2035
|
+
p = new f(), p.readPKCS5PrvKeyHex(T);
|
|
2036
|
+
else if (b.length === 6)
|
|
2037
|
+
p = new c(), p.readPKCS5PrvKeyHex(T);
|
|
2038
|
+
else if (b.length > 2 && T.substr(b[1], 2) === "04")
|
|
2039
|
+
p = new l(), p.readPKCS5PrvKeyHex(T);
|
|
2040
2040
|
else
|
|
2041
2041
|
throw "unsupported PKCS#1/5 hexadecimal key";
|
|
2042
2042
|
return p;
|
|
@@ -2651,10 +2651,10 @@ function X509(n) {
|
|
|
2651
2651
|
return this.version;
|
|
2652
2652
|
var v = l(this.hex, 0, [0, 0]);
|
|
2653
2653
|
if (v.substr(0, 2) == "a0") {
|
|
2654
|
-
var y = l(v, 0, [0]),
|
|
2655
|
-
if (
|
|
2654
|
+
var y = l(v, 0, [0]), T = p(y, 0);
|
|
2655
|
+
if (T < 0 || 2 < T)
|
|
2656
2656
|
throw new Error("malformed version field");
|
|
2657
|
-
return this.version =
|
|
2657
|
+
return this.version = T + 1, this.version;
|
|
2658
2658
|
} else
|
|
2659
2659
|
return this.version = 1, this.foffset = -1, 1;
|
|
2660
2660
|
}, this.getSerialNumberHex = function() {
|
|
@@ -2702,71 +2702,71 @@ function X509(n) {
|
|
|
2702
2702
|
}, this.getSignatureValueHex = function() {
|
|
2703
2703
|
return s(this.hex, 0, [2], "03", !0);
|
|
2704
2704
|
}, this.verifySignature = function(v) {
|
|
2705
|
-
var y = this.getSignatureAlgorithmField(),
|
|
2705
|
+
var y = this.getSignatureAlgorithmField(), T = this.getSignatureValueHex(), b = l(this.hex, 0, [0], "30"), S = new KJUR.crypto.Signature({
|
|
2706
2706
|
alg: y
|
|
2707
2707
|
});
|
|
2708
|
-
return S.init(v), S.updateHex(
|
|
2708
|
+
return S.init(v), S.updateHex(b), S.verify(T);
|
|
2709
2709
|
}, this.parseExt = function(v) {
|
|
2710
|
-
var y,
|
|
2710
|
+
var y, T, b;
|
|
2711
2711
|
if (v === void 0) {
|
|
2712
|
-
if (
|
|
2712
|
+
if (b = this.hex, this.version !== 3)
|
|
2713
2713
|
return -1;
|
|
2714
|
-
y = f(
|
|
2714
|
+
y = f(b, 0, [0, 7, 0], "30"), T = e(b, y);
|
|
2715
2715
|
} else {
|
|
2716
|
-
|
|
2717
|
-
var S = f(
|
|
2718
|
-
if (r(
|
|
2716
|
+
b = pemtohex(v);
|
|
2717
|
+
var S = f(b, 0, [0, 3, 0, 0], "06");
|
|
2718
|
+
if (r(b, S) != "2a864886f70d01090e") {
|
|
2719
2719
|
this.aExtInfo = new Array();
|
|
2720
2720
|
return;
|
|
2721
2721
|
}
|
|
2722
|
-
y = f(
|
|
2722
|
+
y = f(b, 0, [0, 3, 0, 1, 0], "30"), T = e(b, y), this.hex = b;
|
|
2723
2723
|
}
|
|
2724
2724
|
this.aExtInfo = new Array();
|
|
2725
|
-
for (var R = 0; R <
|
|
2725
|
+
for (var R = 0; R < T.length; R++) {
|
|
2726
2726
|
var C = {};
|
|
2727
2727
|
C.critical = !1;
|
|
2728
|
-
var w = e(
|
|
2729
|
-
w.length === 3 && (C.critical = !0, I = 1), C.oid = t.hextooidstr(s(
|
|
2730
|
-
var H = f(
|
|
2731
|
-
C.vidx = h(
|
|
2728
|
+
var w = e(b, T[R]), I = 0;
|
|
2729
|
+
w.length === 3 && (C.critical = !0, I = 1), C.oid = t.hextooidstr(s(b, T[R], [0], "06"));
|
|
2730
|
+
var H = f(b, T[R], [1 + I]);
|
|
2731
|
+
C.vidx = h(b, H), this.aExtInfo.push(C);
|
|
2732
2732
|
}
|
|
2733
2733
|
}, this.getExtInfo = function(v) {
|
|
2734
|
-
var y = this.aExtInfo,
|
|
2735
|
-
if (v.match(/^[0-9.]+$/) || (
|
|
2736
|
-
for (var
|
|
2737
|
-
if (y[
|
|
2738
|
-
return y[
|
|
2734
|
+
var y = this.aExtInfo, T = v;
|
|
2735
|
+
if (v.match(/^[0-9.]+$/) || (T = KJUR.asn1.x509.OID.name2oid(v)), T !== "") {
|
|
2736
|
+
for (var b = 0; b < y.length; b++)
|
|
2737
|
+
if (y[b].oid === T)
|
|
2738
|
+
return y[b];
|
|
2739
2739
|
}
|
|
2740
2740
|
}, this.getExtBasicConstraints = function(v, y) {
|
|
2741
2741
|
if (v === void 0 && y === void 0) {
|
|
2742
|
-
var
|
|
2743
|
-
if (
|
|
2742
|
+
var T = this.getExtInfo("basicConstraints");
|
|
2743
|
+
if (T === void 0)
|
|
2744
2744
|
return;
|
|
2745
|
-
v = o(this.hex,
|
|
2745
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
2746
2746
|
}
|
|
2747
|
-
var
|
|
2747
|
+
var b = {
|
|
2748
2748
|
extname: "basicConstraints"
|
|
2749
2749
|
};
|
|
2750
|
-
if (y && (
|
|
2751
|
-
return
|
|
2750
|
+
if (y && (b.critical = !0), v === "3000")
|
|
2751
|
+
return b;
|
|
2752
2752
|
if (v === "30030101ff")
|
|
2753
|
-
return
|
|
2753
|
+
return b.cA = !0, b;
|
|
2754
2754
|
if (v.substr(0, 12) === "30060101ff02") {
|
|
2755
2755
|
var S = r(v, 10), R = parseInt(S, 16);
|
|
2756
|
-
return
|
|
2756
|
+
return b.cA = !0, b.pathLen = R, b;
|
|
2757
2757
|
}
|
|
2758
2758
|
throw new Error("hExtV parse error: " + v);
|
|
2759
2759
|
}, this.getExtKeyUsage = function(v, y) {
|
|
2760
2760
|
if (v === void 0 && y === void 0) {
|
|
2761
|
-
var
|
|
2762
|
-
if (
|
|
2761
|
+
var T = this.getExtInfo("keyUsage");
|
|
2762
|
+
if (T === void 0)
|
|
2763
2763
|
return;
|
|
2764
|
-
v = o(this.hex,
|
|
2764
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
2765
2765
|
}
|
|
2766
|
-
var
|
|
2766
|
+
var b = {
|
|
2767
2767
|
extname: "keyUsage"
|
|
2768
2768
|
};
|
|
2769
|
-
return y && (
|
|
2769
|
+
return y && (b.critical = !0), b.names = this.getExtKeyUsageString(v).split(","), b;
|
|
2770
2770
|
}, this.getExtKeyUsageBin = function(v) {
|
|
2771
2771
|
if (v === void 0) {
|
|
2772
2772
|
var y = this.getExtInfo("keyUsage");
|
|
@@ -2776,161 +2776,161 @@ function X509(n) {
|
|
|
2776
2776
|
}
|
|
2777
2777
|
if (v.length != 8 && v.length != 10)
|
|
2778
2778
|
throw new Error("malformed key usage value: " + v);
|
|
2779
|
-
var
|
|
2780
|
-
return v.length == 8 && (
|
|
2779
|
+
var T = "000000000000000" + parseInt(v.substr(6), 16).toString(2);
|
|
2780
|
+
return v.length == 8 && (T = T.slice(-8)), v.length == 10 && (T = T.slice(-16)), T = T.replace(/0+$/, ""), T == "" && (T = "0"), T;
|
|
2781
2781
|
}, this.getExtKeyUsageString = function(v) {
|
|
2782
|
-
for (var y = this.getExtKeyUsageBin(v),
|
|
2783
|
-
y.substr(
|
|
2784
|
-
return
|
|
2782
|
+
for (var y = this.getExtKeyUsageBin(v), T = new Array(), b = 0; b < y.length; b++)
|
|
2783
|
+
y.substr(b, 1) == "1" && T.push(X509.KEYUSAGE_NAME[b]);
|
|
2784
|
+
return T.join(",");
|
|
2785
2785
|
}, this.getExtSubjectKeyIdentifier = function(v, y) {
|
|
2786
2786
|
if (v === void 0 && y === void 0) {
|
|
2787
|
-
var
|
|
2788
|
-
if (
|
|
2787
|
+
var T = this.getExtInfo("subjectKeyIdentifier");
|
|
2788
|
+
if (T === void 0)
|
|
2789
2789
|
return;
|
|
2790
|
-
v = o(this.hex,
|
|
2790
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
2791
2791
|
}
|
|
2792
|
-
var
|
|
2792
|
+
var b = {
|
|
2793
2793
|
extname: "subjectKeyIdentifier"
|
|
2794
2794
|
};
|
|
2795
|
-
y && (
|
|
2795
|
+
y && (b.critical = !0);
|
|
2796
2796
|
var S = r(v, 0);
|
|
2797
|
-
return
|
|
2797
|
+
return b.kid = {
|
|
2798
2798
|
hex: S
|
|
2799
|
-
},
|
|
2799
|
+
}, b;
|
|
2800
2800
|
}, this.getExtAuthorityKeyIdentifier = function(v, y) {
|
|
2801
2801
|
if (v === void 0 && y === void 0) {
|
|
2802
|
-
var
|
|
2803
|
-
if (
|
|
2802
|
+
var T = this.getExtInfo("authorityKeyIdentifier");
|
|
2803
|
+
if (T === void 0)
|
|
2804
2804
|
return;
|
|
2805
|
-
v = o(this.hex,
|
|
2805
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
2806
2806
|
}
|
|
2807
|
-
var
|
|
2807
|
+
var b = {
|
|
2808
2808
|
extname: "authorityKeyIdentifier"
|
|
2809
2809
|
};
|
|
2810
|
-
y && (
|
|
2810
|
+
y && (b.critical = !0);
|
|
2811
2811
|
for (var S = e(v, 0), R = 0; R < S.length; R++) {
|
|
2812
2812
|
var C = v.substr(S[R], 2);
|
|
2813
|
-
if (C === "80" && (
|
|
2813
|
+
if (C === "80" && (b.kid = {
|
|
2814
2814
|
hex: r(v, S[R])
|
|
2815
2815
|
}), C === "a1") {
|
|
2816
2816
|
var w = o(v, S[R]), I = this.getGeneralNames(w);
|
|
2817
|
-
|
|
2817
|
+
b.issuer = I[0].dn;
|
|
2818
2818
|
}
|
|
2819
|
-
C === "82" && (
|
|
2819
|
+
C === "82" && (b.sn = {
|
|
2820
2820
|
hex: r(v, S[R])
|
|
2821
2821
|
});
|
|
2822
2822
|
}
|
|
2823
|
-
return
|
|
2823
|
+
return b;
|
|
2824
2824
|
}, this.getExtExtKeyUsage = function(v, y) {
|
|
2825
2825
|
if (v === void 0 && y === void 0) {
|
|
2826
|
-
var
|
|
2827
|
-
if (
|
|
2826
|
+
var T = this.getExtInfo("extKeyUsage");
|
|
2827
|
+
if (T === void 0)
|
|
2828
2828
|
return;
|
|
2829
|
-
v = o(this.hex,
|
|
2829
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
2830
2830
|
}
|
|
2831
|
-
var
|
|
2831
|
+
var b = {
|
|
2832
2832
|
extname: "extKeyUsage",
|
|
2833
2833
|
array: []
|
|
2834
2834
|
};
|
|
2835
|
-
y && (
|
|
2835
|
+
y && (b.critical = !0);
|
|
2836
2836
|
for (var S = e(v, 0), R = 0; R < S.length; R++)
|
|
2837
|
-
|
|
2838
|
-
return
|
|
2837
|
+
b.array.push(m(r(v, S[R])));
|
|
2838
|
+
return b;
|
|
2839
2839
|
}, this.getExtExtKeyUsageName = function() {
|
|
2840
2840
|
var v = this.getExtInfo("extKeyUsage");
|
|
2841
2841
|
if (v === void 0)
|
|
2842
2842
|
return v;
|
|
2843
|
-
var y = new Array(),
|
|
2844
|
-
if (
|
|
2843
|
+
var y = new Array(), T = o(this.hex, v.vidx);
|
|
2844
|
+
if (T === "")
|
|
2845
2845
|
return y;
|
|
2846
|
-
for (var
|
|
2847
|
-
y.push(m(r(
|
|
2846
|
+
for (var b = e(T, 0), S = 0; S < b.length; S++)
|
|
2847
|
+
y.push(m(r(T, b[S])));
|
|
2848
2848
|
return y;
|
|
2849
2849
|
}, this.getExtSubjectAltName = function(v, y) {
|
|
2850
2850
|
if (v === void 0 && y === void 0) {
|
|
2851
|
-
var
|
|
2852
|
-
if (
|
|
2851
|
+
var T = this.getExtInfo("subjectAltName");
|
|
2852
|
+
if (T === void 0)
|
|
2853
2853
|
return;
|
|
2854
|
-
v = o(this.hex,
|
|
2854
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
2855
2855
|
}
|
|
2856
|
-
var
|
|
2856
|
+
var b = {
|
|
2857
2857
|
extname: "subjectAltName",
|
|
2858
2858
|
array: []
|
|
2859
2859
|
};
|
|
2860
|
-
return y && (
|
|
2860
|
+
return y && (b.critical = !0), b.array = this.getGeneralNames(v), b;
|
|
2861
2861
|
}, this.getExtIssuerAltName = function(v, y) {
|
|
2862
2862
|
if (v === void 0 && y === void 0) {
|
|
2863
|
-
var
|
|
2864
|
-
if (
|
|
2863
|
+
var T = this.getExtInfo("issuerAltName");
|
|
2864
|
+
if (T === void 0)
|
|
2865
2865
|
return;
|
|
2866
|
-
v = o(this.hex,
|
|
2866
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
2867
2867
|
}
|
|
2868
|
-
var
|
|
2868
|
+
var b = {
|
|
2869
2869
|
extname: "issuerAltName",
|
|
2870
2870
|
array: []
|
|
2871
2871
|
};
|
|
2872
|
-
return y && (
|
|
2872
|
+
return y && (b.critical = !0), b.array = this.getGeneralNames(v), b;
|
|
2873
2873
|
}, this.getGeneralNames = function(v) {
|
|
2874
|
-
for (var y = e(v, 0),
|
|
2875
|
-
var S = this.getGeneralName(o(v, y[
|
|
2876
|
-
S !== void 0 &&
|
|
2874
|
+
for (var y = e(v, 0), T = [], b = 0; b < y.length; b++) {
|
|
2875
|
+
var S = this.getGeneralName(o(v, y[b]));
|
|
2876
|
+
S !== void 0 && T.push(S);
|
|
2877
2877
|
}
|
|
2878
|
-
return
|
|
2878
|
+
return T;
|
|
2879
2879
|
}, this.getGeneralName = function(v) {
|
|
2880
|
-
var y = v.substr(0, 2),
|
|
2880
|
+
var y = v.substr(0, 2), T = r(v, 0), b = hextorstr(T);
|
|
2881
2881
|
if (y == "81")
|
|
2882
2882
|
return {
|
|
2883
|
-
rfc822:
|
|
2883
|
+
rfc822: b
|
|
2884
2884
|
};
|
|
2885
2885
|
if (y == "82")
|
|
2886
2886
|
return {
|
|
2887
|
-
dns:
|
|
2887
|
+
dns: b
|
|
2888
2888
|
};
|
|
2889
2889
|
if (y == "86")
|
|
2890
2890
|
return {
|
|
2891
|
-
uri:
|
|
2891
|
+
uri: b
|
|
2892
2892
|
};
|
|
2893
2893
|
if (y == "87")
|
|
2894
2894
|
return {
|
|
2895
|
-
ip: hextoip(
|
|
2895
|
+
ip: hextoip(T)
|
|
2896
2896
|
};
|
|
2897
2897
|
if (y == "a4")
|
|
2898
2898
|
return {
|
|
2899
|
-
dn: this.getX500Name(
|
|
2899
|
+
dn: this.getX500Name(T)
|
|
2900
2900
|
};
|
|
2901
2901
|
}, this.getExtSubjectAltName2 = function() {
|
|
2902
|
-
var v, y,
|
|
2903
|
-
if (
|
|
2904
|
-
return
|
|
2905
|
-
for (var S = new Array(), R = o(this.hex,
|
|
2906
|
-
|
|
2902
|
+
var v, y, T, b = this.getExtInfo("subjectAltName");
|
|
2903
|
+
if (b === void 0)
|
|
2904
|
+
return b;
|
|
2905
|
+
for (var S = new Array(), R = o(this.hex, b.vidx), C = e(R, 0), w = 0; w < C.length; w++)
|
|
2906
|
+
T = R.substr(C[w], 2), v = r(R, C[w]), T === "81" && (y = hextoutf8(v), S.push(["MAIL", y])), T === "82" && (y = hextoutf8(v), S.push(["DNS", y])), T === "84" && (y = X509.hex2dn(v, 0), S.push(["DN", y])), T === "86" && (y = hextoutf8(v), S.push(["URI", y])), T === "87" && (y = hextoip(v), S.push(["IP", y]));
|
|
2907
2907
|
return S;
|
|
2908
2908
|
}, this.getExtCRLDistributionPoints = function(v, y) {
|
|
2909
2909
|
if (v === void 0 && y === void 0) {
|
|
2910
|
-
var
|
|
2911
|
-
if (
|
|
2910
|
+
var T = this.getExtInfo("cRLDistributionPoints");
|
|
2911
|
+
if (T === void 0)
|
|
2912
2912
|
return;
|
|
2913
|
-
v = o(this.hex,
|
|
2913
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
2914
2914
|
}
|
|
2915
|
-
var
|
|
2915
|
+
var b = {
|
|
2916
2916
|
extname: "cRLDistributionPoints",
|
|
2917
2917
|
array: []
|
|
2918
2918
|
};
|
|
2919
|
-
y && (
|
|
2919
|
+
y && (b.critical = !0);
|
|
2920
2920
|
for (var S = e(v, 0), R = 0; R < S.length; R++) {
|
|
2921
2921
|
var C = o(v, S[R]);
|
|
2922
|
-
|
|
2922
|
+
b.array.push(this.getDistributionPoint(C));
|
|
2923
2923
|
}
|
|
2924
|
-
return
|
|
2924
|
+
return b;
|
|
2925
2925
|
}, this.getDistributionPoint = function(v) {
|
|
2926
|
-
for (var y = {},
|
|
2927
|
-
var S = v.substr(b
|
|
2926
|
+
for (var y = {}, T = e(v, 0), b = 0; b < T.length; b++) {
|
|
2927
|
+
var S = v.substr(T[b], 2), R = o(v, T[b]);
|
|
2928
2928
|
S == "a0" && (y.dpname = this.getDistributionPointName(R));
|
|
2929
2929
|
}
|
|
2930
2930
|
return y;
|
|
2931
2931
|
}, this.getDistributionPointName = function(v) {
|
|
2932
|
-
for (var y = {},
|
|
2933
|
-
var S = v.substr(b
|
|
2932
|
+
for (var y = {}, T = e(v, 0), b = 0; b < T.length; b++) {
|
|
2933
|
+
var S = v.substr(T[b], 2), R = o(v, T[b]);
|
|
2934
2934
|
S == "a0" && (y.full = this.getGeneralNames(R));
|
|
2935
2935
|
}
|
|
2936
2936
|
return y;
|
|
@@ -2938,9 +2938,9 @@ function X509(n) {
|
|
|
2938
2938
|
var v = this.getExtInfo("cRLDistributionPoints");
|
|
2939
2939
|
if (v === void 0)
|
|
2940
2940
|
return v;
|
|
2941
|
-
for (var y = new Array(),
|
|
2941
|
+
for (var y = new Array(), T = e(this.hex, v.vidx), b = 0; b < T.length; b++)
|
|
2942
2942
|
try {
|
|
2943
|
-
var S = s(this.hex, b
|
|
2943
|
+
var S = s(this.hex, T[b], [0, 0, 0], "86"), R = hextoutf8(S);
|
|
2944
2944
|
y.push(R);
|
|
2945
2945
|
} catch (C) {
|
|
2946
2946
|
}
|
|
@@ -2952,79 +2952,79 @@ function X509(n) {
|
|
|
2952
2952
|
for (var y = {
|
|
2953
2953
|
ocsp: [],
|
|
2954
2954
|
caissuer: []
|
|
2955
|
-
},
|
|
2956
|
-
var S = s(this.hex, b
|
|
2955
|
+
}, T = e(this.hex, v.vidx), b = 0; b < T.length; b++) {
|
|
2956
|
+
var S = s(this.hex, T[b], [0], "06"), R = s(this.hex, T[b], [1], "86");
|
|
2957
2957
|
S === "2b06010505073001" && y.ocsp.push(hextoutf8(R)), S === "2b06010505073002" && y.caissuer.push(hextoutf8(R));
|
|
2958
2958
|
}
|
|
2959
2959
|
return y;
|
|
2960
2960
|
}, this.getExtAuthorityInfoAccess = function(v, y) {
|
|
2961
2961
|
if (v === void 0 && y === void 0) {
|
|
2962
|
-
var
|
|
2963
|
-
if (
|
|
2962
|
+
var T = this.getExtInfo("authorityInfoAccess");
|
|
2963
|
+
if (T === void 0)
|
|
2964
2964
|
return;
|
|
2965
|
-
v = o(this.hex,
|
|
2965
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
2966
2966
|
}
|
|
2967
|
-
var
|
|
2967
|
+
var b = {
|
|
2968
2968
|
extname: "authorityInfoAccess",
|
|
2969
2969
|
array: []
|
|
2970
2970
|
};
|
|
2971
|
-
y && (
|
|
2971
|
+
y && (b.critical = !0);
|
|
2972
2972
|
for (var S = e(v, 0), R = 0; R < S.length; R++) {
|
|
2973
2973
|
var C = u(v, S[R], [0], "06"), w = s(v, S[R], [1], "86"), I = hextoutf8(w);
|
|
2974
2974
|
if (C == "2b06010505073001")
|
|
2975
|
-
|
|
2975
|
+
b.array.push({
|
|
2976
2976
|
ocsp: I
|
|
2977
2977
|
});
|
|
2978
2978
|
else if (C == "2b06010505073002")
|
|
2979
|
-
|
|
2979
|
+
b.array.push({
|
|
2980
2980
|
caissuer: I
|
|
2981
2981
|
});
|
|
2982
2982
|
else
|
|
2983
2983
|
throw new Error("unknown method: " + C);
|
|
2984
2984
|
}
|
|
2985
|
-
return
|
|
2985
|
+
return b;
|
|
2986
2986
|
}, this.getExtCertificatePolicies = function(v, y) {
|
|
2987
2987
|
if (v === void 0 && y === void 0) {
|
|
2988
|
-
var
|
|
2989
|
-
if (
|
|
2988
|
+
var T = this.getExtInfo("certificatePolicies");
|
|
2989
|
+
if (T === void 0)
|
|
2990
2990
|
return;
|
|
2991
|
-
v = o(this.hex,
|
|
2991
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
2992
2992
|
}
|
|
2993
|
-
var
|
|
2993
|
+
var b = {
|
|
2994
2994
|
extname: "certificatePolicies",
|
|
2995
2995
|
array: []
|
|
2996
2996
|
};
|
|
2997
|
-
y && (
|
|
2997
|
+
y && (b.critical = !0);
|
|
2998
2998
|
for (var S = e(v, 0), R = 0; R < S.length; R++) {
|
|
2999
2999
|
var C = o(v, S[R]), w = this.getPolicyInformation(C);
|
|
3000
|
-
|
|
3000
|
+
b.array.push(w);
|
|
3001
3001
|
}
|
|
3002
|
-
return
|
|
3002
|
+
return b;
|
|
3003
3003
|
}, this.getPolicyInformation = function(v) {
|
|
3004
|
-
var y = {},
|
|
3005
|
-
y.policyoid = m(
|
|
3006
|
-
var
|
|
3007
|
-
if (
|
|
3004
|
+
var y = {}, T = s(v, 0, [0], "06");
|
|
3005
|
+
y.policyoid = m(T);
|
|
3006
|
+
var b = d(v, 0, [1], "30");
|
|
3007
|
+
if (b != -1) {
|
|
3008
3008
|
y.array = [];
|
|
3009
|
-
for (var S = e(v,
|
|
3009
|
+
for (var S = e(v, b), R = 0; R < S.length; R++) {
|
|
3010
3010
|
var C = o(v, S[R]), w = this.getPolicyQualifierInfo(C);
|
|
3011
3011
|
y.array.push(w);
|
|
3012
3012
|
}
|
|
3013
3013
|
}
|
|
3014
3014
|
return y;
|
|
3015
3015
|
}, this.getPolicyQualifierInfo = function(v) {
|
|
3016
|
-
var y = {},
|
|
3017
|
-
if (
|
|
3018
|
-
var
|
|
3019
|
-
y.cps = hextorstr(
|
|
3020
|
-
} else if (
|
|
3016
|
+
var y = {}, T = s(v, 0, [0], "06");
|
|
3017
|
+
if (T === "2b06010505070201") {
|
|
3018
|
+
var b = u(v, 0, [1], "16");
|
|
3019
|
+
y.cps = hextorstr(b);
|
|
3020
|
+
} else if (T === "2b06010505070202") {
|
|
3021
3021
|
var S = l(v, 0, [1], "30");
|
|
3022
3022
|
y.unotice = this.getUserNotice(S);
|
|
3023
3023
|
}
|
|
3024
3024
|
return y;
|
|
3025
3025
|
}, this.getUserNotice = function(v) {
|
|
3026
|
-
for (var y = {},
|
|
3027
|
-
var S = o(v, b
|
|
3026
|
+
for (var y = {}, T = e(v, 0), b = 0; b < T.length; b++) {
|
|
3027
|
+
var S = o(v, T[b]);
|
|
3028
3028
|
S.substr(0, 2) != "30" && (y.exptext = this.getDisplayText(S));
|
|
3029
3029
|
}
|
|
3030
3030
|
return y;
|
|
@@ -3034,63 +3034,63 @@ function X509(n) {
|
|
|
3034
3034
|
16: "ia5",
|
|
3035
3035
|
"1a": "vis",
|
|
3036
3036
|
"1e": "bmp"
|
|
3037
|
-
},
|
|
3038
|
-
return
|
|
3037
|
+
}, T = {};
|
|
3038
|
+
return T.type = y[v.substr(0, 2)], T.str = hextorstr(r(v, 0)), T;
|
|
3039
3039
|
}, this.getExtCRLNumber = function(v, y) {
|
|
3040
|
-
var
|
|
3040
|
+
var T = {
|
|
3041
3041
|
extname: "cRLNumber"
|
|
3042
3042
|
};
|
|
3043
|
-
if (y && (
|
|
3044
|
-
return
|
|
3043
|
+
if (y && (T.critical = !0), v.substr(0, 2) == "02")
|
|
3044
|
+
return T.num = {
|
|
3045
3045
|
hex: r(v, 0)
|
|
3046
|
-
},
|
|
3046
|
+
}, T;
|
|
3047
3047
|
throw new Error("hExtV parse error: " + v);
|
|
3048
3048
|
}, this.getExtCRLReason = function(v, y) {
|
|
3049
|
-
var
|
|
3049
|
+
var T = {
|
|
3050
3050
|
extname: "cRLReason"
|
|
3051
3051
|
};
|
|
3052
|
-
if (y && (
|
|
3053
|
-
return
|
|
3052
|
+
if (y && (T.critical = !0), v.substr(0, 2) == "0a")
|
|
3053
|
+
return T.code = parseInt(r(v, 0), 16), T;
|
|
3054
3054
|
throw new Error("hExtV parse error: " + v);
|
|
3055
3055
|
}, this.getExtOcspNonce = function(v, y) {
|
|
3056
|
-
var
|
|
3056
|
+
var T = {
|
|
3057
3057
|
extname: "ocspNonce"
|
|
3058
3058
|
};
|
|
3059
|
-
y && (
|
|
3060
|
-
var
|
|
3061
|
-
return
|
|
3059
|
+
y && (T.critical = !0);
|
|
3060
|
+
var b = r(v, 0);
|
|
3061
|
+
return T.hex = b, T;
|
|
3062
3062
|
}, this.getExtOcspNoCheck = function(v, y) {
|
|
3063
|
-
var
|
|
3063
|
+
var T = {
|
|
3064
3064
|
extname: "ocspNoCheck"
|
|
3065
3065
|
};
|
|
3066
|
-
return y && (
|
|
3066
|
+
return y && (T.critical = !0), T;
|
|
3067
3067
|
}, this.getExtAdobeTimeStamp = function(v, y) {
|
|
3068
3068
|
if (v === void 0 && y === void 0) {
|
|
3069
|
-
var
|
|
3070
|
-
if (
|
|
3069
|
+
var T = this.getExtInfo("adobeTimeStamp");
|
|
3070
|
+
if (T === void 0)
|
|
3071
3071
|
return;
|
|
3072
|
-
v = o(this.hex,
|
|
3072
|
+
v = o(this.hex, T.vidx), y = T.critical;
|
|
3073
3073
|
}
|
|
3074
|
-
var
|
|
3074
|
+
var b = {
|
|
3075
3075
|
extname: "adobeTimeStamp"
|
|
3076
3076
|
};
|
|
3077
|
-
y && (
|
|
3077
|
+
y && (b.critical = !0);
|
|
3078
3078
|
var S = e(v, 0);
|
|
3079
3079
|
if (S.length > 1) {
|
|
3080
3080
|
var R = o(v, S[1]), C = this.getGeneralName(R);
|
|
3081
|
-
C.uri != null && (
|
|
3081
|
+
C.uri != null && (b.uri = C.uri);
|
|
3082
3082
|
}
|
|
3083
3083
|
if (S.length > 2) {
|
|
3084
3084
|
var w = o(v, S[2]);
|
|
3085
|
-
w == "0101ff" && (
|
|
3085
|
+
w == "0101ff" && (b.reqauth = !0), w == "010100" && (b.reqauth = !1);
|
|
3086
3086
|
}
|
|
3087
|
-
return
|
|
3087
|
+
return b;
|
|
3088
3088
|
}, this.getX500NameRule = function(v) {
|
|
3089
|
-
for (var y = null,
|
|
3090
|
-
for (var S = v[
|
|
3091
|
-
|
|
3092
|
-
for (var
|
|
3093
|
-
var C = b
|
|
3089
|
+
for (var y = null, T = [], b = 0; b < v.length; b++)
|
|
3090
|
+
for (var S = v[b], R = 0; R < S.length; R++)
|
|
3091
|
+
T.push(S[R]);
|
|
3092
|
+
for (var b = 0; b < T.length; b++) {
|
|
3093
|
+
var C = T[b], w = C.ds, I = C.value, H = C.type;
|
|
3094
3094
|
if (w != "prn" && w != "utf8" && w != "ia5")
|
|
3095
3095
|
return "mixed";
|
|
3096
3096
|
if (w == "ia5") {
|
|
@@ -3112,26 +3112,26 @@ function X509(n) {
|
|
|
3112
3112
|
}
|
|
3113
3113
|
return y == null ? "prn" : y;
|
|
3114
3114
|
}, this.getX500Name = function(v) {
|
|
3115
|
-
var y = this.getX500NameArray(v),
|
|
3115
|
+
var y = this.getX500NameArray(v), T = this.dnarraytostr(y);
|
|
3116
3116
|
return {
|
|
3117
3117
|
array: y,
|
|
3118
|
-
str:
|
|
3118
|
+
str: T
|
|
3119
3119
|
};
|
|
3120
3120
|
}, this.getX500NameArray = function(v) {
|
|
3121
|
-
for (var y = [],
|
|
3122
|
-
y.push(this.getRDN(o(v, b
|
|
3121
|
+
for (var y = [], T = e(v, 0), b = 0; b < T.length; b++)
|
|
3122
|
+
y.push(this.getRDN(o(v, T[b])));
|
|
3123
3123
|
return y;
|
|
3124
3124
|
}, this.getRDN = function(v) {
|
|
3125
|
-
for (var y = [],
|
|
3126
|
-
y.push(this.getAttrTypeAndValue(o(v, b
|
|
3125
|
+
for (var y = [], T = e(v, 0), b = 0; b < T.length; b++)
|
|
3126
|
+
y.push(this.getAttrTypeAndValue(o(v, T[b])));
|
|
3127
3127
|
return y;
|
|
3128
3128
|
}, this.getAttrTypeAndValue = function(v) {
|
|
3129
3129
|
var y = {
|
|
3130
3130
|
type: null,
|
|
3131
3131
|
value: null,
|
|
3132
3132
|
ds: null
|
|
3133
|
-
},
|
|
3134
|
-
return y.type = KJUR.asn1.x509.OID.oid2atype(R), y.ds = this.HEX2STAG[v.substr(
|
|
3133
|
+
}, T = e(v, 0), b = s(v, T[0], [], "06"), S = s(v, T[1], []), R = KJUR.asn1.ASN1Util.oidHexToInt(b);
|
|
3134
|
+
return y.type = KJUR.asn1.x509.OID.oid2atype(R), y.ds = this.HEX2STAG[v.substr(T[1], 2)], y.ds != "bmp" ? y.value = hextoutf8(S) : y.value = ucs2hextoutf8(S), y;
|
|
3135
3135
|
}, this.readCertPEM = function(v) {
|
|
3136
3136
|
this.readCertHex(g(v));
|
|
3137
3137
|
}, this.readCertHex = function(v) {
|
|
@@ -3150,41 +3150,41 @@ function X509(n) {
|
|
|
3150
3150
|
var y = d(this.hex, 0, [0, "[3]"]);
|
|
3151
3151
|
y != -1 && (v = c(this.hex, 0, [0, "[3]", 0], "30"));
|
|
3152
3152
|
}
|
|
3153
|
-
for (var
|
|
3154
|
-
var R = o(v,
|
|
3155
|
-
C != null &&
|
|
3153
|
+
for (var T = [], b = e(v, 0), S = 0; S < b.length; S++) {
|
|
3154
|
+
var R = o(v, b[S]), C = this.getExtParam(R);
|
|
3155
|
+
C != null && T.push(C);
|
|
3156
3156
|
}
|
|
3157
|
-
return
|
|
3157
|
+
return T;
|
|
3158
3158
|
}, this.getExtParam = function(v) {
|
|
3159
|
-
var y = e(v, 0),
|
|
3160
|
-
if (
|
|
3161
|
-
throw new Error("wrong number elements in Extension: " +
|
|
3162
|
-
var
|
|
3163
|
-
|
|
3164
|
-
var R = l(v, 0, [
|
|
3165
|
-
if (
|
|
3159
|
+
var y = e(v, 0), T = y.length;
|
|
3160
|
+
if (T != 2 && T != 3)
|
|
3161
|
+
throw new Error("wrong number elements in Extension: " + T + " " + v);
|
|
3162
|
+
var b = A(s(v, 0, [0], "06")), S = !1;
|
|
3163
|
+
T == 3 && l(v, 0, [1]) == "0101ff" && (S = !0);
|
|
3164
|
+
var R = l(v, 0, [T - 1, 0]), C = void 0;
|
|
3165
|
+
if (b == "2.5.29.14" ? C = this.getExtSubjectKeyIdentifier(R, S) : b == "2.5.29.15" ? C = this.getExtKeyUsage(R, S) : b == "2.5.29.17" ? C = this.getExtSubjectAltName(R, S) : b == "2.5.29.18" ? C = this.getExtIssuerAltName(R, S) : b == "2.5.29.19" ? C = this.getExtBasicConstraints(R, S) : b == "2.5.29.31" ? C = this.getExtCRLDistributionPoints(R, S) : b == "2.5.29.32" ? C = this.getExtCertificatePolicies(R, S) : b == "2.5.29.35" ? C = this.getExtAuthorityKeyIdentifier(R, S) : b == "2.5.29.37" ? C = this.getExtExtKeyUsage(R, S) : b == "1.3.6.1.5.5.7.1.1" ? C = this.getExtAuthorityInfoAccess(R, S) : b == "2.5.29.20" ? C = this.getExtCRLNumber(R, S) : b == "2.5.29.21" ? C = this.getExtCRLReason(R, S) : b == "1.3.6.1.5.5.7.48.1.2" ? C = this.getExtOcspNonce(R, S) : b == "1.3.6.1.5.5.7.48.1.5" ? C = this.getExtOcspNoCheck(R, S) : b == "1.2.840.113583.1.1.9.1" && (C = this.getExtAdobeTimeStamp(R, S)), C != null)
|
|
3166
3166
|
return C;
|
|
3167
3167
|
var w = {
|
|
3168
|
-
extname:
|
|
3168
|
+
extname: b,
|
|
3169
3169
|
extn: R
|
|
3170
3170
|
};
|
|
3171
3171
|
return S && (w.critical = !0), w;
|
|
3172
3172
|
}, this.findExt = function(v, y) {
|
|
3173
|
-
for (var
|
|
3174
|
-
if (v[
|
|
3175
|
-
return v[
|
|
3173
|
+
for (var T = 0; T < v.length; T++)
|
|
3174
|
+
if (v[T].extname == y)
|
|
3175
|
+
return v[T];
|
|
3176
3176
|
return null;
|
|
3177
3177
|
}, this.dnarraytostr = function(v) {
|
|
3178
|
-
function y(
|
|
3179
|
-
return
|
|
3180
|
-
return
|
|
3178
|
+
function y(b) {
|
|
3179
|
+
return b.map(function(S) {
|
|
3180
|
+
return T(S).replace(/\+/, "\\+");
|
|
3181
3181
|
}).join("+");
|
|
3182
3182
|
}
|
|
3183
|
-
function b
|
|
3184
|
-
return
|
|
3183
|
+
function T(b) {
|
|
3184
|
+
return b.type + "=" + b.value;
|
|
3185
3185
|
}
|
|
3186
|
-
return "/" + v.map(function(
|
|
3187
|
-
return y(
|
|
3186
|
+
return "/" + v.map(function(b) {
|
|
3187
|
+
return y(b).replace(/\//, "\\/");
|
|
3188
3188
|
}).join("/");
|
|
3189
3189
|
}, this.getInfo = function() {
|
|
3190
3190
|
var v = function(V) {
|
|
@@ -3202,7 +3202,7 @@ function X509(n) {
|
|
|
3202
3202
|
}
|
|
3203
3203
|
}
|
|
3204
3204
|
return z;
|
|
3205
|
-
},
|
|
3205
|
+
}, T = function(V) {
|
|
3206
3206
|
for (var z = "", K = V.array, Q = 0; Q < K.length; Q++) {
|
|
3207
3207
|
var q = K[Q];
|
|
3208
3208
|
try {
|
|
@@ -3217,7 +3217,7 @@ function X509(n) {
|
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
3219
|
return z;
|
|
3220
|
-
},
|
|
3220
|
+
}, b = function(V) {
|
|
3221
3221
|
for (var z = "", K = V.array, Q = 0; Q < K.length; Q++) {
|
|
3222
3222
|
var q = K[Q];
|
|
3223
3223
|
q.caissuer !== void 0 && (z += " caissuer: " + q.caissuer + `
|
|
@@ -3270,10 +3270,10 @@ function X509(n) {
|
|
|
3270
3270
|
`;
|
|
3271
3271
|
} else if (H === "cRLDistributionPoints") {
|
|
3272
3272
|
var N = this.getExtCRLDistributionPoints();
|
|
3273
|
-
S +=
|
|
3273
|
+
S += T(N);
|
|
3274
3274
|
} else if (H === "authorityInfoAccess") {
|
|
3275
3275
|
var D = this.getExtAuthorityInfoAccess();
|
|
3276
|
-
S +=
|
|
3276
|
+
S += b(D);
|
|
3277
3277
|
} else
|
|
3278
3278
|
H === "certificatePolicies" && (S += y(this.getExtCertificatePolicies()));
|
|
3279
3279
|
}
|
|
@@ -3894,7 +3894,7 @@ var PBMCustomShader = (
|
|
|
3894
3894
|
}), r = n.call(this) || this, r.vertexTangents = !1, r.color = new THREE.Color(16777215), r.map = null, r.lightMap = null, r.lightMapIntensity = 1, r.aoMap = null, r.aoMapIntensity = 1, r.specularMap = null, r.specular = new THREE.Color(1118481), r.shininess = 30, r.roughnessMap = null, r.roughness = 1, r.metalnessMap = null, r.metalness = 0, r.alphaMap = null, r.combine = null, r.envMap = null, r.envMapIntensity = 1, r.reflectivity = 0.4, r.refractionRatio = 0.98, r.emissiveMap = null, r.emissive = new THREE.Color(0), r.emissiveIntensity = 1, r.bumpMap = null, r.bumpScale = 1, r.normalMap = null, r.normalMapType = THREE.TangentSpaceNormalMap, r.normalScale = new THREE.Vector2(1, 1), r.displacementMap = null, r.displacementScale = 1, r.displacementBias = 0, r.wireframe = !1, r.wireframeLinewidth = 1, r.wireframeLinecap = "round", r.wireframeLinejoin = "round", r.skinning = !1, r.morphTargets = !1, r.morphNormals = !1, r.metal = !1, r.alphaMode = "OPAQUE", r.clipping = !0, r.customShaders = [], r.type = "PBMMeshMaterial";
|
|
3895
3895
|
var u = Object.assign({}, definesLib$1), l = cloneUniforms(uniformsLib$1);
|
|
3896
3896
|
toFastProperties(l), toFastProperties(u), r.defines = u, r.onBeforeCompile = function(v, y) {
|
|
3897
|
-
var
|
|
3897
|
+
var T, b, S = r.shaderType;
|
|
3898
3898
|
v.vertexShader = shaderLib$1[S].vertexShader, v.fragmentShader = shaderLib$1[S].fragmentShader, v.uniforms = l;
|
|
3899
3899
|
for (var R = 0, C = Object.keys(u); R < C.length; R++) {
|
|
3900
3900
|
var w = C[R];
|
|
@@ -3909,9 +3909,9 @@ var PBMCustomShader = (
|
|
|
3909
3909
|
}), F = 0, L = P; F < L.length; F++) {
|
|
3910
3910
|
var O = L[F];
|
|
3911
3911
|
for (var N in O.defines)
|
|
3912
|
-
N in u || Object.assign(u, (
|
|
3912
|
+
N in u || Object.assign(u, (T = {}, T[N] = O.defines[N], T));
|
|
3913
3913
|
for (var D in O.uniforms)
|
|
3914
|
-
D in l || Object.assign(l, (
|
|
3914
|
+
D in l || Object.assign(l, (b = {}, b[D] = O.uniforms[D], b));
|
|
3915
3915
|
}
|
|
3916
3916
|
v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, P.map(function(q) {
|
|
3917
3917
|
return q.vertex.mainBefore;
|
|
@@ -3957,9 +3957,9 @@ var PBMCustomShader = (
|
|
|
3957
3957
|
}
|
|
3958
3958
|
};
|
|
3959
3959
|
var c = "";
|
|
3960
|
-
r.onBeforeRender = function(v, y,
|
|
3960
|
+
r.onBeforeRender = function(v, y, T, b, S, R) {
|
|
3961
3961
|
var C = r.shaderType;
|
|
3962
|
-
|
|
3962
|
+
T instanceof Camera ? (l.pixelRatio.value = T.pixelRatio, l.resolution.value.copy(T.resolution)) : (l.pixelRatio.value = v.getPixelRatio(), v.getViewport(scratchViewport$2), l.resolution.value.set(scratchViewport$2.width, scratchViewport$2.height));
|
|
3963
3963
|
var w = r.customShaders.filter(function(H) {
|
|
3964
3964
|
return H.type.includes(C);
|
|
3965
3965
|
}), I = w.map(function(H) {
|
|
@@ -4141,18 +4141,18 @@ var PBMCustomShader = (
|
|
|
4141
4141
|
return u.USE_BLACK_TRANSITION ? "BLACK" : u.USE_SPREAD_TRANSITION ? "SPREAD" : "FADE";
|
|
4142
4142
|
},
|
|
4143
4143
|
set: function(v) {
|
|
4144
|
-
var y = u.USE_BLACK_TRANSITION,
|
|
4144
|
+
var y = u.USE_BLACK_TRANSITION, T = u.USE_SPREAD_TRANSITION, b = u.USE_FADE_TRANSITION;
|
|
4145
4145
|
u.USE_BLACK_TRANSITION = !1, u.USE_SPREAD_TRANSITION = !1, u.USE_FADE_TRANSITION = !1, u["USE_".concat(v, "_TRANSITION")] = !0;
|
|
4146
4146
|
var S = !1;
|
|
4147
|
-
y !== u.USE_BLACK_TRANSITION && (S = !0),
|
|
4147
|
+
y !== u.USE_BLACK_TRANSITION && (S = !0), T !== u.USE_SPREAD_TRANSITION && (S = !0), b !== u.USE_FADE_TRANSITION && (S = !0), S && (this.needsUpdate = !0);
|
|
4148
4148
|
}
|
|
4149
4149
|
}), defineProperty(r, "colorStyle", {
|
|
4150
4150
|
get: function() {
|
|
4151
4151
|
return u.USE_COLOR_CONSTANT ? "CONSTANT" : u.USE_COLOR_ALTITUDE ? "ALTITUDE" : "RGB";
|
|
4152
4152
|
},
|
|
4153
4153
|
set: function(v) {
|
|
4154
|
-
var y = v === "CONSTANT",
|
|
4155
|
-
u.USE_COLOR_CONSTANT !== y && (u.USE_COLOR_CONSTANT = y, this.needsUpdate = !0), u.USE_COLOR_ALTITUDE !==
|
|
4154
|
+
var y = v === "CONSTANT", T = v === "ALTITUDE";
|
|
4155
|
+
u.USE_COLOR_CONSTANT !== y && (u.USE_COLOR_CONSTANT = y, this.needsUpdate = !0), u.USE_COLOR_ALTITUDE !== T && (u.USE_COLOR_ALTITUDE = T, this.needsUpdate = !0);
|
|
4156
4156
|
}
|
|
4157
4157
|
}), defineProperty(r, "constantColor", {
|
|
4158
4158
|
get: function() {
|
|
@@ -4205,10 +4205,10 @@ var PBMCustomShader = (
|
|
|
4205
4205
|
},
|
|
4206
4206
|
set: function(v) {
|
|
4207
4207
|
E !== v && (E = v, l.clippers.value = E.map(function(y) {
|
|
4208
|
-
var
|
|
4208
|
+
var T = typeof y.floorIndex == "number" ? y.floorIndex : -1, b = new THREE.Matrix4().getInverse(y.clippingBoxMatrix);
|
|
4209
4209
|
return {
|
|
4210
|
-
matrixInverse:
|
|
4211
|
-
floorIndex:
|
|
4210
|
+
matrixInverse: b,
|
|
4211
|
+
floorIndex: T
|
|
4212
4212
|
};
|
|
4213
4213
|
}), this.needsUpdate = !0);
|
|
4214
4214
|
}
|
|
@@ -4368,46 +4368,46 @@ var scratchViewport$1 = new THREE.Vector4(), pbmUniforms = {
|
|
|
4368
4368
|
var y = v[E];
|
|
4369
4369
|
y in uniformsLib || (s[y] = void 0);
|
|
4370
4370
|
}
|
|
4371
|
-
for (var
|
|
4371
|
+
for (var T = r.customShaders.filter(function(F) {
|
|
4372
4372
|
return F.type.includes(p);
|
|
4373
|
-
}),
|
|
4374
|
-
var R = S[
|
|
4373
|
+
}), b = 0, S = T; b < S.length; b++) {
|
|
4374
|
+
var R = S[b];
|
|
4375
4375
|
for (var C in R.uniforms)
|
|
4376
4376
|
C in s || Object.assign(s, (d = {}, d[C] = R.uniforms[C], d));
|
|
4377
4377
|
for (var w in R.defines)
|
|
4378
4378
|
w in o || Object.assign(o, (h = {}, h[w] = R.defines[w], h));
|
|
4379
4379
|
}
|
|
4380
|
-
toFastProperties(s), toFastProperties(o), c.vertexShader = c.vertexShader.replace(/MAIN_BEFORE/g,
|
|
4380
|
+
toFastProperties(s), toFastProperties(o), c.vertexShader = c.vertexShader.replace(/MAIN_BEFORE/g, T.map(function(F) {
|
|
4381
4381
|
return F.vertex.mainBefore;
|
|
4382
4382
|
}).filter(function(F) {
|
|
4383
4383
|
return !!F;
|
|
4384
4384
|
}).join(`
|
|
4385
|
-
`)), c.vertexShader = c.vertexShader.replace(/MAIN_START/g,
|
|
4385
|
+
`)), c.vertexShader = c.vertexShader.replace(/MAIN_START/g, T.map(function(F) {
|
|
4386
4386
|
return F.vertex.mainStart;
|
|
4387
4387
|
}).filter(function(F) {
|
|
4388
4388
|
return !!F;
|
|
4389
4389
|
}).join(`
|
|
4390
|
-
`)), c.vertexShader = c.vertexShader.replace(/MAIN_END/g,
|
|
4390
|
+
`)), c.vertexShader = c.vertexShader.replace(/MAIN_END/g, T.map(function(F) {
|
|
4391
4391
|
return F.vertex.mainEnd;
|
|
4392
4392
|
}).filter(function(F) {
|
|
4393
4393
|
return !!F;
|
|
4394
4394
|
}).join(`
|
|
4395
|
-
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_BEFORE/g,
|
|
4395
|
+
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_BEFORE/g, T.map(function(F) {
|
|
4396
4396
|
return F.fragment.mainBefore;
|
|
4397
4397
|
}).filter(function(F) {
|
|
4398
4398
|
return !!F;
|
|
4399
4399
|
}).join(`
|
|
4400
|
-
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_START/g,
|
|
4400
|
+
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_START/g, T.map(function(F) {
|
|
4401
4401
|
return F.fragment.mainStart;
|
|
4402
4402
|
}).filter(function(F) {
|
|
4403
4403
|
return !!F;
|
|
4404
4404
|
}).join(`
|
|
4405
|
-
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_END/g,
|
|
4405
|
+
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_END/g, T.map(function(F) {
|
|
4406
4406
|
return F.fragment.mainEnd;
|
|
4407
4407
|
}).filter(function(F) {
|
|
4408
4408
|
return !!F;
|
|
4409
4409
|
}).join(`
|
|
4410
|
-
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_MODEL_COLOR/g,
|
|
4410
|
+
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_MODEL_COLOR/g, T.map(function(F) {
|
|
4411
4411
|
return F.fragment.mainModelColor;
|
|
4412
4412
|
}).filter(function(F) {
|
|
4413
4413
|
return !!F;
|
|
@@ -4415,7 +4415,7 @@ var scratchViewport$1 = new THREE.Vector4(), pbmUniforms = {
|
|
|
4415
4415
|
`));
|
|
4416
4416
|
var I = String(r.clippers.length);
|
|
4417
4417
|
c.vertexShader = c.vertexShader.replace(/NUM_CLIPPERS/g, I), c.fragmentShader = c.fragmentShader.replace(/NUM_CLIPPERS/g, I);
|
|
4418
|
-
for (var H = 0, M =
|
|
4418
|
+
for (var H = 0, M = T; H < M.length; H++) {
|
|
4419
4419
|
var P = M[H];
|
|
4420
4420
|
P.onBeforeCompile && P.onBeforeCompile(c, f);
|
|
4421
4421
|
}
|
|
@@ -5220,12 +5220,12 @@ function ajax(n, t, e, r, o) {
|
|
|
5220
5220
|
};
|
|
5221
5221
|
h[d] = E, A.src = l, document.body.appendChild(A), typeof t.timeout == "number" && (p = window.setTimeout(g, t.timeout));
|
|
5222
5222
|
} else {
|
|
5223
|
-
var v = !1, y = new XMLHttpRequest(),
|
|
5224
|
-
y && (y.removeEventListener("timeout",
|
|
5225
|
-
},
|
|
5223
|
+
var v = !1, y = new XMLHttpRequest(), T = function() {
|
|
5224
|
+
y && (y.removeEventListener("timeout", b, !1), y.removeEventListener("progress", S, !1), y.removeEventListener("load", R, !1), y.removeEventListener("error", C, !1)), y = null, T = noop;
|
|
5225
|
+
}, b = function() {
|
|
5226
5226
|
var w;
|
|
5227
5227
|
if (v !== !0) {
|
|
5228
|
-
v = !0,
|
|
5228
|
+
v = !0, T();
|
|
5229
5229
|
var I = new NetworkTimeoutError(l, "XMLHttpRequest", t.timeout || NaN);
|
|
5230
5230
|
r(I), f(I), (w = t.networkSubscribe) === null || w === void 0 || w.emit("network", l, "XMLHttpRequest", "timeout", I.message);
|
|
5231
5231
|
}
|
|
@@ -5236,7 +5236,7 @@ function ajax(n, t, e, r, o) {
|
|
|
5236
5236
|
if (v !== !0) {
|
|
5237
5237
|
var H = this.status;
|
|
5238
5238
|
if (H === 0 || H >= 200 && H < 400) {
|
|
5239
|
-
v = !0,
|
|
5239
|
+
v = !0, T();
|
|
5240
5240
|
var M = now(), P = M - s, F = parseHeaders(this.getAllResponseHeaders()), L = w.total, O = {
|
|
5241
5241
|
body: this.response,
|
|
5242
5242
|
meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: P, headers: F, size: L }
|
|
@@ -5248,12 +5248,12 @@ function ajax(n, t, e, r, o) {
|
|
|
5248
5248
|
}, C = function() {
|
|
5249
5249
|
var w;
|
|
5250
5250
|
if (v !== !0) {
|
|
5251
|
-
v = !0,
|
|
5251
|
+
v = !0, T();
|
|
5252
5252
|
var I = new NetworkResponseError(l, "XMLHttpRequest", this.status);
|
|
5253
5253
|
r(I), f(I), (w = t.networkSubscribe) === null || w === void 0 || w.emit("network", l, "XMLHttpRequest", "error", I.message);
|
|
5254
5254
|
}
|
|
5255
5255
|
};
|
|
5256
|
-
y.addEventListener("timeout",
|
|
5256
|
+
y.addEventListener("timeout", b, !1), y.addEventListener("progress", S, !1), y.addEventListener("load", R, !1), y.addEventListener("error", C, !1), t.responseType && (y.responseType = t.responseType), typeof t.timeout == "number" && (y.timeout = t.timeout), y.open("GET", l, !0), y.send(null);
|
|
5257
5257
|
}
|
|
5258
5258
|
});
|
|
5259
5259
|
});
|
|
@@ -5330,8 +5330,8 @@ function loadImage(n, t, e, r, o, s) {
|
|
|
5330
5330
|
costs: v - u
|
|
5331
5331
|
};
|
|
5332
5332
|
p = !0;
|
|
5333
|
-
var
|
|
5334
|
-
o(1), e(
|
|
5333
|
+
var T = { body: h, meta: y };
|
|
5334
|
+
o(1), e(T), f(T), (E = t.networkSubscribe) === null || E === void 0 || E.emit("network", c, "Image", "ok", JSON.stringify(T.meta));
|
|
5335
5335
|
}
|
|
5336
5336
|
}, g = function() {
|
|
5337
5337
|
var E;
|
|
@@ -6003,20 +6003,20 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
6003
6003
|
return o(S), Promise.reject(S);
|
|
6004
6004
|
});
|
|
6005
6005
|
} else {
|
|
6006
|
-
var
|
|
6006
|
+
var T = null, b;
|
|
6007
6007
|
return Promise.resolve().then(function() {
|
|
6008
6008
|
return createImageBitmapLikeImage();
|
|
6009
6009
|
}).then(function(S) {
|
|
6010
|
-
return
|
|
6010
|
+
return b = S, e.fetcher.loadImage(t, { timeout: e.timeout }, void 0, void 0, s, S);
|
|
6011
6011
|
}).then(function(S) {
|
|
6012
|
-
return
|
|
6012
|
+
return T = S.meta, imageBitmapToTexture(S.body, e.maxSize);
|
|
6013
6013
|
}).then(function(S) {
|
|
6014
6014
|
return Object.assign(S, A), S;
|
|
6015
6015
|
}).then(function(S) {
|
|
6016
|
-
var R = { meta:
|
|
6016
|
+
var R = { meta: T, body: S };
|
|
6017
6017
|
return r(R), R;
|
|
6018
6018
|
}).catch(function(S) {
|
|
6019
|
-
return
|
|
6019
|
+
return b && b.close(), o(S), Promise.reject(S);
|
|
6020
6020
|
});
|
|
6021
6021
|
}
|
|
6022
6022
|
}, n.prototype.loadCubeTexture = function(t, e, r, o, s, u) {
|
|
@@ -6031,7 +6031,7 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
6031
6031
|
t[FACE_ORDER$2[3]],
|
|
6032
6032
|
t[FACE_ORDER$2[4]],
|
|
6033
6033
|
t[FACE_ORDER$2[5]]
|
|
6034
|
-
], E = [], v = [0, 0, 0, 0, 0, 0], y = [],
|
|
6034
|
+
], E = [], v = [0, 0, 0, 0, 0, 0], y = [], T = function(S) {
|
|
6035
6035
|
var R = (h = (d = e.imageURL) === null || d === void 0 ? void 0 : d.options) !== null && h !== void 0 ? h : { key: "unknown" }, C = applyImageURLOptions(g[S], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, R), { key: R.key + "." + FACE_ORDER$2[S] })), w = function(F) {
|
|
6036
6036
|
v[S] = F, s(v.reduce(function(L, O) {
|
|
6037
6037
|
return L + O;
|
|
@@ -6054,8 +6054,8 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
6054
6054
|
});
|
|
6055
6055
|
E.push(M);
|
|
6056
6056
|
}
|
|
6057
|
-
},
|
|
6058
|
-
b
|
|
6057
|
+
}, b = 0; b < 6; b++)
|
|
6058
|
+
T(b);
|
|
6059
6059
|
return Promise.all(E).then(function(S) {
|
|
6060
6060
|
return imageBitmapsToCubeTexture(S);
|
|
6061
6061
|
}).then(function(S) {
|
|
@@ -6618,8 +6618,8 @@ function requireWriter() {
|
|
|
6618
6618
|
};
|
|
6619
6619
|
c.create = f(), c.alloc = function(v) {
|
|
6620
6620
|
return new n.Array(v);
|
|
6621
|
-
}, n.Array !== Array && (c.alloc = n.pool(c.alloc, n.Array.prototype.subarray)), c.prototype._push = function(v, y,
|
|
6622
|
-
return this.tail = this.tail.next = new s(v, y,
|
|
6621
|
+
}, n.Array !== Array && (c.alloc = n.pool(c.alloc, n.Array.prototype.subarray)), c.prototype._push = function(v, y, T) {
|
|
6622
|
+
return this.tail = this.tail.next = new s(v, y, T), this.len += y, this;
|
|
6623
6623
|
};
|
|
6624
6624
|
function d(E, v, y) {
|
|
6625
6625
|
v[y] = E & 255;
|
|
@@ -6671,19 +6671,19 @@ function requireWriter() {
|
|
|
6671
6671
|
}, c.prototype.double = function(v) {
|
|
6672
6672
|
return this._push(n.float.writeDoubleLE, 8, v);
|
|
6673
6673
|
};
|
|
6674
|
-
var g = n.Array.prototype.set ? function(v, y,
|
|
6675
|
-
y.set(v,
|
|
6676
|
-
} : function(v, y,
|
|
6677
|
-
for (var
|
|
6678
|
-
y[
|
|
6674
|
+
var g = n.Array.prototype.set ? function(v, y, T) {
|
|
6675
|
+
y.set(v, T);
|
|
6676
|
+
} : function(v, y, T) {
|
|
6677
|
+
for (var b = 0; b < v.length; ++b)
|
|
6678
|
+
y[T + b] = v[b];
|
|
6679
6679
|
};
|
|
6680
6680
|
return c.prototype.bytes = function(v) {
|
|
6681
6681
|
var y = v.length >>> 0;
|
|
6682
6682
|
if (!y)
|
|
6683
6683
|
return this._push(d, 1, 0);
|
|
6684
6684
|
if (n.isString(v)) {
|
|
6685
|
-
var
|
|
6686
|
-
r.decode(v,
|
|
6685
|
+
var T = c.alloc(y = r.length(v));
|
|
6686
|
+
r.decode(v, T, 0), v = T;
|
|
6687
6687
|
}
|
|
6688
6688
|
return this.uint32(y)._push(g, y, v);
|
|
6689
6689
|
}, c.prototype.string = function(v) {
|
|
@@ -6694,11 +6694,11 @@ function requireWriter() {
|
|
|
6694
6694
|
}, c.prototype.reset = function() {
|
|
6695
6695
|
return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new s(u, 0, 0), this.len = 0), this;
|
|
6696
6696
|
}, c.prototype.ldelim = function() {
|
|
6697
|
-
var v = this.head, y = this.tail,
|
|
6698
|
-
return this.reset().uint32(
|
|
6697
|
+
var v = this.head, y = this.tail, T = this.len;
|
|
6698
|
+
return this.reset().uint32(T), T && (this.tail.next = v.next, this.tail = y, this.len += T), this;
|
|
6699
6699
|
}, c.prototype.finish = function() {
|
|
6700
|
-
for (var v = this.head.next, y = this.constructor.alloc(this.len),
|
|
6701
|
-
v.fn(v.val, y,
|
|
6700
|
+
for (var v = this.head.next, y = this.constructor.alloc(this.len), T = 0; v; )
|
|
6701
|
+
v.fn(v.val, y, T), T += v.len, v = v.next;
|
|
6702
6702
|
return y;
|
|
6703
6703
|
}, c._configure = function(E) {
|
|
6704
6704
|
t = E, c.create = f(), t._configure();
|
|
@@ -7375,35 +7375,35 @@ function loadPbm(n, t) {
|
|
|
7375
7375
|
return d.ajax(n, {
|
|
7376
7376
|
responseType: "arraybuffer"
|
|
7377
7377
|
});
|
|
7378
|
-
}).then(function(
|
|
7379
|
-
return y.byteLength =
|
|
7380
|
-
var
|
|
7381
|
-
return Model$2.decode(
|
|
7378
|
+
}).then(function(T) {
|
|
7379
|
+
return y.byteLength = T.body.byteLength, delay$1(function() {
|
|
7380
|
+
var b = new Uint8Array(T.body);
|
|
7381
|
+
return Model$2.decode(b);
|
|
7382
7382
|
});
|
|
7383
|
-
}).then(function(
|
|
7383
|
+
}).then(function(T) {
|
|
7384
7384
|
return delay$1(function() {
|
|
7385
|
-
return parse$4(
|
|
7385
|
+
return parse$4(T, f, h, p, m, A, d);
|
|
7386
7386
|
});
|
|
7387
|
-
}).then(function(
|
|
7387
|
+
}).then(function(T) {
|
|
7388
7388
|
A.clear();
|
|
7389
|
-
var
|
|
7390
|
-
|
|
7391
|
-
for (var S = 0, R =
|
|
7389
|
+
var b = new THREE.Group();
|
|
7390
|
+
b.name = n;
|
|
7391
|
+
for (var S = 0, R = T.objects; S < R.length; S++) {
|
|
7392
7392
|
var C = R[S];
|
|
7393
|
-
|
|
7393
|
+
b.add(C);
|
|
7394
7394
|
}
|
|
7395
|
-
return c === "Y" &&
|
|
7395
|
+
return c === "Y" && b.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
|
|
7396
7396
|
type: "pbm",
|
|
7397
7397
|
modelUpAxis: "Z",
|
|
7398
7398
|
upAxis: c,
|
|
7399
7399
|
uri: n,
|
|
7400
7400
|
byteLength: y.byteLength,
|
|
7401
|
-
memoryUsage: getMemoryUsage(
|
|
7402
|
-
scene:
|
|
7403
|
-
textures:
|
|
7401
|
+
memoryUsage: getMemoryUsage(b),
|
|
7402
|
+
scene: b,
|
|
7403
|
+
textures: T.textures,
|
|
7404
7404
|
animations: [],
|
|
7405
7405
|
dispose: function() {
|
|
7406
|
-
return
|
|
7406
|
+
return T.dispose();
|
|
7407
7407
|
}
|
|
7408
7408
|
};
|
|
7409
7409
|
});
|
|
@@ -7445,16 +7445,16 @@ function parsePBMModel(n) {
|
|
|
7445
7445
|
var h = v[E], y = parseFloorName(h.name);
|
|
7446
7446
|
g[y] || (g[y] = []), g[y].push(h);
|
|
7447
7447
|
}
|
|
7448
|
-
for (var
|
|
7449
|
-
var
|
|
7450
|
-
if (
|
|
7448
|
+
for (var T = 0; T < g.length; T++) {
|
|
7449
|
+
var b = g[T];
|
|
7450
|
+
if (b)
|
|
7451
7451
|
if (l) {
|
|
7452
|
-
for (var S = 0, R = 0; R <
|
|
7453
|
-
var h =
|
|
7452
|
+
for (var S = 0, R = 0; R < b.length; R++) {
|
|
7453
|
+
var h = b[R];
|
|
7454
7454
|
S += h.faces.indices.length;
|
|
7455
7455
|
}
|
|
7456
|
-
for (var C = new Float32Array(S * 3), w = new Float32Array(S * 2), I = new Float32Array(S * 3), H = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], F = 0, L = 0; L <
|
|
7457
|
-
for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h =
|
|
7456
|
+
for (var C = new Float32Array(S * 3), w = new Float32Array(S * 2), I = new Float32Array(S * 3), H = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], F = 0, L = 0; L < b.length; L++) {
|
|
7457
|
+
for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = b[L], N = h.vertices.xyz, D = h.vertices.uvs, V = h.faces.indices, z = h.faces.normals, K = h.vertices.marks, Q = V.length, R = 0; R < Q; R++) {
|
|
7458
7458
|
var q = V[R], J = C[F * 3 + R * 3] = N[q * 3], G = C[F * 3 + R * 3 + 1] = N[q * 3 + 1], W = C[F * 3 + R * 3 + 2] = N[q * 3 + 2];
|
|
7459
7459
|
H && (H[F + R] = K[q]), w[F * 2 + R * 2] = D[q * 2], w[F * 2 + R * 2 + 1] = D[q * 2 + 1];
|
|
7460
7460
|
var Z = Math.floor(R / 3) * 3;
|
|
@@ -7477,20 +7477,20 @@ function parsePBMModel(n) {
|
|
|
7477
7477
|
normals: I,
|
|
7478
7478
|
masks: H,
|
|
7479
7479
|
indices: null,
|
|
7480
|
-
floorIndex:
|
|
7480
|
+
floorIndex: T,
|
|
7481
7481
|
groups: M,
|
|
7482
7482
|
extents: P
|
|
7483
7483
|
};
|
|
7484
7484
|
u.push(Y);
|
|
7485
7485
|
} else {
|
|
7486
|
-
for (var S = 0, X = 0, R = 0; R <
|
|
7487
|
-
var h =
|
|
7486
|
+
for (var S = 0, X = 0, R = 0; R < b.length; R++) {
|
|
7487
|
+
var h = b[R];
|
|
7488
7488
|
X += h.vertices.xyz.length / 3, S += h.faces.indices.length;
|
|
7489
7489
|
}
|
|
7490
|
-
for (var C = new Float32Array(X * 3), w = new Float32Array(X * 2), I = void 0, j = new Float32Array(X), ee = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, F = 0, L = 0; L <
|
|
7491
|
-
for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h =
|
|
7490
|
+
for (var C = new Float32Array(X * 3), w = new Float32Array(X * 2), I = void 0, j = new Float32Array(X), ee = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, F = 0, L = 0; L < b.length; L++) {
|
|
7491
|
+
for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = b[L], N = h.vertices.xyz, re = h.vertices.marks, D = h.vertices.uvs, V = h.faces.indices, ae = N.length / 3, Q = V.length, R = 0; R < ae; R++) {
|
|
7492
7492
|
var J = C[F * 3 + R * 3] = N[R * 3], G = C[F * 3 + R * 3 + 1] = N[R * 3 + 1], W = C[F * 3 + R * 3 + 2] = N[R * 3 + 2];
|
|
7493
|
-
H && (H[F + R] = re[R]), w[F * 2 + R * 2] = D[R * 2], w[F * 2 + R * 2 + 1] = D[R * 2 + 1], j[F + R] =
|
|
7493
|
+
H && (H[F + R] = re[R]), w[F * 2 + R * 2] = D[R * 2], w[F * 2 + R * 2 + 1] = D[R * 2 + 1], j[F + R] = T, J < O[0] && (O[0] = J), G < O[1] && (O[1] = G), W < O[2] && (O[2] = W), J > O[3] && (O[3] = J), G > O[4] && (O[4] = G), W > O[5] && (O[5] = W);
|
|
7494
7494
|
}
|
|
7495
7495
|
O[0] < P[0] && (P[0] = O[0]), O[1] < P[1] && (P[1] = O[1]), O[2] < P[2] && (P[2] = O[2]), O[3] > P[3] && (P[3] = O[3]), O[4] > P[4] && (P[4] = O[4]), O[5] > P[5] && (P[5] = O[5]);
|
|
7496
7496
|
for (var R = 0; R < Q; R++)
|
|
@@ -7512,7 +7512,7 @@ function parsePBMModel(n) {
|
|
|
7512
7512
|
normals: I,
|
|
7513
7513
|
masks: H,
|
|
7514
7514
|
indices: ee,
|
|
7515
|
-
floorIndex:
|
|
7515
|
+
floorIndex: T,
|
|
7516
7516
|
groups: M,
|
|
7517
7517
|
extents: P
|
|
7518
7518
|
};
|
|
@@ -7541,10 +7541,10 @@ function loadTexture$1(n, t, e, r) {
|
|
|
7541
7541
|
}
|
|
7542
7542
|
function parse$4(n, t, e, r, o, s, u) {
|
|
7543
7543
|
for (var l = parsePBMModel(n), c = 0, f = "", d = [], h = {}, p = /* @__PURE__ */ new Set(), m = 0, A = 0, g = l; A < g.length; A++) {
|
|
7544
|
-
var E = g[A], v = E.createAt, y = E.description,
|
|
7544
|
+
var E = g[A], v = E.createAt, y = E.description, T = E.vertices, b = E.masks, S = E.uvs, R = E.normals, C = E.indices, w = E.floorIndex, I = E.groups, H = E.extents, M = new THREE.Box3();
|
|
7545
7545
|
M.min.x = H[0], M.min.y = H[1], M.min.z = H[2], M.max.x = H[3], M.max.y = H[4], M.max.z = H[5];
|
|
7546
7546
|
var P = new THREE.BufferGeometry();
|
|
7547
|
-
P.setAttribute("position", new THREE.BufferAttribute(
|
|
7547
|
+
P.setAttribute("position", new THREE.BufferAttribute(T, 3)), P.setAttribute("uv", new THREE.BufferAttribute(S, 2)), R && P.setAttribute("normal", new THREE.BufferAttribute(R, 3)), b && P.setAttribute("_feature_id_rsmask", new THREE.BufferAttribute(b, 1)), C && P.setIndex(new THREE.BufferAttribute(C, 1)), P.boundingBox = M, P.boundingSphere = M.getBoundingSphere(new THREE.Sphere());
|
|
7548
7548
|
for (var F = 0, L = I; F < L.length; F++) {
|
|
7549
7549
|
var O = L[F];
|
|
7550
7550
|
P.addGroup(O.start, O.count, O.materialIndex);
|
|
@@ -7957,44 +7957,44 @@ function loadAt3d(n, t) {
|
|
|
7957
7957
|
return d.ajax(n, {
|
|
7958
7958
|
responseType: "arraybuffer"
|
|
7959
7959
|
});
|
|
7960
|
-
}).then(function(
|
|
7961
|
-
return lzma(
|
|
7962
|
-
}).then(function(
|
|
7960
|
+
}).then(function(T) {
|
|
7961
|
+
return lzma(T.body);
|
|
7962
|
+
}).then(function(T) {
|
|
7963
7963
|
return delay$1(function() {
|
|
7964
|
-
for (var
|
|
7964
|
+
for (var b, S = {
|
|
7965
7965
|
chunks: [],
|
|
7966
7966
|
createAt: void 0,
|
|
7967
7967
|
description: void 0
|
|
7968
|
-
}, R = 0, C =
|
|
7968
|
+
}, R = 0, C = T; R < C.length; R++) {
|
|
7969
7969
|
var w = C[R], I = Model$2.decode(w);
|
|
7970
|
-
I.chunks.length && ((
|
|
7970
|
+
I.chunks.length && ((b = S.chunks).push.apply(b, I.chunks), S.createAt = I.createAt, S.description = I.description);
|
|
7971
7971
|
}
|
|
7972
7972
|
return S;
|
|
7973
7973
|
});
|
|
7974
|
-
}).then(function(
|
|
7974
|
+
}).then(function(T) {
|
|
7975
7975
|
return delay$1(function() {
|
|
7976
|
-
return parse$4(
|
|
7976
|
+
return parse$4(T, f, h, p, m, A, d);
|
|
7977
7977
|
});
|
|
7978
|
-
}).then(function(
|
|
7978
|
+
}).then(function(T) {
|
|
7979
7979
|
A.clear();
|
|
7980
|
-
var
|
|
7981
|
-
|
|
7982
|
-
for (var S = 0, R =
|
|
7980
|
+
var b = new THREE.Group();
|
|
7981
|
+
b.name = n;
|
|
7982
|
+
for (var S = 0, R = T.objects; S < R.length; S++) {
|
|
7983
7983
|
var C = R[S];
|
|
7984
|
-
|
|
7984
|
+
b.add(C);
|
|
7985
7985
|
}
|
|
7986
|
-
return c === "Y" &&
|
|
7986
|
+
return c === "Y" && b.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
|
|
7987
7987
|
type: "at3d",
|
|
7988
7988
|
modelUpAxis: "Z",
|
|
7989
7989
|
upAxis: c,
|
|
7990
7990
|
uri: n,
|
|
7991
7991
|
byteLength: y.byteLength,
|
|
7992
|
-
memoryUsage: getMemoryUsage(
|
|
7993
|
-
scene:
|
|
7994
|
-
textures:
|
|
7992
|
+
memoryUsage: getMemoryUsage(b),
|
|
7993
|
+
scene: b,
|
|
7994
|
+
textures: T.textures,
|
|
7995
7995
|
animations: [],
|
|
7996
7996
|
dispose: function() {
|
|
7997
|
-
return
|
|
7997
|
+
return T.dispose();
|
|
7998
7998
|
}
|
|
7999
7999
|
};
|
|
8000
8000
|
});
|
|
@@ -8544,22 +8544,22 @@ function fromProtoBuf(n) {
|
|
|
8544
8544
|
}
|
|
8545
8545
|
function parse$3(n, t, e, r, o) {
|
|
8546
8546
|
for (var s = [], u = [], l = /* @__PURE__ */ new Set(), c = fromProtoBuf(n), f = new TextureLoader(), d = new THREE.Matrix4(), h = new THREE.Vector3(), p = new THREE.Quaternion(), m = new THREE.Vector3(), A = {}, g = /* @__PURE__ */ new Set(), E = 0, v = c; E < v.length; E++) {
|
|
8547
|
-
var y = v[E],
|
|
8548
|
-
if (!(
|
|
8547
|
+
var y = v[E], T = y.name, b = y.chunks, S = y.matrix;
|
|
8548
|
+
if (!(T === "Ceiling" || T === "CeilingDrop"))
|
|
8549
8549
|
for (var R = 0, C = S; R < C.length; R++) {
|
|
8550
8550
|
var w = C[R];
|
|
8551
8551
|
d.elements = w.elements;
|
|
8552
|
-
for (var I = new THREE.Group(), H = 0; H <
|
|
8553
|
-
var M = parseGeometry(
|
|
8552
|
+
for (var I = new THREE.Group(), H = 0; H < b.length; H++) {
|
|
8553
|
+
var M = parseGeometry(b[H].geometry);
|
|
8554
8554
|
M.applyMatrix4(d), d.decompose(h, p, m), m.x * m.y * m.z < 0 && M.attributes.normal && M.attributes.position && M.attributes.uv && flipBufferGeometryNormals(M), l.add(M);
|
|
8555
|
-
for (var P = [], F = 0, L =
|
|
8555
|
+
for (var P = [], F = 0, L = b[H].material; F < L.length; F++) {
|
|
8556
8556
|
var O = L[F], N = parseMaterial(O, t, e || "", r, f, o, A, l, g), D = N.material, V = N.textureReady;
|
|
8557
8557
|
u.push(V), P.push(D);
|
|
8558
8558
|
}
|
|
8559
8559
|
var z = new PBMMesh(M, P);
|
|
8560
8560
|
z.name = "chunk_" + H, z.matrix.compose(z.position, z.quaternion, z.scale), z.matrixAutoUpdate = !1, z.frustumCulled = !1, I.add(z);
|
|
8561
8561
|
}
|
|
8562
|
-
I.name =
|
|
8562
|
+
I.name = T, s.push(I);
|
|
8563
8563
|
}
|
|
8564
8564
|
}
|
|
8565
8565
|
return Promise.all(u).catch(noop).then(function() {
|
|
@@ -8972,8 +8972,8 @@ var Parser = (
|
|
|
8972
8972
|
}
|
|
8973
8973
|
if (!o) {
|
|
8974
8974
|
for (var c = this.json, f = c.animations[t], d = [], h = [], p = [], m = [], A = [], g = 0, E = f.channels.length; g < E; g++) {
|
|
8975
|
-
var v = f.channels[g], y = f.samplers[v.sampler],
|
|
8976
|
-
d.push(this.loadNode(
|
|
8975
|
+
var v = f.channels[g], y = f.samplers[v.sampler], T = v.target, b = T.node !== void 0 ? T.node : T.id, S = f.parameters !== void 0 ? f.parameters[y.input] : y.input, R = f.parameters !== void 0 ? f.parameters[y.output] : y.output;
|
|
8976
|
+
d.push(this.loadNode(b)), h.push(this.loadAccessor(S)), p.push(this.loadAccessor(R)), m.push(y), A.push(T);
|
|
8977
8977
|
}
|
|
8978
8978
|
o = Promise.all([
|
|
8979
8979
|
Promise.all(d),
|
|
@@ -9074,8 +9074,8 @@ var Parser = (
|
|
|
9074
9074
|
u.bufferView !== void 0 ? l.push(this.loadBufferView(u.bufferView)) : l.push(Promise.resolve(null)), u.sparse !== void 0 && (l.push(this.loadBufferView(u.sparse.indices.bufferView)), l.push(this.loadBufferView(u.sparse.values.bufferView))), s = Promise.all(l).then(function(c) {
|
|
9075
9075
|
var f = c[0], d = WEBGL_TYPE_SIZES[u.type], h = WEBGL_COMPONENT_TYPES[u.componentType], p = h.BYTES_PER_ELEMENT, m = p * d, A = u.byteOffset || 0, g = u.bufferView !== void 0 ? e.json.bufferViews[u.bufferView].byteStride : void 0, E = u.normalized === !0, v, y;
|
|
9076
9076
|
if (g && g !== m) {
|
|
9077
|
-
var
|
|
9078
|
-
S || (v = new h(f,
|
|
9077
|
+
var T = Math.floor(A / g), b = "InterleavedBuffer:" + u.bufferView + ":" + u.componentType + ":" + T + ":" + u.count, S = e.cache.get(b);
|
|
9078
|
+
S || (v = new h(f, T * g, u.count * g / p), S = new THREE.InterleavedBuffer(v, g / p), e.cache.set(b, S)), y = new THREE.InterleavedBufferAttribute(S, d, A % g / p, E);
|
|
9079
9079
|
} else
|
|
9080
9080
|
f === null ? v = new h(u.count * d) : v = new h(f, A, u.count * d), y = new THREE.BufferAttribute(v, d, E);
|
|
9081
9081
|
if (u.sparse !== void 0) {
|
|
@@ -9290,44 +9290,44 @@ var Parser = (
|
|
|
9290
9290
|
}));
|
|
9291
9291
|
r = Promise.all([f, d]).then(function(h) {
|
|
9292
9292
|
for (var p = h[0], m = h[1], A = [], g = 0; g < c.length; g++) {
|
|
9293
|
-
var E = c[g], v = p[g], y = m[g],
|
|
9294
|
-
if (
|
|
9295
|
-
if (
|
|
9293
|
+
var E = c[g], v = p[g], y = m[g], T = E.mode || WEBGL_CONSTANTS.TRIANGLES, b = void 0;
|
|
9294
|
+
if (T === WEBGL_CONSTANTS.TRIANGLES || T === WEBGL_CONSTANTS.TRIANGLE_STRIP || T === WEBGL_CONSTANTS.TRIANGLE_FAN)
|
|
9295
|
+
if (T === WEBGL_CONSTANTS.TRIANGLE_STRIP ? v = e.toGeometryTrianglesDrawMode(v, THREE.TriangleStripDrawMode) : T === WEBGL_CONSTANTS.TRIANGLE_FAN && (v = e.toGeometryTrianglesDrawMode(v, THREE.TriangleFanDrawMode)), e.disposeSet.add(v), l.isSkinnedMesh) {
|
|
9296
9296
|
var S = new THREE.SkinnedMesh(v, y);
|
|
9297
|
-
v.attributes.skinWeight.normalized || S.normalizeSkinWeights(),
|
|
9297
|
+
v.attributes.skinWeight.normalized || S.normalizeSkinWeights(), b = S;
|
|
9298
9298
|
} else
|
|
9299
|
-
|
|
9300
|
-
else if (
|
|
9301
|
-
|
|
9302
|
-
else if (
|
|
9303
|
-
|
|
9304
|
-
else if (
|
|
9305
|
-
|
|
9306
|
-
else if (
|
|
9307
|
-
|
|
9299
|
+
b = new THREE.Mesh(v, y);
|
|
9300
|
+
else if (T === WEBGL_CONSTANTS.POINTS)
|
|
9301
|
+
b = new THREE.Points(v, y);
|
|
9302
|
+
else if (T === WEBGL_CONSTANTS.LINES)
|
|
9303
|
+
b = new THREE.LineSegments(v, y);
|
|
9304
|
+
else if (T === WEBGL_CONSTANTS.LINE_STRIP)
|
|
9305
|
+
b = new THREE.Line(v, y);
|
|
9306
|
+
else if (T === WEBGL_CONSTANTS.LINE_LOOP)
|
|
9307
|
+
b = new THREE.LineLoop(v, y);
|
|
9308
9308
|
else
|
|
9309
|
-
throw new Error("glTF: Primitive mode unsupported: " +
|
|
9309
|
+
throw new Error("glTF: Primitive mode unsupported: " + T);
|
|
9310
9310
|
if (Object.keys(v.morphAttributes).length > 0) {
|
|
9311
9311
|
if (l.weights !== void 0)
|
|
9312
9312
|
for (var R = 0, C = l.weights.length; R < C; R++)
|
|
9313
|
-
|
|
9313
|
+
b.morphTargetInfluences[R] = l.weights[R];
|
|
9314
9314
|
if (l.extras && Array.isArray(l.extras.targetNames)) {
|
|
9315
9315
|
var w = l.extras.targetNames;
|
|
9316
|
-
if (
|
|
9317
|
-
|
|
9316
|
+
if (b.morphTargetInfluences.length === w.length) {
|
|
9317
|
+
b.morphTargetDictionary = {};
|
|
9318
9318
|
for (var R = 0, C = w.length; R < C; R++)
|
|
9319
|
-
|
|
9319
|
+
b.morphTargetDictionary[w[R]] = R;
|
|
9320
9320
|
} else
|
|
9321
9321
|
console.warn("glTF: Invalid extras.targetNames length. Ignoring names.");
|
|
9322
9322
|
}
|
|
9323
9323
|
}
|
|
9324
|
-
|
|
9324
|
+
b.name = l.name || "mesh_" + t, p.length > 1 && (b.name += "_" + g), e.assignFinalMaterial(b), A.push(b);
|
|
9325
9325
|
}
|
|
9326
9326
|
if (A.length === 1)
|
|
9327
9327
|
return A[0];
|
|
9328
9328
|
for (var I = new THREE.Group(), H = 0, M = A; H < M.length; H++) {
|
|
9329
|
-
var
|
|
9330
|
-
I.add(
|
|
9329
|
+
var b = M[H];
|
|
9330
|
+
I.add(b);
|
|
9331
9331
|
}
|
|
9332
9332
|
return I;
|
|
9333
9333
|
});
|
|
@@ -9428,9 +9428,9 @@ var Parser = (
|
|
|
9428
9428
|
var A = e.targets;
|
|
9429
9429
|
if (A !== void 0) {
|
|
9430
9430
|
for (var g = new THREE.Vector3(), E = new THREE.Vector3(), v = 0, y = A.length; v < y; v++) {
|
|
9431
|
-
var
|
|
9432
|
-
if (
|
|
9433
|
-
var d = this.json.accessors[
|
|
9431
|
+
var T = A[v];
|
|
9432
|
+
if (T.POSITION !== void 0) {
|
|
9433
|
+
var d = this.json.accessors[T.POSITION], h = d.min, p = d.max;
|
|
9434
9434
|
if (h !== void 0 && p !== void 0) {
|
|
9435
9435
|
if (E.setX(Math.max(Math.abs(h[0]), Math.abs(p[0]))), E.setY(Math.max(Math.abs(h[1]), Math.abs(p[1]))), E.setZ(Math.max(Math.abs(h[2]), Math.abs(p[2]))), d.normalized) {
|
|
9436
9436
|
var m = getNormalizedComponentScale(WEBGL_COMPONENT_TYPES[d.componentType]);
|
|
@@ -9444,8 +9444,8 @@ var Parser = (
|
|
|
9444
9444
|
f.expandByVector(g);
|
|
9445
9445
|
}
|
|
9446
9446
|
t.boundingBox = f;
|
|
9447
|
-
var
|
|
9448
|
-
return f.getCenter(
|
|
9447
|
+
var b = new THREE.Sphere();
|
|
9448
|
+
return f.getCenter(b.center), b.radius = f.min.distanceTo(f.max) / 2, t.boundingSphere = b, Promise.all(s).then(function() {
|
|
9449
9449
|
if (t.attributes.uv && !t.attributes.uv2 && r.options.copyUV2 && t.setAttribute("uv2", t.attributes.uv), e.targets) {
|
|
9450
9450
|
for (var S = !1, R = !1, C = 0, w = e.targets.length; C < w; C++) {
|
|
9451
9451
|
var I = e.targets[C];
|
|
@@ -10001,8 +10001,8 @@ var BaseExtension = (
|
|
|
10001
10001
|
return new Promise(function(g) {
|
|
10002
10002
|
draco.decodeDracoFile(A, function(E) {
|
|
10003
10003
|
for (var v in E.attributes) {
|
|
10004
|
-
var y = E.attributes[v],
|
|
10005
|
-
|
|
10004
|
+
var y = E.attributes[v], T = c[v];
|
|
10005
|
+
T !== void 0 && (y.normalized = T);
|
|
10006
10006
|
}
|
|
10007
10007
|
g(E);
|
|
10008
10008
|
}, l, f);
|
|
@@ -10499,19 +10499,19 @@ var BaseExtension = (
|
|
|
10499
10499
|
s = v.instance, s.exports.__wasm_call_ctors();
|
|
10500
10500
|
});
|
|
10501
10501
|
function l(v) {
|
|
10502
|
-
for (var y = new Uint8Array(v.length),
|
|
10503
|
-
var
|
|
10504
|
-
y[
|
|
10502
|
+
for (var y = new Uint8Array(v.length), T = 0; T < v.length; ++T) {
|
|
10503
|
+
var b = v.charCodeAt(T);
|
|
10504
|
+
y[T] = b > 96 ? b - 97 : b > 64 ? b - 39 : b + 4;
|
|
10505
10505
|
}
|
|
10506
|
-
for (var S = 0,
|
|
10507
|
-
y[S++] = y[
|
|
10506
|
+
for (var S = 0, T = 0; T < v.length; ++T)
|
|
10507
|
+
y[S++] = y[T] < 60 ? r[y[T]] : (y[T] - 60) * 64 + y[++T];
|
|
10508
10508
|
return y.buffer.slice(0, S);
|
|
10509
10509
|
}
|
|
10510
|
-
function c(v, y,
|
|
10511
|
-
var C = s.exports.sbrk, w =
|
|
10510
|
+
function c(v, y, T, b, S, R) {
|
|
10511
|
+
var C = s.exports.sbrk, w = T + 3 & -4, I = C(w * b), H = C(S.length), M = new Uint8Array(s.exports.memory.buffer);
|
|
10512
10512
|
M.set(S, H);
|
|
10513
|
-
var P = v(I,
|
|
10514
|
-
if (P == 0 && R && R(I, w,
|
|
10513
|
+
var P = v(I, T, b, H, S.length);
|
|
10514
|
+
if (P == 0 && R && R(I, w, b), y.set(M.subarray(I, I + T * b)), C(I - C(0)), P != 0)
|
|
10515
10515
|
throw new Error("Malformed buffer data: " + P);
|
|
10516
10516
|
}
|
|
10517
10517
|
var f = {
|
|
@@ -10530,32 +10530,32 @@ var BaseExtension = (
|
|
|
10530
10530
|
pending: 0,
|
|
10531
10531
|
requests: {}
|
|
10532
10532
|
};
|
|
10533
|
-
return y.object.onmessage = function(
|
|
10534
|
-
var
|
|
10535
|
-
y.pending -=
|
|
10533
|
+
return y.object.onmessage = function(T) {
|
|
10534
|
+
var b = T.data;
|
|
10535
|
+
y.pending -= b.count, y.requests[b.id][b.action](b.value), delete y.requests[b.id];
|
|
10536
10536
|
}, y;
|
|
10537
10537
|
}
|
|
10538
10538
|
function A(v) {
|
|
10539
|
-
for (var y = "var instance; var ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(l(o)) + "]), {}).then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });self.onmessage = workerProcess;" + c.toString() + E.toString(),
|
|
10540
|
-
h[S] = m(
|
|
10541
|
-
URL.revokeObjectURL(
|
|
10539
|
+
for (var y = "var instance; var ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(l(o)) + "]), {}).then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });self.onmessage = workerProcess;" + c.toString() + E.toString(), T = new Blob([y], { type: "text/javascript" }), b = URL.createObjectURL(T), S = 0; S < v; ++S)
|
|
10540
|
+
h[S] = m(b);
|
|
10541
|
+
URL.revokeObjectURL(b);
|
|
10542
10542
|
}
|
|
10543
|
-
function g(v, y,
|
|
10543
|
+
function g(v, y, T, b, S) {
|
|
10544
10544
|
for (var R = h[0], C = 1; C < h.length; ++C)
|
|
10545
10545
|
h[C].pending < R.pending && (R = h[C]);
|
|
10546
10546
|
return new Promise(function(w, I) {
|
|
10547
|
-
var H = new Uint8Array(
|
|
10548
|
-
R.pending += v, R.requests[M] = { resolve: w, reject: I }, R.object.postMessage({ id: M, count: v, size: y, source: H, mode:
|
|
10547
|
+
var H = new Uint8Array(T), M = p++;
|
|
10548
|
+
R.pending += v, R.requests[M] = { resolve: w, reject: I }, R.object.postMessage({ id: M, count: v, size: y, source: H, mode: b, filter: S }, [H.buffer]);
|
|
10549
10549
|
});
|
|
10550
10550
|
}
|
|
10551
10551
|
function E(v) {
|
|
10552
10552
|
u.then(function() {
|
|
10553
10553
|
var y = v.data;
|
|
10554
10554
|
try {
|
|
10555
|
-
var
|
|
10556
|
-
c(s.exports[y.mode],
|
|
10557
|
-
} catch (
|
|
10558
|
-
self.postMessage({ id: y.id, count: y.count, action: "reject", value:
|
|
10555
|
+
var T = new Uint8Array(y.count * y.size);
|
|
10556
|
+
c(s.exports[y.mode], T, y.count, y.size, y.source, s.exports[y.filter]), self.postMessage({ id: y.id, count: y.count, action: "resolve", value: T }, [T.buffer]);
|
|
10557
|
+
} catch (b) {
|
|
10558
|
+
self.postMessage({ id: y.id, count: y.count, action: "reject", value: b });
|
|
10559
10559
|
}
|
|
10560
10560
|
});
|
|
10561
10561
|
}
|
|
@@ -10565,22 +10565,22 @@ var BaseExtension = (
|
|
|
10565
10565
|
useWorkers: function(v) {
|
|
10566
10566
|
A(v);
|
|
10567
10567
|
},
|
|
10568
|
-
decodeVertexBuffer: function(v, y,
|
|
10569
|
-
c(s.exports.meshopt_decodeVertexBuffer, v, y,
|
|
10568
|
+
decodeVertexBuffer: function(v, y, T, b, S) {
|
|
10569
|
+
c(s.exports.meshopt_decodeVertexBuffer, v, y, T, b, s.exports[f[S]]);
|
|
10570
10570
|
},
|
|
10571
|
-
decodeIndexBuffer: function(v, y,
|
|
10572
|
-
c(s.exports.meshopt_decodeIndexBuffer, v, y,
|
|
10571
|
+
decodeIndexBuffer: function(v, y, T, b) {
|
|
10572
|
+
c(s.exports.meshopt_decodeIndexBuffer, v, y, T, b);
|
|
10573
10573
|
},
|
|
10574
|
-
decodeIndexSequence: function(v, y,
|
|
10575
|
-
c(s.exports.meshopt_decodeIndexSequence, v, y,
|
|
10574
|
+
decodeIndexSequence: function(v, y, T, b) {
|
|
10575
|
+
c(s.exports.meshopt_decodeIndexSequence, v, y, T, b);
|
|
10576
10576
|
},
|
|
10577
|
-
decodeGltfBuffer: function(v, y,
|
|
10578
|
-
c(s.exports[d[S]], v, y,
|
|
10577
|
+
decodeGltfBuffer: function(v, y, T, b, S, R) {
|
|
10578
|
+
c(s.exports[d[S]], v, y, T, b, s.exports[f[R]]);
|
|
10579
10579
|
},
|
|
10580
|
-
decodeGltfBufferAsync: function(v, y,
|
|
10581
|
-
return h.length > 0 ? g(v, y,
|
|
10580
|
+
decodeGltfBufferAsync: function(v, y, T, b, S) {
|
|
10581
|
+
return h.length > 0 ? g(v, y, T, d[b], f[S]) : u.then(function() {
|
|
10582
10582
|
var R = new Uint8Array(v * y);
|
|
10583
|
-
return c(s.exports[d[
|
|
10583
|
+
return c(s.exports[d[b]], R, v, y, T, s.exports[f[S]]), R;
|
|
10584
10584
|
});
|
|
10585
10585
|
}
|
|
10586
10586
|
};
|
|
@@ -10666,38 +10666,38 @@ var BaseExtension = (
|
|
|
10666
10666
|
return o.loadPBMMaterial(d, r);
|
|
10667
10667
|
})), f = Promise.all([l, c]).then(function(d) {
|
|
10668
10668
|
for (var h = d[0], p = d[1], m = [], A = 0; A < u.length; A++) {
|
|
10669
|
-
var g = u[A], E = h[A], v = p[A], y = g.mode || WEBGL_CONSTANTS.TRIANGLES,
|
|
10669
|
+
var g = u[A], E = h[A], v = p[A], y = g.mode || WEBGL_CONSTANTS.TRIANGLES, T = void 0;
|
|
10670
10670
|
if (y === WEBGL_CONSTANTS.TRIANGLES || y === WEBGL_CONSTANTS.TRIANGLE_STRIP || y === WEBGL_CONSTANTS.TRIANGLE_FAN)
|
|
10671
10671
|
if (y === WEBGL_CONSTANTS.TRIANGLE_STRIP ? E = r.toGeometryTrianglesDrawMode(E, THREE.TriangleStripDrawMode) : y === WEBGL_CONSTANTS.TRIANGLE_FAN && (E = r.toGeometryTrianglesDrawMode(E, THREE.TriangleFanDrawMode)), E.clearGroups(), E.addGroup(0, E.index ? E.index.count : E.attributes.position.count, 0), r.disposeSet.add(E), s.isSkinnedMesh) {
|
|
10672
|
-
var
|
|
10673
|
-
E.attributes.skinWeight.normalized ||
|
|
10672
|
+
var b = new PBMSkinnedMesh(E, [v]);
|
|
10673
|
+
E.attributes.skinWeight.normalized || b.normalizeSkinWeights(), T = b;
|
|
10674
10674
|
} else
|
|
10675
|
-
|
|
10675
|
+
T = new PBMMesh(E, [v]);
|
|
10676
10676
|
else if (y === WEBGL_CONSTANTS.POINTS)
|
|
10677
|
-
|
|
10677
|
+
T = new PBMPointCloud(E, v);
|
|
10678
10678
|
else
|
|
10679
10679
|
throw new Error("glTF: Primitive mode unsupported: " + y);
|
|
10680
10680
|
if (Object.keys(E.morphAttributes).length > 0) {
|
|
10681
10681
|
if (s.weights !== void 0)
|
|
10682
10682
|
for (var S = 0, R = s.weights.length; S < R; S++)
|
|
10683
|
-
|
|
10683
|
+
T.morphTargetInfluences[S] = s.weights[S];
|
|
10684
10684
|
if (s.extras && Array.isArray(s.extras.targetNames)) {
|
|
10685
10685
|
var C = s.extras.targetNames;
|
|
10686
|
-
if (
|
|
10687
|
-
|
|
10686
|
+
if (T.morphTargetInfluences.length === C.length) {
|
|
10687
|
+
T.morphTargetDictionary = {};
|
|
10688
10688
|
for (var S = 0, R = C.length; S < R; S++)
|
|
10689
|
-
|
|
10689
|
+
T.morphTargetDictionary[C[S]] = S;
|
|
10690
10690
|
} else
|
|
10691
10691
|
console.warn("glTF: Invalid extras.targetNames length. Ignoring names.");
|
|
10692
10692
|
}
|
|
10693
10693
|
}
|
|
10694
|
-
|
|
10694
|
+
T.name = s.name || "mesh_" + e, r.assignFinalMaterial(T), m.push(T);
|
|
10695
10695
|
}
|
|
10696
10696
|
if (m.length === 1)
|
|
10697
10697
|
return m[0];
|
|
10698
10698
|
for (var w = new THREE.Group(), I = 0, H = m; I < H.length; I++) {
|
|
10699
|
-
var
|
|
10700
|
-
w.add(
|
|
10699
|
+
var T = H[I];
|
|
10700
|
+
w.add(T);
|
|
10701
10701
|
}
|
|
10702
10702
|
return w;
|
|
10703
10703
|
});
|
|
@@ -10949,8 +10949,8 @@ function parseDraco(n, t) {
|
|
|
10949
10949
|
if (p)
|
|
10950
10950
|
A = p;
|
|
10951
10951
|
else if (h) {
|
|
10952
|
-
for (var g = h.count, E = h.array, v = new Uint8Array(g * 4), y = 0,
|
|
10953
|
-
|
|
10952
|
+
for (var g = h.count, E = h.array, v = new Uint8Array(g * 4), y = 0, T = void 0, b = void 0; y < g; y++)
|
|
10953
|
+
b = y * 4, T = y * 3, v[b] = E[T], v[++b] = E[++T], v[++b] = E[++T];
|
|
10954
10954
|
A = new THREE.BufferAttribute(v, 4, h.normalized);
|
|
10955
10955
|
}
|
|
10956
10956
|
return {
|
|
@@ -11668,12 +11668,12 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11668
11668
|
for (var P = max(H), F = (1 << P) - 1, L = hMap(H, P, 1), M = 0; M < w; ) {
|
|
11669
11669
|
var O = L[bits(n, h, F)];
|
|
11670
11670
|
h += O & 15;
|
|
11671
|
-
var
|
|
11672
|
-
if (
|
|
11673
|
-
I[M++] =
|
|
11671
|
+
var T = O >> 4;
|
|
11672
|
+
if (T < 16)
|
|
11673
|
+
I[M++] = T;
|
|
11674
11674
|
else {
|
|
11675
11675
|
var N = 0, D = 0;
|
|
11676
|
-
for (
|
|
11676
|
+
for (T == 16 ? (D = 3 + bits(n, h, 3), h += 2, N = I[M - 1]) : T == 17 ? (D = 3 + bits(n, h, 7), h += 3) : T == 18 && (D = 11 + bits(n, h, 127), h += 7); D--; )
|
|
11677
11677
|
I[M++] = N;
|
|
11678
11678
|
}
|
|
11679
11679
|
}
|
|
@@ -11682,12 +11682,12 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11682
11682
|
} else
|
|
11683
11683
|
err(1);
|
|
11684
11684
|
else {
|
|
11685
|
-
var
|
|
11685
|
+
var T = shft(h) + 4, b = n[T - 4] | n[T - 3] << 8, S = T + b;
|
|
11686
11686
|
if (S > o) {
|
|
11687
11687
|
c && err(0);
|
|
11688
11688
|
break;
|
|
11689
11689
|
}
|
|
11690
|
-
l && f(p +
|
|
11690
|
+
l && f(p + b), e.set(n.subarray(T, S), p), t.b = p += b, t.p = h = S * 8, t.f = d;
|
|
11691
11691
|
continue;
|
|
11692
11692
|
}
|
|
11693
11693
|
if (h > v) {
|
|
@@ -11867,12 +11867,12 @@ var FBXTreeParser = (
|
|
|
11867
11867
|
return n.prototype.parse = function(t) {
|
|
11868
11868
|
var e, r, o, s, u, l, c = this.parseConnections(t), f = Object.assign(new THREE.Group(), { animations: [] }), d = [], h = this.parseImages(t), p = this.parseTextures(t, h, c, d), m = this.parseMaterials(t, p, c), A = this.parseDeformers(t, c), g = new GeometryParser().parse(t, A, c);
|
|
11869
11869
|
this.parseScene(t, A, g, m, c, f);
|
|
11870
|
-
var E = (r = (e = t.GlobalSettings.UpAxis) === null || e === void 0 ? void 0 : e.value) !== null && r !== void 0 ? r : 1, v = (s = (o = t.GlobalSettings.FrontAxis) === null || o === void 0 ? void 0 : o.value) !== null && s !== void 0 ? s : 2, y = (l = (u = t.GlobalSettings.UnitScaleFactor) === null || u === void 0 ? void 0 : u.value) !== null && l !== void 0 ? l : 1,
|
|
11870
|
+
var E = (r = (e = t.GlobalSettings.UpAxis) === null || e === void 0 ? void 0 : e.value) !== null && r !== void 0 ? r : 1, v = (s = (o = t.GlobalSettings.FrontAxis) === null || o === void 0 ? void 0 : o.value) !== null && s !== void 0 ? s : 2, y = (l = (u = t.GlobalSettings.UnitScaleFactor) === null || u === void 0 ? void 0 : u.value) !== null && l !== void 0 ? l : 1, T;
|
|
11871
11871
|
if (t.GlobalSettings.AmbientColor) {
|
|
11872
|
-
var
|
|
11872
|
+
var b = t.GlobalSettings.AmbientColor.value, S = b[0], R = b[1], C = b[2];
|
|
11873
11873
|
if (S !== 0 || R !== 0 || C !== 0) {
|
|
11874
11874
|
var w = new THREE.Color().setRGB(S, R, C);
|
|
11875
|
-
|
|
11875
|
+
T = new THREE.AmbientLight(w, 1);
|
|
11876
11876
|
}
|
|
11877
11877
|
}
|
|
11878
11878
|
return Promise.all(d).then(function(I) {
|
|
@@ -11880,7 +11880,7 @@ var FBXTreeParser = (
|
|
|
11880
11880
|
return {
|
|
11881
11881
|
scene: f,
|
|
11882
11882
|
textures: I,
|
|
11883
|
-
ambientLight:
|
|
11883
|
+
ambientLight: T,
|
|
11884
11884
|
upAxis: ["X", "Y", "Z"][E],
|
|
11885
11885
|
frontAxis: ["X", "Y", "Z"][v],
|
|
11886
11886
|
unitScale: y,
|
|
@@ -12423,25 +12423,25 @@ var FBXTreeParser = (
|
|
|
12423
12423
|
m < 0 && (m = m ^ -1, E = !0);
|
|
12424
12424
|
var v = [], y = [];
|
|
12425
12425
|
if (u.push(m * 3, m * 3 + 1, m * 3 + 2), t.color) {
|
|
12426
|
-
var
|
|
12427
|
-
c.push(
|
|
12426
|
+
var T = getData(A, r, m, t.color);
|
|
12427
|
+
c.push(T[0], T[1], T[2]);
|
|
12428
12428
|
}
|
|
12429
12429
|
if (t.skeleton) {
|
|
12430
12430
|
if (t.weightTable[m] !== void 0 && t.weightTable[m].forEach(function(C) {
|
|
12431
12431
|
y.push(C.weight), v.push(C.id);
|
|
12432
12432
|
}), y.length > 4) {
|
|
12433
12433
|
s || (console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."), s = !0);
|
|
12434
|
-
var
|
|
12434
|
+
var b = [0, 0, 0, 0], S = [0, 0, 0, 0];
|
|
12435
12435
|
y.forEach(function(C, w) {
|
|
12436
12436
|
var I = C, H = v[w];
|
|
12437
12437
|
S.forEach(function(M, P, F) {
|
|
12438
12438
|
if (I > M) {
|
|
12439
12439
|
F[P] = I, I = M;
|
|
12440
|
-
var L =
|
|
12441
|
-
|
|
12440
|
+
var L = b[P];
|
|
12441
|
+
b[P] = H, H = L;
|
|
12442
12442
|
}
|
|
12443
12443
|
});
|
|
12444
|
-
}), v =
|
|
12444
|
+
}), v = b, y = S;
|
|
12445
12445
|
}
|
|
12446
12446
|
for (; y.length < 4; )
|
|
12447
12447
|
y.push(0), v.push(0);
|
|
@@ -12449,8 +12449,8 @@ var FBXTreeParser = (
|
|
|
12449
12449
|
d.push(y[R]), h.push(v[R]);
|
|
12450
12450
|
}
|
|
12451
12451
|
if (t.normal) {
|
|
12452
|
-
var
|
|
12453
|
-
l.push(
|
|
12452
|
+
var T = getData(A, r, m, t.normal);
|
|
12453
|
+
l.push(T[0], T[1], T[2]);
|
|
12454
12454
|
}
|
|
12455
12455
|
t.material && t.material.mappingType !== "AllSame" && (g = getData(A, r, m, t.material)[0], g < 0 && (p.negativeMaterialIndices = !0, g = 0)), t.uv && t.uv.forEach(function(C, w) {
|
|
12456
12456
|
var I = getData(A, r, m, C);
|
|
@@ -12477,8 +12477,8 @@ var FBXTreeParser = (
|
|
|
12477
12477
|
if (d > 3) {
|
|
12478
12478
|
for (var p = [], m = e.baseVertexPositions || e.vertexPositions, A = 0; A < r.length; A += 3)
|
|
12479
12479
|
p.push(new THREE.Vector3(m[r[A]], m[r[A + 1]], m[r[A + 2]]));
|
|
12480
|
-
for (var g = this.getNormalTangentAndBitangent(p), E = g.tangent, v = g.bitangent, y = [],
|
|
12481
|
-
var S = T
|
|
12480
|
+
for (var g = this.getNormalTangentAndBitangent(p), E = g.tangent, v = g.bitangent, y = [], T = 0, b = p; T < b.length; T++) {
|
|
12481
|
+
var S = b[T];
|
|
12482
12482
|
y.push(this.flattenVertex(S, E, v));
|
|
12483
12483
|
}
|
|
12484
12484
|
h = THREE.ShapeUtils.triangulateShape(y, []);
|
|
@@ -12666,11 +12666,11 @@ var FBXTreeParser = (
|
|
|
12666
12666
|
d[A] && (d[A][g.attr] = g);
|
|
12667
12667
|
} else if (g.curves.morph !== void 0) {
|
|
12668
12668
|
if (d[A] === void 0) {
|
|
12669
|
-
var
|
|
12669
|
+
var T = r.get(m.ID).parents.filter(function(I) {
|
|
12670
12670
|
return I.relationship !== void 0;
|
|
12671
|
-
})[0].ID,
|
|
12671
|
+
})[0].ID, b = r.get(T).parents[0].ID, S = r.get(b).parents[0].ID, E = r.get(S).parents[0].ID, R = t.Objects.Model[E], C = {
|
|
12672
12672
|
modelName: R.attrName ? THREE.PropertyBinding.sanitizeNodeName(R.attrName) : "",
|
|
12673
|
-
morphName: t.Objects.Deformer[
|
|
12673
|
+
morphName: t.Objects.Deformer[T].attrName
|
|
12674
12674
|
};
|
|
12675
12675
|
d[A] = C;
|
|
12676
12676
|
}
|
|
@@ -12808,8 +12808,8 @@ var FBXTreeParser = (
|
|
|
12808
12808
|
if (p[0] >= 180 || p[1] >= 180 || p[2] >= 180) {
|
|
12809
12809
|
var m = Math.max.apply(Math, p), A = m / 180, g = new THREE.Euler(f[0], f[1], f[2], o), E = new THREE.Euler(f[0], f[1], f[2], o), v = new THREE.Quaternion().setFromEuler(g), y = new THREE.Quaternion().setFromEuler(E);
|
|
12810
12810
|
v.dot(y) && y.set(-y.x, -y.y, -y.z, -y.w);
|
|
12811
|
-
for (var
|
|
12812
|
-
S.copy(v.clone().slerp(y.clone(), C)), s.push(
|
|
12811
|
+
for (var T = t.times[l - 1], b = t.times[l] - T, S = new THREE.Quaternion(), R = new THREE.Euler(), C = 0; C < 1; C += 1 / A)
|
|
12812
|
+
S.copy(v.clone().slerp(y.clone(), C)), s.push(T + C * b), R.setFromQuaternion(S, o), u.push(R.x), u.push(R.y), u.push(R.z);
|
|
12813
12813
|
} else
|
|
12814
12814
|
s.push(t.times[l]), u.push(THREE.MathUtils.degToRad(t.values[l])), u.push(THREE.MathUtils.degToRad(e.values[l])), u.push(THREE.MathUtils.degToRad(r.values[l]));
|
|
12815
12815
|
}
|
|
@@ -13183,13 +13183,13 @@ function generateTransform(n) {
|
|
|
13183
13183
|
v.extractRotation(d);
|
|
13184
13184
|
var y = new THREE.Matrix4();
|
|
13185
13185
|
y.copyPosition(d);
|
|
13186
|
-
var
|
|
13186
|
+
var T = new THREE.Matrix4().getInverse(y).multiply(d), b = new THREE.Matrix4().getInverse(v).multiply(T), S = s, R = new THREE.Matrix4();
|
|
13187
13187
|
if (m === 0)
|
|
13188
|
-
R.copy(v).multiply(E).multiply(
|
|
13188
|
+
R.copy(v).multiply(E).multiply(b).multiply(S);
|
|
13189
13189
|
else if (m === 1)
|
|
13190
|
-
R.copy(v).multiply(
|
|
13190
|
+
R.copy(v).multiply(b).multiply(E).multiply(S);
|
|
13191
13191
|
else {
|
|
13192
|
-
var C = new THREE.Matrix4().scale(new THREE.Vector3().setFromMatrixScale(h)), w = new THREE.Matrix4().getInverse(C), I =
|
|
13192
|
+
var C = new THREE.Matrix4().scale(new THREE.Vector3().setFromMatrixScale(h)), w = new THREE.Matrix4().getInverse(C), I = b.clone().multiply(w);
|
|
13193
13193
|
R.copy(v).multiply(E).multiply(I).multiply(S);
|
|
13194
13194
|
}
|
|
13195
13195
|
var H = new THREE.Matrix4().getInverse(f), M = new THREE.Matrix4().getInverse(u), P = t.clone().multiply(c).multiply(f).multiply(e).multiply(r).multiply(o).multiply(H).multiply(l).multiply(u).multiply(s).multiply(M), F = new THREE.Matrix4().copyPosition(P), L = d.clone().multiply(F);
|
|
@@ -13316,17 +13316,17 @@ function calcBasisFunctionDerivatives(n, t, e, r, o) {
|
|
|
13316
13316
|
for (var h = 0; h <= e; ++h)
|
|
13317
13317
|
l[0][h] = c[h][e];
|
|
13318
13318
|
for (var v = 0; v <= e; ++v) {
|
|
13319
|
-
for (var y = 0,
|
|
13320
|
-
|
|
13321
|
-
|
|
13319
|
+
for (var y = 0, T = 1, b = [], u = 0; u <= e; ++u)
|
|
13320
|
+
b[u] = s.slice(0);
|
|
13321
|
+
b[0][0] = 1;
|
|
13322
13322
|
for (var S = 1; S <= r; ++S) {
|
|
13323
13323
|
var R = 0, C = v - S, w = e - S;
|
|
13324
|
-
v >= S && (T
|
|
13324
|
+
v >= S && (b[T][0] = b[y][0] / c[w + 1][C], R = b[T][0] * c[C][w]);
|
|
13325
13325
|
for (var I = C >= -1 ? 1 : -C, H = v - 1 <= w ? S - 1 : e - v, M = I; M <= H; ++M)
|
|
13326
|
-
T
|
|
13327
|
-
v <= w && (T
|
|
13326
|
+
b[T][M] = (b[y][M] - b[y][M - 1]) / c[w + 1][C + M], R += b[T][M] * c[C + M][w];
|
|
13327
|
+
v <= w && (b[T][S] = -b[y][S - 1] / c[w + 1][v], R += b[T][S] * c[v][w]), l[S][v] = R;
|
|
13328
13328
|
var h = y;
|
|
13329
|
-
y =
|
|
13329
|
+
y = T, T = h;
|
|
13330
13330
|
}
|
|
13331
13331
|
}
|
|
13332
13332
|
for (var P = e, S = 1; S <= r; ++S) {
|
|
@@ -13427,7 +13427,7 @@ function loadX3p(n, t) {
|
|
|
13427
13427
|
});
|
|
13428
13428
|
}
|
|
13429
13429
|
function parse$1(n, t) {
|
|
13430
|
-
for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, E, v, y,
|
|
13430
|
+
for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, E, v, y, T, b, S, R, C, w, I, H, M, P, F, L, O, N, D, V, z, K, Q, q, J, G, W, Z, Y, X, j, ee, te, re, ae, pe, le, ve, xe, Ae, Te, ue = unzipSync(n), fe = "", ne = null, oe = 0, de = Object.keys(ue); oe < de.length; oe++) {
|
|
13431
13431
|
var me = de[oe];
|
|
13432
13432
|
/(^|\/)main\.xml$/i.test(me) && (ne = ue[me], fe = me.slice(0, me.lastIndexOf("/") + 1));
|
|
13433
13433
|
}
|
|
@@ -13445,7 +13445,7 @@ function parse$1(n, t) {
|
|
|
13445
13445
|
y: {
|
|
13446
13446
|
type: (g = (A = (m = he == null ? void 0 : he.querySelector("CY AxisType")) === null || m === void 0 ? void 0 : m.textContent) === null || A === void 0 ? void 0 : A.toUpperCase()) !== null && g !== void 0 ? g : "I",
|
|
13447
13447
|
dataType: (y = (v = (E = he == null ? void 0 : he.querySelector("CY DataType")) === null || E === void 0 ? void 0 : E.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && y !== void 0 ? y : "D",
|
|
13448
|
-
increment: Number((
|
|
13448
|
+
increment: Number((b = (T = he == null ? void 0 : he.querySelector("CY Increment")) === null || T === void 0 ? void 0 : T.textContent) !== null && b !== void 0 ? b : "1"),
|
|
13449
13449
|
offset: Number((R = (S = he == null ? void 0 : he.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
|
|
13450
13450
|
},
|
|
13451
13451
|
z: {
|
|
@@ -14073,13 +14073,13 @@ var BVHVector3 = (
|
|
|
14073
14073
|
var s = this.getPositionCount() / 3, u = s > 65535 ? new Uint32Array(s) : new Uint16Array(s), l = new Float32Array(s * 6), c = [], f = 0, d = -1;
|
|
14074
14074
|
if (o)
|
|
14075
14075
|
for (var h = 0; h < s; h += 1) {
|
|
14076
|
-
var p = h * 3, m = h * 6, A = void 0, g = void 0, E = void 0, v = void 0, y = void 0,
|
|
14077
|
-
u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x,
|
|
14076
|
+
var p = h * 3, m = h * 6, A = void 0, g = void 0, E = void 0, v = void 0, y = void 0, T = void 0, b = void 0;
|
|
14077
|
+
u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x, b = scratchVector3B.x, b < A && (A = b), b > v && (v = b), b = scratchVector3C.x, b < A && (A = b), b > v && (v = b), g = y = scratchVector3A.y, b = scratchVector3B.y, b < g && (g = b), b > y && (y = b), b = scratchVector3C.y, b < g && (g = b), b > y && (y = b), E = T = scratchVector3A.z, b = scratchVector3B.z, b < E && (E = b), b > T && (T = b), b = scratchVector3C.z, b < E && (E = b), b > T && (T = b), l[m] = A, l[m + 1] = g, l[m + 2] = E, l[m + 3] = v, l[m + 4] = y, l[m + 5] = T;
|
|
14078
14078
|
}
|
|
14079
14079
|
else {
|
|
14080
14080
|
for (var S = 1 / 0, R = 1 / 0, C = 1 / 0, w = -1 / 0, I = -1 / 0, H = -1 / 0, h = 0; h < s; h += 1) {
|
|
14081
|
-
var p = h * 3, m = h * 6, A = void 0, g = void 0, E = void 0, v = void 0, y = void 0,
|
|
14082
|
-
u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x,
|
|
14081
|
+
var p = h * 3, m = h * 6, A = void 0, g = void 0, E = void 0, v = void 0, y = void 0, T = void 0, b = void 0;
|
|
14082
|
+
u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x, b = scratchVector3B.x, b < A && (A = b), b > v && (v = b), b = scratchVector3C.x, b < A && (A = b), b > v && (v = b), g = y = scratchVector3A.y, b = scratchVector3B.y, b < g && (g = b), b > y && (y = b), b = scratchVector3C.y, b < g && (g = b), b > y && (y = b), E = T = scratchVector3A.z, b = scratchVector3B.z, b < E && (E = b), b > T && (T = b), b = scratchVector3C.z, b < E && (E = b), b > T && (T = b), l[m] = A, l[m + 1] = g, l[m + 2] = E, l[m + 3] = v, l[m + 4] = y, l[m + 5] = T, A < S && (S = A), v > w && (w = v), g < R && (R = g), y > I && (I = y), E < C && (C = E), T > H && (H = T);
|
|
14083
14083
|
}
|
|
14084
14084
|
o = [S, R, C, w, I, H];
|
|
14085
14085
|
}
|
|
@@ -14111,15 +14111,15 @@ var BVHVector3 = (
|
|
|
14111
14111
|
var p = h * BYTES_PER_NODE / 4, m = clamp(e.x, u[p], u[p + 3]) - e.x, A = clamp(e.y, u[p + 1], u[p + 4]) - e.y, g = clamp(e.z, u[p + 2], u[p + 5]) - e.z;
|
|
14112
14112
|
if (m * m + A * A + g * g <= r * r) {
|
|
14113
14113
|
for (var E = l[p + 6], v = l[p + 7], y = E; y < v; y++) {
|
|
14114
|
-
var
|
|
14115
|
-
d.push(
|
|
14114
|
+
var T = o[y];
|
|
14115
|
+
d.push(T);
|
|
14116
14116
|
}
|
|
14117
|
-
var
|
|
14117
|
+
var b = h * BYTES_PER_NODE / 2, S = c[b + 16], R = c[b + 17];
|
|
14118
14118
|
S && f.push(S), R && f.push(R);
|
|
14119
14119
|
}
|
|
14120
14120
|
}
|
|
14121
14121
|
for (var C = d.length, w = new Float32Array(C * 9), y = 0; y < C; y++) {
|
|
14122
|
-
var
|
|
14122
|
+
var T = d[y], I = T * 3;
|
|
14123
14123
|
this.getPositionByIndex(I, scratchVector3$9), w[y * 9] = scratchVector3$9.x, w[y * 9 + 1] = scratchVector3$9.y, w[y * 9 + 2] = scratchVector3$9.z, this.getPositionByIndex(I + 1, scratchVector3$9), w[y * 9 + 3] = scratchVector3$9.x, w[y * 9 + 4] = scratchVector3$9.y, w[y * 9 + 5] = scratchVector3$9.z, this.getPositionByIndex(I + 2, scratchVector3$9), w[y * 9 + 6] = scratchVector3$9.x, w[y * 9 + 7] = scratchVector3$9.y, w[y * 9 + 8] = scratchVector3$9.z;
|
|
14124
14124
|
}
|
|
14125
14125
|
return w;
|
|
@@ -14128,9 +14128,9 @@ var BVHVector3 = (
|
|
|
14128
14128
|
for (var l = [], c = this.offsetArray, f = this.rootNodePacked, d = new Float32Array(f), h = new Uint32Array(f), p = new Uint16Array(f), m = new BVHVector3(1 / r.x, 1 / r.y, 1 / r.z), A = [0], g, E = new BVHBox3(new BVHVector3(0, 0, 0), new BVHVector3(0, 0, 0)), v = 1 / 0; (g = A.pop()) !== void 0; ) {
|
|
14129
14129
|
var y = g * BYTES_PER_NODE / 4;
|
|
14130
14130
|
E.min.x = d[y], E.min.y = d[y + 1], E.min.z = d[y + 2], E.max.x = d[y + 3], E.max.y = d[y + 4], E.max.z = d[y + 5];
|
|
14131
|
-
var
|
|
14132
|
-
if (
|
|
14133
|
-
for (var
|
|
14131
|
+
var T = intersectNodeBox(e, m, E, o);
|
|
14132
|
+
if (T !== null && !(s && T > v)) {
|
|
14133
|
+
for (var b = e.x, S = e.y, R = e.z, C = r.x, w = r.y, I = r.z, H = h[y + 6], M = h[y + 7], P = H; P < M; P++) {
|
|
14134
14134
|
var F = c[P], L = F * 3, O = new BVHVector3(0, 0, 0);
|
|
14135
14135
|
this.getPositionByIndex(L, O);
|
|
14136
14136
|
var N = O.x, D = O.y, V = O.z, z = new BVHVector3(0, 0, 0);
|
|
@@ -14144,13 +14144,13 @@ var BVHVector3 = (
|
|
|
14144
14144
|
xe = -1, ve = -ve;
|
|
14145
14145
|
else
|
|
14146
14146
|
continue;
|
|
14147
|
-
var Ae =
|
|
14147
|
+
var Ae = b - N, Te = S - D, ue = R - V, fe = xe * (C * (Te * re - ue * te) + w * (ue * ee - Ae * re) + I * (Ae * te - Te * ee));
|
|
14148
14148
|
if (!(fe < 0)) {
|
|
14149
14149
|
var ne = xe * (C * (X * ue - j * Te) + w * (j * Ae - Y * ue) + I * (Y * Te - X * Ae));
|
|
14150
14150
|
if (!(ne < 0) && !(fe + ne > ve)) {
|
|
14151
14151
|
var oe = -xe * (Ae * ae + Te * pe + ue * le);
|
|
14152
14152
|
if (!(oe < 0)) {
|
|
14153
|
-
var de = oe / ve, me = new BVHVector3(
|
|
14153
|
+
var de = oe / ve, me = new BVHVector3(b + C * de, S + w * de, R + I * de), Ne = new BVHIntersect(O, z, J, F, me);
|
|
14154
14154
|
(!u || u(Ne)) && (s ? de < v && (v = de, l.length > 0 && (l.length = 0), l.push(Ne)) : l.push(Ne));
|
|
14155
14155
|
}
|
|
14156
14156
|
}
|
|
@@ -14200,8 +14200,8 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
|
|
|
14200
14200
|
s(0, scratchVector3$8);
|
|
14201
14201
|
for (var p = scratchVector3$8.x, m = scratchVector3$8.y, A = scratchVector3$8.z, g = p, E = m, v = A, h = 0; h < u; h += 1) {
|
|
14202
14202
|
l[h] = h, s(h, scratchVector3$8);
|
|
14203
|
-
var y = scratchVector3$8.x,
|
|
14204
|
-
y < p ? p = y : y > g && (g = y),
|
|
14203
|
+
var y = scratchVector3$8.x, T = scratchVector3$8.y, b = scratchVector3$8.z;
|
|
14204
|
+
y < p ? p = y : y > g && (g = y), T < m ? m = T : T > E && (E = T), b < A ? A = b : b > v && (v = b);
|
|
14205
14205
|
}
|
|
14206
14206
|
o = [p, m, A, g, E, v];
|
|
14207
14207
|
}
|
|
@@ -14235,11 +14235,11 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
|
|
|
14235
14235
|
}, t.prototype.intersectRay = function(e, r, o, s, u) {
|
|
14236
14236
|
o === void 0 && (o = 0), s === void 0 && (s = !1);
|
|
14237
14237
|
for (var l = [], c = this.offsetArray, f = this.rootNodePacked, d = new Float32Array(f), h = new Uint32Array(f), p = new Uint16Array(f), m = o * o, A = new BVHVector3(1 / r.x, 1 / r.y, 1 / r.z), g = [0], E, v = new BVHBox3(new BVHVector3(0, 0, 0), new BVHVector3(0, 0, 0)), y = 1 / 0; (E = g.pop()) !== void 0; ) {
|
|
14238
|
-
var
|
|
14239
|
-
v.min.x = d[
|
|
14240
|
-
var
|
|
14241
|
-
if (
|
|
14242
|
-
for (var S = h[
|
|
14238
|
+
var T = E * BYTES_PER_NODE / 4;
|
|
14239
|
+
v.min.x = d[T], v.min.y = d[T + 1], v.min.z = d[T + 2], v.max.x = d[T + 3], v.max.y = d[T + 4], v.max.z = d[T + 5];
|
|
14240
|
+
var b = intersectNodeBox(e, A, v, o);
|
|
14241
|
+
if (b !== null && !(s && b > y)) {
|
|
14242
|
+
for (var S = h[T + 6], R = h[T + 7], C = S; C < R; C++) {
|
|
14243
14243
|
var w = c[C], I = new BVHVector3(0, 0, 0);
|
|
14244
14244
|
this.getPositionByIndex(w, I);
|
|
14245
14245
|
var H = I.x, M = I.y, P = I.z, F = e.x, L = e.y, O = e.z, N = r.x, D = r.y, V = r.z, z = N * (H - F) + D * (M - L) + V * (P - O);
|
|
@@ -14288,12 +14288,12 @@ function raycastMesh(n, t, e, r) {
|
|
|
14288
14288
|
var l = (o = e.hitFilter) !== null && o !== void 0 ? o : defaultHitFilter, c = (s = e.firstHitOnly) !== null && s !== void 0 ? s : !1, f = n.geometry, d = n.material, h = f.groups, p = f.index;
|
|
14289
14289
|
intersectsMap.clear();
|
|
14290
14290
|
for (var m = t.intersectRay(scratchRay.origin, scratchRay.direction, 0, c, function(v) {
|
|
14291
|
-
var y,
|
|
14291
|
+
var y, T = v.index, b = T * 3, S;
|
|
14292
14292
|
if (Array.isArray(d)) {
|
|
14293
14293
|
if (h)
|
|
14294
14294
|
for (var R = 0, C = h; R < C.length; R++) {
|
|
14295
14295
|
var w = C[R];
|
|
14296
|
-
if (
|
|
14296
|
+
if (b >= w.start && b - w.start < w.count) {
|
|
14297
14297
|
S = d[(y = w.materialIndex) !== null && y !== void 0 ? y : 0];
|
|
14298
14298
|
break;
|
|
14299
14299
|
}
|
|
@@ -14308,13 +14308,13 @@ function raycastMesh(n, t, e, r) {
|
|
|
14308
14308
|
var P = v.pointA, F = v.pointB, L = v.pointC, O = THREE.Triangle.getNormal(scratchIntersectionFaceA.set(P.x, P.y, P.z).applyMatrix4(u), scratchIntersectionFaceB.set(F.x, F.y, F.z).applyMatrix4(u), scratchIntersectionFaceC.set(L.x, L.y, L.z).applyMatrix4(u), new THREE.Vector3()), N = e.ray.direction.dot(O);
|
|
14309
14309
|
if (S.side === THREE.FrontSide && N >= 0 || S.side === THREE.BackSide && N <= 0)
|
|
14310
14310
|
return !1;
|
|
14311
|
-
var D = new THREE.Face3(p ? p.array[
|
|
14311
|
+
var D = new THREE.Face3(p ? p.array[b] : b, p ? p.array[b + 1] : b + 1, p ? p.array[b + 2] : b + 2, O), V = {
|
|
14312
14312
|
distance: M,
|
|
14313
14313
|
object: n,
|
|
14314
14314
|
face: D,
|
|
14315
14315
|
point: H,
|
|
14316
14316
|
distanceToRay: 0,
|
|
14317
|
-
faceIndex:
|
|
14317
|
+
faceIndex: T
|
|
14318
14318
|
};
|
|
14319
14319
|
return intersectsMap.set(v, V), l(V);
|
|
14320
14320
|
}), A = m.length, g = 0; g < A; g++) {
|
|
@@ -14328,11 +14328,11 @@ function raycastPoints(n, t, e, r) {
|
|
|
14328
14328
|
scratchNormalMatrix.getNormalMatrix(c), scratchInverseMatrix.getInverse(c), scratchRay.copy(e.ray).applyMatrix4(scratchInverseMatrix);
|
|
14329
14329
|
var f = ((s = (o = e.params.Points) === null || o === void 0 ? void 0 : o.threshold) !== null && s !== void 0 ? s : 1) * scratchInverseMatrix.getMaxScaleOnAxis(), d = (u = e.hitFilter) !== null && u !== void 0 ? u : defaultHitFilter, h = (l = e.firstHitOnly) !== null && l !== void 0 ? l : !1, p = n.geometry, m = p.index, A = p.getAttribute("normal"), g = A instanceof THREE.BufferAttribute;
|
|
14330
14330
|
intersectsMap.clear();
|
|
14331
|
-
for (var E = t.intersectRay(scratchRay.origin, scratchRay.direction, f, h, function(
|
|
14332
|
-
var S =
|
|
14331
|
+
for (var E = t.intersectRay(scratchRay.origin, scratchRay.direction, f, h, function(b) {
|
|
14332
|
+
var S = b.intersectionPoint, R = new THREE.Vector3(S.x, S.y, S.z).applyMatrix4(c), C = e.ray.origin.distanceTo(R);
|
|
14333
14333
|
if (C < e.near || C > e.far)
|
|
14334
14334
|
return !1;
|
|
14335
|
-
var w =
|
|
14335
|
+
var w = b.pointA, I = scratchIntersectionFaceA.set(w.x, w.y, w.z).applyMatrix4(c), H = b.index, M = m ? m.array[H] : H, P;
|
|
14336
14336
|
if (g) {
|
|
14337
14337
|
var F = new THREE.Vector3().fromBufferAttribute(A, M).applyNormalMatrix(scratchNormalMatrix);
|
|
14338
14338
|
P = new THREE.Face3(M, M, M, F);
|
|
@@ -14345,10 +14345,10 @@ function raycastPoints(n, t, e, r) {
|
|
|
14345
14345
|
distanceToRay: R.distanceTo(I),
|
|
14346
14346
|
index: H
|
|
14347
14347
|
};
|
|
14348
|
-
return intersectsMap.set(
|
|
14348
|
+
return intersectsMap.set(b, L), d(L);
|
|
14349
14349
|
}), v = E.length, y = 0; y < v; y++) {
|
|
14350
|
-
var
|
|
14351
|
-
|
|
14350
|
+
var T = intersectsMap.get(E[y]);
|
|
14351
|
+
T && r.push(T);
|
|
14352
14352
|
}
|
|
14353
14353
|
intersectsMap.clear();
|
|
14354
14354
|
}
|
|
@@ -14407,7 +14407,7 @@ function generateBvhTree(n, t, e, r) {
|
|
|
14407
14407
|
}, l = y.data.array, l && l.buffer instanceof ArrayBuffer && u.add(l.buffer)) : (v = {
|
|
14408
14408
|
array: y.array
|
|
14409
14409
|
}, l = y.array, l && l.buffer instanceof ArrayBuffer && u.add(l.buffer)));
|
|
14410
|
-
var
|
|
14410
|
+
var T = {
|
|
14411
14411
|
type: h,
|
|
14412
14412
|
attributes: A,
|
|
14413
14413
|
indices: v,
|
|
@@ -14415,7 +14415,7 @@ function generateBvhTree(n, t, e, r) {
|
|
|
14415
14415
|
maxTreeDepth: r,
|
|
14416
14416
|
extents: m
|
|
14417
14417
|
};
|
|
14418
|
-
s.push(
|
|
14418
|
+
s.push(T);
|
|
14419
14419
|
}
|
|
14420
14420
|
}
|
|
14421
14421
|
}
|
|
@@ -14628,9 +14628,9 @@ function updatePBMPointCloud(n, t, e, r, o, s, u) {
|
|
|
14628
14628
|
}
|
|
14629
14629
|
if (versionMap$1.get(n) !== u.version) {
|
|
14630
14630
|
versionMap$1.set(n, u.version), f = !0, n.castShadow = u.castShadow, n.receiveShadow = u.receiveShadow;
|
|
14631
|
-
for (var v = [n.material], y = 0,
|
|
14632
|
-
var
|
|
14633
|
-
|
|
14631
|
+
for (var v = [n.material], y = 0, T = v; y < T.length; y++) {
|
|
14632
|
+
var b = T[y];
|
|
14633
|
+
b.customShaders = u.customShaders, b.pointScale = u.pointScale, b.pointMinPixel = u.pointMinPixel, b.pointMaxPixel = u.pointMaxPixel, b.pointSize = u.pointSize, b.pointShape = u.pointShape, b.pointBack = u.pointBack, b.modelAlpha = u.modelAlpha, b.logDepthAlpha = u.logDepthAlpha, b.opacity = u.opacity, b.floorStyle = u.floorStyle, b.constantColor = u.constantColor, b.shownFloorIndex = u.shownFloorIndex, b.clippers = u.clippers, b.brightness = u.brightness, b.useHQWeight = u.useHQWeight, b.useHQDepth = u.useHQDepth, b.colorSaturation = u.colorSaturation, b.colorBrightness = u.colorBrightness, b.outlineGain = u.outlineGain, b.distanceGain = u.distanceGain, b.gradientTexture = u.gradientTexture, b.transparent = !1, b.blending = THREE.NormalBlending, b.blendDst = THREE.OneMinusSrcAlphaFactor, b.blendEquation = THREE.AddEquation, b.blendSrcAlpha = null, b.blendDstAlpha = null, b.blendEquationAlpha = null, b.depthWrite = !0, b.depthTest = !0, b.modelBoundingMax.copy(u.boundingBox.max), b.modelBoundingMin.copy(u.boundingBox.min), b.shownFloorIndex > -1 && (b.transparent = b.shownFloorIndex !== b.floorIndex), b.modelAlpha < 1 && (b.transparent = !0), b.opacity < 1 && (b.transparent = !0), b.brightness < 1 && (b.transparent = !0), b.logDepthAlpha > 0 ? b.transparent = !1 : u.useAddBlend && (b.depthWrite = !1, b.depthTest = !1, b.blending = THREE.AdditiveBlending), b.useHQWeight && (b.depthWrite = !1, b.blending = THREE.CustomBlending, b.blendSrc = THREE.SrcAlphaFactor, b.blendSrcAlpha = THREE.SrcAlphaFactor, b.blendDst = THREE.OneFactor, b.blendDstAlpha = THREE.OneFactor);
|
|
14634
14634
|
}
|
|
14635
14635
|
}
|
|
14636
14636
|
return f;
|
|
@@ -14722,8 +14722,8 @@ var TileRequestScheduler = (
|
|
|
14722
14722
|
if (v.tile.state.requestedFrameNumber !== y.tile.state.requestedFrameNumber)
|
|
14723
14723
|
return y.tile.state.requestedFrameNumber - v.tile.state.requestedFrameNumber;
|
|
14724
14724
|
if (v.tile.state.requestedFrameNumber === r.frameNumber) {
|
|
14725
|
-
var
|
|
14726
|
-
return
|
|
14725
|
+
var T = getPriority(r, v.tile, priorityCache), b = getPriority(r, y.tile, priorityCache);
|
|
14726
|
+
return T - b;
|
|
14727
14727
|
} else
|
|
14728
14728
|
return v.tile.level !== y.tile.level ? v.tile.level - y.tile.level : v.tile.state.distanceToCamera - y.tile.state.distanceToCamera;
|
|
14729
14729
|
});
|
|
@@ -14752,8 +14752,8 @@ var TileRequestScheduler = (
|
|
|
14752
14752
|
}
|
|
14753
14753
|
for (var g = function(v) {
|
|
14754
14754
|
var y = u[v];
|
|
14755
|
-
y.status === "WAITING" && (d--, y.status = "PENDING", y.time = s, E.activeRequests++, E.tileset.options.tileLoader(y.tile).catch(function(
|
|
14756
|
-
y.error =
|
|
14755
|
+
y.status === "WAITING" && (d--, y.status = "PENDING", y.time = s, E.activeRequests++, E.tileset.options.tileLoader(y.tile).catch(function(T) {
|
|
14756
|
+
y.error = T;
|
|
14757
14757
|
}).then(function() {
|
|
14758
14758
|
y.status = "DONE", y.tile.content && y.tile.content.loadState === "READY" && (y.tile.content.loadState = "LOADING"), o.activeRequests--;
|
|
14759
14759
|
}));
|
|
@@ -15407,13 +15407,13 @@ var _object_pattern = /^[og]\s*(.+)?/, _material_library_pattern = /^mtllib /, _
|
|
|
15407
15407
|
var r = parseInt(t, 10);
|
|
15408
15408
|
return (r >= 0 ? r - 1 : r + e / 2) * 2;
|
|
15409
15409
|
}, n.prototype.addFace = function(t, e, r, o, s, u, l, c, f) {
|
|
15410
|
-
var d = this.object.geometry, h = this.vertices.length, p = this.normals.length, m = this.uvs.length, A = this.parseVertexIndex(t, h), g = this.parseVertexIndex(e, h), E = this.parseVertexIndex(r, h), v = l !== void 0 ? this.parseNormalIndex(l, p) : void 0, y = c !== void 0 ? this.parseNormalIndex(c, p) : void 0,
|
|
15411
|
-
(d.hasNormal === !0 && v === void 0 || y === void 0 ||
|
|
15412
|
-
var C = [A,
|
|
15413
|
-
w === void 0 && (w = d.vertices.length / 3, d.indexMap[C] = w, d.vertices.push(this.vertices[A + 0], this.vertices[A + 1], this.vertices[A + 2]), d.hasColor && (this.colors[A] === void 0 ? d.hasColor = !1 : d.colors.push(this.colors[A + 0], this.colors[A + 1], this.colors[A + 2])), d.hasNormal && d.normals.push(this.normals[A + 0], this.normals[A + 1], this.normals[A + 2]), d.hasUV && d.uvs.push(this.uvs[
|
|
15410
|
+
var d = this.object.geometry, h = this.vertices.length, p = this.normals.length, m = this.uvs.length, A = this.parseVertexIndex(t, h), g = this.parseVertexIndex(e, h), E = this.parseVertexIndex(r, h), v = l !== void 0 ? this.parseNormalIndex(l, p) : void 0, y = c !== void 0 ? this.parseNormalIndex(c, p) : void 0, T = f !== void 0 ? this.parseNormalIndex(f, p) : void 0, b = o !== void 0 ? this.parseUVIndex(o, m) : void 0, S = s !== void 0 ? this.parseUVIndex(s, m) : void 0, R = u !== void 0 ? this.parseUVIndex(u, m) : void 0;
|
|
15411
|
+
(d.hasNormal === !0 && v === void 0 || y === void 0 || T === void 0) && (d.hasNormal = !1), (d.hasUV === !0 && b === void 0 || S === void 0 || R === void 0) && (d.hasUV = !1);
|
|
15412
|
+
var C = [A, b, v].join(":"), w = d.indexMap[C];
|
|
15413
|
+
w === void 0 && (w = d.vertices.length / 3, d.indexMap[C] = w, d.vertices.push(this.vertices[A + 0], this.vertices[A + 1], this.vertices[A + 2]), d.hasColor && (this.colors[A] === void 0 ? d.hasColor = !1 : d.colors.push(this.colors[A + 0], this.colors[A + 1], this.colors[A + 2])), d.hasNormal && d.normals.push(this.normals[A + 0], this.normals[A + 1], this.normals[A + 2]), d.hasUV && d.uvs.push(this.uvs[b + 0], this.uvs[b + 1])), d.index.push(w);
|
|
15414
15414
|
var I = [g, S, y].join(":"), H = d.indexMap[I];
|
|
15415
15415
|
H === void 0 && (H = d.vertices.length / 3, d.indexMap[I] = H, d.vertices.push(this.vertices[g + 0], this.vertices[g + 1], this.vertices[g + 2]), d.hasColor && (this.colors[g] === void 0 ? d.hasColor = !1 : d.colors.push(this.colors[g + 0], this.colors[g + 1], this.colors[g + 2])), d.hasNormal && d.normals.push(this.normals[g + 0], this.normals[g + 1], this.normals[g + 2]), d.hasUV && d.uvs.push(this.uvs[S + 0], this.uvs[S + 1])), d.index.push(H);
|
|
15416
|
-
var M = [E, R,
|
|
15416
|
+
var M = [E, R, T].join(":"), P = d.indexMap[M];
|
|
15417
15417
|
P === void 0 && (P = d.vertices.length / 3, d.indexMap[M] = P, d.vertices.push(this.vertices[E + 0], this.vertices[E + 1], this.vertices[E + 2]), d.hasColor && (this.colors[E] === void 0 ? d.hasColor = !1 : d.colors.push(this.colors[E + 0], this.colors[E + 1], this.colors[E + 2])), d.hasNormal && d.normals.push(this.normals[E + 0], this.normals[E + 1], this.normals[E + 2]), d.hasUV && d.uvs.push(this.uvs[R + 0], this.uvs[R + 1])), d.index.push(P);
|
|
15418
15418
|
}, n;
|
|
15419
15419
|
})()
|
|
@@ -15457,8 +15457,8 @@ function parseObj(n) {
|
|
|
15457
15457
|
}
|
|
15458
15458
|
} else if (l !== "l") {
|
|
15459
15459
|
if (l !== "p") if ((r = _object_pattern.exec(u)) !== null) {
|
|
15460
|
-
var
|
|
15461
|
-
t.startObject(
|
|
15460
|
+
var T = (" " + r[0].slice(1).trim()).slice(1);
|
|
15461
|
+
t.startObject(T);
|
|
15462
15462
|
} else if (_material_use_pattern.test(u))
|
|
15463
15463
|
t.object.startMaterial(u.substring(7).trim(), t.materialLibraries);
|
|
15464
15464
|
else if (_material_library_pattern.test(u))
|
|
@@ -15467,8 +15467,8 @@ function parseObj(n) {
|
|
|
15467
15467
|
console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
|
|
15468
15468
|
else if (l === "s") {
|
|
15469
15469
|
if (r = u.split(" "), r.length > 1) {
|
|
15470
|
-
var
|
|
15471
|
-
t.object.smooth =
|
|
15470
|
+
var b = r[1].trim().toLowerCase();
|
|
15471
|
+
t.object.smooth = b !== "0" && b !== "off";
|
|
15472
15472
|
} else
|
|
15473
15473
|
t.object.smooth = !0;
|
|
15474
15474
|
var S = t.object.currentMaterial();
|
|
@@ -15506,12 +15506,12 @@ function parseMtl(n, t, e) {
|
|
|
15506
15506
|
scale: new THREE.Vector2(1, 1),
|
|
15507
15507
|
offset: new THREE.Vector2(0, 0),
|
|
15508
15508
|
bumpScale: 1
|
|
15509
|
-
}, y = E.split(/\s+/),
|
|
15510
|
-
return
|
|
15509
|
+
}, y = E.split(/\s+/), T;
|
|
15510
|
+
return T = y.indexOf("-bm"), T >= 0 && (v.bumpScale = parseFloat(y[T + 1]), y.splice(T, 2)), T = y.indexOf("-s"), T >= 0 && (v.scale.set(parseFloat(y[T + 1]), parseFloat(y[T + 2])), y.splice(T, 4)), T = y.indexOf("-o"), T >= 0 && (v.offset.set(parseFloat(y[T + 1]), parseFloat(y[T + 2])), y.splice(T, 4)), v.url = y.join(" ").trim(), v;
|
|
15511
15511
|
}
|
|
15512
15512
|
function g(E, v, y) {
|
|
15513
|
-
var
|
|
15514
|
-
return r.loadTexture(
|
|
15513
|
+
var T = A(y), b = pathJoin(e.path, T.url);
|
|
15514
|
+
return r.loadTexture(b, {
|
|
15515
15515
|
fetcher: e.fetcher,
|
|
15516
15516
|
encoding: v === "map" || v === "emissiveMap" ? THREE.sRGBEncoding : THREE.LinearEncoding,
|
|
15517
15517
|
minFilter: THREE.LinearFilter,
|
|
@@ -15520,21 +15520,21 @@ function parseMtl(n, t, e) {
|
|
|
15520
15520
|
wrapT: THREE.RepeatWrapping
|
|
15521
15521
|
}).then(function(S) {
|
|
15522
15522
|
var R = S.body;
|
|
15523
|
-
return R.repeat.copy(
|
|
15523
|
+
return R.repeat.copy(T.scale), R.offset.copy(T.offset), E.bumpScale = T.bumpScale, E[v] = R, R;
|
|
15524
15524
|
});
|
|
15525
15525
|
}
|
|
15526
15526
|
return {
|
|
15527
15527
|
name: n,
|
|
15528
15528
|
create: function(E) {
|
|
15529
|
-
var v = new PBMMeshMaterial(e.light ? "phong" : "basic"), y = [],
|
|
15530
|
-
if (
|
|
15531
|
-
if (
|
|
15532
|
-
var
|
|
15533
|
-
|
|
15529
|
+
var v = new PBMMeshMaterial(e.light ? "phong" : "basic"), y = [], T = l[E];
|
|
15530
|
+
if (T) {
|
|
15531
|
+
if (T.kd !== void 0 && v.color.fromArray(T.kd), T.ks !== void 0 && v.specular.fromArray(T.ks), T.ke !== void 0 && v.emissive.fromArray(T.ke), T.map_kd !== void 0 && y.push(g(v, "map", T.map_kd)), T.map_ks !== void 0 && y.push(g(v, "specularMap", T.map_ks)), T.map_ke !== void 0 && y.push(g(v, "emissiveMap", T.map_ke)), T.norm !== void 0 && y.push(g(v, "normalMap", T.norm)), T.map_bump !== void 0 && y.push(g(v, "bumpMap", T.map_bump)), T.bump !== void 0 && y.push(g(v, "bumpMap", T.bump)), T.map_d !== void 0 && y.push(g(v, "alphaMap", T.map_d)), T.ns !== void 0 && (v.shininess = parseFloat(T.ns)), T.d !== void 0) {
|
|
15532
|
+
var b = parseFloat(T.d);
|
|
15533
|
+
b < 1 && (v.opacity = b, v.transparent = !0);
|
|
15534
15534
|
}
|
|
15535
|
-
if (
|
|
15536
|
-
var
|
|
15537
|
-
|
|
15535
|
+
if (T.tr !== void 0) {
|
|
15536
|
+
var b = parseFloat(T.tr);
|
|
15537
|
+
b > 0 && (v.opacity = 1 - b, v.transparent = !0);
|
|
15538
15538
|
}
|
|
15539
15539
|
}
|
|
15540
15540
|
var S = Promise.all(y).then(function(R) {
|
|
@@ -15571,12 +15571,12 @@ function build(n, t) {
|
|
|
15571
15571
|
});
|
|
15572
15572
|
}
|
|
15573
15573
|
E.push(H);
|
|
15574
|
-
}, y = 0,
|
|
15574
|
+
}, y = 0, T = m.length; y < T; y++)
|
|
15575
15575
|
v(y);
|
|
15576
15576
|
g.clearGroups();
|
|
15577
|
-
for (var y = 0,
|
|
15578
|
-
var
|
|
15579
|
-
|
|
15577
|
+
for (var y = 0, T = m.length; y < T; y++) {
|
|
15578
|
+
var b = m[y];
|
|
15579
|
+
b.groupCount && g.addGroup((e = b.groupStart) !== null && e !== void 0 ? e : 0, b.groupCount, y);
|
|
15580
15580
|
}
|
|
15581
15581
|
(!g.groups || g.groups.length === 0) && g.addGroup(0, g.index ? g.index.count : g.attributes.position.count, 0);
|
|
15582
15582
|
var S = new PBMMesh(g, E);
|
|
@@ -15694,10 +15694,10 @@ function loadTileContent(n, t) {
|
|
|
15694
15694
|
}
|
|
15695
15695
|
if (n.type === "SCENEGRAPH")
|
|
15696
15696
|
return e.loadState = "LOADING", e.loadStateUpdateTime = now(), Promise.resolve().then(function() {
|
|
15697
|
-
var s, u, l, c, f, d, h, p, m, A, g = "", E = r.split("#"), v = E[0], y = E[1],
|
|
15698
|
-
if (
|
|
15699
|
-
var
|
|
15700
|
-
return loadB3dm(
|
|
15697
|
+
var s, u, l, c, f, d, h, p, m, A, g = "", E = r.split("#"), v = E[0], y = E[1], T = (y || v).split("?")[0].match(/\.([0-9a-zA-Z]+)$/);
|
|
15698
|
+
if (T && (g = T[1]), g === "b3dm") {
|
|
15699
|
+
var b = imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15700
|
+
return loadB3dm(b, {
|
|
15701
15701
|
upAxis: "Z",
|
|
15702
15702
|
modelUpAxis: n.tileset.asset.gltfUpAxis,
|
|
15703
15703
|
light: t.light,
|
|
@@ -15707,8 +15707,8 @@ function loadTileContent(n, t) {
|
|
|
15707
15707
|
});
|
|
15708
15708
|
}
|
|
15709
15709
|
if (g === "pnts") {
|
|
15710
|
-
var
|
|
15711
|
-
return loadPnts(
|
|
15710
|
+
var b = imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15711
|
+
return loadPnts(b, {
|
|
15712
15712
|
upAxis: "Z",
|
|
15713
15713
|
computeBoundingBox: !1,
|
|
15714
15714
|
fetcher: t.fetcher
|
|
@@ -15727,8 +15727,8 @@ function loadTileContent(n, t) {
|
|
|
15727
15727
|
});
|
|
15728
15728
|
}
|
|
15729
15729
|
if (g === "glb" || g === "gltf") {
|
|
15730
|
-
var
|
|
15731
|
-
return loadGltf(
|
|
15730
|
+
var b = imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15731
|
+
return loadGltf(b, {
|
|
15732
15732
|
upAxis: "Z",
|
|
15733
15733
|
modelUpAxis: n.tileset.asset.gltfUpAxis,
|
|
15734
15734
|
light: t.light,
|
|
@@ -15738,8 +15738,8 @@ function loadTileContent(n, t) {
|
|
|
15738
15738
|
});
|
|
15739
15739
|
}
|
|
15740
15740
|
if (g === "at3d") {
|
|
15741
|
-
var
|
|
15742
|
-
return loadAt3d(
|
|
15741
|
+
var b = n.extras.at3d ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15742
|
+
return loadAt3d(b, {
|
|
15743
15743
|
upAxis: "Z",
|
|
15744
15744
|
light: t.light,
|
|
15745
15745
|
textureBaseUri: (s = n.extras.at3d) === null || s === void 0 ? void 0 : s.textureBaseUri,
|
|
@@ -15751,8 +15751,8 @@ function loadTileContent(n, t) {
|
|
|
15751
15751
|
});
|
|
15752
15752
|
}
|
|
15753
15753
|
if (g === "pbm") {
|
|
15754
|
-
var
|
|
15755
|
-
return loadPbm(
|
|
15754
|
+
var b = n.extras.pbm ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15755
|
+
return loadPbm(b, {
|
|
15756
15756
|
upAxis: "Z",
|
|
15757
15757
|
light: t.light,
|
|
15758
15758
|
textureBaseUri: (c = n.extras.pbm) === null || c === void 0 ? void 0 : c.textureBaseUri,
|
|
@@ -15764,8 +15764,8 @@ function loadTileContent(n, t) {
|
|
|
15764
15764
|
});
|
|
15765
15765
|
}
|
|
15766
15766
|
if (g === "dome") {
|
|
15767
|
-
var
|
|
15768
|
-
return loadDome(
|
|
15767
|
+
var b = n.extras.dome ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15768
|
+
return loadDome(b, {
|
|
15769
15769
|
upAxis: "Z",
|
|
15770
15770
|
light: t.light,
|
|
15771
15771
|
textureBaseUri: (h = n.extras.dome) === null || h === void 0 ? void 0 : h.textureBaseUri,
|
|
@@ -15776,8 +15776,8 @@ function loadTileContent(n, t) {
|
|
|
15776
15776
|
});
|
|
15777
15777
|
}
|
|
15778
15778
|
if (g === "domez") {
|
|
15779
|
-
var
|
|
15780
|
-
return loadDomez(
|
|
15779
|
+
var b = n.extras.domez ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15780
|
+
return loadDomez(b, {
|
|
15781
15781
|
upAxis: "Z",
|
|
15782
15782
|
light: t.light,
|
|
15783
15783
|
textureBaseUri: (m = n.extras.domez) === null || m === void 0 ? void 0 : m.textureBaseUri,
|
|
@@ -15788,8 +15788,8 @@ function loadTileContent(n, t) {
|
|
|
15788
15788
|
});
|
|
15789
15789
|
}
|
|
15790
15790
|
if (g === "ply") {
|
|
15791
|
-
var
|
|
15792
|
-
return loadPly(
|
|
15791
|
+
var b = n.extras.ply ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15792
|
+
return loadPly(b, {
|
|
15793
15793
|
upAxis: "Z",
|
|
15794
15794
|
modelUpAxis: "Z",
|
|
15795
15795
|
type: "pbmPointCloud",
|
|
@@ -15800,8 +15800,8 @@ function loadTileContent(n, t) {
|
|
|
15800
15800
|
});
|
|
15801
15801
|
}
|
|
15802
15802
|
if (g === "obj") {
|
|
15803
|
-
var
|
|
15804
|
-
return loadObj(
|
|
15803
|
+
var b = n.extras.obj ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15804
|
+
return loadObj(b, {
|
|
15805
15805
|
upAxis: "Z",
|
|
15806
15806
|
modelUpAxis: "Z",
|
|
15807
15807
|
light: t.light,
|
|
@@ -15811,8 +15811,8 @@ function loadTileContent(n, t) {
|
|
|
15811
15811
|
});
|
|
15812
15812
|
}
|
|
15813
15813
|
if (g === "fbx") {
|
|
15814
|
-
var
|
|
15815
|
-
return loadFbx(
|
|
15814
|
+
var b = n.extras.obj ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15815
|
+
return loadFbx(b, {
|
|
15816
15816
|
upAxis: "Z",
|
|
15817
15817
|
light: t.light,
|
|
15818
15818
|
fetcher: t.fetcher
|
|
@@ -15821,8 +15821,8 @@ function loadTileContent(n, t) {
|
|
|
15821
15821
|
});
|
|
15822
15822
|
}
|
|
15823
15823
|
if (g === "x3p") {
|
|
15824
|
-
var
|
|
15825
|
-
return loadX3p(
|
|
15824
|
+
var b = n.extras.x3p ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15825
|
+
return loadX3p(b, {
|
|
15826
15826
|
upAxis: "Z",
|
|
15827
15827
|
light: t.light,
|
|
15828
15828
|
fetcher: t.fetcher
|
|
@@ -16008,8 +16008,8 @@ function createPipeBufferGeometry(n, t, e, r) {
|
|
|
16008
16008
|
for (var o = new Float32Array((e + 1) * (r + 1) * 3), s = new Float32Array((e + 1) * (r + 1) * 3), u = new Float32Array((e + 1) * (r + 1) * 2), l = new Uint32Array(e * r * 6), c = n.computeFrenetFrames(e), f = new THREE.Vector3(), d = new THREE.Vector3(), h = new THREE.Vector2(), p = new THREE.Vector3(), m = 0; m <= e; m++) {
|
|
16009
16009
|
p = n.getPointAt(m / e, p);
|
|
16010
16010
|
for (var A = c.normals[m], g = c.binormals[m], E = 0; E <= r; E++) {
|
|
16011
|
-
var v = m * (r + 1) + E, y = E / r * Math.PI * 2,
|
|
16012
|
-
d.x =
|
|
16011
|
+
var v = m * (r + 1) + E, y = E / r * Math.PI * 2, T = Math.sin(y), b = -Math.cos(y);
|
|
16012
|
+
d.x = b * A.x + T * g.x, d.y = b * A.y + T * g.y, d.z = b * A.z + T * g.z, d.normalize(), d.toArray(s, v * 3), f.x = p.x + t * d.x, f.y = p.y + t * d.y, f.z = p.z + t * d.z, f.toArray(o, v * 3), h.x = m / e, h.y = E / r, h.toArray(u, v * 2);
|
|
16013
16013
|
}
|
|
16014
16014
|
}
|
|
16015
16015
|
for (var m = 0; m < e; m++)
|
|
@@ -16043,14 +16043,14 @@ function parseTrajectoryObject(n, t) {
|
|
|
16043
16043
|
side: THREE.BackSide
|
|
16044
16044
|
});
|
|
16045
16045
|
y.uniforms.totalLength.value = u, y.uniforms.displacementScalar.value = -0.01, y.uniforms.diffuse.value = r, y.uniforms.diffuse2.value = o;
|
|
16046
|
-
var
|
|
16046
|
+
var T = new THREE.ShaderMaterial({
|
|
16047
16047
|
vertexShader: TRAJECTOR_PIPE_SHADER.vertexShader,
|
|
16048
16048
|
fragmentShader: TRAJECTOR_PIPE_SHADER.fragmentShader,
|
|
16049
16049
|
uniforms: THREE.UniformsUtils.clone(TRAJECTOR_PIPE_SHADER.uniforms),
|
|
16050
16050
|
side: THREE.DoubleSide
|
|
16051
16051
|
});
|
|
16052
|
-
|
|
16053
|
-
var
|
|
16052
|
+
T.uniforms.totalLength.value = u, T.uniforms.displacementScalar.value = -0.026, T.uniforms.dashSize.value = new THREE.Vector2(0.06, 0.09), T.uniforms.diffuse.value = s, T.uniforms.diffuse2.value = s;
|
|
16053
|
+
var b = new THREE.Mesh(E, [v, y, T]), S = 0.08, R = 24, C = new THREE.SphereBufferGeometry(S, R, R);
|
|
16054
16054
|
C.clearGroups(), C.addGroup(0, E.index ? E.index.count : E.attributes.position.count, 0), C.addGroup(0, E.index ? E.index.count : E.attributes.position.count, 1);
|
|
16055
16055
|
var w = new THREE.ShaderMaterial({
|
|
16056
16056
|
vertexShader: TRAJECTOR_SPHERE_SHADER.vertexShader,
|
|
@@ -16067,7 +16067,7 @@ function parseTrajectoryObject(n, t) {
|
|
|
16067
16067
|
});
|
|
16068
16068
|
I.uniforms.displacementScalar.value = -0.01, I.uniforms.diffuse.value = r;
|
|
16069
16069
|
var H = new THREE.Mesh(C, [w, I]);
|
|
16070
|
-
H.position.fromArray(n, 0),
|
|
16070
|
+
H.position.fromArray(n, 0), b.add(H);
|
|
16071
16071
|
var M = new THREE.ShaderMaterial({
|
|
16072
16072
|
vertexShader: TRAJECTOR_SPHERE_SHADER.vertexShader,
|
|
16073
16073
|
fragmentShader: TRAJECTOR_SPHERE_SHADER.fragmentShader,
|
|
@@ -16076,10 +16076,10 @@ function parseTrajectoryObject(n, t) {
|
|
|
16076
16076
|
});
|
|
16077
16077
|
M.uniforms.displacementScalar.value = -0.01, M.uniforms.diffuse.value = o;
|
|
16078
16078
|
var P = new THREE.Mesh(C, [w, M]);
|
|
16079
|
-
return P.position.fromArray(n, n.length - 3),
|
|
16080
|
-
scene:
|
|
16079
|
+
return P.position.fromArray(n, n.length - 3), b.add(P), {
|
|
16080
|
+
scene: b,
|
|
16081
16081
|
dispose: function() {
|
|
16082
|
-
E.dispose(), v.dispose(), y.dispose(),
|
|
16082
|
+
E.dispose(), v.dispose(), y.dispose(), T.dispose(), C.dispose(), w.dispose(), I.dispose(), M.dispose();
|
|
16083
16083
|
}
|
|
16084
16084
|
};
|
|
16085
16085
|
}
|
|
@@ -16350,12 +16350,12 @@ var Tile3D = (
|
|
|
16350
16350
|
return unloadTrajectory(e), Promise.resolve();
|
|
16351
16351
|
}, t.prototype.intersectRaycaster = function(e, r) {
|
|
16352
16352
|
var o = this, s, u, l = r != null ? r : [], c = [this.tileset.root], f = this.tileset.transform, d = (u = (s = e.params.Points) === null || s === void 0 ? void 0 : s.threshold) !== null && u !== void 0 ? u : 0, h = e.hitFilter;
|
|
16353
|
-
e.hitFilter = function(
|
|
16353
|
+
e.hitFilter = function(b) {
|
|
16354
16354
|
var S;
|
|
16355
|
-
return Object.assign(
|
|
16355
|
+
return Object.assign(b, {
|
|
16356
16356
|
model: (S = o.parent) !== null && S !== void 0 ? S : void 0,
|
|
16357
16357
|
viewLayer: o
|
|
16358
|
-
}), h ? h.call(e,
|
|
16358
|
+
}), h ? h.call(e, b) : !0;
|
|
16359
16359
|
};
|
|
16360
16360
|
var p = e.sortByDistance;
|
|
16361
16361
|
e.sortByDistance = !1;
|
|
@@ -16370,8 +16370,8 @@ var Tile3D = (
|
|
|
16370
16370
|
for (var v = 0, y = m.children.length; v < y; v++)
|
|
16371
16371
|
c.push(m.children[v]);
|
|
16372
16372
|
if (m.selected && m.content && m.content.data && m.content.data.object.visible && (m.content.data.object.intersectRaycaster(e, l), e.firstHitOnly)) {
|
|
16373
|
-
var
|
|
16374
|
-
|
|
16373
|
+
var T = l[0];
|
|
16374
|
+
T && A > T.distance && (A = T.distance);
|
|
16375
16375
|
}
|
|
16376
16376
|
}
|
|
16377
16377
|
}
|
|
@@ -16385,10 +16385,10 @@ var Tile3D = (
|
|
|
16385
16385
|
E = Math.max(E, 0);
|
|
16386
16386
|
var v = Math.min(g.minLevelOfDetail, E);
|
|
16387
16387
|
(!this.visible || !this.loaded || !o.loaded) && (E = Math.max(v, 0));
|
|
16388
|
-
var y = g.minGeometricError,
|
|
16389
|
-
(
|
|
16390
|
-
var
|
|
16391
|
-
|
|
16388
|
+
var y = g.minGeometricError, T = r.controllerMode;
|
|
16389
|
+
(T === "Panorama" || T === "VRPanorama" || T === "XRPanorama") && g.modelAlpha < 0.1 && (y = g.panoramaMinGeometricError);
|
|
16390
|
+
var b = g.maxGeometricError;
|
|
16391
|
+
b = Math.max(y, b);
|
|
16392
16392
|
var S = {
|
|
16393
16393
|
time: r.time,
|
|
16394
16394
|
camera: {
|
|
@@ -16408,7 +16408,7 @@ var Tile3D = (
|
|
|
16408
16408
|
minLevelOfDetail: v,
|
|
16409
16409
|
maxLevelOfDetail: E,
|
|
16410
16410
|
minGeometricError: y,
|
|
16411
|
-
maxGeometricError:
|
|
16411
|
+
maxGeometricError: b,
|
|
16412
16412
|
skipLevelOfDetail: g.skipLevelOfDetail,
|
|
16413
16413
|
mostDetail: g.mostDetail,
|
|
16414
16414
|
loadSiblings: g.loadSiblings,
|
|
@@ -16862,14 +16862,14 @@ function loadViewLayer(n, t) {
|
|
|
16862
16862
|
height: w.height
|
|
16863
16863
|
};
|
|
16864
16864
|
}), A.floorInfo = void 0), A.asset.tilesetVersion = String(A.lodVersion), A.lodVersion = void 0);
|
|
16865
|
-
var
|
|
16866
|
-
|
|
16867
|
-
var
|
|
16868
|
-
v.coordinate ? (
|
|
16865
|
+
var T = g.boundingVolume ? makeBoundingVolume(g.boundingVolume) : void 0;
|
|
16866
|
+
T && g.transform && T.applyMatrix4(scratchMatrix4$2.fromArray(g.transform));
|
|
16867
|
+
var b = null, S = new THREE.Matrix4(), R = new THREE.Matrix4();
|
|
16868
|
+
v.coordinate ? (b = v.coordinate.ground_height, S.fromArray(v.coordinate.pose_ecef_to_enu), R.fromArray(v.coordinate.pose_enu_to_ecef)) : (T ? T.getCenter(scratchVector3$5) : scratchVector3$5.setScalar(0), getEcefToEnuMatrixFromUpAxis(y, scratchVector3$5, S), R.getInverse(S)), A.root = {
|
|
16869
16869
|
refine: (p = g.refine) !== null && p !== void 0 ? p : "REPLACE",
|
|
16870
16870
|
geometricError: g.geometricError,
|
|
16871
16871
|
transform: scratchMatrix4$2.copy(S).premultiply(enuToLocalMatrix).toArray(),
|
|
16872
|
-
boundingVolume:
|
|
16872
|
+
boundingVolume: T ? T.toJson() : void 0,
|
|
16873
16873
|
children: [g]
|
|
16874
16874
|
};
|
|
16875
16875
|
var C = new Tile3D(A, {
|
|
@@ -16879,7 +16879,7 @@ function loadViewLayer(n, t) {
|
|
|
16879
16879
|
light: t.light,
|
|
16880
16880
|
fetcher: t.fetcher,
|
|
16881
16881
|
search: d,
|
|
16882
|
-
groundHeight:
|
|
16882
|
+
groundHeight: b,
|
|
16883
16883
|
enuToEcefMatrix: R,
|
|
16884
16884
|
ecefToEnuMatrix: S,
|
|
16885
16885
|
error: m
|
|
@@ -16963,11 +16963,11 @@ var BufferGeometryUtils = {
|
|
|
16963
16963
|
e.tangent === void 0 && n.setAttribute("tangent", new THREE.BufferAttribute(new Float32Array(4 * l), 4));
|
|
16964
16964
|
for (var c = e.tangent.array, f = [], d = [], h = 0; h < l; h++)
|
|
16965
16965
|
f[h] = new THREE.Vector3(), d[h] = new THREE.Vector3();
|
|
16966
|
-
var p = new THREE.Vector3(), m = new THREE.Vector3(), A = new THREE.Vector3(), g = new THREE.Vector2(), E = new THREE.Vector2(), v = new THREE.Vector2(), y = new THREE.Vector3(),
|
|
16967
|
-
function
|
|
16966
|
+
var p = new THREE.Vector3(), m = new THREE.Vector3(), A = new THREE.Vector3(), g = new THREE.Vector2(), E = new THREE.Vector2(), v = new THREE.Vector2(), y = new THREE.Vector3(), T = new THREE.Vector3();
|
|
16967
|
+
function b(K, Q, q) {
|
|
16968
16968
|
p.fromArray(o, K * 3), m.fromArray(o, Q * 3), A.fromArray(o, q * 3), g.fromArray(u, K * 2), E.fromArray(u, Q * 2), v.fromArray(u, q * 2);
|
|
16969
16969
|
var J = m.x - p.x, G = A.x - p.x, W = m.y - p.y, Z = A.y - p.y, Y = m.z - p.z, X = A.z - p.z, j = E.x - g.x, ee = v.x - g.x, te = E.y - g.y, re = v.y - g.y, ae = 1 / (j * re - ee * te);
|
|
16970
|
-
y.set((re * J - te * G) * ae, (re * W - te * Z) * ae, (re * Y - te * X) * ae),
|
|
16970
|
+
y.set((re * J - te * G) * ae, (re * W - te * Z) * ae, (re * Y - te * X) * ae), T.set((j * G - ee * J) * ae, (j * Z - ee * W) * ae, (j * X - ee * Y) * ae), f[K].add(y), f[Q].add(y), f[q].add(y), d[K].add(T), d[Q].add(T), d[q].add(T);
|
|
16971
16971
|
}
|
|
16972
16972
|
var S = n.groups;
|
|
16973
16973
|
S.length === 0 && (S = [{
|
|
@@ -16976,7 +16976,7 @@ var BufferGeometryUtils = {
|
|
|
16976
16976
|
}]);
|
|
16977
16977
|
for (var h = 0, R = S.length; h < R; ++h)
|
|
16978
16978
|
for (var C = S[h], w = C.start, I = C.count, H = w, M = w + I; H < M; H += 3)
|
|
16979
|
-
|
|
16979
|
+
b(r[H + 0], r[H + 1], r[H + 2]);
|
|
16980
16980
|
var P = new THREE.Vector3(), F = new THREE.Vector3(), L = new THREE.Vector3(), O = new THREE.Vector3(), N, D, V;
|
|
16981
16981
|
function z(K) {
|
|
16982
16982
|
L.fromArray(s, K * 3), O.copy(L), D = f[K], P.copy(D), P.sub(L.multiplyScalar(L.dot(D))).normalize(), F.crossVectors(O, D), V = F.dot(d[K]), N = V < 0 ? -1 : 1, c[K * 4] = P.x, c[K * 4 + 1] = P.y, c[K * 4 + 2] = P.z, c[K * 4 + 3] = N;
|
|
@@ -17036,12 +17036,12 @@ var BufferGeometryUtils = {
|
|
|
17036
17036
|
break;
|
|
17037
17037
|
l.morphAttributes = l.morphAttributes || {}, l.morphAttributes[h] = [];
|
|
17038
17038
|
for (var f = 0; f < y; ++f) {
|
|
17039
|
-
for (var
|
|
17040
|
-
|
|
17041
|
-
var
|
|
17042
|
-
if (!
|
|
17039
|
+
for (var T = [], E = 0; E < u[h].length; ++E)
|
|
17040
|
+
T.push(u[h][E][f]);
|
|
17041
|
+
var b = this.mergeBufferAttributes(T);
|
|
17042
|
+
if (!b)
|
|
17043
17043
|
return null;
|
|
17044
|
-
l.morphAttributes[h].push(
|
|
17044
|
+
l.morphAttributes[h].push(b);
|
|
17045
17045
|
}
|
|
17046
17046
|
}
|
|
17047
17047
|
return l;
|
|
@@ -17110,28 +17110,28 @@ var BufferGeometryUtils = {
|
|
|
17110
17110
|
}));
|
|
17111
17111
|
}
|
|
17112
17112
|
for (var E = Math.log10(1 / t), v = Math.pow(10, E), p = 0; p < s; p++) {
|
|
17113
|
-
for (var y = r ? r.getX(p) : p,
|
|
17114
|
-
for (var A = l[
|
|
17115
|
-
|
|
17116
|
-
if (
|
|
17117
|
-
d.push(e[
|
|
17113
|
+
for (var y = r ? r.getX(p) : p, T = "", b = 0, m = l.length; b < m; b++)
|
|
17114
|
+
for (var A = l[b], S = n.getAttribute(A), R = S.itemSize, C = 0; C < R; C++)
|
|
17115
|
+
T += "".concat(~~(S[h[C]](y) * v), ",");
|
|
17116
|
+
if (T in e)
|
|
17117
|
+
d.push(e[T]);
|
|
17118
17118
|
else {
|
|
17119
|
-
for (var
|
|
17120
|
-
for (var A = l[
|
|
17119
|
+
for (var b = 0, m = l.length; b < m; b++)
|
|
17120
|
+
for (var A = l[b], S = n.getAttribute(A), g = n.morphAttributes[A], R = S.itemSize, w = c[A], I = f[A], C = 0; C < R; C++) {
|
|
17121
17121
|
var H = h[C];
|
|
17122
17122
|
if (w.push(S[H](y)), g)
|
|
17123
17123
|
for (var M = 0, P = g.length; M < P; M++)
|
|
17124
17124
|
I[M].push(g[M][H](y));
|
|
17125
17125
|
}
|
|
17126
|
-
e[
|
|
17126
|
+
e[T] = u, d.push(u), u++;
|
|
17127
17127
|
}
|
|
17128
17128
|
}
|
|
17129
17129
|
for (var F = n.clone(), p = 0, m = l.length; p < m; p++) {
|
|
17130
17130
|
var A = l[p], L = n.getAttribute(A), O = new L.array.constructor(c[A]), S = new THREE.BufferAttribute(O, L.itemSize, L.normalized);
|
|
17131
17131
|
if (F.setAttribute(A, S), A in f)
|
|
17132
|
-
for (var
|
|
17133
|
-
var N = n.morphAttributes[A][
|
|
17134
|
-
F.morphAttributes[A][
|
|
17132
|
+
for (var b = 0; b < f[A].length; b++) {
|
|
17133
|
+
var N = n.morphAttributes[A][b], O = new N.array.constructor(f[A][b]), D = new THREE.BufferAttribute(O, N.itemSize, N.normalized);
|
|
17134
|
+
F.morphAttributes[A][b] = D;
|
|
17135
17135
|
}
|
|
17136
17136
|
}
|
|
17137
17137
|
return F.setIndex(d), F;
|
|
@@ -17156,27 +17156,27 @@ function getEdgesBySphere(n, t, e) {
|
|
|
17156
17156
|
}
|
|
17157
17157
|
}), m.length === 0)
|
|
17158
17158
|
return;
|
|
17159
|
-
for (var A = ["a", "b", "c"], g = BufferGeometryUtils.mergeBufferGeometries(m, !1), E = g.getAttribute("position").array, v = ((h = g.getIndex()) === null || h === void 0 ? void 0 : h.array) || [], y = [],
|
|
17160
|
-
var R = new THREE.Vector3(E[
|
|
17159
|
+
for (var A = ["a", "b", "c"], g = BufferGeometryUtils.mergeBufferGeometries(m, !1), E = g.getAttribute("position").array, v = ((h = g.getIndex()) === null || h === void 0 ? void 0 : h.array) || [], y = [], T = [], b = 0, S = E.length; b < S; b += 3) {
|
|
17160
|
+
var R = new THREE.Vector3(E[b], E[b + 1], E[b + 2]);
|
|
17161
17161
|
y.push(R);
|
|
17162
17162
|
}
|
|
17163
|
-
for (var
|
|
17164
|
-
var C = v[
|
|
17165
|
-
|
|
17163
|
+
for (var b = 0, S = v.length; b < S; b += 3) {
|
|
17164
|
+
var C = v[b], w = v[b + 1], I = v[b + 2], H = new THREE.Vector3().crossVectors(y[w].clone().sub(y[C]), y[I].clone().sub(y[C])).normalize();
|
|
17165
|
+
T.push({ a: C, b: w, c: I, normal: H });
|
|
17166
17166
|
}
|
|
17167
|
-
for (var M = {},
|
|
17168
|
-
for (var P = b
|
|
17167
|
+
for (var M = {}, b = 0, S = T.length; b < S; b++)
|
|
17168
|
+
for (var P = T[b], F = 0; F < 3; F++) {
|
|
17169
17169
|
var L = P[A[F]], O = P[A[(F + 1) % 3]], N = [Math.min(L, O), Math.max(L, O)], D = N[0] + "-" + N[1];
|
|
17170
|
-
M[D] === void 0 ? M[D] = { index1: N[0], index2: N[1], face1:
|
|
17170
|
+
M[D] === void 0 ? M[D] = { index1: N[0], index2: N[1], face1: b } : M[D].face2 = b;
|
|
17171
17171
|
}
|
|
17172
17172
|
for (var D in M) {
|
|
17173
17173
|
var V = M[D];
|
|
17174
|
-
if (V.face2 === void 0 ||
|
|
17174
|
+
if (V.face2 === void 0 || T[V.face1].normal.dot(T[V.face2].normal) <= r) {
|
|
17175
17175
|
var z = y[V.index1], K = y[V.index2];
|
|
17176
17176
|
o.push(new THREE.Line3(z, K));
|
|
17177
17177
|
}
|
|
17178
17178
|
}
|
|
17179
|
-
y.length = 0,
|
|
17179
|
+
y.length = 0, T.length = 0;
|
|
17180
17180
|
}
|
|
17181
17181
|
});
|
|
17182
17182
|
}
|
|
@@ -17878,47 +17878,53 @@ function sortTile(n) {
|
|
|
17878
17878
|
return t;
|
|
17879
17879
|
}
|
|
17880
17880
|
function parse(n, t) {
|
|
17881
|
-
for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, E, v, y,
|
|
17881
|
+
for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, E, v, y, T = [], b = null, S = 0, R = [].concat(n); S < R.length; S++) {
|
|
17882
17882
|
var C = R[S];
|
|
17883
17883
|
if ("getURL" in C)
|
|
17884
|
-
|
|
17884
|
+
b = {
|
|
17885
17885
|
allowHosts: C.allowHosts,
|
|
17886
17886
|
expire: C.expire,
|
|
17887
17887
|
issuer: C.issuer
|
|
17888
|
-
},
|
|
17888
|
+
}, T.push(workToJson(C));
|
|
17889
17889
|
else {
|
|
17890
17890
|
var w = typeof C == "string" ? JSON.parse(C) : jsonClone(C), I = verify(w);
|
|
17891
17891
|
if (I instanceof Error)
|
|
17892
17892
|
return I;
|
|
17893
|
-
|
|
17893
|
+
b === null && (b = I), T.push(w);
|
|
17894
17894
|
}
|
|
17895
17895
|
}
|
|
17896
|
-
if (
|
|
17896
|
+
if (b === null)
|
|
17897
17897
|
return new Error("Empty");
|
|
17898
17898
|
defineProperty(t, "issuer", {
|
|
17899
|
+
enumerable: !0,
|
|
17899
17900
|
configurable: !1,
|
|
17900
17901
|
writable: !1,
|
|
17901
|
-
value:
|
|
17902
|
+
value: b.issuer
|
|
17902
17903
|
}), defineProperty(t, "expire", {
|
|
17904
|
+
enumerable: !0,
|
|
17903
17905
|
configurable: !1,
|
|
17904
17906
|
writable: !1,
|
|
17905
|
-
value: Object.freeze(
|
|
17907
|
+
value: Object.freeze(b.expire)
|
|
17906
17908
|
}), defineProperty(t, "allowHosts", {
|
|
17909
|
+
enumerable: !0,
|
|
17907
17910
|
configurable: !1,
|
|
17908
17911
|
writable: !1,
|
|
17909
|
-
value: Object.freeze(
|
|
17912
|
+
value: Object.freeze(b.allowHosts)
|
|
17910
17913
|
});
|
|
17911
|
-
var H =
|
|
17914
|
+
var H = T.reduce(function(J, G) {
|
|
17912
17915
|
return jsonMerge(J, G);
|
|
17913
17916
|
});
|
|
17914
17917
|
defineProperty(t, "name", {
|
|
17918
|
+
enumerable: !0,
|
|
17915
17919
|
configurable: !1,
|
|
17916
17920
|
writable: !1,
|
|
17917
17921
|
value: String((e = H.name) !== null && e !== void 0 ? e : "Unknown")
|
|
17918
17922
|
}), defineProperty(t, "workCode", {
|
|
17923
|
+
enumerable: !0,
|
|
17919
17924
|
writable: !0,
|
|
17920
17925
|
value: String(H.resource_code || H.basic_code || H.vr_code || H.code || H.project_id || H.work_code || H.workCode || createUuid())
|
|
17921
17926
|
}), defineProperty(t, "baseURL", {
|
|
17927
|
+
enumerable: !0,
|
|
17922
17928
|
writable: !0,
|
|
17923
17929
|
value: (function() {
|
|
17924
17930
|
var J, G = (J = H.base_url) !== null && J !== void 0 ? J : "";
|
|
@@ -17926,17 +17932,13 @@ function parse(n, t) {
|
|
|
17926
17932
|
})()
|
|
17927
17933
|
});
|
|
17928
17934
|
var M = void 0;
|
|
17929
|
-
H.model && (M = {}, defineProperty(M, "work", {
|
|
17930
|
-
enumerable: !1,
|
|
17931
|
-
configurable: !1,
|
|
17932
|
-
writable: !1,
|
|
17933
|
-
value: t
|
|
17934
|
-
}), typeof H.model == "object" && (defineProperty(M, "work", {
|
|
17935
|
+
typeof H.model == "object" && (M = {}, defineProperty(M, "work", {
|
|
17935
17936
|
enumerable: !1,
|
|
17936
17937
|
configurable: !1,
|
|
17937
17938
|
writable: !1,
|
|
17938
17939
|
value: t
|
|
17939
17940
|
}), defineProperty(M, "file", {
|
|
17941
|
+
enumerable: !0,
|
|
17940
17942
|
configurable: !1,
|
|
17941
17943
|
writable: !1,
|
|
17942
17944
|
value: (function() {
|
|
@@ -17945,6 +17947,7 @@ function parse(n, t) {
|
|
|
17945
17947
|
return relativeURL(J, t.baseURL);
|
|
17946
17948
|
})()
|
|
17947
17949
|
}), defineProperty(M, "textureBase", {
|
|
17950
|
+
enumerable: !0,
|
|
17948
17951
|
configurable: !1,
|
|
17949
17952
|
writable: !1,
|
|
17950
17953
|
value: (function() {
|
|
@@ -17952,6 +17955,7 @@ function parse(n, t) {
|
|
|
17952
17955
|
return J && (J = relativeURL(J, t.baseURL)), J;
|
|
17953
17956
|
})()
|
|
17954
17957
|
}), defineProperty(M, "textures", {
|
|
17958
|
+
enumerable: !0,
|
|
17955
17959
|
configurable: !1,
|
|
17956
17960
|
writable: !1,
|
|
17957
17961
|
value: (function() {
|
|
@@ -17959,6 +17963,7 @@ function parse(n, t) {
|
|
|
17959
17963
|
return Array.isArray(H.model.material_textures) && (J = H.model.material_textures.slice(), Object.freeze(J)), J;
|
|
17960
17964
|
})()
|
|
17961
17965
|
}), defineProperty(M, "layers", {
|
|
17966
|
+
enumerable: !0,
|
|
17962
17967
|
configurable: !1,
|
|
17963
17968
|
writable: !1,
|
|
17964
17969
|
value: (function() {
|
|
@@ -17974,18 +17979,22 @@ function parse(n, t) {
|
|
|
17974
17979
|
writable: !1,
|
|
17975
17980
|
value: t
|
|
17976
17981
|
}), defineProperty(ee, "name", {
|
|
17982
|
+
enumerable: !0,
|
|
17977
17983
|
configurable: !1,
|
|
17978
17984
|
writable: !1,
|
|
17979
17985
|
value: (J = j.name) !== null && J !== void 0 ? J : ""
|
|
17980
17986
|
}), defineProperty(ee, "type", {
|
|
17987
|
+
enumerable: !0,
|
|
17981
17988
|
configurable: !1,
|
|
17982
17989
|
writable: !1,
|
|
17983
17990
|
value: (G = j.type) !== null && G !== void 0 ? G : "mesh"
|
|
17984
17991
|
}), defineProperty(ee, "upAxis", {
|
|
17992
|
+
enumerable: !0,
|
|
17985
17993
|
configurable: !1,
|
|
17986
17994
|
writable: !1,
|
|
17987
17995
|
value: (W = j.up_axis) !== null && W !== void 0 ? W : "Z"
|
|
17988
17996
|
}), defineProperty(ee, "tileset", {
|
|
17997
|
+
enumerable: !0,
|
|
17989
17998
|
configurable: !1,
|
|
17990
17999
|
writable: !1,
|
|
17991
18000
|
value: relativeURL(j.tileset_url, t.baseURL)
|
|
@@ -18002,18 +18011,22 @@ function parse(n, t) {
|
|
|
18002
18011
|
writable: !1,
|
|
18003
18012
|
value: t
|
|
18004
18013
|
}), defineProperty(ee, "name", {
|
|
18014
|
+
enumerable: !0,
|
|
18005
18015
|
configurable: !1,
|
|
18006
18016
|
writable: !1,
|
|
18007
18017
|
value: "lod"
|
|
18008
18018
|
}), defineProperty(ee, "type", {
|
|
18019
|
+
enumerable: !0,
|
|
18009
18020
|
configurable: !1,
|
|
18010
18021
|
writable: !1,
|
|
18011
18022
|
value: "mesh"
|
|
18012
18023
|
}), defineProperty(ee, "upAxis", {
|
|
18024
|
+
enumerable: !0,
|
|
18013
18025
|
configurable: !1,
|
|
18014
18026
|
writable: !1,
|
|
18015
18027
|
value: "-Y"
|
|
18016
18028
|
}), defineProperty(ee, "tileset", {
|
|
18029
|
+
enumerable: !0,
|
|
18017
18030
|
configurable: !1,
|
|
18018
18031
|
writable: !1,
|
|
18019
18032
|
value: relativeURL(j.tileset_url, t.baseURL)
|
|
@@ -18022,7 +18035,8 @@ function parse(n, t) {
|
|
|
18022
18035
|
}
|
|
18023
18036
|
return Object.freeze(Z);
|
|
18024
18037
|
})()
|
|
18025
|
-
}))
|
|
18038
|
+
})), defineProperty(t, "model", {
|
|
18039
|
+
enumerable: !0,
|
|
18026
18040
|
configurable: !1,
|
|
18027
18041
|
writable: !1,
|
|
18028
18042
|
value: M
|
|
@@ -18037,58 +18051,72 @@ function parse(n, t) {
|
|
|
18037
18051
|
writable: !1,
|
|
18038
18052
|
value: t
|
|
18039
18053
|
}), defineProperty(Z, "index", {
|
|
18054
|
+
enumerable: !0,
|
|
18040
18055
|
configurable: !1,
|
|
18041
18056
|
writable: !1,
|
|
18042
18057
|
value: J
|
|
18043
18058
|
}), defineProperty(Z, "panoIndex", {
|
|
18059
|
+
enumerable: !0,
|
|
18044
18060
|
configurable: !1,
|
|
18045
18061
|
writable: !1,
|
|
18046
18062
|
value: J
|
|
18047
18063
|
}), defineProperty(Z, "panoId", {
|
|
18064
|
+
enumerable: !0,
|
|
18048
18065
|
configurable: !1,
|
|
18049
18066
|
writable: !1,
|
|
18050
18067
|
value: panoStringify({ workCode: t.workCode, panoIndex: J })
|
|
18051
18068
|
}), defineProperty(Z, "derivedId", {
|
|
18069
|
+
enumerable: !0,
|
|
18052
18070
|
configurable: !1,
|
|
18053
18071
|
writable: !1,
|
|
18054
18072
|
value: (d = G.derived_id) !== null && d !== void 0 ? d : W.derived_id
|
|
18055
18073
|
}), defineProperty(Z, "floorIndex", {
|
|
18074
|
+
enumerable: !0,
|
|
18056
18075
|
configurable: !1,
|
|
18057
18076
|
writable: !1,
|
|
18058
18077
|
value: (h = G.floor_index) !== null && h !== void 0 ? h : G.floor
|
|
18059
18078
|
}), defineProperty(Z, "derivedId", {
|
|
18079
|
+
enumerable: !0,
|
|
18060
18080
|
configurable: !1,
|
|
18061
18081
|
writable: !1,
|
|
18062
18082
|
value: (p = G.derived_id) !== null && p !== void 0 ? p : W.derived_id
|
|
18063
18083
|
}), defineProperty(Z, "derivedIdStr", {
|
|
18084
|
+
enumerable: !0,
|
|
18064
18085
|
configurable: !1,
|
|
18065
18086
|
writable: !1,
|
|
18066
18087
|
value: (m = G.derived_id_str) !== null && m !== void 0 ? m : W.derived_id_str
|
|
18067
18088
|
}), defineProperty(Z, "active", {
|
|
18089
|
+
enumerable: !0,
|
|
18068
18090
|
configurable: !1,
|
|
18069
18091
|
writable: !1,
|
|
18070
18092
|
value: G.active !== !1 && W.active !== !1
|
|
18071
18093
|
}), defineProperty(Z, "loadable", {
|
|
18094
|
+
enumerable: !0,
|
|
18072
18095
|
configurable: !1,
|
|
18073
18096
|
writable: !1,
|
|
18074
18097
|
value: (g = (A = G.active) !== null && A !== void 0 ? A : W.active) !== null && g !== void 0 ? g : !1
|
|
18075
18098
|
}), defineProperty(Z, "position", {
|
|
18099
|
+
enumerable: !0,
|
|
18076
18100
|
configurable: !1,
|
|
18077
18101
|
writable: !1,
|
|
18078
18102
|
value: Object.freeze(new THREE.Vector3().fromArray((E = G.position) !== null && E !== void 0 ? E : [0, 0, 0]))
|
|
18079
18103
|
}), defineProperty(Z, "standingPosition", {
|
|
18104
|
+
enumerable: !0,
|
|
18080
18105
|
configurable: !1,
|
|
18081
18106
|
writable: !1,
|
|
18082
18107
|
value: Object.freeze(new THREE.Vector3().fromArray((y = (v = G.standing_position) !== null && v !== void 0 ? v : G.standingPosition) !== null && y !== void 0 ? y : [0, 0, 0]))
|
|
18083
18108
|
}), defineProperty(Z, "quaternion", {
|
|
18109
|
+
enumerable: !0,
|
|
18084
18110
|
configurable: !1,
|
|
18085
18111
|
writable: !1,
|
|
18086
18112
|
value: Object.freeze(new THREE.Quaternion().fromArray(G.quaternion ? [G.quaternion.x, G.quaternion.y, G.quaternion.z, G.quaternion.w] : [0, 0, 0, 1]))
|
|
18087
18113
|
}), defineProperty(Z, "matrix", {
|
|
18114
|
+
enumerable: !0,
|
|
18088
18115
|
configurable: !1,
|
|
18089
18116
|
writable: !1,
|
|
18090
18117
|
value: Object.freeze(new THREE.Matrix4().compose(Z.position, Z.quaternion, PANO_TEXTURE_SCALE))
|
|
18091
18118
|
}), defineProperty(Z, "accessibleNodes", {
|
|
18119
|
+
enumerable: !0,
|
|
18092
18120
|
configurable: !1,
|
|
18093
18121
|
writable: !1,
|
|
18094
18122
|
value: (function() {
|
|
@@ -18101,6 +18129,7 @@ function parse(n, t) {
|
|
|
18101
18129
|
return Object.freeze(j);
|
|
18102
18130
|
})()
|
|
18103
18131
|
}), defineProperty(Z, "visibleNodes", {
|
|
18132
|
+
enumerable: !0,
|
|
18104
18133
|
configurable: !1,
|
|
18105
18134
|
writable: !1,
|
|
18106
18135
|
value: (function() {
|
|
@@ -18113,6 +18142,7 @@ function parse(n, t) {
|
|
|
18113
18142
|
return Object.freeze(j);
|
|
18114
18143
|
})()
|
|
18115
18144
|
}), defineProperty(Z, "images", {
|
|
18145
|
+
enumerable: !0,
|
|
18116
18146
|
configurable: !1,
|
|
18117
18147
|
writable: !1,
|
|
18118
18148
|
value: (function() {
|
|
@@ -18126,12 +18156,14 @@ function parse(n, t) {
|
|
|
18126
18156
|
for (var X = 0, j = FACE_ORDER$1; X < j.length; X++) {
|
|
18127
18157
|
var ee = j[X];
|
|
18128
18158
|
defineProperty(Y, ee, {
|
|
18159
|
+
enumerable: !0,
|
|
18129
18160
|
configurable: !1,
|
|
18130
18161
|
writable: !1,
|
|
18131
18162
|
value: relativeURL(panoURL(W[ee], O, J), t.baseURL)
|
|
18132
18163
|
});
|
|
18133
18164
|
}
|
|
18134
18165
|
return defineProperty(Y, "sizeList", {
|
|
18166
|
+
enumerable: !0,
|
|
18135
18167
|
configurable: !1,
|
|
18136
18168
|
writable: !1,
|
|
18137
18169
|
value: (function() {
|
|
@@ -18157,6 +18189,7 @@ function parse(n, t) {
|
|
|
18157
18189
|
return Object.freeze([]);
|
|
18158
18190
|
})()
|
|
18159
18191
|
}), defineProperty(Y, "tiles", {
|
|
18192
|
+
enumerable: !0,
|
|
18160
18193
|
configurable: !1,
|
|
18161
18194
|
writable: !1,
|
|
18162
18195
|
value: (function() {
|
|
@@ -18180,15 +18213,18 @@ function parse(n, t) {
|
|
|
18180
18213
|
writable: !1,
|
|
18181
18214
|
value: t
|
|
18182
18215
|
}), defineProperty(ue, "level", {
|
|
18216
|
+
enumerable: !0,
|
|
18183
18217
|
configurable: !1,
|
|
18184
18218
|
writable: !1,
|
|
18185
18219
|
value: Te
|
|
18186
18220
|
}), Ae > te) {
|
|
18187
18221
|
defineProperty(ue, "size", {
|
|
18222
|
+
enumerable: !0,
|
|
18188
18223
|
configurable: !1,
|
|
18189
18224
|
writable: !1,
|
|
18190
18225
|
value: Ae
|
|
18191
18226
|
}), defineProperty(ue, "scale", {
|
|
18227
|
+
enumerable: !0,
|
|
18192
18228
|
configurable: !1,
|
|
18193
18229
|
writable: !1,
|
|
18194
18230
|
value: 1
|
|
@@ -18196,6 +18232,7 @@ function parse(n, t) {
|
|
|
18196
18232
|
for (var fe = 0, ne = FACE_ORDER$1; fe < ne.length; fe++) {
|
|
18197
18233
|
var oe = ne[fe];
|
|
18198
18234
|
defineProperty(ue, oe, {
|
|
18235
|
+
enumerable: !0,
|
|
18199
18236
|
configurable: !1,
|
|
18200
18237
|
writable: !1,
|
|
18201
18238
|
value: replaceImageSize(Y[oe], Ae)
|
|
@@ -18203,10 +18240,12 @@ function parse(n, t) {
|
|
|
18203
18240
|
}
|
|
18204
18241
|
} else {
|
|
18205
18242
|
defineProperty(ue, "size", {
|
|
18243
|
+
enumerable: !0,
|
|
18206
18244
|
configurable: !1,
|
|
18207
18245
|
writable: !1,
|
|
18208
18246
|
value: te
|
|
18209
18247
|
}), defineProperty(ue, "scale", {
|
|
18248
|
+
enumerable: !0,
|
|
18210
18249
|
configurable: !1,
|
|
18211
18250
|
writable: !1,
|
|
18212
18251
|
value: Ae / te
|
|
@@ -18214,6 +18253,7 @@ function parse(n, t) {
|
|
|
18214
18253
|
for (var de = 0, me = FACE_ORDER$1; de < me.length; de++) {
|
|
18215
18254
|
var oe = me[de];
|
|
18216
18255
|
defineProperty(ue, oe, {
|
|
18256
|
+
enumerable: !0,
|
|
18217
18257
|
configurable: !1,
|
|
18218
18258
|
writable: !1,
|
|
18219
18259
|
value: Y[oe]
|
|
@@ -18230,6 +18270,7 @@ function parse(n, t) {
|
|
|
18230
18270
|
}), Y;
|
|
18231
18271
|
})()
|
|
18232
18272
|
}), defineProperty(Z, "video", {
|
|
18273
|
+
enumerable: !0,
|
|
18233
18274
|
configurable: !1,
|
|
18234
18275
|
writable: !1,
|
|
18235
18276
|
value: (function() {
|
|
@@ -18240,14 +18281,17 @@ function parse(n, t) {
|
|
|
18240
18281
|
writable: !1,
|
|
18241
18282
|
value: t
|
|
18242
18283
|
}), defineProperty(Y, "source", {
|
|
18284
|
+
enumerable: !0,
|
|
18243
18285
|
configurable: !1,
|
|
18244
18286
|
writable: !1,
|
|
18245
18287
|
value: W.video.source
|
|
18246
18288
|
}), defineProperty(Y, "matrix", {
|
|
18289
|
+
enumerable: !0,
|
|
18247
18290
|
configurable: !1,
|
|
18248
18291
|
writable: !1,
|
|
18249
18292
|
value: new THREE.Matrix4().fromArray(W.video.matrix)
|
|
18250
18293
|
}), defineProperty(Y, "size", {
|
|
18294
|
+
enumerable: !0,
|
|
18251
18295
|
configurable: !1,
|
|
18252
18296
|
writable: !1,
|
|
18253
18297
|
value: new THREE.Vector2().fromArray(W.video.size)
|
|
@@ -18257,6 +18301,7 @@ function parse(n, t) {
|
|
|
18257
18301
|
}, V = 0; V < N; V++)
|
|
18258
18302
|
D(V);
|
|
18259
18303
|
defineProperty(t, "observers", {
|
|
18304
|
+
enumerable: !0,
|
|
18260
18305
|
configurable: !1,
|
|
18261
18306
|
writable: !1,
|
|
18262
18307
|
value: Object.freeze(P)
|
|
@@ -18271,32 +18316,41 @@ function parse(n, t) {
|
|
|
18271
18316
|
if (t.observers.length > 0) {
|
|
18272
18317
|
var K = void 0;
|
|
18273
18318
|
isNumber(H.initial.panoIndex) ? K = H.initial.panoIndex : isNumber(H.initial.pano_index) ? K = H.initial.pano_index : isNumber(H.initial.pano) && (K = H.initial.pano), typeof K == "number" && (K = clamp$1(K, 0, t.observers.length - 1), defineProperty(z, "panoIndex", {
|
|
18319
|
+
enumerable: !0,
|
|
18274
18320
|
writable: !0,
|
|
18275
18321
|
value: K
|
|
18276
18322
|
}));
|
|
18277
18323
|
}
|
|
18278
18324
|
if (H.initial.mode === "Panorama" && t.observers.length === 0 || H.initial.mode === "Floorplan" || H.initial.mode === "Topview" || H.initial.mode === "Model" || H.initial.mode === "Mapview" ? defineProperty(z, "mode", {
|
|
18325
|
+
enumerable: !0,
|
|
18279
18326
|
writable: !0,
|
|
18280
18327
|
value: H.initial.mode
|
|
18281
18328
|
}) : typeof z.panoIndex == "number" ? defineProperty(z, "mode", {
|
|
18329
|
+
enumerable: !0,
|
|
18282
18330
|
writable: !0,
|
|
18283
18331
|
value: "Panorama"
|
|
18284
18332
|
}) : defineProperty(z, "mode", {
|
|
18333
|
+
enumerable: !0,
|
|
18285
18334
|
writable: !0,
|
|
18286
18335
|
value: "Mapview"
|
|
18287
18336
|
}), isNumber(H.initial.latitude) && defineProperty(z, "latitude", {
|
|
18337
|
+
enumerable: !0,
|
|
18288
18338
|
writable: !0,
|
|
18289
18339
|
value: H.initial.latitude
|
|
18290
18340
|
}), isNumber(H.initial.longitude) ? defineProperty(z, "longitude", {
|
|
18341
|
+
enumerable: !0,
|
|
18291
18342
|
writable: !0,
|
|
18292
18343
|
value: H.initial.longitude
|
|
18293
18344
|
}) : isNumber(H.initial.heading) && defineProperty(z, "longitude", {
|
|
18345
|
+
enumerable: !0,
|
|
18294
18346
|
writable: !0,
|
|
18295
18347
|
value: headingToLongitude(H.initial.heading)
|
|
18296
18348
|
}), isNumber(H.initial.fov) && defineProperty(z, "fov", {
|
|
18349
|
+
enumerable: !0,
|
|
18297
18350
|
writable: !0,
|
|
18298
18351
|
value: H.initial.fov
|
|
18299
18352
|
}), isNumber(H.initial.distance) && defineProperty(z, "distance", {
|
|
18353
|
+
enumerable: !0,
|
|
18300
18354
|
writable: !0,
|
|
18301
18355
|
value: H.initial.distance
|
|
18302
18356
|
}), Array.isArray(H.initial.offset)) {
|
|
@@ -18305,10 +18359,12 @@ function parse(n, t) {
|
|
|
18305
18359
|
return isNaN(W) || !isFinite(W) ? 0 : W;
|
|
18306
18360
|
});
|
|
18307
18361
|
defineProperty(z, "offset", {
|
|
18362
|
+
enumerable: !0,
|
|
18308
18363
|
writable: !0,
|
|
18309
18364
|
value: new THREE.Vector3().fromArray(q)
|
|
18310
18365
|
});
|
|
18311
18366
|
} else typeof H.initial.offset == "object" && typeof H.initial.offset.x == "number" && typeof H.initial.offset.y == "number" && typeof H.initial.offset.z == "number" && defineProperty(z, "offset", {
|
|
18367
|
+
enumerable: !0,
|
|
18312
18368
|
writable: !0,
|
|
18313
18369
|
value: new THREE.Vector3().fromArray([
|
|
18314
18370
|
H.initial.offset.x,
|
|
@@ -18318,6 +18374,7 @@ function parse(n, t) {
|
|
|
18318
18374
|
});
|
|
18319
18375
|
}
|
|
18320
18376
|
return defineProperty(t, "initial", {
|
|
18377
|
+
enumerable: !0,
|
|
18321
18378
|
configurable: !1,
|
|
18322
18379
|
writable: !1,
|
|
18323
18380
|
value: z
|
|
@@ -18325,34 +18382,43 @@ function parse(n, t) {
|
|
|
18325
18382
|
}
|
|
18326
18383
|
function parseNull(n, t) {
|
|
18327
18384
|
return defineProperty(t, "issuer", {
|
|
18385
|
+
enumerable: !0,
|
|
18328
18386
|
configurable: !1,
|
|
18329
18387
|
writable: !1,
|
|
18330
18388
|
value: "null"
|
|
18331
18389
|
}), defineProperty(t, "expire", {
|
|
18390
|
+
enumerable: !0,
|
|
18332
18391
|
configurable: !1,
|
|
18333
18392
|
writable: !1,
|
|
18334
18393
|
value: Object.freeze(/* @__PURE__ */ new Date())
|
|
18335
18394
|
}), defineProperty(t, "allowHosts", {
|
|
18395
|
+
enumerable: !0,
|
|
18336
18396
|
configurable: !1,
|
|
18337
18397
|
writable: !1,
|
|
18338
18398
|
value: Object.freeze(["*"])
|
|
18339
18399
|
}), defineProperty(t, "name", {
|
|
18400
|
+
enumerable: !0,
|
|
18340
18401
|
configurable: !1,
|
|
18341
18402
|
writable: !1,
|
|
18342
18403
|
value: "Null"
|
|
18343
18404
|
}), defineProperty(t, "workCode", {
|
|
18405
|
+
enumerable: !0,
|
|
18344
18406
|
value: createUuid()
|
|
18345
18407
|
}), defineProperty(t, "baseURL", {
|
|
18408
|
+
enumerable: !0,
|
|
18346
18409
|
value: "/"
|
|
18347
18410
|
}), defineProperty(t, "model", {
|
|
18411
|
+
enumerable: !0,
|
|
18348
18412
|
configurable: !1,
|
|
18349
18413
|
writable: !1,
|
|
18350
18414
|
value: void 0
|
|
18351
18415
|
}), defineProperty(t, "observers", {
|
|
18416
|
+
enumerable: !0,
|
|
18352
18417
|
configurable: !1,
|
|
18353
18418
|
writable: !1,
|
|
18354
18419
|
value: Object.freeze([])
|
|
18355
18420
|
}), defineProperty(t, "initial", {
|
|
18421
|
+
enumerable: !0,
|
|
18356
18422
|
configurable: !1,
|
|
18357
18423
|
writable: !1,
|
|
18358
18424
|
value: (function() {
|
|
@@ -18363,6 +18429,7 @@ function parseNull(n, t) {
|
|
|
18363
18429
|
writable: !1,
|
|
18364
18430
|
value: t
|
|
18365
18431
|
}), defineProperty(e, "mode", {
|
|
18432
|
+
enumerable: !0,
|
|
18366
18433
|
writable: !0,
|
|
18367
18434
|
value: "Mapview"
|
|
18368
18435
|
}), e;
|
|
@@ -18372,32 +18439,40 @@ function parseNull(n, t) {
|
|
|
18372
18439
|
function parsePano(n, t) {
|
|
18373
18440
|
var e, r;
|
|
18374
18441
|
return defineProperty(t, "issuer", {
|
|
18442
|
+
enumerable: !0,
|
|
18375
18443
|
configurable: !1,
|
|
18376
18444
|
writable: !1,
|
|
18377
18445
|
value: "null"
|
|
18378
18446
|
}), defineProperty(t, "expire", {
|
|
18447
|
+
enumerable: !0,
|
|
18379
18448
|
configurable: !1,
|
|
18380
18449
|
writable: !1,
|
|
18381
18450
|
value: Object.freeze(/* @__PURE__ */ new Date())
|
|
18382
18451
|
}), defineProperty(t, "allowHosts", {
|
|
18452
|
+
enumerable: !0,
|
|
18383
18453
|
configurable: !1,
|
|
18384
18454
|
writable: !1,
|
|
18385
18455
|
value: Object.freeze(["*"])
|
|
18386
18456
|
}), defineProperty(t, "name", {
|
|
18457
|
+
enumerable: !0,
|
|
18387
18458
|
configurable: !1,
|
|
18388
18459
|
writable: !1,
|
|
18389
18460
|
value: String((e = n.name) !== null && e !== void 0 ? e : "Unknown")
|
|
18390
18461
|
}), defineProperty(t, "workCode", {
|
|
18462
|
+
enumerable: !0,
|
|
18391
18463
|
writable: !0,
|
|
18392
18464
|
value: (r = n.code) !== null && r !== void 0 ? r : createUuid()
|
|
18393
18465
|
}), defineProperty(t, "baseURL", {
|
|
18466
|
+
enumerable: !0,
|
|
18394
18467
|
writable: !0,
|
|
18395
18468
|
value: "/"
|
|
18396
18469
|
}), defineProperty(t, "model", {
|
|
18470
|
+
enumerable: !0,
|
|
18397
18471
|
configurable: !1,
|
|
18398
18472
|
writable: !1,
|
|
18399
18473
|
value: void 0
|
|
18400
18474
|
}), defineProperty(t, "observers", {
|
|
18475
|
+
enumerable: !0,
|
|
18401
18476
|
configurable: !1,
|
|
18402
18477
|
writable: !1,
|
|
18403
18478
|
value: (function() {
|
|
@@ -18408,62 +18483,77 @@ function parsePano(n, t) {
|
|
|
18408
18483
|
writable: !1,
|
|
18409
18484
|
value: t
|
|
18410
18485
|
}), defineProperty(o, "index", {
|
|
18486
|
+
enumerable: !0,
|
|
18411
18487
|
configurable: !1,
|
|
18412
18488
|
writable: !1,
|
|
18413
18489
|
value: 0
|
|
18414
18490
|
}), defineProperty(o, "panoIndex", {
|
|
18491
|
+
enumerable: !0,
|
|
18415
18492
|
configurable: !1,
|
|
18416
18493
|
writable: !1,
|
|
18417
18494
|
value: 0
|
|
18418
18495
|
}), defineProperty(o, "panoId", {
|
|
18496
|
+
enumerable: !0,
|
|
18419
18497
|
configurable: !1,
|
|
18420
18498
|
writable: !1,
|
|
18421
18499
|
value: panoStringify({ workCode: t.workCode, panoIndex: 0 })
|
|
18422
18500
|
}), defineProperty(o, "floorIndex", {
|
|
18501
|
+
enumerable: !0,
|
|
18423
18502
|
configurable: !1,
|
|
18424
18503
|
writable: !1,
|
|
18425
18504
|
value: 0
|
|
18426
18505
|
}), defineProperty(o, "derivedId", {
|
|
18506
|
+
enumerable: !0,
|
|
18427
18507
|
configurable: !1,
|
|
18428
18508
|
writable: !1,
|
|
18429
18509
|
value: void 0
|
|
18430
18510
|
}), defineProperty(o, "derivedIdStr", {
|
|
18511
|
+
enumerable: !0,
|
|
18431
18512
|
configurable: !1,
|
|
18432
18513
|
writable: !1,
|
|
18433
18514
|
value: void 0
|
|
18434
18515
|
}), defineProperty(o, "active", {
|
|
18516
|
+
enumerable: !0,
|
|
18435
18517
|
configurable: !1,
|
|
18436
18518
|
writable: !1,
|
|
18437
18519
|
value: !0
|
|
18438
18520
|
}), defineProperty(o, "loadable", {
|
|
18521
|
+
enumerable: !0,
|
|
18439
18522
|
configurable: !1,
|
|
18440
18523
|
writable: !1,
|
|
18441
18524
|
value: !1
|
|
18442
18525
|
}), defineProperty(o, "position", {
|
|
18526
|
+
enumerable: !0,
|
|
18443
18527
|
configurable: !1,
|
|
18444
18528
|
writable: !1,
|
|
18445
18529
|
value: new THREE.Vector3(0, 1.5, 0)
|
|
18446
18530
|
}), defineProperty(o, "standingPosition", {
|
|
18531
|
+
enumerable: !0,
|
|
18447
18532
|
configurable: !1,
|
|
18448
18533
|
writable: !1,
|
|
18449
18534
|
value: new THREE.Vector3(0, 0, 0)
|
|
18450
18535
|
}), defineProperty(o, "quaternion", {
|
|
18536
|
+
enumerable: !0,
|
|
18451
18537
|
configurable: !1,
|
|
18452
18538
|
writable: !1,
|
|
18453
18539
|
value: new THREE.Quaternion(0, 1, 0, 0)
|
|
18454
18540
|
}), defineProperty(o, "matrix", {
|
|
18541
|
+
enumerable: !0,
|
|
18455
18542
|
configurable: !1,
|
|
18456
18543
|
writable: !1,
|
|
18457
18544
|
value: new THREE.Matrix4().compose(o.position, o.quaternion, PANO_TEXTURE_SCALE)
|
|
18458
18545
|
}), defineProperty(o, "accessibleNodes", {
|
|
18546
|
+
enumerable: !0,
|
|
18459
18547
|
configurable: !1,
|
|
18460
18548
|
writable: !1,
|
|
18461
18549
|
value: Object.freeze([])
|
|
18462
18550
|
}), defineProperty(o, "visibleNodes", {
|
|
18551
|
+
enumerable: !0,
|
|
18463
18552
|
configurable: !1,
|
|
18464
18553
|
writable: !1,
|
|
18465
18554
|
value: Object.freeze([])
|
|
18466
18555
|
}), defineProperty(o, "images", {
|
|
18556
|
+
enumerable: !0,
|
|
18467
18557
|
configurable: !1,
|
|
18468
18558
|
writable: !1,
|
|
18469
18559
|
value: (function() {
|
|
@@ -18477,16 +18567,19 @@ function parsePano(n, t) {
|
|
|
18477
18567
|
for (var u = 0, l = FACE_ORDER$1; u < l.length; u++) {
|
|
18478
18568
|
var c = l[u];
|
|
18479
18569
|
defineProperty(s, c, {
|
|
18570
|
+
enumerable: !0,
|
|
18480
18571
|
configurable: !1,
|
|
18481
18572
|
writable: !1,
|
|
18482
18573
|
value: n[c]
|
|
18483
18574
|
});
|
|
18484
18575
|
}
|
|
18485
18576
|
return defineProperty(s, "sizeList", {
|
|
18577
|
+
enumerable: !0,
|
|
18486
18578
|
configurable: !1,
|
|
18487
18579
|
writable: !1,
|
|
18488
18580
|
value: Object.freeze([n.size])
|
|
18489
18581
|
}), defineProperty(s, "tiles", {
|
|
18582
|
+
enumerable: !0,
|
|
18490
18583
|
configurable: !1,
|
|
18491
18584
|
writable: !1,
|
|
18492
18585
|
value: (function() {
|
|
@@ -18510,22 +18603,26 @@ function parsePano(n, t) {
|
|
|
18510
18603
|
writable: !1,
|
|
18511
18604
|
value: t
|
|
18512
18605
|
}), defineProperty(y, "level", {
|
|
18606
|
+
enumerable: !0,
|
|
18513
18607
|
configurable: !1,
|
|
18514
18608
|
writable: !1,
|
|
18515
18609
|
value: v
|
|
18516
18610
|
}), E > f) {
|
|
18517
18611
|
defineProperty(y, "size", {
|
|
18612
|
+
enumerable: !0,
|
|
18518
18613
|
configurable: !1,
|
|
18519
18614
|
writable: !1,
|
|
18520
18615
|
value: E
|
|
18521
18616
|
}), defineProperty(y, "scale", {
|
|
18617
|
+
enumerable: !0,
|
|
18522
18618
|
configurable: !1,
|
|
18523
18619
|
writable: !1,
|
|
18524
18620
|
value: 1
|
|
18525
18621
|
});
|
|
18526
|
-
for (var
|
|
18527
|
-
var S = T
|
|
18622
|
+
for (var T = 0, b = FACE_ORDER$1; T < b.length; T++) {
|
|
18623
|
+
var S = b[T];
|
|
18528
18624
|
defineProperty(y, S, {
|
|
18625
|
+
enumerable: !0,
|
|
18529
18626
|
configurable: !1,
|
|
18530
18627
|
writable: !1,
|
|
18531
18628
|
value: replaceImageSize(s[S], E)
|
|
@@ -18533,10 +18630,12 @@ function parsePano(n, t) {
|
|
|
18533
18630
|
}
|
|
18534
18631
|
} else {
|
|
18535
18632
|
defineProperty(y, "size", {
|
|
18633
|
+
enumerable: !0,
|
|
18536
18634
|
configurable: !1,
|
|
18537
18635
|
writable: !1,
|
|
18538
18636
|
value: f
|
|
18539
18637
|
}), defineProperty(y, "scale", {
|
|
18638
|
+
enumerable: !0,
|
|
18540
18639
|
configurable: !1,
|
|
18541
18640
|
writable: !1,
|
|
18542
18641
|
value: E / f
|
|
@@ -18544,6 +18643,7 @@ function parsePano(n, t) {
|
|
|
18544
18643
|
for (var R = 0, C = FACE_ORDER$1; R < C.length; R++) {
|
|
18545
18644
|
var S = C[R];
|
|
18546
18645
|
defineProperty(y, S, {
|
|
18646
|
+
enumerable: !0,
|
|
18547
18647
|
configurable: !1,
|
|
18548
18648
|
writable: !1,
|
|
18549
18649
|
value: s[S]
|
|
@@ -18560,12 +18660,14 @@ function parsePano(n, t) {
|
|
|
18560
18660
|
}), s;
|
|
18561
18661
|
})()
|
|
18562
18662
|
}), defineProperty(o, "video", {
|
|
18663
|
+
enumerable: !0,
|
|
18563
18664
|
configurable: !1,
|
|
18564
18665
|
writable: !1,
|
|
18565
18666
|
value: void 0
|
|
18566
18667
|
}), Object.freeze([o]);
|
|
18567
18668
|
})()
|
|
18568
18669
|
}), defineProperty(t, "initial", {
|
|
18670
|
+
enumerable: !0,
|
|
18569
18671
|
configurable: !1,
|
|
18570
18672
|
writable: !1,
|
|
18571
18673
|
value: (function() {
|
|
@@ -18576,9 +18678,11 @@ function parsePano(n, t) {
|
|
|
18576
18678
|
writable: !1,
|
|
18577
18679
|
value: t
|
|
18578
18680
|
}), defineProperty(o, "mode", {
|
|
18681
|
+
enumerable: !0,
|
|
18579
18682
|
writable: !0,
|
|
18580
18683
|
value: "Panorama"
|
|
18581
18684
|
}), defineProperty(o, "panoIndex", {
|
|
18685
|
+
enumerable: !0,
|
|
18582
18686
|
writable: !0,
|
|
18583
18687
|
value: 0
|
|
18584
18688
|
}), o;
|
|
@@ -18732,8 +18836,8 @@ var InternalWebGLRenderer = (
|
|
|
18732
18836
|
precision: m
|
|
18733
18837
|
};
|
|
18734
18838
|
if (h) {
|
|
18735
|
-
var y = document.createElement("canvas"),
|
|
18736
|
-
|
|
18839
|
+
var y = document.createElement("canvas"), T = y.getContext("webgl2", E);
|
|
18840
|
+
T ? g = n.call(this, __assign(__assign(__assign({}, E), v), { antialias: !0, canvas: y, context: T })) || this : (console.error("error occurred when getting webgl2 canvas context, mybe webgl2 not support, fallback to webgl."), g = n.call(this, __assign(__assign({}, E), v)) || this);
|
|
18737
18841
|
} else
|
|
18738
18842
|
g = n.call(this, __assign(__assign({}, E), v)) || this;
|
|
18739
18843
|
return g.outputEncoding = THREE.sRGBEncoding, g.autoClear = !0, g;
|
|
@@ -20002,10 +20106,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20002
20106
|
return B.apply(_, arguments);
|
|
20003
20107
|
};
|
|
20004
20108
|
}
|
|
20005
|
-
function
|
|
20109
|
+
function T(B, _) {
|
|
20006
20110
|
return typeof B == u ? B.apply(_ && _[0] || r, _) : B;
|
|
20007
20111
|
}
|
|
20008
|
-
function
|
|
20112
|
+
function b(B, _) {
|
|
20009
20113
|
return B === r ? _ : B;
|
|
20010
20114
|
}
|
|
20011
20115
|
function S(B, _, k) {
|
|
@@ -20074,7 +20178,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20074
20178
|
function ue(B, _) {
|
|
20075
20179
|
var k = this;
|
|
20076
20180
|
this.manager = B, this.callback = _, this.element = B.element, this.target = B.options.inputTarget, this.domHandler = function(U) {
|
|
20077
|
-
|
|
20181
|
+
T(B.options.enable, [B]) && k.handler(U);
|
|
20078
20182
|
}, this.init();
|
|
20079
20183
|
}
|
|
20080
20184
|
ue.prototype = {
|
|
@@ -20386,7 +20490,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20386
20490
|
compute: function() {
|
|
20387
20491
|
var B = [];
|
|
20388
20492
|
return p(this.manager.recognizers, function(_) {
|
|
20389
|
-
|
|
20493
|
+
T(_.options.enable, [_]) && (B = B.concat(_.getTouchAction()));
|
|
20390
20494
|
}), ft(B.join(" "));
|
|
20391
20495
|
},
|
|
20392
20496
|
/**
|
|
@@ -20432,7 +20536,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20432
20536
|
}
|
|
20433
20537
|
var It = 1, at = 2, Pt = 4, xt = 8, vt = xt, St = 16, Ge = 32;
|
|
20434
20538
|
function mt(B) {
|
|
20435
|
-
this.options = A({}, this.defaults, B || {}), this.id = O(), this.manager = null, this.options.enable =
|
|
20539
|
+
this.options = A({}, this.defaults, B || {}), this.id = O(), this.manager = null, this.options.enable = b(this.options.enable, !0), this.state = It, this.simultaneous = {}, this.requireFail = [];
|
|
20436
20540
|
}
|
|
20437
20541
|
mt.prototype = {
|
|
20438
20542
|
/**
|
|
@@ -20546,7 +20650,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20546
20650
|
*/
|
|
20547
20651
|
recognize: function(B) {
|
|
20548
20652
|
var _ = A({}, B);
|
|
20549
|
-
if (!
|
|
20653
|
+
if (!T(this.options.enable, [this, _])) {
|
|
20550
20654
|
this.reset(), this.state = Ge;
|
|
20551
20655
|
return;
|
|
20552
20656
|
}
|
|
@@ -20820,7 +20924,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20820
20924
|
}
|
|
20821
20925
|
});
|
|
20822
20926
|
function Re(B, _) {
|
|
20823
|
-
return _ = _ || {}, _.recognizers =
|
|
20927
|
+
return _ = _ || {}, _.recognizers = b(_.recognizers, Re.defaults.preset), new st(B, _);
|
|
20824
20928
|
}
|
|
20825
20929
|
Re.VERSION = "2.0.7", Re.defaults = {
|
|
20826
20930
|
/**
|
|
@@ -21318,7 +21422,7 @@ var BaseController = (
|
|
|
21318
21422
|
userAction: !0,
|
|
21319
21423
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21320
21424
|
});
|
|
21321
|
-
r.onPanGesture(F),
|
|
21425
|
+
r.onPanGesture(F), T();
|
|
21322
21426
|
}
|
|
21323
21427
|
}), s.on("tap", function(M) {
|
|
21324
21428
|
if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
|
|
@@ -21360,7 +21464,7 @@ var BaseController = (
|
|
|
21360
21464
|
userAction: !0,
|
|
21361
21465
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21362
21466
|
});
|
|
21363
|
-
r.onTapGesture(F),
|
|
21467
|
+
r.onTapGesture(F), T();
|
|
21364
21468
|
}
|
|
21365
21469
|
}
|
|
21366
21470
|
}), s.on("pinchstart pinch pinchend", function(M) {
|
|
@@ -21402,7 +21506,7 @@ var BaseController = (
|
|
|
21402
21506
|
userAction: !0,
|
|
21403
21507
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21404
21508
|
});
|
|
21405
|
-
r.onPinchGesture(F),
|
|
21509
|
+
r.onPinchGesture(F), T();
|
|
21406
21510
|
}
|
|
21407
21511
|
}), s.on("dbltap", function(M) {
|
|
21408
21512
|
if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
|
|
@@ -21444,7 +21548,7 @@ var BaseController = (
|
|
|
21444
21548
|
userAction: !0,
|
|
21445
21549
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21446
21550
|
});
|
|
21447
|
-
r.onDblTapGesture(F),
|
|
21551
|
+
r.onDblTapGesture(F), T();
|
|
21448
21552
|
}
|
|
21449
21553
|
}
|
|
21450
21554
|
});
|
|
@@ -21526,7 +21630,7 @@ var BaseController = (
|
|
|
21526
21630
|
}, 100)
|
|
21527
21631
|
};
|
|
21528
21632
|
}
|
|
21529
|
-
|
|
21633
|
+
T();
|
|
21530
21634
|
}
|
|
21531
21635
|
}, A = function(M) {
|
|
21532
21636
|
if (!isMobile) {
|
|
@@ -21558,17 +21662,17 @@ var BaseController = (
|
|
|
21558
21662
|
r.mouseMoveState = {
|
|
21559
21663
|
timeStamp: now(),
|
|
21560
21664
|
event: D
|
|
21561
|
-
}, r.onMouseMove(D), r.pressState && Math.abs(M.clientX - r.pressState.event.center.y) > 10 && Math.abs(M.clientY - r.pressState.event.center.y) > 10 &&
|
|
21665
|
+
}, r.onMouseMove(D), r.pressState && Math.abs(M.clientX - r.pressState.event.center.y) > 10 && Math.abs(M.clientY - r.pressState.event.center.y) > 10 && T();
|
|
21562
21666
|
}
|
|
21563
21667
|
}, g = function() {
|
|
21564
21668
|
if (r.mouseMoveState) {
|
|
21565
21669
|
var M = createEvent(r.mouseMoveState.event.type, __assign(__assign({}, r.mouseMoveState.event), { isFinal: !0 }));
|
|
21566
21670
|
r.mouseMoveState = void 0, r.onMouseMove(M);
|
|
21567
21671
|
}
|
|
21568
|
-
|
|
21672
|
+
T();
|
|
21569
21673
|
}, E = function(M) {
|
|
21570
21674
|
if (!o(M.center)) {
|
|
21571
|
-
|
|
21675
|
+
T();
|
|
21572
21676
|
return;
|
|
21573
21677
|
}
|
|
21574
21678
|
var P = !1;
|
|
@@ -21584,7 +21688,7 @@ var BaseController = (
|
|
|
21584
21688
|
E(M);
|
|
21585
21689
|
}, !0, 1));
|
|
21586
21690
|
}, v = function(M) {
|
|
21587
|
-
if (
|
|
21691
|
+
if (T(), !(M.touches.length > 1 || M.changedTouches.length <= 0)) {
|
|
21588
21692
|
var P = {
|
|
21589
21693
|
x: M.changedTouches[0].clientX,
|
|
21590
21694
|
y: M.changedTouches[0].clientY
|
|
@@ -21607,7 +21711,7 @@ var BaseController = (
|
|
|
21607
21711
|
E(N);
|
|
21608
21712
|
}
|
|
21609
21713
|
}, y = function(M) {
|
|
21610
|
-
|
|
21714
|
+
T();
|
|
21611
21715
|
var P = {
|
|
21612
21716
|
x: M.clientX,
|
|
21613
21717
|
y: M.clientY
|
|
@@ -21628,7 +21732,7 @@ var BaseController = (
|
|
|
21628
21732
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21629
21733
|
});
|
|
21630
21734
|
E(N);
|
|
21631
|
-
},
|
|
21735
|
+
}, T = function() {
|
|
21632
21736
|
var M;
|
|
21633
21737
|
if (r.pressState) {
|
|
21634
21738
|
var P = now() - r.pressState.timeStamp, F = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { center: __assign(__assign({}, r.pressState.event.center), { delta: P }), isFirst: !1, isFinal: !0, pointers: r.pressState.event.pointers.map(function(L) {
|
|
@@ -21636,7 +21740,7 @@ var BaseController = (
|
|
|
21636
21740
|
}) }));
|
|
21637
21741
|
r.onPressGesture(F), (M = r.pressState) === null || M === void 0 || M.stop(), r.pressState = void 0;
|
|
21638
21742
|
}
|
|
21639
|
-
},
|
|
21743
|
+
}, b = null, S = function(M) {
|
|
21640
21744
|
var P, F = !1, L = !1;
|
|
21641
21745
|
switch (M.type) {
|
|
21642
21746
|
case "gesturestart":
|
|
@@ -21669,21 +21773,21 @@ var BaseController = (
|
|
|
21669
21773
|
}, R = function(M) {
|
|
21670
21774
|
if (M.preventDefault(), !isMobile) {
|
|
21671
21775
|
var P = S(M);
|
|
21672
|
-
|
|
21776
|
+
b = {
|
|
21673
21777
|
firstEvent: P
|
|
21674
21778
|
};
|
|
21675
|
-
var F =
|
|
21779
|
+
var F = b.firstEvent;
|
|
21676
21780
|
F && !o(F.center) || r.onPinchGesture(P);
|
|
21677
21781
|
}
|
|
21678
21782
|
}, C = function(M) {
|
|
21679
|
-
if (M.preventDefault(), !isMobile &&
|
|
21680
|
-
var P = S(M), F =
|
|
21783
|
+
if (M.preventDefault(), !isMobile && b) {
|
|
21784
|
+
var P = S(M), F = b.firstEvent;
|
|
21681
21785
|
F && !o(F.center) || r.onPinchGesture(P);
|
|
21682
21786
|
}
|
|
21683
21787
|
}, w = function(M) {
|
|
21684
|
-
if (M.preventDefault(), !isMobile &&
|
|
21685
|
-
var P = S(M), F =
|
|
21686
|
-
|
|
21788
|
+
if (M.preventDefault(), !isMobile && b) {
|
|
21789
|
+
var P = S(M), F = b.firstEvent;
|
|
21790
|
+
b = null, !(F && !o(F.center)) && r.onPinchGesture(P);
|
|
21687
21791
|
}
|
|
21688
21792
|
}, I = function(M) {
|
|
21689
21793
|
if (M && typeof M.preventDefault == "function" && M.currentTarget === e && M.preventDefault(), typeof getSelection == "function") {
|
|
@@ -21691,9 +21795,9 @@ var BaseController = (
|
|
|
21691
21795
|
P && P.focusNode && (P.removeAllRanges && P.removeAllRanges(), P.empty && P.empty());
|
|
21692
21796
|
}
|
|
21693
21797
|
};
|
|
21694
|
-
this.enableWheel && e.addEventListener("wheel", m, { passive: !1 }), e.addEventListener("mousemove", A, !1), e.addEventListener("mouseout", g, !1), e.addEventListener("touchstart", v, { passive: !0 }), e.addEventListener("touchend",
|
|
21798
|
+
this.enableWheel && e.addEventListener("wheel", m, { passive: !1 }), e.addEventListener("mousemove", A, !1), e.addEventListener("mouseout", g, !1), e.addEventListener("touchstart", v, { passive: !0 }), e.addEventListener("touchend", T, !1), e.addEventListener("touchcancel", T, !1), e.addEventListener("mousedown", y, !1), e.addEventListener("mouseup", T, !1), e.addEventListener("gesturestart", R, { passive: !1 }), e.addEventListener("gesturechange", C, { passive: !1 }), e.addEventListener("gestureend", w, { passive: !1 }), e.addEventListener("touchstart", I, { passive: !1 }), e.addEventListener("contextmenu", I, !1);
|
|
21695
21799
|
var H = function() {
|
|
21696
|
-
s.destroy(), e.removeEventListener("wheel", m, !1), e.removeEventListener("mousemove", A, !1), e.removeEventListener("mouseout", g, !1), e.removeEventListener("touchstart", v, !1), e.removeEventListener("touchend",
|
|
21800
|
+
s.destroy(), e.removeEventListener("wheel", m, !1), e.removeEventListener("mousemove", A, !1), e.removeEventListener("mouseout", g, !1), e.removeEventListener("touchstart", v, !1), e.removeEventListener("touchend", T, !1), e.removeEventListener("touchcancel", T, !1), e.removeEventListener("mousedown", y, !1), e.removeEventListener("mouseup", T, !1), e.removeEventListener("gesturestart", R, !1), e.removeEventListener("gesturechange", C, !1), e.removeEventListener("gestureend", w, !1), e.removeEventListener("touchstart", I, !1), e.removeEventListener("contextmenu", I, !1);
|
|
21697
21801
|
};
|
|
21698
21802
|
return Object.assign(H, { element: e });
|
|
21699
21803
|
}, t.prototype.preloadPano = function(e, r) {
|
|
@@ -21812,7 +21916,7 @@ void main() {
|
|
|
21812
21916
|
} : {
|
|
21813
21917
|
workCode: m.workCode,
|
|
21814
21918
|
panoIndex: m.panoIndex
|
|
21815
|
-
}, g = (u = p.fov) !== null && u !== void 0 ? u : d.defaultFov, E = (l = p.longitude) !== null && l !== void 0 ? l : isThirdPersonMode(m.mode) ? m.longitude : d.defaultLongitude, v = clamp$1(typeof d.minLatitude == "function" ? d.minLatitude(g) : d.minLatitude, -Math.PI / 2, Math.PI / 2), y = clamp$1(typeof d.maxLatitude == "function" ? d.maxLatitude(g) : d.maxLatitude, -Math.PI / 2, Math.PI / 2),
|
|
21919
|
+
}, g = (u = p.fov) !== null && u !== void 0 ? u : d.defaultFov, E = (l = p.longitude) !== null && l !== void 0 ? l : isThirdPersonMode(m.mode) ? m.longitude : d.defaultLongitude, v = clamp$1(typeof d.minLatitude == "function" ? d.minLatitude(g) : d.minLatitude, -Math.PI / 2, Math.PI / 2), y = clamp$1(typeof d.maxLatitude == "function" ? d.maxLatitude(g) : d.maxLatitude, -Math.PI / 2, Math.PI / 2), T = clamp$1((c = p.latitude) !== null && c !== void 0 ? c : m.mode === "Floorplan" ? m.latitude : d.defaultLatitude, v, y), b = p.offset ? p.offset.clone() : e.modelScene.boundingBox.getCenter(new THREE.Vector3()), S = (f = p.distance) !== null && f !== void 0 ? f : t.distanceFromModel(d.modelScene, d.defaultFov, d.camera.aspect), R = __assign(__assign({}, A), { mode: "Floorplan", longitude: E, latitude: T, fov: g, offset: b, distance: S });
|
|
21816
21920
|
return R;
|
|
21817
21921
|
}, t.prototype.updateConfiguration = function(e) {
|
|
21818
21922
|
var r = n.prototype.updateConfiguration.call(this, e);
|
|
@@ -21965,8 +22069,8 @@ void main() {
|
|
|
21965
22069
|
this.inMomentumMovement = null;
|
|
21966
22070
|
return;
|
|
21967
22071
|
}
|
|
21968
|
-
this.inMomentumMovement && (this.cameraMotion.set({ longitude: d, latitude: A }, 0).catch(noop), E ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(y,
|
|
21969
|
-
u.requestMomentumMovement(e, !1, l,
|
|
22072
|
+
this.inMomentumMovement && (this.cameraMotion.set({ longitude: d, latitude: A }, 0).catch(noop), E ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(y, T) {
|
|
22073
|
+
u.requestMomentumMovement(e, !1, l, T);
|
|
21970
22074
|
}, !0, 1));
|
|
21971
22075
|
}
|
|
21972
22076
|
}, t.prototype.onPanGesture = function(e) {
|
|
@@ -22281,13 +22385,13 @@ void main() {
|
|
|
22281
22385
|
} : {
|
|
22282
22386
|
workCode: m.workCode,
|
|
22283
22387
|
panoIndex: m.panoIndex
|
|
22284
|
-
}, g = d.getObserver(A), E = clamp$1((u = p.fov) !== null && u !== void 0 ? u : isFristPersonMode(m.mode) ? m.fov : f.defaultFov, f.minFov, f.maxFov), v = (l = p.longitude) !== null && l !== void 0 ? l : m.longitude, y = clamp$1(typeof f.minLatitude == "function" ? f.minLatitude(E) : f.minLatitude, -Math.PI / 2, Math.PI / 2),
|
|
22388
|
+
}, g = d.getObserver(A), E = clamp$1((u = p.fov) !== null && u !== void 0 ? u : isFristPersonMode(m.mode) ? m.fov : f.defaultFov, f.minFov, f.maxFov), v = (l = p.longitude) !== null && l !== void 0 ? l : m.longitude, y = clamp$1(typeof f.minLatitude == "function" ? f.minLatitude(E) : f.minLatitude, -Math.PI / 2, Math.PI / 2), T = clamp$1(typeof f.maxLatitude == "function" ? f.maxLatitude(E) : f.maxLatitude, -Math.PI / 2, Math.PI / 2), b = clamp$1((c = p.latitude) !== null && c !== void 0 ? c : isFristPersonMode(m.mode) ? m.latitude : f.defaultLatitude, y, T), S = new THREE.Vector3();
|
|
22285
22389
|
return g && S.copy(g.position).applyMatrix4(g.work.transform), {
|
|
22286
22390
|
workCode: A.workCode,
|
|
22287
22391
|
panoIndex: A.panoIndex,
|
|
22288
22392
|
mode: "PanoramaLike",
|
|
22289
22393
|
longitude: v,
|
|
22290
|
-
latitude:
|
|
22394
|
+
latitude: b,
|
|
22291
22395
|
fov: E,
|
|
22292
22396
|
offset: S,
|
|
22293
22397
|
distance: 0
|
|
@@ -22345,8 +22449,8 @@ void main() {
|
|
|
22345
22449
|
this.inMomentumMovement = null;
|
|
22346
22450
|
return;
|
|
22347
22451
|
}
|
|
22348
|
-
this.inMomentumMovement && (this.cameraMotion.set({ longitude: h, latitude: A }, 0).catch(noop), E ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(y,
|
|
22349
|
-
u.requestMomentumMovement(e, !1, l,
|
|
22452
|
+
this.inMomentumMovement && (this.cameraMotion.set({ longitude: h, latitude: A }, 0).catch(noop), E ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(y, T) {
|
|
22453
|
+
u.requestMomentumMovement(e, !1, l, T | 0);
|
|
22350
22454
|
}, !0, 1));
|
|
22351
22455
|
}
|
|
22352
22456
|
}, t.prototype.onPanGesture = function(e) {
|
|
@@ -22763,8 +22867,8 @@ void main() {
|
|
|
22763
22867
|
this.level = clamp$1(A, 0, this.tileTree.maxLevel);
|
|
22764
22868
|
var g = Math.floor(s.width * u), E = Math.floor(s.height * u), v = Math.max(g, E), y = l.capabilities.maxTextureSize;
|
|
22765
22869
|
v > y && (g = Math.floor(g / v * y), E = Math.floor(E / v * y)), (this.renderTarget.width !== g || this.renderTarget.height !== E) && this.renderTarget.setSize(g, E), this.scene.matrix.equals(h) || (this.scene.matrix.copy(h), this.scene.matrixWorld.copy(this.scene.matrix), this.scene.matrix.decompose(this.scene.position, this.scene.quaternion, this.scene.scale), this.scene.matrixAutoUpdate = !1, r = !0);
|
|
22766
|
-
var
|
|
22767
|
-
this.camera.matrix.equals(
|
|
22870
|
+
var T = scratchCameraQuaternion.setFromRotationMatrix(c), b = scratchCameraMatrix.compose(this.scene.position, T, this.scene.scale);
|
|
22871
|
+
this.camera.matrix.equals(b) || (this.camera.matrix.copy(b), this.camera.matrixWorld.copy(this.camera.matrix), this.camera.position.copy(this.scene.position), this.camera.quaternion.copy(T), this.camera.scale.copy(this.scene.scale), r = !0);
|
|
22768
22872
|
var S = scratchCameraProjectMatrix.copy(f);
|
|
22769
22873
|
S.elements[0] *= p, S.elements[5] *= p, this.camera.projectionMatrix.equals(S) || (this.camera.projectionMatrix.copy(S), this.camera.projectionMatrixInverse.getInverse(this.camera.projectionMatrix), r = !0), scratchSceneQuaternionInverse.copy(this.scene.quaternion).inverse(), scratchSceneMatrixInverse.makeRotationFromQuaternion(scratchSceneQuaternionInverse), scratchFrustumMatrix.copy(this.camera.matrix), scratchFrustumMatrix.setPosition(0, 0, 0), scratchFrustumMatrix.premultiply(scratchSceneMatrixInverse), scratchFrustumMatrixInverse.getInverse(scratchFrustumMatrix), scratchFrustumProjectMatrix.multiplyMatrices(this.camera.projectionMatrix, scratchFrustumMatrixInverse), this.frustum.setFromProjectionMatrix(scratchFrustumProjectMatrix);
|
|
22770
22874
|
var R = this.frustum.planes[5].normal, C = [];
|
|
@@ -23135,18 +23239,18 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23135
23239
|
}, t.prototype.updateTime = function(e, r) {
|
|
23136
23240
|
var o = this, s, u, l, c, f, d;
|
|
23137
23241
|
if (!this.destroyed) {
|
|
23138
|
-
var h = {}, p = {}, m = this.locationMotion.keyframes[0], A = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], g = this.locationMotion.getKeyFrameSegment(e), E = g[0], v = g[1], y = this.panoResourceFromLocationMotionKeyframe(E),
|
|
23242
|
+
var h = {}, p = {}, m = this.locationMotion.keyframes[0], A = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], g = this.locationMotion.getKeyFrameSegment(e), E = g[0], v = g[1], y = this.panoResourceFromLocationMotionKeyframe(E), T = this.panoResourceFromLocationMotionKeyframe(v), b = this.panoResourceFromLocationMotionKeyframe(m), S = this.panoResourceFromLocationMotionKeyframe(A), R = !1;
|
|
23139
23243
|
if (this.cameraMotion.ended === !1 && (this.cameraMotion.update(e), p.longitude = this.cameraMotion.value.longitude, p.latitude = this.cameraMotion.value.latitude, p.fov = this.cameraMotion.value.fov), this.modelAlphaMotion.ended === !1 && (this.modelAlphaMotion.update(e), h.modelAlpha = this.modelAlphaMotion.value.modelAlpha), this.perspToOrthoMotion.ended === !1 && (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), this.locationMotion.ended === !1) {
|
|
23140
23244
|
this.locationMotion.update(e);
|
|
23141
|
-
var C = new THREE.Vector3().copy(y.position), w = new THREE.Vector3().copy(
|
|
23142
|
-
if (h.progress = I,
|
|
23245
|
+
var C = new THREE.Vector3().copy(y.position), w = new THREE.Vector3().copy(T.position), I = this.locationMotion.value.count - v.value.count + 1;
|
|
23246
|
+
if (h.progress = I, T.panoPicture && (I < 1 ? y.panoPicture && (h.pano0 = y.panoPicture) : h.pano0 = T.panoPicture, h.pano1 = T.panoPicture), T.effect === "montage" ? h.transition = "BLACK" : T.effect === "spread" ? h.transition = "SPREAD" : h.transition = "FADE", (T.effect === "zoomin" || T.effect === "zoomout") && (h.progress = Math.pow(I, 3)), I < 1 && T.effect !== "fly") {
|
|
23143
23247
|
if (h.pano0 && y.panoPicture) {
|
|
23144
23248
|
var H = {
|
|
23145
23249
|
panoId: h.pano0.panoId,
|
|
23146
23250
|
map: h.pano0.map,
|
|
23147
23251
|
mapSize: h.pano0.mapSize,
|
|
23148
23252
|
zoom: h.pano0.zoom,
|
|
23149
|
-
matrix: y.panoPicture.matrix.clone().premultiply(y.fixCameraTransform).setPosition(
|
|
23253
|
+
matrix: y.panoPicture.matrix.clone().premultiply(y.fixCameraTransform).setPosition(T.position)
|
|
23150
23254
|
}, M = this.panoPictureObserverMap.get(h.pano0);
|
|
23151
23255
|
M && this.panoPictureObserverMap.set(H, M), h.pano0 = H;
|
|
23152
23256
|
}
|
|
@@ -23172,10 +23276,10 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23172
23276
|
P.indexOf(Q) >= 0 || delete this.panoResources[Q];
|
|
23173
23277
|
}
|
|
23174
23278
|
}
|
|
23175
|
-
var G = panoParse(
|
|
23279
|
+
var G = panoParse(T.panoId);
|
|
23176
23280
|
G !== this.currentPano && (this.currentPano = G, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
|
|
23177
23281
|
userAction: this.userAction,
|
|
23178
|
-
prevPano: panoParse(
|
|
23282
|
+
prevPano: panoParse(b.panoId),
|
|
23179
23283
|
state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
|
|
23180
23284
|
options: {},
|
|
23181
23285
|
progress: this.locationMotion.progress,
|
|
@@ -23183,7 +23287,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23183
23287
|
}));
|
|
23184
23288
|
}
|
|
23185
23289
|
isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
|
|
23186
|
-
var W = this.works.getObserver(this.currentPano), Z = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, Y = this.works.getObserver(y.panoId), X = this.works.getObserver(
|
|
23290
|
+
var W = this.works.getObserver(this.currentPano), Z = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, Y = this.works.getObserver(y.panoId), X = this.works.getObserver(T.panoId);
|
|
23187
23291
|
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && W) {
|
|
23188
23292
|
for (var j = [], ee = W.work.observers, te = 0, re = W.accessibleNodes; te < re.length; te++) {
|
|
23189
23293
|
var ae = re[te], M = ee[ae];
|
|
@@ -23342,7 +23446,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23342
23446
|
} else
|
|
23343
23447
|
this.intersectMesh.scale.setScalar(1);
|
|
23344
23448
|
{
|
|
23345
|
-
var Et =
|
|
23449
|
+
var Et = T.effect, ht = this.modelScene.parameter, Pe = ht.pano0, _e = ht.pano1;
|
|
23346
23450
|
if (Pe && _e && Pe !== _e && Et === "fly" && this.flyEffectUseDepthBuffer) {
|
|
23347
23451
|
if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== Pe.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== _e.panoId) {
|
|
23348
23452
|
var pt = 500, ze = 512;
|
|
@@ -23427,15 +23531,15 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23427
23531
|
}
|
|
23428
23532
|
var E = "move-to-pano-" + f;
|
|
23429
23533
|
this.pending.add(E);
|
|
23430
|
-
var v = this.modelScene.parameter.resolveValue(), y = v.pano0,
|
|
23431
|
-
if (y && y.map.name === A ?
|
|
23534
|
+
var v = this.modelScene.parameter.resolveValue(), y = v.pano0, T = v.pano1, b;
|
|
23535
|
+
if (y && y.map.name === A ? b = y : (T == null ? void 0 : T.map.name) === A && (b = T), b) {
|
|
23432
23536
|
var S = {
|
|
23433
23537
|
panoId: f,
|
|
23434
23538
|
effect: c,
|
|
23435
23539
|
panoPicture: {
|
|
23436
|
-
panoId:
|
|
23437
|
-
map:
|
|
23438
|
-
mapSize:
|
|
23540
|
+
panoId: b.panoId,
|
|
23541
|
+
map: b.map,
|
|
23542
|
+
mapSize: b.mapSize,
|
|
23439
23543
|
matrix: d.matrix.clone().premultiply(d.work.transform),
|
|
23440
23544
|
zoom: 1
|
|
23441
23545
|
},
|
|
@@ -23593,26 +23697,26 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23593
23697
|
o === void 0 && (o = {});
|
|
23594
23698
|
var v = now(), y = createUuid();
|
|
23595
23699
|
this.panoResources[y] = r;
|
|
23596
|
-
var
|
|
23700
|
+
var T = 1, b, S, R;
|
|
23597
23701
|
if (this.locationMotion.ended) {
|
|
23598
23702
|
var C = this.locationMotion.getKeyFrameSegment(v);
|
|
23599
23703
|
C[0];
|
|
23600
23704
|
var w = C[1], I = this.locationMotion.value, H = ((u = this.panoResourceFromLocationMotionKeyframe(w)) !== null && u !== void 0 ? u : this.camera).position, M = r.position;
|
|
23601
|
-
|
|
23705
|
+
b = Math.max(H.distanceTo(M), T), S = [
|
|
23602
23706
|
{ key: w.key, progress: 0, value: __assign(__assign({}, I), { count: 0 }) },
|
|
23603
23707
|
{ key: y, progress: 1, value: { distance: 0, count: 1 } }
|
|
23604
23708
|
], R = 0;
|
|
23605
23709
|
} else {
|
|
23606
|
-
var P = this.locationMotion.getKeyFrameSegment(v), F = P[0], w = P[1], I = this.locationMotion.value, L = this.panoResourceFromLocationMotionKeyframe(F).position, H = this.panoResourceFromLocationMotionKeyframe(w).position, M = r.position, O = w.value.count - I.count, N = Math.max(L.distanceTo(H),
|
|
23607
|
-
|
|
23710
|
+
var P = this.locationMotion.getKeyFrameSegment(v), F = P[0], w = P[1], I = this.locationMotion.value, L = this.panoResourceFromLocationMotionKeyframe(F).position, H = this.panoResourceFromLocationMotionKeyframe(w).position, M = r.position, O = w.value.count - I.count, N = Math.max(L.distanceTo(H), T) * O, D = Math.max(H.distanceTo(M), T);
|
|
23711
|
+
b = N + D, S = [
|
|
23608
23712
|
{ key: F.key, progress: 0, value: __assign({}, I) },
|
|
23609
|
-
{ key: w.key, progress: N /
|
|
23713
|
+
{ key: w.key, progress: N / b, value: w.value },
|
|
23610
23714
|
{ key: y, progress: 1, value: { count: w.value.count + 1, distance: 0 } }
|
|
23611
23715
|
];
|
|
23612
23716
|
var V = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
|
|
23613
23717
|
V === 0 || V === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * V / z;
|
|
23614
23718
|
}
|
|
23615
|
-
var K = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ?
|
|
23719
|
+
var K = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), Q = {
|
|
23616
23720
|
longitude: o.longitude,
|
|
23617
23721
|
latitude: o.latitude,
|
|
23618
23722
|
fov: o.fov
|
|
@@ -23758,12 +23862,12 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23758
23862
|
return typeof D == "undefined" && (D = scratchVector3$3.copy(N.standingPosition).applyMatrix4(N.work.transform).distanceTo(l), E.set(N, D)), O - D;
|
|
23759
23863
|
});
|
|
23760
23864
|
E.clear();
|
|
23761
|
-
for (var y = 0,
|
|
23762
|
-
for (var
|
|
23865
|
+
for (var y = 0, T = [Math.PI / 8, Math.PI / 6, Math.PI / 4, Math.PI / 3]; y < T.length; y++)
|
|
23866
|
+
for (var b = T[y], S = 0, R = v; S < R.length; S++) {
|
|
23763
23867
|
var C = R[S], w = A[C];
|
|
23764
23868
|
if (w) {
|
|
23765
23869
|
var I = scratchVector3$3.copy(w.standingPosition).applyMatrix4(w.work.transform).sub(l);
|
|
23766
|
-
if (I && I.length() !== 0 && m.angleTo(I) <
|
|
23870
|
+
if (I && I.length() !== 0 && m.angleTo(I) < b)
|
|
23767
23871
|
return w;
|
|
23768
23872
|
}
|
|
23769
23873
|
}
|
|
@@ -23808,13 +23912,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23808
23912
|
}
|
|
23809
23913
|
c || (c = this.getForwardObserverOrNot(this.camera, u));
|
|
23810
23914
|
for (var E = 0, v = this.locationMotion.keyframes; E < v.length; E++) {
|
|
23811
|
-
var y = v[E],
|
|
23915
|
+
var y = v[E], T = this.panoResourceFromLocationMotionKeyframe(y);
|
|
23812
23916
|
if (!(y.progress < this.locationMotion.progress) && c) {
|
|
23813
|
-
var
|
|
23917
|
+
var b = panoStringify({
|
|
23814
23918
|
panoIndex: c.panoIndex,
|
|
23815
23919
|
workCode: c.work.workCode
|
|
23816
23920
|
});
|
|
23817
|
-
if (
|
|
23921
|
+
if (T.panoId === b) {
|
|
23818
23922
|
c = null;
|
|
23819
23923
|
break;
|
|
23820
23924
|
}
|
|
@@ -23850,10 +23954,10 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23850
23954
|
progress: 0,
|
|
23851
23955
|
error: null
|
|
23852
23956
|
})), c && !c.active) {
|
|
23853
|
-
var
|
|
23957
|
+
var b = panoStringify({
|
|
23854
23958
|
panoIndex: c.panoIndex,
|
|
23855
23959
|
workCode: c.work.workCode
|
|
23856
|
-
}), J = this.panoMeshes.get(
|
|
23960
|
+
}), J = this.panoMeshes.get(b);
|
|
23857
23961
|
J && (J.setDisabled(!1), J.setLoading(!0));
|
|
23858
23962
|
}
|
|
23859
23963
|
c && c.active && this.emit("pano.request", createEvent("pano.request", {
|
|
@@ -23948,16 +24052,16 @@ function isInsideCrossOriginIFrame() {
|
|
|
23948
24052
|
}
|
|
23949
24053
|
var updateEyeViewMatrices = /* @__PURE__ */ (function() {
|
|
23950
24054
|
function n(r, o, s) {
|
|
23951
|
-
var u = o ? o[0] : 0, l = o ? o[1] : 0, c = o ? o[2] : 0, f = o ? o[3] : 1, d = u + u, h = l + l, p = c + c, m = u * d, A = u * h, g = u * p, E = l * h, v = l * p, y = c * p,
|
|
23952
|
-
return r[0] = 1 - (E + y), r[1] = A + S, r[2] = g -
|
|
24055
|
+
var u = o ? o[0] : 0, l = o ? o[1] : 0, c = o ? o[2] : 0, f = o ? o[3] : 1, d = u + u, h = l + l, p = c + c, m = u * d, A = u * h, g = u * p, E = l * h, v = l * p, y = c * p, T = f * d, b = f * h, S = f * p;
|
|
24056
|
+
return r[0] = 1 - (E + y), r[1] = A + S, r[2] = g - b, r[3] = 0, r[4] = A - S, r[5] = 1 - (m + y), r[6] = v + T, r[7] = 0, r[8] = g + b, r[9] = v - T, r[10] = 1 - (m + E), r[11] = 0, r[12] = 0, r[13] = 0, r[14] = 0, r[15] = 1, r;
|
|
23953
24057
|
}
|
|
23954
24058
|
function t(r, o, s) {
|
|
23955
|
-
var u = s[0], l = s[1], c = s[2], f, d, h, p, m, A, g, E, v, y,
|
|
23956
|
-
return o === r ? (r[12] = o[0] * u + o[4] * l + o[8] * c + o[12], r[13] = o[1] * u + o[5] * l + o[9] * c + o[13], r[14] = o[2] * u + o[6] * l + o[10] * c + o[14], r[15] = o[3] * u + o[7] * l + o[11] * c + o[15]) : (f = o[0], d = o[1], h = o[2], p = o[3], m = o[4], A = o[5], g = o[6], E = o[7], v = o[8], y = o[9],
|
|
24059
|
+
var u = s[0], l = s[1], c = s[2], f, d, h, p, m, A, g, E, v, y, T, b;
|
|
24060
|
+
return o === r ? (r[12] = o[0] * u + o[4] * l + o[8] * c + o[12], r[13] = o[1] * u + o[5] * l + o[9] * c + o[13], r[14] = o[2] * u + o[6] * l + o[10] * c + o[14], r[15] = o[3] * u + o[7] * l + o[11] * c + o[15]) : (f = o[0], d = o[1], h = o[2], p = o[3], m = o[4], A = o[5], g = o[6], E = o[7], v = o[8], y = o[9], T = o[10], b = o[11], r[0] = f, r[1] = d, r[2] = h, r[3] = p, r[4] = m, r[5] = A, r[6] = g, r[7] = E, r[8] = v, r[9] = y, r[10] = T, r[11] = b, r[12] = f * u + m * l + v * c + o[12], r[13] = d * u + A * l + y * c + o[13], r[14] = h * u + g * l + T * c + o[14], r[15] = p * u + E * l + b * c + o[15]), r;
|
|
23957
24061
|
}
|
|
23958
24062
|
function e(r, o) {
|
|
23959
|
-
var s = o[0], u = o[1], l = o[2], c = o[3], f = o[4], d = o[5], h = o[6], p = o[7], m = o[8], A = o[9], g = o[10], E = o[11], v = o[12], y = o[13],
|
|
23960
|
-
return D ? (D = 1 / D, r[0] = (d * N - h * O + p * L) * D, r[1] = (l * O - u * N - c * L) * D, r[2] = (y * H -
|
|
24063
|
+
var s = o[0], u = o[1], l = o[2], c = o[3], f = o[4], d = o[5], h = o[6], p = o[7], m = o[8], A = o[9], g = o[10], E = o[11], v = o[12], y = o[13], T = o[14], b = o[15], S = s * d - u * f, R = s * h - l * f, C = s * p - c * f, w = u * h - l * d, I = u * p - c * d, H = l * p - c * h, M = m * y - A * v, P = m * T - g * v, F = m * b - E * v, L = A * T - g * y, O = A * b - E * y, N = g * b - E * T, D = S * N - R * O + C * L + w * F - I * P + H * M;
|
|
24064
|
+
return D ? (D = 1 / D, r[0] = (d * N - h * O + p * L) * D, r[1] = (l * O - u * N - c * L) * D, r[2] = (y * H - T * I + b * w) * D, r[3] = (g * I - A * H - E * w) * D, r[4] = (h * F - f * N - p * P) * D, r[5] = (s * N - l * F + c * P) * D, r[6] = (T * C - v * H - b * R) * D, r[7] = (m * H - g * C + E * R) * D, r[8] = (f * O - d * F + p * M) * D, r[9] = (u * F - s * O - c * M) * D, r[10] = (v * I - y * C + b * S) * D, r[11] = (A * C - m * I - E * S) * D, r[12] = (d * P - f * L - h * M) * D, r[13] = (s * L - u * P + l * M) * D, r[14] = (y * R - v * w - T * S) * D, r[15] = (m * w - A * R + g * S) * D, r) : null;
|
|
23961
24065
|
}
|
|
23962
24066
|
return function(r, o, s) {
|
|
23963
24067
|
n(r, o), s && t(r, r, s), e(r, r);
|
|
@@ -24765,7 +24869,7 @@ void main() {
|
|
|
24765
24869
|
var o = this, s, u, l, c, f, d;
|
|
24766
24870
|
if (!this.destroyed) {
|
|
24767
24871
|
this.updateHelperElementSize(), this.userAction = !0, this.needsRender = !0, this.modelSceneNeedsRender = !0;
|
|
24768
|
-
var h = {}, p = {}, m = this.locationMotion.keyframes[0], A = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], g = this.locationMotion.getKeyFrameSegment(e), E = g[0], v = g[1], y = this.panoResourceFromLocationMotionKeyframe(E),
|
|
24872
|
+
var h = {}, p = {}, m = this.locationMotion.keyframes[0], A = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], g = this.locationMotion.getKeyFrameSegment(e), E = g[0], v = g[1], y = this.panoResourceFromLocationMotionKeyframe(E), T = this.panoResourceFromLocationMotionKeyframe(v), b = this.panoResourceFromLocationMotionKeyframe(m), S = this.panoResourceFromLocationMotionKeyframe(A), R = !1;
|
|
24769
24873
|
if (this.modelAlphaMotion.ended === !1 && (this.modelAlphaMotion.update(e), h.modelAlpha = this.modelAlphaMotion.value.modelAlpha), this.perspToOrthoMotion.ended === !1 && (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), this.locationMotion.ended === !1) {
|
|
24770
24874
|
this.locationMotion.update(e);
|
|
24771
24875
|
var C = this.locationMotion.getKeyFrameSegment(e), w = C[0], I = C[1], H = this.panoResourceFromLocationMotionKeyframe(w), M = this.panoResourceFromLocationMotionKeyframe(I), P = H.position, F = M.position, L = this.locationMotion.value.count - I.value.count + 1;
|
|
@@ -24804,7 +24908,7 @@ void main() {
|
|
|
24804
24908
|
}
|
|
24805
24909
|
this.currentPano = panoParse(M.panoId), this.emit("pano.moving", createEvent("pano.moving", {
|
|
24806
24910
|
userAction: this.userAction,
|
|
24807
|
-
prevPano: panoParse(
|
|
24911
|
+
prevPano: panoParse(b.panoId),
|
|
24808
24912
|
state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
|
|
24809
24913
|
options: {},
|
|
24810
24914
|
progress: this.locationMotion.progress,
|
|
@@ -24817,7 +24921,7 @@ void main() {
|
|
|
24817
24921
|
userAction: !0,
|
|
24818
24922
|
state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
|
|
24819
24923
|
}))), this.works.getObserver(this.currentPano);
|
|
24820
|
-
var te = this.works.getObserver(y.panoId), re = this.works.getObserver(
|
|
24924
|
+
var te = this.works.getObserver(y.panoId), re = this.works.getObserver(T.panoId), ae = /* @__PURE__ */ new Map();
|
|
24821
24925
|
if (te)
|
|
24822
24926
|
for (var pe = 0, le = te.accessibleNodes; pe < le.length; pe++) {
|
|
24823
24927
|
var ve = le[pe], N = te.work.observers[ve];
|
|
@@ -24909,7 +25013,7 @@ void main() {
|
|
|
24909
25013
|
}
|
|
24910
25014
|
this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
|
|
24911
25015
|
{
|
|
24912
|
-
var Ie =
|
|
25016
|
+
var Ie = T.effect, $e = this.modelScene.parameter, ne = $e.pano0, oe = $e.pano1;
|
|
24913
25017
|
if (ne && oe && ne !== oe && Ie === "fly" && this.flyEffectUseDepthBuffer) {
|
|
24914
25018
|
if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== ne.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== oe.panoId) {
|
|
24915
25019
|
var tt = 500, ke = 512;
|
|
@@ -24982,16 +25086,16 @@ void main() {
|
|
|
24982
25086
|
}
|
|
24983
25087
|
}
|
|
24984
25088
|
}
|
|
24985
|
-
var
|
|
25089
|
+
var T = d.sort(function(w, I) {
|
|
24986
25090
|
return w.intersection.distance - I.intersection.distance;
|
|
24987
25091
|
})[0];
|
|
24988
|
-
|
|
24989
|
-
var
|
|
25092
|
+
T ? (f = T.intersection, this.activePanoMesh !== T.panoMesh && (this.activePanoMesh = T.panoMesh, this.activeTime = e), this.intersectMesh.position.copy(T.panoMesh.position), this.intersectMesh.lookAt(this.camera.position)) : (this.activePanoMesh = void 0, this.activeTime = void 0), f || (f = this.modelScene.intersectRaycaster(c)[0]);
|
|
25093
|
+
var b = createEvent("intersect.update", {
|
|
24990
25094
|
raycaster: c,
|
|
24991
25095
|
intersection: f != null ? f : null,
|
|
24992
25096
|
object: this.intersectMesh
|
|
24993
25097
|
});
|
|
24994
|
-
if (this.emit("intersect.update",
|
|
25098
|
+
if (this.emit("intersect.update", b), b.defaultPrevented) {
|
|
24995
25099
|
this.hideIntersectMesh();
|
|
24996
25100
|
return;
|
|
24997
25101
|
}
|
|
@@ -24999,10 +25103,10 @@ void main() {
|
|
|
24999
25103
|
var S = f.face.normal, R = new THREE.Quaternion();
|
|
25000
25104
|
R.setFromUnitVectors(new THREE.Vector3(0, 0, 1), S), this.intersectMesh.quaternion.copy(R);
|
|
25001
25105
|
var C = f.point.clone();
|
|
25002
|
-
this.intersectMesh.position.copy(C),
|
|
25106
|
+
this.intersectMesh.position.copy(C), T ? this.intersectMesh.visible = !1 : this.intersectMesh.visible = !0;
|
|
25003
25107
|
} else
|
|
25004
25108
|
this.intersectMesh.visible = !1;
|
|
25005
|
-
return
|
|
25109
|
+
return T == null ? void 0 : T.panoMesh;
|
|
25006
25110
|
}, t.prototype.onPanGesture = function() {
|
|
25007
25111
|
}, t.prototype.onTapGesture = function() {
|
|
25008
25112
|
}, t.prototype.onPinchGesture = function() {
|
|
@@ -25036,7 +25140,7 @@ void main() {
|
|
|
25036
25140
|
} : {
|
|
25037
25141
|
workCode: m.workCode,
|
|
25038
25142
|
panoIndex: m.panoIndex
|
|
25039
|
-
}, g = d.getObserver(A), E = clamp$1((u = p.fov) !== null && u !== void 0 ? u : !g || isFristPersonMode(m.mode) ? m.fov : f.defaultFov, f.minFov, f.maxFov), v = (l = p.longitude) !== null && l !== void 0 ? l : m.longitude, y = clamp$1(typeof f.minLatitude == "function" ? f.minLatitude(E) : f.minLatitude, -Math.PI / 2, Math.PI / 2),
|
|
25143
|
+
}, g = d.getObserver(A), E = clamp$1((u = p.fov) !== null && u !== void 0 ? u : !g || isFristPersonMode(m.mode) ? m.fov : f.defaultFov, f.minFov, f.maxFov), v = (l = p.longitude) !== null && l !== void 0 ? l : m.longitude, y = clamp$1(typeof f.minLatitude == "function" ? f.minLatitude(E) : f.minLatitude, -Math.PI / 2, Math.PI / 2), T = clamp$1(typeof f.maxLatitude == "function" ? f.maxLatitude(E) : f.maxLatitude, -Math.PI / 2, Math.PI / 2), b = clamp$1((c = p.latitude) !== null && c !== void 0 ? c : !g || isFristPersonMode(m.mode) ? m.latitude : f.defaultLatitude, y, T), S = new THREE.Vector3();
|
|
25040
25144
|
if (f.initial.state.offset)
|
|
25041
25145
|
S.copy(f.initial.state.offset);
|
|
25042
25146
|
else if (g)
|
|
@@ -25050,7 +25154,7 @@ void main() {
|
|
|
25050
25154
|
panoIndex: A.panoIndex,
|
|
25051
25155
|
mode: "Model",
|
|
25052
25156
|
longitude: v,
|
|
25053
|
-
latitude:
|
|
25157
|
+
latitude: b,
|
|
25054
25158
|
fov: E,
|
|
25055
25159
|
offset: S,
|
|
25056
25160
|
distance: 0
|
|
@@ -25116,14 +25220,14 @@ void main() {
|
|
|
25116
25220
|
if (this.modelAlphaMotion.ended || (this.modelAlphaMotion.update(e), o.modelAlpha = this.modelAlphaMotion.value.modelAlpha), this.perspToOrthoMotion.ended || (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), !this.locationMotion.ended) {
|
|
25117
25221
|
this.locationMotion.update(e), s.distance = this.locationMotion.value.distance, s.offset = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z);
|
|
25118
25222
|
for (var u = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z), l = [], c = function(y) {
|
|
25119
|
-
var
|
|
25223
|
+
var T = f.modelScene.models.find(function(C) {
|
|
25120
25224
|
return C.work === y;
|
|
25121
25225
|
});
|
|
25122
|
-
if (!
|
|
25226
|
+
if (!T || T.visible === !1 || y.observers.length <= 0)
|
|
25123
25227
|
return "continue";
|
|
25124
25228
|
if (scratchObserverBox$1.copy(y.observerBox).expandByScalar(10).applyMatrix4(y.transform), scratchObserverBox$1.containsPoint(u))
|
|
25125
|
-
for (var
|
|
25126
|
-
var R = S[
|
|
25229
|
+
for (var b = 0, S = y.observers; b < S.length; b++) {
|
|
25230
|
+
var R = S[b];
|
|
25127
25231
|
l.push(R);
|
|
25128
25232
|
}
|
|
25129
25233
|
}, f = this, d = 0, h = this.works; d < h.length; d++) {
|
|
@@ -25201,8 +25305,8 @@ void main() {
|
|
|
25201
25305
|
var s = this, u, l, c;
|
|
25202
25306
|
r === void 0 && (r = {}), this.userAction = o, this.stopMomentumMovement();
|
|
25203
25307
|
for (var f = now(), d = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z), h = d.distanceTo(e), p = this.locationMotion.getProgressVelocity(f), m = 0, A = 1; A < this.locationMotion.keyframes.length; A++) {
|
|
25204
|
-
var g = this.locationMotion.keyframes[A - 1].value, E = g.x, v = g.y, y = g.z,
|
|
25205
|
-
m += Math.sqrt(Math.pow(
|
|
25308
|
+
var g = this.locationMotion.keyframes[A - 1].value, E = g.x, v = g.y, y = g.z, T = this.locationMotion.keyframes[A].value, b = T.x, S = T.y, R = T.z;
|
|
25309
|
+
m += Math.sqrt(Math.pow(b - E, 2) + Math.pow(S - v, 2) + Math.pow(R - y, 2));
|
|
25206
25310
|
}
|
|
25207
25311
|
for (var C = h === 0 ? 0 : p * m / h, w = this.calculateMovingDuration(r.duration, h), I = {
|
|
25208
25312
|
x: e.x,
|
|
@@ -25282,34 +25386,36 @@ void main() {
|
|
|
25282
25386
|
if (o && o.face) {
|
|
25283
25387
|
var s = o.face.normal, u = o.point;
|
|
25284
25388
|
if (new THREE.Vector3(0, 1, 0).angleTo(s) > Math.PI / 3) {
|
|
25285
|
-
var l =
|
|
25286
|
-
|
|
25389
|
+
var l = new THREE.Raycaster();
|
|
25390
|
+
l.firstHitOnly = !0;
|
|
25391
|
+
var c = s.clone().setLength(0.3).add(u);
|
|
25392
|
+
l.set(c, new THREE.Vector3(0, -1, 0)), o = this.modelScene.intersectRaycaster(l)[0];
|
|
25287
25393
|
}
|
|
25288
25394
|
}
|
|
25289
25395
|
if (o) {
|
|
25290
|
-
for (var
|
|
25291
|
-
var
|
|
25292
|
-
return
|
|
25396
|
+
for (var f = new THREE.Vector3().copy(o.point).add(HUMAN_EYE_POSITION), d = [], h = function(b) {
|
|
25397
|
+
var S = p.modelScene.models.find(function(I) {
|
|
25398
|
+
return I.work === b;
|
|
25293
25399
|
});
|
|
25294
|
-
if (!
|
|
25400
|
+
if (!S || S.visible === !1 || b.observers.length <= 0)
|
|
25295
25401
|
return "continue";
|
|
25296
|
-
if (scratchObserverBox$1.copy(b.observerBox).expandByScalar(10).applyMatrix4(b.transform), scratchObserverBox$1.containsPoint(
|
|
25297
|
-
for (var
|
|
25298
|
-
var
|
|
25299
|
-
|
|
25402
|
+
if (scratchObserverBox$1.copy(b.observerBox).expandByScalar(10).applyMatrix4(b.transform), scratchObserverBox$1.containsPoint(f))
|
|
25403
|
+
for (var R = 0, C = b.observers; R < C.length; R++) {
|
|
25404
|
+
var w = C[R];
|
|
25405
|
+
d.push(w);
|
|
25300
25406
|
}
|
|
25301
|
-
},
|
|
25302
|
-
var
|
|
25303
|
-
|
|
25304
|
-
}
|
|
25305
|
-
var
|
|
25306
|
-
return scratchVector3$2.copy(b.position).applyMatrix4(b.work.transform).distanceTo(
|
|
25307
|
-
}, !0),
|
|
25308
|
-
if (
|
|
25309
|
-
var
|
|
25310
|
-
|
|
25311
|
-
}
|
|
25312
|
-
e.state.offset.copy(
|
|
25407
|
+
}, p = this, m = 0, A = this.works; m < A.length; m++) {
|
|
25408
|
+
var g = A[m];
|
|
25409
|
+
h(g);
|
|
25410
|
+
}
|
|
25411
|
+
var E = arrayMin(d, function(b) {
|
|
25412
|
+
return scratchVector3$2.copy(b.position).applyMatrix4(b.work.transform).distanceTo(f);
|
|
25413
|
+
}, !0), v = E[0], y = E[1];
|
|
25414
|
+
if (v && y < 5) {
|
|
25415
|
+
var T = scratchVector3$2.copy(v.position).applyMatrix4(v.work.transform);
|
|
25416
|
+
f.y = T.y;
|
|
25417
|
+
}
|
|
25418
|
+
e.state.offset.copy(f), e.state.distance = 0, this.emit("gesture.tap", e), e.defaultPrevented || this.moveToPosition(f, {}, !0);
|
|
25313
25419
|
} else
|
|
25314
25420
|
this.emit("gesture.tap", e), e.defaultPrevented || this.cameraBounce();
|
|
25315
25421
|
}, t;
|
|
@@ -25367,14 +25473,14 @@ void main() {
|
|
|
25367
25473
|
} : {
|
|
25368
25474
|
workCode: g.workCode,
|
|
25369
25475
|
panoIndex: g.panoIndex
|
|
25370
|
-
}, v = (u = A.fov) !== null && u !== void 0 ? u : 60, y = clamp$1(typeof d.minLatitude == "function" ? d.minLatitude(v) : d.minLatitude, -Math.PI / 2, Math.PI / 2),
|
|
25476
|
+
}, v = (u = A.fov) !== null && u !== void 0 ? u : 60, y = clamp$1(typeof d.minLatitude == "function" ? d.minLatitude(v) : d.minLatitude, -Math.PI / 2, Math.PI / 2), T = clamp$1(typeof d.maxLatitude == "function" ? d.maxLatitude(v) : d.maxLatitude, -Math.PI / 2, Math.PI / 2), b = clamp$1((l = A.latitude) !== null && l !== void 0 ? l : isThirdPersonMode(g.mode) ? g.latitude : d.defaultLatitude, y, T), S = t.distanceFromModel(d.modelScene, v, d.camera.aspect), R = new THREE.Vector3(), C = (c = A.distance) !== null && c !== void 0 ? c : Math.min(d.defaultDistance, S), w = (f = A.longitude) !== null && f !== void 0 ? f : isThirdPersonMode(g.mode) ? g.longitude : d.defaultLongitude;
|
|
25371
25477
|
if (A.offset)
|
|
25372
25478
|
R.copy(A.offset);
|
|
25373
25479
|
else {
|
|
25374
25480
|
var I = h.getObserver(E);
|
|
25375
25481
|
d.defaultDistance < S && I ? (R.copy(I.position).applyMatrix4(I.work.transform), A.longitude === void 0 && (w = g.longitude)) : (p.boundingBox.getCenter(R), C = S);
|
|
25376
25482
|
}
|
|
25377
|
-
return __assign(__assign({}, E), { mode: "Mapview", longitude: w, latitude:
|
|
25483
|
+
return __assign(__assign({}, E), { mode: "Mapview", longitude: w, latitude: b, fov: v, offset: R, distance: C });
|
|
25378
25484
|
}, t.prototype.updateConfiguration = function(e) {
|
|
25379
25485
|
var r = n.prototype.updateConfiguration.call(this, e);
|
|
25380
25486
|
if (r === !1)
|
|
@@ -25554,10 +25660,10 @@ void main() {
|
|
|
25554
25660
|
s = Math.max(s, 1);
|
|
25555
25661
|
for (var l = __assign({}, o), c = { longitude: 0, latitude: 0, x: 0, y: 0, z: 0 }, f = 0; f < s; f++)
|
|
25556
25662
|
l.longitude *= 0.996, l.latitude *= 0.996 * 0.998, l.x *= 0.99, l.y *= 0.99, l.z *= 0.99, c.longitude += l.longitude, c.latitude += l.latitude, c.x += l.x, c.y += l.y, c.z += l.z;
|
|
25557
|
-
var d = this.cameraMotion.value.fov, h = formatRad$1(this.cameraMotion.value.longitude + c.longitude), p = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(d) : this.minLatitude, -Math.PI / 2, Math.PI / 2), m = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(d) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), A = clamp$1(this.cameraMotion.value.latitude + c.latitude, p, m), g = new THREE.Vector3(this.locationMotion.value.x + c.x, this.locationMotion.value.y + c.y, this.locationMotion.value.z + c.z), E = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: h, latitude: A, offset: g, fov: d, distance: this.locationMotion.value.distance }), v = e.state.offset.clone().sub(coordinatesToVector(e.state).setLength(E.distance)), y = !(Math.abs(l.longitude) > 1e-4 || Math.abs(l.latitude) > 1e-4 || Math.abs(l.x) > 1e-4 || Math.abs(l.y) > 1e-4 || Math.abs(l.z) > 1e-4),
|
|
25558
|
-
|
|
25559
|
-
var
|
|
25560
|
-
if (this.inMomentumMovement.event =
|
|
25663
|
+
var d = this.cameraMotion.value.fov, h = formatRad$1(this.cameraMotion.value.longitude + c.longitude), p = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(d) : this.minLatitude, -Math.PI / 2, Math.PI / 2), m = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(d) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), A = clamp$1(this.cameraMotion.value.latitude + c.latitude, p, m), g = new THREE.Vector3(this.locationMotion.value.x + c.x, this.locationMotion.value.y + c.y, this.locationMotion.value.z + c.z), E = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: h, latitude: A, offset: g, fov: d, distance: this.locationMotion.value.distance }), v = e.state.offset.clone().sub(coordinatesToVector(e.state).setLength(E.distance)), y = !(Math.abs(l.longitude) > 1e-4 || Math.abs(l.latitude) > 1e-4 || Math.abs(l.x) > 1e-4 || Math.abs(l.y) > 1e-4 || Math.abs(l.z) > 1e-4), T = this.cameraFence ? this.cameraFence.containsPoint(v) : !0;
|
|
25664
|
+
T === !1 && (y = !0);
|
|
25665
|
+
var b = createEvent("gesture.momentum", __assign(__assign({}, e), { isFirst: r, isFinal: y, state: E }));
|
|
25666
|
+
if (this.inMomentumMovement.event = b, this.emit("gesture.momentum", b), e.defaultPrevented) {
|
|
25561
25667
|
this.inMomentumMovement = null;
|
|
25562
25668
|
return;
|
|
25563
25669
|
}
|
|
@@ -25641,9 +25747,9 @@ void main() {
|
|
|
25641
25747
|
var E = {
|
|
25642
25748
|
x: e.center.x - o.x,
|
|
25643
25749
|
y: e.center.y - o.y
|
|
25644
|
-
}, v = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z), y = coordinatesToVector(this.cameraMotion.value).setLength(this.locationMotion.value.distance).add(v),
|
|
25645
|
-
|
|
25646
|
-
var
|
|
25750
|
+
}, v = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z), y = coordinatesToVector(this.cameraMotion.value).setLength(this.locationMotion.value.distance).add(v), T = new THREE.Vector3().copy(y).sub(o.target).length();
|
|
25751
|
+
T *= Math.tan(this.camera.pose.fov / 2 * Math.PI / 180);
|
|
25752
|
+
var b = this.renderer.getSize(new THREE.Vector2()), S = 2 * E.x * T / b.y, R = 2 * E.y * T / b.y, C = new THREE.Vector3();
|
|
25647
25753
|
C.setFromMatrixColumn(this.camera.matrix, 0), C.multiplyScalar(-S), v.add(C), this.camera.pose.latitude < PANGESTURE_FORWARD_ANGLE ? C.setFromMatrixColumn(this.camera.matrix, 1) : (C.setFromMatrixColumn(this.camera.matrix, 0), C.crossVectors(this.camera.up, C)), C.multiplyScalar(R), v.add(C);
|
|
25648
25754
|
var w = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: this.camera.pose.longitude, latitude: this.camera.pose.latitude, fov: this.camera.pose.fov, offset: v, distance: this.camera.pose.distance });
|
|
25649
25755
|
if (e.state = w, this.emit("gesture.pan", e), e.defaultPrevented)
|
|
@@ -25658,7 +25764,7 @@ void main() {
|
|
|
25658
25764
|
y: w.offset.y,
|
|
25659
25765
|
z: w.offset.z
|
|
25660
25766
|
}, 0).catch(noop)), e.isFinal) {
|
|
25661
|
-
var I = this.renderer.getSize(new THREE.Vector2()), H = 2 * e.velocityX *
|
|
25767
|
+
var I = this.renderer.getSize(new THREE.Vector2()), H = 2 * e.velocityX * T / I.y, M = 2 * e.velocityY * T / I.y, P = new THREE.Vector3(), F = new THREE.Vector3();
|
|
25662
25768
|
P.setFromMatrixColumn(this.camera.matrix, 0), P.multiplyScalar(-H), F.add(P), this.camera.pose.latitude < PANGESTURE_FORWARD_ANGLE ? P.setFromMatrixColumn(this.camera.matrix, 1) : (P.setFromMatrixColumn(this.camera.matrix, 0), P.crossVectors(this.camera.up, P)), P.multiplyScalar(M), F.add(P), this.inMomentumMovement = {
|
|
25663
25769
|
uuid: createUuid()
|
|
25664
25770
|
}, this.requestMomentumMovement(e, !0, { longitude: 0, latitude: 0, x: F.x, y: F.y, z: F.z }, 0);
|
|
@@ -25870,12 +25976,12 @@ var _moveEvent = { type: "move" }, XRController = (
|
|
|
25870
25976
|
var g = f.joints[p.jointName];
|
|
25871
25977
|
m !== null && (g.matrix.fromArray(m.transform.matrix), g.matrix.decompose(g.position, g.rotation, g.scale), g.jointRadius = m.radius), g.visible = m !== null;
|
|
25872
25978
|
}
|
|
25873
|
-
var E = f.joints["index-finger-tip"], v = f.joints["thumb-tip"], y = E.position.distanceTo(v.position),
|
|
25874
|
-
f.inputState.pinching && y >
|
|
25979
|
+
var E = f.joints["index-finger-tip"], v = f.joints["thumb-tip"], y = E.position.distanceTo(v.position), T = 0.02, b = 5e-3;
|
|
25980
|
+
f.inputState.pinching && y > T + b ? (f.inputState.pinching = !1, this.dispatchEvent({
|
|
25875
25981
|
type: "pinchend",
|
|
25876
25982
|
handedness: t.handedness,
|
|
25877
25983
|
target: this
|
|
25878
|
-
})) : !f.inputState.pinching && y <=
|
|
25984
|
+
})) : !f.inputState.pinching && y <= T - b && (f.inputState.pinching = !0, this.dispatchEvent({
|
|
25879
25985
|
type: "pinchstart",
|
|
25880
25986
|
handedness: t.handedness,
|
|
25881
25987
|
target: this
|
|
@@ -25935,8 +26041,8 @@ var _moveEvent = { type: "move" }, XRController = (
|
|
|
25935
26041
|
this.cameraLPos.setFromMatrixPosition(e.matrixWorld), this.cameraRPos.setFromMatrixPosition(r.matrixWorld);
|
|
25936
26042
|
var o = this.cameraLPos.distanceTo(this.cameraRPos), s = e.projectionMatrix.elements, u = r.projectionMatrix.elements, l = s[14] / (s[10] - 1), c = s[14] / (s[10] + 1), f = (s[9] + 1) / s[5], d = (s[9] - 1) / s[5], h = (s[8] - 1) / s[0], p = (u[8] + 1) / u[0], m = l * h, A = l * p, g = o / (-h + p), E = g * -h;
|
|
25937
26043
|
e.matrixWorld.decompose(t.position, t.quaternion, t.scale), t.translateX(E), t.translateZ(g), t.matrixWorld.compose(t.position, t.quaternion, t.scale), t.matrixWorldInverse.getInverse(t.matrixWorld);
|
|
25938
|
-
var v = l + g, y = c + g,
|
|
25939
|
-
t.projectionMatrix.makePerspective(
|
|
26044
|
+
var v = l + g, y = c + g, T = m - E, b = A + (o - E), S = f * c / y * v, R = d * c / y * v;
|
|
26045
|
+
t.projectionMatrix.makePerspective(T, b, S, R, v, y);
|
|
25940
26046
|
}, n.prototype.getCamera = function(t) {
|
|
25941
26047
|
this.cameraVR.near = this.cameraR.near = this.cameraL.near = t.near, this.cameraVR.far = this.cameraR.far = this.cameraL.far = t.far, this.session && (this.currentDepthNear !== this.cameraVR.near || this.currentDepthFar !== this.cameraVR.far) && (this.session.updateRenderState({
|
|
25942
26048
|
depthNear: this.cameraVR.near,
|
|
@@ -26396,20 +26502,20 @@ var LineSegments2 = (
|
|
|
26396
26502
|
return e.setAttribute("instanceDistanceStart", new THREE.InterleavedBufferAttribute(h, 1, 0)), e.setAttribute("instanceDistanceEnd", new THREE.InterleavedBufferAttribute(h, 1, 1)), this;
|
|
26397
26503
|
}, t.prototype.raycast = function(e, r) {
|
|
26398
26504
|
e.camera === null && console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');
|
|
26399
|
-
var o = e.ray, s = e.camera, u = s.projectionMatrix, l = this.geometry, c = this.material, f = c.resolution, d = c.linewidth, h = l.attributes.instanceStart, p = l.attributes.instanceEnd, m = new THREE.Vector4(), A = new THREE.Vector4(), g = new THREE.Vector4(), E = new THREE.Vector3(), v = new THREE.Matrix4(), y = new THREE.Line3(),
|
|
26505
|
+
var o = e.ray, s = e.camera, u = s.projectionMatrix, l = this.geometry, c = this.material, f = c.resolution, d = c.linewidth, h = l.attributes.instanceStart, p = l.attributes.instanceEnd, m = new THREE.Vector4(), A = new THREE.Vector4(), g = new THREE.Vector4(), E = new THREE.Vector3(), v = new THREE.Matrix4(), y = new THREE.Line3(), T = new THREE.Vector3();
|
|
26400
26506
|
o.at(1, g), g.w = 1, g.applyMatrix4(s.matrixWorldInverse), g.applyMatrix4(u), g.multiplyScalar(1 / g.w), g.x *= f.x / 2, g.y *= f.y / 2, g.z = 0, E.copy(g);
|
|
26401
|
-
var
|
|
26402
|
-
v.multiplyMatrices(s.matrixWorldInverse,
|
|
26507
|
+
var b = this.matrixWorld;
|
|
26508
|
+
v.multiplyMatrices(s.matrixWorldInverse, b);
|
|
26403
26509
|
for (var S = 0, R = h.count; S < R; S++) {
|
|
26404
26510
|
m.fromBufferAttribute(h, S), A.fromBufferAttribute(p, S), m.w = 1, A.w = 1, m.applyMatrix4(v), A.applyMatrix4(v), m.applyMatrix4(u), A.applyMatrix4(u), m.multiplyScalar(1 / m.w), A.multiplyScalar(1 / A.w);
|
|
26405
26511
|
var C = m.z < -1 && A.z < -1, w = m.z > 1 && A.z > 1;
|
|
26406
26512
|
if (!(C || w)) {
|
|
26407
26513
|
m.x *= f.x / 2, m.y *= f.y / 2, A.x *= f.x / 2, A.y *= f.y / 2, y.start.copy(m), y.start.z = 0, y.end.copy(A), y.end.z = 0;
|
|
26408
26514
|
var I = y.closestPointToPointParameter(E, !0);
|
|
26409
|
-
y.at(I,
|
|
26410
|
-
var H = THREE.MathUtils.lerp(m.z, A.z, I), M = H >= -1 && H <= 1, P = E.distanceTo(
|
|
26515
|
+
y.at(I, T);
|
|
26516
|
+
var H = THREE.MathUtils.lerp(m.z, A.z, I), M = H >= -1 && H <= 1, P = E.distanceTo(T) < d * 0.5;
|
|
26411
26517
|
if (M && P) {
|
|
26412
|
-
y.start.fromBufferAttribute(h, S), y.end.fromBufferAttribute(p, S), y.start.applyMatrix4(
|
|
26518
|
+
y.start.fromBufferAttribute(h, S), y.end.fromBufferAttribute(p, S), y.start.applyMatrix4(b), y.end.applyMatrix4(b);
|
|
26413
26519
|
var F = new THREE.Vector3(), L = new THREE.Vector3();
|
|
26414
26520
|
o.distanceSqToSegment(y.start, y.end, L, F), r.push({
|
|
26415
26521
|
point: L,
|
|
@@ -26492,7 +26598,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
|
|
|
26492
26598
|
}
|
|
26493
26599
|
return Object.defineProperty(t, "version", {
|
|
26494
26600
|
get: function() {
|
|
26495
|
-
return "6.6.0-alpha.
|
|
26601
|
+
return "6.6.0-alpha.18";
|
|
26496
26602
|
},
|
|
26497
26603
|
enumerable: !1,
|
|
26498
26604
|
configurable: !0
|
|
@@ -26999,15 +27105,15 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26999
27105
|
pano: e
|
|
27000
27106
|
}));
|
|
27001
27107
|
}
|
|
27002
|
-
var v = this.modelScene.parameter.resolveValue(), y = v.pano0,
|
|
27003
|
-
if ((y == null ? void 0 : y.map.name) === g ?
|
|
27108
|
+
var v = this.modelScene.parameter.resolveValue(), y = v.pano0, T = v.pano1, b;
|
|
27109
|
+
if ((y == null ? void 0 : y.map.name) === g ? b = y : (T == null ? void 0 : T.map.name) === g && (b = T), b) {
|
|
27004
27110
|
var S = {
|
|
27005
27111
|
panoId: f,
|
|
27006
27112
|
effect: c,
|
|
27007
27113
|
leftPanoPicture: {
|
|
27008
|
-
panoId:
|
|
27009
|
-
map:
|
|
27010
|
-
mapSize:
|
|
27114
|
+
panoId: b.panoId,
|
|
27115
|
+
map: b.map,
|
|
27116
|
+
mapSize: b.mapSize,
|
|
27011
27117
|
matrix: d.matrix.clone().premultiply(d.work.transform),
|
|
27012
27118
|
zoom: 1
|
|
27013
27119
|
},
|
|
@@ -27106,26 +27212,26 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27106
27212
|
o === void 0 && (o = {});
|
|
27107
27213
|
var E = now(), v = createUuid();
|
|
27108
27214
|
this.panoResources[v] = r;
|
|
27109
|
-
var y = 1,
|
|
27215
|
+
var y = 1, T, b, S;
|
|
27110
27216
|
if (this.locationMotion.ended) {
|
|
27111
27217
|
var R = this.locationMotion.getKeyFrameSegment(E);
|
|
27112
27218
|
R[0];
|
|
27113
27219
|
var C = R[1], w = this.locationMotion.value, I = this.panoResourceFromLocationMotionKeyframe(C).position, H = r.position;
|
|
27114
|
-
|
|
27220
|
+
T = Math.max(I.distanceTo(H), y), b = [
|
|
27115
27221
|
{ key: C.key, progress: 0, value: __assign(__assign({}, w), { count: 0 }) },
|
|
27116
27222
|
{ key: v, progress: 1, value: { distance: 0, count: 1 } }
|
|
27117
27223
|
], S = 0;
|
|
27118
27224
|
} else {
|
|
27119
27225
|
var M = this.locationMotion.getKeyFrameSegment(E), P = M[0], C = M[1], w = this.locationMotion.value, F = this.panoResourceFromLocationMotionKeyframe(P).position, I = this.panoResourceFromLocationMotionKeyframe(C).position, H = r.position, L = C.value.count - w.count, O = Math.max(F.distanceTo(I), y) * L, N = Math.max(I.distanceTo(H), y);
|
|
27120
|
-
|
|
27226
|
+
T = O + N, b = [
|
|
27121
27227
|
{ key: P.key, progress: 0, value: __assign({}, w) },
|
|
27122
|
-
{ key: C.key, progress: O /
|
|
27228
|
+
{ key: C.key, progress: O / T, value: C.value },
|
|
27123
27229
|
{ key: v, progress: 1, value: { count: C.value.count + 1, distance: 0 } }
|
|
27124
27230
|
];
|
|
27125
|
-
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), V = this.locationMotionKeyframesLength(
|
|
27231
|
+
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), V = this.locationMotionKeyframesLength(b);
|
|
27126
27232
|
S = this.locationMotion.getProgressVelocity(E) * D / V;
|
|
27127
27233
|
}
|
|
27128
|
-
var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ?
|
|
27234
|
+
var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), K = {
|
|
27129
27235
|
longitude: o.longitude,
|
|
27130
27236
|
latitude: o.latitude,
|
|
27131
27237
|
fov: o.fov
|
|
@@ -27152,8 +27258,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27152
27258
|
W.lookAt(G);
|
|
27153
27259
|
var Y = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), X = new THREE.Matrix4().getInverse(Z).premultiply(Y), j = this.cameraMotion.value.fov, ee = (h = K.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
|
|
27154
27260
|
r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
|
|
27155
|
-
for (var re = ee * te, ae = 0; ae <
|
|
27156
|
-
var pe =
|
|
27261
|
+
for (var re = ee * te, ae = 0; ae < b.length - 1; ae++) {
|
|
27262
|
+
var pe = b[ae].key;
|
|
27157
27263
|
if (pe) {
|
|
27158
27264
|
var le = this.panoResources[pe];
|
|
27159
27265
|
le && (le.fixCameraTransform.copy(X), le.leftPanoPicture && (le.leftPanoPicture.zoom = Math.tan(re / 2 / 180 * Math.PI) / Math.tan(j / 2 / 180 * Math.PI)));
|
|
@@ -27186,7 +27292,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27186
27292
|
}
|
|
27187
27293
|
], z).catch(noop);
|
|
27188
27294
|
}
|
|
27189
|
-
var ve = this.locationMotion.setKeyframes(
|
|
27295
|
+
var ve = this.locationMotion.setKeyframes(b, z, S);
|
|
27190
27296
|
ve.then(
|
|
27191
27297
|
// resolve
|
|
27192
27298
|
// 动画结束
|
|
@@ -27285,10 +27391,10 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27285
27391
|
var y = panoStringify({
|
|
27286
27392
|
panoIndex: s.panoIndex,
|
|
27287
27393
|
workCode: s.work.workCode
|
|
27288
|
-
}),
|
|
27289
|
-
|
|
27394
|
+
}), T = this.panoMeshes.get(y);
|
|
27395
|
+
T && (T.setDisabled(!1), T.setLoading(!0));
|
|
27290
27396
|
}
|
|
27291
|
-
var
|
|
27397
|
+
var b = {
|
|
27292
27398
|
workCode: s.work.workCode,
|
|
27293
27399
|
panoIndex: s.panoIndex,
|
|
27294
27400
|
mode: this.mode,
|
|
@@ -27300,7 +27406,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27300
27406
|
};
|
|
27301
27407
|
return this.emit("pano.select", createEvent("pano.select", {
|
|
27302
27408
|
prevPano: this.currentPano,
|
|
27303
|
-
state:
|
|
27409
|
+
state: b,
|
|
27304
27410
|
userAction: !0,
|
|
27305
27411
|
options: {},
|
|
27306
27412
|
progress: 0,
|
|
@@ -27309,7 +27415,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27309
27415
|
userAction: !0,
|
|
27310
27416
|
prevPano: this.currentPano,
|
|
27311
27417
|
progress: 0,
|
|
27312
|
-
state:
|
|
27418
|
+
state: b,
|
|
27313
27419
|
options: {},
|
|
27314
27420
|
error: null
|
|
27315
27421
|
})), {
|
|
@@ -27328,7 +27434,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27328
27434
|
for (var o = this, s, u, l, c, f, d, h, p, m, A = [], g = 2; g < arguments.length; g++)
|
|
27329
27435
|
A[g - 2] = arguments[g];
|
|
27330
27436
|
this.userAction = !0;
|
|
27331
|
-
var E = {}, v = {}, y = this.locationMotion.keyframes[0],
|
|
27437
|
+
var E = {}, v = {}, y = this.locationMotion.keyframes[0], T = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], b = this.locationMotion.getKeyFrameSegment(e), S = b[0], R = b[1], C = this.panoResourceFromLocationMotionKeyframe(S), w = this.panoResourceFromLocationMotionKeyframe(R), I = this.panoResourceFromLocationMotionKeyframe(y), H = this.panoResourceFromLocationMotionKeyframe(T), M = !1;
|
|
27332
27438
|
if (this.cameraMotion.ended === !1 && (this.cameraMotion.update(e), v.fov = this.cameraMotion.value.fov), this.modelAlphaMotion.ended === !1 && (this.modelAlphaMotion.update(e), E.modelAlpha = this.modelAlphaMotion.value.modelAlpha), this.perspToOrthoMotion.ended === !1 && (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), this.locationMotion.ended === !1) {
|
|
27333
27439
|
this.locationMotion.update(e);
|
|
27334
27440
|
var P = this.locationMotion.getKeyFrameSegment(e);
|
|
@@ -28802,29 +28908,29 @@ void main() {
|
|
|
28802
28908
|
}), g.videoTexture = new THREE.VideoTexture(e.videoInstance || generateDefaultVideoElement());
|
|
28803
28909
|
var y = initLights();
|
|
28804
28910
|
g.scene.add(y);
|
|
28805
|
-
var
|
|
28806
|
-
defineProperty(
|
|
28911
|
+
var T = new THREE.Group();
|
|
28912
|
+
defineProperty(T, "children", {
|
|
28807
28913
|
get: function() {
|
|
28808
28914
|
return y.children;
|
|
28809
28915
|
},
|
|
28810
28916
|
set: function(F) {
|
|
28811
28917
|
y.children = F;
|
|
28812
28918
|
}
|
|
28813
|
-
}), defineProperty(
|
|
28919
|
+
}), defineProperty(T, "visible", {
|
|
28814
28920
|
get: function() {
|
|
28815
28921
|
return y.visible;
|
|
28816
28922
|
},
|
|
28817
28923
|
set: function(F) {
|
|
28818
28924
|
y.visible = F;
|
|
28819
28925
|
}
|
|
28820
|
-
}), defineProperty(
|
|
28926
|
+
}), defineProperty(T, "name", {
|
|
28821
28927
|
get: function() {
|
|
28822
28928
|
return y.name;
|
|
28823
28929
|
},
|
|
28824
28930
|
set: function(F) {
|
|
28825
28931
|
y.name = F;
|
|
28826
28932
|
}
|
|
28827
|
-
}), g.modelScene.add(
|
|
28933
|
+
}), g.modelScene.add(T), g.state = {
|
|
28828
28934
|
mode: g.currentMode,
|
|
28829
28935
|
workCode: g.pano.workCode,
|
|
28830
28936
|
panoIndex: g.pano.panoIndex,
|
|
@@ -28838,13 +28944,13 @@ void main() {
|
|
|
28838
28944
|
O[N - 2] = arguments[N];
|
|
28839
28945
|
g.updateTime.apply(g, __spreadArray([F, L], O, !1));
|
|
28840
28946
|
}, !1, 0, 10));
|
|
28841
|
-
var
|
|
28947
|
+
var b = function() {
|
|
28842
28948
|
typeof document != "undefined" && document.fullscreenElement === null && g.currentMode === "VRPanorama" && g.controller.emit("vr.requestExit", createEvent("vr.requestExit", {}));
|
|
28843
28949
|
}, S = function() {
|
|
28844
28950
|
g.needsRender = !0, g.modelSceneNeedsRender = !0;
|
|
28845
28951
|
};
|
|
28846
|
-
if (typeof document != "undefined" && document.addEventListener("fullscreenchange",
|
|
28847
|
-
typeof document != "undefined" && document.removeEventListener("fullscreenchange",
|
|
28952
|
+
if (typeof document != "undefined" && document.addEventListener("fullscreenchange", b, !1), g.renderer && g.renderer.domElement.addEventListener("webglcontextrestored", S, !1), g.removeEventListeners = function() {
|
|
28953
|
+
typeof document != "undefined" && document.removeEventListener("fullscreenchange", b, !1), g.renderer && g.renderer.domElement.removeEventListener("webglcontextrestored", S, !1);
|
|
28848
28954
|
}, g.plugins = {}, e.plugins && e.plugins.length)
|
|
28849
28955
|
for (var R = 0, C = e.plugins; R < C.length; R++) {
|
|
28850
28956
|
var w = C[R];
|
|
@@ -28862,7 +28968,7 @@ void main() {
|
|
|
28862
28968
|
}
|
|
28863
28969
|
return Object.defineProperty(t, "version", {
|
|
28864
28970
|
get: function() {
|
|
28865
|
-
return "6.6.0-alpha.
|
|
28971
|
+
return "6.6.0-alpha.18";
|
|
28866
28972
|
},
|
|
28867
28973
|
enumerable: !1,
|
|
28868
28974
|
configurable: !0
|
|
@@ -29085,8 +29191,8 @@ void main() {
|
|
|
29085
29191
|
typeof o == "number" ? v.duration = o : typeof o == "object" && Object.assign(v, o), this.works === emptyWorks && (v.duration === void 0 && (v.duration = 0), v.effect === void 0 && (v.effect = "instant"));
|
|
29086
29192
|
var y = [];
|
|
29087
29193
|
if (Array.isArray(e))
|
|
29088
|
-
for (var
|
|
29089
|
-
var S = T
|
|
29194
|
+
for (var T = 0, b = e; T < b.length; T++) {
|
|
29195
|
+
var S = b[T];
|
|
29090
29196
|
S instanceof Work ? y.push(S) : typeof S != "string" && "work" in S ? y.push(parseWork(S.work, S)) : y.push(parseWork(S));
|
|
29091
29197
|
}
|
|
29092
29198
|
else
|
|
@@ -29322,8 +29428,8 @@ void main() {
|
|
|
29322
29428
|
return;
|
|
29323
29429
|
}
|
|
29324
29430
|
(e === t.Mode.Floorplan || e === t.Mode.Topview || e === t.Mode.Mapview || e === t.Mode.Model) && (l.modelScene.loaded || (A = 0));
|
|
29325
|
-
var y = l.controller,
|
|
29326
|
-
if (l.controller && l.controller.stopMomentumMovement(), l.controller && u === !1 &&
|
|
29431
|
+
var y = l.controller, T = l.currentMode, b = function() {
|
|
29432
|
+
if (l.controller && l.controller.stopMomentumMovement(), l.controller && u === !1 && T === e)
|
|
29327
29433
|
e === t.Mode.Panorama || e === t.Mode.Model || e === t.Mode.VRPanorama || e === t.Mode.XRPanorama ? !panoEqual(l.pano, E) && "moveToPano" in l.controller && typeof l.controller.moveToPano == "function" ? l.controller.moveToPano(E, __assign({ duration: A }, r), s) : l.controller.updateCamera(r, A, s).catch(noop) : (panoEqual(l.pano, E) || (l.pano = E), l.controller.updateCamera(r, A, s).catch(noop));
|
|
29328
29434
|
else {
|
|
29329
29435
|
var R = __assign(__assign({}, r), E), C = __assign(__assign({ initial: {
|
|
@@ -29353,50 +29459,50 @@ void main() {
|
|
|
29353
29459
|
};
|
|
29354
29460
|
if (e === t.Mode.VRPanorama)
|
|
29355
29461
|
l.requestFullscreen(), requestDeviceOrientationPermission().then(function() {
|
|
29356
|
-
return
|
|
29462
|
+
return b();
|
|
29357
29463
|
}).catch(function(R) {
|
|
29358
29464
|
R instanceof Error && (l.exitFullscreen(), l.throwError(R), f(R));
|
|
29359
29465
|
});
|
|
29360
29466
|
else if (e === t.Mode.XRPanorama) {
|
|
29361
29467
|
var S = AnimationFrameLoop.shared.getContext();
|
|
29362
29468
|
S ? S.end() : requestXRSessionPermission().then(function(R) {
|
|
29363
|
-
AnimationFrameLoop.shared.setContext(R),
|
|
29469
|
+
AnimationFrameLoop.shared.setContext(R), b();
|
|
29364
29470
|
}).catch(function(R) {
|
|
29365
29471
|
R instanceof Error && (l.throwError(R), f(R));
|
|
29366
29472
|
});
|
|
29367
29473
|
} else
|
|
29368
|
-
|
|
29474
|
+
b();
|
|
29369
29475
|
});
|
|
29370
29476
|
}, t.prototype.getPixels = function(e, r, o, s, u, l, c) {
|
|
29371
29477
|
if (!this.renderer)
|
|
29372
29478
|
throw new Error("renderer is not initialized.");
|
|
29373
|
-
var f = this.renderer.getPixelRatio(), d = this.renderer.getRenderTarget(), h = this.renderer.getSize(new THREE.Vector2()), p = 0, m = 0, A = 1, g = 1, E, v, y,
|
|
29374
|
-
typeof e == "number" ? (p = e, typeof r == "number" && (m = r), typeof o == "number" && (A = o), typeof s == "number" && (g = s), E = u, v = l,
|
|
29479
|
+
var f = this.renderer.getPixelRatio(), d = this.renderer.getRenderTarget(), h = this.renderer.getSize(new THREE.Vector2()), p = 0, m = 0, A = 1, g = 1, E, v, y, T, b;
|
|
29480
|
+
typeof e == "number" ? (p = e, typeof r == "number" && (m = r), typeof o == "number" && (A = o), typeof s == "number" && (g = s), E = u, v = l, b = c) : (p = e.x, m = e.y, A = e.width, g = e.height, E = e.pixelRatio, v = e.flipY, y = e.helperVisible, T = e.skipPanorama, b = e.buffer), p = Math.ceil(p), m = Math.ceil(m), A = Math.ceil(A), g = Math.ceil(g), E = Math.ceil(E != null ? E : f), v = v != null ? v : !1;
|
|
29375
29481
|
var S = this.helperVisible, R = this.modelScene.parameter.modelAlpha;
|
|
29376
|
-
this.helperVisible = y != null ? y : this.helperVisible,
|
|
29482
|
+
this.helperVisible = y != null ? y : this.helperVisible, T && (this.controller instanceof Controllers.Panorama || this.controller instanceof Controllers.VRPanorama || this.controller instanceof Controllers.XRPanorama) && T === !0 && this.modelScene.parameter.set("modelAlpha", 1), this.modelScene.update(this.renderer, this.camera);
|
|
29377
29483
|
var C = this.getPixelsRenderTarget;
|
|
29378
29484
|
C.setSize(A * E, g * E), this.renderer.setRenderTarget(C), this.camera.pixelRatio = E, this.camera.resolution.set(A, g), this.camera.setViewOffset(h.width, h.height, p, h.height - m - g, A, g), this.scene.update(this.renderer, this.camera), this.render(), this.helperVisible = S, R === void 0 ? this.modelScene.parameter.reset("modelAlpha") : this.modelScene.parameter.set("modelAlpha", R), this.renderer.setRenderTarget(d), this.camera.clearViewOffset(), this.camera.pixelRatio = f, this.getSize(this.camera.resolution), this.camera.aspect = this.camera.resolution.width / this.camera.resolution.height, this.modelScene.update(this.renderer, this.camera), this.scene.update(this.renderer, this.camera);
|
|
29379
29485
|
var w = A * E, I = g * E, H = w * I, M = H * 4;
|
|
29380
|
-
if (
|
|
29381
|
-
if (
|
|
29486
|
+
if (b) {
|
|
29487
|
+
if (b.length !== M)
|
|
29382
29488
|
throw new Error("buffer length is not equals pixels ".concat(M));
|
|
29383
29489
|
} else
|
|
29384
|
-
|
|
29385
|
-
if (this.renderer.readRenderTargetPixels(C, 0, 0, A * E, g * E,
|
|
29490
|
+
b = new Uint8Array(M);
|
|
29491
|
+
if (this.renderer.readRenderTargetPixels(C, 0, 0, A * E, g * E, b), v)
|
|
29386
29492
|
for (var P = H / 2, F = 0, L = 0, O = 0, N = 0; L < P; L++)
|
|
29387
29493
|
for (N = (I - Math.floor(L / w) - 1) * w + L % w, O = 0; O < 4; O++)
|
|
29388
|
-
F =
|
|
29389
|
-
return
|
|
29494
|
+
F = b[L * 4 + O], b[L * 4 + O] = b[N * 4 + O], b[N * 4 + O] = F;
|
|
29495
|
+
return b;
|
|
29390
29496
|
}, t.prototype.getElement = function() {
|
|
29391
29497
|
var e;
|
|
29392
29498
|
return (e = this.renderer) === null || e === void 0 ? void 0 : e.domElement;
|
|
29393
29499
|
}, t.prototype.render = function(e) {
|
|
29394
29500
|
var r = this.renderer;
|
|
29395
29501
|
if (r) {
|
|
29396
|
-
var o = r.getRenderTarget(), s = r.autoClear, u = r.autoClearColor, l = r.autoClearDepth, c = r.autoClearStencil, f = scratchClearColor.copy(r.getClearColor()), d = r.getClearAlpha(), h = r.getViewport(scratchViewport), p = r.getScissor(scratchScissor), m = r.getScissorTest(), A = r.getSize(scratchRenderSize), g = r.getPixelRatio(), E = Math.floor(A.x * this.viewport.left), v = Math.floor(A.y * this.viewport.bottom), y = Math.floor(A.x * this.viewport.width),
|
|
29397
|
-
r.setClearColor(this.backgroundColor, this.backgroundAlpha), r.setViewport(E, v, y,
|
|
29398
|
-
var
|
|
29399
|
-
r.setScissorTest(
|
|
29502
|
+
var o = r.getRenderTarget(), s = r.autoClear, u = r.autoClearColor, l = r.autoClearDepth, c = r.autoClearStencil, f = scratchClearColor.copy(r.getClearColor()), d = r.getClearAlpha(), h = r.getViewport(scratchViewport), p = r.getScissor(scratchScissor), m = r.getScissorTest(), A = r.getSize(scratchRenderSize), g = r.getPixelRatio(), E = Math.floor(A.x * this.viewport.left), v = Math.floor(A.y * this.viewport.bottom), y = Math.floor(A.x * this.viewport.width), T = Math.floor(A.y * this.viewport.height);
|
|
29503
|
+
r.setClearColor(this.backgroundColor, this.backgroundAlpha), r.setViewport(E, v, y, T), r.setScissor(E, v, y, T);
|
|
29504
|
+
var b = this.viewport.bottom !== 0 || this.viewport.left !== 0 || this.viewport.width !== 1 || this.viewport.height !== 1;
|
|
29505
|
+
r.setScissorTest(b);
|
|
29400
29506
|
var S = this.scene.background;
|
|
29401
29507
|
this.modelScene.background = this.camera.isOrthographicCamera ? null : S, this.modelScene.environment = this.scene.environment, this.scene.background = null;
|
|
29402
29508
|
var R = this.getBuiltinRenderer(r);
|
|
@@ -29421,12 +29527,12 @@ void main() {
|
|
|
29421
29527
|
E instanceof Model && E.outdated && m.push(E);
|
|
29422
29528
|
}
|
|
29423
29529
|
for (var v = 0, y = m; v < y.length; v++) {
|
|
29424
|
-
var
|
|
29425
|
-
this.modelScene.remove(
|
|
29530
|
+
var T = y[v];
|
|
29531
|
+
this.modelScene.remove(T), T.dispose();
|
|
29426
29532
|
}
|
|
29427
29533
|
if (m.length > 0)
|
|
29428
|
-
for (var
|
|
29429
|
-
var E = S[
|
|
29534
|
+
for (var b = 0, S = this.modelScene.children; b < S.length; b++) {
|
|
29535
|
+
var E = S[b];
|
|
29430
29536
|
E instanceof Model && (E.visible = !0, this.modelSceneNeedsRender = !0);
|
|
29431
29537
|
}
|
|
29432
29538
|
}
|
|
@@ -29511,7 +29617,16 @@ void main() {
|
|
|
29511
29617
|
return __assign(__assign({}, this.camera.copyPose()), { mode: this.currentMode, workCode: this.pano.workCode, panoIndex: this.pano.panoIndex });
|
|
29512
29618
|
}, t.prototype.setState = function(e, r, o) {
|
|
29513
29619
|
var s, u, l, c, f, d, h, p, m, A;
|
|
29514
|
-
r === void 0 && (r = !1), o === void 0 && (o = !0), e =
|
|
29620
|
+
r === void 0 && (r = !1), o === void 0 && (o = !0), e = pick(e, [
|
|
29621
|
+
"mode",
|
|
29622
|
+
"workCode",
|
|
29623
|
+
"panoIndex",
|
|
29624
|
+
"longitude",
|
|
29625
|
+
"latitude",
|
|
29626
|
+
"fov",
|
|
29627
|
+
"offset",
|
|
29628
|
+
"distance"
|
|
29629
|
+
]), e.offset && !(e instanceof THREE.Vector3) && (e.offset = new THREE.Vector3(e.offset.x, e.offset.y, e.offset.z));
|
|
29515
29630
|
var g;
|
|
29516
29631
|
if (typeof e.panoIndex == "number")
|
|
29517
29632
|
if (e.workCode)
|
|
@@ -29528,7 +29643,7 @@ void main() {
|
|
|
29528
29643
|
panoIndex: e.panoIndex
|
|
29529
29644
|
};
|
|
29530
29645
|
}
|
|
29531
|
-
var y = (l = e.mode) !== null && l !== void 0 ? l : this.state.mode,
|
|
29646
|
+
var y = (l = e.mode) !== null && l !== void 0 ? l : this.state.mode, T, b, S, R, C;
|
|
29532
29647
|
if (this.controller && this.controller.stopMomentumMovement(), this.state.mode !== y) {
|
|
29533
29648
|
if (y === "VRPanorama") {
|
|
29534
29649
|
this.changeMode("VRPanorama", void 0, void 0, !0);
|
|
@@ -29546,15 +29661,15 @@ void main() {
|
|
|
29546
29661
|
effect: "fly",
|
|
29547
29662
|
userAction: !1
|
|
29548
29663
|
} }, this.commonParams()), this.controllerInits[y]), H = Controllers[y].initAnimationEndState(I);
|
|
29549
|
-
|
|
29664
|
+
T = H.longitude, b = H.latitude, S = H.fov, R = H.offset, C = H.distance;
|
|
29550
29665
|
} else
|
|
29551
|
-
|
|
29666
|
+
T = (c = e.longitude) !== null && c !== void 0 ? c : this.state.longitude, b = (f = e.latitude) !== null && f !== void 0 ? f : this.state.latitude, S = (d = e.fov) !== null && d !== void 0 ? d : this.state.fov, R = (h = e.offset) !== null && h !== void 0 ? h : this.state.offset, C = (p = e.distance) !== null && p !== void 0 ? p : this.state.distance;
|
|
29552
29667
|
var M = {
|
|
29553
29668
|
workCode: (g != null ? g : this.pano).workCode,
|
|
29554
29669
|
panoIndex: (g != null ? g : this.pano).panoIndex,
|
|
29555
29670
|
mode: y,
|
|
29556
|
-
longitude:
|
|
29557
|
-
latitude:
|
|
29671
|
+
longitude: T,
|
|
29672
|
+
latitude: b,
|
|
29558
29673
|
fov: S,
|
|
29559
29674
|
offset: R,
|
|
29560
29675
|
distance: C
|
|
@@ -29613,9 +29728,9 @@ void main() {
|
|
|
29613
29728
|
}
|
|
29614
29729
|
}
|
|
29615
29730
|
if (this.controller instanceof Controllers.Floorplan || this.controller instanceof Controllers.Topview || this.controller instanceof Controllers.Mapview) {
|
|
29616
|
-
var f = 1, d = 0.2, h = 0.2, p = Math.PI / 45, m = o ? this.state.fov : stepNumber(this.camera.pose.fov, this.state.fov, f), A = Math.abs(this.camera.pose.distance - this.state.distance), g = A > h * 15 ? A / 15 : d, E = o ? this.state.distance : stepNumber(this.camera.pose.distance, this.state.distance, g), v = this.camera.pose.offset.distanceTo(this.state.offset), y = v > h * 15 ? v / 15 : h,
|
|
29617
|
-
if (notSimilarValue(m, this.camera.pose.fov) || notSimilarVector3(
|
|
29618
|
-
var C = { x:
|
|
29731
|
+
var f = 1, d = 0.2, h = 0.2, p = Math.PI / 45, m = o ? this.state.fov : stepNumber(this.camera.pose.fov, this.state.fov, f), A = Math.abs(this.camera.pose.distance - this.state.distance), g = A > h * 15 ? A / 15 : d, E = o ? this.state.distance : stepNumber(this.camera.pose.distance, this.state.distance, g), v = this.camera.pose.offset.distanceTo(this.state.offset), y = v > h * 15 ? v / 15 : h, T = o ? new THREE.Vector3().copy(this.state.offset) : stepVector(this.camera.pose.offset, this.state.offset, y), b = o ? { longitude: this.state.longitude, latitude: this.state.latitude } : stepCoordinates({ longitude: this.camera.pose.longitude, latitude: this.camera.pose.latitude }, { longitude: this.state.longitude, latitude: this.state.latitude }, p), S = b.longitude, R = b.latitude;
|
|
29732
|
+
if (notSimilarValue(m, this.camera.pose.fov) || notSimilarVector3(T, this.camera.pose.offset) || notSimilarValue(E, this.camera.pose.distance) || notSimilarValue(S, this.camera.pose.longitude, Math.PI * 2) || notSimilarValue(R, this.camera.pose.latitude)) {
|
|
29733
|
+
var C = { x: T.x, y: T.y, z: T.z }, w = { fov: m };
|
|
29619
29734
|
return Object.assign(C, {
|
|
29620
29735
|
distance: E
|
|
29621
29736
|
}), Object.assign(w, {
|
|
@@ -29624,8 +29739,8 @@ void main() {
|
|
|
29624
29739
|
}), this.controller.stopMomentumMovement(), this.controller.cameraMotion.set(w, 0).catch(noop), this.controller.locationMotion.set(C, 0).catch(noop), !0;
|
|
29625
29740
|
}
|
|
29626
29741
|
} else {
|
|
29627
|
-
var I = 1, H = Math.PI / 45, m = o ? this.state.fov : stepNumber(this.camera.pose.fov, this.state.fov, I), M = o ? { longitude: this.state.longitude, latitude: this.state.latitude } : stepCoordinates({ longitude: this.camera.pose.longitude, latitude: this.camera.pose.latitude }, { longitude: this.state.longitude, latitude: this.state.latitude }, H), S = M.longitude, R = M.latitude, E = this.state.distance,
|
|
29628
|
-
if (notSimilarValue(E, this.camera.pose.distance) && (this.state.distance = this.camera.pose.distance), notSimilarVector3(
|
|
29742
|
+
var I = 1, H = Math.PI / 45, m = o ? this.state.fov : stepNumber(this.camera.pose.fov, this.state.fov, I), M = o ? { longitude: this.state.longitude, latitude: this.state.latitude } : stepCoordinates({ longitude: this.camera.pose.longitude, latitude: this.camera.pose.latitude }, { longitude: this.state.longitude, latitude: this.state.latitude }, H), S = M.longitude, R = M.latitude, E = this.state.distance, T = new THREE.Vector3().copy(this.state.offset);
|
|
29743
|
+
if (notSimilarValue(E, this.camera.pose.distance) && (this.state.distance = this.camera.pose.distance), notSimilarVector3(T, this.camera.pose.offset) && (this.state.offset = this.camera.pose.offset.clone()), notSimilarValue(S, this.camera.pose.longitude, Math.PI * 2) || notSimilarValue(R, this.camera.pose.latitude) || notSimilarValue(m, this.camera.pose.fov))
|
|
29629
29744
|
return this.controller.stopMomentumMovement(), this.controller.cameraMotion.set({ longitude: S, latitude: R, fov: m }, 0).catch(noop), !0;
|
|
29630
29745
|
}
|
|
29631
29746
|
if (this.stateSynced = !0, s === !1 && this.emit("state.synced", createEvent("state.synced", {
|
|
@@ -29666,8 +29781,8 @@ void main() {
|
|
|
29666
29781
|
var E = g[A];
|
|
29667
29782
|
E instanceof Model && (E.outdated = !0, h.set(E.work.workCode, E), p = !0);
|
|
29668
29783
|
}
|
|
29669
|
-
for (var v = function(
|
|
29670
|
-
var S = e[
|
|
29784
|
+
for (var v = function(b) {
|
|
29785
|
+
var S = e[b], R = S.workCode && h.get(S.workCode);
|
|
29671
29786
|
if (R)
|
|
29672
29787
|
R.work = S, R.outdated = !1, h.delete(S.workCode), m.push(R);
|
|
29673
29788
|
else {
|
|
@@ -29679,7 +29794,7 @@ void main() {
|
|
|
29679
29794
|
if (w)
|
|
29680
29795
|
if (typeof w == "function")
|
|
29681
29796
|
for (var L = 0, O = I.viewLayers; L < O.length; L++) {
|
|
29682
|
-
var N = O[L], D = w(N, I,
|
|
29797
|
+
var N = O[L], D = w(N, I, b);
|
|
29683
29798
|
D && (D.viewerRequestVolume && (N.viewerRequestVolume = makeBoundingVolume(D.viewerRequestVolume)), N.parameter.set(omit(D, ["showLayers"])), D.showLayers === !1 ? N.visible = !1 : Array.isArray(D.showLayers) && (N.visible = D.showLayers.includes(N.name)));
|
|
29684
29799
|
}
|
|
29685
29800
|
else
|
|
@@ -29702,8 +29817,8 @@ void main() {
|
|
|
29702
29817
|
};
|
|
29703
29818
|
I.addEventListener("load", H), I.addEventListener("error", M), I.addEventListener("changeShownFloor", P), I.addEventListener("dispose", F), y.emit("model.request", createEvent("model.request", { work: S, model: I, error: null }));
|
|
29704
29819
|
}
|
|
29705
|
-
}, y = this,
|
|
29706
|
-
v(
|
|
29820
|
+
}, y = this, T = 0; T < e.length; T++)
|
|
29821
|
+
v(T);
|
|
29707
29822
|
return this.modelScene.loaded = !1, this.modelScene.refined = !1, m;
|
|
29708
29823
|
}, t.prototype.commonParams = function() {
|
|
29709
29824
|
return {
|