@realsee/five 6.6.5 → 6.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/classes/five.Work.html +1 -1
- package/docs/functions/five.parseWork.html +1 -1
- package/docs/interfaces/five.LooseWorkWithExtrinsics.html +5 -5
- package/docs/types/five.ParseOptions.html +6 -6
- package/five/index.js +42 -42
- package/five/index.mjs +841 -814
- 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 +42 -42
- 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:
|
|
5
|
-
* Version: 6.6.
|
|
4
|
+
* Generated: 2025/10/13
|
|
5
|
+
* Version: 6.6.7
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -524,10 +524,10 @@ var KJUR = {}, CryptoJS = CryptoJS || (function(n, t) {
|
|
|
524
524
|
if (16 > I)
|
|
525
525
|
p[I] = A[g + I] | 0;
|
|
526
526
|
else {
|
|
527
|
-
var
|
|
528
|
-
p[I] = ((
|
|
527
|
+
var B = p[I - 15], M = p[I - 2];
|
|
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
|
-
|
|
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 & b ^ E & b), C = w, w = R, R = S, S = T + B | 0, T = b, b = E, E = v, v = B + M | 0;
|
|
531
531
|
}
|
|
532
532
|
y[0] = y[0] + v | 0, y[1] = y[1] + E | 0, y[2] = y[2] + b | 0, y[3] = y[3] + T | 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
|
},
|
|
@@ -740,15 +740,15 @@ CryptoJS.lib.Cipher || (function(n) {
|
|
|
740
740
|
54
|
|
741
741
|
], R = R.AES = t.extend({
|
|
742
742
|
_doReset: function() {
|
|
743
|
-
for (var I = this._key, w = I.words, C = I.sigBytes / 4, I = 4 * ((this._nRounds = C + 6) + 1),
|
|
743
|
+
for (var I = this._key, w = I.words, C = I.sigBytes / 4, I = 4 * ((this._nRounds = C + 6) + 1), B = this._keySchedule = [], M = 0; M < I; M++)
|
|
744
744
|
if (M < C)
|
|
745
|
-
|
|
745
|
+
B[M] = w[M];
|
|
746
746
|
else {
|
|
747
|
-
var
|
|
748
|
-
M % C ? 6 < C && M % C == 4 && (
|
|
747
|
+
var H = B[M - 1];
|
|
748
|
+
M % C ? 6 < C && M % C == 4 && (H = e[H >>> 24] << 24 | e[H >>> 16 & 255] << 16 | e[H >>> 8 & 255] << 8 | e[H & 255]) : (H = H << 8 | H >>> 24, H = e[H >>> 24] << 24 | e[H >>> 16 & 255] << 16 | e[H >>> 8 & 255] << 8 | e[H & 255], H ^= S[M / C | 0] << 24), B[M] = B[M - C] ^ H;
|
|
749
749
|
}
|
|
750
750
|
for (w = this._invKeySchedule = [], C = 0; C < I; C++)
|
|
751
|
-
M = I - C,
|
|
751
|
+
M = I - C, H = C % 4 ? B[M] : B[M - 4], w[C] = 4 > C || 4 >= M ? H : c[e[H >>> 24]] ^ f[e[H >>> 16 & 255]] ^ d[e[H >>> 8 & 255]] ^ h[e[H & 255]];
|
|
752
752
|
},
|
|
753
753
|
encryptBlock: function(w, C) {
|
|
754
754
|
this._doCryptBlock(w, C, this._keySchedule, o, s, u, l, e);
|
|
@@ -757,10 +757,10 @@ CryptoJS.lib.Cipher || (function(n) {
|
|
|
757
757
|
var I = w[C + 1];
|
|
758
758
|
w[C + 1] = w[C + 3], w[C + 3] = I, this._doCryptBlock(w, C, this._invKeySchedule, c, f, d, h, r), I = w[C + 1], w[C + 1] = w[C + 3], w[C + 3] = I;
|
|
759
759
|
},
|
|
760
|
-
_doCryptBlock: function(w, C, I,
|
|
761
|
-
for (var F = this._nRounds,
|
|
762
|
-
var
|
|
763
|
-
|
|
760
|
+
_doCryptBlock: function(w, C, I, B, M, H, L, O) {
|
|
761
|
+
for (var F = this._nRounds, V = w[C] ^ I[0], U = w[C + 1] ^ I[1], G = w[C + 2] ^ I[2], j = w[C + 3] ^ I[3], N = 4, D = 1; D < F; D++)
|
|
762
|
+
var q = B[V >>> 24] ^ M[U >>> 16 & 255] ^ H[G >>> 8 & 255] ^ L[j & 255] ^ I[N++], z = B[U >>> 24] ^ M[G >>> 16 & 255] ^ H[j >>> 8 & 255] ^ L[V & 255] ^ I[N++], Q = B[G >>> 24] ^ M[j >>> 16 & 255] ^ H[V >>> 8 & 255] ^ L[U & 255] ^ I[N++], j = B[j >>> 24] ^ M[V >>> 16 & 255] ^ H[U >>> 8 & 255] ^ L[G & 255] ^ I[N++], V = q, U = z, G = Q;
|
|
763
|
+
q = (O[V >>> 24] << 24 | O[U >>> 16 & 255] << 16 | O[G >>> 8 & 255] << 8 | O[j & 255]) ^ I[N++], z = (O[U >>> 24] << 24 | O[G >>> 16 & 255] << 16 | O[j >>> 8 & 255] << 8 | O[V & 255]) ^ I[N++], Q = (O[G >>> 24] << 24 | O[j >>> 16 & 255] << 16 | O[V >>> 8 & 255] << 8 | O[U & 255]) ^ I[N++], j = (O[j >>> 24] << 24 | O[V >>> 16 & 255] << 16 | O[U >>> 8 & 255] << 8 | O[G & 255]) ^ I[N++], w[C] = q, w[C + 1] = z, w[C + 2] = Q, w[C + 3] = j;
|
|
764
764
|
},
|
|
765
765
|
keySize: 8
|
|
766
766
|
});
|
|
@@ -1866,7 +1866,7 @@ var KEYUTIL = /* @__PURE__ */ (function() {
|
|
|
1866
1866
|
var I = v(A, C[1]);
|
|
1867
1867
|
try {
|
|
1868
1868
|
E.pbkdf2Iter = parseInt(I, 16);
|
|
1869
|
-
} catch (
|
|
1869
|
+
} catch (B) {
|
|
1870
1870
|
throw "malformed format pbkdf2Iter: " + I;
|
|
1871
1871
|
}
|
|
1872
1872
|
return E;
|
|
@@ -2060,8 +2060,8 @@ KEYUTIL.getKey = function(n, t, e) {
|
|
|
2060
2060
|
return h.getKey(R, null, "pkcs5prv");
|
|
2061
2061
|
}
|
|
2062
2062
|
if (n.indexOf("-END DSA PRIVATE KEY-") != -1 && n.indexOf("4,ENCRYPTED") == -1) {
|
|
2063
|
-
var w = d(n, "DSA PRIVATE KEY"), C = s(w, 0, [1], "02"), I = s(w, 0, [2], "02"),
|
|
2064
|
-
return p.setPrivate(new BigInteger(C, 16), new BigInteger(I, 16), new BigInteger(
|
|
2063
|
+
var w = d(n, "DSA PRIVATE KEY"), C = s(w, 0, [1], "02"), I = s(w, 0, [2], "02"), B = s(w, 0, [3], "02"), M = s(w, 0, [4], "02"), H = s(w, 0, [5], "02"), p = new c();
|
|
2064
|
+
return p.setPrivate(new BigInteger(C, 16), new BigInteger(I, 16), new BigInteger(B, 16), new BigInteger(M, 16), new BigInteger(H, 16)), p;
|
|
2065
2065
|
}
|
|
2066
2066
|
if (n.indexOf("-END EC PRIVATE KEY-") != -1 && n.indexOf("4,ENCRYPTED") == -1) {
|
|
2067
2067
|
var R = d(n, "EC PRIVATE KEY");
|
|
@@ -2085,8 +2085,8 @@ KEYUTIL.getKey = function(n, t, e) {
|
|
|
2085
2085
|
return m.setPublicKeyHex(N), m.setPrivateKeyHex(p), m.isPublic = !1, m;
|
|
2086
2086
|
}
|
|
2087
2087
|
if (n.indexOf("-END DSA PRIVATE KEY-") != -1 && n.indexOf("4,ENCRYPTED") != -1) {
|
|
2088
|
-
var w = h.getDecryptedKeyHex(n, t), C = s(w, 0, [1], "02"), I = s(w, 0, [2], "02"),
|
|
2089
|
-
return p.setPrivate(new BigInteger(C, 16), new BigInteger(I, 16), new BigInteger(
|
|
2088
|
+
var w = h.getDecryptedKeyHex(n, t), C = s(w, 0, [1], "02"), I = s(w, 0, [2], "02"), B = s(w, 0, [3], "02"), M = s(w, 0, [4], "02"), H = s(w, 0, [5], "02"), p = new c();
|
|
2089
|
+
return p.setPrivate(new BigInteger(C, 16), new BigInteger(I, 16), new BigInteger(B, 16), new BigInteger(M, 16), new BigInteger(H, 16)), p;
|
|
2090
2090
|
}
|
|
2091
2091
|
if (n.indexOf("-END ENCRYPTED PRIVATE KEY-") != -1)
|
|
2092
2092
|
return h.getKeyFromEncryptedPKCS8PEM(n, t);
|
|
@@ -2727,8 +2727,8 @@ function X509(n) {
|
|
|
2727
2727
|
w.critical = !1;
|
|
2728
2728
|
var C = e(T, b[R]), I = 0;
|
|
2729
2729
|
C.length === 3 && (w.critical = !0, I = 1), w.oid = t.hextooidstr(s(T, b[R], [0], "06"));
|
|
2730
|
-
var
|
|
2731
|
-
w.vidx = h(T,
|
|
2730
|
+
var B = f(T, b[R], [1 + I]);
|
|
2731
|
+
w.vidx = h(T, B), this.aExtInfo.push(w);
|
|
2732
2732
|
}
|
|
2733
2733
|
}, this.getExtInfo = function(v) {
|
|
2734
2734
|
var E = this.aExtInfo, b = v;
|
|
@@ -3090,17 +3090,17 @@ function X509(n) {
|
|
|
3090
3090
|
for (var S = v[T], R = 0; R < S.length; R++)
|
|
3091
3091
|
b.push(S[R]);
|
|
3092
3092
|
for (var T = 0; T < b.length; T++) {
|
|
3093
|
-
var w = b[T], C = w.ds, I = w.value,
|
|
3093
|
+
var w = b[T], 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") {
|
|
3097
|
-
if (
|
|
3097
|
+
if (B != "CN")
|
|
3098
3098
|
return "mixed";
|
|
3099
3099
|
if (KJUR.lang.String.isMail(I))
|
|
3100
3100
|
continue;
|
|
3101
3101
|
return "mixed";
|
|
3102
3102
|
}
|
|
3103
|
-
if (
|
|
3103
|
+
if (B == "C") {
|
|
3104
3104
|
if (C == "prn")
|
|
3105
3105
|
continue;
|
|
3106
3106
|
return "mixed";
|
|
@@ -3187,41 +3187,41 @@ function X509(n) {
|
|
|
3187
3187
|
return E(T).replace(/\//, "\\/");
|
|
3188
3188
|
}).join("/");
|
|
3189
3189
|
}, this.getInfo = function() {
|
|
3190
|
-
var v = function(
|
|
3191
|
-
var z = JSON.stringify(
|
|
3190
|
+
var v = function(q) {
|
|
3191
|
+
var z = JSON.stringify(q.array).replace(/[\[\]\{\}\"]/g, "");
|
|
3192
3192
|
return z;
|
|
3193
|
-
}, E = function(
|
|
3194
|
-
for (var z = "",
|
|
3195
|
-
var
|
|
3196
|
-
if (z += " policy oid: " +
|
|
3197
|
-
`,
|
|
3198
|
-
for (var
|
|
3199
|
-
var
|
|
3200
|
-
|
|
3193
|
+
}, E = function(q) {
|
|
3194
|
+
for (var z = "", Q = q.array, j = 0; j < Q.length; j++) {
|
|
3195
|
+
var V = Q[j];
|
|
3196
|
+
if (z += " policy oid: " + V.policyoid + `
|
|
3197
|
+
`, V.array !== void 0)
|
|
3198
|
+
for (var U = 0; U < V.array.length; U++) {
|
|
3199
|
+
var G = V.array[U];
|
|
3200
|
+
G.cps !== void 0 && (z += " cps: " + G.cps + `
|
|
3201
3201
|
`);
|
|
3202
3202
|
}
|
|
3203
3203
|
}
|
|
3204
3204
|
return z;
|
|
3205
|
-
}, b = function(
|
|
3206
|
-
for (var z = "",
|
|
3207
|
-
var
|
|
3205
|
+
}, b = function(q) {
|
|
3206
|
+
for (var z = "", Q = q.array, j = 0; j < Q.length; j++) {
|
|
3207
|
+
var V = Q[j];
|
|
3208
3208
|
try {
|
|
3209
|
-
|
|
3209
|
+
V.dpname.full[0].uri !== void 0 && (z += " " + V.dpname.full[0].uri + `
|
|
3210
3210
|
`);
|
|
3211
|
-
} catch (
|
|
3211
|
+
} catch (U) {
|
|
3212
3212
|
}
|
|
3213
3213
|
try {
|
|
3214
|
-
|
|
3214
|
+
V.dname.full[0].dn.hex !== void 0 && (z += " " + X509.hex2dn(V.dpname.full[0].dn.hex) + `
|
|
3215
3215
|
`);
|
|
3216
|
-
} catch (
|
|
3216
|
+
} catch (U) {
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
3219
|
return z;
|
|
3220
|
-
}, T = function(
|
|
3221
|
-
for (var z = "",
|
|
3222
|
-
var
|
|
3223
|
-
|
|
3224
|
-
`),
|
|
3220
|
+
}, T = function(q) {
|
|
3221
|
+
for (var z = "", Q = q.array, j = 0; j < Q.length; j++) {
|
|
3222
|
+
var V = Q[j];
|
|
3223
|
+
V.caissuer !== void 0 && (z += " caissuer: " + V.caissuer + `
|
|
3224
|
+
`), V.ocsp !== void 0 && (z += " ocsp: " + V.ocsp + `
|
|
3225
3225
|
`);
|
|
3226
3226
|
}
|
|
3227
3227
|
return z;
|
|
@@ -3241,41 +3241,41 @@ function X509(n) {
|
|
|
3241
3241
|
S += `X509v3 Extensions:
|
|
3242
3242
|
`;
|
|
3243
3243
|
for (var C = 0; C < w.length; C++) {
|
|
3244
|
-
var I = w[C],
|
|
3245
|
-
|
|
3244
|
+
var I = w[C], B = KJUR.asn1.x509.OID.oid2name(I.oid);
|
|
3245
|
+
B === "" && (B = I.oid);
|
|
3246
3246
|
var M = "";
|
|
3247
|
-
if (I.critical === !0 && (M = "CRITICAL"), S += " " +
|
|
3248
|
-
`,
|
|
3249
|
-
var
|
|
3250
|
-
|
|
3251
|
-
` : (S += " cA=true",
|
|
3247
|
+
if (I.critical === !0 && (M = "CRITICAL"), S += " " + B + " " + M + `:
|
|
3248
|
+
`, B === "basicConstraints") {
|
|
3249
|
+
var H = this.getExtBasicConstraints();
|
|
3250
|
+
H.cA === void 0 ? S += ` {}
|
|
3251
|
+
` : (S += " cA=true", H.pathLen !== void 0 && (S += ", pathLen=" + H.pathLen), S += `
|
|
3252
3252
|
`);
|
|
3253
|
-
} else if (
|
|
3253
|
+
} else if (B === "keyUsage")
|
|
3254
3254
|
S += " " + this.getExtKeyUsageString() + `
|
|
3255
3255
|
`;
|
|
3256
|
-
else if (
|
|
3256
|
+
else if (B === "subjectKeyIdentifier")
|
|
3257
3257
|
S += " " + this.getExtSubjectKeyIdentifier().kid.hex + `
|
|
3258
3258
|
`;
|
|
3259
|
-
else if (
|
|
3259
|
+
else if (B === "authorityKeyIdentifier") {
|
|
3260
3260
|
var L = this.getExtAuthorityKeyIdentifier();
|
|
3261
3261
|
L.kid !== void 0 && (S += " kid=" + L.kid.hex + `
|
|
3262
3262
|
`);
|
|
3263
|
-
} else if (
|
|
3263
|
+
} else if (B === "extKeyUsage") {
|
|
3264
3264
|
var O = this.getExtExtKeyUsage().array;
|
|
3265
3265
|
S += " " + O.join(", ") + `
|
|
3266
3266
|
`;
|
|
3267
|
-
} else if (
|
|
3267
|
+
} else if (B === "subjectAltName") {
|
|
3268
3268
|
var F = v(this.getExtSubjectAltName());
|
|
3269
3269
|
S += " " + F + `
|
|
3270
3270
|
`;
|
|
3271
|
-
} else if (
|
|
3271
|
+
} else if (B === "cRLDistributionPoints") {
|
|
3272
3272
|
var N = this.getExtCRLDistributionPoints();
|
|
3273
3273
|
S += b(N);
|
|
3274
|
-
} else if (
|
|
3274
|
+
} else if (B === "authorityInfoAccess") {
|
|
3275
3275
|
var D = this.getExtAuthorityInfoAccess();
|
|
3276
3276
|
S += T(D);
|
|
3277
3277
|
} else
|
|
3278
|
-
|
|
3278
|
+
B === "certificatePolicies" && (S += E(this.getExtCertificatePolicies()));
|
|
3279
3279
|
}
|
|
3280
3280
|
}
|
|
3281
3281
|
return S += "signature algorithm: " + this.getSignatureAlgorithmName() + `
|
|
@@ -3900,59 +3900,59 @@ var PBMCustomShader = (
|
|
|
3900
3900
|
var C = w[R];
|
|
3901
3901
|
C in definesLib$1 || delete u[C];
|
|
3902
3902
|
}
|
|
3903
|
-
for (var I = 0,
|
|
3904
|
-
var M =
|
|
3903
|
+
for (var I = 0, B = Object.keys(l); I < B.length; I++) {
|
|
3904
|
+
var M = B[I];
|
|
3905
3905
|
M in uniformsLib$1 || delete l[M];
|
|
3906
3906
|
}
|
|
3907
|
-
for (var
|
|
3908
|
-
return
|
|
3909
|
-
}), L = 0, O =
|
|
3907
|
+
for (var H = r.customShaders.filter(function(V) {
|
|
3908
|
+
return V.type.includes(S);
|
|
3909
|
+
}), L = 0, O = H; L < O.length; L++) {
|
|
3910
3910
|
var F = O[L];
|
|
3911
3911
|
for (var N in F.defines)
|
|
3912
3912
|
N in u || Object.assign(u, (b = {}, b[N] = F.defines[N], b));
|
|
3913
3913
|
for (var D in F.uniforms)
|
|
3914
3914
|
D in l || Object.assign(l, (T = {}, T[D] = F.uniforms[D], T));
|
|
3915
3915
|
}
|
|
3916
|
-
v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g,
|
|
3917
|
-
return
|
|
3918
|
-
}).filter(function(
|
|
3919
|
-
return !!
|
|
3916
|
+
v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, H.map(function(V) {
|
|
3917
|
+
return V.vertex.mainBefore;
|
|
3918
|
+
}).filter(function(V) {
|
|
3919
|
+
return !!V;
|
|
3920
3920
|
}).join(`
|
|
3921
|
-
`)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g,
|
|
3922
|
-
return
|
|
3923
|
-
}).filter(function(
|
|
3924
|
-
return !!
|
|
3921
|
+
`)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, H.map(function(V) {
|
|
3922
|
+
return V.vertex.mainStart;
|
|
3923
|
+
}).filter(function(V) {
|
|
3924
|
+
return !!V;
|
|
3925
3925
|
}).join(`
|
|
3926
|
-
`)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g,
|
|
3927
|
-
return
|
|
3928
|
-
}).filter(function(
|
|
3929
|
-
return !!
|
|
3926
|
+
`)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, H.map(function(V) {
|
|
3927
|
+
return V.vertex.mainEnd;
|
|
3928
|
+
}).filter(function(V) {
|
|
3929
|
+
return !!V;
|
|
3930
3930
|
}).join(`
|
|
3931
|
-
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g,
|
|
3932
|
-
return
|
|
3933
|
-
}).filter(function(
|
|
3934
|
-
return !!
|
|
3931
|
+
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, H.map(function(V) {
|
|
3932
|
+
return V.fragment.mainBefore;
|
|
3933
|
+
}).filter(function(V) {
|
|
3934
|
+
return !!V;
|
|
3935
3935
|
}).join(`
|
|
3936
|
-
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g,
|
|
3937
|
-
return
|
|
3938
|
-
}).filter(function(
|
|
3939
|
-
return !!
|
|
3936
|
+
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, H.map(function(V) {
|
|
3937
|
+
return V.fragment.mainStart;
|
|
3938
|
+
}).filter(function(V) {
|
|
3939
|
+
return !!V;
|
|
3940
3940
|
}).join(`
|
|
3941
|
-
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g,
|
|
3942
|
-
return
|
|
3943
|
-
}).filter(function(
|
|
3944
|
-
return !!
|
|
3941
|
+
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, H.map(function(V) {
|
|
3942
|
+
return V.fragment.mainEnd;
|
|
3943
|
+
}).filter(function(V) {
|
|
3944
|
+
return !!V;
|
|
3945
3945
|
}).join(`
|
|
3946
|
-
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g,
|
|
3947
|
-
return
|
|
3948
|
-
}).filter(function(
|
|
3949
|
-
return !!
|
|
3946
|
+
`)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, H.map(function(V) {
|
|
3947
|
+
return V.fragment.mainModelColor;
|
|
3948
|
+
}).filter(function(V) {
|
|
3949
|
+
return !!V;
|
|
3950
3950
|
}).join(`
|
|
3951
3951
|
`));
|
|
3952
|
-
var
|
|
3953
|
-
v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g,
|
|
3954
|
-
for (var z = 0,
|
|
3955
|
-
var j =
|
|
3952
|
+
var q = String(r.clippers.length);
|
|
3953
|
+
v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, q), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, q);
|
|
3954
|
+
for (var z = 0, Q = H; z < Q.length; z++) {
|
|
3955
|
+
var j = Q[z];
|
|
3956
3956
|
j.onBeforeCompile && j.onBeforeCompile(v, E);
|
|
3957
3957
|
}
|
|
3958
3958
|
};
|
|
@@ -3960,10 +3960,10 @@ var PBMCustomShader = (
|
|
|
3960
3960
|
r.onBeforeRender = function(v, E, b, T, S, R) {
|
|
3961
3961
|
var w = r.shaderType;
|
|
3962
3962
|
b instanceof Camera ? (l.pixelRatio.value = b.pixelRatio, l.resolution.value.copy(b.resolution)) : (l.pixelRatio.value = v.getPixelRatio(), v.getViewport(scratchViewport$2), l.resolution.value.set(scratchViewport$2.width, scratchViewport$2.height));
|
|
3963
|
-
var C = r.customShaders.filter(function(
|
|
3964
|
-
return
|
|
3965
|
-
}), I = C.map(function(
|
|
3966
|
-
return "".concat(
|
|
3963
|
+
var C = r.customShaders.filter(function(B) {
|
|
3964
|
+
return B.type.includes(w);
|
|
3965
|
+
}), I = C.map(function(B) {
|
|
3966
|
+
return "".concat(B.id, ":").concat(B.version);
|
|
3967
3967
|
}).join("|");
|
|
3968
3968
|
c !== I && (c = I, r.needsUpdate = !0);
|
|
3969
3969
|
}, Object.defineProperty(r, "uniform", {
|
|
@@ -4415,9 +4415,9 @@ 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
|
|
4419
|
-
var
|
|
4420
|
-
|
|
4418
|
+
for (var B = 0, M = b; B < M.length; B++) {
|
|
4419
|
+
var H = M[B];
|
|
4420
|
+
H.onBeforeCompile && H.onBeforeCompile(c, f);
|
|
4421
4421
|
}
|
|
4422
4422
|
};
|
|
4423
4423
|
var u = "";
|
|
@@ -5198,7 +5198,7 @@ function ajax(n, t, e, r, o) {
|
|
|
5198
5198
|
r(I), f(I), (C = t.networkSubscribe) === null || C === void 0 || C.emit("network", l, "XMLHttpRequest", "timeout", I.message);
|
|
5199
5199
|
}
|
|
5200
5200
|
}, y = function(C) {
|
|
5201
|
-
var I,
|
|
5201
|
+
var I, B, M = now(), H = M - s;
|
|
5202
5202
|
if (delete h[d], A.parentNode && A.parentNode.removeChild(A), p !== null && (window.clearTimeout(p), p = null), m !== !0) {
|
|
5203
5203
|
if (C.indexOf("data:") !== 0) {
|
|
5204
5204
|
var L = new NetworkResponseError(l, "XMLHttpRequest", 500);
|
|
@@ -5207,15 +5207,15 @@ function ajax(n, t, e, r, o) {
|
|
|
5207
5207
|
}
|
|
5208
5208
|
var O = C.split(","), F = (O[0].match(/:(.*?);/) || [])[1], N = O[1];
|
|
5209
5209
|
if (t.responseType === "arraybuffer" || t.responseType === "blob") {
|
|
5210
|
-
for (var D = atob(O[1]),
|
|
5211
|
-
z[
|
|
5210
|
+
for (var D = atob(O[1]), q = D.length, z = new Uint8Array(q), Q = 0; Q < q; Q++)
|
|
5211
|
+
z[Q] = D.charCodeAt(Q);
|
|
5212
5212
|
t.responseType === "arraybuffer" ? N = z.buffer : N = new Blob([z], { type: F });
|
|
5213
5213
|
}
|
|
5214
|
-
var j = {},
|
|
5214
|
+
var j = {}, V = {
|
|
5215
5215
|
body: N,
|
|
5216
|
-
meta: { origin: u, source: l, requestTime: s, responseTime: M, costs:
|
|
5216
|
+
meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: H, headers: j }
|
|
5217
5217
|
};
|
|
5218
|
-
e(
|
|
5218
|
+
e(V), c(V), (B = t.networkSubscribe) === null || B === void 0 || B.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(V.meta)), m = !0;
|
|
5219
5219
|
}
|
|
5220
5220
|
};
|
|
5221
5221
|
h[d] = y, A.src = l, document.body.appendChild(A), typeof t.timeout == "number" && (p = window.setTimeout(g, t.timeout));
|
|
@@ -5234,12 +5234,12 @@ function ajax(n, t, e, r, o) {
|
|
|
5234
5234
|
}, R = function(C) {
|
|
5235
5235
|
var I;
|
|
5236
5236
|
if (v !== !0) {
|
|
5237
|
-
var
|
|
5238
|
-
if (
|
|
5237
|
+
var B = this.status;
|
|
5238
|
+
if (B === 0 || B >= 200 && B < 400) {
|
|
5239
5239
|
v = !0, b();
|
|
5240
|
-
var M = now(),
|
|
5240
|
+
var M = now(), H = M - s, L = parseHeaders(this.getAllResponseHeaders()), O = C.total, F = {
|
|
5241
5241
|
body: this.response,
|
|
5242
|
-
meta: { origin: u, source: l, requestTime: s, responseTime: M, costs:
|
|
5242
|
+
meta: { origin: u, source: l, requestTime: s, responseTime: M, costs: H, headers: L, size: O }
|
|
5243
5243
|
};
|
|
5244
5244
|
e(F), c(F), (I = t.networkSubscribe) === null || I === void 0 || I.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(F.meta));
|
|
5245
5245
|
} else
|
|
@@ -6036,19 +6036,19 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
6036
6036
|
}, 0) / 6);
|
|
6037
6037
|
}, I = (m = e.viaAjax) !== null && m !== void 0 ? m : !1;
|
|
6038
6038
|
if (I) {
|
|
6039
|
-
var
|
|
6039
|
+
var B = "blob", M = e.fetcher.ajax(w, { timeout: e.timeout, responseType: B }, void 0, void 0, C).then(function(L) {
|
|
6040
6040
|
return E[S] = L.meta, createImageBitmapLike(L.body);
|
|
6041
6041
|
});
|
|
6042
6042
|
y.push(M);
|
|
6043
6043
|
} else {
|
|
6044
|
-
var
|
|
6044
|
+
var H, M = Promise.resolve().then(function() {
|
|
6045
6045
|
return createImageBitmapLikeImage();
|
|
6046
6046
|
}).then(function(O) {
|
|
6047
|
-
return
|
|
6047
|
+
return H = O, e.fetcher.loadImage(w, { timeout: e.timeout }, void 0, void 0, C, O);
|
|
6048
6048
|
}).then(function(O) {
|
|
6049
6049
|
return E[S] = O.meta, O.body;
|
|
6050
6050
|
}).catch(function(O) {
|
|
6051
|
-
return
|
|
6051
|
+
return H && H.close(), Promise.reject(O);
|
|
6052
6052
|
});
|
|
6053
6053
|
y.push(M);
|
|
6054
6054
|
}
|
|
@@ -7451,14 +7451,14 @@ function parsePBMModel(n) {
|
|
|
7451
7451
|
var h = T[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),
|
|
7455
|
-
for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, D = h.vertices.uvs,
|
|
7456
|
-
var
|
|
7457
|
-
|
|
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 < T.length; O++) {
|
|
7455
|
+
for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[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
|
+
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
|
+
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;
|
|
7459
|
-
I[L * 3 + R * 3] = z[X], I[L * 3 + R * 3 + 1] = z[X + 1], I[L * 3 + R * 3 + 2] = z[X + 2],
|
|
7459
|
+
I[L * 3 + R * 3] = z[X], I[L * 3 + R * 3 + 1] = z[X + 1], I[L * 3 + R * 3 + 2] = z[X + 2], 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);
|
|
7460
7460
|
}
|
|
7461
|
-
F[0] <
|
|
7461
|
+
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]), M.push({
|
|
7462
7462
|
materialIndex: O,
|
|
7463
7463
|
name: h.name,
|
|
7464
7464
|
chunkName: parseChunkName(h.name),
|
|
@@ -7473,11 +7473,11 @@ function parsePBMModel(n) {
|
|
|
7473
7473
|
vertices: w,
|
|
7474
7474
|
uvs: C,
|
|
7475
7475
|
normals: I,
|
|
7476
|
-
masks:
|
|
7476
|
+
masks: B,
|
|
7477
7477
|
indices: null,
|
|
7478
7478
|
floorIndex: b,
|
|
7479
7479
|
groups: M,
|
|
7480
|
-
extents:
|
|
7480
|
+
extents: H
|
|
7481
7481
|
};
|
|
7482
7482
|
u.push(Z);
|
|
7483
7483
|
} else {
|
|
@@ -7485,14 +7485,14 @@ function parsePBMModel(n) {
|
|
|
7485
7485
|
var h = T[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),
|
|
7489
|
-
for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, re = h.vertices.marks, D = h.vertices.uvs,
|
|
7490
|
-
var
|
|
7491
|
-
|
|
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 < T.length; O++) {
|
|
7489
|
+
for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[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
|
+
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] = b, 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
|
-
F[0] <
|
|
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++)
|
|
7495
|
-
ee[te + R] = L +
|
|
7495
|
+
ee[te + R] = L + q[R];
|
|
7496
7496
|
M.push({
|
|
7497
7497
|
materialIndex: O,
|
|
7498
7498
|
name: h.name,
|
|
@@ -7508,11 +7508,11 @@ function parsePBMModel(n) {
|
|
|
7508
7508
|
vertices: w,
|
|
7509
7509
|
uvs: C,
|
|
7510
7510
|
normals: I,
|
|
7511
|
-
masks:
|
|
7511
|
+
masks: B,
|
|
7512
7512
|
indices: ee,
|
|
7513
7513
|
floorIndex: b,
|
|
7514
7514
|
groups: M,
|
|
7515
|
-
extents:
|
|
7515
|
+
extents: H
|
|
7516
7516
|
};
|
|
7517
7517
|
u.push(Z);
|
|
7518
7518
|
}
|
|
@@ -7539,23 +7539,23 @@ 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, b = y.vertices, T = y.masks, S = y.uvs, R = y.normals, w = y.indices, C = y.floorIndex, I = y.groups,
|
|
7543
|
-
M.min.x =
|
|
7544
|
-
var
|
|
7545
|
-
|
|
7542
|
+
var y = g[A], v = y.createAt, E = y.description, b = y.vertices, T = 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
|
+
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
|
+
var H = new THREE.BufferGeometry();
|
|
7545
|
+
H.setAttribute("position", new THREE.BufferAttribute(b, 3)), H.setAttribute("uv", new THREE.BufferAttribute(S, 2)), R && H.setAttribute("normal", new THREE.BufferAttribute(R, 3)), T && H.setAttribute("_feature_id_rsmask", new THREE.BufferAttribute(T, 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);
|
|
7549
7549
|
}
|
|
7550
|
-
p.add(
|
|
7551
|
-
for (var N = [], D = 0,
|
|
7552
|
-
var F =
|
|
7550
|
+
p.add(H);
|
|
7551
|
+
for (var N = [], D = 0, q = I; D < q.length; D++) {
|
|
7552
|
+
var F = q[D], z = void 0;
|
|
7553
7553
|
if (F.texture) {
|
|
7554
7554
|
if (z = F.texture, r.length > 0 && r.indexOf(F.texture) === -1) {
|
|
7555
|
-
for (var
|
|
7556
|
-
var
|
|
7557
|
-
if (
|
|
7558
|
-
z =
|
|
7555
|
+
for (var Q = 0, j = r; Q < j.length; Q++) {
|
|
7556
|
+
var V = j[Q], U = isAbsoluteURL(V) ? V : pathJoin(e, V), G = U.slice(F.texture.length * -1) === F.texture;
|
|
7557
|
+
if (G) {
|
|
7558
|
+
z = V;
|
|
7559
7559
|
break;
|
|
7560
7560
|
}
|
|
7561
7561
|
}
|
|
@@ -7564,9 +7564,9 @@ function parse$4(n, t, e, r, o, s, u) {
|
|
|
7564
7564
|
isAbsoluteURL(z) || (z = pathJoin(e, z));
|
|
7565
7565
|
}
|
|
7566
7566
|
var W = new PBMMeshMaterial(t ? "phong" : "basic");
|
|
7567
|
-
W.floorIndex = C,
|
|
7567
|
+
W.floorIndex = C, H.attributes.normal === void 0 && (W.flatShading = !0), H.attributes._feature_id_rsmask && (W.defines.USE_VERTEX_MARK = !0), N.push(W), z ? (m++, h[z] ? h[z].push(W) : h[z] = [W]) : W.color = new THREE.Color(16777215), p.add(W);
|
|
7568
7568
|
}
|
|
7569
|
-
var X = new PBMMesh(
|
|
7569
|
+
var X = new PBMMesh(H, N);
|
|
7570
7570
|
X.name = "model_floor_" + C, X.userData.createAt = v, X.userData.description = E, X.matrix.compose(X.position, X.quaternion, X.scale), X.matrixAutoUpdate = !1, X.frustumCulled = !1, c = v, f = E, d.push(X);
|
|
7571
7571
|
}
|
|
7572
7572
|
o = autoRestImageOptionsByTextureLength(o, m);
|
|
@@ -8561,15 +8561,15 @@ function parse$3(n, t, e, r, o) {
|
|
|
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(),
|
|
8565
|
-
var M = parseGeometry(T[
|
|
8564
|
+
for (var I = new THREE.Group(), B = 0; B < T.length; B++) {
|
|
8565
|
+
var M = parseGeometry(T[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
|
|
8568
|
-
var F = O[L], N = parseMaterial(F, t, e || "", r, f, o, A, l, g), D = N.material,
|
|
8569
|
-
u.push(
|
|
8567
|
+
for (var H = [], L = 0, O = T[B].material; L < O.length; L++) {
|
|
8568
|
+
var F = O[L], N = parseMaterial(F, t, e || "", r, f, o, A, l, g), D = N.material, q = N.textureReady;
|
|
8569
|
+
u.push(q), H.push(D);
|
|
8570
8570
|
}
|
|
8571
|
-
var z = new PBMMesh(M,
|
|
8572
|
-
z.name = "chunk_" +
|
|
8571
|
+
var z = new PBMMesh(M, H);
|
|
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
8574
|
I.name = b, s.push(I);
|
|
8575
8575
|
}
|
|
@@ -8581,8 +8581,8 @@ function parse$3(n, t, e, r, o) {
|
|
|
8581
8581
|
objects: s,
|
|
8582
8582
|
textures: Array.from(g),
|
|
8583
8583
|
dispose: function() {
|
|
8584
|
-
l.forEach(function(
|
|
8585
|
-
|
|
8584
|
+
l.forEach(function(Q) {
|
|
8585
|
+
Q.dispose();
|
|
8586
8586
|
}), l.clear();
|
|
8587
8587
|
}
|
|
8588
8588
|
};
|
|
@@ -8994,13 +8994,13 @@ var Parser = (
|
|
|
8994
8994
|
Promise.all(m),
|
|
8995
8995
|
Promise.all(A)
|
|
8996
8996
|
]).then(function(w) {
|
|
8997
|
-
for (var C = w[0], I = w[1],
|
|
8998
|
-
var
|
|
8999
|
-
if (
|
|
8997
|
+
for (var C = w[0], I = w[1], B = w[2], M = w[3], H = w[4], L = [], O = function(q, z) {
|
|
8998
|
+
var Q = C[q], j = I[q], V = B[q], U = M[q], G = H[q];
|
|
8999
|
+
if (Q === void 0)
|
|
9000
9000
|
return "continue";
|
|
9001
|
-
|
|
9001
|
+
Q.updateMatrix(), Q.matrixAutoUpdate = !0;
|
|
9002
9002
|
var W = void 0;
|
|
9003
|
-
switch (PATH_PROPERTIES[
|
|
9003
|
+
switch (PATH_PROPERTIES[G.path]) {
|
|
9004
9004
|
case PATH_PROPERTIES.weights:
|
|
9005
9005
|
W = THREE.NumberKeyframeTrack;
|
|
9006
9006
|
break;
|
|
@@ -9013,18 +9013,18 @@ var Parser = (
|
|
|
9013
9013
|
W = THREE.VectorKeyframeTrack;
|
|
9014
9014
|
break;
|
|
9015
9015
|
}
|
|
9016
|
-
var X =
|
|
9017
|
-
PATH_PROPERTIES[
|
|
9016
|
+
var X = Q.name ? Q.name : Q.uuid, Z = U.interpolation !== void 0 ? INTERPOLATION[U.interpolation] : THREE.InterpolateLinear, Y = [];
|
|
9017
|
+
PATH_PROPERTIES[G.path] === PATH_PROPERTIES.weights ? Q.traverse(function(ae) {
|
|
9018
9018
|
ae.morphTargetInfluences && Y.push(ae.name ? ae.name : ae.uuid);
|
|
9019
9019
|
}) : Y.push(X);
|
|
9020
|
-
var K =
|
|
9021
|
-
if (
|
|
9020
|
+
var K = V.array;
|
|
9021
|
+
if (V.normalized) {
|
|
9022
9022
|
for (var ee = getNormalizedComponentScale(K.constructor), te = new Float32Array(K.length), re = 0, ie = K.length; re < ie; re++)
|
|
9023
9023
|
te[re] = K[re] * ee;
|
|
9024
9024
|
K = te;
|
|
9025
9025
|
}
|
|
9026
9026
|
for (var re = 0, ie = Y.length; re < ie; re++) {
|
|
9027
|
-
var ce = new W(Y[re] + "." + PATH_PROPERTIES[
|
|
9027
|
+
var ce = new W(Y[re] + "." + PATH_PROPERTIES[G.path], j.array, K, Z);
|
|
9028
9028
|
L.push(ce);
|
|
9029
9029
|
}
|
|
9030
9030
|
}, F = 0, N = C.length; F < N; F++)
|
|
@@ -9091,11 +9091,11 @@ var Parser = (
|
|
|
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) {
|
|
9094
|
-
var R = WEBGL_TYPE_SIZES.SCALAR, w = WEBGL_COMPONENT_TYPES[u.sparse.indices.componentType], C = u.sparse.indices.byteOffset || 0, I = u.sparse.values.byteOffset || 0,
|
|
9094
|
+
var R = WEBGL_TYPE_SIZES.SCALAR, w = WEBGL_COMPONENT_TYPES[u.sparse.indices.componentType], C = u.sparse.indices.byteOffset || 0, I = u.sparse.values.byteOffset || 0, B = new w(c[1], C, u.sparse.count * R), M = new h(c[2], I, u.sparse.count * d);
|
|
9095
9095
|
f !== null && (E = new THREE.BufferAttribute(E.array.slice(), E.itemSize, E.normalized));
|
|
9096
|
-
for (var
|
|
9097
|
-
var O = H
|
|
9098
|
-
if (E.setX(O, M[
|
|
9096
|
+
for (var H = 0, L = B.length; H < L; H++) {
|
|
9097
|
+
var O = B[H];
|
|
9098
|
+
if (E.setX(O, M[H * d]), d >= 2 && E.setY(O, M[H * d + 1]), d >= 3 && E.setZ(O, M[H * d + 2]), d >= 4 && E.setW(O, M[H * d + 3]), d >= 5)
|
|
9099
9099
|
throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
9100
9100
|
}
|
|
9101
9101
|
}
|
|
@@ -9337,8 +9337,8 @@ var Parser = (
|
|
|
9337
9337
|
}
|
|
9338
9338
|
if (A.length === 1)
|
|
9339
9339
|
return A[0];
|
|
9340
|
-
for (var I = new THREE.Group(),
|
|
9341
|
-
var T = M[
|
|
9340
|
+
for (var I = new THREE.Group(), B = 0, M = A; B < M.length; B++) {
|
|
9341
|
+
var T = M[B];
|
|
9342
9342
|
I.add(T);
|
|
9343
9343
|
}
|
|
9344
9344
|
return I;
|
|
@@ -9466,18 +9466,18 @@ var Parser = (
|
|
|
9466
9466
|
}
|
|
9467
9467
|
if (!S && !R)
|
|
9468
9468
|
return t;
|
|
9469
|
-
var
|
|
9469
|
+
var B = [];
|
|
9470
9470
|
t.morphTargetsRelative = !0;
|
|
9471
|
-
for (var M = function(
|
|
9472
|
-
var O = e.targets[
|
|
9473
|
-
S ?
|
|
9474
|
-
F && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[
|
|
9475
|
-
})) : t.attributes.position && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[
|
|
9476
|
-
F && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[
|
|
9477
|
-
})) : t.attributes.normal && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[
|
|
9471
|
+
for (var M = function(H, L) {
|
|
9472
|
+
var O = e.targets[H];
|
|
9473
|
+
S ? B.push(r.loadAccessor(O.POSITION).then(function(F) {
|
|
9474
|
+
F && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[H] = F);
|
|
9475
|
+
})) : t.attributes.position && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[H] = t.attributes.position), R ? B.push(r.loadAccessor(O.NORMAL).then(function(F) {
|
|
9476
|
+
F && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[H] = F);
|
|
9477
|
+
})) : t.attributes.normal && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[H] = t.attributes.normal);
|
|
9478
9478
|
}, w = 0, C = e.targets.length; w < C; w++)
|
|
9479
9479
|
M(w, C);
|
|
9480
|
-
return Promise.all(
|
|
9480
|
+
return Promise.all(B).then(function() {
|
|
9481
9481
|
return t;
|
|
9482
9482
|
});
|
|
9483
9483
|
} else
|
|
@@ -10520,11 +10520,11 @@ var BaseExtension = (
|
|
|
10520
10520
|
return E.buffer.slice(0, S);
|
|
10521
10521
|
}
|
|
10522
10522
|
function c(v, E, b, T, S, R) {
|
|
10523
|
-
var w = s.exports.sbrk, C = b + 3 & -4, I = w(C * T),
|
|
10524
|
-
M.set(S,
|
|
10525
|
-
var
|
|
10526
|
-
if (
|
|
10527
|
-
throw new Error("Malformed buffer data: " +
|
|
10523
|
+
var w = s.exports.sbrk, C = b + 3 & -4, I = w(C * T), B = w(S.length), M = new Uint8Array(s.exports.memory.buffer);
|
|
10524
|
+
M.set(S, B);
|
|
10525
|
+
var H = v(I, b, T, B, S.length);
|
|
10526
|
+
if (H == 0 && R && R(I, C, T), E.set(M.subarray(I, I + b * T)), w(I - w(0)), H != 0)
|
|
10527
|
+
throw new Error("Malformed buffer data: " + H);
|
|
10528
10528
|
}
|
|
10529
10529
|
var f = {
|
|
10530
10530
|
NONE: "",
|
|
@@ -10556,8 +10556,8 @@ var BaseExtension = (
|
|
|
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
|
|
10560
|
-
R.pending += v, R.requests[M] = { resolve: C, reject: I }, R.object.postMessage({ id: M, count: v, size: E, source:
|
|
10559
|
+
var B = new Uint8Array(b), 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: T, filter: S }, [B.buffer]);
|
|
10561
10561
|
});
|
|
10562
10562
|
}
|
|
10563
10563
|
function y(v) {
|
|
@@ -10707,8 +10707,8 @@ var BaseExtension = (
|
|
|
10707
10707
|
}
|
|
10708
10708
|
if (m.length === 1)
|
|
10709
10709
|
return m[0];
|
|
10710
|
-
for (var C = new THREE.Group(), I = 0,
|
|
10711
|
-
var b =
|
|
10710
|
+
for (var C = new THREE.Group(), I = 0, B = m; I < B.length; I++) {
|
|
10711
|
+
var b = B[I];
|
|
10712
10712
|
C.add(b);
|
|
10713
10713
|
}
|
|
10714
10714
|
return C;
|
|
@@ -11674,10 +11674,10 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11674
11674
|
else if (E == 2) {
|
|
11675
11675
|
var R = bits(n, h, 31) + 257, w = bits(n, h + 10, 15) + 4, C = R + bits(n, h + 5, 31) + 1;
|
|
11676
11676
|
h += 14;
|
|
11677
|
-
for (var I = new u8(C),
|
|
11678
|
-
|
|
11677
|
+
for (var I = new u8(C), B = new u8(19), M = 0; M < w; ++M)
|
|
11678
|
+
B[clim[M]] = bits(n, h + M * 3, 7);
|
|
11679
11679
|
h += w * 3;
|
|
11680
|
-
for (var
|
|
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
11683
|
var b = F >> 4;
|
|
@@ -11689,8 +11689,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11689
11689
|
I[M++] = N;
|
|
11690
11690
|
}
|
|
11691
11691
|
}
|
|
11692
|
-
var
|
|
11693
|
-
g = max(
|
|
11692
|
+
var q = I.subarray(0, R), z = I.subarray(R);
|
|
11693
|
+
g = max(q), y = max(z), m = hMap(q, g, 1), A = hMap(z, y, 1);
|
|
11694
11694
|
} else
|
|
11695
11695
|
err(1);
|
|
11696
11696
|
else {
|
|
@@ -11708,22 +11708,22 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11708
11708
|
}
|
|
11709
11709
|
}
|
|
11710
11710
|
l && f(p + 131072);
|
|
11711
|
-
for (var
|
|
11712
|
-
var N = m[bits16(n, h) &
|
|
11711
|
+
for (var Q = (1 << g) - 1, j = (1 << y) - 1, V = h; ; V = h) {
|
|
11712
|
+
var N = m[bits16(n, h) & Q], U = N >> 4;
|
|
11713
11713
|
if (h += N & 15, h > v) {
|
|
11714
11714
|
c && err(0);
|
|
11715
11715
|
break;
|
|
11716
11716
|
}
|
|
11717
|
-
if (N || err(2),
|
|
11718
|
-
e[p++] =
|
|
11719
|
-
else if (
|
|
11720
|
-
|
|
11717
|
+
if (N || err(2), U < 256)
|
|
11718
|
+
e[p++] = U;
|
|
11719
|
+
else if (U == 256) {
|
|
11720
|
+
V = h, m = null;
|
|
11721
11721
|
break;
|
|
11722
11722
|
} else {
|
|
11723
|
-
var
|
|
11724
|
-
if (
|
|
11725
|
-
var M =
|
|
11726
|
-
|
|
11723
|
+
var G = U - 254;
|
|
11724
|
+
if (U > 264) {
|
|
11725
|
+
var M = U - 257, W = fleb[M];
|
|
11726
|
+
G = bits(n, h, (1 << W) - 1) + fl[M], h += W;
|
|
11727
11727
|
}
|
|
11728
11728
|
var X = A[bits16(n, h) & j], Z = X >> 4;
|
|
11729
11729
|
X || err(3), h += X & 15;
|
|
@@ -11737,7 +11737,7 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11737
11737
|
break;
|
|
11738
11738
|
}
|
|
11739
11739
|
l && f(p + 131072);
|
|
11740
|
-
var Y = p +
|
|
11740
|
+
var Y = p + G;
|
|
11741
11741
|
if (p < z) {
|
|
11742
11742
|
var K = s - z, ee = Math.min(z, Y);
|
|
11743
11743
|
for (K + p < 0 && err(3); p < ee; ++p)
|
|
@@ -11747,7 +11747,7 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11747
11747
|
e[p] = e[p - z];
|
|
11748
11748
|
}
|
|
11749
11749
|
}
|
|
11750
|
-
t.l = m, t.p =
|
|
11750
|
+
t.l = m, t.p = V, t.b = p, t.f = d, m && (d = 1, t.m = g, t.d = A, t.n = y);
|
|
11751
11751
|
} while (!d);
|
|
11752
11752
|
return p != e.length && u ? slc(e, 0, p) : e.subarray(0, p);
|
|
11753
11753
|
}, et = /* @__PURE__ */ new u8(0), b2 = function(n, t) {
|
|
@@ -11888,7 +11888,7 @@ var FBXTreeParser = (
|
|
|
11888
11888
|
}
|
|
11889
11889
|
}
|
|
11890
11890
|
return Promise.all(d).then(function(I) {
|
|
11891
|
-
var
|
|
11891
|
+
var B;
|
|
11892
11892
|
return {
|
|
11893
11893
|
scene: f,
|
|
11894
11894
|
textures: I,
|
|
@@ -11896,7 +11896,7 @@ var FBXTreeParser = (
|
|
|
11896
11896
|
upAxis: ["X", "Y", "Z"][y],
|
|
11897
11897
|
frontAxis: ["X", "Y", "Z"][v],
|
|
11898
11898
|
unitScale: E,
|
|
11899
|
-
animations: (
|
|
11899
|
+
animations: (B = f.animations) !== null && B !== void 0 ? B : [],
|
|
11900
11900
|
dispose: function() {
|
|
11901
11901
|
I.forEach(function(M) {
|
|
11902
11902
|
return M.dispose();
|
|
@@ -12445,12 +12445,12 @@ var FBXTreeParser = (
|
|
|
12445
12445
|
s || (console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."), s = !0);
|
|
12446
12446
|
var T = [0, 0, 0, 0], S = [0, 0, 0, 0];
|
|
12447
12447
|
E.forEach(function(w, C) {
|
|
12448
|
-
var I = w,
|
|
12449
|
-
S.forEach(function(M,
|
|
12448
|
+
var I = w, B = v[C];
|
|
12449
|
+
S.forEach(function(M, H, L) {
|
|
12450
12450
|
if (I > M) {
|
|
12451
|
-
L[
|
|
12452
|
-
var O = T[
|
|
12453
|
-
T[
|
|
12451
|
+
L[H] = I, I = M;
|
|
12452
|
+
var O = T[H];
|
|
12453
|
+
T[H] = B, B = O;
|
|
12454
12454
|
}
|
|
12455
12455
|
});
|
|
12456
12456
|
}), v = T, E = S;
|
|
@@ -12501,8 +12501,8 @@ var FBXTreeParser = (
|
|
|
12501
12501
|
t.uvs[D] === void 0 && (t.uvs[D] = []), t.uvs[D].push(l[D][L * 2]), t.uvs[D].push(l[D][L * 2 + 1]), t.uvs[D].push(l[D][O * 2]), t.uvs[D].push(l[D][O * 2 + 1]), t.uvs[D].push(l[D][F * 2]), t.uvs[D].push(l[D][F * 2 + 1]);
|
|
12502
12502
|
});
|
|
12503
12503
|
}, w = 0, C = h; w < C.length; w++) {
|
|
12504
|
-
var I = C[w],
|
|
12505
|
-
R(
|
|
12504
|
+
var I = C[w], B = I[0], M = I[1], H = I[2];
|
|
12505
|
+
R(B, M, H);
|
|
12506
12506
|
}
|
|
12507
12507
|
}, n.prototype.addMorphTargets = function(t, e, r, o, s) {
|
|
12508
12508
|
if (o.length !== 0) {
|
|
@@ -13204,8 +13204,8 @@ function generateTransform(n) {
|
|
|
13204
13204
|
var w = new THREE.Matrix4().scale(new THREE.Vector3().setFromMatrixScale(h)), C = new THREE.Matrix4().getInverse(w), I = T.clone().multiply(C);
|
|
13205
13205
|
R.copy(v).multiply(y).multiply(I).multiply(S);
|
|
13206
13206
|
}
|
|
13207
|
-
var
|
|
13208
|
-
return p.copyPosition(O),
|
|
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);
|
|
13208
|
+
return p.copyPosition(O), H = p.clone().multiply(R), H.premultiply(new THREE.Matrix4().getInverse(d)), H;
|
|
13209
13209
|
}
|
|
13210
13210
|
function getEulerOrder(n) {
|
|
13211
13211
|
n = n || 0;
|
|
@@ -13334,17 +13334,17 @@ function calcBasisFunctionDerivatives(n, t, e, r, o) {
|
|
|
13334
13334
|
for (var S = 1; S <= r; ++S) {
|
|
13335
13335
|
var R = 0, w = v - S, C = e - S;
|
|
13336
13336
|
v >= S && (T[b][0] = T[E][0] / c[C + 1][w], R = T[b][0] * c[w][C]);
|
|
13337
|
-
for (var I = w >= -1 ? 1 : -w,
|
|
13337
|
+
for (var I = w >= -1 ? 1 : -w, B = v - 1 <= C ? S - 1 : e - v, M = I; M <= B; ++M)
|
|
13338
13338
|
T[b][M] = (T[E][M] - T[E][M - 1]) / c[C + 1][w + M], R += T[b][M] * c[w + M][C];
|
|
13339
13339
|
v <= C && (T[b][S] = -T[E][S - 1] / c[C + 1][v], R += T[b][S] * c[v][C]), l[S][v] = R;
|
|
13340
13340
|
var h = E;
|
|
13341
13341
|
E = b, b = h;
|
|
13342
13342
|
}
|
|
13343
13343
|
}
|
|
13344
|
-
for (var
|
|
13344
|
+
for (var H = e, S = 1; S <= r; ++S) {
|
|
13345
13345
|
for (var h = 0; h <= e; ++h)
|
|
13346
|
-
l[S][h] *=
|
|
13347
|
-
|
|
13346
|
+
l[S][h] *= H;
|
|
13347
|
+
H *= e - S;
|
|
13348
13348
|
}
|
|
13349
13349
|
return l;
|
|
13350
13350
|
}
|
|
@@ -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, b, T, S, R, w, C, I,
|
|
13442
|
+
for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, b, T, 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
|
}
|
|
@@ -13462,12 +13462,12 @@ function parse$1(n, t) {
|
|
|
13462
13462
|
},
|
|
13463
13463
|
z: {
|
|
13464
13464
|
type: (I = (C = (w = ve == null ? void 0 : ve.querySelector("CZ AxisType")) === null || w === void 0 ? void 0 : w.textContent) === null || C === void 0 ? void 0 : C.toUpperCase()) !== null && I !== void 0 ? I : "A",
|
|
13465
|
-
dataType: (
|
|
13465
|
+
dataType: (H = (M = (B = ve == null ? void 0 : ve.querySelector("CZ DataType")) === null || B === void 0 ? void 0 : B.textContent) === null || M === void 0 ? void 0 : M.toUpperCase()) !== null && H !== void 0 ? H : "D",
|
|
13466
13466
|
increment: Number((O = (L = ve == null ? void 0 : ve.querySelector("CZ Increment")) === null || L === void 0 ? void 0 : L.textContent) !== null && O !== void 0 ? O : "1"),
|
|
13467
13467
|
offset: Number((N = (F = ve == null ? void 0 : ve.querySelector("CZ Offset")) === null || F === void 0 ? void 0 : F.textContent) !== null && N !== void 0 ? N : "0")
|
|
13468
13468
|
}
|
|
13469
13469
|
}, Te = null, Le = Ve.querySelector("Record1 Axes Rotation");
|
|
13470
|
-
Le && (Te = new THREE.Matrix3(), Te.set(Number((
|
|
13470
|
+
Le && (Te = new THREE.Matrix3(), Te.set(Number((q = (D = Le.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && q !== void 0 ? q : 0), Number((Q = (z = Le.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && Q !== void 0 ? Q : 0), Number((V = (j = Le.querySelector("r13")) === null || j === void 0 ? void 0 : j.textContent) !== null && V !== void 0 ? V : 0), Number((G = (U = Le.querySelector("r21")) === null || U === void 0 ? void 0 : U.textContent) !== null && G !== void 0 ? G : 0), Number((X = (W = Le.querySelector("r22")) === null || W === void 0 ? void 0 : W.textContent) !== null && X !== void 0 ? X : 0), Number((Y = (Z = Le.querySelector("r23")) === null || Z === void 0 ? void 0 : Z.textContent) !== null && Y !== void 0 ? Y : 0), Number((ee = (K = Le.querySelector("r31")) === null || K === void 0 ? void 0 : K.textContent) !== null && ee !== void 0 ? ee : 0), Number((re = (te = Le.querySelector("r32")) === null || te === void 0 ? void 0 : te.textContent) !== null && re !== void 0 ? re : 0), Number((ce = (ie = Le.querySelector("r33")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && ce !== void 0 ? ce : 0)));
|
|
13471
13471
|
var Ie = (ae = Ve.querySelector("Record3 DataLink PointDataLink")) === null || ae === void 0 ? void 0 : ae.textContent;
|
|
13472
13472
|
if (typeof Ie != "string")
|
|
13473
13473
|
throw new Error("X3p: PointDataLink not found.");
|
|
@@ -14089,27 +14089,27 @@ var BVHVector3 = (
|
|
|
14089
14089
|
u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x, T = scratchVector3B.x, T < A && (A = T), T > v && (v = T), T = scratchVector3C.x, T < A && (A = T), T > v && (v = T), g = E = scratchVector3A.y, T = scratchVector3B.y, T < g && (g = T), T > E && (E = T), T = scratchVector3C.y, T < g && (g = T), T > E && (E = T), y = b = scratchVector3A.z, T = scratchVector3B.z, T < y && (y = T), T > b && (b = T), T = scratchVector3C.z, T < y && (y = T), T > b && (b = T), l[m] = A, l[m + 1] = g, l[m + 2] = y, l[m + 3] = v, l[m + 4] = E, l[m + 5] = b;
|
|
14090
14090
|
}
|
|
14091
14091
|
else {
|
|
14092
|
-
for (var S = 1 / 0, R = 1 / 0, w = 1 / 0, C = -1 / 0, I = -1 / 0,
|
|
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
14093
|
var p = h * 3, m = h * 6, A = void 0, g = void 0, y = void 0, v = void 0, E = void 0, b = void 0, T = void 0;
|
|
14094
|
-
u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x, T = scratchVector3B.x, T < A && (A = T), T > v && (v = T), T = scratchVector3C.x, T < A && (A = T), T > v && (v = T), g = E = scratchVector3A.y, T = scratchVector3B.y, T < g && (g = T), T > E && (E = T), T = scratchVector3C.y, T < g && (g = T), T > E && (E = T), y = b = scratchVector3A.z, T = scratchVector3B.z, T < y && (y = T), T > b && (b = T), T = scratchVector3C.z, T < y && (y = T), T > b && (b = T), l[m] = A, l[m + 1] = g, l[m + 2] = y, l[m + 3] = v, l[m + 4] = E, l[m + 5] = b, A < S && (S = A), v > C && (C = v), g < R && (R = g), E > I && (I = E), y < w && (w = y), b >
|
|
14094
|
+
u[h] = h, this.getPositionByIndex(p, scratchVector3A), this.getPositionByIndex(p + 1, scratchVector3B), this.getPositionByIndex(p + 2, scratchVector3C), A = v = scratchVector3A.x, T = scratchVector3B.x, T < A && (A = T), T > v && (v = T), T = scratchVector3C.x, T < A && (A = T), T > v && (v = T), g = E = scratchVector3A.y, T = scratchVector3B.y, T < g && (g = T), T > E && (E = T), T = scratchVector3C.y, T < g && (g = T), T > E && (E = T), y = b = scratchVector3A.z, T = scratchVector3B.z, T < y && (y = T), T > b && (b = T), T = scratchVector3C.z, T < y && (y = T), T > b && (b = T), l[m] = A, l[m + 1] = g, l[m + 2] = y, l[m + 3] = v, l[m + 4] = E, l[m + 5] = b, A < S && (S = A), v > C && (C = v), g < R && (R = g), E > I && (I = E), y < w && (w = y), b > B && (B = b);
|
|
14095
14095
|
}
|
|
14096
|
-
o = [S, R, w, C, I,
|
|
14096
|
+
o = [S, R, w, C, I, B];
|
|
14097
14097
|
}
|
|
14098
14098
|
var M = new BVHNode(++d, o, 0, s, 0);
|
|
14099
14099
|
c[f++] = M;
|
|
14100
|
-
var
|
|
14101
|
-
return
|
|
14100
|
+
var H = [], L = [0, 1, 2], O = function(N, D) {
|
|
14101
|
+
return H[D] - H[N];
|
|
14102
14102
|
};
|
|
14103
14103
|
function F(N) {
|
|
14104
|
-
var D = N.startIndex,
|
|
14105
|
-
|
|
14106
|
-
for (var
|
|
14107
|
-
for (var j = L[
|
|
14108
|
-
W === -1 ? (X = u[
|
|
14109
|
-
if (
|
|
14110
|
-
var Z = new BVHNode(++d, calcExtents(u, l, D,
|
|
14104
|
+
var D = N.startIndex, q = N.endIndex, z = N.extents;
|
|
14105
|
+
H[0] = z[3] - z[0], H[1] = z[4] - z[1], H[2] = z[5] - z[2], L.sort(O);
|
|
14106
|
+
for (var Q = 0; Q < 3; Q++) {
|
|
14107
|
+
for (var j = L[Q], V = z[j] + z[j + 3], U = D, G = q - 1, W = -1, X = void 0; U <= G; )
|
|
14108
|
+
W === -1 ? (X = u[U], l[X * 6 + j] + l[X * 6 + j + 3] < V ? U++ : W = X) : (X = u[G], l[X * 6 + j] + l[X * 6 + j + 3] >= V || (u[U] = X, u[G] = W, W = -1, U++), G--);
|
|
14109
|
+
if (U > D && U < q) {
|
|
14110
|
+
var Z = new BVHNode(++d, calcExtents(u, l, D, U, EPSILON$1), D, U, N.deepth + 1);
|
|
14111
14111
|
Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z);
|
|
14112
|
-
var Y = new BVHNode(++d, calcExtents(u, l,
|
|
14112
|
+
var Y = new BVHNode(++d, calcExtents(u, l, U, q, EPSILON$1), U, q, N.deepth + 1);
|
|
14113
14113
|
Y.deepth < r && Y.endIndex - Y.startIndex > e && (c[f++] = Y), N.node0 = Z, N.node1 = Y, N.startIndex = 0, N.endIndex = 0;
|
|
14114
14114
|
break;
|
|
14115
14115
|
}
|
|
@@ -14142,27 +14142,27 @@ var BVHVector3 = (
|
|
|
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
14143
|
var b = intersectNodeBox(e, m, y, o);
|
|
14144
14144
|
if (b !== null && !(s && b > v)) {
|
|
14145
|
-
for (var T = e.x, S = e.y, R = e.z, w = r.x, C = r.y, I = r.z,
|
|
14146
|
-
var L = c[
|
|
14145
|
+
for (var T = 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
|
+
var L = c[H], O = L * 3, F = new BVHVector3(0, 0, 0);
|
|
14147
14147
|
this.getPositionByIndex(O, F);
|
|
14148
|
-
var N = F.x, D = F.y,
|
|
14148
|
+
var N = F.x, D = F.y, q = F.z, z = new BVHVector3(0, 0, 0);
|
|
14149
14149
|
this.getPositionByIndex(O + 1, z);
|
|
14150
|
-
var
|
|
14151
|
-
this.getPositionByIndex(O + 2,
|
|
14152
|
-
var
|
|
14150
|
+
var Q = z.x, j = z.y, V = z.z, U = new BVHVector3(0, 0, 0);
|
|
14151
|
+
this.getPositionByIndex(O + 2, U);
|
|
14152
|
+
var G = U.x, W = U.y, X = U.z, Z = Q - N, Y = j - D, K = V - q, ee = G - N, te = W - D, re = X - q, ie = Y * re - K * te, ce = K * ee - Z * re, ae = Z * te - Y * ee, de = w * ie + C * ce + I * ae, ge = void 0;
|
|
14153
14153
|
if (de > 0)
|
|
14154
14154
|
ge = 1;
|
|
14155
14155
|
else if (de < 0)
|
|
14156
14156
|
ge = -1, de = -de;
|
|
14157
14157
|
else
|
|
14158
14158
|
continue;
|
|
14159
|
-
var ye = T - N, xe = S - D, le = R -
|
|
14159
|
+
var ye = T - 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(T + w * pe, S + C * pe, R + I * pe), Ne = new BVHIntersect(F, z,
|
|
14165
|
+
var pe = se / de, me = new BVHVector3(T + 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
|
}
|
|
@@ -14219,27 +14219,27 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
|
|
|
14219
14219
|
}
|
|
14220
14220
|
var S = new BVHNode(++d, o, 0, u, 0);
|
|
14221
14221
|
c[f++] = S;
|
|
14222
|
-
var R = [], w = [0, 1, 2], C = function(
|
|
14223
|
-
return R[M] - R[
|
|
14222
|
+
var R = [], w = [0, 1, 2], C = function(B, M) {
|
|
14223
|
+
return R[M] - R[B];
|
|
14224
14224
|
};
|
|
14225
|
-
function I(
|
|
14226
|
-
var M =
|
|
14225
|
+
function I(B) {
|
|
14226
|
+
var M = B.startIndex, H = B.endIndex, L = B.extents;
|
|
14227
14227
|
R[0] = L[3] - L[0], R[1] = L[4] - L[1], R[2] = L[5] - L[2];
|
|
14228
|
-
for (var O = w.sort(C)[0], F = ORDER_AXISES[O], N = (L[O] + L[O + 3]) / 2, D = M,
|
|
14229
|
-
z === -1 ? (
|
|
14228
|
+
for (var O = w.sort(C)[0], F = ORDER_AXISES[O], N = (L[O] + L[O + 3]) / 2, D = M, q = H - 1, z = -1, Q; D <= q; )
|
|
14229
|
+
z === -1 ? (Q = l[D], s(Q, scratchVector3$8), scratchVector3$8[F] < N ? D++ : z = Q) : (Q = l[q], s(Q, scratchVector3$8), scratchVector3$8[F] >= N || (l[D] = Q, l[q] = z, z = -1, D++), q--);
|
|
14230
14230
|
if (D > M) {
|
|
14231
14231
|
var j = L.slice();
|
|
14232
14232
|
j[O + 3] = N + EPSILON;
|
|
14233
|
-
var
|
|
14234
|
-
|
|
14233
|
+
var V = new BVHNode(++d, j, M, D, B.deepth + 1);
|
|
14234
|
+
V.deepth < r && V.endIndex - V.startIndex > e && (c[f++] = V), B.node0 = V;
|
|
14235
14235
|
}
|
|
14236
|
-
if (
|
|
14237
|
-
var
|
|
14238
|
-
|
|
14239
|
-
var
|
|
14240
|
-
|
|
14236
|
+
if (H > D) {
|
|
14237
|
+
var U = L.slice();
|
|
14238
|
+
U[O] = N - EPSILON;
|
|
14239
|
+
var G = new BVHNode(++d, U, D, H, B.deepth + 1);
|
|
14240
|
+
G.deepth < r && G.endIndex - G.startIndex > e && (c[f++] = G), B.node1 = G;
|
|
14241
14241
|
}
|
|
14242
|
-
|
|
14242
|
+
B.startIndex = 0, B.endIndex = 0;
|
|
14243
14243
|
}
|
|
14244
14244
|
for (; f; )
|
|
14245
14245
|
I(c[--f]);
|
|
@@ -14254,14 +14254,14 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
|
|
|
14254
14254
|
for (var S = h[b + 6], R = h[b + 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
|
-
var
|
|
14258
|
-
if (z > 0 ? (L += N * z, O += D * z, F +=
|
|
14259
|
-
var
|
|
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);
|
|
14258
|
+
if (z > 0 ? (L += N * z, O += D * z, F += q * z) : z < 0 && (z = 0), N = B - L, D = M - O, q = H - F, N * N + D * D + q * q <= m) {
|
|
14259
|
+
var Q = new BVHVector3(L, O, F), j = new BVHIntersect(I, I, I, C, Q);
|
|
14260
14260
|
(!u || u(j)) && (s ? z < E && (E = z, l.length > 0 && (l.length = 0), l.push(j)) : l.push(j));
|
|
14261
14261
|
}
|
|
14262
14262
|
}
|
|
14263
|
-
var
|
|
14264
|
-
|
|
14263
|
+
var V = y * BYTES_PER_NODE / 2, U = p[V + 16], G = p[V + 17];
|
|
14264
|
+
U && g.push(U), G && g.push(G);
|
|
14265
14265
|
}
|
|
14266
14266
|
}
|
|
14267
14267
|
return l;
|
|
@@ -14314,21 +14314,21 @@ function raycastMesh(n, t, e, r) {
|
|
|
14314
14314
|
S = d;
|
|
14315
14315
|
if (!S)
|
|
14316
14316
|
return !1;
|
|
14317
|
-
var I = v.intersectionPoint,
|
|
14317
|
+
var I = v.intersectionPoint, B = new THREE.Vector3(I.x, I.y, I.z).applyMatrix4(u), M = e.ray.origin.distanceTo(B);
|
|
14318
14318
|
if (M < e.near || M > e.far)
|
|
14319
14319
|
return !1;
|
|
14320
|
-
var
|
|
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[T] : T, p ? p.array[T + 1] : T + 1, p ? p.array[T + 2] : T + 2, F),
|
|
14323
|
+
var D = new THREE.Face3(p ? p.array[T] : T, p ? p.array[T + 1] : T + 1, p ? p.array[T + 2] : T + 2, F), q = {
|
|
14324
14324
|
distance: M,
|
|
14325
14325
|
object: n,
|
|
14326
14326
|
face: D,
|
|
14327
|
-
point:
|
|
14327
|
+
point: B,
|
|
14328
14328
|
distanceToRay: 0,
|
|
14329
14329
|
faceIndex: b
|
|
14330
14330
|
};
|
|
14331
|
-
return intersectsMap.set(v,
|
|
14331
|
+
return intersectsMap.set(v, q), l(q);
|
|
14332
14332
|
}), A = m.length, g = 0; g < A; g++) {
|
|
14333
14333
|
var y = intersectsMap.get(m[g]);
|
|
14334
14334
|
y && r.push(y);
|
|
@@ -14344,18 +14344,18 @@ function raycastPoints(n, t, e, r) {
|
|
|
14344
14344
|
var S = T.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 = T.pointA, I = scratchIntersectionFaceA.set(C.x, C.y, C.z).applyMatrix4(c),
|
|
14347
|
+
var C = T.pointA, I = scratchIntersectionFaceA.set(C.x, C.y, C.z).applyMatrix4(c), B = T.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);
|
|
14351
14351
|
}
|
|
14352
14352
|
var O = {
|
|
14353
14353
|
distance: w,
|
|
14354
14354
|
object: n,
|
|
14355
|
-
face:
|
|
14355
|
+
face: H,
|
|
14356
14356
|
point: R,
|
|
14357
14357
|
distanceToRay: R.distanceTo(I),
|
|
14358
|
-
index:
|
|
14358
|
+
index: B
|
|
14359
14359
|
};
|
|
14360
14360
|
return intersectsMap.set(T, O), d(O);
|
|
14361
14361
|
}), v = y.length, E = 0; E < v; E++) {
|
|
@@ -15423,10 +15423,10 @@ var _object_pattern = /^[og]\s*(.+)?/, _material_library_pattern = /^mtllib /, _
|
|
|
15423
15423
|
(d.hasNormal === !0 && v === void 0 || E === void 0 || b === void 0) && (d.hasNormal = !1), (d.hasUV === !0 && T === void 0 || S === void 0 || R === void 0) && (d.hasUV = !1);
|
|
15424
15424
|
var w = [A, T, v].join(":"), C = d.indexMap[w];
|
|
15425
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[T + 0], this.uvs[T + 1])), d.index.push(C);
|
|
15426
|
-
var I = [g, S, E].join(":"),
|
|
15427
|
-
|
|
15428
|
-
var M = [y, R, b].join(":"),
|
|
15429
|
-
|
|
15426
|
+
var I = [g, S, E].join(":"), B = d.indexMap[I];
|
|
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, b].join(":"), H = d.indexMap[M];
|
|
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
|
})()
|
|
15432
15432
|
);
|
|
@@ -15566,23 +15566,23 @@ function build(n, t) {
|
|
|
15566
15566
|
return g.dispose();
|
|
15567
15567
|
}), g.setAttribute("position", new THREE.BufferAttribute(new Float32Array(p.vertices), 3)), p.normals.length > 0 && g.setAttribute("normal", new THREE.BufferAttribute(new Float32Array(p.normals), 3)), p.colors.length > 0 && (A = !0, g.setAttribute("color", new THREE.BufferAttribute(new Float32Array(p.colors), 3))), p.uvs.length > 0 && g.setAttribute("uv", new THREE.BufferAttribute(new Float32Array(p.uvs), 2)), p.index.length > 0 && g.setIndex(new THREE.BufferAttribute(new Uint32Array(p.index), 1)), g.computeBoundingBox(), g.computeBoundingSphere();
|
|
15568
15568
|
for (var y = [], v = function(R, w) {
|
|
15569
|
-
var C = m[R], I = C.name + "_" + C.smooth + "_" + A,
|
|
15570
|
-
if (!
|
|
15571
|
-
for (var M = null,
|
|
15572
|
-
var O = L[
|
|
15569
|
+
var C = m[R], I = C.name + "_" + C.smooth + "_" + A, B = n.materials[I];
|
|
15570
|
+
if (!B) {
|
|
15571
|
+
for (var M = null, H = 0, L = t; H < L.length; H++) {
|
|
15572
|
+
var O = L[H], F = O.name, N = O.create;
|
|
15573
15573
|
F === C.mtllib && (M = N(C.name));
|
|
15574
15574
|
}
|
|
15575
15575
|
if (!M) {
|
|
15576
15576
|
var D = new PBMMeshMaterial();
|
|
15577
15577
|
M = [D, Promise.resolve([])];
|
|
15578
15578
|
}
|
|
15579
|
-
|
|
15580
|
-
var
|
|
15581
|
-
r.push(
|
|
15582
|
-
return
|
|
15579
|
+
B = M[0], B.name = C.name, B.flatShading = !(C.smooth || g.attributes.normal), B.vertexColors = A, n.materials[I] = B;
|
|
15580
|
+
var q = M[1];
|
|
15581
|
+
r.push(q), o.push(function() {
|
|
15582
|
+
return B.dispose();
|
|
15583
15583
|
});
|
|
15584
15584
|
}
|
|
15585
|
-
y.push(
|
|
15585
|
+
y.push(B);
|
|
15586
15586
|
}, E = 0, b = m.length; E < b; E++)
|
|
15587
15587
|
v(E);
|
|
15588
15588
|
g.clearGroups();
|
|
@@ -16029,8 +16029,8 @@ function createPipeBufferGeometry(n, t, e, r) {
|
|
|
16029
16029
|
var S = (m * r + y) * 6, R = (r + 1) * m + y, w = (r + 1) * (m + 1) + y, C = (r + 1) * (m + 1) + (y + 1), I = (r + 1) * m + (y + 1);
|
|
16030
16030
|
l[S] = R, l[S + 1] = w, l[S + 2] = I, l[S + 3] = w, l[S + 4] = C, l[S + 5] = I;
|
|
16031
16031
|
}
|
|
16032
|
-
var
|
|
16033
|
-
return
|
|
16032
|
+
var B = new THREE.BufferGeometry();
|
|
16033
|
+
return B.setIndex(new THREE.BufferAttribute(l, 1)), B.setAttribute("position", new THREE.BufferAttribute(o, 3)), B.setAttribute("normal", new THREE.BufferAttribute(s, 3)), B.setAttribute("uv", new THREE.BufferAttribute(u, 2)), B;
|
|
16034
16034
|
}
|
|
16035
16035
|
function parseTrajectoryObject(n, t) {
|
|
16036
16036
|
for (var e = new THREE.Color(0).convertSRGBToLinear(), r = new THREE.Color(52949).convertSRGBToLinear(), o = new THREE.Color(3370495).convertSRGBToLinear(), s = new THREE.Color(16777215).convertSRGBToLinear(), u = 0, l = new THREE.CurvePath(), c = n.length, f = 3; f < c; f += 3) {
|
|
@@ -16078,8 +16078,8 @@ function parseTrajectoryObject(n, t) {
|
|
|
16078
16078
|
side: THREE.FrontSide
|
|
16079
16079
|
});
|
|
16080
16080
|
I.uniforms.displacementScalar.value = -0.01, I.uniforms.diffuse.value = r;
|
|
16081
|
-
var
|
|
16082
|
-
|
|
16081
|
+
var B = new THREE.Mesh(w, [C, I]);
|
|
16082
|
+
B.position.fromArray(n, 0), T.add(B);
|
|
16083
16083
|
var M = new THREE.ShaderMaterial({
|
|
16084
16084
|
vertexShader: TRAJECTOR_SPHERE_SHADER.vertexShader,
|
|
16085
16085
|
fragmentShader: TRAJECTOR_SPHERE_SHADER.fragmentShader,
|
|
@@ -16087,8 +16087,8 @@ function parseTrajectoryObject(n, t) {
|
|
|
16087
16087
|
side: THREE.FrontSide
|
|
16088
16088
|
});
|
|
16089
16089
|
M.uniforms.displacementScalar.value = -0.01, M.uniforms.diffuse.value = o;
|
|
16090
|
-
var
|
|
16091
|
-
return
|
|
16090
|
+
var H = new THREE.Mesh(w, [C, M]);
|
|
16091
|
+
return H.position.fromArray(n, n.length - 3), T.add(H), {
|
|
16092
16092
|
scene: T,
|
|
16093
16093
|
dispose: function() {
|
|
16094
16094
|
y.dispose(), v.dispose(), E.dispose(), b.dispose(), w.dispose(), C.dispose(), I.dispose(), M.dispose();
|
|
@@ -16449,8 +16449,8 @@ var Tile3D = (
|
|
|
16449
16449
|
if (C) {
|
|
16450
16450
|
var I = new THREE.Vector3();
|
|
16451
16451
|
g.pano0 && I.setFromMatrixPosition(g.pano0.matrix);
|
|
16452
|
-
var
|
|
16453
|
-
g.pano1 &&
|
|
16452
|
+
var B = I.clone();
|
|
16453
|
+
g.pano1 && B.setFromMatrixPosition(g.pano1.matrix), I.distanceTo(B) < 10 && (w = !0);
|
|
16454
16454
|
}
|
|
16455
16455
|
}
|
|
16456
16456
|
if (w || this.tileset.update(S, R), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(ne) {
|
|
@@ -16482,18 +16482,18 @@ var Tile3D = (
|
|
|
16482
16482
|
this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), S.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(ne, se) {
|
|
16483
16483
|
return ne.floor !== se.floor ? ne.floor - se.floor : ne.levelOfContent !== se.levelOfContent ? se.levelOfContent - ne.levelOfContent : ne.state.distanceToCamera !== se.state.distanceToCamera ? ne.state.distanceToCamera - se.state.distanceToCamera : ne.state.centerZDepth - se.state.centerZDepth;
|
|
16484
16484
|
});
|
|
16485
|
-
for (var
|
|
16485
|
+
for (var H = [], L = 0, O = this.tileset.selectedTiles; L < O.length; L++) {
|
|
16486
16486
|
var F = O[L], N = (d = (f = F.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
|
|
16487
16487
|
if (N) {
|
|
16488
16488
|
var D = N.update(e, r, o, this, F, g);
|
|
16489
|
-
if (
|
|
16489
|
+
if (H.push(F.id), D && (A = !0), this.tileset.hasMixedContent && S.skipLevelOfDetail) {
|
|
16490
16490
|
if (!F.state.finalResolution) {
|
|
16491
|
-
var
|
|
16492
|
-
|
|
16491
|
+
var q = cloneSkipBackfaceObject(N);
|
|
16492
|
+
q.name = "skipBackface:" + N.name, this.backfaceObjects.push(q);
|
|
16493
16493
|
}
|
|
16494
|
-
for (var z = F.state.selectionDepth,
|
|
16494
|
+
for (var z = F.state.selectionDepth, Q = STENCIL_CONSTANT.TILE_MASK | z << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, j = THREE.GreaterEqualStencilFunc, V = STENCIL_CONSTANT.SKIP_LOD_MASK, U = THREE.ReplaceStencilOp, G = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, W = 0, X = N.materials; W < X.length; W++) {
|
|
16495
16495
|
var Z = X[W];
|
|
16496
|
-
Z.stencilWrite = !0, Z.stencilRef =
|
|
16496
|
+
Z.stencilWrite = !0, Z.stencilRef = Q, Z.stencilFunc = j, Z.stencilFuncMask = V, Z.stencilZPass = U, Z.stencilWriteMask = G;
|
|
16497
16497
|
}
|
|
16498
16498
|
} else
|
|
16499
16499
|
for (var Y = 0, K = N.materials; Y < K.length; Y++) {
|
|
@@ -16503,7 +16503,7 @@ var Tile3D = (
|
|
|
16503
16503
|
this.tileObjects.push(N);
|
|
16504
16504
|
}
|
|
16505
16505
|
}
|
|
16506
|
-
var ee =
|
|
16506
|
+
var ee = H.toString();
|
|
16507
16507
|
tileVersionMap.get(this) !== ee && (tileVersionMap.set(this, ee), A = !0), S.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), S.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
|
|
16508
16508
|
for (var te = [], re = 0, ie = this.tileset.selectedTrajectories; re < ie.length; re++) {
|
|
16509
16509
|
var ce = ie[re], ae = (h = ce.content.data) === null || h === void 0 ? void 0 : h.object;
|
|
@@ -16976,10 +16976,10 @@ var BufferGeometryUtils = {
|
|
|
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
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(), b = new THREE.Vector3();
|
|
16979
|
-
function T(
|
|
16980
|
-
p.fromArray(o,
|
|
16981
|
-
var
|
|
16982
|
-
E.set((re *
|
|
16979
|
+
function T(Q, j, V) {
|
|
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
|
+
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), b.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(b), d[j].add(b), d[V].add(b);
|
|
16983
16983
|
}
|
|
16984
16984
|
var S = n.groups;
|
|
16985
16985
|
S.length === 0 && (S = [{
|
|
@@ -16987,15 +16987,15 @@ var BufferGeometryUtils = {
|
|
|
16987
16987
|
count: r.length
|
|
16988
16988
|
}]);
|
|
16989
16989
|
for (var h = 0, R = S.length; h < R; ++h)
|
|
16990
|
-
for (var w = S[h], C = w.start, I = w.count,
|
|
16991
|
-
T(r[
|
|
16992
|
-
var
|
|
16993
|
-
function z(
|
|
16994
|
-
O.fromArray(s,
|
|
16990
|
+
for (var w = S[h], C = w.start, I = w.count, B = C, M = C + I; B < M; B += 3)
|
|
16991
|
+
T(r[B + 0], r[B + 1], r[B + 2]);
|
|
16992
|
+
var H = new THREE.Vector3(), L = new THREE.Vector3(), O = new THREE.Vector3(), F = new THREE.Vector3(), N, D, q;
|
|
16993
|
+
function z(Q) {
|
|
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;
|
|
16995
16995
|
}
|
|
16996
16996
|
for (var h = 0, R = S.length; h < R; ++h)
|
|
16997
|
-
for (var w = S[h], C = w.start, I = w.count,
|
|
16998
|
-
z(r[
|
|
16997
|
+
for (var w = S[h], C = w.start, I = w.count, B = C, M = C + I; B < M; B += 3)
|
|
16998
|
+
z(r[B + 0]), z(r[B + 1]), z(r[B + 2]);
|
|
16999
16999
|
},
|
|
17000
17000
|
/**
|
|
17001
17001
|
* @param {Array<THREE.BufferGeometry>} geometries
|
|
@@ -17130,10 +17130,10 @@ var BufferGeometryUtils = {
|
|
|
17130
17130
|
else {
|
|
17131
17131
|
for (var T = 0, m = l.length; T < m; T++)
|
|
17132
17132
|
for (var A = l[T], S = n.getAttribute(A), g = n.morphAttributes[A], R = S.itemSize, C = c[A], I = f[A], w = 0; w < R; w++) {
|
|
17133
|
-
var
|
|
17134
|
-
if (C.push(S[
|
|
17135
|
-
for (var M = 0,
|
|
17136
|
-
I[M].push(g[M][
|
|
17133
|
+
var B = h[w];
|
|
17134
|
+
if (C.push(S[B](E)), g)
|
|
17135
|
+
for (var M = 0, H = g.length; M < H; M++)
|
|
17136
|
+
I[M].push(g[M][B](E));
|
|
17137
17137
|
}
|
|
17138
17138
|
e[b] = u, d.push(u), u++;
|
|
17139
17139
|
}
|
|
@@ -17159,11 +17159,11 @@ function getEdgesBySphere(n, t, e) {
|
|
|
17159
17159
|
var m = [];
|
|
17160
17160
|
if (p.traverseVisible(function(j) {
|
|
17161
17161
|
if (j instanceof THREE.Mesh) {
|
|
17162
|
-
var
|
|
17163
|
-
if (
|
|
17162
|
+
var V = getBvhTreeForMesh(j);
|
|
17163
|
+
if (V) {
|
|
17164
17164
|
scratchMatrix4$1.copy(j.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
|
|
17165
|
-
var
|
|
17166
|
-
|
|
17165
|
+
var U = V.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), G = new THREE.BufferGeometry();
|
|
17166
|
+
G.setAttribute("position", new THREE.BufferAttribute(U, 3)), G.applyMatrix4(j.matrixWorld), G = BufferGeometryUtils.mergeVertices(G, 0.01), m.push(G);
|
|
17167
17167
|
}
|
|
17168
17168
|
}
|
|
17169
17169
|
}), m.length === 0)
|
|
@@ -17173,19 +17173,19 @@ function getEdgesBySphere(n, t, e) {
|
|
|
17173
17173
|
E.push(R);
|
|
17174
17174
|
}
|
|
17175
17175
|
for (var T = 0, S = v.length; T < S; T += 3) {
|
|
17176
|
-
var w = v[T], C = v[T + 1], I = v[T + 2],
|
|
17177
|
-
b.push({ a: w, b: C, c: I, normal:
|
|
17176
|
+
var w = v[T], C = v[T + 1], I = v[T + 2], B = new THREE.Vector3().crossVectors(E[C].clone().sub(E[w]), E[I].clone().sub(E[w])).normalize();
|
|
17177
|
+
b.push({ a: w, b: C, c: I, normal: B });
|
|
17178
17178
|
}
|
|
17179
17179
|
for (var M = {}, T = 0, S = b.length; T < S; T++)
|
|
17180
|
-
for (var
|
|
17181
|
-
var O =
|
|
17180
|
+
for (var H = b[T], L = 0; L < 3; L++) {
|
|
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
17182
|
M[D] === void 0 ? M[D] = { index1: N[0], index2: N[1], face1: T } : M[D].face2 = T;
|
|
17183
17183
|
}
|
|
17184
17184
|
for (var D in M) {
|
|
17185
|
-
var
|
|
17186
|
-
if (
|
|
17187
|
-
var z = E[
|
|
17188
|
-
o.push(new THREE.Line3(z,
|
|
17185
|
+
var q = M[D];
|
|
17186
|
+
if (q.face2 === void 0 || b[q.face1].normal.dot(b[q.face2].normal) <= r) {
|
|
17187
|
+
var z = E[q.index1], Q = E[q.index2];
|
|
17188
|
+
o.push(new THREE.Line3(z, Q));
|
|
17189
17189
|
}
|
|
17190
17190
|
}
|
|
17191
17191
|
E.length = 0, b.length = 0;
|
|
@@ -17929,32 +17929,32 @@ function parse(n, t) {
|
|
|
17929
17929
|
writable: !1,
|
|
17930
17930
|
value: Object.freeze(T.allowHosts)
|
|
17931
17931
|
});
|
|
17932
|
-
var
|
|
17933
|
-
return jsonMerge(
|
|
17932
|
+
var B = b.reduce(function(U, G) {
|
|
17933
|
+
return jsonMerge(U, G);
|
|
17934
17934
|
});
|
|
17935
17935
|
defineProperty(t, "name", {
|
|
17936
17936
|
enumerable: !0,
|
|
17937
17937
|
configurable: !1,
|
|
17938
17938
|
writable: !1,
|
|
17939
|
-
value: String((e =
|
|
17939
|
+
value: String((e = B.name) !== null && e !== void 0 ? e : "Unknown")
|
|
17940
17940
|
}), defineProperty(t, "workCode", {
|
|
17941
17941
|
enumerable: !0,
|
|
17942
17942
|
writable: !0,
|
|
17943
|
-
value: String(
|
|
17943
|
+
value: String(B.resource_code || B.basic_code || B.vr_code || B.code || B.project_id || B.work_code || B.workCode || createUuid())
|
|
17944
17944
|
}), defineProperty(t, "projectId", {
|
|
17945
17945
|
enumerable: !0,
|
|
17946
17946
|
writable: !0,
|
|
17947
|
-
value:
|
|
17947
|
+
value: B.project_id
|
|
17948
17948
|
}), defineProperty(t, "baseURL", {
|
|
17949
17949
|
enumerable: !0,
|
|
17950
17950
|
writable: !0,
|
|
17951
17951
|
value: (function() {
|
|
17952
|
-
var
|
|
17953
|
-
return
|
|
17952
|
+
var U, G = (U = B.base_url) !== null && U !== void 0 ? U : "";
|
|
17953
|
+
return G && G[G.length - 1] !== "/" && (G += "/"), G;
|
|
17954
17954
|
})()
|
|
17955
17955
|
});
|
|
17956
17956
|
var M = void 0;
|
|
17957
|
-
typeof
|
|
17957
|
+
typeof B.model == "object" && (M = {}, defineProperty(M, "work", {
|
|
17958
17958
|
enumerable: !1,
|
|
17959
17959
|
configurable: !1,
|
|
17960
17960
|
writable: !1,
|
|
@@ -17964,34 +17964,34 @@ function parse(n, t) {
|
|
|
17964
17964
|
configurable: !1,
|
|
17965
17965
|
writable: !1,
|
|
17966
17966
|
value: (function() {
|
|
17967
|
-
var
|
|
17968
|
-
if (
|
|
17969
|
-
return relativeURL(
|
|
17967
|
+
var U = B.model.file_url;
|
|
17968
|
+
if (U)
|
|
17969
|
+
return relativeURL(U, t.baseURL);
|
|
17970
17970
|
})()
|
|
17971
17971
|
}), defineProperty(M, "textureBase", {
|
|
17972
17972
|
enumerable: !0,
|
|
17973
17973
|
configurable: !1,
|
|
17974
17974
|
writable: !1,
|
|
17975
17975
|
value: (function() {
|
|
17976
|
-
var
|
|
17977
|
-
return
|
|
17976
|
+
var U = B.model.material_base_url;
|
|
17977
|
+
return U && (U = relativeURL(U, t.baseURL)), U;
|
|
17978
17978
|
})()
|
|
17979
17979
|
}), defineProperty(M, "textures", {
|
|
17980
17980
|
enumerable: !0,
|
|
17981
17981
|
configurable: !1,
|
|
17982
17982
|
writable: !1,
|
|
17983
17983
|
value: (function() {
|
|
17984
|
-
var
|
|
17985
|
-
return Array.isArray(
|
|
17984
|
+
var U = void 0;
|
|
17985
|
+
return Array.isArray(B.model.material_textures) && (U = B.model.material_textures.slice(), Object.freeze(U)), U;
|
|
17986
17986
|
})()
|
|
17987
17987
|
}), defineProperty(M, "layers", {
|
|
17988
17988
|
enumerable: !0,
|
|
17989
17989
|
configurable: !1,
|
|
17990
17990
|
writable: !1,
|
|
17991
17991
|
value: (function() {
|
|
17992
|
-
var
|
|
17993
|
-
if (Array.isArray(
|
|
17994
|
-
for (var Z = 0, Y =
|
|
17992
|
+
var U, G, W, X = [];
|
|
17993
|
+
if (Array.isArray(B.model.layers))
|
|
17994
|
+
for (var Z = 0, Y = B.model.layers; Z < Y.length; Z++) {
|
|
17995
17995
|
var K = Y[Z];
|
|
17996
17996
|
if (K && K.tileset_url) {
|
|
17997
17997
|
var ee = {};
|
|
@@ -18004,12 +18004,12 @@ function parse(n, t) {
|
|
|
18004
18004
|
enumerable: !0,
|
|
18005
18005
|
configurable: !1,
|
|
18006
18006
|
writable: !1,
|
|
18007
|
-
value: (
|
|
18007
|
+
value: (U = K.name) !== null && U !== void 0 ? U : ""
|
|
18008
18008
|
}), defineProperty(ee, "type", {
|
|
18009
18009
|
enumerable: !0,
|
|
18010
18010
|
configurable: !1,
|
|
18011
18011
|
writable: !1,
|
|
18012
|
-
value: (
|
|
18012
|
+
value: (G = K.type) !== null && G !== void 0 ? G : "mesh"
|
|
18013
18013
|
}), defineProperty(ee, "upAxis", {
|
|
18014
18014
|
enumerable: !0,
|
|
18015
18015
|
configurable: !1,
|
|
@@ -18023,8 +18023,8 @@ function parse(n, t) {
|
|
|
18023
18023
|
}), X.push(ee);
|
|
18024
18024
|
}
|
|
18025
18025
|
}
|
|
18026
|
-
if (typeof
|
|
18027
|
-
var K =
|
|
18026
|
+
if (typeof B.model.tiles == "object") {
|
|
18027
|
+
var K = B.model.tiles;
|
|
18028
18028
|
if (K && K.tileset_url) {
|
|
18029
18029
|
var ee = {};
|
|
18030
18030
|
defineProperty(ee, "work", {
|
|
@@ -18063,10 +18063,10 @@ function parse(n, t) {
|
|
|
18063
18063
|
writable: !1,
|
|
18064
18064
|
value: M
|
|
18065
18065
|
});
|
|
18066
|
-
var
|
|
18067
|
-
if (Array.isArray(
|
|
18068
|
-
for (var L =
|
|
18069
|
-
var
|
|
18066
|
+
var H = [];
|
|
18067
|
+
if (Array.isArray(B.observers) && B.panorama && Array.isArray(B.panorama.list || B.panorama.info))
|
|
18068
|
+
for (var L = B.observers, O = (r = B.panorama.list || B.panorama.info) !== null && r !== void 0 ? r : [], F = (f = (l = (s = (o = B.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = B.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = B.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", N = Math.min(L.length, O.length), D = function(U) {
|
|
18069
|
+
var G = L[U], W = O[U], X = {};
|
|
18070
18070
|
defineProperty(X, "work", {
|
|
18071
18071
|
enumerable: !1,
|
|
18072
18072
|
configurable: !1,
|
|
@@ -18076,62 +18076,62 @@ function parse(n, t) {
|
|
|
18076
18076
|
enumerable: !0,
|
|
18077
18077
|
configurable: !1,
|
|
18078
18078
|
writable: !1,
|
|
18079
|
-
value:
|
|
18079
|
+
value: U
|
|
18080
18080
|
}), defineProperty(X, "panoIndex", {
|
|
18081
18081
|
enumerable: !0,
|
|
18082
18082
|
configurable: !1,
|
|
18083
18083
|
writable: !1,
|
|
18084
|
-
value:
|
|
18084
|
+
value: U
|
|
18085
18085
|
}), defineProperty(X, "panoId", {
|
|
18086
18086
|
enumerable: !0,
|
|
18087
18087
|
configurable: !1,
|
|
18088
18088
|
writable: !1,
|
|
18089
|
-
value: panoStringify({ workCode: t.workCode, panoIndex:
|
|
18089
|
+
value: panoStringify({ workCode: t.workCode, panoIndex: U })
|
|
18090
18090
|
}), defineProperty(X, "derivedId", {
|
|
18091
18091
|
enumerable: !0,
|
|
18092
18092
|
configurable: !1,
|
|
18093
18093
|
writable: !1,
|
|
18094
|
-
value: (d =
|
|
18094
|
+
value: (d = G.derived_id) !== null && d !== void 0 ? d : W.derived_id
|
|
18095
18095
|
}), defineProperty(X, "floorIndex", {
|
|
18096
18096
|
enumerable: !0,
|
|
18097
18097
|
configurable: !1,
|
|
18098
18098
|
writable: !1,
|
|
18099
|
-
value: (h =
|
|
18099
|
+
value: (h = G.floor_index) !== null && h !== void 0 ? h : G.floor
|
|
18100
18100
|
}), defineProperty(X, "derivedId", {
|
|
18101
18101
|
enumerable: !0,
|
|
18102
18102
|
configurable: !1,
|
|
18103
18103
|
writable: !1,
|
|
18104
|
-
value: (p =
|
|
18104
|
+
value: (p = G.derived_id) !== null && p !== void 0 ? p : W.derived_id
|
|
18105
18105
|
}), defineProperty(X, "derivedIdStr", {
|
|
18106
18106
|
enumerable: !0,
|
|
18107
18107
|
configurable: !1,
|
|
18108
18108
|
writable: !1,
|
|
18109
|
-
value: (m =
|
|
18109
|
+
value: (m = G.derived_id_str) !== null && m !== void 0 ? m : W.derived_id_str
|
|
18110
18110
|
}), defineProperty(X, "active", {
|
|
18111
18111
|
enumerable: !0,
|
|
18112
18112
|
configurable: !1,
|
|
18113
18113
|
writable: !1,
|
|
18114
|
-
value:
|
|
18114
|
+
value: G.active !== !1 && W.active !== !1
|
|
18115
18115
|
}), defineProperty(X, "loadable", {
|
|
18116
18116
|
enumerable: !0,
|
|
18117
18117
|
configurable: !1,
|
|
18118
18118
|
writable: !1,
|
|
18119
|
-
value: (g = (A =
|
|
18119
|
+
value: (g = (A = G.active) !== null && A !== void 0 ? A : W.active) !== null && g !== void 0 ? g : !1
|
|
18120
18120
|
}), defineProperty(X, "position", {
|
|
18121
18121
|
enumerable: !0,
|
|
18122
18122
|
configurable: !1,
|
|
18123
18123
|
writable: !1,
|
|
18124
|
-
value: Object.freeze(new THREE.Vector3().fromArray((y =
|
|
18124
|
+
value: Object.freeze(new THREE.Vector3().fromArray((y = G.position) !== null && y !== void 0 ? y : [0, 0, 0]))
|
|
18125
18125
|
}), defineProperty(X, "standingPosition", {
|
|
18126
18126
|
enumerable: !0,
|
|
18127
18127
|
configurable: !1,
|
|
18128
18128
|
writable: !1,
|
|
18129
|
-
value: Object.freeze(new THREE.Vector3().fromArray((E = (v =
|
|
18129
|
+
value: Object.freeze(new THREE.Vector3().fromArray((E = (v = G.standing_position) !== null && v !== void 0 ? v : G.standingPosition) !== null && E !== void 0 ? E : [0, 0, 0]))
|
|
18130
18130
|
}), defineProperty(X, "quaternion", {
|
|
18131
18131
|
enumerable: !0,
|
|
18132
18132
|
configurable: !1,
|
|
18133
18133
|
writable: !1,
|
|
18134
|
-
value: Object.freeze(new THREE.Quaternion().fromArray(
|
|
18134
|
+
value: Object.freeze(new THREE.Quaternion().fromArray(G.quaternion ? [G.quaternion.x, G.quaternion.y, G.quaternion.z, G.quaternion.w] : [0, 0, 0, 1]))
|
|
18135
18135
|
}), defineProperty(X, "matrix", {
|
|
18136
18136
|
enumerable: !0,
|
|
18137
18137
|
configurable: !1,
|
|
@@ -18142,12 +18142,12 @@ function parse(n, t) {
|
|
|
18142
18142
|
configurable: !1,
|
|
18143
18143
|
writable: !1,
|
|
18144
18144
|
value: (function() {
|
|
18145
|
-
var Z, Y, K = ((Y = (Z =
|
|
18145
|
+
var Z, Y, K = ((Y = (Z = G.accessible_nodes) !== null && Z !== void 0 ? Z : G.accessibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
|
|
18146
18146
|
return te < N;
|
|
18147
18147
|
});
|
|
18148
18148
|
if (K.length === 0)
|
|
18149
18149
|
for (var ee = 0; ee < N; ee++)
|
|
18150
|
-
ee !==
|
|
18150
|
+
ee !== U && K.push(ee);
|
|
18151
18151
|
return Object.freeze(K);
|
|
18152
18152
|
})()
|
|
18153
18153
|
}), defineProperty(X, "visibleNodes", {
|
|
@@ -18155,12 +18155,12 @@ function parse(n, t) {
|
|
|
18155
18155
|
configurable: !1,
|
|
18156
18156
|
writable: !1,
|
|
18157
18157
|
value: (function() {
|
|
18158
|
-
var Z, Y, K = ((Y = (Z =
|
|
18158
|
+
var Z, Y, K = ((Y = (Z = G.visible_nodes) !== null && Z !== void 0 ? Z : G.visibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
|
|
18159
18159
|
return te < N;
|
|
18160
18160
|
});
|
|
18161
18161
|
if (K.length === 0)
|
|
18162
18162
|
for (var ee = 0; ee < N; ee++)
|
|
18163
|
-
ee !==
|
|
18163
|
+
ee !== U && K.push(ee);
|
|
18164
18164
|
return Object.freeze(K);
|
|
18165
18165
|
})()
|
|
18166
18166
|
}), defineProperty(X, "images", {
|
|
@@ -18181,7 +18181,7 @@ function parse(n, t) {
|
|
|
18181
18181
|
enumerable: !0,
|
|
18182
18182
|
configurable: !1,
|
|
18183
18183
|
writable: !1,
|
|
18184
|
-
value: relativeURL(panoURL(W[ee], F,
|
|
18184
|
+
value: relativeURL(panoURL(W[ee], F, U), t.baseURL)
|
|
18185
18185
|
});
|
|
18186
18186
|
}
|
|
18187
18187
|
return defineProperty(Z, "sizeList", {
|
|
@@ -18319,14 +18319,14 @@ function parse(n, t) {
|
|
|
18319
18319
|
value: new THREE.Vector2().fromArray(W.video.size)
|
|
18320
18320
|
})), Z;
|
|
18321
18321
|
})()
|
|
18322
|
-
}),
|
|
18323
|
-
},
|
|
18324
|
-
D(
|
|
18322
|
+
}), H.push(X);
|
|
18323
|
+
}, q = 0; q < N; q++)
|
|
18324
|
+
D(q);
|
|
18325
18325
|
defineProperty(t, "observers", {
|
|
18326
18326
|
enumerable: !0,
|
|
18327
18327
|
configurable: !1,
|
|
18328
18328
|
writable: !1,
|
|
18329
|
-
value: Object.freeze(
|
|
18329
|
+
value: Object.freeze(H)
|
|
18330
18330
|
});
|
|
18331
18331
|
var z = {};
|
|
18332
18332
|
if (defineProperty(z, "work", {
|
|
@@ -18334,19 +18334,19 @@ function parse(n, t) {
|
|
|
18334
18334
|
configurable: !1,
|
|
18335
18335
|
writable: !1,
|
|
18336
18336
|
value: t
|
|
18337
|
-
}),
|
|
18337
|
+
}), B.initial) {
|
|
18338
18338
|
if (t.observers.length > 0) {
|
|
18339
|
-
var
|
|
18340
|
-
isNumber(
|
|
18339
|
+
var Q = void 0;
|
|
18340
|
+
isNumber(B.initial.panoIndex) ? Q = B.initial.panoIndex : isNumber(B.initial.pano_index) ? Q = B.initial.pano_index : isNumber(B.initial.pano) && (Q = B.initial.pano), typeof Q == "number" && (Q = clamp$1(Q, 0, t.observers.length - 1), defineProperty(z, "panoIndex", {
|
|
18341
18341
|
enumerable: !0,
|
|
18342
18342
|
writable: !0,
|
|
18343
|
-
value:
|
|
18343
|
+
value: Q
|
|
18344
18344
|
}));
|
|
18345
18345
|
}
|
|
18346
|
-
if (
|
|
18346
|
+
if (B.initial.mode === "Panorama" && t.observers.length === 0 || B.initial.mode === "Floorplan" || B.initial.mode === "Topview" || B.initial.mode === "Model" || B.initial.mode === "Mapview" ? defineProperty(z, "mode", {
|
|
18347
18347
|
enumerable: !0,
|
|
18348
18348
|
writable: !0,
|
|
18349
|
-
value:
|
|
18349
|
+
value: B.initial.mode
|
|
18350
18350
|
}) : typeof z.panoIndex == "number" ? defineProperty(z, "mode", {
|
|
18351
18351
|
enumerable: !0,
|
|
18352
18352
|
writable: !0,
|
|
@@ -18355,43 +18355,43 @@ function parse(n, t) {
|
|
|
18355
18355
|
enumerable: !0,
|
|
18356
18356
|
writable: !0,
|
|
18357
18357
|
value: "Mapview"
|
|
18358
|
-
}), isNumber(
|
|
18358
|
+
}), isNumber(B.initial.latitude) && defineProperty(z, "latitude", {
|
|
18359
18359
|
enumerable: !0,
|
|
18360
18360
|
writable: !0,
|
|
18361
|
-
value:
|
|
18362
|
-
}), isNumber(
|
|
18361
|
+
value: B.initial.latitude
|
|
18362
|
+
}), isNumber(B.initial.longitude) ? defineProperty(z, "longitude", {
|
|
18363
18363
|
enumerable: !0,
|
|
18364
18364
|
writable: !0,
|
|
18365
|
-
value:
|
|
18366
|
-
}) : isNumber(
|
|
18365
|
+
value: B.initial.longitude
|
|
18366
|
+
}) : isNumber(B.initial.heading) && defineProperty(z, "longitude", {
|
|
18367
18367
|
enumerable: !0,
|
|
18368
18368
|
writable: !0,
|
|
18369
|
-
value: headingToLongitude(
|
|
18370
|
-
}), isNumber(
|
|
18369
|
+
value: headingToLongitude(B.initial.heading)
|
|
18370
|
+
}), isNumber(B.initial.fov) && defineProperty(z, "fov", {
|
|
18371
18371
|
enumerable: !0,
|
|
18372
18372
|
writable: !0,
|
|
18373
|
-
value:
|
|
18374
|
-
}), isNumber(
|
|
18373
|
+
value: B.initial.fov
|
|
18374
|
+
}), isNumber(B.initial.distance) && defineProperty(z, "distance", {
|
|
18375
18375
|
enumerable: !0,
|
|
18376
18376
|
writable: !0,
|
|
18377
|
-
value:
|
|
18378
|
-
}), Array.isArray(
|
|
18379
|
-
var j =
|
|
18380
|
-
var W = Number(j[
|
|
18377
|
+
value: B.initial.distance
|
|
18378
|
+
}), Array.isArray(B.initial.offset)) {
|
|
18379
|
+
var j = B.initial.offset, V = [0, 0, 0].map(function(U, G) {
|
|
18380
|
+
var W = Number(j[G]);
|
|
18381
18381
|
return isNaN(W) || !isFinite(W) ? 0 : W;
|
|
18382
18382
|
});
|
|
18383
18383
|
defineProperty(z, "offset", {
|
|
18384
18384
|
enumerable: !0,
|
|
18385
18385
|
writable: !0,
|
|
18386
|
-
value: new THREE.Vector3().fromArray(
|
|
18386
|
+
value: new THREE.Vector3().fromArray(V)
|
|
18387
18387
|
});
|
|
18388
|
-
} else typeof
|
|
18388
|
+
} else typeof B.initial.offset == "object" && typeof B.initial.offset.x == "number" && typeof B.initial.offset.y == "number" && typeof B.initial.offset.z == "number" && defineProperty(z, "offset", {
|
|
18389
18389
|
enumerable: !0,
|
|
18390
18390
|
writable: !0,
|
|
18391
18391
|
value: new THREE.Vector3().fromArray([
|
|
18392
|
-
|
|
18393
|
-
|
|
18394
|
-
|
|
18392
|
+
B.initial.offset.x,
|
|
18393
|
+
B.initial.offset.y,
|
|
18394
|
+
B.initial.offset.z
|
|
18395
18395
|
])
|
|
18396
18396
|
});
|
|
18397
18397
|
}
|
|
@@ -18726,7 +18726,7 @@ Error work input:
|
|
|
18726
18726
|
var u = s[o];
|
|
18727
18727
|
this.observerBox.expandByPoint(u.position), this.observerBox.expandByPoint(u.standingPosition);
|
|
18728
18728
|
}
|
|
18729
|
-
e.transform && (Array.isArray(e.transform) ? this.transform.fromArray(e.transform) : this.transform.copy(e.transform)), typeof e.jsonp == "boolean" && (this.jsonp = e.jsonp), typeof e.shortPath == "boolean" && (this.shortPath = e.shortPath), e.workCode && (typeof e.workCode == "string" ? this.workCode = e.workCode : typeof e.workCode == "function" && (this.workCode = e.workCode(t)));
|
|
18729
|
+
e.baseURL && (this.baseURL = e.baseURL), e.transform && (Array.isArray(e.transform) ? this.transform.fromArray(e.transform) : this.transform.copy(e.transform)), typeof e.jsonp == "boolean" && (this.jsonp = e.jsonp), typeof e.shortPath == "boolean" && (this.shortPath = e.shortPath), e.workCode && (typeof e.workCode == "string" ? this.workCode = e.workCode : typeof e.workCode == "function" && (this.workCode = e.workCode(t)));
|
|
18730
18730
|
{
|
|
18731
18731
|
var l = this;
|
|
18732
18732
|
this.options = {
|
|
@@ -20082,48 +20082,48 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20082
20082
|
return Array.isArray(P) ? (p(P, k[_], k), !0) : !1;
|
|
20083
20083
|
}
|
|
20084
20084
|
function p(P, _, k) {
|
|
20085
|
-
var
|
|
20085
|
+
var J;
|
|
20086
20086
|
if (P)
|
|
20087
20087
|
if (P.forEach)
|
|
20088
20088
|
P.forEach(_, k);
|
|
20089
20089
|
else if (P.length !== r)
|
|
20090
|
-
for (
|
|
20091
|
-
_.call(k, P[
|
|
20090
|
+
for (J = 0; J < P.length; )
|
|
20091
|
+
_.call(k, P[J], J, P), J++;
|
|
20092
20092
|
else
|
|
20093
|
-
for (
|
|
20094
|
-
P.hasOwnProperty(
|
|
20093
|
+
for (J in P)
|
|
20094
|
+
P.hasOwnProperty(J) && _.call(k, P[J], J, P);
|
|
20095
20095
|
}
|
|
20096
20096
|
function m(P, _, k) {
|
|
20097
|
-
var
|
|
20097
|
+
var J = "DEPRECATED METHOD: " + _ + `
|
|
20098
20098
|
` + k + ` AT
|
|
20099
20099
|
`;
|
|
20100
20100
|
return function() {
|
|
20101
20101
|
var $ = new Error("get-stack-trace"), oe = $ && $.stack ? $.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", be = n.console && (n.console.warn || n.console.log);
|
|
20102
|
-
return be && be.call(n.console,
|
|
20102
|
+
return be && be.call(n.console, J, oe), P.apply(this, arguments);
|
|
20103
20103
|
};
|
|
20104
20104
|
}
|
|
20105
20105
|
var A;
|
|
20106
20106
|
typeof Object.assign != "function" ? A = function(_) {
|
|
20107
20107
|
if (_ === r || _ === null)
|
|
20108
20108
|
throw new TypeError("Cannot convert undefined or null to object");
|
|
20109
|
-
for (var k = Object(_),
|
|
20110
|
-
var $ = arguments[
|
|
20109
|
+
for (var k = Object(_), J = 1; J < arguments.length; J++) {
|
|
20110
|
+
var $ = arguments[J];
|
|
20111
20111
|
if ($ !== r && $ !== null)
|
|
20112
20112
|
for (var oe in $)
|
|
20113
20113
|
$.hasOwnProperty(oe) && (k[oe] = $[oe]);
|
|
20114
20114
|
}
|
|
20115
20115
|
return k;
|
|
20116
20116
|
} : A = Object.assign;
|
|
20117
|
-
var g = m(function(_, k,
|
|
20117
|
+
var g = m(function(_, k, J) {
|
|
20118
20118
|
for (var $ = Object.keys(k), oe = 0; oe < $.length; )
|
|
20119
|
-
(!
|
|
20119
|
+
(!J || J && _[$[oe]] === r) && (_[$[oe]] = k[$[oe]]), oe++;
|
|
20120
20120
|
return _;
|
|
20121
20121
|
}, "extend", "Use `assign`."), y = m(function(_, k) {
|
|
20122
20122
|
return g(_, k, !0);
|
|
20123
20123
|
}, "merge", "Use `assign`.");
|
|
20124
20124
|
function v(P, _, k) {
|
|
20125
|
-
var
|
|
20126
|
-
$ = P.prototype = Object.create(
|
|
20125
|
+
var J = _.prototype, $;
|
|
20126
|
+
$ = P.prototype = Object.create(J), $.constructor = P, $._super = J, k && A($, k);
|
|
20127
20127
|
}
|
|
20128
20128
|
function E(P, _) {
|
|
20129
20129
|
return function() {
|
|
@@ -20137,13 +20137,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20137
20137
|
return P === r ? _ : P;
|
|
20138
20138
|
}
|
|
20139
20139
|
function S(P, _, k) {
|
|
20140
|
-
p(I(_), function(
|
|
20141
|
-
P.addEventListener(
|
|
20140
|
+
p(I(_), function(J) {
|
|
20141
|
+
P.addEventListener(J, k, !1);
|
|
20142
20142
|
});
|
|
20143
20143
|
}
|
|
20144
20144
|
function R(P, _, k) {
|
|
20145
|
-
p(I(_), function(
|
|
20146
|
-
P.removeEventListener(
|
|
20145
|
+
p(I(_), function(J) {
|
|
20146
|
+
P.removeEventListener(J, k, !1);
|
|
20147
20147
|
});
|
|
20148
20148
|
}
|
|
20149
20149
|
function w(P, _) {
|
|
@@ -20160,32 +20160,32 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20160
20160
|
function I(P) {
|
|
20161
20161
|
return P.trim().split(/\s+/g);
|
|
20162
20162
|
}
|
|
20163
|
-
function
|
|
20163
|
+
function B(P, _, k) {
|
|
20164
20164
|
if (P.indexOf && !k)
|
|
20165
20165
|
return P.indexOf(_);
|
|
20166
|
-
for (var
|
|
20167
|
-
if (k && P[
|
|
20168
|
-
return
|
|
20169
|
-
|
|
20166
|
+
for (var J = 0; J < P.length; ) {
|
|
20167
|
+
if (k && P[J][k] == _ || !k && P[J] === _)
|
|
20168
|
+
return J;
|
|
20169
|
+
J++;
|
|
20170
20170
|
}
|
|
20171
20171
|
return -1;
|
|
20172
20172
|
}
|
|
20173
20173
|
function M(P) {
|
|
20174
20174
|
return Array.prototype.slice.call(P, 0);
|
|
20175
20175
|
}
|
|
20176
|
-
function
|
|
20177
|
-
for (var
|
|
20176
|
+
function H(P, _, k) {
|
|
20177
|
+
for (var J = [], $ = [], oe = 0; oe < P.length; ) {
|
|
20178
20178
|
var be = P[oe][_];
|
|
20179
|
-
|
|
20179
|
+
B($, be) < 0 && J.push(P[oe]), $[oe] = be, oe++;
|
|
20180
20180
|
}
|
|
20181
|
-
return
|
|
20181
|
+
return J = J.sort(function(Xe, Fe) {
|
|
20182
20182
|
return Xe[_] > Fe[_];
|
|
20183
|
-
}),
|
|
20183
|
+
}), J;
|
|
20184
20184
|
}
|
|
20185
20185
|
function L(P, _) {
|
|
20186
|
-
for (var k,
|
|
20187
|
-
if (k = o[oe],
|
|
20188
|
-
return
|
|
20186
|
+
for (var k, J, $ = _[0].toUpperCase() + _.slice(1), oe = 0; oe < o.length; ) {
|
|
20187
|
+
if (k = o[oe], J = k ? k + $ : _, J in P)
|
|
20188
|
+
return J;
|
|
20189
20189
|
oe++;
|
|
20190
20190
|
}
|
|
20191
20191
|
return r;
|
|
@@ -20198,11 +20198,11 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20198
20198
|
var _ = P.ownerDocument || P;
|
|
20199
20199
|
return _.defaultView || _.parentWindow || n;
|
|
20200
20200
|
}
|
|
20201
|
-
var D = /mobile|tablet|ip(ad|hone|od)|android/i,
|
|
20201
|
+
var D = /mobile|tablet|ip(ad|hone|od)|android/i, q = "ontouchstart" in n, z = L(n, "PointerEvent") !== r, Q = q && D.test(navigator.userAgent), j = "touch", V = "pen", U = "mouse", G = "kinect", W = 25, X = 1, Z = 2, Y = 4, K = 8, ee = 1, te = 2, re = 4, ie = 8, ce = 16, ae = te | re, de = ie | ce, ge = ae | de, ye = ["x", "y"], xe = ["clientX", "clientY"];
|
|
20202
20202
|
function le(P, _) {
|
|
20203
20203
|
var k = this;
|
|
20204
|
-
this.manager = P, this.callback = _, this.element = P.element, this.target = P.options.inputTarget, this.domHandler = function(
|
|
20205
|
-
b(P.options.enable, [P]) && k.handler(
|
|
20204
|
+
this.manager = P, this.callback = _, this.element = P.element, this.target = P.options.inputTarget, this.domHandler = function(J) {
|
|
20205
|
+
b(P.options.enable, [P]) && k.handler(J);
|
|
20206
20206
|
}, this.init();
|
|
20207
20207
|
}
|
|
20208
20208
|
le.prototype = {
|
|
@@ -20227,36 +20227,36 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20227
20227
|
};
|
|
20228
20228
|
function he(P) {
|
|
20229
20229
|
var _, k = P.options.inputClass;
|
|
20230
|
-
return k ? _ = k : z ? _ = Be :
|
|
20230
|
+
return k ? _ = k : z ? _ = Be : Q ? _ = Ue : q ? _ = ht : _ = ke, new _(P, ne);
|
|
20231
20231
|
}
|
|
20232
20232
|
function ne(P, _, k) {
|
|
20233
|
-
var
|
|
20233
|
+
var J = k.pointers.length, $ = k.changedPointers.length, oe = _ & X && J - $ === 0, be = _ & (Y | K) && J - $ === 0;
|
|
20234
20234
|
k.isFirst = !!oe, k.isFinal = !!be, oe && (P.session = {}), k.eventType = _, se(P, k), P.emit("hammer.input", k), P.recognize(k), P.session.prevInput = k;
|
|
20235
20235
|
}
|
|
20236
20236
|
function se(P, _) {
|
|
20237
|
-
var k = P.session,
|
|
20237
|
+
var k = P.session, J = _.pointers, $ = J.length;
|
|
20238
20238
|
k.firstInput || (k.firstInput = Ne(_)), $ > 1 && !k.firstMultiple ? k.firstMultiple = Ne(_) : $ === 1 && (k.firstMultiple = !1);
|
|
20239
|
-
var oe = k.firstInput, be = k.firstMultiple, De = be ? be.center : oe.center, Xe = _.center = qe(
|
|
20239
|
+
var oe = k.firstInput, be = k.firstMultiple, De = be ? be.center : oe.center, Xe = _.center = qe(J);
|
|
20240
20240
|
_.timeStamp = f(), _.deltaTime = _.timeStamp - oe.timeStamp, _.angle = Ke(De, Xe), _.distance = ve(De, Xe), pe(k, _), _.offsetDirection = Ve(_.deltaX, _.deltaY);
|
|
20241
20241
|
var Fe = Ye(_.deltaTime, _.deltaX, _.deltaY);
|
|
20242
|
-
_.overallVelocityX = Fe.x, _.overallVelocityY = Fe.y, _.overallVelocity = c(Fe.x) > c(Fe.y) ? Fe.x : Fe.y, _.scale = be ? Le(be.pointers,
|
|
20242
|
+
_.overallVelocityX = Fe.x, _.overallVelocityY = Fe.y, _.overallVelocity = c(Fe.x) > c(Fe.y) ? Fe.x : Fe.y, _.scale = be ? Le(be.pointers, J) : 1, _.rotation = be ? Te(be.pointers, J) : 0, _.maxPointers = k.prevInput ? _.pointers.length > k.prevInput.maxPointers ? _.pointers.length : k.prevInput.maxPointers : _.pointers.length, me(k, _);
|
|
20243
20243
|
var lt = P.element;
|
|
20244
20244
|
w(_.srcEvent.target, lt) && (lt = _.srcEvent.target), _.target = lt;
|
|
20245
20245
|
}
|
|
20246
20246
|
function pe(P, _) {
|
|
20247
|
-
var k = _.center,
|
|
20247
|
+
var k = _.center, J = P.offsetDelta || {}, $ = P.prevDelta || {}, oe = P.prevInput || {};
|
|
20248
20248
|
(_.eventType === X || oe.eventType === Y) && ($ = P.prevDelta = {
|
|
20249
20249
|
x: oe.deltaX || 0,
|
|
20250
20250
|
y: oe.deltaY || 0
|
|
20251
|
-
},
|
|
20251
|
+
}, J = P.offsetDelta = {
|
|
20252
20252
|
x: k.x,
|
|
20253
20253
|
y: k.y
|
|
20254
|
-
}), _.deltaX = $.x + (k.x -
|
|
20254
|
+
}), _.deltaX = $.x + (k.x - J.x), _.deltaY = $.y + (k.y - J.y);
|
|
20255
20255
|
}
|
|
20256
20256
|
function me(P, _) {
|
|
20257
|
-
var k = P.lastInterval || _,
|
|
20258
|
-
if (_.eventType != K && (
|
|
20259
|
-
var Xe = _.deltaX - k.deltaX, Fe = _.deltaY - k.deltaY, lt = Ye(
|
|
20257
|
+
var k = P.lastInterval || _, J = _.timeStamp - k.timeStamp, $, oe, be, De;
|
|
20258
|
+
if (_.eventType != K && (J > W || k.velocity === r)) {
|
|
20259
|
+
var Xe = _.deltaX - k.deltaX, Fe = _.deltaY - k.deltaY, lt = Ye(J, Xe, Fe);
|
|
20260
20260
|
oe = lt.x, be = lt.y, $ = c(lt.x) > c(lt.y) ? lt.x : lt.y, De = Ve(Xe, Fe), P.lastInterval = _;
|
|
20261
20261
|
} else
|
|
20262
20262
|
$ = k.velocity, oe = k.velocityX, be = k.velocityY, De = k.direction;
|
|
@@ -20283,11 +20283,11 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20283
20283
|
x: l(P[0].clientX),
|
|
20284
20284
|
y: l(P[0].clientY)
|
|
20285
20285
|
};
|
|
20286
|
-
for (var k = 0,
|
|
20287
|
-
k += P[$].clientX,
|
|
20286
|
+
for (var k = 0, J = 0, $ = 0; $ < _; )
|
|
20287
|
+
k += P[$].clientX, J += P[$].clientY, $++;
|
|
20288
20288
|
return {
|
|
20289
20289
|
x: l(k / _),
|
|
20290
|
-
y: l(
|
|
20290
|
+
y: l(J / _)
|
|
20291
20291
|
};
|
|
20292
20292
|
}
|
|
20293
20293
|
function Ye(P, _, k) {
|
|
@@ -20301,13 +20301,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20301
20301
|
}
|
|
20302
20302
|
function ve(P, _, k) {
|
|
20303
20303
|
k || (k = ye);
|
|
20304
|
-
var
|
|
20305
|
-
return Math.sqrt(
|
|
20304
|
+
var J = _[k[0]] - P[k[0]], $ = _[k[1]] - P[k[1]];
|
|
20305
|
+
return Math.sqrt(J * J + $ * $);
|
|
20306
20306
|
}
|
|
20307
20307
|
function Ke(P, _, k) {
|
|
20308
20308
|
k || (k = ye);
|
|
20309
|
-
var
|
|
20310
|
-
return Math.atan2($,
|
|
20309
|
+
var J = _[k[0]] - P[k[0]], $ = _[k[1]] - P[k[1]];
|
|
20310
|
+
return Math.atan2($, J) * 180 / Math.PI;
|
|
20311
20311
|
}
|
|
20312
20312
|
function Te(P, _) {
|
|
20313
20313
|
return Ke(_[1], _[0], xe) + Ke(P[1], P[0], xe);
|
|
@@ -20333,7 +20333,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20333
20333
|
k & X && (_.button === 0 || _.button === 2) && (this.pressed = !0), k & Z && _.which !== 1 && (k = Y), this.pressed && (k & Y && (this.pressed = !1), this.callback(this.manager, k, {
|
|
20334
20334
|
pointers: [_],
|
|
20335
20335
|
changedPointers: [_],
|
|
20336
|
-
pointerType:
|
|
20336
|
+
pointerType: U,
|
|
20337
20337
|
srcEvent: _
|
|
20338
20338
|
}));
|
|
20339
20339
|
}
|
|
@@ -20346,9 +20346,9 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20346
20346
|
pointerout: K
|
|
20347
20347
|
}, _e = {
|
|
20348
20348
|
2: j,
|
|
20349
|
-
3:
|
|
20350
|
-
4:
|
|
20351
|
-
5:
|
|
20349
|
+
3: V,
|
|
20350
|
+
4: U,
|
|
20351
|
+
5: G
|
|
20352
20352
|
// see https://twitter.com/jacobrossi/status/480596438489890816
|
|
20353
20353
|
}, Ee = "pointerdown", Ce = "pointermove pointerup pointercancel";
|
|
20354
20354
|
n.MSPointerEvent && !n.PointerEvent && (Ee = "MSPointerDown", Ce = "MSPointerMove MSPointerUp MSPointerCancel");
|
|
@@ -20361,13 +20361,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20361
20361
|
* @param {Object} ev
|
|
20362
20362
|
*/
|
|
20363
20363
|
handler: function(_) {
|
|
20364
|
-
var k = this.store,
|
|
20365
|
-
be & X && (_.button === 0 || _.button === 2 || Xe) ? Fe < 0 && (k.push(_), Fe = k.length - 1) : be & (Y | K) ?
|
|
20364
|
+
var k = this.store, J = !1, $ = !1, oe = _.type.toLowerCase().replace("ms", ""), be = Pe[oe], De = _e[_.pointerType] || _.pointerType, Xe = De == j, Fe = B(k, _.pointerId, "pointerId");
|
|
20365
|
+
be & X && (_.button === 0 || _.button === 2 || Xe) ? Fe < 0 && (k.push(_), Fe = k.length - 1) : be & (Y | K) ? J = !0 : !Xe && _.buttons === 0 && (J = !0, $ = !0, be = Pe.pointerup), !(Fe < 0) && ($ || (k[Fe] = _), this.callback(this.manager, be, {
|
|
20366
20366
|
pointers: k,
|
|
20367
20367
|
changedPointers: [_],
|
|
20368
20368
|
pointerType: De,
|
|
20369
20369
|
srcEvent: k[Fe]
|
|
20370
|
-
}),
|
|
20370
|
+
}), J && k.splice(Fe, 1));
|
|
20371
20371
|
}
|
|
20372
20372
|
});
|
|
20373
20373
|
var je = {
|
|
@@ -20383,10 +20383,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20383
20383
|
handler: function(_) {
|
|
20384
20384
|
var k = je[_.type];
|
|
20385
20385
|
if (k === X && (this.started = !0), !!this.started) {
|
|
20386
|
-
var
|
|
20387
|
-
k & (Y | K) &&
|
|
20388
|
-
pointers:
|
|
20389
|
-
changedPointers:
|
|
20386
|
+
var J = Je.call(this, _, k);
|
|
20387
|
+
k & (Y | K) && J[0].length - J[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
|
|
20388
|
+
pointers: J[0],
|
|
20389
|
+
changedPointers: J[1],
|
|
20390
20390
|
pointerType: j,
|
|
20391
20391
|
srcEvent: _
|
|
20392
20392
|
});
|
|
@@ -20394,8 +20394,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20394
20394
|
}
|
|
20395
20395
|
});
|
|
20396
20396
|
function Je(P, _) {
|
|
20397
|
-
var k = M(P.touches),
|
|
20398
|
-
return _ & (Y | K) && (k =
|
|
20397
|
+
var k = M(P.touches), J = M(P.changedTouches);
|
|
20398
|
+
return _ & (Y | K) && (k = H(k.concat(J), "identifier")), [k, J];
|
|
20399
20399
|
}
|
|
20400
20400
|
var At = {
|
|
20401
20401
|
touchstart: X,
|
|
@@ -20408,31 +20408,31 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20408
20408
|
}
|
|
20409
20409
|
v(Ue, le, {
|
|
20410
20410
|
handler: function(_) {
|
|
20411
|
-
var k = At[_.type],
|
|
20412
|
-
|
|
20413
|
-
pointers:
|
|
20414
|
-
changedPointers:
|
|
20411
|
+
var k = At[_.type], J = yt.call(this, _, k);
|
|
20412
|
+
J && this.callback(this.manager, k, {
|
|
20413
|
+
pointers: J[0],
|
|
20414
|
+
changedPointers: J[1],
|
|
20415
20415
|
pointerType: j,
|
|
20416
20416
|
srcEvent: _
|
|
20417
20417
|
});
|
|
20418
20418
|
}
|
|
20419
20419
|
});
|
|
20420
20420
|
function yt(P, _) {
|
|
20421
|
-
var k = M(P.touches),
|
|
20421
|
+
var k = M(P.touches), J = this.targetIds;
|
|
20422
20422
|
if (_ & (X | Z) && k.length === 1)
|
|
20423
|
-
return
|
|
20423
|
+
return J[k[0].identifier] = !0, [k, k];
|
|
20424
20424
|
var $, oe, be = M(P.changedTouches), De = [], Xe = this.target;
|
|
20425
20425
|
if (oe = k.filter(function(Fe) {
|
|
20426
20426
|
return w(Fe.target, Xe);
|
|
20427
20427
|
}), _ === X)
|
|
20428
20428
|
for ($ = 0; $ < oe.length; )
|
|
20429
|
-
|
|
20429
|
+
J[oe[$].identifier] = !0, $++;
|
|
20430
20430
|
for ($ = 0; $ < be.length; )
|
|
20431
|
-
|
|
20431
|
+
J[be[$].identifier] && De.push(be[$]), _ & (Y | K) && delete J[be[$].identifier], $++;
|
|
20432
20432
|
if (De.length)
|
|
20433
20433
|
return [
|
|
20434
20434
|
// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
|
|
20435
|
-
|
|
20435
|
+
H(oe.concat(De), "identifier"),
|
|
20436
20436
|
De
|
|
20437
20437
|
];
|
|
20438
20438
|
}
|
|
@@ -20449,14 +20449,14 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20449
20449
|
* @param {String} inputEvent
|
|
20450
20450
|
* @param {Object} inputData
|
|
20451
20451
|
*/
|
|
20452
|
-
handler: function(_, k,
|
|
20453
|
-
var $ =
|
|
20454
|
-
if (!(oe &&
|
|
20452
|
+
handler: function(_, k, J) {
|
|
20453
|
+
var $ = J.pointerType == j, oe = J.pointerType == U;
|
|
20454
|
+
if (!(oe && J.sourceCapabilities && J.sourceCapabilities.firesTouchEvents)) {
|
|
20455
20455
|
if ($)
|
|
20456
|
-
pt.call(this, k,
|
|
20457
|
-
else if (oe && ut.call(this,
|
|
20456
|
+
pt.call(this, k, J);
|
|
20457
|
+
else if (oe && ut.call(this, J))
|
|
20458
20458
|
return;
|
|
20459
|
-
this.callback(_, k,
|
|
20459
|
+
this.callback(_, k, J);
|
|
20460
20460
|
}
|
|
20461
20461
|
},
|
|
20462
20462
|
/**
|
|
@@ -20474,16 +20474,16 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20474
20474
|
if (_.identifier === this.primaryTouch) {
|
|
20475
20475
|
var k = { x: _.clientX, y: _.clientY };
|
|
20476
20476
|
this.lastTouches.push(k);
|
|
20477
|
-
var
|
|
20478
|
-
var oe =
|
|
20479
|
-
oe > -1 &&
|
|
20477
|
+
var J = this.lastTouches, $ = function() {
|
|
20478
|
+
var oe = J.indexOf(k);
|
|
20479
|
+
oe > -1 && J.splice(oe, 1);
|
|
20480
20480
|
};
|
|
20481
20481
|
setTimeout($, Mt);
|
|
20482
20482
|
}
|
|
20483
20483
|
}
|
|
20484
20484
|
function ut(P) {
|
|
20485
|
-
for (var _ = P.srcEvent.clientX, k = P.srcEvent.clientY,
|
|
20486
|
-
var $ = this.lastTouches[
|
|
20485
|
+
for (var _ = P.srcEvent.clientX, k = P.srcEvent.clientY, J = 0; J < this.lastTouches.length; J++) {
|
|
20486
|
+
var $ = this.lastTouches[J], oe = Math.abs(_ - $.x), be = Math.abs(k - $.y);
|
|
20487
20487
|
if (oe <= Et && be <= Et)
|
|
20488
20488
|
return !0;
|
|
20489
20489
|
}
|
|
@@ -20527,7 +20527,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20527
20527
|
_.preventDefault();
|
|
20528
20528
|
return;
|
|
20529
20529
|
}
|
|
20530
|
-
var
|
|
20530
|
+
var J = this.actions, $ = C(J, nt) && !Ht[nt], oe = C(J, bt) && !Ht[bt], be = C(J, ct) && !Ht[ct];
|
|
20531
20531
|
if ($) {
|
|
20532
20532
|
var De = P.pointers.length === 1, Xe = P.distance < 2, Fe = P.deltaTime < 250;
|
|
20533
20533
|
if (De && Xe && Fe)
|
|
@@ -20604,7 +20604,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20604
20604
|
if (h(P, "requireFailure", this))
|
|
20605
20605
|
return this;
|
|
20606
20606
|
var _ = this.requireFail;
|
|
20607
|
-
return P = _t(P, this),
|
|
20607
|
+
return P = _t(P, this), B(_, P) === -1 && (_.push(P), P.requireFailure(this)), this;
|
|
20608
20608
|
},
|
|
20609
20609
|
/**
|
|
20610
20610
|
* drop the requireFailure link. it does not remove the link on the other recognizer.
|
|
@@ -20615,7 +20615,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20615
20615
|
if (h(P, "dropRequireFailure", this))
|
|
20616
20616
|
return this;
|
|
20617
20617
|
P = _t(P, this);
|
|
20618
|
-
var _ =
|
|
20618
|
+
var _ = B(this.requireFail, P);
|
|
20619
20619
|
return _ > -1 && this.requireFail.splice(_, 1), this;
|
|
20620
20620
|
},
|
|
20621
20621
|
/**
|
|
@@ -20640,10 +20640,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20640
20640
|
*/
|
|
20641
20641
|
emit: function(P) {
|
|
20642
20642
|
var _ = this, k = this.state;
|
|
20643
|
-
function
|
|
20643
|
+
function J($) {
|
|
20644
20644
|
_.manager.emit($, P);
|
|
20645
20645
|
}
|
|
20646
|
-
k < xt &&
|
|
20646
|
+
k < xt && J(_.options.event + Ot(k)), J(_.options.event), P.additionalEvent && J(P.additionalEvent), k >= xt && J(_.options.event + Ot(k));
|
|
20647
20647
|
},
|
|
20648
20648
|
/**
|
|
20649
20649
|
* Check that all the require failure recognizers has failed,
|
|
@@ -20747,8 +20747,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20747
20747
|
* @returns {*} State
|
|
20748
20748
|
*/
|
|
20749
20749
|
process: function(P) {
|
|
20750
|
-
var _ = this.state, k = P.eventType,
|
|
20751
|
-
return
|
|
20750
|
+
var _ = this.state, k = P.eventType, J = _ & (at | Pt), $ = this.attrTest(P);
|
|
20751
|
+
return J && (k & K || !$) ? _ | St : J || $ ? k & Y ? _ | xt : _ & at ? _ | Pt : at : Ge;
|
|
20752
20752
|
}
|
|
20753
20753
|
});
|
|
20754
20754
|
function Rt() {
|
|
@@ -20770,8 +20770,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20770
20770
|
return P & ae && _.push(bt), P & de && _.push(ct), _;
|
|
20771
20771
|
},
|
|
20772
20772
|
directionTest: function(P) {
|
|
20773
|
-
var _ = this.options, k = !0,
|
|
20774
|
-
return $ & _.direction || (_.direction & ae ? ($ = oe === 0 ? ee : oe < 0 ? te : re, k = oe != this.pX,
|
|
20773
|
+
var _ = this.options, k = !0, J = P.distance, $ = P.direction, oe = P.deltaX, be = P.deltaY;
|
|
20774
|
+
return $ & _.direction || (_.direction & ae ? ($ = oe === 0 ? ee : oe < 0 ? te : re, k = oe != this.pX, J = Math.abs(P.deltaX)) : ($ = be === 0 ? ee : be < 0 ? ie : ce, k = be != this.pY, J = Math.abs(P.deltaY))), P.direction = $, k && J > _.threshold && $ & _.direction;
|
|
20775
20775
|
},
|
|
20776
20776
|
attrTest: function(P) {
|
|
20777
20777
|
return ot.prototype.attrTest.call(this, P) && (this.state & at || !(this.state & at) && this.directionTest(P));
|
|
@@ -20829,8 +20829,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20829
20829
|
return [Me];
|
|
20830
20830
|
},
|
|
20831
20831
|
process: function(P) {
|
|
20832
|
-
var _ = this.options, k = P.pointers.length === _.pointers,
|
|
20833
|
-
if (this._input = P, !
|
|
20832
|
+
var _ = this.options, k = P.pointers.length === _.pointers, J = P.distance < _.threshold, $ = P.deltaTime > _.time;
|
|
20833
|
+
if (this._input = P, !J || !k || P.eventType & (Y | K) && !$)
|
|
20834
20834
|
this.reset();
|
|
20835
20835
|
else if (P.eventType & X)
|
|
20836
20836
|
this.reset(), this._timer = d(function() {
|
|
@@ -20919,10 +20919,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20919
20919
|
return [He];
|
|
20920
20920
|
},
|
|
20921
20921
|
process: function(P) {
|
|
20922
|
-
var _ = this.options, k = P.pointers.length === _.pointers,
|
|
20922
|
+
var _ = this.options, k = P.pointers.length === _.pointers, J = P.distance < _.threshold, $ = P.deltaTime < _.time;
|
|
20923
20923
|
if (this.reset(), P.eventType & X && this.count === 0)
|
|
20924
20924
|
return this.failTimeout();
|
|
20925
|
-
if (
|
|
20925
|
+
if (J && $ && k) {
|
|
20926
20926
|
if (P.eventType != Y)
|
|
20927
20927
|
return this.failTimeout();
|
|
20928
20928
|
var oe = this.pTime ? P.timeStamp - this.pTime < _.interval : !0, be = !this.pCenter || ve(this.pCenter, P.center) < _.posThreshold;
|
|
@@ -21049,8 +21049,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21049
21049
|
var Oe = 1, Bt = 2;
|
|
21050
21050
|
function st(P, _) {
|
|
21051
21051
|
this.options = A({}, Re.defaults, _ || {}), this.options.inputTarget = this.options.inputTarget || P, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = P, this.input = he(this), this.touchAction = new it(this, this.options.touchAction), Ze(this, !0), p(this.options.recognizers, function(k) {
|
|
21052
|
-
var
|
|
21053
|
-
k[2] &&
|
|
21052
|
+
var J = this.add(new k[0](k[1]));
|
|
21053
|
+
k[2] && J.recognizeWith(k[2]), k[3] && J.requireFailure(k[3]);
|
|
21054
21054
|
}, this);
|
|
21055
21055
|
}
|
|
21056
21056
|
st.prototype = {
|
|
@@ -21081,10 +21081,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21081
21081
|
var _ = this.session;
|
|
21082
21082
|
if (!_.stopped) {
|
|
21083
21083
|
this.touchAction.preventDefaults(P);
|
|
21084
|
-
var k,
|
|
21084
|
+
var k, J = this.recognizers, $ = _.curRecognizer;
|
|
21085
21085
|
(!$ || $ && $.state & vt) && ($ = _.curRecognizer = null);
|
|
21086
|
-
for (var oe = 0; oe <
|
|
21087
|
-
k =
|
|
21086
|
+
for (var oe = 0; oe < J.length; )
|
|
21087
|
+
k = J[oe], _.stopped !== Bt && // 1
|
|
21088
21088
|
(!$ || k == $ || // 2
|
|
21089
21089
|
k.canRecognizeWith($)) ? k.recognize(P) : k.reset(), !$ && k.state & (at | Pt | xt) && ($ = _.curRecognizer = k), oe++;
|
|
21090
21090
|
}
|
|
@@ -21123,7 +21123,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21123
21123
|
if (h(P, "remove", this))
|
|
21124
21124
|
return this;
|
|
21125
21125
|
if (P = this.get(P), P) {
|
|
21126
|
-
var _ = this.recognizers, k =
|
|
21126
|
+
var _ = this.recognizers, k = B(_, P);
|
|
21127
21127
|
k !== -1 && (_.splice(k, 1), this.touchAction.update());
|
|
21128
21128
|
}
|
|
21129
21129
|
return this;
|
|
@@ -21137,8 +21137,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21137
21137
|
on: function(P, _) {
|
|
21138
21138
|
if (P !== r && _ !== r) {
|
|
21139
21139
|
var k = this.handlers;
|
|
21140
|
-
return p(I(P), function(
|
|
21141
|
-
k[
|
|
21140
|
+
return p(I(P), function(J) {
|
|
21141
|
+
k[J] = k[J] || [], k[J].push(_);
|
|
21142
21142
|
}), this;
|
|
21143
21143
|
}
|
|
21144
21144
|
},
|
|
@@ -21151,8 +21151,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21151
21151
|
off: function(P, _) {
|
|
21152
21152
|
if (P !== r) {
|
|
21153
21153
|
var k = this.handlers;
|
|
21154
|
-
return p(I(P), function(
|
|
21155
|
-
_ ? k[
|
|
21154
|
+
return p(I(P), function(J) {
|
|
21155
|
+
_ ? k[J] && k[J].splice(B(k[J], _), 1) : delete k[J];
|
|
21156
21156
|
}), this;
|
|
21157
21157
|
}
|
|
21158
21158
|
},
|
|
@@ -21168,8 +21168,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21168
21168
|
_.type = P, _.preventDefault = function() {
|
|
21169
21169
|
_.srcEvent.preventDefault();
|
|
21170
21170
|
};
|
|
21171
|
-
for (var
|
|
21172
|
-
k[
|
|
21171
|
+
for (var J = 0; J < k.length; )
|
|
21172
|
+
k[J](_), J++;
|
|
21173
21173
|
}
|
|
21174
21174
|
},
|
|
21175
21175
|
/**
|
|
@@ -21183,9 +21183,9 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21183
21183
|
function Ze(P, _) {
|
|
21184
21184
|
var k = P.element;
|
|
21185
21185
|
if (k.style) {
|
|
21186
|
-
var
|
|
21186
|
+
var J;
|
|
21187
21187
|
p(P.options.cssProps, function($, oe) {
|
|
21188
|
-
|
|
21188
|
+
J = L(k.style, oe), _ ? (P.oldCssProps[J] = k.style[J], k.style[J] = $) : k.style[J] = P.oldCssProps[J] || "";
|
|
21189
21189
|
}), _ || (P.oldCssProps = {});
|
|
21190
21190
|
}
|
|
21191
21191
|
}
|
|
@@ -21396,11 +21396,11 @@ var BaseController = (
|
|
|
21396
21396
|
return o.params.Points = { threshold: 0.1 }, o.firstHitOnly = !0, o.near = r.near, o.far = r.far, o.setFromCamera(e, this.camera), o;
|
|
21397
21397
|
}, t.prototype.bindEvents = function(e) {
|
|
21398
21398
|
var r = this, o = function(M) {
|
|
21399
|
-
var
|
|
21400
|
-
return !(Math.abs(
|
|
21399
|
+
var H = calculateThreeMouse(M, r.element, r.viewport);
|
|
21400
|
+
return !(Math.abs(H.x) > 1 || Math.abs(H.y) > 1);
|
|
21401
21401
|
}, s = new Hammer.Manager(e), u = function(M) {
|
|
21402
|
-
var
|
|
21403
|
-
return
|
|
21402
|
+
var H = M.session;
|
|
21403
|
+
return H.firstInput || null;
|
|
21404
21404
|
}, l = new Hammer.Pan({ threshold: 10, pointers: 0 }), c = new Hammer.Tap({ interval: 410 }), f = new Hammer.Pinch({ threshold: 0, pointers: 2 });
|
|
21405
21405
|
s.add([
|
|
21406
21406
|
l,
|
|
@@ -21408,8 +21408,8 @@ var BaseController = (
|
|
|
21408
21408
|
c,
|
|
21409
21409
|
f
|
|
21410
21410
|
]), s.on("panstart pan", function(M) {
|
|
21411
|
-
var
|
|
21412
|
-
if (!(
|
|
21411
|
+
var H = u(s);
|
|
21412
|
+
if (!(H && !o(H.center))) {
|
|
21413
21413
|
var L = createEvent("gesture.pan", {
|
|
21414
21414
|
target: M.target,
|
|
21415
21415
|
pointerType: M.pointerType,
|
|
@@ -21450,8 +21450,8 @@ var BaseController = (
|
|
|
21450
21450
|
}
|
|
21451
21451
|
}), s.on("tap", function(M) {
|
|
21452
21452
|
if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
|
|
21453
|
-
var
|
|
21454
|
-
if (!(
|
|
21453
|
+
var H = u(s);
|
|
21454
|
+
if (!(H && !o(H.center))) {
|
|
21455
21455
|
var L = createEvent("gesture.tap", {
|
|
21456
21456
|
target: M.target,
|
|
21457
21457
|
pointerType: M.pointerType,
|
|
@@ -21492,8 +21492,8 @@ var BaseController = (
|
|
|
21492
21492
|
}
|
|
21493
21493
|
}
|
|
21494
21494
|
}), s.on("pinchstart pinch pinchend", function(M) {
|
|
21495
|
-
var
|
|
21496
|
-
if (!(
|
|
21495
|
+
var H = u(s);
|
|
21496
|
+
if (!(H && !o(H.center))) {
|
|
21497
21497
|
var L = createEvent("gesture.pinch", {
|
|
21498
21498
|
target: M.target,
|
|
21499
21499
|
pointerType: M.pointerType,
|
|
@@ -21534,8 +21534,8 @@ var BaseController = (
|
|
|
21534
21534
|
}
|
|
21535
21535
|
}), s.on("dbltap", function(M) {
|
|
21536
21536
|
if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
|
|
21537
|
-
var
|
|
21538
|
-
if (!(
|
|
21537
|
+
var H = u(s);
|
|
21538
|
+
if (!(H && !o(H.center))) {
|
|
21539
21539
|
var L = createEvent("gesture.dbltap", {
|
|
21540
21540
|
target: M.target,
|
|
21541
21541
|
pointerType: M.pointerType,
|
|
@@ -21576,18 +21576,18 @@ var BaseController = (
|
|
|
21576
21576
|
}
|
|
21577
21577
|
}
|
|
21578
21578
|
});
|
|
21579
|
-
var d = null, h = null, p = function(M,
|
|
21579
|
+
var d = null, h = null, p = function(M, H, L) {
|
|
21580
21580
|
var O = {
|
|
21581
21581
|
x: L.clientX,
|
|
21582
21582
|
y: L.clientY
|
|
21583
|
-
}, F = r.relativeClientPosition(O), N = r.createRaycasterFromCamera(F, r.camera), D = __assign(__assign({}, O), { coords: F, raycaster: N, buttons: L.buttons, delta: 0 }),
|
|
21583
|
+
}, F = r.relativeClientPosition(O), N = r.createRaycasterFromCamera(F, r.camera), D = __assign(__assign({}, O), { coords: F, raycaster: N, buttons: L.buttons, delta: 0 }), q = M === "pinchend" ? H : H - L.deltaY / 280, z = createEvent("gesture.pinch", {
|
|
21584
21584
|
target: L.target,
|
|
21585
21585
|
pointerType: "mouse",
|
|
21586
21586
|
srcEvent: L,
|
|
21587
21587
|
pointers: [__assign({}, D)],
|
|
21588
21588
|
isFirst: M === "pinchstart",
|
|
21589
21589
|
isFinal: M === "pinchend",
|
|
21590
|
-
scale: clamp$1(
|
|
21590
|
+
scale: clamp$1(q, 0.1, 10),
|
|
21591
21591
|
center: __assign({}, D),
|
|
21592
21592
|
velocityX: 0,
|
|
21593
21593
|
velocityY: 0,
|
|
@@ -21598,24 +21598,24 @@ var BaseController = (
|
|
|
21598
21598
|
});
|
|
21599
21599
|
return z;
|
|
21600
21600
|
}, m = function(M) {
|
|
21601
|
-
var
|
|
21601
|
+
var H, L = { x: M.clientX, y: M.clientY };
|
|
21602
21602
|
if (o(L)) {
|
|
21603
21603
|
if (M.preventDefault(), M.ctrlKey) {
|
|
21604
|
-
var O = (
|
|
21604
|
+
var O = (H = d == null ? void 0 : d.prevEvent.scale) !== null && H !== void 0 ? H : 1, F = p(d ? "pinch" : "pinchstart", O, M);
|
|
21605
21605
|
d === null ? d = {
|
|
21606
21606
|
firstEvent: F,
|
|
21607
21607
|
prevEvent: F
|
|
21608
21608
|
} : d.prevEvent = F, r.onPinchGesture(F), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
|
|
21609
|
-
var
|
|
21609
|
+
var V;
|
|
21610
21610
|
h = null;
|
|
21611
|
-
var
|
|
21612
|
-
d = null, r.onPinchGesture(
|
|
21611
|
+
var U = (V = d == null ? void 0 : d.prevEvent.scale) !== null && V !== void 0 ? V : 1, G = p("pinchend", U, M);
|
|
21612
|
+
d = null, r.onPinchGesture(G);
|
|
21613
21613
|
}, 200);
|
|
21614
21614
|
} else {
|
|
21615
|
-
var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0,
|
|
21615
|
+
var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, q = {
|
|
21616
21616
|
x: M.clientX,
|
|
21617
21617
|
y: M.clientY
|
|
21618
|
-
}, z = r.relativeClientPosition(
|
|
21618
|
+
}, z = r.relativeClientPosition(q), Q = r.createRaycasterFromCamera(z, r.camera), j = __assign(__assign({}, q), { coords: z, raycaster: Q, buttons: M.buttons, delta: N }), F = createEvent("gesture.mousewheel", {
|
|
21619
21619
|
target: M.target,
|
|
21620
21620
|
pointerType: "mouse",
|
|
21621
21621
|
srcEvent: M,
|
|
@@ -21634,7 +21634,7 @@ var BaseController = (
|
|
|
21634
21634
|
r.onMouseWheel(F), r.mouseWheelState && clearTimeout(r.mouseWheelState.timer), r.mouseWheelState = {
|
|
21635
21635
|
timer: setTimeout(function() {
|
|
21636
21636
|
r.mouseWheelState = void 0;
|
|
21637
|
-
var
|
|
21637
|
+
var U = createEvent("gesture.mousewheel", {
|
|
21638
21638
|
target: M.target,
|
|
21639
21639
|
pointerType: "mouse",
|
|
21640
21640
|
srcEvent: M,
|
|
@@ -21650,7 +21650,7 @@ var BaseController = (
|
|
|
21650
21650
|
userAction: !0,
|
|
21651
21651
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21652
21652
|
});
|
|
21653
|
-
r.onMouseWheel(
|
|
21653
|
+
r.onMouseWheel(U);
|
|
21654
21654
|
}, 100)
|
|
21655
21655
|
};
|
|
21656
21656
|
}
|
|
@@ -21662,8 +21662,8 @@ var BaseController = (
|
|
|
21662
21662
|
g();
|
|
21663
21663
|
return;
|
|
21664
21664
|
}
|
|
21665
|
-
var
|
|
21666
|
-
r.mouseMoveState || (
|
|
21665
|
+
var H = !1;
|
|
21666
|
+
r.mouseMoveState || (H = !0);
|
|
21667
21667
|
var L = {
|
|
21668
21668
|
x: M.clientX,
|
|
21669
21669
|
y: M.clientY
|
|
@@ -21672,7 +21672,7 @@ var BaseController = (
|
|
|
21672
21672
|
pointerType: "mouse",
|
|
21673
21673
|
srcEvent: M,
|
|
21674
21674
|
pointers: [__assign({}, N)],
|
|
21675
|
-
isFirst:
|
|
21675
|
+
isFirst: H,
|
|
21676
21676
|
isFinal: !1,
|
|
21677
21677
|
scale: 0,
|
|
21678
21678
|
center: __assign({}, N),
|
|
@@ -21699,13 +21699,13 @@ var BaseController = (
|
|
|
21699
21699
|
b();
|
|
21700
21700
|
return;
|
|
21701
21701
|
}
|
|
21702
|
-
var
|
|
21703
|
-
r.pressState || (
|
|
21702
|
+
var H = !1;
|
|
21703
|
+
r.pressState || (H = !0, r.pressState = {
|
|
21704
21704
|
event: M,
|
|
21705
21705
|
timeStamp: now(),
|
|
21706
21706
|
stop: noop
|
|
21707
21707
|
});
|
|
21708
|
-
var L = now() - r.pressState.timeStamp, O = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { isFirst:
|
|
21708
|
+
var L = now() - r.pressState.timeStamp, O = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { isFirst: H, isFinal: !1, center: __assign(__assign({}, r.pressState.event.center), { delta: L }), pointers: r.pressState.event.pointers.map(function(F) {
|
|
21709
21709
|
return __assign(__assign({}, F), { delta: L });
|
|
21710
21710
|
}) }));
|
|
21711
21711
|
r.onPressGesture(O), r.pressState && (r.pressState.stop = AnimationFrameLoop.shared.add(function(F) {
|
|
@@ -21713,10 +21713,10 @@ var BaseController = (
|
|
|
21713
21713
|
}, !0, 1));
|
|
21714
21714
|
}, v = function(M) {
|
|
21715
21715
|
if (b(), !(M.touches.length > 1 || M.changedTouches.length <= 0)) {
|
|
21716
|
-
var
|
|
21716
|
+
var H = {
|
|
21717
21717
|
x: M.changedTouches[0].clientX,
|
|
21718
21718
|
y: M.changedTouches[0].clientY
|
|
21719
|
-
}, L = r.relativeClientPosition(
|
|
21719
|
+
}, L = r.relativeClientPosition(H), O = r.createRaycasterFromCamera(L, r.camera), F = __assign(__assign({}, H), { coords: L, raycaster: O, buttons: 0, delta: 0 }), N = createEvent("gesture.press", {
|
|
21720
21720
|
target: M.target,
|
|
21721
21721
|
pointerType: "touch",
|
|
21722
21722
|
srcEvent: M,
|
|
@@ -21736,10 +21736,10 @@ var BaseController = (
|
|
|
21736
21736
|
}
|
|
21737
21737
|
}, E = function(M) {
|
|
21738
21738
|
b();
|
|
21739
|
-
var
|
|
21739
|
+
var H = {
|
|
21740
21740
|
x: M.clientX,
|
|
21741
21741
|
y: M.clientY
|
|
21742
|
-
}, L = r.relativeClientPosition(
|
|
21742
|
+
}, L = r.relativeClientPosition(H), O = r.createRaycasterFromCamera(L, r.camera), F = __assign(__assign({}, H), { coords: L, raycaster: O, buttons: M.buttons, delta: 0 }), N = createEvent("gesture.press", {
|
|
21743
21743
|
target: M.target,
|
|
21744
21744
|
pointerType: "mouse",
|
|
21745
21745
|
srcEvent: M,
|
|
@@ -21759,13 +21759,13 @@ var BaseController = (
|
|
|
21759
21759
|
}, b = function() {
|
|
21760
21760
|
var M;
|
|
21761
21761
|
if (r.pressState) {
|
|
21762
|
-
var
|
|
21763
|
-
return __assign(__assign({}, O), { delta:
|
|
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) {
|
|
21763
|
+
return __assign(__assign({}, O), { delta: H });
|
|
21764
21764
|
}) }));
|
|
21765
21765
|
r.onPressGesture(L), (M = r.pressState) === null || M === void 0 || M.stop(), r.pressState = void 0;
|
|
21766
21766
|
}
|
|
21767
21767
|
}, T = null, S = function(M) {
|
|
21768
|
-
var
|
|
21768
|
+
var H, L = !1, O = !1;
|
|
21769
21769
|
switch (M.type) {
|
|
21770
21770
|
case "gesturestart":
|
|
21771
21771
|
L = !0;
|
|
@@ -21777,15 +21777,15 @@ var BaseController = (
|
|
|
21777
21777
|
var F = {
|
|
21778
21778
|
x: M.clientX,
|
|
21779
21779
|
y: M.clientY
|
|
21780
|
-
}, N = r.relativeClientPosition(F), D = r.createRaycasterFromCamera(N, r.camera),
|
|
21780
|
+
}, N = r.relativeClientPosition(F), D = r.createRaycasterFromCamera(N, r.camera), q = __assign(__assign({}, F), { coords: N, raycaster: D, buttons: 0, delta: 0 }), z = createEvent("gesture.pinch", {
|
|
21781
21781
|
target: M.target,
|
|
21782
21782
|
pointerType: "mouse",
|
|
21783
21783
|
srcEvent: M,
|
|
21784
|
-
pointers: [__assign({},
|
|
21784
|
+
pointers: [__assign({}, q)],
|
|
21785
21785
|
isFirst: L,
|
|
21786
21786
|
isFinal: O,
|
|
21787
|
-
scale: (
|
|
21788
|
-
center: __assign({},
|
|
21787
|
+
scale: (H = M.scale) !== null && H !== void 0 ? H : 1,
|
|
21788
|
+
center: __assign({}, q),
|
|
21789
21789
|
velocityX: 0,
|
|
21790
21790
|
velocityY: 0,
|
|
21791
21791
|
overallVelocityX: 0,
|
|
@@ -21796,34 +21796,34 @@ var BaseController = (
|
|
|
21796
21796
|
return z;
|
|
21797
21797
|
}, R = function(M) {
|
|
21798
21798
|
if (M.preventDefault(), !isMobile) {
|
|
21799
|
-
var
|
|
21799
|
+
var H = S(M);
|
|
21800
21800
|
T = {
|
|
21801
|
-
firstEvent:
|
|
21801
|
+
firstEvent: H
|
|
21802
21802
|
};
|
|
21803
21803
|
var L = T.firstEvent;
|
|
21804
|
-
L && !o(L.center) || r.onPinchGesture(
|
|
21804
|
+
L && !o(L.center) || r.onPinchGesture(H);
|
|
21805
21805
|
}
|
|
21806
21806
|
}, w = function(M) {
|
|
21807
21807
|
if (M.preventDefault(), !isMobile && T) {
|
|
21808
|
-
var
|
|
21809
|
-
L && !o(L.center) || r.onPinchGesture(
|
|
21808
|
+
var H = S(M), L = T.firstEvent;
|
|
21809
|
+
L && !o(L.center) || r.onPinchGesture(H);
|
|
21810
21810
|
}
|
|
21811
21811
|
}, C = function(M) {
|
|
21812
21812
|
if (M.preventDefault(), !isMobile && T) {
|
|
21813
|
-
var
|
|
21814
|
-
T = null, !(L && !o(L.center)) && r.onPinchGesture(
|
|
21813
|
+
var H = S(M), L = T.firstEvent;
|
|
21814
|
+
T = 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") {
|
|
21818
|
-
var
|
|
21819
|
-
|
|
21818
|
+
var H = getSelection();
|
|
21819
|
+
H && H.focusNode && (H.removeAllRanges && H.removeAllRanges(), H.empty && H.empty());
|
|
21820
21820
|
}
|
|
21821
21821
|
};
|
|
21822
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", b, !1), e.addEventListener("touchcancel", b, !1), e.addEventListener("mousedown", E, !1), e.addEventListener("mouseup", b, !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
|
-
var
|
|
21823
|
+
var B = function() {
|
|
21824
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", b, !1), e.removeEventListener("touchcancel", b, !1), e.removeEventListener("mousedown", E, !1), e.removeEventListener("mouseup", b, !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
|
-
return Object.assign(
|
|
21826
|
+
return Object.assign(B, { element: e });
|
|
21827
21827
|
}, t;
|
|
21828
21828
|
})(Subscribe)
|
|
21829
21829
|
), sharedGeometry$2 = new THREE.CircleBufferGeometry(0.1, 16), vertexShader$3 = `
|
|
@@ -22944,34 +22944,34 @@ void main() {
|
|
|
22944
22944
|
var re = C.get(ee);
|
|
22945
22945
|
return re === void 0 && (re = ee.box.getCenter(scratchSortVector3).angleTo(R), C.set(ee, re)), te - re;
|
|
22946
22946
|
});
|
|
22947
|
-
var I = /* @__PURE__ */ new WeakSet(),
|
|
22948
|
-
if (
|
|
22947
|
+
var I = /* @__PURE__ */ new WeakSet(), B = this.observer.images.tiles;
|
|
22948
|
+
if (B)
|
|
22949
22949
|
for (var M = function(K) {
|
|
22950
|
-
var ee =
|
|
22950
|
+
var ee = B.find(function(ne) {
|
|
22951
22951
|
return ne.level === K.level;
|
|
22952
22952
|
});
|
|
22953
22953
|
if (!ee)
|
|
22954
22954
|
return "continue";
|
|
22955
22955
|
I.add(K);
|
|
22956
|
-
var te =
|
|
22956
|
+
var te = H.tileMeshes.get(K);
|
|
22957
22957
|
if (te) {
|
|
22958
|
-
te.appearDuration =
|
|
22958
|
+
te.appearDuration = H.appearDuration;
|
|
22959
22959
|
var re = te.updateTime(o);
|
|
22960
22960
|
return re && (r = !0), "continue";
|
|
22961
22961
|
}
|
|
22962
|
-
if (
|
|
22962
|
+
if (H.pedding >= H.maxRequest)
|
|
22963
22963
|
return "continue";
|
|
22964
22964
|
var ie = Math.pow(2, K.level) * K.position.y, ce = Math.pow(2, K.level) * K.position.x, ae = panoStringify({
|
|
22965
|
-
panoIndex:
|
|
22966
|
-
workCode:
|
|
22967
|
-
}), de = "".concat(ae, ".").concat(K.face, ".").concat(K.level, ".").concat(ie, ".").concat(ce), ge = ee.work.getURL(ee[K.face]), ye = ee.size, xe =
|
|
22965
|
+
panoIndex: H.observer.panoIndex,
|
|
22966
|
+
workCode: H.observer.work.workCode
|
|
22967
|
+
}), de = "".concat(ae, ".").concat(K.face, ".").concat(K.level, ".").concat(ie, ".").concat(ce), ge = ee.work.getURL(ee[K.face]), ye = ee.size, xe = H.imageOptions.transform, le = __assign(__assign({}, pick(H.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(de), size: ee.scale >= 1 ? void 0 : ye * K.size * ee.scale, cut: K.size === 1 ? void 0 : [
|
|
22968
22968
|
ye * K.position.x,
|
|
22969
22969
|
ye * K.position.y,
|
|
22970
22970
|
ye * K.size,
|
|
22971
22971
|
ye * K.size
|
|
22972
22972
|
] });
|
|
22973
|
-
K.level === 1 && ee.scale >= 0.5 && (le.format === "jpg" || /\.jpg$/.test(ge)) && (le.size = void 0, le.quality || (le.quality = 70)), K.size === 1 && console.warn("tile: ".concat(le.key, " should not appear.")),
|
|
22974
|
-
var he =
|
|
22973
|
+
K.level === 1 && ee.scale >= 0.5 && (le.format === "jpg" || /\.jpg$/.test(ge)) && (le.size = void 0, le.quality || (le.quality = 70)), K.size === 1 && console.warn("tile: ".concat(le.key, " should not appear.")), H.pedding++;
|
|
22974
|
+
var he = H.textureLoader.loadTexture(ge, {
|
|
22975
22975
|
imageURL: {
|
|
22976
22976
|
transform: xe,
|
|
22977
22977
|
options: le
|
|
@@ -22979,7 +22979,7 @@ void main() {
|
|
|
22979
22979
|
minFilter: THREE.LinearFilter,
|
|
22980
22980
|
magFilter: THREE.LinearFilter,
|
|
22981
22981
|
generateMipmaps: !1,
|
|
22982
|
-
fetcher: getFetcher(
|
|
22982
|
+
fetcher: getFetcher(H.observer.work)
|
|
22983
22983
|
}).then(function(ne) {
|
|
22984
22984
|
return ne.body;
|
|
22985
22985
|
});
|
|
@@ -22989,8 +22989,8 @@ void main() {
|
|
|
22989
22989
|
return e.pedding--, ne;
|
|
22990
22990
|
}, function(ne) {
|
|
22991
22991
|
return e.pedding--, Promise.reject(ne);
|
|
22992
|
-
}), te = new TileMesh(K, he), te.name = "tiling:tile-".concat(de), te.visible = !1, te.appearDuration =
|
|
22993
|
-
},
|
|
22992
|
+
}), te = new TileMesh(K, he), te.name = "tiling:tile-".concat(de), te.visible = !1, te.appearDuration = H.appearDuration, H.tileMeshes.set(K, te), H.scene.add(te), te.updateTime(o), r = !0;
|
|
22993
|
+
}, H = this, L = 0, O = w; L < O.length; L++) {
|
|
22994
22994
|
var F = O[L];
|
|
22995
22995
|
M(F);
|
|
22996
22996
|
}
|
|
@@ -23000,17 +23000,17 @@ void main() {
|
|
|
23000
23000
|
var te = ee.level >= m && ee.level <= A;
|
|
23001
23001
|
K.visible !== te && (K.visible = te, r = !0);
|
|
23002
23002
|
});
|
|
23003
|
-
for (var
|
|
23003
|
+
for (var q = D.sort(function(K, ee) {
|
|
23004
23004
|
return ee.activeTime - K.activeTime;
|
|
23005
|
-
}).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0,
|
|
23006
|
-
var j =
|
|
23005
|
+
}).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0, Q = q; z < Q.length; z++) {
|
|
23006
|
+
var j = Q[z];
|
|
23007
23007
|
this.tileMeshes.delete(j.node), this.scene.remove(j), j.dispose(), r = !0;
|
|
23008
23008
|
}
|
|
23009
23009
|
if (r) {
|
|
23010
|
-
var
|
|
23010
|
+
var V = l.getRenderTarget();
|
|
23011
23011
|
scratchPrevClearColor$1.copy(l.getClearColor());
|
|
23012
|
-
var
|
|
23013
|
-
l.autoClear = !0, l.autoClearColor = !0, l.autoClearDepth = !0, l.autoClearStencil = !0, l.clippingPlanes = clippingPlanes, l.setRenderTarget(this.renderTarget), l.setClearColor(clearColor$1, clearAlpha), l.render(this.scene, this.camera), l.setRenderTarget(
|
|
23012
|
+
var U = l.getClearAlpha(), G = l.autoClear, W = l.autoClearColor, X = l.autoClearDepth, Z = l.autoClearStencil, Y = l.clippingPlanes;
|
|
23013
|
+
l.autoClear = !0, l.autoClearColor = !0, l.autoClearDepth = !0, l.autoClearStencil = !0, l.clippingPlanes = clippingPlanes, l.setRenderTarget(this.renderTarget), l.setClearColor(clearColor$1, clearAlpha), l.render(this.scene, this.camera), l.setRenderTarget(V), l.setClearColor(scratchPrevClearColor$1, U), l.autoClear = G, l.autoClearColor = W, l.autoClearDepth = X, l.autoClearStencil = Z, l.clippingPlanes = Y;
|
|
23014
23014
|
}
|
|
23015
23015
|
return this.forceRenderWhenNextUpdate = !1, r;
|
|
23016
23016
|
}, n;
|
|
@@ -23301,39 +23301,39 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23301
23301
|
var w = new THREE.Vector3().copy(E.position), C = new THREE.Vector3().copy(b.position), I = this.locationMotion.value.count - v.value.count + 1;
|
|
23302
23302
|
if (h.progress = I, b.panoPicture && (I < 1 ? E.panoPicture && (h.pano0 = E.panoPicture) : h.pano0 = b.panoPicture, h.pano1 = b.panoPicture), b.effect === "montage" ? h.transition = "BLACK" : b.effect === "spread" ? h.transition = "SPREAD" : h.transition = "FADE", (b.effect === "zoomin" || b.effect === "zoomout") && (h.progress = Math.pow(I, 3)), I < 1 && b.effect !== "fly") {
|
|
23303
23303
|
if (h.pano0 && E.panoPicture) {
|
|
23304
|
-
var
|
|
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
23309
|
matrix: E.panoPicture.matrix.clone().premultiply(E.fixCameraTransform).setPosition(b.position)
|
|
23310
23310
|
}, M = this.panoPictureObserverMap.get(h.pano0);
|
|
23311
|
-
M && this.panoPictureObserverMap.set(
|
|
23311
|
+
M && this.panoPictureObserverMap.set(B, M), h.pano0 = B;
|
|
23312
23312
|
}
|
|
23313
23313
|
w.copy(C), R = !0;
|
|
23314
23314
|
}
|
|
23315
23315
|
p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(w.x + (C.x - w.x) * I, w.y + (C.y - w.y) * I, w.z + (C.z - w.z) * I);
|
|
23316
|
-
for (var
|
|
23317
|
-
var N = F[O], D = N.key,
|
|
23318
|
-
D !== void 0 && (
|
|
23316
|
+
for (var H = [], L = [], O = 0, F = this.locationMotion.keyframes; O < F.length; O++) {
|
|
23317
|
+
var N = F[O], D = N.key, q = N.progress;
|
|
23318
|
+
D !== void 0 && (H.push(D), q > this.locationMotion.progress && L.push(D));
|
|
23319
23319
|
}
|
|
23320
|
-
for (var z = 0,
|
|
23321
|
-
var j =
|
|
23320
|
+
for (var z = 0, Q = Object.keys(this.panoResources); z < Q.length; z++) {
|
|
23321
|
+
var j = Q[z];
|
|
23322
23322
|
if (!(L.indexOf(j) >= 0)) {
|
|
23323
|
-
var
|
|
23324
|
-
if (
|
|
23325
|
-
var
|
|
23326
|
-
if (
|
|
23327
|
-
if (
|
|
23323
|
+
var V = this.panoResources[j];
|
|
23324
|
+
if (V.panoPicture) {
|
|
23325
|
+
var U = V.panoPicture.map;
|
|
23326
|
+
if (U) {
|
|
23327
|
+
if (U === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || U === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
|
|
23328
23328
|
continue;
|
|
23329
|
-
|
|
23329
|
+
U.dispose(), V.panoPicture = null;
|
|
23330
23330
|
}
|
|
23331
23331
|
}
|
|
23332
|
-
|
|
23332
|
+
H.indexOf(j) >= 0 || delete this.panoResources[j];
|
|
23333
23333
|
}
|
|
23334
23334
|
}
|
|
23335
|
-
var
|
|
23336
|
-
|
|
23335
|
+
var G = panoParse(b.panoId);
|
|
23336
|
+
G !== this.currentPano && (this.currentPano = G, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
|
|
23337
23337
|
userAction: this.userAction,
|
|
23338
23338
|
prevPano: panoParse(T.panoId),
|
|
23339
23339
|
state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
|
|
@@ -23616,7 +23616,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23616
23616
|
w.dispose();
|
|
23617
23617
|
else {
|
|
23618
23618
|
w.name = A;
|
|
23619
|
-
var C = Array.isArray(w.image) ? w.image[0] : w.image, I = (R = C == null ? void 0 : C.width) !== null && R !== void 0 ? R : 2048,
|
|
23619
|
+
var C = Array.isArray(w.image) ? w.image[0] : w.image, I = (R = C == null ? void 0 : C.width) !== null && R !== void 0 ? R : 2048, B = {
|
|
23620
23620
|
panoId: f,
|
|
23621
23621
|
effect: c,
|
|
23622
23622
|
panoPicture: {
|
|
@@ -23629,7 +23629,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23629
23629
|
position: d.position.clone().applyMatrix4(d.work.transform),
|
|
23630
23630
|
fixCameraTransform: new THREE.Matrix4()
|
|
23631
23631
|
};
|
|
23632
|
-
|
|
23632
|
+
B.panoPicture && s.panoPictureObserverMap.set(B.panoPicture, d), s.doMoveToPano(e, B, r);
|
|
23633
23633
|
}
|
|
23634
23634
|
},
|
|
23635
23635
|
onError: function(S) {
|
|
@@ -23754,44 +23754,44 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23754
23754
|
if (this.locationMotion.ended) {
|
|
23755
23755
|
var w = this.locationMotion.getKeyFrameSegment(v);
|
|
23756
23756
|
w[0];
|
|
23757
|
-
var C = w[1], I = this.locationMotion.value,
|
|
23758
|
-
T = Math.max(
|
|
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
|
+
T = Math.max(B.distanceTo(M), b), 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
|
|
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), b) * F, D = Math.max(B.distanceTo(M), b);
|
|
23764
23764
|
T = N + D, S = [
|
|
23765
23765
|
{ key: L.key, progress: 0, value: __assign({}, I) },
|
|
23766
23766
|
{ key: C.key, progress: N / T, value: C.value },
|
|
23767
23767
|
{ key: E, progress: 1, value: { count: C.value.count + 1, distance: 0 } }
|
|
23768
23768
|
];
|
|
23769
|
-
var
|
|
23770
|
-
|
|
23769
|
+
var q = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
|
|
23770
|
+
q === 0 || q === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * q / z;
|
|
23771
23771
|
}
|
|
23772
|
-
var
|
|
23772
|
+
var Q = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), j = {
|
|
23773
23773
|
longitude: o.longitude,
|
|
23774
23774
|
latitude: o.latitude,
|
|
23775
23775
|
fov: o.fov
|
|
23776
|
-
},
|
|
23776
|
+
}, V = __assign(__assign({}, e), { mode: this.mode, longitude: (l = j.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = j.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = j.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), U = this.currentPano;
|
|
23777
23777
|
if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
23778
23778
|
options: o,
|
|
23779
|
-
prevPano:
|
|
23779
|
+
prevPano: U,
|
|
23780
23780
|
progress: 0,
|
|
23781
|
-
state:
|
|
23781
|
+
state: V,
|
|
23782
23782
|
userAction: this.userAction,
|
|
23783
23783
|
error: null
|
|
23784
|
-
})), o.moveStartCallback && o.moveStartCallback(
|
|
23785
|
-
this.cameraMotion.set(j,
|
|
23784
|
+
})), o.moveStartCallback && o.moveStartCallback(V), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
|
|
23785
|
+
this.cameraMotion.set(j, Q).catch(noop);
|
|
23786
23786
|
else {
|
|
23787
|
-
var
|
|
23787
|
+
var G = coordinatesToVector({
|
|
23788
23788
|
longitude: this.cameraMotion.value.longitude,
|
|
23789
23789
|
latitude: this.cameraMotion.value.latitude
|
|
23790
23790
|
}), W = coordinatesToVector({
|
|
23791
23791
|
longitude: (d = j.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
|
|
23792
23792
|
latitude: (h = j.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
|
|
23793
23793
|
}), X = new THREE.Object3D();
|
|
23794
|
-
X.lookAt(
|
|
23794
|
+
X.lookAt(G);
|
|
23795
23795
|
var Z = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion);
|
|
23796
23796
|
X.lookAt(W);
|
|
23797
23797
|
var Y = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion), K = new THREE.Matrix4().getInverse(Z).premultiply(Y), ee = this.cameraMotion.value.fov, te = (p = j.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, re = 1;
|
|
@@ -23828,9 +23828,9 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23828
23828
|
fov: te
|
|
23829
23829
|
}
|
|
23830
23830
|
}
|
|
23831
|
-
],
|
|
23831
|
+
], Q).catch(noop);
|
|
23832
23832
|
}
|
|
23833
|
-
var ge = this.locationMotion.setKeyframes(S,
|
|
23833
|
+
var ge = this.locationMotion.setKeyframes(S, Q, R);
|
|
23834
23834
|
ge.then(
|
|
23835
23835
|
// resolve
|
|
23836
23836
|
// 动画结束
|
|
@@ -23842,7 +23842,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23842
23842
|
var he = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: s.camera.pose.distance });
|
|
23843
23843
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
23844
23844
|
options: o,
|
|
23845
|
-
prevPano:
|
|
23845
|
+
prevPano: U,
|
|
23846
23846
|
progress: 1,
|
|
23847
23847
|
state: he,
|
|
23848
23848
|
userAction: s.userAction,
|
|
@@ -23876,9 +23876,9 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23876
23876
|
function() {
|
|
23877
23877
|
s.emit("pano.cancel", createEvent("pano.cancel", {
|
|
23878
23878
|
options: o,
|
|
23879
|
-
prevPano:
|
|
23879
|
+
prevPano: U,
|
|
23880
23880
|
progress: 0,
|
|
23881
|
-
state:
|
|
23881
|
+
state: V,
|
|
23882
23882
|
userAction: s.userAction,
|
|
23883
23883
|
error: null
|
|
23884
23884
|
})), o.moveCancelCallback && o.moveCancelCallback();
|
|
@@ -23900,19 +23900,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23900
23900
|
var h = this.modelScene.intersectRaycaster(u)[0], p = h ? h.point : u.ray.origin.clone().add(u.ray.direction.clone().normalize().multiplyScalar(3)), m = p.clone().sub(l).normalize();
|
|
23901
23901
|
if (m.length() === 0)
|
|
23902
23902
|
return null;
|
|
23903
|
-
var A = s.work.observers, g = s.accessibleNodes.filter(function(
|
|
23904
|
-
if (
|
|
23903
|
+
var A = s.work.observers, g = s.accessibleNodes.filter(function(q) {
|
|
23904
|
+
if (q === o.currentPano.panoIndex && s.work.workCode === o.currentPano.workCode)
|
|
23905
23905
|
return !1;
|
|
23906
|
-
var
|
|
23907
|
-
if (!
|
|
23906
|
+
var z = A[q];
|
|
23907
|
+
if (!z)
|
|
23908
23908
|
return !1;
|
|
23909
|
-
var
|
|
23910
|
-
return Math.abs(
|
|
23911
|
-
}), y = /* @__PURE__ */ new Map(), v = g.slice().sort(function(
|
|
23912
|
-
var
|
|
23913
|
-
typeof
|
|
23914
|
-
var
|
|
23915
|
-
return typeof
|
|
23909
|
+
var Q = z.standingPosition.clone().applyMatrix4(z.work.transform).project(e);
|
|
23910
|
+
return Math.abs(Q.z) > 1 || Math.abs(Q.x) > 1 || Math.abs(Q.y) > 1 ? !1 : z.loadable || z.active;
|
|
23911
|
+
}), y = /* @__PURE__ */ new Map(), v = g.slice().sort(function(q, z) {
|
|
23912
|
+
var Q = A[q], j = y.get(Q);
|
|
23913
|
+
typeof j == "undefined" && (j = scratchVector3$3.copy(Q.standingPosition).applyMatrix4(Q.work.transform).distanceTo(l), y.set(Q, j));
|
|
23914
|
+
var V = A[z], U = y.get(V);
|
|
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
23918
|
for (var E = 0, b = [Math.PI / 8, Math.PI / 6, Math.PI / 4, Math.PI / 3]; E < b.length; E++)
|
|
@@ -23924,13 +23924,40 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23924
23924
|
return C;
|
|
23925
23925
|
}
|
|
23926
23926
|
}
|
|
23927
|
-
var
|
|
23928
|
-
|
|
23929
|
-
|
|
23930
|
-
|
|
23931
|
-
|
|
23932
|
-
|
|
23933
|
-
|
|
23927
|
+
var B = null;
|
|
23928
|
+
if (r) {
|
|
23929
|
+
var M = r.ray.intersectBox(this.modelScene.boundingBox, scratchVector3$3);
|
|
23930
|
+
M && (M.project(e), Math.abs(M.z) <= 1 && (B = M.clone()));
|
|
23931
|
+
} else
|
|
23932
|
+
B = new THREE.Vector3(0, 0, 0);
|
|
23933
|
+
if (B) {
|
|
23934
|
+
var H = 0.4, L = s.accessibleNodes.filter(function(q) {
|
|
23935
|
+
if (q === o.currentPano.panoIndex && s.work.workCode === o.currentPano.workCode)
|
|
23936
|
+
return !1;
|
|
23937
|
+
var z = A[q];
|
|
23938
|
+
if (!z)
|
|
23939
|
+
return !1;
|
|
23940
|
+
var Q = z.position.clone().applyMatrix4(z.work.transform).project(e);
|
|
23941
|
+
return Math.abs(Q.z) > 1 || Math.abs(Q.x) > 1 || Math.abs(Q.y) > 1 ? !1 : z.loadable || z.active;
|
|
23942
|
+
}), O = /* @__PURE__ */ new Map(), F = L.slice().sort(function(q, z) {
|
|
23943
|
+
var Q = A[q], j = O.get(Q);
|
|
23944
|
+
typeof j == "undefined" && (j = scratchVector3$3.copy(Q.position).applyMatrix4(Q.work.transform).distanceTo(e.position), O.set(Q, j));
|
|
23945
|
+
var V = A[z], U = O.get(V);
|
|
23946
|
+
return typeof U == "undefined" && (U = scratchVector3$3.copy(V.position).applyMatrix4(V.work.transform).distanceTo(e.position), O.set(V, U)), j - U;
|
|
23947
|
+
});
|
|
23948
|
+
O.clear();
|
|
23949
|
+
for (var N = 0, D = F; N < D.length; N++) {
|
|
23950
|
+
var w = D[N], C = A[w];
|
|
23951
|
+
if (C) {
|
|
23952
|
+
var M = scratchVector3$3.copy(C.position).applyMatrix4(C.work.transform);
|
|
23953
|
+
if (M.project(e), Math.abs(M.z) > 1)
|
|
23954
|
+
continue;
|
|
23955
|
+
if (Math.pow(B.x - M.x, 2) + Math.pow(B.y - M.y, 2) < Math.pow(H, 2))
|
|
23956
|
+
return C;
|
|
23957
|
+
}
|
|
23958
|
+
}
|
|
23959
|
+
}
|
|
23960
|
+
return null;
|
|
23934
23961
|
}, t.prototype.onTapGesture = function(e) {
|
|
23935
23962
|
var r = this, o;
|
|
23936
23963
|
if (this.userAction = e.userAction, this.stopMomentumMovement(), !!this.initAnimationed) {
|
|
@@ -23938,21 +23965,21 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23938
23965
|
s.floorIndex = -1;
|
|
23939
23966
|
var u = this.camera.getDirection(new THREE.Vector3()).setY(0), l = null, c = this.works.getObserver(this.currentPano);
|
|
23940
23967
|
if (c) {
|
|
23941
|
-
var f = c.work.observers, d = c.accessibleNodes.filter(function(
|
|
23942
|
-
if (
|
|
23968
|
+
var f = c.work.observers, d = c.accessibleNodes.filter(function(U) {
|
|
23969
|
+
if (U === r.currentPano.panoIndex && c.work.workCode === r.currentPano.workCode)
|
|
23943
23970
|
return !1;
|
|
23944
|
-
var
|
|
23945
|
-
if (!
|
|
23971
|
+
var G = f[U];
|
|
23972
|
+
if (!G)
|
|
23946
23973
|
return !1;
|
|
23947
|
-
var W = scratchVector3$3.copy(
|
|
23948
|
-
return W.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 :
|
|
23974
|
+
var W = scratchVector3$3.copy(G.position).applyMatrix4(G.work.transform);
|
|
23975
|
+
return W.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : G.loadable || G.active;
|
|
23949
23976
|
}), h = this.modelScene.intersectRaycaster(s)[0];
|
|
23950
23977
|
if (h) {
|
|
23951
|
-
var p = arrayMin(d, function(
|
|
23952
|
-
var
|
|
23953
|
-
if (!
|
|
23978
|
+
var p = arrayMin(d, function(U) {
|
|
23979
|
+
var G = f[U];
|
|
23980
|
+
if (!G)
|
|
23954
23981
|
return 1 / 0;
|
|
23955
|
-
var W = scratchVector3$3.copy(
|
|
23982
|
+
var W = scratchVector3$3.copy(G.standingPosition).applyMatrix4(G.work.transform);
|
|
23956
23983
|
return W.distanceTo(h.point);
|
|
23957
23984
|
}, !0), m = p[0], A = p[1];
|
|
23958
23985
|
typeof m == "number" && A < this.panoTapTriggerRadius && (l = (o = f[m]) !== null && o !== void 0 ? o : null);
|
|
@@ -23968,28 +23995,28 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23968
23995
|
if (!l)
|
|
23969
23996
|
this.emit("gesture.tap", e), e.defaultPrevented || this.locationMotion.ended === !0 && this.cameraBounce();
|
|
23970
23997
|
else {
|
|
23971
|
-
for (var b = {}, T = 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 = [],
|
|
23972
|
-
var m =
|
|
23998
|
+
for (var b = {}, T = 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
|
+
var m = H[M];
|
|
23973
24000
|
if (l.panoIndex !== m && !(m === this.currentPano.panoIndex && l.work.workCode === this.currentPano.workCode)) {
|
|
23974
|
-
var L =
|
|
24001
|
+
var L = B[m];
|
|
23975
24002
|
if (L) {
|
|
23976
24003
|
var O = L.position.clone().applyMatrix4(L.work.transform).sub(l.position.clone().applyMatrix4(l.work.transform)).setY(0).normalize();
|
|
23977
24004
|
R.angleTo(O) < T && I.push(O);
|
|
23978
24005
|
}
|
|
23979
24006
|
}
|
|
23980
24007
|
}
|
|
23981
|
-
var F = I.length > 0 ? I : __spreadArray(__spreadArray([], w, !0), C, !0), N = F.slice().sort(function(
|
|
23982
|
-
return
|
|
24008
|
+
var F = I.length > 0 ? I : __spreadArray(__spreadArray([], w, !0), C, !0), N = F.slice().sort(function(U, G) {
|
|
24009
|
+
return U.angleTo(R) - G.angleTo(R);
|
|
23983
24010
|
})[0];
|
|
23984
24011
|
if (N && N.angleTo(u) > S && (b.longitude = Math.atan2(-N.x, -N.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
|
|
23985
|
-
var D = e.state.fov,
|
|
23986
|
-
b.latitude = clamp$1(0,
|
|
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
|
+
b.latitude = clamp$1(0, q, z);
|
|
23987
24014
|
}
|
|
23988
|
-
var
|
|
23989
|
-
if (
|
|
24015
|
+
var Q = __assign({}, e.state);
|
|
24016
|
+
if (Q.workCode = l.work.workCode, Q.panoIndex = l.panoIndex, b.longitude !== void 0 && (Q.longitude = b.longitude), b.latitude !== void 0 && (Q.latitude = b.latitude), b.fov !== void 0 && (Q.fov = b.fov), Q.distance = 0, Q.offset = l.position.clone(), e.state = Q, this.emit("gesture.tap", e), !e.defaultPrevented) {
|
|
23990
24017
|
if (this.emit("pano.select", createEvent("pano.select", {
|
|
23991
24018
|
prevPano: this.currentPano,
|
|
23992
|
-
state:
|
|
24019
|
+
state: Q,
|
|
23993
24020
|
userAction: e.userAction,
|
|
23994
24021
|
options: b,
|
|
23995
24022
|
progress: 0,
|
|
@@ -23998,14 +24025,14 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23998
24025
|
var j = panoStringify({
|
|
23999
24026
|
panoIndex: l.panoIndex,
|
|
24000
24027
|
workCode: l.work.workCode
|
|
24001
|
-
}),
|
|
24002
|
-
|
|
24028
|
+
}), V = this.panoMeshes.get(j);
|
|
24029
|
+
V && (V.setDisabled(!1), V.setLoading(!0));
|
|
24003
24030
|
}
|
|
24004
24031
|
l && l.active && this.emit("pano.request", createEvent("pano.request", {
|
|
24005
24032
|
userAction: e.userAction,
|
|
24006
24033
|
prevPano: this.currentPano,
|
|
24007
24034
|
progress: 0,
|
|
24008
|
-
state:
|
|
24035
|
+
state: Q,
|
|
24009
24036
|
options: b,
|
|
24010
24037
|
error: null
|
|
24011
24038
|
}));
|
|
@@ -24101,8 +24128,8 @@ var updateEyeViewMatrices = /* @__PURE__ */ (function() {
|
|
|
24101
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], b = o[10], T = 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] = b, r[11] = T, 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 + b * c + o[14], r[15] = p * u + y * l + T * c + o[15]), r;
|
|
24102
24129
|
}
|
|
24103
24130
|
function e(r, o) {
|
|
24104
|
-
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], b = o[14], T = 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,
|
|
24105
|
-
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 *
|
|
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], b = o[14], T = 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 * b - g * v, L = m * T - y * v, O = A * b - g * E, F = A * T - y * E, N = g * T - y * b, 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 - b * I + T * 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] = (b * w - v * B - T * 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 + T * 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 - b * S) * D, r[15] = (m * C - A * R + g * S) * D, r) : null;
|
|
24106
24133
|
}
|
|
24107
24134
|
return function(r, o, s) {
|
|
24108
24135
|
n(r, o), s && t(r, r, s), e(r, r);
|
|
@@ -24913,28 +24940,28 @@ void main() {
|
|
|
24913
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), b = this.panoResourceFromLocationMotionKeyframe(v), T = this.panoResourceFromLocationMotionKeyframe(m), S = this.panoResourceFromLocationMotionKeyframe(A), R = !1;
|
|
24914
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) {
|
|
24915
24942
|
this.locationMotion.update(e);
|
|
24916
|
-
var w = this.locationMotion.getKeyFrameSegment(e), C = w[0], I = w[1],
|
|
24917
|
-
if (h.progress = O, M.panoPicture && (O < 1 ?
|
|
24918
|
-
if (h.pano0 &&
|
|
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;
|
|
24944
|
+
if (h.progress = O, M.panoPicture && (O < 1 ? B.panoPicture && (h.pano0 = B.panoPicture) : h.pano0 = M.panoPicture, h.pano1 = M.panoPicture), M.effect === "montage" ? h.transition = "BLACK" : M.effect === "spread" ? h.transition = "SPREAD" : h.transition = "FADE", (M.effect === "zoomin" || M.effect === "zoomout") && (h.progress = Math.pow(O, 3)), O < 1 && M.effect !== "fly") {
|
|
24945
|
+
if (h.pano0 && B.panoPicture) {
|
|
24919
24946
|
var F = {
|
|
24920
24947
|
panoId: h.pano0.panoId,
|
|
24921
24948
|
map: h.pano0.map,
|
|
24922
24949
|
mapSize: h.pano0.mapSize,
|
|
24923
24950
|
zoom: h.pano0.zoom,
|
|
24924
|
-
matrix:
|
|
24951
|
+
matrix: B.panoPicture.matrix.clone().setPosition(M.position)
|
|
24925
24952
|
}, N = this.panoPictureObserverMap.get(h.pano0);
|
|
24926
24953
|
N && this.panoPictureObserverMap.set(F, N), h.pano0 = F;
|
|
24927
24954
|
}
|
|
24928
|
-
|
|
24955
|
+
H.copy(L), R = !0;
|
|
24929
24956
|
}
|
|
24930
|
-
p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(
|
|
24931
|
-
for (var D = [],
|
|
24932
|
-
var j =
|
|
24933
|
-
|
|
24957
|
+
p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(H.x + (L.x - H.x) * O, H.y + (L.y - H.y) * O, H.z + (L.z - H.z) * O);
|
|
24958
|
+
for (var D = [], q = [], z = 0, Q = this.locationMotion.keyframes; z < Q.length; z++) {
|
|
24959
|
+
var j = Q[z], V = j.key, U = j.progress;
|
|
24960
|
+
V !== void 0 && (D.push(V), U > this.locationMotion.progress && q.push(V));
|
|
24934
24961
|
}
|
|
24935
|
-
for (var
|
|
24936
|
-
var X = W[
|
|
24937
|
-
if (!(
|
|
24962
|
+
for (var G = 0, W = Object.keys(this.panoResources); G < W.length; G++) {
|
|
24963
|
+
var X = W[G];
|
|
24964
|
+
if (!(q.indexOf(X) >= 0)) {
|
|
24938
24965
|
var Z = this.panoResources[X];
|
|
24939
24966
|
if (Z.panoPicture) {
|
|
24940
24967
|
var Y = Z.panoPicture.map;
|
|
@@ -25265,8 +25292,8 @@ void main() {
|
|
|
25265
25292
|
if (this.perspToOrthoMotion.ended || (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), !this.locationMotion.ended) {
|
|
25266
25293
|
this.locationMotion.update(e), s.distance = this.locationMotion.value.distance, s.offset = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z);
|
|
25267
25294
|
for (var f = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z), d = [], h = function(S) {
|
|
25268
|
-
var R = p.modelScene.models.find(function(
|
|
25269
|
-
return
|
|
25295
|
+
var R = p.modelScene.models.find(function(B) {
|
|
25296
|
+
return B.work === S;
|
|
25270
25297
|
});
|
|
25271
25298
|
if (!R || R.visible === !1 || S.observers.length <= 0)
|
|
25272
25299
|
return "continue";
|
|
@@ -25358,65 +25385,65 @@ void main() {
|
|
|
25358
25385
|
y: e.y,
|
|
25359
25386
|
z: e.z,
|
|
25360
25387
|
distance: 0
|
|
25361
|
-
},
|
|
25388
|
+
}, B = {
|
|
25362
25389
|
longitude: r.longitude,
|
|
25363
25390
|
latitude: r.latitude,
|
|
25364
25391
|
fov: r.fov
|
|
25365
|
-
}, M = [],
|
|
25366
|
-
var
|
|
25392
|
+
}, M = [], H = function(j) {
|
|
25393
|
+
var V = L.modelScene.models.find(function(X) {
|
|
25367
25394
|
return X.work === j;
|
|
25368
25395
|
});
|
|
25369
|
-
if (!
|
|
25396
|
+
if (!V || V.visible === !1 || j.observers.length <= 0)
|
|
25370
25397
|
return "continue";
|
|
25371
25398
|
if (scratchObserverBox$1.copy(j.observerBox).expandByScalar(10).applyMatrix4(j.transform), scratchObserverBox$1.containsPoint(d))
|
|
25372
|
-
for (var
|
|
25373
|
-
var W =
|
|
25399
|
+
for (var U = 0, G = j.observers; U < G.length; U++) {
|
|
25400
|
+
var W = G[U];
|
|
25374
25401
|
M.push(W);
|
|
25375
25402
|
}
|
|
25376
25403
|
}, L = this, O = 0, F = this.works; O < F.length; O++) {
|
|
25377
25404
|
var N = F[O];
|
|
25378
|
-
|
|
25405
|
+
H(N);
|
|
25379
25406
|
}
|
|
25380
25407
|
var D = arrayMin(M, function(j) {
|
|
25381
25408
|
return scratchVector3$2.copy(j.position).applyMatrix4(j.work.transform).distanceTo(d);
|
|
25382
|
-
}),
|
|
25409
|
+
}), q = D ? {
|
|
25383
25410
|
workCode: D.work.workCode,
|
|
25384
25411
|
panoIndex: D.panoIndex
|
|
25385
25412
|
} : {
|
|
25386
25413
|
workCode: "",
|
|
25387
25414
|
panoIndex: 0
|
|
25388
|
-
}, z = __assign(__assign({},
|
|
25415
|
+
}, z = __assign(__assign({}, q), { mode: this.mode, longitude: (u = B.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = B.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = B.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), Q = this.currentPano;
|
|
25389
25416
|
this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
25390
25417
|
options: r,
|
|
25391
|
-
prevPano:
|
|
25418
|
+
prevPano: Q,
|
|
25392
25419
|
progress: 0,
|
|
25393
25420
|
state: z,
|
|
25394
25421
|
userAction: this.userAction,
|
|
25395
25422
|
error: null
|
|
25396
|
-
})), r.moveStartCallback && r.moveStartCallback(z), this.cameraMotion.set(
|
|
25423
|
+
})), r.moveStartCallback && r.moveStartCallback(z), this.cameraMotion.set(B, C).catch(noop), this.locationMotion.set(I, C, w).then(
|
|
25397
25424
|
// resolve
|
|
25398
25425
|
// 动画结束
|
|
25399
25426
|
function() {
|
|
25400
|
-
for (var j = 0,
|
|
25401
|
-
var
|
|
25402
|
-
|
|
25427
|
+
for (var j = 0, V = s.modelScene.children; j < V.length; j++) {
|
|
25428
|
+
var U = V[j];
|
|
25429
|
+
U instanceof Model && U.show();
|
|
25403
25430
|
}
|
|
25404
|
-
var
|
|
25431
|
+
var G = __assign(__assign(__assign({}, q), { mode: s.mode }), clonePose(s.camera.pose));
|
|
25405
25432
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
25406
25433
|
options: r,
|
|
25407
|
-
prevPano:
|
|
25434
|
+
prevPano: Q,
|
|
25408
25435
|
progress: 0,
|
|
25409
|
-
state:
|
|
25436
|
+
state: G,
|
|
25410
25437
|
userAction: s.userAction,
|
|
25411
25438
|
error: null
|
|
25412
|
-
})), r.moveEndCallback && r.moveEndCallback(
|
|
25439
|
+
})), r.moveEndCallback && r.moveEndCallback(G);
|
|
25413
25440
|
},
|
|
25414
25441
|
// reject
|
|
25415
25442
|
// 动画被取消
|
|
25416
25443
|
function() {
|
|
25417
25444
|
r.moveCancelCallback && r.moveCancelCallback(), s.emit("pano.cancel", createEvent("pano.cancel", {
|
|
25418
25445
|
options: r,
|
|
25419
|
-
prevPano:
|
|
25446
|
+
prevPano: Q,
|
|
25420
25447
|
progress: 0,
|
|
25421
25448
|
state: z,
|
|
25422
25449
|
userAction: s.userAction,
|
|
@@ -25805,8 +25832,8 @@ void main() {
|
|
|
25805
25832
|
y: C.offset.y,
|
|
25806
25833
|
z: C.offset.z
|
|
25807
25834
|
}, 0).catch(noop)), e.isFinal) {
|
|
25808
|
-
var I = this.renderer.getSize(new THREE.Vector2()),
|
|
25809
|
-
|
|
25835
|
+
var I = this.renderer.getSize(new THREE.Vector2()), B = 2 * e.velocityX * b / I.y, M = 2 * e.velocityY * b / I.y, H = new THREE.Vector3(), L = new THREE.Vector3();
|
|
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 = {
|
|
25810
25837
|
uuid: createUuid()
|
|
25811
25838
|
}, this.requestMomentumMovement(e, !0, { longitude: 0, latitude: 0, x: L.x, y: L.y, z: L.z }, 0);
|
|
25812
25839
|
}
|
|
@@ -25814,7 +25841,7 @@ void main() {
|
|
|
25814
25841
|
var y = {
|
|
25815
25842
|
x: e.center.x - o.x,
|
|
25816
25843
|
y: e.center.y - o.y
|
|
25817
|
-
}, O = this.coordinatesForOffset(y), F = formatRad$1(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2),
|
|
25844
|
+
}, O = this.coordinatesForOffset(y), F = formatRad$1(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), q = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(this.cameraMotion.value.latitude + O.latitude, D, q);
|
|
25818
25845
|
this.camera.aspect < 1 && Math.abs(e.overallVelocityX) > 0.2 && Math.atan2(Math.abs(e.overallVelocityY), Math.abs(e.overallVelocityX)) < Math.PI / 6.923 && (z = this.cameraMotion.value.latitude);
|
|
25819
25846
|
var C = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: F, latitude: z, fov: N, offset: this.camera.pose.offset, distance: this.camera.pose.distance });
|
|
25820
25847
|
if (e.isFinal && Object.assign(e, { __fixFinalState: !0 }), e.state = C, this.emit("gesture.pan", e), e.defaultPrevented)
|
|
@@ -25828,10 +25855,10 @@ void main() {
|
|
|
25828
25855
|
longitude: C.longitude,
|
|
25829
25856
|
latitude: C.latitude
|
|
25830
25857
|
}, 0).catch(noop), e.isFinal) {
|
|
25831
|
-
var
|
|
25858
|
+
var Q = e.velocityX, j = e.velocityY;
|
|
25832
25859
|
this.inMomentumMovement = {
|
|
25833
25860
|
uuid: createUuid()
|
|
25834
|
-
}, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x:
|
|
25861
|
+
}, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: Q, y: j })), { x: 0, y: 0, z: 0 }), 0);
|
|
25835
25862
|
}
|
|
25836
25863
|
}
|
|
25837
25864
|
}
|
|
@@ -26595,8 +26622,8 @@ var LineSegments2 = (
|
|
|
26595
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;
|
|
26596
26623
|
var I = E.closestPointToPointParameter(y, !0);
|
|
26597
26624
|
E.at(I, b);
|
|
26598
|
-
var
|
|
26599
|
-
if (M &&
|
|
26625
|
+
var B = THREE.MathUtils.lerp(m.z, A.z, I), M = B >= -1 && B <= 1, H = y.distanceTo(b) < d * 0.5;
|
|
26626
|
+
if (M && H) {
|
|
26600
26627
|
E.start.fromBufferAttribute(h, S), E.end.fromBufferAttribute(p, S), E.start.applyMatrix4(T), E.end.applyMatrix4(T);
|
|
26601
26628
|
var L = new THREE.Vector3(), O = new THREE.Vector3();
|
|
26602
26629
|
o.distanceSqToSegment(E.start, E.end, O, L), r.push({
|
|
@@ -26680,7 +26707,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
|
|
|
26680
26707
|
}
|
|
26681
26708
|
return Object.defineProperty(t, "version", {
|
|
26682
26709
|
get: function() {
|
|
26683
|
-
return "6.6.
|
|
26710
|
+
return "6.6.7";
|
|
26684
26711
|
},
|
|
26685
26712
|
enumerable: !1,
|
|
26686
26713
|
configurable: !0
|
|
@@ -27215,7 +27242,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27215
27242
|
I.dispose();
|
|
27216
27243
|
else {
|
|
27217
27244
|
I.name = g;
|
|
27218
|
-
var
|
|
27245
|
+
var B = Array.isArray(I.image) ? I.image[0] : I.image, M = (C = B == null ? void 0 : B.width) !== null && C !== void 0 ? C : 2048, H = {
|
|
27219
27246
|
panoId: f,
|
|
27220
27247
|
effect: c,
|
|
27221
27248
|
leftPanoPicture: {
|
|
@@ -27228,7 +27255,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27228
27255
|
position: d.position.clone(),
|
|
27229
27256
|
fixCameraTransform: new THREE.Matrix4()
|
|
27230
27257
|
};
|
|
27231
|
-
s.doMoveToPano(e,
|
|
27258
|
+
s.doMoveToPano(e, H, r);
|
|
27232
27259
|
}
|
|
27233
27260
|
},
|
|
27234
27261
|
onError: function(w) {
|
|
@@ -27295,47 +27322,47 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27295
27322
|
if (this.locationMotion.ended) {
|
|
27296
27323
|
var R = this.locationMotion.getKeyFrameSegment(y);
|
|
27297
27324
|
R[0];
|
|
27298
|
-
var w = R[1], C = this.locationMotion.value, I = this.panoResourceFromLocationMotionKeyframe(w).position,
|
|
27299
|
-
b = Math.max(I.distanceTo(
|
|
27325
|
+
var w = R[1], C = this.locationMotion.value, I = this.panoResourceFromLocationMotionKeyframe(w).position, B = r.position;
|
|
27326
|
+
b = Math.max(I.distanceTo(B), E), T = [
|
|
27300
27327
|
{ key: w.key, progress: 0, value: __assign(__assign({}, C), { count: 0 }) },
|
|
27301
27328
|
{ key: v, progress: 1, value: { distance: 0, count: 1 } }
|
|
27302
27329
|
], S = 0;
|
|
27303
27330
|
} else {
|
|
27304
|
-
var M = this.locationMotion.getKeyFrameSegment(y),
|
|
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);
|
|
27305
27332
|
b = F + N, T = [
|
|
27306
|
-
{ key:
|
|
27333
|
+
{ key: H.key, progress: 0, value: __assign({}, C) },
|
|
27307
27334
|
{ key: w.key, progress: F / b, value: w.value },
|
|
27308
27335
|
{ key: v, progress: 1, value: { count: w.value.count + 1, distance: 0 } }
|
|
27309
27336
|
];
|
|
27310
|
-
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes),
|
|
27311
|
-
S = this.locationMotion.getProgressVelocity(y) * D /
|
|
27337
|
+
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), q = this.locationMotionKeyframesLength(T);
|
|
27338
|
+
S = this.locationMotion.getProgressVelocity(y) * D / q;
|
|
27312
27339
|
}
|
|
27313
|
-
var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0),
|
|
27340
|
+
var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), Q = {
|
|
27314
27341
|
longitude: o.longitude,
|
|
27315
27342
|
latitude: o.latitude,
|
|
27316
27343
|
fov: o.fov
|
|
27317
|
-
}, j = __assign(__assign({}, e), { mode: this.mode, longitude: (u =
|
|
27344
|
+
}, j = __assign(__assign({}, e), { mode: this.mode, longitude: (u = Q.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = Q.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = Q.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), V = this.currentPano;
|
|
27318
27345
|
if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
27319
27346
|
options: o,
|
|
27320
|
-
prevPano:
|
|
27347
|
+
prevPano: V,
|
|
27321
27348
|
progress: 0,
|
|
27322
27349
|
state: j,
|
|
27323
27350
|
userAction: this.userAction,
|
|
27324
27351
|
error: null
|
|
27325
27352
|
})), o.moveStartCallback && o.moveStartCallback(j), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
|
|
27326
|
-
this.cameraMotion.set(
|
|
27353
|
+
this.cameraMotion.set(Q, z).catch(noop);
|
|
27327
27354
|
else {
|
|
27328
|
-
var
|
|
27355
|
+
var U = coordinatesToVector({
|
|
27329
27356
|
longitude: this.cameraMotion.value.longitude,
|
|
27330
27357
|
latitude: this.cameraMotion.value.latitude
|
|
27331
|
-
}),
|
|
27332
|
-
longitude: (f =
|
|
27333
|
-
latitude: (d =
|
|
27358
|
+
}), G = coordinatesToVector({
|
|
27359
|
+
longitude: (f = Q.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
|
|
27360
|
+
latitude: (d = Q.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
|
|
27334
27361
|
}), W = new THREE.Object3D();
|
|
27335
|
-
W.lookAt(
|
|
27362
|
+
W.lookAt(U);
|
|
27336
27363
|
var X = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion);
|
|
27337
|
-
W.lookAt(
|
|
27338
|
-
var Z = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), Y = new THREE.Matrix4().getInverse(X).premultiply(Z), K = this.cameraMotion.value.fov, ee = (h =
|
|
27364
|
+
W.lookAt(G);
|
|
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;
|
|
27339
27366
|
r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
|
|
27340
27367
|
for (var re = ee * te, ie = 0; ie < T.length - 1; ie++) {
|
|
27341
27368
|
var ce = T[ie].key;
|
|
@@ -27356,16 +27383,16 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27356
27383
|
{
|
|
27357
27384
|
progress: 0,
|
|
27358
27385
|
value: {
|
|
27359
|
-
longitude: (p =
|
|
27360
|
-
latitude: (m =
|
|
27386
|
+
longitude: (p = Q.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
|
|
27387
|
+
latitude: (m = Q.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
|
|
27361
27388
|
fov: re
|
|
27362
27389
|
}
|
|
27363
27390
|
},
|
|
27364
27391
|
{
|
|
27365
27392
|
progress: 1,
|
|
27366
27393
|
value: {
|
|
27367
|
-
longitude: (A =
|
|
27368
|
-
latitude: (g =
|
|
27394
|
+
longitude: (A = Q.longitude) !== null && A !== void 0 ? A : this.cameraMotion.value.longitude,
|
|
27395
|
+
latitude: (g = Q.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
|
|
27369
27396
|
fov: ee
|
|
27370
27397
|
}
|
|
27371
27398
|
}
|
|
@@ -27383,7 +27410,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27383
27410
|
var le = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: 0 });
|
|
27384
27411
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
27385
27412
|
options: o,
|
|
27386
|
-
prevPano:
|
|
27413
|
+
prevPano: V,
|
|
27387
27414
|
progress: 1,
|
|
27388
27415
|
state: le,
|
|
27389
27416
|
userAction: s.userAction,
|
|
@@ -27414,7 +27441,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27414
27441
|
function() {
|
|
27415
27442
|
s.emit("pano.cancel", createEvent("pano.cancel", {
|
|
27416
27443
|
options: o,
|
|
27417
|
-
prevPano:
|
|
27444
|
+
prevPano: V,
|
|
27418
27445
|
progress: 0,
|
|
27419
27446
|
state: j,
|
|
27420
27447
|
userAction: s.userAction,
|
|
@@ -27513,12 +27540,12 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27513
27540
|
for (var o = this, s, u, l, c, f, d, h, p, m, A = [], g = 2; g < arguments.length; g++)
|
|
27514
27541
|
A[g - 2] = arguments[g];
|
|
27515
27542
|
this.userAction = !0;
|
|
27516
|
-
var y = {}, v = {}, E = this.locationMotion.keyframes[0], b = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], T = this.locationMotion.getKeyFrameSegment(e), S = T[0], R = T[1], w = this.panoResourceFromLocationMotionKeyframe(S), C = this.panoResourceFromLocationMotionKeyframe(R), I = this.panoResourceFromLocationMotionKeyframe(E),
|
|
27543
|
+
var y = {}, v = {}, E = this.locationMotion.keyframes[0], b = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], T = this.locationMotion.getKeyFrameSegment(e), S = T[0], R = T[1], w = this.panoResourceFromLocationMotionKeyframe(S), C = this.panoResourceFromLocationMotionKeyframe(R), I = this.panoResourceFromLocationMotionKeyframe(E), B = this.panoResourceFromLocationMotionKeyframe(b), M = !1;
|
|
27517
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) {
|
|
27518
27545
|
this.locationMotion.update(e);
|
|
27519
|
-
var
|
|
27520
|
-
|
|
27521
|
-
var L =
|
|
27546
|
+
var H = this.locationMotion.getKeyFrameSegment(e);
|
|
27547
|
+
H[0];
|
|
27548
|
+
var L = H[1], O = new THREE.Vector3().copy(w.position), F = new THREE.Vector3().copy(C.position), N = this.locationMotion.value.count - L.value.count + 1;
|
|
27522
27549
|
if (y.progress = N, C.leftPanoPicture && (N < 1 ? w.leftPanoPicture && (y.pano0 = w.leftPanoPicture) : y.pano0 = C.leftPanoPicture, y.pano1 = C.leftPanoPicture), C.effect === "montage" ? y.transition = "BLACK" : C.effect === "spread" ? y.transition = "SPREAD" : y.transition = "FADE", (C.effect === "zoomin" || C.effect === "zoomout") && (y.progress = Math.pow(N, 3)), N < 1 && C.effect !== "fly") {
|
|
27523
27550
|
if (y.pano0 && w.leftPanoPicture) {
|
|
27524
27551
|
var D = {
|
|
@@ -27527,19 +27554,19 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27527
27554
|
mapSize: y.pano0.mapSize,
|
|
27528
27555
|
zoom: y.pano0.zoom,
|
|
27529
27556
|
matrix: w.leftPanoPicture.matrix.clone().setPosition(C.position)
|
|
27530
|
-
},
|
|
27531
|
-
|
|
27557
|
+
}, q = this.panoPictureObserverMap.get(y.pano0);
|
|
27558
|
+
q && this.panoPictureObserverMap.set(D, q), y.pano0 = D;
|
|
27532
27559
|
}
|
|
27533
27560
|
O.copy(F), M = !0;
|
|
27534
27561
|
}
|
|
27535
27562
|
v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(O.x + (F.x - O.x) * N, O.y + (F.y - O.y) * N, O.z + (F.z - O.z) * N);
|
|
27536
|
-
for (var z = [],
|
|
27537
|
-
var
|
|
27538
|
-
|
|
27563
|
+
for (var z = [], Q = [], j = 0, V = this.locationMotion.keyframes; j < V.length; j++) {
|
|
27564
|
+
var U = V[j], G = U.key, W = U.progress;
|
|
27565
|
+
G !== void 0 && (z.push(G), W > this.locationMotion.progress && Q.push(G));
|
|
27539
27566
|
}
|
|
27540
27567
|
for (var X = 0, Z = Object.keys(this.panoResources); X < Z.length; X++) {
|
|
27541
27568
|
var Y = Z[X];
|
|
27542
|
-
if (!(
|
|
27569
|
+
if (!(Q.indexOf(Y) >= 0)) {
|
|
27543
27570
|
var K = this.panoResources[Y];
|
|
27544
27571
|
if (K.leftPanoPicture) {
|
|
27545
27572
|
var ee = K.leftPanoPicture.map;
|
|
@@ -27556,7 +27583,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27556
27583
|
te !== this.currentPano && (this.currentPano = te, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
|
|
27557
27584
|
userAction: this.userAction,
|
|
27558
27585
|
prevPano: panoParse(I.panoId),
|
|
27559
|
-
state: __assign(__assign(__assign(__assign({}, panoParse(
|
|
27586
|
+
state: __assign(__assign(__assign(__assign({}, panoParse(B.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), v),
|
|
27560
27587
|
options: {},
|
|
27561
27588
|
progress: this.locationMotion.progress,
|
|
27562
27589
|
error: null
|
|
@@ -27599,11 +27626,11 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27599
27626
|
}
|
|
27600
27627
|
if (Ze.length >= 1 && Ze[0].face)
|
|
27601
27628
|
if (Re.handedness === "right") {
|
|
27602
|
-
var P = Te.xrControllerRay.right.intersectObject(Te.xrCustomObjectsScene, !0), _ = Ze[0].face.normal, k = _.clone(),
|
|
27603
|
-
Te.intersectMesh.position.copy(
|
|
27604
|
-
var $ =
|
|
27629
|
+
var P = Te.xrControllerRay.right.intersectObject(Te.xrCustomObjectsScene, !0), _ = Ze[0].face.normal, k = _.clone(), J = Ze[0].point.clone();
|
|
27630
|
+
Te.intersectMesh.position.copy(J);
|
|
27631
|
+
var $ = J.clone().add(k);
|
|
27605
27632
|
if (Te.intersectMesh.lookAt($), Math.abs(_.y) > 0.99) {
|
|
27606
|
-
var oe = Te.camera.position.clone().sub(
|
|
27633
|
+
var oe = Te.camera.position.clone().sub(J);
|
|
27607
27634
|
Te.intersectMesh.rotation.z = -Math.atan2(oe.z, oe.x);
|
|
27608
27635
|
}
|
|
27609
27636
|
Te.intersectMesh.visible = !0, Te.needsRender = !0, P.length > 0 ? (Te.pointerLines.right.setPoints(st, P[0].point), Te.pointerLines.right.points.visible = !0, Te.intersectMesh.visible = !1) : (Te.pointerLines.right.points.visible = !1, Te.pointerLines.right.setPoints(st, Ze[0].point));
|
|
@@ -27632,8 +27659,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27632
27659
|
var Ie = this.works.getResolvedObserver(this.currentPano), $e = this.locationMotion.ended ? this.getForwardObserverOrNot(this.xrManager.cameraVR) : null, tt = this.works.getObserver(w.panoId), ke = this.works.getObserver(C.panoId);
|
|
27633
27660
|
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && Ie) {
|
|
27634
27661
|
for (var Pe = [], _e = Ie.work.observers, Ee = 0, Ce = Ie.accessibleNodes; Ee < Ce.length; Ee++) {
|
|
27635
|
-
var Be = Ce[Ee],
|
|
27636
|
-
|
|
27662
|
+
var Be = Ce[Ee], q = _e[Be];
|
|
27663
|
+
q && Pe.push(q);
|
|
27637
27664
|
}
|
|
27638
27665
|
var je = /* @__PURE__ */ new Map();
|
|
27639
27666
|
if (Pe.sort(function(fe, Se) {
|
|
@@ -27672,24 +27699,24 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27672
27699
|
var ze = /* @__PURE__ */ new Map();
|
|
27673
27700
|
if (tt)
|
|
27674
27701
|
for (var ut = 0, rt = tt.accessibleNodes; ut < rt.length; ut++) {
|
|
27675
|
-
var Be = rt[ut],
|
|
27676
|
-
if (
|
|
27702
|
+
var Be = rt[ut], q = tt.work.observers[Be];
|
|
27703
|
+
if (q) {
|
|
27677
27704
|
var Ue = panoStringify({
|
|
27678
|
-
panoIndex:
|
|
27679
|
-
workCode:
|
|
27705
|
+
panoIndex: q.panoIndex,
|
|
27706
|
+
workCode: q.work.workCode
|
|
27680
27707
|
});
|
|
27681
|
-
ze.set(Ue,
|
|
27708
|
+
ze.set(Ue, q);
|
|
27682
27709
|
}
|
|
27683
27710
|
}
|
|
27684
27711
|
if (ke)
|
|
27685
27712
|
for (var ue = 0, Ae = ke.accessibleNodes; ue < Ae.length; ue++) {
|
|
27686
|
-
var Be = Ae[ue],
|
|
27687
|
-
if (
|
|
27713
|
+
var Be = Ae[ue], q = ke.work.observers[Be];
|
|
27714
|
+
if (q) {
|
|
27688
27715
|
var Ue = panoStringify({
|
|
27689
|
-
panoIndex:
|
|
27690
|
-
workCode:
|
|
27716
|
+
panoIndex: q.panoIndex,
|
|
27717
|
+
workCode: q.work.workCode
|
|
27691
27718
|
});
|
|
27692
|
-
ze.set(Ue,
|
|
27719
|
+
ze.set(Ue, q);
|
|
27693
27720
|
}
|
|
27694
27721
|
}
|
|
27695
27722
|
if (this.panoMeshes.forEach(function(fe, Se) {
|
|
@@ -27740,8 +27767,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27740
27767
|
});
|
|
27741
27768
|
}
|
|
27742
27769
|
{
|
|
27743
|
-
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,
|
|
27744
|
-
if (Tt && (
|
|
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) {
|
|
27745
27772
|
this.tiling.setObserver(null);
|
|
27746
27773
|
var It = {
|
|
27747
27774
|
renderer: this.renderer,
|
|
@@ -27759,7 +27786,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27759
27786
|
this.tiling.update(It), this.modelScene.parameter.set("refinedScreen", null);
|
|
27760
27787
|
} else {
|
|
27761
27788
|
var at = getImageSizeLevel(Tt.mapSize), Pt = at + 1, xt = 4;
|
|
27762
|
-
this.tiling.setObserver(
|
|
27789
|
+
this.tiling.setObserver(q);
|
|
27763
27790
|
var It = {
|
|
27764
27791
|
renderer: this.renderer,
|
|
27765
27792
|
resolution: ae,
|
|
@@ -28970,13 +28997,13 @@ void main() {
|
|
|
28970
28997
|
encoding: (p = (h = g.renderer) === null || h === void 0 ? void 0 : h.outputEncoding) !== null && p !== void 0 ? p : THREE.sRGBEncoding,
|
|
28971
28998
|
generateMipmaps: !1
|
|
28972
28999
|
}), g.viewport = Object.assign({ left: 0, bottom: 0, width: 1, height: 1 }, e.viewport), g.camera = new Camera(DEFAULT_CAMERA_FOV), g.scene = new Scene(), g.xrCustomObjectsScene = new THREE.Scene(), g.scene.add(g.xrCustomObjectsScene), g.scene.matrixAutoUpdate = !1, g.loadWorkTask = Promise.resolve(), g.requestProxy = (m = e.requestProxy) !== null && m !== void 0 ? m : DEFAULT_REQUEST_PROXY, g.networkSubscribe = new NetworkSubscribe(), g.networkSubscribe.on("network", function(O, F, N, D) {
|
|
28973
|
-
var
|
|
29000
|
+
var q;
|
|
28974
29001
|
g.emit("network.resource", createEvent("network.resource", {
|
|
28975
29002
|
source: O,
|
|
28976
29003
|
requestType: F,
|
|
28977
29004
|
requestState: N,
|
|
28978
29005
|
detail: D
|
|
28979
|
-
})), (
|
|
29006
|
+
})), (q = g.analysis) === null || q === void 0 || q.network(g.works, O, F, N, D);
|
|
28980
29007
|
}), g.boundingMesh = new BoundingMesh$1(), g.boundingMesh.name = "bounding", g.readyCallbacks = [], g.syncingState = !1, g.helperGroup = new THREE.Group(), g.helperGroup.name = "helper", g.helperGroup.matrixAutoUpdate = !1, g.scene.add(g.helperGroup);
|
|
28981
29008
|
var E = new Model(emptyWorks[0]);
|
|
28982
29009
|
worksMap.set(g, emptyWorks), g.modelScene = new ModelScene(), g.modelScene.add(E), g.modelScene.add(g.boundingMesh), defineProperty(E, "loaded", {
|
|
@@ -29037,9 +29064,9 @@ void main() {
|
|
|
29037
29064
|
if (typeof I == "function")
|
|
29038
29065
|
I(g);
|
|
29039
29066
|
else if (Array.isArray(I)) {
|
|
29040
|
-
var
|
|
29041
|
-
if (typeof
|
|
29042
|
-
var L =
|
|
29067
|
+
var B = I[0], M = I[1], H = I[2];
|
|
29068
|
+
if (typeof B == "function") {
|
|
29069
|
+
var L = B(g, H);
|
|
29043
29070
|
typeof M == "string" && (g.plugins[M] ? g.throwError(new Error("plugin name ".concat(M, " is exists."))) : g.plugins[M] = L);
|
|
29044
29071
|
}
|
|
29045
29072
|
}
|
|
@@ -29048,7 +29075,7 @@ void main() {
|
|
|
29048
29075
|
}
|
|
29049
29076
|
return Object.defineProperty(t, "version", {
|
|
29050
29077
|
get: function() {
|
|
29051
|
-
return "6.6.
|
|
29078
|
+
return "6.6.7";
|
|
29052
29079
|
},
|
|
29053
29080
|
enumerable: !1,
|
|
29054
29081
|
configurable: !0
|
|
@@ -29294,18 +29321,18 @@ void main() {
|
|
|
29294
29321
|
}
|
|
29295
29322
|
});
|
|
29296
29323
|
registerFetcher(Y, ee);
|
|
29297
|
-
}, C = this, I = 0,
|
|
29298
|
-
var M =
|
|
29324
|
+
}, C = this, I = 0, B = R; I < B.length; I++) {
|
|
29325
|
+
var M = B[I];
|
|
29299
29326
|
w(M);
|
|
29300
29327
|
}
|
|
29301
29328
|
r === void 0 && (r = "inherit"), r === "inherit" && this.works === emptyWorks && (r = "initial");
|
|
29302
|
-
var
|
|
29329
|
+
var H = R.initial, L = H.work.observers[0], O = L ? {
|
|
29303
29330
|
workCode: L.work.workCode,
|
|
29304
29331
|
panoIndex: L.panoIndex
|
|
29305
29332
|
} : {
|
|
29306
|
-
workCode:
|
|
29333
|
+
workCode: H.work.workCode,
|
|
29307
29334
|
panoIndex: 0
|
|
29308
|
-
}, F = (l =
|
|
29335
|
+
}, F = (l = H.mode) !== null && l !== void 0 ? l : L ? "Panorama" : "Mapview", N = {};
|
|
29309
29336
|
if (r === "inherit") {
|
|
29310
29337
|
F = this.currentMode;
|
|
29311
29338
|
var D = (f = (c = R[0]) === null || c === void 0 ? void 0 : c.observers) === null || f === void 0 ? void 0 : f[this.panoIndex];
|
|
@@ -29323,20 +29350,20 @@ void main() {
|
|
|
29323
29350
|
offset: void 0
|
|
29324
29351
|
};
|
|
29325
29352
|
} else if (r === "initial")
|
|
29326
|
-
typeof
|
|
29327
|
-
workCode:
|
|
29328
|
-
panoIndex:
|
|
29329
|
-
}),
|
|
29330
|
-
longitude:
|
|
29331
|
-
latitude:
|
|
29332
|
-
fov:
|
|
29333
|
-
distance:
|
|
29334
|
-
offset: (d =
|
|
29353
|
+
typeof H.panoIndex == "number" && (O = {
|
|
29354
|
+
workCode: H.work.workCode,
|
|
29355
|
+
panoIndex: H.panoIndex
|
|
29356
|
+
}), H.mode && (F = H.mode), N = {
|
|
29357
|
+
longitude: H.longitude,
|
|
29358
|
+
latitude: H.latitude,
|
|
29359
|
+
fov: H.fov,
|
|
29360
|
+
distance: H.distance,
|
|
29361
|
+
offset: (d = H.offset) === null || d === void 0 ? void 0 : d.clone()
|
|
29335
29362
|
};
|
|
29336
29363
|
else {
|
|
29337
29364
|
if (F = (h = r.mode) !== null && h !== void 0 ? h : this.currentMode, typeof r.panoIndex == "number") {
|
|
29338
29365
|
var D = R.getObserver({
|
|
29339
|
-
workCode: (m = (p = r.workCode) !== null && p !== void 0 ? p :
|
|
29366
|
+
workCode: (m = (p = r.workCode) !== null && p !== void 0 ? p : H.work.workCode) !== null && m !== void 0 ? m : "",
|
|
29340
29367
|
panoIndex: r.panoIndex
|
|
29341
29368
|
});
|
|
29342
29369
|
D && (O = {
|
|
@@ -29352,26 +29379,26 @@ void main() {
|
|
|
29352
29379
|
offset: r.offset
|
|
29353
29380
|
};
|
|
29354
29381
|
}
|
|
29355
|
-
var
|
|
29356
|
-
(F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (
|
|
29382
|
+
var q = __assign(__assign(__assign({}, O), { mode: F }), N), z = this.getCurrentState(), Q = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
|
|
29383
|
+
(F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (Q = 0);
|
|
29357
29384
|
var j = "fly";
|
|
29358
29385
|
(F === "Panorama" || F === "VRPanorama" || F === "XRPanorama") && this.currentMode === F && (j = (g = v.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
|
|
29359
29386
|
input: e,
|
|
29360
29387
|
works: R,
|
|
29361
|
-
state:
|
|
29388
|
+
state: q,
|
|
29362
29389
|
userAction: s
|
|
29363
29390
|
}));
|
|
29364
|
-
var
|
|
29391
|
+
var V = function() {
|
|
29365
29392
|
u.pano = O;
|
|
29366
29393
|
var Y = __assign(__assign({ initial: {
|
|
29367
|
-
state:
|
|
29394
|
+
state: q,
|
|
29368
29395
|
currentState: z,
|
|
29369
|
-
duration:
|
|
29396
|
+
duration: Q,
|
|
29370
29397
|
effect: j,
|
|
29371
29398
|
userAction: s
|
|
29372
29399
|
} }, u.commonParams()), u.controllerInits[F]), K = Controllers[F].initAnimationEndState(Y);
|
|
29373
29400
|
if (u.controller && u.currentMode === F)
|
|
29374
|
-
u.controller.updateWork(R, K, { effect: j, duration:
|
|
29401
|
+
u.controller.updateWork(R, K, { effect: j, duration: Q }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(F, Y));
|
|
29375
29402
|
else {
|
|
29376
29403
|
var ee = u.currentMode;
|
|
29377
29404
|
if (u.controller)
|
|
@@ -29399,20 +29426,20 @@ void main() {
|
|
|
29399
29426
|
u.updateTime(u.currentUpdateArgs.time, 0, u.currentUpdateArgs.args);
|
|
29400
29427
|
};
|
|
29401
29428
|
worksMap.set(this, R);
|
|
29402
|
-
var
|
|
29429
|
+
var U = Promise.resolve();
|
|
29403
29430
|
if (F === t.Mode.Floorplan || F === t.Mode.Topview || F === t.Mode.Mapview || F === t.Mode.Model) {
|
|
29404
|
-
this.modelScene.loaded === !1 && (this.camera.setFromPose(
|
|
29405
|
-
var
|
|
29406
|
-
|
|
29431
|
+
this.modelScene.loaded === !1 && (this.camera.setFromPose(q), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = F);
|
|
29432
|
+
var G = this.loadModels(R, v);
|
|
29433
|
+
U = Promise.all(G.map(function(Y) {
|
|
29407
29434
|
return Y.loadedReady;
|
|
29408
29435
|
})).then(function() {
|
|
29409
|
-
u.needsRender = !0, u.modelSceneNeedsRender = !0,
|
|
29436
|
+
u.needsRender = !0, u.modelSceneNeedsRender = !0, V(), u.emit("camera.update", createEvent("camera.update", {
|
|
29410
29437
|
state: u.getCurrentState(),
|
|
29411
29438
|
userAction: s
|
|
29412
29439
|
}));
|
|
29413
29440
|
});
|
|
29414
29441
|
} else {
|
|
29415
|
-
|
|
29442
|
+
V();
|
|
29416
29443
|
var W = this.controller, X = !1;
|
|
29417
29444
|
this.modelScene.autoRefine = !1;
|
|
29418
29445
|
var Z = function() {
|
|
@@ -29420,8 +29447,8 @@ void main() {
|
|
|
29420
29447
|
state: u.getCurrentState(),
|
|
29421
29448
|
userAction: s
|
|
29422
29449
|
})), X = !0, u.modelScene.autoRefine = !0), W.off("pano.arrived", Z), W.off("pano.cancel", Z);
|
|
29423
|
-
},
|
|
29424
|
-
|
|
29450
|
+
}, G = this.loadModels(R, v);
|
|
29451
|
+
U = Promise.all(G.map(function(K) {
|
|
29425
29452
|
return K.initReady;
|
|
29426
29453
|
})).then(noop), W.once("pano.arrived", Z), W.once("pano.cancel", Z), setTimeout(Z, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
|
|
29427
29454
|
}
|
|
@@ -29430,7 +29457,7 @@ void main() {
|
|
|
29430
29457
|
state: this.getCurrentState(),
|
|
29431
29458
|
userAction: s,
|
|
29432
29459
|
works: R
|
|
29433
|
-
})),
|
|
29460
|
+
})), U.then(function() {
|
|
29434
29461
|
return u.ready();
|
|
29435
29462
|
}).then(function() {
|
|
29436
29463
|
var Y;
|
|
@@ -29525,13 +29552,13 @@ void main() {
|
|
|
29525
29552
|
});
|
|
29526
29553
|
if (l.emit("mode.change.request", I), !I.defaultPrevented) {
|
|
29527
29554
|
E && E.destroy(), l.controller = l.applyController(e, w);
|
|
29528
|
-
var
|
|
29555
|
+
var B = createEvent("mode.change", {
|
|
29529
29556
|
prevMode: l.currentMode,
|
|
29530
29557
|
mode: e,
|
|
29531
29558
|
state: C,
|
|
29532
29559
|
userAction: s
|
|
29533
29560
|
});
|
|
29534
|
-
l.emit("mode.change",
|
|
29561
|
+
l.emit("mode.change", B);
|
|
29535
29562
|
}
|
|
29536
29563
|
}
|
|
29537
29564
|
c();
|
|
@@ -29563,14 +29590,14 @@ void main() {
|
|
|
29563
29590
|
this.helperVisible = E != null ? E : this.helperVisible, b && (this.controller instanceof Controllers.Panorama || this.controller instanceof Controllers.VRPanorama || this.controller instanceof Controllers.XRPanorama) && b === !0 && this.modelScene.parameter.set("modelAlpha", 1), this.modelScene.update(this.renderer, this.camera);
|
|
29564
29591
|
var w = this.getPixelsRenderTarget;
|
|
29565
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);
|
|
29566
|
-
var C = A * y, I = g * y,
|
|
29593
|
+
var C = A * y, I = g * y, B = C * I, M = B * 4;
|
|
29567
29594
|
if (T) {
|
|
29568
29595
|
if (T.length !== M)
|
|
29569
29596
|
throw new Error("buffer length is not equals pixels ".concat(M));
|
|
29570
29597
|
} else
|
|
29571
29598
|
T = new Uint8Array(M);
|
|
29572
29599
|
if (this.renderer.readRenderTargetPixels(w, 0, 0, A * y, g * y, T), v)
|
|
29573
|
-
for (var
|
|
29600
|
+
for (var H = B / 2, L = 0, O = 0, F = 0, N = 0; O < H; O++)
|
|
29574
29601
|
for (N = (I - Math.floor(O / C) - 1) * C + O % C, F = 0; F < 4; F++)
|
|
29575
29602
|
L = T[O * 4 + F], T[O * 4 + F] = T[N * 4 + F], T[N * 4 + F] = L;
|
|
29576
29603
|
return T;
|
|
@@ -29717,8 +29744,8 @@ void main() {
|
|
|
29717
29744
|
};
|
|
29718
29745
|
else {
|
|
29719
29746
|
var y = (u = (s = this.work) === null || s === void 0 ? void 0 : s.workCode) !== null && u !== void 0 ? u : "", v = this.state.workCode;
|
|
29720
|
-
this.works.filter(function(
|
|
29721
|
-
return
|
|
29747
|
+
this.works.filter(function(H) {
|
|
29748
|
+
return H.workCode === v;
|
|
29722
29749
|
}).length > 0 && (y = v), g = {
|
|
29723
29750
|
workCode: y,
|
|
29724
29751
|
panoIndex: e.panoIndex
|
|
@@ -29741,8 +29768,8 @@ void main() {
|
|
|
29741
29768
|
duration: this.modeChangeDuration,
|
|
29742
29769
|
effect: "fly",
|
|
29743
29770
|
userAction: !1
|
|
29744
|
-
} }, this.commonParams()), this.controllerInits[E]),
|
|
29745
|
-
b =
|
|
29771
|
+
} }, this.commonParams()), this.controllerInits[E]), B = Controllers[E].initAnimationEndState(I);
|
|
29772
|
+
b = B.longitude, T = B.latitude, S = B.fov, R = B.offset, w = B.distance;
|
|
29746
29773
|
} else
|
|
29747
29774
|
b = (c = e.longitude) !== null && c !== void 0 ? c : this.state.longitude, T = (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;
|
|
29748
29775
|
var M = {
|
|
@@ -29820,7 +29847,7 @@ void main() {
|
|
|
29820
29847
|
}), this.controller.stopMomentumMovement(), this.controller.cameraMotion.set(C, 0).catch(noop), this.controller.locationMotion.set(w, 0).catch(noop), !0;
|
|
29821
29848
|
}
|
|
29822
29849
|
} else {
|
|
29823
|
-
var I = 1,
|
|
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, b = new THREE.Vector3().copy(this.state.offset);
|
|
29824
29851
|
if (notSimilarValue(y, this.camera.pose.distance) && (this.state.distance = this.camera.pose.distance), notSimilarVector3(b, 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))
|
|
29825
29852
|
return this.controller.stopMomentumMovement(), this.controller.cameraMotion.set({ longitude: S, latitude: R, fov: m }, 0).catch(noop), !0;
|
|
29826
29853
|
}
|
|
@@ -29828,7 +29855,7 @@ void main() {
|
|
|
29828
29855
|
userAction: !1,
|
|
29829
29856
|
state: this.state
|
|
29830
29857
|
})), this.readyCallbacks.length && this.stateSynced) {
|
|
29831
|
-
var
|
|
29858
|
+
var H = this.currentMode, L = H === t.Mode.Floorplan || H === t.Mode.Topview || H === t.Mode.Mapview || H === t.Mode.Model;
|
|
29832
29859
|
if (!L || this.modelScene.loaded) {
|
|
29833
29860
|
var O = this.readyCallbacks.slice();
|
|
29834
29861
|
this.readyCallbacks.length = 0;
|
|
@@ -29879,24 +29906,24 @@ void main() {
|
|
|
29879
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)));
|
|
29880
29907
|
}
|
|
29881
29908
|
else
|
|
29882
|
-
for (var
|
|
29883
|
-
var N = z[
|
|
29909
|
+
for (var q = 0, z = I.viewLayers; q < z.length; q++) {
|
|
29910
|
+
var N = z[q];
|
|
29884
29911
|
C.viewerRequestVolume && (N.viewerRequestVolume = makeBoundingVolume(C.viewerRequestVolume)), N.parameter.set(omit(C, ["showLayers"])), C.showLayers === !1 ? N.visible = !1 : Array.isArray(C.showLayers) && (N.visible = C.showLayers.includes(N.name));
|
|
29885
29912
|
}
|
|
29886
29913
|
}), m.push(I), p && (I.visible = !1), E.modelScene.add(I);
|
|
29887
|
-
var
|
|
29914
|
+
var B = function() {
|
|
29888
29915
|
AnimationFrameLoop.shared.add(function() {
|
|
29889
29916
|
o.emit("model.load", createEvent("model.load", { work: S, model: I, error: null }));
|
|
29890
29917
|
}, !0);
|
|
29891
29918
|
}, M = function(O) {
|
|
29892
29919
|
var F = O.error;
|
|
29893
29920
|
o.emit("model.error", createEvent("model.error", { work: S, model: I, error: F })), o.throwError(F);
|
|
29894
|
-
},
|
|
29921
|
+
}, H = function() {
|
|
29895
29922
|
o.emit("model.changeShownFloor", createEvent("model.changeShownFloor", { work: S, model: I, error: null }));
|
|
29896
29923
|
}, L = function() {
|
|
29897
|
-
I.removeEventListener("load",
|
|
29924
|
+
I.removeEventListener("load", B), I.removeEventListener("error", M), I.removeEventListener("changeShownFloor", H), I.removeEventListener("dispose", L);
|
|
29898
29925
|
};
|
|
29899
|
-
I.addEventListener("load",
|
|
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 }));
|
|
29900
29927
|
}
|
|
29901
29928
|
}, E = this, b = 0; b < e.length; b++)
|
|
29902
29929
|
v(b);
|