@realsee/five 6.7.0-alpha.3 → 6.7.0-alpha.4
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/five/index.js +41 -41
- package/five/index.mjs +938 -911
- 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 +41 -41
- 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.7.0-alpha.
|
|
4
|
+
* Generated: 2025/10/13
|
|
5
|
+
* Version: 6.7.0-alpha.4
|
|
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++], j = 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 = j;
|
|
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++], j = (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] = j, 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 = "", j = q.array, J = 0; J < j.length; J++) {
|
|
3195
|
+
var V = j[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 = "", j = q.array, J = 0; J < j.length; J++) {
|
|
3207
|
+
var V = j[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 = "", j = q.array, J = 0; J < j.length; J++) {
|
|
3222
|
+
var V = j[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,70 +3900,70 @@ 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
|
|
3956
|
-
|
|
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, j = H; z < j.length; z++) {
|
|
3955
|
+
var J = j[z];
|
|
3956
|
+
J.onBeforeCompile && J.onBeforeCompile(v, E);
|
|
3957
3957
|
}
|
|
3958
3958
|
};
|
|
3959
3959
|
var c = "";
|
|
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), j = 0; j < q; j++)
|
|
5211
|
+
z[j] = D.charCodeAt(j);
|
|
5212
5212
|
t.responseType === "arraybuffer" ? N = z.buffer : N = new Blob([z], { type: F });
|
|
5213
5213
|
}
|
|
5214
|
-
var
|
|
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
|
|
@@ -5432,7 +5432,7 @@ function isAbsoluteURL(n) {
|
|
|
5432
5432
|
return n.indexOf("/") === 0 || /^[0-9a-z]+\:/i.test(n);
|
|
5433
5433
|
}
|
|
5434
5434
|
function getFullURL(n) {
|
|
5435
|
-
if (typeof URL != "undefined")
|
|
5435
|
+
if (typeof URL != "undefined" && typeof location != "undefined")
|
|
5436
5436
|
return new URL(n, location.href).href;
|
|
5437
5437
|
hrefAElement.href = n;
|
|
5438
5438
|
var t = hrefAElement.href;
|
|
@@ -6070,19 +6070,19 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
6070
6070
|
}, 0) / 6);
|
|
6071
6071
|
}, I = (m = e.viaAjax) !== null && m !== void 0 ? m : !1;
|
|
6072
6072
|
if (I) {
|
|
6073
|
-
var
|
|
6073
|
+
var B = "blob", M = e.fetcher.ajax(w, { timeout: e.timeout, responseType: B }, void 0, void 0, C).then(function(L) {
|
|
6074
6074
|
return E[S] = L.meta, createImageBitmapLike(L.body);
|
|
6075
6075
|
});
|
|
6076
6076
|
y.push(M);
|
|
6077
6077
|
} else {
|
|
6078
|
-
var
|
|
6078
|
+
var H, M = Promise.resolve().then(function() {
|
|
6079
6079
|
return createImageBitmapLikeImage();
|
|
6080
6080
|
}).then(function(O) {
|
|
6081
|
-
return
|
|
6081
|
+
return H = O, e.fetcher.loadImage(w, { timeout: e.timeout }, void 0, void 0, C, O);
|
|
6082
6082
|
}).then(function(O) {
|
|
6083
6083
|
return E[S] = O.meta, O.body;
|
|
6084
6084
|
}).catch(function(O) {
|
|
6085
|
-
return
|
|
6085
|
+
return H && H.close(), Promise.reject(O);
|
|
6086
6086
|
});
|
|
6087
6087
|
y.push(M);
|
|
6088
6088
|
}
|
|
@@ -7451,21 +7451,21 @@ 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, j = 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] = j[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),
|
|
7465
7465
|
start: L,
|
|
7466
7466
|
count: h.faces.indices.length,
|
|
7467
7467
|
texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
|
|
7468
|
-
}), L +=
|
|
7468
|
+
}), L += J;
|
|
7469
7469
|
}
|
|
7470
7470
|
var Z = {
|
|
7471
7471
|
createAt: o,
|
|
@@ -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,
|
|
7489
|
-
for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, ne = 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, ne = 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] = ne[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] <
|
|
7494
|
-
for (var R = 0; R <
|
|
7495
|
-
ee[te + R] = L +
|
|
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
|
+
for (var R = 0; R < J; R++)
|
|
7495
|
+
ee[te + R] = L + q[R];
|
|
7496
7496
|
M.push({
|
|
7497
7497
|
materialIndex: O,
|
|
7498
7498
|
name: h.name,
|
|
@@ -7500,7 +7500,7 @@ function parsePBMModel(n) {
|
|
|
7500
7500
|
start: te,
|
|
7501
7501
|
count: h.faces.indices.length,
|
|
7502
7502
|
texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
|
|
7503
|
-
}), L += ie, te +=
|
|
7503
|
+
}), L += ie, te += J;
|
|
7504
7504
|
}
|
|
7505
7505
|
var Z = {
|
|
7506
7506
|
createAt: o,
|
|
@@ -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 j = 0, J = r; j < J.length; j++) {
|
|
7556
|
+
var V = J[j], 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);
|
|
@@ -7585,8 +7585,8 @@ function parse$4(n, t, e, r, o, s, u) {
|
|
|
7585
7585
|
}
|
|
7586
7586
|
return null;
|
|
7587
7587
|
}));
|
|
7588
|
-
},
|
|
7589
|
-
var te = ee[
|
|
7588
|
+
}, K = 0, ee = Object.keys(h); K < ee.length; K++) {
|
|
7589
|
+
var te = ee[K];
|
|
7590
7590
|
Y(te);
|
|
7591
7591
|
}
|
|
7592
7592
|
return Promise.all(Z).then(function(ne) {
|
|
@@ -8557,15 +8557,15 @@ function parse$3(n, t, e, r, o) {
|
|
|
8557
8557
|
for (var R = 0, w = S; R < w.length; R++) {
|
|
8558
8558
|
var C = w[R];
|
|
8559
8559
|
d.elements = C.elements;
|
|
8560
|
-
for (var I = new THREE.Group(),
|
|
8561
|
-
var M = parseGeometry(T[
|
|
8560
|
+
for (var I = new THREE.Group(), B = 0; B < T.length; B++) {
|
|
8561
|
+
var M = parseGeometry(T[B].geometry);
|
|
8562
8562
|
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);
|
|
8563
|
-
for (var
|
|
8564
|
-
var F = O[L], N = parseMaterial(F, t, e || "", r, f, o, A, l, g), D = N.material,
|
|
8565
|
-
u.push(
|
|
8563
|
+
for (var H = [], L = 0, O = T[B].material; L < O.length; L++) {
|
|
8564
|
+
var F = O[L], N = parseMaterial(F, t, e || "", r, f, o, A, l, g), D = N.material, q = N.textureReady;
|
|
8565
|
+
u.push(q), H.push(D);
|
|
8566
8566
|
}
|
|
8567
|
-
var z = new PBMMesh(M,
|
|
8568
|
-
z.name = "chunk_" +
|
|
8567
|
+
var z = new PBMMesh(M, H);
|
|
8568
|
+
z.name = "chunk_" + B, z.matrix.compose(z.position, z.quaternion, z.scale), z.matrixAutoUpdate = !1, z.frustumCulled = !1, I.add(z);
|
|
8569
8569
|
}
|
|
8570
8570
|
I.name = b, s.push(I);
|
|
8571
8571
|
}
|
|
@@ -8577,8 +8577,8 @@ function parse$3(n, t, e, r, o) {
|
|
|
8577
8577
|
objects: s,
|
|
8578
8578
|
textures: Array.from(g),
|
|
8579
8579
|
dispose: function() {
|
|
8580
|
-
l.forEach(function(
|
|
8581
|
-
|
|
8580
|
+
l.forEach(function(j) {
|
|
8581
|
+
j.dispose();
|
|
8582
8582
|
}), l.clear();
|
|
8583
8583
|
}
|
|
8584
8584
|
};
|
|
@@ -8984,13 +8984,13 @@ var Parser = (
|
|
|
8984
8984
|
Promise.all(m),
|
|
8985
8985
|
Promise.all(A)
|
|
8986
8986
|
]).then(function(w) {
|
|
8987
|
-
for (var C = w[0], I = w[1],
|
|
8988
|
-
var
|
|
8989
|
-
if (
|
|
8987
|
+
for (var C = w[0], I = w[1], B = w[2], M = w[3], H = w[4], L = [], O = function(q, z) {
|
|
8988
|
+
var j = C[q], J = I[q], V = B[q], U = M[q], G = H[q];
|
|
8989
|
+
if (j === void 0)
|
|
8990
8990
|
return "continue";
|
|
8991
|
-
|
|
8991
|
+
j.updateMatrix(), j.matrixAutoUpdate = !0;
|
|
8992
8992
|
var W = void 0;
|
|
8993
|
-
switch (PATH_PROPERTIES[
|
|
8993
|
+
switch (PATH_PROPERTIES[G.path]) {
|
|
8994
8994
|
case PATH_PROPERTIES.weights:
|
|
8995
8995
|
W = THREE.NumberKeyframeTrack;
|
|
8996
8996
|
break;
|
|
@@ -9003,18 +9003,18 @@ var Parser = (
|
|
|
9003
9003
|
W = THREE.VectorKeyframeTrack;
|
|
9004
9004
|
break;
|
|
9005
9005
|
}
|
|
9006
|
-
var X =
|
|
9007
|
-
PATH_PROPERTIES[
|
|
9006
|
+
var X = j.name ? j.name : j.uuid, Z = U.interpolation !== void 0 ? INTERPOLATION[U.interpolation] : THREE.InterpolateLinear, Y = [];
|
|
9007
|
+
PATH_PROPERTIES[G.path] === PATH_PROPERTIES.weights ? j.traverse(function(ae) {
|
|
9008
9008
|
ae.morphTargetInfluences && Y.push(ae.name ? ae.name : ae.uuid);
|
|
9009
9009
|
}) : Y.push(X);
|
|
9010
|
-
var
|
|
9011
|
-
if (
|
|
9012
|
-
for (var ee = getNormalizedComponentScale(
|
|
9013
|
-
te[ne] =
|
|
9014
|
-
|
|
9010
|
+
var K = V.array;
|
|
9011
|
+
if (V.normalized) {
|
|
9012
|
+
for (var ee = getNormalizedComponentScale(K.constructor), te = new Float32Array(K.length), ne = 0, ie = K.length; ne < ie; ne++)
|
|
9013
|
+
te[ne] = K[ne] * ee;
|
|
9014
|
+
K = te;
|
|
9015
9015
|
}
|
|
9016
9016
|
for (var ne = 0, ie = Y.length; ne < ie; ne++) {
|
|
9017
|
-
var ce = new W(Y[ne] + "." + PATH_PROPERTIES[
|
|
9017
|
+
var ce = new W(Y[ne] + "." + PATH_PROPERTIES[G.path], J.array, K, Z);
|
|
9018
9018
|
L.push(ce);
|
|
9019
9019
|
}
|
|
9020
9020
|
}, F = 0, N = C.length; F < N; F++)
|
|
@@ -9081,11 +9081,11 @@ var Parser = (
|
|
|
9081
9081
|
} else
|
|
9082
9082
|
f === null ? v = new h(u.count * d) : v = new h(f, A, u.count * d), E = new THREE.BufferAttribute(v, d, y);
|
|
9083
9083
|
if (u.sparse !== void 0) {
|
|
9084
|
-
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,
|
|
9084
|
+
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);
|
|
9085
9085
|
f !== null && (E = new THREE.BufferAttribute(E.array.slice(), E.itemSize, E.normalized));
|
|
9086
|
-
for (var
|
|
9087
|
-
var O = H
|
|
9088
|
-
if (E.setX(O, M[
|
|
9086
|
+
for (var H = 0, L = B.length; H < L; H++) {
|
|
9087
|
+
var O = B[H];
|
|
9088
|
+
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)
|
|
9089
9089
|
throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
9090
9090
|
}
|
|
9091
9091
|
}
|
|
@@ -9327,8 +9327,8 @@ var Parser = (
|
|
|
9327
9327
|
}
|
|
9328
9328
|
if (A.length === 1)
|
|
9329
9329
|
return A[0];
|
|
9330
|
-
for (var I = new THREE.Group(),
|
|
9331
|
-
var T = M[
|
|
9330
|
+
for (var I = new THREE.Group(), B = 0, M = A; B < M.length; B++) {
|
|
9331
|
+
var T = M[B];
|
|
9332
9332
|
I.add(T);
|
|
9333
9333
|
}
|
|
9334
9334
|
return I;
|
|
@@ -9456,18 +9456,18 @@ var Parser = (
|
|
|
9456
9456
|
}
|
|
9457
9457
|
if (!S && !R)
|
|
9458
9458
|
return t;
|
|
9459
|
-
var
|
|
9459
|
+
var B = [];
|
|
9460
9460
|
t.morphTargetsRelative = !0;
|
|
9461
|
-
for (var M = function(
|
|
9462
|
-
var O = e.targets[
|
|
9463
|
-
S ?
|
|
9464
|
-
F && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[
|
|
9465
|
-
})) : t.attributes.position && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[
|
|
9466
|
-
F && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[
|
|
9467
|
-
})) : t.attributes.normal && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[
|
|
9461
|
+
for (var M = function(H, L) {
|
|
9462
|
+
var O = e.targets[H];
|
|
9463
|
+
S ? B.push(r.loadAccessor(O.POSITION).then(function(F) {
|
|
9464
|
+
F && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[H] = F);
|
|
9465
|
+
})) : 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) {
|
|
9466
|
+
F && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[H] = F);
|
|
9467
|
+
})) : t.attributes.normal && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[H] = t.attributes.normal);
|
|
9468
9468
|
}, w = 0, C = e.targets.length; w < C; w++)
|
|
9469
9469
|
M(w, C);
|
|
9470
|
-
return Promise.all(
|
|
9470
|
+
return Promise.all(B).then(function() {
|
|
9471
9471
|
return t;
|
|
9472
9472
|
});
|
|
9473
9473
|
} else
|
|
@@ -10510,11 +10510,11 @@ var BaseExtension = (
|
|
|
10510
10510
|
return E.buffer.slice(0, S);
|
|
10511
10511
|
}
|
|
10512
10512
|
function c(v, E, b, T, S, R) {
|
|
10513
|
-
var w = s.exports.sbrk, C = b + 3 & -4, I = w(C * T),
|
|
10514
|
-
M.set(S,
|
|
10515
|
-
var
|
|
10516
|
-
if (
|
|
10517
|
-
throw new Error("Malformed buffer data: " +
|
|
10513
|
+
var w = s.exports.sbrk, C = b + 3 & -4, I = w(C * T), B = w(S.length), M = new Uint8Array(s.exports.memory.buffer);
|
|
10514
|
+
M.set(S, B);
|
|
10515
|
+
var H = v(I, b, T, B, S.length);
|
|
10516
|
+
if (H == 0 && R && R(I, C, T), E.set(M.subarray(I, I + b * T)), w(I - w(0)), H != 0)
|
|
10517
|
+
throw new Error("Malformed buffer data: " + H);
|
|
10518
10518
|
}
|
|
10519
10519
|
var f = {
|
|
10520
10520
|
NONE: "",
|
|
@@ -10546,8 +10546,8 @@ var BaseExtension = (
|
|
|
10546
10546
|
for (var R = h[0], w = 1; w < h.length; ++w)
|
|
10547
10547
|
h[w].pending < R.pending && (R = h[w]);
|
|
10548
10548
|
return new Promise(function(C, I) {
|
|
10549
|
-
var
|
|
10550
|
-
R.pending += v, R.requests[M] = { resolve: C, reject: I }, R.object.postMessage({ id: M, count: v, size: E, source:
|
|
10549
|
+
var B = new Uint8Array(b), M = p++;
|
|
10550
|
+
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]);
|
|
10551
10551
|
});
|
|
10552
10552
|
}
|
|
10553
10553
|
function y(v) {
|
|
@@ -10697,8 +10697,8 @@ var BaseExtension = (
|
|
|
10697
10697
|
}
|
|
10698
10698
|
if (m.length === 1)
|
|
10699
10699
|
return m[0];
|
|
10700
|
-
for (var C = new THREE.Group(), I = 0,
|
|
10701
|
-
var b =
|
|
10700
|
+
for (var C = new THREE.Group(), I = 0, B = m; I < B.length; I++) {
|
|
10701
|
+
var b = B[I];
|
|
10702
10702
|
C.add(b);
|
|
10703
10703
|
}
|
|
10704
10704
|
return C;
|
|
@@ -11664,10 +11664,10 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11664
11664
|
else if (E == 2) {
|
|
11665
11665
|
var R = bits(n, h, 31) + 257, w = bits(n, h + 10, 15) + 4, C = R + bits(n, h + 5, 31) + 1;
|
|
11666
11666
|
h += 14;
|
|
11667
|
-
for (var I = new u8(C),
|
|
11668
|
-
|
|
11667
|
+
for (var I = new u8(C), B = new u8(19), M = 0; M < w; ++M)
|
|
11668
|
+
B[clim[M]] = bits(n, h + M * 3, 7);
|
|
11669
11669
|
h += w * 3;
|
|
11670
|
-
for (var
|
|
11670
|
+
for (var H = max(B), L = (1 << H) - 1, O = hMap(B, H, 1), M = 0; M < C; ) {
|
|
11671
11671
|
var F = O[bits(n, h, L)];
|
|
11672
11672
|
h += F & 15;
|
|
11673
11673
|
var b = F >> 4;
|
|
@@ -11679,8 +11679,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11679
11679
|
I[M++] = N;
|
|
11680
11680
|
}
|
|
11681
11681
|
}
|
|
11682
|
-
var
|
|
11683
|
-
g = max(
|
|
11682
|
+
var q = I.subarray(0, R), z = I.subarray(R);
|
|
11683
|
+
g = max(q), y = max(z), m = hMap(q, g, 1), A = hMap(z, y, 1);
|
|
11684
11684
|
} else
|
|
11685
11685
|
err(1);
|
|
11686
11686
|
else {
|
|
@@ -11698,24 +11698,24 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11698
11698
|
}
|
|
11699
11699
|
}
|
|
11700
11700
|
l && f(p + 131072);
|
|
11701
|
-
for (var
|
|
11702
|
-
var N = m[bits16(n, h) &
|
|
11701
|
+
for (var j = (1 << g) - 1, J = (1 << y) - 1, V = h; ; V = h) {
|
|
11702
|
+
var N = m[bits16(n, h) & j], U = N >> 4;
|
|
11703
11703
|
if (h += N & 15, h > v) {
|
|
11704
11704
|
c && err(0);
|
|
11705
11705
|
break;
|
|
11706
11706
|
}
|
|
11707
|
-
if (N || err(2),
|
|
11708
|
-
e[p++] =
|
|
11709
|
-
else if (
|
|
11710
|
-
|
|
11707
|
+
if (N || err(2), U < 256)
|
|
11708
|
+
e[p++] = U;
|
|
11709
|
+
else if (U == 256) {
|
|
11710
|
+
V = h, m = null;
|
|
11711
11711
|
break;
|
|
11712
11712
|
} else {
|
|
11713
|
-
var
|
|
11714
|
-
if (
|
|
11715
|
-
var M =
|
|
11716
|
-
|
|
11713
|
+
var G = U - 254;
|
|
11714
|
+
if (U > 264) {
|
|
11715
|
+
var M = U - 257, W = fleb[M];
|
|
11716
|
+
G = bits(n, h, (1 << W) - 1) + fl[M], h += W;
|
|
11717
11717
|
}
|
|
11718
|
-
var X = A[bits16(n, h) &
|
|
11718
|
+
var X = A[bits16(n, h) & J], Z = X >> 4;
|
|
11719
11719
|
X || err(3), h += X & 15;
|
|
11720
11720
|
var z = fd[Z];
|
|
11721
11721
|
if (Z > 3) {
|
|
@@ -11727,17 +11727,17 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11727
11727
|
break;
|
|
11728
11728
|
}
|
|
11729
11729
|
l && f(p + 131072);
|
|
11730
|
-
var Y = p +
|
|
11730
|
+
var Y = p + G;
|
|
11731
11731
|
if (p < z) {
|
|
11732
|
-
var
|
|
11733
|
-
for (
|
|
11734
|
-
e[p] = r[
|
|
11732
|
+
var K = s - z, ee = Math.min(z, Y);
|
|
11733
|
+
for (K + p < 0 && err(3); p < ee; ++p)
|
|
11734
|
+
e[p] = r[K + p];
|
|
11735
11735
|
}
|
|
11736
11736
|
for (; p < Y; ++p)
|
|
11737
11737
|
e[p] = e[p - z];
|
|
11738
11738
|
}
|
|
11739
11739
|
}
|
|
11740
|
-
t.l = m, t.p =
|
|
11740
|
+
t.l = m, t.p = V, t.b = p, t.f = d, m && (d = 1, t.m = g, t.d = A, t.n = y);
|
|
11741
11741
|
} while (!d);
|
|
11742
11742
|
return p != e.length && u ? slc(e, 0, p) : e.subarray(0, p);
|
|
11743
11743
|
}, et = /* @__PURE__ */ new u8(0), b2 = function(n, t) {
|
|
@@ -11878,7 +11878,7 @@ var FBXTreeParser = (
|
|
|
11878
11878
|
}
|
|
11879
11879
|
}
|
|
11880
11880
|
return Promise.all(d).then(function(I) {
|
|
11881
|
-
var
|
|
11881
|
+
var B;
|
|
11882
11882
|
return {
|
|
11883
11883
|
scene: f,
|
|
11884
11884
|
textures: I,
|
|
@@ -11886,7 +11886,7 @@ var FBXTreeParser = (
|
|
|
11886
11886
|
upAxis: ["X", "Y", "Z"][y],
|
|
11887
11887
|
frontAxis: ["X", "Y", "Z"][v],
|
|
11888
11888
|
unitScale: E,
|
|
11889
|
-
animations: (
|
|
11889
|
+
animations: (B = f.animations) !== null && B !== void 0 ? B : [],
|
|
11890
11890
|
dispose: function() {
|
|
11891
11891
|
I.forEach(function(M) {
|
|
11892
11892
|
return M.dispose();
|
|
@@ -12435,12 +12435,12 @@ var FBXTreeParser = (
|
|
|
12435
12435
|
s || (console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."), s = !0);
|
|
12436
12436
|
var T = [0, 0, 0, 0], S = [0, 0, 0, 0];
|
|
12437
12437
|
E.forEach(function(w, C) {
|
|
12438
|
-
var I = w,
|
|
12439
|
-
S.forEach(function(M,
|
|
12438
|
+
var I = w, B = v[C];
|
|
12439
|
+
S.forEach(function(M, H, L) {
|
|
12440
12440
|
if (I > M) {
|
|
12441
|
-
L[
|
|
12442
|
-
var O = T[
|
|
12443
|
-
T[
|
|
12441
|
+
L[H] = I, I = M;
|
|
12442
|
+
var O = T[H];
|
|
12443
|
+
T[H] = B, B = O;
|
|
12444
12444
|
}
|
|
12445
12445
|
});
|
|
12446
12446
|
}), v = T, E = S;
|
|
@@ -12491,8 +12491,8 @@ var FBXTreeParser = (
|
|
|
12491
12491
|
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]);
|
|
12492
12492
|
});
|
|
12493
12493
|
}, w = 0, C = h; w < C.length; w++) {
|
|
12494
|
-
var I = C[w],
|
|
12495
|
-
R(
|
|
12494
|
+
var I = C[w], B = I[0], M = I[1], H = I[2];
|
|
12495
|
+
R(B, M, H);
|
|
12496
12496
|
}
|
|
12497
12497
|
}, n.prototype.addMorphTargets = function(t, e, r, o, s) {
|
|
12498
12498
|
if (o.length !== 0) {
|
|
@@ -13194,8 +13194,8 @@ function generateTransform(n) {
|
|
|
13194
13194
|
var w = new THREE.Matrix4().scale(new THREE.Vector3().setFromMatrixScale(h)), C = new THREE.Matrix4().getInverse(w), I = T.clone().multiply(C);
|
|
13195
13195
|
R.copy(v).multiply(y).multiply(I).multiply(S);
|
|
13196
13196
|
}
|
|
13197
|
-
var
|
|
13198
|
-
return p.copyPosition(O),
|
|
13197
|
+
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);
|
|
13198
|
+
return p.copyPosition(O), H = p.clone().multiply(R), H.premultiply(new THREE.Matrix4().getInverse(d)), H;
|
|
13199
13199
|
}
|
|
13200
13200
|
function getEulerOrder(n) {
|
|
13201
13201
|
n = n || 0;
|
|
@@ -13324,17 +13324,17 @@ function calcBasisFunctionDerivatives(n, t, e, r, o) {
|
|
|
13324
13324
|
for (var S = 1; S <= r; ++S) {
|
|
13325
13325
|
var R = 0, w = v - S, C = e - S;
|
|
13326
13326
|
v >= S && (T[b][0] = T[E][0] / c[C + 1][w], R = T[b][0] * c[w][C]);
|
|
13327
|
-
for (var I = w >= -1 ? 1 : -w,
|
|
13327
|
+
for (var I = w >= -1 ? 1 : -w, B = v - 1 <= C ? S - 1 : e - v, M = I; M <= B; ++M)
|
|
13328
13328
|
T[b][M] = (T[E][M] - T[E][M - 1]) / c[C + 1][w + M], R += T[b][M] * c[w + M][C];
|
|
13329
13329
|
v <= C && (T[b][S] = -T[E][S - 1] / c[C + 1][v], R += T[b][S] * c[v][C]), l[S][v] = R;
|
|
13330
13330
|
var h = E;
|
|
13331
13331
|
E = b, b = h;
|
|
13332
13332
|
}
|
|
13333
13333
|
}
|
|
13334
|
-
for (var
|
|
13334
|
+
for (var H = e, S = 1; S <= r; ++S) {
|
|
13335
13335
|
for (var h = 0; h <= e; ++h)
|
|
13336
|
-
l[S][h] *=
|
|
13337
|
-
|
|
13336
|
+
l[S][h] *= H;
|
|
13337
|
+
H *= e - S;
|
|
13338
13338
|
}
|
|
13339
13339
|
return l;
|
|
13340
13340
|
}
|
|
@@ -13429,7 +13429,7 @@ function loadX3p(n, t) {
|
|
|
13429
13429
|
});
|
|
13430
13430
|
}
|
|
13431
13431
|
function parse$1(n, t) {
|
|
13432
|
-
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,
|
|
13432
|
+
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, j, J, V, U, G, W, X, Z, Y, K, ee, te, ne, ie, ce, ae, de, ge, ye, xe, le = unzipSync(n), he = "", re = null, se = 0, pe = Object.keys(le); se < pe.length; se++) {
|
|
13433
13433
|
var me = pe[se];
|
|
13434
13434
|
/(^|\/)main\.xml$/i.test(me) && (re = le[me], he = me.slice(0, me.lastIndexOf("/") + 1));
|
|
13435
13435
|
}
|
|
@@ -13452,12 +13452,12 @@ function parse$1(n, t) {
|
|
|
13452
13452
|
},
|
|
13453
13453
|
z: {
|
|
13454
13454
|
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",
|
|
13455
|
-
dataType: (
|
|
13455
|
+
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",
|
|
13456
13456
|
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"),
|
|
13457
13457
|
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")
|
|
13458
13458
|
}
|
|
13459
13459
|
}, Te = null, Le = Ve.querySelector("Record1 Axes Rotation");
|
|
13460
|
-
Le && (Te = new THREE.Matrix3(), Te.set(Number((
|
|
13460
|
+
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((j = (z = Le.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && j !== void 0 ? j : 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((ne = (te = Le.querySelector("r32")) === null || te === void 0 ? void 0 : te.textContent) !== null && ne !== void 0 ? ne : 0), Number((ce = (ie = Le.querySelector("r33")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && ce !== void 0 ? ce : 0)));
|
|
13461
13461
|
var Ie = (ae = Ve.querySelector("Record3 DataLink PointDataLink")) === null || ae === void 0 ? void 0 : ae.textContent;
|
|
13462
13462
|
if (typeof Ie != "string")
|
|
13463
13463
|
throw new Error("X3p: PointDataLink not found.");
|
|
@@ -14079,27 +14079,27 @@ var BVHVector3 = (
|
|
|
14079
14079
|
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;
|
|
14080
14080
|
}
|
|
14081
14081
|
else {
|
|
14082
|
-
for (var S = 1 / 0, R = 1 / 0, w = 1 / 0, C = -1 / 0, I = -1 / 0,
|
|
14082
|
+
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) {
|
|
14083
14083
|
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;
|
|
14084
|
-
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 >
|
|
14084
|
+
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);
|
|
14085
14085
|
}
|
|
14086
|
-
o = [S, R, w, C, I,
|
|
14086
|
+
o = [S, R, w, C, I, B];
|
|
14087
14087
|
}
|
|
14088
14088
|
var M = new BVHNode(++d, o, 0, s, 0);
|
|
14089
14089
|
c[f++] = M;
|
|
14090
|
-
var
|
|
14091
|
-
return
|
|
14090
|
+
var H = [], L = [0, 1, 2], O = function(N, D) {
|
|
14091
|
+
return H[D] - H[N];
|
|
14092
14092
|
};
|
|
14093
14093
|
function F(N) {
|
|
14094
|
-
var D = N.startIndex,
|
|
14095
|
-
|
|
14096
|
-
for (var
|
|
14097
|
-
for (var
|
|
14098
|
-
W === -1 ? (X = u[
|
|
14099
|
-
if (
|
|
14100
|
-
var Z = new BVHNode(++d, calcExtents(u, l, D,
|
|
14094
|
+
var D = N.startIndex, q = N.endIndex, z = N.extents;
|
|
14095
|
+
H[0] = z[3] - z[0], H[1] = z[4] - z[1], H[2] = z[5] - z[2], L.sort(O);
|
|
14096
|
+
for (var j = 0; j < 3; j++) {
|
|
14097
|
+
for (var J = L[j], V = z[J] + z[J + 3], U = D, G = q - 1, W = -1, X = void 0; U <= G; )
|
|
14098
|
+
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--);
|
|
14099
|
+
if (U > D && U < q) {
|
|
14100
|
+
var Z = new BVHNode(++d, calcExtents(u, l, D, U, EPSILON$1), D, U, N.deepth + 1);
|
|
14101
14101
|
Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z);
|
|
14102
|
-
var Y = new BVHNode(++d, calcExtents(u, l,
|
|
14102
|
+
var Y = new BVHNode(++d, calcExtents(u, l, U, q, EPSILON$1), U, q, N.deepth + 1);
|
|
14103
14103
|
Y.deepth < r && Y.endIndex - Y.startIndex > e && (c[f++] = Y), N.node0 = Z, N.node1 = Y, N.startIndex = 0, N.endIndex = 0;
|
|
14104
14104
|
break;
|
|
14105
14105
|
}
|
|
@@ -14132,27 +14132,27 @@ var BVHVector3 = (
|
|
|
14132
14132
|
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];
|
|
14133
14133
|
var b = intersectNodeBox(e, m, y, o);
|
|
14134
14134
|
if (b !== null && !(s && b > v)) {
|
|
14135
|
-
for (var T = e.x, S = e.y, R = e.z, w = r.x, C = r.y, I = r.z,
|
|
14136
|
-
var L = c[
|
|
14135
|
+
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++) {
|
|
14136
|
+
var L = c[H], O = L * 3, F = new BVHVector3(0, 0, 0);
|
|
14137
14137
|
this.getPositionByIndex(O, F);
|
|
14138
|
-
var N = F.x, D = F.y,
|
|
14138
|
+
var N = F.x, D = F.y, q = F.z, z = new BVHVector3(0, 0, 0);
|
|
14139
14139
|
this.getPositionByIndex(O + 1, z);
|
|
14140
|
-
var
|
|
14141
|
-
this.getPositionByIndex(O + 2,
|
|
14142
|
-
var
|
|
14140
|
+
var j = z.x, J = z.y, V = z.z, U = new BVHVector3(0, 0, 0);
|
|
14141
|
+
this.getPositionByIndex(O + 2, U);
|
|
14142
|
+
var G = U.x, W = U.y, X = U.z, Z = j - N, Y = J - D, K = V - q, ee = G - N, te = W - D, ne = X - q, ie = Y * ne - K * te, ce = K * ee - Z * ne, ae = Z * te - Y * ee, de = w * ie + C * ce + I * ae, ge = void 0;
|
|
14143
14143
|
if (de > 0)
|
|
14144
14144
|
ge = 1;
|
|
14145
14145
|
else if (de < 0)
|
|
14146
14146
|
ge = -1, de = -de;
|
|
14147
14147
|
else
|
|
14148
14148
|
continue;
|
|
14149
|
-
var ye = T - N, xe = S - D, le = R -
|
|
14149
|
+
var ye = T - N, xe = S - D, le = R - q, he = ge * (w * (xe * ne - le * te) + C * (le * ee - ye * ne) + I * (ye * te - xe * ee));
|
|
14150
14150
|
if (!(he < 0)) {
|
|
14151
|
-
var re = ge * (w * (Y * le -
|
|
14151
|
+
var re = ge * (w * (Y * le - K * xe) + C * (K * ye - Z * le) + I * (Z * xe - Y * ye));
|
|
14152
14152
|
if (!(re < 0) && !(he + re > de)) {
|
|
14153
14153
|
var se = -ge * (ye * ie + xe * ce + le * ae);
|
|
14154
14154
|
if (!(se < 0)) {
|
|
14155
|
-
var pe = se / de, me = new BVHVector3(T + w * pe, S + C * pe, R + I * pe), Ne = new BVHIntersect(F, z,
|
|
14155
|
+
var pe = se / de, me = new BVHVector3(T + w * pe, S + C * pe, R + I * pe), Ne = new BVHIntersect(F, z, U, L, me);
|
|
14156
14156
|
(!u || u(Ne)) && (s ? pe < v && (v = pe, l.length > 0 && (l.length = 0), l.push(Ne)) : l.push(Ne));
|
|
14157
14157
|
}
|
|
14158
14158
|
}
|
|
@@ -14209,27 +14209,27 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
|
|
|
14209
14209
|
}
|
|
14210
14210
|
var S = new BVHNode(++d, o, 0, u, 0);
|
|
14211
14211
|
c[f++] = S;
|
|
14212
|
-
var R = [], w = [0, 1, 2], C = function(
|
|
14213
|
-
return R[M] - R[
|
|
14212
|
+
var R = [], w = [0, 1, 2], C = function(B, M) {
|
|
14213
|
+
return R[M] - R[B];
|
|
14214
14214
|
};
|
|
14215
|
-
function I(
|
|
14216
|
-
var M =
|
|
14215
|
+
function I(B) {
|
|
14216
|
+
var M = B.startIndex, H = B.endIndex, L = B.extents;
|
|
14217
14217
|
R[0] = L[3] - L[0], R[1] = L[4] - L[1], R[2] = L[5] - L[2];
|
|
14218
|
-
for (var O = w.sort(C)[0], F = ORDER_AXISES[O], N = (L[O] + L[O + 3]) / 2, D = M,
|
|
14219
|
-
z === -1 ? (
|
|
14218
|
+
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, j; D <= q; )
|
|
14219
|
+
z === -1 ? (j = l[D], s(j, scratchVector3$8), scratchVector3$8[F] < N ? D++ : z = j) : (j = l[q], s(j, scratchVector3$8), scratchVector3$8[F] >= N || (l[D] = j, l[q] = z, z = -1, D++), q--);
|
|
14220
14220
|
if (D > M) {
|
|
14221
|
-
var
|
|
14222
|
-
|
|
14223
|
-
var
|
|
14224
|
-
|
|
14221
|
+
var J = L.slice();
|
|
14222
|
+
J[O + 3] = N + EPSILON;
|
|
14223
|
+
var V = new BVHNode(++d, J, M, D, B.deepth + 1);
|
|
14224
|
+
V.deepth < r && V.endIndex - V.startIndex > e && (c[f++] = V), B.node0 = V;
|
|
14225
14225
|
}
|
|
14226
|
-
if (
|
|
14227
|
-
var
|
|
14228
|
-
|
|
14229
|
-
var
|
|
14230
|
-
|
|
14226
|
+
if (H > D) {
|
|
14227
|
+
var U = L.slice();
|
|
14228
|
+
U[O] = N - EPSILON;
|
|
14229
|
+
var G = new BVHNode(++d, U, D, H, B.deepth + 1);
|
|
14230
|
+
G.deepth < r && G.endIndex - G.startIndex > e && (c[f++] = G), B.node1 = G;
|
|
14231
14231
|
}
|
|
14232
|
-
|
|
14232
|
+
B.startIndex = 0, B.endIndex = 0;
|
|
14233
14233
|
}
|
|
14234
14234
|
for (; f; )
|
|
14235
14235
|
I(c[--f]);
|
|
@@ -14244,14 +14244,14 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
|
|
|
14244
14244
|
for (var S = h[b + 6], R = h[b + 7], w = S; w < R; w++) {
|
|
14245
14245
|
var C = c[w], I = new BVHVector3(0, 0, 0);
|
|
14246
14246
|
this.getPositionByIndex(C, I);
|
|
14247
|
-
var
|
|
14248
|
-
if (z > 0 ? (L += N * z, O += D * z, F +=
|
|
14249
|
-
var
|
|
14250
|
-
(!u || u(
|
|
14247
|
+
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);
|
|
14248
|
+
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) {
|
|
14249
|
+
var j = new BVHVector3(L, O, F), J = new BVHIntersect(I, I, I, C, j);
|
|
14250
|
+
(!u || u(J)) && (s ? z < E && (E = z, l.length > 0 && (l.length = 0), l.push(J)) : l.push(J));
|
|
14251
14251
|
}
|
|
14252
14252
|
}
|
|
14253
|
-
var
|
|
14254
|
-
|
|
14253
|
+
var V = y * BYTES_PER_NODE / 2, U = p[V + 16], G = p[V + 17];
|
|
14254
|
+
U && g.push(U), G && g.push(G);
|
|
14255
14255
|
}
|
|
14256
14256
|
}
|
|
14257
14257
|
return l;
|
|
@@ -14304,21 +14304,21 @@ function raycastMesh(n, t, e, r) {
|
|
|
14304
14304
|
S = d;
|
|
14305
14305
|
if (!S)
|
|
14306
14306
|
return !1;
|
|
14307
|
-
var I = v.intersectionPoint,
|
|
14307
|
+
var I = v.intersectionPoint, B = new THREE.Vector3(I.x, I.y, I.z).applyMatrix4(u), M = e.ray.origin.distanceTo(B);
|
|
14308
14308
|
if (M < e.near || M > e.far)
|
|
14309
14309
|
return !1;
|
|
14310
|
-
var
|
|
14310
|
+
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);
|
|
14311
14311
|
if (S.side === THREE.FrontSide && N >= 0 || S.side === THREE.BackSide && N <= 0)
|
|
14312
14312
|
return !1;
|
|
14313
|
-
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),
|
|
14313
|
+
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 = {
|
|
14314
14314
|
distance: M,
|
|
14315
14315
|
object: n,
|
|
14316
14316
|
face: D,
|
|
14317
|
-
point:
|
|
14317
|
+
point: B,
|
|
14318
14318
|
distanceToRay: 0,
|
|
14319
14319
|
faceIndex: b
|
|
14320
14320
|
};
|
|
14321
|
-
return intersectsMap.set(v,
|
|
14321
|
+
return intersectsMap.set(v, q), l(q);
|
|
14322
14322
|
}), A = m.length, g = 0; g < A; g++) {
|
|
14323
14323
|
var y = intersectsMap.get(m[g]);
|
|
14324
14324
|
y && r.push(y);
|
|
@@ -14334,18 +14334,18 @@ function raycastPoints(n, t, e, r) {
|
|
|
14334
14334
|
var S = T.intersectionPoint, R = new THREE.Vector3(S.x, S.y, S.z).applyMatrix4(c), w = e.ray.origin.distanceTo(R);
|
|
14335
14335
|
if (w < e.near || w > e.far)
|
|
14336
14336
|
return !1;
|
|
14337
|
-
var C = T.pointA, I = scratchIntersectionFaceA.set(C.x, C.y, C.z).applyMatrix4(c),
|
|
14337
|
+
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;
|
|
14338
14338
|
if (g) {
|
|
14339
14339
|
var L = new THREE.Vector3().fromBufferAttribute(A, M).applyNormalMatrix(scratchNormalMatrix);
|
|
14340
|
-
|
|
14340
|
+
H = new THREE.Face3(M, M, M, L);
|
|
14341
14341
|
}
|
|
14342
14342
|
var O = {
|
|
14343
14343
|
distance: w,
|
|
14344
14344
|
object: n,
|
|
14345
|
-
face:
|
|
14345
|
+
face: H,
|
|
14346
14346
|
point: R,
|
|
14347
14347
|
distanceToRay: R.distanceTo(I),
|
|
14348
|
-
index:
|
|
14348
|
+
index: B
|
|
14349
14349
|
};
|
|
14350
14350
|
return intersectsMap.set(T, O), d(O);
|
|
14351
14351
|
}), v = y.length, E = 0; E < v; E++) {
|
|
@@ -15393,10 +15393,10 @@ var _object_pattern = /^[og]\s*(.+)?/, _material_library_pattern = /^mtllib /, _
|
|
|
15393
15393
|
(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);
|
|
15394
15394
|
var w = [A, T, v].join(":"), C = d.indexMap[w];
|
|
15395
15395
|
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);
|
|
15396
|
-
var I = [g, S, E].join(":"),
|
|
15397
|
-
|
|
15398
|
-
var M = [y, R, b].join(":"),
|
|
15399
|
-
|
|
15396
|
+
var I = [g, S, E].join(":"), B = d.indexMap[I];
|
|
15397
|
+
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);
|
|
15398
|
+
var M = [y, R, b].join(":"), H = d.indexMap[M];
|
|
15399
|
+
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);
|
|
15400
15400
|
}, n;
|
|
15401
15401
|
})()
|
|
15402
15402
|
);
|
|
@@ -15536,23 +15536,23 @@ function build(n, t) {
|
|
|
15536
15536
|
return g.dispose();
|
|
15537
15537
|
}), 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();
|
|
15538
15538
|
for (var y = [], v = function(R, w) {
|
|
15539
|
-
var C = m[R], I = C.name + "_" + C.smooth + "_" + A,
|
|
15540
|
-
if (!
|
|
15541
|
-
for (var M = null,
|
|
15542
|
-
var O = L[
|
|
15539
|
+
var C = m[R], I = C.name + "_" + C.smooth + "_" + A, B = n.materials[I];
|
|
15540
|
+
if (!B) {
|
|
15541
|
+
for (var M = null, H = 0, L = t; H < L.length; H++) {
|
|
15542
|
+
var O = L[H], F = O.name, N = O.create;
|
|
15543
15543
|
F === C.mtllib && (M = N(C.name));
|
|
15544
15544
|
}
|
|
15545
15545
|
if (!M) {
|
|
15546
15546
|
var D = new PBMMeshMaterial();
|
|
15547
15547
|
M = [D, Promise.resolve([])];
|
|
15548
15548
|
}
|
|
15549
|
-
|
|
15550
|
-
var
|
|
15551
|
-
r.push(
|
|
15552
|
-
return
|
|
15549
|
+
B = M[0], B.name = C.name, B.flatShading = !(C.smooth || g.attributes.normal), B.vertexColors = A, n.materials[I] = B;
|
|
15550
|
+
var q = M[1];
|
|
15551
|
+
r.push(q), o.push(function() {
|
|
15552
|
+
return B.dispose();
|
|
15553
15553
|
});
|
|
15554
15554
|
}
|
|
15555
|
-
y.push(
|
|
15555
|
+
y.push(B);
|
|
15556
15556
|
}, E = 0, b = m.length; E < b; E++)
|
|
15557
15557
|
v(E);
|
|
15558
15558
|
g.clearGroups();
|
|
@@ -15999,8 +15999,8 @@ function createPipeBufferGeometry(n, t, e, r) {
|
|
|
15999
15999
|
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);
|
|
16000
16000
|
l[S] = R, l[S + 1] = w, l[S + 2] = I, l[S + 3] = w, l[S + 4] = C, l[S + 5] = I;
|
|
16001
16001
|
}
|
|
16002
|
-
var
|
|
16003
|
-
return
|
|
16002
|
+
var B = new THREE.BufferGeometry();
|
|
16003
|
+
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;
|
|
16004
16004
|
}
|
|
16005
16005
|
function parseTrajectoryObject(n, t) {
|
|
16006
16006
|
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) {
|
|
@@ -16048,8 +16048,8 @@ function parseTrajectoryObject(n, t) {
|
|
|
16048
16048
|
side: THREE.FrontSide
|
|
16049
16049
|
});
|
|
16050
16050
|
I.uniforms.displacementScalar.value = -0.01, I.uniforms.diffuse.value = r;
|
|
16051
|
-
var
|
|
16052
|
-
|
|
16051
|
+
var B = new THREE.Mesh(w, [C, I]);
|
|
16052
|
+
B.position.fromArray(n, 0), T.add(B);
|
|
16053
16053
|
var M = new THREE.ShaderMaterial({
|
|
16054
16054
|
vertexShader: TRAJECTOR_SPHERE_SHADER.vertexShader,
|
|
16055
16055
|
fragmentShader: TRAJECTOR_SPHERE_SHADER.fragmentShader,
|
|
@@ -16057,8 +16057,8 @@ function parseTrajectoryObject(n, t) {
|
|
|
16057
16057
|
side: THREE.FrontSide
|
|
16058
16058
|
});
|
|
16059
16059
|
M.uniforms.displacementScalar.value = -0.01, M.uniforms.diffuse.value = o;
|
|
16060
|
-
var
|
|
16061
|
-
return
|
|
16060
|
+
var H = new THREE.Mesh(w, [C, M]);
|
|
16061
|
+
return H.position.fromArray(n, n.length - 3), T.add(H), {
|
|
16062
16062
|
scene: T,
|
|
16063
16063
|
dispose: function() {
|
|
16064
16064
|
y.dispose(), v.dispose(), E.dispose(), b.dispose(), w.dispose(), C.dispose(), I.dispose(), M.dispose();
|
|
@@ -16419,8 +16419,8 @@ var Tile3D = (
|
|
|
16419
16419
|
if (C) {
|
|
16420
16420
|
var I = new THREE.Vector3();
|
|
16421
16421
|
g.pano0 && I.setFromMatrixPosition(g.pano0.matrix);
|
|
16422
|
-
var
|
|
16423
|
-
g.pano1 &&
|
|
16422
|
+
var B = I.clone();
|
|
16423
|
+
g.pano1 && B.setFromMatrixPosition(g.pano1.matrix), I.distanceTo(B) < 10 && (w = !0);
|
|
16424
16424
|
}
|
|
16425
16425
|
}
|
|
16426
16426
|
if (w || this.tileset.update(S, R), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(re) {
|
|
@@ -16452,28 +16452,28 @@ var Tile3D = (
|
|
|
16452
16452
|
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(re, se) {
|
|
16453
16453
|
return re.floor !== se.floor ? re.floor - se.floor : re.levelOfContent !== se.levelOfContent ? se.levelOfContent - re.levelOfContent : re.state.distanceToCamera !== se.state.distanceToCamera ? re.state.distanceToCamera - se.state.distanceToCamera : re.state.centerZDepth - se.state.centerZDepth;
|
|
16454
16454
|
});
|
|
16455
|
-
for (var
|
|
16455
|
+
for (var H = [], L = 0, O = this.tileset.selectedTiles; L < O.length; L++) {
|
|
16456
16456
|
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;
|
|
16457
16457
|
if (N) {
|
|
16458
16458
|
var D = N.update(e, r, o, this, F, g);
|
|
16459
|
-
if (
|
|
16459
|
+
if (H.push(F.id), D && (A = !0), this.tileset.hasMixedContent && S.skipLevelOfDetail) {
|
|
16460
16460
|
if (!F.state.finalResolution) {
|
|
16461
|
-
var
|
|
16462
|
-
|
|
16461
|
+
var q = cloneSkipBackfaceObject(N);
|
|
16462
|
+
q.name = "skipBackface:" + N.name, this.backfaceObjects.push(q);
|
|
16463
16463
|
}
|
|
16464
|
-
for (var z = F.state.selectionDepth,
|
|
16464
|
+
for (var z = F.state.selectionDepth, j = 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++) {
|
|
16465
16465
|
var Z = X[W];
|
|
16466
|
-
Z.stencilWrite = !0, Z.stencilRef =
|
|
16466
|
+
Z.stencilWrite = !0, Z.stencilRef = j, Z.stencilFunc = J, Z.stencilFuncMask = V, Z.stencilZPass = U, Z.stencilWriteMask = G;
|
|
16467
16467
|
}
|
|
16468
16468
|
} else
|
|
16469
|
-
for (var Y = 0,
|
|
16470
|
-
var Z =
|
|
16469
|
+
for (var Y = 0, K = N.materials; Y < K.length; Y++) {
|
|
16470
|
+
var Z = K[Y];
|
|
16471
16471
|
Z.stencilWrite = !1, Z.stencilRef = STENCIL_CONSTANT.TILE_MASK, Z.stencilFunc = THREE.AlwaysStencilFunc, Z.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, Z.stencilZPass = THREE.ReplaceStencilOp, Z.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
|
|
16472
16472
|
}
|
|
16473
16473
|
this.tileObjects.push(N);
|
|
16474
16474
|
}
|
|
16475
16475
|
}
|
|
16476
|
-
var ee =
|
|
16476
|
+
var ee = H.toString();
|
|
16477
16477
|
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);
|
|
16478
16478
|
for (var te = [], ne = 0, ie = this.tileset.selectedTrajectories; ne < ie.length; ne++) {
|
|
16479
16479
|
var ce = ie[ne], ae = (h = ce.content.data) === null || h === void 0 ? void 0 : h.object;
|
|
@@ -17080,10 +17080,10 @@ function mergeVertices(n, t) {
|
|
|
17080
17080
|
else {
|
|
17081
17081
|
for (var T = 0, m = l.length; T < m; T++)
|
|
17082
17082
|
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++) {
|
|
17083
|
-
var
|
|
17084
|
-
if (C.push(S[
|
|
17085
|
-
for (var M = 0,
|
|
17086
|
-
I[M].push(g[M][
|
|
17083
|
+
var B = h[w];
|
|
17084
|
+
if (C.push(S[B](E)), g)
|
|
17085
|
+
for (var M = 0, H = g.length; M < H; M++)
|
|
17086
|
+
I[M].push(g[M][B](E));
|
|
17087
17087
|
}
|
|
17088
17088
|
e[b] = u, d.push(u), u++;
|
|
17089
17089
|
}
|
|
@@ -17107,13 +17107,13 @@ function getEdgesBySphere(n, t, e) {
|
|
|
17107
17107
|
var f, d, h, p = (d = (f = c.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
|
|
17108
17108
|
if (p && p.visible) {
|
|
17109
17109
|
var m = [];
|
|
17110
|
-
if (p.traverseVisible(function(
|
|
17111
|
-
if (
|
|
17112
|
-
var
|
|
17113
|
-
if (
|
|
17114
|
-
scratchMatrix4$1.copy(
|
|
17115
|
-
var
|
|
17116
|
-
|
|
17110
|
+
if (p.traverseVisible(function(J) {
|
|
17111
|
+
if (J instanceof THREE.Mesh) {
|
|
17112
|
+
var V = getBvhTreeForMesh(J);
|
|
17113
|
+
if (V) {
|
|
17114
|
+
scratchMatrix4$1.copy(J.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
|
|
17115
|
+
var U = V.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), G = new THREE.BufferGeometry();
|
|
17116
|
+
G.setAttribute("position", new THREE.BufferAttribute(U, 3)), G.applyMatrix4(J.matrixWorld), G = mergeVertices(G, 0.01), m.push(G);
|
|
17117
17117
|
}
|
|
17118
17118
|
}
|
|
17119
17119
|
}), m.length === 0)
|
|
@@ -17123,19 +17123,19 @@ function getEdgesBySphere(n, t, e) {
|
|
|
17123
17123
|
E.push(R);
|
|
17124
17124
|
}
|
|
17125
17125
|
for (var T = 0, S = v.length; T < S; T += 3) {
|
|
17126
|
-
var w = v[T], C = v[T + 1], I = v[T + 2],
|
|
17127
|
-
b.push({ a: w, b: C, c: I, normal:
|
|
17126
|
+
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();
|
|
17127
|
+
b.push({ a: w, b: C, c: I, normal: B });
|
|
17128
17128
|
}
|
|
17129
17129
|
for (var M = {}, T = 0, S = b.length; T < S; T++)
|
|
17130
|
-
for (var
|
|
17131
|
-
var O =
|
|
17130
|
+
for (var H = b[T], L = 0; L < 3; L++) {
|
|
17131
|
+
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];
|
|
17132
17132
|
M[D] === void 0 ? M[D] = { index1: N[0], index2: N[1], face1: T } : M[D].face2 = T;
|
|
17133
17133
|
}
|
|
17134
17134
|
for (var D in M) {
|
|
17135
|
-
var
|
|
17136
|
-
if (
|
|
17137
|
-
var z = E[
|
|
17138
|
-
o.push(new THREE.Line3(z,
|
|
17135
|
+
var q = M[D];
|
|
17136
|
+
if (q.face2 === void 0 || b[q.face1].normal.dot(b[q.face2].normal) <= r) {
|
|
17137
|
+
var z = E[q.index1], j = E[q.index2];
|
|
17138
|
+
o.push(new THREE.Line3(z, j));
|
|
17139
17139
|
}
|
|
17140
17140
|
}
|
|
17141
17141
|
E.length = 0, b.length = 0;
|
|
@@ -17879,32 +17879,32 @@ function parse(n, t) {
|
|
|
17879
17879
|
writable: !1,
|
|
17880
17880
|
value: Object.freeze(T.allowHosts)
|
|
17881
17881
|
});
|
|
17882
|
-
var
|
|
17883
|
-
return jsonMerge(
|
|
17882
|
+
var B = b.reduce(function(U, G) {
|
|
17883
|
+
return jsonMerge(U, G);
|
|
17884
17884
|
});
|
|
17885
17885
|
defineProperty(t, "name", {
|
|
17886
17886
|
enumerable: !0,
|
|
17887
17887
|
configurable: !1,
|
|
17888
17888
|
writable: !1,
|
|
17889
|
-
value: String((e =
|
|
17889
|
+
value: String((e = B.name) !== null && e !== void 0 ? e : "Unknown")
|
|
17890
17890
|
}), defineProperty(t, "workCode", {
|
|
17891
17891
|
enumerable: !0,
|
|
17892
17892
|
writable: !0,
|
|
17893
|
-
value: String(
|
|
17893
|
+
value: String(B.resource_code || B.basic_code || B.vr_code || B.code || B.project_id || B.work_code || B.workCode || createUuid())
|
|
17894
17894
|
}), defineProperty(t, "projectId", {
|
|
17895
17895
|
enumerable: !0,
|
|
17896
17896
|
writable: !0,
|
|
17897
|
-
value:
|
|
17897
|
+
value: B.project_id
|
|
17898
17898
|
}), defineProperty(t, "baseURL", {
|
|
17899
17899
|
enumerable: !0,
|
|
17900
17900
|
writable: !0,
|
|
17901
17901
|
value: (function() {
|
|
17902
|
-
var
|
|
17903
|
-
return
|
|
17902
|
+
var U, G = (U = B.base_url) !== null && U !== void 0 ? U : "";
|
|
17903
|
+
return G && G[G.length - 1] !== "/" && (G += "/"), G;
|
|
17904
17904
|
})()
|
|
17905
17905
|
});
|
|
17906
17906
|
var M = void 0;
|
|
17907
|
-
typeof
|
|
17907
|
+
typeof B.model == "object" && (M = {}, defineProperty(M, "work", {
|
|
17908
17908
|
enumerable: !1,
|
|
17909
17909
|
configurable: !1,
|
|
17910
17910
|
writable: !1,
|
|
@@ -17914,36 +17914,36 @@ function parse(n, t) {
|
|
|
17914
17914
|
configurable: !1,
|
|
17915
17915
|
writable: !1,
|
|
17916
17916
|
value: (function() {
|
|
17917
|
-
var
|
|
17918
|
-
if (
|
|
17919
|
-
return relativeURL(
|
|
17917
|
+
var U = B.model.file_url;
|
|
17918
|
+
if (U)
|
|
17919
|
+
return relativeURL(U, t.baseURL);
|
|
17920
17920
|
})()
|
|
17921
17921
|
}), defineProperty(M, "textureBase", {
|
|
17922
17922
|
enumerable: !0,
|
|
17923
17923
|
configurable: !1,
|
|
17924
17924
|
writable: !1,
|
|
17925
17925
|
value: (function() {
|
|
17926
|
-
var
|
|
17927
|
-
return
|
|
17926
|
+
var U = B.model.material_base_url;
|
|
17927
|
+
return U && (U = relativeURL(U, t.baseURL)), U;
|
|
17928
17928
|
})()
|
|
17929
17929
|
}), defineProperty(M, "textures", {
|
|
17930
17930
|
enumerable: !0,
|
|
17931
17931
|
configurable: !1,
|
|
17932
17932
|
writable: !1,
|
|
17933
17933
|
value: (function() {
|
|
17934
|
-
var
|
|
17935
|
-
return Array.isArray(
|
|
17934
|
+
var U = void 0;
|
|
17935
|
+
return Array.isArray(B.model.material_textures) && (U = B.model.material_textures.slice(), Object.freeze(U)), U;
|
|
17936
17936
|
})()
|
|
17937
17937
|
}), defineProperty(M, "layers", {
|
|
17938
17938
|
enumerable: !0,
|
|
17939
17939
|
configurable: !1,
|
|
17940
17940
|
writable: !1,
|
|
17941
17941
|
value: (function() {
|
|
17942
|
-
var
|
|
17943
|
-
if (Array.isArray(
|
|
17944
|
-
for (var Z = 0, Y =
|
|
17945
|
-
var
|
|
17946
|
-
if (
|
|
17942
|
+
var U, G, W, X = [];
|
|
17943
|
+
if (Array.isArray(B.model.layers))
|
|
17944
|
+
for (var Z = 0, Y = B.model.layers; Z < Y.length; Z++) {
|
|
17945
|
+
var K = Y[Z];
|
|
17946
|
+
if (K && K.tileset_url) {
|
|
17947
17947
|
var ee = {};
|
|
17948
17948
|
defineProperty(ee, "work", {
|
|
17949
17949
|
enumerable: !1,
|
|
@@ -17954,28 +17954,28 @@ function parse(n, t) {
|
|
|
17954
17954
|
enumerable: !0,
|
|
17955
17955
|
configurable: !1,
|
|
17956
17956
|
writable: !1,
|
|
17957
|
-
value: (
|
|
17957
|
+
value: (U = K.name) !== null && U !== void 0 ? U : ""
|
|
17958
17958
|
}), defineProperty(ee, "type", {
|
|
17959
17959
|
enumerable: !0,
|
|
17960
17960
|
configurable: !1,
|
|
17961
17961
|
writable: !1,
|
|
17962
|
-
value: (
|
|
17962
|
+
value: (G = K.type) !== null && G !== void 0 ? G : "mesh"
|
|
17963
17963
|
}), defineProperty(ee, "upAxis", {
|
|
17964
17964
|
enumerable: !0,
|
|
17965
17965
|
configurable: !1,
|
|
17966
17966
|
writable: !1,
|
|
17967
|
-
value: (W =
|
|
17967
|
+
value: (W = K.up_axis) !== null && W !== void 0 ? W : "Z"
|
|
17968
17968
|
}), defineProperty(ee, "tileset", {
|
|
17969
17969
|
enumerable: !0,
|
|
17970
17970
|
configurable: !1,
|
|
17971
17971
|
writable: !1,
|
|
17972
|
-
value: relativeURL(
|
|
17972
|
+
value: relativeURL(K.tileset_url, t.baseURL)
|
|
17973
17973
|
}), X.push(ee);
|
|
17974
17974
|
}
|
|
17975
17975
|
}
|
|
17976
|
-
if (typeof
|
|
17977
|
-
var
|
|
17978
|
-
if (
|
|
17976
|
+
if (typeof B.model.tiles == "object") {
|
|
17977
|
+
var K = B.model.tiles;
|
|
17978
|
+
if (K && K.tileset_url) {
|
|
17979
17979
|
var ee = {};
|
|
17980
17980
|
defineProperty(ee, "work", {
|
|
17981
17981
|
enumerable: !1,
|
|
@@ -18001,7 +18001,7 @@ function parse(n, t) {
|
|
|
18001
18001
|
enumerable: !0,
|
|
18002
18002
|
configurable: !1,
|
|
18003
18003
|
writable: !1,
|
|
18004
|
-
value: relativeURL(
|
|
18004
|
+
value: relativeURL(K.tileset_url, t.baseURL)
|
|
18005
18005
|
}), X.push(ee);
|
|
18006
18006
|
}
|
|
18007
18007
|
}
|
|
@@ -18013,10 +18013,10 @@ function parse(n, t) {
|
|
|
18013
18013
|
writable: !1,
|
|
18014
18014
|
value: M
|
|
18015
18015
|
});
|
|
18016
|
-
var
|
|
18017
|
-
if (Array.isArray(
|
|
18018
|
-
for (var L =
|
|
18019
|
-
var
|
|
18016
|
+
var H = [];
|
|
18017
|
+
if (Array.isArray(B.observers) && B.panorama && Array.isArray(B.panorama.list || B.panorama.info))
|
|
18018
|
+
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) {
|
|
18019
|
+
var G = L[U], W = O[U], X = {};
|
|
18020
18020
|
defineProperty(X, "work", {
|
|
18021
18021
|
enumerable: !1,
|
|
18022
18022
|
configurable: !1,
|
|
@@ -18026,62 +18026,62 @@ function parse(n, t) {
|
|
|
18026
18026
|
enumerable: !0,
|
|
18027
18027
|
configurable: !1,
|
|
18028
18028
|
writable: !1,
|
|
18029
|
-
value:
|
|
18029
|
+
value: U
|
|
18030
18030
|
}), defineProperty(X, "panoIndex", {
|
|
18031
18031
|
enumerable: !0,
|
|
18032
18032
|
configurable: !1,
|
|
18033
18033
|
writable: !1,
|
|
18034
|
-
value:
|
|
18034
|
+
value: U
|
|
18035
18035
|
}), defineProperty(X, "panoId", {
|
|
18036
18036
|
enumerable: !0,
|
|
18037
18037
|
configurable: !1,
|
|
18038
18038
|
writable: !1,
|
|
18039
|
-
value: panoStringify({ workCode: t.workCode, panoIndex:
|
|
18039
|
+
value: panoStringify({ workCode: t.workCode, panoIndex: U })
|
|
18040
18040
|
}), defineProperty(X, "derivedId", {
|
|
18041
18041
|
enumerable: !0,
|
|
18042
18042
|
configurable: !1,
|
|
18043
18043
|
writable: !1,
|
|
18044
|
-
value: (d =
|
|
18044
|
+
value: (d = G.derived_id) !== null && d !== void 0 ? d : W.derived_id
|
|
18045
18045
|
}), defineProperty(X, "floorIndex", {
|
|
18046
18046
|
enumerable: !0,
|
|
18047
18047
|
configurable: !1,
|
|
18048
18048
|
writable: !1,
|
|
18049
|
-
value: (h =
|
|
18049
|
+
value: (h = G.floor_index) !== null && h !== void 0 ? h : G.floor
|
|
18050
18050
|
}), defineProperty(X, "derivedId", {
|
|
18051
18051
|
enumerable: !0,
|
|
18052
18052
|
configurable: !1,
|
|
18053
18053
|
writable: !1,
|
|
18054
|
-
value: (p =
|
|
18054
|
+
value: (p = G.derived_id) !== null && p !== void 0 ? p : W.derived_id
|
|
18055
18055
|
}), defineProperty(X, "derivedIdStr", {
|
|
18056
18056
|
enumerable: !0,
|
|
18057
18057
|
configurable: !1,
|
|
18058
18058
|
writable: !1,
|
|
18059
|
-
value: (m =
|
|
18059
|
+
value: (m = G.derived_id_str) !== null && m !== void 0 ? m : W.derived_id_str
|
|
18060
18060
|
}), defineProperty(X, "active", {
|
|
18061
18061
|
enumerable: !0,
|
|
18062
18062
|
configurable: !1,
|
|
18063
18063
|
writable: !1,
|
|
18064
|
-
value:
|
|
18064
|
+
value: G.active !== !1 && W.active !== !1
|
|
18065
18065
|
}), defineProperty(X, "loadable", {
|
|
18066
18066
|
enumerable: !0,
|
|
18067
18067
|
configurable: !1,
|
|
18068
18068
|
writable: !1,
|
|
18069
|
-
value: (g = (A =
|
|
18069
|
+
value: (g = (A = G.active) !== null && A !== void 0 ? A : W.active) !== null && g !== void 0 ? g : !1
|
|
18070
18070
|
}), defineProperty(X, "position", {
|
|
18071
18071
|
enumerable: !0,
|
|
18072
18072
|
configurable: !1,
|
|
18073
18073
|
writable: !1,
|
|
18074
|
-
value: Object.freeze(new THREE.Vector3().fromArray((y =
|
|
18074
|
+
value: Object.freeze(new THREE.Vector3().fromArray((y = G.position) !== null && y !== void 0 ? y : [0, 0, 0]))
|
|
18075
18075
|
}), defineProperty(X, "standingPosition", {
|
|
18076
18076
|
enumerable: !0,
|
|
18077
18077
|
configurable: !1,
|
|
18078
18078
|
writable: !1,
|
|
18079
|
-
value: Object.freeze(new THREE.Vector3().fromArray((E = (v =
|
|
18079
|
+
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]))
|
|
18080
18080
|
}), defineProperty(X, "quaternion", {
|
|
18081
18081
|
enumerable: !0,
|
|
18082
18082
|
configurable: !1,
|
|
18083
18083
|
writable: !1,
|
|
18084
|
-
value: Object.freeze(new THREE.Quaternion().fromArray(
|
|
18084
|
+
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]))
|
|
18085
18085
|
}), defineProperty(X, "matrix", {
|
|
18086
18086
|
enumerable: !0,
|
|
18087
18087
|
configurable: !1,
|
|
@@ -18092,26 +18092,26 @@ function parse(n, t) {
|
|
|
18092
18092
|
configurable: !1,
|
|
18093
18093
|
writable: !1,
|
|
18094
18094
|
value: (function() {
|
|
18095
|
-
var Z, Y,
|
|
18095
|
+
var Z, Y, K = ((Y = (Z = G.accessible_nodes) !== null && Z !== void 0 ? Z : G.accessibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
|
|
18096
18096
|
return te < N;
|
|
18097
18097
|
});
|
|
18098
|
-
if (
|
|
18098
|
+
if (K.length === 0)
|
|
18099
18099
|
for (var ee = 0; ee < N; ee++)
|
|
18100
|
-
ee !==
|
|
18101
|
-
return Object.freeze(
|
|
18100
|
+
ee !== U && K.push(ee);
|
|
18101
|
+
return Object.freeze(K);
|
|
18102
18102
|
})()
|
|
18103
18103
|
}), defineProperty(X, "visibleNodes", {
|
|
18104
18104
|
enumerable: !0,
|
|
18105
18105
|
configurable: !1,
|
|
18106
18106
|
writable: !1,
|
|
18107
18107
|
value: (function() {
|
|
18108
|
-
var Z, Y,
|
|
18108
|
+
var Z, Y, K = ((Y = (Z = G.visible_nodes) !== null && Z !== void 0 ? Z : G.visibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
|
|
18109
18109
|
return te < N;
|
|
18110
18110
|
});
|
|
18111
|
-
if (
|
|
18111
|
+
if (K.length === 0)
|
|
18112
18112
|
for (var ee = 0; ee < N; ee++)
|
|
18113
|
-
ee !==
|
|
18114
|
-
return Object.freeze(
|
|
18113
|
+
ee !== U && K.push(ee);
|
|
18114
|
+
return Object.freeze(K);
|
|
18115
18115
|
})()
|
|
18116
18116
|
}), defineProperty(X, "images", {
|
|
18117
18117
|
enumerable: !0,
|
|
@@ -18125,13 +18125,13 @@ function parse(n, t) {
|
|
|
18125
18125
|
writable: !1,
|
|
18126
18126
|
value: t
|
|
18127
18127
|
});
|
|
18128
|
-
for (var Y = 0,
|
|
18129
|
-
var ee =
|
|
18128
|
+
for (var Y = 0, K = FACE_ORDER$1; Y < K.length; Y++) {
|
|
18129
|
+
var ee = K[Y];
|
|
18130
18130
|
defineProperty(Z, ee, {
|
|
18131
18131
|
enumerable: !0,
|
|
18132
18132
|
configurable: !1,
|
|
18133
18133
|
writable: !1,
|
|
18134
|
-
value: relativeURL(panoURL(W[ee], F,
|
|
18134
|
+
value: relativeURL(panoURL(W[ee], F, U), t.baseURL)
|
|
18135
18135
|
});
|
|
18136
18136
|
}
|
|
18137
18137
|
return defineProperty(Z, "sizeList", {
|
|
@@ -18269,14 +18269,14 @@ function parse(n, t) {
|
|
|
18269
18269
|
value: new THREE.Vector2().fromArray(W.video.size)
|
|
18270
18270
|
})), Z;
|
|
18271
18271
|
})()
|
|
18272
|
-
}),
|
|
18273
|
-
},
|
|
18274
|
-
D(
|
|
18272
|
+
}), H.push(X);
|
|
18273
|
+
}, q = 0; q < N; q++)
|
|
18274
|
+
D(q);
|
|
18275
18275
|
defineProperty(t, "observers", {
|
|
18276
18276
|
enumerable: !0,
|
|
18277
18277
|
configurable: !1,
|
|
18278
18278
|
writable: !1,
|
|
18279
|
-
value: Object.freeze(
|
|
18279
|
+
value: Object.freeze(H)
|
|
18280
18280
|
});
|
|
18281
18281
|
var z = {};
|
|
18282
18282
|
if (defineProperty(z, "work", {
|
|
@@ -18284,19 +18284,19 @@ function parse(n, t) {
|
|
|
18284
18284
|
configurable: !1,
|
|
18285
18285
|
writable: !1,
|
|
18286
18286
|
value: t
|
|
18287
|
-
}),
|
|
18287
|
+
}), B.initial) {
|
|
18288
18288
|
if (t.observers.length > 0) {
|
|
18289
|
-
var
|
|
18290
|
-
isNumber(
|
|
18289
|
+
var j = void 0;
|
|
18290
|
+
isNumber(B.initial.panoIndex) ? j = B.initial.panoIndex : isNumber(B.initial.pano_index) ? j = B.initial.pano_index : isNumber(B.initial.pano) && (j = B.initial.pano), typeof j == "number" && (j = clamp$1(j, 0, t.observers.length - 1), defineProperty(z, "panoIndex", {
|
|
18291
18291
|
enumerable: !0,
|
|
18292
18292
|
writable: !0,
|
|
18293
|
-
value:
|
|
18293
|
+
value: j
|
|
18294
18294
|
}));
|
|
18295
18295
|
}
|
|
18296
|
-
if (
|
|
18296
|
+
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", {
|
|
18297
18297
|
enumerable: !0,
|
|
18298
18298
|
writable: !0,
|
|
18299
|
-
value:
|
|
18299
|
+
value: B.initial.mode
|
|
18300
18300
|
}) : typeof z.panoIndex == "number" ? defineProperty(z, "mode", {
|
|
18301
18301
|
enumerable: !0,
|
|
18302
18302
|
writable: !0,
|
|
@@ -18305,43 +18305,43 @@ function parse(n, t) {
|
|
|
18305
18305
|
enumerable: !0,
|
|
18306
18306
|
writable: !0,
|
|
18307
18307
|
value: "Mapview"
|
|
18308
|
-
}), isNumber(
|
|
18308
|
+
}), isNumber(B.initial.latitude) && defineProperty(z, "latitude", {
|
|
18309
18309
|
enumerable: !0,
|
|
18310
18310
|
writable: !0,
|
|
18311
|
-
value:
|
|
18312
|
-
}), isNumber(
|
|
18311
|
+
value: B.initial.latitude
|
|
18312
|
+
}), isNumber(B.initial.longitude) ? defineProperty(z, "longitude", {
|
|
18313
18313
|
enumerable: !0,
|
|
18314
18314
|
writable: !0,
|
|
18315
|
-
value:
|
|
18316
|
-
}) : isNumber(
|
|
18315
|
+
value: B.initial.longitude
|
|
18316
|
+
}) : isNumber(B.initial.heading) && defineProperty(z, "longitude", {
|
|
18317
18317
|
enumerable: !0,
|
|
18318
18318
|
writable: !0,
|
|
18319
|
-
value: headingToLongitude(
|
|
18320
|
-
}), isNumber(
|
|
18319
|
+
value: headingToLongitude(B.initial.heading)
|
|
18320
|
+
}), isNumber(B.initial.fov) && defineProperty(z, "fov", {
|
|
18321
18321
|
enumerable: !0,
|
|
18322
18322
|
writable: !0,
|
|
18323
|
-
value:
|
|
18324
|
-
}), isNumber(
|
|
18323
|
+
value: B.initial.fov
|
|
18324
|
+
}), isNumber(B.initial.distance) && defineProperty(z, "distance", {
|
|
18325
18325
|
enumerable: !0,
|
|
18326
18326
|
writable: !0,
|
|
18327
|
-
value:
|
|
18328
|
-
}), Array.isArray(
|
|
18329
|
-
var
|
|
18330
|
-
var W = Number(
|
|
18327
|
+
value: B.initial.distance
|
|
18328
|
+
}), Array.isArray(B.initial.offset)) {
|
|
18329
|
+
var J = B.initial.offset, V = [0, 0, 0].map(function(U, G) {
|
|
18330
|
+
var W = Number(J[G]);
|
|
18331
18331
|
return isNaN(W) || !isFinite(W) ? 0 : W;
|
|
18332
18332
|
});
|
|
18333
18333
|
defineProperty(z, "offset", {
|
|
18334
18334
|
enumerable: !0,
|
|
18335
18335
|
writable: !0,
|
|
18336
|
-
value: new THREE.Vector3().fromArray(
|
|
18336
|
+
value: new THREE.Vector3().fromArray(V)
|
|
18337
18337
|
});
|
|
18338
|
-
} else typeof
|
|
18338
|
+
} 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", {
|
|
18339
18339
|
enumerable: !0,
|
|
18340
18340
|
writable: !0,
|
|
18341
18341
|
value: new THREE.Vector3().fromArray([
|
|
18342
|
-
|
|
18343
|
-
|
|
18344
|
-
|
|
18342
|
+
B.initial.offset.x,
|
|
18343
|
+
B.initial.offset.y,
|
|
18344
|
+
B.initial.offset.z
|
|
18345
18345
|
])
|
|
18346
18346
|
});
|
|
18347
18347
|
}
|
|
@@ -19956,48 +19956,48 @@ var Hammer = (function(n, t, e, r) {
|
|
|
19956
19956
|
return Array.isArray(P) ? (p(P, k[_], k), !0) : !1;
|
|
19957
19957
|
}
|
|
19958
19958
|
function p(P, _, k) {
|
|
19959
|
-
var
|
|
19959
|
+
var Q;
|
|
19960
19960
|
if (P)
|
|
19961
19961
|
if (P.forEach)
|
|
19962
19962
|
P.forEach(_, k);
|
|
19963
19963
|
else if (P.length !== r)
|
|
19964
|
-
for (
|
|
19965
|
-
_.call(k, P[
|
|
19964
|
+
for (Q = 0; Q < P.length; )
|
|
19965
|
+
_.call(k, P[Q], Q, P), Q++;
|
|
19966
19966
|
else
|
|
19967
|
-
for (
|
|
19968
|
-
P.hasOwnProperty(
|
|
19967
|
+
for (Q in P)
|
|
19968
|
+
P.hasOwnProperty(Q) && _.call(k, P[Q], Q, P);
|
|
19969
19969
|
}
|
|
19970
19970
|
function m(P, _, k) {
|
|
19971
|
-
var
|
|
19971
|
+
var Q = "DEPRECATED METHOD: " + _ + `
|
|
19972
19972
|
` + k + ` AT
|
|
19973
19973
|
`;
|
|
19974
19974
|
return function() {
|
|
19975
19975
|
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);
|
|
19976
|
-
return be && be.call(n.console,
|
|
19976
|
+
return be && be.call(n.console, Q, oe), P.apply(this, arguments);
|
|
19977
19977
|
};
|
|
19978
19978
|
}
|
|
19979
19979
|
var A;
|
|
19980
19980
|
typeof Object.assign != "function" ? A = function(_) {
|
|
19981
19981
|
if (_ === r || _ === null)
|
|
19982
19982
|
throw new TypeError("Cannot convert undefined or null to object");
|
|
19983
|
-
for (var k = Object(_),
|
|
19984
|
-
var $ = arguments[
|
|
19983
|
+
for (var k = Object(_), Q = 1; Q < arguments.length; Q++) {
|
|
19984
|
+
var $ = arguments[Q];
|
|
19985
19985
|
if ($ !== r && $ !== null)
|
|
19986
19986
|
for (var oe in $)
|
|
19987
19987
|
$.hasOwnProperty(oe) && (k[oe] = $[oe]);
|
|
19988
19988
|
}
|
|
19989
19989
|
return k;
|
|
19990
19990
|
} : A = Object.assign;
|
|
19991
|
-
var g = m(function(_, k,
|
|
19991
|
+
var g = m(function(_, k, Q) {
|
|
19992
19992
|
for (var $ = Object.keys(k), oe = 0; oe < $.length; )
|
|
19993
|
-
(!
|
|
19993
|
+
(!Q || Q && _[$[oe]] === r) && (_[$[oe]] = k[$[oe]]), oe++;
|
|
19994
19994
|
return _;
|
|
19995
19995
|
}, "extend", "Use `assign`."), y = m(function(_, k) {
|
|
19996
19996
|
return g(_, k, !0);
|
|
19997
19997
|
}, "merge", "Use `assign`.");
|
|
19998
19998
|
function v(P, _, k) {
|
|
19999
|
-
var
|
|
20000
|
-
$ = P.prototype = Object.create(
|
|
19999
|
+
var Q = _.prototype, $;
|
|
20000
|
+
$ = P.prototype = Object.create(Q), $.constructor = P, $._super = Q, k && A($, k);
|
|
20001
20001
|
}
|
|
20002
20002
|
function E(P, _) {
|
|
20003
20003
|
return function() {
|
|
@@ -20011,13 +20011,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20011
20011
|
return P === r ? _ : P;
|
|
20012
20012
|
}
|
|
20013
20013
|
function S(P, _, k) {
|
|
20014
|
-
p(I(_), function(
|
|
20015
|
-
P.addEventListener(
|
|
20014
|
+
p(I(_), function(Q) {
|
|
20015
|
+
P.addEventListener(Q, k, !1);
|
|
20016
20016
|
});
|
|
20017
20017
|
}
|
|
20018
20018
|
function R(P, _, k) {
|
|
20019
|
-
p(I(_), function(
|
|
20020
|
-
P.removeEventListener(
|
|
20019
|
+
p(I(_), function(Q) {
|
|
20020
|
+
P.removeEventListener(Q, k, !1);
|
|
20021
20021
|
});
|
|
20022
20022
|
}
|
|
20023
20023
|
function w(P, _) {
|
|
@@ -20034,32 +20034,32 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20034
20034
|
function I(P) {
|
|
20035
20035
|
return P.trim().split(/\s+/g);
|
|
20036
20036
|
}
|
|
20037
|
-
function
|
|
20037
|
+
function B(P, _, k) {
|
|
20038
20038
|
if (P.indexOf && !k)
|
|
20039
20039
|
return P.indexOf(_);
|
|
20040
|
-
for (var
|
|
20041
|
-
if (k && P[
|
|
20042
|
-
return
|
|
20043
|
-
|
|
20040
|
+
for (var Q = 0; Q < P.length; ) {
|
|
20041
|
+
if (k && P[Q][k] == _ || !k && P[Q] === _)
|
|
20042
|
+
return Q;
|
|
20043
|
+
Q++;
|
|
20044
20044
|
}
|
|
20045
20045
|
return -1;
|
|
20046
20046
|
}
|
|
20047
20047
|
function M(P) {
|
|
20048
20048
|
return Array.prototype.slice.call(P, 0);
|
|
20049
20049
|
}
|
|
20050
|
-
function
|
|
20051
|
-
for (var
|
|
20050
|
+
function H(P, _, k) {
|
|
20051
|
+
for (var Q = [], $ = [], oe = 0; oe < P.length; ) {
|
|
20052
20052
|
var be = P[oe][_];
|
|
20053
|
-
|
|
20053
|
+
B($, be) < 0 && Q.push(P[oe]), $[oe] = be, oe++;
|
|
20054
20054
|
}
|
|
20055
|
-
return
|
|
20055
|
+
return Q = Q.sort(function(Xe, Fe) {
|
|
20056
20056
|
return Xe[_] > Fe[_];
|
|
20057
|
-
}),
|
|
20057
|
+
}), Q;
|
|
20058
20058
|
}
|
|
20059
20059
|
function L(P, _) {
|
|
20060
|
-
for (var k,
|
|
20061
|
-
if (k = o[oe],
|
|
20062
|
-
return
|
|
20060
|
+
for (var k, Q, $ = _[0].toUpperCase() + _.slice(1), oe = 0; oe < o.length; ) {
|
|
20061
|
+
if (k = o[oe], Q = k ? k + $ : _, Q in P)
|
|
20062
|
+
return Q;
|
|
20063
20063
|
oe++;
|
|
20064
20064
|
}
|
|
20065
20065
|
return r;
|
|
@@ -20072,11 +20072,11 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20072
20072
|
var _ = P.ownerDocument || P;
|
|
20073
20073
|
return _.defaultView || _.parentWindow || n;
|
|
20074
20074
|
}
|
|
20075
|
-
var D = /mobile|tablet|ip(ad|hone|od)|android/i,
|
|
20075
|
+
var D = /mobile|tablet|ip(ad|hone|od)|android/i, q = "ontouchstart" in n, z = L(n, "PointerEvent") !== r, j = 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, ne = 4, ie = 8, ce = 16, ae = te | ne, de = ie | ce, ge = ae | de, ye = ["x", "y"], xe = ["clientX", "clientY"];
|
|
20076
20076
|
function le(P, _) {
|
|
20077
20077
|
var k = this;
|
|
20078
|
-
this.manager = P, this.callback = _, this.element = P.element, this.target = P.options.inputTarget, this.domHandler = function(
|
|
20079
|
-
b(P.options.enable, [P]) && k.handler(
|
|
20078
|
+
this.manager = P, this.callback = _, this.element = P.element, this.target = P.options.inputTarget, this.domHandler = function(Q) {
|
|
20079
|
+
b(P.options.enable, [P]) && k.handler(Q);
|
|
20080
20080
|
}, this.init();
|
|
20081
20081
|
}
|
|
20082
20082
|
le.prototype = {
|
|
@@ -20101,36 +20101,36 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20101
20101
|
};
|
|
20102
20102
|
function he(P) {
|
|
20103
20103
|
var _, k = P.options.inputClass;
|
|
20104
|
-
return k ? _ = k : z ? _ = Be :
|
|
20104
|
+
return k ? _ = k : z ? _ = Be : j ? _ = Ue : q ? _ = ht : _ = ke, new _(P, re);
|
|
20105
20105
|
}
|
|
20106
20106
|
function re(P, _, k) {
|
|
20107
|
-
var
|
|
20107
|
+
var Q = k.pointers.length, $ = k.changedPointers.length, oe = _ & X && Q - $ === 0, be = _ & (Y | K) && Q - $ === 0;
|
|
20108
20108
|
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;
|
|
20109
20109
|
}
|
|
20110
20110
|
function se(P, _) {
|
|
20111
|
-
var k = P.session,
|
|
20111
|
+
var k = P.session, Q = _.pointers, $ = Q.length;
|
|
20112
20112
|
k.firstInput || (k.firstInput = Ne(_)), $ > 1 && !k.firstMultiple ? k.firstMultiple = Ne(_) : $ === 1 && (k.firstMultiple = !1);
|
|
20113
|
-
var oe = k.firstInput, be = k.firstMultiple, De = be ? be.center : oe.center, Xe = _.center = qe(
|
|
20113
|
+
var oe = k.firstInput, be = k.firstMultiple, De = be ? be.center : oe.center, Xe = _.center = qe(Q);
|
|
20114
20114
|
_.timeStamp = f(), _.deltaTime = _.timeStamp - oe.timeStamp, _.angle = Ke(De, Xe), _.distance = ve(De, Xe), pe(k, _), _.offsetDirection = Ve(_.deltaX, _.deltaY);
|
|
20115
20115
|
var Fe = Ye(_.deltaTime, _.deltaX, _.deltaY);
|
|
20116
|
-
_.overallVelocityX = Fe.x, _.overallVelocityY = Fe.y, _.overallVelocity = c(Fe.x) > c(Fe.y) ? Fe.x : Fe.y, _.scale = be ? Le(be.pointers,
|
|
20116
|
+
_.overallVelocityX = Fe.x, _.overallVelocityY = Fe.y, _.overallVelocity = c(Fe.x) > c(Fe.y) ? Fe.x : Fe.y, _.scale = be ? Le(be.pointers, Q) : 1, _.rotation = be ? Te(be.pointers, Q) : 0, _.maxPointers = k.prevInput ? _.pointers.length > k.prevInput.maxPointers ? _.pointers.length : k.prevInput.maxPointers : _.pointers.length, me(k, _);
|
|
20117
20117
|
var lt = P.element;
|
|
20118
20118
|
w(_.srcEvent.target, lt) && (lt = _.srcEvent.target), _.target = lt;
|
|
20119
20119
|
}
|
|
20120
20120
|
function pe(P, _) {
|
|
20121
|
-
var k = _.center,
|
|
20121
|
+
var k = _.center, Q = P.offsetDelta || {}, $ = P.prevDelta || {}, oe = P.prevInput || {};
|
|
20122
20122
|
(_.eventType === X || oe.eventType === Y) && ($ = P.prevDelta = {
|
|
20123
20123
|
x: oe.deltaX || 0,
|
|
20124
20124
|
y: oe.deltaY || 0
|
|
20125
|
-
},
|
|
20125
|
+
}, Q = P.offsetDelta = {
|
|
20126
20126
|
x: k.x,
|
|
20127
20127
|
y: k.y
|
|
20128
|
-
}), _.deltaX = $.x + (k.x -
|
|
20128
|
+
}), _.deltaX = $.x + (k.x - Q.x), _.deltaY = $.y + (k.y - Q.y);
|
|
20129
20129
|
}
|
|
20130
20130
|
function me(P, _) {
|
|
20131
|
-
var k = P.lastInterval || _,
|
|
20132
|
-
if (_.eventType !=
|
|
20133
|
-
var Xe = _.deltaX - k.deltaX, Fe = _.deltaY - k.deltaY, lt = Ye(
|
|
20131
|
+
var k = P.lastInterval || _, Q = _.timeStamp - k.timeStamp, $, oe, be, De;
|
|
20132
|
+
if (_.eventType != K && (Q > W || k.velocity === r)) {
|
|
20133
|
+
var Xe = _.deltaX - k.deltaX, Fe = _.deltaY - k.deltaY, lt = Ye(Q, Xe, Fe);
|
|
20134
20134
|
oe = lt.x, be = lt.y, $ = c(lt.x) > c(lt.y) ? lt.x : lt.y, De = Ve(Xe, Fe), P.lastInterval = _;
|
|
20135
20135
|
} else
|
|
20136
20136
|
$ = k.velocity, oe = k.velocityX, be = k.velocityY, De = k.direction;
|
|
@@ -20157,11 +20157,11 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20157
20157
|
x: l(P[0].clientX),
|
|
20158
20158
|
y: l(P[0].clientY)
|
|
20159
20159
|
};
|
|
20160
|
-
for (var k = 0,
|
|
20161
|
-
k += P[$].clientX,
|
|
20160
|
+
for (var k = 0, Q = 0, $ = 0; $ < _; )
|
|
20161
|
+
k += P[$].clientX, Q += P[$].clientY, $++;
|
|
20162
20162
|
return {
|
|
20163
20163
|
x: l(k / _),
|
|
20164
|
-
y: l(
|
|
20164
|
+
y: l(Q / _)
|
|
20165
20165
|
};
|
|
20166
20166
|
}
|
|
20167
20167
|
function Ye(P, _, k) {
|
|
@@ -20175,13 +20175,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20175
20175
|
}
|
|
20176
20176
|
function ve(P, _, k) {
|
|
20177
20177
|
k || (k = ye);
|
|
20178
|
-
var
|
|
20179
|
-
return Math.sqrt(
|
|
20178
|
+
var Q = _[k[0]] - P[k[0]], $ = _[k[1]] - P[k[1]];
|
|
20179
|
+
return Math.sqrt(Q * Q + $ * $);
|
|
20180
20180
|
}
|
|
20181
20181
|
function Ke(P, _, k) {
|
|
20182
20182
|
k || (k = ye);
|
|
20183
|
-
var
|
|
20184
|
-
return Math.atan2($,
|
|
20183
|
+
var Q = _[k[0]] - P[k[0]], $ = _[k[1]] - P[k[1]];
|
|
20184
|
+
return Math.atan2($, Q) * 180 / Math.PI;
|
|
20185
20185
|
}
|
|
20186
20186
|
function Te(P, _) {
|
|
20187
20187
|
return Ke(_[1], _[0], xe) + Ke(P[1], P[0], xe);
|
|
@@ -20207,7 +20207,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20207
20207
|
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, {
|
|
20208
20208
|
pointers: [_],
|
|
20209
20209
|
changedPointers: [_],
|
|
20210
|
-
pointerType:
|
|
20210
|
+
pointerType: U,
|
|
20211
20211
|
srcEvent: _
|
|
20212
20212
|
}));
|
|
20213
20213
|
}
|
|
@@ -20216,13 +20216,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20216
20216
|
pointerdown: X,
|
|
20217
20217
|
pointermove: Z,
|
|
20218
20218
|
pointerup: Y,
|
|
20219
|
-
pointercancel:
|
|
20220
|
-
pointerout:
|
|
20219
|
+
pointercancel: K,
|
|
20220
|
+
pointerout: K
|
|
20221
20221
|
}, _e = {
|
|
20222
|
-
2:
|
|
20223
|
-
3:
|
|
20224
|
-
4:
|
|
20225
|
-
5:
|
|
20222
|
+
2: J,
|
|
20223
|
+
3: V,
|
|
20224
|
+
4: U,
|
|
20225
|
+
5: G
|
|
20226
20226
|
// see https://twitter.com/jacobrossi/status/480596438489890816
|
|
20227
20227
|
}, Ee = "pointerdown", Ce = "pointermove pointerup pointercancel";
|
|
20228
20228
|
n.MSPointerEvent && !n.PointerEvent && (Ee = "MSPointerDown", Ce = "MSPointerMove MSPointerUp MSPointerCancel");
|
|
@@ -20235,20 +20235,20 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20235
20235
|
* @param {Object} ev
|
|
20236
20236
|
*/
|
|
20237
20237
|
handler: function(_) {
|
|
20238
|
-
var k = this.store,
|
|
20239
|
-
be & X && (_.button === 0 || _.button === 2 || Xe) ? Fe < 0 && (k.push(_), Fe = k.length - 1) : be & (Y |
|
|
20238
|
+
var k = this.store, Q = !1, $ = !1, oe = _.type.toLowerCase().replace("ms", ""), be = Pe[oe], De = _e[_.pointerType] || _.pointerType, Xe = De == J, Fe = B(k, _.pointerId, "pointerId");
|
|
20239
|
+
be & X && (_.button === 0 || _.button === 2 || Xe) ? Fe < 0 && (k.push(_), Fe = k.length - 1) : be & (Y | K) ? Q = !0 : !Xe && _.buttons === 0 && (Q = !0, $ = !0, be = Pe.pointerup), !(Fe < 0) && ($ || (k[Fe] = _), this.callback(this.manager, be, {
|
|
20240
20240
|
pointers: k,
|
|
20241
20241
|
changedPointers: [_],
|
|
20242
20242
|
pointerType: De,
|
|
20243
20243
|
srcEvent: k[Fe]
|
|
20244
|
-
}),
|
|
20244
|
+
}), Q && k.splice(Fe, 1));
|
|
20245
20245
|
}
|
|
20246
20246
|
});
|
|
20247
20247
|
var je = {
|
|
20248
20248
|
touchstart: X,
|
|
20249
20249
|
touchmove: Z,
|
|
20250
20250
|
touchend: Y,
|
|
20251
|
-
touchcancel:
|
|
20251
|
+
touchcancel: K
|
|
20252
20252
|
}, Qe = "touchstart", We = "touchstart touchmove touchend touchcancel";
|
|
20253
20253
|
function gt() {
|
|
20254
20254
|
this.evTarget = Qe, this.evWin = We, this.started = !1, le.apply(this, arguments);
|
|
@@ -20257,56 +20257,56 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20257
20257
|
handler: function(_) {
|
|
20258
20258
|
var k = je[_.type];
|
|
20259
20259
|
if (k === X && (this.started = !0), !!this.started) {
|
|
20260
|
-
var
|
|
20261
|
-
k & (Y |
|
|
20262
|
-
pointers:
|
|
20263
|
-
changedPointers:
|
|
20264
|
-
pointerType:
|
|
20260
|
+
var Q = Je.call(this, _, k);
|
|
20261
|
+
k & (Y | K) && Q[0].length - Q[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
|
|
20262
|
+
pointers: Q[0],
|
|
20263
|
+
changedPointers: Q[1],
|
|
20264
|
+
pointerType: J,
|
|
20265
20265
|
srcEvent: _
|
|
20266
20266
|
});
|
|
20267
20267
|
}
|
|
20268
20268
|
}
|
|
20269
20269
|
});
|
|
20270
20270
|
function Je(P, _) {
|
|
20271
|
-
var k = M(P.touches),
|
|
20272
|
-
return _ & (Y |
|
|
20271
|
+
var k = M(P.touches), Q = M(P.changedTouches);
|
|
20272
|
+
return _ & (Y | K) && (k = H(k.concat(Q), "identifier")), [k, Q];
|
|
20273
20273
|
}
|
|
20274
20274
|
var At = {
|
|
20275
20275
|
touchstart: X,
|
|
20276
20276
|
touchmove: Z,
|
|
20277
20277
|
touchend: Y,
|
|
20278
|
-
touchcancel:
|
|
20278
|
+
touchcancel: K
|
|
20279
20279
|
}, we = "touchstart touchmove touchend touchcancel";
|
|
20280
20280
|
function Ue() {
|
|
20281
20281
|
this.evTarget = we, this.targetIds = {}, le.apply(this, arguments);
|
|
20282
20282
|
}
|
|
20283
20283
|
v(Ue, le, {
|
|
20284
20284
|
handler: function(_) {
|
|
20285
|
-
var k = At[_.type],
|
|
20286
|
-
|
|
20287
|
-
pointers:
|
|
20288
|
-
changedPointers:
|
|
20289
|
-
pointerType:
|
|
20285
|
+
var k = At[_.type], Q = yt.call(this, _, k);
|
|
20286
|
+
Q && this.callback(this.manager, k, {
|
|
20287
|
+
pointers: Q[0],
|
|
20288
|
+
changedPointers: Q[1],
|
|
20289
|
+
pointerType: J,
|
|
20290
20290
|
srcEvent: _
|
|
20291
20291
|
});
|
|
20292
20292
|
}
|
|
20293
20293
|
});
|
|
20294
20294
|
function yt(P, _) {
|
|
20295
|
-
var k = M(P.touches),
|
|
20295
|
+
var k = M(P.touches), Q = this.targetIds;
|
|
20296
20296
|
if (_ & (X | Z) && k.length === 1)
|
|
20297
|
-
return
|
|
20297
|
+
return Q[k[0].identifier] = !0, [k, k];
|
|
20298
20298
|
var $, oe, be = M(P.changedTouches), De = [], Xe = this.target;
|
|
20299
20299
|
if (oe = k.filter(function(Fe) {
|
|
20300
20300
|
return w(Fe.target, Xe);
|
|
20301
20301
|
}), _ === X)
|
|
20302
20302
|
for ($ = 0; $ < oe.length; )
|
|
20303
|
-
|
|
20303
|
+
Q[oe[$].identifier] = !0, $++;
|
|
20304
20304
|
for ($ = 0; $ < be.length; )
|
|
20305
|
-
|
|
20305
|
+
Q[be[$].identifier] && De.push(be[$]), _ & (Y | K) && delete Q[be[$].identifier], $++;
|
|
20306
20306
|
if (De.length)
|
|
20307
20307
|
return [
|
|
20308
20308
|
// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
|
|
20309
|
-
|
|
20309
|
+
H(oe.concat(De), "identifier"),
|
|
20310
20310
|
De
|
|
20311
20311
|
];
|
|
20312
20312
|
}
|
|
@@ -20323,14 +20323,14 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20323
20323
|
* @param {String} inputEvent
|
|
20324
20324
|
* @param {Object} inputData
|
|
20325
20325
|
*/
|
|
20326
|
-
handler: function(_, k,
|
|
20327
|
-
var $ =
|
|
20328
|
-
if (!(oe &&
|
|
20326
|
+
handler: function(_, k, Q) {
|
|
20327
|
+
var $ = Q.pointerType == J, oe = Q.pointerType == U;
|
|
20328
|
+
if (!(oe && Q.sourceCapabilities && Q.sourceCapabilities.firesTouchEvents)) {
|
|
20329
20329
|
if ($)
|
|
20330
|
-
pt.call(this, k,
|
|
20331
|
-
else if (oe && ut.call(this,
|
|
20330
|
+
pt.call(this, k, Q);
|
|
20331
|
+
else if (oe && ut.call(this, Q))
|
|
20332
20332
|
return;
|
|
20333
|
-
this.callback(_, k,
|
|
20333
|
+
this.callback(_, k, Q);
|
|
20334
20334
|
}
|
|
20335
20335
|
},
|
|
20336
20336
|
/**
|
|
@@ -20341,23 +20341,23 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20341
20341
|
}
|
|
20342
20342
|
});
|
|
20343
20343
|
function pt(P, _) {
|
|
20344
|
-
P & X ? (this.primaryTouch = _.changedPointers[0].identifier, ze.call(this, _)) : P & (Y |
|
|
20344
|
+
P & X ? (this.primaryTouch = _.changedPointers[0].identifier, ze.call(this, _)) : P & (Y | K) && ze.call(this, _);
|
|
20345
20345
|
}
|
|
20346
20346
|
function ze(P) {
|
|
20347
20347
|
var _ = P.changedPointers[0];
|
|
20348
20348
|
if (_.identifier === this.primaryTouch) {
|
|
20349
20349
|
var k = { x: _.clientX, y: _.clientY };
|
|
20350
20350
|
this.lastTouches.push(k);
|
|
20351
|
-
var
|
|
20352
|
-
var oe =
|
|
20353
|
-
oe > -1 &&
|
|
20351
|
+
var Q = this.lastTouches, $ = function() {
|
|
20352
|
+
var oe = Q.indexOf(k);
|
|
20353
|
+
oe > -1 && Q.splice(oe, 1);
|
|
20354
20354
|
};
|
|
20355
20355
|
setTimeout($, Mt);
|
|
20356
20356
|
}
|
|
20357
20357
|
}
|
|
20358
20358
|
function ut(P) {
|
|
20359
|
-
for (var _ = P.srcEvent.clientX, k = P.srcEvent.clientY,
|
|
20360
|
-
var $ = this.lastTouches[
|
|
20359
|
+
for (var _ = P.srcEvent.clientX, k = P.srcEvent.clientY, Q = 0; Q < this.lastTouches.length; Q++) {
|
|
20360
|
+
var $ = this.lastTouches[Q], oe = Math.abs(_ - $.x), be = Math.abs(k - $.y);
|
|
20361
20361
|
if (oe <= Et && be <= Et)
|
|
20362
20362
|
return !0;
|
|
20363
20363
|
}
|
|
@@ -20401,7 +20401,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20401
20401
|
_.preventDefault();
|
|
20402
20402
|
return;
|
|
20403
20403
|
}
|
|
20404
|
-
var
|
|
20404
|
+
var Q = this.actions, $ = C(Q, nt) && !Ht[nt], oe = C(Q, bt) && !Ht[bt], be = C(Q, ct) && !Ht[ct];
|
|
20405
20405
|
if ($) {
|
|
20406
20406
|
var De = P.pointers.length === 1, Xe = P.distance < 2, Fe = P.deltaTime < 250;
|
|
20407
20407
|
if (De && Xe && Fe)
|
|
@@ -20478,7 +20478,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20478
20478
|
if (h(P, "requireFailure", this))
|
|
20479
20479
|
return this;
|
|
20480
20480
|
var _ = this.requireFail;
|
|
20481
|
-
return P = _t(P, this),
|
|
20481
|
+
return P = _t(P, this), B(_, P) === -1 && (_.push(P), P.requireFailure(this)), this;
|
|
20482
20482
|
},
|
|
20483
20483
|
/**
|
|
20484
20484
|
* drop the requireFailure link. it does not remove the link on the other recognizer.
|
|
@@ -20489,7 +20489,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20489
20489
|
if (h(P, "dropRequireFailure", this))
|
|
20490
20490
|
return this;
|
|
20491
20491
|
P = _t(P, this);
|
|
20492
|
-
var _ =
|
|
20492
|
+
var _ = B(this.requireFail, P);
|
|
20493
20493
|
return _ > -1 && this.requireFail.splice(_, 1), this;
|
|
20494
20494
|
},
|
|
20495
20495
|
/**
|
|
@@ -20514,10 +20514,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20514
20514
|
*/
|
|
20515
20515
|
emit: function(P) {
|
|
20516
20516
|
var _ = this, k = this.state;
|
|
20517
|
-
function
|
|
20517
|
+
function Q($) {
|
|
20518
20518
|
_.manager.emit($, P);
|
|
20519
20519
|
}
|
|
20520
|
-
k < xt &&
|
|
20520
|
+
k < xt && Q(_.options.event + Ot(k)), Q(_.options.event), P.additionalEvent && Q(P.additionalEvent), k >= xt && Q(_.options.event + Ot(k));
|
|
20521
20521
|
},
|
|
20522
20522
|
/**
|
|
20523
20523
|
* Check that all the require failure recognizers has failed,
|
|
@@ -20621,8 +20621,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20621
20621
|
* @returns {*} State
|
|
20622
20622
|
*/
|
|
20623
20623
|
process: function(P) {
|
|
20624
|
-
var _ = this.state, k = P.eventType,
|
|
20625
|
-
return
|
|
20624
|
+
var _ = this.state, k = P.eventType, Q = _ & (at | Pt), $ = this.attrTest(P);
|
|
20625
|
+
return Q && (k & K || !$) ? _ | St : Q || $ ? k & Y ? _ | xt : _ & at ? _ | Pt : at : Ge;
|
|
20626
20626
|
}
|
|
20627
20627
|
});
|
|
20628
20628
|
function Rt() {
|
|
@@ -20644,8 +20644,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20644
20644
|
return P & ae && _.push(bt), P & de && _.push(ct), _;
|
|
20645
20645
|
},
|
|
20646
20646
|
directionTest: function(P) {
|
|
20647
|
-
var _ = this.options, k = !0,
|
|
20648
|
-
return $ & _.direction || (_.direction & ae ? ($ = oe === 0 ? ee : oe < 0 ? te : ne, k = oe != this.pX,
|
|
20647
|
+
var _ = this.options, k = !0, Q = P.distance, $ = P.direction, oe = P.deltaX, be = P.deltaY;
|
|
20648
|
+
return $ & _.direction || (_.direction & ae ? ($ = oe === 0 ? ee : oe < 0 ? te : ne, k = oe != this.pX, Q = Math.abs(P.deltaX)) : ($ = be === 0 ? ee : be < 0 ? ie : ce, k = be != this.pY, Q = Math.abs(P.deltaY))), P.direction = $, k && Q > _.threshold && $ & _.direction;
|
|
20649
20649
|
},
|
|
20650
20650
|
attrTest: function(P) {
|
|
20651
20651
|
return ot.prototype.attrTest.call(this, P) && (this.state & at || !(this.state & at) && this.directionTest(P));
|
|
@@ -20703,8 +20703,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20703
20703
|
return [Me];
|
|
20704
20704
|
},
|
|
20705
20705
|
process: function(P) {
|
|
20706
|
-
var _ = this.options, k = P.pointers.length === _.pointers,
|
|
20707
|
-
if (this._input = P, !
|
|
20706
|
+
var _ = this.options, k = P.pointers.length === _.pointers, Q = P.distance < _.threshold, $ = P.deltaTime > _.time;
|
|
20707
|
+
if (this._input = P, !Q || !k || P.eventType & (Y | K) && !$)
|
|
20708
20708
|
this.reset();
|
|
20709
20709
|
else if (P.eventType & X)
|
|
20710
20710
|
this.reset(), this._timer = d(function() {
|
|
@@ -20793,10 +20793,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20793
20793
|
return [He];
|
|
20794
20794
|
},
|
|
20795
20795
|
process: function(P) {
|
|
20796
|
-
var _ = this.options, k = P.pointers.length === _.pointers,
|
|
20796
|
+
var _ = this.options, k = P.pointers.length === _.pointers, Q = P.distance < _.threshold, $ = P.deltaTime < _.time;
|
|
20797
20797
|
if (this.reset(), P.eventType & X && this.count === 0)
|
|
20798
20798
|
return this.failTimeout();
|
|
20799
|
-
if (
|
|
20799
|
+
if (Q && $ && k) {
|
|
20800
20800
|
if (P.eventType != Y)
|
|
20801
20801
|
return this.failTimeout();
|
|
20802
20802
|
var oe = this.pTime ? P.timeStamp - this.pTime < _.interval : !0, be = !this.pCenter || ve(this.pCenter, P.center) < _.posThreshold;
|
|
@@ -20923,8 +20923,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20923
20923
|
var Oe = 1, Bt = 2;
|
|
20924
20924
|
function st(P, _) {
|
|
20925
20925
|
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) {
|
|
20926
|
-
var
|
|
20927
|
-
k[2] &&
|
|
20926
|
+
var Q = this.add(new k[0](k[1]));
|
|
20927
|
+
k[2] && Q.recognizeWith(k[2]), k[3] && Q.requireFailure(k[3]);
|
|
20928
20928
|
}, this);
|
|
20929
20929
|
}
|
|
20930
20930
|
st.prototype = {
|
|
@@ -20955,10 +20955,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20955
20955
|
var _ = this.session;
|
|
20956
20956
|
if (!_.stopped) {
|
|
20957
20957
|
this.touchAction.preventDefaults(P);
|
|
20958
|
-
var k,
|
|
20958
|
+
var k, Q = this.recognizers, $ = _.curRecognizer;
|
|
20959
20959
|
(!$ || $ && $.state & vt) && ($ = _.curRecognizer = null);
|
|
20960
|
-
for (var oe = 0; oe <
|
|
20961
|
-
k =
|
|
20960
|
+
for (var oe = 0; oe < Q.length; )
|
|
20961
|
+
k = Q[oe], _.stopped !== Bt && // 1
|
|
20962
20962
|
(!$ || k == $ || // 2
|
|
20963
20963
|
k.canRecognizeWith($)) ? k.recognize(P) : k.reset(), !$ && k.state & (at | Pt | xt) && ($ = _.curRecognizer = k), oe++;
|
|
20964
20964
|
}
|
|
@@ -20997,7 +20997,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20997
20997
|
if (h(P, "remove", this))
|
|
20998
20998
|
return this;
|
|
20999
20999
|
if (P = this.get(P), P) {
|
|
21000
|
-
var _ = this.recognizers, k =
|
|
21000
|
+
var _ = this.recognizers, k = B(_, P);
|
|
21001
21001
|
k !== -1 && (_.splice(k, 1), this.touchAction.update());
|
|
21002
21002
|
}
|
|
21003
21003
|
return this;
|
|
@@ -21011,8 +21011,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21011
21011
|
on: function(P, _) {
|
|
21012
21012
|
if (P !== r && _ !== r) {
|
|
21013
21013
|
var k = this.handlers;
|
|
21014
|
-
return p(I(P), function(
|
|
21015
|
-
k[
|
|
21014
|
+
return p(I(P), function(Q) {
|
|
21015
|
+
k[Q] = k[Q] || [], k[Q].push(_);
|
|
21016
21016
|
}), this;
|
|
21017
21017
|
}
|
|
21018
21018
|
},
|
|
@@ -21025,8 +21025,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21025
21025
|
off: function(P, _) {
|
|
21026
21026
|
if (P !== r) {
|
|
21027
21027
|
var k = this.handlers;
|
|
21028
|
-
return p(I(P), function(
|
|
21029
|
-
_ ? k[
|
|
21028
|
+
return p(I(P), function(Q) {
|
|
21029
|
+
_ ? k[Q] && k[Q].splice(B(k[Q], _), 1) : delete k[Q];
|
|
21030
21030
|
}), this;
|
|
21031
21031
|
}
|
|
21032
21032
|
},
|
|
@@ -21042,8 +21042,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21042
21042
|
_.type = P, _.preventDefault = function() {
|
|
21043
21043
|
_.srcEvent.preventDefault();
|
|
21044
21044
|
};
|
|
21045
|
-
for (var
|
|
21046
|
-
k[
|
|
21045
|
+
for (var Q = 0; Q < k.length; )
|
|
21046
|
+
k[Q](_), Q++;
|
|
21047
21047
|
}
|
|
21048
21048
|
},
|
|
21049
21049
|
/**
|
|
@@ -21057,9 +21057,9 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21057
21057
|
function Ze(P, _) {
|
|
21058
21058
|
var k = P.element;
|
|
21059
21059
|
if (k.style) {
|
|
21060
|
-
var
|
|
21060
|
+
var Q;
|
|
21061
21061
|
p(P.options.cssProps, function($, oe) {
|
|
21062
|
-
|
|
21062
|
+
Q = L(k.style, oe), _ ? (P.oldCssProps[Q] = k.style[Q], k.style[Q] = $) : k.style[Q] = P.oldCssProps[Q] || "";
|
|
21063
21063
|
}), _ || (P.oldCssProps = {});
|
|
21064
21064
|
}
|
|
21065
21065
|
}
|
|
@@ -21071,7 +21071,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21071
21071
|
INPUT_START: X,
|
|
21072
21072
|
INPUT_MOVE: Z,
|
|
21073
21073
|
INPUT_END: Y,
|
|
21074
|
-
INPUT_CANCEL:
|
|
21074
|
+
INPUT_CANCEL: K,
|
|
21075
21075
|
STATE_POSSIBLE: It,
|
|
21076
21076
|
STATE_BEGAN: at,
|
|
21077
21077
|
STATE_CHANGED: Pt,
|
|
@@ -21266,11 +21266,11 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21266
21266
|
return o.params.Points = { threshold: 0.1 }, o.firstHitOnly = !0, o.near = r.near, o.far = r.far, o.setFromCamera(e, this.camera), o;
|
|
21267
21267
|
}, t.prototype.bindEvents = function(e) {
|
|
21268
21268
|
var r = this, o = function(M) {
|
|
21269
|
-
var
|
|
21270
|
-
return !(Math.abs(
|
|
21269
|
+
var H = r.relativeClientPosition(M);
|
|
21270
|
+
return !(Math.abs(H.x) > 1 || Math.abs(H.y) > 1);
|
|
21271
21271
|
}, s = new Hammer.Manager(e), u = function(M) {
|
|
21272
|
-
var
|
|
21273
|
-
return
|
|
21272
|
+
var H = M.session;
|
|
21273
|
+
return H.firstInput || null;
|
|
21274
21274
|
}, l = new Hammer.Pan({ threshold: 10, pointers: 0 }), c = new Hammer.Tap({ interval: 410 }), f = new Hammer.Pinch({ threshold: 0, pointers: 2 });
|
|
21275
21275
|
s.add([
|
|
21276
21276
|
l,
|
|
@@ -21278,8 +21278,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21278
21278
|
c,
|
|
21279
21279
|
f
|
|
21280
21280
|
]), s.on("panstart pan", function(M) {
|
|
21281
|
-
var
|
|
21282
|
-
if (!(
|
|
21281
|
+
var H = u(s);
|
|
21282
|
+
if (!(H && !o(H.center))) {
|
|
21283
21283
|
var L = createEvent("gesture.pan", {
|
|
21284
21284
|
target: M.target,
|
|
21285
21285
|
pointerType: M.pointerType,
|
|
@@ -21320,8 +21320,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21320
21320
|
}
|
|
21321
21321
|
}), s.on("tap", function(M) {
|
|
21322
21322
|
if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
|
|
21323
|
-
var
|
|
21324
|
-
if (!(
|
|
21323
|
+
var H = u(s);
|
|
21324
|
+
if (!(H && !o(H.center))) {
|
|
21325
21325
|
var L = createEvent("gesture.tap", {
|
|
21326
21326
|
target: M.target,
|
|
21327
21327
|
pointerType: M.pointerType,
|
|
@@ -21362,8 +21362,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21362
21362
|
}
|
|
21363
21363
|
}
|
|
21364
21364
|
}), s.on("pinchstart pinch pinchend", function(M) {
|
|
21365
|
-
var
|
|
21366
|
-
if (!(
|
|
21365
|
+
var H = u(s);
|
|
21366
|
+
if (!(H && !o(H.center))) {
|
|
21367
21367
|
var L = createEvent("gesture.pinch", {
|
|
21368
21368
|
target: M.target,
|
|
21369
21369
|
pointerType: M.pointerType,
|
|
@@ -21404,8 +21404,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21404
21404
|
}
|
|
21405
21405
|
}), s.on("dbltap", function(M) {
|
|
21406
21406
|
if (!(M.pointerType === "mouse" && M.srcEvent.button !== 0)) {
|
|
21407
|
-
var
|
|
21408
|
-
if (!(
|
|
21407
|
+
var H = u(s);
|
|
21408
|
+
if (!(H && !o(H.center))) {
|
|
21409
21409
|
var L = createEvent("gesture.dbltap", {
|
|
21410
21410
|
target: M.target,
|
|
21411
21411
|
pointerType: M.pointerType,
|
|
@@ -21446,18 +21446,18 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21446
21446
|
}
|
|
21447
21447
|
}
|
|
21448
21448
|
});
|
|
21449
|
-
var d = null, h = null, p = function(M,
|
|
21449
|
+
var d = null, h = null, p = function(M, H, L) {
|
|
21450
21450
|
var O = {
|
|
21451
21451
|
x: L.clientX,
|
|
21452
21452
|
y: L.clientY
|
|
21453
|
-
}, F = r.relativeClientPosition(O), N = r.createRaycasterFromCamera(F, r.camera), D = __assign(__assign({}, O), { coords: F, raycaster: N, buttons: L.buttons, delta: 0 }),
|
|
21453
|
+
}, 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", {
|
|
21454
21454
|
target: L.target,
|
|
21455
21455
|
pointerType: "mouse",
|
|
21456
21456
|
srcEvent: L,
|
|
21457
21457
|
pointers: [__assign({}, D)],
|
|
21458
21458
|
isFirst: M === "pinchstart",
|
|
21459
21459
|
isFinal: M === "pinchend",
|
|
21460
|
-
scale: clamp$1(
|
|
21460
|
+
scale: clamp$1(q, 0.1, 10),
|
|
21461
21461
|
center: __assign({}, D),
|
|
21462
21462
|
velocityX: 0,
|
|
21463
21463
|
velocityY: 0,
|
|
@@ -21468,32 +21468,32 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21468
21468
|
});
|
|
21469
21469
|
return z;
|
|
21470
21470
|
}, m = function(M) {
|
|
21471
|
-
var
|
|
21471
|
+
var H, L = { x: M.clientX, y: M.clientY };
|
|
21472
21472
|
if (o(L)) {
|
|
21473
21473
|
if (M.preventDefault(), M.ctrlKey) {
|
|
21474
|
-
var O = (
|
|
21474
|
+
var O = (H = d == null ? void 0 : d.prevEvent.scale) !== null && H !== void 0 ? H : 1, F = p(d ? "pinch" : "pinchstart", O, M);
|
|
21475
21475
|
d === null ? d = {
|
|
21476
21476
|
firstEvent: F,
|
|
21477
21477
|
prevEvent: F
|
|
21478
21478
|
} : d.prevEvent = F, r.onPinchGesture(F), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
|
|
21479
|
-
var
|
|
21479
|
+
var V;
|
|
21480
21480
|
h = null;
|
|
21481
|
-
var
|
|
21482
|
-
d = null, r.onPinchGesture(
|
|
21481
|
+
var U = (V = d == null ? void 0 : d.prevEvent.scale) !== null && V !== void 0 ? V : 1, G = p("pinchend", U, M);
|
|
21482
|
+
d = null, r.onPinchGesture(G);
|
|
21483
21483
|
}, 200);
|
|
21484
21484
|
} else {
|
|
21485
|
-
var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0,
|
|
21485
|
+
var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, q = {
|
|
21486
21486
|
x: M.clientX,
|
|
21487
21487
|
y: M.clientY
|
|
21488
|
-
}, z = r.relativeClientPosition(
|
|
21488
|
+
}, z = r.relativeClientPosition(q), j = r.createRaycasterFromCamera(z, r.camera), J = __assign(__assign({}, q), { coords: z, raycaster: j, buttons: M.buttons, delta: N }), F = createEvent("gesture.mousewheel", {
|
|
21489
21489
|
target: M.target,
|
|
21490
21490
|
pointerType: "mouse",
|
|
21491
21491
|
srcEvent: M,
|
|
21492
|
-
pointers: [__assign({},
|
|
21492
|
+
pointers: [__assign({}, J)],
|
|
21493
21493
|
isFirst: D,
|
|
21494
21494
|
isFinal: !1,
|
|
21495
21495
|
scale: 0,
|
|
21496
|
-
center: __assign({},
|
|
21496
|
+
center: __assign({}, J),
|
|
21497
21497
|
velocityX: 0,
|
|
21498
21498
|
velocityY: 0,
|
|
21499
21499
|
overallVelocityX: 0,
|
|
@@ -21504,15 +21504,15 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21504
21504
|
r.onMouseWheel(F), r.mouseWheelState && clearTimeout(r.mouseWheelState.timer), r.mouseWheelState = {
|
|
21505
21505
|
timer: setTimeout(function() {
|
|
21506
21506
|
r.mouseWheelState = void 0;
|
|
21507
|
-
var
|
|
21507
|
+
var U = createEvent("gesture.mousewheel", {
|
|
21508
21508
|
target: M.target,
|
|
21509
21509
|
pointerType: "mouse",
|
|
21510
21510
|
srcEvent: M,
|
|
21511
|
-
pointers: [__assign(__assign({},
|
|
21511
|
+
pointers: [__assign(__assign({}, J), { delta: 0 })],
|
|
21512
21512
|
isFirst: !1,
|
|
21513
21513
|
isFinal: !0,
|
|
21514
21514
|
scale: 0,
|
|
21515
|
-
center: __assign(__assign({},
|
|
21515
|
+
center: __assign(__assign({}, J), { delta: 0 }),
|
|
21516
21516
|
velocityX: 0,
|
|
21517
21517
|
velocityY: 0,
|
|
21518
21518
|
overallVelocityX: 0,
|
|
@@ -21520,7 +21520,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21520
21520
|
userAction: !0,
|
|
21521
21521
|
state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
|
|
21522
21522
|
});
|
|
21523
|
-
r.onMouseWheel(
|
|
21523
|
+
r.onMouseWheel(U);
|
|
21524
21524
|
}, 100)
|
|
21525
21525
|
};
|
|
21526
21526
|
}
|
|
@@ -21532,8 +21532,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21532
21532
|
g();
|
|
21533
21533
|
return;
|
|
21534
21534
|
}
|
|
21535
|
-
var
|
|
21536
|
-
r.mouseMoveState || (
|
|
21535
|
+
var H = !1;
|
|
21536
|
+
r.mouseMoveState || (H = !0);
|
|
21537
21537
|
var L = {
|
|
21538
21538
|
x: M.clientX,
|
|
21539
21539
|
y: M.clientY
|
|
@@ -21542,7 +21542,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21542
21542
|
pointerType: "mouse",
|
|
21543
21543
|
srcEvent: M,
|
|
21544
21544
|
pointers: [__assign({}, N)],
|
|
21545
|
-
isFirst:
|
|
21545
|
+
isFirst: H,
|
|
21546
21546
|
isFinal: !1,
|
|
21547
21547
|
scale: 0,
|
|
21548
21548
|
center: __assign({}, N),
|
|
@@ -21569,13 +21569,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21569
21569
|
b();
|
|
21570
21570
|
return;
|
|
21571
21571
|
}
|
|
21572
|
-
var
|
|
21573
|
-
r.pressState || (
|
|
21572
|
+
var H = !1;
|
|
21573
|
+
r.pressState || (H = !0, r.pressState = {
|
|
21574
21574
|
event: M,
|
|
21575
21575
|
timeStamp: now(),
|
|
21576
21576
|
stop: noop
|
|
21577
21577
|
});
|
|
21578
|
-
var L = now() - r.pressState.timeStamp, O = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { isFirst:
|
|
21578
|
+
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) {
|
|
21579
21579
|
return __assign(__assign({}, F), { delta: L });
|
|
21580
21580
|
}) }));
|
|
21581
21581
|
r.onPressGesture(O), r.pressState && (r.pressState.stop = AnimationFrameLoop.shared.add(function(F) {
|
|
@@ -21583,10 +21583,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21583
21583
|
}, !0, 1));
|
|
21584
21584
|
}, v = function(M) {
|
|
21585
21585
|
if (b(), !(M.touches.length > 1 || M.changedTouches.length <= 0)) {
|
|
21586
|
-
var
|
|
21586
|
+
var H = {
|
|
21587
21587
|
x: M.changedTouches[0].clientX,
|
|
21588
21588
|
y: M.changedTouches[0].clientY
|
|
21589
|
-
}, L = r.relativeClientPosition(
|
|
21589
|
+
}, 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", {
|
|
21590
21590
|
target: M.target,
|
|
21591
21591
|
pointerType: "touch",
|
|
21592
21592
|
srcEvent: M,
|
|
@@ -21606,10 +21606,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21606
21606
|
}
|
|
21607
21607
|
}, E = function(M) {
|
|
21608
21608
|
b();
|
|
21609
|
-
var
|
|
21609
|
+
var H = {
|
|
21610
21610
|
x: M.clientX,
|
|
21611
21611
|
y: M.clientY
|
|
21612
|
-
}, L = r.relativeClientPosition(
|
|
21612
|
+
}, 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", {
|
|
21613
21613
|
target: M.target,
|
|
21614
21614
|
pointerType: "mouse",
|
|
21615
21615
|
srcEvent: M,
|
|
@@ -21629,13 +21629,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21629
21629
|
}, b = function() {
|
|
21630
21630
|
var M;
|
|
21631
21631
|
if (r.pressState) {
|
|
21632
|
-
var
|
|
21633
|
-
return __assign(__assign({}, O), { delta:
|
|
21632
|
+
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) {
|
|
21633
|
+
return __assign(__assign({}, O), { delta: H });
|
|
21634
21634
|
}) }));
|
|
21635
21635
|
r.onPressGesture(L), (M = r.pressState) === null || M === void 0 || M.stop(), r.pressState = void 0;
|
|
21636
21636
|
}
|
|
21637
21637
|
}, T = null, S = function(M) {
|
|
21638
|
-
var
|
|
21638
|
+
var H, L = !1, O = !1;
|
|
21639
21639
|
switch (M.type) {
|
|
21640
21640
|
case "gesturestart":
|
|
21641
21641
|
L = !0;
|
|
@@ -21647,15 +21647,15 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21647
21647
|
var F = {
|
|
21648
21648
|
x: M.clientX,
|
|
21649
21649
|
y: M.clientY
|
|
21650
|
-
}, N = r.relativeClientPosition(F), D = r.createRaycasterFromCamera(N, r.camera),
|
|
21650
|
+
}, 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", {
|
|
21651
21651
|
target: M.target,
|
|
21652
21652
|
pointerType: "mouse",
|
|
21653
21653
|
srcEvent: M,
|
|
21654
|
-
pointers: [__assign({},
|
|
21654
|
+
pointers: [__assign({}, q)],
|
|
21655
21655
|
isFirst: L,
|
|
21656
21656
|
isFinal: O,
|
|
21657
|
-
scale: (
|
|
21658
|
-
center: __assign({},
|
|
21657
|
+
scale: (H = M.scale) !== null && H !== void 0 ? H : 1,
|
|
21658
|
+
center: __assign({}, q),
|
|
21659
21659
|
velocityX: 0,
|
|
21660
21660
|
velocityY: 0,
|
|
21661
21661
|
overallVelocityX: 0,
|
|
@@ -21666,34 +21666,34 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21666
21666
|
return z;
|
|
21667
21667
|
}, R = function(M) {
|
|
21668
21668
|
if (M.preventDefault(), !isMobile) {
|
|
21669
|
-
var
|
|
21669
|
+
var H = S(M);
|
|
21670
21670
|
T = {
|
|
21671
|
-
firstEvent:
|
|
21671
|
+
firstEvent: H
|
|
21672
21672
|
};
|
|
21673
21673
|
var L = T.firstEvent;
|
|
21674
|
-
L && !o(L.center) || r.onPinchGesture(
|
|
21674
|
+
L && !o(L.center) || r.onPinchGesture(H);
|
|
21675
21675
|
}
|
|
21676
21676
|
}, w = function(M) {
|
|
21677
21677
|
if (M.preventDefault(), !isMobile && T) {
|
|
21678
|
-
var
|
|
21679
|
-
L && !o(L.center) || r.onPinchGesture(
|
|
21678
|
+
var H = S(M), L = T.firstEvent;
|
|
21679
|
+
L && !o(L.center) || r.onPinchGesture(H);
|
|
21680
21680
|
}
|
|
21681
21681
|
}, C = function(M) {
|
|
21682
21682
|
if (M.preventDefault(), !isMobile && T) {
|
|
21683
|
-
var
|
|
21684
|
-
T = null, !(L && !o(L.center)) && r.onPinchGesture(
|
|
21683
|
+
var H = S(M), L = T.firstEvent;
|
|
21684
|
+
T = null, !(L && !o(L.center)) && r.onPinchGesture(H);
|
|
21685
21685
|
}
|
|
21686
21686
|
}, I = function(M) {
|
|
21687
21687
|
if (M && typeof M.preventDefault == "function" && M.currentTarget === e && M.preventDefault(), typeof getSelection == "function") {
|
|
21688
|
-
var
|
|
21689
|
-
|
|
21688
|
+
var H = getSelection();
|
|
21689
|
+
H && H.focusNode && (H.removeAllRanges && H.removeAllRanges(), H.empty && H.empty());
|
|
21690
21690
|
}
|
|
21691
21691
|
};
|
|
21692
21692
|
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);
|
|
21693
|
-
var
|
|
21693
|
+
var B = function() {
|
|
21694
21694
|
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);
|
|
21695
21695
|
};
|
|
21696
|
-
return Object.assign(
|
|
21696
|
+
return Object.assign(B, { element: e });
|
|
21697
21697
|
}, t;
|
|
21698
21698
|
})(Subscribe)
|
|
21699
21699
|
), sharedGeometry$2 = new THREE.CircleBufferGeometry(0.1, 16), vertexShader$3 = `
|
|
@@ -22798,50 +22798,50 @@ void main() {
|
|
|
22798
22798
|
var S = scratchCameraProjectMatrix.copy(f);
|
|
22799
22799
|
S.elements[0] *= p, S.elements[5] *= p, this.camera.projectionMatrix.equals(S) || (this.camera.projectionMatrix.copy(S), this.camera.projectionMatrixInverse.getInverse(this.camera.projectionMatrix), r = !0), scratchSceneQuaternionInverse.copy(this.scene.quaternion).inverse(), scratchSceneMatrixInverse.makeRotationFromQuaternion(scratchSceneQuaternionInverse), scratchFrustumMatrix.copy(this.camera.matrix), scratchFrustumMatrix.setPosition(0, 0, 0), scratchFrustumMatrix.premultiply(scratchSceneMatrixInverse), scratchFrustumMatrixInverse.getInverse(scratchFrustumMatrix), scratchFrustumProjectMatrix.multiplyMatrices(this.camera.projectionMatrix, scratchFrustumMatrixInverse), this.frustum.setFromProjectionMatrix(scratchFrustumProjectMatrix);
|
|
22800
22800
|
var R = this.frustum.planes[5].normal, w = [];
|
|
22801
|
-
A >= m && traverseTileCubeNode(this.tileTree, function(
|
|
22802
|
-
if (!(
|
|
22803
|
-
if (
|
|
22801
|
+
A >= m && traverseTileCubeNode(this.tileTree, function(K) {
|
|
22802
|
+
if (!(K.level < m)) {
|
|
22803
|
+
if (K.level > A || !e.frustum.intersectsBox(K.box))
|
|
22804
22804
|
return !1;
|
|
22805
|
-
w.push(
|
|
22805
|
+
w.push(K);
|
|
22806
22806
|
}
|
|
22807
22807
|
});
|
|
22808
22808
|
var C = /* @__PURE__ */ new WeakMap();
|
|
22809
|
-
w.sort(function(
|
|
22810
|
-
if (
|
|
22811
|
-
return
|
|
22812
|
-
var te = C.get(
|
|
22813
|
-
te === void 0 && (te =
|
|
22809
|
+
w.sort(function(K, ee) {
|
|
22810
|
+
if (K.level !== ee.level)
|
|
22811
|
+
return K.level - ee.level;
|
|
22812
|
+
var te = C.get(K);
|
|
22813
|
+
te === void 0 && (te = K.box.getCenter(scratchSortVector3).angleTo(R), C.set(K, te));
|
|
22814
22814
|
var ne = C.get(ee);
|
|
22815
22815
|
return ne === void 0 && (ne = ee.box.getCenter(scratchSortVector3).angleTo(R), C.set(ee, ne)), te - ne;
|
|
22816
22816
|
});
|
|
22817
|
-
var I = /* @__PURE__ */ new WeakSet(),
|
|
22818
|
-
if (
|
|
22819
|
-
for (var M = function(
|
|
22820
|
-
var ee =
|
|
22821
|
-
return re.level ===
|
|
22817
|
+
var I = /* @__PURE__ */ new WeakSet(), B = this.observer.images.tiles;
|
|
22818
|
+
if (B)
|
|
22819
|
+
for (var M = function(K) {
|
|
22820
|
+
var ee = B.find(function(re) {
|
|
22821
|
+
return re.level === K.level;
|
|
22822
22822
|
});
|
|
22823
22823
|
if (!ee)
|
|
22824
22824
|
return "continue";
|
|
22825
|
-
I.add(
|
|
22826
|
-
var te =
|
|
22825
|
+
I.add(K);
|
|
22826
|
+
var te = H.tileMeshes.get(K);
|
|
22827
22827
|
if (te) {
|
|
22828
|
-
te.appearDuration =
|
|
22828
|
+
te.appearDuration = H.appearDuration;
|
|
22829
22829
|
var ne = te.updateTime(o);
|
|
22830
22830
|
return ne && (r = !0), "continue";
|
|
22831
22831
|
}
|
|
22832
|
-
if (
|
|
22832
|
+
if (H.pedding >= H.maxRequest)
|
|
22833
22833
|
return "continue";
|
|
22834
|
-
var ie = Math.pow(2,
|
|
22835
|
-
panoIndex:
|
|
22836
|
-
workCode:
|
|
22837
|
-
}), de = "".concat(ae, ".").concat(
|
|
22838
|
-
ye *
|
|
22839
|
-
ye *
|
|
22840
|
-
ye *
|
|
22841
|
-
ye *
|
|
22834
|
+
var ie = Math.pow(2, K.level) * K.position.y, ce = Math.pow(2, K.level) * K.position.x, ae = panoStringify({
|
|
22835
|
+
panoIndex: H.observer.panoIndex,
|
|
22836
|
+
workCode: H.observer.work.workCode
|
|
22837
|
+
}), 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 : [
|
|
22838
|
+
ye * K.position.x,
|
|
22839
|
+
ye * K.position.y,
|
|
22840
|
+
ye * K.size,
|
|
22841
|
+
ye * K.size
|
|
22842
22842
|
] });
|
|
22843
|
-
|
|
22844
|
-
var he =
|
|
22843
|
+
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++;
|
|
22844
|
+
var he = H.textureLoader.loadTexture(ge, {
|
|
22845
22845
|
imageURL: {
|
|
22846
22846
|
transform: xe,
|
|
22847
22847
|
options: le
|
|
@@ -22849,7 +22849,7 @@ void main() {
|
|
|
22849
22849
|
minFilter: THREE.LinearFilter,
|
|
22850
22850
|
magFilter: THREE.LinearFilter,
|
|
22851
22851
|
generateMipmaps: !1,
|
|
22852
|
-
fetcher: getFetcher(
|
|
22852
|
+
fetcher: getFetcher(H.observer.work)
|
|
22853
22853
|
}).then(function(re) {
|
|
22854
22854
|
return re.body;
|
|
22855
22855
|
});
|
|
@@ -22859,28 +22859,28 @@ void main() {
|
|
|
22859
22859
|
return e.pedding--, re;
|
|
22860
22860
|
}, function(re) {
|
|
22861
22861
|
return e.pedding--, Promise.reject(re);
|
|
22862
|
-
}), te = new TileMesh(
|
|
22863
|
-
},
|
|
22862
|
+
}), 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;
|
|
22863
|
+
}, H = this, L = 0, O = w; L < O.length; L++) {
|
|
22864
22864
|
var F = O[L];
|
|
22865
22865
|
M(F);
|
|
22866
22866
|
}
|
|
22867
22867
|
var N = [], D = [];
|
|
22868
|
-
this.tileMeshes.forEach(function(
|
|
22869
|
-
I.has(ee) ? N.push(
|
|
22868
|
+
this.tileMeshes.forEach(function(K, ee) {
|
|
22869
|
+
I.has(ee) ? N.push(K) : D.push(K);
|
|
22870
22870
|
var te = ee.level >= m && ee.level <= A;
|
|
22871
|
-
|
|
22871
|
+
K.visible !== te && (K.visible = te, r = !0);
|
|
22872
22872
|
});
|
|
22873
|
-
for (var
|
|
22874
|
-
return ee.activeTime -
|
|
22875
|
-
}).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0,
|
|
22876
|
-
var
|
|
22877
|
-
this.tileMeshes.delete(
|
|
22873
|
+
for (var q = D.sort(function(K, ee) {
|
|
22874
|
+
return ee.activeTime - K.activeTime;
|
|
22875
|
+
}).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0, j = q; z < j.length; z++) {
|
|
22876
|
+
var J = j[z];
|
|
22877
|
+
this.tileMeshes.delete(J.node), this.scene.remove(J), J.dispose(), r = !0;
|
|
22878
22878
|
}
|
|
22879
22879
|
if (r) {
|
|
22880
|
-
var
|
|
22880
|
+
var V = l.getRenderTarget();
|
|
22881
22881
|
scratchPrevClearColor$1.copy(l.getClearColor());
|
|
22882
|
-
var
|
|
22883
|
-
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(
|
|
22882
|
+
var U = l.getClearAlpha(), G = l.autoClear, W = l.autoClearColor, X = l.autoClearDepth, Z = l.autoClearStencil, Y = l.clippingPlanes;
|
|
22883
|
+
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;
|
|
22884
22884
|
}
|
|
22885
22885
|
return this.forceRenderWhenNextUpdate = !1, r;
|
|
22886
22886
|
}, n;
|
|
@@ -23171,39 +23171,39 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23171
23171
|
var w = new THREE.Vector3().copy(E.position), C = new THREE.Vector3().copy(b.position), I = this.locationMotion.value.count - v.value.count + 1;
|
|
23172
23172
|
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") {
|
|
23173
23173
|
if (h.pano0 && E.panoPicture) {
|
|
23174
|
-
var
|
|
23174
|
+
var B = {
|
|
23175
23175
|
panoId: h.pano0.panoId,
|
|
23176
23176
|
map: h.pano0.map,
|
|
23177
23177
|
mapSize: h.pano0.mapSize,
|
|
23178
23178
|
zoom: h.pano0.zoom,
|
|
23179
23179
|
matrix: E.panoPicture.matrix.clone().premultiply(E.fixCameraTransform).setPosition(b.position)
|
|
23180
23180
|
}, M = this.panoPictureObserverMap.get(h.pano0);
|
|
23181
|
-
M && this.panoPictureObserverMap.set(
|
|
23181
|
+
M && this.panoPictureObserverMap.set(B, M), h.pano0 = B;
|
|
23182
23182
|
}
|
|
23183
23183
|
w.copy(C), R = !0;
|
|
23184
23184
|
}
|
|
23185
23185
|
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);
|
|
23186
|
-
for (var
|
|
23187
|
-
var N = F[O], D = N.key,
|
|
23188
|
-
D !== void 0 && (
|
|
23186
|
+
for (var H = [], L = [], O = 0, F = this.locationMotion.keyframes; O < F.length; O++) {
|
|
23187
|
+
var N = F[O], D = N.key, q = N.progress;
|
|
23188
|
+
D !== void 0 && (H.push(D), q > this.locationMotion.progress && L.push(D));
|
|
23189
23189
|
}
|
|
23190
|
-
for (var z = 0,
|
|
23191
|
-
var
|
|
23192
|
-
if (!(L.indexOf(
|
|
23193
|
-
var
|
|
23194
|
-
if (
|
|
23195
|
-
var
|
|
23196
|
-
if (
|
|
23197
|
-
if (
|
|
23190
|
+
for (var z = 0, j = Object.keys(this.panoResources); z < j.length; z++) {
|
|
23191
|
+
var J = j[z];
|
|
23192
|
+
if (!(L.indexOf(J) >= 0)) {
|
|
23193
|
+
var V = this.panoResources[J];
|
|
23194
|
+
if (V.panoPicture) {
|
|
23195
|
+
var U = V.panoPicture.map;
|
|
23196
|
+
if (U) {
|
|
23197
|
+
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))
|
|
23198
23198
|
continue;
|
|
23199
|
-
|
|
23199
|
+
U.dispose(), V.panoPicture = null;
|
|
23200
23200
|
}
|
|
23201
23201
|
}
|
|
23202
|
-
|
|
23202
|
+
H.indexOf(J) >= 0 || delete this.panoResources[J];
|
|
23203
23203
|
}
|
|
23204
23204
|
}
|
|
23205
|
-
var
|
|
23206
|
-
|
|
23205
|
+
var G = panoParse(b.panoId);
|
|
23206
|
+
G !== this.currentPano && (this.currentPano = G, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
|
|
23207
23207
|
userAction: this.userAction,
|
|
23208
23208
|
prevPano: panoParse(T.panoId),
|
|
23209
23209
|
state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
|
|
@@ -23215,19 +23215,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23215
23215
|
isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
|
|
23216
23216
|
var W = this.works.getObserver(this.currentPano), X = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, Z = this.works.getObserver(E.panoId), Y = this.works.getObserver(b.panoId);
|
|
23217
23217
|
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && W) {
|
|
23218
|
-
for (var
|
|
23218
|
+
for (var K = [], ee = W.work.observers, te = 0, ne = W.accessibleNodes; te < ne.length; te++) {
|
|
23219
23219
|
var ie = ne[te], M = ee[ie];
|
|
23220
|
-
M &&
|
|
23220
|
+
M && K.push(M);
|
|
23221
23221
|
}
|
|
23222
23222
|
var ce = /* @__PURE__ */ new Map();
|
|
23223
|
-
if (
|
|
23223
|
+
if (K.sort(function(ue, Ae) {
|
|
23224
23224
|
var Me = ce.get(ue);
|
|
23225
23225
|
typeof Me == "undefined" && (Me = ue.standingPosition.distanceTo(W.standingPosition), ce.set(ue, Me));
|
|
23226
23226
|
var He = ce.get(ue);
|
|
23227
23227
|
return typeof He == "undefined" && (He = Ae.standingPosition.distanceTo(W.standingPosition), ce.set(Ae, He)), Me - He;
|
|
23228
|
-
}),
|
|
23229
|
-
this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount %
|
|
23230
|
-
var ae =
|
|
23228
|
+
}), K.length) {
|
|
23229
|
+
this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % K.length;
|
|
23230
|
+
var ae = K[this.accessibleObserverFloorCheckCount], de = this.modelScene.models.find(function(ue) {
|
|
23231
23231
|
return ue.work === (ae == null ? void 0 : ae.work);
|
|
23232
23232
|
});
|
|
23233
23233
|
if (ae && de && de.visible) {
|
|
@@ -23486,7 +23486,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23486
23486
|
w.dispose();
|
|
23487
23487
|
else {
|
|
23488
23488
|
w.name = A;
|
|
23489
|
-
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,
|
|
23489
|
+
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 = {
|
|
23490
23490
|
panoId: f,
|
|
23491
23491
|
effect: c,
|
|
23492
23492
|
panoPicture: {
|
|
@@ -23499,7 +23499,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23499
23499
|
position: d.position.clone().applyMatrix4(d.work.transform),
|
|
23500
23500
|
fixCameraTransform: new THREE.Matrix4()
|
|
23501
23501
|
};
|
|
23502
|
-
|
|
23502
|
+
B.panoPicture && s.panoPictureObserverMap.set(B.panoPicture, d), s.doMoveToPano(e, B, r);
|
|
23503
23503
|
}
|
|
23504
23504
|
},
|
|
23505
23505
|
onError: function(S) {
|
|
@@ -23624,53 +23624,53 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23624
23624
|
if (this.locationMotion.ended) {
|
|
23625
23625
|
var w = this.locationMotion.getKeyFrameSegment(v);
|
|
23626
23626
|
w[0];
|
|
23627
|
-
var C = w[1], I = this.locationMotion.value,
|
|
23628
|
-
T = Math.max(
|
|
23627
|
+
var C = w[1], I = this.locationMotion.value, B = ((u = this.panoResourceFromLocationMotionKeyframe(C)) !== null && u !== void 0 ? u : this.camera).position, M = r.position;
|
|
23628
|
+
T = Math.max(B.distanceTo(M), b), S = [
|
|
23629
23629
|
{ key: C.key, progress: 0, value: __assign(__assign({}, I), { count: 0 }) },
|
|
23630
23630
|
{ key: E, progress: 1, value: { distance: 0, count: 1 } }
|
|
23631
23631
|
], R = 0;
|
|
23632
23632
|
} else {
|
|
23633
|
-
var
|
|
23633
|
+
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);
|
|
23634
23634
|
T = N + D, S = [
|
|
23635
23635
|
{ key: L.key, progress: 0, value: __assign({}, I) },
|
|
23636
23636
|
{ key: C.key, progress: N / T, value: C.value },
|
|
23637
23637
|
{ key: E, progress: 1, value: { count: C.value.count + 1, distance: 0 } }
|
|
23638
23638
|
];
|
|
23639
|
-
var
|
|
23640
|
-
|
|
23639
|
+
var q = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
|
|
23640
|
+
q === 0 || q === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * q / z;
|
|
23641
23641
|
}
|
|
23642
|
-
var
|
|
23642
|
+
var j = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), J = {
|
|
23643
23643
|
longitude: o.longitude,
|
|
23644
23644
|
latitude: o.latitude,
|
|
23645
23645
|
fov: o.fov
|
|
23646
|
-
},
|
|
23646
|
+
}, 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;
|
|
23647
23647
|
if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
23648
23648
|
options: o,
|
|
23649
|
-
prevPano:
|
|
23649
|
+
prevPano: U,
|
|
23650
23650
|
progress: 0,
|
|
23651
|
-
state:
|
|
23651
|
+
state: V,
|
|
23652
23652
|
userAction: this.userAction,
|
|
23653
23653
|
error: null
|
|
23654
|
-
})), o.moveStartCallback && o.moveStartCallback(
|
|
23655
|
-
this.cameraMotion.set(
|
|
23654
|
+
})), 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")
|
|
23655
|
+
this.cameraMotion.set(J, j).catch(noop);
|
|
23656
23656
|
else {
|
|
23657
|
-
var
|
|
23657
|
+
var G = coordinatesToVector({
|
|
23658
23658
|
longitude: this.cameraMotion.value.longitude,
|
|
23659
23659
|
latitude: this.cameraMotion.value.latitude
|
|
23660
23660
|
}), W = coordinatesToVector({
|
|
23661
|
-
longitude: (d =
|
|
23662
|
-
latitude: (h =
|
|
23661
|
+
longitude: (d = J.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
|
|
23662
|
+
latitude: (h = J.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
|
|
23663
23663
|
}), X = new THREE.Object3D();
|
|
23664
|
-
X.lookAt(
|
|
23664
|
+
X.lookAt(G);
|
|
23665
23665
|
var Z = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion);
|
|
23666
23666
|
X.lookAt(W);
|
|
23667
|
-
var Y = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion),
|
|
23667
|
+
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, ne = 1;
|
|
23668
23668
|
r.effect === "zoomin" ? ne = 1.5 : r.effect === "zoomout" && (ne = 0.4);
|
|
23669
23669
|
for (var ie = clamp$1(te * ne, 1, 170), ce = 0; ce < S.length - 1; ce++) {
|
|
23670
23670
|
var ae = S[ce].key;
|
|
23671
23671
|
if (ae) {
|
|
23672
23672
|
var de = this.panoResources[ae];
|
|
23673
|
-
de && (de.fixCameraTransform.copy(
|
|
23673
|
+
de && (de.fixCameraTransform.copy(K), de.panoPicture && (de.panoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
|
|
23674
23674
|
}
|
|
23675
23675
|
}
|
|
23676
23676
|
this.cameraMotion.setKeyframes([
|
|
@@ -23685,22 +23685,22 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23685
23685
|
{
|
|
23686
23686
|
progress: 0,
|
|
23687
23687
|
value: {
|
|
23688
|
-
longitude: (m =
|
|
23689
|
-
latitude: (A =
|
|
23688
|
+
longitude: (m = J.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
|
|
23689
|
+
latitude: (A = J.latitude) !== null && A !== void 0 ? A : this.cameraMotion.value.latitude,
|
|
23690
23690
|
fov: ie
|
|
23691
23691
|
}
|
|
23692
23692
|
},
|
|
23693
23693
|
{
|
|
23694
23694
|
progress: 1,
|
|
23695
23695
|
value: {
|
|
23696
|
-
longitude: (g =
|
|
23697
|
-
latitude: (y =
|
|
23696
|
+
longitude: (g = J.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
|
|
23697
|
+
latitude: (y = J.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
|
|
23698
23698
|
fov: te
|
|
23699
23699
|
}
|
|
23700
23700
|
}
|
|
23701
|
-
],
|
|
23701
|
+
], j).catch(noop);
|
|
23702
23702
|
}
|
|
23703
|
-
var ge = this.locationMotion.setKeyframes(S,
|
|
23703
|
+
var ge = this.locationMotion.setKeyframes(S, j, R);
|
|
23704
23704
|
ge.then(
|
|
23705
23705
|
// resolve
|
|
23706
23706
|
// 动画结束
|
|
@@ -23712,7 +23712,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23712
23712
|
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 });
|
|
23713
23713
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
23714
23714
|
options: o,
|
|
23715
|
-
prevPano:
|
|
23715
|
+
prevPano: U,
|
|
23716
23716
|
progress: 1,
|
|
23717
23717
|
state: he,
|
|
23718
23718
|
userAction: s.userAction,
|
|
@@ -23746,9 +23746,9 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23746
23746
|
function() {
|
|
23747
23747
|
s.emit("pano.cancel", createEvent("pano.cancel", {
|
|
23748
23748
|
options: o,
|
|
23749
|
-
prevPano:
|
|
23749
|
+
prevPano: U,
|
|
23750
23750
|
progress: 0,
|
|
23751
|
-
state:
|
|
23751
|
+
state: V,
|
|
23752
23752
|
userAction: s.userAction,
|
|
23753
23753
|
error: null
|
|
23754
23754
|
})), o.moveCancelCallback && o.moveCancelCallback();
|
|
@@ -23770,19 +23770,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23770
23770
|
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();
|
|
23771
23771
|
if (m.length() === 0)
|
|
23772
23772
|
return null;
|
|
23773
|
-
var A = s.work.observers, g = s.accessibleNodes.filter(function(
|
|
23774
|
-
if (
|
|
23773
|
+
var A = s.work.observers, g = s.accessibleNodes.filter(function(q) {
|
|
23774
|
+
if (q === o.currentPano.panoIndex && s.work.workCode === o.currentPano.workCode)
|
|
23775
23775
|
return !1;
|
|
23776
|
-
var
|
|
23777
|
-
if (!
|
|
23776
|
+
var z = A[q];
|
|
23777
|
+
if (!z)
|
|
23778
23778
|
return !1;
|
|
23779
|
-
var
|
|
23780
|
-
return Math.abs(
|
|
23781
|
-
}), y = /* @__PURE__ */ new Map(), v = g.slice().sort(function(
|
|
23782
|
-
var
|
|
23783
|
-
typeof
|
|
23784
|
-
var
|
|
23785
|
-
return typeof
|
|
23779
|
+
var j = z.standingPosition.clone().applyMatrix4(z.work.transform).project(e);
|
|
23780
|
+
return Math.abs(j.z) > 1 || Math.abs(j.x) > 1 || Math.abs(j.y) > 1 ? !1 : z.loadable || z.active;
|
|
23781
|
+
}), y = /* @__PURE__ */ new Map(), v = g.slice().sort(function(q, z) {
|
|
23782
|
+
var j = A[q], J = y.get(j);
|
|
23783
|
+
typeof J == "undefined" && (J = scratchVector3$3.copy(j.standingPosition).applyMatrix4(j.work.transform).distanceTo(l), y.set(j, J));
|
|
23784
|
+
var V = A[z], U = y.get(V);
|
|
23785
|
+
return typeof U == "undefined" && (U = scratchVector3$3.copy(V.standingPosition).applyMatrix4(V.work.transform).distanceTo(l), y.set(V, U)), J - U;
|
|
23786
23786
|
});
|
|
23787
23787
|
y.clear();
|
|
23788
23788
|
for (var E = 0, b = [Math.PI / 8, Math.PI / 6, Math.PI / 4, Math.PI / 3]; E < b.length; E++)
|
|
@@ -23794,13 +23794,40 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23794
23794
|
return C;
|
|
23795
23795
|
}
|
|
23796
23796
|
}
|
|
23797
|
-
var
|
|
23798
|
-
|
|
23799
|
-
|
|
23800
|
-
|
|
23801
|
-
|
|
23802
|
-
|
|
23803
|
-
|
|
23797
|
+
var B = null;
|
|
23798
|
+
if (r) {
|
|
23799
|
+
var M = r.ray.intersectBox(this.modelScene.boundingBox, scratchVector3$3);
|
|
23800
|
+
M && (M.project(e), Math.abs(M.z) <= 1 && (B = M.clone()));
|
|
23801
|
+
} else
|
|
23802
|
+
B = new THREE.Vector3(0, 0, 0);
|
|
23803
|
+
if (B) {
|
|
23804
|
+
var H = 0.4, L = s.accessibleNodes.filter(function(q) {
|
|
23805
|
+
if (q === o.currentPano.panoIndex && s.work.workCode === o.currentPano.workCode)
|
|
23806
|
+
return !1;
|
|
23807
|
+
var z = A[q];
|
|
23808
|
+
if (!z)
|
|
23809
|
+
return !1;
|
|
23810
|
+
var j = z.position.clone().applyMatrix4(z.work.transform).project(e);
|
|
23811
|
+
return Math.abs(j.z) > 1 || Math.abs(j.x) > 1 || Math.abs(j.y) > 1 ? !1 : z.loadable || z.active;
|
|
23812
|
+
}), O = /* @__PURE__ */ new Map(), F = L.slice().sort(function(q, z) {
|
|
23813
|
+
var j = A[q], J = O.get(j);
|
|
23814
|
+
typeof J == "undefined" && (J = scratchVector3$3.copy(j.position).applyMatrix4(j.work.transform).distanceTo(e.position), O.set(j, J));
|
|
23815
|
+
var V = A[z], U = O.get(V);
|
|
23816
|
+
return typeof U == "undefined" && (U = scratchVector3$3.copy(V.position).applyMatrix4(V.work.transform).distanceTo(e.position), O.set(V, U)), J - U;
|
|
23817
|
+
});
|
|
23818
|
+
O.clear();
|
|
23819
|
+
for (var N = 0, D = F; N < D.length; N++) {
|
|
23820
|
+
var w = D[N], C = A[w];
|
|
23821
|
+
if (C) {
|
|
23822
|
+
var M = scratchVector3$3.copy(C.position).applyMatrix4(C.work.transform);
|
|
23823
|
+
if (M.project(e), Math.abs(M.z) > 1)
|
|
23824
|
+
continue;
|
|
23825
|
+
if (Math.pow(B.x - M.x, 2) + Math.pow(B.y - M.y, 2) < Math.pow(H, 2))
|
|
23826
|
+
return C;
|
|
23827
|
+
}
|
|
23828
|
+
}
|
|
23829
|
+
}
|
|
23830
|
+
return null;
|
|
23804
23831
|
}, t.prototype.onTapGesture = function(e) {
|
|
23805
23832
|
var r = this, o;
|
|
23806
23833
|
if (this.userAction = e.userAction, this.stopMomentumMovement(), !!this.initAnimationed) {
|
|
@@ -23808,21 +23835,21 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23808
23835
|
s.floorIndex = -1;
|
|
23809
23836
|
var u = this.camera.getDirection(new THREE.Vector3()).setY(0), l = null, c = this.works.getObserver(this.currentPano);
|
|
23810
23837
|
if (c) {
|
|
23811
|
-
var f = c.work.observers, d = c.accessibleNodes.filter(function(
|
|
23812
|
-
if (
|
|
23838
|
+
var f = c.work.observers, d = c.accessibleNodes.filter(function(U) {
|
|
23839
|
+
if (U === r.currentPano.panoIndex && c.work.workCode === r.currentPano.workCode)
|
|
23813
23840
|
return !1;
|
|
23814
|
-
var
|
|
23815
|
-
if (!
|
|
23841
|
+
var G = f[U];
|
|
23842
|
+
if (!G)
|
|
23816
23843
|
return !1;
|
|
23817
|
-
var W = scratchVector3$3.copy(
|
|
23818
|
-
return W.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 :
|
|
23844
|
+
var W = scratchVector3$3.copy(G.position).applyMatrix4(G.work.transform);
|
|
23845
|
+
return W.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : G.loadable || G.active;
|
|
23819
23846
|
}), h = this.modelScene.intersectRaycaster(s)[0];
|
|
23820
23847
|
if (h) {
|
|
23821
|
-
var p = arrayMin(d, function(
|
|
23822
|
-
var
|
|
23823
|
-
if (!
|
|
23848
|
+
var p = arrayMin(d, function(U) {
|
|
23849
|
+
var G = f[U];
|
|
23850
|
+
if (!G)
|
|
23824
23851
|
return 1 / 0;
|
|
23825
|
-
var W = scratchVector3$3.copy(
|
|
23852
|
+
var W = scratchVector3$3.copy(G.standingPosition).applyMatrix4(G.work.transform);
|
|
23826
23853
|
return W.distanceTo(h.point);
|
|
23827
23854
|
}, !0), m = p[0], A = p[1];
|
|
23828
23855
|
typeof m == "number" && A < this.panoTapTriggerRadius && (l = (o = f[m]) !== null && o !== void 0 ? o : null);
|
|
@@ -23838,44 +23865,44 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
23838
23865
|
if (!l)
|
|
23839
23866
|
this.emit("gesture.tap", e), e.defaultPrevented || this.locationMotion.ended === !0 && this.cameraBounce();
|
|
23840
23867
|
else {
|
|
23841
|
-
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 = [],
|
|
23842
|
-
var m =
|
|
23868
|
+
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++) {
|
|
23869
|
+
var m = H[M];
|
|
23843
23870
|
if (l.panoIndex !== m && !(m === this.currentPano.panoIndex && l.work.workCode === this.currentPano.workCode)) {
|
|
23844
|
-
var L =
|
|
23871
|
+
var L = B[m];
|
|
23845
23872
|
if (L) {
|
|
23846
23873
|
var O = L.position.clone().applyMatrix4(L.work.transform).sub(l.position.clone().applyMatrix4(l.work.transform)).setY(0).normalize();
|
|
23847
23874
|
R.angleTo(O) < T && I.push(O);
|
|
23848
23875
|
}
|
|
23849
23876
|
}
|
|
23850
23877
|
}
|
|
23851
|
-
var F = I.length > 0 ? I : __spreadArray(__spreadArray([], w, !0), C, !0), N = F.slice().sort(function(
|
|
23852
|
-
return
|
|
23878
|
+
var F = I.length > 0 ? I : __spreadArray(__spreadArray([], w, !0), C, !0), N = F.slice().sort(function(U, G) {
|
|
23879
|
+
return U.angleTo(R) - G.angleTo(R);
|
|
23853
23880
|
})[0];
|
|
23854
23881
|
if (N && N.angleTo(u) > S && (b.longitude = Math.atan2(-N.x, -N.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
|
|
23855
|
-
var D = e.state.fov,
|
|
23856
|
-
b.latitude = clamp$1(0,
|
|
23882
|
+
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);
|
|
23883
|
+
b.latitude = clamp$1(0, q, z);
|
|
23857
23884
|
}
|
|
23858
|
-
var
|
|
23859
|
-
if (
|
|
23885
|
+
var j = __assign({}, e.state);
|
|
23886
|
+
if (j.workCode = l.work.workCode, j.panoIndex = l.panoIndex, b.longitude !== void 0 && (j.longitude = b.longitude), b.latitude !== void 0 && (j.latitude = b.latitude), b.fov !== void 0 && (j.fov = b.fov), j.distance = 0, j.offset = l.position.clone(), e.state = j, this.emit("gesture.tap", e), !e.defaultPrevented) {
|
|
23860
23887
|
if (this.emit("pano.select", createEvent("pano.select", {
|
|
23861
23888
|
prevPano: this.currentPano,
|
|
23862
|
-
state:
|
|
23889
|
+
state: j,
|
|
23863
23890
|
userAction: e.userAction,
|
|
23864
23891
|
options: b,
|
|
23865
23892
|
progress: 0,
|
|
23866
23893
|
error: null
|
|
23867
23894
|
})), l && !l.active) {
|
|
23868
|
-
var
|
|
23895
|
+
var J = panoStringify({
|
|
23869
23896
|
panoIndex: l.panoIndex,
|
|
23870
23897
|
workCode: l.work.workCode
|
|
23871
|
-
}),
|
|
23872
|
-
|
|
23898
|
+
}), V = this.panoMeshes.get(J);
|
|
23899
|
+
V && (V.setDisabled(!1), V.setLoading(!0));
|
|
23873
23900
|
}
|
|
23874
23901
|
l && l.active && this.emit("pano.request", createEvent("pano.request", {
|
|
23875
23902
|
userAction: e.userAction,
|
|
23876
23903
|
prevPano: this.currentPano,
|
|
23877
23904
|
progress: 0,
|
|
23878
|
-
state:
|
|
23905
|
+
state: j,
|
|
23879
23906
|
options: b,
|
|
23880
23907
|
error: null
|
|
23881
23908
|
}));
|
|
@@ -23971,8 +23998,8 @@ var updateEyeViewMatrices = /* @__PURE__ */ (function() {
|
|
|
23971
23998
|
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;
|
|
23972
23999
|
}
|
|
23973
24000
|
function e(r, o) {
|
|
23974
|
-
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,
|
|
23975
|
-
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 *
|
|
24001
|
+
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;
|
|
24002
|
+
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;
|
|
23976
24003
|
}
|
|
23977
24004
|
return function(r, o, s) {
|
|
23978
24005
|
n(r, o), s && t(r, r, s), e(r, r);
|
|
@@ -24783,28 +24810,28 @@ void main() {
|
|
|
24783
24810
|
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;
|
|
24784
24811
|
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) {
|
|
24785
24812
|
this.locationMotion.update(e);
|
|
24786
|
-
var w = this.locationMotion.getKeyFrameSegment(e), C = w[0], I = w[1],
|
|
24787
|
-
if (h.progress = O, M.panoPicture && (O < 1 ?
|
|
24788
|
-
if (h.pano0 &&
|
|
24813
|
+
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;
|
|
24814
|
+
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") {
|
|
24815
|
+
if (h.pano0 && B.panoPicture) {
|
|
24789
24816
|
var F = {
|
|
24790
24817
|
panoId: h.pano0.panoId,
|
|
24791
24818
|
map: h.pano0.map,
|
|
24792
24819
|
mapSize: h.pano0.mapSize,
|
|
24793
24820
|
zoom: h.pano0.zoom,
|
|
24794
|
-
matrix:
|
|
24821
|
+
matrix: B.panoPicture.matrix.clone().setPosition(M.position)
|
|
24795
24822
|
}, N = this.panoPictureObserverMap.get(h.pano0);
|
|
24796
24823
|
N && this.panoPictureObserverMap.set(F, N), h.pano0 = F;
|
|
24797
24824
|
}
|
|
24798
|
-
|
|
24825
|
+
H.copy(L), R = !0;
|
|
24799
24826
|
}
|
|
24800
|
-
p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(
|
|
24801
|
-
for (var D = [],
|
|
24802
|
-
var
|
|
24803
|
-
|
|
24827
|
+
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);
|
|
24828
|
+
for (var D = [], q = [], z = 0, j = this.locationMotion.keyframes; z < j.length; z++) {
|
|
24829
|
+
var J = j[z], V = J.key, U = J.progress;
|
|
24830
|
+
V !== void 0 && (D.push(V), U > this.locationMotion.progress && q.push(V));
|
|
24804
24831
|
}
|
|
24805
|
-
for (var
|
|
24806
|
-
var X = W[
|
|
24807
|
-
if (!(
|
|
24832
|
+
for (var G = 0, W = Object.keys(this.panoResources); G < W.length; G++) {
|
|
24833
|
+
var X = W[G];
|
|
24834
|
+
if (!(q.indexOf(X) >= 0)) {
|
|
24808
24835
|
var Z = this.panoResources[X];
|
|
24809
24836
|
if (Z.panoPicture) {
|
|
24810
24837
|
var Y = Z.panoPicture.map;
|
|
@@ -24827,8 +24854,8 @@ void main() {
|
|
|
24827
24854
|
}));
|
|
24828
24855
|
}
|
|
24829
24856
|
isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), p.offset && this.camera.position.copy(p.offset);
|
|
24830
|
-
var
|
|
24831
|
-
this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose(), (
|
|
24857
|
+
var K = this.camera.pose.longitude, ee = this.camera.pose.latitude;
|
|
24858
|
+
this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose(), (K !== this.camera.pose.longitude || ee !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop), this.emit("camera.update", createEvent("camera.update", {
|
|
24832
24859
|
userAction: !0,
|
|
24833
24860
|
state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
|
|
24834
24861
|
}))), this.works.getObserver(this.currentPano);
|
|
@@ -25135,8 +25162,8 @@ void main() {
|
|
|
25135
25162
|
if (this.perspToOrthoMotion.ended || (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), !this.locationMotion.ended) {
|
|
25136
25163
|
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);
|
|
25137
25164
|
for (var f = new THREE.Vector3(this.locationMotion.value.x, this.locationMotion.value.y, this.locationMotion.value.z), d = [], h = function(S) {
|
|
25138
|
-
var R = p.modelScene.models.find(function(
|
|
25139
|
-
return
|
|
25165
|
+
var R = p.modelScene.models.find(function(B) {
|
|
25166
|
+
return B.work === S;
|
|
25140
25167
|
});
|
|
25141
25168
|
if (!R || R.visible === !1 || S.observers.length <= 0)
|
|
25142
25169
|
return "continue";
|
|
@@ -25228,65 +25255,65 @@ void main() {
|
|
|
25228
25255
|
y: e.y,
|
|
25229
25256
|
z: e.z,
|
|
25230
25257
|
distance: 0
|
|
25231
|
-
},
|
|
25258
|
+
}, B = {
|
|
25232
25259
|
longitude: r.longitude,
|
|
25233
25260
|
latitude: r.latitude,
|
|
25234
25261
|
fov: r.fov
|
|
25235
|
-
}, M = [],
|
|
25236
|
-
var
|
|
25237
|
-
return X.work ===
|
|
25262
|
+
}, M = [], H = function(J) {
|
|
25263
|
+
var V = L.modelScene.models.find(function(X) {
|
|
25264
|
+
return X.work === J;
|
|
25238
25265
|
});
|
|
25239
|
-
if (!
|
|
25266
|
+
if (!V || V.visible === !1 || J.observers.length <= 0)
|
|
25240
25267
|
return "continue";
|
|
25241
|
-
if (scratchObserverBox$1.copy(
|
|
25242
|
-
for (var
|
|
25243
|
-
var W =
|
|
25268
|
+
if (scratchObserverBox$1.copy(J.observerBox).expandByScalar(10).applyMatrix4(J.transform), scratchObserverBox$1.containsPoint(d))
|
|
25269
|
+
for (var U = 0, G = J.observers; U < G.length; U++) {
|
|
25270
|
+
var W = G[U];
|
|
25244
25271
|
M.push(W);
|
|
25245
25272
|
}
|
|
25246
25273
|
}, L = this, O = 0, F = this.works; O < F.length; O++) {
|
|
25247
25274
|
var N = F[O];
|
|
25248
|
-
|
|
25275
|
+
H(N);
|
|
25249
25276
|
}
|
|
25250
|
-
var D = arrayMin(M, function(
|
|
25251
|
-
return scratchVector3$2.copy(
|
|
25252
|
-
}),
|
|
25277
|
+
var D = arrayMin(M, function(J) {
|
|
25278
|
+
return scratchVector3$2.copy(J.position).applyMatrix4(J.work.transform).distanceTo(d);
|
|
25279
|
+
}), q = D ? {
|
|
25253
25280
|
workCode: D.work.workCode,
|
|
25254
25281
|
panoIndex: D.panoIndex
|
|
25255
25282
|
} : {
|
|
25256
25283
|
workCode: "",
|
|
25257
25284
|
panoIndex: 0
|
|
25258
|
-
}, z = __assign(__assign({},
|
|
25285
|
+
}, 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 }), j = this.currentPano;
|
|
25259
25286
|
this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
25260
25287
|
options: r,
|
|
25261
|
-
prevPano:
|
|
25288
|
+
prevPano: j,
|
|
25262
25289
|
progress: 0,
|
|
25263
25290
|
state: z,
|
|
25264
25291
|
userAction: this.userAction,
|
|
25265
25292
|
error: null
|
|
25266
|
-
})), r.moveStartCallback && r.moveStartCallback(z), this.cameraMotion.set(
|
|
25293
|
+
})), r.moveStartCallback && r.moveStartCallback(z), this.cameraMotion.set(B, C).catch(noop), this.locationMotion.set(I, C, w).then(
|
|
25267
25294
|
// resolve
|
|
25268
25295
|
// 动画结束
|
|
25269
25296
|
function() {
|
|
25270
|
-
for (var
|
|
25271
|
-
var
|
|
25272
|
-
|
|
25297
|
+
for (var J = 0, V = s.modelScene.children; J < V.length; J++) {
|
|
25298
|
+
var U = V[J];
|
|
25299
|
+
U instanceof Model && U.show();
|
|
25273
25300
|
}
|
|
25274
|
-
var
|
|
25301
|
+
var G = __assign(__assign(__assign({}, q), { mode: s.mode }), clonePose(s.camera.pose));
|
|
25275
25302
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
25276
25303
|
options: r,
|
|
25277
|
-
prevPano:
|
|
25304
|
+
prevPano: j,
|
|
25278
25305
|
progress: 0,
|
|
25279
|
-
state:
|
|
25306
|
+
state: G,
|
|
25280
25307
|
userAction: s.userAction,
|
|
25281
25308
|
error: null
|
|
25282
|
-
})), r.moveEndCallback && r.moveEndCallback(
|
|
25309
|
+
})), r.moveEndCallback && r.moveEndCallback(G);
|
|
25283
25310
|
},
|
|
25284
25311
|
// reject
|
|
25285
25312
|
// 动画被取消
|
|
25286
25313
|
function() {
|
|
25287
25314
|
r.moveCancelCallback && r.moveCancelCallback(), s.emit("pano.cancel", createEvent("pano.cancel", {
|
|
25288
25315
|
options: r,
|
|
25289
|
-
prevPano:
|
|
25316
|
+
prevPano: j,
|
|
25290
25317
|
progress: 0,
|
|
25291
25318
|
state: z,
|
|
25292
25319
|
userAction: s.userAction,
|
|
@@ -25675,8 +25702,8 @@ void main() {
|
|
|
25675
25702
|
y: C.offset.y,
|
|
25676
25703
|
z: C.offset.z
|
|
25677
25704
|
}, 0).catch(noop)), e.isFinal) {
|
|
25678
|
-
var I = this.renderer.getSize(new THREE.Vector2()),
|
|
25679
|
-
|
|
25705
|
+
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();
|
|
25706
|
+
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 = {
|
|
25680
25707
|
uuid: createUuid()
|
|
25681
25708
|
}, this.requestMomentumMovement(e, !0, { longitude: 0, latitude: 0, x: L.x, y: L.y, z: L.z }, 0);
|
|
25682
25709
|
}
|
|
@@ -25684,7 +25711,7 @@ void main() {
|
|
|
25684
25711
|
var y = {
|
|
25685
25712
|
x: e.center.x - o.x,
|
|
25686
25713
|
y: e.center.y - o.y
|
|
25687
|
-
}, 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),
|
|
25714
|
+
}, 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);
|
|
25688
25715
|
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);
|
|
25689
25716
|
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 });
|
|
25690
25717
|
if (e.isFinal && Object.assign(e, { __fixFinalState: !0 }), e.state = C, this.emit("gesture.pan", e), e.defaultPrevented)
|
|
@@ -25698,10 +25725,10 @@ void main() {
|
|
|
25698
25725
|
longitude: C.longitude,
|
|
25699
25726
|
latitude: C.latitude
|
|
25700
25727
|
}, 0).catch(noop), e.isFinal) {
|
|
25701
|
-
var
|
|
25728
|
+
var j = e.velocityX, J = e.velocityY;
|
|
25702
25729
|
this.inMomentumMovement = {
|
|
25703
25730
|
uuid: createUuid()
|
|
25704
|
-
}, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x:
|
|
25731
|
+
}, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: j, y: J })), { x: 0, y: 0, z: 0 }), 0);
|
|
25705
25732
|
}
|
|
25706
25733
|
}
|
|
25707
25734
|
}
|
|
@@ -26465,8 +26492,8 @@ var LineSegments2 = (
|
|
|
26465
26492
|
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;
|
|
26466
26493
|
var I = E.closestPointToPointParameter(y, !0);
|
|
26467
26494
|
E.at(I, b);
|
|
26468
|
-
var
|
|
26469
|
-
if (M &&
|
|
26495
|
+
var B = THREE.MathUtils.lerp(m.z, A.z, I), M = B >= -1 && B <= 1, H = y.distanceTo(b) < d * 0.5;
|
|
26496
|
+
if (M && H) {
|
|
26470
26497
|
E.start.fromBufferAttribute(h, S), E.end.fromBufferAttribute(p, S), E.start.applyMatrix4(T), E.end.applyMatrix4(T);
|
|
26471
26498
|
var L = new THREE.Vector3(), O = new THREE.Vector3();
|
|
26472
26499
|
o.distanceSqToSegment(E.start, E.end, O, L), r.push({
|
|
@@ -26550,7 +26577,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
|
|
|
26550
26577
|
}
|
|
26551
26578
|
return Object.defineProperty(t, "version", {
|
|
26552
26579
|
get: function() {
|
|
26553
|
-
return "6.7.0-alpha.
|
|
26580
|
+
return "6.7.0-alpha.4";
|
|
26554
26581
|
},
|
|
26555
26582
|
enumerable: !1,
|
|
26556
26583
|
configurable: !0
|
|
@@ -27085,7 +27112,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27085
27112
|
I.dispose();
|
|
27086
27113
|
else {
|
|
27087
27114
|
I.name = g;
|
|
27088
|
-
var
|
|
27115
|
+
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 = {
|
|
27089
27116
|
panoId: f,
|
|
27090
27117
|
effect: c,
|
|
27091
27118
|
leftPanoPicture: {
|
|
@@ -27098,7 +27125,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27098
27125
|
position: d.position.clone(),
|
|
27099
27126
|
fixCameraTransform: new THREE.Matrix4()
|
|
27100
27127
|
};
|
|
27101
|
-
s.doMoveToPano(e,
|
|
27128
|
+
s.doMoveToPano(e, H, r);
|
|
27102
27129
|
}
|
|
27103
27130
|
},
|
|
27104
27131
|
onError: function(w) {
|
|
@@ -27165,53 +27192,53 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27165
27192
|
if (this.locationMotion.ended) {
|
|
27166
27193
|
var R = this.locationMotion.getKeyFrameSegment(y);
|
|
27167
27194
|
R[0];
|
|
27168
|
-
var w = R[1], C = this.locationMotion.value, I = this.panoResourceFromLocationMotionKeyframe(w).position,
|
|
27169
|
-
b = Math.max(I.distanceTo(
|
|
27195
|
+
var w = R[1], C = this.locationMotion.value, I = this.panoResourceFromLocationMotionKeyframe(w).position, B = r.position;
|
|
27196
|
+
b = Math.max(I.distanceTo(B), E), T = [
|
|
27170
27197
|
{ key: w.key, progress: 0, value: __assign(__assign({}, C), { count: 0 }) },
|
|
27171
27198
|
{ key: v, progress: 1, value: { distance: 0, count: 1 } }
|
|
27172
27199
|
], S = 0;
|
|
27173
27200
|
} else {
|
|
27174
|
-
var M = this.locationMotion.getKeyFrameSegment(y),
|
|
27201
|
+
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);
|
|
27175
27202
|
b = F + N, T = [
|
|
27176
|
-
{ key:
|
|
27203
|
+
{ key: H.key, progress: 0, value: __assign({}, C) },
|
|
27177
27204
|
{ key: w.key, progress: F / b, value: w.value },
|
|
27178
27205
|
{ key: v, progress: 1, value: { count: w.value.count + 1, distance: 0 } }
|
|
27179
27206
|
];
|
|
27180
|
-
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes),
|
|
27181
|
-
S = this.locationMotion.getProgressVelocity(y) * D /
|
|
27207
|
+
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), q = this.locationMotionKeyframesLength(T);
|
|
27208
|
+
S = this.locationMotion.getProgressVelocity(y) * D / q;
|
|
27182
27209
|
}
|
|
27183
|
-
var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0),
|
|
27210
|
+
var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), j = {
|
|
27184
27211
|
longitude: o.longitude,
|
|
27185
27212
|
latitude: o.latitude,
|
|
27186
27213
|
fov: o.fov
|
|
27187
|
-
},
|
|
27214
|
+
}, J = __assign(__assign({}, e), { mode: this.mode, longitude: (u = j.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = j.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = j.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), V = this.currentPano;
|
|
27188
27215
|
if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
27189
27216
|
options: o,
|
|
27190
|
-
prevPano:
|
|
27217
|
+
prevPano: V,
|
|
27191
27218
|
progress: 0,
|
|
27192
|
-
state:
|
|
27219
|
+
state: J,
|
|
27193
27220
|
userAction: this.userAction,
|
|
27194
27221
|
error: null
|
|
27195
|
-
})), o.moveStartCallback && o.moveStartCallback(
|
|
27196
|
-
this.cameraMotion.set(
|
|
27222
|
+
})), 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")
|
|
27223
|
+
this.cameraMotion.set(j, z).catch(noop);
|
|
27197
27224
|
else {
|
|
27198
|
-
var
|
|
27225
|
+
var U = coordinatesToVector({
|
|
27199
27226
|
longitude: this.cameraMotion.value.longitude,
|
|
27200
27227
|
latitude: this.cameraMotion.value.latitude
|
|
27201
|
-
}),
|
|
27202
|
-
longitude: (f =
|
|
27203
|
-
latitude: (d =
|
|
27228
|
+
}), G = coordinatesToVector({
|
|
27229
|
+
longitude: (f = j.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
|
|
27230
|
+
latitude: (d = j.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
|
|
27204
27231
|
}), W = new THREE.Object3D();
|
|
27205
|
-
W.lookAt(
|
|
27232
|
+
W.lookAt(U);
|
|
27206
27233
|
var X = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion);
|
|
27207
|
-
W.lookAt(
|
|
27208
|
-
var Z = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), Y = new THREE.Matrix4().getInverse(X).premultiply(Z),
|
|
27234
|
+
W.lookAt(G);
|
|
27235
|
+
var Z = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), Y = new THREE.Matrix4().getInverse(X).premultiply(Z), K = this.cameraMotion.value.fov, ee = (h = j.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
|
|
27209
27236
|
r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
|
|
27210
27237
|
for (var ne = ee * te, ie = 0; ie < T.length - 1; ie++) {
|
|
27211
27238
|
var ce = T[ie].key;
|
|
27212
27239
|
if (ce) {
|
|
27213
27240
|
var ae = this.panoResources[ce];
|
|
27214
|
-
ae && (ae.fixCameraTransform.copy(Y), ae.leftPanoPicture && (ae.leftPanoPicture.zoom = Math.tan(ne / 2 / 180 * Math.PI) / Math.tan(
|
|
27241
|
+
ae && (ae.fixCameraTransform.copy(Y), ae.leftPanoPicture && (ae.leftPanoPicture.zoom = Math.tan(ne / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
|
|
27215
27242
|
}
|
|
27216
27243
|
}
|
|
27217
27244
|
this.cameraMotion.setKeyframes([
|
|
@@ -27226,16 +27253,16 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27226
27253
|
{
|
|
27227
27254
|
progress: 0,
|
|
27228
27255
|
value: {
|
|
27229
|
-
longitude: (p =
|
|
27230
|
-
latitude: (m =
|
|
27256
|
+
longitude: (p = j.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
|
|
27257
|
+
latitude: (m = j.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
|
|
27231
27258
|
fov: ne
|
|
27232
27259
|
}
|
|
27233
27260
|
},
|
|
27234
27261
|
{
|
|
27235
27262
|
progress: 1,
|
|
27236
27263
|
value: {
|
|
27237
|
-
longitude: (A =
|
|
27238
|
-
latitude: (g =
|
|
27264
|
+
longitude: (A = j.longitude) !== null && A !== void 0 ? A : this.cameraMotion.value.longitude,
|
|
27265
|
+
latitude: (g = j.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
|
|
27239
27266
|
fov: ee
|
|
27240
27267
|
}
|
|
27241
27268
|
}
|
|
@@ -27253,7 +27280,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27253
27280
|
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 });
|
|
27254
27281
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
27255
27282
|
options: o,
|
|
27256
|
-
prevPano:
|
|
27283
|
+
prevPano: V,
|
|
27257
27284
|
progress: 1,
|
|
27258
27285
|
state: le,
|
|
27259
27286
|
userAction: s.userAction,
|
|
@@ -27284,9 +27311,9 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27284
27311
|
function() {
|
|
27285
27312
|
s.emit("pano.cancel", createEvent("pano.cancel", {
|
|
27286
27313
|
options: o,
|
|
27287
|
-
prevPano:
|
|
27314
|
+
prevPano: V,
|
|
27288
27315
|
progress: 0,
|
|
27289
|
-
state:
|
|
27316
|
+
state: J,
|
|
27290
27317
|
userAction: s.userAction,
|
|
27291
27318
|
error: null
|
|
27292
27319
|
})), o.moveCancelCallback && o.moveCancelCallback();
|
|
@@ -27383,12 +27410,12 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27383
27410
|
for (var o = this, s, u, l, c, f, d, h, p, m, A = [], g = 2; g < arguments.length; g++)
|
|
27384
27411
|
A[g - 2] = arguments[g];
|
|
27385
27412
|
this.userAction = !0;
|
|
27386
|
-
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),
|
|
27413
|
+
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;
|
|
27387
27414
|
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) {
|
|
27388
27415
|
this.locationMotion.update(e);
|
|
27389
|
-
var
|
|
27390
|
-
|
|
27391
|
-
var L =
|
|
27416
|
+
var H = this.locationMotion.getKeyFrameSegment(e);
|
|
27417
|
+
H[0];
|
|
27418
|
+
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;
|
|
27392
27419
|
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") {
|
|
27393
27420
|
if (y.pano0 && w.leftPanoPicture) {
|
|
27394
27421
|
var D = {
|
|
@@ -27397,26 +27424,26 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27397
27424
|
mapSize: y.pano0.mapSize,
|
|
27398
27425
|
zoom: y.pano0.zoom,
|
|
27399
27426
|
matrix: w.leftPanoPicture.matrix.clone().setPosition(C.position)
|
|
27400
|
-
},
|
|
27401
|
-
|
|
27427
|
+
}, q = this.panoPictureObserverMap.get(y.pano0);
|
|
27428
|
+
q && this.panoPictureObserverMap.set(D, q), y.pano0 = D;
|
|
27402
27429
|
}
|
|
27403
27430
|
O.copy(F), M = !0;
|
|
27404
27431
|
}
|
|
27405
27432
|
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);
|
|
27406
|
-
for (var z = [],
|
|
27407
|
-
var
|
|
27408
|
-
|
|
27433
|
+
for (var z = [], j = [], J = 0, V = this.locationMotion.keyframes; J < V.length; J++) {
|
|
27434
|
+
var U = V[J], G = U.key, W = U.progress;
|
|
27435
|
+
G !== void 0 && (z.push(G), W > this.locationMotion.progress && j.push(G));
|
|
27409
27436
|
}
|
|
27410
27437
|
for (var X = 0, Z = Object.keys(this.panoResources); X < Z.length; X++) {
|
|
27411
27438
|
var Y = Z[X];
|
|
27412
|
-
if (!(
|
|
27413
|
-
var
|
|
27414
|
-
if (
|
|
27415
|
-
var ee =
|
|
27439
|
+
if (!(j.indexOf(Y) >= 0)) {
|
|
27440
|
+
var K = this.panoResources[Y];
|
|
27441
|
+
if (K.leftPanoPicture) {
|
|
27442
|
+
var ee = K.leftPanoPicture.map;
|
|
27416
27443
|
if (ee) {
|
|
27417
27444
|
if (ee === ((s = y.pano0) === null || s === void 0 ? void 0 : s.map) || ee === ((u = y.pano1) === null || u === void 0 ? void 0 : u.map))
|
|
27418
27445
|
continue;
|
|
27419
|
-
ee.dispose(),
|
|
27446
|
+
ee.dispose(), K.leftPanoPicture = null;
|
|
27420
27447
|
}
|
|
27421
27448
|
}
|
|
27422
27449
|
z.indexOf(Y) >= 0 || delete this.panoResources[Y];
|
|
@@ -27426,7 +27453,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27426
27453
|
te !== this.currentPano && (this.currentPano = te, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
|
|
27427
27454
|
userAction: this.userAction,
|
|
27428
27455
|
prevPano: panoParse(I.panoId),
|
|
27429
|
-
state: __assign(__assign(__assign(__assign({}, panoParse(
|
|
27456
|
+
state: __assign(__assign(__assign(__assign({}, panoParse(B.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), v),
|
|
27430
27457
|
options: {},
|
|
27431
27458
|
progress: this.locationMotion.progress,
|
|
27432
27459
|
error: null
|
|
@@ -27469,11 +27496,11 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27469
27496
|
}
|
|
27470
27497
|
if (Ze.length >= 1 && Ze[0].face)
|
|
27471
27498
|
if (Re.handedness === "right") {
|
|
27472
|
-
var P = Te.xrControllerRay.right.intersectObject(Te.xrCustomObjectsScene, !0), _ = Ze[0].face.normal, k = _.clone(),
|
|
27473
|
-
Te.intersectMesh.position.copy(
|
|
27474
|
-
var $ =
|
|
27499
|
+
var P = Te.xrControllerRay.right.intersectObject(Te.xrCustomObjectsScene, !0), _ = Ze[0].face.normal, k = _.clone(), Q = Ze[0].point.clone();
|
|
27500
|
+
Te.intersectMesh.position.copy(Q);
|
|
27501
|
+
var $ = Q.clone().add(k);
|
|
27475
27502
|
if (Te.intersectMesh.lookAt($), Math.abs(_.y) > 0.99) {
|
|
27476
|
-
var oe = Te.camera.position.clone().sub(
|
|
27503
|
+
var oe = Te.camera.position.clone().sub(Q);
|
|
27477
27504
|
Te.intersectMesh.rotation.z = -Math.atan2(oe.z, oe.x);
|
|
27478
27505
|
}
|
|
27479
27506
|
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));
|
|
@@ -27502,8 +27529,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27502
27529
|
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);
|
|
27503
27530
|
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && Ie) {
|
|
27504
27531
|
for (var Pe = [], _e = Ie.work.observers, Ee = 0, Ce = Ie.accessibleNodes; Ee < Ce.length; Ee++) {
|
|
27505
|
-
var Be = Ce[Ee],
|
|
27506
|
-
|
|
27532
|
+
var Be = Ce[Ee], q = _e[Be];
|
|
27533
|
+
q && Pe.push(q);
|
|
27507
27534
|
}
|
|
27508
27535
|
var je = /* @__PURE__ */ new Map();
|
|
27509
27536
|
if (Pe.sort(function(fe, Se) {
|
|
@@ -27542,24 +27569,24 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27542
27569
|
var ze = /* @__PURE__ */ new Map();
|
|
27543
27570
|
if (tt)
|
|
27544
27571
|
for (var ut = 0, rt = tt.accessibleNodes; ut < rt.length; ut++) {
|
|
27545
|
-
var Be = rt[ut],
|
|
27546
|
-
if (
|
|
27572
|
+
var Be = rt[ut], q = tt.work.observers[Be];
|
|
27573
|
+
if (q) {
|
|
27547
27574
|
var Ue = panoStringify({
|
|
27548
|
-
panoIndex:
|
|
27549
|
-
workCode:
|
|
27575
|
+
panoIndex: q.panoIndex,
|
|
27576
|
+
workCode: q.work.workCode
|
|
27550
27577
|
});
|
|
27551
|
-
ze.set(Ue,
|
|
27578
|
+
ze.set(Ue, q);
|
|
27552
27579
|
}
|
|
27553
27580
|
}
|
|
27554
27581
|
if (ke)
|
|
27555
27582
|
for (var ue = 0, Ae = ke.accessibleNodes; ue < Ae.length; ue++) {
|
|
27556
|
-
var Be = Ae[ue],
|
|
27557
|
-
if (
|
|
27583
|
+
var Be = Ae[ue], q = ke.work.observers[Be];
|
|
27584
|
+
if (q) {
|
|
27558
27585
|
var Ue = panoStringify({
|
|
27559
|
-
panoIndex:
|
|
27560
|
-
workCode:
|
|
27586
|
+
panoIndex: q.panoIndex,
|
|
27587
|
+
workCode: q.work.workCode
|
|
27561
27588
|
});
|
|
27562
|
-
ze.set(Ue,
|
|
27589
|
+
ze.set(Ue, q);
|
|
27563
27590
|
}
|
|
27564
27591
|
}
|
|
27565
27592
|
if (this.panoMeshes.forEach(function(fe, Se) {
|
|
@@ -27610,8 +27637,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27610
27637
|
});
|
|
27611
27638
|
}
|
|
27612
27639
|
{
|
|
27613
|
-
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,
|
|
27614
|
-
if (Tt && (
|
|
27640
|
+
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;
|
|
27641
|
+
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) {
|
|
27615
27642
|
this.tiling.setObserver(null);
|
|
27616
27643
|
var It = {
|
|
27617
27644
|
renderer: this.renderer,
|
|
@@ -27629,7 +27656,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27629
27656
|
this.tiling.update(It), this.modelScene.parameter.set("refinedScreen", null);
|
|
27630
27657
|
} else {
|
|
27631
27658
|
var at = getImageSizeLevel(Tt.mapSize), Pt = at + 1, xt = 4;
|
|
27632
|
-
this.tiling.setObserver(
|
|
27659
|
+
this.tiling.setObserver(q);
|
|
27633
27660
|
var It = {
|
|
27634
27661
|
renderer: this.renderer,
|
|
27635
27662
|
resolution: ae,
|
|
@@ -28840,13 +28867,13 @@ void main() {
|
|
|
28840
28867
|
encoding: (p = (h = g.renderer) === null || h === void 0 ? void 0 : h.outputEncoding) !== null && p !== void 0 ? p : THREE.sRGBEncoding,
|
|
28841
28868
|
generateMipmaps: !1
|
|
28842
28869
|
}), 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) {
|
|
28843
|
-
var
|
|
28870
|
+
var q;
|
|
28844
28871
|
g.emit("network.resource", createEvent("network.resource", {
|
|
28845
28872
|
source: O,
|
|
28846
28873
|
requestType: F,
|
|
28847
28874
|
requestState: N,
|
|
28848
28875
|
detail: D
|
|
28849
|
-
})), (
|
|
28876
|
+
})), (q = g.analysis) === null || q === void 0 || q.network(g.works, O, F, N, D);
|
|
28850
28877
|
}), 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);
|
|
28851
28878
|
var E = new Model(emptyWorks[0]);
|
|
28852
28879
|
worksMap.set(g, emptyWorks), g.modelScene = new ModelScene(), g.modelScene.add(E), g.modelScene.add(g.boundingMesh), defineProperty(E, "loaded", {
|
|
@@ -28907,9 +28934,9 @@ void main() {
|
|
|
28907
28934
|
if (typeof I == "function")
|
|
28908
28935
|
I(g);
|
|
28909
28936
|
else if (Array.isArray(I)) {
|
|
28910
|
-
var
|
|
28911
|
-
if (typeof
|
|
28912
|
-
var L =
|
|
28937
|
+
var B = I[0], M = I[1], H = I[2];
|
|
28938
|
+
if (typeof B == "function") {
|
|
28939
|
+
var L = B(g, H);
|
|
28913
28940
|
typeof M == "string" && (g.plugins[M] ? g.throwError(new Error("plugin name ".concat(M, " is exists."))) : g.plugins[M] = L);
|
|
28914
28941
|
}
|
|
28915
28942
|
}
|
|
@@ -28918,7 +28945,7 @@ void main() {
|
|
|
28918
28945
|
}
|
|
28919
28946
|
return Object.defineProperty(t, "version", {
|
|
28920
28947
|
get: function() {
|
|
28921
|
-
return "6.7.0-alpha.
|
|
28948
|
+
return "6.7.0-alpha.4";
|
|
28922
28949
|
},
|
|
28923
28950
|
enumerable: !1,
|
|
28924
28951
|
configurable: !0
|
|
@@ -29148,13 +29175,13 @@ void main() {
|
|
|
29148
29175
|
else
|
|
29149
29176
|
e instanceof Work ? E.push(e) : E.push(parseWork(e));
|
|
29150
29177
|
for (var R = createWorks(E), w = function(Y) {
|
|
29151
|
-
var
|
|
29178
|
+
var K = C, ee = new Fetcher({
|
|
29152
29179
|
get networkSubscribe() {
|
|
29153
|
-
return
|
|
29180
|
+
return K.networkSubscribe;
|
|
29154
29181
|
},
|
|
29155
29182
|
requestProxy: function(te) {
|
|
29156
29183
|
return Promise.resolve(te).then(function(ne) {
|
|
29157
|
-
return
|
|
29184
|
+
return K.requestProxy(ne);
|
|
29158
29185
|
}).then(function(ne) {
|
|
29159
29186
|
var ie = verifyURL(ne, Y.allowHosts);
|
|
29160
29187
|
if (ie instanceof Error)
|
|
@@ -29164,18 +29191,18 @@ void main() {
|
|
|
29164
29191
|
}
|
|
29165
29192
|
});
|
|
29166
29193
|
registerFetcher(Y, ee);
|
|
29167
|
-
}, C = this, I = 0,
|
|
29168
|
-
var M =
|
|
29194
|
+
}, C = this, I = 0, B = R; I < B.length; I++) {
|
|
29195
|
+
var M = B[I];
|
|
29169
29196
|
w(M);
|
|
29170
29197
|
}
|
|
29171
29198
|
r === void 0 && (r = "inherit"), r === "inherit" && this.works === emptyWorks && (r = "initial");
|
|
29172
|
-
var
|
|
29199
|
+
var H = R.initial, L = H.work.observers[0], O = L ? {
|
|
29173
29200
|
workCode: L.work.workCode,
|
|
29174
29201
|
panoIndex: L.panoIndex
|
|
29175
29202
|
} : {
|
|
29176
|
-
workCode:
|
|
29203
|
+
workCode: H.work.workCode,
|
|
29177
29204
|
panoIndex: 0
|
|
29178
|
-
}, F = (l =
|
|
29205
|
+
}, F = (l = H.mode) !== null && l !== void 0 ? l : L ? "Panorama" : "Mapview", N = {};
|
|
29179
29206
|
if (r === "inherit") {
|
|
29180
29207
|
F = this.currentMode;
|
|
29181
29208
|
var D = (f = (c = R[0]) === null || c === void 0 ? void 0 : c.observers) === null || f === void 0 ? void 0 : f[this.panoIndex];
|
|
@@ -29193,20 +29220,20 @@ void main() {
|
|
|
29193
29220
|
offset: void 0
|
|
29194
29221
|
};
|
|
29195
29222
|
} else if (r === "initial")
|
|
29196
|
-
typeof
|
|
29197
|
-
workCode:
|
|
29198
|
-
panoIndex:
|
|
29199
|
-
}),
|
|
29200
|
-
longitude:
|
|
29201
|
-
latitude:
|
|
29202
|
-
fov:
|
|
29203
|
-
distance:
|
|
29204
|
-
offset: (d =
|
|
29223
|
+
typeof H.panoIndex == "number" && (O = {
|
|
29224
|
+
workCode: H.work.workCode,
|
|
29225
|
+
panoIndex: H.panoIndex
|
|
29226
|
+
}), H.mode && (F = H.mode), N = {
|
|
29227
|
+
longitude: H.longitude,
|
|
29228
|
+
latitude: H.latitude,
|
|
29229
|
+
fov: H.fov,
|
|
29230
|
+
distance: H.distance,
|
|
29231
|
+
offset: (d = H.offset) === null || d === void 0 ? void 0 : d.clone()
|
|
29205
29232
|
};
|
|
29206
29233
|
else {
|
|
29207
29234
|
if (F = (h = r.mode) !== null && h !== void 0 ? h : this.currentMode, typeof r.panoIndex == "number") {
|
|
29208
29235
|
var D = R.getObserver({
|
|
29209
|
-
workCode: (m = (p = r.workCode) !== null && p !== void 0 ? p :
|
|
29236
|
+
workCode: (m = (p = r.workCode) !== null && p !== void 0 ? p : H.work.workCode) !== null && m !== void 0 ? m : "",
|
|
29210
29237
|
panoIndex: r.panoIndex
|
|
29211
29238
|
});
|
|
29212
29239
|
D && (O = {
|
|
@@ -29222,26 +29249,26 @@ void main() {
|
|
|
29222
29249
|
offset: r.offset
|
|
29223
29250
|
};
|
|
29224
29251
|
}
|
|
29225
|
-
var
|
|
29226
|
-
(F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (
|
|
29227
|
-
var
|
|
29228
|
-
(F === "Panorama" || F === "VRPanorama" || F === "XRPanorama") && this.currentMode === F && (
|
|
29252
|
+
var q = __assign(__assign(__assign({}, O), { mode: F }), N), z = this.getCurrentState(), j = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
|
|
29253
|
+
(F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (j = 0);
|
|
29254
|
+
var J = "fly";
|
|
29255
|
+
(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", {
|
|
29229
29256
|
input: e,
|
|
29230
29257
|
works: R,
|
|
29231
|
-
state:
|
|
29258
|
+
state: q,
|
|
29232
29259
|
userAction: s
|
|
29233
29260
|
}));
|
|
29234
|
-
var
|
|
29261
|
+
var V = function() {
|
|
29235
29262
|
u.pano = O;
|
|
29236
29263
|
var Y = __assign(__assign({ initial: {
|
|
29237
|
-
state:
|
|
29264
|
+
state: q,
|
|
29238
29265
|
currentState: z,
|
|
29239
|
-
duration:
|
|
29240
|
-
effect:
|
|
29266
|
+
duration: j,
|
|
29267
|
+
effect: J,
|
|
29241
29268
|
userAction: s
|
|
29242
|
-
} }, u.commonParams()), u.controllerInits[F]),
|
|
29269
|
+
} }, u.commonParams()), u.controllerInits[F]), K = Controllers[F].initAnimationEndState(Y);
|
|
29243
29270
|
if (u.controller && u.currentMode === F)
|
|
29244
|
-
u.controller.updateWork(R,
|
|
29271
|
+
u.controller.updateWork(R, K, { effect: J, duration: j }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(F, Y));
|
|
29245
29272
|
else {
|
|
29246
29273
|
var ee = u.currentMode;
|
|
29247
29274
|
if (u.controller)
|
|
@@ -29257,7 +29284,7 @@ void main() {
|
|
|
29257
29284
|
var ne = createEvent("mode.change", {
|
|
29258
29285
|
prevMode: ee,
|
|
29259
29286
|
mode: F,
|
|
29260
|
-
state:
|
|
29287
|
+
state: K,
|
|
29261
29288
|
userAction: s
|
|
29262
29289
|
});
|
|
29263
29290
|
try {
|
|
@@ -29269,20 +29296,20 @@ void main() {
|
|
|
29269
29296
|
u.updateTime(u.currentUpdateArgs.time, 0, u.currentUpdateArgs.args);
|
|
29270
29297
|
};
|
|
29271
29298
|
worksMap.set(this, R);
|
|
29272
|
-
var
|
|
29299
|
+
var U = Promise.resolve();
|
|
29273
29300
|
if (F === t.Mode.Floorplan || F === t.Mode.Topview || F === t.Mode.Mapview || F === t.Mode.Model) {
|
|
29274
|
-
this.modelScene.loaded === !1 && (this.camera.setFromPose(
|
|
29275
|
-
var
|
|
29276
|
-
|
|
29301
|
+
this.modelScene.loaded === !1 && (this.camera.setFromPose(q), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = F);
|
|
29302
|
+
var G = this.loadModels(R, v);
|
|
29303
|
+
U = Promise.all(G.map(function(Y) {
|
|
29277
29304
|
return Y.loadedReady;
|
|
29278
29305
|
})).then(function() {
|
|
29279
|
-
u.needsRender = !0, u.modelSceneNeedsRender = !0,
|
|
29306
|
+
u.needsRender = !0, u.modelSceneNeedsRender = !0, V(), u.emit("camera.update", createEvent("camera.update", {
|
|
29280
29307
|
state: u.getCurrentState(),
|
|
29281
29308
|
userAction: s
|
|
29282
29309
|
}));
|
|
29283
29310
|
});
|
|
29284
29311
|
} else {
|
|
29285
|
-
|
|
29312
|
+
V();
|
|
29286
29313
|
var W = this.controller, X = !1;
|
|
29287
29314
|
this.modelScene.autoRefine = !1;
|
|
29288
29315
|
var Z = function() {
|
|
@@ -29290,9 +29317,9 @@ void main() {
|
|
|
29290
29317
|
state: u.getCurrentState(),
|
|
29291
29318
|
userAction: s
|
|
29292
29319
|
})), X = !0, u.modelScene.autoRefine = !0), W.off("pano.arrived", Z), W.off("pano.cancel", Z);
|
|
29293
|
-
},
|
|
29294
|
-
|
|
29295
|
-
return
|
|
29320
|
+
}, G = this.loadModels(R, v);
|
|
29321
|
+
U = Promise.all(G.map(function(K) {
|
|
29322
|
+
return K.initReady;
|
|
29296
29323
|
})).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);
|
|
29297
29324
|
}
|
|
29298
29325
|
return this.emit("works.load", createEvent("works.load", {
|
|
@@ -29300,7 +29327,7 @@ void main() {
|
|
|
29300
29327
|
state: this.getCurrentState(),
|
|
29301
29328
|
userAction: s,
|
|
29302
29329
|
works: R
|
|
29303
|
-
})),
|
|
29330
|
+
})), U.then(function() {
|
|
29304
29331
|
return u.ready();
|
|
29305
29332
|
}).then(function() {
|
|
29306
29333
|
var Y;
|
|
@@ -29395,13 +29422,13 @@ void main() {
|
|
|
29395
29422
|
});
|
|
29396
29423
|
if (l.emit("mode.change.request", I), !I.defaultPrevented) {
|
|
29397
29424
|
E && E.destroy(), l.controller = l.applyController(e, w);
|
|
29398
|
-
var
|
|
29425
|
+
var B = createEvent("mode.change", {
|
|
29399
29426
|
prevMode: l.currentMode,
|
|
29400
29427
|
mode: e,
|
|
29401
29428
|
state: C,
|
|
29402
29429
|
userAction: s
|
|
29403
29430
|
});
|
|
29404
|
-
l.emit("mode.change",
|
|
29431
|
+
l.emit("mode.change", B);
|
|
29405
29432
|
}
|
|
29406
29433
|
}
|
|
29407
29434
|
c();
|
|
@@ -29433,14 +29460,14 @@ void main() {
|
|
|
29433
29460
|
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);
|
|
29434
29461
|
var w = this.getPixelsRenderTarget;
|
|
29435
29462
|
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);
|
|
29436
|
-
var C = A * y, I = g * y,
|
|
29463
|
+
var C = A * y, I = g * y, B = C * I, M = B * 4;
|
|
29437
29464
|
if (T) {
|
|
29438
29465
|
if (T.length !== M)
|
|
29439
29466
|
throw new Error("buffer length is not equals pixels ".concat(M));
|
|
29440
29467
|
} else
|
|
29441
29468
|
T = new Uint8Array(M);
|
|
29442
29469
|
if (this.renderer.readRenderTargetPixels(w, 0, 0, A * y, g * y, T), v)
|
|
29443
|
-
for (var
|
|
29470
|
+
for (var H = B / 2, L = 0, O = 0, F = 0, N = 0; O < H; O++)
|
|
29444
29471
|
for (N = (I - Math.floor(O / C) - 1) * C + O % C, F = 0; F < 4; F++)
|
|
29445
29472
|
L = T[O * 4 + F], T[O * 4 + F] = T[N * 4 + F], T[N * 4 + F] = L;
|
|
29446
29473
|
return T;
|
|
@@ -29587,8 +29614,8 @@ void main() {
|
|
|
29587
29614
|
};
|
|
29588
29615
|
else {
|
|
29589
29616
|
var y = (u = (s = this.work) === null || s === void 0 ? void 0 : s.workCode) !== null && u !== void 0 ? u : "", v = this.state.workCode;
|
|
29590
|
-
this.works.filter(function(
|
|
29591
|
-
return
|
|
29617
|
+
this.works.filter(function(H) {
|
|
29618
|
+
return H.workCode === v;
|
|
29592
29619
|
}).length > 0 && (y = v), g = {
|
|
29593
29620
|
workCode: y,
|
|
29594
29621
|
panoIndex: e.panoIndex
|
|
@@ -29611,8 +29638,8 @@ void main() {
|
|
|
29611
29638
|
duration: this.modeChangeDuration,
|
|
29612
29639
|
effect: "fly",
|
|
29613
29640
|
userAction: !1
|
|
29614
|
-
} }, this.commonParams()), this.controllerInits[E]),
|
|
29615
|
-
b =
|
|
29641
|
+
} }, this.commonParams()), this.controllerInits[E]), B = Controllers[E].initAnimationEndState(I);
|
|
29642
|
+
b = B.longitude, T = B.latitude, S = B.fov, R = B.offset, w = B.distance;
|
|
29616
29643
|
} else
|
|
29617
29644
|
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;
|
|
29618
29645
|
var M = {
|
|
@@ -29690,7 +29717,7 @@ void main() {
|
|
|
29690
29717
|
}), this.controller.stopMomentumMovement(), this.controller.cameraMotion.set(C, 0).catch(noop), this.controller.locationMotion.set(w, 0).catch(noop), !0;
|
|
29691
29718
|
}
|
|
29692
29719
|
} else {
|
|
29693
|
-
var I = 1,
|
|
29720
|
+
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);
|
|
29694
29721
|
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))
|
|
29695
29722
|
return this.controller.stopMomentumMovement(), this.controller.cameraMotion.set({ longitude: S, latitude: R, fov: m }, 0).catch(noop), !0;
|
|
29696
29723
|
}
|
|
@@ -29698,7 +29725,7 @@ void main() {
|
|
|
29698
29725
|
userAction: !1,
|
|
29699
29726
|
state: this.state
|
|
29700
29727
|
})), this.readyCallbacks.length && this.stateSynced) {
|
|
29701
|
-
var
|
|
29728
|
+
var H = this.currentMode, L = H === t.Mode.Floorplan || H === t.Mode.Topview || H === t.Mode.Mapview || H === t.Mode.Model;
|
|
29702
29729
|
if (!L || this.modelScene.loaded) {
|
|
29703
29730
|
var O = this.readyCallbacks.slice();
|
|
29704
29731
|
this.readyCallbacks.length = 0;
|
|
@@ -29749,24 +29776,24 @@ void main() {
|
|
|
29749
29776
|
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)));
|
|
29750
29777
|
}
|
|
29751
29778
|
else
|
|
29752
|
-
for (var
|
|
29753
|
-
var N = z[
|
|
29779
|
+
for (var q = 0, z = I.viewLayers; q < z.length; q++) {
|
|
29780
|
+
var N = z[q];
|
|
29754
29781
|
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));
|
|
29755
29782
|
}
|
|
29756
29783
|
}), m.push(I), p && (I.visible = !1), E.modelScene.add(I);
|
|
29757
|
-
var
|
|
29784
|
+
var B = function() {
|
|
29758
29785
|
AnimationFrameLoop.shared.add(function() {
|
|
29759
29786
|
o.emit("model.load", createEvent("model.load", { work: S, model: I, error: null }));
|
|
29760
29787
|
}, !0);
|
|
29761
29788
|
}, M = function(O) {
|
|
29762
29789
|
var F = O.error;
|
|
29763
29790
|
o.emit("model.error", createEvent("model.error", { work: S, model: I, error: F })), o.throwError(F);
|
|
29764
|
-
},
|
|
29791
|
+
}, H = function() {
|
|
29765
29792
|
o.emit("model.changeShownFloor", createEvent("model.changeShownFloor", { work: S, model: I, error: null }));
|
|
29766
29793
|
}, L = function() {
|
|
29767
|
-
I.removeEventListener("load",
|
|
29794
|
+
I.removeEventListener("load", B), I.removeEventListener("error", M), I.removeEventListener("changeShownFloor", H), I.removeEventListener("dispose", L);
|
|
29768
29795
|
};
|
|
29769
|
-
I.addEventListener("load",
|
|
29796
|
+
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 }));
|
|
29770
29797
|
}
|
|
29771
29798
|
}, E = this, b = 0; b < e.length; b++)
|
|
29772
29799
|
v(b);
|