@realsee/five 6.5.9 → 6.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/classes/five.Fetcher.html +2 -2
- package/docs/classes/five.Five.html +31 -31
- package/docs/classes/five.NetworkSubscribe.html +1 -1
- package/docs/interfaces/five.AjaxOptions.html +6 -6
- package/docs/interfaces/five.NetworkOptions.html +5 -5
- package/docs/types/five.AjaxResponseType.html +1 -1
- package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
- package/five/index.js +21 -21
- package/five/index.mjs +791 -796
- 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 +21 -21
- 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.5.
|
|
4
|
+
* Generated: 9/1/2025
|
|
5
|
+
* Version: 6.5.11
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -758,9 +758,9 @@ CryptoJS.lib.Cipher || function(n) {
|
|
|
758
758
|
M[w + 1] = M[w + 3], M[w + 3] = F, this._doCryptBlock(M, w, this._invKeySchedule, c, f, d, h, r), F = M[w + 1], M[w + 1] = M[w + 3], M[w + 3] = F;
|
|
759
759
|
},
|
|
760
760
|
_doCryptBlock: function(M, w, F, H, C, I, B, O) {
|
|
761
|
-
for (var _ = this._nRounds, q = M[w] ^ F[0], G = M[w + 1] ^ F[1],
|
|
762
|
-
var
|
|
763
|
-
|
|
761
|
+
for (var _ = this._nRounds, q = M[w] ^ F[0], G = M[w + 1] ^ F[1], Z = M[w + 2] ^ F[2], U = M[w + 3] ^ F[3], N = 4, V = 1; V < _; V++)
|
|
762
|
+
var X = H[q >>> 24] ^ C[G >>> 16 & 255] ^ I[Z >>> 8 & 255] ^ B[U & 255] ^ F[N++], D = H[G >>> 24] ^ C[Z >>> 16 & 255] ^ I[U >>> 8 & 255] ^ B[q & 255] ^ F[N++], J = H[Z >>> 24] ^ C[U >>> 16 & 255] ^ I[q >>> 8 & 255] ^ B[G & 255] ^ F[N++], U = H[U >>> 24] ^ C[q >>> 16 & 255] ^ I[G >>> 8 & 255] ^ B[Z & 255] ^ F[N++], q = X, G = D, Z = J;
|
|
763
|
+
X = (O[q >>> 24] << 24 | O[G >>> 16 & 255] << 16 | O[Z >>> 8 & 255] << 8 | O[U & 255]) ^ F[N++], D = (O[G >>> 24] << 24 | O[Z >>> 16 & 255] << 16 | O[U >>> 8 & 255] << 8 | O[q & 255]) ^ F[N++], J = (O[Z >>> 24] << 24 | O[U >>> 16 & 255] << 16 | O[q >>> 8 & 255] << 8 | O[G & 255]) ^ F[N++], U = (O[U >>> 24] << 24 | O[q >>> 16 & 255] << 16 | O[G >>> 8 & 255] << 8 | O[Z & 255]) ^ F[N++], M[w] = X, M[w + 1] = D, M[w + 2] = J, M[w + 3] = U;
|
|
764
764
|
},
|
|
765
765
|
keySize: 8
|
|
766
766
|
});
|
|
@@ -3187,24 +3187,24 @@ function X509(n) {
|
|
|
3187
3187
|
return y(T).replace(/\//, "\\/");
|
|
3188
3188
|
}).join("/");
|
|
3189
3189
|
}, this.getInfo = function() {
|
|
3190
|
-
var v = function(
|
|
3191
|
-
var D = JSON.stringify(
|
|
3190
|
+
var v = function(X) {
|
|
3191
|
+
var D = JSON.stringify(X.array).replace(/[\[\]\{\}\"]/g, "");
|
|
3192
3192
|
return D;
|
|
3193
|
-
}, y = function(
|
|
3194
|
-
for (var D = "", J =
|
|
3195
|
-
var q = J[
|
|
3193
|
+
}, y = function(X) {
|
|
3194
|
+
for (var D = "", J = X.array, U = 0; U < J.length; U++) {
|
|
3195
|
+
var q = J[U];
|
|
3196
3196
|
if (D += " policy oid: " + q.policyoid + `
|
|
3197
3197
|
`, q.array !== void 0)
|
|
3198
3198
|
for (var G = 0; G < q.array.length; G++) {
|
|
3199
|
-
var
|
|
3200
|
-
|
|
3199
|
+
var Z = q.array[G];
|
|
3200
|
+
Z.cps !== void 0 && (D += " cps: " + Z.cps + `
|
|
3201
3201
|
`);
|
|
3202
3202
|
}
|
|
3203
3203
|
}
|
|
3204
3204
|
return D;
|
|
3205
|
-
}, b = function(
|
|
3206
|
-
for (var D = "", J =
|
|
3207
|
-
var q = J[
|
|
3205
|
+
}, b = function(X) {
|
|
3206
|
+
for (var D = "", J = X.array, U = 0; U < J.length; U++) {
|
|
3207
|
+
var q = J[U];
|
|
3208
3208
|
try {
|
|
3209
3209
|
q.dpname.full[0].uri !== void 0 && (D += " " + q.dpname.full[0].uri + `
|
|
3210
3210
|
`);
|
|
@@ -3217,9 +3217,9 @@ function X509(n) {
|
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
3219
|
return D;
|
|
3220
|
-
}, T = function(
|
|
3221
|
-
for (var D = "", J =
|
|
3222
|
-
var q = J[
|
|
3220
|
+
}, T = function(X) {
|
|
3221
|
+
for (var D = "", J = X.array, U = 0; U < J.length; U++) {
|
|
3222
|
+
var q = J[U];
|
|
3223
3223
|
q.caissuer !== void 0 && (D += " caissuer: " + q.caissuer + `
|
|
3224
3224
|
`), q.ocsp !== void 0 && (D += " ocsp: " + q.ocsp + `
|
|
3225
3225
|
`);
|
|
@@ -3919,11 +3919,11 @@ var PBMCustomShader = (
|
|
|
3919
3919
|
return !!q;
|
|
3920
3920
|
}).join(`
|
|
3921
3921
|
`));
|
|
3922
|
-
var
|
|
3923
|
-
v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g,
|
|
3922
|
+
var X = String(r.clippers.length);
|
|
3923
|
+
v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, X), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, X);
|
|
3924
3924
|
for (var D = 0, J = I; D < J.length; D++) {
|
|
3925
|
-
var
|
|
3926
|
-
|
|
3925
|
+
var U = J[D];
|
|
3926
|
+
U.onBeforeCompile && U.onBeforeCompile(v, y);
|
|
3927
3927
|
}
|
|
3928
3928
|
};
|
|
3929
3929
|
var c = "";
|
|
@@ -5102,17 +5102,17 @@ function matchJsonpFunctionName(n) {
|
|
|
5102
5102
|
function isJsonpSource(n) {
|
|
5103
5103
|
return matchJsonpFunctionName(n) !== null;
|
|
5104
5104
|
}
|
|
5105
|
+
var currentProtocol = typeof location != "undefined" ? location.protocol : "null:";
|
|
5105
5106
|
function getProtocol(n) {
|
|
5106
5107
|
var t = n.match(/^([0-9a-z]+\:)\/\/(([^:/?#]*)(?::[0-9]+)?)/);
|
|
5107
|
-
return t ? t[1] :
|
|
5108
|
+
return t ? t[1] : currentProtocol;
|
|
5108
5109
|
}
|
|
5110
|
+
var currentHostname = typeof location != "undefined" ? location.hostname : "localhost";
|
|
5109
5111
|
function hostnameFromURL(n) {
|
|
5110
|
-
if (/^blob\:/i.test(n))
|
|
5111
|
-
return
|
|
5112
|
-
if (/^data\:/i.test(n))
|
|
5113
|
-
return "data:";
|
|
5112
|
+
if (/^blob\:/i.test(n) || /^data\:/i.test(n))
|
|
5113
|
+
return currentHostname;
|
|
5114
5114
|
var t = n.match(/^[0-9a-z]+\:\/\/(([^:/?#]*)(?::[0-9]+)?)/i);
|
|
5115
|
-
return t ? t[2] :
|
|
5115
|
+
return t ? t[2] : currentHostname;
|
|
5116
5116
|
}
|
|
5117
5117
|
var NetworkSubscribe = (
|
|
5118
5118
|
/** @class */
|
|
@@ -5158,21 +5158,21 @@ function ajax(n, t, e, r, o) {
|
|
|
5158
5158
|
var O, _, N = now(), V = N - s;
|
|
5159
5159
|
if (delete E[g], b.parentNode && b.parentNode.removeChild(b), v !== null && (window.clearTimeout(v), v = null), y !== !0) {
|
|
5160
5160
|
if (B.indexOf("data:") !== 0) {
|
|
5161
|
-
var
|
|
5162
|
-
r(
|
|
5161
|
+
var X = new NetworkResponseError(l, "Script", 500);
|
|
5162
|
+
r(X), f(X), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "Script", "error", X.message);
|
|
5163
5163
|
return;
|
|
5164
5164
|
}
|
|
5165
|
-
var D = B.split(","), J = (D[0].match(/:(.*?);/) || [])[1],
|
|
5165
|
+
var D = B.split(","), J = (D[0].match(/:(.*?);/) || [])[1], U = D[1];
|
|
5166
5166
|
if (t.responseType === "arraybuffer" || t.responseType === "blob") {
|
|
5167
|
-
for (var q = atob(D[1]), G = q.length,
|
|
5168
|
-
|
|
5169
|
-
t.responseType === "arraybuffer" ?
|
|
5167
|
+
for (var q = atob(D[1]), G = q.length, Z = new Uint8Array(G), Y = 0; Y < G; Y++)
|
|
5168
|
+
Z[Y] = q.charCodeAt(Y);
|
|
5169
|
+
t.responseType === "arraybuffer" ? U = Z.buffer : U = new Blob([Z], { type: J });
|
|
5170
5170
|
}
|
|
5171
|
-
var
|
|
5172
|
-
body:
|
|
5173
|
-
meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: V, headers:
|
|
5171
|
+
var ee = {}, ie = {
|
|
5172
|
+
body: U,
|
|
5173
|
+
meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: V, headers: ee }
|
|
5174
5174
|
};
|
|
5175
|
-
e(
|
|
5175
|
+
e(ie), c(ie), (_ = t.networkSubscribe) === null || _ === void 0 || _.emit("network", l, "Script", "ok", JSON.stringify(ie.meta)), y = !0;
|
|
5176
5176
|
}
|
|
5177
5177
|
};
|
|
5178
5178
|
E[g] = S, b.src = l, document.body.appendChild(b), typeof t.timeout == "number" && (v = window.setTimeout(T, t.timeout));
|
|
@@ -5194,9 +5194,9 @@ function ajax(n, t, e, r, o) {
|
|
|
5194
5194
|
var _ = this.status;
|
|
5195
5195
|
if (_ === 0 || _ >= 200 && _ < 400) {
|
|
5196
5196
|
R = !0, w();
|
|
5197
|
-
var N = now(), V = N - s,
|
|
5197
|
+
var N = now(), V = N - s, X = parseHeaders(this.getAllResponseHeaders()), D = B.total, J = {
|
|
5198
5198
|
body: this.response,
|
|
5199
|
-
meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: V, headers:
|
|
5199
|
+
meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: V, headers: X, size: D }
|
|
5200
5200
|
};
|
|
5201
5201
|
e(J), c(J), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(J.meta));
|
|
5202
5202
|
} else
|
|
@@ -5879,8 +5879,8 @@ var FACE_ORDER$1 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
5879
5879
|
t[FACE_ORDER$1[5]]
|
|
5880
5880
|
], E = [], v = [0, 0, 0, 0, 0, 0], y = [], b = function(S) {
|
|
5881
5881
|
var R = (h = (d = e.imageURL) === null || d === void 0 ? void 0 : d.options) !== null && h !== void 0 ? h : { key: "unknown" }, M = applyImageURLOptions(m[S], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, R), { key: R.key + "." + FACE_ORDER$1[S] })), w = getProtocol(M), F = function(N) {
|
|
5882
|
-
v[S] = N, s(v.reduce(function(V,
|
|
5883
|
-
return V +
|
|
5882
|
+
v[S] = N, s(v.reduce(function(V, X) {
|
|
5883
|
+
return V + X;
|
|
5884
5884
|
}, 0) / 6);
|
|
5885
5885
|
}, H = (g = e.viaAjax) !== null && g !== void 0 ? g : !1, C = /^https?:$/.test(w), I = isJsonpSource(M);
|
|
5886
5886
|
if (I ? H = !0 : C || (H = !1), H) {
|
|
@@ -7366,8 +7366,8 @@ function parsePBMModel(n) {
|
|
|
7366
7366
|
break;
|
|
7367
7367
|
}
|
|
7368
7368
|
}
|
|
7369
|
-
for (var A = n.chunks.sort(function(
|
|
7370
|
-
return chunkOrder(
|
|
7369
|
+
for (var A = n.chunks.sort(function(fe, pe) {
|
|
7370
|
+
return chunkOrder(fe) - chunkOrder(pe);
|
|
7371
7371
|
}), m = [], E = 0, v = A; E < v.length; E++) {
|
|
7372
7372
|
var h = v[E], y = parseFloorName(h.name);
|
|
7373
7373
|
m[y] || (m[y] = []), m[y].push(h);
|
|
@@ -7381,11 +7381,11 @@ function parsePBMModel(n) {
|
|
|
7381
7381
|
S += h.faces.indices.length;
|
|
7382
7382
|
}
|
|
7383
7383
|
for (var M = new Float32Array(S * 3), w = new Float32Array(S * 2), F = new Float32Array(S * 3), H = c ? new Float32Array(S) : void 0, C = [], I = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], B = 0, O = 0; O < T.length; O++) {
|
|
7384
|
-
for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, V = h.vertices.uvs,
|
|
7385
|
-
var q =
|
|
7384
|
+
for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, V = h.vertices.uvs, X = h.faces.indices, D = h.faces.normals, J = h.vertices.marks, U = X.length, R = 0; R < U; R++) {
|
|
7385
|
+
var q = X[R], G = M[B * 3 + R * 3] = N[q * 3], Z = M[B * 3 + R * 3 + 1] = N[q * 3 + 1], Y = M[B * 3 + R * 3 + 2] = N[q * 3 + 2];
|
|
7386
7386
|
H && (H[B + R] = J[q]), w[B * 2 + R * 2] = V[q * 2], w[B * 2 + R * 2 + 1] = V[q * 2 + 1];
|
|
7387
|
-
var
|
|
7388
|
-
F[B * 3 + R * 3] = D[
|
|
7387
|
+
var ee = Math.floor(R / 3) * 3;
|
|
7388
|
+
F[B * 3 + R * 3] = D[ee], F[B * 3 + R * 3 + 1] = D[ee + 1], F[B * 3 + R * 3 + 2] = D[ee + 2], G < _[0] && (_[0] = G), Z < _[1] && (_[1] = Z), Y < _[2] && (_[2] = Y), G > _[3] && (_[3] = G), Z > _[4] && (_[4] = Z), Y > _[5] && (_[5] = Y);
|
|
7389
7389
|
}
|
|
7390
7390
|
_[0] < I[0] && (I[0] = _[0]), _[1] < I[1] && (I[1] = _[1]), _[2] < I[2] && (I[2] = _[2]), _[3] > I[3] && (I[3] = _[3]), _[4] > I[4] && (I[4] = _[4]), _[5] > I[5] && (I[5] = _[5]), C.push({
|
|
7391
7391
|
materialIndex: O,
|
|
@@ -7394,9 +7394,9 @@ function parsePBMModel(n) {
|
|
|
7394
7394
|
start: B,
|
|
7395
7395
|
count: h.faces.indices.length,
|
|
7396
7396
|
texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
|
|
7397
|
-
}), B +=
|
|
7397
|
+
}), B += U;
|
|
7398
7398
|
}
|
|
7399
|
-
var
|
|
7399
|
+
var ie = {
|
|
7400
7400
|
createAt: o,
|
|
7401
7401
|
description: s,
|
|
7402
7402
|
vertices: M,
|
|
@@ -7408,42 +7408,42 @@ function parsePBMModel(n) {
|
|
|
7408
7408
|
groups: C,
|
|
7409
7409
|
extents: I
|
|
7410
7410
|
};
|
|
7411
|
-
u.push(
|
|
7411
|
+
u.push(ie);
|
|
7412
7412
|
} else {
|
|
7413
|
-
for (var S = 0,
|
|
7413
|
+
for (var S = 0, ne = 0, R = 0; R < T.length; R++) {
|
|
7414
7414
|
var h = T[R];
|
|
7415
|
-
|
|
7415
|
+
ne += h.vertices.xyz.length / 3, S += h.faces.indices.length;
|
|
7416
7416
|
}
|
|
7417
|
-
for (var M = new Float32Array(
|
|
7418
|
-
for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, ae = h.vertices.marks, V = h.vertices.uvs,
|
|
7419
|
-
var G = M[B * 3 + R * 3] = N[R * 3],
|
|
7420
|
-
H && (H[B + R] = ae[R]), w[B * 2 + R * 2] = V[R * 2], w[B * 2 + R * 2 + 1] = V[R * 2 + 1],
|
|
7417
|
+
for (var M = new Float32Array(ne * 3), w = new Float32Array(ne * 2), F = void 0, K = new Float32Array(ne), j = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, C = [], I = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, B = 0, O = 0; O < T.length; O++) {
|
|
7418
|
+
for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, ae = h.vertices.marks, V = h.vertices.uvs, X = h.faces.indices, ue = N.length / 3, U = X.length, R = 0; R < ue; R++) {
|
|
7419
|
+
var G = M[B * 3 + R * 3] = N[R * 3], Z = M[B * 3 + R * 3 + 1] = N[R * 3 + 1], Y = M[B * 3 + R * 3 + 2] = N[R * 3 + 2];
|
|
7420
|
+
H && (H[B + R] = ae[R]), w[B * 2 + R * 2] = V[R * 2], w[B * 2 + R * 2 + 1] = V[R * 2 + 1], K[B + R] = b, G < _[0] && (_[0] = G), Z < _[1] && (_[1] = Z), Y < _[2] && (_[2] = Y), G > _[3] && (_[3] = G), Z > _[4] && (_[4] = Z), Y > _[5] && (_[5] = Y);
|
|
7421
7421
|
}
|
|
7422
7422
|
_[0] < I[0] && (I[0] = _[0]), _[1] < I[1] && (I[1] = _[1]), _[2] < I[2] && (I[2] = _[2]), _[3] > I[3] && (I[3] = _[3]), _[4] > I[4] && (I[4] = _[4]), _[5] > I[5] && (I[5] = _[5]);
|
|
7423
|
-
for (var R = 0; R <
|
|
7424
|
-
|
|
7423
|
+
for (var R = 0; R < U; R++)
|
|
7424
|
+
j[te + R] = B + X[R];
|
|
7425
7425
|
C.push({
|
|
7426
7426
|
materialIndex: O,
|
|
7427
7427
|
name: h.name,
|
|
7428
7428
|
chunkName: parseChunkName(h.name),
|
|
7429
|
-
start:
|
|
7429
|
+
start: te,
|
|
7430
7430
|
count: h.faces.indices.length,
|
|
7431
7431
|
texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
|
|
7432
|
-
}), B +=
|
|
7432
|
+
}), B += ue, te += U;
|
|
7433
7433
|
}
|
|
7434
|
-
var
|
|
7434
|
+
var ie = {
|
|
7435
7435
|
createAt: o,
|
|
7436
7436
|
description: s,
|
|
7437
7437
|
vertices: M,
|
|
7438
7438
|
uvs: w,
|
|
7439
7439
|
normals: F,
|
|
7440
7440
|
masks: H,
|
|
7441
|
-
indices:
|
|
7441
|
+
indices: j,
|
|
7442
7442
|
floorIndex: b,
|
|
7443
7443
|
groups: C,
|
|
7444
7444
|
extents: I
|
|
7445
7445
|
};
|
|
7446
|
-
u.push(
|
|
7446
|
+
u.push(ie);
|
|
7447
7447
|
}
|
|
7448
7448
|
}
|
|
7449
7449
|
return u;
|
|
@@ -7478,39 +7478,39 @@ function parse$4(n, t, e, r, o, s, u) {
|
|
|
7478
7478
|
I.addGroup(_.start, _.count, _.materialIndex);
|
|
7479
7479
|
}
|
|
7480
7480
|
p.add(I);
|
|
7481
|
-
for (var N = [], V = 0,
|
|
7482
|
-
var _ =
|
|
7481
|
+
for (var N = [], V = 0, X = F; V < X.length; V++) {
|
|
7482
|
+
var _ = X[V], D = r[_.chunkName] || (_.texture ? pathJoin(e || "", _.texture) : void 0), J = new PBMMeshMaterial(t ? "phong" : "basic");
|
|
7483
7483
|
J.floorIndex = w, I.attributes.normal === void 0 && (J.flatShading = !0), I.attributes._feature_id_rsmask && (J.defines.USE_VERTEX_MARK = !0), N.push(J), D ? (g++, h[D] ? h[D].push(J) : h[D] = [J]) : J.color = new THREE.Color(16777215), p.add(J);
|
|
7484
7484
|
}
|
|
7485
|
-
var
|
|
7486
|
-
|
|
7485
|
+
var U = new PBMMesh(I, N);
|
|
7486
|
+
U.name = "model_floor_" + w, U.userData.createAt = v, U.userData.description = y, U.matrix.compose(U.position, U.quaternion, U.scale), U.matrixAutoUpdate = !1, U.frustumCulled = !1, c = v, f = y, d.push(U);
|
|
7487
7487
|
}
|
|
7488
7488
|
var q = function(G) {
|
|
7489
7489
|
G = autoRestImageOptionsByTextureLength(G, g);
|
|
7490
|
-
for (var
|
|
7491
|
-
var
|
|
7492
|
-
|
|
7493
|
-
for (var ae = 0,
|
|
7494
|
-
var
|
|
7495
|
-
|
|
7496
|
-
}
|
|
7497
|
-
return
|
|
7490
|
+
for (var Z = [], Y = function(K) {
|
|
7491
|
+
var j = null;
|
|
7492
|
+
K in s && (j = s[K]), j || (j = loadTexture$1(K, G, u)), Z.push(j.then(function(te) {
|
|
7493
|
+
for (var ae = 0, ue = h[K]; ae < ue.length; ae++) {
|
|
7494
|
+
var fe = ue[ae];
|
|
7495
|
+
fe.map && (p.delete(fe.map), fe.map.dispose()), fe.map = te, p.add(te);
|
|
7496
|
+
}
|
|
7497
|
+
return te;
|
|
7498
7498
|
}).catch(function() {
|
|
7499
|
-
for (var
|
|
7500
|
-
var
|
|
7501
|
-
|
|
7499
|
+
for (var te = 0, ae = h[K]; te < ae.length; te++) {
|
|
7500
|
+
var ue = ae[te];
|
|
7501
|
+
ue.map && (p.delete(ue.map), ue.map.dispose()), ue.map = null, ue.color = new THREE.Color(16777215);
|
|
7502
7502
|
}
|
|
7503
7503
|
return null;
|
|
7504
7504
|
}));
|
|
7505
|
-
},
|
|
7506
|
-
var
|
|
7507
|
-
|
|
7508
|
-
}
|
|
7509
|
-
for (var
|
|
7510
|
-
delete s[
|
|
7511
|
-
return Promise.all(
|
|
7512
|
-
return
|
|
7513
|
-
return
|
|
7505
|
+
}, ee = 0, ie = Object.keys(h); ee < ie.length; ee++) {
|
|
7506
|
+
var ne = ie[ee];
|
|
7507
|
+
Y(ne);
|
|
7508
|
+
}
|
|
7509
|
+
for (var ne in s)
|
|
7510
|
+
delete s[ne];
|
|
7511
|
+
return Promise.all(Z).then(function(K) {
|
|
7512
|
+
return K.filter(function(j) {
|
|
7513
|
+
return j;
|
|
7514
7514
|
});
|
|
7515
7515
|
});
|
|
7516
7516
|
};
|
|
@@ -7521,8 +7521,8 @@ function parse$4(n, t, e, r, o, s, u) {
|
|
|
7521
7521
|
objects: d,
|
|
7522
7522
|
textures: G,
|
|
7523
7523
|
dispose: function() {
|
|
7524
|
-
p.forEach(function(
|
|
7525
|
-
|
|
7524
|
+
p.forEach(function(Z) {
|
|
7525
|
+
Z.dispose();
|
|
7526
7526
|
}), p.clear();
|
|
7527
7527
|
}
|
|
7528
7528
|
};
|
|
@@ -8476,8 +8476,8 @@ function parse$3(n, t, e, r, o) {
|
|
|
8476
8476
|
var C = parseGeometry(T[H].geometry);
|
|
8477
8477
|
C.applyMatrix4(d), d.decompose(h, p, g), g.x * g.y * g.z < 0 && C.attributes.normal && C.attributes.position && C.attributes.uv && flipBufferGeometryNormals(C), l.add(C);
|
|
8478
8478
|
for (var I = [], B = 0, O = T[H].material; B < O.length; B++) {
|
|
8479
|
-
var _ = O[B], N = parseMaterial(_, t, e || "", r, f, o, A, l, m), V = N.material,
|
|
8480
|
-
u.push(
|
|
8479
|
+
var _ = O[B], N = parseMaterial(_, t, e || "", r, f, o, A, l, m), V = N.material, X = N.textureReady;
|
|
8480
|
+
u.push(X), I.push(V);
|
|
8481
8481
|
}
|
|
8482
8482
|
var D = new PBMMesh(C, I);
|
|
8483
8483
|
D.name = "chunk_" + H, D.matrix.compose(D.position, D.quaternion, D.scale), D.matrixAutoUpdate = !1, D.frustumCulled = !1, F.add(D);
|
|
@@ -8917,38 +8917,38 @@ var Parser = (
|
|
|
8917
8917
|
Promise.all(g),
|
|
8918
8918
|
Promise.all(A)
|
|
8919
8919
|
]).then(function(M) {
|
|
8920
|
-
for (var w = M[0], F = M[1], H = M[2], C = M[3], I = M[4], B = [], O = function(
|
|
8921
|
-
var J = w[
|
|
8920
|
+
for (var w = M[0], F = M[1], H = M[2], C = M[3], I = M[4], B = [], O = function(X, D) {
|
|
8921
|
+
var J = w[X], U = F[X], q = H[X], G = C[X], Z = I[X];
|
|
8922
8922
|
if (J === void 0)
|
|
8923
8923
|
return "continue";
|
|
8924
8924
|
J.updateMatrix(), J.matrixAutoUpdate = !0;
|
|
8925
|
-
var
|
|
8926
|
-
switch (PATH_PROPERTIES[
|
|
8925
|
+
var Y = void 0;
|
|
8926
|
+
switch (PATH_PROPERTIES[Z.path]) {
|
|
8927
8927
|
case PATH_PROPERTIES.weights:
|
|
8928
|
-
|
|
8928
|
+
Y = THREE.NumberKeyframeTrack;
|
|
8929
8929
|
break;
|
|
8930
8930
|
case PATH_PROPERTIES.rotation:
|
|
8931
|
-
|
|
8931
|
+
Y = THREE.QuaternionKeyframeTrack;
|
|
8932
8932
|
break;
|
|
8933
8933
|
case PATH_PROPERTIES.position:
|
|
8934
8934
|
case PATH_PROPERTIES.scale:
|
|
8935
8935
|
default:
|
|
8936
|
-
|
|
8936
|
+
Y = THREE.VectorKeyframeTrack;
|
|
8937
8937
|
break;
|
|
8938
8938
|
}
|
|
8939
|
-
var
|
|
8940
|
-
PATH_PROPERTIES[
|
|
8941
|
-
pe.morphTargetInfluences &&
|
|
8942
|
-
}) :
|
|
8943
|
-
var
|
|
8939
|
+
var ee = J.name ? J.name : J.uuid, ie = G.interpolation !== void 0 ? INTERPOLATION[G.interpolation] : THREE.InterpolateLinear, ne = [];
|
|
8940
|
+
PATH_PROPERTIES[Z.path] === PATH_PROPERTIES.weights ? J.traverse(function(pe) {
|
|
8941
|
+
pe.morphTargetInfluences && ne.push(pe.name ? pe.name : pe.uuid);
|
|
8942
|
+
}) : ne.push(ee);
|
|
8943
|
+
var K = q.array;
|
|
8944
8944
|
if (q.normalized) {
|
|
8945
|
-
for (var
|
|
8946
|
-
|
|
8947
|
-
|
|
8945
|
+
for (var j = getNormalizedComponentScale(K.constructor), te = new Float32Array(K.length), ae = 0, ue = K.length; ae < ue; ae++)
|
|
8946
|
+
te[ae] = K[ae] * j;
|
|
8947
|
+
K = te;
|
|
8948
8948
|
}
|
|
8949
|
-
for (var ae = 0,
|
|
8950
|
-
var
|
|
8951
|
-
B.push(
|
|
8949
|
+
for (var ae = 0, ue = ne.length; ae < ue; ae++) {
|
|
8950
|
+
var fe = new Y(ne[ae] + "." + PATH_PROPERTIES[Z.path], U.array, K, ie);
|
|
8951
|
+
B.push(fe);
|
|
8952
8952
|
}
|
|
8953
8953
|
}, _ = 0, N = w.length; _ < N; _++)
|
|
8954
8954
|
O(_);
|
|
@@ -11609,11 +11609,11 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11609
11609
|
return e || new u8(0);
|
|
11610
11610
|
var u = !e, l = u || t.i != 2, c = t.i;
|
|
11611
11611
|
u && (e = new u8(o * 3));
|
|
11612
|
-
var f = function(
|
|
11612
|
+
var f = function(te) {
|
|
11613
11613
|
var ae = e.length;
|
|
11614
|
-
if (
|
|
11615
|
-
var
|
|
11616
|
-
|
|
11614
|
+
if (te > ae) {
|
|
11615
|
+
var ue = new u8(Math.max(ae * 2, te));
|
|
11616
|
+
ue.set(e), e = ue;
|
|
11617
11617
|
}
|
|
11618
11618
|
}, d = t.f || 0, h = t.p || 0, p = t.b || 0, g = t.l, A = t.d, m = t.m, E = t.n, v = o * 8;
|
|
11619
11619
|
do {
|
|
@@ -11641,8 +11641,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11641
11641
|
F[C++] = N;
|
|
11642
11642
|
}
|
|
11643
11643
|
}
|
|
11644
|
-
var
|
|
11645
|
-
m = max(
|
|
11644
|
+
var X = F.subarray(0, R), D = F.subarray(R);
|
|
11645
|
+
m = max(X), E = max(D), g = hMap(X, m, 1), A = hMap(D, E, 1);
|
|
11646
11646
|
} else
|
|
11647
11647
|
err(1);
|
|
11648
11648
|
else {
|
|
@@ -11660,7 +11660,7 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11660
11660
|
}
|
|
11661
11661
|
}
|
|
11662
11662
|
l && f(p + 131072);
|
|
11663
|
-
for (var J = (1 << m) - 1,
|
|
11663
|
+
for (var J = (1 << m) - 1, U = (1 << E) - 1, q = h; ; q = h) {
|
|
11664
11664
|
var N = g[bits16(n, h) & J], G = N >> 4;
|
|
11665
11665
|
if (h += N & 15, h > v) {
|
|
11666
11666
|
c && err(0);
|
|
@@ -11672,30 +11672,30 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11672
11672
|
q = h, g = null;
|
|
11673
11673
|
break;
|
|
11674
11674
|
} else {
|
|
11675
|
-
var
|
|
11675
|
+
var Z = G - 254;
|
|
11676
11676
|
if (G > 264) {
|
|
11677
|
-
var C = G - 257,
|
|
11678
|
-
|
|
11677
|
+
var C = G - 257, Y = fleb[C];
|
|
11678
|
+
Z = bits(n, h, (1 << Y) - 1) + fl[C], h += Y;
|
|
11679
11679
|
}
|
|
11680
|
-
var
|
|
11681
|
-
|
|
11682
|
-
var D = fd[
|
|
11683
|
-
if (
|
|
11684
|
-
var
|
|
11685
|
-
D += bits16(n, h) & (1 <<
|
|
11680
|
+
var ee = A[bits16(n, h) & U], ie = ee >> 4;
|
|
11681
|
+
ee || err(3), h += ee & 15;
|
|
11682
|
+
var D = fd[ie];
|
|
11683
|
+
if (ie > 3) {
|
|
11684
|
+
var Y = fdeb[ie];
|
|
11685
|
+
D += bits16(n, h) & (1 << Y) - 1, h += Y;
|
|
11686
11686
|
}
|
|
11687
11687
|
if (h > v) {
|
|
11688
11688
|
c && err(0);
|
|
11689
11689
|
break;
|
|
11690
11690
|
}
|
|
11691
11691
|
l && f(p + 131072);
|
|
11692
|
-
var
|
|
11692
|
+
var ne = p + Z;
|
|
11693
11693
|
if (p < D) {
|
|
11694
|
-
var
|
|
11695
|
-
for (
|
|
11696
|
-
e[p] = r[
|
|
11694
|
+
var K = s - D, j = Math.min(D, ne);
|
|
11695
|
+
for (K + p < 0 && err(3); p < j; ++p)
|
|
11696
|
+
e[p] = r[K + p];
|
|
11697
11697
|
}
|
|
11698
|
-
for (; p <
|
|
11698
|
+
for (; p < ne; ++p)
|
|
11699
11699
|
e[p] = e[p - D];
|
|
11700
11700
|
}
|
|
11701
11701
|
}
|
|
@@ -13381,15 +13381,15 @@ function loadX3p(n, t) {
|
|
|
13381
13381
|
});
|
|
13382
13382
|
}
|
|
13383
13383
|
function parse$1(n, t) {
|
|
13384
|
-
for (var e, r, o, s, u, l, c, f, d, h, p, g, A, m, E, v, y, b, T, S, R, M, w, F, H, C, I, B, O, _, N, V,
|
|
13385
|
-
var ve =
|
|
13386
|
-
/(^|\/)main\.xml$/i.test(ve) && (
|
|
13384
|
+
for (var e, r, o, s, u, l, c, f, d, h, p, g, A, m, E, v, y, b, T, S, R, M, w, F, H, C, I, B, O, _, N, V, X, D, J, U, q, G, Z, Y, ee, ie, ne, K, j, te, ae, ue, fe, pe, ge, Re, Ae, me, oe = unzipSync(n), W = "", re = null, Q = 0, ce = Object.keys(oe); Q < ce.length; Q++) {
|
|
13385
|
+
var ve = ce[Q];
|
|
13386
|
+
/(^|\/)main\.xml$/i.test(ve) && (re = oe[ve], W = ve.slice(0, ve.lastIndexOf("/") + 1));
|
|
13387
13387
|
}
|
|
13388
|
-
if (!
|
|
13388
|
+
if (!re)
|
|
13389
13389
|
throw new Error("X3p: main.xml not found.");
|
|
13390
13390
|
if (typeof DOMParser == "undefined")
|
|
13391
13391
|
throw new Error("X3p: DOMParser not found.");
|
|
13392
|
-
var Ve = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), Ue = new DOMParser(), $e = decodeText(
|
|
13392
|
+
var Ve = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), Ue = new DOMParser(), $e = decodeText(re), Be = Ue.parseFromString($e, "text/xml"), de = Be.querySelector("Record1 Axes"), Ee = {
|
|
13393
13393
|
x: {
|
|
13394
13394
|
type: (s = (o = (r = de == null ? void 0 : de.querySelector("CX AxisType")) === null || r === void 0 ? void 0 : r.textContent) === null || o === void 0 ? void 0 : o.toUpperCase()) !== null && s !== void 0 ? s : "I",
|
|
13395
13395
|
dataType: (c = (l = (u = de == null ? void 0 : de.querySelector("CX DataType")) === null || u === void 0 ? void 0 : u.textContent) === null || l === void 0 ? void 0 : l.toUpperCase()) !== null && c !== void 0 ? c : "D",
|
|
@@ -13409,15 +13409,15 @@ function parse$1(n, t) {
|
|
|
13409
13409
|
offset: Number((N = (_ = de == null ? void 0 : de.querySelector("CZ Offset")) === null || _ === void 0 ? void 0 : _.textContent) !== null && N !== void 0 ? N : "0")
|
|
13410
13410
|
}
|
|
13411
13411
|
}, Se = null, le = Be.querySelector("Record1 Axes Rotation");
|
|
13412
|
-
le && (Se = new THREE.Matrix3(), Se.set(Number((
|
|
13412
|
+
le && (Se = new THREE.Matrix3(), Se.set(Number((X = (V = le.querySelector("r11")) === null || V === void 0 ? void 0 : V.textContent) !== null && X !== void 0 ? X : 0), Number((J = (D = le.querySelector("r12")) === null || D === void 0 ? void 0 : D.textContent) !== null && J !== void 0 ? J : 0), Number((q = (U = le.querySelector("r13")) === null || U === void 0 ? void 0 : U.textContent) !== null && q !== void 0 ? q : 0), Number((Z = (G = le.querySelector("r21")) === null || G === void 0 ? void 0 : G.textContent) !== null && Z !== void 0 ? Z : 0), Number((ee = (Y = le.querySelector("r22")) === null || Y === void 0 ? void 0 : Y.textContent) !== null && ee !== void 0 ? ee : 0), Number((ne = (ie = le.querySelector("r23")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && ne !== void 0 ? ne : 0), Number((j = (K = le.querySelector("r31")) === null || K === void 0 ? void 0 : K.textContent) !== null && j !== void 0 ? j : 0), Number((ae = (te = le.querySelector("r32")) === null || te === void 0 ? void 0 : te.textContent) !== null && ae !== void 0 ? ae : 0), Number((fe = (ue = le.querySelector("r33")) === null || ue === void 0 ? void 0 : ue.textContent) !== null && fe !== void 0 ? fe : 0)));
|
|
13413
13413
|
var Ce = (pe = Be.querySelector("Record3 DataLink PointDataLink")) === null || pe === void 0 ? void 0 : pe.textContent;
|
|
13414
13414
|
if (typeof Ce != "string")
|
|
13415
13415
|
throw new Error("X3p: PointDataLink not found.");
|
|
13416
|
-
Ce = pathJoin(
|
|
13417
|
-
var we =
|
|
13416
|
+
Ce = pathJoin(W, Ce);
|
|
13417
|
+
var we = oe[Ce];
|
|
13418
13418
|
if (!we)
|
|
13419
13419
|
throw new Error("X3p: ".concat(we, " not found."));
|
|
13420
|
-
for (var Ze = getPointArray(we.buffer, Ee.z.dataType), ye = Number((Re = (
|
|
13420
|
+
for (var Ze = getPointArray(we.buffer, Ee.z.dataType), ye = Number((Re = (ge = Be.querySelector("Record3 MatrixDimension SizeX")) === null || ge === void 0 ? void 0 : ge.textContent) !== null && Re !== void 0 ? Re : "0"), xe = Number((me = (Ae = Be.querySelector("Record3 MatrixDimension SizeY")) === null || Ae === void 0 ? void 0 : Ae.textContent) !== null && me !== void 0 ? me : "0"), he = Math.floor(ye - 1), _e = Math.floor(xe - 1), Le = he + 1, ot = _e + 1, ze = new Float32Array(Le * ot * 3), Ke = new Float32Array(Le * ot * 2), Xe = new Uint32Array(he * _e * 6), je = new THREE.Box3(), Pe = 0; Pe < ot; Pe++)
|
|
13421
13421
|
for (var De = Pe * Ee.y.increment + Ee.y.offset, Me = 0; Me < Le; Me++) {
|
|
13422
13422
|
var Ie = Pe * Le + Me, Ye = Me * Ee.x.increment + Ee.x.offset, He = Ze[Ie], Fe = !isNaN(He), tt = Fe ? He : NaN;
|
|
13423
13423
|
_vector.set(Ye, -De, tt), Se && _vector.applyMatrix3(Se), Fe && je.expandByPoint(_vector), ze[Ie * 3 + 0] = _vector.x, ze[Ie * 3 + 1] = _vector.y, ze[Ie * 3 + 2] = _vector.z, Ke[Ie * 2 + 0] = Me / he, Ke[Ie * 2 + 1] = 1 - Pe / _e;
|
|
@@ -14011,16 +14011,16 @@ var BVHVector3 = (
|
|
|
14011
14011
|
return I[V] - I[N];
|
|
14012
14012
|
};
|
|
14013
14013
|
function _(N) {
|
|
14014
|
-
var V = N.startIndex,
|
|
14014
|
+
var V = N.startIndex, X = N.endIndex, D = N.extents;
|
|
14015
14015
|
I[0] = D[3] - D[0], I[1] = D[4] - D[1], I[2] = D[5] - D[2], B.sort(O);
|
|
14016
14016
|
for (var J = 0; J < 3; J++) {
|
|
14017
|
-
for (var
|
|
14018
|
-
|
|
14019
|
-
if (G > V && G <
|
|
14020
|
-
var
|
|
14021
|
-
|
|
14022
|
-
var
|
|
14023
|
-
|
|
14017
|
+
for (var U = B[J], q = D[U] + D[U + 3], G = V, Z = X - 1, Y = -1, ee = void 0; G <= Z; )
|
|
14018
|
+
Y === -1 ? (ee = u[G], l[ee * 6 + U] + l[ee * 6 + U + 3] < q ? G++ : Y = ee) : (ee = u[Z], l[ee * 6 + U] + l[ee * 6 + U + 3] >= q || (u[G] = ee, u[Z] = Y, Y = -1, G++), Z--);
|
|
14019
|
+
if (G > V && G < X) {
|
|
14020
|
+
var ie = new BVHNode(++d, calcExtents(u, l, V, G, EPSILON$1), V, G, N.deepth + 1);
|
|
14021
|
+
ie.deepth < r && ie.endIndex - ie.startIndex > e && (c[f++] = ie);
|
|
14022
|
+
var ne = new BVHNode(++d, calcExtents(u, l, G, X, EPSILON$1), G, X, N.deepth + 1);
|
|
14023
|
+
ne.deepth < r && ne.endIndex - ne.startIndex > e && (c[f++] = ne), N.node0 = ie, N.node1 = ne, N.startIndex = 0, N.endIndex = 0;
|
|
14024
14024
|
break;
|
|
14025
14025
|
}
|
|
14026
14026
|
}
|
|
@@ -14054,27 +14054,27 @@ var BVHVector3 = (
|
|
|
14054
14054
|
this.getPositionByIndex(F + 1, scratchVector3$6);
|
|
14055
14055
|
var B = scratchVector3$6.x, O = scratchVector3$6.y, _ = scratchVector3$6.z;
|
|
14056
14056
|
this.getPositionByIndex(F + 2, scratchVector3$6);
|
|
14057
|
-
var N = scratchVector3$6.x, V = scratchVector3$6.y,
|
|
14058
|
-
if (
|
|
14059
|
-
|
|
14060
|
-
else if (
|
|
14061
|
-
|
|
14057
|
+
var N = scratchVector3$6.x, V = scratchVector3$6.y, X = scratchVector3$6.z, D = B - H, J = O - C, U = _ - I, q = N - H, G = V - C, Z = X - I, Y = J * Z - U * G, ee = U * q - D * Z, ie = D * G - J * q, ne = T * Y + S * ee + R * ie, K = void 0;
|
|
14058
|
+
if (ne > 0)
|
|
14059
|
+
K = 1;
|
|
14060
|
+
else if (ne < 0)
|
|
14061
|
+
K = -1, ne = -ne;
|
|
14062
14062
|
else
|
|
14063
14063
|
continue;
|
|
14064
|
-
var
|
|
14065
|
-
if (!(
|
|
14066
|
-
var
|
|
14067
|
-
if (!(
|
|
14068
|
-
var pe = -
|
|
14064
|
+
var j = v - H, te = y - C, ae = b - I, ue = K * (T * (te * Z - ae * G) + S * (ae * q - j * Z) + R * (j * G - te * q));
|
|
14065
|
+
if (!(ue < 0)) {
|
|
14066
|
+
var fe = K * (T * (J * ae - U * te) + S * (U * j - D * ae) + R * (D * te - J * j));
|
|
14067
|
+
if (!(fe < 0) && !(ue + fe > ne)) {
|
|
14068
|
+
var pe = -K * (j * Y + te * ee + ae * ie);
|
|
14069
14069
|
if (!(pe < 0)) {
|
|
14070
|
-
var
|
|
14071
|
-
s.push(new BVHIntersect([H, C, I, B, O, _, N, V,
|
|
14070
|
+
var ge = pe / ne;
|
|
14071
|
+
s.push(new BVHIntersect([H, C, I, B, O, _, N, V, X], [v + T * ge, y + S * ge, b + R * ge], w));
|
|
14072
14072
|
}
|
|
14073
14073
|
}
|
|
14074
14074
|
}
|
|
14075
14075
|
}
|
|
14076
|
-
var Re = g * BYTES_PER_NODE / 2,
|
|
14077
|
-
|
|
14076
|
+
var Re = g * BYTES_PER_NODE / 2, Ae = d[Re + 16], me = d[Re + 17];
|
|
14077
|
+
Ae && p.push(Ae), me && p.push(me);
|
|
14078
14078
|
}
|
|
14079
14079
|
}
|
|
14080
14080
|
return s;
|
|
@@ -14130,19 +14130,19 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$5 = new BVHVe
|
|
|
14130
14130
|
function F(H) {
|
|
14131
14131
|
var C = H.startIndex, I = H.endIndex, B = H.extents;
|
|
14132
14132
|
R[0] = B[3] - B[0], R[1] = B[4] - B[1], R[2] = B[5] - B[2];
|
|
14133
|
-
for (var O = M.sort(w)[0], _ = ORDER_AXISES[O], N = (B[O] + B[O + 3]) / 2, V = C,
|
|
14134
|
-
D === -1 ? (J = l[V], s(J, scratchVector3$5), scratchVector3$5[_] < N ? V++ : D = J) : (J = l[
|
|
14133
|
+
for (var O = M.sort(w)[0], _ = ORDER_AXISES[O], N = (B[O] + B[O + 3]) / 2, V = C, X = I - 1, D = -1, J; V <= X; )
|
|
14134
|
+
D === -1 ? (J = l[V], s(J, scratchVector3$5), scratchVector3$5[_] < N ? V++ : D = J) : (J = l[X], s(J, scratchVector3$5), scratchVector3$5[_] >= N || (l[V] = J, l[X] = D, D = -1, V++), X--);
|
|
14135
14135
|
if (V > C) {
|
|
14136
|
-
var
|
|
14137
|
-
|
|
14138
|
-
var q = new BVHNode(++d,
|
|
14136
|
+
var U = B.slice();
|
|
14137
|
+
U[O + 3] = N + EPSILON;
|
|
14138
|
+
var q = new BVHNode(++d, U, C, V, H.deepth + 1);
|
|
14139
14139
|
q.deepth < r && q.endIndex - q.startIndex > e && (c[f++] = q), H.node0 = q;
|
|
14140
14140
|
}
|
|
14141
14141
|
if (I > V) {
|
|
14142
14142
|
var G = B.slice();
|
|
14143
14143
|
G[O] = N - EPSILON;
|
|
14144
|
-
var
|
|
14145
|
-
|
|
14144
|
+
var Z = new BVHNode(++d, G, V, I, H.deepth + 1);
|
|
14145
|
+
Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z), H.node1 = Z;
|
|
14146
14146
|
}
|
|
14147
14147
|
H.startIndex = 0, H.endIndex = 0;
|
|
14148
14148
|
}
|
|
@@ -15436,8 +15436,8 @@ function build(n, t) {
|
|
|
15436
15436
|
C = [V, Promise.resolve([])];
|
|
15437
15437
|
}
|
|
15438
15438
|
H = C[0], H.name = w.name, H.flatShading = !(w.smooth || m.attributes.normal), H.vertexColors = A, n.materials[F] = H;
|
|
15439
|
-
var
|
|
15440
|
-
r.push(
|
|
15439
|
+
var X = C[1];
|
|
15440
|
+
r.push(X), o.push(function() {
|
|
15441
15441
|
return H.dispose();
|
|
15442
15442
|
});
|
|
15443
15443
|
}
|
|
@@ -16281,21 +16281,21 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
|
|
|
16281
16281
|
maxScreenSpaceError: m.maxScreenSpaceError,
|
|
16282
16282
|
memoryAdjustedOverflow: m.memoryAdjustedOverflow,
|
|
16283
16283
|
memoryAdjustedScreenSpaceError: m.memoryAdjustedScreenSpaceError
|
|
16284
|
-
}, w = m.cacheCameras.map(function(
|
|
16285
|
-
return
|
|
16284
|
+
}, w = m.cacheCameras.map(function(oe) {
|
|
16285
|
+
return oe.updateProjectionMatrix(), __assign(__assign({}, M), { camera: {
|
|
16286
16286
|
type: r.type,
|
|
16287
|
-
position: new THREE.Vector3().copy(
|
|
16288
|
-
direction:
|
|
16289
|
-
up: new THREE.Vector3().copy(
|
|
16290
|
-
projectionMatrix:
|
|
16291
|
-
visible:
|
|
16287
|
+
position: new THREE.Vector3().copy(oe.position),
|
|
16288
|
+
direction: oe.getWorldDirection(new THREE.Vector3()),
|
|
16289
|
+
up: new THREE.Vector3().copy(oe.up),
|
|
16290
|
+
projectionMatrix: oe.projectionMatrix.clone(),
|
|
16291
|
+
visible: oe.visible,
|
|
16292
16292
|
refine: !0
|
|
16293
|
-
}, cullingVolume: new CullingVolume().setFromCamera(
|
|
16293
|
+
}, cullingVolume: new CullingVolume().setFromCamera(oe) });
|
|
16294
16294
|
});
|
|
16295
|
-
if (this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), A = !0), this.autoRefine && this.tileset.update(M, w), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(
|
|
16296
|
-
if (c.refineProgress[1]++,
|
|
16297
|
-
var
|
|
16298
|
-
if (
|
|
16295
|
+
if (this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), A = !0), this.autoRefine && this.tileset.update(M, w), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(oe) {
|
|
16296
|
+
if (c.refineProgress[1]++, oe.content) {
|
|
16297
|
+
var W = oe.content.loadState;
|
|
16298
|
+
if (W === "UNLOADED" || W === "LOADING") {
|
|
16299
16299
|
c.refined = !1;
|
|
16300
16300
|
return;
|
|
16301
16301
|
}
|
|
@@ -16304,22 +16304,22 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
|
|
|
16304
16304
|
}), this.loaded === !1 && this.autoRefine) {
|
|
16305
16305
|
this.loaded = !0;
|
|
16306
16306
|
var F = !1;
|
|
16307
|
-
this.tileset.needsRefinedTiles.forEach(function(
|
|
16308
|
-
if (c.loaded !== !1 &&
|
|
16309
|
-
if (
|
|
16310
|
-
if (
|
|
16311
|
-
var
|
|
16312
|
-
(
|
|
16307
|
+
this.tileset.needsRefinedTiles.forEach(function(oe) {
|
|
16308
|
+
if (c.loaded !== !1 && oe.content) {
|
|
16309
|
+
if (oe.state.visible && (F = !0), M.skipLevelOfDetail) {
|
|
16310
|
+
if (oe.state.finalResolution) {
|
|
16311
|
+
var W = oe.state.ancestorWithContentAvailable, re = W && W.content ? W.content : oe.content, Q = re.loadState;
|
|
16312
|
+
(Q === "UNLOADED" || Q === "LOADING") && (c.loaded = !1);
|
|
16313
16313
|
}
|
|
16314
|
-
} else if (
|
|
16315
|
-
var
|
|
16316
|
-
(
|
|
16314
|
+
} else if (oe.state.visible && oe.levelOfContent <= 0) {
|
|
16315
|
+
var Q = oe.content.loadState;
|
|
16316
|
+
(Q === "UNLOADED" || Q === "LOADING") && (c.loaded = !1);
|
|
16317
16317
|
}
|
|
16318
16318
|
}
|
|
16319
16319
|
}), F && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
|
|
16320
16320
|
}
|
|
16321
|
-
this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), M.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(
|
|
16322
|
-
return
|
|
16321
|
+
this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), M.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(oe, W) {
|
|
16322
|
+
return oe.floor !== W.floor ? oe.floor - W.floor : oe.levelOfContent !== W.levelOfContent ? W.levelOfContent - oe.levelOfContent : oe.state.distanceToCamera !== W.state.distanceToCamera ? oe.state.distanceToCamera - W.state.distanceToCamera : oe.state.centerZDepth - W.state.centerZDepth;
|
|
16323
16323
|
});
|
|
16324
16324
|
for (var H = [], C = 0, I = this.tileset.selectedTiles; C < I.length; C++) {
|
|
16325
16325
|
var B = I[C], O = (d = (f = B.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
|
|
@@ -16330,35 +16330,35 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
|
|
|
16330
16330
|
var N = this.cloneSkipBackfaceObject(O);
|
|
16331
16331
|
this.backfaceObjects.push(N);
|
|
16332
16332
|
}
|
|
16333
|
-
for (var V = B.state.selectionDepth,
|
|
16334
|
-
var
|
|
16335
|
-
|
|
16333
|
+
for (var V = B.state.selectionDepth, X = STENCIL_CONSTANT.TILE_MASK | V << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, D = THREE.GreaterEqualStencilFunc, J = STENCIL_CONSTANT.SKIP_LOD_MASK, U = THREE.ReplaceStencilOp, q = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, G = 0, Z = O.materials; G < Z.length; G++) {
|
|
16334
|
+
var Y = Z[G];
|
|
16335
|
+
Y.stencilWrite = !0, Y.stencilRef = X, Y.stencilFunc = D, Y.stencilFuncMask = J, Y.stencilZPass = U, Y.stencilWriteMask = q;
|
|
16336
16336
|
}
|
|
16337
16337
|
} else
|
|
16338
|
-
for (var
|
|
16339
|
-
var
|
|
16340
|
-
|
|
16338
|
+
for (var ee = 0, ie = O.materials; ee < ie.length; ee++) {
|
|
16339
|
+
var Y = ie[ee];
|
|
16340
|
+
Y.stencilWrite = !1, Y.stencilRef = STENCIL_CONSTANT.TILE_MASK, Y.stencilFunc = THREE.AlwaysStencilFunc, Y.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, Y.stencilZPass = THREE.ReplaceStencilOp, Y.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
|
|
16341
16341
|
}
|
|
16342
16342
|
this.tileObjects.push(O);
|
|
16343
16343
|
}
|
|
16344
16344
|
}
|
|
16345
|
-
var
|
|
16346
|
-
tileVersionMap.get(this) !==
|
|
16347
|
-
for (var
|
|
16348
|
-
var ae =
|
|
16349
|
-
if (
|
|
16350
|
-
var _ =
|
|
16351
|
-
|
|
16345
|
+
var ne = H.toString();
|
|
16346
|
+
tileVersionMap.get(this) !== ne && (tileVersionMap.set(this, ne), A = !0), M.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), M.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
|
|
16347
|
+
for (var K = [], j = 0, te = this.tileset.selectedTrajectories; j < te.length; j++) {
|
|
16348
|
+
var ae = te[j], ue = (h = ae.content.data) === null || h === void 0 ? void 0 : h.object;
|
|
16349
|
+
if (ue) {
|
|
16350
|
+
var _ = ue.update(e, r, o, this, ae, m);
|
|
16351
|
+
K.push(ae.id), _ && (A = !0), this.renderObjects.push(ue);
|
|
16352
16352
|
}
|
|
16353
16353
|
}
|
|
16354
|
-
var
|
|
16355
|
-
trajectoryVersionMap.get(this) !==
|
|
16356
|
-
for (var pe = Math.min(0, ((g = (p = this.parent) === null || p === void 0 ? void 0 : p.children) !== null && g !== void 0 ? g : []).indexOf(this)),
|
|
16357
|
-
var
|
|
16358
|
-
|
|
16359
|
-
(
|
|
16360
|
-
}),
|
|
16361
|
-
},
|
|
16354
|
+
var fe = K.toString();
|
|
16355
|
+
trajectoryVersionMap.get(this) !== fe && (trajectoryVersionMap.set(this, fe), A = !0);
|
|
16356
|
+
for (var pe = Math.min(0, ((g = (p = this.parent) === null || p === void 0 ? void 0 : p.children) !== null && g !== void 0 ? g : []).indexOf(this)), ge = pe * 1e4, Re = function(oe) {
|
|
16357
|
+
var W = Ae.renderObjects[oe], re = oe + ge;
|
|
16358
|
+
W.traverse(function(Q) {
|
|
16359
|
+
(Q instanceof THREE.Mesh || Q instanceof THREE.Line || Q instanceof THREE.Points) && (Q.renderOrder = re);
|
|
16360
|
+
}), Ae.add(W);
|
|
16361
|
+
}, Ae = this, me = 0; me < this.renderObjects.length; me++)
|
|
16362
16362
|
Re(me);
|
|
16363
16363
|
return A;
|
|
16364
16364
|
}, t.prototype.dispose = function() {
|
|
@@ -16909,10 +16909,10 @@ function parse(n, t, e) {
|
|
|
16909
16909
|
var I = verify(w);
|
|
16910
16910
|
if (I instanceof Error)
|
|
16911
16911
|
return I;
|
|
16912
|
-
Array.isArray(t.transform) ? e.transform.fromArray(t.transform) : t.transform && e.transform.copy(t.transform), n = w.map(function(
|
|
16913
|
-
return JSON.parse(
|
|
16914
|
-
}).reduce(function(
|
|
16915
|
-
return deepMerge(
|
|
16912
|
+
Array.isArray(t.transform) ? e.transform.fromArray(t.transform) : t.transform && e.transform.copy(t.transform), n = w.map(function(W) {
|
|
16913
|
+
return JSON.parse(W);
|
|
16914
|
+
}).reduce(function(W, re) {
|
|
16915
|
+
return deepMerge(W, re);
|
|
16916
16916
|
}), defineProperty(e, "raw", {
|
|
16917
16917
|
configurable: !1,
|
|
16918
16918
|
get: function() {
|
|
@@ -16971,11 +16971,11 @@ function parse(n, t, e) {
|
|
|
16971
16971
|
var V = {
|
|
16972
16972
|
work: e,
|
|
16973
16973
|
layers: []
|
|
16974
|
-
},
|
|
16975
|
-
n.model.file ?
|
|
16974
|
+
}, X;
|
|
16975
|
+
n.model.file ? X = fileURL(_, n.model.file, t) : n.model.file_url && (X = fileURL(_, n.model.file_url, t)), defineProperty(V, "file", {
|
|
16976
16976
|
configurable: !1,
|
|
16977
16977
|
get: function() {
|
|
16978
|
-
return
|
|
16978
|
+
return X;
|
|
16979
16979
|
}
|
|
16980
16980
|
});
|
|
16981
16981
|
var D;
|
|
@@ -16986,50 +16986,50 @@ function parse(n, t, e) {
|
|
|
16986
16986
|
}
|
|
16987
16987
|
});
|
|
16988
16988
|
var J;
|
|
16989
|
-
Array.isArray(n.model.textures) ? (J = n.model.textures.map(function(
|
|
16990
|
-
var
|
|
16991
|
-
return textureURL$1(_,
|
|
16992
|
-
}), Object.freeze(J)) : Array.isArray(n.model.material_textures) && (J = n.model.material_textures.map(function(
|
|
16993
|
-
var
|
|
16994
|
-
return textureURL$1(_,
|
|
16989
|
+
Array.isArray(n.model.textures) ? (J = n.model.textures.map(function(W) {
|
|
16990
|
+
var re, Q;
|
|
16991
|
+
return textureURL$1(_, W, (Q = (re = n.model.textureBase) !== null && re !== void 0 ? re : n.model.material_base_url) !== null && Q !== void 0 ? Q : "", t);
|
|
16992
|
+
}), Object.freeze(J)) : Array.isArray(n.model.material_textures) && (J = n.model.material_textures.map(function(W) {
|
|
16993
|
+
var re, Q;
|
|
16994
|
+
return textureURL$1(_, W, (Q = (re = n.model.textureBase) !== null && re !== void 0 ? re : n.model.material_base_url) !== null && Q !== void 0 ? Q : "", t);
|
|
16995
16995
|
}), Object.freeze(J)), defineProperty(V, "textures", {
|
|
16996
16996
|
configurable: !1,
|
|
16997
16997
|
get: function() {
|
|
16998
16998
|
return J;
|
|
16999
16999
|
}
|
|
17000
17000
|
});
|
|
17001
|
-
var
|
|
17001
|
+
var U = [];
|
|
17002
17002
|
if (Array.isArray(n.model.tiles))
|
|
17003
17003
|
for (var q = 0, G = n.model.tiles; q < G.length; q++) {
|
|
17004
|
-
var
|
|
17005
|
-
|
|
17006
|
-
type: (s =
|
|
17007
|
-
name: (u =
|
|
17008
|
-
upAxis: (c = (l =
|
|
17009
|
-
tileset: fileURL(_,
|
|
17004
|
+
var Z = G[q];
|
|
17005
|
+
Z && (Z.tileset || Z.tileset_url) && U.push(Object.freeze({
|
|
17006
|
+
type: (s = Z.type) !== null && s !== void 0 ? s : "mesh",
|
|
17007
|
+
name: (u = Z.name) !== null && u !== void 0 ? u : "",
|
|
17008
|
+
upAxis: (c = (l = Z.upAxis) !== null && l !== void 0 ? l : Z.up_axis) !== null && c !== void 0 ? c : "-Y",
|
|
17009
|
+
tileset: fileURL(_, Z.tileset || Z.tileset_url, t)
|
|
17010
17010
|
}));
|
|
17011
17011
|
}
|
|
17012
17012
|
else
|
|
17013
|
-
n.model.tiles && (n.model.tiles.tileset || n.model.tiles.tileset_url) &&
|
|
17013
|
+
n.model.tiles && (n.model.tiles.tileset || n.model.tiles.tileset_url) && U.push(Object.freeze({
|
|
17014
17014
|
type: (f = n.model.tiles.type) !== null && f !== void 0 ? f : "mesh",
|
|
17015
17015
|
name: (d = n.model.tiles.name) !== null && d !== void 0 ? d : "lod",
|
|
17016
17016
|
upAxis: (p = (h = n.model.tiles.upAxis) !== null && h !== void 0 ? h : n.model.tiles.up_axis) !== null && p !== void 0 ? p : "-Y",
|
|
17017
17017
|
tileset: fileURL(_, n.model.tiles.tileset || n.model.tiles.tileset_url, t)
|
|
17018
17018
|
}));
|
|
17019
17019
|
if (Array.isArray(n.model.layers))
|
|
17020
|
-
for (var
|
|
17021
|
-
var
|
|
17022
|
-
|
|
17023
|
-
type: (g =
|
|
17024
|
-
name: (A =
|
|
17025
|
-
upAxis: (m =
|
|
17026
|
-
tileset: fileURL(_,
|
|
17020
|
+
for (var Y = 0, ee = n.model.layers; Y < ee.length; Y++) {
|
|
17021
|
+
var ie = ee[Y];
|
|
17022
|
+
ie && (ie.tileset || ie.tileset_url) && U.push(Object.freeze({
|
|
17023
|
+
type: (g = ie.type) !== null && g !== void 0 ? g : "mesh",
|
|
17024
|
+
name: (A = ie.name) !== null && A !== void 0 ? A : "",
|
|
17025
|
+
upAxis: (m = ie.upAxis) !== null && m !== void 0 ? m : ie.up_axis,
|
|
17026
|
+
tileset: fileURL(_, ie.tileset || ie.tileset_url, t)
|
|
17027
17027
|
}));
|
|
17028
17028
|
}
|
|
17029
|
-
Object.freeze(
|
|
17029
|
+
Object.freeze(U), defineProperty(V, "layers", {
|
|
17030
17030
|
configurable: !1,
|
|
17031
17031
|
get: function() {
|
|
17032
|
-
return
|
|
17032
|
+
return U;
|
|
17033
17033
|
}
|
|
17034
17034
|
}), defineProperty(e, "model", {
|
|
17035
17035
|
configurable: !1,
|
|
@@ -17041,14 +17041,14 @@ function parse(n, t, e) {
|
|
|
17041
17041
|
}
|
|
17042
17042
|
if (I instanceof Error)
|
|
17043
17043
|
return I;
|
|
17044
|
-
var
|
|
17044
|
+
var ne = /* @__PURE__ */ new Set(), K = /* @__PURE__ */ new Set();
|
|
17045
17045
|
{
|
|
17046
|
-
var
|
|
17046
|
+
var j = [];
|
|
17047
17047
|
if (n.observers && Array.isArray(n.observers)) {
|
|
17048
|
-
var
|
|
17049
|
-
n.panorama && (Array.isArray(n.panorama) ?
|
|
17050
|
-
for (var ae = function(
|
|
17051
|
-
var
|
|
17048
|
+
var te = [];
|
|
17049
|
+
n.panorama && (Array.isArray(n.panorama) ? te = n.panorama : Array.isArray(n.panorama.list) ? te = n.panorama.list : Array.isArray(n.panorama.info) && (te = n.panorama.info));
|
|
17050
|
+
for (var ae = function(W) {
|
|
17051
|
+
var re = {
|
|
17052
17052
|
getResolvedPosition: function(be) {
|
|
17053
17053
|
return be.copy(this.position).applyMatrix4(this.work.transform), be;
|
|
17054
17054
|
},
|
|
@@ -17061,37 +17061,37 @@ function parse(n, t, e) {
|
|
|
17061
17061
|
getResolvedMatrix: function(be) {
|
|
17062
17062
|
return be.copy(this.matrix).premultiply(this.work.transform), be;
|
|
17063
17063
|
}
|
|
17064
|
-
},
|
|
17065
|
-
if (!
|
|
17064
|
+
}, Q = n.observers[W];
|
|
17065
|
+
if (!Q)
|
|
17066
17066
|
return "break";
|
|
17067
|
-
var
|
|
17068
|
-
if (!
|
|
17067
|
+
var ce = te[W];
|
|
17068
|
+
if (!ce)
|
|
17069
17069
|
return "break";
|
|
17070
|
-
|
|
17070
|
+
Q = Object.assign({}, Q, ce, {
|
|
17071
17071
|
// 处理 active
|
|
17072
17072
|
// observer.active | panorama.active 有一个 false 则为 false
|
|
17073
|
-
active:
|
|
17074
|
-
}), defineProperty(
|
|
17073
|
+
active: Q.active !== !1 && ce.active !== !1
|
|
17074
|
+
}), defineProperty(re, "work", {
|
|
17075
17075
|
configurable: !1,
|
|
17076
17076
|
get: function() {
|
|
17077
17077
|
return e;
|
|
17078
17078
|
}
|
|
17079
|
-
}), defineProperty(
|
|
17079
|
+
}), defineProperty(re, "index", {
|
|
17080
17080
|
configurable: !1,
|
|
17081
17081
|
get: function() {
|
|
17082
|
-
return
|
|
17082
|
+
return W;
|
|
17083
17083
|
}
|
|
17084
|
-
}),
|
|
17084
|
+
}), K.add(W), defineProperty(re, "panoIndex", {
|
|
17085
17085
|
configurable: !1,
|
|
17086
17086
|
get: function() {
|
|
17087
|
-
return
|
|
17087
|
+
return W;
|
|
17088
17088
|
}
|
|
17089
17089
|
});
|
|
17090
17090
|
var ve = panoStringify({
|
|
17091
17091
|
workCode: e.workCode,
|
|
17092
|
-
panoIndex:
|
|
17092
|
+
panoIndex: W
|
|
17093
17093
|
});
|
|
17094
|
-
|
|
17094
|
+
ne.add(ve), defineProperty(re, "panoId", {
|
|
17095
17095
|
configurable: !1,
|
|
17096
17096
|
get: function() {
|
|
17097
17097
|
return ve;
|
|
@@ -17099,56 +17099,56 @@ function parse(n, t, e) {
|
|
|
17099
17099
|
});
|
|
17100
17100
|
var Ve = Object.freeze({
|
|
17101
17101
|
workCode: e.workCode,
|
|
17102
|
-
panoIndex:
|
|
17102
|
+
panoIndex: W
|
|
17103
17103
|
});
|
|
17104
|
-
defineProperty(
|
|
17104
|
+
defineProperty(re, "pano", {
|
|
17105
17105
|
configurable: !1,
|
|
17106
17106
|
get: function() {
|
|
17107
17107
|
return Ve;
|
|
17108
17108
|
}
|
|
17109
17109
|
});
|
|
17110
|
-
var Ue =
|
|
17111
|
-
defineProperty(
|
|
17110
|
+
var Ue = Q.active !== !1;
|
|
17111
|
+
defineProperty(re, "active", {
|
|
17112
17112
|
configurable: !1,
|
|
17113
17113
|
get: function() {
|
|
17114
17114
|
return Ue;
|
|
17115
17115
|
}
|
|
17116
17116
|
});
|
|
17117
|
-
var $e =
|
|
17118
|
-
defineProperty(
|
|
17117
|
+
var $e = Q.loadable === !0;
|
|
17118
|
+
defineProperty(re, "loadable", {
|
|
17119
17119
|
configurable: !1,
|
|
17120
17120
|
get: function() {
|
|
17121
17121
|
return $e;
|
|
17122
17122
|
}
|
|
17123
17123
|
});
|
|
17124
|
-
var Be =
|
|
17125
|
-
defineProperty(
|
|
17124
|
+
var Be = Q.derived_id;
|
|
17125
|
+
defineProperty(re, "derivedId", {
|
|
17126
17126
|
configurable: !1,
|
|
17127
17127
|
get: function() {
|
|
17128
17128
|
return Be;
|
|
17129
17129
|
}
|
|
17130
17130
|
});
|
|
17131
|
-
var de =
|
|
17132
|
-
defineProperty(
|
|
17131
|
+
var de = Q.derived_id_str;
|
|
17132
|
+
defineProperty(re, "derivedIdStr", {
|
|
17133
17133
|
configurable: !1,
|
|
17134
17134
|
get: function() {
|
|
17135
17135
|
return de;
|
|
17136
17136
|
}
|
|
17137
17137
|
});
|
|
17138
17138
|
var Ee = (S = (b = (v = (E = n.panorama) === null || E === void 0 ? void 0 : E.pano_high_cube_base_url) !== null && v !== void 0 ? v : (y = n.panorama) === null || y === void 0 ? void 0 : y.pano_cube_base_url) !== null && b !== void 0 ? b : (T = n.panorama) === null || T === void 0 ? void 0 : T.base_url) !== null && S !== void 0 ? S : "", Se = {
|
|
17139
|
-
up: panoURL(_, Ee,
|
|
17140
|
-
down: panoURL(_, Ee,
|
|
17141
|
-
right: panoURL(_, Ee,
|
|
17142
|
-
left: panoURL(_, Ee,
|
|
17143
|
-
front: panoURL(_, Ee,
|
|
17144
|
-
back: panoURL(_, Ee,
|
|
17139
|
+
up: panoURL(_, Ee, Q.images ? Q.images.up : Q.up, W, t),
|
|
17140
|
+
down: panoURL(_, Ee, Q.images ? Q.images.down : Q.down, W, t),
|
|
17141
|
+
right: panoURL(_, Ee, Q.images ? Q.images.right : Q.right, W, t),
|
|
17142
|
+
left: panoURL(_, Ee, Q.images ? Q.images.left : Q.left, W, t),
|
|
17143
|
+
front: panoURL(_, Ee, Q.images ? Q.images.front : Q.front, W, t),
|
|
17144
|
+
back: panoURL(_, Ee, Q.images ? Q.images.back : Q.back, W, t)
|
|
17145
17145
|
};
|
|
17146
|
-
if (
|
|
17147
|
-
Se.sizeList =
|
|
17146
|
+
if (Q.size_list)
|
|
17147
|
+
Se.sizeList = Q.size_list.slice();
|
|
17148
17148
|
else {
|
|
17149
17149
|
var le = getImageSizeFromURL(Se.up);
|
|
17150
|
-
if (le && (Se.sizeList = [le],
|
|
17151
|
-
for (var Ce =
|
|
17150
|
+
if (le && (Se.sizeList = [le], Q.tiles))
|
|
17151
|
+
for (var Ce = Q.tiles.slice().sort(function(be, lt) {
|
|
17152
17152
|
return be - lt;
|
|
17153
17153
|
}).map(function(be) {
|
|
17154
17154
|
return 512 * Math.pow(2, be);
|
|
@@ -17158,10 +17158,10 @@ function parse(n, t, e) {
|
|
|
17158
17158
|
}
|
|
17159
17159
|
}
|
|
17160
17160
|
var xe = void 0;
|
|
17161
|
-
if (
|
|
17162
|
-
xe =
|
|
17163
|
-
else if (Array.isArray(
|
|
17164
|
-
var he =
|
|
17161
|
+
if (Q.images)
|
|
17162
|
+
xe = Q.images.tiles;
|
|
17163
|
+
else if (Array.isArray(Q.size_list)) {
|
|
17164
|
+
var he = Q.size_list.slice().sort(function(be, lt) {
|
|
17165
17165
|
return be - lt;
|
|
17166
17166
|
});
|
|
17167
17167
|
if (he[0]) {
|
|
@@ -17171,8 +17171,8 @@ function parse(n, t, e) {
|
|
|
17171
17171
|
he.unshift(512 * Math.pow(2, Le));
|
|
17172
17172
|
xe = he;
|
|
17173
17173
|
}
|
|
17174
|
-
} else if (Array.isArray(
|
|
17175
|
-
if (xe =
|
|
17174
|
+
} else if (Array.isArray(Q.tiles)) {
|
|
17175
|
+
if (xe = Q.tiles.slice(), typeof xe[0] == "number") {
|
|
17176
17176
|
for (var ot = xe[0]; --ot >= 0; )
|
|
17177
17177
|
xe.unshift(ot);
|
|
17178
17178
|
xe = xe.sort(function(be, lt) {
|
|
@@ -17217,7 +17217,7 @@ function parse(n, t, e) {
|
|
|
17217
17217
|
var le = ye.size;
|
|
17218
17218
|
if (typeof le != "number")
|
|
17219
17219
|
continue;
|
|
17220
|
-
var De = panoURL(_, Ee, ye.up,
|
|
17220
|
+
var De = panoURL(_, Ee, ye.up, W, t), Me = panoURL(_, Ee, ye.down, W, t), Ie = panoURL(_, Ee, ye.right, W, t), Ye = panoURL(_, Ee, ye.left, W, t), He = panoURL(_, Ee, ye.front, W, t), Fe = panoURL(_, Ee, ye.back, W, t);
|
|
17221
17221
|
ze.push(Object.freeze({ level: je, size: le, scale: (R = ye.scale) !== null && R !== void 0 ? R : 1, up: De, down: Me, right: Ie, left: Ye, front: He, back: Fe }));
|
|
17222
17222
|
}
|
|
17223
17223
|
}
|
|
@@ -17228,196 +17228,196 @@ function parse(n, t, e) {
|
|
|
17228
17228
|
}
|
|
17229
17229
|
});
|
|
17230
17230
|
}
|
|
17231
|
-
Object.freeze(Se), defineProperty(
|
|
17231
|
+
Object.freeze(Se), defineProperty(re, "images", {
|
|
17232
17232
|
configurable: !1,
|
|
17233
17233
|
get: function() {
|
|
17234
17234
|
return Se;
|
|
17235
17235
|
}
|
|
17236
17236
|
});
|
|
17237
17237
|
var tt = new THREE.Vector3();
|
|
17238
|
-
if (
|
|
17239
|
-
tt.copy(
|
|
17240
|
-
else if (Array.isArray(
|
|
17241
|
-
tt.fromArray(
|
|
17238
|
+
if (Q.position instanceof THREE.Vector3)
|
|
17239
|
+
tt.copy(Q.position);
|
|
17240
|
+
else if (Array.isArray(Q.position))
|
|
17241
|
+
tt.fromArray(Q.position);
|
|
17242
17242
|
else
|
|
17243
17243
|
return "break";
|
|
17244
|
-
Object.freeze(tt), e.observerBox.expandByPoint(tt), defineProperty(
|
|
17244
|
+
Object.freeze(tt), e.observerBox.expandByPoint(tt), defineProperty(re, "position", {
|
|
17245
17245
|
configurable: !1,
|
|
17246
17246
|
get: function() {
|
|
17247
17247
|
return tt;
|
|
17248
17248
|
}
|
|
17249
17249
|
});
|
|
17250
17250
|
var st = new THREE.Vector3();
|
|
17251
|
-
if (
|
|
17252
|
-
st.copy(
|
|
17253
|
-
else if (Array.isArray(
|
|
17254
|
-
st.fromArray(
|
|
17255
|
-
else if (
|
|
17256
|
-
st.copy(
|
|
17257
|
-
else if (Array.isArray(
|
|
17258
|
-
st.fromArray(
|
|
17251
|
+
if (Q.standingPosition instanceof THREE.Vector3)
|
|
17252
|
+
st.copy(Q.standingPosition);
|
|
17253
|
+
else if (Array.isArray(Q.standingPosition))
|
|
17254
|
+
st.fromArray(Q.standingPosition);
|
|
17255
|
+
else if (Q.standing_position instanceof THREE.Vector3)
|
|
17256
|
+
st.copy(Q.standing_position);
|
|
17257
|
+
else if (Array.isArray(Q.standing_position))
|
|
17258
|
+
st.fromArray(Q.standing_position);
|
|
17259
17259
|
else
|
|
17260
17260
|
return "break";
|
|
17261
|
-
Object.freeze(st), e.observerBox.expandByPoint(st), defineProperty(
|
|
17261
|
+
Object.freeze(st), e.observerBox.expandByPoint(st), defineProperty(re, "standingPosition", {
|
|
17262
17262
|
configurable: !1,
|
|
17263
17263
|
get: function() {
|
|
17264
17264
|
return st;
|
|
17265
17265
|
}
|
|
17266
17266
|
});
|
|
17267
17267
|
var ut = new THREE.Quaternion();
|
|
17268
|
-
if (
|
|
17269
|
-
ut.copy(
|
|
17270
|
-
else if (Array.isArray(
|
|
17271
|
-
ut.fromArray(
|
|
17272
|
-
else if (
|
|
17273
|
-
var gt =
|
|
17268
|
+
if (Q.quaternion instanceof THREE.Quaternion)
|
|
17269
|
+
ut.copy(Q.quaternion);
|
|
17270
|
+
else if (Array.isArray(Q.quaternion))
|
|
17271
|
+
ut.fromArray(Q.quaternion);
|
|
17272
|
+
else if (Q.quaternion) {
|
|
17273
|
+
var gt = Q.quaternion, vt = gt.x, ht = gt.y, qe = gt.z, mt = gt.w;
|
|
17274
17274
|
ut.set(vt, ht, qe, mt);
|
|
17275
17275
|
} else
|
|
17276
17276
|
return "break";
|
|
17277
|
-
Object.freeze(ut), defineProperty(
|
|
17277
|
+
Object.freeze(ut), defineProperty(re, "quaternion", {
|
|
17278
17278
|
configurable: !1,
|
|
17279
17279
|
get: function() {
|
|
17280
17280
|
return ut;
|
|
17281
17281
|
}
|
|
17282
17282
|
});
|
|
17283
17283
|
var Qe = new THREE.Matrix4().compose(tt, ut, PANO_TEXTURE_SCALE);
|
|
17284
|
-
Object.freeze(Qe), defineProperty(
|
|
17284
|
+
Object.freeze(Qe), defineProperty(re, "matrix", {
|
|
17285
17285
|
configurable: !1,
|
|
17286
17286
|
get: function() {
|
|
17287
17287
|
return Qe;
|
|
17288
17288
|
}
|
|
17289
17289
|
});
|
|
17290
17290
|
var Oe = 0;
|
|
17291
|
-
isNumber(
|
|
17291
|
+
isNumber(Q.floorIndex) ? Oe = Q.floorIndex : isNumber(Q.floor_index) ? Oe = Q.floor_index : isNumber(Q.floor) && (Oe = Q.floor), defineProperty(re, "floorIndex", {
|
|
17292
17292
|
configurable: !1,
|
|
17293
17293
|
get: function() {
|
|
17294
17294
|
return Oe;
|
|
17295
17295
|
}
|
|
17296
17296
|
});
|
|
17297
17297
|
var ke;
|
|
17298
|
-
|
|
17298
|
+
Q.video && (ke = {
|
|
17299
17299
|
source: "",
|
|
17300
17300
|
matrix: new THREE.Matrix4(),
|
|
17301
17301
|
size: new THREE.Vector2()
|
|
17302
|
-
}, typeof
|
|
17302
|
+
}, typeof Q.video.source == "string" && (ke.source = Q.video.source), Q.video.matrix instanceof THREE.Matrix4 ? ke.matrix.copy(Q.video.matrix) : Array.isArray(Q.video.matrix) && ke.matrix.fromArray(Q.video.matrix), Q.video.size instanceof THREE.Vector2 ? ke.size.copy(Q.video.size) : Array.isArray(Q.video.size) && ke.size.fromArray(Q.video.size), Object.freeze(ke)), defineProperty(re, "video", {
|
|
17303
17303
|
configurable: !1,
|
|
17304
17304
|
get: function() {
|
|
17305
17305
|
return ke;
|
|
17306
17306
|
}
|
|
17307
|
-
}), Array.isArray(
|
|
17307
|
+
}), Array.isArray(Q.accessibleNodes) ? (re.accessibleNodes = Q.accessibleNodes.slice(), re.accessibleIds = Q.accessibleNodes.map(function(be) {
|
|
17308
17308
|
return panoStringify({
|
|
17309
17309
|
workCode: e.workCode,
|
|
17310
17310
|
panoIndex: be
|
|
17311
17311
|
});
|
|
17312
|
-
})) : Array.isArray(
|
|
17312
|
+
})) : Array.isArray(Q.accessible_nodes) && (re.accessibleNodes = Q.accessible_nodes.slice(), re.accessibleIds = Q.accessible_nodes.map(function(be) {
|
|
17313
17313
|
return panoStringify({
|
|
17314
17314
|
workCode: e.workCode,
|
|
17315
17315
|
panoIndex: be
|
|
17316
17316
|
});
|
|
17317
|
-
})), Array.isArray(
|
|
17317
|
+
})), Array.isArray(Q.visibleNodes) ? (re.visibleNodes = Q.visibleNodes.slice(), re.visibleIds = Q.visibleNodes.map(function(be) {
|
|
17318
17318
|
return panoStringify({
|
|
17319
17319
|
workCode: e.workCode,
|
|
17320
17320
|
panoIndex: be
|
|
17321
17321
|
});
|
|
17322
|
-
})) : Array.isArray(
|
|
17322
|
+
})) : Array.isArray(Q.visible_nodes) && (re.visibleNodes = Q.visible_nodes.slice(), re.visibleIds = Q.visible_nodes.map(function(be) {
|
|
17323
17323
|
return panoStringify({
|
|
17324
17324
|
workCode: e.workCode,
|
|
17325
17325
|
panoIndex: be
|
|
17326
17326
|
});
|
|
17327
|
-
})),
|
|
17328
|
-
},
|
|
17329
|
-
var
|
|
17330
|
-
if (
|
|
17327
|
+
})), j[W] = re;
|
|
17328
|
+
}, ue = 0; ue < n.observers.length; ue++) {
|
|
17329
|
+
var fe = ae(ue);
|
|
17330
|
+
if (fe === "break")
|
|
17331
17331
|
break;
|
|
17332
17332
|
}
|
|
17333
17333
|
}
|
|
17334
|
-
for (var pe = function(
|
|
17335
|
-
if (
|
|
17336
|
-
var
|
|
17337
|
-
return
|
|
17334
|
+
for (var pe = function(W) {
|
|
17335
|
+
if (W.accessibleIds) {
|
|
17336
|
+
var ce = W.accessibleIds.filter(function(Ee) {
|
|
17337
|
+
return ne.has(Ee);
|
|
17338
17338
|
});
|
|
17339
|
-
Object.freeze(
|
|
17339
|
+
Object.freeze(ce), defineProperty(W, "accessibleIds", {
|
|
17340
17340
|
configurable: !1,
|
|
17341
17341
|
get: function() {
|
|
17342
|
-
return
|
|
17342
|
+
return ce;
|
|
17343
17343
|
}
|
|
17344
17344
|
});
|
|
17345
17345
|
} else {
|
|
17346
|
-
for (var
|
|
17347
|
-
|
|
17348
|
-
Object.freeze(
|
|
17346
|
+
for (var re = [], Q = 0; Q < j.length; Q++)
|
|
17347
|
+
j[Q] !== W && (Math.abs(j[Q].position.y - W.position.y) > 3 || j[Q].position.distanceTo(W.position) > 10 || re.push(j[Q].panoId));
|
|
17348
|
+
Object.freeze(re), defineProperty(W, "accessibleIds", {
|
|
17349
17349
|
configurable: !1,
|
|
17350
17350
|
get: function() {
|
|
17351
|
-
return
|
|
17351
|
+
return re;
|
|
17352
17352
|
}
|
|
17353
17353
|
});
|
|
17354
17354
|
}
|
|
17355
|
-
if (
|
|
17356
|
-
var Ve =
|
|
17357
|
-
return
|
|
17355
|
+
if (W.accessibleNodes) {
|
|
17356
|
+
var Ve = W.accessibleNodes.filter(function(Ee) {
|
|
17357
|
+
return K.has(Ee);
|
|
17358
17358
|
});
|
|
17359
|
-
Object.freeze(Ve), defineProperty(
|
|
17359
|
+
Object.freeze(Ve), defineProperty(W, "accessibleNodes", {
|
|
17360
17360
|
configurable: !1,
|
|
17361
17361
|
get: function() {
|
|
17362
17362
|
return Ve;
|
|
17363
17363
|
}
|
|
17364
17364
|
});
|
|
17365
17365
|
} else {
|
|
17366
|
-
for (var ve = [],
|
|
17367
|
-
|
|
17368
|
-
Object.freeze(ve), defineProperty(
|
|
17366
|
+
for (var ve = [], Q = 0; Q < j.length; Q++)
|
|
17367
|
+
j[Q] !== W && (Math.abs(j[Q].position.y - W.position.y) > 3 || j[Q].position.distanceTo(W.position) > 10 || ve.push(j[Q].panoIndex));
|
|
17368
|
+
Object.freeze(ve), defineProperty(W, "accessibleNodes", {
|
|
17369
17369
|
configurable: !1,
|
|
17370
17370
|
get: function() {
|
|
17371
17371
|
return ve;
|
|
17372
17372
|
}
|
|
17373
17373
|
});
|
|
17374
17374
|
}
|
|
17375
|
-
if (
|
|
17376
|
-
var $e =
|
|
17377
|
-
return
|
|
17375
|
+
if (W.visibleIds) {
|
|
17376
|
+
var $e = W.visibleIds.filter(function(Ee) {
|
|
17377
|
+
return ne.has(Ee);
|
|
17378
17378
|
});
|
|
17379
|
-
Object.freeze($e), defineProperty(
|
|
17379
|
+
Object.freeze($e), defineProperty(W, "visibleIds", {
|
|
17380
17380
|
configurable: !1,
|
|
17381
17381
|
get: function() {
|
|
17382
17382
|
return $e;
|
|
17383
17383
|
}
|
|
17384
17384
|
});
|
|
17385
17385
|
} else {
|
|
17386
|
-
var Ue =
|
|
17387
|
-
Object.freeze(Ue), defineProperty(
|
|
17386
|
+
var Ue = W.accessibleIds.slice();
|
|
17387
|
+
Object.freeze(Ue), defineProperty(W, "visibleIds", {
|
|
17388
17388
|
configurable: !1,
|
|
17389
17389
|
get: function() {
|
|
17390
17390
|
return Ue;
|
|
17391
17391
|
}
|
|
17392
17392
|
});
|
|
17393
17393
|
}
|
|
17394
|
-
if (
|
|
17395
|
-
var de =
|
|
17396
|
-
return
|
|
17394
|
+
if (W.visibleNodes) {
|
|
17395
|
+
var de = W.visibleNodes.filter(function(Ee) {
|
|
17396
|
+
return K.has(Ee);
|
|
17397
17397
|
});
|
|
17398
|
-
Object.freeze(de), defineProperty(
|
|
17398
|
+
Object.freeze(de), defineProperty(W, "visibleNodes", {
|
|
17399
17399
|
configurable: !1,
|
|
17400
17400
|
get: function() {
|
|
17401
17401
|
return de;
|
|
17402
17402
|
}
|
|
17403
17403
|
});
|
|
17404
17404
|
} else {
|
|
17405
|
-
var Be =
|
|
17406
|
-
Object.freeze(Be), defineProperty(
|
|
17405
|
+
var Be = W.accessibleNodes.slice();
|
|
17406
|
+
Object.freeze(Be), defineProperty(W, "visibleNodes", {
|
|
17407
17407
|
configurable: !1,
|
|
17408
17408
|
get: function() {
|
|
17409
17409
|
return Be;
|
|
17410
17410
|
}
|
|
17411
17411
|
});
|
|
17412
17412
|
}
|
|
17413
|
-
},
|
|
17414
|
-
var
|
|
17415
|
-
pe(
|
|
17413
|
+
}, ge = 0, Re = j; ge < Re.length; ge++) {
|
|
17414
|
+
var Ae = Re[ge];
|
|
17415
|
+
pe(Ae);
|
|
17416
17416
|
}
|
|
17417
|
-
Object.freeze(
|
|
17417
|
+
Object.freeze(j), defineProperty(e, "observers", {
|
|
17418
17418
|
configurable: !1,
|
|
17419
17419
|
get: function() {
|
|
17420
|
-
return
|
|
17420
|
+
return j;
|
|
17421
17421
|
}
|
|
17422
17422
|
});
|
|
17423
17423
|
}
|
|
@@ -17429,11 +17429,11 @@ function parse(n, t, e) {
|
|
|
17429
17429
|
isNumber(n.initial.panoIndex) ? me = n.initial.panoIndex : isNumber(n.initial.pano_index) ? me = n.initial.pano_index : isNumber(n.initial.pano) && (me = n.initial.pano), typeof me == "number" && (me = clamp$1(me, 0, e.observers.length - 1), e.initial.panoIndex = me);
|
|
17430
17430
|
}
|
|
17431
17431
|
if (isNumber(n.initial.distance) && (e.initial.distance = n.initial.distance), Array.isArray(n.initial.offset)) {
|
|
17432
|
-
var
|
|
17433
|
-
var
|
|
17434
|
-
return isNaN(
|
|
17432
|
+
var oe = [0, 0, 0].map(function(W, re) {
|
|
17433
|
+
var Q = Number(n.initial.offset[re]);
|
|
17434
|
+
return isNaN(Q) || !isFinite(Q) ? 0 : Q;
|
|
17435
17435
|
});
|
|
17436
|
-
e.initial.offset = new THREE.Vector3().fromArray(
|
|
17436
|
+
e.initial.offset = new THREE.Vector3().fromArray(oe);
|
|
17437
17437
|
} else typeof n.initial.offset == "object" && typeof n.initial.offset.x == "number" && typeof n.initial.offset.y == "number" && typeof n.initial.offset.z == "number" && (e.initial.offset = new THREE.Vector3(n.initial.offset.x, n.initial.offset.y, n.initial.offset.z));
|
|
17438
17438
|
!e.initial.mode && typeof e.initial.panoIndex == "number" && (e.initial.mode = "Panorama");
|
|
17439
17439
|
}
|
|
@@ -17801,10 +17801,10 @@ var BufferGeometryUtils = {
|
|
|
17801
17801
|
for (var c = e.tangent.array, f = [], d = [], h = 0; h < l; h++)
|
|
17802
17802
|
f[h] = new THREE.Vector3(), d[h] = new THREE.Vector3();
|
|
17803
17803
|
var p = new THREE.Vector3(), g = new THREE.Vector3(), A = new THREE.Vector3(), m = new THREE.Vector2(), E = new THREE.Vector2(), v = new THREE.Vector2(), y = new THREE.Vector3(), b = new THREE.Vector3();
|
|
17804
|
-
function T(J,
|
|
17805
|
-
p.fromArray(o, J * 3), g.fromArray(o,
|
|
17806
|
-
var G = g.x - p.x,
|
|
17807
|
-
y.set((ae * G -
|
|
17804
|
+
function T(J, U, q) {
|
|
17805
|
+
p.fromArray(o, J * 3), g.fromArray(o, U * 3), A.fromArray(o, q * 3), m.fromArray(u, J * 2), E.fromArray(u, U * 2), v.fromArray(u, q * 2);
|
|
17806
|
+
var G = g.x - p.x, Z = A.x - p.x, Y = g.y - p.y, ee = A.y - p.y, ie = g.z - p.z, ne = A.z - p.z, K = E.x - m.x, j = v.x - m.x, te = E.y - m.y, ae = v.y - m.y, ue = 1 / (K * ae - j * te);
|
|
17807
|
+
y.set((ae * G - te * Z) * ue, (ae * Y - te * ee) * ue, (ae * ie - te * ne) * ue), b.set((K * Z - j * G) * ue, (K * ee - j * Y) * ue, (K * ne - j * ie) * ue), f[J].add(y), f[U].add(y), f[q].add(y), d[J].add(b), d[U].add(b), d[q].add(b);
|
|
17808
17808
|
}
|
|
17809
17809
|
var S = n.groups;
|
|
17810
17810
|
S.length === 0 && (S = [{
|
|
@@ -17814,9 +17814,9 @@ var BufferGeometryUtils = {
|
|
|
17814
17814
|
for (var h = 0, R = S.length; h < R; ++h)
|
|
17815
17815
|
for (var M = S[h], w = M.start, F = M.count, H = w, C = w + F; H < C; H += 3)
|
|
17816
17816
|
T(r[H + 0], r[H + 1], r[H + 2]);
|
|
17817
|
-
var I = new THREE.Vector3(), B = new THREE.Vector3(), O = new THREE.Vector3(), _ = new THREE.Vector3(), N, V,
|
|
17817
|
+
var I = new THREE.Vector3(), B = new THREE.Vector3(), O = new THREE.Vector3(), _ = new THREE.Vector3(), N, V, X;
|
|
17818
17818
|
function D(J) {
|
|
17819
|
-
O.fromArray(s, J * 3), _.copy(O), V = f[J], I.copy(V), I.sub(O.multiplyScalar(O.dot(V))).normalize(), B.crossVectors(_, V),
|
|
17819
|
+
O.fromArray(s, J * 3), _.copy(O), V = f[J], I.copy(V), I.sub(O.multiplyScalar(O.dot(V))).normalize(), B.crossVectors(_, V), X = B.dot(d[J]), N = X < 0 ? -1 : 1, c[J * 4] = I.x, c[J * 4 + 1] = I.y, c[J * 4 + 2] = I.z, c[J * 4 + 3] = N;
|
|
17820
17820
|
}
|
|
17821
17821
|
for (var h = 0, R = S.length; h < R; ++h)
|
|
17822
17822
|
for (var M = S[h], w = M.start, F = M.count, H = w, C = w + F; H < C; H += 3)
|
|
@@ -17984,13 +17984,13 @@ function getEdgesBySphere(n, t, e) {
|
|
|
17984
17984
|
var p = (d = (f = c.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
|
|
17985
17985
|
if (p && p.visible) {
|
|
17986
17986
|
var g = [];
|
|
17987
|
-
if (p.traverseVisible(function(
|
|
17988
|
-
if (
|
|
17989
|
-
var q = bvhMeshMap.get(
|
|
17987
|
+
if (p.traverseVisible(function(U) {
|
|
17988
|
+
if (U instanceof THREE.Mesh) {
|
|
17989
|
+
var q = bvhMeshMap.get(U);
|
|
17990
17990
|
if (q) {
|
|
17991
|
-
scratchMatrix4.copy(
|
|
17992
|
-
var G = q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius),
|
|
17993
|
-
|
|
17991
|
+
scratchMatrix4.copy(U.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
|
|
17992
|
+
var G = q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), Z = new THREE.BufferGeometry();
|
|
17993
|
+
Z.setAttribute("position", new THREE.BufferAttribute(G, 3)), Z.applyMatrix4(U.matrixWorld), Z = BufferGeometryUtils.mergeVertices(Z, 0.01), g.push(Z);
|
|
17994
17994
|
}
|
|
17995
17995
|
}
|
|
17996
17996
|
}), g.length === 0)
|
|
@@ -18009,9 +18009,9 @@ function getEdgesBySphere(n, t, e) {
|
|
|
18009
18009
|
C[V] === void 0 ? C[V] = { index1: N[0], index2: N[1], face1: T } : C[V].face2 = T;
|
|
18010
18010
|
}
|
|
18011
18011
|
for (var V in C) {
|
|
18012
|
-
var
|
|
18013
|
-
if (
|
|
18014
|
-
var D = y[
|
|
18012
|
+
var X = C[V];
|
|
18013
|
+
if (X.face2 === void 0 || b[X.face1].normal.dot(b[X.face2].normal) <= r) {
|
|
18014
|
+
var D = y[X.index1], J = y[X.index2];
|
|
18015
18015
|
o.push(new THREE.Line3(D, J));
|
|
18016
18016
|
}
|
|
18017
18017
|
}
|
|
@@ -19731,14 +19731,14 @@ var Hammer = function(n, t, e, r) {
|
|
|
19731
19731
|
var L = P.ownerDocument || P;
|
|
19732
19732
|
return L.defaultView || L.parentWindow || n;
|
|
19733
19733
|
}
|
|
19734
|
-
var V = /mobile|tablet|ip(ad|hone|od)|android/i,
|
|
19735
|
-
function
|
|
19734
|
+
var V = /mobile|tablet|ip(ad|hone|od)|android/i, X = "ontouchstart" in n, D = B(n, "PointerEvent") !== r, J = X && V.test(navigator.userAgent), U = "touch", q = "pen", G = "mouse", Z = "kinect", Y = 25, ee = 1, ie = 2, ne = 4, K = 8, j = 1, te = 2, ae = 4, ue = 8, fe = 16, pe = te | ae, ge = ue | fe, Re = pe | ge, Ae = ["x", "y"], me = ["clientX", "clientY"];
|
|
19735
|
+
function oe(P, L) {
|
|
19736
19736
|
var k = this;
|
|
19737
19737
|
this.manager = P, this.callback = L, this.element = P.element, this.target = P.options.inputTarget, this.domHandler = function(z) {
|
|
19738
19738
|
b(P.options.enable, [P]) && k.handler(z);
|
|
19739
19739
|
}, this.init();
|
|
19740
19740
|
}
|
|
19741
|
-
|
|
19741
|
+
oe.prototype = {
|
|
19742
19742
|
/**
|
|
19743
19743
|
* should handle the inputEvent data and trigger the callback
|
|
19744
19744
|
* @virtual
|
|
@@ -19758,27 +19758,27 @@ var Hammer = function(n, t, e, r) {
|
|
|
19758
19758
|
this.evEl && R(this.element, this.evEl, this.domHandler), this.evTarget && R(this.target, this.evTarget, this.domHandler), this.evWin && R(N(this.element), this.evWin, this.domHandler);
|
|
19759
19759
|
}
|
|
19760
19760
|
};
|
|
19761
|
-
function
|
|
19761
|
+
function W(P) {
|
|
19762
19762
|
var L, k = P.options.inputClass;
|
|
19763
|
-
return k ? L = k : D ? L = ot : J ? L = Ie :
|
|
19763
|
+
return k ? L = k : D ? L = ot : J ? L = Ie : X ? L = tt : L = ye, new L(P, re);
|
|
19764
19764
|
}
|
|
19765
|
-
function
|
|
19766
|
-
var z = k.pointers.length, $ = k.changedPointers.length, se = L &
|
|
19767
|
-
k.isFirst = !!se, k.isFinal = !!Te, se && (P.session = {}), k.eventType = L,
|
|
19765
|
+
function re(P, L, k) {
|
|
19766
|
+
var z = k.pointers.length, $ = k.changedPointers.length, se = L & ee && z - $ === 0, Te = L & (ne | K) && z - $ === 0;
|
|
19767
|
+
k.isFirst = !!se, k.isFinal = !!Te, se && (P.session = {}), k.eventType = L, Q(P, k), P.emit("hammer.input", k), P.recognize(k), P.session.prevInput = k;
|
|
19768
19768
|
}
|
|
19769
|
-
function
|
|
19769
|
+
function Q(P, L) {
|
|
19770
19770
|
var k = P.session, z = L.pointers, $ = z.length;
|
|
19771
19771
|
k.firstInput || (k.firstInput = Ve(L)), $ > 1 && !k.firstMultiple ? k.firstMultiple = Ve(L) : $ === 1 && (k.firstMultiple = !1);
|
|
19772
19772
|
var se = k.firstInput, Te = k.firstMultiple, Ge = Te ? Te.center : se.center, dt = L.center = Ue(z);
|
|
19773
|
-
L.timeStamp = f(), L.deltaTime = L.timeStamp - se.timeStamp, L.angle = Ee(Ge, dt), L.distance = de(Ge, dt),
|
|
19773
|
+
L.timeStamp = f(), L.deltaTime = L.timeStamp - se.timeStamp, L.angle = Ee(Ge, dt), L.distance = de(Ge, dt), ce(k, L), L.offsetDirection = Be(L.deltaX, L.deltaY);
|
|
19774
19774
|
var Ne = $e(L.deltaTime, L.deltaX, L.deltaY);
|
|
19775
19775
|
L.overallVelocityX = Ne.x, L.overallVelocityY = Ne.y, L.overallVelocity = c(Ne.x) > c(Ne.y) ? Ne.x : Ne.y, L.scale = Te ? le(Te.pointers, z) : 1, L.rotation = Te ? Se(Te.pointers, z) : 0, L.maxPointers = k.prevInput ? L.pointers.length > k.prevInput.maxPointers ? L.pointers.length : k.prevInput.maxPointers : L.pointers.length, ve(k, L);
|
|
19776
19776
|
var Et = P.element;
|
|
19777
19777
|
M(L.srcEvent.target, Et) && (Et = L.srcEvent.target), L.target = Et;
|
|
19778
19778
|
}
|
|
19779
|
-
function
|
|
19779
|
+
function ce(P, L) {
|
|
19780
19780
|
var k = L.center, z = P.offsetDelta || {}, $ = P.prevDelta || {}, se = P.prevInput || {};
|
|
19781
|
-
(L.eventType ===
|
|
19781
|
+
(L.eventType === ee || se.eventType === ne) && ($ = P.prevDelta = {
|
|
19782
19782
|
x: se.deltaX || 0,
|
|
19783
19783
|
y: se.deltaY || 0
|
|
19784
19784
|
}, z = P.offsetDelta = {
|
|
@@ -19788,7 +19788,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
19788
19788
|
}
|
|
19789
19789
|
function ve(P, L) {
|
|
19790
19790
|
var k = P.lastInterval || L, z = L.timeStamp - k.timeStamp, $, se, Te, Ge;
|
|
19791
|
-
if (L.eventType !=
|
|
19791
|
+
if (L.eventType != K && (z > Y || k.velocity === r)) {
|
|
19792
19792
|
var dt = L.deltaX - k.deltaX, Ne = L.deltaY - k.deltaY, Et = $e(z, dt, Ne);
|
|
19793
19793
|
se = Et.x, Te = Et.y, $ = c(Et.x) > c(Et.y) ? Et.x : Et.y, Ge = Be(dt, Ne), P.lastInterval = L;
|
|
19794
19794
|
} else
|
|
@@ -19830,15 +19830,15 @@ var Hammer = function(n, t, e, r) {
|
|
|
19830
19830
|
};
|
|
19831
19831
|
}
|
|
19832
19832
|
function Be(P, L) {
|
|
19833
|
-
return P === L ?
|
|
19833
|
+
return P === L ? j : c(P) >= c(L) ? P < 0 ? te : ae : L < 0 ? ue : fe;
|
|
19834
19834
|
}
|
|
19835
19835
|
function de(P, L, k) {
|
|
19836
|
-
k || (k =
|
|
19836
|
+
k || (k = Ae);
|
|
19837
19837
|
var z = L[k[0]] - P[k[0]], $ = L[k[1]] - P[k[1]];
|
|
19838
19838
|
return Math.sqrt(z * z + $ * $);
|
|
19839
19839
|
}
|
|
19840
19840
|
function Ee(P, L, k) {
|
|
19841
|
-
k || (k =
|
|
19841
|
+
k || (k = Ae);
|
|
19842
19842
|
var z = L[k[0]] - P[k[0]], $ = L[k[1]] - P[k[1]];
|
|
19843
19843
|
return Math.atan2($, z) * 180 / Math.PI;
|
|
19844
19844
|
}
|
|
@@ -19849,21 +19849,21 @@ var Hammer = function(n, t, e, r) {
|
|
|
19849
19849
|
return de(L[0], L[1], me) / de(P[0], P[1], me);
|
|
19850
19850
|
}
|
|
19851
19851
|
var Ce = {
|
|
19852
|
-
mousedown:
|
|
19853
|
-
mousemove:
|
|
19854
|
-
mouseup:
|
|
19852
|
+
mousedown: ee,
|
|
19853
|
+
mousemove: ie,
|
|
19854
|
+
mouseup: ne
|
|
19855
19855
|
}, we = "mousedown", Ze = "mousemove mouseup";
|
|
19856
19856
|
function ye() {
|
|
19857
|
-
this.evEl = we, this.evWin = Ze, this.pressed = !1,
|
|
19857
|
+
this.evEl = we, this.evWin = Ze, this.pressed = !1, oe.apply(this, arguments);
|
|
19858
19858
|
}
|
|
19859
|
-
v(ye,
|
|
19859
|
+
v(ye, oe, {
|
|
19860
19860
|
/**
|
|
19861
19861
|
* handle mouse events
|
|
19862
19862
|
* @param {Object} ev
|
|
19863
19863
|
*/
|
|
19864
19864
|
handler: function(L) {
|
|
19865
19865
|
var k = Ce[L.type];
|
|
19866
|
-
k &
|
|
19866
|
+
k & ee && (L.button === 0 || L.button === 2) && (this.pressed = !0), k & ie && L.which !== 1 && (k = ne), this.pressed && (k & ne && (this.pressed = !1), this.callback(this.manager, k, {
|
|
19867
19867
|
pointers: [L],
|
|
19868
19868
|
changedPointers: [L],
|
|
19869
19869
|
pointerType: G,
|
|
@@ -19872,30 +19872,30 @@ var Hammer = function(n, t, e, r) {
|
|
|
19872
19872
|
}
|
|
19873
19873
|
});
|
|
19874
19874
|
var xe = {
|
|
19875
|
-
pointerdown:
|
|
19876
|
-
pointermove:
|
|
19877
|
-
pointerup:
|
|
19878
|
-
pointercancel:
|
|
19879
|
-
pointerout:
|
|
19875
|
+
pointerdown: ee,
|
|
19876
|
+
pointermove: ie,
|
|
19877
|
+
pointerup: ne,
|
|
19878
|
+
pointercancel: K,
|
|
19879
|
+
pointerout: K
|
|
19880
19880
|
}, he = {
|
|
19881
|
-
2:
|
|
19881
|
+
2: U,
|
|
19882
19882
|
3: q,
|
|
19883
19883
|
4: G,
|
|
19884
|
-
5:
|
|
19884
|
+
5: Z
|
|
19885
19885
|
// see https://twitter.com/jacobrossi/status/480596438489890816
|
|
19886
19886
|
}, _e = "pointerdown", Le = "pointermove pointerup pointercancel";
|
|
19887
19887
|
n.MSPointerEvent && !n.PointerEvent && (_e = "MSPointerDown", Le = "MSPointerMove MSPointerUp MSPointerCancel");
|
|
19888
19888
|
function ot() {
|
|
19889
|
-
this.evEl = _e, this.evWin = Le,
|
|
19889
|
+
this.evEl = _e, this.evWin = Le, oe.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
|
|
19890
19890
|
}
|
|
19891
|
-
v(ot,
|
|
19891
|
+
v(ot, oe, {
|
|
19892
19892
|
/**
|
|
19893
19893
|
* handle mouse events
|
|
19894
19894
|
* @param {Object} ev
|
|
19895
19895
|
*/
|
|
19896
19896
|
handler: function(L) {
|
|
19897
|
-
var k = this.store, z = !1, $ = !1, se = L.type.toLowerCase().replace("ms", ""), Te = xe[se], Ge = he[L.pointerType] || L.pointerType, dt = Ge ==
|
|
19898
|
-
Te &
|
|
19897
|
+
var k = this.store, z = !1, $ = !1, se = L.type.toLowerCase().replace("ms", ""), Te = xe[se], Ge = he[L.pointerType] || L.pointerType, dt = Ge == U, Ne = H(k, L.pointerId, "pointerId");
|
|
19898
|
+
Te & ee && (L.button === 0 || L.button === 2 || dt) ? Ne < 0 && (k.push(L), Ne = k.length - 1) : Te & (ne | K) ? z = !0 : !dt && L.buttons === 0 && (z = !0, $ = !0, Te = xe.pointerup), !(Ne < 0) && ($ || (k[Ne] = L), this.callback(this.manager, Te, {
|
|
19899
19899
|
pointers: k,
|
|
19900
19900
|
changedPointers: [L],
|
|
19901
19901
|
pointerType: Ge,
|
|
@@ -19904,23 +19904,23 @@ var Hammer = function(n, t, e, r) {
|
|
|
19904
19904
|
}
|
|
19905
19905
|
});
|
|
19906
19906
|
var ze = {
|
|
19907
|
-
touchstart:
|
|
19908
|
-
touchmove:
|
|
19909
|
-
touchend:
|
|
19910
|
-
touchcancel:
|
|
19907
|
+
touchstart: ee,
|
|
19908
|
+
touchmove: ie,
|
|
19909
|
+
touchend: ne,
|
|
19910
|
+
touchcancel: K
|
|
19911
19911
|
}, Ke = "touchstart", Xe = "touchstart touchmove touchend touchcancel";
|
|
19912
19912
|
function je() {
|
|
19913
|
-
this.evTarget = Ke, this.evWin = Xe, this.started = !1,
|
|
19913
|
+
this.evTarget = Ke, this.evWin = Xe, this.started = !1, oe.apply(this, arguments);
|
|
19914
19914
|
}
|
|
19915
|
-
v(je,
|
|
19915
|
+
v(je, oe, {
|
|
19916
19916
|
handler: function(L) {
|
|
19917
19917
|
var k = ze[L.type];
|
|
19918
|
-
if (k ===
|
|
19918
|
+
if (k === ee && (this.started = !0), !!this.started) {
|
|
19919
19919
|
var z = Pe.call(this, L, k);
|
|
19920
|
-
k & (
|
|
19920
|
+
k & (ne | K) && z[0].length - z[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
|
|
19921
19921
|
pointers: z[0],
|
|
19922
19922
|
changedPointers: z[1],
|
|
19923
|
-
pointerType:
|
|
19923
|
+
pointerType: U,
|
|
19924
19924
|
srcEvent: L
|
|
19925
19925
|
});
|
|
19926
19926
|
}
|
|
@@ -19928,40 +19928,40 @@ var Hammer = function(n, t, e, r) {
|
|
|
19928
19928
|
});
|
|
19929
19929
|
function Pe(P, L) {
|
|
19930
19930
|
var k = C(P.touches), z = C(P.changedTouches);
|
|
19931
|
-
return L & (
|
|
19931
|
+
return L & (ne | K) && (k = I(k.concat(z), "identifier")), [k, z];
|
|
19932
19932
|
}
|
|
19933
19933
|
var De = {
|
|
19934
|
-
touchstart:
|
|
19935
|
-
touchmove:
|
|
19936
|
-
touchend:
|
|
19937
|
-
touchcancel:
|
|
19934
|
+
touchstart: ee,
|
|
19935
|
+
touchmove: ie,
|
|
19936
|
+
touchend: ne,
|
|
19937
|
+
touchcancel: K
|
|
19938
19938
|
}, Me = "touchstart touchmove touchend touchcancel";
|
|
19939
19939
|
function Ie() {
|
|
19940
|
-
this.evTarget = Me, this.targetIds = {},
|
|
19940
|
+
this.evTarget = Me, this.targetIds = {}, oe.apply(this, arguments);
|
|
19941
19941
|
}
|
|
19942
|
-
v(Ie,
|
|
19942
|
+
v(Ie, oe, {
|
|
19943
19943
|
handler: function(L) {
|
|
19944
19944
|
var k = De[L.type], z = Ye.call(this, L, k);
|
|
19945
19945
|
z && this.callback(this.manager, k, {
|
|
19946
19946
|
pointers: z[0],
|
|
19947
19947
|
changedPointers: z[1],
|
|
19948
|
-
pointerType:
|
|
19948
|
+
pointerType: U,
|
|
19949
19949
|
srcEvent: L
|
|
19950
19950
|
});
|
|
19951
19951
|
}
|
|
19952
19952
|
});
|
|
19953
19953
|
function Ye(P, L) {
|
|
19954
19954
|
var k = C(P.touches), z = this.targetIds;
|
|
19955
|
-
if (L & (
|
|
19955
|
+
if (L & (ee | ie) && k.length === 1)
|
|
19956
19956
|
return z[k[0].identifier] = !0, [k, k];
|
|
19957
19957
|
var $, se, Te = C(P.changedTouches), Ge = [], dt = this.target;
|
|
19958
19958
|
if (se = k.filter(function(Ne) {
|
|
19959
19959
|
return M(Ne.target, dt);
|
|
19960
|
-
}), L ===
|
|
19960
|
+
}), L === ee)
|
|
19961
19961
|
for ($ = 0; $ < se.length; )
|
|
19962
19962
|
z[se[$].identifier] = !0, $++;
|
|
19963
19963
|
for ($ = 0; $ < Te.length; )
|
|
19964
|
-
z[Te[$].identifier] && Ge.push(Te[$]), L & (
|
|
19964
|
+
z[Te[$].identifier] && Ge.push(Te[$]), L & (ne | K) && delete z[Te[$].identifier], $++;
|
|
19965
19965
|
if (Ge.length)
|
|
19966
19966
|
return [
|
|
19967
19967
|
// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
|
|
@@ -19971,11 +19971,11 @@ var Hammer = function(n, t, e, r) {
|
|
|
19971
19971
|
}
|
|
19972
19972
|
var He = 2500, Fe = 25;
|
|
19973
19973
|
function tt() {
|
|
19974
|
-
|
|
19974
|
+
oe.apply(this, arguments);
|
|
19975
19975
|
var P = y(this.handler, this);
|
|
19976
19976
|
this.touch = new Ie(this.manager, P), this.mouse = new ye(this.manager, P), this.primaryTouch = null, this.lastTouches = [];
|
|
19977
19977
|
}
|
|
19978
|
-
v(tt,
|
|
19978
|
+
v(tt, oe, {
|
|
19979
19979
|
/**
|
|
19980
19980
|
* handle mouse and touch events
|
|
19981
19981
|
* @param {Hammer} manager
|
|
@@ -19983,7 +19983,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
19983
19983
|
* @param {Object} inputData
|
|
19984
19984
|
*/
|
|
19985
19985
|
handler: function(L, k, z) {
|
|
19986
|
-
var $ = z.pointerType ==
|
|
19986
|
+
var $ = z.pointerType == U, se = z.pointerType == G;
|
|
19987
19987
|
if (!(se && z.sourceCapabilities && z.sourceCapabilities.firesTouchEvents)) {
|
|
19988
19988
|
if ($)
|
|
19989
19989
|
st.call(this, k, z);
|
|
@@ -20000,7 +20000,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20000
20000
|
}
|
|
20001
20001
|
});
|
|
20002
20002
|
function st(P, L) {
|
|
20003
|
-
P &
|
|
20003
|
+
P & ee ? (this.primaryTouch = L.changedPointers[0].identifier, ut.call(this, L)) : P & (ne | K) && ut.call(this, L);
|
|
20004
20004
|
}
|
|
20005
20005
|
function ut(P) {
|
|
20006
20006
|
var L = P.changedPointers[0];
|
|
@@ -20066,7 +20066,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20066
20066
|
if (Ge && dt && Ne)
|
|
20067
20067
|
return;
|
|
20068
20068
|
}
|
|
20069
|
-
if (!(Te && se) && ($ || se && k & pe || Te && k &
|
|
20069
|
+
if (!(Te && se) && ($ || se && k & pe || Te && k & ge))
|
|
20070
20070
|
return this.preventSrc(L);
|
|
20071
20071
|
},
|
|
20072
20072
|
/**
|
|
@@ -20242,7 +20242,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20242
20242
|
return P & ft ? "cancel" : P & At ? "end" : P & xt ? "move" : P & Je ? "start" : "";
|
|
20243
20243
|
}
|
|
20244
20244
|
function We(P) {
|
|
20245
|
-
return P ==
|
|
20245
|
+
return P == fe ? "down" : P == ue ? "up" : P == te ? "left" : P == ae ? "right" : "";
|
|
20246
20246
|
}
|
|
20247
20247
|
function nt(P, L) {
|
|
20248
20248
|
var k = L.manager;
|
|
@@ -20281,7 +20281,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20281
20281
|
*/
|
|
20282
20282
|
process: function(P) {
|
|
20283
20283
|
var L = this.state, k = P.eventType, z = L & (Je | xt), $ = this.attrTest(P);
|
|
20284
|
-
return z && (k &
|
|
20284
|
+
return z && (k & K || !$) ? L | ft : z || $ ? k & ne ? L | At : L & Je ? L | xt : Je : rt;
|
|
20285
20285
|
}
|
|
20286
20286
|
});
|
|
20287
20287
|
function Mt() {
|
|
@@ -20300,11 +20300,11 @@ var Hammer = function(n, t, e, r) {
|
|
|
20300
20300
|
},
|
|
20301
20301
|
getTouchAction: function() {
|
|
20302
20302
|
var P = this.options.direction, L = [];
|
|
20303
|
-
return P & pe && L.push(be), P &
|
|
20303
|
+
return P & pe && L.push(be), P & ge && L.push(ke), L;
|
|
20304
20304
|
},
|
|
20305
20305
|
directionTest: function(P) {
|
|
20306
20306
|
var L = this.options, k = !0, z = P.distance, $ = P.direction, se = P.deltaX, Te = P.deltaY;
|
|
20307
|
-
return $ & L.direction || (L.direction & pe ? ($ = se === 0 ?
|
|
20307
|
+
return $ & L.direction || (L.direction & pe ? ($ = se === 0 ? j : se < 0 ? te : ae, k = se != this.pX, z = Math.abs(P.deltaX)) : ($ = Te === 0 ? j : Te < 0 ? ue : fe, k = Te != this.pY, z = Math.abs(P.deltaY))), P.direction = $, k && z > L.threshold && $ & L.direction;
|
|
20308
20308
|
},
|
|
20309
20309
|
attrTest: function(P) {
|
|
20310
20310
|
return at.prototype.attrTest.call(this, P) && (this.state & Je || !(this.state & Je) && this.directionTest(P));
|
|
@@ -20363,13 +20363,13 @@ var Hammer = function(n, t, e, r) {
|
|
|
20363
20363
|
},
|
|
20364
20364
|
process: function(P) {
|
|
20365
20365
|
var L = this.options, k = P.pointers.length === L.pointers, z = P.distance < L.threshold, $ = P.deltaTime > L.time;
|
|
20366
|
-
if (this._input = P, !z || !k || P.eventType & (
|
|
20366
|
+
if (this._input = P, !z || !k || P.eventType & (ne | K) && !$)
|
|
20367
20367
|
this.reset();
|
|
20368
|
-
else if (P.eventType &
|
|
20368
|
+
else if (P.eventType & ee)
|
|
20369
20369
|
this.reset(), this._timer = d(function() {
|
|
20370
20370
|
this.state = ct, this.tryEmit();
|
|
20371
20371
|
}, L.time, this);
|
|
20372
|
-
else if (P.eventType &
|
|
20372
|
+
else if (P.eventType & ne)
|
|
20373
20373
|
return ct;
|
|
20374
20374
|
return rt;
|
|
20375
20375
|
},
|
|
@@ -20377,7 +20377,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20377
20377
|
clearTimeout(this._timer);
|
|
20378
20378
|
},
|
|
20379
20379
|
emit: function(P) {
|
|
20380
|
-
this.state === ct && (P && P.eventType &
|
|
20380
|
+
this.state === ct && (P && P.eventType & ne ? this.manager.emit(this.options.event + "up", P) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
|
|
20381
20381
|
}
|
|
20382
20382
|
});
|
|
20383
20383
|
function Ct() {
|
|
@@ -20412,7 +20412,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20412
20412
|
event: "swipe",
|
|
20413
20413
|
threshold: 10,
|
|
20414
20414
|
velocity: 0.3,
|
|
20415
|
-
direction: pe |
|
|
20415
|
+
direction: pe | ge,
|
|
20416
20416
|
pointers: 1
|
|
20417
20417
|
},
|
|
20418
20418
|
getTouchAction: function() {
|
|
@@ -20420,7 +20420,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20420
20420
|
},
|
|
20421
20421
|
attrTest: function(P) {
|
|
20422
20422
|
var L = this.options.direction, k;
|
|
20423
|
-
return L & (pe |
|
|
20423
|
+
return L & (pe | ge) ? k = P.overallVelocity : L & pe ? k = P.overallVelocityX : L & ge && (k = P.overallVelocityY), this._super.attrTest.call(this, P) && L & P.offsetDirection && P.distance > this.options.threshold && P.maxPointers == this.options.pointers && c(k) > this.options.velocity && P.eventType & ne;
|
|
20424
20424
|
},
|
|
20425
20425
|
emit: function(P) {
|
|
20426
20426
|
var L = We(P.offsetDirection);
|
|
@@ -20453,10 +20453,10 @@ var Hammer = function(n, t, e, r) {
|
|
|
20453
20453
|
},
|
|
20454
20454
|
process: function(P) {
|
|
20455
20455
|
var L = this.options, k = P.pointers.length === L.pointers, z = P.distance < L.threshold, $ = P.deltaTime < L.time;
|
|
20456
|
-
if (this.reset(), P.eventType &
|
|
20456
|
+
if (this.reset(), P.eventType & ee && this.count === 0)
|
|
20457
20457
|
return this.failTimeout();
|
|
20458
20458
|
if (z && $ && k) {
|
|
20459
|
-
if (P.eventType !=
|
|
20459
|
+
if (P.eventType != ne)
|
|
20460
20460
|
return this.failTimeout();
|
|
20461
20461
|
var se = this.pTime ? P.timeStamp - this.pTime < L.interval : !0, Te = !this.pCenter || de(this.pCenter, P.center) < L.posThreshold;
|
|
20462
20462
|
this.pTime = P.timeStamp, this.pCenter = P.center, !Te || !se ? this.count = 1 : this.count += 1, this._input = P;
|
|
@@ -20581,7 +20581,7 @@ var Hammer = function(n, t, e, r) {
|
|
|
20581
20581
|
};
|
|
20582
20582
|
var Ht = 1, Ft = 2;
|
|
20583
20583
|
function Pt(P, L) {
|
|
20584
|
-
this.options = A({}, St.defaults, L || {}), this.options.inputTarget = this.options.inputTarget || P, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = P, this.input =
|
|
20584
|
+
this.options = A({}, St.defaults, L || {}), this.options.inputTarget = this.options.inputTarget || P, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = P, this.input = W(this), this.touchAction = new Rt(this, this.options.touchAction), Bt(this, !0), p(this.options.recognizers, function(k) {
|
|
20585
20585
|
var z = this.add(new k[0](k[1]));
|
|
20586
20586
|
k[2] && z.recognizeWith(k[2]), k[3] && z.requireFailure(k[3]);
|
|
20587
20587
|
}, this);
|
|
@@ -20727,10 +20727,10 @@ var Hammer = function(n, t, e, r) {
|
|
|
20727
20727
|
k.initEvent(P, !0, !0), k.gesture = L, L.target.dispatchEvent(k);
|
|
20728
20728
|
}
|
|
20729
20729
|
return A(St, {
|
|
20730
|
-
INPUT_START:
|
|
20731
|
-
INPUT_MOVE:
|
|
20732
|
-
INPUT_END:
|
|
20733
|
-
INPUT_CANCEL:
|
|
20730
|
+
INPUT_START: ee,
|
|
20731
|
+
INPUT_MOVE: ie,
|
|
20732
|
+
INPUT_END: ne,
|
|
20733
|
+
INPUT_CANCEL: K,
|
|
20734
20734
|
STATE_POSSIBLE: Tt,
|
|
20735
20735
|
STATE_BEGAN: Je,
|
|
20736
20736
|
STATE_CHANGED: xt,
|
|
@@ -20738,16 +20738,16 @@ var Hammer = function(n, t, e, r) {
|
|
|
20738
20738
|
STATE_RECOGNIZED: ct,
|
|
20739
20739
|
STATE_CANCELLED: ft,
|
|
20740
20740
|
STATE_FAILED: rt,
|
|
20741
|
-
DIRECTION_NONE:
|
|
20742
|
-
DIRECTION_LEFT:
|
|
20741
|
+
DIRECTION_NONE: j,
|
|
20742
|
+
DIRECTION_LEFT: te,
|
|
20743
20743
|
DIRECTION_RIGHT: ae,
|
|
20744
|
-
DIRECTION_UP:
|
|
20745
|
-
DIRECTION_DOWN:
|
|
20744
|
+
DIRECTION_UP: ue,
|
|
20745
|
+
DIRECTION_DOWN: fe,
|
|
20746
20746
|
DIRECTION_HORIZONTAL: pe,
|
|
20747
|
-
DIRECTION_VERTICAL:
|
|
20747
|
+
DIRECTION_VERTICAL: ge,
|
|
20748
20748
|
DIRECTION_ALL: Re,
|
|
20749
20749
|
Manager: Pt,
|
|
20750
|
-
Input:
|
|
20750
|
+
Input: oe,
|
|
20751
20751
|
TouchAction: Rt,
|
|
20752
20752
|
TouchInput: Ie,
|
|
20753
20753
|
MouseInput: ye,
|
|
@@ -21112,14 +21112,14 @@ var BaseController = (
|
|
|
21112
21112
|
y: B.clientY
|
|
21113
21113
|
}, _ = r.relativeClientPosition(O), N = new THREE.Raycaster();
|
|
21114
21114
|
N.params.Points = { threshold: 0.1 }, N.setFromCamera(_, r.camera);
|
|
21115
|
-
var V = __assign(__assign({}, O), { coords: _, raycaster: N, buttons: B.buttons, delta: 0 }),
|
|
21115
|
+
var V = __assign(__assign({}, O), { coords: _, raycaster: N, buttons: B.buttons, delta: 0 }), X = C === "pinchend" ? I : I - B.deltaY / 280, D = createEvent("gesture.pinch", {
|
|
21116
21116
|
target: B.target,
|
|
21117
21117
|
pointerType: "mouse",
|
|
21118
21118
|
srcEvent: B,
|
|
21119
21119
|
pointers: [__assign({}, V)],
|
|
21120
21120
|
isFirst: C === "pinchstart",
|
|
21121
21121
|
isFinal: C === "pinchend",
|
|
21122
|
-
scale: clamp$1(
|
|
21122
|
+
scale: clamp$1(X, 0.1, 10),
|
|
21123
21123
|
center: __assign({}, V),
|
|
21124
21124
|
velocityX: 0,
|
|
21125
21125
|
velocityY: 0,
|
|
@@ -21140,24 +21140,24 @@ var BaseController = (
|
|
|
21140
21140
|
} : d.prevEvent = _, r.onPinchGesture(_), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
|
|
21141
21141
|
var q;
|
|
21142
21142
|
h = null;
|
|
21143
|
-
var G = (q = d == null ? void 0 : d.prevEvent.scale) !== null && q !== void 0 ? q : 1,
|
|
21144
|
-
d = null, r.onPinchGesture(
|
|
21143
|
+
var G = (q = d == null ? void 0 : d.prevEvent.scale) !== null && q !== void 0 ? q : 1, Z = p("pinchend", G, C);
|
|
21144
|
+
d = null, r.onPinchGesture(Z);
|
|
21145
21145
|
}, 200);
|
|
21146
21146
|
} else {
|
|
21147
|
-
var N = (Math.abs(C.deltaY) > Math.abs(C.deltaX) ? C.deltaY : C.deltaX) / -60, V = r.mouseWheelState !== void 0,
|
|
21147
|
+
var N = (Math.abs(C.deltaY) > Math.abs(C.deltaX) ? C.deltaY : C.deltaX) / -60, V = r.mouseWheelState !== void 0, X = {
|
|
21148
21148
|
x: C.clientX,
|
|
21149
21149
|
y: C.clientY
|
|
21150
|
-
}, D = r.relativeClientPosition(
|
|
21150
|
+
}, D = r.relativeClientPosition(X), J = new THREE.Raycaster();
|
|
21151
21151
|
J.params.Points = { threshold: 0.1 }, J.setFromCamera(D, r.camera);
|
|
21152
|
-
var
|
|
21152
|
+
var U = __assign(__assign({}, X), { coords: D, raycaster: J, buttons: C.buttons, delta: N }), _ = createEvent("gesture.mousewheel", {
|
|
21153
21153
|
target: C.target,
|
|
21154
21154
|
pointerType: "mouse",
|
|
21155
21155
|
srcEvent: C,
|
|
21156
|
-
pointers: [__assign({},
|
|
21156
|
+
pointers: [__assign({}, U)],
|
|
21157
21157
|
isFirst: V,
|
|
21158
21158
|
isFinal: !1,
|
|
21159
21159
|
scale: 0,
|
|
21160
|
-
center: __assign({},
|
|
21160
|
+
center: __assign({}, U),
|
|
21161
21161
|
velocityX: 0,
|
|
21162
21162
|
velocityY: 0,
|
|
21163
21163
|
overallVelocityX: 0,
|
|
@@ -21172,11 +21172,11 @@ var BaseController = (
|
|
|
21172
21172
|
target: C.target,
|
|
21173
21173
|
pointerType: "mouse",
|
|
21174
21174
|
srcEvent: C,
|
|
21175
|
-
pointers: [__assign(__assign({},
|
|
21175
|
+
pointers: [__assign(__assign({}, U), { delta: 0 })],
|
|
21176
21176
|
isFirst: !1,
|
|
21177
21177
|
isFinal: !0,
|
|
21178
21178
|
scale: 0,
|
|
21179
|
-
center: __assign(__assign({},
|
|
21179
|
+
center: __assign(__assign({}, U), { delta: 0 }),
|
|
21180
21180
|
velocityX: 0,
|
|
21181
21181
|
velocityY: 0,
|
|
21182
21182
|
overallVelocityX: 0,
|
|
@@ -21319,15 +21319,15 @@ var BaseController = (
|
|
|
21319
21319
|
y: C.clientY
|
|
21320
21320
|
}, N = r.relativeClientPosition(_), V = new THREE.Raycaster();
|
|
21321
21321
|
V.params.Points = { threshold: 0.1 }, V.setFromCamera(N, r.camera);
|
|
21322
|
-
var
|
|
21322
|
+
var X = __assign(__assign({}, _), { coords: N, raycaster: V, buttons: 0, delta: 0 }), D = createEvent("gesture.pinch", {
|
|
21323
21323
|
target: C.target,
|
|
21324
21324
|
pointerType: "mouse",
|
|
21325
21325
|
srcEvent: C,
|
|
21326
|
-
pointers: [__assign({},
|
|
21326
|
+
pointers: [__assign({}, X)],
|
|
21327
21327
|
isFirst: B,
|
|
21328
21328
|
isFinal: O,
|
|
21329
21329
|
scale: (I = C.scale) !== null && I !== void 0 ? I : 1,
|
|
21330
|
-
center: __assign({},
|
|
21330
|
+
center: __assign({}, X),
|
|
21331
21331
|
velocityX: 0,
|
|
21332
21332
|
velocityY: 0,
|
|
21333
21333
|
overallVelocityX: 0,
|
|
@@ -22489,8 +22489,8 @@ void main() {
|
|
|
22489
22489
|
depthBuffer: !0,
|
|
22490
22490
|
stencilBuffer: !1,
|
|
22491
22491
|
generateMipmaps: !1,
|
|
22492
|
-
magFilter: THREE.
|
|
22493
|
-
minFilter: THREE.
|
|
22492
|
+
magFilter: THREE.LinearFilter,
|
|
22493
|
+
minFilter: THREE.LinearFilter,
|
|
22494
22494
|
wrapS: THREE.ClampToEdgeWrapping,
|
|
22495
22495
|
wrapT: THREE.ClampToEdgeWrapping
|
|
22496
22496
|
});
|
|
@@ -22519,91 +22519,91 @@ void main() {
|
|
|
22519
22519
|
if (this.boundingMesh.update(o, d), this.observer === null)
|
|
22520
22520
|
return (this.renderTarget.width !== 1 || this.renderTarget.height !== 1) && (this.renderTarget.setSize(1, 1), r = !0), !1;
|
|
22521
22521
|
this.level = clamp$1(A, 0, this.tileTree.maxLevel);
|
|
22522
|
-
var m = s.width * u, E = s.height * u;
|
|
22523
|
-
(this.renderTarget.width !== m || this.renderTarget.height !== E) && this.renderTarget.setSize(m, E), this.scene.matrix.equals(h) || (this.scene.matrix.copy(h), this.scene.matrixWorld.copy(this.scene.matrix), this.scene.matrix.decompose(this.scene.position, this.scene.quaternion, this.scene.scale), this.scene.matrixAutoUpdate = !1, r = !0);
|
|
22524
|
-
var
|
|
22525
|
-
this.camera.matrix.equals(
|
|
22526
|
-
var
|
|
22527
|
-
|
|
22528
|
-
var
|
|
22529
|
-
A >= g && traverseTileCubeNode(this.tileTree, function(
|
|
22530
|
-
if (!(
|
|
22531
|
-
if (
|
|
22522
|
+
var m = Math.floor(s.width * u), E = Math.floor(s.height * u), v = Math.max(m, E), y = l.capabilities.maxTextureSize;
|
|
22523
|
+
v > y && (m = Math.floor(m / v * y), E = Math.floor(E / v * y)), (this.renderTarget.width !== m || this.renderTarget.height !== E) && this.renderTarget.setSize(m, E), this.scene.matrix.equals(h) || (this.scene.matrix.copy(h), this.scene.matrixWorld.copy(this.scene.matrix), this.scene.matrix.decompose(this.scene.position, this.scene.quaternion, this.scene.scale), this.scene.matrixAutoUpdate = !1, r = !0);
|
|
22524
|
+
var b = scratchCameraQuaternion.setFromRotationMatrix(c), T = scratchCameraMatrix.compose(this.scene.position, b, this.scene.scale);
|
|
22525
|
+
this.camera.matrix.equals(T) || (this.camera.matrix.copy(T), this.camera.matrixWorld.copy(this.camera.matrix), this.camera.position.copy(this.scene.position), this.camera.quaternion.copy(b), this.camera.scale.copy(this.scene.scale), r = !0);
|
|
22526
|
+
var S = scratchCameraProjectMatrix.copy(f);
|
|
22527
|
+
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);
|
|
22528
|
+
var R = this.frustum.planes[5].normal, M = [];
|
|
22529
|
+
A >= g && traverseTileCubeNode(this.tileTree, function(K) {
|
|
22530
|
+
if (!(K.level < g)) {
|
|
22531
|
+
if (K.level > A || !e.frustum.intersectsBox(K.box))
|
|
22532
22532
|
return !1;
|
|
22533
|
-
|
|
22533
|
+
M.push(K);
|
|
22534
22534
|
}
|
|
22535
22535
|
});
|
|
22536
|
-
var
|
|
22537
|
-
|
|
22538
|
-
if (
|
|
22539
|
-
return
|
|
22540
|
-
var
|
|
22541
|
-
|
|
22542
|
-
var
|
|
22543
|
-
return
|
|
22536
|
+
var w = /* @__PURE__ */ new WeakMap();
|
|
22537
|
+
M.sort(function(K, j) {
|
|
22538
|
+
if (K.level !== j.level)
|
|
22539
|
+
return K.level - j.level;
|
|
22540
|
+
var te = w.get(K);
|
|
22541
|
+
te === void 0 && (te = K.box.getCenter(scratchSortVector3).angleTo(R), w.set(K, te));
|
|
22542
|
+
var ae = w.get(j);
|
|
22543
|
+
return ae === void 0 && (ae = j.box.getCenter(scratchSortVector3).angleTo(R), w.set(j, ae)), te - ae;
|
|
22544
22544
|
});
|
|
22545
|
-
var
|
|
22546
|
-
if (
|
|
22547
|
-
for (var
|
|
22548
|
-
var
|
|
22549
|
-
return
|
|
22545
|
+
var F = /* @__PURE__ */ new WeakSet(), H = this.observer.images.tiles;
|
|
22546
|
+
if (H)
|
|
22547
|
+
for (var C = function(K) {
|
|
22548
|
+
var j = H.find(function(W) {
|
|
22549
|
+
return W.level === K.level;
|
|
22550
22550
|
});
|
|
22551
|
-
if (!
|
|
22551
|
+
if (!j)
|
|
22552
22552
|
return "continue";
|
|
22553
|
-
|
|
22554
|
-
var
|
|
22555
|
-
if (
|
|
22556
|
-
|
|
22557
|
-
var
|
|
22558
|
-
return
|
|
22553
|
+
F.add(K);
|
|
22554
|
+
var te = I.tileMeshes.get(K);
|
|
22555
|
+
if (te) {
|
|
22556
|
+
te.appearDuration = I.appearDuration;
|
|
22557
|
+
var ae = te.updateTime(o);
|
|
22558
|
+
return ae && (r = !0), "continue";
|
|
22559
22559
|
}
|
|
22560
|
-
if (
|
|
22560
|
+
if (I.pedding >= I.maxRequest)
|
|
22561
22561
|
return "continue";
|
|
22562
|
-
var
|
|
22563
|
-
|
|
22564
|
-
|
|
22565
|
-
|
|
22566
|
-
|
|
22562
|
+
var ue = Math.pow(2, K.level) * K.position.y, fe = Math.pow(2, K.level) * K.position.x, pe = "".concat(I.observer.panoId, ".").concat(K.face, ".").concat(K.level, ".").concat(ue, ".").concat(fe), ge = j[K.face], Re = j.size, Ae = I.imageOptions.transform, me = __assign(__assign({}, pick(I.imageOptions, ["format", "sharpen", "mappings"])), { key: "pano_tile.".concat(pe), size: j.scale >= 1 ? void 0 : Re * K.size * j.scale, cut: K.size === 1 ? void 0 : [
|
|
22563
|
+
Re * K.position.x,
|
|
22564
|
+
Re * K.position.y,
|
|
22565
|
+
Re * K.size,
|
|
22566
|
+
Re * K.size
|
|
22567
22567
|
] });
|
|
22568
|
-
|
|
22569
|
-
var
|
|
22568
|
+
K.level === 1 && j.scale >= 0.5 && (me.format === "jpg" || /\.jpg$/.test(ge)) && (me.size = void 0, me.quality || (me.quality = 70)), K.size === 1 && console.warn("tile: ".concat(me.key, " should not appear.")), I.pedding++;
|
|
22569
|
+
var oe = I.textureLoader.loadTexture(ge, {
|
|
22570
22570
|
imageURL: {
|
|
22571
22571
|
transform: Ae,
|
|
22572
|
-
options:
|
|
22572
|
+
options: me
|
|
22573
22573
|
},
|
|
22574
22574
|
minFilter: THREE.LinearFilter,
|
|
22575
22575
|
magFilter: THREE.LinearFilter,
|
|
22576
22576
|
generateMipmaps: !1,
|
|
22577
|
-
fetcher: getFetcher(
|
|
22578
|
-
}).then(function(
|
|
22579
|
-
return
|
|
22577
|
+
fetcher: getFetcher(I.observer.work)
|
|
22578
|
+
}).then(function(W) {
|
|
22579
|
+
return W.body;
|
|
22580
22580
|
});
|
|
22581
|
-
|
|
22582
|
-
return e.pedding--,
|
|
22583
|
-
}, function(
|
|
22584
|
-
return e.pedding--, Promise.reject(
|
|
22585
|
-
}),
|
|
22586
|
-
},
|
|
22587
|
-
var
|
|
22588
|
-
|
|
22589
|
-
}
|
|
22590
|
-
var
|
|
22591
|
-
this.tileMeshes.forEach(function(
|
|
22592
|
-
|
|
22593
|
-
var
|
|
22594
|
-
|
|
22581
|
+
oe.then(function(W) {
|
|
22582
|
+
return e.pedding--, W;
|
|
22583
|
+
}, function(W) {
|
|
22584
|
+
return e.pedding--, Promise.reject(W);
|
|
22585
|
+
}), te = new TileMesh(K, oe), te.name = "tiling:tile-".concat(pe), te.visible = !1, te.appearDuration = I.appearDuration, I.tileMeshes.set(K, te), I.scene.add(te), te.updateTime(o), r = !0;
|
|
22586
|
+
}, I = this, B = 0, O = M; B < O.length; B++) {
|
|
22587
|
+
var _ = O[B];
|
|
22588
|
+
C(_);
|
|
22589
|
+
}
|
|
22590
|
+
var N = [], V = [];
|
|
22591
|
+
this.tileMeshes.forEach(function(K, j) {
|
|
22592
|
+
F.has(j) ? N.push(K) : V.push(K);
|
|
22593
|
+
var te = j.level >= g && j.level <= A;
|
|
22594
|
+
K.visible !== te && (K.visible = te, r = !0);
|
|
22595
22595
|
});
|
|
22596
|
-
for (var
|
|
22597
|
-
return
|
|
22598
|
-
}).slice(Math.max(0, this.maxCacheTile -
|
|
22599
|
-
var
|
|
22600
|
-
this.tileMeshes.delete(
|
|
22596
|
+
for (var X = V.sort(function(K, j) {
|
|
22597
|
+
return j.activeTime - K.activeTime;
|
|
22598
|
+
}).slice(Math.max(0, this.maxCacheTile - N.length)), D = 0, J = X; D < J.length; D++) {
|
|
22599
|
+
var U = J[D];
|
|
22600
|
+
this.tileMeshes.delete(U.node), this.scene.remove(U), U.dispose(), r = !0;
|
|
22601
22601
|
}
|
|
22602
22602
|
if (r) {
|
|
22603
|
-
var
|
|
22603
|
+
var q = l.getRenderTarget();
|
|
22604
22604
|
scratchPrevClearColor$1.copy(l.getClearColor());
|
|
22605
|
-
var
|
|
22606
|
-
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(
|
|
22605
|
+
var G = l.getClearAlpha(), Z = l.autoClear, Y = l.autoClearColor, ee = l.autoClearDepth, ie = l.autoClearStencil, ne = l.clippingPlanes;
|
|
22606
|
+
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(q), l.setClearColor(scratchPrevClearColor$1, G), l.autoClear = Z, l.autoClearColor = Y, l.autoClearDepth = ee, l.autoClearStencil = ie, l.clippingPlanes = ne;
|
|
22607
22607
|
}
|
|
22608
22608
|
return this.forceRenderWhenNextUpdate = !1, r;
|
|
22609
22609
|
}, n;
|
|
@@ -22981,13 +22981,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
22981
22981
|
}
|
|
22982
22982
|
p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(M.x + (w.x - M.x) * F, M.y + (w.y - M.y) * F, M.z + (w.z - M.z) * F);
|
|
22983
22983
|
for (var I = [], B = [], O = 0, _ = this.locationMotion.keyframes; O < _.length; O++) {
|
|
22984
|
-
var N = _[O], V = N.key,
|
|
22985
|
-
V !== void 0 && (I.push(V),
|
|
22984
|
+
var N = _[O], V = N.key, X = N.progress;
|
|
22985
|
+
V !== void 0 && (I.push(V), X > this.locationMotion.progress && B.push(V));
|
|
22986
22986
|
}
|
|
22987
22987
|
for (var D = 0, J = Object.keys(this.panoResources); D < J.length; D++) {
|
|
22988
|
-
var
|
|
22989
|
-
if (!(B.indexOf(
|
|
22990
|
-
var q = this.panoResources[
|
|
22988
|
+
var U = J[D];
|
|
22989
|
+
if (!(B.indexOf(U) >= 0)) {
|
|
22990
|
+
var q = this.panoResources[U];
|
|
22991
22991
|
if (q.panoPicture) {
|
|
22992
22992
|
var G = q.panoPicture.map;
|
|
22993
22993
|
if (G) {
|
|
@@ -22996,11 +22996,11 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
22996
22996
|
G.dispose(), q.panoPicture = null;
|
|
22997
22997
|
}
|
|
22998
22998
|
}
|
|
22999
|
-
I.indexOf(
|
|
22999
|
+
I.indexOf(U) >= 0 || delete this.panoResources[U];
|
|
23000
23000
|
}
|
|
23001
23001
|
}
|
|
23002
|
-
var
|
|
23003
|
-
|
|
23002
|
+
var Z = panoParse(b.panoId);
|
|
23003
|
+
Z !== this.currentPano && (this.currentPano = Z, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
|
|
23004
23004
|
userAction: this.userAction,
|
|
23005
23005
|
prevPano: panoParse(T.panoId),
|
|
23006
23006
|
state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
|
|
@@ -23010,56 +23010,56 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23010
23010
|
}));
|
|
23011
23011
|
}
|
|
23012
23012
|
isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
|
|
23013
|
-
var
|
|
23013
|
+
var Y = this.works.getResolvedObserver(this.currentPano), ee = this.locationMotion.ended ? this.getForwardObserverOrNot() : null;
|
|
23014
23014
|
if (this.camera.pose.distance > 0.1 || R)
|
|
23015
|
-
for (var
|
|
23016
|
-
var
|
|
23017
|
-
|
|
23015
|
+
for (var ie = 0, ne = Object.keys(this.panoMeshes); ie < ne.length; ie++) {
|
|
23016
|
+
var K = ne[ie], j = this.panoMeshes[K];
|
|
23017
|
+
j.setOpacity(0), j.setCurrent(!1), j.updateTime && j.updateTime(e, r), j.visible = !1;
|
|
23018
23018
|
}
|
|
23019
|
-
else if (
|
|
23020
|
-
var
|
|
23019
|
+
else if (Y) {
|
|
23020
|
+
var te = arrayMin(Y.visibleIds, function(Ye) {
|
|
23021
23021
|
var He = o.works.getResolvedObserver(Ye);
|
|
23022
|
-
return He ?
|
|
23023
|
-
}, !0), ae =
|
|
23022
|
+
return He ? Y.standingPosition.distanceTo(He.standingPosition) : 1 / 0;
|
|
23023
|
+
}, !0), ae = te[1];
|
|
23024
23024
|
ae = clamp$1(ae, 2.5, 1 / 0);
|
|
23025
|
-
for (var
|
|
23026
|
-
var
|
|
23027
|
-
if (
|
|
23028
|
-
|
|
23025
|
+
for (var ue = Y.visibleIds.concat(panoStringify(this.currentPano)), fe = this.camera.getDirection(new THREE.Vector3()), pe = 0, ge = Object.keys(this.panoMeshes); pe < ge.length; pe++) {
|
|
23026
|
+
var K = ge[pe], j = this.panoMeshes[K], C = this.works.getResolvedObserver(K);
|
|
23027
|
+
if (ue.indexOf(K) === -1)
|
|
23028
|
+
j.setCurrent(!1), j.setOpacity(0);
|
|
23029
23029
|
else if (!C)
|
|
23030
|
-
|
|
23030
|
+
j.setCurrent(!1), j.setOpacity(0);
|
|
23031
23031
|
else if (!C.loadable && !C.active)
|
|
23032
|
-
|
|
23032
|
+
j.setCurrent(!1), j.setOpacity(0);
|
|
23033
23033
|
else {
|
|
23034
|
-
var Re =
|
|
23035
|
-
|
|
23036
|
-
var
|
|
23037
|
-
if (
|
|
23038
|
-
var
|
|
23039
|
-
me.multiplyScalar(1 -
|
|
23034
|
+
var Re = j.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
|
|
23035
|
+
j.setCurrent(!j.loading && j.progress === 0 && ee !== null && ee.panoId === K), j.setOpacity(Re < 0.01 ? 0 : clamp$1(ae / Re * 1.2, 0.4, 0.85));
|
|
23036
|
+
var Ae = this.camera.position.clone().setY(j.position.y), me = new THREE.Vector3().copy(j.position).sub(Ae).normalize();
|
|
23037
|
+
if (K === panoStringify(this.currentPano)) {
|
|
23038
|
+
var oe = clamp$1((0.5 - Ae.distanceTo(j.position)) / 0.5, 0, 1);
|
|
23039
|
+
me.multiplyScalar(1 - oe).add(fe.clone().multiplyScalar(oe));
|
|
23040
23040
|
}
|
|
23041
|
-
me.length() > 0 &&
|
|
23041
|
+
me.length() > 0 && j.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(me.x, me.z), 0));
|
|
23042
23042
|
}
|
|
23043
|
-
|
|
23043
|
+
j.updateTime && j.updateTime(e, r);
|
|
23044
23044
|
}
|
|
23045
23045
|
}
|
|
23046
|
-
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible &&
|
|
23047
|
-
for (var
|
|
23048
|
-
var
|
|
23049
|
-
C &&
|
|
23046
|
+
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && Y) {
|
|
23047
|
+
for (var W = [], re = 0, Q = Y.accessibleIds; re < Q.length; re++) {
|
|
23048
|
+
var K = Q[re], C = this.works.getResolvedObserver(K);
|
|
23049
|
+
C && W.push(C);
|
|
23050
23050
|
}
|
|
23051
|
-
if (
|
|
23052
|
-
return Ye.standingPosition.distanceTo(
|
|
23053
|
-
}),
|
|
23054
|
-
this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount %
|
|
23055
|
-
var
|
|
23056
|
-
return He.work === (
|
|
23051
|
+
if (W.sort(function(Ye, He) {
|
|
23052
|
+
return Ye.standingPosition.distanceTo(Y.standingPosition) - He.standingPosition.distanceTo(Y.standingPosition);
|
|
23053
|
+
}), W.length) {
|
|
23054
|
+
this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % W.length;
|
|
23055
|
+
var ce = W[this.accessibleObserverFloorCheckCount], j = this.panoMeshes[ce.panoId], ve = this.modelScene.models.find(function(He) {
|
|
23056
|
+
return He.work === (ce == null ? void 0 : ce.work);
|
|
23057
23057
|
});
|
|
23058
|
-
if (
|
|
23058
|
+
if (ce && j && ve && ve.visible) {
|
|
23059
23059
|
var Ve = 0.3, Ue = 0.05, $e = 5e-3, Be = adjustPanoCircleMeshVectors.map(function(He) {
|
|
23060
|
-
scratchVector3$1.copy(He), scratchVector3$1.setY(Ve), scratchRaycaster$1.ray.origin.copy(
|
|
23060
|
+
scratchVector3$1.copy(He), scratchVector3$1.setY(Ve), scratchRaycaster$1.ray.origin.copy(ce.standingPosition), scratchRaycaster$1.ray.origin.add(scratchVector3$1), scratchRaycaster$1.ray.direction.set(0, -1, 0);
|
|
23061
23061
|
var Fe = ve.intersectRaycaster(scratchRaycaster$1, null, !0)[0];
|
|
23062
|
-
return Fe && Fe.distance - $e <= Ve ? new THREE.Vector3().copy(
|
|
23062
|
+
return Fe && Fe.distance - $e <= Ve ? new THREE.Vector3().copy(ce.standingPosition).setY(Fe.point.y + $e) : ce.standingPosition;
|
|
23063
23063
|
});
|
|
23064
23064
|
Be.sort(function(He, Fe) {
|
|
23065
23065
|
return Fe.y - He.y;
|
|
@@ -23067,7 +23067,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23067
23067
|
var de = Be[Math.floor(Be.length / 2)], Ee = Be.filter(function(He) {
|
|
23068
23068
|
return He.distanceTo(de) <= Ue;
|
|
23069
23069
|
})[0];
|
|
23070
|
-
Ee && !Ee.equals(
|
|
23070
|
+
Ee && !Ee.equals(j.position) && (j.position.copy(Ee), this.needsRender = !0);
|
|
23071
23071
|
}
|
|
23072
23072
|
this.accessibleObserverFloorCheckCount++;
|
|
23073
23073
|
}
|
|
@@ -23115,7 +23115,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23115
23115
|
(ot || ze.pano !== (Ke == null ? void 0 : Ke.pano) || ze.opacity !== (Ke == null ? void 0 : Ke.opacity)) && this.modelScene.parameter.set("refinedScreen", ze);
|
|
23116
23116
|
}
|
|
23117
23117
|
}
|
|
23118
|
-
this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e),
|
|
23118
|
+
this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), Y && Y.video && (this.needsRender = !0), this.intersectMesh.scale.setScalar(clamp$1(this.cameraMotion.value.fov / 45, 0, 1));
|
|
23119
23119
|
{
|
|
23120
23120
|
var Xe = b.effect, je = this.modelScene.parameter, le = je.pano0, Ce = je.pano1;
|
|
23121
23121
|
if (le && Ce && le !== Ce && Xe === "fly" && this.flyEffectUseDepthBuffer) {
|
|
@@ -23409,14 +23409,14 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23409
23409
|
{ key: w.key, progress: N / T, value: w.value },
|
|
23410
23410
|
{ key: y, progress: 1, value: { count: w.value.count + 1, distance: 0 } }
|
|
23411
23411
|
];
|
|
23412
|
-
var
|
|
23413
|
-
|
|
23412
|
+
var X = this.locationMotionKeyframesLength(this.locationMotion.keyframes), D = this.locationMotionKeyframesLength(S);
|
|
23413
|
+
X === 0 || X === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * X / D;
|
|
23414
23414
|
}
|
|
23415
|
-
var J = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0),
|
|
23415
|
+
var J = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), U = {
|
|
23416
23416
|
longitude: o.longitude,
|
|
23417
23417
|
latitude: o.latitude,
|
|
23418
23418
|
fov: o.fov
|
|
23419
|
-
}, q = __assign(__assign({}, e), { mode: this.mode, longitude: (l =
|
|
23419
|
+
}, q = __assign(__assign({}, e), { mode: this.mode, longitude: (l = U.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = U.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = U.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), G = this.currentPano;
|
|
23420
23420
|
if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
23421
23421
|
options: o,
|
|
23422
23422
|
prevPano: G,
|
|
@@ -23425,25 +23425,25 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23425
23425
|
userAction: this.userAction,
|
|
23426
23426
|
error: null
|
|
23427
23427
|
})), o.moveStartCallback && o.moveStartCallback(q), 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$1, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
|
|
23428
|
-
this.cameraMotion.set(
|
|
23428
|
+
this.cameraMotion.set(U, J).catch(noop$1);
|
|
23429
23429
|
else {
|
|
23430
|
-
var
|
|
23430
|
+
var Z = coordinatesToVector({
|
|
23431
23431
|
longitude: this.cameraMotion.value.longitude,
|
|
23432
23432
|
latitude: this.cameraMotion.value.latitude
|
|
23433
|
-
}),
|
|
23434
|
-
longitude: (d =
|
|
23435
|
-
latitude: (h =
|
|
23436
|
-
}),
|
|
23437
|
-
|
|
23438
|
-
var
|
|
23439
|
-
|
|
23440
|
-
var
|
|
23433
|
+
}), Y = coordinatesToVector({
|
|
23434
|
+
longitude: (d = U.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
|
|
23435
|
+
latitude: (h = U.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
|
|
23436
|
+
}), ee = new THREE.Object3D();
|
|
23437
|
+
ee.lookAt(Z);
|
|
23438
|
+
var ie = new THREE.Matrix4().makeRotationFromQuaternion(ee.quaternion);
|
|
23439
|
+
ee.lookAt(Y);
|
|
23440
|
+
var ne = new THREE.Matrix4().makeRotationFromQuaternion(ee.quaternion), K = new THREE.Matrix4().getInverse(ie).premultiply(ne), j = this.cameraMotion.value.fov, te = (p = U.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, ae = 1;
|
|
23441
23441
|
r.effect === "zoomin" ? ae = 1.5 : r.effect === "zoomout" && (ae = 0.4);
|
|
23442
|
-
for (var
|
|
23443
|
-
var pe = S[
|
|
23442
|
+
for (var ue = clamp$1(te * ae, 1, 170), fe = 0; fe < S.length - 1; fe++) {
|
|
23443
|
+
var pe = S[fe].key;
|
|
23444
23444
|
if (pe) {
|
|
23445
|
-
var
|
|
23446
|
-
|
|
23445
|
+
var ge = this.panoResources[pe];
|
|
23446
|
+
ge && (ge.fixCameraTransform.copy(K), ge.panoPicture && (ge.panoPicture.zoom = Math.tan(ue / 2 / 180 * Math.PI) / Math.tan(j / 2 / 180 * Math.PI)));
|
|
23447
23447
|
}
|
|
23448
23448
|
}
|
|
23449
23449
|
this.cameraMotion.setKeyframes([
|
|
@@ -23458,17 +23458,17 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23458
23458
|
{
|
|
23459
23459
|
progress: 0,
|
|
23460
23460
|
value: {
|
|
23461
|
-
longitude: (g =
|
|
23462
|
-
latitude: (A =
|
|
23463
|
-
fov:
|
|
23461
|
+
longitude: (g = U.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
|
|
23462
|
+
latitude: (A = U.latitude) !== null && A !== void 0 ? A : this.cameraMotion.value.latitude,
|
|
23463
|
+
fov: ue
|
|
23464
23464
|
}
|
|
23465
23465
|
},
|
|
23466
23466
|
{
|
|
23467
23467
|
progress: 1,
|
|
23468
23468
|
value: {
|
|
23469
|
-
longitude: (m =
|
|
23470
|
-
latitude: (E =
|
|
23471
|
-
fov:
|
|
23469
|
+
longitude: (m = U.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
|
|
23470
|
+
latitude: (E = U.latitude) !== null && E !== void 0 ? E : this.cameraMotion.value.latitude,
|
|
23471
|
+
fov: te
|
|
23472
23472
|
}
|
|
23473
23473
|
}
|
|
23474
23474
|
], J).catch(noop$1);
|
|
@@ -23478,34 +23478,34 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23478
23478
|
// resolve
|
|
23479
23479
|
// 动画结束
|
|
23480
23480
|
function() {
|
|
23481
|
-
for (var
|
|
23482
|
-
var
|
|
23483
|
-
|
|
23481
|
+
for (var Ae = 0, me = s.modelScene.children; Ae < me.length; Ae++) {
|
|
23482
|
+
var oe = me[Ae];
|
|
23483
|
+
oe instanceof Model && oe.show();
|
|
23484
23484
|
}
|
|
23485
|
-
var
|
|
23485
|
+
var W = __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 });
|
|
23486
23486
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
23487
23487
|
options: o,
|
|
23488
23488
|
prevPano: G,
|
|
23489
23489
|
progress: 1,
|
|
23490
|
-
state:
|
|
23490
|
+
state: W,
|
|
23491
23491
|
userAction: s.userAction,
|
|
23492
23492
|
error: null
|
|
23493
|
-
})), o.moveEndCallback && o.moveEndCallback(
|
|
23494
|
-
var
|
|
23495
|
-
if (
|
|
23496
|
-
var
|
|
23493
|
+
})), o.moveEndCallback && o.moveEndCallback(W);
|
|
23494
|
+
var re = s.works.getResolvedObserver(e);
|
|
23495
|
+
if (re && re.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
|
|
23496
|
+
var Q = {
|
|
23497
23497
|
map: s.videoTexture,
|
|
23498
|
-
size:
|
|
23499
|
-
matrix:
|
|
23500
|
-
panoMatrix:
|
|
23498
|
+
size: re.video.size,
|
|
23499
|
+
matrix: re.video.matrix,
|
|
23500
|
+
panoMatrix: re.matrix,
|
|
23501
23501
|
alpha: 1
|
|
23502
|
-
},
|
|
23503
|
-
ve.setAttribute("uuid",
|
|
23504
|
-
Ve &&
|
|
23502
|
+
}, ce = createUuid(), ve = s.videoTexture.image;
|
|
23503
|
+
ve.setAttribute("uuid", ce), canplayVideo().then(function(Ve) {
|
|
23504
|
+
Ve && re.video && ve.getAttribute("uuid") === ce && (ve.oncanplay = function() {
|
|
23505
23505
|
ve.oncanplay = noop$1, ve.play();
|
|
23506
23506
|
}, ve.ontimeupdate = function() {
|
|
23507
|
-
ve.currentTime > 0.5 && (ve.ontimeupdate = noop$1, s.panoVideo.setMaterial(
|
|
23508
|
-
}, ve.src =
|
|
23507
|
+
ve.currentTime > 0.5 && (ve.ontimeupdate = noop$1, s.panoVideo.setMaterial(Q));
|
|
23508
|
+
}, ve.src = re.video.source);
|
|
23509
23509
|
}).catch(function() {
|
|
23510
23510
|
ve.removeAttribute("uuid");
|
|
23511
23511
|
});
|
|
@@ -23580,8 +23580,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23580
23580
|
var G = r.works.getResolvedObserver(q);
|
|
23581
23581
|
if (!G)
|
|
23582
23582
|
return 1 / 0;
|
|
23583
|
-
var
|
|
23584
|
-
return
|
|
23583
|
+
var Z = G.standingPosition.clone();
|
|
23584
|
+
return Z.distanceTo(h.point);
|
|
23585
23585
|
}, !0), g = p[0], A = p[1];
|
|
23586
23586
|
g && A < this.panoTapTriggerRadius && (c = (o = this.works.getResolvedObserver(g)) !== null && o !== void 0 ? o : null);
|
|
23587
23587
|
}
|
|
@@ -23610,8 +23610,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23610
23610
|
return q.angleTo(R) - G.angleTo(R);
|
|
23611
23611
|
})[0];
|
|
23612
23612
|
if (N && N.angleTo(l) > S && (b.longitude = Math.atan2(-N.x, -N.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
|
|
23613
|
-
var V = e.state.fov,
|
|
23614
|
-
b.latitude = clamp$1(0,
|
|
23613
|
+
var V = e.state.fov, X = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(V) : this.minLatitude, -Math.PI / 2, Math.PI / 2), D = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(V) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
|
|
23614
|
+
b.latitude = clamp$1(0, X, D);
|
|
23615
23615
|
}
|
|
23616
23616
|
var J = __assign({}, e.state);
|
|
23617
23617
|
if (J.workCode = c.pano.workCode, J.panoIndex = c.pano.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 = c.position.clone(), e.state = J, this.emit("gesture.tap", e), !e.defaultPrevented) {
|
|
@@ -23623,8 +23623,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
|
|
|
23623
23623
|
progress: 0,
|
|
23624
23624
|
error: null
|
|
23625
23625
|
})), c && !c.active) {
|
|
23626
|
-
var
|
|
23627
|
-
this.panoMeshes[
|
|
23626
|
+
var U = c.panoId;
|
|
23627
|
+
this.panoMeshes[U] && (this.panoMeshes[U].setDisabled(!1), this.panoMeshes[U].setLoading(!0));
|
|
23628
23628
|
}
|
|
23629
23629
|
c && c.active && this.emit("pano.request", createEvent("pano.request", {
|
|
23630
23630
|
userAction: e.userAction,
|
|
@@ -24576,23 +24576,23 @@ void main() {
|
|
|
24576
24576
|
C.copy(I), S = !0;
|
|
24577
24577
|
}
|
|
24578
24578
|
p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(C.x + (I.x - C.x) * B, C.y + (I.y - C.y) * B, C.z + (I.z - C.z) * B);
|
|
24579
|
-
for (var N = [], V = [],
|
|
24580
|
-
var J = D[
|
|
24581
|
-
|
|
24579
|
+
for (var N = [], V = [], X = 0, D = this.locationMotion.keyframes; X < D.length; X++) {
|
|
24580
|
+
var J = D[X], U = J.key, q = J.progress;
|
|
24581
|
+
U !== void 0 && (N.push(U), q > this.locationMotion.progress && V.push(U));
|
|
24582
24582
|
}
|
|
24583
|
-
for (var G = 0,
|
|
24584
|
-
var
|
|
24585
|
-
if (!(V.indexOf(
|
|
24586
|
-
var
|
|
24587
|
-
if (
|
|
24588
|
-
var
|
|
24589
|
-
if (
|
|
24590
|
-
if (
|
|
24583
|
+
for (var G = 0, Z = Object.keys(this.panoResources); G < Z.length; G++) {
|
|
24584
|
+
var Y = Z[G];
|
|
24585
|
+
if (!(V.indexOf(Y) >= 0)) {
|
|
24586
|
+
var ee = this.panoResources[Y];
|
|
24587
|
+
if (ee.panoPicture) {
|
|
24588
|
+
var ie = ee.panoPicture.map;
|
|
24589
|
+
if (ie) {
|
|
24590
|
+
if (ie === ((o = h.pano0) === null || o === void 0 ? void 0 : o.map) || ie === ((s = h.pano1) === null || s === void 0 ? void 0 : s.map))
|
|
24591
24591
|
continue;
|
|
24592
|
-
|
|
24592
|
+
ie.dispose(), ee.panoPicture = null;
|
|
24593
24593
|
}
|
|
24594
24594
|
}
|
|
24595
|
-
N.indexOf(
|
|
24595
|
+
N.indexOf(Y) >= 0 || delete this.panoResources[Y];
|
|
24596
24596
|
}
|
|
24597
24597
|
}
|
|
24598
24598
|
this.currentPano = panoParse(H.panoId), this.emit("pano.moving", createEvent("pano.moving", {
|
|
@@ -24605,39 +24605,39 @@ void main() {
|
|
|
24605
24605
|
}));
|
|
24606
24606
|
}
|
|
24607
24607
|
isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), p.offset && this.camera.position.copy(p.offset), panoEqual(this.currentPano, d) && this.updatePanoMeshesVisible();
|
|
24608
|
-
var
|
|
24608
|
+
var ne = this.camera.pose.longitude, K = this.camera.pose.latitude;
|
|
24609
24609
|
this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose();
|
|
24610
|
-
var
|
|
24610
|
+
var j = this.works.getResolvedObserver(this.currentPano);
|
|
24611
24611
|
if (this.camera.pose.distance > 0.1 || S)
|
|
24612
|
-
for (var
|
|
24613
|
-
var
|
|
24614
|
-
|
|
24612
|
+
for (var te = 0, ae = Object.keys(this.panoMeshes); te < ae.length; te++) {
|
|
24613
|
+
var ue = ae[te], fe = this.panoMeshes[ue];
|
|
24614
|
+
fe.setOpacity(0), fe.updateTime && fe.updateTime(e, r), fe.visible = !1;
|
|
24615
24615
|
}
|
|
24616
|
-
else if (
|
|
24617
|
-
for (var pe =
|
|
24618
|
-
var
|
|
24616
|
+
else if (j)
|
|
24617
|
+
for (var pe = j.visibleIds.concat(panoStringify(this.currentPano)), ge = 0, Re = pe; ge < Re.length; ge++) {
|
|
24618
|
+
var ue = Re[ge], Ae = panoParse(ue), _ = this.works.getResolvedObserver(Ae);
|
|
24619
24619
|
if (_) {
|
|
24620
|
-
var
|
|
24620
|
+
var fe = this.panoMeshes[ue];
|
|
24621
24621
|
if (!_.loadable && !_.active) {
|
|
24622
|
-
|
|
24622
|
+
fe.setOpacity(0);
|
|
24623
24623
|
continue;
|
|
24624
24624
|
}
|
|
24625
|
-
var me =
|
|
24626
|
-
me < 0.05 ?
|
|
24625
|
+
var me = fe.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
|
|
24626
|
+
me < 0.05 ? fe.setOpacity(0) : fe.setOpacity(clamp$1(1.5 / me, 0, 1)), panoEqual(this.currentPano, Ae) && fe.setOpacity(0), fe.lookAt(this.camera.position);
|
|
24627
24627
|
}
|
|
24628
24628
|
}
|
|
24629
24629
|
if (this.locationMotion.ended)
|
|
24630
|
-
for (var
|
|
24631
|
-
var _ =
|
|
24632
|
-
|
|
24630
|
+
for (var oe = this.intersect(e), W = 0, re = this.works.resolvedObservers; W < re.length; W++) {
|
|
24631
|
+
var _ = re[W], fe = this.panoMeshes[_.panoId];
|
|
24632
|
+
fe && (fe.setCurrent(fe === oe), fe.updateTime && fe.updateTime(e, r));
|
|
24633
24633
|
}
|
|
24634
|
-
(
|
|
24634
|
+
(ne !== this.camera.pose.longitude || K !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop$1), this.emit("camera.update", createEvent("camera.update", {
|
|
24635
24635
|
userAction: !0,
|
|
24636
24636
|
state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
|
|
24637
24637
|
})));
|
|
24638
24638
|
{
|
|
24639
|
-
var B = (u = this.modelScene.parameter.progress) !== null && u !== void 0 ? u : 1,
|
|
24640
|
-
if (
|
|
24639
|
+
var B = (u = this.modelScene.parameter.progress) !== null && u !== void 0 ? u : 1, Q = Math.round(B), ce = this.modelScene.parameter.pano0, ve = this.modelScene.parameter.pano1, Ae = Q === 0 ? ce : ve, _ = void 0;
|
|
24640
|
+
if (Ae && (_ = this.works.getResolvedObserver(Ae.panoId), _ || (_ = this.panoPictureObserverMap.get(Ae))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = B <= 0.6 ? 0 : B < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !_ || !Ae || this.tileLevelForFov === !1) {
|
|
24641
24641
|
this.tiling.setObserver(null);
|
|
24642
24642
|
var Ve = {
|
|
24643
24643
|
renderer: this.renderer,
|
|
@@ -24654,7 +24654,7 @@ void main() {
|
|
|
24654
24654
|
};
|
|
24655
24655
|
this.tiling.update(Ve), this.modelScene.parameter.set("refinedScreen", null);
|
|
24656
24656
|
} else {
|
|
24657
|
-
var Ue = getImageSizeLevel(
|
|
24657
|
+
var Ue = getImageSizeLevel(Ae.mapSize), $e = Ue + 1, Be = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), de = Math.floor(this.tileLevelForFov(this.camera.fov, Be)), Ee = de > Ue ? de : 0;
|
|
24658
24658
|
this.tiling.setObserver(_);
|
|
24659
24659
|
var Ve = {
|
|
24660
24660
|
renderer: this.renderer,
|
|
@@ -24663,26 +24663,26 @@ void main() {
|
|
|
24663
24663
|
time: this.camera.time,
|
|
24664
24664
|
cameraMatrix: this.camera.matrixWorld,
|
|
24665
24665
|
cameraProjectionMatrix: this.camera.projectionMatrix,
|
|
24666
|
-
panoMap:
|
|
24667
|
-
panoMatrix:
|
|
24668
|
-
panoZoom:
|
|
24666
|
+
panoMap: Ae.map,
|
|
24667
|
+
panoMatrix: Ae.matrix,
|
|
24668
|
+
panoZoom: Ae.zoom,
|
|
24669
24669
|
minLevel: $e,
|
|
24670
24670
|
level: Ee
|
|
24671
24671
|
}, Se = this.tiling.update(Ve), le = {
|
|
24672
24672
|
map: this.tiling.renderTarget.texture,
|
|
24673
24673
|
matrixInverse: this.tiling.camera.matrixWorldInverse,
|
|
24674
24674
|
projectionMatrix: this.tiling.camera.projectionMatrix,
|
|
24675
|
-
pano:
|
|
24676
|
-
opacity: (
|
|
24675
|
+
pano: Q,
|
|
24676
|
+
opacity: (ce == null ? void 0 : ce.panoId) === (ve == null ? void 0 : ve.panoId) ? 1 : easeInQuart(Math.abs(((l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 0) - 0.5) * 2)
|
|
24677
24677
|
}, Ce = this.modelScene.parameter.refinedScreen;
|
|
24678
24678
|
(Se || le.pano !== (Ce == null ? void 0 : Ce.pano) || le.opacity !== (Ce == null ? void 0 : Ce.opacity)) && this.modelScene.parameter.set("refinedScreen", le);
|
|
24679
24679
|
}
|
|
24680
24680
|
}
|
|
24681
24681
|
this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
|
|
24682
24682
|
{
|
|
24683
|
-
var we = y.effect, Ze = this.modelScene.parameter,
|
|
24684
|
-
if (
|
|
24685
|
-
if (((c = this.modelScene.parameter.pano0Depth) === null || c === void 0 ? void 0 : c.panoId) !==
|
|
24683
|
+
var we = y.effect, Ze = this.modelScene.parameter, ce = Ze.pano0, ve = Ze.pano1;
|
|
24684
|
+
if (ce && ve && ce !== ve && we === "fly" && this.flyEffectUseDepthBuffer) {
|
|
24685
|
+
if (((c = this.modelScene.parameter.pano0Depth) === null || c === void 0 ? void 0 : c.panoId) !== ce.panoId || ((f = this.modelScene.parameter.pano1Depth) === null || f === void 0 ? void 0 : f.panoId) !== ve.panoId) {
|
|
24686
24686
|
var ye = 500, xe = 512;
|
|
24687
24687
|
this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== xe && this.pano0DepthCubeRenderTarget.setSize(xe, xe) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(xe, {
|
|
24688
24688
|
minFilter: THREE.NearestFilter,
|
|
@@ -24694,11 +24694,11 @@ void main() {
|
|
|
24694
24694
|
generateMipmaps: !1
|
|
24695
24695
|
});
|
|
24696
24696
|
var he = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
|
|
24697
|
-
he.matrix.copy(
|
|
24697
|
+
he.matrix.copy(ce.matrix), he.matrixWorld.copy(he.matrix), he.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, he, ye);
|
|
24698
24698
|
var _e = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
|
|
24699
24699
|
_e.matrix.copy(ve.matrix), _e.matrixWorld.copy(_e.matrix), _e.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, _e, ye), this.modelScene.parameter.set({
|
|
24700
24700
|
pano0Depth: {
|
|
24701
|
-
panoId:
|
|
24701
|
+
panoId: ce.panoId,
|
|
24702
24702
|
map: this.pano0DepthCubeRenderTarget.texture,
|
|
24703
24703
|
mapSize: this.pano0DepthCubeRenderTarget.width,
|
|
24704
24704
|
maxDepth: ye
|
|
@@ -24977,8 +24977,8 @@ void main() {
|
|
|
24977
24977
|
// 动画结束
|
|
24978
24978
|
function() {
|
|
24979
24979
|
for (var N = 0, V = s.modelScene.children; N < V.length; N++) {
|
|
24980
|
-
var
|
|
24981
|
-
|
|
24980
|
+
var X = V[N];
|
|
24981
|
+
X instanceof Model && X.show();
|
|
24982
24982
|
}
|
|
24983
24983
|
var D = __assign(__assign(__assign({}, B), { mode: s.mode }), clonePose(s.camera.pose));
|
|
24984
24984
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
@@ -25357,7 +25357,7 @@ void main() {
|
|
|
25357
25357
|
var E = {
|
|
25358
25358
|
x: e.center.x - o.x,
|
|
25359
25359
|
y: e.center.y - o.y
|
|
25360
|
-
}, O = this.coordinatesForOffset(E), _ = formatRad(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, V = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2),
|
|
25360
|
+
}, O = this.coordinatesForOffset(E), _ = formatRad(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, V = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), X = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), D = clamp$1(this.cameraMotion.value.latitude + O.latitude, V, X);
|
|
25361
25361
|
this.camera.aspect < 1 && Math.abs(e.overallVelocityX) > 0.2 && Math.atan2(Math.abs(e.overallVelocityY), Math.abs(e.overallVelocityX)) < Math.PI / 6.923 && (D = this.cameraMotion.value.latitude);
|
|
25362
25362
|
var w = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: _, latitude: D, fov: N, offset: this.camera.pose.offset, distance: this.camera.pose.distance });
|
|
25363
25363
|
if (e.isFinal && Object.assign(e, { __fixFinalState: !0 }), e.state = w, this.emit("gesture.pan", e), e.defaultPrevented)
|
|
@@ -25371,10 +25371,10 @@ void main() {
|
|
|
25371
25371
|
longitude: w.longitude,
|
|
25372
25372
|
latitude: w.latitude
|
|
25373
25373
|
}, 0).catch(noop$1), e.isFinal) {
|
|
25374
|
-
var J = e.velocityX,
|
|
25374
|
+
var J = e.velocityX, U = e.velocityY;
|
|
25375
25375
|
this.inMomentumMovement = {
|
|
25376
25376
|
uuid: createUuid()
|
|
25377
|
-
}, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: J, y:
|
|
25377
|
+
}, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: J, y: U })), { x: 0, y: 0, z: 0 }), 0);
|
|
25378
25378
|
}
|
|
25379
25379
|
}
|
|
25380
25380
|
}
|
|
@@ -26178,7 +26178,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
|
|
|
26178
26178
|
}
|
|
26179
26179
|
return Object.defineProperty(t, "version", {
|
|
26180
26180
|
get: function() {
|
|
26181
|
-
return "6.5.
|
|
26181
|
+
return "6.5.11";
|
|
26182
26182
|
},
|
|
26183
26183
|
enumerable: !1,
|
|
26184
26184
|
configurable: !0
|
|
@@ -26811,41 +26811,41 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26811
26811
|
{ key: M.key, progress: _ / b, value: M.value },
|
|
26812
26812
|
{ key: v, progress: 1, value: { count: M.value.count + 1, distance: 0 } }
|
|
26813
26813
|
];
|
|
26814
|
-
var V = this.locationMotionKeyframesLength(this.locationMotion.keyframes),
|
|
26815
|
-
S = this.locationMotion.getProgressVelocity(E) * V /
|
|
26814
|
+
var V = this.locationMotionKeyframesLength(this.locationMotion.keyframes), X = this.locationMotionKeyframesLength(T);
|
|
26815
|
+
S = this.locationMotion.getProgressVelocity(E) * V / X;
|
|
26816
26816
|
}
|
|
26817
26817
|
var D = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), J = {
|
|
26818
26818
|
longitude: o.longitude,
|
|
26819
26819
|
latitude: o.latitude,
|
|
26820
26820
|
fov: o.fov
|
|
26821
|
-
},
|
|
26821
|
+
}, U = __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 }), q = this.currentPano;
|
|
26822
26822
|
if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
26823
26823
|
options: o,
|
|
26824
26824
|
prevPano: q,
|
|
26825
26825
|
progress: 0,
|
|
26826
|
-
state:
|
|
26826
|
+
state: U,
|
|
26827
26827
|
userAction: this.userAction,
|
|
26828
26828
|
error: null
|
|
26829
|
-
})), o.moveStartCallback && o.moveStartCallback(
|
|
26829
|
+
})), o.moveStartCallback && o.moveStartCallback(U), 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$1, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
|
|
26830
26830
|
this.cameraMotion.set(J, D).catch(noop$1);
|
|
26831
26831
|
else {
|
|
26832
26832
|
var G = coordinatesToVector({
|
|
26833
26833
|
longitude: this.cameraMotion.value.longitude,
|
|
26834
26834
|
latitude: this.cameraMotion.value.latitude
|
|
26835
|
-
}),
|
|
26835
|
+
}), Z = coordinatesToVector({
|
|
26836
26836
|
longitude: (f = J.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
|
|
26837
26837
|
latitude: (d = J.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
|
|
26838
|
-
}),
|
|
26839
|
-
|
|
26840
|
-
var
|
|
26841
|
-
|
|
26842
|
-
var
|
|
26843
|
-
r.effect === "zoomin" ?
|
|
26844
|
-
for (var ae =
|
|
26845
|
-
var
|
|
26846
|
-
if (
|
|
26847
|
-
var pe = this.panoResources[
|
|
26848
|
-
pe && (pe.fixCameraTransform.copy(
|
|
26838
|
+
}), Y = new THREE.Object3D();
|
|
26839
|
+
Y.lookAt(G);
|
|
26840
|
+
var ee = new THREE.Matrix4().makeRotationFromQuaternion(Y.quaternion);
|
|
26841
|
+
Y.lookAt(Z);
|
|
26842
|
+
var ie = new THREE.Matrix4().makeRotationFromQuaternion(Y.quaternion), ne = new THREE.Matrix4().getInverse(ee).premultiply(ie), K = this.cameraMotion.value.fov, j = (h = J.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
|
|
26843
|
+
r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
|
|
26844
|
+
for (var ae = j * te, ue = 0; ue < T.length - 1; ue++) {
|
|
26845
|
+
var fe = T[ue].key;
|
|
26846
|
+
if (fe) {
|
|
26847
|
+
var pe = this.panoResources[fe];
|
|
26848
|
+
pe && (pe.fixCameraTransform.copy(ne), pe.leftPanoPicture && (pe.leftPanoPicture.zoom = Math.tan(ae / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
|
|
26849
26849
|
}
|
|
26850
26850
|
}
|
|
26851
26851
|
this.cameraMotion.setKeyframes([
|
|
@@ -26870,46 +26870,46 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26870
26870
|
value: {
|
|
26871
26871
|
longitude: (A = J.longitude) !== null && A !== void 0 ? A : this.cameraMotion.value.longitude,
|
|
26872
26872
|
latitude: (m = J.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
|
|
26873
|
-
fov:
|
|
26873
|
+
fov: j
|
|
26874
26874
|
}
|
|
26875
26875
|
}
|
|
26876
26876
|
], D).catch(noop$1);
|
|
26877
26877
|
}
|
|
26878
|
-
var
|
|
26879
|
-
|
|
26878
|
+
var ge = this.locationMotion.setKeyframes(T, D, S);
|
|
26879
|
+
ge.then(
|
|
26880
26880
|
// resolve
|
|
26881
26881
|
// 动画结束
|
|
26882
26882
|
function() {
|
|
26883
|
-
for (var Re = 0,
|
|
26884
|
-
var me =
|
|
26883
|
+
for (var Re = 0, Ae = s.modelScene.children; Re < Ae.length; Re++) {
|
|
26884
|
+
var me = Ae[Re];
|
|
26885
26885
|
me instanceof Model && me.show();
|
|
26886
26886
|
}
|
|
26887
|
-
var
|
|
26887
|
+
var oe = __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 });
|
|
26888
26888
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
26889
26889
|
options: o,
|
|
26890
26890
|
prevPano: q,
|
|
26891
26891
|
progress: 1,
|
|
26892
|
-
state:
|
|
26892
|
+
state: oe,
|
|
26893
26893
|
userAction: s.userAction,
|
|
26894
26894
|
error: null
|
|
26895
|
-
})), o.moveEndCallback && o.moveEndCallback(
|
|
26896
|
-
var
|
|
26897
|
-
if (
|
|
26898
|
-
var
|
|
26895
|
+
})), o.moveEndCallback && o.moveEndCallback(oe);
|
|
26896
|
+
var W = s.works.getResolvedObserver(s.currentPano);
|
|
26897
|
+
if (W && W.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
|
|
26898
|
+
var re = {
|
|
26899
26899
|
map: s.videoTexture,
|
|
26900
|
-
size:
|
|
26901
|
-
matrix:
|
|
26902
|
-
panoMatrix:
|
|
26900
|
+
size: W.video.size,
|
|
26901
|
+
matrix: W.video.matrix,
|
|
26902
|
+
panoMatrix: W.matrix,
|
|
26903
26903
|
alpha: 1
|
|
26904
|
-
},
|
|
26905
|
-
|
|
26906
|
-
ve &&
|
|
26907
|
-
|
|
26908
|
-
},
|
|
26909
|
-
|
|
26910
|
-
},
|
|
26904
|
+
}, Q = createUuid(), ce = s.videoTexture.image;
|
|
26905
|
+
ce.setAttribute("uuid", Q), canplayVideo().then(function(ve) {
|
|
26906
|
+
ve && W.video && ce.getAttribute("uuid") === Q && (ce.oncanplay = function() {
|
|
26907
|
+
ce.oncanplay = noop$1, ce.play();
|
|
26908
|
+
}, ce.ontimeupdate = function() {
|
|
26909
|
+
ce.currentTime > 0.5 && (ce.ontimeupdate = noop$1, s.panoVideo.setMaterial(re));
|
|
26910
|
+
}, ce.src = W.video.source);
|
|
26911
26911
|
}).catch(function() {
|
|
26912
|
-
|
|
26912
|
+
ce.removeAttribute("uuid");
|
|
26913
26913
|
});
|
|
26914
26914
|
}
|
|
26915
26915
|
},
|
|
@@ -26920,7 +26920,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
26920
26920
|
options: o,
|
|
26921
26921
|
prevPano: q,
|
|
26922
26922
|
progress: 0,
|
|
26923
|
-
state:
|
|
26923
|
+
state: U,
|
|
26924
26924
|
userAction: s.userAction,
|
|
26925
26925
|
error: null
|
|
26926
26926
|
})), o.moveCancelCallback && o.moveCancelCallback();
|
|
@@ -27011,35 +27011,35 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27011
27011
|
var H = this.locationMotion.getKeyFrameSegment(e), C = H[0], I = H[1], B = this.panoResourceFromLocationMotionKeyframe(C), O = this.panoResourceFromLocationMotionKeyframe(I), _ = new THREE.Vector3().copy(B.position), N = new THREE.Vector3().copy(O.position), V = this.locationMotion.value.count - I.value.count + 1;
|
|
27012
27012
|
if (m.progress = V, O.leftPanoPicture && (V < 1 ? B.leftPanoPicture && (m.pano0 = B.leftPanoPicture) : m.pano0 = O.leftPanoPicture, m.pano1 = O.leftPanoPicture), O.effect === "montage" ? m.transition = "BLACK" : O.effect === "spread" ? m.transition = "SPREAD" : m.transition = "FADE", (O.effect === "zoomin" || O.effect === "zoomout") && (m.progress = Math.pow(V, 3)), V < 1 && O.effect !== "fly") {
|
|
27013
27013
|
if (m.pano0 && B.leftPanoPicture) {
|
|
27014
|
-
var
|
|
27014
|
+
var X = {
|
|
27015
27015
|
panoId: m.pano0.panoId,
|
|
27016
27016
|
map: m.pano0.map,
|
|
27017
27017
|
mapSize: m.pano0.mapSize,
|
|
27018
27018
|
zoom: m.pano0.zoom,
|
|
27019
27019
|
matrix: B.leftPanoPicture.matrix.clone().setPosition(O.position)
|
|
27020
27020
|
}, D = this.panoPictureObserverMap.get(m.pano0);
|
|
27021
|
-
D && this.panoPictureObserverMap.set(
|
|
27021
|
+
D && this.panoPictureObserverMap.set(X, D), m.pano0 = X;
|
|
27022
27022
|
}
|
|
27023
27023
|
_.copy(N), F = !0;
|
|
27024
27024
|
}
|
|
27025
27025
|
E.distance = this.locationMotion.value.distance, E.offset = new THREE.Vector3(_.x + (N.x - _.x) * V, _.y + (N.y - _.y) * V, _.z + (N.z - _.z) * V);
|
|
27026
|
-
for (var J = [],
|
|
27027
|
-
var
|
|
27028
|
-
|
|
27029
|
-
}
|
|
27030
|
-
for (var
|
|
27031
|
-
var
|
|
27032
|
-
if (!(
|
|
27033
|
-
var
|
|
27034
|
-
if (
|
|
27035
|
-
var
|
|
27036
|
-
if (
|
|
27037
|
-
if (
|
|
27026
|
+
for (var J = [], U = [], q = 0, G = this.locationMotion.keyframes; q < G.length; q++) {
|
|
27027
|
+
var Z = G[q], Y = Z.key, ee = Z.progress;
|
|
27028
|
+
Y !== void 0 && (J.push(Y), ee > this.locationMotion.progress && U.push(Y));
|
|
27029
|
+
}
|
|
27030
|
+
for (var ie = 0, ne = Object.keys(this.panoResources); ie < ne.length; ie++) {
|
|
27031
|
+
var K = ne[ie];
|
|
27032
|
+
if (!(U.indexOf(K) >= 0)) {
|
|
27033
|
+
var j = this.panoResources[K];
|
|
27034
|
+
if (j.leftPanoPicture) {
|
|
27035
|
+
var te = j.leftPanoPicture.map;
|
|
27036
|
+
if (te) {
|
|
27037
|
+
if (te === ((s = m.pano0) === null || s === void 0 ? void 0 : s.map) || te === ((u = m.pano1) === null || u === void 0 ? void 0 : u.map))
|
|
27038
27038
|
continue;
|
|
27039
|
-
|
|
27039
|
+
te.dispose(), j.leftPanoPicture = null;
|
|
27040
27040
|
}
|
|
27041
27041
|
}
|
|
27042
|
-
J.indexOf(
|
|
27042
|
+
J.indexOf(K) >= 0 || delete this.panoResources[K];
|
|
27043
27043
|
}
|
|
27044
27044
|
}
|
|
27045
27045
|
var ae = panoParse(O.panoId);
|
|
@@ -27053,18 +27053,18 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27053
27053
|
}));
|
|
27054
27054
|
}
|
|
27055
27055
|
isEmptyObject(m) === !1 && this.modelScene.parameter.set(m), isEmptyObject(E) === !1 && this.setCamera(E), this.xrManager.cameraVR.projectionMatrix.copy(this.camera.projectionMatrix), this.xrManager.cameraVR.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), this.xrManager.cameraVR.matrix.copy(this.camera.matrix), this.xrManager.cameraVR.position.copy(this.camera.position), this.xrManager.cameraVR.quaternion.copy(this.camera.quaternion), this.xrManager.cameraVR.scale.copy(this.camera.scale), this.xrManager.cameraVR.matrixAutoUpdate = !1, this.xrManager.cameraVR.matrixWorld.copy(this.camera.matrixWorld);
|
|
27056
|
-
var
|
|
27057
|
-
if (
|
|
27058
|
-
var Re = this.xrManager.cameraVR,
|
|
27056
|
+
var ue = g, fe = ue[1], pe = new THREE.Vector3(0, 0, 0), ge = new THREE.Vector2().copy(this.camera.resolution);
|
|
27057
|
+
if (fe && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
|
|
27058
|
+
var Re = this.xrManager.cameraVR, Ae = this.xrManager.referenceSpace, me = this.xrManager.session.renderState.baseLayer, oe = fe.getViewerPose(Ae), W = (l = oe == null ? void 0 : oe.views) !== null && l !== void 0 ? l : [];
|
|
27059
27059
|
this.renderer.setFramebuffer(me.framebuffer);
|
|
27060
|
-
for (var
|
|
27061
|
-
var
|
|
27062
|
-
ve && (
|
|
27060
|
+
for (var re = 0; re < W.length; re++) {
|
|
27061
|
+
var Q = W[re], ce = Re.cameras[re], ve = me.getViewport(Q);
|
|
27062
|
+
ve && (ce.projectionMatrix.fromArray(Q.projectionMatrix), ce.projectionMatrixInverse.getInverse(ce.projectionMatrix), ce.matrix.fromArray(Q.transform.matrix), ce.matrix.setPosition(this.camera.position), ce.matrix.decompose(ce.position, ce.quaternion, ce.scale), ce.matrixWorld.copy(ce.matrix), ce.matrixWorldInverse.getInverse(ce.matrixWorld), ce.matrixAutoUpdate = !1, pe.copy(ce.position), ce.viewport.set(ve.x, ve.y, ve.width, ve.height), ge.set(ve.width, ve.height));
|
|
27063
27063
|
}
|
|
27064
27064
|
if (this.xrManager.setProjectionFromUnion(this.xrManager.cameraVR, this.xrManager.cameraL, this.xrManager.cameraR), this.camera.quaternion.copy(this.xrManager.cameraVR.quaternion), this.camera.scale.copy(this.xrManager.cameraVR.scale), this.camera.matrix.compose(this.camera.position, this.camera.quaternion, this.camera.scale), this.xrManager.session && this.xrManager.session.inputSources) {
|
|
27065
|
-
for (var
|
|
27066
|
-
if (this.xrManager.session.inputSources[
|
|
27067
|
-
var Ve =
|
|
27065
|
+
for (var re = 0; re < this.xrManager.session.inputSources.length; re++)
|
|
27066
|
+
if (this.xrManager.session.inputSources[re] && this.xrManager.session.inputSources[re].targetRayMode === "transient-pointer") {
|
|
27067
|
+
var Ve = fe.getPose(this.xrManager.session.inputSources[re].targetRaySpace, Ae);
|
|
27068
27068
|
if (Ve) {
|
|
27069
27069
|
var Ue = Ve.transform.orientation, $e = new THREE.Quaternion(Ue.x, Ue.y, Ue.z, Ue.w), Be = new THREE.Vector3(0, 0, -1).applyQuaternion($e), de = new THREE.Raycaster(this.camera.position, Be);
|
|
27070
27070
|
this.gazeRay = de;
|
|
@@ -27076,7 +27076,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27076
27076
|
var We = le.xrManager.controllers[yt], nt = Ee[yt];
|
|
27077
27077
|
if (!nt)
|
|
27078
27078
|
return "continue";
|
|
27079
|
-
We && We.update(nt,
|
|
27079
|
+
We && We.update(nt, fe, Ae);
|
|
27080
27080
|
var at = le.xrManager.getController(yt), Mt = new THREE.Vector3(0, 1.2, 0), bt = at.position.clone().add(pe).sub(Mt);
|
|
27081
27081
|
nt.handedness === "left" ? le.xrControllerRay.left.set(bt, new THREE.Vector3(0, 0, -1).applyEuler(at.rotation)) : nt.handedness === "right" && le.xrControllerRay.right.set(bt, new THREE.Vector3(0, 0, -1).applyEuler(at.rotation)), le.controllerWrappers[yt].position.copy(new THREE.Vector3(0, 0, 0).add(pe).sub(Mt));
|
|
27082
27082
|
var pt = le.modelScene.intersectRaycaster(le.xrControllerRay.right);
|
|
@@ -27106,15 +27106,15 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27106
27106
|
return le.hideIntersectMesh(), { value: void 0 };
|
|
27107
27107
|
} else
|
|
27108
27108
|
le.pointerLines.left.setPoints(bt, pt[0].point);
|
|
27109
|
-
}, le = this,
|
|
27110
|
-
var Ce = Se(
|
|
27109
|
+
}, le = this, re = 0; re < Ee.length; re++) {
|
|
27110
|
+
var Ce = Se(re);
|
|
27111
27111
|
if (typeof Ce == "object")
|
|
27112
27112
|
return Ce.value;
|
|
27113
27113
|
}
|
|
27114
27114
|
this.updateControllerHelper(Ee, e, r);
|
|
27115
27115
|
}
|
|
27116
27116
|
} else
|
|
27117
|
-
|
|
27117
|
+
fe || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
|
|
27118
27118
|
var we = this.works.getResolvedObserver(this.currentPano);
|
|
27119
27119
|
if (this.camera.pose.distance > 0.1 || F)
|
|
27120
27120
|
for (var Ze = 0, ye = Object.keys(this.panoMeshes); Ze < ye.length; Ze++) {
|
|
@@ -27183,7 +27183,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27183
27183
|
this.tiling.setObserver(null);
|
|
27184
27184
|
var be = {
|
|
27185
27185
|
renderer: this.renderer,
|
|
27186
|
-
resolution:
|
|
27186
|
+
resolution: ge,
|
|
27187
27187
|
pixelRatio: 1,
|
|
27188
27188
|
time: this.camera.time,
|
|
27189
27189
|
cameraMatrix: this.xrManager.cameraVR.matrixWorld,
|
|
@@ -27200,7 +27200,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
27200
27200
|
this.tiling.setObserver(D);
|
|
27201
27201
|
var be = {
|
|
27202
27202
|
renderer: this.renderer,
|
|
27203
|
-
resolution:
|
|
27203
|
+
resolution: ge,
|
|
27204
27204
|
pixelRatio: 1,
|
|
27205
27205
|
time: this.camera.time,
|
|
27206
27206
|
cameraMatrix: this.xrManager.cameraVR.matrixWorld,
|
|
@@ -28481,7 +28481,7 @@ void main() {
|
|
|
28481
28481
|
}
|
|
28482
28482
|
return Object.defineProperty(t, "version", {
|
|
28483
28483
|
get: function() {
|
|
28484
|
-
return "6.5.
|
|
28484
|
+
return "6.5.11";
|
|
28485
28485
|
},
|
|
28486
28486
|
enumerable: !1,
|
|
28487
28487
|
configurable: !0
|
|
@@ -28615,19 +28615,14 @@ void main() {
|
|
|
28615
28615
|
}
|
|
28616
28616
|
}
|
|
28617
28617
|
}, t.prototype.refresh = function(e, r) {
|
|
28618
|
+
var o, s;
|
|
28618
28619
|
if (e === void 0 && (e = {}), !!this.renderer) {
|
|
28619
|
-
var
|
|
28620
|
-
|
|
28621
|
-
|
|
28622
|
-
|
|
28623
|
-
|
|
28624
|
-
|
|
28625
|
-
}
|
|
28626
|
-
var d = new THREE.Vector2();
|
|
28627
|
-
this.renderer.getDrawingBufferSize(d), this.needsRender = !0, this.modelSceneNeedsRender = !0;
|
|
28628
|
-
var h = now(), p = h - this.currentUpdateArgs.time, g = this.currentUpdateArgs.args;
|
|
28629
|
-
this.updateTime(h, p, g);
|
|
28630
|
-
}
|
|
28620
|
+
var u = this.renderer.domElement, l = u.parentNode, c = e.width, f = c === void 0 ? (o = l == null ? void 0 : l.offsetWidth) !== null && o !== void 0 ? o : 512 : c, d = e.height, h = d === void 0 ? (s = l == null ? void 0 : l.offsetHeight) !== null && s !== void 0 ? s : 512 : d;
|
|
28621
|
+
r = r != null ? r : this.renderer.getPixelRatio();
|
|
28622
|
+
var p = this.renderer.capabilities.maxTextureSize, g = Math.max(f, h) * r;
|
|
28623
|
+
g > p && (r = r / g * p, r = Math.floor(r * 100) / 100), this.renderer.setPixelRatio(r), this.renderer.setSize(f, h), this.needsRender = !0, this.modelSceneNeedsRender = !0;
|
|
28624
|
+
var A = now(), m = A - this.currentUpdateArgs.time, E = this.currentUpdateArgs.args;
|
|
28625
|
+
this.updateTime(A, m, E);
|
|
28631
28626
|
}
|
|
28632
28627
|
}, t.prototype.addExtraElement = function(e) {
|
|
28633
28628
|
var r = this;
|
|
@@ -28711,17 +28706,17 @@ void main() {
|
|
|
28711
28706
|
}
|
|
28712
28707
|
else
|
|
28713
28708
|
E.push(parseWork(e));
|
|
28714
|
-
for (var T = createWorks(E), S = function(
|
|
28715
|
-
var
|
|
28716
|
-
allowHosts:
|
|
28709
|
+
for (var T = createWorks(E), S = function(Y) {
|
|
28710
|
+
var ee = R, ie = new Fetcher({
|
|
28711
|
+
allowHosts: Y.allowHosts,
|
|
28717
28712
|
get requestProxy() {
|
|
28718
|
-
return
|
|
28713
|
+
return ee.requestProxy;
|
|
28719
28714
|
},
|
|
28720
28715
|
get networkSubscribe() {
|
|
28721
|
-
return
|
|
28716
|
+
return ee.networkSubscribe;
|
|
28722
28717
|
}
|
|
28723
28718
|
});
|
|
28724
|
-
registerFetcher(
|
|
28719
|
+
registerFetcher(Y, ie);
|
|
28725
28720
|
}, R = this, M = 0, w = T; M < w.length; M++) {
|
|
28726
28721
|
var F = w[M];
|
|
28727
28722
|
S(F);
|
|
@@ -28780,8 +28775,8 @@ void main() {
|
|
|
28780
28775
|
offset: r.offset
|
|
28781
28776
|
};
|
|
28782
28777
|
}
|
|
28783
|
-
var N = __assign(__assign(__assign({}, I), { mode: B }), O), V = this.getCurrentState(),
|
|
28784
|
-
(B === "Floorplan" || B === "Topview" || B === "Mapview") && this.currentMode === B && (
|
|
28778
|
+
var N = __assign(__assign(__assign({}, I), { mode: B }), O), V = this.getCurrentState(), X = (p = m.duration) !== null && p !== void 0 ? p : this.modeChangeDuration;
|
|
28779
|
+
(B === "Floorplan" || B === "Topview" || B === "Mapview") && this.currentMode === B && (X = 0);
|
|
28785
28780
|
var D = "fly";
|
|
28786
28781
|
(B === "Panorama" || B === "VRPanorama" || B === "XRPanorama") && this.currentMode === B && (D = (g = m.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
|
|
28787
28782
|
input: e,
|
|
@@ -28791,48 +28786,48 @@ void main() {
|
|
|
28791
28786
|
}));
|
|
28792
28787
|
var J = function() {
|
|
28793
28788
|
u.pano = I;
|
|
28794
|
-
var
|
|
28789
|
+
var Y = __assign(__assign({ initial: {
|
|
28795
28790
|
state: N,
|
|
28796
28791
|
currentState: V,
|
|
28797
|
-
duration:
|
|
28792
|
+
duration: X,
|
|
28798
28793
|
effect: D,
|
|
28799
28794
|
userAction: s
|
|
28800
|
-
} }, u.commonParams()), u.controllerInits[B]),
|
|
28795
|
+
} }, u.commonParams()), u.controllerInits[B]), ee = Controllers[B].initAnimationEndState(Y);
|
|
28801
28796
|
if (u.controller && u.currentMode === B)
|
|
28802
|
-
u.controller.updateWork(T,
|
|
28797
|
+
u.controller.updateWork(T, ee, { effect: D, duration: X }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(B, Y));
|
|
28803
28798
|
else {
|
|
28804
|
-
var
|
|
28799
|
+
var ie = u.currentMode;
|
|
28805
28800
|
if (u.controller)
|
|
28806
28801
|
u.controller.destroy();
|
|
28807
28802
|
else {
|
|
28808
|
-
var
|
|
28809
|
-
u.camera.setFromPose(
|
|
28803
|
+
var ne = Controllers[B].initAnimationEndState(Y);
|
|
28804
|
+
u.camera.setFromPose(ne), u.emit("camera.update", createEvent("camera.update", {
|
|
28810
28805
|
state: u.getCurrentState(),
|
|
28811
28806
|
userAction: s
|
|
28812
28807
|
}));
|
|
28813
28808
|
}
|
|
28814
|
-
u.controller = u.applyController(B,
|
|
28815
|
-
var
|
|
28816
|
-
prevMode:
|
|
28809
|
+
u.controller = u.applyController(B, Y);
|
|
28810
|
+
var K = createEvent("mode.change", {
|
|
28811
|
+
prevMode: ie,
|
|
28817
28812
|
mode: B,
|
|
28818
|
-
state:
|
|
28813
|
+
state: ee,
|
|
28819
28814
|
userAction: s
|
|
28820
28815
|
});
|
|
28821
28816
|
try {
|
|
28822
|
-
u.emit("mode.change",
|
|
28823
|
-
} catch (
|
|
28824
|
-
console.error(
|
|
28817
|
+
u.emit("mode.change", K);
|
|
28818
|
+
} catch (j) {
|
|
28819
|
+
console.error(j);
|
|
28825
28820
|
}
|
|
28826
28821
|
}
|
|
28827
28822
|
u.updateTime(u.currentUpdateArgs.time, 0, u.currentUpdateArgs.args);
|
|
28828
28823
|
};
|
|
28829
28824
|
worksMap.set(this, T);
|
|
28830
|
-
var
|
|
28825
|
+
var U = Promise.resolve();
|
|
28831
28826
|
if (B === t.Mode.Floorplan || B === t.Mode.Topview || B === t.Mode.Mapview || B === t.Mode.Model) {
|
|
28832
28827
|
this.modelScene.loaded === !1 && (this.camera.setFromPose(N), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = B);
|
|
28833
28828
|
var q = this.loadModels(T, m);
|
|
28834
|
-
|
|
28835
|
-
return
|
|
28829
|
+
U = Promise.all(q.map(function(Y) {
|
|
28830
|
+
return Y.loadedReady;
|
|
28836
28831
|
})).then(function() {
|
|
28837
28832
|
u.needsRender = !0, u.modelSceneNeedsRender = !0, J(), u.emit("camera.update", createEvent("camera.update", {
|
|
28838
28833
|
state: u.getCurrentState(),
|
|
@@ -28843,31 +28838,31 @@ void main() {
|
|
|
28843
28838
|
J();
|
|
28844
28839
|
var G = !1;
|
|
28845
28840
|
this.modelScene.autoRefine = !1;
|
|
28846
|
-
var
|
|
28841
|
+
var Z = function() {
|
|
28847
28842
|
u.works === T && G === !1 && (u.needsRender = !0, u.modelSceneNeedsRender = !0, u.emit("camera.update", createEvent("camera.update", {
|
|
28848
28843
|
state: u.getCurrentState(),
|
|
28849
28844
|
userAction: s
|
|
28850
28845
|
})), G = !0, u.modelScene.autoRefine = !0);
|
|
28851
28846
|
}, q = this.loadModels(T, m);
|
|
28852
|
-
|
|
28853
|
-
return
|
|
28854
|
-
})).then(noop$1), this.controller.once("pano.arrived",
|
|
28847
|
+
U = Promise.all(q.map(function(ee) {
|
|
28848
|
+
return ee.initReady;
|
|
28849
|
+
})).then(noop$1), this.controller.once("pano.arrived", Z), this.controller.once("pano.cancel", Z), setTimeout(Z, ((A = m.duration) !== null && A !== void 0 ? A : this.modeChangeDuration) + 1e3);
|
|
28855
28850
|
}
|
|
28856
28851
|
return this.emit("works.load", createEvent("works.load", {
|
|
28857
28852
|
input: e,
|
|
28858
28853
|
state: this.getCurrentState(),
|
|
28859
28854
|
userAction: s,
|
|
28860
28855
|
works: T
|
|
28861
|
-
})),
|
|
28856
|
+
})), U.then(function() {
|
|
28862
28857
|
return u.ready();
|
|
28863
28858
|
}).then(function() {
|
|
28864
|
-
var
|
|
28859
|
+
var Y;
|
|
28865
28860
|
u.emit("works.ready", createEvent("works.ready", {
|
|
28866
28861
|
input: e,
|
|
28867
28862
|
state: u.getCurrentState(),
|
|
28868
28863
|
userAction: s,
|
|
28869
28864
|
works: T
|
|
28870
|
-
})), (
|
|
28865
|
+
})), (Y = u.analysis) === null || Y === void 0 || Y.work(T);
|
|
28871
28866
|
});
|
|
28872
28867
|
}, t.prototype.reset = function() {
|
|
28873
28868
|
var e = this, r = this.loadWorkTask.then(function() {
|