@realsee/five 6.6.8 → 6.6.10
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/interfaces/five.PanoramaControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +9 -9
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +9 -9
- package/five/index.js +37 -37
- package/five/index.mjs +883 -883
- 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: 2025/10/
|
|
5
|
-
* Version: 6.6.
|
|
4
|
+
* Generated: 2025/10/29
|
|
5
|
+
* Version: 6.6.10
|
|
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, y = this.blockSize, v = y * 4, E = g / v;
|
|
455
455
|
p ? E = n.ceil(E) : E = n.max((E | 0) - this._minBufferSize, 0);
|
|
456
|
-
var
|
|
457
|
-
if (
|
|
458
|
-
for (var S = 0; S <
|
|
456
|
+
var T = E * y, b = n.min(T * 4, g);
|
|
457
|
+
if (T) {
|
|
458
|
+
for (var S = 0; S < T; S += y)
|
|
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 y = this._hash.words, v = y[0], E = y[1],
|
|
523
|
+
for (var y = this._hash.words, v = y[0], E = y[1], T = y[2], b = y[3], S = y[4], R = y[5], w = y[6], C = y[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 B = p[I - 15], M = p[I - 2];
|
|
528
528
|
p[I] = ((B << 25 | B >>> 7) ^ (B << 14 | B >>> 18) ^ B >>> 3) + p[I - 7] + ((M << 15 | M >>> 17) ^ (M << 13 | M >>> 19) ^ M >>> 10) + p[I - 16];
|
|
529
529
|
}
|
|
530
|
-
B = C + ((S << 26 | S >>> 6) ^ (S << 21 | S >>> 11) ^ (S << 7 | S >>> 25)) + (S & R ^ ~S & w) + s[I] + p[I], M = ((v << 30 | v >>> 2) ^ (v << 19 | v >>> 13) ^ (v << 10 | v >>> 22)) + (v & E ^ v &
|
|
530
|
+
B = C + ((S << 26 | S >>> 6) ^ (S << 21 | S >>> 11) ^ (S << 7 | S >>> 25)) + (S & R ^ ~S & w) + s[I] + p[I], M = ((v << 30 | v >>> 2) ^ (v << 19 | v >>> 13) ^ (v << 10 | v >>> 22)) + (v & E ^ v & T ^ E & T), C = w, w = R, R = S, S = b + B | 0, b = T, T = E, E = v, v = B + M | 0;
|
|
531
531
|
}
|
|
532
|
-
y[0] = y[0] + v | 0, y[1] = y[1] + E | 0, y[2] = y[2] +
|
|
532
|
+
y[0] = y[0] + v | 0, y[1] = y[1] + E | 0, y[2] = y[2] + T | 0, y[3] = y[3] + b | 0, y[4] = y[4] + S | 0, y[5] = y[5] + R | 0, y[6] = y[6] + w | 0, y[7] = y[7] + C | 0;
|
|
533
533
|
},
|
|
534
534
|
_doFinalize: function() {
|
|
535
535
|
var A = this._data, g = A.words, y = 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, y, v) {
|
|
588
588
|
var E = this._iv;
|
|
589
589
|
E ? this._iv = n : E = this._prevBlock;
|
|
590
|
-
for (var
|
|
591
|
-
g[y +
|
|
590
|
+
for (var T = 0; T < v; T++)
|
|
591
|
+
g[y + T] ^= E[T];
|
|
592
592
|
}, f = (t.BlockCipherMode = e.extend({
|
|
593
593
|
createEncryptor: function(g, y) {
|
|
594
594
|
return this.Encryptor.create(g, y);
|
|
@@ -607,14 +607,14 @@ CryptoJS.lib.Cipher || (function(n) {
|
|
|
607
607
|
}
|
|
608
608
|
}), f.Decryptor = f.extend({
|
|
609
609
|
processBlock: function(g, y) {
|
|
610
|
-
var v = this._cipher, E = v.blockSize,
|
|
611
|
-
v.decryptBlock(g, y), c.call(this, g, y, E), this._prevBlock =
|
|
610
|
+
var v = this._cipher, E = v.blockSize, T = g.slice(y, y + E);
|
|
611
|
+
v.decryptBlock(g, y), c.call(this, g, y, E), this._prevBlock = T;
|
|
612
612
|
}
|
|
613
613
|
}), h = h.CBC = f, f = (m.pad = {}).Pkcs7 = {
|
|
614
614
|
pad: function(g, y) {
|
|
615
|
-
for (var v = 4 * y, v = v - g.sigBytes % v, E = v << 24 | v << 16 | v << 8 | v,
|
|
616
|
-
|
|
617
|
-
v = r.create(
|
|
615
|
+
for (var v = 4 * y, v = v - g.sigBytes % v, E = v << 24 | v << 16 | v << 8 | v, T = [], b = 0; b < v; b += 4)
|
|
616
|
+
T.push(E);
|
|
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, y, v, E) {
|
|
679
679
|
E = this.cfg.extend(E);
|
|
680
|
-
var
|
|
681
|
-
return y =
|
|
680
|
+
var T = g.createEncryptor(v, E);
|
|
681
|
+
return y = T.finalize(y), T = T.cfg, d.create({
|
|
682
682
|
ciphertext: y,
|
|
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: E.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 y = g ^ g << 1 ^ g << 2 ^ g << 3 ^ g << 4, y = y >>> 8 ^ y & 255 ^ 99;
|
|
725
725
|
e[A] = y, r[y] = A;
|
|
726
|
-
var v = p[A], E = p[v],
|
|
727
|
-
o[A] =
|
|
726
|
+
var v = p[A], E = p[v], T = p[E], b = 257 * p[y] ^ 16843008 * y;
|
|
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 * E ^ 257 * v ^ 16843008 * A, c[y] = b << 24 | b >>> 8, f[y] = b << 16 | b >>> 16, d[y] = b << 8 | b >>> 24, h[y] = 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, y) {
|
|
1716
1716
|
return r(CryptoJS.DES, A, g, y);
|
|
1717
1717
|
}, r = function(A, g, y, v) {
|
|
1718
|
-
var E = CryptoJS.enc.Hex.parse(g),
|
|
1719
|
-
S.key =
|
|
1720
|
-
var R = A.decrypt(S,
|
|
1721
|
-
iv:
|
|
1718
|
+
var E = CryptoJS.enc.Hex.parse(g), T = CryptoJS.enc.Hex.parse(y), b = CryptoJS.enc.Hex.parse(v), S = {};
|
|
1719
|
+
S.key = T, S.iv = b, S.ciphertext = E;
|
|
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, y) {
|
|
@@ -1728,8 +1728,8 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1728
1728
|
}, u = function(A, g, y) {
|
|
1729
1729
|
return l(CryptoJS.DES, A, g, y);
|
|
1730
1730
|
}, l = function(A, g, y, v) {
|
|
1731
|
-
var E = CryptoJS.enc.Hex.parse(g),
|
|
1732
|
-
iv:
|
|
1731
|
+
var E = CryptoJS.enc.Hex.parse(g), T = CryptoJS.enc.Hex.parse(y), b = CryptoJS.enc.Hex.parse(v), S = A.encrypt(E, T, {
|
|
1732
|
+
iv: b
|
|
1733
1733
|
}), R = CryptoJS.enc.Hex.parse(S.toString()), w = CryptoJS.enc.Base64.stringify(R);
|
|
1734
1734
|
return w;
|
|
1735
1735
|
}, c = {
|
|
@@ -1771,36 +1771,36 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1771
1771
|
y && (g.cipher = y[1], g.ivsalt = y[2]);
|
|
1772
1772
|
var v = A.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));
|
|
1773
1773
|
v && (g.type = v[1]);
|
|
1774
|
-
var E = -1,
|
|
1774
|
+
var E = -1, T = 0;
|
|
1775
1775
|
A.indexOf(`\r
|
|
1776
1776
|
\r
|
|
1777
1777
|
`) != -1 && (E = A.indexOf(`\r
|
|
1778
1778
|
\r
|
|
1779
|
-
`),
|
|
1779
|
+
`), T = 2), A.indexOf(`
|
|
1780
1780
|
|
|
1781
1781
|
`) != -1 && (E = A.indexOf(`
|
|
1782
1782
|
|
|
1783
|
-
`),
|
|
1784
|
-
var
|
|
1785
|
-
if (E != -1 &&
|
|
1786
|
-
var S = A.substring(E +
|
|
1783
|
+
`), T = 1);
|
|
1784
|
+
var b = A.indexOf("-----END");
|
|
1785
|
+
if (E != -1 && b != -1) {
|
|
1786
|
+
var S = A.substring(E + 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, y) {
|
|
1791
|
-
for (var v = y.substring(0, 16), E = CryptoJS.enc.Hex.parse(v),
|
|
1791
|
+
for (var v = y.substring(0, 16), E = CryptoJS.enc.Hex.parse(v), T = CryptoJS.enc.Utf8.parse(g), b = c[A].keylen + c[A].ivlen, S = "", R = null; ; ) {
|
|
1792
1792
|
var w = CryptoJS.algo.MD5.create();
|
|
1793
|
-
if (R != null && w.update(R), w.update(
|
|
1793
|
+
if (R != null && w.update(R), w.update(T), w.update(E), R = w.finalize(), S = S + CryptoJS.enc.Hex.stringify(R), S.length >= b * 2)
|
|
1794
1794
|
break;
|
|
1795
1795
|
}
|
|
1796
1796
|
var C = {};
|
|
1797
1797
|
return C.keyhex = S.substr(0, c[A].keylen * 2), C.ivhex = S.substr(c[A].keylen * 2, c[A].ivlen * 2), C;
|
|
1798
1798
|
}, p = function(A, g, y, v) {
|
|
1799
|
-
var E = CryptoJS.enc.Base64.parse(A),
|
|
1799
|
+
var E = CryptoJS.enc.Base64.parse(A), T = CryptoJS.enc.Hex.stringify(E), b = c[g].proc, S = b(T, y, v);
|
|
1800
1800
|
return S;
|
|
1801
1801
|
}, m = function(A, g, y, v) {
|
|
1802
|
-
var E = c[g].eproc,
|
|
1803
|
-
return
|
|
1802
|
+
var E = c[g].eproc, T = E(A, y, 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, y, v);
|
|
1815
1815
|
},
|
|
1816
1816
|
getDecryptedKeyHex: function(A, g) {
|
|
1817
|
-
var y = d(A), v = y.cipher, E = y.ivsalt,
|
|
1817
|
+
var y = d(A), v = y.cipher, E = y.ivsalt, T = y.data, b = h(v, g, E), S = b.keyhex, R = p(T, v, S, E);
|
|
1818
1818
|
return R;
|
|
1819
1819
|
},
|
|
1820
1820
|
getEncryptedPKCS5PEMFromPrvKeyHex: function(A, g, y, v, E) {
|
|
@@ -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 E == "undefined" || E == null) {
|
|
1825
|
-
var
|
|
1826
|
-
E =
|
|
1825
|
+
var T = c[v].ivlen, b = f(T);
|
|
1826
|
+
E = b.toUpperCase();
|
|
1827
1827
|
}
|
|
1828
1828
|
var S = h(v, y, E), R = S.keyhex, w = m(g, v, R, E), C = w.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, y = g.getChildIdx, v = g.getV, E = {},
|
|
1840
|
-
if (b.length != 2)
|
|
1841
|
-
throw "malformed format: SEQUENCE(0).items != 2: " + b.length;
|
|
1842
|
-
E.ciphertext = v(A, b[1]);
|
|
1843
|
-
var T = y(A, b[0]);
|
|
1839
|
+
var g = ASN1HEX, y = g.getChildIdx, v = g.getV, E = {}, T = y(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
|
+
E.ciphertext = v(A, T[1]);
|
|
1843
|
+
var b = y(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 = y(A,
|
|
1849
|
-
if (
|
|
1848
|
+
var S = y(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 = y(A, S[1]);
|
|
1852
1852
|
if (R.length != 2)
|
|
@@ -1875,13 +1875,13 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1875
1875
|
var y = CryptoJS.enc.Hex.parse(A.pbkdf2Salt), v = A.pbkdf2Iter, E = CryptoJS.PBKDF2(g, y, {
|
|
1876
1876
|
keySize: 192 / 32,
|
|
1877
1877
|
iterations: v
|
|
1878
|
-
}),
|
|
1879
|
-
return
|
|
1878
|
+
}), T = CryptoJS.enc.Hex.stringify(E);
|
|
1879
|
+
return T;
|
|
1880
1880
|
},
|
|
1881
1881
|
_getPlainPKCS8HexFromEncryptedPKCS8PEM: function(A, g) {
|
|
1882
|
-
var y = pemtohex(A, "ENCRYPTED PRIVATE KEY"), v = this.parseHexOfEncryptedPKCS8(y), E = KEYUTIL.getPBKDF2KeyHexFromParam(v, g),
|
|
1883
|
-
|
|
1884
|
-
var
|
|
1882
|
+
var y = pemtohex(A, "ENCRYPTED PRIVATE KEY"), v = this.parseHexOfEncryptedPKCS8(y), E = KEYUTIL.getPBKDF2KeyHexFromParam(v, g), T = {};
|
|
1883
|
+
T.ciphertext = CryptoJS.enc.Hex.parse(v.ciphertext);
|
|
1884
|
+
var b = CryptoJS.enc.Hex.parse(E), S = CryptoJS.enc.Hex.parse(v.encryptionSchemeIV), R = CryptoJS.TripleDES.decrypt(T, b, {
|
|
1885
1885
|
iv: S
|
|
1886
1886
|
}), w = CryptoJS.enc.Hex.stringify(R);
|
|
1887
1887
|
return w;
|
|
@@ -1894,19 +1894,19 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1894
1894
|
var g = ASN1HEX, y = g.getChildIdx, v = g.getV, E = {};
|
|
1895
1895
|
if (E.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 = y(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 = y(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 (E.algoid = v(A,
|
|
1907
|
+
if (E.algoid = v(A, b[0]), A.substr(b[1], 2) == "06" && (E.algparam = v(A, b[1])), A.substr(T[2], 2) != "04")
|
|
1908
1908
|
throw new Error("malformed PKCS8 private key(code:006)");
|
|
1909
|
-
return E.keyidx = g.getVidx(A,
|
|
1909
|
+
return E.keyidx = g.getVidx(A, T[2]), E;
|
|
1910
1910
|
},
|
|
1911
1911
|
getKeyFromPlainPrivatePKCS8PEM: function(A) {
|
|
1912
1912
|
var g = pemtohex(A, "PRIVATE KEY"), y = this.getKeyFromPlainPrivatePKCS8Hex(g);
|
|
@@ -1940,32 +1940,32 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1940
1940
|
var g = ASN1HEX, y = g.getChildIdx, v = g.getV, E = {};
|
|
1941
1941
|
if (A.substr(0, 2) != "30")
|
|
1942
1942
|
throw "malformed RSA key(code:001)";
|
|
1943
|
-
var
|
|
1944
|
-
if (
|
|
1943
|
+
var T = y(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 (E.n = v(A,
|
|
1948
|
+
if (E.n = v(A, T[0]), A.substr(T[1], 2) != "02")
|
|
1949
1949
|
throw "malformed RSA key(code:004)";
|
|
1950
|
-
return E.e = v(A,
|
|
1950
|
+
return E.e = v(A, T[1]), E;
|
|
1951
1951
|
},
|
|
1952
1952
|
parsePublicPKCS8Hex: function(A) {
|
|
1953
1953
|
var g = ASN1HEX, y = g.getChildIdx, v = g.getV, E = {};
|
|
1954
1954
|
E.algparam = null;
|
|
1955
|
-
var
|
|
1956
|
-
if (
|
|
1957
|
-
throw "outer DERSequence shall have 2 elements: " +
|
|
1958
|
-
var
|
|
1959
|
-
if (A.substr(
|
|
1955
|
+
var T = y(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 = y(A,
|
|
1961
|
+
var S = y(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 (E.algoid = v(A, S[0]), A.substr(S[1], 2) == "06" ? E.algparam = v(A, S[1]) : A.substr(S[1], 2) == "30" && (E.algparam = {}, E.algparam.p = g.getVbyList(A, S[1], [0], "02"), E.algparam.q = g.getVbyList(A, S[1], [1], "02"), E.algparam.g = g.getVbyList(A, S[1], [2], "02")), A.substr(
|
|
1966
|
+
if (E.algoid = v(A, S[0]), A.substr(S[1], 2) == "06" ? E.algparam = v(A, S[1]) : A.substr(S[1], 2) == "30" && (E.algparam = {}, E.algparam.p = g.getVbyList(A, S[1], [0], "02"), E.algparam.q = g.getVbyList(A, S[1], [1], "02"), E.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 E.key = v(A,
|
|
1968
|
+
return E.key = v(A, T[1]).substr(2), E;
|
|
1969
1969
|
}
|
|
1970
1970
|
};
|
|
1971
1971
|
})();
|
|
@@ -2030,13 +2030,13 @@ KEYUTIL.getKey = function(n, t, e) {
|
|
|
2030
2030
|
return m.setPublicKeyHex(v), m.setPrivateKeyHex(E), 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 E = l(v, 0, [0]),
|
|
2655
|
-
if (
|
|
2654
|
+
var E = l(v, 0, [0]), T = p(E, 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 E = this.getSignatureAlgorithmField(),
|
|
2705
|
+
var E = this.getSignatureAlgorithmField(), T = this.getSignatureValueHex(), b = l(this.hex, 0, [0], "30"), S = new KJUR.crypto.Signature({
|
|
2706
2706
|
alg: E
|
|
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 E,
|
|
2710
|
+
var E, T, b;
|
|
2711
2711
|
if (v === void 0) {
|
|
2712
|
-
if (
|
|
2712
|
+
if (b = this.hex, this.version !== 3)
|
|
2713
2713
|
return -1;
|
|
2714
|
-
E = f(
|
|
2714
|
+
E = f(b, 0, [0, 7, 0], "30"), T = e(b, E);
|
|
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
|
-
E = f(
|
|
2722
|
+
E = f(b, 0, [0, 3, 0, 1, 0], "30"), T = e(b, E), 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 w = {};
|
|
2727
2727
|
w.critical = !1;
|
|
2728
|
-
var C = e(
|
|
2729
|
-
C.length === 3 && (w.critical = !0, I = 1), w.oid = t.hextooidstr(s(
|
|
2730
|
-
var B = f(
|
|
2731
|
-
w.vidx = h(
|
|
2728
|
+
var C = e(b, T[R]), I = 0;
|
|
2729
|
+
C.length === 3 && (w.critical = !0, I = 1), w.oid = t.hextooidstr(s(b, T[R], [0], "06"));
|
|
2730
|
+
var B = f(b, T[R], [1 + I]);
|
|
2731
|
+
w.vidx = h(b, B), this.aExtInfo.push(w);
|
|
2732
2732
|
}
|
|
2733
2733
|
}, this.getExtInfo = function(v) {
|
|
2734
|
-
var E = this.aExtInfo,
|
|
2735
|
-
if (v.match(/^[0-9.]+$/) || (
|
|
2736
|
-
for (var
|
|
2737
|
-
if (E[
|
|
2738
|
-
return E[
|
|
2734
|
+
var E = this.aExtInfo, T = v;
|
|
2735
|
+
if (v.match(/^[0-9.]+$/) || (T = KJUR.asn1.x509.OID.name2oid(v)), T !== "") {
|
|
2736
|
+
for (var b = 0; b < E.length; b++)
|
|
2737
|
+
if (E[b].oid === T)
|
|
2738
|
+
return E[b];
|
|
2739
2739
|
}
|
|
2740
2740
|
}, this.getExtBasicConstraints = function(v, E) {
|
|
2741
2741
|
if (v === void 0 && E === 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), E = T.critical;
|
|
2746
2746
|
}
|
|
2747
|
-
var
|
|
2747
|
+
var b = {
|
|
2748
2748
|
extname: "basicConstraints"
|
|
2749
2749
|
};
|
|
2750
|
-
if (E && (
|
|
2751
|
-
return
|
|
2750
|
+
if (E && (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, E) {
|
|
2760
2760
|
if (v === void 0 && E === 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), E = T.critical;
|
|
2765
2765
|
}
|
|
2766
|
-
var
|
|
2766
|
+
var b = {
|
|
2767
2767
|
extname: "keyUsage"
|
|
2768
2768
|
};
|
|
2769
|
-
return E && (
|
|
2769
|
+
return E && (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 E = 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 E = this.getExtKeyUsageBin(v),
|
|
2783
|
-
E.substr(
|
|
2784
|
-
return
|
|
2782
|
+
for (var E = this.getExtKeyUsageBin(v), T = new Array(), b = 0; b < E.length; b++)
|
|
2783
|
+
E.substr(b, 1) == "1" && T.push(X509.KEYUSAGE_NAME[b]);
|
|
2784
|
+
return T.join(",");
|
|
2785
2785
|
}, this.getExtSubjectKeyIdentifier = function(v, E) {
|
|
2786
2786
|
if (v === void 0 && E === 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), E = T.critical;
|
|
2791
2791
|
}
|
|
2792
|
-
var
|
|
2792
|
+
var b = {
|
|
2793
2793
|
extname: "subjectKeyIdentifier"
|
|
2794
2794
|
};
|
|
2795
|
-
E && (
|
|
2795
|
+
E && (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, E) {
|
|
2801
2801
|
if (v === void 0 && E === 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), E = T.critical;
|
|
2806
2806
|
}
|
|
2807
|
-
var
|
|
2807
|
+
var b = {
|
|
2808
2808
|
extname: "authorityKeyIdentifier"
|
|
2809
2809
|
};
|
|
2810
|
-
E && (
|
|
2810
|
+
E && (b.critical = !0);
|
|
2811
2811
|
for (var S = e(v, 0), R = 0; R < S.length; R++) {
|
|
2812
2812
|
var w = v.substr(S[R], 2);
|
|
2813
|
-
if (w === "80" && (
|
|
2813
|
+
if (w === "80" && (b.kid = {
|
|
2814
2814
|
hex: r(v, S[R])
|
|
2815
2815
|
}), w === "a1") {
|
|
2816
2816
|
var C = o(v, S[R]), I = this.getGeneralNames(C);
|
|
2817
|
-
|
|
2817
|
+
b.issuer = I[0].dn;
|
|
2818
2818
|
}
|
|
2819
|
-
w === "82" && (
|
|
2819
|
+
w === "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, E) {
|
|
2825
2825
|
if (v === void 0 && E === 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), E = T.critical;
|
|
2830
2830
|
}
|
|
2831
|
-
var
|
|
2831
|
+
var b = {
|
|
2832
2832
|
extname: "extKeyUsage",
|
|
2833
2833
|
array: []
|
|
2834
2834
|
};
|
|
2835
|
-
E && (
|
|
2835
|
+
E && (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 E = new Array(),
|
|
2844
|
-
if (
|
|
2843
|
+
var E = new Array(), T = o(this.hex, v.vidx);
|
|
2844
|
+
if (T === "")
|
|
2845
2845
|
return E;
|
|
2846
|
-
for (var
|
|
2847
|
-
E.push(m(r(
|
|
2846
|
+
for (var b = e(T, 0), S = 0; S < b.length; S++)
|
|
2847
|
+
E.push(m(r(T, b[S])));
|
|
2848
2848
|
return E;
|
|
2849
2849
|
}, this.getExtSubjectAltName = function(v, E) {
|
|
2850
2850
|
if (v === void 0 && E === 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), E = T.critical;
|
|
2855
2855
|
}
|
|
2856
|
-
var
|
|
2856
|
+
var b = {
|
|
2857
2857
|
extname: "subjectAltName",
|
|
2858
2858
|
array: []
|
|
2859
2859
|
};
|
|
2860
|
-
return E && (
|
|
2860
|
+
return E && (b.critical = !0), b.array = this.getGeneralNames(v), b;
|
|
2861
2861
|
}, this.getExtIssuerAltName = function(v, E) {
|
|
2862
2862
|
if (v === void 0 && E === 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), E = T.critical;
|
|
2867
2867
|
}
|
|
2868
|
-
var
|
|
2868
|
+
var b = {
|
|
2869
2869
|
extname: "issuerAltName",
|
|
2870
2870
|
array: []
|
|
2871
2871
|
};
|
|
2872
|
-
return E && (
|
|
2872
|
+
return E && (b.critical = !0), b.array = this.getGeneralNames(v), b;
|
|
2873
2873
|
}, this.getGeneralNames = function(v) {
|
|
2874
|
-
for (var E = e(v, 0),
|
|
2875
|
-
var S = this.getGeneralName(o(v, E[
|
|
2876
|
-
S !== void 0 &&
|
|
2874
|
+
for (var E = e(v, 0), T = [], b = 0; b < E.length; b++) {
|
|
2875
|
+
var S = this.getGeneralName(o(v, E[b]));
|
|
2876
|
+
S !== void 0 && T.push(S);
|
|
2877
2877
|
}
|
|
2878
|
-
return
|
|
2878
|
+
return T;
|
|
2879
2879
|
}, this.getGeneralName = function(v) {
|
|
2880
|
-
var E = v.substr(0, 2),
|
|
2880
|
+
var E = v.substr(0, 2), T = r(v, 0), b = hextorstr(T);
|
|
2881
2881
|
if (E == "81")
|
|
2882
2882
|
return {
|
|
2883
|
-
rfc822:
|
|
2883
|
+
rfc822: b
|
|
2884
2884
|
};
|
|
2885
2885
|
if (E == "82")
|
|
2886
2886
|
return {
|
|
2887
|
-
dns:
|
|
2887
|
+
dns: b
|
|
2888
2888
|
};
|
|
2889
2889
|
if (E == "86")
|
|
2890
2890
|
return {
|
|
2891
|
-
uri:
|
|
2891
|
+
uri: b
|
|
2892
2892
|
};
|
|
2893
2893
|
if (E == "87")
|
|
2894
2894
|
return {
|
|
2895
|
-
ip: hextoip(
|
|
2895
|
+
ip: hextoip(T)
|
|
2896
2896
|
};
|
|
2897
2897
|
if (E == "a4")
|
|
2898
2898
|
return {
|
|
2899
|
-
dn: this.getX500Name(
|
|
2899
|
+
dn: this.getX500Name(T)
|
|
2900
2900
|
};
|
|
2901
2901
|
}, this.getExtSubjectAltName2 = function() {
|
|
2902
|
-
var v, E,
|
|
2903
|
-
if (
|
|
2904
|
-
return
|
|
2905
|
-
for (var S = new Array(), R = o(this.hex,
|
|
2906
|
-
|
|
2902
|
+
var v, E, 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), w = e(R, 0), C = 0; C < w.length; C++)
|
|
2906
|
+
T = R.substr(w[C], 2), v = r(R, w[C]), T === "81" && (E = hextoutf8(v), S.push(["MAIL", E])), T === "82" && (E = hextoutf8(v), S.push(["DNS", E])), T === "84" && (E = X509.hex2dn(v, 0), S.push(["DN", E])), T === "86" && (E = hextoutf8(v), S.push(["URI", E])), T === "87" && (E = hextoip(v), S.push(["IP", E]));
|
|
2907
2907
|
return S;
|
|
2908
2908
|
}, this.getExtCRLDistributionPoints = function(v, E) {
|
|
2909
2909
|
if (v === void 0 && E === 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), E = T.critical;
|
|
2914
2914
|
}
|
|
2915
|
-
var
|
|
2915
|
+
var b = {
|
|
2916
2916
|
extname: "cRLDistributionPoints",
|
|
2917
2917
|
array: []
|
|
2918
2918
|
};
|
|
2919
|
-
E && (
|
|
2919
|
+
E && (b.critical = !0);
|
|
2920
2920
|
for (var S = e(v, 0), R = 0; R < S.length; R++) {
|
|
2921
2921
|
var w = o(v, S[R]);
|
|
2922
|
-
|
|
2922
|
+
b.array.push(this.getDistributionPoint(w));
|
|
2923
2923
|
}
|
|
2924
|
-
return
|
|
2924
|
+
return b;
|
|
2925
2925
|
}, this.getDistributionPoint = function(v) {
|
|
2926
|
-
for (var E = {},
|
|
2927
|
-
var S = v.substr(b
|
|
2926
|
+
for (var E = {}, 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" && (E.dpname = this.getDistributionPointName(R));
|
|
2929
2929
|
}
|
|
2930
2930
|
return E;
|
|
2931
2931
|
}, this.getDistributionPointName = function(v) {
|
|
2932
|
-
for (var E = {},
|
|
2933
|
-
var S = v.substr(b
|
|
2932
|
+
for (var E = {}, 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" && (E.full = this.getGeneralNames(R));
|
|
2935
2935
|
}
|
|
2936
2936
|
return E;
|
|
@@ -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 E = new Array(),
|
|
2941
|
+
for (var E = 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
|
E.push(R);
|
|
2945
2945
|
} catch (w) {
|
|
2946
2946
|
}
|
|
@@ -2952,79 +2952,79 @@ function X509(n) {
|
|
|
2952
2952
|
for (var E = {
|
|
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" && E.ocsp.push(hextoutf8(R)), S === "2b06010505073002" && E.caissuer.push(hextoutf8(R));
|
|
2958
2958
|
}
|
|
2959
2959
|
return E;
|
|
2960
2960
|
}, this.getExtAuthorityInfoAccess = function(v, E) {
|
|
2961
2961
|
if (v === void 0 && E === 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), E = T.critical;
|
|
2966
2966
|
}
|
|
2967
|
-
var
|
|
2967
|
+
var b = {
|
|
2968
2968
|
extname: "authorityInfoAccess",
|
|
2969
2969
|
array: []
|
|
2970
2970
|
};
|
|
2971
|
-
E && (
|
|
2971
|
+
E && (b.critical = !0);
|
|
2972
2972
|
for (var S = e(v, 0), R = 0; R < S.length; R++) {
|
|
2973
2973
|
var w = u(v, S[R], [0], "06"), C = s(v, S[R], [1], "86"), I = hextoutf8(C);
|
|
2974
2974
|
if (w == "2b06010505073001")
|
|
2975
|
-
|
|
2975
|
+
b.array.push({
|
|
2976
2976
|
ocsp: I
|
|
2977
2977
|
});
|
|
2978
2978
|
else if (w == "2b06010505073002")
|
|
2979
|
-
|
|
2979
|
+
b.array.push({
|
|
2980
2980
|
caissuer: I
|
|
2981
2981
|
});
|
|
2982
2982
|
else
|
|
2983
2983
|
throw new Error("unknown method: " + w);
|
|
2984
2984
|
}
|
|
2985
|
-
return
|
|
2985
|
+
return b;
|
|
2986
2986
|
}, this.getExtCertificatePolicies = function(v, E) {
|
|
2987
2987
|
if (v === void 0 && E === 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), E = T.critical;
|
|
2992
2992
|
}
|
|
2993
|
-
var
|
|
2993
|
+
var b = {
|
|
2994
2994
|
extname: "certificatePolicies",
|
|
2995
2995
|
array: []
|
|
2996
2996
|
};
|
|
2997
|
-
E && (
|
|
2997
|
+
E && (b.critical = !0);
|
|
2998
2998
|
for (var S = e(v, 0), R = 0; R < S.length; R++) {
|
|
2999
2999
|
var w = o(v, S[R]), C = this.getPolicyInformation(w);
|
|
3000
|
-
|
|
3000
|
+
b.array.push(C);
|
|
3001
3001
|
}
|
|
3002
|
-
return
|
|
3002
|
+
return b;
|
|
3003
3003
|
}, this.getPolicyInformation = function(v) {
|
|
3004
|
-
var E = {},
|
|
3005
|
-
E.policyoid = m(
|
|
3006
|
-
var
|
|
3007
|
-
if (
|
|
3004
|
+
var E = {}, T = s(v, 0, [0], "06");
|
|
3005
|
+
E.policyoid = m(T);
|
|
3006
|
+
var b = d(v, 0, [1], "30");
|
|
3007
|
+
if (b != -1) {
|
|
3008
3008
|
E.array = [];
|
|
3009
|
-
for (var S = e(v,
|
|
3009
|
+
for (var S = e(v, b), R = 0; R < S.length; R++) {
|
|
3010
3010
|
var w = o(v, S[R]), C = this.getPolicyQualifierInfo(w);
|
|
3011
3011
|
E.array.push(C);
|
|
3012
3012
|
}
|
|
3013
3013
|
}
|
|
3014
3014
|
return E;
|
|
3015
3015
|
}, this.getPolicyQualifierInfo = function(v) {
|
|
3016
|
-
var E = {},
|
|
3017
|
-
if (
|
|
3018
|
-
var
|
|
3019
|
-
E.cps = hextorstr(
|
|
3020
|
-
} else if (
|
|
3016
|
+
var E = {}, T = s(v, 0, [0], "06");
|
|
3017
|
+
if (T === "2b06010505070201") {
|
|
3018
|
+
var b = u(v, 0, [1], "16");
|
|
3019
|
+
E.cps = hextorstr(b);
|
|
3020
|
+
} else if (T === "2b06010505070202") {
|
|
3021
3021
|
var S = l(v, 0, [1], "30");
|
|
3022
3022
|
E.unotice = this.getUserNotice(S);
|
|
3023
3023
|
}
|
|
3024
3024
|
return E;
|
|
3025
3025
|
}, this.getUserNotice = function(v) {
|
|
3026
|
-
for (var E = {},
|
|
3027
|
-
var S = o(v, b
|
|
3026
|
+
for (var E = {}, T = e(v, 0), b = 0; b < T.length; b++) {
|
|
3027
|
+
var S = o(v, T[b]);
|
|
3028
3028
|
S.substr(0, 2) != "30" && (E.exptext = this.getDisplayText(S));
|
|
3029
3029
|
}
|
|
3030
3030
|
return E;
|
|
@@ -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 = E[v.substr(0, 2)], T.str = hextorstr(r(v, 0)), T;
|
|
3039
3039
|
}, this.getExtCRLNumber = function(v, E) {
|
|
3040
|
-
var
|
|
3040
|
+
var T = {
|
|
3041
3041
|
extname: "cRLNumber"
|
|
3042
3042
|
};
|
|
3043
|
-
if (E && (
|
|
3044
|
-
return
|
|
3043
|
+
if (E && (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, E) {
|
|
3049
|
-
var
|
|
3049
|
+
var T = {
|
|
3050
3050
|
extname: "cRLReason"
|
|
3051
3051
|
};
|
|
3052
|
-
if (E && (
|
|
3053
|
-
return
|
|
3052
|
+
if (E && (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, E) {
|
|
3056
|
-
var
|
|
3056
|
+
var T = {
|
|
3057
3057
|
extname: "ocspNonce"
|
|
3058
3058
|
};
|
|
3059
|
-
E && (
|
|
3060
|
-
var
|
|
3061
|
-
return
|
|
3059
|
+
E && (T.critical = !0);
|
|
3060
|
+
var b = r(v, 0);
|
|
3061
|
+
return T.hex = b, T;
|
|
3062
3062
|
}, this.getExtOcspNoCheck = function(v, E) {
|
|
3063
|
-
var
|
|
3063
|
+
var T = {
|
|
3064
3064
|
extname: "ocspNoCheck"
|
|
3065
3065
|
};
|
|
3066
|
-
return E && (
|
|
3066
|
+
return E && (T.critical = !0), T;
|
|
3067
3067
|
}, this.getExtAdobeTimeStamp = function(v, E) {
|
|
3068
3068
|
if (v === void 0 && E === 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), E = T.critical;
|
|
3073
3073
|
}
|
|
3074
|
-
var
|
|
3074
|
+
var b = {
|
|
3075
3075
|
extname: "adobeTimeStamp"
|
|
3076
3076
|
};
|
|
3077
|
-
E && (
|
|
3077
|
+
E && (b.critical = !0);
|
|
3078
3078
|
var S = e(v, 0);
|
|
3079
3079
|
if (S.length > 1) {
|
|
3080
3080
|
var R = o(v, S[1]), w = this.getGeneralName(R);
|
|
3081
|
-
w.uri != null && (
|
|
3081
|
+
w.uri != null && (b.uri = w.uri);
|
|
3082
3082
|
}
|
|
3083
3083
|
if (S.length > 2) {
|
|
3084
3084
|
var C = o(v, S[2]);
|
|
3085
|
-
C == "0101ff" && (
|
|
3085
|
+
C == "0101ff" && (b.reqauth = !0), C == "010100" && (b.reqauth = !1);
|
|
3086
3086
|
}
|
|
3087
|
-
return
|
|
3087
|
+
return b;
|
|
3088
3088
|
}, this.getX500NameRule = function(v) {
|
|
3089
|
-
for (var E = null,
|
|
3090
|
-
for (var S = v[
|
|
3091
|
-
|
|
3092
|
-
for (var
|
|
3093
|
-
var w = b
|
|
3089
|
+
for (var E = 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 w = T[b], C = w.ds, I = w.value, B = w.type;
|
|
3094
3094
|
if (C != "prn" && C != "utf8" && C != "ia5")
|
|
3095
3095
|
return "mixed";
|
|
3096
3096
|
if (C == "ia5") {
|
|
@@ -3112,26 +3112,26 @@ function X509(n) {
|
|
|
3112
3112
|
}
|
|
3113
3113
|
return E == null ? "prn" : E;
|
|
3114
3114
|
}, this.getX500Name = function(v) {
|
|
3115
|
-
var E = this.getX500NameArray(v),
|
|
3115
|
+
var E = this.getX500NameArray(v), T = this.dnarraytostr(E);
|
|
3116
3116
|
return {
|
|
3117
3117
|
array: E,
|
|
3118
|
-
str:
|
|
3118
|
+
str: T
|
|
3119
3119
|
};
|
|
3120
3120
|
}, this.getX500NameArray = function(v) {
|
|
3121
|
-
for (var E = [],
|
|
3122
|
-
E.push(this.getRDN(o(v, b
|
|
3121
|
+
for (var E = [], T = e(v, 0), b = 0; b < T.length; b++)
|
|
3122
|
+
E.push(this.getRDN(o(v, T[b])));
|
|
3123
3123
|
return E;
|
|
3124
3124
|
}, this.getRDN = function(v) {
|
|
3125
|
-
for (var E = [],
|
|
3126
|
-
E.push(this.getAttrTypeAndValue(o(v, b
|
|
3125
|
+
for (var E = [], T = e(v, 0), b = 0; b < T.length; b++)
|
|
3126
|
+
E.push(this.getAttrTypeAndValue(o(v, T[b])));
|
|
3127
3127
|
return E;
|
|
3128
3128
|
}, this.getAttrTypeAndValue = function(v) {
|
|
3129
3129
|
var E = {
|
|
3130
3130
|
type: null,
|
|
3131
3131
|
value: null,
|
|
3132
3132
|
ds: null
|
|
3133
|
-
},
|
|
3134
|
-
return E.type = KJUR.asn1.x509.OID.oid2atype(R), E.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 E.type = KJUR.asn1.x509.OID.oid2atype(R), E.ds = this.HEX2STAG[v.substr(T[1], 2)], E.ds != "bmp" ? E.value = hextoutf8(S) : E.value = ucs2hextoutf8(S), E;
|
|
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 E = d(this.hex, 0, [0, "[3]"]);
|
|
3151
3151
|
E != -1 && (v = c(this.hex, 0, [0, "[3]", 0], "30"));
|
|
3152
3152
|
}
|
|
3153
|
-
for (var
|
|
3154
|
-
var R = o(v,
|
|
3155
|
-
w != null &&
|
|
3153
|
+
for (var T = [], b = e(v, 0), S = 0; S < b.length; S++) {
|
|
3154
|
+
var R = o(v, b[S]), w = this.getExtParam(R);
|
|
3155
|
+
w != null && T.push(w);
|
|
3156
3156
|
}
|
|
3157
|
-
return
|
|
3157
|
+
return T;
|
|
3158
3158
|
}, this.getExtParam = function(v) {
|
|
3159
|
-
var E = 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 E = e(v, 0), T = E.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]), w = void 0;
|
|
3165
|
+
if (b == "2.5.29.14" ? w = this.getExtSubjectKeyIdentifier(R, S) : b == "2.5.29.15" ? w = this.getExtKeyUsage(R, S) : b == "2.5.29.17" ? w = this.getExtSubjectAltName(R, S) : b == "2.5.29.18" ? w = this.getExtIssuerAltName(R, S) : b == "2.5.29.19" ? w = this.getExtBasicConstraints(R, S) : b == "2.5.29.31" ? w = this.getExtCRLDistributionPoints(R, S) : b == "2.5.29.32" ? w = this.getExtCertificatePolicies(R, S) : b == "2.5.29.35" ? w = this.getExtAuthorityKeyIdentifier(R, S) : b == "2.5.29.37" ? w = this.getExtExtKeyUsage(R, S) : b == "1.3.6.1.5.5.7.1.1" ? w = this.getExtAuthorityInfoAccess(R, S) : b == "2.5.29.20" ? w = this.getExtCRLNumber(R, S) : b == "2.5.29.21" ? w = this.getExtCRLReason(R, S) : b == "1.3.6.1.5.5.7.48.1.2" ? w = this.getExtOcspNonce(R, S) : b == "1.3.6.1.5.5.7.48.1.5" ? w = this.getExtOcspNoCheck(R, S) : b == "1.2.840.113583.1.1.9.1" && (w = this.getExtAdobeTimeStamp(R, S)), w != null)
|
|
3166
3166
|
return w;
|
|
3167
3167
|
var C = {
|
|
3168
|
-
extname:
|
|
3168
|
+
extname: b,
|
|
3169
3169
|
extn: R
|
|
3170
3170
|
};
|
|
3171
3171
|
return S && (C.critical = !0), C;
|
|
3172
3172
|
}, this.findExt = function(v, E) {
|
|
3173
|
-
for (var
|
|
3174
|
-
if (v[
|
|
3175
|
-
return v[
|
|
3173
|
+
for (var T = 0; T < v.length; T++)
|
|
3174
|
+
if (v[T].extname == E)
|
|
3175
|
+
return v[T];
|
|
3176
3176
|
return null;
|
|
3177
3177
|
}, this.dnarraytostr = function(v) {
|
|
3178
|
-
function E(
|
|
3179
|
-
return
|
|
3180
|
-
return
|
|
3178
|
+
function E(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 E(
|
|
3186
|
+
return "/" + v.map(function(b) {
|
|
3187
|
+
return E(b).replace(/\//, "\\/");
|
|
3188
3188
|
}).join("/");
|
|
3189
3189
|
}, this.getInfo = function() {
|
|
3190
3190
|
var v = function(q) {
|
|
@@ -3202,7 +3202,7 @@ function X509(n) {
|
|
|
3202
3202
|
}
|
|
3203
3203
|
}
|
|
3204
3204
|
return z;
|
|
3205
|
-
},
|
|
3205
|
+
}, T = function(q) {
|
|
3206
3206
|
for (var z = "", Q = q.array, j = 0; j < Q.length; j++) {
|
|
3207
3207
|
var V = Q[j];
|
|
3208
3208
|
try {
|
|
@@ -3217,7 +3217,7 @@ function X509(n) {
|
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
3219
|
return z;
|
|
3220
|
-
},
|
|
3220
|
+
}, b = function(q) {
|
|
3221
3221
|
for (var z = "", Q = q.array, j = 0; j < Q.length; j++) {
|
|
3222
3222
|
var V = Q[j];
|
|
3223
3223
|
V.caissuer !== void 0 && (z += " caissuer: " + V.caissuer + `
|
|
@@ -3270,10 +3270,10 @@ function X509(n) {
|
|
|
3270
3270
|
`;
|
|
3271
3271
|
} else if (B === "cRLDistributionPoints") {
|
|
3272
3272
|
var N = this.getExtCRLDistributionPoints();
|
|
3273
|
-
S +=
|
|
3273
|
+
S += T(N);
|
|
3274
3274
|
} else if (B === "authorityInfoAccess") {
|
|
3275
3275
|
var D = this.getExtAuthorityInfoAccess();
|
|
3276
|
-
S +=
|
|
3276
|
+
S += b(D);
|
|
3277
3277
|
} else
|
|
3278
3278
|
B === "certificatePolicies" && (S += E(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, E) {
|
|
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, w = Object.keys(u); R < w.length; R++) {
|
|
3900
3900
|
var C = w[R];
|
|
@@ -3909,9 +3909,9 @@ var PBMCustomShader = (
|
|
|
3909
3909
|
}), L = 0, O = H; L < O.length; L++) {
|
|
3910
3910
|
var F = O[L];
|
|
3911
3911
|
for (var N in F.defines)
|
|
3912
|
-
N in u || Object.assign(u, (
|
|
3912
|
+
N in u || Object.assign(u, (T = {}, T[N] = F.defines[N], T));
|
|
3913
3913
|
for (var D in F.uniforms)
|
|
3914
|
-
D in l || Object.assign(l, (
|
|
3914
|
+
D in l || Object.assign(l, (b = {}, b[D] = F.uniforms[D], b));
|
|
3915
3915
|
}
|
|
3916
3916
|
v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, H.map(function(V) {
|
|
3917
3917
|
return V.vertex.mainBefore;
|
|
@@ -3957,9 +3957,9 @@ var PBMCustomShader = (
|
|
|
3957
3957
|
}
|
|
3958
3958
|
};
|
|
3959
3959
|
var c = "";
|
|
3960
|
-
r.onBeforeRender = function(v, E,
|
|
3960
|
+
r.onBeforeRender = function(v, E, T, b, S, R) {
|
|
3961
3961
|
var w = 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 C = r.customShaders.filter(function(B) {
|
|
3964
3964
|
return B.type.includes(w);
|
|
3965
3965
|
}), I = C.map(function(B) {
|
|
@@ -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 E = u.USE_BLACK_TRANSITION,
|
|
4144
|
+
var E = 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
|
-
E !== u.USE_BLACK_TRANSITION && (S = !0),
|
|
4147
|
+
E !== 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 E = v === "CONSTANT",
|
|
4155
|
-
u.USE_COLOR_CONSTANT !== E && (u.USE_COLOR_CONSTANT = E, this.needsUpdate = !0), u.USE_COLOR_ALTITUDE !==
|
|
4154
|
+
var E = v === "CONSTANT", T = v === "ALTITUDE";
|
|
4155
|
+
u.USE_COLOR_CONSTANT !== E && (u.USE_COLOR_CONSTANT = E, 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
|
y !== v && (y = v, l.clippers.value = y.map(function(E) {
|
|
4208
|
-
var
|
|
4208
|
+
var T = typeof E.floorIndex == "number" ? E.floorIndex : -1, b = new THREE.Matrix4().getInverse(E.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 E = v[y];
|
|
4369
4369
|
E in uniformsLib || (s[E] = void 0);
|
|
4370
4370
|
}
|
|
4371
|
-
for (var
|
|
4371
|
+
for (var T = r.customShaders.filter(function(L) {
|
|
4372
4372
|
return L.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 w in R.uniforms)
|
|
4376
4376
|
w in s || Object.assign(s, (d = {}, d[w] = R.uniforms[w], d));
|
|
4377
4377
|
for (var C in R.defines)
|
|
4378
4378
|
C in o || Object.assign(o, (h = {}, h[C] = R.defines[C], 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(L) {
|
|
4381
4381
|
return L.vertex.mainBefore;
|
|
4382
4382
|
}).filter(function(L) {
|
|
4383
4383
|
return !!L;
|
|
4384
4384
|
}).join(`
|
|
4385
|
-
`)), c.vertexShader = c.vertexShader.replace(/MAIN_START/g,
|
|
4385
|
+
`)), c.vertexShader = c.vertexShader.replace(/MAIN_START/g, T.map(function(L) {
|
|
4386
4386
|
return L.vertex.mainStart;
|
|
4387
4387
|
}).filter(function(L) {
|
|
4388
4388
|
return !!L;
|
|
4389
4389
|
}).join(`
|
|
4390
|
-
`)), c.vertexShader = c.vertexShader.replace(/MAIN_END/g,
|
|
4390
|
+
`)), c.vertexShader = c.vertexShader.replace(/MAIN_END/g, T.map(function(L) {
|
|
4391
4391
|
return L.vertex.mainEnd;
|
|
4392
4392
|
}).filter(function(L) {
|
|
4393
4393
|
return !!L;
|
|
4394
4394
|
}).join(`
|
|
4395
|
-
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_BEFORE/g,
|
|
4395
|
+
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_BEFORE/g, T.map(function(L) {
|
|
4396
4396
|
return L.fragment.mainBefore;
|
|
4397
4397
|
}).filter(function(L) {
|
|
4398
4398
|
return !!L;
|
|
4399
4399
|
}).join(`
|
|
4400
|
-
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_START/g,
|
|
4400
|
+
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_START/g, T.map(function(L) {
|
|
4401
4401
|
return L.fragment.mainStart;
|
|
4402
4402
|
}).filter(function(L) {
|
|
4403
4403
|
return !!L;
|
|
4404
4404
|
}).join(`
|
|
4405
|
-
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_END/g,
|
|
4405
|
+
`)), c.fragmentShader = c.fragmentShader.replace(/MAIN_END/g, T.map(function(L) {
|
|
4406
4406
|
return L.fragment.mainEnd;
|
|
4407
4407
|
}).filter(function(L) {
|
|
4408
4408
|
return !!L;
|
|
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(L) {
|
|
4411
4411
|
return L.fragment.mainModelColor;
|
|
4412
4412
|
}).filter(function(L) {
|
|
4413
4413
|
return !!L;
|
|
@@ -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 B = 0, M =
|
|
4418
|
+
for (var B = 0, M = T; B < M.length; B++) {
|
|
4419
4419
|
var H = M[B];
|
|
4420
4420
|
H.onBeforeCompile && H.onBeforeCompile(c, f);
|
|
4421
4421
|
}
|
|
@@ -5220,12 +5220,12 @@ function ajax(n, t, e, r, o) {
|
|
|
5220
5220
|
};
|
|
5221
5221
|
h[d] = y, A.src = l, document.body.appendChild(A), typeof t.timeout == "number" && (p = window.setTimeout(g, t.timeout));
|
|
5222
5222
|
} else {
|
|
5223
|
-
var v = !1, E = new XMLHttpRequest(),
|
|
5224
|
-
E && (E.removeEventListener("timeout",
|
|
5225
|
-
},
|
|
5223
|
+
var v = !1, E = new XMLHttpRequest(), T = function() {
|
|
5224
|
+
E && (E.removeEventListener("timeout", b, !1), E.removeEventListener("progress", S, !1), E.removeEventListener("load", R, !1), E.removeEventListener("error", w, !1)), E = null, T = noop;
|
|
5225
|
+
}, b = function() {
|
|
5226
5226
|
var C;
|
|
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), (C = t.networkSubscribe) === null || C === void 0 || C.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 B = this.status;
|
|
5238
5238
|
if (B === 0 || B >= 200 && B < 400) {
|
|
5239
|
-
v = !0,
|
|
5239
|
+
v = !0, T();
|
|
5240
5240
|
var M = now(), H = M - s, L = parseHeaders(this.getAllResponseHeaders()), O = C.total, F = {
|
|
5241
5241
|
body: this.response,
|
|
5242
5242
|
meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: H, headers: L, size: O }
|
|
@@ -5248,12 +5248,12 @@ function ajax(n, t, e, r, o) {
|
|
|
5248
5248
|
}, w = function() {
|
|
5249
5249
|
var C;
|
|
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), (C = t.networkSubscribe) === null || C === void 0 || C.emit("network", l, "XMLHttpRequest", "error", I.message);
|
|
5254
5254
|
}
|
|
5255
5255
|
};
|
|
5256
|
-
E.addEventListener("timeout",
|
|
5256
|
+
E.addEventListener("timeout", b, !1), E.addEventListener("progress", S, !1), E.addEventListener("load", R, !1), E.addEventListener("error", w, !1), t.responseType && (E.responseType = t.responseType), typeof t.timeout == "number" && (E.timeout = t.timeout), E.open("GET", l, !0), E.send(null);
|
|
5257
5257
|
}
|
|
5258
5258
|
});
|
|
5259
5259
|
});
|
|
@@ -5328,8 +5328,8 @@ function loadImage(n, t, e, r, o, s) {
|
|
|
5328
5328
|
costs: v - u
|
|
5329
5329
|
};
|
|
5330
5330
|
p = !0;
|
|
5331
|
-
var
|
|
5332
|
-
o(1), e(
|
|
5331
|
+
var T = { body: h, meta: E };
|
|
5332
|
+
o(1), e(T), f(T), (y = t.networkSubscribe) === null || y === void 0 || y.emit("network", c, "Image", "ok", JSON.stringify(T.meta));
|
|
5333
5333
|
}
|
|
5334
5334
|
}, g = function() {
|
|
5335
5335
|
var y;
|
|
@@ -6001,20 +6001,20 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
6001
6001
|
return o(S), Promise.reject(S);
|
|
6002
6002
|
});
|
|
6003
6003
|
} else {
|
|
6004
|
-
var
|
|
6004
|
+
var T = null, b;
|
|
6005
6005
|
return Promise.resolve().then(function() {
|
|
6006
6006
|
return createImageBitmapLikeImage();
|
|
6007
6007
|
}).then(function(S) {
|
|
6008
|
-
return
|
|
6008
|
+
return b = S, e.fetcher.loadImage(t, { timeout: e.timeout }, void 0, void 0, s, S);
|
|
6009
6009
|
}).then(function(S) {
|
|
6010
|
-
return
|
|
6010
|
+
return T = S.meta, imageBitmapToTexture(S.body, e.maxSize);
|
|
6011
6011
|
}).then(function(S) {
|
|
6012
6012
|
return Object.assign(S, A), S;
|
|
6013
6013
|
}).then(function(S) {
|
|
6014
|
-
var R = { meta:
|
|
6014
|
+
var R = { meta: T, body: S };
|
|
6015
6015
|
return r(R), R;
|
|
6016
6016
|
}).catch(function(S) {
|
|
6017
|
-
return
|
|
6017
|
+
return b && b.close(), o(S), Promise.reject(S);
|
|
6018
6018
|
});
|
|
6019
6019
|
}
|
|
6020
6020
|
}, n.prototype.loadCubeTexture = function(t, e, r, o, s, u) {
|
|
@@ -6029,7 +6029,7 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
6029
6029
|
t[FACE_ORDER$2[3]],
|
|
6030
6030
|
t[FACE_ORDER$2[4]],
|
|
6031
6031
|
t[FACE_ORDER$2[5]]
|
|
6032
|
-
], y = [], v = [0, 0, 0, 0, 0, 0], E = [],
|
|
6032
|
+
], y = [], v = [0, 0, 0, 0, 0, 0], E = [], T = function(S) {
|
|
6033
6033
|
var R = (h = (d = e.imageURL) === null || d === void 0 ? void 0 : d.options) !== null && h !== void 0 ? h : { key: "unknown" }, w = applyImageURLOptions(g[S], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, R), { key: R.key + "." + FACE_ORDER$2[S] })), C = function(L) {
|
|
6034
6034
|
v[S] = L, s(v.reduce(function(O, F) {
|
|
6035
6035
|
return O + F;
|
|
@@ -6052,8 +6052,8 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
6052
6052
|
});
|
|
6053
6053
|
y.push(M);
|
|
6054
6054
|
}
|
|
6055
|
-
},
|
|
6056
|
-
b
|
|
6055
|
+
}, b = 0; b < 6; b++)
|
|
6056
|
+
T(b);
|
|
6057
6057
|
return Promise.all(y).then(function(S) {
|
|
6058
6058
|
return imageBitmapsToCubeTexture(S);
|
|
6059
6059
|
}).then(function(S) {
|
|
@@ -6616,8 +6616,8 @@ function requireWriter() {
|
|
|
6616
6616
|
};
|
|
6617
6617
|
c.create = f(), c.alloc = function(v) {
|
|
6618
6618
|
return new n.Array(v);
|
|
6619
|
-
}, n.Array !== Array && (c.alloc = n.pool(c.alloc, n.Array.prototype.subarray)), c.prototype._push = function(v, E,
|
|
6620
|
-
return this.tail = this.tail.next = new s(v, E,
|
|
6619
|
+
}, n.Array !== Array && (c.alloc = n.pool(c.alloc, n.Array.prototype.subarray)), c.prototype._push = function(v, E, T) {
|
|
6620
|
+
return this.tail = this.tail.next = new s(v, E, T), this.len += E, this;
|
|
6621
6621
|
};
|
|
6622
6622
|
function d(y, v, E) {
|
|
6623
6623
|
v[E] = y & 255;
|
|
@@ -6669,19 +6669,19 @@ function requireWriter() {
|
|
|
6669
6669
|
}, c.prototype.double = function(v) {
|
|
6670
6670
|
return this._push(n.float.writeDoubleLE, 8, v);
|
|
6671
6671
|
};
|
|
6672
|
-
var g = n.Array.prototype.set ? function(v, E,
|
|
6673
|
-
E.set(v,
|
|
6674
|
-
} : function(v, E,
|
|
6675
|
-
for (var
|
|
6676
|
-
E[
|
|
6672
|
+
var g = n.Array.prototype.set ? function(v, E, T) {
|
|
6673
|
+
E.set(v, T);
|
|
6674
|
+
} : function(v, E, T) {
|
|
6675
|
+
for (var b = 0; b < v.length; ++b)
|
|
6676
|
+
E[T + b] = v[b];
|
|
6677
6677
|
};
|
|
6678
6678
|
return c.prototype.bytes = function(v) {
|
|
6679
6679
|
var E = v.length >>> 0;
|
|
6680
6680
|
if (!E)
|
|
6681
6681
|
return this._push(d, 1, 0);
|
|
6682
6682
|
if (n.isString(v)) {
|
|
6683
|
-
var
|
|
6684
|
-
r.decode(v,
|
|
6683
|
+
var T = c.alloc(E = r.length(v));
|
|
6684
|
+
r.decode(v, T, 0), v = T;
|
|
6685
6685
|
}
|
|
6686
6686
|
return this.uint32(E)._push(g, E, v);
|
|
6687
6687
|
}, c.prototype.string = function(v) {
|
|
@@ -6692,11 +6692,11 @@ function requireWriter() {
|
|
|
6692
6692
|
}, c.prototype.reset = function() {
|
|
6693
6693
|
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;
|
|
6694
6694
|
}, c.prototype.ldelim = function() {
|
|
6695
|
-
var v = this.head, E = this.tail,
|
|
6696
|
-
return this.reset().uint32(
|
|
6695
|
+
var v = this.head, E = this.tail, T = this.len;
|
|
6696
|
+
return this.reset().uint32(T), T && (this.tail.next = v.next, this.tail = E, this.len += T), this;
|
|
6697
6697
|
}, c.prototype.finish = function() {
|
|
6698
|
-
for (var v = this.head.next, E = this.constructor.alloc(this.len),
|
|
6699
|
-
v.fn(v.val, E,
|
|
6698
|
+
for (var v = this.head.next, E = this.constructor.alloc(this.len), T = 0; v; )
|
|
6699
|
+
v.fn(v.val, E, T), T += v.len, v = v.next;
|
|
6700
6700
|
return E;
|
|
6701
6701
|
}, c._configure = function(y) {
|
|
6702
6702
|
t = y, c.create = f(), t._configure();
|
|
@@ -7373,35 +7373,35 @@ function loadPbm(n, t) {
|
|
|
7373
7373
|
return d.ajax(n, {
|
|
7374
7374
|
responseType: "arraybuffer"
|
|
7375
7375
|
});
|
|
7376
|
-
}).then(function(
|
|
7377
|
-
return E.byteLength =
|
|
7378
|
-
var
|
|
7379
|
-
return Model$2.decode(
|
|
7376
|
+
}).then(function(T) {
|
|
7377
|
+
return E.byteLength = T.body.byteLength, delay$1(function() {
|
|
7378
|
+
var b = new Uint8Array(T.body);
|
|
7379
|
+
return Model$2.decode(b);
|
|
7380
7380
|
});
|
|
7381
|
-
}).then(function(
|
|
7381
|
+
}).then(function(T) {
|
|
7382
7382
|
return delay$1(function() {
|
|
7383
|
-
return parse$4(
|
|
7383
|
+
return parse$4(T, f, h, p, m, A, d);
|
|
7384
7384
|
});
|
|
7385
|
-
}).then(function(
|
|
7385
|
+
}).then(function(T) {
|
|
7386
7386
|
A.clear();
|
|
7387
|
-
var
|
|
7388
|
-
|
|
7389
|
-
for (var S = 0, R =
|
|
7387
|
+
var b = new THREE.Group();
|
|
7388
|
+
b.name = n;
|
|
7389
|
+
for (var S = 0, R = T.objects; S < R.length; S++) {
|
|
7390
7390
|
var w = R[S];
|
|
7391
|
-
|
|
7391
|
+
b.add(w);
|
|
7392
7392
|
}
|
|
7393
|
-
return c === "Y" &&
|
|
7393
|
+
return c === "Y" && b.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
|
|
7394
7394
|
type: "pbm",
|
|
7395
7395
|
modelUpAxis: "Z",
|
|
7396
7396
|
upAxis: c,
|
|
7397
7397
|
uri: n,
|
|
7398
7398
|
byteLength: E.byteLength,
|
|
7399
|
-
memoryUsage: getMemoryUsage(
|
|
7400
|
-
scene:
|
|
7401
|
-
textures:
|
|
7399
|
+
memoryUsage: getMemoryUsage(b),
|
|
7400
|
+
scene: b,
|
|
7401
|
+
textures: T.textures,
|
|
7402
7402
|
animations: [],
|
|
7403
7403
|
dispose: function() {
|
|
7404
|
-
return
|
|
7404
|
+
return T.dispose();
|
|
7405
7405
|
}
|
|
7406
7406
|
};
|
|
7407
7407
|
});
|
|
@@ -7443,16 +7443,16 @@ function parsePBMModel(n) {
|
|
|
7443
7443
|
var h = v[y], E = parseFloorName(h.name);
|
|
7444
7444
|
g[E] || (g[E] = []), g[E].push(h);
|
|
7445
7445
|
}
|
|
7446
|
-
for (var
|
|
7447
|
-
var
|
|
7448
|
-
if (
|
|
7446
|
+
for (var T = 0; T < g.length; T++) {
|
|
7447
|
+
var b = g[T];
|
|
7448
|
+
if (b)
|
|
7449
7449
|
if (l) {
|
|
7450
|
-
for (var S = 0, R = 0; R <
|
|
7451
|
-
var h =
|
|
7450
|
+
for (var S = 0, R = 0; R < b.length; R++) {
|
|
7451
|
+
var h = b[R];
|
|
7452
7452
|
S += h.faces.indices.length;
|
|
7453
7453
|
}
|
|
7454
|
-
for (var w = new Float32Array(S * 3), C = new Float32Array(S * 2), I = new Float32Array(S * 3), B = c ? new Float32Array(S) : void 0, M = [], H = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], L = 0, O = 0; O <
|
|
7455
|
-
for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h =
|
|
7454
|
+
for (var w = new Float32Array(S * 3), C = new Float32Array(S * 2), I = new Float32Array(S * 3), B = c ? new Float32Array(S) : void 0, M = [], H = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], L = 0, O = 0; O < b.length; O++) {
|
|
7455
|
+
for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = b[O], N = h.vertices.xyz, D = h.vertices.uvs, q = h.faces.indices, z = h.faces.normals, Q = h.vertices.marks, j = q.length, R = 0; R < j; R++) {
|
|
7456
7456
|
var V = q[R], U = w[L * 3 + R * 3] = N[V * 3], G = w[L * 3 + R * 3 + 1] = N[V * 3 + 1], W = w[L * 3 + R * 3 + 2] = N[V * 3 + 2];
|
|
7457
7457
|
B && (B[L + R] = Q[V]), C[L * 2 + R * 2] = D[V * 2], C[L * 2 + R * 2 + 1] = D[V * 2 + 1];
|
|
7458
7458
|
var X = Math.floor(R / 3) * 3;
|
|
@@ -7475,20 +7475,20 @@ function parsePBMModel(n) {
|
|
|
7475
7475
|
normals: I,
|
|
7476
7476
|
masks: B,
|
|
7477
7477
|
indices: null,
|
|
7478
|
-
floorIndex:
|
|
7478
|
+
floorIndex: T,
|
|
7479
7479
|
groups: M,
|
|
7480
7480
|
extents: H
|
|
7481
7481
|
};
|
|
7482
7482
|
u.push(Z);
|
|
7483
7483
|
} else {
|
|
7484
|
-
for (var S = 0, Y = 0, R = 0; R <
|
|
7485
|
-
var h =
|
|
7484
|
+
for (var S = 0, Y = 0, R = 0; R < b.length; R++) {
|
|
7485
|
+
var h = b[R];
|
|
7486
7486
|
Y += h.vertices.xyz.length / 3, S += h.faces.indices.length;
|
|
7487
7487
|
}
|
|
7488
|
-
for (var w = new Float32Array(Y * 3), C = new Float32Array(Y * 2), I = void 0, K = new Float32Array(Y), ee = new Uint32Array(S), B = c ? new Float32Array(S) : void 0, M = [], H = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, L = 0, O = 0; O <
|
|
7489
|
-
for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h =
|
|
7488
|
+
for (var w = new Float32Array(Y * 3), C = new Float32Array(Y * 2), I = void 0, K = new Float32Array(Y), ee = new Uint32Array(S), B = c ? new Float32Array(S) : void 0, M = [], H = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, L = 0, O = 0; O < b.length; O++) {
|
|
7489
|
+
for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = b[O], N = h.vertices.xyz, re = h.vertices.marks, D = h.vertices.uvs, q = h.faces.indices, ie = N.length / 3, j = q.length, R = 0; R < ie; R++) {
|
|
7490
7490
|
var U = w[L * 3 + R * 3] = N[R * 3], G = w[L * 3 + R * 3 + 1] = N[R * 3 + 1], W = w[L * 3 + R * 3 + 2] = N[R * 3 + 2];
|
|
7491
|
-
B && (B[L + R] = re[R]), C[L * 2 + R * 2] = D[R * 2], C[L * 2 + R * 2 + 1] = D[R * 2 + 1], K[L + R] =
|
|
7491
|
+
B && (B[L + R] = re[R]), C[L * 2 + R * 2] = D[R * 2], C[L * 2 + R * 2 + 1] = D[R * 2 + 1], K[L + R] = T, U < F[0] && (F[0] = U), G < F[1] && (F[1] = G), W < F[2] && (F[2] = W), U > F[3] && (F[3] = U), G > F[4] && (F[4] = G), W > F[5] && (F[5] = W);
|
|
7492
7492
|
}
|
|
7493
7493
|
F[0] < H[0] && (H[0] = F[0]), F[1] < H[1] && (H[1] = F[1]), F[2] < H[2] && (H[2] = F[2]), F[3] > H[3] && (H[3] = F[3]), F[4] > H[4] && (H[4] = F[4]), F[5] > H[5] && (H[5] = F[5]);
|
|
7494
7494
|
for (var R = 0; R < j; R++)
|
|
@@ -7510,7 +7510,7 @@ function parsePBMModel(n) {
|
|
|
7510
7510
|
normals: I,
|
|
7511
7511
|
masks: B,
|
|
7512
7512
|
indices: ee,
|
|
7513
|
-
floorIndex:
|
|
7513
|
+
floorIndex: T,
|
|
7514
7514
|
groups: M,
|
|
7515
7515
|
extents: H
|
|
7516
7516
|
};
|
|
@@ -7539,10 +7539,10 @@ function loadTexture$1(n, t, e, r) {
|
|
|
7539
7539
|
}
|
|
7540
7540
|
function parse$4(n, t, e, r, o, s, u) {
|
|
7541
7541
|
for (var l = parsePBMModel(n), c = 0, f = "", d = [], h = {}, p = /* @__PURE__ */ new Set(), m = 0, A = 0, g = l; A < g.length; A++) {
|
|
7542
|
-
var y = g[A], v = y.createAt, E = y.description,
|
|
7542
|
+
var y = g[A], v = y.createAt, E = y.description, T = y.vertices, b = y.masks, S = y.uvs, R = y.normals, w = y.indices, C = y.floorIndex, I = y.groups, B = y.extents, M = new THREE.Box3();
|
|
7543
7543
|
M.min.x = B[0], M.min.y = B[1], M.min.z = B[2], M.max.x = B[3], M.max.y = B[4], M.max.z = B[5];
|
|
7544
7544
|
var H = new THREE.BufferGeometry();
|
|
7545
|
-
H.setAttribute("position", new THREE.BufferAttribute(
|
|
7545
|
+
H.setAttribute("position", new THREE.BufferAttribute(T, 3)), H.setAttribute("uv", new THREE.BufferAttribute(S, 2)), R && H.setAttribute("normal", new THREE.BufferAttribute(R, 3)), b && H.setAttribute("_feature_id_rsmask", new THREE.BufferAttribute(b, 1)), w && H.setIndex(new THREE.BufferAttribute(w, 1)), H.boundingBox = M, H.boundingSphere = M.getBoundingSphere(new THREE.Sphere());
|
|
7546
7546
|
for (var L = 0, O = I; L < O.length; L++) {
|
|
7547
7547
|
var F = O[L];
|
|
7548
7548
|
H.addGroup(F.start, F.count, F.materialIndex);
|
|
@@ -7969,44 +7969,44 @@ function loadAt3d(n, t) {
|
|
|
7969
7969
|
return d.ajax(n, {
|
|
7970
7970
|
responseType: "arraybuffer"
|
|
7971
7971
|
});
|
|
7972
|
-
}).then(function(
|
|
7973
|
-
return lzma(
|
|
7974
|
-
}).then(function(
|
|
7972
|
+
}).then(function(T) {
|
|
7973
|
+
return lzma(T.body);
|
|
7974
|
+
}).then(function(T) {
|
|
7975
7975
|
return delay$1(function() {
|
|
7976
|
-
for (var
|
|
7976
|
+
for (var b, S = {
|
|
7977
7977
|
chunks: [],
|
|
7978
7978
|
createAt: void 0,
|
|
7979
7979
|
description: void 0
|
|
7980
|
-
}, R = 0, w =
|
|
7980
|
+
}, R = 0, w = T; R < w.length; R++) {
|
|
7981
7981
|
var C = w[R], I = Model$2.decode(C);
|
|
7982
|
-
I.chunks.length && ((
|
|
7982
|
+
I.chunks.length && ((b = S.chunks).push.apply(b, I.chunks), S.createAt = I.createAt, S.description = I.description);
|
|
7983
7983
|
}
|
|
7984
7984
|
return S;
|
|
7985
7985
|
});
|
|
7986
|
-
}).then(function(
|
|
7986
|
+
}).then(function(T) {
|
|
7987
7987
|
return delay$1(function() {
|
|
7988
|
-
return parse$4(
|
|
7988
|
+
return parse$4(T, f, h, p, m, A, d);
|
|
7989
7989
|
});
|
|
7990
|
-
}).then(function(
|
|
7990
|
+
}).then(function(T) {
|
|
7991
7991
|
A.clear();
|
|
7992
|
-
var
|
|
7993
|
-
|
|
7994
|
-
for (var S = 0, R =
|
|
7992
|
+
var b = new THREE.Group();
|
|
7993
|
+
b.name = n;
|
|
7994
|
+
for (var S = 0, R = T.objects; S < R.length; S++) {
|
|
7995
7995
|
var w = R[S];
|
|
7996
|
-
|
|
7996
|
+
b.add(w);
|
|
7997
7997
|
}
|
|
7998
|
-
return c === "Y" &&
|
|
7998
|
+
return c === "Y" && b.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
|
|
7999
7999
|
type: "at3d",
|
|
8000
8000
|
modelUpAxis: "Z",
|
|
8001
8001
|
upAxis: c,
|
|
8002
8002
|
uri: n,
|
|
8003
8003
|
byteLength: E.byteLength,
|
|
8004
|
-
memoryUsage: getMemoryUsage(
|
|
8005
|
-
scene:
|
|
8006
|
-
textures:
|
|
8004
|
+
memoryUsage: getMemoryUsage(b),
|
|
8005
|
+
scene: b,
|
|
8006
|
+
textures: T.textures,
|
|
8007
8007
|
animations: [],
|
|
8008
8008
|
dispose: function() {
|
|
8009
|
-
return
|
|
8009
|
+
return T.dispose();
|
|
8010
8010
|
}
|
|
8011
8011
|
};
|
|
8012
8012
|
});
|
|
@@ -8556,22 +8556,22 @@ function fromProtoBuf(n) {
|
|
|
8556
8556
|
}
|
|
8557
8557
|
function parse$3(n, t, e, r, o) {
|
|
8558
8558
|
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(), y = 0, v = c; y < v.length; y++) {
|
|
8559
|
-
var E = v[y],
|
|
8560
|
-
if (!(
|
|
8559
|
+
var E = v[y], T = E.name, b = E.chunks, S = E.matrix;
|
|
8560
|
+
if (!(T === "Ceiling" || T === "CeilingDrop"))
|
|
8561
8561
|
for (var R = 0, w = S; R < w.length; R++) {
|
|
8562
8562
|
var C = w[R];
|
|
8563
8563
|
d.elements = C.elements;
|
|
8564
|
-
for (var I = new THREE.Group(), B = 0; B <
|
|
8565
|
-
var M = parseGeometry(
|
|
8564
|
+
for (var I = new THREE.Group(), B = 0; B < b.length; B++) {
|
|
8565
|
+
var M = parseGeometry(b[B].geometry);
|
|
8566
8566
|
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);
|
|
8567
|
-
for (var H = [], L = 0, O =
|
|
8567
|
+
for (var H = [], L = 0, O = b[B].material; L < O.length; L++) {
|
|
8568
8568
|
var F = O[L], N = parseMaterial(F, t, e || "", r, f, o, A, l, g), D = N.material, q = N.textureReady;
|
|
8569
8569
|
u.push(q), H.push(D);
|
|
8570
8570
|
}
|
|
8571
8571
|
var z = new PBMMesh(M, H);
|
|
8572
8572
|
z.name = "chunk_" + B, z.matrix.compose(z.position, z.quaternion, z.scale), z.matrixAutoUpdate = !1, z.frustumCulled = !1, I.add(z);
|
|
8573
8573
|
}
|
|
8574
|
-
I.name =
|
|
8574
|
+
I.name = T, s.push(I);
|
|
8575
8575
|
}
|
|
8576
8576
|
}
|
|
8577
8577
|
return Promise.all(u).catch(noop).then(function() {
|
|
@@ -8984,8 +8984,8 @@ var Parser = (
|
|
|
8984
8984
|
}
|
|
8985
8985
|
if (!o) {
|
|
8986
8986
|
for (var c = this.json, f = c.animations[t], d = [], h = [], p = [], m = [], A = [], g = 0, y = f.channels.length; g < y; g++) {
|
|
8987
|
-
var v = f.channels[g], E = f.samplers[v.sampler],
|
|
8988
|
-
d.push(this.loadNode(
|
|
8987
|
+
var v = f.channels[g], E = f.samplers[v.sampler], T = v.target, b = T.node !== void 0 ? T.node : T.id, S = f.parameters !== void 0 ? f.parameters[E.input] : E.input, R = f.parameters !== void 0 ? f.parameters[E.output] : E.output;
|
|
8988
|
+
d.push(this.loadNode(b)), h.push(this.loadAccessor(S)), p.push(this.loadAccessor(R)), m.push(E), A.push(T);
|
|
8989
8989
|
}
|
|
8990
8990
|
o = Promise.all([
|
|
8991
8991
|
Promise.all(d),
|
|
@@ -9086,8 +9086,8 @@ var Parser = (
|
|
|
9086
9086
|
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) {
|
|
9087
9087
|
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, y = u.normalized === !0, v, E;
|
|
9088
9088
|
if (g && g !== m) {
|
|
9089
|
-
var
|
|
9090
|
-
S || (v = new h(f,
|
|
9089
|
+
var T = Math.floor(A / g), b = "InterleavedBuffer:" + u.bufferView + ":" + u.componentType + ":" + T + ":" + u.count, S = e.cache.get(b);
|
|
9090
|
+
S || (v = new h(f, T * g, u.count * g / p), S = new THREE.InterleavedBuffer(v, g / p), e.cache.set(b, S)), E = new THREE.InterleavedBufferAttribute(S, d, A % g / p, y);
|
|
9091
9091
|
} else
|
|
9092
9092
|
f === null ? v = new h(u.count * d) : v = new h(f, A, u.count * d), E = new THREE.BufferAttribute(v, d, y);
|
|
9093
9093
|
if (u.sparse !== void 0) {
|
|
@@ -9301,47 +9301,47 @@ var Parser = (
|
|
|
9301
9301
|
return e.loadMaterial(h);
|
|
9302
9302
|
}));
|
|
9303
9303
|
r = Promise.all([f, d]).then(function(h) {
|
|
9304
|
-
for (var p = h[0],
|
|
9305
|
-
var
|
|
9304
|
+
for (var p, m = h[0], A = h[1], g = [], y = 0; y < c.length; y++) {
|
|
9305
|
+
var v = c[y], E = m[y], T = A[y], b = (p = v.mode) !== null && p !== void 0 ? p : WEBGL_CONSTANTS.TRIANGLES, S = void 0;
|
|
9306
9306
|
if (b === WEBGL_CONSTANTS.TRIANGLES || b === WEBGL_CONSTANTS.TRIANGLE_STRIP || b === WEBGL_CONSTANTS.TRIANGLE_FAN)
|
|
9307
|
-
if (b === WEBGL_CONSTANTS.TRIANGLE_STRIP ?
|
|
9308
|
-
var
|
|
9309
|
-
|
|
9307
|
+
if (b === WEBGL_CONSTANTS.TRIANGLE_STRIP ? E = e.toGeometryTrianglesDrawMode(E, THREE.TriangleStripDrawMode) : b === WEBGL_CONSTANTS.TRIANGLE_FAN && (E = e.toGeometryTrianglesDrawMode(E, THREE.TriangleFanDrawMode)), e.disposeSet.add(E), l.isSkinnedMesh) {
|
|
9308
|
+
var R = new THREE.SkinnedMesh(E, T);
|
|
9309
|
+
E.attributes.skinWeight.normalized || R.normalizeSkinWeights(), S = R;
|
|
9310
9310
|
} else
|
|
9311
|
-
|
|
9311
|
+
S = new THREE.Mesh(E, T);
|
|
9312
9312
|
else if (b === WEBGL_CONSTANTS.POINTS)
|
|
9313
|
-
|
|
9313
|
+
S = new THREE.Points(E, T);
|
|
9314
9314
|
else if (b === WEBGL_CONSTANTS.LINES)
|
|
9315
|
-
|
|
9315
|
+
S = new THREE.LineSegments(E, T);
|
|
9316
9316
|
else if (b === WEBGL_CONSTANTS.LINE_STRIP)
|
|
9317
|
-
|
|
9317
|
+
S = new THREE.Line(E, T);
|
|
9318
9318
|
else if (b === WEBGL_CONSTANTS.LINE_LOOP)
|
|
9319
|
-
|
|
9319
|
+
S = new THREE.LineLoop(E, T);
|
|
9320
9320
|
else
|
|
9321
9321
|
throw new Error("glTF: Primitive mode unsupported: " + b);
|
|
9322
|
-
if (Object.keys(
|
|
9322
|
+
if (Object.keys(E.morphAttributes).length > 0) {
|
|
9323
9323
|
if (l.weights !== void 0)
|
|
9324
|
-
for (var
|
|
9325
|
-
|
|
9324
|
+
for (var w = 0, C = l.weights.length; w < C; w++)
|
|
9325
|
+
S.morphTargetInfluences[w] = l.weights[w];
|
|
9326
9326
|
if (l.extras && Array.isArray(l.extras.targetNames)) {
|
|
9327
|
-
var
|
|
9328
|
-
if (
|
|
9329
|
-
|
|
9330
|
-
for (var
|
|
9331
|
-
|
|
9327
|
+
var I = l.extras.targetNames;
|
|
9328
|
+
if (S.morphTargetInfluences.length === I.length) {
|
|
9329
|
+
S.morphTargetDictionary = {};
|
|
9330
|
+
for (var w = 0, C = I.length; w < C; w++)
|
|
9331
|
+
S.morphTargetDictionary[I[w]] = w;
|
|
9332
9332
|
} else
|
|
9333
9333
|
console.warn("glTF: Invalid extras.targetNames length. Ignoring names.");
|
|
9334
9334
|
}
|
|
9335
9335
|
}
|
|
9336
|
-
|
|
9336
|
+
S.name = l.name || "mesh_" + t, m.length > 1 && (S.name += "_" + y), e.assignFinalMaterial(S), g.push(S);
|
|
9337
9337
|
}
|
|
9338
|
-
if (
|
|
9339
|
-
return
|
|
9340
|
-
for (var
|
|
9341
|
-
var
|
|
9342
|
-
|
|
9338
|
+
if (g.length === 1)
|
|
9339
|
+
return g[0];
|
|
9340
|
+
for (var B = new THREE.Group(), M = 0, H = g; M < H.length; M++) {
|
|
9341
|
+
var S = H[M];
|
|
9342
|
+
B.add(S);
|
|
9343
9343
|
}
|
|
9344
|
-
return
|
|
9344
|
+
return B;
|
|
9345
9345
|
});
|
|
9346
9346
|
}
|
|
9347
9347
|
return r;
|
|
@@ -9440,9 +9440,9 @@ var Parser = (
|
|
|
9440
9440
|
var A = e.targets;
|
|
9441
9441
|
if (A !== void 0) {
|
|
9442
9442
|
for (var g = new THREE.Vector3(), y = new THREE.Vector3(), v = 0, E = A.length; v < E; v++) {
|
|
9443
|
-
var
|
|
9444
|
-
if (
|
|
9445
|
-
var d = this.json.accessors[
|
|
9443
|
+
var T = A[v];
|
|
9444
|
+
if (T.POSITION !== void 0) {
|
|
9445
|
+
var d = this.json.accessors[T.POSITION], h = d.min, p = d.max;
|
|
9446
9446
|
if (h !== void 0 && p !== void 0) {
|
|
9447
9447
|
if (y.setX(Math.max(Math.abs(h[0]), Math.abs(p[0]))), y.setY(Math.max(Math.abs(h[1]), Math.abs(p[1]))), y.setZ(Math.max(Math.abs(h[2]), Math.abs(p[2]))), d.normalized) {
|
|
9448
9448
|
var m = getNormalizedComponentScale(WEBGL_COMPONENT_TYPES[d.componentType]);
|
|
@@ -9456,8 +9456,8 @@ var Parser = (
|
|
|
9456
9456
|
f.expandByVector(g);
|
|
9457
9457
|
}
|
|
9458
9458
|
t.boundingBox = f;
|
|
9459
|
-
var
|
|
9460
|
-
return f.getCenter(
|
|
9459
|
+
var b = new THREE.Sphere();
|
|
9460
|
+
return f.getCenter(b.center), b.radius = f.min.distanceTo(f.max) / 2, t.boundingSphere = b, Promise.all(s).then(function() {
|
|
9461
9461
|
if (t.attributes.uv && !t.attributes.uv2 && r.options.copyUV2 && t.setAttribute("uv2", t.attributes.uv), e.targets) {
|
|
9462
9462
|
for (var S = !1, R = !1, w = 0, C = e.targets.length; w < C; w++) {
|
|
9463
9463
|
var I = e.targets[w];
|
|
@@ -10013,8 +10013,8 @@ var BaseExtension = (
|
|
|
10013
10013
|
return new Promise(function(g) {
|
|
10014
10014
|
draco.decodeDracoFile(A, function(y) {
|
|
10015
10015
|
for (var v in y.attributes) {
|
|
10016
|
-
var E = y.attributes[v],
|
|
10017
|
-
|
|
10016
|
+
var E = y.attributes[v], T = c[v];
|
|
10017
|
+
T !== void 0 && (E.normalized = T);
|
|
10018
10018
|
}
|
|
10019
10019
|
g(y);
|
|
10020
10020
|
}, l, f);
|
|
@@ -10511,19 +10511,19 @@ var BaseExtension = (
|
|
|
10511
10511
|
s = v.instance, s.exports.__wasm_call_ctors();
|
|
10512
10512
|
});
|
|
10513
10513
|
function l(v) {
|
|
10514
|
-
for (var E = new Uint8Array(v.length),
|
|
10515
|
-
var
|
|
10516
|
-
E[
|
|
10514
|
+
for (var E = new Uint8Array(v.length), T = 0; T < v.length; ++T) {
|
|
10515
|
+
var b = v.charCodeAt(T);
|
|
10516
|
+
E[T] = b > 96 ? b - 97 : b > 64 ? b - 39 : b + 4;
|
|
10517
10517
|
}
|
|
10518
|
-
for (var S = 0,
|
|
10519
|
-
E[S++] = E[
|
|
10518
|
+
for (var S = 0, T = 0; T < v.length; ++T)
|
|
10519
|
+
E[S++] = E[T] < 60 ? r[E[T]] : (E[T] - 60) * 64 + E[++T];
|
|
10520
10520
|
return E.buffer.slice(0, S);
|
|
10521
10521
|
}
|
|
10522
|
-
function c(v, E,
|
|
10523
|
-
var w = s.exports.sbrk, C =
|
|
10522
|
+
function c(v, E, T, b, S, R) {
|
|
10523
|
+
var w = s.exports.sbrk, C = T + 3 & -4, I = w(C * b), B = w(S.length), M = new Uint8Array(s.exports.memory.buffer);
|
|
10524
10524
|
M.set(S, B);
|
|
10525
|
-
var H = v(I,
|
|
10526
|
-
if (H == 0 && R && R(I, C,
|
|
10525
|
+
var H = v(I, T, b, B, S.length);
|
|
10526
|
+
if (H == 0 && R && R(I, C, b), E.set(M.subarray(I, I + T * b)), w(I - w(0)), H != 0)
|
|
10527
10527
|
throw new Error("Malformed buffer data: " + H);
|
|
10528
10528
|
}
|
|
10529
10529
|
var f = {
|
|
@@ -10542,32 +10542,32 @@ var BaseExtension = (
|
|
|
10542
10542
|
pending: 0,
|
|
10543
10543
|
requests: {}
|
|
10544
10544
|
};
|
|
10545
|
-
return E.object.onmessage = function(
|
|
10546
|
-
var
|
|
10547
|
-
E.pending -=
|
|
10545
|
+
return E.object.onmessage = function(T) {
|
|
10546
|
+
var b = T.data;
|
|
10547
|
+
E.pending -= b.count, E.requests[b.id][b.action](b.value), delete E.requests[b.id];
|
|
10548
10548
|
}, E;
|
|
10549
10549
|
}
|
|
10550
10550
|
function A(v) {
|
|
10551
|
-
for (var E = "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() + y.toString(),
|
|
10552
|
-
h[S] = m(
|
|
10553
|
-
URL.revokeObjectURL(
|
|
10551
|
+
for (var E = "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() + y.toString(), T = new Blob([E], { type: "text/javascript" }), b = URL.createObjectURL(T), S = 0; S < v; ++S)
|
|
10552
|
+
h[S] = m(b);
|
|
10553
|
+
URL.revokeObjectURL(b);
|
|
10554
10554
|
}
|
|
10555
|
-
function g(v, E,
|
|
10555
|
+
function g(v, E, T, b, S) {
|
|
10556
10556
|
for (var R = h[0], w = 1; w < h.length; ++w)
|
|
10557
10557
|
h[w].pending < R.pending && (R = h[w]);
|
|
10558
10558
|
return new Promise(function(C, I) {
|
|
10559
|
-
var B = new Uint8Array(
|
|
10560
|
-
R.pending += v, R.requests[M] = { resolve: C, reject: I }, R.object.postMessage({ id: M, count: v, size: E, source: B, mode:
|
|
10559
|
+
var B = new Uint8Array(T), M = p++;
|
|
10560
|
+
R.pending += v, R.requests[M] = { resolve: C, reject: I }, R.object.postMessage({ id: M, count: v, size: E, source: B, mode: b, filter: S }, [B.buffer]);
|
|
10561
10561
|
});
|
|
10562
10562
|
}
|
|
10563
10563
|
function y(v) {
|
|
10564
10564
|
u.then(function() {
|
|
10565
10565
|
var E = v.data;
|
|
10566
10566
|
try {
|
|
10567
|
-
var
|
|
10568
|
-
c(s.exports[E.mode],
|
|
10569
|
-
} catch (
|
|
10570
|
-
self.postMessage({ id: E.id, count: E.count, action: "reject", value:
|
|
10567
|
+
var T = new Uint8Array(E.count * E.size);
|
|
10568
|
+
c(s.exports[E.mode], T, E.count, E.size, E.source, s.exports[E.filter]), self.postMessage({ id: E.id, count: E.count, action: "resolve", value: T }, [T.buffer]);
|
|
10569
|
+
} catch (b) {
|
|
10570
|
+
self.postMessage({ id: E.id, count: E.count, action: "reject", value: b });
|
|
10571
10571
|
}
|
|
10572
10572
|
});
|
|
10573
10573
|
}
|
|
@@ -10577,22 +10577,22 @@ var BaseExtension = (
|
|
|
10577
10577
|
useWorkers: function(v) {
|
|
10578
10578
|
A(v);
|
|
10579
10579
|
},
|
|
10580
|
-
decodeVertexBuffer: function(v, E,
|
|
10581
|
-
c(s.exports.meshopt_decodeVertexBuffer, v, E,
|
|
10580
|
+
decodeVertexBuffer: function(v, E, T, b, S) {
|
|
10581
|
+
c(s.exports.meshopt_decodeVertexBuffer, v, E, T, b, s.exports[f[S]]);
|
|
10582
10582
|
},
|
|
10583
|
-
decodeIndexBuffer: function(v, E,
|
|
10584
|
-
c(s.exports.meshopt_decodeIndexBuffer, v, E,
|
|
10583
|
+
decodeIndexBuffer: function(v, E, T, b) {
|
|
10584
|
+
c(s.exports.meshopt_decodeIndexBuffer, v, E, T, b);
|
|
10585
10585
|
},
|
|
10586
|
-
decodeIndexSequence: function(v, E,
|
|
10587
|
-
c(s.exports.meshopt_decodeIndexSequence, v, E,
|
|
10586
|
+
decodeIndexSequence: function(v, E, T, b) {
|
|
10587
|
+
c(s.exports.meshopt_decodeIndexSequence, v, E, T, b);
|
|
10588
10588
|
},
|
|
10589
|
-
decodeGltfBuffer: function(v, E,
|
|
10590
|
-
c(s.exports[d[S]], v, E,
|
|
10589
|
+
decodeGltfBuffer: function(v, E, T, b, S, R) {
|
|
10590
|
+
c(s.exports[d[S]], v, E, T, b, s.exports[f[R]]);
|
|
10591
10591
|
},
|
|
10592
|
-
decodeGltfBufferAsync: function(v, E,
|
|
10593
|
-
return h.length > 0 ? g(v, E,
|
|
10592
|
+
decodeGltfBufferAsync: function(v, E, T, b, S) {
|
|
10593
|
+
return h.length > 0 ? g(v, E, T, d[b], f[S]) : u.then(function() {
|
|
10594
10594
|
var R = new Uint8Array(v * E);
|
|
10595
|
-
return c(s.exports[d[
|
|
10595
|
+
return c(s.exports[d[b]], R, v, E, T, s.exports[f[S]]), R;
|
|
10596
10596
|
});
|
|
10597
10597
|
}
|
|
10598
10598
|
};
|
|
@@ -10677,41 +10677,41 @@ var BaseExtension = (
|
|
|
10677
10677
|
})), c = Promise.all(u.map(function(d) {
|
|
10678
10678
|
return o.loadPBMMaterial(d, r);
|
|
10679
10679
|
})), f = Promise.all([l, c]).then(function(d) {
|
|
10680
|
-
for (var h = d[0],
|
|
10681
|
-
var
|
|
10682
|
-
if (
|
|
10683
|
-
if (
|
|
10684
|
-
var
|
|
10685
|
-
|
|
10680
|
+
for (var h, p = d[0], m = d[1], A = [], g = 0; g < u.length; g++) {
|
|
10681
|
+
var y = u[g], v = p[g], E = m[g], T = (h = y.mode) !== null && h !== void 0 ? h : WEBGL_CONSTANTS.TRIANGLES, b = void 0;
|
|
10682
|
+
if (T === WEBGL_CONSTANTS.TRIANGLES || T === WEBGL_CONSTANTS.TRIANGLE_STRIP || T === WEBGL_CONSTANTS.TRIANGLE_FAN)
|
|
10683
|
+
if (T === WEBGL_CONSTANTS.TRIANGLE_STRIP ? v = r.toGeometryTrianglesDrawMode(v, THREE.TriangleStripDrawMode) : T === WEBGL_CONSTANTS.TRIANGLE_FAN && (v = r.toGeometryTrianglesDrawMode(v, THREE.TriangleFanDrawMode)), v.clearGroups(), v.addGroup(0, v.index ? v.index.count : v.attributes.position.count, 0), r.disposeSet.add(v), s.isSkinnedMesh) {
|
|
10684
|
+
var S = new PBMSkinnedMesh(v, [E]);
|
|
10685
|
+
v.attributes.skinWeight.normalized || S.normalizeSkinWeights(), b = S;
|
|
10686
10686
|
} else
|
|
10687
|
-
b = new PBMMesh(
|
|
10688
|
-
else if (
|
|
10689
|
-
b = new PBMPointCloud(
|
|
10687
|
+
b = new PBMMesh(v, [E]);
|
|
10688
|
+
else if (T === WEBGL_CONSTANTS.POINTS)
|
|
10689
|
+
b = new PBMPointCloud(v, E);
|
|
10690
10690
|
else
|
|
10691
|
-
throw new Error("glTF: Primitive mode unsupported: " +
|
|
10692
|
-
if (Object.keys(
|
|
10691
|
+
throw new Error("glTF: Primitive mode unsupported: " + T);
|
|
10692
|
+
if (Object.keys(v.morphAttributes).length > 0) {
|
|
10693
10693
|
if (s.weights !== void 0)
|
|
10694
|
-
for (var
|
|
10695
|
-
b.morphTargetInfluences[
|
|
10694
|
+
for (var R = 0, w = s.weights.length; R < w; R++)
|
|
10695
|
+
b.morphTargetInfluences[R] = s.weights[R];
|
|
10696
10696
|
if (s.extras && Array.isArray(s.extras.targetNames)) {
|
|
10697
|
-
var
|
|
10698
|
-
if (b.morphTargetInfluences.length ===
|
|
10697
|
+
var C = s.extras.targetNames;
|
|
10698
|
+
if (b.morphTargetInfluences.length === C.length) {
|
|
10699
10699
|
b.morphTargetDictionary = {};
|
|
10700
|
-
for (var
|
|
10701
|
-
b.morphTargetDictionary[
|
|
10700
|
+
for (var R = 0, w = C.length; R < w; R++)
|
|
10701
|
+
b.morphTargetDictionary[C[R]] = R;
|
|
10702
10702
|
} else
|
|
10703
10703
|
console.warn("glTF: Invalid extras.targetNames length. Ignoring names.");
|
|
10704
10704
|
}
|
|
10705
10705
|
}
|
|
10706
|
-
b.name = s.name || "mesh_" + e, r.assignFinalMaterial(b),
|
|
10706
|
+
b.name = s.name || "mesh_" + e, r.assignFinalMaterial(b), A.push(b);
|
|
10707
10707
|
}
|
|
10708
|
-
if (
|
|
10709
|
-
return
|
|
10710
|
-
for (var
|
|
10711
|
-
var b = B
|
|
10712
|
-
|
|
10708
|
+
if (A.length === 1)
|
|
10709
|
+
return A[0];
|
|
10710
|
+
for (var I = new THREE.Group(), B = 0, M = A; B < M.length; B++) {
|
|
10711
|
+
var b = M[B];
|
|
10712
|
+
I.add(b);
|
|
10713
10713
|
}
|
|
10714
|
-
return
|
|
10714
|
+
return I;
|
|
10715
10715
|
});
|
|
10716
10716
|
return f;
|
|
10717
10717
|
}, t.prototype.loadPBMMaterial = function(e, r) {
|
|
@@ -10961,8 +10961,8 @@ function parseDraco(n, t) {
|
|
|
10961
10961
|
if (p)
|
|
10962
10962
|
A = p;
|
|
10963
10963
|
else if (h) {
|
|
10964
|
-
for (var g = h.count, y = h.array, v = new Uint8Array(g * 4), E = 0,
|
|
10965
|
-
|
|
10964
|
+
for (var g = h.count, y = h.array, v = new Uint8Array(g * 4), E = 0, T = void 0, b = void 0; E < g; E++)
|
|
10965
|
+
b = E * 4, T = E * 3, v[b] = y[T], v[++b] = y[++T], v[++b] = y[++T];
|
|
10966
10966
|
A = new THREE.BufferAttribute(v, 4, h.normalized);
|
|
10967
10967
|
}
|
|
10968
10968
|
return {
|
|
@@ -11680,12 +11680,12 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11680
11680
|
for (var H = max(B), L = (1 << H) - 1, O = hMap(B, H, 1), M = 0; M < C; ) {
|
|
11681
11681
|
var F = O[bits(n, h, L)];
|
|
11682
11682
|
h += F & 15;
|
|
11683
|
-
var
|
|
11684
|
-
if (
|
|
11685
|
-
I[M++] =
|
|
11683
|
+
var T = F >> 4;
|
|
11684
|
+
if (T < 16)
|
|
11685
|
+
I[M++] = T;
|
|
11686
11686
|
else {
|
|
11687
11687
|
var N = 0, D = 0;
|
|
11688
|
-
for (
|
|
11688
|
+
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--; )
|
|
11689
11689
|
I[M++] = N;
|
|
11690
11690
|
}
|
|
11691
11691
|
}
|
|
@@ -11694,12 +11694,12 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11694
11694
|
} else
|
|
11695
11695
|
err(1);
|
|
11696
11696
|
else {
|
|
11697
|
-
var
|
|
11697
|
+
var T = shft(h) + 4, b = n[T - 4] | n[T - 3] << 8, S = T + b;
|
|
11698
11698
|
if (S > o) {
|
|
11699
11699
|
c && err(0);
|
|
11700
11700
|
break;
|
|
11701
11701
|
}
|
|
11702
|
-
l && f(p +
|
|
11702
|
+
l && f(p + b), e.set(n.subarray(T, S), p), t.b = p += b, t.p = h = S * 8, t.f = d;
|
|
11703
11703
|
continue;
|
|
11704
11704
|
}
|
|
11705
11705
|
if (h > v) {
|
|
@@ -11879,12 +11879,12 @@ var FBXTreeParser = (
|
|
|
11879
11879
|
return n.prototype.parse = function(t) {
|
|
11880
11880
|
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);
|
|
11881
11881
|
this.parseScene(t, A, g, m, c, f);
|
|
11882
|
-
var y = (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, E = (l = (u = t.GlobalSettings.UnitScaleFactor) === null || u === void 0 ? void 0 : u.value) !== null && l !== void 0 ? l : 1,
|
|
11882
|
+
var y = (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, E = (l = (u = t.GlobalSettings.UnitScaleFactor) === null || u === void 0 ? void 0 : u.value) !== null && l !== void 0 ? l : 1, T;
|
|
11883
11883
|
if (t.GlobalSettings.AmbientColor) {
|
|
11884
|
-
var
|
|
11884
|
+
var b = t.GlobalSettings.AmbientColor.value, S = b[0], R = b[1], w = b[2];
|
|
11885
11885
|
if (S !== 0 || R !== 0 || w !== 0) {
|
|
11886
11886
|
var C = new THREE.Color().setRGB(S, R, w);
|
|
11887
|
-
|
|
11887
|
+
T = new THREE.AmbientLight(C, 1);
|
|
11888
11888
|
}
|
|
11889
11889
|
}
|
|
11890
11890
|
return Promise.all(d).then(function(I) {
|
|
@@ -11892,7 +11892,7 @@ var FBXTreeParser = (
|
|
|
11892
11892
|
return {
|
|
11893
11893
|
scene: f,
|
|
11894
11894
|
textures: I,
|
|
11895
|
-
ambientLight:
|
|
11895
|
+
ambientLight: T,
|
|
11896
11896
|
upAxis: ["X", "Y", "Z"][y],
|
|
11897
11897
|
frontAxis: ["X", "Y", "Z"][v],
|
|
11898
11898
|
unitScale: E,
|
|
@@ -12435,25 +12435,25 @@ var FBXTreeParser = (
|
|
|
12435
12435
|
m < 0 && (m = m ^ -1, y = !0);
|
|
12436
12436
|
var v = [], E = [];
|
|
12437
12437
|
if (u.push(m * 3, m * 3 + 1, m * 3 + 2), t.color) {
|
|
12438
|
-
var
|
|
12439
|
-
c.push(
|
|
12438
|
+
var T = getData(A, r, m, t.color);
|
|
12439
|
+
c.push(T[0], T[1], T[2]);
|
|
12440
12440
|
}
|
|
12441
12441
|
if (t.skeleton) {
|
|
12442
12442
|
if (t.weightTable[m] !== void 0 && t.weightTable[m].forEach(function(w) {
|
|
12443
12443
|
E.push(w.weight), v.push(w.id);
|
|
12444
12444
|
}), E.length > 4) {
|
|
12445
12445
|
s || (console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."), s = !0);
|
|
12446
|
-
var
|
|
12446
|
+
var b = [0, 0, 0, 0], S = [0, 0, 0, 0];
|
|
12447
12447
|
E.forEach(function(w, C) {
|
|
12448
12448
|
var I = w, B = v[C];
|
|
12449
12449
|
S.forEach(function(M, H, L) {
|
|
12450
12450
|
if (I > M) {
|
|
12451
12451
|
L[H] = I, I = M;
|
|
12452
|
-
var O =
|
|
12453
|
-
|
|
12452
|
+
var O = b[H];
|
|
12453
|
+
b[H] = B, B = O;
|
|
12454
12454
|
}
|
|
12455
12455
|
});
|
|
12456
|
-
}), v =
|
|
12456
|
+
}), v = b, E = S;
|
|
12457
12457
|
}
|
|
12458
12458
|
for (; E.length < 4; )
|
|
12459
12459
|
E.push(0), v.push(0);
|
|
@@ -12461,8 +12461,8 @@ var FBXTreeParser = (
|
|
|
12461
12461
|
d.push(E[R]), h.push(v[R]);
|
|
12462
12462
|
}
|
|
12463
12463
|
if (t.normal) {
|
|
12464
|
-
var
|
|
12465
|
-
l.push(
|
|
12464
|
+
var T = getData(A, r, m, t.normal);
|
|
12465
|
+
l.push(T[0], T[1], T[2]);
|
|
12466
12466
|
}
|
|
12467
12467
|
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(w, C) {
|
|
12468
12468
|
var I = getData(A, r, m, w);
|
|
@@ -12489,8 +12489,8 @@ var FBXTreeParser = (
|
|
|
12489
12489
|
if (d > 3) {
|
|
12490
12490
|
for (var p = [], m = e.baseVertexPositions || e.vertexPositions, A = 0; A < r.length; A += 3)
|
|
12491
12491
|
p.push(new THREE.Vector3(m[r[A]], m[r[A + 1]], m[r[A + 2]]));
|
|
12492
|
-
for (var g = this.getNormalTangentAndBitangent(p), y = g.tangent, v = g.bitangent, E = [],
|
|
12493
|
-
var S = T
|
|
12492
|
+
for (var g = this.getNormalTangentAndBitangent(p), y = g.tangent, v = g.bitangent, E = [], T = 0, b = p; T < b.length; T++) {
|
|
12493
|
+
var S = b[T];
|
|
12494
12494
|
E.push(this.flattenVertex(S, y, v));
|
|
12495
12495
|
}
|
|
12496
12496
|
h = THREE.ShapeUtils.triangulateShape(E, []);
|
|
@@ -12678,11 +12678,11 @@ var FBXTreeParser = (
|
|
|
12678
12678
|
d[A] && (d[A][g.attr] = g);
|
|
12679
12679
|
} else if (g.curves.morph !== void 0) {
|
|
12680
12680
|
if (d[A] === void 0) {
|
|
12681
|
-
var
|
|
12681
|
+
var T = r.get(m.ID).parents.filter(function(I) {
|
|
12682
12682
|
return I.relationship !== void 0;
|
|
12683
|
-
})[0].ID,
|
|
12683
|
+
})[0].ID, b = r.get(T).parents[0].ID, S = r.get(b).parents[0].ID, y = r.get(S).parents[0].ID, R = t.Objects.Model[y], w = {
|
|
12684
12684
|
modelName: R.attrName ? THREE.PropertyBinding.sanitizeNodeName(R.attrName) : "",
|
|
12685
|
-
morphName: t.Objects.Deformer[
|
|
12685
|
+
morphName: t.Objects.Deformer[T].attrName
|
|
12686
12686
|
};
|
|
12687
12687
|
d[A] = w;
|
|
12688
12688
|
}
|
|
@@ -12820,8 +12820,8 @@ var FBXTreeParser = (
|
|
|
12820
12820
|
if (p[0] >= 180 || p[1] >= 180 || p[2] >= 180) {
|
|
12821
12821
|
var m = Math.max.apply(Math, p), A = m / 180, g = new THREE.Euler(f[0], f[1], f[2], o), y = new THREE.Euler(f[0], f[1], f[2], o), v = new THREE.Quaternion().setFromEuler(g), E = new THREE.Quaternion().setFromEuler(y);
|
|
12822
12822
|
v.dot(E) && E.set(-E.x, -E.y, -E.z, -E.w);
|
|
12823
|
-
for (var
|
|
12824
|
-
S.copy(v.clone().slerp(E.clone(), w)), s.push(
|
|
12823
|
+
for (var T = t.times[l - 1], b = t.times[l] - T, S = new THREE.Quaternion(), R = new THREE.Euler(), w = 0; w < 1; w += 1 / A)
|
|
12824
|
+
S.copy(v.clone().slerp(E.clone(), w)), s.push(T + w * b), R.setFromQuaternion(S, o), u.push(R.x), u.push(R.y), u.push(R.z);
|
|
12825
12825
|
} else
|
|
12826
12826
|
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]));
|
|
12827
12827
|
}
|
|
@@ -13195,13 +13195,13 @@ function generateTransform(n) {
|
|
|
13195
13195
|
v.extractRotation(d);
|
|
13196
13196
|
var E = new THREE.Matrix4();
|
|
13197
13197
|
E.copyPosition(d);
|
|
13198
|
-
var
|
|
13198
|
+
var T = new THREE.Matrix4().getInverse(E).multiply(d), b = new THREE.Matrix4().getInverse(v).multiply(T), S = s, R = new THREE.Matrix4();
|
|
13199
13199
|
if (m === 0)
|
|
13200
|
-
R.copy(v).multiply(y).multiply(
|
|
13200
|
+
R.copy(v).multiply(y).multiply(b).multiply(S);
|
|
13201
13201
|
else if (m === 1)
|
|
13202
|
-
R.copy(v).multiply(
|
|
13202
|
+
R.copy(v).multiply(b).multiply(y).multiply(S);
|
|
13203
13203
|
else {
|
|
13204
|
-
var w = new THREE.Matrix4().scale(new THREE.Vector3().setFromMatrixScale(h)), C = new THREE.Matrix4().getInverse(w), I =
|
|
13204
|
+
var w = new THREE.Matrix4().scale(new THREE.Vector3().setFromMatrixScale(h)), C = new THREE.Matrix4().getInverse(w), I = b.clone().multiply(C);
|
|
13205
13205
|
R.copy(v).multiply(y).multiply(I).multiply(S);
|
|
13206
13206
|
}
|
|
13207
13207
|
var B = new THREE.Matrix4().getInverse(f), M = new THREE.Matrix4().getInverse(u), H = t.clone().multiply(c).multiply(f).multiply(e).multiply(r).multiply(o).multiply(B).multiply(l).multiply(u).multiply(s).multiply(M), L = new THREE.Matrix4().copyPosition(H), O = d.clone().multiply(L);
|
|
@@ -13328,17 +13328,17 @@ function calcBasisFunctionDerivatives(n, t, e, r, o) {
|
|
|
13328
13328
|
for (var h = 0; h <= e; ++h)
|
|
13329
13329
|
l[0][h] = c[h][e];
|
|
13330
13330
|
for (var v = 0; v <= e; ++v) {
|
|
13331
|
-
for (var E = 0,
|
|
13332
|
-
|
|
13333
|
-
|
|
13331
|
+
for (var E = 0, T = 1, b = [], u = 0; u <= e; ++u)
|
|
13332
|
+
b[u] = s.slice(0);
|
|
13333
|
+
b[0][0] = 1;
|
|
13334
13334
|
for (var S = 1; S <= r; ++S) {
|
|
13335
13335
|
var R = 0, w = v - S, C = e - S;
|
|
13336
|
-
v >= S && (T
|
|
13336
|
+
v >= S && (b[T][0] = b[E][0] / c[C + 1][w], R = b[T][0] * c[w][C]);
|
|
13337
13337
|
for (var I = w >= -1 ? 1 : -w, B = v - 1 <= C ? S - 1 : e - v, M = I; M <= B; ++M)
|
|
13338
|
-
T
|
|
13339
|
-
v <= C && (T
|
|
13338
|
+
b[T][M] = (b[E][M] - b[E][M - 1]) / c[C + 1][w + M], R += b[T][M] * c[w + M][C];
|
|
13339
|
+
v <= C && (b[T][S] = -b[E][S - 1] / c[C + 1][v], R += b[T][S] * c[v][C]), l[S][v] = R;
|
|
13340
13340
|
var h = E;
|
|
13341
|
-
E =
|
|
13341
|
+
E = T, T = h;
|
|
13342
13342
|
}
|
|
13343
13343
|
}
|
|
13344
13344
|
for (var H = e, S = 1; S <= r; ++S) {
|
|
@@ -13439,7 +13439,7 @@ function loadX3p(n, t) {
|
|
|
13439
13439
|
});
|
|
13440
13440
|
}
|
|
13441
13441
|
function parse$1(n, t) {
|
|
13442
|
-
for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E,
|
|
13442
|
+
for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, T, b, S, R, w, C, I, B, M, H, L, O, F, N, D, q, z, Q, j, V, U, G, W, X, Z, Y, K, ee, te, re, ie, ce, ae, de, ge, ye, xe, le = unzipSync(n), he = "", ne = null, se = 0, pe = Object.keys(le); se < pe.length; se++) {
|
|
13443
13443
|
var me = pe[se];
|
|
13444
13444
|
/(^|\/)main\.xml$/i.test(me) && (ne = le[me], he = me.slice(0, me.lastIndexOf("/") + 1));
|
|
13445
13445
|
}
|
|
@@ -13457,7 +13457,7 @@ function parse$1(n, t) {
|
|
|
13457
13457
|
y: {
|
|
13458
13458
|
type: (g = (A = (m = ve == null ? void 0 : ve.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",
|
|
13459
13459
|
dataType: (E = (v = (y = ve == null ? void 0 : ve.querySelector("CY DataType")) === null || y === void 0 ? void 0 : y.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && E !== void 0 ? E : "D",
|
|
13460
|
-
increment: Number((
|
|
13460
|
+
increment: Number((b = (T = ve == null ? void 0 : ve.querySelector("CY Increment")) === null || T === void 0 ? void 0 : T.textContent) !== null && b !== void 0 ? b : "1"),
|
|
13461
13461
|
offset: Number((R = (S = ve == null ? void 0 : ve.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
|
|
13462
13462
|
},
|
|
13463
13463
|
z: {
|
|
@@ -14085,13 +14085,13 @@ var BVHVector3 = (
|
|
|
14085
14085
|
var s = this.getPositionCount() / 3, u = s > 65535 ? new Uint32Array(s) : new Uint16Array(s), l = new Float32Array(s * 6), c = [], f = 0, d = -1;
|
|
14086
14086
|
if (o)
|
|
14087
14087
|
for (var h = 0; h < s; h += 1) {
|
|
14088
|
-
var p = h * 3, m = h * 6, A = void 0, g = void 0, y = void 0, v = void 0, E = void 0,
|
|
14089
|
-
u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x,
|
|
14088
|
+
var p = h * 3, m = h * 6, A = void 0, g = void 0, y = void 0, v = void 0, E = void 0, T = void 0, b = void 0;
|
|
14089
|
+
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 = E = scratchVector3A.y, b = scratchVector3B.y, b < g && (g = b), b > E && (E = b), b = scratchVector3C.y, b < g && (g = b), b > E && (E = b), y = T = scratchVector3A.z, b = scratchVector3B.z, b < y && (y = b), b > T && (T = b), b = scratchVector3C.z, b < y && (y = b), b > T && (T = b), l[m] = A, l[m + 1] = g, l[m + 2] = y, l[m + 3] = v, l[m + 4] = E, l[m + 5] = T;
|
|
14090
14090
|
}
|
|
14091
14091
|
else {
|
|
14092
14092
|
for (var S = 1 / 0, R = 1 / 0, w = 1 / 0, C = -1 / 0, I = -1 / 0, B = -1 / 0, h = 0; h < s; h += 1) {
|
|
14093
|
-
var p = h * 3, m = h * 6, A = void 0, g = void 0, y = void 0, v = void 0, E = void 0,
|
|
14094
|
-
u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x,
|
|
14093
|
+
var p = h * 3, m = h * 6, A = void 0, g = void 0, y = void 0, v = void 0, E = void 0, T = void 0, b = void 0;
|
|
14094
|
+
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 = E = scratchVector3A.y, b = scratchVector3B.y, b < g && (g = b), b > E && (E = b), b = scratchVector3C.y, b < g && (g = b), b > E && (E = b), y = T = scratchVector3A.z, b = scratchVector3B.z, b < y && (y = b), b > T && (T = b), b = scratchVector3C.z, b < y && (y = b), b > T && (T = b), l[m] = A, l[m + 1] = g, l[m + 2] = y, l[m + 3] = v, l[m + 4] = E, l[m + 5] = T, A < S && (S = A), v > C && (C = v), g < R && (R = g), E > I && (I = E), y < w && (w = y), T > B && (B = T);
|
|
14095
14095
|
}
|
|
14096
14096
|
o = [S, R, w, C, I, B];
|
|
14097
14097
|
}
|
|
@@ -14123,15 +14123,15 @@ var BVHVector3 = (
|
|
|
14123
14123
|
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;
|
|
14124
14124
|
if (m * m + A * A + g * g <= r * r) {
|
|
14125
14125
|
for (var y = l[p + 6], v = l[p + 7], E = y; E < v; E++) {
|
|
14126
|
-
var
|
|
14127
|
-
d.push(
|
|
14126
|
+
var T = o[E];
|
|
14127
|
+
d.push(T);
|
|
14128
14128
|
}
|
|
14129
|
-
var
|
|
14129
|
+
var b = h * BYTES_PER_NODE / 2, S = c[b + 16], R = c[b + 17];
|
|
14130
14130
|
S && f.push(S), R && f.push(R);
|
|
14131
14131
|
}
|
|
14132
14132
|
}
|
|
14133
14133
|
for (var w = d.length, C = new Float32Array(w * 9), E = 0; E < w; E++) {
|
|
14134
|
-
var
|
|
14134
|
+
var T = d[E], I = T * 3;
|
|
14135
14135
|
this.getPositionByIndex(I, scratchVector3$9), C[E * 9] = scratchVector3$9.x, C[E * 9 + 1] = scratchVector3$9.y, C[E * 9 + 2] = scratchVector3$9.z, this.getPositionByIndex(I + 1, scratchVector3$9), C[E * 9 + 3] = scratchVector3$9.x, C[E * 9 + 4] = scratchVector3$9.y, C[E * 9 + 5] = scratchVector3$9.z, this.getPositionByIndex(I + 2, scratchVector3$9), C[E * 9 + 6] = scratchVector3$9.x, C[E * 9 + 7] = scratchVector3$9.y, C[E * 9 + 8] = scratchVector3$9.z;
|
|
14136
14136
|
}
|
|
14137
14137
|
return C;
|
|
@@ -14140,9 +14140,9 @@ var BVHVector3 = (
|
|
|
14140
14140
|
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, y = new BVHBox3(new BVHVector3(0, 0, 0), new BVHVector3(0, 0, 0)), v = 1 / 0; (g = A.pop()) !== void 0; ) {
|
|
14141
14141
|
var E = g * BYTES_PER_NODE / 4;
|
|
14142
14142
|
y.min.x = d[E], y.min.y = d[E + 1], y.min.z = d[E + 2], y.max.x = d[E + 3], y.max.y = d[E + 4], y.max.z = d[E + 5];
|
|
14143
|
-
var
|
|
14144
|
-
if (
|
|
14145
|
-
for (var
|
|
14143
|
+
var T = intersectNodeBox(e, m, y, o);
|
|
14144
|
+
if (T !== null && !(s && T > v)) {
|
|
14145
|
+
for (var b = e.x, S = e.y, R = e.z, w = r.x, C = r.y, I = r.z, B = h[E + 6], M = h[E + 7], H = B; H < M; H++) {
|
|
14146
14146
|
var L = c[H], O = L * 3, F = new BVHVector3(0, 0, 0);
|
|
14147
14147
|
this.getPositionByIndex(O, F);
|
|
14148
14148
|
var N = F.x, D = F.y, q = F.z, z = new BVHVector3(0, 0, 0);
|
|
@@ -14156,13 +14156,13 @@ var BVHVector3 = (
|
|
|
14156
14156
|
ge = -1, de = -de;
|
|
14157
14157
|
else
|
|
14158
14158
|
continue;
|
|
14159
|
-
var ye =
|
|
14159
|
+
var ye = b - N, xe = S - D, le = R - q, he = ge * (w * (xe * re - le * te) + C * (le * ee - ye * re) + I * (ye * te - xe * ee));
|
|
14160
14160
|
if (!(he < 0)) {
|
|
14161
14161
|
var ne = ge * (w * (Y * le - K * xe) + C * (K * ye - Z * le) + I * (Z * xe - Y * ye));
|
|
14162
14162
|
if (!(ne < 0) && !(he + ne > de)) {
|
|
14163
14163
|
var se = -ge * (ye * ie + xe * ce + le * ae);
|
|
14164
14164
|
if (!(se < 0)) {
|
|
14165
|
-
var pe = se / de, me = new BVHVector3(
|
|
14165
|
+
var pe = se / de, me = new BVHVector3(b + w * pe, S + C * pe, R + I * pe), Ne = new BVHIntersect(F, z, U, L, me);
|
|
14166
14166
|
(!u || u(Ne)) && (s ? pe < v && (v = pe, l.length > 0 && (l.length = 0), l.push(Ne)) : l.push(Ne));
|
|
14167
14167
|
}
|
|
14168
14168
|
}
|
|
@@ -14212,8 +14212,8 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
|
|
|
14212
14212
|
s(0, scratchVector3$8);
|
|
14213
14213
|
for (var p = scratchVector3$8.x, m = scratchVector3$8.y, A = scratchVector3$8.z, g = p, y = m, v = A, h = 0; h < u; h += 1) {
|
|
14214
14214
|
l[h] = h, s(h, scratchVector3$8);
|
|
14215
|
-
var E = scratchVector3$8.x,
|
|
14216
|
-
E < p ? p = E : E > g && (g = E),
|
|
14215
|
+
var E = scratchVector3$8.x, T = scratchVector3$8.y, b = scratchVector3$8.z;
|
|
14216
|
+
E < p ? p = E : E > g && (g = E), T < m ? m = T : T > y && (y = T), b < A ? A = b : b > v && (v = b);
|
|
14217
14217
|
}
|
|
14218
14218
|
o = [p, m, A, g, y, v];
|
|
14219
14219
|
}
|
|
@@ -14247,11 +14247,11 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
|
|
|
14247
14247
|
}, t.prototype.intersectRay = function(e, r, o, s, u) {
|
|
14248
14248
|
o === void 0 && (o = 0), s === void 0 && (s = !1);
|
|
14249
14249
|
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], y, v = new BVHBox3(new BVHVector3(0, 0, 0), new BVHVector3(0, 0, 0)), E = 1 / 0; (y = g.pop()) !== void 0; ) {
|
|
14250
|
-
var
|
|
14251
|
-
v.min.x = d[
|
|
14252
|
-
var
|
|
14253
|
-
if (
|
|
14254
|
-
for (var S = h[
|
|
14250
|
+
var T = y * BYTES_PER_NODE / 4;
|
|
14251
|
+
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];
|
|
14252
|
+
var b = intersectNodeBox(e, A, v, o);
|
|
14253
|
+
if (b !== null && !(s && b > E)) {
|
|
14254
|
+
for (var S = h[T + 6], R = h[T + 7], w = S; w < R; w++) {
|
|
14255
14255
|
var C = c[w], I = new BVHVector3(0, 0, 0);
|
|
14256
14256
|
this.getPositionByIndex(C, I);
|
|
14257
14257
|
var B = I.x, M = I.y, H = I.z, L = e.x, O = e.y, F = e.z, N = r.x, D = r.y, q = r.z, z = N * (B - L) + D * (M - O) + q * (H - F);
|
|
@@ -14300,12 +14300,12 @@ function raycastMesh(n, t, e, r) {
|
|
|
14300
14300
|
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;
|
|
14301
14301
|
intersectsMap.clear();
|
|
14302
14302
|
for (var m = t.intersectRay(scratchRay.origin, scratchRay.direction, 0, c, function(v) {
|
|
14303
|
-
var E,
|
|
14303
|
+
var E, T = v.index, b = T * 3, S;
|
|
14304
14304
|
if (Array.isArray(d)) {
|
|
14305
14305
|
if (h)
|
|
14306
14306
|
for (var R = 0, w = h; R < w.length; R++) {
|
|
14307
14307
|
var C = w[R];
|
|
14308
|
-
if (
|
|
14308
|
+
if (b >= C.start && b - C.start < C.count) {
|
|
14309
14309
|
S = d[(E = C.materialIndex) !== null && E !== void 0 ? E : 0];
|
|
14310
14310
|
break;
|
|
14311
14311
|
}
|
|
@@ -14320,13 +14320,13 @@ function raycastMesh(n, t, e, r) {
|
|
|
14320
14320
|
var H = v.pointA, L = v.pointB, O = v.pointC, F = THREE.Triangle.getNormal(scratchIntersectionFaceA.set(H.x, H.y, H.z).applyMatrix4(u), scratchIntersectionFaceB.set(L.x, L.y, L.z).applyMatrix4(u), scratchIntersectionFaceC.set(O.x, O.y, O.z).applyMatrix4(u), new THREE.Vector3()), N = e.ray.direction.dot(F);
|
|
14321
14321
|
if (S.side === THREE.FrontSide && N >= 0 || S.side === THREE.BackSide && N <= 0)
|
|
14322
14322
|
return !1;
|
|
14323
|
-
var D = new THREE.Face3(p ? p.array[
|
|
14323
|
+
var D = new THREE.Face3(p ? p.array[b] : b, p ? p.array[b + 1] : b + 1, p ? p.array[b + 2] : b + 2, F), q = {
|
|
14324
14324
|
distance: M,
|
|
14325
14325
|
object: n,
|
|
14326
14326
|
face: D,
|
|
14327
14327
|
point: B,
|
|
14328
14328
|
distanceToRay: 0,
|
|
14329
|
-
faceIndex:
|
|
14329
|
+
faceIndex: T
|
|
14330
14330
|
};
|
|
14331
14331
|
return intersectsMap.set(v, q), l(q);
|
|
14332
14332
|
}), A = m.length, g = 0; g < A; g++) {
|
|
@@ -14340,11 +14340,11 @@ function raycastPoints(n, t, e, r) {
|
|
|
14340
14340
|
scratchNormalMatrix.getNormalMatrix(c), scratchInverseMatrix.getInverse(c), scratchRay.copy(e.ray).applyMatrix4(scratchInverseMatrix);
|
|
14341
14341
|
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;
|
|
14342
14342
|
intersectsMap.clear();
|
|
14343
|
-
for (var y = t.intersectRay(scratchRay.origin, scratchRay.direction, f, h, function(
|
|
14344
|
-
var S =
|
|
14343
|
+
for (var y = t.intersectRay(scratchRay.origin, scratchRay.direction, f, h, function(b) {
|
|
14344
|
+
var S = b.intersectionPoint, R = new THREE.Vector3(S.x, S.y, S.z).applyMatrix4(c), w = e.ray.origin.distanceTo(R);
|
|
14345
14345
|
if (w < e.near || w > e.far)
|
|
14346
14346
|
return !1;
|
|
14347
|
-
var C =
|
|
14347
|
+
var C = b.pointA, I = scratchIntersectionFaceA.set(C.x, C.y, C.z).applyMatrix4(c), B = b.index, M = m ? m.array[B] : B, H;
|
|
14348
14348
|
if (g) {
|
|
14349
14349
|
var L = new THREE.Vector3().fromBufferAttribute(A, M).applyNormalMatrix(scratchNormalMatrix);
|
|
14350
14350
|
H = new THREE.Face3(M, M, M, L);
|
|
@@ -14357,10 +14357,10 @@ function raycastPoints(n, t, e, r) {
|
|
|
14357
14357
|
distanceToRay: R.distanceTo(I),
|
|
14358
14358
|
index: B
|
|
14359
14359
|
};
|
|
14360
|
-
return intersectsMap.set(
|
|
14360
|
+
return intersectsMap.set(b, O), d(O);
|
|
14361
14361
|
}), v = y.length, E = 0; E < v; E++) {
|
|
14362
|
-
var
|
|
14363
|
-
|
|
14362
|
+
var T = intersectsMap.get(y[E]);
|
|
14363
|
+
T && r.push(T);
|
|
14364
14364
|
}
|
|
14365
14365
|
intersectsMap.clear();
|
|
14366
14366
|
}
|
|
@@ -14419,7 +14419,7 @@ function generateBvhTree(n, t, e, r) {
|
|
|
14419
14419
|
}, l = E.data.array, l && l.buffer instanceof ArrayBuffer && u.add(l.buffer)) : (v = {
|
|
14420
14420
|
array: E.array
|
|
14421
14421
|
}, l = E.array, l && l.buffer instanceof ArrayBuffer && u.add(l.buffer)));
|
|
14422
|
-
var
|
|
14422
|
+
var T = {
|
|
14423
14423
|
type: h,
|
|
14424
14424
|
attributes: A,
|
|
14425
14425
|
indices: v,
|
|
@@ -14427,7 +14427,7 @@ function generateBvhTree(n, t, e, r) {
|
|
|
14427
14427
|
maxTreeDepth: r,
|
|
14428
14428
|
extents: m
|
|
14429
14429
|
};
|
|
14430
|
-
s.push(
|
|
14430
|
+
s.push(T);
|
|
14431
14431
|
}
|
|
14432
14432
|
}
|
|
14433
14433
|
}
|
|
@@ -14640,9 +14640,9 @@ function updatePBMPointCloud(n, t, e, r, o, s, u) {
|
|
|
14640
14640
|
}
|
|
14641
14641
|
if (versionMap$1.get(n) !== u.version) {
|
|
14642
14642
|
versionMap$1.set(n, u.version), f = !0, n.castShadow = u.castShadow, n.receiveShadow = u.receiveShadow;
|
|
14643
|
-
for (var v = [n.material], E = 0,
|
|
14644
|
-
var
|
|
14645
|
-
|
|
14643
|
+
for (var v = [n.material], E = 0, T = v; E < T.length; E++) {
|
|
14644
|
+
var b = T[E];
|
|
14645
|
+
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);
|
|
14646
14646
|
}
|
|
14647
14647
|
}
|
|
14648
14648
|
return f;
|
|
@@ -14734,8 +14734,8 @@ var TileRequestScheduler = (
|
|
|
14734
14734
|
if (v.tile.state.requestedFrameNumber !== E.tile.state.requestedFrameNumber)
|
|
14735
14735
|
return E.tile.state.requestedFrameNumber - v.tile.state.requestedFrameNumber;
|
|
14736
14736
|
if (v.tile.state.requestedFrameNumber === r.frameNumber) {
|
|
14737
|
-
var
|
|
14738
|
-
return
|
|
14737
|
+
var T = getPriority(r, v.tile, priorityCache), b = getPriority(r, E.tile, priorityCache);
|
|
14738
|
+
return T - b;
|
|
14739
14739
|
} else
|
|
14740
14740
|
return v.tile.level !== E.tile.level ? v.tile.level - E.tile.level : v.tile.state.distanceToCamera - E.tile.state.distanceToCamera;
|
|
14741
14741
|
});
|
|
@@ -14764,8 +14764,8 @@ var TileRequestScheduler = (
|
|
|
14764
14764
|
}
|
|
14765
14765
|
for (var g = function(v) {
|
|
14766
14766
|
var E = u[v];
|
|
14767
|
-
E.status === "WAITING" && (d--, E.status = "PENDING", E.time = s, y.activeRequests++, y.tileset.options.tileLoader(E.tile).catch(function(
|
|
14768
|
-
E.error =
|
|
14767
|
+
E.status === "WAITING" && (d--, E.status = "PENDING", E.time = s, y.activeRequests++, y.tileset.options.tileLoader(E.tile).catch(function(T) {
|
|
14768
|
+
E.error = T;
|
|
14769
14769
|
}).then(function() {
|
|
14770
14770
|
E.status = "DONE", E.tile.content && E.tile.content.loadState === "READY" && (E.tile.content.loadState = "LOADING"), o.activeRequests--;
|
|
14771
14771
|
}));
|
|
@@ -15419,13 +15419,13 @@ var _object_pattern = /^[og]\s*(.+)?/, _material_library_pattern = /^mtllib /, _
|
|
|
15419
15419
|
var r = parseInt(t, 10);
|
|
15420
15420
|
return (r >= 0 ? r - 1 : r + e / 2) * 2;
|
|
15421
15421
|
}, n.prototype.addFace = function(t, e, r, o, s, u, l, c, f) {
|
|
15422
|
-
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), y = this.parseVertexIndex(r, h), v = l !== void 0 ? this.parseNormalIndex(l, p) : void 0, E = c !== void 0 ? this.parseNormalIndex(c, p) : void 0,
|
|
15423
|
-
(d.hasNormal === !0 && v === void 0 || E === void 0 ||
|
|
15424
|
-
var w = [A,
|
|
15425
|
-
C === void 0 && (C = d.vertices.length / 3, d.indexMap[w] = C, 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[
|
|
15422
|
+
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), y = this.parseVertexIndex(r, h), v = l !== void 0 ? this.parseNormalIndex(l, p) : void 0, E = 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;
|
|
15423
|
+
(d.hasNormal === !0 && v === void 0 || E === void 0 || T === void 0) && (d.hasNormal = !1), (d.hasUV === !0 && b === void 0 || S === void 0 || R === void 0) && (d.hasUV = !1);
|
|
15424
|
+
var w = [A, b, v].join(":"), C = d.indexMap[w];
|
|
15425
|
+
C === void 0 && (C = d.vertices.length / 3, d.indexMap[w] = C, 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(C);
|
|
15426
15426
|
var I = [g, S, E].join(":"), B = d.indexMap[I];
|
|
15427
15427
|
B === void 0 && (B = d.vertices.length / 3, d.indexMap[I] = B, 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(B);
|
|
15428
|
-
var M = [y, R,
|
|
15428
|
+
var M = [y, R, T].join(":"), H = d.indexMap[M];
|
|
15429
15429
|
H === void 0 && (H = d.vertices.length / 3, d.indexMap[M] = H, d.vertices.push(this.vertices[y + 0], this.vertices[y + 1], this.vertices[y + 2]), d.hasColor && (this.colors[y] === void 0 ? d.hasColor = !1 : d.colors.push(this.colors[y + 0], this.colors[y + 1], this.colors[y + 2])), d.hasNormal && d.normals.push(this.normals[y + 0], this.normals[y + 1], this.normals[y + 2]), d.hasUV && d.uvs.push(this.uvs[R + 0], this.uvs[R + 1])), d.index.push(H);
|
|
15430
15430
|
}, n;
|
|
15431
15431
|
})()
|
|
@@ -15469,8 +15469,8 @@ function parseObj(n) {
|
|
|
15469
15469
|
}
|
|
15470
15470
|
} else if (l !== "l") {
|
|
15471
15471
|
if (l !== "p") if ((r = _object_pattern.exec(u)) !== null) {
|
|
15472
|
-
var
|
|
15473
|
-
t.startObject(
|
|
15472
|
+
var T = (" " + r[0].slice(1).trim()).slice(1);
|
|
15473
|
+
t.startObject(T);
|
|
15474
15474
|
} else if (_material_use_pattern.test(u))
|
|
15475
15475
|
t.object.startMaterial(u.substring(7).trim(), t.materialLibraries);
|
|
15476
15476
|
else if (_material_library_pattern.test(u))
|
|
@@ -15479,8 +15479,8 @@ function parseObj(n) {
|
|
|
15479
15479
|
console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
|
|
15480
15480
|
else if (l === "s") {
|
|
15481
15481
|
if (r = u.split(" "), r.length > 1) {
|
|
15482
|
-
var
|
|
15483
|
-
t.object.smooth =
|
|
15482
|
+
var b = r[1].trim().toLowerCase();
|
|
15483
|
+
t.object.smooth = b !== "0" && b !== "off";
|
|
15484
15484
|
} else
|
|
15485
15485
|
t.object.smooth = !0;
|
|
15486
15486
|
var S = t.object.currentMaterial();
|
|
@@ -15518,12 +15518,12 @@ function parseMtl(n, t, e) {
|
|
|
15518
15518
|
scale: new THREE.Vector2(1, 1),
|
|
15519
15519
|
offset: new THREE.Vector2(0, 0),
|
|
15520
15520
|
bumpScale: 1
|
|
15521
|
-
}, E = y.split(/\s+/),
|
|
15522
|
-
return
|
|
15521
|
+
}, E = y.split(/\s+/), T;
|
|
15522
|
+
return T = E.indexOf("-bm"), T >= 0 && (v.bumpScale = parseFloat(E[T + 1]), E.splice(T, 2)), T = E.indexOf("-s"), T >= 0 && (v.scale.set(parseFloat(E[T + 1]), parseFloat(E[T + 2])), E.splice(T, 4)), T = E.indexOf("-o"), T >= 0 && (v.offset.set(parseFloat(E[T + 1]), parseFloat(E[T + 2])), E.splice(T, 4)), v.url = E.join(" ").trim(), v;
|
|
15523
15523
|
}
|
|
15524
15524
|
function g(y, v, E) {
|
|
15525
|
-
var
|
|
15526
|
-
return r.loadTexture(
|
|
15525
|
+
var T = A(E), b = pathJoin(e.path, T.url);
|
|
15526
|
+
return r.loadTexture(b, {
|
|
15527
15527
|
fetcher: e.fetcher,
|
|
15528
15528
|
encoding: v === "map" || v === "emissiveMap" ? THREE.sRGBEncoding : THREE.LinearEncoding,
|
|
15529
15529
|
minFilter: THREE.LinearFilter,
|
|
@@ -15532,21 +15532,21 @@ function parseMtl(n, t, e) {
|
|
|
15532
15532
|
wrapT: THREE.RepeatWrapping
|
|
15533
15533
|
}).then(function(S) {
|
|
15534
15534
|
var R = S.body;
|
|
15535
|
-
return R.repeat.copy(
|
|
15535
|
+
return R.repeat.copy(T.scale), R.offset.copy(T.offset), y.bumpScale = T.bumpScale, y[v] = R, R;
|
|
15536
15536
|
});
|
|
15537
15537
|
}
|
|
15538
15538
|
return {
|
|
15539
15539
|
name: n,
|
|
15540
15540
|
create: function(y) {
|
|
15541
|
-
var v = new PBMMeshMaterial(e.light ? "phong" : "basic"), E = [],
|
|
15542
|
-
if (
|
|
15543
|
-
if (
|
|
15544
|
-
var
|
|
15545
|
-
|
|
15541
|
+
var v = new PBMMeshMaterial(e.light ? "phong" : "basic"), E = [], T = l[y];
|
|
15542
|
+
if (T) {
|
|
15543
|
+
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 && E.push(g(v, "map", T.map_kd)), T.map_ks !== void 0 && E.push(g(v, "specularMap", T.map_ks)), T.map_ke !== void 0 && E.push(g(v, "emissiveMap", T.map_ke)), T.norm !== void 0 && E.push(g(v, "normalMap", T.norm)), T.map_bump !== void 0 && E.push(g(v, "bumpMap", T.map_bump)), T.bump !== void 0 && E.push(g(v, "bumpMap", T.bump)), T.map_d !== void 0 && E.push(g(v, "alphaMap", T.map_d)), T.ns !== void 0 && (v.shininess = parseFloat(T.ns)), T.d !== void 0) {
|
|
15544
|
+
var b = parseFloat(T.d);
|
|
15545
|
+
b < 1 && (v.opacity = b, v.transparent = !0);
|
|
15546
15546
|
}
|
|
15547
|
-
if (
|
|
15548
|
-
var
|
|
15549
|
-
|
|
15547
|
+
if (T.tr !== void 0) {
|
|
15548
|
+
var b = parseFloat(T.tr);
|
|
15549
|
+
b > 0 && (v.opacity = 1 - b, v.transparent = !0);
|
|
15550
15550
|
}
|
|
15551
15551
|
}
|
|
15552
15552
|
var S = Promise.all(E).then(function(R) {
|
|
@@ -15583,12 +15583,12 @@ function build(n, t) {
|
|
|
15583
15583
|
});
|
|
15584
15584
|
}
|
|
15585
15585
|
y.push(B);
|
|
15586
|
-
}, E = 0,
|
|
15586
|
+
}, E = 0, T = m.length; E < T; E++)
|
|
15587
15587
|
v(E);
|
|
15588
15588
|
g.clearGroups();
|
|
15589
|
-
for (var E = 0,
|
|
15590
|
-
var
|
|
15591
|
-
|
|
15589
|
+
for (var E = 0, T = m.length; E < T; E++) {
|
|
15590
|
+
var b = m[E];
|
|
15591
|
+
b.groupCount && g.addGroup((e = b.groupStart) !== null && e !== void 0 ? e : 0, b.groupCount, E);
|
|
15592
15592
|
}
|
|
15593
15593
|
(!g.groups || g.groups.length === 0) && g.addGroup(0, g.index ? g.index.count : g.attributes.position.count, 0);
|
|
15594
15594
|
var S = new PBMMesh(g, y);
|
|
@@ -15706,10 +15706,10 @@ function loadTileContent(n, t) {
|
|
|
15706
15706
|
}
|
|
15707
15707
|
if (n.type === "SCENEGRAPH")
|
|
15708
15708
|
return e.loadState = "LOADING", e.loadStateUpdateTime = now(), Promise.resolve().then(function() {
|
|
15709
|
-
var s, u, l, c, f, d, h, p, m, A, g = "", y = r.split("#"), v = y[0], E = y[1],
|
|
15710
|
-
if (
|
|
15711
|
-
var
|
|
15712
|
-
return loadB3dm(
|
|
15709
|
+
var s, u, l, c, f, d, h, p, m, A, g = "", y = r.split("#"), v = y[0], E = y[1], T = (E || v).split("?")[0].match(/\.([0-9a-zA-Z]+)$/);
|
|
15710
|
+
if (T && (g = T[1]), g === "b3dm") {
|
|
15711
|
+
var b = imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15712
|
+
return loadB3dm(b, {
|
|
15713
15713
|
upAxis: "Z",
|
|
15714
15714
|
modelUpAxis: n.tileset.asset.gltfUpAxis,
|
|
15715
15715
|
light: t.light,
|
|
@@ -15719,8 +15719,8 @@ function loadTileContent(n, t) {
|
|
|
15719
15719
|
});
|
|
15720
15720
|
}
|
|
15721
15721
|
if (g === "pnts") {
|
|
15722
|
-
var
|
|
15723
|
-
return loadPnts(
|
|
15722
|
+
var b = imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15723
|
+
return loadPnts(b, {
|
|
15724
15724
|
upAxis: "Z",
|
|
15725
15725
|
computeBoundingBox: !1,
|
|
15726
15726
|
fetcher: t.fetcher
|
|
@@ -15739,8 +15739,8 @@ function loadTileContent(n, t) {
|
|
|
15739
15739
|
});
|
|
15740
15740
|
}
|
|
15741
15741
|
if (g === "glb" || g === "gltf") {
|
|
15742
|
-
var
|
|
15743
|
-
return loadGltf(
|
|
15742
|
+
var b = imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15743
|
+
return loadGltf(b, {
|
|
15744
15744
|
upAxis: "Z",
|
|
15745
15745
|
modelUpAxis: n.tileset.asset.gltfUpAxis,
|
|
15746
15746
|
light: t.light,
|
|
@@ -15750,8 +15750,8 @@ function loadTileContent(n, t) {
|
|
|
15750
15750
|
});
|
|
15751
15751
|
}
|
|
15752
15752
|
if (g === "at3d") {
|
|
15753
|
-
var
|
|
15754
|
-
return loadAt3d(
|
|
15753
|
+
var b = n.extras.at3d ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15754
|
+
return loadAt3d(b, {
|
|
15755
15755
|
upAxis: "Z",
|
|
15756
15756
|
light: t.light,
|
|
15757
15757
|
textureBaseUri: (s = n.extras.at3d) === null || s === void 0 ? void 0 : s.textureBaseUri,
|
|
@@ -15763,8 +15763,8 @@ function loadTileContent(n, t) {
|
|
|
15763
15763
|
});
|
|
15764
15764
|
}
|
|
15765
15765
|
if (g === "pbm") {
|
|
15766
|
-
var
|
|
15767
|
-
return loadPbm(
|
|
15766
|
+
var b = n.extras.pbm ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15767
|
+
return loadPbm(b, {
|
|
15768
15768
|
upAxis: "Z",
|
|
15769
15769
|
light: t.light,
|
|
15770
15770
|
textureBaseUri: (c = n.extras.pbm) === null || c === void 0 ? void 0 : c.textureBaseUri,
|
|
@@ -15776,8 +15776,8 @@ function loadTileContent(n, t) {
|
|
|
15776
15776
|
});
|
|
15777
15777
|
}
|
|
15778
15778
|
if (g === "dome") {
|
|
15779
|
-
var
|
|
15780
|
-
return loadDome(
|
|
15779
|
+
var b = n.extras.dome ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15780
|
+
return loadDome(b, {
|
|
15781
15781
|
upAxis: "Z",
|
|
15782
15782
|
light: t.light,
|
|
15783
15783
|
textureBaseUri: (h = n.extras.dome) === null || h === void 0 ? void 0 : h.textureBaseUri,
|
|
@@ -15788,8 +15788,8 @@ function loadTileContent(n, t) {
|
|
|
15788
15788
|
});
|
|
15789
15789
|
}
|
|
15790
15790
|
if (g === "domez") {
|
|
15791
|
-
var
|
|
15792
|
-
return loadDomez(
|
|
15791
|
+
var b = n.extras.domez ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15792
|
+
return loadDomez(b, {
|
|
15793
15793
|
upAxis: "Z",
|
|
15794
15794
|
light: t.light,
|
|
15795
15795
|
textureBaseUri: (m = n.extras.domez) === null || m === void 0 ? void 0 : m.textureBaseUri,
|
|
@@ -15800,8 +15800,8 @@ function loadTileContent(n, t) {
|
|
|
15800
15800
|
});
|
|
15801
15801
|
}
|
|
15802
15802
|
if (g === "ply") {
|
|
15803
|
-
var
|
|
15804
|
-
return loadPly(
|
|
15803
|
+
var b = n.extras.ply ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15804
|
+
return loadPly(b, {
|
|
15805
15805
|
upAxis: "Z",
|
|
15806
15806
|
modelUpAxis: "Z",
|
|
15807
15807
|
type: "pbmPointCloud",
|
|
@@ -15812,8 +15812,8 @@ function loadTileContent(n, t) {
|
|
|
15812
15812
|
});
|
|
15813
15813
|
}
|
|
15814
15814
|
if (g === "obj") {
|
|
15815
|
-
var
|
|
15816
|
-
return loadObj(
|
|
15815
|
+
var b = n.extras.obj ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15816
|
+
return loadObj(b, {
|
|
15817
15817
|
upAxis: "Z",
|
|
15818
15818
|
modelUpAxis: "Z",
|
|
15819
15819
|
light: t.light,
|
|
@@ -15823,8 +15823,8 @@ function loadTileContent(n, t) {
|
|
|
15823
15823
|
});
|
|
15824
15824
|
}
|
|
15825
15825
|
if (g === "fbx") {
|
|
15826
|
-
var
|
|
15827
|
-
return loadFbx(
|
|
15826
|
+
var b = n.extras.obj ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15827
|
+
return loadFbx(b, {
|
|
15828
15828
|
upAxis: "Z",
|
|
15829
15829
|
light: t.light,
|
|
15830
15830
|
fetcher: t.fetcher
|
|
@@ -15833,8 +15833,8 @@ function loadTileContent(n, t) {
|
|
|
15833
15833
|
});
|
|
15834
15834
|
}
|
|
15835
15835
|
if (g === "x3p") {
|
|
15836
|
-
var
|
|
15837
|
-
return loadX3p(
|
|
15836
|
+
var b = n.extras.x3p ? r : imageURL(r, { key: "model.".concat(n.siblingIndex) });
|
|
15837
|
+
return loadX3p(b, {
|
|
15838
15838
|
upAxis: "Z",
|
|
15839
15839
|
light: t.light,
|
|
15840
15840
|
fetcher: t.fetcher
|
|
@@ -16020,8 +16020,8 @@ function createPipeBufferGeometry(n, t, e, r) {
|
|
|
16020
16020
|
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++) {
|
|
16021
16021
|
p = n.getPointAt(m / e, p);
|
|
16022
16022
|
for (var A = c.normals[m], g = c.binormals[m], y = 0; y <= r; y++) {
|
|
16023
|
-
var v = m * (r + 1) + y, E = y / r * Math.PI * 2,
|
|
16024
|
-
d.x =
|
|
16023
|
+
var v = m * (r + 1) + y, E = y / r * Math.PI * 2, T = Math.sin(E), b = -Math.cos(E);
|
|
16024
|
+
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 = y / r, h.toArray(u, v * 2);
|
|
16025
16025
|
}
|
|
16026
16026
|
}
|
|
16027
16027
|
for (var m = 0; m < e; m++)
|
|
@@ -16055,14 +16055,14 @@ function parseTrajectoryObject(n, t) {
|
|
|
16055
16055
|
side: THREE.BackSide
|
|
16056
16056
|
});
|
|
16057
16057
|
E.uniforms.totalLength.value = u, E.uniforms.displacementScalar.value = -0.01, E.uniforms.diffuse.value = r, E.uniforms.diffuse2.value = o;
|
|
16058
|
-
var
|
|
16058
|
+
var T = new THREE.ShaderMaterial({
|
|
16059
16059
|
vertexShader: TRAJECTOR_PIPE_SHADER.vertexShader,
|
|
16060
16060
|
fragmentShader: TRAJECTOR_PIPE_SHADER.fragmentShader,
|
|
16061
16061
|
uniforms: THREE.UniformsUtils.clone(TRAJECTOR_PIPE_SHADER.uniforms),
|
|
16062
16062
|
side: THREE.DoubleSide
|
|
16063
16063
|
});
|
|
16064
|
-
|
|
16065
|
-
var
|
|
16064
|
+
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;
|
|
16065
|
+
var b = new THREE.Mesh(y, [v, E, T]), S = 0.08, R = 24, w = new THREE.SphereBufferGeometry(S, R, R);
|
|
16066
16066
|
w.clearGroups(), w.addGroup(0, y.index ? y.index.count : y.attributes.position.count, 0), w.addGroup(0, y.index ? y.index.count : y.attributes.position.count, 1);
|
|
16067
16067
|
var C = new THREE.ShaderMaterial({
|
|
16068
16068
|
vertexShader: TRAJECTOR_SPHERE_SHADER.vertexShader,
|
|
@@ -16079,7 +16079,7 @@ function parseTrajectoryObject(n, t) {
|
|
|
16079
16079
|
});
|
|
16080
16080
|
I.uniforms.displacementScalar.value = -0.01, I.uniforms.diffuse.value = r;
|
|
16081
16081
|
var B = new THREE.Mesh(w, [C, I]);
|
|
16082
|
-
B.position.fromArray(n, 0),
|
|
16082
|
+
B.position.fromArray(n, 0), b.add(B);
|
|
16083
16083
|
var M = new THREE.ShaderMaterial({
|
|
16084
16084
|
vertexShader: TRAJECTOR_SPHERE_SHADER.vertexShader,
|
|
16085
16085
|
fragmentShader: TRAJECTOR_SPHERE_SHADER.fragmentShader,
|
|
@@ -16088,10 +16088,10 @@ function parseTrajectoryObject(n, t) {
|
|
|
16088
16088
|
});
|
|
16089
16089
|
M.uniforms.displacementScalar.value = -0.01, M.uniforms.diffuse.value = o;
|
|
16090
16090
|
var H = new THREE.Mesh(w, [C, M]);
|
|
16091
|
-
return H.position.fromArray(n, n.length - 3),
|
|
16092
|
-
scene:
|
|
16091
|
+
return H.position.fromArray(n, n.length - 3), b.add(H), {
|
|
16092
|
+
scene: b,
|
|
16093
16093
|
dispose: function() {
|
|
16094
|
-
y.dispose(), v.dispose(), E.dispose(),
|
|
16094
|
+
y.dispose(), v.dispose(), E.dispose(), T.dispose(), w.dispose(), C.dispose(), I.dispose(), M.dispose();
|
|
16095
16095
|
}
|
|
16096
16096
|
};
|
|
16097
16097
|
}
|
|
@@ -16362,12 +16362,12 @@ var Tile3D = (
|
|
|
16362
16362
|
return unloadTrajectory(e), Promise.resolve();
|
|
16363
16363
|
}, t.prototype.intersectRaycaster = function(e, r) {
|
|
16364
16364
|
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;
|
|
16365
|
-
e.hitFilter = function(
|
|
16365
|
+
e.hitFilter = function(b) {
|
|
16366
16366
|
var S;
|
|
16367
|
-
return Object.assign(
|
|
16367
|
+
return Object.assign(b, {
|
|
16368
16368
|
model: (S = o.parent) !== null && S !== void 0 ? S : void 0,
|
|
16369
16369
|
viewLayer: o
|
|
16370
|
-
}), h ? h.call(e,
|
|
16370
|
+
}), h ? h.call(e, b) : !0;
|
|
16371
16371
|
};
|
|
16372
16372
|
var p = e.sortByDistance;
|
|
16373
16373
|
e.sortByDistance = !1;
|
|
@@ -16382,8 +16382,8 @@ var Tile3D = (
|
|
|
16382
16382
|
for (var v = 0, E = m.children.length; v < E; v++)
|
|
16383
16383
|
c.push(m.children[v]);
|
|
16384
16384
|
if (m.selected && m.content && m.content.data && m.content.data.object.visible && (m.content.data.object.intersectRaycaster(e, l), e.firstHitOnly)) {
|
|
16385
|
-
var
|
|
16386
|
-
|
|
16385
|
+
var T = l[0];
|
|
16386
|
+
T && A > T.distance && (A = T.distance);
|
|
16387
16387
|
}
|
|
16388
16388
|
}
|
|
16389
16389
|
}
|
|
@@ -16397,10 +16397,10 @@ var Tile3D = (
|
|
|
16397
16397
|
y = Math.max(y, 0);
|
|
16398
16398
|
var v = Math.min(g.minLevelOfDetail, y);
|
|
16399
16399
|
(!this.visible || !this.loaded || !o.loaded) && (y = Math.max(v, 0));
|
|
16400
|
-
var E = g.minGeometricError,
|
|
16401
|
-
(
|
|
16402
|
-
var
|
|
16403
|
-
|
|
16400
|
+
var E = g.minGeometricError, T = r.controllerMode;
|
|
16401
|
+
(T === "Panorama" || T === "VRPanorama" || T === "XRPanorama") && g.modelAlpha < 0.1 && (E = g.panoramaMinGeometricError);
|
|
16402
|
+
var b = g.maxGeometricError;
|
|
16403
|
+
b = Math.max(E, b);
|
|
16404
16404
|
var S = {
|
|
16405
16405
|
time: r.time,
|
|
16406
16406
|
camera: {
|
|
@@ -16420,7 +16420,7 @@ var Tile3D = (
|
|
|
16420
16420
|
minLevelOfDetail: v,
|
|
16421
16421
|
maxLevelOfDetail: y,
|
|
16422
16422
|
minGeometricError: E,
|
|
16423
|
-
maxGeometricError:
|
|
16423
|
+
maxGeometricError: b,
|
|
16424
16424
|
skipLevelOfDetail: g.skipLevelOfDetail,
|
|
16425
16425
|
mostDetail: g.mostDetail,
|
|
16426
16426
|
loadSiblings: g.loadSiblings,
|
|
@@ -16874,14 +16874,14 @@ function loadViewLayer(n, t) {
|
|
|
16874
16874
|
height: C.height
|
|
16875
16875
|
};
|
|
16876
16876
|
}), A.floorInfo = void 0), A.asset.tilesetVersion = String(A.lodVersion), A.lodVersion = void 0);
|
|
16877
|
-
var
|
|
16878
|
-
|
|
16879
|
-
var
|
|
16880
|
-
v.coordinate ? (
|
|
16877
|
+
var T = g.boundingVolume ? makeBoundingVolume(g.boundingVolume) : void 0;
|
|
16878
|
+
T && g.transform && T.applyMatrix4(scratchMatrix4$2.fromArray(g.transform));
|
|
16879
|
+
var b = null, S = new THREE.Matrix4(), R = new THREE.Matrix4();
|
|
16880
|
+
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(E, scratchVector3$5, S), R.getInverse(S)), A.root = {
|
|
16881
16881
|
refine: (p = g.refine) !== null && p !== void 0 ? p : "REPLACE",
|
|
16882
16882
|
geometricError: g.geometricError,
|
|
16883
16883
|
transform: scratchMatrix4$2.copy(S).premultiply(enuToLocalMatrix).toArray(),
|
|
16884
|
-
boundingVolume:
|
|
16884
|
+
boundingVolume: T ? T.toJson() : void 0,
|
|
16885
16885
|
children: [g]
|
|
16886
16886
|
};
|
|
16887
16887
|
var w = new Tile3D(A, {
|
|
@@ -16891,7 +16891,7 @@ function loadViewLayer(n, t) {
|
|
|
16891
16891
|
light: t.light,
|
|
16892
16892
|
fetcher: t.fetcher,
|
|
16893
16893
|
search: d,
|
|
16894
|
-
groundHeight:
|
|
16894
|
+
groundHeight: b,
|
|
16895
16895
|
enuToEcefMatrix: R,
|
|
16896
16896
|
ecefToEnuMatrix: S,
|
|
16897
16897
|
error: m
|
|
@@ -16975,11 +16975,11 @@ var BufferGeometryUtils = {
|
|
|
16975
16975
|
e.tangent === void 0 && n.setAttribute("tangent", new THREE.BufferAttribute(new Float32Array(4 * l), 4));
|
|
16976
16976
|
for (var c = e.tangent.array, f = [], d = [], h = 0; h < l; h++)
|
|
16977
16977
|
f[h] = new THREE.Vector3(), d[h] = new THREE.Vector3();
|
|
16978
|
-
var p = new THREE.Vector3(), m = new THREE.Vector3(), A = new THREE.Vector3(), g = new THREE.Vector2(), y = new THREE.Vector2(), v = new THREE.Vector2(), E = new THREE.Vector3(),
|
|
16979
|
-
function
|
|
16978
|
+
var p = new THREE.Vector3(), m = new THREE.Vector3(), A = new THREE.Vector3(), g = new THREE.Vector2(), y = new THREE.Vector2(), v = new THREE.Vector2(), E = new THREE.Vector3(), T = new THREE.Vector3();
|
|
16979
|
+
function b(Q, j, V) {
|
|
16980
16980
|
p.fromArray(o, Q * 3), m.fromArray(o, j * 3), A.fromArray(o, V * 3), g.fromArray(u, Q * 2), y.fromArray(u, j * 2), v.fromArray(u, V * 2);
|
|
16981
16981
|
var U = m.x - p.x, G = A.x - p.x, W = m.y - p.y, X = A.y - p.y, Z = m.z - p.z, Y = A.z - p.z, K = y.x - g.x, ee = v.x - g.x, te = y.y - g.y, re = v.y - g.y, ie = 1 / (K * re - ee * te);
|
|
16982
|
-
E.set((re * U - te * G) * ie, (re * W - te * X) * ie, (re * Z - te * Y) * ie),
|
|
16982
|
+
E.set((re * U - te * G) * ie, (re * W - te * X) * ie, (re * Z - te * Y) * ie), T.set((K * G - ee * U) * ie, (K * X - ee * W) * ie, (K * Y - ee * Z) * ie), f[Q].add(E), f[j].add(E), f[V].add(E), d[Q].add(T), d[j].add(T), d[V].add(T);
|
|
16983
16983
|
}
|
|
16984
16984
|
var S = n.groups;
|
|
16985
16985
|
S.length === 0 && (S = [{
|
|
@@ -16988,7 +16988,7 @@ var BufferGeometryUtils = {
|
|
|
16988
16988
|
}]);
|
|
16989
16989
|
for (var h = 0, R = S.length; h < R; ++h)
|
|
16990
16990
|
for (var w = S[h], C = w.start, I = w.count, B = C, M = C + I; B < M; B += 3)
|
|
16991
|
-
|
|
16991
|
+
b(r[B + 0], r[B + 1], r[B + 2]);
|
|
16992
16992
|
var H = new THREE.Vector3(), L = new THREE.Vector3(), O = new THREE.Vector3(), F = new THREE.Vector3(), N, D, q;
|
|
16993
16993
|
function z(Q) {
|
|
16994
16994
|
O.fromArray(s, Q * 3), F.copy(O), D = f[Q], H.copy(D), H.sub(O.multiplyScalar(O.dot(D))).normalize(), L.crossVectors(F, D), q = L.dot(d[Q]), N = q < 0 ? -1 : 1, c[Q * 4] = H.x, c[Q * 4 + 1] = H.y, c[Q * 4 + 2] = H.z, c[Q * 4 + 3] = N;
|
|
@@ -17048,12 +17048,12 @@ var BufferGeometryUtils = {
|
|
|
17048
17048
|
break;
|
|
17049
17049
|
l.morphAttributes = l.morphAttributes || {}, l.morphAttributes[h] = [];
|
|
17050
17050
|
for (var f = 0; f < E; ++f) {
|
|
17051
|
-
for (var
|
|
17052
|
-
|
|
17053
|
-
var
|
|
17054
|
-
if (!
|
|
17051
|
+
for (var T = [], y = 0; y < u[h].length; ++y)
|
|
17052
|
+
T.push(u[h][y][f]);
|
|
17053
|
+
var b = this.mergeBufferAttributes(T);
|
|
17054
|
+
if (!b)
|
|
17055
17055
|
return null;
|
|
17056
|
-
l.morphAttributes[h].push(
|
|
17056
|
+
l.morphAttributes[h].push(b);
|
|
17057
17057
|
}
|
|
17058
17058
|
}
|
|
17059
17059
|
return l;
|
|
@@ -17122,28 +17122,28 @@ var BufferGeometryUtils = {
|
|
|
17122
17122
|
}));
|
|
17123
17123
|
}
|
|
17124
17124
|
for (var y = Math.log10(1 / t), v = Math.pow(10, y), p = 0; p < s; p++) {
|
|
17125
|
-
for (var E = r ? r.getX(p) : p,
|
|
17126
|
-
for (var A = l[
|
|
17127
|
-
|
|
17128
|
-
if (
|
|
17129
|
-
d.push(e[
|
|
17125
|
+
for (var E = r ? r.getX(p) : p, T = "", b = 0, m = l.length; b < m; b++)
|
|
17126
|
+
for (var A = l[b], S = n.getAttribute(A), R = S.itemSize, w = 0; w < R; w++)
|
|
17127
|
+
T += "".concat(~~(S[h[w]](E) * v), ",");
|
|
17128
|
+
if (T in e)
|
|
17129
|
+
d.push(e[T]);
|
|
17130
17130
|
else {
|
|
17131
|
-
for (var
|
|
17132
|
-
for (var A = l[
|
|
17131
|
+
for (var b = 0, m = l.length; b < m; b++)
|
|
17132
|
+
for (var A = l[b], S = n.getAttribute(A), g = n.morphAttributes[A], R = S.itemSize, C = c[A], I = f[A], w = 0; w < R; w++) {
|
|
17133
17133
|
var B = h[w];
|
|
17134
17134
|
if (C.push(S[B](E)), g)
|
|
17135
17135
|
for (var M = 0, H = g.length; M < H; M++)
|
|
17136
17136
|
I[M].push(g[M][B](E));
|
|
17137
17137
|
}
|
|
17138
|
-
e[
|
|
17138
|
+
e[T] = u, d.push(u), u++;
|
|
17139
17139
|
}
|
|
17140
17140
|
}
|
|
17141
17141
|
for (var L = n.clone(), p = 0, m = l.length; p < m; p++) {
|
|
17142
17142
|
var A = l[p], O = n.getAttribute(A), F = new O.array.constructor(c[A]), S = new THREE.BufferAttribute(F, O.itemSize, O.normalized);
|
|
17143
17143
|
if (L.setAttribute(A, S), A in f)
|
|
17144
|
-
for (var
|
|
17145
|
-
var N = n.morphAttributes[A][
|
|
17146
|
-
L.morphAttributes[A][
|
|
17144
|
+
for (var b = 0; b < f[A].length; b++) {
|
|
17145
|
+
var N = n.morphAttributes[A][b], F = new N.array.constructor(f[A][b]), D = new THREE.BufferAttribute(F, N.itemSize, N.normalized);
|
|
17146
|
+
L.morphAttributes[A][b] = D;
|
|
17147
17147
|
}
|
|
17148
17148
|
}
|
|
17149
17149
|
return L.setIndex(d), L;
|
|
@@ -17168,27 +17168,27 @@ function getEdgesBySphere(n, t, e) {
|
|
|
17168
17168
|
}
|
|
17169
17169
|
}), m.length === 0)
|
|
17170
17170
|
return;
|
|
17171
|
-
for (var A = ["a", "b", "c"], g = BufferGeometryUtils.mergeBufferGeometries(m, !1), y = g.getAttribute("position").array, v = ((h = g.getIndex()) === null || h === void 0 ? void 0 : h.array) || [], E = [],
|
|
17172
|
-
var R = new THREE.Vector3(y[
|
|
17171
|
+
for (var A = ["a", "b", "c"], g = BufferGeometryUtils.mergeBufferGeometries(m, !1), y = g.getAttribute("position").array, v = ((h = g.getIndex()) === null || h === void 0 ? void 0 : h.array) || [], E = [], T = [], b = 0, S = y.length; b < S; b += 3) {
|
|
17172
|
+
var R = new THREE.Vector3(y[b], y[b + 1], y[b + 2]);
|
|
17173
17173
|
E.push(R);
|
|
17174
17174
|
}
|
|
17175
|
-
for (var
|
|
17176
|
-
var w = v[
|
|
17177
|
-
|
|
17175
|
+
for (var b = 0, S = v.length; b < S; b += 3) {
|
|
17176
|
+
var w = v[b], C = v[b + 1], I = v[b + 2], B = new THREE.Vector3().crossVectors(E[C].clone().sub(E[w]), E[I].clone().sub(E[w])).normalize();
|
|
17177
|
+
T.push({ a: w, b: C, c: I, normal: B });
|
|
17178
17178
|
}
|
|
17179
|
-
for (var M = {},
|
|
17180
|
-
for (var H = b
|
|
17179
|
+
for (var M = {}, b = 0, S = T.length; b < S; b++)
|
|
17180
|
+
for (var H = T[b], L = 0; L < 3; L++) {
|
|
17181
17181
|
var O = H[A[L]], F = H[A[(L + 1) % 3]], N = [Math.min(O, F), Math.max(O, F)], D = N[0] + "-" + N[1];
|
|
17182
|
-
M[D] === void 0 ? M[D] = { index1: N[0], index2: N[1], face1:
|
|
17182
|
+
M[D] === void 0 ? M[D] = { index1: N[0], index2: N[1], face1: b } : M[D].face2 = b;
|
|
17183
17183
|
}
|
|
17184
17184
|
for (var D in M) {
|
|
17185
17185
|
var q = M[D];
|
|
17186
|
-
if (q.face2 === void 0 ||
|
|
17186
|
+
if (q.face2 === void 0 || T[q.face1].normal.dot(T[q.face2].normal) <= r) {
|
|
17187
17187
|
var z = E[q.index1], Q = E[q.index2];
|
|
17188
17188
|
o.push(new THREE.Line3(z, Q));
|
|
17189
17189
|
}
|
|
17190
17190
|
}
|
|
17191
|
-
E.length = 0,
|
|
17191
|
+
E.length = 0, T.length = 0;
|
|
17192
17192
|
}
|
|
17193
17193
|
});
|
|
17194
17194
|
}
|
|
@@ -17896,40 +17896,40 @@ function sortTile(n) {
|
|
|
17896
17896
|
return t;
|
|
17897
17897
|
}
|
|
17898
17898
|
function parse(n, t) {
|
|
17899
|
-
for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E,
|
|
17899
|
+
for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, T = [], b = null, S = 0, R = [].concat(n); S < R.length; S++) {
|
|
17900
17900
|
var w = R[S];
|
|
17901
17901
|
if ("getURL" in w)
|
|
17902
|
-
|
|
17902
|
+
b = {
|
|
17903
17903
|
allowHosts: w.allowHosts,
|
|
17904
17904
|
expire: w.expire,
|
|
17905
17905
|
issuer: w.issuer
|
|
17906
|
-
},
|
|
17906
|
+
}, T.push(workToJson(w));
|
|
17907
17907
|
else {
|
|
17908
17908
|
var C = typeof w == "string" ? JSON.parse(w) : jsonClone(w), I = verify(C);
|
|
17909
17909
|
if (I instanceof Error)
|
|
17910
17910
|
return I;
|
|
17911
|
-
|
|
17911
|
+
b === null && (b = I), T.push(C);
|
|
17912
17912
|
}
|
|
17913
17913
|
}
|
|
17914
|
-
if (
|
|
17914
|
+
if (b === null)
|
|
17915
17915
|
return new Error("Empty");
|
|
17916
17916
|
defineProperty(t, "issuer", {
|
|
17917
17917
|
enumerable: !0,
|
|
17918
17918
|
configurable: !1,
|
|
17919
17919
|
writable: !1,
|
|
17920
|
-
value:
|
|
17920
|
+
value: b.issuer
|
|
17921
17921
|
}), defineProperty(t, "expire", {
|
|
17922
17922
|
enumerable: !0,
|
|
17923
17923
|
configurable: !1,
|
|
17924
17924
|
writable: !1,
|
|
17925
|
-
value: Object.freeze(
|
|
17925
|
+
value: Object.freeze(b.expire)
|
|
17926
17926
|
}), defineProperty(t, "allowHosts", {
|
|
17927
17927
|
enumerable: !0,
|
|
17928
17928
|
configurable: !1,
|
|
17929
17929
|
writable: !1,
|
|
17930
|
-
value: Object.freeze(
|
|
17930
|
+
value: Object.freeze(b.allowHosts)
|
|
17931
17931
|
});
|
|
17932
|
-
var B =
|
|
17932
|
+
var B = T.reduce(function(U, G) {
|
|
17933
17933
|
return jsonMerge(U, G);
|
|
17934
17934
|
});
|
|
17935
17935
|
defineProperty(t, "name", {
|
|
@@ -18641,8 +18641,8 @@ function parsePano(n, t) {
|
|
|
18641
18641
|
writable: !1,
|
|
18642
18642
|
value: 1
|
|
18643
18643
|
});
|
|
18644
|
-
for (var
|
|
18645
|
-
var S = T
|
|
18644
|
+
for (var T = 0, b = FACE_ORDER$1; T < b.length; T++) {
|
|
18645
|
+
var S = b[T];
|
|
18646
18646
|
defineProperty(E, S, {
|
|
18647
18647
|
enumerable: !0,
|
|
18648
18648
|
configurable: !1,
|
|
@@ -18860,8 +18860,8 @@ var InternalWebGLRenderer = (
|
|
|
18860
18860
|
precision: m
|
|
18861
18861
|
};
|
|
18862
18862
|
if (h) {
|
|
18863
|
-
var E = document.createElement("canvas"),
|
|
18864
|
-
|
|
18863
|
+
var E = document.createElement("canvas"), T = E.getContext("webgl2", y);
|
|
18864
|
+
T ? g = n.call(this, __assign(__assign(__assign({}, y), v), { antialias: !0, canvas: E, 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({}, y), v)) || this);
|
|
18865
18865
|
} else
|
|
18866
18866
|
g = n.call(this, __assign(__assign({}, y), v)) || this;
|
|
18867
18867
|
return g.outputEncoding = THREE.sRGBEncoding, g.autoClear = !0, g;
|
|
@@ -20130,10 +20130,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20130
20130
|
return P.apply(_, arguments);
|
|
20131
20131
|
};
|
|
20132
20132
|
}
|
|
20133
|
-
function
|
|
20133
|
+
function T(P, _) {
|
|
20134
20134
|
return typeof P == u ? P.apply(_ && _[0] || r, _) : P;
|
|
20135
20135
|
}
|
|
20136
|
-
function
|
|
20136
|
+
function b(P, _) {
|
|
20137
20137
|
return P === r ? _ : P;
|
|
20138
20138
|
}
|
|
20139
20139
|
function S(P, _, k) {
|
|
@@ -20202,7 +20202,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20202
20202
|
function le(P, _) {
|
|
20203
20203
|
var k = this;
|
|
20204
20204
|
this.manager = P, this.callback = _, this.element = P.element, this.target = P.options.inputTarget, this.domHandler = function(J) {
|
|
20205
|
-
|
|
20205
|
+
T(P.options.enable, [P]) && k.handler(J);
|
|
20206
20206
|
}, this.init();
|
|
20207
20207
|
}
|
|
20208
20208
|
le.prototype = {
|
|
@@ -20514,7 +20514,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20514
20514
|
compute: function() {
|
|
20515
20515
|
var P = [];
|
|
20516
20516
|
return p(this.manager.recognizers, function(_) {
|
|
20517
|
-
|
|
20517
|
+
T(_.options.enable, [_]) && (P = P.concat(_.getTouchAction()));
|
|
20518
20518
|
}), ft(P.join(" "));
|
|
20519
20519
|
},
|
|
20520
20520
|
/**
|
|
@@ -20560,7 +20560,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20560
20560
|
}
|
|
20561
20561
|
var It = 1, at = 2, Pt = 4, xt = 8, vt = xt, St = 16, Ge = 32;
|
|
20562
20562
|
function mt(P) {
|
|
20563
|
-
this.options = A({}, this.defaults, P || {}), this.id = F(), this.manager = null, this.options.enable =
|
|
20563
|
+
this.options = A({}, this.defaults, P || {}), this.id = F(), this.manager = null, this.options.enable = b(this.options.enable, !0), this.state = It, this.simultaneous = {}, this.requireFail = [];
|
|
20564
20564
|
}
|
|
20565
20565
|
mt.prototype = {
|
|
20566
20566
|
/**
|
|
@@ -20674,7 +20674,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20674
20674
|
*/
|
|
20675
20675
|
recognize: function(P) {
|
|
20676
20676
|
var _ = A({}, P);
|
|
20677
|
-
if (!
|
|
20677
|
+
if (!T(this.options.enable, [this, _])) {
|
|
20678
20678
|
this.reset(), this.state = Ge;
|
|
20679
20679
|
return;
|
|
20680
20680
|
}
|
|
@@ -20948,7 +20948,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20948
20948
|
}
|
|
20949
20949
|
});
|
|
20950
20950
|
function Re(P, _) {
|
|
20951
|
-
return _ = _ || {}, _.recognizers =
|
|
20951
|
+
return _ = _ || {}, _.recognizers = b(_.recognizers, Re.defaults.preset), new st(P, _);
|
|
20952
20952
|
}
|
|
20953
20953
|
Re.VERSION = "2.0.7", Re.defaults = {
|
|
20954
20954
|
/**
|
|
@@ -21446,7 +21446,7 @@ var BaseController = (
|
|
|
21446
21446
|
userAction: !0,
|
|
21447
21447
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21448
21448
|
});
|
|
21449
|
-
r.onPanGesture(L),
|
|
21449
|
+
r.onPanGesture(L), T();
|
|
21450
21450
|
}
|
|
21451
21451
|
}), s.on("tap", function(M) {
|
|
21452
21452
|
if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
|
|
@@ -21488,7 +21488,7 @@ var BaseController = (
|
|
|
21488
21488
|
userAction: !0,
|
|
21489
21489
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21490
21490
|
});
|
|
21491
|
-
r.onTapGesture(L),
|
|
21491
|
+
r.onTapGesture(L), T();
|
|
21492
21492
|
}
|
|
21493
21493
|
}
|
|
21494
21494
|
}), s.on("pinchstart pinch pinchend", function(M) {
|
|
@@ -21530,7 +21530,7 @@ var BaseController = (
|
|
|
21530
21530
|
userAction: !0,
|
|
21531
21531
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21532
21532
|
});
|
|
21533
|
-
r.onPinchGesture(L),
|
|
21533
|
+
r.onPinchGesture(L), T();
|
|
21534
21534
|
}
|
|
21535
21535
|
}), s.on("dbltap", function(M) {
|
|
21536
21536
|
if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
|
|
@@ -21572,7 +21572,7 @@ var BaseController = (
|
|
|
21572
21572
|
userAction: !0,
|
|
21573
21573
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21574
21574
|
});
|
|
21575
|
-
r.onDblTapGesture(L),
|
|
21575
|
+
r.onDblTapGesture(L), T();
|
|
21576
21576
|
}
|
|
21577
21577
|
}
|
|
21578
21578
|
});
|
|
@@ -21654,7 +21654,7 @@ var BaseController = (
|
|
|
21654
21654
|
}, 100)
|
|
21655
21655
|
};
|
|
21656
21656
|
}
|
|
21657
|
-
|
|
21657
|
+
T();
|
|
21658
21658
|
}
|
|
21659
21659
|
}, A = function(M) {
|
|
21660
21660
|
if (!isMobile) {
|
|
@@ -21686,17 +21686,17 @@ var BaseController = (
|
|
|
21686
21686
|
r.mouseMoveState = {
|
|
21687
21687
|
timeStamp: now(),
|
|
21688
21688
|
event: D
|
|
21689
|
-
}, 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 &&
|
|
21689
|
+
}, 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();
|
|
21690
21690
|
}
|
|
21691
21691
|
}, g = function() {
|
|
21692
21692
|
if (r.mouseMoveState) {
|
|
21693
21693
|
var M = createEvent(r.mouseMoveState.event.type, __assign(__assign({}, r.mouseMoveState.event), { isFinal: !0 }));
|
|
21694
21694
|
r.mouseMoveState = void 0, r.onMouseMove(M);
|
|
21695
21695
|
}
|
|
21696
|
-
|
|
21696
|
+
T();
|
|
21697
21697
|
}, y = function(M) {
|
|
21698
21698
|
if (!o(M.center)) {
|
|
21699
|
-
|
|
21699
|
+
T();
|
|
21700
21700
|
return;
|
|
21701
21701
|
}
|
|
21702
21702
|
var H = !1;
|
|
@@ -21712,7 +21712,7 @@ var BaseController = (
|
|
|
21712
21712
|
y(M);
|
|
21713
21713
|
}, !0, 1));
|
|
21714
21714
|
}, v = function(M) {
|
|
21715
|
-
if (
|
|
21715
|
+
if (T(), !(M.touches.length > 1 || M.changedTouches.length <= 0)) {
|
|
21716
21716
|
var H = {
|
|
21717
21717
|
x: M.changedTouches[0].clientX,
|
|
21718
21718
|
y: M.changedTouches[0].clientY
|
|
@@ -21735,7 +21735,7 @@ var BaseController = (
|
|
|
21735
21735
|
y(N);
|
|
21736
21736
|
}
|
|
21737
21737
|
}, E = function(M) {
|
|
21738
|
-
|
|
21738
|
+
T();
|
|
21739
21739
|
var H = {
|
|
21740
21740
|
x: M.clientX,
|
|
21741
21741
|
y: M.clientY
|
|
@@ -21756,7 +21756,7 @@ var BaseController = (
|
|
|
21756
21756
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21757
21757
|
});
|
|
21758
21758
|
y(N);
|
|
21759
|
-
},
|
|
21759
|
+
}, T = function() {
|
|
21760
21760
|
var M;
|
|
21761
21761
|
if (r.pressState) {
|
|
21762
21762
|
var H = now() - r.pressState.timeStamp, L = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { center: __assign(__assign({}, r.pressState.event.center), { delta: H }), isFirst: !1, isFinal: !0, pointers: r.pressState.event.pointers.map(function(O) {
|
|
@@ -21764,7 +21764,7 @@ var BaseController = (
|
|
|
21764
21764
|
}) }));
|
|
21765
21765
|
r.onPressGesture(L), (M = r.pressState) === null || M === void 0 || M.stop(), r.pressState = void 0;
|
|
21766
21766
|
}
|
|
21767
|
-
},
|
|
21767
|
+
}, b = null, S = function(M) {
|
|
21768
21768
|
var H, L = !1, O = !1;
|
|
21769
21769
|
switch (M.type) {
|
|
21770
21770
|
case "gesturestart":
|
|
@@ -21797,21 +21797,21 @@ var BaseController = (
|
|
|
21797
21797
|
}, R = function(M) {
|
|
21798
21798
|
if (M.preventDefault(), !isMobile) {
|
|
21799
21799
|
var H = S(M);
|
|
21800
|
-
|
|
21800
|
+
b = {
|
|
21801
21801
|
firstEvent: H
|
|
21802
21802
|
};
|
|
21803
|
-
var L =
|
|
21803
|
+
var L = b.firstEvent;
|
|
21804
21804
|
L && !o(L.center) || r.onPinchGesture(H);
|
|
21805
21805
|
}
|
|
21806
21806
|
}, w = function(M) {
|
|
21807
|
-
if (M.preventDefault(), !isMobile &&
|
|
21808
|
-
var H = S(M), L =
|
|
21807
|
+
if (M.preventDefault(), !isMobile && b) {
|
|
21808
|
+
var H = S(M), L = b.firstEvent;
|
|
21809
21809
|
L && !o(L.center) || r.onPinchGesture(H);
|
|
21810
21810
|
}
|
|
21811
21811
|
}, C = function(M) {
|
|
21812
|
-
if (M.preventDefault(), !isMobile &&
|
|
21813
|
-
var H = S(M), L =
|
|
21814
|
-
|
|
21812
|
+
if (M.preventDefault(), !isMobile && b) {
|
|
21813
|
+
var H = S(M), L = b.firstEvent;
|
|
21814
|
+
b = null, !(L && !o(L.center)) && r.onPinchGesture(H);
|
|
21815
21815
|
}
|
|
21816
21816
|
}, I = function(M) {
|
|
21817
21817
|
if (M && typeof M.preventDefault == "function" && M.currentTarget === e && M.preventDefault(), typeof getSelection == "function") {
|
|
@@ -21819,9 +21819,9 @@ var BaseController = (
|
|
|
21819
21819
|
H && H.focusNode && (H.removeAllRanges && H.removeAllRanges(), H.empty && H.empty());
|
|
21820
21820
|
}
|
|
21821
21821
|
};
|
|
21822
|
-
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",
|
|
21822
|
+
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", E, !1), e.addEventListener("mouseup", T, !1), e.addEventListener("gesturestart", R, { passive: !1 }), e.addEventListener("gesturechange", w, { passive: !1 }), e.addEventListener("gestureend", C, { passive: !1 }), e.addEventListener("touchstart", I, { passive: !1 }), e.addEventListener("contextmenu", I, !1);
|
|
21823
21823
|
var B = function() {
|
|
21824
|
-
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",
|
|
21824
|
+
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", E, !1), e.removeEventListener("mouseup", T, !1), e.removeEventListener("gesturestart", R, !1), e.removeEventListener("gesturechange", w, !1), e.removeEventListener("gestureend", C, !1), e.removeEventListener("touchstart", I, !1), e.removeEventListener("contextmenu", I, !1);
|
|
21825
21825
|
};
|
|
21826
21826
|
return Object.assign(B, { element: e });
|
|
21827
21827
|
}, t;
|
|
@@ -21927,7 +21927,7 @@ void main() {
|
|
|
21927
21927
|
} : {
|
|
21928
21928
|
workCode: m.workCode,
|
|
21929
21929
|
panoIndex: m.panoIndex
|
|
21930
|
-
}, g = (u = p.fov) !== null && u !== void 0 ? u : d.defaultFov, y = (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), E = clamp$1(typeof d.maxLatitude == "function" ? d.maxLatitude(g) : d.maxLatitude, -Math.PI / 2, Math.PI / 2),
|
|
21930
|
+
}, g = (u = p.fov) !== null && u !== void 0 ? u : d.defaultFov, y = (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), E = 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, E), 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: y, latitude: T, fov: g, offset: b, distance: S });
|
|
21931
21931
|
return R;
|
|
21932
21932
|
}, t.prototype.updateConfiguration = function(e) {
|
|
21933
21933
|
var r = n.prototype.updateConfiguration.call(this, e);
|
|
@@ -22084,8 +22084,8 @@ void main() {
|
|
|
22084
22084
|
this.inMomentumMovement = null;
|
|
22085
22085
|
return;
|
|
22086
22086
|
}
|
|
22087
|
-
this.inMomentumMovement && (this.cameraMotion.set({ longitude: d, latitude: A }, 0).catch(noop), y ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(E,
|
|
22088
|
-
u.requestMomentumMovement(e, !1, l,
|
|
22087
|
+
this.inMomentumMovement && (this.cameraMotion.set({ longitude: d, latitude: A }, 0).catch(noop), y ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(E, T) {
|
|
22088
|
+
u.requestMomentumMovement(e, !1, l, T);
|
|
22089
22089
|
}, !0, 1));
|
|
22090
22090
|
}
|
|
22091
22091
|
}, t.prototype.onPanGesture = function(e) {
|
|
@@ -22218,20 +22218,20 @@ void main() {
|
|
|
22218
22218
|
viaAjax: !0,
|
|
22219
22219
|
fetcher: getFetcher(u.work)
|
|
22220
22220
|
}, void 0, void 0, void 0, this.renderer).then(function(E) {
|
|
22221
|
-
var
|
|
22221
|
+
var T, b, S = E.body;
|
|
22222
22222
|
if (r.destroyed || r.pendingTextureId !== f) {
|
|
22223
22223
|
S.dispose();
|
|
22224
22224
|
return;
|
|
22225
22225
|
}
|
|
22226
22226
|
r.pendingTextureId = null, S.name = g;
|
|
22227
|
-
var R = Array.isArray(S.image) ? S.image[0] : S.image, w = (
|
|
22227
|
+
var R = Array.isArray(S.image) ? S.image[0] : S.image, w = (T = R == null ? void 0 : R.width) !== null && T !== void 0 ? T : 2048, C = {
|
|
22228
22228
|
panoId: h,
|
|
22229
22229
|
map: S,
|
|
22230
22230
|
mapSize: w,
|
|
22231
22231
|
matrix: u.matrix.clone().premultiply(u.work.transform),
|
|
22232
22232
|
zoom: 1
|
|
22233
22233
|
};
|
|
22234
|
-
y.pano0 && y.pano0.map.dispose(), y.pano1 && y.pano1.map !== ((
|
|
22234
|
+
y.pano0 && y.pano0.map.dispose(), y.pano1 && y.pano1.map !== ((b = y.pano0) === null || b === void 0 ? void 0 : b.map) && y.pano1.map.dispose(), y.set({ pano0: C, pano1: C }), r.emit("pano.request", createEvent("pano.request", {
|
|
22235
22235
|
userAction: !0,
|
|
22236
22236
|
prevPano: r.currentPano,
|
|
22237
22237
|
progress: 0,
|
|
@@ -22441,13 +22441,13 @@ void main() {
|
|
|
22441
22441
|
} : {
|
|
22442
22442
|
workCode: m.workCode,
|
|
22443
22443
|
panoIndex: m.panoIndex
|
|
22444
|
-
}, g = d.getObserver(A), y = 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, E = clamp$1(typeof f.minLatitude == "function" ? f.minLatitude(y) : f.minLatitude, -Math.PI / 2, Math.PI / 2),
|
|
22444
|
+
}, g = d.getObserver(A), y = 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, E = clamp$1(typeof f.minLatitude == "function" ? f.minLatitude(y) : f.minLatitude, -Math.PI / 2, Math.PI / 2), T = clamp$1(typeof f.maxLatitude == "function" ? f.maxLatitude(y) : 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, E, T), S = new THREE.Vector3();
|
|
22445
22445
|
return g && S.copy(g.position).applyMatrix4(g.work.transform), {
|
|
22446
22446
|
workCode: A.workCode,
|
|
22447
22447
|
panoIndex: A.panoIndex,
|
|
22448
22448
|
mode: "PanoramaLike",
|
|
22449
22449
|
longitude: v,
|
|
22450
|
-
latitude:
|
|
22450
|
+
latitude: b,
|
|
22451
22451
|
fov: y,
|
|
22452
22452
|
offset: S,
|
|
22453
22453
|
distance: 0
|
|
@@ -22505,8 +22505,8 @@ void main() {
|
|
|
22505
22505
|
this.inMomentumMovement = null;
|
|
22506
22506
|
return;
|
|
22507
22507
|
}
|
|
22508
|
-
this.inMomentumMovement && (this.cameraMotion.set({ longitude: h, latitude: A }, 0).catch(noop), y ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(E,
|
|
22509
|
-
u.requestMomentumMovement(e, !1, l,
|
|
22508
|
+
this.inMomentumMovement && (this.cameraMotion.set({ longitude: h, latitude: A }, 0).catch(noop), y ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(E, T) {
|
|
22509
|
+
u.requestMomentumMovement(e, !1, l, T | 0);
|
|
22510
22510
|
}, !0, 1));
|
|
22511
22511
|
}
|
|
22512
22512
|
}, t.prototype.onPanGesture = function(e) {
|
|
@@ -22923,8 +22923,8 @@ void main() {
|
|
|
22923
22923
|
this.level = clamp$1(A, 0, this.tileTree.maxLevel);
|
|
22924
22924
|
var g = Math.floor(s.width * u), y = Math.floor(s.height * u), v = Math.max(g, y), E = l.capabilities.maxTextureSize;
|
|
22925
22925
|
v > E && (g = Math.floor(g / v * E), y = Math.floor(y / v * E)), (this.renderTarget.width !== g || this.renderTarget.height !== y) && this.renderTarget.setSize(g, y), 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);
|
|
22926
|
-
var
|
|
22927
|
-
this.camera.matrix.equals(
|
|
22926
|
+
var T = scratchCameraQuaternion.setFromRotationMatrix(c), b = scratchCameraMatrix.compose(this.scene.position, T, this.scene.scale);
|
|
22927
|
+
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);
|
|
22928
22928
|
var S = scratchCameraProjectMatrix.copy(f);
|
|
22929
22929
|
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);
|
|
22930
22930
|
var R = this.frustum.planes[5].normal, w = [];
|
|
@@ -23295,18 +23295,18 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23295
23295
|
}, t.prototype.updateTime = function(e, r) {
|
|
23296
23296
|
var o = this, s, u, l, c, f, d;
|
|
23297
23297
|
if (!this.destroyed) {
|
|
23298
|
-
var h = {}, p = {}, m = this.locationMotion.keyframes[0], A = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], g = this.locationMotion.getKeyFrameSegment(e), y = g[0], v = g[1], E = this.panoResourceFromLocationMotionKeyframe(y),
|
|
23298
|
+
var h = {}, p = {}, m = this.locationMotion.keyframes[0], A = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], g = this.locationMotion.getKeyFrameSegment(e), y = g[0], v = g[1], E = this.panoResourceFromLocationMotionKeyframe(y), T = this.panoResourceFromLocationMotionKeyframe(v), b = this.panoResourceFromLocationMotionKeyframe(m), S = this.panoResourceFromLocationMotionKeyframe(A), R = !1;
|
|
23299
23299
|
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) {
|
|
23300
23300
|
this.locationMotion.update(e);
|
|
23301
|
-
var w = new THREE.Vector3().copy(E.position), C = new THREE.Vector3().copy(
|
|
23302
|
-
if (h.progress = I,
|
|
23301
|
+
var w = new THREE.Vector3().copy(E.position), C = new THREE.Vector3().copy(T.position), I = this.locationMotion.value.count - v.value.count + 1;
|
|
23302
|
+
if (h.progress = I, T.panoPicture && (I < 1 ? E.panoPicture && (h.pano0 = E.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") {
|
|
23303
23303
|
if (h.pano0 && E.panoPicture) {
|
|
23304
23304
|
var B = {
|
|
23305
23305
|
panoId: h.pano0.panoId,
|
|
23306
23306
|
map: h.pano0.map,
|
|
23307
23307
|
mapSize: h.pano0.mapSize,
|
|
23308
23308
|
zoom: h.pano0.zoom,
|
|
23309
|
-
matrix: E.panoPicture.matrix.clone().premultiply(E.fixCameraTransform).setPosition(
|
|
23309
|
+
matrix: E.panoPicture.matrix.clone().premultiply(E.fixCameraTransform).setPosition(T.position)
|
|
23310
23310
|
}, M = this.panoPictureObserverMap.get(h.pano0);
|
|
23311
23311
|
M && this.panoPictureObserverMap.set(B, M), h.pano0 = B;
|
|
23312
23312
|
}
|
|
@@ -23332,10 +23332,10 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23332
23332
|
H.indexOf(j) >= 0 || delete this.panoResources[j];
|
|
23333
23333
|
}
|
|
23334
23334
|
}
|
|
23335
|
-
var G = panoParse(
|
|
23335
|
+
var G = panoParse(T.panoId);
|
|
23336
23336
|
G !== this.currentPano && (this.currentPano = G, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
|
|
23337
23337
|
userAction: this.userAction,
|
|
23338
|
-
prevPano: panoParse(
|
|
23338
|
+
prevPano: panoParse(b.panoId),
|
|
23339
23339
|
state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
|
|
23340
23340
|
options: {},
|
|
23341
23341
|
progress: this.locationMotion.progress,
|
|
@@ -23343,7 +23343,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23343
23343
|
}));
|
|
23344
23344
|
}
|
|
23345
23345
|
isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
|
|
23346
|
-
var W = this.works.getObserver(this.currentPano), X = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, Z = this.works.getObserver(E.panoId), Y = this.works.getObserver(
|
|
23346
|
+
var W = this.works.getObserver(this.currentPano), X = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, Z = this.works.getObserver(E.panoId), Y = this.works.getObserver(T.panoId);
|
|
23347
23347
|
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && W) {
|
|
23348
23348
|
for (var K = [], ee = W.work.observers, te = 0, re = W.accessibleNodes; te < re.length; te++) {
|
|
23349
23349
|
var ie = re[te], M = ee[ie];
|
|
@@ -23455,7 +23455,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23455
23455
|
}
|
|
23456
23456
|
{
|
|
23457
23457
|
var I = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, ke = Math.round(I), Pe = this.modelScene.parameter.pano0, _e = this.modelScene.parameter.pano1, Ee = ke === 0 ? Pe : _e, M = void 0;
|
|
23458
|
-
if (Ee && (M = this.works.getObserver(Ee.panoId), M || (M = this.panoPictureObserverMap.get(Ee))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = I < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !M || !Ee || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
|
|
23458
|
+
if (Ee && (M = this.works.getObserver(Ee.panoId), M || (M = this.panoPictureObserverMap.get(Ee))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = I < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !M || !Ee || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
|
|
23459
23459
|
this.tiling.setObserver(null);
|
|
23460
23460
|
var Ce = {
|
|
23461
23461
|
renderer: this.renderer,
|
|
@@ -23502,7 +23502,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23502
23502
|
} else
|
|
23503
23503
|
this.intersectMesh.scale.setScalar(1);
|
|
23504
23504
|
{
|
|
23505
|
-
var Et =
|
|
23505
|
+
var Et = T.effect, ht = this.modelScene.parameter, Pe = ht.pano0, _e = ht.pano1;
|
|
23506
23506
|
if (Pe && _e && Pe !== _e && Et === "fly" && this.flyEffectUseDepthBuffer) {
|
|
23507
23507
|
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) {
|
|
23508
23508
|
var pt = 500, ze = 512;
|
|
@@ -23589,7 +23589,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23589
23589
|
this.pending.add(y);
|
|
23590
23590
|
var v = this.modelScene.parameter, E;
|
|
23591
23591
|
if (v.pano0 && v.pano0.map.name === A ? E = v.pano0 : v.pano1 && v.pano1.map.name === A && (E = v.pano1), E) {
|
|
23592
|
-
var
|
|
23592
|
+
var T = {
|
|
23593
23593
|
panoId: f,
|
|
23594
23594
|
effect: c,
|
|
23595
23595
|
panoPicture: {
|
|
@@ -23602,8 +23602,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23602
23602
|
position: d.position.clone().applyMatrix4(d.work.transform),
|
|
23603
23603
|
fixCameraTransform: new THREE.Matrix4()
|
|
23604
23604
|
};
|
|
23605
|
-
|
|
23606
|
-
s.pending.delete(y), s.doMoveToPano(e,
|
|
23605
|
+
T.panoPicture && this.panoPictureObserverMap.set(T.panoPicture, d), this.pendingTextureTask = void 0, AnimationFrameLoop.shared.add(function() {
|
|
23606
|
+
s.pending.delete(y), s.doMoveToPano(e, T, r);
|
|
23607
23607
|
}, !0, 1);
|
|
23608
23608
|
return;
|
|
23609
23609
|
}
|
|
@@ -23651,8 +23651,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23651
23651
|
})), s.emit("error", S), r.moveCancelCallback && r.moveCancelCallback();
|
|
23652
23652
|
}
|
|
23653
23653
|
};
|
|
23654
|
-
var
|
|
23655
|
-
|
|
23654
|
+
var b = this.panoMeshes.get(f);
|
|
23655
|
+
b && b.tap && b.tap(), this.textureLoader.loadCubeTexture(m, {
|
|
23656
23656
|
imageURL: {
|
|
23657
23657
|
transform: h,
|
|
23658
23658
|
options: p
|
|
@@ -23750,26 +23750,26 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23750
23750
|
o === void 0 && (o = {});
|
|
23751
23751
|
var v = now(), E = createUuid();
|
|
23752
23752
|
this.panoResources[E] = r;
|
|
23753
|
-
var
|
|
23753
|
+
var T = 1, b, S, R;
|
|
23754
23754
|
if (this.locationMotion.ended) {
|
|
23755
23755
|
var w = this.locationMotion.getKeyFrameSegment(v);
|
|
23756
23756
|
w[0];
|
|
23757
23757
|
var C = w[1], I = this.locationMotion.value, B = ((u = this.panoResourceFromLocationMotionKeyframe(C)) !== null && u !== void 0 ? u : this.camera).position, M = r.position;
|
|
23758
|
-
|
|
23758
|
+
b = Math.max(B.distanceTo(M), T), S = [
|
|
23759
23759
|
{ key: C.key, progress: 0, value: __assign(__assign({}, I), { count: 0 }) },
|
|
23760
23760
|
{ key: E, progress: 1, value: { distance: 0, count: 1 } }
|
|
23761
23761
|
], R = 0;
|
|
23762
23762
|
} else {
|
|
23763
|
-
var H = this.locationMotion.getKeyFrameSegment(v), L = H[0], C = H[1], I = this.locationMotion.value, O = this.panoResourceFromLocationMotionKeyframe(L).position, B = this.panoResourceFromLocationMotionKeyframe(C).position, M = r.position, F = C.value.count - I.count, N = Math.max(O.distanceTo(B),
|
|
23764
|
-
|
|
23763
|
+
var H = this.locationMotion.getKeyFrameSegment(v), L = H[0], C = H[1], I = this.locationMotion.value, O = this.panoResourceFromLocationMotionKeyframe(L).position, B = this.panoResourceFromLocationMotionKeyframe(C).position, M = r.position, F = C.value.count - I.count, N = Math.max(O.distanceTo(B), T) * F, D = Math.max(B.distanceTo(M), T);
|
|
23764
|
+
b = N + D, S = [
|
|
23765
23765
|
{ key: L.key, progress: 0, value: __assign({}, I) },
|
|
23766
|
-
{ key: C.key, progress: N /
|
|
23766
|
+
{ key: C.key, progress: N / b, value: C.value },
|
|
23767
23767
|
{ key: E, progress: 1, value: { count: C.value.count + 1, distance: 0 } }
|
|
23768
23768
|
];
|
|
23769
23769
|
var q = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
|
|
23770
23770
|
q === 0 || q === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * q / z;
|
|
23771
23771
|
}
|
|
23772
|
-
var Q = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ?
|
|
23772
|
+
var Q = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), j = {
|
|
23773
23773
|
longitude: o.longitude,
|
|
23774
23774
|
latitude: o.latitude,
|
|
23775
23775
|
fov: o.fov
|
|
@@ -23915,12 +23915,12 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23915
23915
|
return typeof U == "undefined" && (U = scratchVector3$3.copy(V.standingPosition).applyMatrix4(V.work.transform).distanceTo(l), y.set(V, U)), j - U;
|
|
23916
23916
|
});
|
|
23917
23917
|
y.clear();
|
|
23918
|
-
for (var E = 0,
|
|
23919
|
-
for (var
|
|
23918
|
+
for (var E = 0, T = [Math.PI / 8, Math.PI / 6, Math.PI / 4, Math.PI / 3]; E < T.length; E++)
|
|
23919
|
+
for (var b = T[E], S = 0, R = v; S < R.length; S++) {
|
|
23920
23920
|
var w = R[S], C = A[w];
|
|
23921
23921
|
if (C) {
|
|
23922
23922
|
var I = scratchVector3$3.copy(C.standingPosition).applyMatrix4(C.work.transform).sub(l);
|
|
23923
|
-
if (I && I.length() !== 0 && m.angleTo(I) <
|
|
23923
|
+
if (I && I.length() !== 0 && m.angleTo(I) < b)
|
|
23924
23924
|
return C;
|
|
23925
23925
|
}
|
|
23926
23926
|
}
|
|
@@ -23995,30 +23995,30 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23995
23995
|
if (!l)
|
|
23996
23996
|
this.emit("gesture.tap", e), e.defaultPrevented || this.locationMotion.ended === !0 && this.cameraBounce();
|
|
23997
23997
|
else {
|
|
23998
|
-
for (var
|
|
23998
|
+
for (var T = {}, b = Math.PI / 6, S = Math.PI / 12, R = l.position.clone().applyMatrix4(l.work.transform).setY(0).sub(c.position.clone().applyMatrix4(l.work.transform).setY(0)).normalize(), w = [], C = [], I = [], B = l.work.observers, M = 0, H = l.accessibleNodes; M < H.length; M++) {
|
|
23999
23999
|
var m = H[M];
|
|
24000
24000
|
if (l.panoIndex !== m && !(m === this.currentPano.panoIndex && l.work.workCode === this.currentPano.workCode)) {
|
|
24001
24001
|
var L = B[m];
|
|
24002
24002
|
if (L) {
|
|
24003
24003
|
var O = L.position.clone().applyMatrix4(L.work.transform).sub(l.position.clone().applyMatrix4(l.work.transform)).setY(0).normalize();
|
|
24004
|
-
R.angleTo(O) <
|
|
24004
|
+
R.angleTo(O) < b && I.push(O);
|
|
24005
24005
|
}
|
|
24006
24006
|
}
|
|
24007
24007
|
}
|
|
24008
24008
|
var F = I.length > 0 ? I : __spreadArray(__spreadArray([], w, !0), C, !0), N = F.slice().sort(function(U, G) {
|
|
24009
24009
|
return U.angleTo(R) - G.angleTo(R);
|
|
24010
24010
|
})[0];
|
|
24011
|
-
if (N && N.angleTo(u) > S && (
|
|
24011
|
+
if (N && N.angleTo(u) > S && (T.longitude = Math.atan2(-N.x, -N.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
|
|
24012
24012
|
var D = e.state.fov, q = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(D) : this.minLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(D) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
|
|
24013
|
-
|
|
24013
|
+
T.latitude = clamp$1(0, q, z);
|
|
24014
24014
|
}
|
|
24015
24015
|
var Q = __assign({}, e.state);
|
|
24016
|
-
if (Q.workCode = l.work.workCode, Q.panoIndex = l.panoIndex,
|
|
24016
|
+
if (Q.workCode = l.work.workCode, Q.panoIndex = l.panoIndex, T.longitude !== void 0 && (Q.longitude = T.longitude), T.latitude !== void 0 && (Q.latitude = T.latitude), T.fov !== void 0 && (Q.fov = T.fov), Q.distance = 0, Q.offset = l.position.clone(), e.state = Q, this.emit("gesture.tap", e), !e.defaultPrevented) {
|
|
24017
24017
|
if (this.emit("pano.select", createEvent("pano.select", {
|
|
24018
24018
|
prevPano: this.currentPano,
|
|
24019
24019
|
state: Q,
|
|
24020
24020
|
userAction: e.userAction,
|
|
24021
|
-
options:
|
|
24021
|
+
options: T,
|
|
24022
24022
|
progress: 0,
|
|
24023
24023
|
error: null
|
|
24024
24024
|
})), l && !l.active) {
|
|
@@ -24033,7 +24033,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24033
24033
|
prevPano: this.currentPano,
|
|
24034
24034
|
progress: 0,
|
|
24035
24035
|
state: Q,
|
|
24036
|
-
options:
|
|
24036
|
+
options: T,
|
|
24037
24037
|
error: null
|
|
24038
24038
|
}));
|
|
24039
24039
|
}
|
|
@@ -24120,16 +24120,16 @@ function isInsideCrossOriginIFrame() {
|
|
|
24120
24120
|
}
|
|
24121
24121
|
var updateEyeViewMatrices = /* @__PURE__ */ (function() {
|
|
24122
24122
|
function n(r, o, s) {
|
|
24123
|
-
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, y = l * h, v = l * p, E = c * p,
|
|
24124
|
-
return r[0] = 1 - (y + E), r[1] = A + S, r[2] = g -
|
|
24123
|
+
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, y = l * h, v = l * p, E = c * p, T = f * d, b = f * h, S = f * p;
|
|
24124
|
+
return r[0] = 1 - (y + E), r[1] = A + S, r[2] = g - b, r[3] = 0, r[4] = A - S, r[5] = 1 - (m + E), r[6] = v + T, r[7] = 0, r[8] = g + b, r[9] = v - T, r[10] = 1 - (m + y), r[11] = 0, r[12] = 0, r[13] = 0, r[14] = 0, r[15] = 1, r;
|
|
24125
24125
|
}
|
|
24126
24126
|
function t(r, o, s) {
|
|
24127
|
-
var u = s[0], l = s[1], c = s[2], f, d, h, p, m, A, g, y, v, E,
|
|
24128
|
-
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], y = o[7], v = o[8], E = o[9],
|
|
24127
|
+
var u = s[0], l = s[1], c = s[2], f, d, h, p, m, A, g, y, v, E, T, b;
|
|
24128
|
+
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], y = o[7], v = o[8], E = 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] = y, r[8] = v, r[9] = E, r[10] = T, r[11] = b, r[12] = f * u + m * l + v * c + o[12], r[13] = d * u + A * l + E * c + o[13], r[14] = h * u + g * l + T * c + o[14], r[15] = p * u + y * l + b * c + o[15]), r;
|
|
24129
24129
|
}
|
|
24130
24130
|
function e(r, o) {
|
|
24131
|
-
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], y = o[11], v = o[12], E = o[13],
|
|
24132
|
-
return D ? (D = 1 / D, r[0] = (d * N - h * F + p * O) * D, r[1] = (l * F - u * N - c * O) * D, r[2] = (E * B -
|
|
24131
|
+
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], y = o[11], v = o[12], E = o[13], T = o[14], b = o[15], S = s * d - u * f, R = s * h - l * f, w = s * p - c * f, C = u * h - l * d, I = u * p - c * d, B = l * p - c * h, M = m * E - A * v, H = m * T - g * v, L = m * b - y * v, O = A * T - g * E, F = A * b - y * E, N = g * b - y * T, D = S * N - R * F + w * O + C * L - I * H + B * M;
|
|
24132
|
+
return D ? (D = 1 / D, r[0] = (d * N - h * F + p * O) * D, r[1] = (l * F - u * N - c * O) * D, r[2] = (E * B - T * I + b * C) * D, r[3] = (g * I - A * B - y * C) * D, r[4] = (h * L - f * N - p * H) * D, r[5] = (s * N - l * L + c * H) * D, r[6] = (T * w - v * B - b * R) * D, r[7] = (m * B - g * w + y * R) * D, r[8] = (f * F - d * L + p * M) * D, r[9] = (u * L - s * F - c * M) * D, r[10] = (v * I - E * w + b * S) * D, r[11] = (A * w - m * I - y * S) * D, r[12] = (d * H - f * O - h * M) * D, r[13] = (s * O - u * H + l * M) * D, r[14] = (E * R - v * C - T * S) * D, r[15] = (m * C - A * R + g * S) * D, r) : null;
|
|
24133
24133
|
}
|
|
24134
24134
|
return function(r, o, s) {
|
|
24135
24135
|
n(r, o), s && t(r, r, s), e(r, r);
|
|
@@ -24937,7 +24937,7 @@ void main() {
|
|
|
24937
24937
|
var o = this, s, u, l, c, f, d;
|
|
24938
24938
|
if (!this.destroyed) {
|
|
24939
24939
|
this.updateHelperElementSize(), this.userAction = !0, this.needsRender = !0, this.modelSceneNeedsRender = !0;
|
|
24940
|
-
var h = {}, p = {}, m = this.locationMotion.keyframes[0], A = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], g = this.locationMotion.getKeyFrameSegment(e), y = g[0], v = g[1], E = this.panoResourceFromLocationMotionKeyframe(y),
|
|
24940
|
+
var h = {}, p = {}, m = this.locationMotion.keyframes[0], A = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], g = this.locationMotion.getKeyFrameSegment(e), y = g[0], v = g[1], E = this.panoResourceFromLocationMotionKeyframe(y), T = this.panoResourceFromLocationMotionKeyframe(v), b = this.panoResourceFromLocationMotionKeyframe(m), S = this.panoResourceFromLocationMotionKeyframe(A), R = !1;
|
|
24941
24941
|
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) {
|
|
24942
24942
|
this.locationMotion.update(e);
|
|
24943
24943
|
var w = this.locationMotion.getKeyFrameSegment(e), C = w[0], I = w[1], B = this.panoResourceFromLocationMotionKeyframe(C), M = this.panoResourceFromLocationMotionKeyframe(I), H = B.position, L = M.position, O = this.locationMotion.value.count - I.value.count + 1;
|
|
@@ -24976,7 +24976,7 @@ void main() {
|
|
|
24976
24976
|
}
|
|
24977
24977
|
this.currentPano = panoParse(M.panoId), this.emit("pano.moving", createEvent("pano.moving", {
|
|
24978
24978
|
userAction: this.userAction,
|
|
24979
|
-
prevPano: panoParse(
|
|
24979
|
+
prevPano: panoParse(b.panoId),
|
|
24980
24980
|
state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
|
|
24981
24981
|
options: {},
|
|
24982
24982
|
progress: this.locationMotion.progress,
|
|
@@ -24989,7 +24989,7 @@ void main() {
|
|
|
24989
24989
|
userAction: !0,
|
|
24990
24990
|
state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
|
|
24991
24991
|
}))), this.works.getObserver(this.currentPano);
|
|
24992
|
-
var te = this.works.getObserver(E.panoId), re = this.works.getObserver(
|
|
24992
|
+
var te = this.works.getObserver(E.panoId), re = this.works.getObserver(T.panoId), ie = /* @__PURE__ */ new Map();
|
|
24993
24993
|
if (te)
|
|
24994
24994
|
for (var ce = 0, ae = te.accessibleNodes; ce < ae.length; ce++) {
|
|
24995
24995
|
var de = ae[ce], N = te.work.observers[de];
|
|
@@ -25038,7 +25038,7 @@ void main() {
|
|
|
25038
25038
|
}
|
|
25039
25039
|
{
|
|
25040
25040
|
var O = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, he = Math.round(O), ne = this.modelScene.parameter.pano0, se = this.modelScene.parameter.pano1, pe = he === 0 ? ne : se, N = void 0;
|
|
25041
|
-
if (pe && (N = this.works.getObserver(pe.panoId), N || (N = this.panoPictureObserverMap.get(pe))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = O < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !N || !pe || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
|
|
25041
|
+
if (pe && (N = this.works.getObserver(pe.panoId), N || (N = this.panoPictureObserverMap.get(pe))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = O < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !N || !pe || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
|
|
25042
25042
|
this.tiling.setObserver(null);
|
|
25043
25043
|
var me = {
|
|
25044
25044
|
renderer: this.renderer,
|
|
@@ -25081,7 +25081,7 @@ void main() {
|
|
|
25081
25081
|
}
|
|
25082
25082
|
this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
|
|
25083
25083
|
{
|
|
25084
|
-
var Ie =
|
|
25084
|
+
var Ie = T.effect, $e = this.modelScene.parameter, ne = $e.pano0, se = $e.pano1;
|
|
25085
25085
|
if (ne && se && ne !== se && Ie === "fly" && this.flyEffectUseDepthBuffer) {
|
|
25086
25086
|
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) !== se.panoId) {
|
|
25087
25087
|
var tt = 500, ke = 512;
|
|
@@ -25154,16 +25154,16 @@ void main() {
|
|
|
25154
25154
|
}
|
|
25155
25155
|
}
|
|
25156
25156
|
}
|
|
25157
|
-
var
|
|
25157
|
+
var T = d.sort(function(C, I) {
|
|
25158
25158
|
return C.intersection.distance - I.intersection.distance;
|
|
25159
25159
|
})[0];
|
|
25160
|
-
|
|
25161
|
-
var
|
|
25160
|
+
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]);
|
|
25161
|
+
var b = createEvent("intersect.update", {
|
|
25162
25162
|
raycaster: c,
|
|
25163
25163
|
intersection: f != null ? f : null,
|
|
25164
25164
|
object: this.intersectMesh
|
|
25165
25165
|
});
|
|
25166
|
-
if (this.emit("intersect.update",
|
|
25166
|
+
if (this.emit("intersect.update", b), b.defaultPrevented) {
|
|
25167
25167
|
this.hideIntersectMesh();
|
|
25168
25168
|
return;
|
|
25169
25169
|
}
|
|
@@ -25171,10 +25171,10 @@ void main() {
|
|
|
25171
25171
|
var S = f.face.normal, R = new THREE.Quaternion();
|
|
25172
25172
|
R.setFromUnitVectors(new THREE.Vector3(0, 0, 1), S), this.intersectMesh.quaternion.copy(R);
|
|
25173
25173
|
var w = f.point.clone();
|
|
25174
|
-
this.intersectMesh.position.copy(w),
|
|
25174
|
+
this.intersectMesh.position.copy(w), T ? this.intersectMesh.visible = !1 : this.intersectMesh.visible = !0;
|
|
25175
25175
|
} else
|
|
25176
25176
|
this.intersectMesh.visible = !1;
|
|
25177
|
-
return
|
|
25177
|
+
return T == null ? void 0 : T.panoMesh;
|
|
25178
25178
|
}, t.prototype.onPanGesture = function() {
|
|
25179
25179
|
}, t.prototype.onTapGesture = function() {
|
|
25180
25180
|
}, t.prototype.onPinchGesture = function() {
|
|
@@ -25208,7 +25208,7 @@ void main() {
|
|
|
25208
25208
|
} : {
|
|
25209
25209
|
workCode: m.workCode,
|
|
25210
25210
|
panoIndex: m.panoIndex
|
|
25211
|
-
}, g = d.getObserver(A), y = 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, E = clamp$1(typeof f.minLatitude == "function" ? f.minLatitude(y) : f.minLatitude, -Math.PI / 2, Math.PI / 2),
|
|
25211
|
+
}, g = d.getObserver(A), y = 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, E = clamp$1(typeof f.minLatitude == "function" ? f.minLatitude(y) : f.minLatitude, -Math.PI / 2, Math.PI / 2), T = clamp$1(typeof f.maxLatitude == "function" ? f.maxLatitude(y) : 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, E, T), S = new THREE.Vector3();
|
|
25212
25212
|
if (f.initial.state.offset)
|
|
25213
25213
|
S.copy(f.initial.state.offset);
|
|
25214
25214
|
else if (g)
|
|
@@ -25222,7 +25222,7 @@ void main() {
|
|
|
25222
25222
|
panoIndex: A.panoIndex,
|
|
25223
25223
|
mode: "Model",
|
|
25224
25224
|
longitude: v,
|
|
25225
|
-
latitude:
|
|
25225
|
+
latitude: b,
|
|
25226
25226
|
fov: y,
|
|
25227
25227
|
offset: S,
|
|
25228
25228
|
distance: 0
|
|
@@ -25320,8 +25320,8 @@ void main() {
|
|
|
25320
25320
|
this.cameraMotion.ended || (this.cameraMotion.update(e), s.longitude = this.cameraMotion.value.longitude, s.latitude = this.cameraMotion.value.latitude, s.fov = this.cameraMotion.value.fov), isEmptyObject(o) || this.modelScene.parameter.set(o), isEmptyObject(s) || this.setCamera(s);
|
|
25321
25321
|
var v = this.works.getObserver(this.currentPano);
|
|
25322
25322
|
if (this.intersectMesh && this.intersectMesh.parent && v && v.position.y - v.standingPosition.y > 10) {
|
|
25323
|
-
var E = this.camera.position.distanceTo(this.intersectMesh.position),
|
|
25324
|
-
this.intersectMesh.scale.setScalar(
|
|
25323
|
+
var E = this.camera.position.distanceTo(this.intersectMesh.position), T = 2 * Math.tan(0.5 * this.camera.fov / 180 * Math.PI), b = E * T / 5;
|
|
25324
|
+
this.intersectMesh.scale.setScalar(b);
|
|
25325
25325
|
} else
|
|
25326
25326
|
this.intersectMesh.scale.setScalar(1);
|
|
25327
25327
|
}
|
|
@@ -25377,8 +25377,8 @@ void main() {
|
|
|
25377
25377
|
var s = this, u, l, c;
|
|
25378
25378
|
r === void 0 && (r = {}), this.userAction = o, this.stopMomentumMovement();
|
|
25379
25379
|
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++) {
|
|
25380
|
-
var g = this.locationMotion.keyframes[A - 1].value, y = g.x, v = g.y, E = g.z,
|
|
25381
|
-
m += Math.sqrt(Math.pow(
|
|
25380
|
+
var g = this.locationMotion.keyframes[A - 1].value, y = g.x, v = g.y, E = g.z, T = this.locationMotion.keyframes[A].value, b = T.x, S = T.y, R = T.z;
|
|
25381
|
+
m += Math.sqrt(Math.pow(b - y, 2) + Math.pow(S - v, 2) + Math.pow(R - E, 2));
|
|
25382
25382
|
}
|
|
25383
25383
|
for (var w = h === 0 ? 0 : p * m / h, C = this.calculateMovingDuration(r.duration, h), I = {
|
|
25384
25384
|
x: e.x,
|
|
@@ -25465,14 +25465,14 @@ void main() {
|
|
|
25465
25465
|
}
|
|
25466
25466
|
}
|
|
25467
25467
|
if (o) {
|
|
25468
|
-
for (var f = new THREE.Vector3().copy(o.point).add(HUMAN_EYE_POSITION), d = [], h = function(
|
|
25468
|
+
for (var f = new THREE.Vector3().copy(o.point).add(HUMAN_EYE_POSITION), d = [], h = function(b) {
|
|
25469
25469
|
var S = p.modelScene.models.find(function(I) {
|
|
25470
|
-
return I.work ===
|
|
25470
|
+
return I.work === b;
|
|
25471
25471
|
});
|
|
25472
|
-
if (!S || S.visible === !1 ||
|
|
25472
|
+
if (!S || S.visible === !1 || b.observers.length <= 0)
|
|
25473
25473
|
return "continue";
|
|
25474
|
-
if (scratchObserverBox$1.copy(
|
|
25475
|
-
for (var R = 0, w =
|
|
25474
|
+
if (scratchObserverBox$1.copy(b.observerBox).expandByScalar(10).applyMatrix4(b.transform), scratchObserverBox$1.containsPoint(f))
|
|
25475
|
+
for (var R = 0, w = b.observers; R < w.length; R++) {
|
|
25476
25476
|
var C = w[R];
|
|
25477
25477
|
d.push(C);
|
|
25478
25478
|
}
|
|
@@ -25480,12 +25480,12 @@ void main() {
|
|
|
25480
25480
|
var g = A[m];
|
|
25481
25481
|
h(g);
|
|
25482
25482
|
}
|
|
25483
|
-
var y = arrayMin(d, function(
|
|
25484
|
-
return scratchVector3$2.copy(
|
|
25483
|
+
var y = arrayMin(d, function(b) {
|
|
25484
|
+
return scratchVector3$2.copy(b.position).applyMatrix4(b.work.transform).distanceTo(f);
|
|
25485
25485
|
}, !0), v = y[0], E = y[1];
|
|
25486
25486
|
if (v && E < 5) {
|
|
25487
|
-
var
|
|
25488
|
-
f.y =
|
|
25487
|
+
var T = scratchVector3$2.copy(v.position).applyMatrix4(v.work.transform);
|
|
25488
|
+
f.y = T.y;
|
|
25489
25489
|
}
|
|
25490
25490
|
e.state.offset.copy(f), e.state.distance = 0, this.emit("gesture.tap", e), e.defaultPrevented || this.moveToPosition(f, {}, !0);
|
|
25491
25491
|
} else
|
|
@@ -25538,14 +25538,14 @@ void main() {
|
|
|
25538
25538
|
} : {
|
|
25539
25539
|
workCode: g.workCode,
|
|
25540
25540
|
panoIndex: g.panoIndex
|
|
25541
|
-
}, v = (u = A.fov) !== null && u !== void 0 ? u : 60, E = clamp$1(typeof d.minLatitude == "function" ? d.minLatitude(v) : d.minLatitude, -Math.PI / 2, Math.PI / 2),
|
|
25541
|
+
}, v = (u = A.fov) !== null && u !== void 0 ? u : 60, E = 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, E, T), S = t.distanceFromModel(d.modelScene, v, d.camera.aspect), R = new THREE.Vector3(), w = (c = A.distance) !== null && c !== void 0 ? c : Math.min(d.defaultDistance, S), C = (f = A.longitude) !== null && f !== void 0 ? f : isThirdPersonMode(g.mode) ? g.longitude : d.defaultLongitude;
|
|
25542
25542
|
if (A.offset)
|
|
25543
25543
|
R.copy(A.offset);
|
|
25544
25544
|
else {
|
|
25545
25545
|
var I = h.getObserver(y);
|
|
25546
25546
|
d.defaultDistance < S && I ? (R.copy(I.position).applyMatrix4(I.work.transform), A.longitude === void 0 && (C = g.longitude)) : (p.boundingBox.getCenter(R), w = S);
|
|
25547
25547
|
}
|
|
25548
|
-
return __assign(__assign({}, y), { mode: "Mapview", longitude: C, latitude:
|
|
25548
|
+
return __assign(__assign({}, y), { mode: "Mapview", longitude: C, latitude: b, fov: v, offset: R, distance: w });
|
|
25549
25549
|
}, t.prototype.updateConfiguration = function(e) {
|
|
25550
25550
|
var r = n.prototype.updateConfiguration.call(this, e);
|
|
25551
25551
|
if (r === !1)
|
|
@@ -25728,10 +25728,10 @@ void main() {
|
|
|
25728
25728
|
s = Math.max(s, 1);
|
|
25729
25729
|
for (var l = __assign({}, o), c = { longitude: 0, latitude: 0, x: 0, y: 0, z: 0 }, f = 0; f < s; f++)
|
|
25730
25730
|
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;
|
|
25731
|
-
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), y = __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(y.distance)), E = !(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),
|
|
25732
|
-
|
|
25733
|
-
var
|
|
25734
|
-
if (this.inMomentumMovement.event =
|
|
25731
|
+
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), y = __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(y.distance)), E = !(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;
|
|
25732
|
+
T === !1 && (E = !0);
|
|
25733
|
+
var b = createEvent("gesture.momentum", __assign(__assign({}, e), { isFirst: r, isFinal: E, state: y }));
|
|
25734
|
+
if (this.inMomentumMovement.event = b, this.emit("gesture.momentum", b), e.defaultPrevented) {
|
|
25735
25735
|
this.inMomentumMovement = null;
|
|
25736
25736
|
return;
|
|
25737
25737
|
}
|
|
@@ -25815,9 +25815,9 @@ void main() {
|
|
|
25815
25815
|
var y = {
|
|
25816
25816
|
x: e.center.x - o.x,
|
|
25817
25817
|
y: e.center.y - o.y
|
|
25818
|
-
}, v = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z), E = coordinatesToVector(this.cameraMotion.value).setLength(this.locationMotion.value.distance).add(v),
|
|
25819
|
-
|
|
25820
|
-
var
|
|
25818
|
+
}, v = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z), E = coordinatesToVector(this.cameraMotion.value).setLength(this.locationMotion.value.distance).add(v), T = new THREE.Vector3().copy(E).sub(o.target).length();
|
|
25819
|
+
T *= Math.tan(this.camera.pose.fov / 2 * Math.PI / 180);
|
|
25820
|
+
var b = this.renderer.getSize(new THREE.Vector2()), S = 2 * y.x * T / b.y, R = 2 * y.y * T / b.y, w = new THREE.Vector3();
|
|
25821
25821
|
w.setFromMatrixColumn(this.camera.matrix, 0), w.multiplyScalar(-S), v.add(w), this.camera.pose.latitude < PANGESTURE_FORWARD_ANGLE ? w.setFromMatrixColumn(this.camera.matrix, 1) : (w.setFromMatrixColumn(this.camera.matrix, 0), w.crossVectors(this.camera.up, w)), w.multiplyScalar(R), v.add(w);
|
|
25822
25822
|
var C = __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 });
|
|
25823
25823
|
if (e.state = C, this.emit("gesture.pan", e), e.defaultPrevented)
|
|
@@ -25832,7 +25832,7 @@ void main() {
|
|
|
25832
25832
|
y: C.offset.y,
|
|
25833
25833
|
z: C.offset.z
|
|
25834
25834
|
}, 0).catch(noop)), e.isFinal) {
|
|
25835
|
-
var I = this.renderer.getSize(new THREE.Vector2()), B = 2 * e.velocityX *
|
|
25835
|
+
var I = this.renderer.getSize(new THREE.Vector2()), B = 2 * e.velocityX * T / I.y, M = 2 * e.velocityY * T / I.y, H = new THREE.Vector3(), L = new THREE.Vector3();
|
|
25836
25836
|
H.setFromMatrixColumn(this.camera.matrix, 0), H.multiplyScalar(-B), L.add(H), this.camera.pose.latitude < PANGESTURE_FORWARD_ANGLE ? H.setFromMatrixColumn(this.camera.matrix, 1) : (H.setFromMatrixColumn(this.camera.matrix, 0), H.crossVectors(this.camera.up, H)), H.multiplyScalar(M), L.add(H), this.inMomentumMovement = {
|
|
25837
25837
|
uuid: createUuid()
|
|
25838
25838
|
}, this.requestMomentumMovement(e, !0, { longitude: 0, latitude: 0, x: L.x, y: L.y, z: L.z }, 0);
|
|
@@ -26005,20 +26005,20 @@ void main() {
|
|
|
26005
26005
|
viaAjax: !0,
|
|
26006
26006
|
fetcher: getFetcher(u.work)
|
|
26007
26007
|
}, void 0, void 0, void 0, this.renderer).then(function(E) {
|
|
26008
|
-
var
|
|
26008
|
+
var T, b, S = E.body;
|
|
26009
26009
|
if (r.destroyed || r.pendingTextureId !== f) {
|
|
26010
26010
|
S.dispose();
|
|
26011
26011
|
return;
|
|
26012
26012
|
}
|
|
26013
26013
|
r.pendingTextureId = null, S.name = g;
|
|
26014
|
-
var R = Array.isArray(S.image) ? S.image[0] : S.image, w = (
|
|
26014
|
+
var R = Array.isArray(S.image) ? S.image[0] : S.image, w = (T = R == null ? void 0 : R.width) !== null && T !== void 0 ? T : 2048, C = {
|
|
26015
26015
|
panoId: h,
|
|
26016
26016
|
map: S,
|
|
26017
26017
|
mapSize: w,
|
|
26018
26018
|
matrix: u.matrix.clone().premultiply(u.work.transform),
|
|
26019
26019
|
zoom: 1
|
|
26020
26020
|
};
|
|
26021
|
-
y.pano0 && y.pano0.map.dispose(), y.pano1 && y.pano1.map !== ((
|
|
26021
|
+
y.pano0 && y.pano0.map.dispose(), y.pano1 && y.pano1.map !== ((b = y.pano0) === null || b === void 0 ? void 0 : b.map) && y.pano1.map.dispose(), y.set({ pano0: C, pano1: C }), r.emit("pano.request", createEvent("pano.request", {
|
|
26022
26022
|
userAction: !0,
|
|
26023
26023
|
prevPano: r.currentPano,
|
|
26024
26024
|
progress: 0,
|
|
@@ -26085,12 +26085,12 @@ var _moveEvent = { type: "move" }, XRController = (
|
|
|
26085
26085
|
var g = f.joints[p.jointName];
|
|
26086
26086
|
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;
|
|
26087
26087
|
}
|
|
26088
|
-
var y = f.joints["index-finger-tip"], v = f.joints["thumb-tip"], E = y.position.distanceTo(v.position),
|
|
26089
|
-
f.inputState.pinching && E >
|
|
26088
|
+
var y = f.joints["index-finger-tip"], v = f.joints["thumb-tip"], E = y.position.distanceTo(v.position), T = 0.02, b = 5e-3;
|
|
26089
|
+
f.inputState.pinching && E > T + b ? (f.inputState.pinching = !1, this.dispatchEvent({
|
|
26090
26090
|
type: "pinchend",
|
|
26091
26091
|
handedness: t.handedness,
|
|
26092
26092
|
target: this
|
|
26093
|
-
})) : !f.inputState.pinching && E <=
|
|
26093
|
+
})) : !f.inputState.pinching && E <= T - b && (f.inputState.pinching = !0, this.dispatchEvent({
|
|
26094
26094
|
type: "pinchstart",
|
|
26095
26095
|
handedness: t.handedness,
|
|
26096
26096
|
target: this
|
|
@@ -26150,8 +26150,8 @@ var _moveEvent = { type: "move" }, XRController = (
|
|
|
26150
26150
|
this.cameraLPos.setFromMatrixPosition(e.matrixWorld), this.cameraRPos.setFromMatrixPosition(r.matrixWorld);
|
|
26151
26151
|
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), y = g * -h;
|
|
26152
26152
|
e.matrixWorld.decompose(t.position, t.quaternion, t.scale), t.translateX(y), t.translateZ(g), t.matrixWorld.compose(t.position, t.quaternion, t.scale), t.matrixWorldInverse.getInverse(t.matrixWorld);
|
|
26153
|
-
var v = l + g, E = c + g,
|
|
26154
|
-
t.projectionMatrix.makePerspective(
|
|
26153
|
+
var v = l + g, E = c + g, T = m - y, b = A + (o - y), S = f * c / E * v, R = d * c / E * v;
|
|
26154
|
+
t.projectionMatrix.makePerspective(T, b, S, R, v, E);
|
|
26155
26155
|
}, n.prototype.getCamera = function(t) {
|
|
26156
26156
|
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({
|
|
26157
26157
|
depthNear: this.cameraVR.near,
|
|
@@ -26611,20 +26611,20 @@ var LineSegments2 = (
|
|
|
26611
26611
|
return e.setAttribute("instanceDistanceStart", new THREE.InterleavedBufferAttribute(h, 1, 0)), e.setAttribute("instanceDistanceEnd", new THREE.InterleavedBufferAttribute(h, 1, 1)), this;
|
|
26612
26612
|
}, t.prototype.raycast = function(e, r) {
|
|
26613
26613
|
e.camera === null && console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');
|
|
26614
|
-
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(), y = new THREE.Vector3(), v = new THREE.Matrix4(), E = new THREE.Line3(),
|
|
26614
|
+
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(), y = new THREE.Vector3(), v = new THREE.Matrix4(), E = new THREE.Line3(), T = new THREE.Vector3();
|
|
26615
26615
|
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, y.copy(g);
|
|
26616
|
-
var
|
|
26617
|
-
v.multiplyMatrices(s.matrixWorldInverse,
|
|
26616
|
+
var b = this.matrixWorld;
|
|
26617
|
+
v.multiplyMatrices(s.matrixWorldInverse, b);
|
|
26618
26618
|
for (var S = 0, R = h.count; S < R; S++) {
|
|
26619
26619
|
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);
|
|
26620
26620
|
var w = m.z < -1 && A.z < -1, C = m.z > 1 && A.z > 1;
|
|
26621
26621
|
if (!(w || C)) {
|
|
26622
26622
|
m.x *= f.x / 2, m.y *= f.y / 2, A.x *= f.x / 2, A.y *= f.y / 2, E.start.copy(m), E.start.z = 0, E.end.copy(A), E.end.z = 0;
|
|
26623
26623
|
var I = E.closestPointToPointParameter(y, !0);
|
|
26624
|
-
E.at(I,
|
|
26625
|
-
var B = THREE.MathUtils.lerp(m.z, A.z, I), M = B >= -1 && B <= 1, H = y.distanceTo(
|
|
26624
|
+
E.at(I, T);
|
|
26625
|
+
var B = THREE.MathUtils.lerp(m.z, A.z, I), M = B >= -1 && B <= 1, H = y.distanceTo(T) < d * 0.5;
|
|
26626
26626
|
if (M && H) {
|
|
26627
|
-
E.start.fromBufferAttribute(h, S), E.end.fromBufferAttribute(p, S), E.start.applyMatrix4(
|
|
26627
|
+
E.start.fromBufferAttribute(h, S), E.end.fromBufferAttribute(p, S), E.start.applyMatrix4(b), E.end.applyMatrix4(b);
|
|
26628
26628
|
var L = new THREE.Vector3(), O = new THREE.Vector3();
|
|
26629
26629
|
o.distanceSqToSegment(E.start, E.end, O, L), r.push({
|
|
26630
26630
|
point: O,
|
|
@@ -26707,7 +26707,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
|
|
|
26707
26707
|
}
|
|
26708
26708
|
return Object.defineProperty(t, "version", {
|
|
26709
26709
|
get: function() {
|
|
26710
|
-
return "6.6.
|
|
26710
|
+
return "6.6.10";
|
|
26711
26711
|
},
|
|
26712
26712
|
enumerable: !1,
|
|
26713
26713
|
configurable: !0
|
|
@@ -27214,15 +27214,15 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27214
27214
|
pano: e
|
|
27215
27215
|
}));
|
|
27216
27216
|
}
|
|
27217
|
-
var v = this.modelScene.parameter.resolveValue(), E = v.pano0,
|
|
27218
|
-
if ((E == null ? void 0 : E.map.name) === g ?
|
|
27217
|
+
var v = this.modelScene.parameter.resolveValue(), E = v.pano0, T = v.pano1, b;
|
|
27218
|
+
if ((E == null ? void 0 : E.map.name) === g ? b = E : (T == null ? void 0 : T.map.name) === g && (b = T), b) {
|
|
27219
27219
|
var S = {
|
|
27220
27220
|
panoId: f,
|
|
27221
27221
|
effect: c,
|
|
27222
27222
|
leftPanoPicture: {
|
|
27223
|
-
panoId:
|
|
27224
|
-
map:
|
|
27225
|
-
mapSize:
|
|
27223
|
+
panoId: b.panoId,
|
|
27224
|
+
map: b.map,
|
|
27225
|
+
mapSize: b.mapSize,
|
|
27226
27226
|
matrix: d.matrix.clone().premultiply(d.work.transform),
|
|
27227
27227
|
zoom: 1
|
|
27228
27228
|
},
|
|
@@ -27318,26 +27318,26 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27318
27318
|
o === void 0 && (o = {});
|
|
27319
27319
|
var y = now(), v = createUuid();
|
|
27320
27320
|
this.panoResources[v] = r;
|
|
27321
|
-
var E = 1,
|
|
27321
|
+
var E = 1, T, b, S;
|
|
27322
27322
|
if (this.locationMotion.ended) {
|
|
27323
27323
|
var R = this.locationMotion.getKeyFrameSegment(y);
|
|
27324
27324
|
R[0];
|
|
27325
27325
|
var w = R[1], C = this.locationMotion.value, I = this.panoResourceFromLocationMotionKeyframe(w).position, B = r.position;
|
|
27326
|
-
|
|
27326
|
+
T = Math.max(I.distanceTo(B), E), b = [
|
|
27327
27327
|
{ key: w.key, progress: 0, value: __assign(__assign({}, C), { count: 0 }) },
|
|
27328
27328
|
{ key: v, progress: 1, value: { distance: 0, count: 1 } }
|
|
27329
27329
|
], S = 0;
|
|
27330
27330
|
} else {
|
|
27331
27331
|
var M = this.locationMotion.getKeyFrameSegment(y), H = M[0], w = M[1], C = this.locationMotion.value, L = this.panoResourceFromLocationMotionKeyframe(H).position, I = this.panoResourceFromLocationMotionKeyframe(w).position, B = r.position, O = w.value.count - C.count, F = Math.max(L.distanceTo(I), E) * O, N = Math.max(I.distanceTo(B), E);
|
|
27332
|
-
|
|
27332
|
+
T = F + N, b = [
|
|
27333
27333
|
{ key: H.key, progress: 0, value: __assign({}, C) },
|
|
27334
|
-
{ key: w.key, progress: F /
|
|
27334
|
+
{ key: w.key, progress: F / T, value: w.value },
|
|
27335
27335
|
{ key: v, progress: 1, value: { count: w.value.count + 1, distance: 0 } }
|
|
27336
27336
|
];
|
|
27337
|
-
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), q = this.locationMotionKeyframesLength(
|
|
27337
|
+
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), q = this.locationMotionKeyframesLength(b);
|
|
27338
27338
|
S = this.locationMotion.getProgressVelocity(y) * D / q;
|
|
27339
27339
|
}
|
|
27340
|
-
var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ?
|
|
27340
|
+
var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), Q = {
|
|
27341
27341
|
longitude: o.longitude,
|
|
27342
27342
|
latitude: o.latitude,
|
|
27343
27343
|
fov: o.fov
|
|
@@ -27364,8 +27364,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27364
27364
|
W.lookAt(G);
|
|
27365
27365
|
var Z = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), Y = new THREE.Matrix4().getInverse(X).premultiply(Z), K = this.cameraMotion.value.fov, ee = (h = Q.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
|
|
27366
27366
|
r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
|
|
27367
|
-
for (var re = ee * te, ie = 0; ie <
|
|
27368
|
-
var ce =
|
|
27367
|
+
for (var re = ee * te, ie = 0; ie < b.length - 1; ie++) {
|
|
27368
|
+
var ce = b[ie].key;
|
|
27369
27369
|
if (ce) {
|
|
27370
27370
|
var ae = this.panoResources[ce];
|
|
27371
27371
|
ae && (ae.fixCameraTransform.copy(Y), ae.leftPanoPicture && (ae.leftPanoPicture.zoom = Math.tan(re / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
|
|
@@ -27398,7 +27398,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27398
27398
|
}
|
|
27399
27399
|
], z).catch(noop);
|
|
27400
27400
|
}
|
|
27401
|
-
var de = this.locationMotion.setKeyframes(
|
|
27401
|
+
var de = this.locationMotion.setKeyframes(b, z, S);
|
|
27402
27402
|
de.then(
|
|
27403
27403
|
// resolve
|
|
27404
27404
|
// 动画结束
|
|
@@ -27497,10 +27497,10 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27497
27497
|
var E = panoStringify({
|
|
27498
27498
|
panoIndex: s.panoIndex,
|
|
27499
27499
|
workCode: s.work.workCode
|
|
27500
|
-
}),
|
|
27501
|
-
|
|
27500
|
+
}), T = this.panoMeshes.get(E);
|
|
27501
|
+
T && (T.setDisabled(!1), T.setLoading(!0));
|
|
27502
27502
|
}
|
|
27503
|
-
var
|
|
27503
|
+
var b = {
|
|
27504
27504
|
workCode: s.work.workCode,
|
|
27505
27505
|
panoIndex: s.panoIndex,
|
|
27506
27506
|
mode: this.mode,
|
|
@@ -27512,7 +27512,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27512
27512
|
};
|
|
27513
27513
|
return this.emit("pano.select", createEvent("pano.select", {
|
|
27514
27514
|
prevPano: this.currentPano,
|
|
27515
|
-
state:
|
|
27515
|
+
state: b,
|
|
27516
27516
|
userAction: !0,
|
|
27517
27517
|
options: {},
|
|
27518
27518
|
progress: 0,
|
|
@@ -27521,7 +27521,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27521
27521
|
userAction: !0,
|
|
27522
27522
|
prevPano: this.currentPano,
|
|
27523
27523
|
progress: 0,
|
|
27524
|
-
state:
|
|
27524
|
+
state: b,
|
|
27525
27525
|
options: {},
|
|
27526
27526
|
error: null
|
|
27527
27527
|
})), {
|
|
@@ -27540,7 +27540,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27540
27540
|
for (var o = this, s, u, l, c, f, d, h, p, m, A = [], g = 2; g < arguments.length; g++)
|
|
27541
27541
|
A[g - 2] = arguments[g];
|
|
27542
27542
|
this.userAction = !0;
|
|
27543
|
-
var y = {}, v = {}, E = this.locationMotion.keyframes[0],
|
|
27543
|
+
var y = {}, v = {}, E = this.locationMotion.keyframes[0], T = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], b = this.locationMotion.getKeyFrameSegment(e), S = b[0], R = b[1], w = this.panoResourceFromLocationMotionKeyframe(S), C = this.panoResourceFromLocationMotionKeyframe(R), I = this.panoResourceFromLocationMotionKeyframe(E), B = this.panoResourceFromLocationMotionKeyframe(T), M = !1;
|
|
27544
27544
|
if (this.cameraMotion.ended === !1 && (this.cameraMotion.update(e), v.fov = this.cameraMotion.value.fov), this.modelAlphaMotion.ended === !1 && (this.modelAlphaMotion.update(e), y.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) {
|
|
27545
27545
|
this.locationMotion.update(e);
|
|
27546
27546
|
var H = this.locationMotion.getKeyFrameSegment(e);
|
|
@@ -27768,7 +27768,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27768
27768
|
}
|
|
27769
27769
|
{
|
|
27770
27770
|
var N = (d = this.modelScene.parameter.progress) !== null && d !== void 0 ? d : 1, Ht = Math.round(N), it = this.modelScene.parameter.pano0, ft = this.modelScene.parameter.pano1, Tt = Ht === 0 ? it : ft, q = void 0;
|
|
27771
|
-
if (Tt && (q = this.works.getObserver(Tt.panoId), q || (q = this.panoPictureObserverMap.get(Tt))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !q || !Tt || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
|
|
27771
|
+
if (Tt && (q = this.works.getObserver(Tt.panoId), q || (q = this.panoPictureObserverMap.get(Tt))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !q || !Tt || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
|
|
27772
27772
|
this.tiling.setObserver(null);
|
|
27773
27773
|
var It = {
|
|
27774
27774
|
renderer: this.renderer,
|
|
@@ -29013,31 +29013,31 @@ void main() {
|
|
|
29013
29013
|
set: function(O) {
|
|
29014
29014
|
}
|
|
29015
29015
|
}), g.videoTexture = new THREE.VideoTexture(e.videoInstance || generateDefaultVideoElement());
|
|
29016
|
-
var
|
|
29017
|
-
g.scene.add(
|
|
29018
|
-
var
|
|
29019
|
-
defineProperty(
|
|
29016
|
+
var T = initLights();
|
|
29017
|
+
g.scene.add(T);
|
|
29018
|
+
var b = new THREE.Group();
|
|
29019
|
+
defineProperty(b, "children", {
|
|
29020
29020
|
get: function() {
|
|
29021
|
-
return
|
|
29021
|
+
return T.children;
|
|
29022
29022
|
},
|
|
29023
29023
|
set: function(O) {
|
|
29024
|
-
|
|
29024
|
+
T.children = O;
|
|
29025
29025
|
}
|
|
29026
|
-
}), defineProperty(
|
|
29026
|
+
}), defineProperty(b, "visible", {
|
|
29027
29027
|
get: function() {
|
|
29028
|
-
return
|
|
29028
|
+
return T.visible;
|
|
29029
29029
|
},
|
|
29030
29030
|
set: function(O) {
|
|
29031
|
-
|
|
29031
|
+
T.visible = O;
|
|
29032
29032
|
}
|
|
29033
|
-
}), defineProperty(
|
|
29033
|
+
}), defineProperty(b, "name", {
|
|
29034
29034
|
get: function() {
|
|
29035
|
-
return
|
|
29035
|
+
return T.name;
|
|
29036
29036
|
},
|
|
29037
29037
|
set: function(O) {
|
|
29038
|
-
|
|
29038
|
+
T.name = O;
|
|
29039
29039
|
}
|
|
29040
|
-
}), g.modelScene.add(
|
|
29040
|
+
}), g.modelScene.add(b), g.state = {
|
|
29041
29041
|
mode: g.currentMode,
|
|
29042
29042
|
workCode: g.pano.workCode,
|
|
29043
29043
|
panoIndex: g.pano.panoIndex,
|
|
@@ -29075,7 +29075,7 @@ void main() {
|
|
|
29075
29075
|
}
|
|
29076
29076
|
return Object.defineProperty(t, "version", {
|
|
29077
29077
|
get: function() {
|
|
29078
|
-
return "6.6.
|
|
29078
|
+
return "6.6.10";
|
|
29079
29079
|
},
|
|
29080
29080
|
enumerable: !1,
|
|
29081
29081
|
configurable: !0
|
|
@@ -29298,8 +29298,8 @@ void main() {
|
|
|
29298
29298
|
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"));
|
|
29299
29299
|
var E = [];
|
|
29300
29300
|
if (Array.isArray(e))
|
|
29301
|
-
for (var
|
|
29302
|
-
var S = T
|
|
29301
|
+
for (var T = 0, b = e; T < b.length; T++) {
|
|
29302
|
+
var S = b[T];
|
|
29303
29303
|
S instanceof Work ? E.push(S) : typeof S != "string" && "work" in S ? E.push(parseWork(S.work, S)) : E.push(parseWork(S));
|
|
29304
29304
|
}
|
|
29305
29305
|
else
|
|
@@ -29534,8 +29534,8 @@ void main() {
|
|
|
29534
29534
|
return;
|
|
29535
29535
|
}
|
|
29536
29536
|
(e === t.Mode.Floorplan || e === t.Mode.Topview || e === t.Mode.Mapview || e === t.Mode.Model) && (l.modelScene.loaded || (A = 0));
|
|
29537
|
-
var E = l.controller,
|
|
29538
|
-
if (l.controller && l.controller.stopMomentumMovement(), l.controller && u === !1 &&
|
|
29537
|
+
var E = l.controller, T = l.currentMode, b = function() {
|
|
29538
|
+
if (l.controller && l.controller.stopMomentumMovement(), l.controller && u === !1 && T === e)
|
|
29539
29539
|
e === t.Mode.Panorama || e === t.Mode.Model || e === t.Mode.VRPanorama || e === t.Mode.XRPanorama ? !panoEqual(l.pano, y) && "moveToPano" in l.controller && typeof l.controller.moveToPano == "function" ? l.controller.moveToPano(y, __assign({ duration: A }, r), s) : l.controller.updateCamera(r, A, s).catch(noop) : (panoEqual(l.pano, y) || (l.pano = y), l.controller.updateCamera(r, A, s).catch(noop));
|
|
29540
29540
|
else {
|
|
29541
29541
|
var R = __assign(__assign({}, r), y), w = __assign(__assign({ initial: {
|
|
@@ -29565,7 +29565,7 @@ void main() {
|
|
|
29565
29565
|
};
|
|
29566
29566
|
if (e === t.Mode.VRPanorama)
|
|
29567
29567
|
l.requestFullscreen(), requestDeviceOrientationPermission().then(function() {
|
|
29568
|
-
return
|
|
29568
|
+
return b();
|
|
29569
29569
|
}).catch(function(R) {
|
|
29570
29570
|
var w = R instanceof Error ? R : new Error(String(R));
|
|
29571
29571
|
l.exitFullscreen(), l.throwError(w), f(w);
|
|
@@ -29573,44 +29573,44 @@ void main() {
|
|
|
29573
29573
|
else if (e === t.Mode.XRPanorama) {
|
|
29574
29574
|
var S = AnimationFrameLoop.shared.getContext();
|
|
29575
29575
|
S ? S.end() : requestXRSessionPermission().then(function(R) {
|
|
29576
|
-
AnimationFrameLoop.shared.setContext(R),
|
|
29576
|
+
AnimationFrameLoop.shared.setContext(R), b();
|
|
29577
29577
|
}).catch(function(R) {
|
|
29578
29578
|
var w = R instanceof Error ? R : new Error(String(R));
|
|
29579
29579
|
l.throwError(w), f(w);
|
|
29580
29580
|
});
|
|
29581
29581
|
} else
|
|
29582
|
-
|
|
29582
|
+
b();
|
|
29583
29583
|
});
|
|
29584
29584
|
}, t.prototype.getPixels = function(e, r, o, s, u, l, c) {
|
|
29585
29585
|
if (!this.renderer)
|
|
29586
29586
|
throw new Error("renderer is not initialized.");
|
|
29587
|
-
var f = this.renderer.getPixelRatio(), d = this.renderer.getRenderTarget(), h = this.renderer.getSize(new THREE.Vector2()), p = 0, m = 0, A = 1, g = 1, y, v, E,
|
|
29588
|
-
typeof e == "number" ? (p = e, typeof r == "number" && (m = r), typeof o == "number" && (A = o), typeof s == "number" && (g = s), y = u, v = l,
|
|
29587
|
+
var f = this.renderer.getPixelRatio(), d = this.renderer.getRenderTarget(), h = this.renderer.getSize(new THREE.Vector2()), p = 0, m = 0, A = 1, g = 1, y, v, E, T, b;
|
|
29588
|
+
typeof e == "number" ? (p = e, typeof r == "number" && (m = r), typeof o == "number" && (A = o), typeof s == "number" && (g = s), y = u, v = l, b = c) : (p = e.x, m = e.y, A = e.width, g = e.height, y = e.pixelRatio, v = e.flipY, E = e.helperVisible, T = e.skipPanorama, b = e.buffer), p = Math.ceil(p), m = Math.ceil(m), A = Math.ceil(A), g = Math.ceil(g), y = Math.ceil(y != null ? y : f), v = v != null ? v : !1;
|
|
29589
29589
|
var S = this.helperVisible, R = this.modelScene.parameter.modelAlpha;
|
|
29590
|
-
this.helperVisible = E != null ? E : this.helperVisible,
|
|
29590
|
+
this.helperVisible = E != null ? E : 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);
|
|
29591
29591
|
var w = this.getPixelsRenderTarget;
|
|
29592
29592
|
w.setSize(A * y, g * y), this.renderer.setRenderTarget(w), this.camera.pixelRatio = y, 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);
|
|
29593
29593
|
var C = A * y, I = g * y, B = C * I, M = B * 4;
|
|
29594
|
-
if (
|
|
29595
|
-
if (
|
|
29594
|
+
if (b) {
|
|
29595
|
+
if (b.length !== M)
|
|
29596
29596
|
throw new Error("buffer length is not equals pixels ".concat(M));
|
|
29597
29597
|
} else
|
|
29598
|
-
|
|
29599
|
-
if (this.renderer.readRenderTargetPixels(w, 0, 0, A * y, g * y,
|
|
29598
|
+
b = new Uint8Array(M);
|
|
29599
|
+
if (this.renderer.readRenderTargetPixels(w, 0, 0, A * y, g * y, b), v)
|
|
29600
29600
|
for (var H = B / 2, L = 0, O = 0, F = 0, N = 0; O < H; O++)
|
|
29601
29601
|
for (N = (I - Math.floor(O / C) - 1) * C + O % C, F = 0; F < 4; F++)
|
|
29602
|
-
L =
|
|
29603
|
-
return
|
|
29602
|
+
L = b[O * 4 + F], b[O * 4 + F] = b[N * 4 + F], b[N * 4 + F] = L;
|
|
29603
|
+
return b;
|
|
29604
29604
|
}, t.prototype.getElement = function() {
|
|
29605
29605
|
var e;
|
|
29606
29606
|
return (e = this.renderer) === null || e === void 0 ? void 0 : e.domElement;
|
|
29607
29607
|
}, t.prototype.render = function(e) {
|
|
29608
29608
|
var r = this.renderer;
|
|
29609
29609
|
if (r) {
|
|
29610
|
-
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(), y = Math.floor(A.x * this.viewport.left), v = Math.floor(A.y * this.viewport.bottom), E = Math.floor(A.x * this.viewport.width),
|
|
29611
|
-
r.setClearColor(this.backgroundColor, this.backgroundAlpha), r.setViewport(y, v, E,
|
|
29612
|
-
var
|
|
29613
|
-
r.setScissorTest(
|
|
29610
|
+
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(), y = Math.floor(A.x * this.viewport.left), v = Math.floor(A.y * this.viewport.bottom), E = Math.floor(A.x * this.viewport.width), T = Math.floor(A.y * this.viewport.height);
|
|
29611
|
+
r.setClearColor(this.backgroundColor, this.backgroundAlpha), r.setViewport(y, v, E, T), r.setScissor(y, v, E, T);
|
|
29612
|
+
var b = this.viewport.bottom !== 0 || this.viewport.left !== 0 || this.viewport.width !== 1 || this.viewport.height !== 1;
|
|
29613
|
+
r.setScissorTest(b);
|
|
29614
29614
|
var S = this.scene.background;
|
|
29615
29615
|
this.modelScene.background = this.camera.isOrthographicCamera ? null : S, this.modelScene.environment = this.scene.environment, this.scene.background = null;
|
|
29616
29616
|
var R = this.getBuiltinRenderer(r);
|
|
@@ -29635,12 +29635,12 @@ void main() {
|
|
|
29635
29635
|
y instanceof Model && y.outdated && m.push(y);
|
|
29636
29636
|
}
|
|
29637
29637
|
for (var v = 0, E = m; v < E.length; v++) {
|
|
29638
|
-
var
|
|
29639
|
-
this.modelScene.remove(
|
|
29638
|
+
var T = E[v];
|
|
29639
|
+
this.modelScene.remove(T), T.dispose();
|
|
29640
29640
|
}
|
|
29641
29641
|
if (m.length > 0)
|
|
29642
|
-
for (var
|
|
29643
|
-
var y = S[
|
|
29642
|
+
for (var b = 0, S = this.modelScene.children; b < S.length; b++) {
|
|
29643
|
+
var y = S[b];
|
|
29644
29644
|
y instanceof Model && (y.visible = !0, this.modelSceneNeedsRender = !0);
|
|
29645
29645
|
}
|
|
29646
29646
|
}
|
|
@@ -29751,7 +29751,7 @@ void main() {
|
|
|
29751
29751
|
panoIndex: e.panoIndex
|
|
29752
29752
|
};
|
|
29753
29753
|
}
|
|
29754
|
-
var E = (l = e.mode) !== null && l !== void 0 ? l : this.state.mode,
|
|
29754
|
+
var E = (l = e.mode) !== null && l !== void 0 ? l : this.state.mode, T, b, S, R, w;
|
|
29755
29755
|
if (this.controller && this.controller.stopMomentumMovement(), this.state.mode !== E) {
|
|
29756
29756
|
if (E === "VRPanorama") {
|
|
29757
29757
|
this.changeMode("VRPanorama", void 0, void 0, !0);
|
|
@@ -29769,15 +29769,15 @@ void main() {
|
|
|
29769
29769
|
effect: "fly",
|
|
29770
29770
|
userAction: !1
|
|
29771
29771
|
} }, this.commonParams()), this.controllerInits[E]), B = Controllers[E].initAnimationEndState(I);
|
|
29772
|
-
|
|
29772
|
+
T = B.longitude, b = B.latitude, S = B.fov, R = B.offset, w = B.distance;
|
|
29773
29773
|
} else
|
|
29774
|
-
|
|
29774
|
+
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, w = (p = e.distance) !== null && p !== void 0 ? p : this.state.distance;
|
|
29775
29775
|
var M = {
|
|
29776
29776
|
workCode: (g != null ? g : this.pano).workCode,
|
|
29777
29777
|
panoIndex: (g != null ? g : this.pano).panoIndex,
|
|
29778
29778
|
mode: E,
|
|
29779
|
-
longitude:
|
|
29780
|
-
latitude:
|
|
29779
|
+
longitude: T,
|
|
29780
|
+
latitude: b,
|
|
29781
29781
|
fov: S,
|
|
29782
29782
|
offset: R,
|
|
29783
29783
|
distance: w
|
|
@@ -29836,9 +29836,9 @@ void main() {
|
|
|
29836
29836
|
}
|
|
29837
29837
|
}
|
|
29838
29838
|
if (this.controller instanceof Controllers.Floorplan || this.controller instanceof Controllers.Topview || this.controller instanceof Controllers.Mapview) {
|
|
29839
|
-
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, y = o ? this.state.distance : stepNumber(this.camera.pose.distance, this.state.distance, g), v = this.camera.pose.offset.distanceTo(this.state.offset), E = v > h * 15 ? v / 15 : h,
|
|
29840
|
-
if (notSimilarValue(m, this.camera.pose.fov) || notSimilarVector3(
|
|
29841
|
-
var w = { x:
|
|
29839
|
+
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, y = o ? this.state.distance : stepNumber(this.camera.pose.distance, this.state.distance, g), v = this.camera.pose.offset.distanceTo(this.state.offset), E = v > h * 15 ? v / 15 : h, T = o ? new THREE.Vector3().copy(this.state.offset) : stepVector(this.camera.pose.offset, this.state.offset, E), 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;
|
|
29840
|
+
if (notSimilarValue(m, this.camera.pose.fov) || notSimilarVector3(T, this.camera.pose.offset) || notSimilarValue(y, this.camera.pose.distance) || notSimilarValue(S, this.camera.pose.longitude, Math.PI * 2) || notSimilarValue(R, this.camera.pose.latitude)) {
|
|
29841
|
+
var w = { x: T.x, y: T.y, z: T.z }, C = { fov: m };
|
|
29842
29842
|
return Object.assign(w, {
|
|
29843
29843
|
distance: y
|
|
29844
29844
|
}), Object.assign(C, {
|
|
@@ -29847,8 +29847,8 @@ void main() {
|
|
|
29847
29847
|
}), this.controller.stopMomentumMovement(), this.controller.cameraMotion.set(C, 0).catch(noop), this.controller.locationMotion.set(w, 0).catch(noop), !0;
|
|
29848
29848
|
}
|
|
29849
29849
|
} else {
|
|
29850
|
-
var I = 1, B = 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 }, B), S = M.longitude, R = M.latitude, y = this.state.distance,
|
|
29851
|
-
if (notSimilarValue(y, this.camera.pose.distance) && (this.state.distance = this.camera.pose.distance), notSimilarVector3(
|
|
29850
|
+
var I = 1, B = 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 }, B), S = M.longitude, R = M.latitude, y = this.state.distance, T = new THREE.Vector3().copy(this.state.offset);
|
|
29851
|
+
if (notSimilarValue(y, 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))
|
|
29852
29852
|
return this.controller.stopMomentumMovement(), this.controller.cameraMotion.set({ longitude: S, latitude: R, fov: m }, 0).catch(noop), !0;
|
|
29853
29853
|
}
|
|
29854
29854
|
if (this.stateSynced = !0, s === !1 && this.emit("state.synced", createEvent("state.synced", {
|
|
@@ -29889,8 +29889,8 @@ void main() {
|
|
|
29889
29889
|
var y = g[A];
|
|
29890
29890
|
y instanceof Model && (y.outdated = !0, h.set(y.work.workCode, y), p = !0);
|
|
29891
29891
|
}
|
|
29892
|
-
for (var v = function(
|
|
29893
|
-
var S = e[
|
|
29892
|
+
for (var v = function(b) {
|
|
29893
|
+
var S = e[b], R = S.workCode && h.get(S.workCode);
|
|
29894
29894
|
if (R)
|
|
29895
29895
|
R.work = S, R.outdated = !1, h.delete(S.workCode), m.push(R);
|
|
29896
29896
|
else {
|
|
@@ -29902,7 +29902,7 @@ void main() {
|
|
|
29902
29902
|
if (C)
|
|
29903
29903
|
if (typeof C == "function")
|
|
29904
29904
|
for (var O = 0, F = I.viewLayers; O < F.length; O++) {
|
|
29905
|
-
var N = F[O], D = C(N, I,
|
|
29905
|
+
var N = F[O], D = C(N, I, b);
|
|
29906
29906
|
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)));
|
|
29907
29907
|
}
|
|
29908
29908
|
else
|
|
@@ -29925,8 +29925,8 @@ void main() {
|
|
|
29925
29925
|
};
|
|
29926
29926
|
I.addEventListener("load", B), I.addEventListener("error", M), I.addEventListener("changeShownFloor", H), I.addEventListener("dispose", L), E.emit("model.request", createEvent("model.request", { work: S, model: I, error: null }));
|
|
29927
29927
|
}
|
|
29928
|
-
}, E = this,
|
|
29929
|
-
v(
|
|
29928
|
+
}, E = this, T = 0; T < e.length; T++)
|
|
29929
|
+
v(T);
|
|
29930
29930
|
return this.modelScene.loaded = !1, this.modelScene.refined = !1, m;
|
|
29931
29931
|
}, t.prototype.commonParams = function() {
|
|
29932
29932
|
return {
|