@realsee/five 6.7.0-alpha.30 → 6.7.0-alpha.32
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/functions/five.loadAt3d.html +1 -1
- package/five/index.js +18 -18
- package/five/index.mjs +1102 -1092
- 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 +18 -18
- 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: 12/
|
|
5
|
-
* Version: 6.7.0-alpha.
|
|
4
|
+
* Generated: 12/22/2025
|
|
5
|
+
* Version: 6.7.0-alpha.32
|
|
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] = P, this._doCryptBlock(M, w, this._invKeySchedule, c, f, d, h, r), P = M[w + 1], M[w + 1] = M[w + 3], M[w + 3] = P;
|
|
759
759
|
},
|
|
760
760
|
_doCryptBlock: function(M, w, P, _, I, C, H, L) {
|
|
761
|
-
for (var O = this._nRounds, U = M[w] ^ P[0], j = M[w + 1] ^ P[1],
|
|
762
|
-
var q = _[U >>> 24] ^ I[j >>> 16 & 255] ^ C[
|
|
763
|
-
q = (L[U >>> 24] << 24 | L[j >>> 16 & 255] << 16 | L[
|
|
761
|
+
for (var O = this._nRounds, U = M[w] ^ P[0], j = M[w + 1] ^ P[1], K = M[w + 2] ^ P[2], V = M[w + 3] ^ P[3], k = 4, D = 1; D < O; D++)
|
|
762
|
+
var q = _[U >>> 24] ^ I[j >>> 16 & 255] ^ C[K >>> 8 & 255] ^ H[V & 255] ^ P[k++], z = _[j >>> 24] ^ I[K >>> 16 & 255] ^ C[V >>> 8 & 255] ^ H[U & 255] ^ P[k++], J = _[K >>> 24] ^ I[V >>> 16 & 255] ^ C[U >>> 8 & 255] ^ H[j & 255] ^ P[k++], V = _[V >>> 24] ^ I[U >>> 16 & 255] ^ C[j >>> 8 & 255] ^ H[K & 255] ^ P[k++], U = q, j = z, K = J;
|
|
763
|
+
q = (L[U >>> 24] << 24 | L[j >>> 16 & 255] << 16 | L[K >>> 8 & 255] << 8 | L[V & 255]) ^ P[k++], z = (L[j >>> 24] << 24 | L[K >>> 16 & 255] << 16 | L[V >>> 8 & 255] << 8 | L[U & 255]) ^ P[k++], J = (L[K >>> 24] << 24 | L[V >>> 16 & 255] << 16 | L[U >>> 8 & 255] << 8 | L[j & 255]) ^ P[k++], V = (L[V >>> 24] << 24 | L[U >>> 16 & 255] << 16 | L[j >>> 8 & 255] << 8 | L[K & 255]) ^ P[k++], M[w] = q, M[w + 1] = z, M[w + 2] = J, M[w + 3] = V;
|
|
764
764
|
},
|
|
765
765
|
keySize: 8
|
|
766
766
|
});
|
|
@@ -3191,20 +3191,20 @@ function X509(n) {
|
|
|
3191
3191
|
var z = JSON.stringify(q.array).replace(/[\[\]\{\}\"]/g, "");
|
|
3192
3192
|
return z;
|
|
3193
3193
|
}, A = function(q) {
|
|
3194
|
-
for (var z = "",
|
|
3195
|
-
var U = V
|
|
3194
|
+
for (var z = "", J = q.array, V = 0; V < J.length; V++) {
|
|
3195
|
+
var U = J[V];
|
|
3196
3196
|
if (z += " policy oid: " + U.policyoid + `
|
|
3197
3197
|
`, U.array !== void 0)
|
|
3198
3198
|
for (var j = 0; j < U.array.length; j++) {
|
|
3199
|
-
var
|
|
3200
|
-
|
|
3199
|
+
var K = U.array[j];
|
|
3200
|
+
K.cps !== void 0 && (z += " cps: " + K.cps + `
|
|
3201
3201
|
`);
|
|
3202
3202
|
}
|
|
3203
3203
|
}
|
|
3204
3204
|
return z;
|
|
3205
3205
|
}, b = function(q) {
|
|
3206
|
-
for (var z = "",
|
|
3207
|
-
var U = V
|
|
3206
|
+
for (var z = "", J = q.array, V = 0; V < J.length; V++) {
|
|
3207
|
+
var U = J[V];
|
|
3208
3208
|
try {
|
|
3209
3209
|
U.dpname.full[0].uri !== void 0 && (z += " " + U.dpname.full[0].uri + `
|
|
3210
3210
|
`);
|
|
@@ -3218,8 +3218,8 @@ function X509(n) {
|
|
|
3218
3218
|
}
|
|
3219
3219
|
return z;
|
|
3220
3220
|
}, T = function(q) {
|
|
3221
|
-
for (var z = "",
|
|
3222
|
-
var U = V
|
|
3221
|
+
for (var z = "", J = q.array, V = 0; V < J.length; V++) {
|
|
3222
|
+
var U = J[V];
|
|
3223
3223
|
U.caissuer !== void 0 && (z += " caissuer: " + U.caissuer + `
|
|
3224
3224
|
`), U.ocsp !== void 0 && (z += " ocsp: " + U.ocsp + `
|
|
3225
3225
|
`);
|
|
@@ -3959,9 +3959,9 @@ var PBMCustomShader = (
|
|
|
3959
3959
|
`));
|
|
3960
3960
|
var q = String(r.clippers.length);
|
|
3961
3961
|
v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, q), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, q);
|
|
3962
|
-
for (var z = 0,
|
|
3963
|
-
var
|
|
3964
|
-
|
|
3962
|
+
for (var z = 0, J = C; z < J.length; z++) {
|
|
3963
|
+
var V = J[z];
|
|
3964
|
+
V.onBeforeCompile && V.onBeforeCompile(v, A);
|
|
3965
3965
|
}
|
|
3966
3966
|
};
|
|
3967
3967
|
var c = "";
|
|
@@ -5199,13 +5199,13 @@ function ajax(n, t, e, r, o) {
|
|
|
5199
5199
|
}
|
|
5200
5200
|
var L = w.split(","), O = (L[0].match(/:(.*?);/) || [])[1], k = L[1];
|
|
5201
5201
|
if (t.responseType === "arraybuffer" || t.responseType === "blob") {
|
|
5202
|
-
for (var D = atob(L[1]), q = D.length, z = new Uint8Array(q),
|
|
5203
|
-
z[
|
|
5202
|
+
for (var D = atob(L[1]), q = D.length, z = new Uint8Array(q), J = 0; J < q; J++)
|
|
5203
|
+
z[J] = D.charCodeAt(J);
|
|
5204
5204
|
t.responseType === "arraybuffer" ? k = z.buffer : k = new Blob([z], { type: O });
|
|
5205
5205
|
}
|
|
5206
|
-
var
|
|
5206
|
+
var V = {}, U = {
|
|
5207
5207
|
body: k,
|
|
5208
|
-
meta: { origin: u, source: l, requestTime: s, responseTime: I, costs: C, headers:
|
|
5208
|
+
meta: { origin: u, source: l, requestTime: s, responseTime: I, costs: C, headers: V }
|
|
5209
5209
|
};
|
|
5210
5210
|
e(U), c(U), (_ = t.networkSubscribe) === null || _ === void 0 || _.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(U.meta)), g = !0;
|
|
5211
5211
|
}
|
|
@@ -6066,8 +6066,8 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
|
|
|
6066
6066
|
t[FACE_ORDER$2[5]]
|
|
6067
6067
|
], S = [], R = [0, 0, 0, 0, 0, 0], M = [], w = function(_) {
|
|
6068
6068
|
var I = (h = (d = e.imageURL) === null || d === void 0 ? void 0 : d.options) !== null && h !== void 0 ? h : { key: "unknown" }, C = applyImageURLOptions(T[_], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, I), { key: I.key + "." + FACE_ORDER$2[_] })), H = function(q) {
|
|
6069
|
-
R[_] = q, s(R.reduce(function(z,
|
|
6070
|
-
return z +
|
|
6069
|
+
R[_] = q, s(R.reduce(function(z, J) {
|
|
6070
|
+
return z + J;
|
|
6071
6071
|
}, 0) / 6);
|
|
6072
6072
|
}, L = (g = e.viaAjax) !== null && g !== void 0 ? g : !1;
|
|
6073
6073
|
if (L) {
|
|
@@ -7367,42 +7367,42 @@ function loadPbm(n, t) {
|
|
|
7367
7367
|
var e, r, o, s, u, l;
|
|
7368
7368
|
t === void 0 && (t = {});
|
|
7369
7369
|
for (var c = (e = t.upAxis) !== null && e !== void 0 ? e : "Z", f = (r = t.light) !== null && r !== void 0 ? r : !1, d = (o = t.fetcher) !== null && o !== void 0 ? o : internalFetcher, h = (s = t.textureBaseUri) !== null && s !== void 0 ? s : guessTextureBaseUriFromFileUrl(n), p = t.textureBaseUri === void 0 ? [] : ((u = t.textureArray) !== null && u !== void 0 ? u : []).slice(), g = autoRestImageOptionsByTextureLength((l = t.textureOptions) !== null && l !== void 0 ? l : {}, p.length), m = /* @__PURE__ */ new Map(), E = 0, y = p; E < y.length; E++) {
|
|
7370
|
-
var v = y[E];
|
|
7371
|
-
m.set(
|
|
7370
|
+
var v = y[E], A = isAbsoluteURL(v) ? v : pathJoin(h, v);
|
|
7371
|
+
m.set(A, loadTexture$1(A, g, d));
|
|
7372
7372
|
}
|
|
7373
|
-
var
|
|
7373
|
+
var b = {
|
|
7374
7374
|
byteLength: 0
|
|
7375
7375
|
};
|
|
7376
7376
|
return Promise.resolve().then(function() {
|
|
7377
7377
|
return d.ajax(n, {
|
|
7378
7378
|
responseType: "arraybuffer"
|
|
7379
7379
|
});
|
|
7380
|
-
}).then(function(
|
|
7381
|
-
|
|
7382
|
-
var
|
|
7383
|
-
return Model$2.decode(
|
|
7384
|
-
}).then(function(
|
|
7385
|
-
return parse$4(
|
|
7386
|
-
}).then(function(
|
|
7380
|
+
}).then(function(T) {
|
|
7381
|
+
b.byteLength = T.body.byteLength;
|
|
7382
|
+
var S = new Uint8Array(T.body);
|
|
7383
|
+
return Model$2.decode(S);
|
|
7384
|
+
}).then(function(T) {
|
|
7385
|
+
return parse$4(T, f, h, p, g, m, d);
|
|
7386
|
+
}).then(function(T) {
|
|
7387
7387
|
m.clear();
|
|
7388
|
-
var
|
|
7389
|
-
|
|
7390
|
-
for (var
|
|
7391
|
-
var
|
|
7392
|
-
|
|
7388
|
+
var S = new THREE.Group();
|
|
7389
|
+
S.name = n;
|
|
7390
|
+
for (var R = 0, M = T.objects; R < M.length; R++) {
|
|
7391
|
+
var w = M[R];
|
|
7392
|
+
S.add(w);
|
|
7393
7393
|
}
|
|
7394
|
-
return c === "Y" &&
|
|
7394
|
+
return c === "Y" && S.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
|
|
7395
7395
|
type: "pbm",
|
|
7396
7396
|
modelUpAxis: "Z",
|
|
7397
7397
|
upAxis: c,
|
|
7398
7398
|
uri: n,
|
|
7399
|
-
byteLength:
|
|
7400
|
-
memoryUsage: getMemoryUsage(
|
|
7401
|
-
scene:
|
|
7402
|
-
textures:
|
|
7399
|
+
byteLength: b.byteLength,
|
|
7400
|
+
memoryUsage: getMemoryUsage(S),
|
|
7401
|
+
scene: S,
|
|
7402
|
+
textures: T.textures,
|
|
7403
7403
|
animations: [],
|
|
7404
7404
|
dispose: function() {
|
|
7405
|
-
return
|
|
7405
|
+
return T.dispose();
|
|
7406
7406
|
}
|
|
7407
7407
|
};
|
|
7408
7408
|
});
|
|
@@ -7438,8 +7438,8 @@ function parsePBMModel(n) {
|
|
|
7438
7438
|
break;
|
|
7439
7439
|
}
|
|
7440
7440
|
}
|
|
7441
|
-
for (var m = n.chunks.sort(function(
|
|
7442
|
-
return chunkOrder(
|
|
7441
|
+
for (var m = n.chunks.sort(function(ne, te) {
|
|
7442
|
+
return chunkOrder(ne) - chunkOrder(te);
|
|
7443
7443
|
}), E = [], y = 0, v = m; y < v.length; y++) {
|
|
7444
7444
|
var h = v[y], A = parseFloorName(h.name);
|
|
7445
7445
|
E[A] || (E[A] = []), E[A].push(h);
|
|
@@ -7453,11 +7453,11 @@ function parsePBMModel(n) {
|
|
|
7453
7453
|
S += h.faces.indices.length;
|
|
7454
7454
|
}
|
|
7455
7455
|
for (var M = new Float32Array(S * 3), w = new Float32Array(S * 2), P = new Float32Array(S * 3), _ = c ? new Float32Array(S) : void 0, I = [], C = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], H = 0, L = 0; L < T.length; L++) {
|
|
7456
|
-
for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz, D = h.vertices.uvs, q = h.faces.indices, z = h.faces.normals,
|
|
7457
|
-
var U = q[R], j = M[H * 3 + R * 3] = k[U * 3],
|
|
7458
|
-
_ && (_[H + R] =
|
|
7456
|
+
for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz, D = h.vertices.uvs, q = h.faces.indices, z = h.faces.normals, J = h.vertices.marks, V = q.length, R = 0; R < V; R++) {
|
|
7457
|
+
var U = q[R], j = M[H * 3 + R * 3] = k[U * 3], K = M[H * 3 + R * 3 + 1] = k[U * 3 + 1], ie = M[H * 3 + R * 3 + 2] = k[U * 3 + 2];
|
|
7458
|
+
_ && (_[H + R] = J[U]), w[H * 2 + R * 2] = D[U * 2], w[H * 2 + R * 2 + 1] = D[U * 2 + 1];
|
|
7459
7459
|
var re = Math.floor(R / 3) * 3;
|
|
7460
|
-
P[H * 3 + R * 3] = z[re], P[H * 3 + R * 3 + 1] = z[re + 1], P[H * 3 + R * 3 + 2] = z[re + 2], j < O[0] && (O[0] = j),
|
|
7460
|
+
P[H * 3 + R * 3] = z[re], P[H * 3 + R * 3 + 1] = z[re + 1], P[H * 3 + R * 3 + 2] = z[re + 2], j < O[0] && (O[0] = j), K < O[1] && (O[1] = K), ie < O[2] && (O[2] = ie), j > O[3] && (O[3] = j), K > O[4] && (O[4] = K), ie > O[5] && (O[5] = ie);
|
|
7461
7461
|
}
|
|
7462
7462
|
O[0] < C[0] && (C[0] = O[0]), O[1] < C[1] && (C[1] = O[1]), O[2] < C[2] && (C[2] = O[2]), O[3] > C[3] && (C[3] = O[3]), O[4] > C[4] && (C[4] = O[4]), O[5] > C[5] && (C[5] = O[5]), I.push({
|
|
7463
7463
|
materialIndex: L,
|
|
@@ -7466,9 +7466,9 @@ function parsePBMModel(n) {
|
|
|
7466
7466
|
start: H,
|
|
7467
7467
|
count: h.faces.indices.length,
|
|
7468
7468
|
texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
|
|
7469
|
-
}), H +=
|
|
7469
|
+
}), H += V;
|
|
7470
7470
|
}
|
|
7471
|
-
var
|
|
7471
|
+
var ee = {
|
|
7472
7472
|
createAt: o,
|
|
7473
7473
|
description: s,
|
|
7474
7474
|
vertices: M,
|
|
@@ -7480,30 +7480,30 @@ function parsePBMModel(n) {
|
|
|
7480
7480
|
groups: I,
|
|
7481
7481
|
extents: C
|
|
7482
7482
|
};
|
|
7483
|
-
u.push(
|
|
7483
|
+
u.push(ee);
|
|
7484
7484
|
} else {
|
|
7485
|
-
for (var S = 0,
|
|
7485
|
+
for (var S = 0, Z = 0, R = 0; R < T.length; R++) {
|
|
7486
7486
|
var h = T[R];
|
|
7487
|
-
|
|
7487
|
+
Z += h.vertices.xyz.length / 3, S += h.faces.indices.length;
|
|
7488
7488
|
}
|
|
7489
|
-
for (var M = new Float32Array(
|
|
7490
|
-
for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz,
|
|
7491
|
-
var j = M[H * 3 + R * 3] = k[R * 3],
|
|
7492
|
-
_ && (_[H + R] =
|
|
7489
|
+
for (var M = new Float32Array(Z * 3), w = new Float32Array(Z * 2), P = void 0, X = new Float32Array(Z), se = new Uint32Array(S), _ = c ? new Float32Array(S) : void 0, I = [], C = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], G = 0, H = 0, L = 0; L < T.length; L++) {
|
|
7490
|
+
for (var O = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[L], k = h.vertices.xyz, W = h.vertices.marks, D = h.vertices.uvs, q = h.faces.indices, $ = k.length / 3, V = q.length, R = 0; R < $; R++) {
|
|
7491
|
+
var j = M[H * 3 + R * 3] = k[R * 3], K = M[H * 3 + R * 3 + 1] = k[R * 3 + 1], ie = M[H * 3 + R * 3 + 2] = k[R * 3 + 2];
|
|
7492
|
+
_ && (_[H + R] = W[R]), w[H * 2 + R * 2] = D[R * 2], w[H * 2 + R * 2 + 1] = D[R * 2 + 1], X[H + R] = b, j < O[0] && (O[0] = j), K < O[1] && (O[1] = K), ie < O[2] && (O[2] = ie), j > O[3] && (O[3] = j), K > O[4] && (O[4] = K), ie > O[5] && (O[5] = ie);
|
|
7493
7493
|
}
|
|
7494
7494
|
O[0] < C[0] && (C[0] = O[0]), O[1] < C[1] && (C[1] = O[1]), O[2] < C[2] && (C[2] = O[2]), O[3] > C[3] && (C[3] = O[3]), O[4] > C[4] && (C[4] = O[4]), O[5] > C[5] && (C[5] = O[5]);
|
|
7495
|
-
for (var R = 0; R <
|
|
7496
|
-
se[
|
|
7495
|
+
for (var R = 0; R < V; R++)
|
|
7496
|
+
se[G + R] = H + q[R];
|
|
7497
7497
|
I.push({
|
|
7498
7498
|
materialIndex: L,
|
|
7499
7499
|
name: h.name,
|
|
7500
7500
|
chunkName: parseChunkName(h.name),
|
|
7501
|
-
start:
|
|
7501
|
+
start: G,
|
|
7502
7502
|
count: h.faces.indices.length,
|
|
7503
7503
|
texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
|
|
7504
|
-
}), H +=
|
|
7504
|
+
}), H += $, G += V;
|
|
7505
7505
|
}
|
|
7506
|
-
var
|
|
7506
|
+
var ee = {
|
|
7507
7507
|
createAt: o,
|
|
7508
7508
|
description: s,
|
|
7509
7509
|
vertices: M,
|
|
@@ -7515,27 +7515,27 @@ function parsePBMModel(n) {
|
|
|
7515
7515
|
groups: I,
|
|
7516
7516
|
extents: C
|
|
7517
7517
|
};
|
|
7518
|
-
u.push(
|
|
7518
|
+
u.push(ee);
|
|
7519
7519
|
}
|
|
7520
7520
|
}
|
|
7521
7521
|
return u;
|
|
7522
7522
|
}
|
|
7523
|
-
function loadTexture$1(n, t, e
|
|
7524
|
-
var
|
|
7525
|
-
return
|
|
7523
|
+
function loadTexture$1(n, t, e) {
|
|
7524
|
+
var r = __assign({ key: "texture.pbm" }, pick(t, ["format", "quality", "size", "sharpen", "forceUseExifOrientation", "mappings"])), o = new TextureLoader();
|
|
7525
|
+
return o.loadTexture(n, {
|
|
7526
7526
|
imageURL: {
|
|
7527
|
-
transform:
|
|
7528
|
-
options:
|
|
7527
|
+
transform: t.transform,
|
|
7528
|
+
options: r
|
|
7529
7529
|
},
|
|
7530
7530
|
encoding: THREE.sRGBEncoding,
|
|
7531
7531
|
wrapS: THREE.ClampToEdgeWrapping,
|
|
7532
7532
|
wrapT: THREE.ClampToEdgeWrapping,
|
|
7533
7533
|
minFilter: THREE.LinearFilter,
|
|
7534
|
-
maxSize: typeof
|
|
7535
|
-
fetcher:
|
|
7536
|
-
}).then(function(
|
|
7537
|
-
var
|
|
7538
|
-
return
|
|
7534
|
+
maxSize: typeof r.size == "number" ? new THREE.Vector2(r.size, r.size) : void 0,
|
|
7535
|
+
fetcher: e
|
|
7536
|
+
}).then(function(s) {
|
|
7537
|
+
var u = s.body;
|
|
7538
|
+
return u.needsUpdate = !0, u;
|
|
7539
7539
|
});
|
|
7540
7540
|
}
|
|
7541
7541
|
function parse$4(n, t, e, r, o, s, u) {
|
|
@@ -7553,9 +7553,9 @@ function parse$4(n, t, e, r, o, s, u) {
|
|
|
7553
7553
|
var O = q[D], z = void 0;
|
|
7554
7554
|
if (O.texture) {
|
|
7555
7555
|
if (z = O.texture, r.length > 0 && r.indexOf(O.texture) === -1) {
|
|
7556
|
-
for (var
|
|
7557
|
-
var U =
|
|
7558
|
-
if (
|
|
7556
|
+
for (var J = 0, V = r; J < V.length; J++) {
|
|
7557
|
+
var U = V[J], j = isAbsoluteURL(U) ? U : pathJoin(e, U), K = j.slice(O.texture.length * -1) === O.texture;
|
|
7558
|
+
if (K) {
|
|
7559
7559
|
z = U;
|
|
7560
7560
|
break;
|
|
7561
7561
|
}
|
|
@@ -7571,37 +7571,37 @@ function parse$4(n, t, e, r, o, s, u) {
|
|
|
7571
7571
|
re.name = "model_floor_" + w, re.userData.createAt = v, re.userData.description = A, re.matrix.compose(re.position, re.quaternion, re.scale), re.matrixAutoUpdate = !1, re.frustumCulled = !1, c = v, f = A, d.push(re);
|
|
7572
7572
|
}
|
|
7573
7573
|
o = autoRestImageOptionsByTextureLength(o, g);
|
|
7574
|
-
for (var
|
|
7575
|
-
var
|
|
7576
|
-
s && (
|
|
7577
|
-
for (var ne = 0,
|
|
7578
|
-
var
|
|
7579
|
-
|
|
7580
|
-
}
|
|
7581
|
-
return
|
|
7574
|
+
for (var ee = [], Z = function(G) {
|
|
7575
|
+
var W = void 0;
|
|
7576
|
+
s && (W = s.get(G)), W || (W = loadTexture$1(G, o, u), s && s.set(G, W)), ee.push(W.then(function($) {
|
|
7577
|
+
for (var ne = 0, te = h[G]; ne < te.length; ne++) {
|
|
7578
|
+
var ve = te[ne];
|
|
7579
|
+
ve.map && (p.delete(ve.map), ve.map.dispose()), ve.map = $, p.add($);
|
|
7580
|
+
}
|
|
7581
|
+
return $;
|
|
7582
7582
|
}).catch(function() {
|
|
7583
|
-
for (var
|
|
7584
|
-
var
|
|
7585
|
-
|
|
7583
|
+
for (var $ = 0, ne = h[G]; $ < ne.length; $++) {
|
|
7584
|
+
var te = ne[$];
|
|
7585
|
+
te.map && (p.delete(te.map), te.map.dispose()), te.map = null, te.color = new THREE.Color(16777215);
|
|
7586
7586
|
}
|
|
7587
7587
|
return null;
|
|
7588
7588
|
}));
|
|
7589
|
-
},
|
|
7590
|
-
var
|
|
7591
|
-
|
|
7589
|
+
}, X = 0, se = Object.keys(h); X < se.length; X++) {
|
|
7590
|
+
var z = se[X];
|
|
7591
|
+
Z(z);
|
|
7592
7592
|
}
|
|
7593
|
-
return Promise.all(
|
|
7594
|
-
var
|
|
7595
|
-
return
|
|
7593
|
+
return Promise.all(ee).then(function(G) {
|
|
7594
|
+
var W = G.filter(function($) {
|
|
7595
|
+
return $ instanceof THREE.Texture;
|
|
7596
7596
|
});
|
|
7597
7597
|
return {
|
|
7598
7598
|
createAt: c,
|
|
7599
7599
|
description: f,
|
|
7600
7600
|
objects: d,
|
|
7601
|
-
textures:
|
|
7601
|
+
textures: W,
|
|
7602
7602
|
dispose: function() {
|
|
7603
|
-
p.forEach(function(
|
|
7604
|
-
|
|
7603
|
+
p.forEach(function($) {
|
|
7604
|
+
$.dispose();
|
|
7605
7605
|
}), p.clear();
|
|
7606
7606
|
}
|
|
7607
7607
|
};
|
|
@@ -7960,54 +7960,54 @@ function loadAt3d(n, t) {
|
|
|
7960
7960
|
var e, r, o, s, u, l;
|
|
7961
7961
|
t === void 0 && (t = {});
|
|
7962
7962
|
for (var c = (e = t.upAxis) !== null && e !== void 0 ? e : "Z", f = (r = t.light) !== null && r !== void 0 ? r : !1, d = (o = t.fetcher) !== null && o !== void 0 ? o : internalFetcher, h = (s = t.textureBaseUri) !== null && s !== void 0 ? s : guessTextureBaseUriFromFileUrl(n), p = t.textureBaseUri === void 0 ? [] : ((u = t.textureArray) !== null && u !== void 0 ? u : []).slice(), g = autoRestImageOptionsByTextureLength((l = t.textureOptions) !== null && l !== void 0 ? l : {}, p.length), m = /* @__PURE__ */ new Map(), E = 0, y = p; E < y.length; E++) {
|
|
7963
|
-
var v = y[E];
|
|
7964
|
-
m.set(
|
|
7963
|
+
var v = y[E], A = isAbsoluteURL(v) ? v : pathJoin(h, v);
|
|
7964
|
+
m.set(A, loadTexture$1(A, g, d));
|
|
7965
7965
|
}
|
|
7966
|
-
var
|
|
7966
|
+
var b = {
|
|
7967
7967
|
byteLength: 0
|
|
7968
7968
|
};
|
|
7969
7969
|
return Promise.resolve().then(function() {
|
|
7970
7970
|
return d.ajax(n, {
|
|
7971
7971
|
responseType: "arraybuffer"
|
|
7972
7972
|
});
|
|
7973
|
-
}).then(function(
|
|
7974
|
-
return lzma(
|
|
7975
|
-
}).then(function(
|
|
7976
|
-
for (var
|
|
7973
|
+
}).then(function(T) {
|
|
7974
|
+
return lzma(T.body);
|
|
7975
|
+
}).then(function(T) {
|
|
7976
|
+
for (var S = {
|
|
7977
7977
|
chunks: [],
|
|
7978
7978
|
createAt: void 0,
|
|
7979
7979
|
description: void 0
|
|
7980
|
-
},
|
|
7981
|
-
var
|
|
7982
|
-
if (
|
|
7983
|
-
for (var
|
|
7984
|
-
|
|
7985
|
-
|
|
7980
|
+
}, R = 0, M = T; R < M.length; R++) {
|
|
7981
|
+
var w = M[R], P = Model$2.decode(w);
|
|
7982
|
+
if (P.chunks.length) {
|
|
7983
|
+
for (var _ = 0; _ < P.chunks.length; _++)
|
|
7984
|
+
S.chunks.push(P.chunks[_]);
|
|
7985
|
+
S.createAt = P.createAt, S.description = P.description;
|
|
7986
7986
|
}
|
|
7987
7987
|
}
|
|
7988
|
-
return
|
|
7989
|
-
}).then(function(
|
|
7990
|
-
return parse$4(
|
|
7991
|
-
}).then(function(
|
|
7988
|
+
return S;
|
|
7989
|
+
}).then(function(T) {
|
|
7990
|
+
return parse$4(T, f, h, p, g, m, d);
|
|
7991
|
+
}).then(function(T) {
|
|
7992
7992
|
m.clear();
|
|
7993
|
-
var
|
|
7994
|
-
|
|
7995
|
-
for (var
|
|
7996
|
-
var
|
|
7997
|
-
|
|
7993
|
+
var S = new THREE.Group();
|
|
7994
|
+
S.name = n;
|
|
7995
|
+
for (var R = 0, M = T.objects; R < M.length; R++) {
|
|
7996
|
+
var w = M[R];
|
|
7997
|
+
S.add(w);
|
|
7998
7998
|
}
|
|
7999
|
-
return c === "Y" &&
|
|
7999
|
+
return c === "Y" && S.applyMatrix4(ROTATE_X_MATRIX_INVERSE), {
|
|
8000
8000
|
type: "at3d",
|
|
8001
8001
|
modelUpAxis: "Z",
|
|
8002
8002
|
upAxis: c,
|
|
8003
8003
|
uri: n,
|
|
8004
|
-
byteLength:
|
|
8005
|
-
memoryUsage: getMemoryUsage(
|
|
8006
|
-
scene:
|
|
8007
|
-
textures:
|
|
8004
|
+
byteLength: b.byteLength,
|
|
8005
|
+
memoryUsage: getMemoryUsage(S),
|
|
8006
|
+
scene: S,
|
|
8007
|
+
textures: T.textures,
|
|
8008
8008
|
animations: [],
|
|
8009
8009
|
dispose: function() {
|
|
8010
|
-
return
|
|
8010
|
+
return T.dispose();
|
|
8011
8011
|
}
|
|
8012
8012
|
};
|
|
8013
8013
|
});
|
|
@@ -8582,8 +8582,8 @@ function parse$3(n, t, e, r, o) {
|
|
|
8582
8582
|
objects: s,
|
|
8583
8583
|
textures: Array.from(E),
|
|
8584
8584
|
dispose: function() {
|
|
8585
|
-
l.forEach(function(
|
|
8586
|
-
|
|
8585
|
+
l.forEach(function(J) {
|
|
8586
|
+
J.dispose();
|
|
8587
8587
|
}), l.clear();
|
|
8588
8588
|
}
|
|
8589
8589
|
};
|
|
@@ -8990,12 +8990,12 @@ var Parser = (
|
|
|
8990
8990
|
Promise.all(m)
|
|
8991
8991
|
]).then(function(M) {
|
|
8992
8992
|
for (var w = M[0], P = M[1], _ = M[2], I = M[3], C = M[4], H = [], L = function(q, z) {
|
|
8993
|
-
var
|
|
8994
|
-
if (
|
|
8993
|
+
var J = w[q], V = P[q], U = _[q], j = I[q], K = C[q];
|
|
8994
|
+
if (J === void 0)
|
|
8995
8995
|
return "continue";
|
|
8996
|
-
|
|
8996
|
+
J.updateMatrix(), J.matrixAutoUpdate = !0;
|
|
8997
8997
|
var ie = void 0;
|
|
8998
|
-
switch (PATH_PROPERTIES[
|
|
8998
|
+
switch (PATH_PROPERTIES[K.path]) {
|
|
8999
8999
|
case PATH_PROPERTIES.weights:
|
|
9000
9000
|
ie = THREE.NumberKeyframeTrack;
|
|
9001
9001
|
break;
|
|
@@ -9008,19 +9008,19 @@ var Parser = (
|
|
|
9008
9008
|
ie = THREE.VectorKeyframeTrack;
|
|
9009
9009
|
break;
|
|
9010
9010
|
}
|
|
9011
|
-
var re =
|
|
9012
|
-
PATH_PROPERTIES[
|
|
9013
|
-
|
|
9014
|
-
}) :
|
|
9015
|
-
var
|
|
9011
|
+
var re = J.name ? J.name : J.uuid, ee = j.interpolation !== void 0 ? INTERPOLATION[j.interpolation] : THREE.InterpolateLinear, Z = [];
|
|
9012
|
+
PATH_PROPERTIES[K.path] === PATH_PROPERTIES.weights ? J.traverse(function(te) {
|
|
9013
|
+
te.morphTargetInfluences && Z.push(te.name ? te.name : te.uuid);
|
|
9014
|
+
}) : Z.push(re);
|
|
9015
|
+
var X = U.array;
|
|
9016
9016
|
if (U.normalized) {
|
|
9017
|
-
for (var se = getNormalizedComponentScale(
|
|
9018
|
-
W
|
|
9019
|
-
|
|
9017
|
+
for (var se = getNormalizedComponentScale(X.constructor), G = new Float32Array(X.length), W = 0, $ = X.length; W < $; W++)
|
|
9018
|
+
G[W] = X[W] * se;
|
|
9019
|
+
X = G;
|
|
9020
9020
|
}
|
|
9021
|
-
for (var
|
|
9022
|
-
var
|
|
9023
|
-
H.push(
|
|
9021
|
+
for (var W = 0, $ = Z.length; W < $; W++) {
|
|
9022
|
+
var ne = new ie(Z[W] + "." + PATH_PROPERTIES[K.path], V.array, X, ee);
|
|
9023
|
+
H.push(ne);
|
|
9024
9024
|
}
|
|
9025
9025
|
}, O = 0, k = w.length; O < k; O++)
|
|
9026
9026
|
L(O);
|
|
@@ -11677,11 +11677,11 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11677
11677
|
return e || new u8(0);
|
|
11678
11678
|
var u = !e, l = u || t.i != 2, c = t.i;
|
|
11679
11679
|
u && (e = new u8(o * 3));
|
|
11680
|
-
var f = function(
|
|
11681
|
-
var
|
|
11682
|
-
if (
|
|
11683
|
-
var
|
|
11684
|
-
|
|
11680
|
+
var f = function(G) {
|
|
11681
|
+
var W = e.length;
|
|
11682
|
+
if (G > W) {
|
|
11683
|
+
var $ = new u8(Math.max(W * 2, G));
|
|
11684
|
+
$.set(e), e = $;
|
|
11685
11685
|
}
|
|
11686
11686
|
}, d = t.f || 0, h = t.p || 0, p = t.b || 0, g = t.l, m = t.d, E = t.m, y = t.n, v = o * 8;
|
|
11687
11687
|
do {
|
|
@@ -11728,8 +11728,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11728
11728
|
}
|
|
11729
11729
|
}
|
|
11730
11730
|
l && f(p + 131072);
|
|
11731
|
-
for (var
|
|
11732
|
-
var k = g[bits16(n, h) &
|
|
11731
|
+
for (var J = (1 << E) - 1, V = (1 << y) - 1, U = h; ; U = h) {
|
|
11732
|
+
var k = g[bits16(n, h) & J], j = k >> 4;
|
|
11733
11733
|
if (h += k & 15, h > v) {
|
|
11734
11734
|
c && err(0);
|
|
11735
11735
|
break;
|
|
@@ -11740,16 +11740,16 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11740
11740
|
U = h, g = null;
|
|
11741
11741
|
break;
|
|
11742
11742
|
} else {
|
|
11743
|
-
var
|
|
11743
|
+
var K = j - 254;
|
|
11744
11744
|
if (j > 264) {
|
|
11745
11745
|
var I = j - 257, ie = fleb[I];
|
|
11746
|
-
|
|
11746
|
+
K = bits(n, h, (1 << ie) - 1) + fl[I], h += ie;
|
|
11747
11747
|
}
|
|
11748
|
-
var re = m[bits16(n, h) &
|
|
11748
|
+
var re = m[bits16(n, h) & V], ee = re >> 4;
|
|
11749
11749
|
re || err(3), h += re & 15;
|
|
11750
|
-
var z = fd[
|
|
11751
|
-
if (
|
|
11752
|
-
var ie = fdeb[
|
|
11750
|
+
var z = fd[ee];
|
|
11751
|
+
if (ee > 3) {
|
|
11752
|
+
var ie = fdeb[ee];
|
|
11753
11753
|
z += bits16(n, h) & (1 << ie) - 1, h += ie;
|
|
11754
11754
|
}
|
|
11755
11755
|
if (h > v) {
|
|
@@ -11757,13 +11757,13 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
|
|
|
11757
11757
|
break;
|
|
11758
11758
|
}
|
|
11759
11759
|
l && f(p + 131072);
|
|
11760
|
-
var
|
|
11760
|
+
var Z = p + K;
|
|
11761
11761
|
if (p < z) {
|
|
11762
|
-
var
|
|
11763
|
-
for (
|
|
11764
|
-
e[p] = r[
|
|
11762
|
+
var X = s - z, se = Math.min(z, Z);
|
|
11763
|
+
for (X + p < 0 && err(3); p < se; ++p)
|
|
11764
|
+
e[p] = r[X + p];
|
|
11765
11765
|
}
|
|
11766
|
-
for (; p <
|
|
11766
|
+
for (; p < Z; ++p)
|
|
11767
11767
|
e[p] = e[p - z];
|
|
11768
11768
|
}
|
|
11769
11769
|
}
|
|
@@ -13459,43 +13459,43 @@ function loadX3p(n, t) {
|
|
|
13459
13459
|
});
|
|
13460
13460
|
}
|
|
13461
13461
|
function parse$1(n, t) {
|
|
13462
|
-
for (var e, r, o, s, u, l, c, f, d, h, p, g, m, E, y, v, A, b, T, S, R, M, w, P, _, I, C, H, L, O, k, D, q, z,
|
|
13462
|
+
for (var e, r, o, s, u, l, c, f, d, h, p, g, m, E, y, v, A, b, T, S, R, M, w, P, _, I, C, H, L, O, k, D, q, z, J, V, U, j, K, ie, re, ee, Z, X, se, G, W, $, ne, te, ve, oe, fe, be, ae = unzipSync(n), ue = "", me = null, ge = 0, Ae = Object.keys(ae); ge < Ae.length; ge++) {
|
|
13463
13463
|
var Te = Ae[ge];
|
|
13464
|
-
/(^|\/)main\.xml$/i.test(Te) && (me =
|
|
13464
|
+
/(^|\/)main\.xml$/i.test(Te) && (me = ae[Te], ue = Te.slice(0, Te.lastIndexOf("/") + 1));
|
|
13465
13465
|
}
|
|
13466
13466
|
if (!me)
|
|
13467
13467
|
throw new Error("X3p: main.xml not found.");
|
|
13468
13468
|
if (typeof DOMParser == "undefined")
|
|
13469
13469
|
throw new Error("X3p: DOMParser not found.");
|
|
13470
|
-
var
|
|
13470
|
+
var he = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), Se = new DOMParser(), _e = decodeText(me), Ee = Se.parseFromString(_e, "text/xml"), de = Ee.querySelector("Record1 Axes"), Ve = {
|
|
13471
13471
|
x: {
|
|
13472
|
-
type: (s = (o = (r =
|
|
13473
|
-
dataType: (c = (l = (u =
|
|
13474
|
-
increment: Number((d = (f =
|
|
13475
|
-
offset: Number((p = (h =
|
|
13472
|
+
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",
|
|
13473
|
+
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",
|
|
13474
|
+
increment: Number((d = (f = de == null ? void 0 : de.querySelector("CX Increment")) === null || f === void 0 ? void 0 : f.textContent) !== null && d !== void 0 ? d : "1"),
|
|
13475
|
+
offset: Number((p = (h = de == null ? void 0 : de.querySelector("CX Offset")) === null || h === void 0 ? void 0 : h.textContent) !== null && p !== void 0 ? p : "0")
|
|
13476
13476
|
},
|
|
13477
13477
|
y: {
|
|
13478
|
-
type: (E = (m = (g =
|
|
13479
|
-
dataType: (A = (v = (y =
|
|
13480
|
-
increment: Number((T = (b =
|
|
13481
|
-
offset: Number((R = (S =
|
|
13478
|
+
type: (E = (m = (g = de == null ? void 0 : de.querySelector("CY AxisType")) === null || g === void 0 ? void 0 : g.textContent) === null || m === void 0 ? void 0 : m.toUpperCase()) !== null && E !== void 0 ? E : "I",
|
|
13479
|
+
dataType: (A = (v = (y = de == null ? void 0 : de.querySelector("CY DataType")) === null || y === void 0 ? void 0 : y.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && A !== void 0 ? A : "D",
|
|
13480
|
+
increment: Number((T = (b = de == null ? void 0 : de.querySelector("CY Increment")) === null || b === void 0 ? void 0 : b.textContent) !== null && T !== void 0 ? T : "1"),
|
|
13481
|
+
offset: Number((R = (S = de == null ? void 0 : de.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
|
|
13482
13482
|
},
|
|
13483
13483
|
z: {
|
|
13484
|
-
type: (P = (w = (M =
|
|
13485
|
-
dataType: (C = (I = (_ =
|
|
13486
|
-
increment: Number((L = (H =
|
|
13487
|
-
offset: Number((k = (O =
|
|
13484
|
+
type: (P = (w = (M = de == null ? void 0 : de.querySelector("CZ AxisType")) === null || M === void 0 ? void 0 : M.textContent) === null || w === void 0 ? void 0 : w.toUpperCase()) !== null && P !== void 0 ? P : "A",
|
|
13485
|
+
dataType: (C = (I = (_ = de == null ? void 0 : de.querySelector("CZ DataType")) === null || _ === void 0 ? void 0 : _.textContent) === null || I === void 0 ? void 0 : I.toUpperCase()) !== null && C !== void 0 ? C : "D",
|
|
13486
|
+
increment: Number((L = (H = de == null ? void 0 : de.querySelector("CZ Increment")) === null || H === void 0 ? void 0 : H.textContent) !== null && L !== void 0 ? L : "1"),
|
|
13487
|
+
offset: Number((k = (O = de == null ? void 0 : de.querySelector("CZ Offset")) === null || O === void 0 ? void 0 : O.textContent) !== null && k !== void 0 ? k : "0")
|
|
13488
13488
|
}
|
|
13489
13489
|
}, ye = null, Be = Ee.querySelector("Record1 Axes Rotation");
|
|
13490
|
-
Be && (ye = new THREE.Matrix3(), ye.set(Number((q = (D = Be.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && q !== void 0 ? q : 0), Number((
|
|
13491
|
-
var Ie = (
|
|
13490
|
+
Be && (ye = new THREE.Matrix3(), ye.set(Number((q = (D = Be.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && q !== void 0 ? q : 0), Number((J = (z = Be.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && J !== void 0 ? J : 0), Number((U = (V = Be.querySelector("r13")) === null || V === void 0 ? void 0 : V.textContent) !== null && U !== void 0 ? U : 0), Number((K = (j = Be.querySelector("r21")) === null || j === void 0 ? void 0 : j.textContent) !== null && K !== void 0 ? K : 0), Number((re = (ie = Be.querySelector("r22")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && re !== void 0 ? re : 0), Number((Z = (ee = Be.querySelector("r23")) === null || ee === void 0 ? void 0 : ee.textContent) !== null && Z !== void 0 ? Z : 0), Number((se = (X = Be.querySelector("r31")) === null || X === void 0 ? void 0 : X.textContent) !== null && se !== void 0 ? se : 0), Number((W = (G = Be.querySelector("r32")) === null || G === void 0 ? void 0 : G.textContent) !== null && W !== void 0 ? W : 0), Number((ne = ($ = Be.querySelector("r33")) === null || $ === void 0 ? void 0 : $.textContent) !== null && ne !== void 0 ? ne : 0)));
|
|
13491
|
+
var Ie = (te = Ee.querySelector("Record3 DataLink PointDataLink")) === null || te === void 0 ? void 0 : te.textContent;
|
|
13492
13492
|
if (typeof Ie != "string")
|
|
13493
13493
|
throw new Error("X3p: PointDataLink not found.");
|
|
13494
|
-
Ie = pathJoin(
|
|
13495
|
-
var $e =
|
|
13494
|
+
Ie = pathJoin(ue, Ie);
|
|
13495
|
+
var $e = ae[Ie];
|
|
13496
13496
|
if (!$e)
|
|
13497
13497
|
throw new Error("X3p: ".concat($e, " not found."));
|
|
13498
|
-
for (var Re = getPointArray($e.buffer, Ve.z.dataType), ze = Number((
|
|
13498
|
+
for (var Re = getPointArray($e.buffer, Ve.z.dataType), ze = Number((oe = (ve = Ee.querySelector("Record3 MatrixDimension SizeX")) === null || ve === void 0 ? void 0 : ve.textContent) !== null && oe !== void 0 ? oe : "0"), Fe = Number((be = (fe = Ee.querySelector("Record3 MatrixDimension SizeY")) === null || fe === void 0 ? void 0 : fe.textContent) !== null && be !== void 0 ? be : "0"), Oe = Math.floor(ze - 1), Le = Math.floor(Fe - 1), Ue = Oe + 1, tt = Le + 1, lt = new Float32Array(Ue * tt * 3), nt = new Float32Array(Ue * tt * 2), ot = new Uint32Array(Oe * Le * 6), At = new THREE.Box3(), We = 0; We < tt; We++)
|
|
13499
13499
|
for (var Ct = We * Ve.y.increment + Ve.y.offset, He = 0; He < Ue; He++) {
|
|
13500
13500
|
var Ne = We * Ue + He, bt = He * Ve.x.increment + Ve.x.offset, It = Re[Ne], Tt = !isNaN(It), yt = Tt ? It : NaN;
|
|
13501
13501
|
_vector.set(bt, -Ct, yt), ye && _vector.applyMatrix3(ye), Tt && At.expandByPoint(_vector), lt[Ne * 3 + 0] = _vector.x, lt[Ne * 3 + 1] = _vector.y, lt[Ne * 3 + 2] = _vector.z, nt[Ne * 2 + 0] = He / Oe, nt[Ne * 2 + 1] = 1 - We / Le;
|
|
@@ -13505,15 +13505,15 @@ function parse$1(n, t) {
|
|
|
13505
13505
|
var Rt = He + Ue * We, rt = He + Ue * (We + 1), it = He + 1 + Ue * (We + 1), ct = He + 1 + Ue * We, Xe = (We * Oe + He) * 6;
|
|
13506
13506
|
ot[Xe + 0] = Rt, ot[Xe + 1] = rt, ot[Xe + 2] = ct, ot[Xe + 3] = rt, ot[Xe + 4] = it, ot[Xe + 5] = ct;
|
|
13507
13507
|
}
|
|
13508
|
-
var
|
|
13509
|
-
|
|
13508
|
+
var ce = new THREE.BufferGeometry();
|
|
13509
|
+
ce.setAttribute("position", new THREE.BufferAttribute(lt, 3)), ce.setAttribute("uv", new THREE.BufferAttribute(nt, 2)), ce.setIndex(new THREE.BufferAttribute(ot, 1)), (!ce.groups || ce.groups.length === 0) && ce.addGroup(0, ce.index ? ce.index.count : ce.attributes.position.count, 0), ce.boundingBox = At;
|
|
13510
13510
|
var Me = new PBMMeshMaterial(t.light ? "phong" : "basic");
|
|
13511
|
-
Me.flatShading = !0, Me.color.copy(
|
|
13512
|
-
var Ce = new PBMMesh(
|
|
13511
|
+
Me.flatShading = !0, Me.color.copy(he);
|
|
13512
|
+
var Ce = new PBMMesh(ce, [Me]);
|
|
13513
13513
|
return {
|
|
13514
13514
|
object: Ce,
|
|
13515
13515
|
dispose: function() {
|
|
13516
|
-
|
|
13516
|
+
ce.dispose(), Me.dispose();
|
|
13517
13517
|
}
|
|
13518
13518
|
};
|
|
13519
13519
|
}
|
|
@@ -14144,14 +14144,14 @@ var BVHVector3 = (
|
|
|
14144
14144
|
function O(k) {
|
|
14145
14145
|
var D = k.startIndex, q = k.endIndex, z = k.extents;
|
|
14146
14146
|
C[0] = z[3] - z[0], C[1] = z[4] - z[1], C[2] = z[5] - z[2], H.sort(L);
|
|
14147
|
-
for (var
|
|
14148
|
-
for (var
|
|
14149
|
-
ie === -1 ? (re = u[j], l[re * 6 +
|
|
14147
|
+
for (var J = 0; J < 3; J++) {
|
|
14148
|
+
for (var V = H[J], U = z[V] + z[V + 3], j = D, K = q - 1, ie = -1, re = void 0; j <= K; )
|
|
14149
|
+
ie === -1 ? (re = u[j], l[re * 6 + V] + l[re * 6 + V + 3] < U ? j++ : ie = re) : (re = u[K], l[re * 6 + V] + l[re * 6 + V + 3] >= U || (u[j] = re, u[K] = ie, ie = -1, j++), K--);
|
|
14150
14150
|
if (j > D && j < q) {
|
|
14151
|
-
var
|
|
14152
|
-
|
|
14153
|
-
var
|
|
14154
|
-
|
|
14151
|
+
var ee = new BVHNode(++d, calcExtents(u, l, D, j, EPSILON$1), D, j, k.deepth + 1);
|
|
14152
|
+
ee.deepth < r && ee.endIndex - ee.startIndex > e && (c[f++] = ee);
|
|
14153
|
+
var Z = new BVHNode(++d, calcExtents(u, l, j, q, EPSILON$1), j, q, k.deepth + 1);
|
|
14154
|
+
Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z), k.node0 = ee, k.node1 = Z, k.startIndex = 0, k.endIndex = 0;
|
|
14155
14155
|
break;
|
|
14156
14156
|
}
|
|
14157
14157
|
}
|
|
@@ -14188,23 +14188,23 @@ var BVHVector3 = (
|
|
|
14188
14188
|
this.getPositionByIndex(L, O);
|
|
14189
14189
|
var k = O.x, D = O.y, q = O.z, z = new BVHVector3(0, 0, 0);
|
|
14190
14190
|
this.getPositionByIndex(L + 1, z);
|
|
14191
|
-
var
|
|
14191
|
+
var J = z.x, V = z.y, U = z.z, j = new BVHVector3(0, 0, 0);
|
|
14192
14192
|
this.getPositionByIndex(L + 2, j);
|
|
14193
|
-
var
|
|
14194
|
-
if (
|
|
14195
|
-
|
|
14196
|
-
else if (
|
|
14197
|
-
|
|
14193
|
+
var K = j.x, ie = j.y, re = j.z, ee = J - k, Z = V - D, X = U - q, se = K - k, G = ie - D, W = re - q, $ = Z * W - X * G, ne = X * se - ee * W, te = ee * G - Z * se, ve = M * $ + w * ne + P * te, oe = void 0;
|
|
14194
|
+
if (ve > 0)
|
|
14195
|
+
oe = 1;
|
|
14196
|
+
else if (ve < 0)
|
|
14197
|
+
oe = -1, ve = -ve;
|
|
14198
14198
|
else
|
|
14199
14199
|
continue;
|
|
14200
|
-
var
|
|
14201
|
-
if (!(
|
|
14202
|
-
var me =
|
|
14203
|
-
if (!(me < 0) && !(
|
|
14204
|
-
var ge = -
|
|
14200
|
+
var fe = T - k, be = S - D, ae = R - q, ue = oe * (M * (be * W - ae * G) + w * (ae * se - fe * W) + P * (fe * G - be * se));
|
|
14201
|
+
if (!(ue < 0)) {
|
|
14202
|
+
var me = oe * (M * (Z * ae - X * be) + w * (X * fe - ee * ae) + P * (ee * be - Z * fe));
|
|
14203
|
+
if (!(me < 0) && !(ue + me > ve)) {
|
|
14204
|
+
var ge = -oe * (fe * $ + be * ne + ae * te);
|
|
14205
14205
|
if (!(ge < 0)) {
|
|
14206
|
-
var Ae = ge /
|
|
14207
|
-
(!u || u(
|
|
14206
|
+
var Ae = ge / ve, Te = new BVHVector3(T + M * Ae, S + w * Ae, R + P * Ae), he = new BVHIntersect(O, z, j, H, Te);
|
|
14207
|
+
(!u || u(he)) && (s ? Ae < v && (v = Ae, l.length > 0 && (l.length = 0), l.push(he)) : l.push(he));
|
|
14208
14208
|
}
|
|
14209
14209
|
}
|
|
14210
14210
|
}
|
|
@@ -14266,19 +14266,19 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
|
|
|
14266
14266
|
function P(_) {
|
|
14267
14267
|
var I = _.startIndex, C = _.endIndex, H = _.extents;
|
|
14268
14268
|
R[0] = H[3] - H[0], R[1] = H[4] - H[1], R[2] = H[5] - H[2];
|
|
14269
|
-
for (var L = M.sort(w)[0], O = ORDER_AXISES[L], k = (H[L] + H[L + 3]) / 2, D = I, q = C - 1, z = -1,
|
|
14270
|
-
z === -1 ? (
|
|
14269
|
+
for (var L = M.sort(w)[0], O = ORDER_AXISES[L], k = (H[L] + H[L + 3]) / 2, D = I, q = C - 1, z = -1, J; D <= q; )
|
|
14270
|
+
z === -1 ? (J = l[D], s(J, scratchVector3$8), scratchVector3$8[O] < k ? D++ : z = J) : (J = l[q], s(J, scratchVector3$8), scratchVector3$8[O] >= k || (l[D] = J, l[q] = z, z = -1, D++), q--);
|
|
14271
14271
|
if (D > I) {
|
|
14272
|
-
var
|
|
14273
|
-
|
|
14274
|
-
var U = new BVHNode(++d,
|
|
14272
|
+
var V = H.slice();
|
|
14273
|
+
V[L + 3] = k + EPSILON;
|
|
14274
|
+
var U = new BVHNode(++d, V, I, D, _.deepth + 1);
|
|
14275
14275
|
U.deepth < r && U.endIndex - U.startIndex > e && (c[f++] = U), _.node0 = U;
|
|
14276
14276
|
}
|
|
14277
14277
|
if (C > D) {
|
|
14278
14278
|
var j = H.slice();
|
|
14279
14279
|
j[L] = k - EPSILON;
|
|
14280
|
-
var
|
|
14281
|
-
|
|
14280
|
+
var K = new BVHNode(++d, j, D, C, _.deepth + 1);
|
|
14281
|
+
K.deepth < r && K.endIndex - K.startIndex > e && (c[f++] = K), _.node1 = K;
|
|
14282
14282
|
}
|
|
14283
14283
|
_.startIndex = 0, _.endIndex = 0;
|
|
14284
14284
|
}
|
|
@@ -14297,12 +14297,12 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
|
|
|
14297
14297
|
this.getPositionByIndex(w, P);
|
|
14298
14298
|
var _ = P.x, I = P.y, C = P.z, H = e.x, L = e.y, O = e.z, k = r.x, D = r.y, q = r.z, z = k * (_ - H) + D * (I - L) + q * (C - O);
|
|
14299
14299
|
if (z > 0 ? (H += k * z, L += D * z, O += q * z) : z < 0 && (z = 0), k = _ - H, D = I - L, q = C - O, k * k + D * D + q * q <= g) {
|
|
14300
|
-
var
|
|
14301
|
-
(!u || u(
|
|
14300
|
+
var J = new BVHVector3(H, L, O), V = new BVHIntersect(P, P, P, w, J);
|
|
14301
|
+
(!u || u(V)) && (s ? z < A && (A = z, l.length > 0 && (l.length = 0), l.push(V)) : l.push(V));
|
|
14302
14302
|
}
|
|
14303
14303
|
}
|
|
14304
|
-
var U = y * BYTES_PER_NODE / 2, j = p[U + 16],
|
|
14305
|
-
j && E.push(j),
|
|
14304
|
+
var U = y * BYTES_PER_NODE / 2, j = p[U + 16], K = p[U + 17];
|
|
14305
|
+
j && E.push(j), K && E.push(K);
|
|
14306
14306
|
}
|
|
14307
14307
|
}
|
|
14308
14308
|
return l;
|
|
@@ -16471,16 +16471,16 @@ var Tile3D = (
|
|
|
16471
16471
|
requestOrder: E.requestOrder,
|
|
16472
16472
|
maxScreenSpaceError: E.maxScreenSpaceError,
|
|
16473
16473
|
memoryAdjustedScreenSpaceError: S
|
|
16474
|
-
}, P = E.cacheCameras.map(function(
|
|
16475
|
-
return
|
|
16474
|
+
}, P = E.cacheCameras.map(function(he) {
|
|
16475
|
+
return he.updateProjectionMatrix(), __assign(__assign({}, w), { camera: {
|
|
16476
16476
|
type: r.type,
|
|
16477
|
-
position: new THREE.Vector3().copy(
|
|
16478
|
-
direction:
|
|
16479
|
-
up: new THREE.Vector3().copy(
|
|
16480
|
-
projectionMatrix:
|
|
16481
|
-
visible:
|
|
16477
|
+
position: new THREE.Vector3().copy(he.position),
|
|
16478
|
+
direction: he.getWorldDirection(new THREE.Vector3()),
|
|
16479
|
+
up: new THREE.Vector3().copy(he.up),
|
|
16480
|
+
projectionMatrix: he.projectionMatrix.clone(),
|
|
16481
|
+
visible: he.visible,
|
|
16482
16482
|
refine: !0
|
|
16483
|
-
}, cullingVolume: new CullingVolume().setFromCamera(
|
|
16483
|
+
}, cullingVolume: new CullingVolume().setFromCamera(he) });
|
|
16484
16484
|
});
|
|
16485
16485
|
this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), m = !0);
|
|
16486
16486
|
var _ = !this.autoRefine;
|
|
@@ -16493,9 +16493,9 @@ var Tile3D = (
|
|
|
16493
16493
|
E.pano1 && H.setFromMatrixPosition(E.pano1.matrix), C.distanceTo(H) < 10 && (_ = !0);
|
|
16494
16494
|
}
|
|
16495
16495
|
}
|
|
16496
|
-
if (_ || this.tileset.update(w, P), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(
|
|
16497
|
-
if (u.refineProgress[1]++,
|
|
16498
|
-
var Se =
|
|
16496
|
+
if (_ || this.tileset.update(w, P), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(he) {
|
|
16497
|
+
if (u.refineProgress[1]++, he.content) {
|
|
16498
|
+
var Se = he.content.loadState;
|
|
16499
16499
|
if (Se === "UNLOADED" || Se === "LOADING") {
|
|
16500
16500
|
u.refined = !1;
|
|
16501
16501
|
return;
|
|
@@ -16505,15 +16505,15 @@ var Tile3D = (
|
|
|
16505
16505
|
}), this.loaded === !1 && this.autoRefine) {
|
|
16506
16506
|
this.loaded = !0;
|
|
16507
16507
|
var L = !1;
|
|
16508
|
-
this.tileset.needsRefinedTiles.forEach(function(
|
|
16509
|
-
if (u.loaded !== !1 &&
|
|
16508
|
+
this.tileset.needsRefinedTiles.forEach(function(he) {
|
|
16509
|
+
if (u.loaded !== !1 && he.content && (he.state.visible && (L = !0), E.minLevelOfDetail >= 0)) {
|
|
16510
16510
|
if (w.skipLevelOfDetail) {
|
|
16511
|
-
if (
|
|
16512
|
-
var Se =
|
|
16511
|
+
if (he.state.finalResolution) {
|
|
16512
|
+
var Se = he.state.ancestorWithContentAvailable, _e = Se && Se.content ? Se.content : he.content, Ee = _e.loadState;
|
|
16513
16513
|
(Ee === "UNLOADED" || Ee === "LOADING") && (u.loaded = !1);
|
|
16514
16514
|
}
|
|
16515
|
-
} else if (
|
|
16516
|
-
var Ee =
|
|
16515
|
+
} else if (he.state.visible && he.levelOfContent <= 0) {
|
|
16516
|
+
var Ee = he.content.loadState;
|
|
16517
16517
|
(Ee === "UNLOADED" || Ee === "LOADING") && (u.loaded = !1);
|
|
16518
16518
|
}
|
|
16519
16519
|
}
|
|
@@ -16522,49 +16522,49 @@ var Tile3D = (
|
|
|
16522
16522
|
this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0;
|
|
16523
16523
|
for (var O = this.children.length - 1; O >= 0; O--)
|
|
16524
16524
|
this.remove(this.children[O]);
|
|
16525
|
-
w.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(
|
|
16526
|
-
return
|
|
16525
|
+
w.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(he, Se) {
|
|
16526
|
+
return he.floor !== Se.floor ? he.floor - Se.floor : he.levelOfContent !== Se.levelOfContent ? Se.levelOfContent - he.levelOfContent : he.state.distanceToCamera !== Se.state.distanceToCamera ? he.state.distanceToCamera - Se.state.distanceToCamera : he.state.centerZDepth - Se.state.centerZDepth;
|
|
16527
16527
|
});
|
|
16528
16528
|
for (var k = [], D = 0, q = this.tileset.selectedTiles; D < q.length; D++) {
|
|
16529
|
-
var z = q[D],
|
|
16530
|
-
if (
|
|
16531
|
-
var
|
|
16532
|
-
if (k.push(z.id),
|
|
16529
|
+
var z = q[D], J = (p = (h = z.content) === null || h === void 0 ? void 0 : h.data) === null || p === void 0 ? void 0 : p.object;
|
|
16530
|
+
if (J) {
|
|
16531
|
+
var V = J.update(e, r, o, this, z, E);
|
|
16532
|
+
if (k.push(z.id), V && (m = !0), this.tileset.hasMixedContent && w.skipLevelOfDetail) {
|
|
16533
16533
|
if (!z.state.finalResolution) {
|
|
16534
|
-
var U = cloneSkipBackfaceObject(
|
|
16535
|
-
U.name = "skipBackface:" +
|
|
16534
|
+
var U = cloneSkipBackfaceObject(J);
|
|
16535
|
+
U.name = "skipBackface:" + J.name, this.backfaceObjects.push(U);
|
|
16536
16536
|
}
|
|
16537
|
-
for (var j = z.state.selectionDepth,
|
|
16538
|
-
var
|
|
16539
|
-
|
|
16537
|
+
for (var j = z.state.selectionDepth, K = STENCIL_CONSTANT.TILE_MASK | j << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, ie = THREE.GreaterEqualStencilFunc, re = STENCIL_CONSTANT.SKIP_LOD_MASK, ee = THREE.ReplaceStencilOp, Z = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, X = 0, se = J.materials; X < se.length; X++) {
|
|
16538
|
+
var G = se[X];
|
|
16539
|
+
G.stencilWrite = !0, G.stencilRef = K, G.stencilFunc = ie, G.stencilFuncMask = re, G.stencilZPass = ee, G.stencilWriteMask = Z;
|
|
16540
16540
|
}
|
|
16541
16541
|
} else
|
|
16542
|
-
for (var
|
|
16543
|
-
var
|
|
16544
|
-
|
|
16542
|
+
for (var W = 0, $ = J.materials; W < $.length; W++) {
|
|
16543
|
+
var G = $[W];
|
|
16544
|
+
G.stencilWrite = !1, G.stencilRef = STENCIL_CONSTANT.TILE_MASK, G.stencilFunc = THREE.AlwaysStencilFunc, G.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, G.stencilZPass = THREE.ReplaceStencilOp, G.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
|
|
16545
16545
|
}
|
|
16546
|
-
this.tileObjects.push(
|
|
16546
|
+
this.tileObjects.push(J);
|
|
16547
16547
|
}
|
|
16548
16548
|
}
|
|
16549
|
-
var
|
|
16550
|
-
if (tileVersionMap.get(this) !==
|
|
16549
|
+
var ne = k.toString();
|
|
16550
|
+
if (tileVersionMap.get(this) !== ne && (tileVersionMap.set(this, ne), m = !0), w.skipLevelOfDetail && this.backfaceObjects.length)
|
|
16551
16551
|
for (var O = 0; O < this.backfaceObjects.length; O++)
|
|
16552
16552
|
this.renderObjects.push(this.backfaceObjects[O]);
|
|
16553
16553
|
if (this.tileObjects.length)
|
|
16554
16554
|
for (var O = 0; O < this.tileObjects.length; O++)
|
|
16555
16555
|
this.renderObjects.push(this.tileObjects[O]);
|
|
16556
16556
|
w.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
|
|
16557
|
-
for (var
|
|
16558
|
-
var
|
|
16557
|
+
for (var te = [], ve = 0, oe = this.tileset.selectedTrajectories; ve < oe.length; ve++) {
|
|
16558
|
+
var fe = oe[ve], be = (g = fe.content.data) === null || g === void 0 ? void 0 : g.object;
|
|
16559
16559
|
if (be) {
|
|
16560
|
-
var
|
|
16561
|
-
|
|
16560
|
+
var V = be.update(e, r, o, this, fe, E);
|
|
16561
|
+
te.push(fe.id), V && (m = !0), this.renderObjects.push(be);
|
|
16562
16562
|
}
|
|
16563
16563
|
}
|
|
16564
|
-
var
|
|
16565
|
-
if (trajectoryVersionMap.get(this) !==
|
|
16566
|
-
for (var
|
|
16567
|
-
var Se = Te.renderObjects[
|
|
16564
|
+
var ae = te.toString();
|
|
16565
|
+
if (trajectoryVersionMap.get(this) !== ae && (trajectoryVersionMap.set(this, ae), m = !0), this.parent)
|
|
16566
|
+
for (var ue = this.parent.children.length + 1, me = Math.min(0, this.parent.children.indexOf(this)), ge = (me - ue) * 1e4 + 1, Ae = function(he) {
|
|
16567
|
+
var Se = Te.renderObjects[he], _e = he + ge;
|
|
16568
16568
|
Se.traverse(function(Ee) {
|
|
16569
16569
|
(Ee instanceof THREE.Mesh || Ee instanceof THREE.Line || Ee instanceof THREE.Points) && (Ee.renderOrder = _e);
|
|
16570
16570
|
});
|
|
@@ -17198,13 +17198,13 @@ function getEdgesBySphere(n, t, e) {
|
|
|
17198
17198
|
var f, d, h, p = (d = (f = c.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
|
|
17199
17199
|
if (p && p.visible) {
|
|
17200
17200
|
var g = [];
|
|
17201
|
-
if (p.traverseVisible(function(
|
|
17202
|
-
if (
|
|
17203
|
-
var U = getBvhTreeForMesh(
|
|
17201
|
+
if (p.traverseVisible(function(V) {
|
|
17202
|
+
if (V instanceof THREE.Mesh) {
|
|
17203
|
+
var U = getBvhTreeForMesh(V);
|
|
17204
17204
|
if (U) {
|
|
17205
|
-
scratchMatrix4$1.copy(
|
|
17206
|
-
var j = U.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius),
|
|
17207
|
-
|
|
17205
|
+
scratchMatrix4$1.copy(V.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
|
|
17206
|
+
var j = U.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), K = new THREE.BufferGeometry();
|
|
17207
|
+
K.setAttribute("position", new THREE.BufferAttribute(j, 3)), K.applyMatrix4(V.matrixWorld), K = mergeVertices(K, 0.01), g.push(K);
|
|
17208
17208
|
}
|
|
17209
17209
|
}
|
|
17210
17210
|
}), g.length === 0)
|
|
@@ -17225,8 +17225,8 @@ function getEdgesBySphere(n, t, e) {
|
|
|
17225
17225
|
for (var D in I) {
|
|
17226
17226
|
var q = I[D];
|
|
17227
17227
|
if (q.face2 === void 0 || b[q.face1].normal.dot(b[q.face2].normal) <= r) {
|
|
17228
|
-
var z = A[q.index1],
|
|
17229
|
-
o.push(new THREE.Line3(z,
|
|
17228
|
+
var z = A[q.index1], J = A[q.index2];
|
|
17229
|
+
o.push(new THREE.Line3(z, J));
|
|
17230
17230
|
}
|
|
17231
17231
|
}
|
|
17232
17232
|
A.length = 0, b.length = 0;
|
|
@@ -18114,8 +18114,8 @@ function parse(n, t) {
|
|
|
18114
18114
|
writable: !1,
|
|
18115
18115
|
value: Object.freeze(R.allowHosts)
|
|
18116
18116
|
});
|
|
18117
|
-
var C = S.reduce(function(
|
|
18118
|
-
return jsonMerge(
|
|
18117
|
+
var C = S.reduce(function(G, W) {
|
|
18118
|
+
return jsonMerge(G, W);
|
|
18119
18119
|
});
|
|
18120
18120
|
defineProperty(t, "name", {
|
|
18121
18121
|
enumerable: !0,
|
|
@@ -18134,8 +18134,8 @@ function parse(n, t) {
|
|
|
18134
18134
|
enumerable: !0,
|
|
18135
18135
|
writable: !0,
|
|
18136
18136
|
value: (function() {
|
|
18137
|
-
var
|
|
18138
|
-
return
|
|
18137
|
+
var G, W = (G = C.base_url) !== null && G !== void 0 ? G : "";
|
|
18138
|
+
return W && W[W.length - 1] !== "/" && (W += "/"), W;
|
|
18139
18139
|
})()
|
|
18140
18140
|
});
|
|
18141
18141
|
var H = void 0;
|
|
@@ -18149,25 +18149,25 @@ function parse(n, t) {
|
|
|
18149
18149
|
configurable: !1,
|
|
18150
18150
|
writable: !1,
|
|
18151
18151
|
value: (function() {
|
|
18152
|
-
var
|
|
18153
|
-
if (
|
|
18154
|
-
return relativeURL(
|
|
18152
|
+
var G = C.model.file_url;
|
|
18153
|
+
if (G)
|
|
18154
|
+
return relativeURL(G, t.baseURL);
|
|
18155
18155
|
})()
|
|
18156
18156
|
}), defineProperty(H, "textureBase", {
|
|
18157
18157
|
enumerable: !0,
|
|
18158
18158
|
configurable: !1,
|
|
18159
18159
|
writable: !1,
|
|
18160
18160
|
value: (function() {
|
|
18161
|
-
var
|
|
18162
|
-
return
|
|
18161
|
+
var G = C.model.material_base_url;
|
|
18162
|
+
return G && (G = relativeURL(G, t.baseURL)), G;
|
|
18163
18163
|
})()
|
|
18164
18164
|
}), defineProperty(H, "textures", {
|
|
18165
18165
|
enumerable: !0,
|
|
18166
18166
|
configurable: !1,
|
|
18167
18167
|
writable: !1,
|
|
18168
18168
|
value: (function() {
|
|
18169
|
-
var
|
|
18170
|
-
return Array.isArray(C.model.material_textures) && (
|
|
18169
|
+
var G = void 0;
|
|
18170
|
+
return Array.isArray(C.model.material_textures) && (G = C.model.material_textures.slice(), Object.freeze(G)), G;
|
|
18171
18171
|
})()
|
|
18172
18172
|
}), defineProperty(H, "upAxis", {
|
|
18173
18173
|
enumerable: !0,
|
|
@@ -18186,73 +18186,73 @@ function parse(n, t) {
|
|
|
18186
18186
|
configurable: !1,
|
|
18187
18187
|
writable: !1,
|
|
18188
18188
|
value: (function() {
|
|
18189
|
-
var
|
|
18189
|
+
var G, W, $, ne = [];
|
|
18190
18190
|
if (Array.isArray(C.model.layers))
|
|
18191
|
-
for (var
|
|
18192
|
-
var
|
|
18193
|
-
if (
|
|
18194
|
-
var
|
|
18195
|
-
defineProperty(
|
|
18191
|
+
for (var te = 0, ve = C.model.layers; te < ve.length; te++) {
|
|
18192
|
+
var oe = ve[te];
|
|
18193
|
+
if (oe && oe.tileset_url) {
|
|
18194
|
+
var fe = {};
|
|
18195
|
+
defineProperty(fe, "work", {
|
|
18196
18196
|
enumerable: !1,
|
|
18197
18197
|
configurable: !1,
|
|
18198
18198
|
writable: !1,
|
|
18199
18199
|
value: t
|
|
18200
|
-
}), defineProperty(
|
|
18200
|
+
}), defineProperty(fe, "name", {
|
|
18201
18201
|
enumerable: !0,
|
|
18202
18202
|
configurable: !1,
|
|
18203
18203
|
writable: !1,
|
|
18204
|
-
value: (
|
|
18205
|
-
}), defineProperty(
|
|
18204
|
+
value: (G = oe.name) !== null && G !== void 0 ? G : ""
|
|
18205
|
+
}), defineProperty(fe, "type", {
|
|
18206
18206
|
enumerable: !0,
|
|
18207
18207
|
configurable: !1,
|
|
18208
18208
|
writable: !1,
|
|
18209
|
-
value: (
|
|
18210
|
-
}), defineProperty(
|
|
18209
|
+
value: (W = oe.type) !== null && W !== void 0 ? W : "mesh"
|
|
18210
|
+
}), defineProperty(fe, "upAxis", {
|
|
18211
18211
|
enumerable: !0,
|
|
18212
18212
|
configurable: !1,
|
|
18213
18213
|
writable: !1,
|
|
18214
|
-
value: (
|
|
18215
|
-
}), defineProperty(
|
|
18214
|
+
value: ($ = oe.up_axis) !== null && $ !== void 0 ? $ : "Z"
|
|
18215
|
+
}), defineProperty(fe, "tileset", {
|
|
18216
18216
|
enumerable: !0,
|
|
18217
18217
|
configurable: !1,
|
|
18218
18218
|
writable: !1,
|
|
18219
|
-
value: relativeURL(
|
|
18220
|
-
}),
|
|
18219
|
+
value: relativeURL(oe.tileset_url, t.baseURL)
|
|
18220
|
+
}), ne.push(fe);
|
|
18221
18221
|
}
|
|
18222
18222
|
}
|
|
18223
18223
|
if (typeof C.model.tiles == "object") {
|
|
18224
|
-
var
|
|
18225
|
-
if (
|
|
18226
|
-
var
|
|
18227
|
-
defineProperty(
|
|
18224
|
+
var oe = C.model.tiles;
|
|
18225
|
+
if (oe && oe.tileset_url) {
|
|
18226
|
+
var fe = {};
|
|
18227
|
+
defineProperty(fe, "work", {
|
|
18228
18228
|
enumerable: !1,
|
|
18229
18229
|
configurable: !1,
|
|
18230
18230
|
writable: !1,
|
|
18231
18231
|
value: t
|
|
18232
|
-
}), defineProperty(
|
|
18232
|
+
}), defineProperty(fe, "name", {
|
|
18233
18233
|
enumerable: !0,
|
|
18234
18234
|
configurable: !1,
|
|
18235
18235
|
writable: !1,
|
|
18236
18236
|
value: "lod"
|
|
18237
|
-
}), defineProperty(
|
|
18237
|
+
}), defineProperty(fe, "type", {
|
|
18238
18238
|
enumerable: !0,
|
|
18239
18239
|
configurable: !1,
|
|
18240
18240
|
writable: !1,
|
|
18241
18241
|
value: "mesh"
|
|
18242
|
-
}), defineProperty(
|
|
18242
|
+
}), defineProperty(fe, "upAxis", {
|
|
18243
18243
|
enumerable: !0,
|
|
18244
18244
|
configurable: !1,
|
|
18245
18245
|
writable: !1,
|
|
18246
18246
|
value: "-Y"
|
|
18247
|
-
}), defineProperty(
|
|
18247
|
+
}), defineProperty(fe, "tileset", {
|
|
18248
18248
|
enumerable: !0,
|
|
18249
18249
|
configurable: !1,
|
|
18250
18250
|
writable: !1,
|
|
18251
|
-
value: relativeURL(
|
|
18252
|
-
}),
|
|
18251
|
+
value: relativeURL(oe.tileset_url, t.baseURL)
|
|
18252
|
+
}), ne.push(fe);
|
|
18253
18253
|
}
|
|
18254
18254
|
}
|
|
18255
|
-
return Object.freeze(
|
|
18255
|
+
return Object.freeze(ne);
|
|
18256
18256
|
})()
|
|
18257
18257
|
})), defineProperty(t, "model", {
|
|
18258
18258
|
enumerable: !0,
|
|
@@ -18262,197 +18262,197 @@ function parse(n, t) {
|
|
|
18262
18262
|
});
|
|
18263
18263
|
var L = [];
|
|
18264
18264
|
if (Array.isArray(C.observers) && C.panorama && Array.isArray(C.panorama.list || C.panorama.info)) {
|
|
18265
|
-
for (var O = C.observers, k = (r = C.panorama.list || C.panorama.info) !== null && r !== void 0 ? r : [], D = (f = (l = (s = (o = C.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = C.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = C.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", q = Math.min(O.length, k.length), z = {},
|
|
18266
|
-
var
|
|
18267
|
-
if (typeof
|
|
18268
|
-
var
|
|
18269
|
-
z[
|
|
18270
|
-
return
|
|
18265
|
+
for (var O = C.observers, k = (r = C.panorama.list || C.panorama.info) !== null && r !== void 0 ? r : [], D = (f = (l = (s = (o = C.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = C.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = C.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", q = Math.min(O.length, k.length), z = {}, J = function(G) {
|
|
18266
|
+
var W = G, $ = C.panorama.pattern[W];
|
|
18267
|
+
if (typeof $ == "string") {
|
|
18268
|
+
var ne = new StringPattern($);
|
|
18269
|
+
z[W] = function(te) {
|
|
18270
|
+
return ne.stringify(te);
|
|
18271
18271
|
};
|
|
18272
18272
|
} else
|
|
18273
|
-
z[
|
|
18274
|
-
return
|
|
18273
|
+
z[W] = function() {
|
|
18274
|
+
return $;
|
|
18275
18275
|
};
|
|
18276
|
-
},
|
|
18277
|
-
var j = U[
|
|
18278
|
-
|
|
18279
|
-
}
|
|
18280
|
-
for (var
|
|
18281
|
-
var
|
|
18282
|
-
return (
|
|
18283
|
-
}, ie = function(
|
|
18284
|
-
var
|
|
18285
|
-
defineProperty(
|
|
18276
|
+
}, V = 0, U = Object.keys((d = C.panorama.pattern) !== null && d !== void 0 ? d : {}); V < U.length; V++) {
|
|
18277
|
+
var j = U[V];
|
|
18278
|
+
J(j);
|
|
18279
|
+
}
|
|
18280
|
+
for (var K = function(G, W) {
|
|
18281
|
+
var $, ne = z[W];
|
|
18282
|
+
return ($ = G[W]) !== null && $ !== void 0 ? $ : ne ? ne(G) : void 0;
|
|
18283
|
+
}, ie = function(G) {
|
|
18284
|
+
var W = O[G], $ = k[G], ne = {};
|
|
18285
|
+
defineProperty(ne, "work", {
|
|
18286
18286
|
enumerable: !1,
|
|
18287
18287
|
configurable: !1,
|
|
18288
18288
|
writable: !1,
|
|
18289
18289
|
value: t
|
|
18290
|
-
}), defineProperty(
|
|
18290
|
+
}), defineProperty(ne, "index", {
|
|
18291
18291
|
enumerable: !0,
|
|
18292
18292
|
configurable: !1,
|
|
18293
18293
|
writable: !1,
|
|
18294
|
-
value:
|
|
18295
|
-
}), defineProperty(
|
|
18294
|
+
value: G
|
|
18295
|
+
}), defineProperty(ne, "panoIndex", {
|
|
18296
18296
|
enumerable: !0,
|
|
18297
18297
|
configurable: !1,
|
|
18298
18298
|
writable: !1,
|
|
18299
|
-
value:
|
|
18300
|
-
}), defineProperty(
|
|
18299
|
+
value: G
|
|
18300
|
+
}), defineProperty(ne, "panoId", {
|
|
18301
18301
|
enumerable: !0,
|
|
18302
18302
|
configurable: !1,
|
|
18303
18303
|
writable: !1,
|
|
18304
|
-
value: panoStringify({ workCode: t.workCode, panoIndex:
|
|
18305
|
-
}), defineProperty(
|
|
18304
|
+
value: panoStringify({ workCode: t.workCode, panoIndex: G })
|
|
18305
|
+
}), defineProperty(ne, "floorIndex", {
|
|
18306
18306
|
enumerable: !0,
|
|
18307
18307
|
configurable: !1,
|
|
18308
18308
|
writable: !1,
|
|
18309
|
-
value: (h =
|
|
18310
|
-
}), defineProperty(
|
|
18309
|
+
value: (h = W.floor_index) !== null && h !== void 0 ? h : W.floor
|
|
18310
|
+
}), defineProperty(ne, "derivedId", {
|
|
18311
18311
|
enumerable: !0,
|
|
18312
18312
|
configurable: !1,
|
|
18313
18313
|
writable: !1,
|
|
18314
|
-
value: (g = (p =
|
|
18315
|
-
}), defineProperty(
|
|
18314
|
+
value: (g = (p = W.derived_id) !== null && p !== void 0 ? p : K($, "derived_id")) !== null && g !== void 0 ? g : 0
|
|
18315
|
+
}), defineProperty(ne, "derivedIdStr", {
|
|
18316
18316
|
enumerable: !0,
|
|
18317
18317
|
configurable: !1,
|
|
18318
18318
|
writable: !1,
|
|
18319
|
-
value: (E = (m =
|
|
18320
|
-
}), defineProperty(
|
|
18319
|
+
value: (E = (m = W.derived_id_str) !== null && m !== void 0 ? m : K($, "derived_id_str")) !== null && E !== void 0 ? E : String(ne.derivedId)
|
|
18320
|
+
}), defineProperty(ne, "active", {
|
|
18321
18321
|
enumerable: !0,
|
|
18322
18322
|
configurable: !1,
|
|
18323
18323
|
writable: !1,
|
|
18324
|
-
value:
|
|
18325
|
-
}), defineProperty(
|
|
18324
|
+
value: W.active !== !1 && K($, "active") !== !1
|
|
18325
|
+
}), defineProperty(ne, "loadable", {
|
|
18326
18326
|
enumerable: !0,
|
|
18327
18327
|
configurable: !1,
|
|
18328
18328
|
writable: !1,
|
|
18329
|
-
value: (v = (y =
|
|
18330
|
-
}), defineProperty(
|
|
18329
|
+
value: (v = (y = W.loadable) !== null && y !== void 0 ? y : K($, "loadable")) !== null && v !== void 0 ? v : !1
|
|
18330
|
+
}), defineProperty(ne, "position", {
|
|
18331
18331
|
enumerable: !0,
|
|
18332
18332
|
configurable: !1,
|
|
18333
18333
|
writable: !1,
|
|
18334
|
-
value: Object.freeze(new THREE.Vector3().fromArray((A =
|
|
18335
|
-
}), defineProperty(
|
|
18334
|
+
value: Object.freeze(new THREE.Vector3().fromArray((A = W.position) !== null && A !== void 0 ? A : [0, 0, 0]))
|
|
18335
|
+
}), defineProperty(ne, "standingPosition", {
|
|
18336
18336
|
enumerable: !0,
|
|
18337
18337
|
configurable: !1,
|
|
18338
18338
|
writable: !1,
|
|
18339
|
-
value: Object.freeze(new THREE.Vector3().fromArray((T = (b =
|
|
18340
|
-
}), defineProperty(
|
|
18339
|
+
value: Object.freeze(new THREE.Vector3().fromArray((T = (b = W.standing_position) !== null && b !== void 0 ? b : W.standingPosition) !== null && T !== void 0 ? T : [0, 0, 0]))
|
|
18340
|
+
}), defineProperty(ne, "quaternion", {
|
|
18341
18341
|
enumerable: !0,
|
|
18342
18342
|
configurable: !1,
|
|
18343
18343
|
writable: !1,
|
|
18344
|
-
value: Object.freeze(new THREE.Quaternion().fromArray(
|
|
18345
|
-
}), defineProperty(
|
|
18344
|
+
value: Object.freeze(new THREE.Quaternion().fromArray(W.quaternion ? [W.quaternion.x, W.quaternion.y, W.quaternion.z, W.quaternion.w] : [0, 0, 0, 1]))
|
|
18345
|
+
}), defineProperty(ne, "matrix", {
|
|
18346
18346
|
enumerable: !0,
|
|
18347
18347
|
configurable: !1,
|
|
18348
18348
|
writable: !1,
|
|
18349
|
-
value: Object.freeze(new THREE.Matrix4().compose(
|
|
18350
|
-
}), defineProperty(
|
|
18349
|
+
value: Object.freeze(new THREE.Matrix4().compose(ne.position, ne.quaternion, PANO_TEXTURE_SCALE))
|
|
18350
|
+
}), defineProperty(ne, "accessibleNodes", {
|
|
18351
18351
|
enumerable: !0,
|
|
18352
18352
|
configurable: !1,
|
|
18353
18353
|
writable: !1,
|
|
18354
18354
|
value: (function() {
|
|
18355
|
-
if (accessibleNodesSet.clear(),
|
|
18356
|
-
for (var
|
|
18357
|
-
var
|
|
18358
|
-
|
|
18355
|
+
if (accessibleNodesSet.clear(), W.accessible_nodes && Array.isArray(W.accessible_nodes))
|
|
18356
|
+
for (var te = 0, ve = W.accessible_nodes; te < ve.length; te++) {
|
|
18357
|
+
var oe = ve[te];
|
|
18358
|
+
oe >= q || oe === G || accessibleNodesSet.add(oe);
|
|
18359
18359
|
}
|
|
18360
|
-
else if (
|
|
18361
|
-
for (var
|
|
18362
|
-
var
|
|
18363
|
-
|
|
18360
|
+
else if (W.accessibleNodes && Array.isArray(W.accessibleNodes))
|
|
18361
|
+
for (var fe = 0, be = W.accessibleNodes; fe < be.length; fe++) {
|
|
18362
|
+
var oe = be[fe];
|
|
18363
|
+
oe >= q || oe === G || accessibleNodesSet.add(oe);
|
|
18364
18364
|
}
|
|
18365
|
-
else if (
|
|
18366
|
-
for (var
|
|
18367
|
-
var
|
|
18368
|
-
|
|
18365
|
+
else if (W.visible_nodes && Array.isArray(W.visible_nodes))
|
|
18366
|
+
for (var ae = 0, ue = W.visible_nodes; ae < ue.length; ae++) {
|
|
18367
|
+
var oe = ue[ae];
|
|
18368
|
+
oe >= q || oe === G || accessibleNodesSet.add(oe);
|
|
18369
18369
|
}
|
|
18370
|
-
else if (
|
|
18371
|
-
for (var me = 0, ge =
|
|
18372
|
-
var
|
|
18373
|
-
|
|
18370
|
+
else if (W.visibleNodes && Array.isArray(W.visibleNodes))
|
|
18371
|
+
for (var me = 0, ge = W.visibleNodes; me < ge.length; me++) {
|
|
18372
|
+
var oe = ge[me];
|
|
18373
|
+
oe >= q || oe === G || accessibleNodesSet.add(oe);
|
|
18374
18374
|
}
|
|
18375
18375
|
if (accessibleNodesSet.size === 0)
|
|
18376
18376
|
for (var Ae = 0; Ae < q; Ae++)
|
|
18377
|
-
Ae !==
|
|
18377
|
+
Ae !== G && accessibleNodesSet.add(Ae);
|
|
18378
18378
|
var Te = Array.from(accessibleNodesSet);
|
|
18379
18379
|
return accessibleNodesSet.clear(), Object.freeze(Te);
|
|
18380
18380
|
})()
|
|
18381
|
-
}), defineProperty(
|
|
18381
|
+
}), defineProperty(ne, "visibleNodes", {
|
|
18382
18382
|
enumerable: !0,
|
|
18383
18383
|
configurable: !1,
|
|
18384
18384
|
writable: !1,
|
|
18385
|
-
value:
|
|
18386
|
-
}), defineProperty(
|
|
18385
|
+
value: ne.accessibleNodes
|
|
18386
|
+
}), defineProperty(ne, "images", {
|
|
18387
18387
|
enumerable: !0,
|
|
18388
18388
|
configurable: !1,
|
|
18389
18389
|
writable: !1,
|
|
18390
18390
|
value: (function() {
|
|
18391
|
-
var
|
|
18392
|
-
defineProperty(
|
|
18391
|
+
var te = {};
|
|
18392
|
+
defineProperty(te, "work", {
|
|
18393
18393
|
enumerable: !1,
|
|
18394
18394
|
configurable: !1,
|
|
18395
18395
|
writable: !1,
|
|
18396
18396
|
value: t
|
|
18397
18397
|
});
|
|
18398
|
-
for (var
|
|
18399
|
-
defineProperty(
|
|
18398
|
+
for (var ve = function(ae) {
|
|
18399
|
+
defineProperty(te, ae, {
|
|
18400
18400
|
enumerable: !0,
|
|
18401
18401
|
configurable: !1,
|
|
18402
18402
|
writable: !1,
|
|
18403
18403
|
value: (function() {
|
|
18404
|
-
var
|
|
18405
|
-
return relativeURL(panoURL((
|
|
18404
|
+
var ue;
|
|
18405
|
+
return relativeURL(panoURL((ue = K($, ae)) !== null && ue !== void 0 ? ue : "", D, G), t.baseURL);
|
|
18406
18406
|
})()
|
|
18407
18407
|
});
|
|
18408
|
-
},
|
|
18409
|
-
var be =
|
|
18410
|
-
|
|
18408
|
+
}, oe = 0, fe = FACE_ORDER$1; oe < fe.length; oe++) {
|
|
18409
|
+
var be = fe[oe];
|
|
18410
|
+
ve(be);
|
|
18411
18411
|
}
|
|
18412
|
-
return defineProperty(
|
|
18412
|
+
return defineProperty(te, "sizeList", {
|
|
18413
18413
|
enumerable: !0,
|
|
18414
18414
|
configurable: !1,
|
|
18415
18415
|
writable: !1,
|
|
18416
18416
|
value: (function() {
|
|
18417
|
-
var
|
|
18418
|
-
if (
|
|
18419
|
-
if (
|
|
18420
|
-
var ge =
|
|
18421
|
-
return Ee -
|
|
18417
|
+
var ae = getImageSizeFromURL(te[FACE_ORDER$1[0]]), ue = K($, "size_list"), me = K($, "tiles");
|
|
18418
|
+
if (ae) {
|
|
18419
|
+
if (ue) {
|
|
18420
|
+
var ge = ue.slice().sort(function(Ee, de) {
|
|
18421
|
+
return Ee - de;
|
|
18422
18422
|
});
|
|
18423
18423
|
return Object.freeze(ge);
|
|
18424
18424
|
} else if (me) {
|
|
18425
18425
|
for (var ge = [
|
|
18426
|
-
|
|
18427
|
-
], Ae = me.slice().sort(function(
|
|
18428
|
-
return
|
|
18429
|
-
}), Te = 0,
|
|
18430
|
-
var Se =
|
|
18431
|
-
_e >
|
|
18426
|
+
ae
|
|
18427
|
+
], Ae = me.slice().sort(function(de, Ve) {
|
|
18428
|
+
return de - Ve;
|
|
18429
|
+
}), Te = 0, he = Ae; Te < he.length; Te++) {
|
|
18430
|
+
var Se = he[Te], _e = 512 * Math.pow(2, Se);
|
|
18431
|
+
_e > ae && ge.push(_e);
|
|
18432
18432
|
}
|
|
18433
18433
|
return Object.freeze(ge);
|
|
18434
18434
|
}
|
|
18435
|
-
return Object.freeze([
|
|
18435
|
+
return Object.freeze([ae]);
|
|
18436
18436
|
}
|
|
18437
18437
|
return Object.freeze([]);
|
|
18438
18438
|
})()
|
|
18439
|
-
}), defineProperty(
|
|
18439
|
+
}), defineProperty(te, "tiles", {
|
|
18440
18440
|
enumerable: !0,
|
|
18441
18441
|
configurable: !1,
|
|
18442
18442
|
writable: !1,
|
|
18443
18443
|
value: (function() {
|
|
18444
|
-
var
|
|
18445
|
-
if (
|
|
18446
|
-
var
|
|
18447
|
-
if (
|
|
18448
|
-
var me = getTileLevel(
|
|
18444
|
+
var ae = getImageSizeFromURL(te.front);
|
|
18445
|
+
if (ae) {
|
|
18446
|
+
var ue = te.sizeList.slice();
|
|
18447
|
+
if (ue[0]) {
|
|
18448
|
+
var me = getTileLevel(ue[0]);
|
|
18449
18449
|
if (me)
|
|
18450
18450
|
for (var ge = me - 1; ge >= 0; ge--)
|
|
18451
|
-
|
|
18451
|
+
ue.unshift(512 * Math.pow(2, ge));
|
|
18452
18452
|
}
|
|
18453
|
-
if (!(
|
|
18454
|
-
for (var Ae = [], Te = 0,
|
|
18455
|
-
var Se =
|
|
18453
|
+
if (!(ue.length <= 0)) {
|
|
18454
|
+
for (var Ae = [], Te = 0, he = ue; Te < he.length; Te++) {
|
|
18455
|
+
var Se = he[Te], _e = getTileLevel(Se);
|
|
18456
18456
|
if (typeof _e == "number") {
|
|
18457
18457
|
var Ee = {};
|
|
18458
18458
|
if (defineProperty(Ee, "work", {
|
|
@@ -18465,7 +18465,7 @@ function parse(n, t) {
|
|
|
18465
18465
|
configurable: !1,
|
|
18466
18466
|
writable: !1,
|
|
18467
18467
|
value: _e
|
|
18468
|
-
}), Se >
|
|
18468
|
+
}), Se > ae) {
|
|
18469
18469
|
defineProperty(Ee, "size", {
|
|
18470
18470
|
enumerable: !0,
|
|
18471
18471
|
configurable: !1,
|
|
@@ -18477,13 +18477,13 @@ function parse(n, t) {
|
|
|
18477
18477
|
writable: !1,
|
|
18478
18478
|
value: 1
|
|
18479
18479
|
});
|
|
18480
|
-
for (var
|
|
18481
|
-
var ye = Ve[
|
|
18480
|
+
for (var de = 0, Ve = FACE_ORDER$1; de < Ve.length; de++) {
|
|
18481
|
+
var ye = Ve[de];
|
|
18482
18482
|
defineProperty(Ee, ye, {
|
|
18483
18483
|
enumerable: !0,
|
|
18484
18484
|
configurable: !1,
|
|
18485
18485
|
writable: !1,
|
|
18486
|
-
value: replaceImageSize(
|
|
18486
|
+
value: replaceImageSize(te[ye], Se)
|
|
18487
18487
|
});
|
|
18488
18488
|
}
|
|
18489
18489
|
} else {
|
|
@@ -18491,12 +18491,12 @@ function parse(n, t) {
|
|
|
18491
18491
|
enumerable: !0,
|
|
18492
18492
|
configurable: !1,
|
|
18493
18493
|
writable: !1,
|
|
18494
|
-
value:
|
|
18494
|
+
value: ae
|
|
18495
18495
|
}), defineProperty(Ee, "scale", {
|
|
18496
18496
|
enumerable: !0,
|
|
18497
18497
|
configurable: !1,
|
|
18498
18498
|
writable: !1,
|
|
18499
|
-
value: Se /
|
|
18499
|
+
value: Se / ae
|
|
18500
18500
|
});
|
|
18501
18501
|
for (var Be = 0, Ie = FACE_ORDER$1; Be < Ie.length; Be++) {
|
|
18502
18502
|
var ye = Ie[Be];
|
|
@@ -18504,7 +18504,7 @@ function parse(n, t) {
|
|
|
18504
18504
|
enumerable: !0,
|
|
18505
18505
|
configurable: !1,
|
|
18506
18506
|
writable: !1,
|
|
18507
|
-
value:
|
|
18507
|
+
value: te[ye]
|
|
18508
18508
|
});
|
|
18509
18509
|
}
|
|
18510
18510
|
}
|
|
@@ -18515,37 +18515,37 @@ function parse(n, t) {
|
|
|
18515
18515
|
}
|
|
18516
18516
|
}
|
|
18517
18517
|
})()
|
|
18518
|
-
}), defineProperty(
|
|
18518
|
+
}), defineProperty(te, "video", {
|
|
18519
18519
|
enumerable: !0,
|
|
18520
18520
|
configurable: !1,
|
|
18521
18521
|
writable: !1,
|
|
18522
18522
|
value: (function() {
|
|
18523
|
-
var
|
|
18524
|
-
return
|
|
18523
|
+
var ae = K($, "video"), ue = void 0;
|
|
18524
|
+
return ae && (ue = {}, defineProperty(ue, "work", {
|
|
18525
18525
|
enumerable: !1,
|
|
18526
18526
|
configurable: !1,
|
|
18527
18527
|
writable: !1,
|
|
18528
18528
|
value: t
|
|
18529
|
-
}), defineProperty(
|
|
18529
|
+
}), defineProperty(ue, "source", {
|
|
18530
18530
|
enumerable: !0,
|
|
18531
18531
|
configurable: !1,
|
|
18532
18532
|
writable: !1,
|
|
18533
|
-
value:
|
|
18534
|
-
}), defineProperty(
|
|
18533
|
+
value: ae.source
|
|
18534
|
+
}), defineProperty(ue, "matrix", {
|
|
18535
18535
|
enumerable: !0,
|
|
18536
18536
|
configurable: !1,
|
|
18537
18537
|
writable: !1,
|
|
18538
|
-
value: new THREE.Matrix4().fromArray(
|
|
18539
|
-
}), defineProperty(
|
|
18538
|
+
value: new THREE.Matrix4().fromArray(ae.matrix)
|
|
18539
|
+
}), defineProperty(ue, "size", {
|
|
18540
18540
|
enumerable: !0,
|
|
18541
18541
|
configurable: !1,
|
|
18542
18542
|
writable: !1,
|
|
18543
|
-
value: new THREE.Vector2().fromArray(
|
|
18544
|
-
})),
|
|
18543
|
+
value: new THREE.Vector2().fromArray(ae.size)
|
|
18544
|
+
})), ue;
|
|
18545
18545
|
})()
|
|
18546
|
-
}),
|
|
18546
|
+
}), te;
|
|
18547
18547
|
})()
|
|
18548
|
-
}), L.push(
|
|
18548
|
+
}), L.push(ne);
|
|
18549
18549
|
}, re = 0; re < q; re++)
|
|
18550
18550
|
ie(re);
|
|
18551
18551
|
}
|
|
@@ -18555,64 +18555,64 @@ function parse(n, t) {
|
|
|
18555
18555
|
writable: !1,
|
|
18556
18556
|
value: Object.freeze(L)
|
|
18557
18557
|
});
|
|
18558
|
-
var
|
|
18559
|
-
if (defineProperty(
|
|
18558
|
+
var ee = {};
|
|
18559
|
+
if (defineProperty(ee, "work", {
|
|
18560
18560
|
enumerable: !1,
|
|
18561
18561
|
configurable: !1,
|
|
18562
18562
|
writable: !1,
|
|
18563
18563
|
value: t
|
|
18564
18564
|
}), C.initial) {
|
|
18565
18565
|
if (t.observers.length > 0) {
|
|
18566
|
-
var
|
|
18567
|
-
isNumber(C.initial.panoIndex) ?
|
|
18566
|
+
var Z = void 0;
|
|
18567
|
+
isNumber(C.initial.panoIndex) ? Z = C.initial.panoIndex : isNumber(C.initial.pano_index) ? Z = C.initial.pano_index : isNumber(C.initial.pano) && (Z = C.initial.pano), typeof Z == "number" && (Z = clamp$1(Z, 0, t.observers.length - 1), defineProperty(ee, "panoIndex", {
|
|
18568
18568
|
enumerable: !0,
|
|
18569
18569
|
writable: !0,
|
|
18570
|
-
value:
|
|
18570
|
+
value: Z
|
|
18571
18571
|
}));
|
|
18572
18572
|
}
|
|
18573
|
-
if (C.initial.mode === "Panorama" && t.observers.length === 0 || C.initial.mode === "Floorplan" || C.initial.mode === "Topview" || C.initial.mode === "Model" || C.initial.mode === "Mapview" ? defineProperty(
|
|
18573
|
+
if (C.initial.mode === "Panorama" && t.observers.length === 0 || C.initial.mode === "Floorplan" || C.initial.mode === "Topview" || C.initial.mode === "Model" || C.initial.mode === "Mapview" ? defineProperty(ee, "mode", {
|
|
18574
18574
|
enumerable: !0,
|
|
18575
18575
|
writable: !0,
|
|
18576
18576
|
value: C.initial.mode
|
|
18577
|
-
}) : typeof
|
|
18577
|
+
}) : typeof ee.panoIndex == "number" ? defineProperty(ee, "mode", {
|
|
18578
18578
|
enumerable: !0,
|
|
18579
18579
|
writable: !0,
|
|
18580
18580
|
value: "Panorama"
|
|
18581
|
-
}) : defineProperty(
|
|
18581
|
+
}) : defineProperty(ee, "mode", {
|
|
18582
18582
|
enumerable: !0,
|
|
18583
18583
|
writable: !0,
|
|
18584
18584
|
value: "Mapview"
|
|
18585
|
-
}), isNumber(C.initial.latitude) && defineProperty(
|
|
18585
|
+
}), isNumber(C.initial.latitude) && defineProperty(ee, "latitude", {
|
|
18586
18586
|
enumerable: !0,
|
|
18587
18587
|
writable: !0,
|
|
18588
18588
|
value: C.initial.latitude
|
|
18589
|
-
}), isNumber(C.initial.longitude) ? defineProperty(
|
|
18589
|
+
}), isNumber(C.initial.longitude) ? defineProperty(ee, "longitude", {
|
|
18590
18590
|
enumerable: !0,
|
|
18591
18591
|
writable: !0,
|
|
18592
18592
|
value: C.initial.longitude
|
|
18593
|
-
}) : isNumber(C.initial.heading) && defineProperty(
|
|
18593
|
+
}) : isNumber(C.initial.heading) && defineProperty(ee, "longitude", {
|
|
18594
18594
|
enumerable: !0,
|
|
18595
18595
|
writable: !0,
|
|
18596
18596
|
value: headingToLongitude(C.initial.heading)
|
|
18597
|
-
}), isNumber(C.initial.fov) && defineProperty(
|
|
18597
|
+
}), isNumber(C.initial.fov) && defineProperty(ee, "fov", {
|
|
18598
18598
|
enumerable: !0,
|
|
18599
18599
|
writable: !0,
|
|
18600
18600
|
value: C.initial.fov
|
|
18601
|
-
}), isNumber(C.initial.distance) && defineProperty(
|
|
18601
|
+
}), isNumber(C.initial.distance) && defineProperty(ee, "distance", {
|
|
18602
18602
|
enumerable: !0,
|
|
18603
18603
|
writable: !0,
|
|
18604
18604
|
value: C.initial.distance
|
|
18605
18605
|
}), Array.isArray(C.initial.offset)) {
|
|
18606
|
-
var
|
|
18607
|
-
var
|
|
18608
|
-
return isNaN(
|
|
18606
|
+
var X = C.initial.offset, se = [0, 0, 0].map(function(G, W) {
|
|
18607
|
+
var $ = Number(X[W]);
|
|
18608
|
+
return isNaN($) || !isFinite($) ? 0 : $;
|
|
18609
18609
|
});
|
|
18610
|
-
defineProperty(
|
|
18610
|
+
defineProperty(ee, "offset", {
|
|
18611
18611
|
enumerable: !0,
|
|
18612
18612
|
writable: !0,
|
|
18613
18613
|
value: new THREE.Vector3().fromArray(se)
|
|
18614
18614
|
});
|
|
18615
|
-
} else typeof C.initial.offset == "object" && typeof C.initial.offset.x == "number" && typeof C.initial.offset.y == "number" && typeof C.initial.offset.z == "number" && defineProperty(
|
|
18615
|
+
} else typeof C.initial.offset == "object" && typeof C.initial.offset.x == "number" && typeof C.initial.offset.y == "number" && typeof C.initial.offset.z == "number" && defineProperty(ee, "offset", {
|
|
18616
18616
|
enumerable: !0,
|
|
18617
18617
|
writable: !0,
|
|
18618
18618
|
value: new THREE.Vector3().fromArray([
|
|
@@ -18626,7 +18626,7 @@ function parse(n, t) {
|
|
|
18626
18626
|
enumerable: !0,
|
|
18627
18627
|
configurable: !1,
|
|
18628
18628
|
writable: !1,
|
|
18629
|
-
value:
|
|
18629
|
+
value: ee
|
|
18630
18630
|
}), t;
|
|
18631
18631
|
}
|
|
18632
18632
|
function parseNull(n, t) {
|
|
@@ -20942,48 +20942,48 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20942
20942
|
return Array.isArray(B) ? (p(B, N[F], N), !0) : !1;
|
|
20943
20943
|
}
|
|
20944
20944
|
function p(B, F, N) {
|
|
20945
|
-
var
|
|
20945
|
+
var Q;
|
|
20946
20946
|
if (B)
|
|
20947
20947
|
if (B.forEach)
|
|
20948
20948
|
B.forEach(F, N);
|
|
20949
20949
|
else if (B.length !== r)
|
|
20950
|
-
for (
|
|
20951
|
-
F.call(N, B[
|
|
20950
|
+
for (Q = 0; Q < B.length; )
|
|
20951
|
+
F.call(N, B[Q], Q, B), Q++;
|
|
20952
20952
|
else
|
|
20953
|
-
for (
|
|
20954
|
-
B.hasOwnProperty(
|
|
20953
|
+
for (Q in B)
|
|
20954
|
+
B.hasOwnProperty(Q) && F.call(N, B[Q], Q, B);
|
|
20955
20955
|
}
|
|
20956
20956
|
function g(B, F, N) {
|
|
20957
|
-
var
|
|
20957
|
+
var Q = "DEPRECATED METHOD: " + F + `
|
|
20958
20958
|
` + N + ` AT
|
|
20959
20959
|
`;
|
|
20960
20960
|
return function() {
|
|
20961
|
-
var Y = new Error("get-stack-trace"),
|
|
20962
|
-
return xe && xe.call(n.console,
|
|
20961
|
+
var Y = new Error("get-stack-trace"), le = Y && Y.stack ? Y.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", xe = n.console && (n.console.warn || n.console.log);
|
|
20962
|
+
return xe && xe.call(n.console, Q, le), B.apply(this, arguments);
|
|
20963
20963
|
};
|
|
20964
20964
|
}
|
|
20965
20965
|
var m;
|
|
20966
20966
|
typeof Object.assign != "function" ? m = function(F) {
|
|
20967
20967
|
if (F === r || F === null)
|
|
20968
20968
|
throw new TypeError("Cannot convert undefined or null to object");
|
|
20969
|
-
for (var N = Object(F),
|
|
20970
|
-
var Y = arguments[
|
|
20969
|
+
for (var N = Object(F), Q = 1; Q < arguments.length; Q++) {
|
|
20970
|
+
var Y = arguments[Q];
|
|
20971
20971
|
if (Y !== r && Y !== null)
|
|
20972
|
-
for (var
|
|
20973
|
-
Y.hasOwnProperty(
|
|
20972
|
+
for (var le in Y)
|
|
20973
|
+
Y.hasOwnProperty(le) && (N[le] = Y[le]);
|
|
20974
20974
|
}
|
|
20975
20975
|
return N;
|
|
20976
20976
|
} : m = Object.assign;
|
|
20977
|
-
var E = g(function(F, N,
|
|
20978
|
-
for (var Y = Object.keys(N),
|
|
20979
|
-
(!
|
|
20977
|
+
var E = g(function(F, N, Q) {
|
|
20978
|
+
for (var Y = Object.keys(N), le = 0; le < Y.length; )
|
|
20979
|
+
(!Q || Q && F[Y[le]] === r) && (F[Y[le]] = N[Y[le]]), le++;
|
|
20980
20980
|
return F;
|
|
20981
20981
|
}, "extend", "Use `assign`."), y = g(function(F, N) {
|
|
20982
20982
|
return E(F, N, !0);
|
|
20983
20983
|
}, "merge", "Use `assign`.");
|
|
20984
20984
|
function v(B, F, N) {
|
|
20985
|
-
var
|
|
20986
|
-
Y = B.prototype = Object.create(
|
|
20985
|
+
var Q = F.prototype, Y;
|
|
20986
|
+
Y = B.prototype = Object.create(Q), Y.constructor = B, Y._super = Q, N && m(Y, N);
|
|
20987
20987
|
}
|
|
20988
20988
|
function A(B, F) {
|
|
20989
20989
|
return function() {
|
|
@@ -20997,13 +20997,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
20997
20997
|
return B === r ? F : B;
|
|
20998
20998
|
}
|
|
20999
20999
|
function S(B, F, N) {
|
|
21000
|
-
p(P(F), function(
|
|
21001
|
-
B.addEventListener(
|
|
21000
|
+
p(P(F), function(Q) {
|
|
21001
|
+
B.addEventListener(Q, N, !1);
|
|
21002
21002
|
});
|
|
21003
21003
|
}
|
|
21004
21004
|
function R(B, F, N) {
|
|
21005
|
-
p(P(F), function(
|
|
21006
|
-
B.removeEventListener(
|
|
21005
|
+
p(P(F), function(Q) {
|
|
21006
|
+
B.removeEventListener(Q, N, !1);
|
|
21007
21007
|
});
|
|
21008
21008
|
}
|
|
21009
21009
|
function M(B, F) {
|
|
@@ -21023,10 +21023,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21023
21023
|
function _(B, F, N) {
|
|
21024
21024
|
if (B.indexOf && !N)
|
|
21025
21025
|
return B.indexOf(F);
|
|
21026
|
-
for (var
|
|
21027
|
-
if (N && B[
|
|
21028
|
-
return
|
|
21029
|
-
|
|
21026
|
+
for (var Q = 0; Q < B.length; ) {
|
|
21027
|
+
if (N && B[Q][N] == F || !N && B[Q] === F)
|
|
21028
|
+
return Q;
|
|
21029
|
+
Q++;
|
|
21030
21030
|
}
|
|
21031
21031
|
return -1;
|
|
21032
21032
|
}
|
|
@@ -21034,19 +21034,19 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21034
21034
|
return Array.prototype.slice.call(B, 0);
|
|
21035
21035
|
}
|
|
21036
21036
|
function C(B, F, N) {
|
|
21037
|
-
for (var
|
|
21038
|
-
var xe = B[
|
|
21039
|
-
_(Y, xe) < 0 &&
|
|
21037
|
+
for (var Q = [], Y = [], le = 0; le < B.length; ) {
|
|
21038
|
+
var xe = B[le][F];
|
|
21039
|
+
_(Y, xe) < 0 && Q.push(B[le]), Y[le] = xe, le++;
|
|
21040
21040
|
}
|
|
21041
|
-
return
|
|
21041
|
+
return Q = Q.sort(function(Ze, De) {
|
|
21042
21042
|
return Ze[F] > De[F];
|
|
21043
|
-
}),
|
|
21043
|
+
}), Q;
|
|
21044
21044
|
}
|
|
21045
21045
|
function H(B, F) {
|
|
21046
|
-
for (var N,
|
|
21047
|
-
if (N = o[
|
|
21048
|
-
return
|
|
21049
|
-
|
|
21046
|
+
for (var N, Q, Y = F[0].toUpperCase() + F.slice(1), le = 0; le < o.length; ) {
|
|
21047
|
+
if (N = o[le], Q = N ? N + Y : F, Q in B)
|
|
21048
|
+
return Q;
|
|
21049
|
+
le++;
|
|
21050
21050
|
}
|
|
21051
21051
|
return r;
|
|
21052
21052
|
}
|
|
@@ -21058,14 +21058,14 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21058
21058
|
var F = B.ownerDocument || B;
|
|
21059
21059
|
return F.defaultView || F.parentWindow || n;
|
|
21060
21060
|
}
|
|
21061
|
-
var D = /mobile|tablet|ip(ad|hone|od)|android/i, q = "ontouchstart" in n, z = H(n, "PointerEvent") !== r,
|
|
21062
|
-
function
|
|
21061
|
+
var D = /mobile|tablet|ip(ad|hone|od)|android/i, q = "ontouchstart" in n, z = H(n, "PointerEvent") !== r, J = q && D.test(navigator.userAgent), V = "touch", U = "pen", j = "mouse", K = "kinect", ie = 25, re = 1, ee = 2, Z = 4, X = 8, se = 1, G = 2, W = 4, $ = 8, ne = 16, te = G | W, ve = $ | ne, oe = te | ve, fe = ["x", "y"], be = ["clientX", "clientY"];
|
|
21062
|
+
function ae(B, F) {
|
|
21063
21063
|
var N = this;
|
|
21064
|
-
this.manager = B, this.callback = F, this.element = B.element, this.target = B.options.inputTarget, this.domHandler = function(
|
|
21065
|
-
b(B.options.enable, [B]) && N.handler(
|
|
21064
|
+
this.manager = B, this.callback = F, this.element = B.element, this.target = B.options.inputTarget, this.domHandler = function(Q) {
|
|
21065
|
+
b(B.options.enable, [B]) && N.handler(Q);
|
|
21066
21066
|
}, this.init();
|
|
21067
21067
|
}
|
|
21068
|
-
|
|
21068
|
+
ae.prototype = {
|
|
21069
21069
|
/**
|
|
21070
21070
|
* should handle the inputEvent data and trigger the callback
|
|
21071
21071
|
* @virtual
|
|
@@ -21085,44 +21085,44 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21085
21085
|
this.evEl && R(this.element, this.evEl, this.domHandler), this.evTarget && R(this.target, this.evTarget, this.domHandler), this.evWin && R(k(this.element), this.evWin, this.domHandler);
|
|
21086
21086
|
}
|
|
21087
21087
|
};
|
|
21088
|
-
function
|
|
21088
|
+
function ue(B) {
|
|
21089
21089
|
var F, N = B.options.inputClass;
|
|
21090
|
-
return N ? F = N : z ? F = tt :
|
|
21090
|
+
return N ? F = N : z ? F = tt : J ? F = Ne : q ? F = yt : F = ze, new F(B, me);
|
|
21091
21091
|
}
|
|
21092
21092
|
function me(B, F, N) {
|
|
21093
|
-
var
|
|
21094
|
-
N.isFirst = !!
|
|
21093
|
+
var Q = N.pointers.length, Y = N.changedPointers.length, le = F & re && Q - Y === 0, xe = F & (Z | X) && Q - Y === 0;
|
|
21094
|
+
N.isFirst = !!le, N.isFinal = !!xe, le && (B.session = {}), N.eventType = F, ge(B, N), B.emit("hammer.input", N), B.recognize(N), B.session.prevInput = N;
|
|
21095
21095
|
}
|
|
21096
21096
|
function ge(B, F) {
|
|
21097
|
-
var N = B.session,
|
|
21098
|
-
N.firstInput || (N.firstInput =
|
|
21099
|
-
var
|
|
21100
|
-
F.timeStamp = f(), F.deltaTime = F.timeStamp -
|
|
21097
|
+
var N = B.session, Q = F.pointers, Y = Q.length;
|
|
21098
|
+
N.firstInput || (N.firstInput = he(F)), Y > 1 && !N.firstMultiple ? N.firstMultiple = he(F) : Y === 1 && (N.firstMultiple = !1);
|
|
21099
|
+
var le = N.firstInput, xe = N.firstMultiple, Ge = xe ? xe.center : le.center, Ze = F.center = Se(Q);
|
|
21100
|
+
F.timeStamp = f(), F.deltaTime = F.timeStamp - le.timeStamp, F.angle = Ve(Ge, Ze), F.distance = de(Ge, Ze), Ae(N, F), F.offsetDirection = Ee(F.deltaX, F.deltaY);
|
|
21101
21101
|
var De = _e(F.deltaTime, F.deltaX, F.deltaY);
|
|
21102
|
-
F.overallVelocityX = De.x, F.overallVelocityY = De.y, F.overallVelocity = c(De.x) > c(De.y) ? De.x : De.y, F.scale = xe ? Be(xe.pointers,
|
|
21102
|
+
F.overallVelocityX = De.x, F.overallVelocityY = De.y, F.overallVelocity = c(De.x) > c(De.y) ? De.x : De.y, F.scale = xe ? Be(xe.pointers, Q) : 1, F.rotation = xe ? ye(xe.pointers, Q) : 0, F.maxPointers = N.prevInput ? F.pointers.length > N.prevInput.maxPointers ? F.pointers.length : N.prevInput.maxPointers : F.pointers.length, Te(N, F);
|
|
21103
21103
|
var St = B.element;
|
|
21104
21104
|
M(F.srcEvent.target, St) && (St = F.srcEvent.target), F.target = St;
|
|
21105
21105
|
}
|
|
21106
21106
|
function Ae(B, F) {
|
|
21107
|
-
var N = F.center,
|
|
21108
|
-
(F.eventType === re ||
|
|
21109
|
-
x:
|
|
21110
|
-
y:
|
|
21111
|
-
},
|
|
21107
|
+
var N = F.center, Q = B.offsetDelta || {}, Y = B.prevDelta || {}, le = B.prevInput || {};
|
|
21108
|
+
(F.eventType === re || le.eventType === Z) && (Y = B.prevDelta = {
|
|
21109
|
+
x: le.deltaX || 0,
|
|
21110
|
+
y: le.deltaY || 0
|
|
21111
|
+
}, Q = B.offsetDelta = {
|
|
21112
21112
|
x: N.x,
|
|
21113
21113
|
y: N.y
|
|
21114
|
-
}), F.deltaX = Y.x + (N.x -
|
|
21114
|
+
}), F.deltaX = Y.x + (N.x - Q.x), F.deltaY = Y.y + (N.y - Q.y);
|
|
21115
21115
|
}
|
|
21116
21116
|
function Te(B, F) {
|
|
21117
|
-
var N = B.lastInterval || F,
|
|
21118
|
-
if (F.eventType !=
|
|
21119
|
-
var Ze = F.deltaX - N.deltaX, De = F.deltaY - N.deltaY, St = _e(
|
|
21120
|
-
|
|
21117
|
+
var N = B.lastInterval || F, Q = F.timeStamp - N.timeStamp, Y, le, xe, Ge;
|
|
21118
|
+
if (F.eventType != X && (Q > ie || N.velocity === r)) {
|
|
21119
|
+
var Ze = F.deltaX - N.deltaX, De = F.deltaY - N.deltaY, St = _e(Q, Ze, De);
|
|
21120
|
+
le = St.x, xe = St.y, Y = c(St.x) > c(St.y) ? St.x : St.y, Ge = Ee(Ze, De), B.lastInterval = F;
|
|
21121
21121
|
} else
|
|
21122
|
-
Y = N.velocity,
|
|
21123
|
-
F.velocity = Y, F.velocityX =
|
|
21122
|
+
Y = N.velocity, le = N.velocityX, xe = N.velocityY, Ge = N.direction;
|
|
21123
|
+
F.velocity = Y, F.velocityX = le, F.velocityY = xe, F.direction = Ge;
|
|
21124
21124
|
}
|
|
21125
|
-
function
|
|
21125
|
+
function he(B) {
|
|
21126
21126
|
for (var F = [], N = 0; N < B.pointers.length; )
|
|
21127
21127
|
F[N] = {
|
|
21128
21128
|
clientX: l(B.pointers[N].clientX),
|
|
@@ -21143,11 +21143,11 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21143
21143
|
x: l(B[0].clientX),
|
|
21144
21144
|
y: l(B[0].clientY)
|
|
21145
21145
|
};
|
|
21146
|
-
for (var N = 0,
|
|
21147
|
-
N += B[Y].clientX,
|
|
21146
|
+
for (var N = 0, Q = 0, Y = 0; Y < F; )
|
|
21147
|
+
N += B[Y].clientX, Q += B[Y].clientY, Y++;
|
|
21148
21148
|
return {
|
|
21149
21149
|
x: l(N / F),
|
|
21150
|
-
y: l(
|
|
21150
|
+
y: l(Q / F)
|
|
21151
21151
|
};
|
|
21152
21152
|
}
|
|
21153
21153
|
function _e(B, F, N) {
|
|
@@ -21157,40 +21157,40 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21157
21157
|
};
|
|
21158
21158
|
}
|
|
21159
21159
|
function Ee(B, F) {
|
|
21160
|
-
return B === F ? se : c(B) >= c(F) ? B < 0 ?
|
|
21160
|
+
return B === F ? se : c(B) >= c(F) ? B < 0 ? G : W : F < 0 ? $ : ne;
|
|
21161
21161
|
}
|
|
21162
|
-
function
|
|
21163
|
-
N || (N =
|
|
21164
|
-
var
|
|
21165
|
-
return Math.sqrt(
|
|
21162
|
+
function de(B, F, N) {
|
|
21163
|
+
N || (N = fe);
|
|
21164
|
+
var Q = F[N[0]] - B[N[0]], Y = F[N[1]] - B[N[1]];
|
|
21165
|
+
return Math.sqrt(Q * Q + Y * Y);
|
|
21166
21166
|
}
|
|
21167
21167
|
function Ve(B, F, N) {
|
|
21168
|
-
N || (N =
|
|
21169
|
-
var
|
|
21170
|
-
return Math.atan2(Y,
|
|
21168
|
+
N || (N = fe);
|
|
21169
|
+
var Q = F[N[0]] - B[N[0]], Y = F[N[1]] - B[N[1]];
|
|
21170
|
+
return Math.atan2(Y, Q) * 180 / Math.PI;
|
|
21171
21171
|
}
|
|
21172
21172
|
function ye(B, F) {
|
|
21173
21173
|
return Ve(F[1], F[0], be) + Ve(B[1], B[0], be);
|
|
21174
21174
|
}
|
|
21175
21175
|
function Be(B, F) {
|
|
21176
|
-
return
|
|
21176
|
+
return de(F[0], F[1], be) / de(B[0], B[1], be);
|
|
21177
21177
|
}
|
|
21178
21178
|
var Ie = {
|
|
21179
21179
|
mousedown: re,
|
|
21180
|
-
mousemove:
|
|
21181
|
-
mouseup:
|
|
21180
|
+
mousemove: ee,
|
|
21181
|
+
mouseup: Z
|
|
21182
21182
|
}, $e = "mousedown", Re = "mousemove mouseup";
|
|
21183
21183
|
function ze() {
|
|
21184
|
-
this.evEl = $e, this.evWin = Re, this.pressed = !1,
|
|
21184
|
+
this.evEl = $e, this.evWin = Re, this.pressed = !1, ae.apply(this, arguments);
|
|
21185
21185
|
}
|
|
21186
|
-
v(ze,
|
|
21186
|
+
v(ze, ae, {
|
|
21187
21187
|
/**
|
|
21188
21188
|
* handle mouse events
|
|
21189
21189
|
* @param {Object} ev
|
|
21190
21190
|
*/
|
|
21191
21191
|
handler: function(F) {
|
|
21192
21192
|
var N = Ie[F.type];
|
|
21193
|
-
N & re && (F.button === 0 || F.button === 2) && (this.pressed = !0), N &
|
|
21193
|
+
N & re && (F.button === 0 || F.button === 2) && (this.pressed = !0), N & ee && F.which !== 1 && (N = Z), this.pressed && (N & Z && (this.pressed = !1), this.callback(this.manager, N, {
|
|
21194
21194
|
pointers: [F],
|
|
21195
21195
|
changedPointers: [F],
|
|
21196
21196
|
pointerType: j,
|
|
@@ -21200,123 +21200,123 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21200
21200
|
});
|
|
21201
21201
|
var Fe = {
|
|
21202
21202
|
pointerdown: re,
|
|
21203
|
-
pointermove:
|
|
21204
|
-
pointerup:
|
|
21205
|
-
pointercancel:
|
|
21206
|
-
pointerout:
|
|
21203
|
+
pointermove: ee,
|
|
21204
|
+
pointerup: Z,
|
|
21205
|
+
pointercancel: X,
|
|
21206
|
+
pointerout: X
|
|
21207
21207
|
}, Oe = {
|
|
21208
|
-
2:
|
|
21208
|
+
2: V,
|
|
21209
21209
|
3: U,
|
|
21210
21210
|
4: j,
|
|
21211
|
-
5:
|
|
21211
|
+
5: K
|
|
21212
21212
|
// see https://twitter.com/jacobrossi/status/480596438489890816
|
|
21213
21213
|
}, Le = "pointerdown", Ue = "pointermove pointerup pointercancel";
|
|
21214
21214
|
n.MSPointerEvent && !n.PointerEvent && (Le = "MSPointerDown", Ue = "MSPointerMove MSPointerUp MSPointerCancel");
|
|
21215
21215
|
function tt() {
|
|
21216
|
-
this.evEl = Le, this.evWin = Ue,
|
|
21216
|
+
this.evEl = Le, this.evWin = Ue, ae.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
|
|
21217
21217
|
}
|
|
21218
|
-
v(tt,
|
|
21218
|
+
v(tt, ae, {
|
|
21219
21219
|
/**
|
|
21220
21220
|
* handle mouse events
|
|
21221
21221
|
* @param {Object} ev
|
|
21222
21222
|
*/
|
|
21223
21223
|
handler: function(F) {
|
|
21224
|
-
var N = this.store,
|
|
21225
|
-
xe & re && (F.button === 0 || F.button === 2 || Ze) ? De < 0 && (N.push(F), De = N.length - 1) : xe & (
|
|
21224
|
+
var N = this.store, Q = !1, Y = !1, le = F.type.toLowerCase().replace("ms", ""), xe = Fe[le], Ge = Oe[F.pointerType] || F.pointerType, Ze = Ge == V, De = _(N, F.pointerId, "pointerId");
|
|
21225
|
+
xe & re && (F.button === 0 || F.button === 2 || Ze) ? De < 0 && (N.push(F), De = N.length - 1) : xe & (Z | X) ? Q = !0 : !Ze && F.buttons === 0 && (Q = !0, Y = !0, xe = Fe.pointerup), !(De < 0) && (Y || (N[De] = F), this.callback(this.manager, xe, {
|
|
21226
21226
|
pointers: N,
|
|
21227
21227
|
changedPointers: [F],
|
|
21228
21228
|
pointerType: Ge,
|
|
21229
21229
|
srcEvent: N[De]
|
|
21230
|
-
}),
|
|
21230
|
+
}), Q && N.splice(De, 1));
|
|
21231
21231
|
}
|
|
21232
21232
|
});
|
|
21233
21233
|
var lt = {
|
|
21234
21234
|
touchstart: re,
|
|
21235
|
-
touchmove:
|
|
21236
|
-
touchend:
|
|
21237
|
-
touchcancel:
|
|
21235
|
+
touchmove: ee,
|
|
21236
|
+
touchend: Z,
|
|
21237
|
+
touchcancel: X
|
|
21238
21238
|
}, nt = "touchstart", ot = "touchstart touchmove touchend touchcancel";
|
|
21239
21239
|
function At() {
|
|
21240
|
-
this.evTarget = nt, this.evWin = ot, this.started = !1,
|
|
21240
|
+
this.evTarget = nt, this.evWin = ot, this.started = !1, ae.apply(this, arguments);
|
|
21241
21241
|
}
|
|
21242
|
-
v(At,
|
|
21242
|
+
v(At, ae, {
|
|
21243
21243
|
handler: function(F) {
|
|
21244
21244
|
var N = lt[F.type];
|
|
21245
21245
|
if (N === re && (this.started = !0), !!this.started) {
|
|
21246
|
-
var
|
|
21247
|
-
N & (
|
|
21248
|
-
pointers:
|
|
21249
|
-
changedPointers:
|
|
21250
|
-
pointerType:
|
|
21246
|
+
var Q = We.call(this, F, N);
|
|
21247
|
+
N & (Z | X) && Q[0].length - Q[1].length === 0 && (this.started = !1), this.callback(this.manager, N, {
|
|
21248
|
+
pointers: Q[0],
|
|
21249
|
+
changedPointers: Q[1],
|
|
21250
|
+
pointerType: V,
|
|
21251
21251
|
srcEvent: F
|
|
21252
21252
|
});
|
|
21253
21253
|
}
|
|
21254
21254
|
}
|
|
21255
21255
|
});
|
|
21256
21256
|
function We(B, F) {
|
|
21257
|
-
var N = I(B.touches),
|
|
21258
|
-
return F & (
|
|
21257
|
+
var N = I(B.touches), Q = I(B.changedTouches);
|
|
21258
|
+
return F & (Z | X) && (N = C(N.concat(Q), "identifier")), [N, Q];
|
|
21259
21259
|
}
|
|
21260
21260
|
var Ct = {
|
|
21261
21261
|
touchstart: re,
|
|
21262
|
-
touchmove:
|
|
21263
|
-
touchend:
|
|
21264
|
-
touchcancel:
|
|
21262
|
+
touchmove: ee,
|
|
21263
|
+
touchend: Z,
|
|
21264
|
+
touchcancel: X
|
|
21265
21265
|
}, He = "touchstart touchmove touchend touchcancel";
|
|
21266
21266
|
function Ne() {
|
|
21267
|
-
this.evTarget = He, this.targetIds = {},
|
|
21267
|
+
this.evTarget = He, this.targetIds = {}, ae.apply(this, arguments);
|
|
21268
21268
|
}
|
|
21269
|
-
v(Ne,
|
|
21269
|
+
v(Ne, ae, {
|
|
21270
21270
|
handler: function(F) {
|
|
21271
|
-
var N = Ct[F.type],
|
|
21272
|
-
|
|
21273
|
-
pointers:
|
|
21274
|
-
changedPointers:
|
|
21275
|
-
pointerType:
|
|
21271
|
+
var N = Ct[F.type], Q = bt.call(this, F, N);
|
|
21272
|
+
Q && this.callback(this.manager, N, {
|
|
21273
|
+
pointers: Q[0],
|
|
21274
|
+
changedPointers: Q[1],
|
|
21275
|
+
pointerType: V,
|
|
21276
21276
|
srcEvent: F
|
|
21277
21277
|
});
|
|
21278
21278
|
}
|
|
21279
21279
|
});
|
|
21280
21280
|
function bt(B, F) {
|
|
21281
|
-
var N = I(B.touches),
|
|
21282
|
-
if (F & (re |
|
|
21283
|
-
return
|
|
21284
|
-
var Y,
|
|
21285
|
-
if (
|
|
21281
|
+
var N = I(B.touches), Q = this.targetIds;
|
|
21282
|
+
if (F & (re | ee) && N.length === 1)
|
|
21283
|
+
return Q[N[0].identifier] = !0, [N, N];
|
|
21284
|
+
var Y, le, xe = I(B.changedTouches), Ge = [], Ze = this.target;
|
|
21285
|
+
if (le = N.filter(function(De) {
|
|
21286
21286
|
return M(De.target, Ze);
|
|
21287
21287
|
}), F === re)
|
|
21288
|
-
for (Y = 0; Y <
|
|
21289
|
-
|
|
21288
|
+
for (Y = 0; Y < le.length; )
|
|
21289
|
+
Q[le[Y].identifier] = !0, Y++;
|
|
21290
21290
|
for (Y = 0; Y < xe.length; )
|
|
21291
|
-
|
|
21291
|
+
Q[xe[Y].identifier] && Ge.push(xe[Y]), F & (Z | X) && delete Q[xe[Y].identifier], Y++;
|
|
21292
21292
|
if (Ge.length)
|
|
21293
21293
|
return [
|
|
21294
21294
|
// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
|
|
21295
|
-
C(
|
|
21295
|
+
C(le.concat(Ge), "identifier"),
|
|
21296
21296
|
Ge
|
|
21297
21297
|
];
|
|
21298
21298
|
}
|
|
21299
21299
|
var It = 2500, Tt = 25;
|
|
21300
21300
|
function yt() {
|
|
21301
|
-
|
|
21301
|
+
ae.apply(this, arguments);
|
|
21302
21302
|
var B = A(this.handler, this);
|
|
21303
21303
|
this.touch = new Ne(this.manager, B), this.mouse = new ze(this.manager, B), this.primaryTouch = null, this.lastTouches = [];
|
|
21304
21304
|
}
|
|
21305
|
-
v(yt,
|
|
21305
|
+
v(yt, ae, {
|
|
21306
21306
|
/**
|
|
21307
21307
|
* handle mouse and touch events
|
|
21308
21308
|
* @param {Hammer} manager
|
|
21309
21309
|
* @param {String} inputEvent
|
|
21310
21310
|
* @param {Object} inputData
|
|
21311
21311
|
*/
|
|
21312
|
-
handler: function(F, N,
|
|
21313
|
-
var Y =
|
|
21314
|
-
if (!(
|
|
21312
|
+
handler: function(F, N, Q) {
|
|
21313
|
+
var Y = Q.pointerType == V, le = Q.pointerType == j;
|
|
21314
|
+
if (!(le && Q.sourceCapabilities && Q.sourceCapabilities.firesTouchEvents)) {
|
|
21315
21315
|
if (Y)
|
|
21316
|
-
Rt.call(this, N,
|
|
21317
|
-
else if (
|
|
21316
|
+
Rt.call(this, N, Q);
|
|
21317
|
+
else if (le && it.call(this, Q))
|
|
21318
21318
|
return;
|
|
21319
|
-
this.callback(F, N,
|
|
21319
|
+
this.callback(F, N, Q);
|
|
21320
21320
|
}
|
|
21321
21321
|
},
|
|
21322
21322
|
/**
|
|
@@ -21327,29 +21327,29 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21327
21327
|
}
|
|
21328
21328
|
});
|
|
21329
21329
|
function Rt(B, F) {
|
|
21330
|
-
B & re ? (this.primaryTouch = F.changedPointers[0].identifier, rt.call(this, F)) : B & (
|
|
21330
|
+
B & re ? (this.primaryTouch = F.changedPointers[0].identifier, rt.call(this, F)) : B & (Z | X) && rt.call(this, F);
|
|
21331
21331
|
}
|
|
21332
21332
|
function rt(B) {
|
|
21333
21333
|
var F = B.changedPointers[0];
|
|
21334
21334
|
if (F.identifier === this.primaryTouch) {
|
|
21335
21335
|
var N = { x: F.clientX, y: F.clientY };
|
|
21336
21336
|
this.lastTouches.push(N);
|
|
21337
|
-
var
|
|
21338
|
-
var
|
|
21339
|
-
|
|
21337
|
+
var Q = this.lastTouches, Y = function() {
|
|
21338
|
+
var le = Q.indexOf(N);
|
|
21339
|
+
le > -1 && Q.splice(le, 1);
|
|
21340
21340
|
};
|
|
21341
21341
|
setTimeout(Y, It);
|
|
21342
21342
|
}
|
|
21343
21343
|
}
|
|
21344
21344
|
function it(B) {
|
|
21345
|
-
for (var F = B.srcEvent.clientX, N = B.srcEvent.clientY,
|
|
21346
|
-
var Y = this.lastTouches[
|
|
21347
|
-
if (
|
|
21345
|
+
for (var F = B.srcEvent.clientX, N = B.srcEvent.clientY, Q = 0; Q < this.lastTouches.length; Q++) {
|
|
21346
|
+
var Y = this.lastTouches[Q], le = Math.abs(F - Y.x), xe = Math.abs(N - Y.y);
|
|
21347
|
+
if (le <= Tt && xe <= Tt)
|
|
21348
21348
|
return !0;
|
|
21349
21349
|
}
|
|
21350
21350
|
return !1;
|
|
21351
21351
|
}
|
|
21352
|
-
var ct = s ? H(s.style, "touchAction") : r, Xe = ct !== r,
|
|
21352
|
+
var ct = s ? H(s.style, "touchAction") : r, Xe = ct !== r, ce = "compute", Me = "auto", Ce = "manipulation", ke = "none", je = "pan-x", st = "pan-y", Qe = Ht();
|
|
21353
21353
|
function Je(B, F) {
|
|
21354
21354
|
this.manager = B, this.set(F);
|
|
21355
21355
|
}
|
|
@@ -21359,7 +21359,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21359
21359
|
* @param {String} value
|
|
21360
21360
|
*/
|
|
21361
21361
|
set: function(B) {
|
|
21362
|
-
B ==
|
|
21362
|
+
B == ce && (B = this.compute()), Xe && this.manager.element.style && Qe[B] && (this.manager.element.style[ct] = B), this.actions = B.toLowerCase().trim();
|
|
21363
21363
|
},
|
|
21364
21364
|
/**
|
|
21365
21365
|
* just re-set the touchAction value
|
|
@@ -21387,13 +21387,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21387
21387
|
F.preventDefault();
|
|
21388
21388
|
return;
|
|
21389
21389
|
}
|
|
21390
|
-
var
|
|
21390
|
+
var Q = this.actions, Y = w(Q, ke) && !Qe[ke], le = w(Q, st) && !Qe[st], xe = w(Q, je) && !Qe[je];
|
|
21391
21391
|
if (Y) {
|
|
21392
21392
|
var Ge = B.pointers.length === 1, Ze = B.distance < 2, De = B.deltaTime < 250;
|
|
21393
21393
|
if (Ge && Ze && De)
|
|
21394
21394
|
return;
|
|
21395
21395
|
}
|
|
21396
|
-
if (!(xe &&
|
|
21396
|
+
if (!(xe && le) && (Y || le && N & te || xe && N & ve))
|
|
21397
21397
|
return this.preventSrc(F);
|
|
21398
21398
|
},
|
|
21399
21399
|
/**
|
|
@@ -21500,10 +21500,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21500
21500
|
*/
|
|
21501
21501
|
emit: function(B) {
|
|
21502
21502
|
var F = this, N = this.state;
|
|
21503
|
-
function
|
|
21503
|
+
function Q(Y) {
|
|
21504
21504
|
F.manager.emit(Y, B);
|
|
21505
21505
|
}
|
|
21506
|
-
N < xt &&
|
|
21506
|
+
N < xt && Q(F.options.event + Lt(N)), Q(F.options.event), B.additionalEvent && Q(B.additionalEvent), N >= xt && Q(F.options.event + Lt(N));
|
|
21507
21507
|
},
|
|
21508
21508
|
/**
|
|
21509
21509
|
* Check that all the require failure recognizers has failed,
|
|
@@ -21569,7 +21569,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21569
21569
|
return B & mt ? "cancel" : B & xt ? "end" : B & Pt ? "move" : B & dt ? "start" : "";
|
|
21570
21570
|
}
|
|
21571
21571
|
function Ot(B) {
|
|
21572
|
-
return B ==
|
|
21572
|
+
return B == ne ? "down" : B == $ ? "up" : B == G ? "left" : B == W ? "right" : "";
|
|
21573
21573
|
}
|
|
21574
21574
|
function _t(B, F) {
|
|
21575
21575
|
var N = F.manager;
|
|
@@ -21607,8 +21607,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21607
21607
|
* @returns {*} State
|
|
21608
21608
|
*/
|
|
21609
21609
|
process: function(B) {
|
|
21610
|
-
var F = this.state, N = B.eventType,
|
|
21611
|
-
return
|
|
21610
|
+
var F = this.state, N = B.eventType, Q = F & (dt | Pt), Y = this.attrTest(B);
|
|
21611
|
+
return Q && (N & X || !Y) ? F | mt : Q || Y ? N & Z ? F | xt : F & dt ? F | Pt : dt : gt;
|
|
21612
21612
|
}
|
|
21613
21613
|
});
|
|
21614
21614
|
function vt() {
|
|
@@ -21623,15 +21623,15 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21623
21623
|
event: "pan",
|
|
21624
21624
|
threshold: 10,
|
|
21625
21625
|
pointers: 1,
|
|
21626
|
-
direction:
|
|
21626
|
+
direction: oe
|
|
21627
21627
|
},
|
|
21628
21628
|
getTouchAction: function() {
|
|
21629
21629
|
var B = this.options.direction, F = [];
|
|
21630
|
-
return B &
|
|
21630
|
+
return B & te && F.push(st), B & ve && F.push(je), F;
|
|
21631
21631
|
},
|
|
21632
21632
|
directionTest: function(B) {
|
|
21633
|
-
var F = this.options, N = !0,
|
|
21634
|
-
return Y & F.direction || (F.direction &
|
|
21633
|
+
var F = this.options, N = !0, Q = B.distance, Y = B.direction, le = B.deltaX, xe = B.deltaY;
|
|
21634
|
+
return Y & F.direction || (F.direction & te ? (Y = le === 0 ? se : le < 0 ? G : W, N = le != this.pX, Q = Math.abs(B.deltaX)) : (Y = xe === 0 ? se : xe < 0 ? $ : ne, N = xe != this.pY, Q = Math.abs(B.deltaY))), B.direction = Y, N && Q > F.threshold && Y & F.direction;
|
|
21635
21635
|
},
|
|
21636
21636
|
attrTest: function(B) {
|
|
21637
21637
|
return at.prototype.attrTest.call(this, B) && (this.state & dt || !(this.state & dt) && this.directionTest(B));
|
|
@@ -21689,14 +21689,14 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21689
21689
|
return [Me];
|
|
21690
21690
|
},
|
|
21691
21691
|
process: function(B) {
|
|
21692
|
-
var F = this.options, N = B.pointers.length === F.pointers,
|
|
21693
|
-
if (this._input = B, !
|
|
21692
|
+
var F = this.options, N = B.pointers.length === F.pointers, Q = B.distance < F.threshold, Y = B.deltaTime > F.time;
|
|
21693
|
+
if (this._input = B, !Q || !N || B.eventType & (Z | X) && !Y)
|
|
21694
21694
|
this.reset();
|
|
21695
21695
|
else if (B.eventType & re)
|
|
21696
21696
|
this.reset(), this._timer = d(function() {
|
|
21697
21697
|
this.state = pt, this.tryEmit();
|
|
21698
21698
|
}, F.time, this);
|
|
21699
|
-
else if (B.eventType &
|
|
21699
|
+
else if (B.eventType & Z)
|
|
21700
21700
|
return pt;
|
|
21701
21701
|
return gt;
|
|
21702
21702
|
},
|
|
@@ -21704,13 +21704,13 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21704
21704
|
clearTimeout(this._timer);
|
|
21705
21705
|
},
|
|
21706
21706
|
emit: function(B) {
|
|
21707
|
-
this.state === pt && (B && B.eventType &
|
|
21707
|
+
this.state === pt && (B && B.eventType & Z ? this.manager.emit(this.options.event + "up", B) : (this._input.timeStamp = f(), this.manager.emit(this.options.event, this._input)));
|
|
21708
21708
|
}
|
|
21709
21709
|
});
|
|
21710
|
-
function
|
|
21710
|
+
function pe() {
|
|
21711
21711
|
at.apply(this, arguments);
|
|
21712
21712
|
}
|
|
21713
|
-
v(
|
|
21713
|
+
v(pe, at, {
|
|
21714
21714
|
/**
|
|
21715
21715
|
* @namespace
|
|
21716
21716
|
* @memberof RotateRecognizer
|
|
@@ -21739,7 +21739,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21739
21739
|
event: "swipe",
|
|
21740
21740
|
threshold: 10,
|
|
21741
21741
|
velocity: 0.3,
|
|
21742
|
-
direction:
|
|
21742
|
+
direction: te | ve,
|
|
21743
21743
|
pointers: 1
|
|
21744
21744
|
},
|
|
21745
21745
|
getTouchAction: function() {
|
|
@@ -21747,7 +21747,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21747
21747
|
},
|
|
21748
21748
|
attrTest: function(B) {
|
|
21749
21749
|
var F = this.options.direction, N;
|
|
21750
|
-
return F & (
|
|
21750
|
+
return F & (te | ve) ? N = B.overallVelocity : F & te ? N = B.overallVelocityX : F & ve && (N = B.overallVelocityY), this._super.attrTest.call(this, B) && F & B.offsetDirection && B.distance > this.options.threshold && B.maxPointers == this.options.pointers && c(N) > this.options.velocity && B.eventType & Z;
|
|
21751
21751
|
},
|
|
21752
21752
|
emit: function(B) {
|
|
21753
21753
|
var F = Ot(B.offsetDirection);
|
|
@@ -21779,14 +21779,14 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21779
21779
|
return [Ce];
|
|
21780
21780
|
},
|
|
21781
21781
|
process: function(B) {
|
|
21782
|
-
var F = this.options, N = B.pointers.length === F.pointers,
|
|
21782
|
+
var F = this.options, N = B.pointers.length === F.pointers, Q = B.distance < F.threshold, Y = B.deltaTime < F.time;
|
|
21783
21783
|
if (this.reset(), B.eventType & re && this.count === 0)
|
|
21784
21784
|
return this.failTimeout();
|
|
21785
|
-
if (
|
|
21786
|
-
if (B.eventType !=
|
|
21785
|
+
if (Q && Y && N) {
|
|
21786
|
+
if (B.eventType != Z)
|
|
21787
21787
|
return this.failTimeout();
|
|
21788
|
-
var
|
|
21789
|
-
this.pTime = B.timeStamp, this.pCenter = B.center, !xe || !
|
|
21788
|
+
var le = this.pTime ? B.timeStamp - this.pTime < F.interval : !0, xe = !this.pCenter || de(this.pCenter, B.center) < F.posThreshold;
|
|
21789
|
+
this.pTime = B.timeStamp, this.pCenter = B.center, !xe || !le ? this.count = 1 : this.count += 1, this._input = B;
|
|
21790
21790
|
var Ge = this.count % F.taps;
|
|
21791
21791
|
if (Ge === 0)
|
|
21792
21792
|
return this.hasRequireFailures() ? (this._timer = d(function() {
|
|
@@ -21824,7 +21824,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21824
21824
|
* @type {String}
|
|
21825
21825
|
* @default compute
|
|
21826
21826
|
*/
|
|
21827
|
-
touchAction:
|
|
21827
|
+
touchAction: ce,
|
|
21828
21828
|
/**
|
|
21829
21829
|
* @type {Boolean}
|
|
21830
21830
|
* @default true
|
|
@@ -21851,10 +21851,10 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21851
21851
|
*/
|
|
21852
21852
|
preset: [
|
|
21853
21853
|
// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
|
|
21854
|
-
[
|
|
21854
|
+
[pe, { enable: !1 }],
|
|
21855
21855
|
[wt, { enable: !1 }, ["rotate"]],
|
|
21856
|
-
[Pe, { direction:
|
|
21857
|
-
[vt, { direction:
|
|
21856
|
+
[Pe, { direction: te }],
|
|
21857
|
+
[vt, { direction: te }, ["swipe"]],
|
|
21858
21858
|
[we],
|
|
21859
21859
|
[we, { event: "doubletap", taps: 2 }, ["tap"]],
|
|
21860
21860
|
[Mt]
|
|
@@ -21908,9 +21908,9 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21908
21908
|
};
|
|
21909
21909
|
var Ye = 1, ut = 2;
|
|
21910
21910
|
function Ke(B, F) {
|
|
21911
|
-
this.options = m({}, qe.defaults, F || {}), this.options.inputTarget = this.options.inputTarget || B, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = B, this.input =
|
|
21912
|
-
var
|
|
21913
|
-
N[2] &&
|
|
21911
|
+
this.options = m({}, qe.defaults, F || {}), this.options.inputTarget = this.options.inputTarget || B, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = B, this.input = ue(this), this.touchAction = new Je(this, this.options.touchAction), ht(this, !0), p(this.options.recognizers, function(N) {
|
|
21912
|
+
var Q = this.add(new N[0](N[1]));
|
|
21913
|
+
N[2] && Q.recognizeWith(N[2]), N[3] && Q.requireFailure(N[3]);
|
|
21914
21914
|
}, this);
|
|
21915
21915
|
}
|
|
21916
21916
|
Ke.prototype = {
|
|
@@ -21941,12 +21941,12 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21941
21941
|
var F = this.session;
|
|
21942
21942
|
if (!F.stopped) {
|
|
21943
21943
|
this.touchAction.preventDefaults(B);
|
|
21944
|
-
var N,
|
|
21944
|
+
var N, Q = this.recognizers, Y = F.curRecognizer;
|
|
21945
21945
|
(!Y || Y && Y.state & pt) && (Y = F.curRecognizer = null);
|
|
21946
|
-
for (var
|
|
21947
|
-
N =
|
|
21946
|
+
for (var le = 0; le < Q.length; )
|
|
21947
|
+
N = Q[le], F.stopped !== ut && // 1
|
|
21948
21948
|
(!Y || N == Y || // 2
|
|
21949
|
-
N.canRecognizeWith(Y)) ? N.recognize(B) : N.reset(), !Y && N.state & (dt | Pt | xt) && (Y = F.curRecognizer = N),
|
|
21949
|
+
N.canRecognizeWith(Y)) ? N.recognize(B) : N.reset(), !Y && N.state & (dt | Pt | xt) && (Y = F.curRecognizer = N), le++;
|
|
21950
21950
|
}
|
|
21951
21951
|
},
|
|
21952
21952
|
/**
|
|
@@ -21997,8 +21997,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
21997
21997
|
on: function(B, F) {
|
|
21998
21998
|
if (B !== r && F !== r) {
|
|
21999
21999
|
var N = this.handlers;
|
|
22000
|
-
return p(P(B), function(
|
|
22001
|
-
N[
|
|
22000
|
+
return p(P(B), function(Q) {
|
|
22001
|
+
N[Q] = N[Q] || [], N[Q].push(F);
|
|
22002
22002
|
}), this;
|
|
22003
22003
|
}
|
|
22004
22004
|
},
|
|
@@ -22011,8 +22011,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
22011
22011
|
off: function(B, F) {
|
|
22012
22012
|
if (B !== r) {
|
|
22013
22013
|
var N = this.handlers;
|
|
22014
|
-
return p(P(B), function(
|
|
22015
|
-
F ? N[
|
|
22014
|
+
return p(P(B), function(Q) {
|
|
22015
|
+
F ? N[Q] && N[Q].splice(_(N[Q], F), 1) : delete N[Q];
|
|
22016
22016
|
}), this;
|
|
22017
22017
|
}
|
|
22018
22018
|
},
|
|
@@ -22028,8 +22028,8 @@ var Hammer = (function(n, t, e, r) {
|
|
|
22028
22028
|
F.type = B, F.preventDefault = function() {
|
|
22029
22029
|
F.srcEvent.preventDefault();
|
|
22030
22030
|
};
|
|
22031
|
-
for (var
|
|
22032
|
-
N[
|
|
22031
|
+
for (var Q = 0; Q < N.length; )
|
|
22032
|
+
N[Q](F), Q++;
|
|
22033
22033
|
}
|
|
22034
22034
|
},
|
|
22035
22035
|
/**
|
|
@@ -22043,9 +22043,9 @@ var Hammer = (function(n, t, e, r) {
|
|
|
22043
22043
|
function ht(B, F) {
|
|
22044
22044
|
var N = B.element;
|
|
22045
22045
|
if (N.style) {
|
|
22046
|
-
var
|
|
22047
|
-
p(B.options.cssProps, function(Y,
|
|
22048
|
-
|
|
22046
|
+
var Q;
|
|
22047
|
+
p(B.options.cssProps, function(Y, le) {
|
|
22048
|
+
Q = H(N.style, le), F ? (B.oldCssProps[Q] = N.style[Q], N.style[Q] = Y) : N.style[Q] = B.oldCssProps[Q] || "";
|
|
22049
22049
|
}), F || (B.oldCssProps = {});
|
|
22050
22050
|
}
|
|
22051
22051
|
}
|
|
@@ -22055,9 +22055,9 @@ var Hammer = (function(n, t, e, r) {
|
|
|
22055
22055
|
}
|
|
22056
22056
|
return m(qe, {
|
|
22057
22057
|
INPUT_START: re,
|
|
22058
|
-
INPUT_MOVE:
|
|
22059
|
-
INPUT_END:
|
|
22060
|
-
INPUT_CANCEL:
|
|
22058
|
+
INPUT_MOVE: ee,
|
|
22059
|
+
INPUT_END: Z,
|
|
22060
|
+
INPUT_CANCEL: X,
|
|
22061
22061
|
STATE_POSSIBLE: Ft,
|
|
22062
22062
|
STATE_BEGAN: dt,
|
|
22063
22063
|
STATE_CHANGED: Pt,
|
|
@@ -22066,15 +22066,15 @@ var Hammer = (function(n, t, e, r) {
|
|
|
22066
22066
|
STATE_CANCELLED: mt,
|
|
22067
22067
|
STATE_FAILED: gt,
|
|
22068
22068
|
DIRECTION_NONE: se,
|
|
22069
|
-
DIRECTION_LEFT:
|
|
22070
|
-
DIRECTION_RIGHT:
|
|
22071
|
-
DIRECTION_UP:
|
|
22072
|
-
DIRECTION_DOWN:
|
|
22073
|
-
DIRECTION_HORIZONTAL:
|
|
22074
|
-
DIRECTION_VERTICAL:
|
|
22075
|
-
DIRECTION_ALL:
|
|
22069
|
+
DIRECTION_LEFT: G,
|
|
22070
|
+
DIRECTION_RIGHT: W,
|
|
22071
|
+
DIRECTION_UP: $,
|
|
22072
|
+
DIRECTION_DOWN: ne,
|
|
22073
|
+
DIRECTION_HORIZONTAL: te,
|
|
22074
|
+
DIRECTION_VERTICAL: ve,
|
|
22075
|
+
DIRECTION_ALL: oe,
|
|
22076
22076
|
Manager: Ke,
|
|
22077
|
-
Input:
|
|
22077
|
+
Input: ae,
|
|
22078
22078
|
TouchAction: Je,
|
|
22079
22079
|
TouchInput: Ne,
|
|
22080
22080
|
MouseInput: ze,
|
|
@@ -22087,7 +22087,7 @@ var Hammer = (function(n, t, e, r) {
|
|
|
22087
22087
|
Pan: vt,
|
|
22088
22088
|
Swipe: Pe,
|
|
22089
22089
|
Pinch: wt,
|
|
22090
|
-
Rotate:
|
|
22090
|
+
Rotate: pe,
|
|
22091
22091
|
Press: Mt,
|
|
22092
22092
|
on: S,
|
|
22093
22093
|
off: R,
|
|
@@ -22464,22 +22464,22 @@ var Hammer = (function(n, t, e, r) {
|
|
|
22464
22464
|
} : d.prevEvent = O, r.onPinchGesture(O), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
|
|
22465
22465
|
var U;
|
|
22466
22466
|
h = null;
|
|
22467
|
-
var j = (U = d == null ? void 0 : d.prevEvent.scale) !== null && U !== void 0 ? U : 1,
|
|
22468
|
-
d = null, r.onPinchGesture(
|
|
22467
|
+
var j = (U = d == null ? void 0 : d.prevEvent.scale) !== null && U !== void 0 ? U : 1, K = p("pinchend", j, I);
|
|
22468
|
+
d = null, r.onPinchGesture(K);
|
|
22469
22469
|
}, 200);
|
|
22470
22470
|
} else {
|
|
22471
22471
|
var k = (Math.abs(I.deltaY) > Math.abs(I.deltaX) ? I.deltaY : I.deltaX) / -60, D = r.mouseWheelState !== void 0, q = {
|
|
22472
22472
|
x: I.clientX,
|
|
22473
22473
|
y: I.clientY
|
|
22474
|
-
}, z = r.relativeClientPosition(q),
|
|
22474
|
+
}, z = r.relativeClientPosition(q), J = r.createRaycasterFromCamera(z, r.camera), V = __assign(__assign({}, q), { coords: z, raycaster: J, buttons: I.buttons, delta: k }), O = createEvent("gesture.mousewheel", {
|
|
22475
22475
|
target: I.target,
|
|
22476
22476
|
pointerType: "mouse",
|
|
22477
22477
|
srcEvent: I,
|
|
22478
|
-
pointers: [__assign({},
|
|
22478
|
+
pointers: [__assign({}, V)],
|
|
22479
22479
|
isFirst: D,
|
|
22480
22480
|
isFinal: !1,
|
|
22481
22481
|
scale: 0,
|
|
22482
|
-
center: __assign({},
|
|
22482
|
+
center: __assign({}, V),
|
|
22483
22483
|
velocityX: 0,
|
|
22484
22484
|
velocityY: 0,
|
|
22485
22485
|
overallVelocityX: 0,
|
|
@@ -22494,11 +22494,11 @@ var Hammer = (function(n, t, e, r) {
|
|
|
22494
22494
|
target: I.target,
|
|
22495
22495
|
pointerType: "mouse",
|
|
22496
22496
|
srcEvent: I,
|
|
22497
|
-
pointers: [__assign(__assign({},
|
|
22497
|
+
pointers: [__assign(__assign({}, V), { delta: 0 })],
|
|
22498
22498
|
isFirst: !1,
|
|
22499
22499
|
isFinal: !0,
|
|
22500
22500
|
scale: 0,
|
|
22501
|
-
center: __assign(__assign({},
|
|
22501
|
+
center: __assign(__assign({}, V), { delta: 0 }),
|
|
22502
22502
|
velocityX: 0,
|
|
22503
22503
|
velocityY: 0,
|
|
22504
22504
|
overallVelocityX: 0,
|
|
@@ -23792,53 +23792,53 @@ void main() {
|
|
|
23792
23792
|
var S = scratchCameraProjectMatrix.copy(f);
|
|
23793
23793
|
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);
|
|
23794
23794
|
var R = this.frustum.planes[5].normal, M = [];
|
|
23795
|
-
m >= g && traverseTileCubeNode(this.tileTree, function(
|
|
23796
|
-
if (!(
|
|
23797
|
-
if (
|
|
23795
|
+
m >= g && traverseTileCubeNode(this.tileTree, function(X) {
|
|
23796
|
+
if (!(X.level < g)) {
|
|
23797
|
+
if (X.level > m || !e.frustum.intersectsBox(X.box))
|
|
23798
23798
|
return !1;
|
|
23799
|
-
M.push(
|
|
23799
|
+
M.push(X);
|
|
23800
23800
|
}
|
|
23801
23801
|
});
|
|
23802
23802
|
var w = /* @__PURE__ */ new WeakMap();
|
|
23803
|
-
M.sort(function(
|
|
23804
|
-
if (
|
|
23805
|
-
return
|
|
23806
|
-
var
|
|
23807
|
-
|
|
23808
|
-
var
|
|
23809
|
-
return
|
|
23803
|
+
M.sort(function(X, se) {
|
|
23804
|
+
if (X.level !== se.level)
|
|
23805
|
+
return X.level - se.level;
|
|
23806
|
+
var G = w.get(X);
|
|
23807
|
+
G === void 0 && (G = X.box.getCenter(scratchSortVector3).angleTo(R), w.set(X, G));
|
|
23808
|
+
var W = w.get(se);
|
|
23809
|
+
return W === void 0 && (W = se.box.getCenter(scratchSortVector3).angleTo(R), w.set(se, W)), G - W;
|
|
23810
23810
|
});
|
|
23811
23811
|
var P = /* @__PURE__ */ new WeakSet(), _ = this.observer.images.tiles;
|
|
23812
23812
|
if (_)
|
|
23813
|
-
for (var I = function(
|
|
23813
|
+
for (var I = function(X) {
|
|
23814
23814
|
var se = _.find(function(me) {
|
|
23815
|
-
return me.level ===
|
|
23815
|
+
return me.level === X.level;
|
|
23816
23816
|
});
|
|
23817
23817
|
if (!se)
|
|
23818
23818
|
return "continue";
|
|
23819
|
-
P.add(
|
|
23820
|
-
var
|
|
23821
|
-
if (
|
|
23822
|
-
|
|
23823
|
-
var
|
|
23824
|
-
return
|
|
23819
|
+
P.add(X);
|
|
23820
|
+
var G = C.tileMeshes.get(X);
|
|
23821
|
+
if (G) {
|
|
23822
|
+
G.appearDuration = C.appearDuration;
|
|
23823
|
+
var W = G.updateTime(o);
|
|
23824
|
+
return W && (r = !0), "continue";
|
|
23825
23825
|
}
|
|
23826
23826
|
if (C.pedding >= C.maxRequest)
|
|
23827
23827
|
return "continue";
|
|
23828
|
-
var
|
|
23828
|
+
var $ = Math.pow(2, X.level) * X.position.y, ne = Math.pow(2, X.level) * X.position.x, te = panoStringify({
|
|
23829
23829
|
panoIndex: C.observer.panoIndex,
|
|
23830
23830
|
workCode: C.observer.work.workCode
|
|
23831
|
-
}),
|
|
23832
|
-
|
|
23833
|
-
|
|
23834
|
-
|
|
23835
|
-
|
|
23831
|
+
}), ve = "".concat(te, ".").concat(X.face, ".").concat(X.level, ".").concat($, ".").concat(ne), oe = se.work.getURL(se[X.face]), fe = se.size, be = C.imageOptions.transform, ae = __assign(__assign({}, pick(C.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(ve), size: se.scale >= 1 ? void 0 : fe * X.size * se.scale, cut: X.size === 1 ? void 0 : [
|
|
23832
|
+
fe * X.position.x,
|
|
23833
|
+
fe * X.position.y,
|
|
23834
|
+
fe * X.size,
|
|
23835
|
+
fe * X.size
|
|
23836
23836
|
] });
|
|
23837
|
-
|
|
23838
|
-
var
|
|
23837
|
+
X.level === 1 && se.scale >= 0.5 && (ae.format === "jpg" || /\.jpg$/.test(oe)) && (ae.size = void 0, ae.quality || (ae.quality = 70)), X.size === 1 && console.warn("tile: ".concat(ae.key, " should not appear.")), C.pedding++;
|
|
23838
|
+
var ue = C.textureLoader.loadTexture(oe, {
|
|
23839
23839
|
imageURL: {
|
|
23840
23840
|
transform: be,
|
|
23841
|
-
options:
|
|
23841
|
+
options: ae
|
|
23842
23842
|
},
|
|
23843
23843
|
minFilter: THREE.LinearFilter,
|
|
23844
23844
|
magFilter: THREE.LinearFilter,
|
|
@@ -23847,34 +23847,34 @@ void main() {
|
|
|
23847
23847
|
}).then(function(me) {
|
|
23848
23848
|
return me.body;
|
|
23849
23849
|
});
|
|
23850
|
-
|
|
23850
|
+
ue.then(function(me) {
|
|
23851
23851
|
return initTexture(me, l);
|
|
23852
23852
|
}).then(function(me) {
|
|
23853
23853
|
return e.pedding--, me;
|
|
23854
23854
|
}, function(me) {
|
|
23855
23855
|
return e.pedding--, Promise.reject(me);
|
|
23856
|
-
}),
|
|
23856
|
+
}), G = new TileMesh(X, ue), G.name = "tiling:tile-".concat(ve), G.visible = !1, G.appearDuration = C.appearDuration, C.tileMeshes.set(X, G), C.scene.add(G), G.updateTime(o), r = !0;
|
|
23857
23857
|
}, C = this, H = 0, L = M; H < L.length; H++) {
|
|
23858
23858
|
var O = L[H];
|
|
23859
23859
|
I(O);
|
|
23860
23860
|
}
|
|
23861
23861
|
var k = [], D = [];
|
|
23862
|
-
this.tileMeshes.forEach(function(
|
|
23863
|
-
P.has(se) ? k.push(
|
|
23864
|
-
var
|
|
23865
|
-
|
|
23862
|
+
this.tileMeshes.forEach(function(X, se) {
|
|
23863
|
+
P.has(se) ? k.push(X) : D.push(X);
|
|
23864
|
+
var G = se.level >= g && se.level <= m;
|
|
23865
|
+
X.visible !== G && (X.visible = G, r = !0);
|
|
23866
23866
|
});
|
|
23867
|
-
for (var q = D.sort(function(
|
|
23868
|
-
return se.activeTime -
|
|
23869
|
-
}).slice(Math.max(0, this.maxCacheTile - k.length)), z = 0,
|
|
23870
|
-
var
|
|
23871
|
-
this.tileMeshes.delete(
|
|
23867
|
+
for (var q = D.sort(function(X, se) {
|
|
23868
|
+
return se.activeTime - X.activeTime;
|
|
23869
|
+
}).slice(Math.max(0, this.maxCacheTile - k.length)), z = 0, J = q; z < J.length; z++) {
|
|
23870
|
+
var V = J[z];
|
|
23871
|
+
this.tileMeshes.delete(V.node), this.scene.remove(V), V.dispose(), r = !0;
|
|
23872
23872
|
}
|
|
23873
23873
|
if (r) {
|
|
23874
23874
|
var U = l.getRenderTarget();
|
|
23875
23875
|
scratchPrevClearColor$1.copy(l.getClearColor());
|
|
23876
|
-
var j = l.getClearAlpha(),
|
|
23877
|
-
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(U), l.setClearColor(scratchPrevClearColor$1, j), l.autoClear =
|
|
23876
|
+
var j = l.getClearAlpha(), K = l.autoClear, ie = l.autoClearColor, re = l.autoClearDepth, ee = l.autoClearStencil, Z = l.clippingPlanes;
|
|
23877
|
+
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(U), l.setClearColor(scratchPrevClearColor$1, j), l.autoClear = K, l.autoClearColor = ie, l.autoClearDepth = re, l.autoClearStencil = ee, l.clippingPlanes = Z;
|
|
23878
23878
|
}
|
|
23879
23879
|
return this.forceRenderWhenNextUpdate = !1, r;
|
|
23880
23880
|
}, n;
|
|
@@ -24191,19 +24191,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24191
24191
|
}
|
|
24192
24192
|
p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(P.x + (_.x - P.x) * w, P.y + (_.y - P.y) * w, P.z + (_.z - P.z) * w);
|
|
24193
24193
|
for (var L = [], O = [], k = 0, D = this.locationMotion.keyframes; k < D.length; k++) {
|
|
24194
|
-
var q = D[k], z = q.key,
|
|
24195
|
-
z !== void 0 && (L.push(z),
|
|
24194
|
+
var q = D[k], z = q.key, J = q.progress;
|
|
24195
|
+
z !== void 0 && (L.push(z), J > this.locationMotion.progress && O.push(z));
|
|
24196
24196
|
}
|
|
24197
|
-
for (var
|
|
24198
|
-
var j = U[
|
|
24197
|
+
for (var V = 0, U = Object.keys(this.panoResources); V < U.length; V++) {
|
|
24198
|
+
var j = U[V];
|
|
24199
24199
|
if (!(O.indexOf(j) >= 0)) {
|
|
24200
|
-
var
|
|
24201
|
-
if (
|
|
24202
|
-
var ie =
|
|
24200
|
+
var K = this.panoResources[j];
|
|
24201
|
+
if (K.panoPicture) {
|
|
24202
|
+
var ie = K.panoPicture.map;
|
|
24203
24203
|
if (ie) {
|
|
24204
24204
|
if (ie === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || ie === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
|
|
24205
24205
|
continue;
|
|
24206
|
-
ie.dispose(),
|
|
24206
|
+
ie.dispose(), K.panoPicture = null;
|
|
24207
24207
|
}
|
|
24208
24208
|
}
|
|
24209
24209
|
L.indexOf(j) >= 0 || delete this.panoResources[j];
|
|
@@ -24220,40 +24220,40 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24220
24220
|
}));
|
|
24221
24221
|
}
|
|
24222
24222
|
isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
|
|
24223
|
-
var
|
|
24224
|
-
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible &&
|
|
24225
|
-
for (var
|
|
24226
|
-
var
|
|
24227
|
-
H &&
|
|
24223
|
+
var ee = this.works.getObserver(this.currentPano), Z = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, X = this.works.getObserver(b.panoId), se = this.works.getObserver(T.panoId);
|
|
24224
|
+
if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && ee) {
|
|
24225
|
+
for (var G = [], W = ee.work.observers, $ = 0, ne = ee.accessibleNodes; $ < ne.length; $++) {
|
|
24226
|
+
var te = ne[$], H = W[te];
|
|
24227
|
+
H && G.push(H);
|
|
24228
24228
|
}
|
|
24229
|
-
var
|
|
24230
|
-
if (
|
|
24231
|
-
var Ce =
|
|
24232
|
-
typeof Ce == "undefined" && (Ce =
|
|
24233
|
-
var ke =
|
|
24234
|
-
return typeof ke == "undefined" && (ke = Me.standingPosition.distanceTo(
|
|
24235
|
-
}),
|
|
24236
|
-
this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount %
|
|
24237
|
-
var
|
|
24238
|
-
return
|
|
24229
|
+
var ve = /* @__PURE__ */ new Map();
|
|
24230
|
+
if (G.sort(function(ce, Me) {
|
|
24231
|
+
var Ce = ve.get(ce);
|
|
24232
|
+
typeof Ce == "undefined" && (Ce = ce.standingPosition.distanceTo(ee.standingPosition), ve.set(ce, Ce));
|
|
24233
|
+
var ke = ve.get(ce);
|
|
24234
|
+
return typeof ke == "undefined" && (ke = Me.standingPosition.distanceTo(ee.standingPosition), ve.set(Me, ke)), Ce - ke;
|
|
24235
|
+
}), G.length) {
|
|
24236
|
+
this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % G.length;
|
|
24237
|
+
var oe = G[this.accessibleObserverFloorCheckCount], fe = this.modelScene.models.find(function(ce) {
|
|
24238
|
+
return ce.work === (oe == null ? void 0 : oe.work);
|
|
24239
24239
|
});
|
|
24240
|
-
if (
|
|
24241
|
-
var be = 0.3,
|
|
24242
|
-
panoIndex:
|
|
24243
|
-
workCode:
|
|
24244
|
-
}), Ae = adjustPanoCircleMeshVectors.map(function(
|
|
24245
|
-
scratchRaycaster$1.ray.origin.copy(me), scratchRaycaster$1.ray.origin.add(scratchVector3$3.copy(
|
|
24246
|
-
var Me =
|
|
24247
|
-
return Me && Me.distance -
|
|
24240
|
+
if (oe && fe && fe.visible) {
|
|
24241
|
+
var be = 0.3, ae = 0.05, ue = 5e-3, me = oe.standingPosition.clone().applyMatrix4(oe.work.transform), ge = panoStringify({
|
|
24242
|
+
panoIndex: oe.panoIndex,
|
|
24243
|
+
workCode: oe.work.workCode
|
|
24244
|
+
}), Ae = adjustPanoCircleMeshVectors.map(function(ce) {
|
|
24245
|
+
scratchRaycaster$1.ray.origin.copy(me), scratchRaycaster$1.ray.origin.add(scratchVector3$3.copy(ce).setY(be)), scratchRaycaster$1.ray.direction.set(0, -1, 0), scratchRaycaster$1.firstHitOnly = !0, scratchRaycaster$1.floorIndex = -1;
|
|
24246
|
+
var Me = fe.intersectRaycaster(scratchRaycaster$1)[0];
|
|
24247
|
+
return Me && Me.distance - ue <= be ? new THREE.Vector3().copy(me).setY(Me.point.y + ue) : me;
|
|
24248
24248
|
});
|
|
24249
|
-
Ae.sort(function(
|
|
24250
|
-
return Me.y -
|
|
24249
|
+
Ae.sort(function(ce, Me) {
|
|
24250
|
+
return Me.y - ce.y;
|
|
24251
24251
|
});
|
|
24252
|
-
var Te = Ae[Math.floor(Ae.length / 2)],
|
|
24253
|
-
return
|
|
24252
|
+
var Te = Ae[Math.floor(Ae.length / 2)], he = Ae.filter(function(ce) {
|
|
24253
|
+
return ce.distanceTo(Te) <= ae;
|
|
24254
24254
|
})[0];
|
|
24255
|
-
if (
|
|
24256
|
-
var Se = new THREE.Vector4(me.x, me.y, me.z,
|
|
24255
|
+
if (he) {
|
|
24256
|
+
var Se = new THREE.Vector4(me.x, me.y, me.z, he.y - me.y), _e = this.adjustPanoCircleMeshPositionFix.get(ge);
|
|
24257
24257
|
_e && !Se.equals(_e) && (this.needsRender = !0), this.adjustPanoCircleMeshPositionFix.set(ge, Se);
|
|
24258
24258
|
}
|
|
24259
24259
|
}
|
|
@@ -24261,9 +24261,9 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24261
24261
|
}
|
|
24262
24262
|
}
|
|
24263
24263
|
var Ee = /* @__PURE__ */ new Map();
|
|
24264
|
-
if (
|
|
24265
|
-
for (var
|
|
24266
|
-
var
|
|
24264
|
+
if (X)
|
|
24265
|
+
for (var de = 0, Ve = X.accessibleNodes; de < Ve.length; de++) {
|
|
24266
|
+
var te = Ve[de], H = X.work.observers[te];
|
|
24267
24267
|
if (H) {
|
|
24268
24268
|
var ge = panoStringify({
|
|
24269
24269
|
panoIndex: H.panoIndex,
|
|
@@ -24274,7 +24274,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24274
24274
|
}
|
|
24275
24275
|
if (se)
|
|
24276
24276
|
for (var ye = 0, Be = se.accessibleNodes; ye < Be.length; ye++) {
|
|
24277
|
-
var
|
|
24277
|
+
var te = Be[ye], H = se.work.observers[te];
|
|
24278
24278
|
if (H) {
|
|
24279
24279
|
var ge = panoStringify({
|
|
24280
24280
|
panoIndex: H.panoIndex,
|
|
@@ -24283,50 +24283,50 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24283
24283
|
Ee.set(ge, H);
|
|
24284
24284
|
}
|
|
24285
24285
|
}
|
|
24286
|
-
if (this.panoMeshes.forEach(function(
|
|
24286
|
+
if (this.panoMeshes.forEach(function(ce, Me) {
|
|
24287
24287
|
var Ce = Ee.get(Me);
|
|
24288
|
-
Ce ? Ee.delete(Me) : (o.helper.remove(
|
|
24289
|
-
}), Ee.forEach(function(
|
|
24290
|
-
var Ce = o.panoCircleMeshCreator(
|
|
24288
|
+
Ce ? Ee.delete(Me) : (o.helper.remove(ce), ce.dispose(), o.panoMeshes.delete(Me));
|
|
24289
|
+
}), Ee.forEach(function(ce, Me) {
|
|
24290
|
+
var Ce = o.panoCircleMeshCreator(ce, {
|
|
24291
24291
|
aerialObserverMinHeight: o.aerialObserverMinHeight
|
|
24292
24292
|
});
|
|
24293
24293
|
o.panoMeshes.set(Me, Ce), o.helper.add(Ce), Ee.delete(Me);
|
|
24294
|
-
}), this.panoMeshes.forEach(function(
|
|
24294
|
+
}), this.panoMeshes.forEach(function(ce, Me) {
|
|
24295
24295
|
var Ce = o.works.getObserver(Me);
|
|
24296
24296
|
if (Ce) {
|
|
24297
24297
|
var ke = Ce.position.distanceTo(Ce.standingPosition) > o.aerialObserverMinHeight;
|
|
24298
24298
|
if (ke)
|
|
24299
|
-
|
|
24299
|
+
ce.position.copy(Ce.position).applyMatrix4(Ce.work.transform), ce.scale.setScalar(18);
|
|
24300
24300
|
else {
|
|
24301
|
-
|
|
24301
|
+
ce.position.copy(Ce.standingPosition).applyMatrix4(Ce.work.transform);
|
|
24302
24302
|
var je = o.adjustPanoCircleMeshPositionFix.get(Ce.panoId);
|
|
24303
|
-
je && (scratchVector3$3.set(je.x, je.y, je.z), scratchVector3$3.equals(
|
|
24303
|
+
je && (scratchVector3$3.set(je.x, je.y, je.z), scratchVector3$3.equals(ce.position) && (ce.position.y += je.w)), ce.scale.setScalar(1.2);
|
|
24304
24304
|
}
|
|
24305
|
-
var st = o.camera.position.clone().setY(
|
|
24305
|
+
var st = o.camera.position.clone().setY(ce.position.y), Qe = new THREE.Vector3().copy(ce.position).sub(st).normalize();
|
|
24306
24306
|
if (Me === panoStringify(o.currentPano)) {
|
|
24307
|
-
var Je = clamp$1((0.5 - st.distanceTo(
|
|
24307
|
+
var Je = clamp$1((0.5 - st.distanceTo(ce.position)) / 0.5, 0, 1);
|
|
24308
24308
|
Qe.multiplyScalar(1 - Je).add(g.clone().multiplyScalar(Je));
|
|
24309
24309
|
}
|
|
24310
24310
|
if (Qe.length() > 0) {
|
|
24311
24311
|
var ft = ke ? -Math.PI / 2 : 0, Ht = Math.atan2(Qe.x, Qe.z);
|
|
24312
|
-
|
|
24312
|
+
ce.quaternion.setFromEuler(new THREE.Euler(ft, Ht, 0, "YXZ"));
|
|
24313
24313
|
}
|
|
24314
24314
|
} else
|
|
24315
|
-
|
|
24315
|
+
ce.visible = !1;
|
|
24316
24316
|
}), this.camera.pose.distance > 0.1 || M)
|
|
24317
|
-
this.panoMeshes.forEach(function(
|
|
24318
|
-
|
|
24317
|
+
this.panoMeshes.forEach(function(ce) {
|
|
24318
|
+
ce.setOpacity(0), ce.setCurrent(!1), ce.updateTime && ce.updateTime(e, r), ce.visible = !1;
|
|
24319
24319
|
});
|
|
24320
|
-
else if (
|
|
24321
|
-
var Ie =
|
|
24322
|
-
var Me = Ie[
|
|
24323
|
-
return Me ?
|
|
24320
|
+
else if (ee) {
|
|
24321
|
+
var Ie = ee.work.observers, $e = arrayMin(ee.accessibleNodes, function(ce) {
|
|
24322
|
+
var Me = Ie[ce];
|
|
24323
|
+
return Me ? ee.standingPosition.distanceTo(Me.standingPosition) : 1 / 0;
|
|
24324
24324
|
}, !0), Re = $e[1];
|
|
24325
24325
|
Re = clamp$1(Re, 3, 1 / 0);
|
|
24326
|
-
var ze =
|
|
24327
|
-
return panoStringify({ panoIndex:
|
|
24326
|
+
var ze = ee.accessibleNodes.concat(ee.panoIndex).map(function(ce) {
|
|
24327
|
+
return panoStringify({ panoIndex: ce, workCode: ee.work.workCode });
|
|
24328
24328
|
});
|
|
24329
|
-
this.panoMeshes.forEach(function(
|
|
24329
|
+
this.panoMeshes.forEach(function(ce, Me) {
|
|
24330
24330
|
var Ce = o.works.getObserver(Me), ke = !1, je = 1;
|
|
24331
24331
|
if (ze.indexOf(Me) === -1)
|
|
24332
24332
|
ke = !1, je = 0;
|
|
@@ -24335,19 +24335,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24335
24335
|
else if (!Ce.loadable && !Ce.active)
|
|
24336
24336
|
ke = !1, je = 0;
|
|
24337
24337
|
else {
|
|
24338
|
-
var st =
|
|
24339
|
-
ke = Qe && !
|
|
24340
|
-
var Je =
|
|
24338
|
+
var st = ce.position.clone().project(o.camera), Qe = Math.abs(st.x) < 1 && Math.abs(st.y) < 1 && Math.abs(st.z) < 1;
|
|
24339
|
+
ke = Qe && !ce.loading && ce.progress === 0 && Z !== null && panoStringify({ panoIndex: Z.panoIndex, workCode: Z.work.workCode }) === Me;
|
|
24340
|
+
var Je = ce.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
|
|
24341
24341
|
je = Je < 0.01 ? 0 : clamp$1(Re / Je, 0.1, 0.85);
|
|
24342
24342
|
}
|
|
24343
24343
|
if (Ce && Ce === se) {
|
|
24344
24344
|
var ft = Ce.position.distanceTo(Ce.standingPosition) > o.aerialObserverMinHeight;
|
|
24345
24345
|
if (ft) {
|
|
24346
|
-
var Je =
|
|
24346
|
+
var Je = ce.position.distanceTo(o.camera.position);
|
|
24347
24347
|
Je < 35 && (je = 0);
|
|
24348
24348
|
}
|
|
24349
24349
|
}
|
|
24350
|
-
o.modelScene.parameter.resolveValue().modelAlpha > 0 && (je = 0),
|
|
24350
|
+
o.modelScene.parameter.resolveValue().modelAlpha > 0 && (je = 0), ce.setCurrent(ke), ce.setOpacity(je), ce.updateTime && ce.updateTime(e, r);
|
|
24351
24351
|
});
|
|
24352
24352
|
}
|
|
24353
24353
|
{
|
|
@@ -24393,7 +24393,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24393
24393
|
(Ct || He.pano !== (Ne == null ? void 0 : Ne.pano) || He.opacity !== (Ne == null ? void 0 : Ne.opacity)) && this.modelScene.parameter.set("refinedScreen", He);
|
|
24394
24394
|
}
|
|
24395
24395
|
}
|
|
24396
|
-
if (this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e),
|
|
24396
|
+
if (this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), ee && ee.images.video && (this.needsRender = !0), this.intersectMesh && this.intersectMesh.parent && ee && ee.position.y - ee.standingPosition.y > 10) {
|
|
24397
24397
|
var bt = this.camera.position.distanceTo(this.intersectMesh.position), It = 2 * Math.tan(0.5 * this.camera.fov / 180 * Math.PI), Tt = bt * It / 5;
|
|
24398
24398
|
this.intersectMesh.scale.setScalar(Tt);
|
|
24399
24399
|
} else
|
|
@@ -24668,11 +24668,11 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24668
24668
|
var q = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
|
|
24669
24669
|
q === 0 || q === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * q / z;
|
|
24670
24670
|
}
|
|
24671
|
-
var
|
|
24671
|
+
var J = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" || r.effect === "model" ? T : 0), V = {
|
|
24672
24672
|
longitude: o.longitude,
|
|
24673
24673
|
latitude: o.latitude,
|
|
24674
24674
|
fov: o.fov
|
|
24675
|
-
}, U = __assign(__assign({}, e), { mode: this.mode, longitude: (l =
|
|
24675
|
+
}, U = __assign(__assign({}, e), { mode: this.mode, longitude: (l = V.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = V.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = V.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), j = this.currentPano;
|
|
24676
24676
|
if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
24677
24677
|
options: o,
|
|
24678
24678
|
prevPano: j,
|
|
@@ -24681,25 +24681,25 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24681
24681
|
userAction: this.userAction,
|
|
24682
24682
|
error: null
|
|
24683
24683
|
})), 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, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly" || r.effect === "model")
|
|
24684
|
-
this.cameraMotion.set(
|
|
24684
|
+
this.cameraMotion.set(V, J).catch(noop);
|
|
24685
24685
|
else {
|
|
24686
|
-
var
|
|
24686
|
+
var K = coordinatesToVector({
|
|
24687
24687
|
longitude: this.cameraMotion.value.longitude,
|
|
24688
24688
|
latitude: this.cameraMotion.value.latitude
|
|
24689
24689
|
}), ie = coordinatesToVector({
|
|
24690
|
-
longitude: (d =
|
|
24691
|
-
latitude: (h =
|
|
24690
|
+
longitude: (d = V.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
|
|
24691
|
+
latitude: (h = V.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
|
|
24692
24692
|
}), re = new THREE.Object3D();
|
|
24693
|
-
re.lookAt(
|
|
24694
|
-
var
|
|
24693
|
+
re.lookAt(K);
|
|
24694
|
+
var ee = new THREE.Matrix4().makeRotationFromQuaternion(re.quaternion);
|
|
24695
24695
|
re.lookAt(ie);
|
|
24696
|
-
var
|
|
24697
|
-
r.effect === "zoomin" ?
|
|
24698
|
-
for (var
|
|
24699
|
-
var
|
|
24700
|
-
if (
|
|
24701
|
-
var
|
|
24702
|
-
|
|
24696
|
+
var Z = new THREE.Matrix4().makeRotationFromQuaternion(re.quaternion), X = new THREE.Matrix4().getInverse(ee).premultiply(Z), se = this.cameraMotion.value.fov, G = (p = V.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, W = 1;
|
|
24697
|
+
r.effect === "zoomin" ? W = 1.5 : r.effect === "zoomout" && (W = 0.4);
|
|
24698
|
+
for (var $ = clamp$1(G * W, 1, 170), ne = 0; ne < S.length - 1; ne++) {
|
|
24699
|
+
var te = S[ne].key;
|
|
24700
|
+
if (te) {
|
|
24701
|
+
var ve = this.panoResources[te];
|
|
24702
|
+
ve && (ve.fixCameraTransform.copy(X), ve.panoPicture && (ve.panoPicture.zoom = Math.tan($ / 2 / 180 * Math.PI) / Math.tan(se / 2 / 180 * Math.PI)));
|
|
24703
24703
|
}
|
|
24704
24704
|
}
|
|
24705
24705
|
this.cameraMotion.setKeyframes([
|
|
@@ -24714,39 +24714,39 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24714
24714
|
{
|
|
24715
24715
|
progress: 0,
|
|
24716
24716
|
value: {
|
|
24717
|
-
longitude: (g =
|
|
24718
|
-
latitude: (m =
|
|
24719
|
-
fov:
|
|
24717
|
+
longitude: (g = V.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
|
|
24718
|
+
latitude: (m = V.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
|
|
24719
|
+
fov: $
|
|
24720
24720
|
}
|
|
24721
24721
|
},
|
|
24722
24722
|
{
|
|
24723
24723
|
progress: 1,
|
|
24724
24724
|
value: {
|
|
24725
|
-
longitude: (E =
|
|
24726
|
-
latitude: (y =
|
|
24727
|
-
fov:
|
|
24725
|
+
longitude: (E = V.longitude) !== null && E !== void 0 ? E : this.cameraMotion.value.longitude,
|
|
24726
|
+
latitude: (y = V.latitude) !== null && y !== void 0 ? y : this.cameraMotion.value.latitude,
|
|
24727
|
+
fov: G
|
|
24728
24728
|
}
|
|
24729
24729
|
}
|
|
24730
|
-
],
|
|
24730
|
+
], J).catch(noop);
|
|
24731
24731
|
}
|
|
24732
|
-
var
|
|
24733
|
-
|
|
24732
|
+
var oe = this.locationMotion.setKeyframes(S, J, R);
|
|
24733
|
+
oe.then(
|
|
24734
24734
|
// resolve
|
|
24735
24735
|
// 动画结束
|
|
24736
24736
|
function() {
|
|
24737
|
-
for (var
|
|
24738
|
-
var
|
|
24739
|
-
|
|
24737
|
+
for (var fe = 0, be = s.modelScene.children; fe < be.length; fe++) {
|
|
24738
|
+
var ae = be[fe];
|
|
24739
|
+
ae instanceof Model && ae.show();
|
|
24740
24740
|
}
|
|
24741
|
-
var
|
|
24741
|
+
var ue = __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 });
|
|
24742
24742
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
24743
24743
|
options: o,
|
|
24744
24744
|
prevPano: j,
|
|
24745
24745
|
progress: 1,
|
|
24746
|
-
state:
|
|
24746
|
+
state: ue,
|
|
24747
24747
|
userAction: s.userAction,
|
|
24748
24748
|
error: null
|
|
24749
|
-
})), o.moveEndCallback && o.moveEndCallback(
|
|
24749
|
+
})), o.moveEndCallback && o.moveEndCallback(ue);
|
|
24750
24750
|
var me = s.works.getObserver(e);
|
|
24751
24751
|
if (me && me.images.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
|
|
24752
24752
|
var ge = {
|
|
@@ -24766,8 +24766,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24766
24766
|
Te.removeAttribute("uuid");
|
|
24767
24767
|
}));
|
|
24768
24768
|
} else {
|
|
24769
|
-
var
|
|
24770
|
-
|
|
24769
|
+
var he = s.videoTexture.image;
|
|
24770
|
+
he.removeAttribute("uuid"), he.oncanplay = noop, he.ontimeupdate = noop;
|
|
24771
24771
|
}
|
|
24772
24772
|
},
|
|
24773
24773
|
// reject
|
|
@@ -24805,13 +24805,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24805
24805
|
var z = m[q];
|
|
24806
24806
|
if (!z)
|
|
24807
24807
|
return !1;
|
|
24808
|
-
var
|
|
24809
|
-
return Math.abs(
|
|
24808
|
+
var J = z.standingPosition.clone().applyMatrix4(z.work.transform).project(e);
|
|
24809
|
+
return Math.abs(J.z) > 1 || Math.abs(J.x) > 1 || Math.abs(J.y) > 1 ? !1 : z.loadable || z.active;
|
|
24810
24810
|
}), y = /* @__PURE__ */ new Map(), v = E.slice().sort(function(q, z) {
|
|
24811
|
-
var
|
|
24812
|
-
typeof
|
|
24811
|
+
var J = m[q], V = y.get(J);
|
|
24812
|
+
typeof V == "undefined" && (V = scratchVector3$3.copy(J.standingPosition).applyMatrix4(J.work.transform).distanceTo(l), y.set(J, V));
|
|
24813
24813
|
var U = m[z], j = y.get(U);
|
|
24814
|
-
return typeof j == "undefined" && (j = scratchVector3$3.copy(U.standingPosition).applyMatrix4(U.work.transform).distanceTo(l), y.set(U, j)),
|
|
24814
|
+
return typeof j == "undefined" && (j = scratchVector3$3.copy(U.standingPosition).applyMatrix4(U.work.transform).distanceTo(l), y.set(U, j)), V - j;
|
|
24815
24815
|
});
|
|
24816
24816
|
y.clear();
|
|
24817
24817
|
for (var A = 0, b = [Math.PI / 8, Math.PI / 6, Math.PI / 4, Math.PI / 3]; A < b.length; A++)
|
|
@@ -24836,13 +24836,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24836
24836
|
var z = m[q];
|
|
24837
24837
|
if (!z)
|
|
24838
24838
|
return !1;
|
|
24839
|
-
var
|
|
24840
|
-
return Math.abs(
|
|
24839
|
+
var J = z.position.clone().applyMatrix4(z.work.transform).project(e);
|
|
24840
|
+
return Math.abs(J.z) > 1 || Math.abs(J.x) > 1 || Math.abs(J.y) > 1 ? !1 : z.loadable || z.active;
|
|
24841
24841
|
}), L = /* @__PURE__ */ new Map(), O = H.slice().sort(function(q, z) {
|
|
24842
|
-
var
|
|
24843
|
-
typeof
|
|
24842
|
+
var J = m[q], V = L.get(J);
|
|
24843
|
+
typeof V == "undefined" && (V = scratchVector3$3.copy(J.position).applyMatrix4(J.work.transform).distanceTo(e.position), L.set(J, V));
|
|
24844
24844
|
var U = m[z], j = L.get(U);
|
|
24845
|
-
return typeof j == "undefined" && (j = scratchVector3$3.copy(U.position).applyMatrix4(U.work.transform).distanceTo(e.position), L.set(U, j)),
|
|
24845
|
+
return typeof j == "undefined" && (j = scratchVector3$3.copy(U.position).applyMatrix4(U.work.transform).distanceTo(e.position), L.set(U, j)), V - j;
|
|
24846
24846
|
});
|
|
24847
24847
|
L.clear();
|
|
24848
24848
|
for (var k = 0, D = O; k < D.length; k++) {
|
|
@@ -24867,18 +24867,18 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24867
24867
|
var f = c.work.observers, d = c.accessibleNodes.filter(function(j) {
|
|
24868
24868
|
if (j === r.currentPano.panoIndex && c.work.workCode === r.currentPano.workCode)
|
|
24869
24869
|
return !1;
|
|
24870
|
-
var
|
|
24871
|
-
if (!
|
|
24870
|
+
var K = f[j];
|
|
24871
|
+
if (!K)
|
|
24872
24872
|
return !1;
|
|
24873
|
-
var ie = scratchVector3$3.copy(
|
|
24874
|
-
return ie.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 :
|
|
24873
|
+
var ie = scratchVector3$3.copy(K.position).applyMatrix4(K.work.transform);
|
|
24874
|
+
return ie.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : K.loadable || K.active;
|
|
24875
24875
|
}), h = this.modelScene.intersectRaycaster(s)[0];
|
|
24876
24876
|
if (h) {
|
|
24877
24877
|
var p = arrayMin(d, function(j) {
|
|
24878
|
-
var
|
|
24879
|
-
if (!
|
|
24878
|
+
var K = f[j];
|
|
24879
|
+
if (!K)
|
|
24880
24880
|
return 1 / 0;
|
|
24881
|
-
var ie = scratchVector3$3.copy(
|
|
24881
|
+
var ie = scratchVector3$3.copy(K.standingPosition).applyMatrix4(K.work.transform);
|
|
24882
24882
|
return ie.distanceTo(h.point);
|
|
24883
24883
|
}, !0), g = p[0], m = p[1];
|
|
24884
24884
|
typeof g == "number" && m < this.panoTapTriggerRadius && (l = (o = f[g]) !== null && o !== void 0 ? o : null);
|
|
@@ -24904,34 +24904,34 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
|
|
|
24904
24904
|
}
|
|
24905
24905
|
}
|
|
24906
24906
|
}
|
|
24907
|
-
var O = P.length > 0 ? P : __spreadArray(__spreadArray([], M, !0), w, !0), k = O.slice().sort(function(j,
|
|
24908
|
-
return j.angleTo(R) -
|
|
24907
|
+
var O = P.length > 0 ? P : __spreadArray(__spreadArray([], M, !0), w, !0), k = O.slice().sort(function(j, K) {
|
|
24908
|
+
return j.angleTo(R) - K.angleTo(R);
|
|
24909
24909
|
})[0];
|
|
24910
24910
|
if (k && k.angleTo(u) > S && (b.longitude = Math.atan2(-k.x, -k.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
|
|
24911
24911
|
var D = e.state.fov, q = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(D) : this.minLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(D) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
|
|
24912
24912
|
b.latitude = clamp$1(0, q, z);
|
|
24913
24913
|
}
|
|
24914
|
-
var
|
|
24915
|
-
if (
|
|
24914
|
+
var J = __assign({}, e.state);
|
|
24915
|
+
if (J.workCode = l.work.workCode, J.panoIndex = l.panoIndex, b.longitude !== void 0 && (J.longitude = b.longitude), b.latitude !== void 0 && (J.latitude = b.latitude), b.fov !== void 0 && (J.fov = b.fov), J.distance = 0, J.offset = l.position.clone(), e.state = J, this.emit("gesture.tap", e), !e.defaultPrevented) {
|
|
24916
24916
|
if (this.emit("pano.select", createEvent("pano.select", {
|
|
24917
24917
|
prevPano: this.currentPano,
|
|
24918
|
-
state:
|
|
24918
|
+
state: J,
|
|
24919
24919
|
userAction: e.userAction,
|
|
24920
24920
|
options: b,
|
|
24921
24921
|
progress: 0,
|
|
24922
24922
|
error: null
|
|
24923
24923
|
})), l && !l.active) {
|
|
24924
|
-
var
|
|
24924
|
+
var V = panoStringify({
|
|
24925
24925
|
panoIndex: l.panoIndex,
|
|
24926
24926
|
workCode: l.work.workCode
|
|
24927
|
-
}), U = this.panoMeshes.get(
|
|
24927
|
+
}), U = this.panoMeshes.get(V);
|
|
24928
24928
|
U && (U.setDisabled(!1), U.setLoading(!0));
|
|
24929
24929
|
}
|
|
24930
24930
|
l && l.active && this.emit("pano.request", createEvent("pano.request", {
|
|
24931
24931
|
userAction: e.userAction,
|
|
24932
24932
|
prevPano: this.currentPano,
|
|
24933
24933
|
progress: 0,
|
|
24934
|
-
state:
|
|
24934
|
+
state: J,
|
|
24935
24935
|
options: b,
|
|
24936
24936
|
error: null
|
|
24937
24937
|
}));
|
|
@@ -25864,16 +25864,16 @@ void main() {
|
|
|
25864
25864
|
var D = k[O], q = D.key, z = D.progress;
|
|
25865
25865
|
q !== void 0 && (H.push(q), z > this.locationMotion.progress && L.push(q));
|
|
25866
25866
|
}
|
|
25867
|
-
for (var
|
|
25868
|
-
var U =
|
|
25867
|
+
for (var J = 0, V = Object.keys(this.panoResources); J < V.length; J++) {
|
|
25868
|
+
var U = V[J];
|
|
25869
25869
|
if (!(L.indexOf(U) >= 0)) {
|
|
25870
25870
|
var j = this.panoResources[U];
|
|
25871
25871
|
if (j.panoPicture) {
|
|
25872
|
-
var
|
|
25873
|
-
if (
|
|
25874
|
-
if (
|
|
25872
|
+
var K = j.panoPicture.map;
|
|
25873
|
+
if (K) {
|
|
25874
|
+
if (K === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || K === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
|
|
25875
25875
|
continue;
|
|
25876
|
-
|
|
25876
|
+
K.dispose(), j.panoPicture = null;
|
|
25877
25877
|
}
|
|
25878
25878
|
}
|
|
25879
25879
|
H.indexOf(U) >= 0 || delete this.panoResources[U];
|
|
@@ -25894,37 +25894,37 @@ void main() {
|
|
|
25894
25894
|
userAction: !0,
|
|
25895
25895
|
state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
|
|
25896
25896
|
}))), this.works.getObserver(this.currentPano);
|
|
25897
|
-
var
|
|
25898
|
-
if (
|
|
25899
|
-
for (var se = 0,
|
|
25900
|
-
var
|
|
25897
|
+
var ee = this.works.getObserver(A.panoId), Z = this.works.getObserver(b.panoId), X = /* @__PURE__ */ new Map();
|
|
25898
|
+
if (ee)
|
|
25899
|
+
for (var se = 0, G = ee.accessibleNodes; se < G.length; se++) {
|
|
25900
|
+
var W = G[se], C = ee.work.observers[W];
|
|
25901
25901
|
if (C) {
|
|
25902
|
-
var
|
|
25902
|
+
var $ = panoStringify({
|
|
25903
25903
|
panoIndex: C.panoIndex,
|
|
25904
25904
|
workCode: C.work.workCode
|
|
25905
25905
|
});
|
|
25906
|
-
|
|
25906
|
+
X.set($, C);
|
|
25907
25907
|
}
|
|
25908
25908
|
}
|
|
25909
|
-
if (
|
|
25910
|
-
for (var
|
|
25911
|
-
var
|
|
25909
|
+
if (Z)
|
|
25910
|
+
for (var ne = 0, te = Z.accessibleNodes; ne < te.length; ne++) {
|
|
25911
|
+
var W = te[ne], C = Z.work.observers[W];
|
|
25912
25912
|
if (C) {
|
|
25913
|
-
var
|
|
25913
|
+
var $ = panoStringify({
|
|
25914
25914
|
panoIndex: C.panoIndex,
|
|
25915
25915
|
workCode: C.work.workCode
|
|
25916
25916
|
});
|
|
25917
|
-
|
|
25917
|
+
X.set($, C);
|
|
25918
25918
|
}
|
|
25919
25919
|
}
|
|
25920
25920
|
if (this.panoMeshes.forEach(function(Re, ze) {
|
|
25921
|
-
var Fe =
|
|
25922
|
-
Fe ? (Re.position.copy(Fe.position).applyMatrix4(Fe.work.transform),
|
|
25923
|
-
}),
|
|
25921
|
+
var Fe = X.get(ze);
|
|
25922
|
+
Fe ? (Re.position.copy(Fe.position).applyMatrix4(Fe.work.transform), X.delete(ze)) : (o.helper.remove(Re), Re.dispose(), o.panoMeshes.delete(ze));
|
|
25923
|
+
}), X.forEach(function(Re, ze) {
|
|
25924
25924
|
var Fe = new PanoSphereMesh();
|
|
25925
25925
|
Fe.position.copy(Re.position).applyMatrix4(Re.work.transform);
|
|
25926
25926
|
var Oe = Re.position.distanceTo(Re.standingPosition) > o.aerialObserverMinHeight;
|
|
25927
|
-
Oe ? Fe.scale.setScalar(15) : Fe.scale.setScalar(1), o.panoMeshes.set(ze, Fe), o.helper.add(Fe),
|
|
25927
|
+
Oe ? Fe.scale.setScalar(15) : Fe.scale.setScalar(1), o.panoMeshes.set(ze, Fe), o.helper.add(Fe), X.delete(ze);
|
|
25928
25928
|
}), this.camera.pose.distance > 0.1 || R ? this.panoMeshes.forEach(function(Re, ze) {
|
|
25929
25929
|
Re.setOpacity(0), Re.updateTime && Re.updateTime(e, r), Re.visible = !1;
|
|
25930
25930
|
}) : this.panoMeshes.forEach(function(Re, ze) {
|
|
@@ -25938,16 +25938,16 @@ void main() {
|
|
|
25938
25938
|
Le < 0.05 ? Re.setOpacity(0) : Re.setOpacity(clamp$1(1.5 / Le, 0, 1)), panoEqual(o.currentPano, Fe) && Re.setOpacity(0), Re.lookAt(o.camera.position);
|
|
25939
25939
|
}
|
|
25940
25940
|
}), this.locationMotion.ended) {
|
|
25941
|
-
var
|
|
25941
|
+
var ve = this.intersect(e);
|
|
25942
25942
|
this.panoMeshes.forEach(function(Re, ze) {
|
|
25943
|
-
Re.setCurrent(Re ===
|
|
25943
|
+
Re.setCurrent(Re === ve), Re.updateTime && Re.updateTime(e, r);
|
|
25944
25944
|
});
|
|
25945
25945
|
}
|
|
25946
25946
|
{
|
|
25947
|
-
var M = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1,
|
|
25948
|
-
if (
|
|
25947
|
+
var M = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, oe = Math.round(M), fe = this.modelScene.parameter.pano0, be = this.modelScene.parameter.pano1, ae = oe === 0 ? fe : be, C = void 0;
|
|
25948
|
+
if (ae && (C = this.works.getObserver(ae.panoId), C || (C = this.panoPictureObserverMap.get(ae))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = M < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !C || !ae || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
|
|
25949
25949
|
this.tiling.setObserver(null);
|
|
25950
|
-
var
|
|
25950
|
+
var ue = {
|
|
25951
25951
|
renderer: this.renderer,
|
|
25952
25952
|
resolution: this.camera.resolution,
|
|
25953
25953
|
pixelRatio: this.camera.pixelRatio,
|
|
@@ -25960,37 +25960,37 @@ void main() {
|
|
|
25960
25960
|
minLevel: 0,
|
|
25961
25961
|
level: 0
|
|
25962
25962
|
};
|
|
25963
|
-
this.tiling.update(
|
|
25963
|
+
this.tiling.update(ue), this.modelScene.parameter.set("refinedScreen", null);
|
|
25964
25964
|
} else {
|
|
25965
|
-
var me = getImageSizeLevel(
|
|
25965
|
+
var me = getImageSizeLevel(ae.mapSize), ge = me + 1, Ae = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Te = Math.floor(this.tileLevelForFov(this.camera.fov, Ae)), he = Te > me ? Te : 0;
|
|
25966
25966
|
this.tiling.setObserver(C);
|
|
25967
|
-
var
|
|
25967
|
+
var ue = {
|
|
25968
25968
|
renderer: this.renderer,
|
|
25969
25969
|
resolution: this.camera.resolution,
|
|
25970
25970
|
pixelRatio: this.camera.pixelRatio,
|
|
25971
25971
|
time: this.camera.time,
|
|
25972
25972
|
cameraMatrix: this.camera.matrixWorld,
|
|
25973
25973
|
cameraProjectionMatrix: this.camera.projectionMatrix,
|
|
25974
|
-
panoMap:
|
|
25975
|
-
panoMatrix:
|
|
25976
|
-
panoZoom:
|
|
25974
|
+
panoMap: ae.map,
|
|
25975
|
+
panoMatrix: ae.matrix,
|
|
25976
|
+
panoZoom: ae.zoom,
|
|
25977
25977
|
minLevel: ge,
|
|
25978
|
-
level:
|
|
25979
|
-
}, Se = this.tiling.update(
|
|
25978
|
+
level: he
|
|
25979
|
+
}, Se = this.tiling.update(ue), _e = {
|
|
25980
25980
|
map: this.tiling.renderTarget.texture,
|
|
25981
25981
|
matrixInverse: this.tiling.camera.matrixWorldInverse,
|
|
25982
25982
|
projectionMatrix: this.tiling.camera.projectionMatrix,
|
|
25983
|
-
pano:
|
|
25984
|
-
opacity: (
|
|
25983
|
+
pano: oe,
|
|
25984
|
+
opacity: (fe == null ? void 0 : fe.panoId) === (be == null ? void 0 : be.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
|
|
25985
25985
|
}, Ee = this.modelScene.parameter.refinedScreen;
|
|
25986
25986
|
(Se || _e.pano !== (Ee == null ? void 0 : Ee.pano) || _e.opacity !== (Ee == null ? void 0 : Ee.opacity)) && this.modelScene.parameter.set("refinedScreen", _e);
|
|
25987
25987
|
}
|
|
25988
25988
|
}
|
|
25989
25989
|
this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
|
|
25990
25990
|
{
|
|
25991
|
-
var
|
|
25992
|
-
if (
|
|
25993
|
-
if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !==
|
|
25991
|
+
var de = b.effect, Ve = this.modelScene.parameter, fe = Ve.pano0, be = Ve.pano1;
|
|
25992
|
+
if (fe && be && fe !== be && (de === "fly" || de === "model") && this.flyEffectUseDepthBuffer) {
|
|
25993
|
+
if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== fe.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== be.panoId) {
|
|
25994
25994
|
var ye = 500, Be = 512;
|
|
25995
25995
|
this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== Be && this.pano0DepthCubeRenderTarget.setSize(Be, Be) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Be, {
|
|
25996
25996
|
minFilter: THREE.NearestFilter,
|
|
@@ -26002,11 +26002,11 @@ void main() {
|
|
|
26002
26002
|
generateMipmaps: !1
|
|
26003
26003
|
});
|
|
26004
26004
|
var Ie = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
|
|
26005
|
-
Ie.matrix.copy(
|
|
26005
|
+
Ie.matrix.copy(fe.matrix), Ie.matrixWorld.copy(Ie.matrix), Ie.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ie, ye);
|
|
26006
26006
|
var $e = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
|
|
26007
26007
|
$e.matrix.copy(be.matrix), $e.matrixWorld.copy($e.matrix), $e.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, $e, ye), this.modelScene.parameter.set({
|
|
26008
26008
|
pano0Depth: {
|
|
26009
|
-
panoId:
|
|
26009
|
+
panoId: fe.panoId,
|
|
26010
26010
|
map: this.pano0DepthCubeRenderTarget.texture,
|
|
26011
26011
|
mapSize: this.pano0DepthCubeRenderTarget.width,
|
|
26012
26012
|
maxDepth: ye
|
|
@@ -26296,33 +26296,33 @@ void main() {
|
|
|
26296
26296
|
longitude: r.longitude,
|
|
26297
26297
|
latitude: r.latitude,
|
|
26298
26298
|
fov: r.fov
|
|
26299
|
-
}, I = [], C = function(
|
|
26299
|
+
}, I = [], C = function(V) {
|
|
26300
26300
|
var U = H.modelScene.models.find(function(re) {
|
|
26301
|
-
return re.work ===
|
|
26301
|
+
return re.work === V;
|
|
26302
26302
|
});
|
|
26303
|
-
if (!U || U.visible === !1 ||
|
|
26303
|
+
if (!U || U.visible === !1 || V.observers.length <= 0)
|
|
26304
26304
|
return "continue";
|
|
26305
|
-
if (scratchObserverBox$1.copy(
|
|
26306
|
-
for (var j = 0,
|
|
26307
|
-
var ie =
|
|
26305
|
+
if (scratchObserverBox$1.copy(V.observerBox).expandByScalar(10).applyMatrix4(V.transform), scratchObserverBox$1.containsPoint(d))
|
|
26306
|
+
for (var j = 0, K = V.observers; j < K.length; j++) {
|
|
26307
|
+
var ie = K[j];
|
|
26308
26308
|
I.push(ie);
|
|
26309
26309
|
}
|
|
26310
26310
|
}, H = this, L = 0, O = this.works; L < O.length; L++) {
|
|
26311
26311
|
var k = O[L];
|
|
26312
26312
|
C(k);
|
|
26313
26313
|
}
|
|
26314
|
-
var D = arrayMin(I, function(
|
|
26315
|
-
return scratchVector3$2.copy(
|
|
26314
|
+
var D = arrayMin(I, function(V) {
|
|
26315
|
+
return scratchVector3$2.copy(V.position).applyMatrix4(V.work.transform).distanceTo(d);
|
|
26316
26316
|
}), q = D ? {
|
|
26317
26317
|
workCode: D.work.workCode,
|
|
26318
26318
|
panoIndex: D.panoIndex
|
|
26319
26319
|
} : {
|
|
26320
26320
|
workCode: "",
|
|
26321
26321
|
panoIndex: 0
|
|
26322
|
-
}, z = __assign(__assign({}, q), { mode: this.mode, longitude: (u = _.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = _.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = _.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }),
|
|
26322
|
+
}, z = __assign(__assign({}, q), { mode: this.mode, longitude: (u = _.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = _.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = _.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), J = this.currentPano;
|
|
26323
26323
|
this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
26324
26324
|
options: r,
|
|
26325
|
-
prevPano:
|
|
26325
|
+
prevPano: J,
|
|
26326
26326
|
progress: 0,
|
|
26327
26327
|
state: z,
|
|
26328
26328
|
userAction: this.userAction,
|
|
@@ -26331,26 +26331,26 @@ void main() {
|
|
|
26331
26331
|
// resolve
|
|
26332
26332
|
// 动画结束
|
|
26333
26333
|
function() {
|
|
26334
|
-
for (var
|
|
26335
|
-
var j = U[
|
|
26334
|
+
for (var V = 0, U = s.modelScene.children; V < U.length; V++) {
|
|
26335
|
+
var j = U[V];
|
|
26336
26336
|
j instanceof Model && j.show();
|
|
26337
26337
|
}
|
|
26338
|
-
var
|
|
26338
|
+
var K = __assign(__assign(__assign({}, q), { mode: s.mode }), clonePose(s.camera.pose));
|
|
26339
26339
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
26340
26340
|
options: r,
|
|
26341
|
-
prevPano:
|
|
26341
|
+
prevPano: J,
|
|
26342
26342
|
progress: 0,
|
|
26343
|
-
state:
|
|
26343
|
+
state: K,
|
|
26344
26344
|
userAction: s.userAction,
|
|
26345
26345
|
error: null
|
|
26346
|
-
})), r.moveEndCallback && r.moveEndCallback(
|
|
26346
|
+
})), r.moveEndCallback && r.moveEndCallback(K);
|
|
26347
26347
|
},
|
|
26348
26348
|
// reject
|
|
26349
26349
|
// 动画被取消
|
|
26350
26350
|
function() {
|
|
26351
26351
|
r.moveCancelCallback && r.moveCancelCallback(), s.emit("pano.cancel", createEvent("pano.cancel", {
|
|
26352
26352
|
options: r,
|
|
26353
|
-
prevPano:
|
|
26353
|
+
prevPano: J,
|
|
26354
26354
|
progress: 0,
|
|
26355
26355
|
state: z,
|
|
26356
26356
|
userAction: s.userAction,
|
|
@@ -26759,10 +26759,10 @@ void main() {
|
|
|
26759
26759
|
longitude: w.longitude,
|
|
26760
26760
|
latitude: w.latitude
|
|
26761
26761
|
}, 0).catch(noop), e.isFinal) {
|
|
26762
|
-
var
|
|
26762
|
+
var J = e.velocityX, V = e.velocityY;
|
|
26763
26763
|
this.inMomentumMovement = {
|
|
26764
26764
|
uuid: createUuid()
|
|
26765
|
-
}, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x:
|
|
26765
|
+
}, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: J, y: V })), { x: 0, y: 0, z: 0 }), 0);
|
|
26766
26766
|
}
|
|
26767
26767
|
}
|
|
26768
26768
|
}
|
|
@@ -27032,15 +27032,25 @@ var _moveEvent = { type: "move" }, XRController = (
|
|
|
27032
27032
|
var e = this.controllers[t];
|
|
27033
27033
|
return e || console.warn("no controller find"), e.getTargetRaySpace();
|
|
27034
27034
|
}, n.prototype.getRightController = function() {
|
|
27035
|
-
if (!this.session)
|
|
27035
|
+
if (!this.session || !this.session.inputSources)
|
|
27036
27036
|
return null;
|
|
27037
|
-
var t =
|
|
27038
|
-
|
|
27037
|
+
var t = void 0;
|
|
27038
|
+
if (this.session.inputSources.forEach(function(r, o) {
|
|
27039
|
+
r.handedness === "right" && (t = o);
|
|
27040
|
+
}), t === void 0)
|
|
27041
|
+
return console.warn("no inputSource for right hand"), null;
|
|
27042
|
+
var e = this.controllers[t];
|
|
27043
|
+
return e ? e.getTargetRaySpace() : (console.warn("right controller not find"), null);
|
|
27039
27044
|
}, n.prototype.getLeftController = function() {
|
|
27040
|
-
if (!this.session)
|
|
27045
|
+
if (!this.session || !this.session.inputSources)
|
|
27041
27046
|
return null;
|
|
27042
|
-
var t =
|
|
27043
|
-
|
|
27047
|
+
var t = void 0;
|
|
27048
|
+
if (this.session.inputSources.forEach(function(r, o) {
|
|
27049
|
+
r.handedness === "left" && (t = o);
|
|
27050
|
+
}), t === void 0)
|
|
27051
|
+
return console.warn("no inputSource for left hand"), null;
|
|
27052
|
+
var e = this.controllers[t];
|
|
27053
|
+
return e ? e.getTargetRaySpace() : (console.warn("left controller not find"), null);
|
|
27044
27054
|
}, n.prototype.getControllerGrip = function(t) {
|
|
27045
27055
|
var e = this.controllers[t];
|
|
27046
27056
|
return e || console.warn("no controller find"), e.getGripSpace();
|
|
@@ -27613,7 +27623,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
|
|
|
27613
27623
|
}
|
|
27614
27624
|
return Object.defineProperty(t, "version", {
|
|
27615
27625
|
get: function() {
|
|
27616
|
-
return "6.7.0-alpha.
|
|
27626
|
+
return "6.7.0-alpha.32";
|
|
27617
27627
|
},
|
|
27618
27628
|
enumerable: !1,
|
|
27619
27629
|
configurable: !0
|
|
@@ -28248,38 +28258,38 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28248
28258
|
var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), q = this.locationMotionKeyframesLength(T);
|
|
28249
28259
|
S = this.locationMotion.getProgressVelocity(y) * D / q;
|
|
28250
28260
|
}
|
|
28251
|
-
var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" || r.effect === "model" ? b : 0),
|
|
28261
|
+
var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" || r.effect === "model" ? b : 0), J = {
|
|
28252
28262
|
longitude: o.longitude,
|
|
28253
28263
|
latitude: o.latitude,
|
|
28254
28264
|
fov: o.fov
|
|
28255
|
-
},
|
|
28265
|
+
}, V = __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 }), U = this.currentPano;
|
|
28256
28266
|
if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
|
|
28257
28267
|
options: o,
|
|
28258
28268
|
prevPano: U,
|
|
28259
28269
|
progress: 0,
|
|
28260
|
-
state:
|
|
28270
|
+
state: V,
|
|
28261
28271
|
userAction: this.userAction,
|
|
28262
28272
|
error: null
|
|
28263
|
-
})), o.moveStartCallback && o.moveStartCallback(
|
|
28264
|
-
this.cameraMotion.set(
|
|
28273
|
+
})), o.moveStartCallback && o.moveStartCallback(V), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly" || r.effect === "model")
|
|
28274
|
+
this.cameraMotion.set(J, z).catch(noop);
|
|
28265
28275
|
else {
|
|
28266
28276
|
var j = coordinatesToVector({
|
|
28267
28277
|
longitude: this.cameraMotion.value.longitude,
|
|
28268
28278
|
latitude: this.cameraMotion.value.latitude
|
|
28269
|
-
}),
|
|
28270
|
-
longitude: (f =
|
|
28271
|
-
latitude: (d =
|
|
28279
|
+
}), K = coordinatesToVector({
|
|
28280
|
+
longitude: (f = J.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
|
|
28281
|
+
latitude: (d = J.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
|
|
28272
28282
|
}), ie = new THREE.Object3D();
|
|
28273
28283
|
ie.lookAt(j);
|
|
28274
28284
|
var re = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion);
|
|
28275
|
-
ie.lookAt(
|
|
28276
|
-
var
|
|
28277
|
-
r.effect === "zoomin" ?
|
|
28278
|
-
for (var
|
|
28279
|
-
var
|
|
28280
|
-
if (
|
|
28281
|
-
var
|
|
28282
|
-
|
|
28285
|
+
ie.lookAt(K);
|
|
28286
|
+
var ee = new THREE.Matrix4().makeRotationFromQuaternion(ie.quaternion), Z = new THREE.Matrix4().getInverse(re).premultiply(ee), X = this.cameraMotion.value.fov, se = (h = J.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, G = 1;
|
|
28287
|
+
r.effect === "zoomin" ? G = 1.5 : r.effect === "zoomout" && (G = 0.4);
|
|
28288
|
+
for (var W = se * G, $ = 0; $ < T.length - 1; $++) {
|
|
28289
|
+
var ne = T[$].key;
|
|
28290
|
+
if (ne) {
|
|
28291
|
+
var te = this.panoResources[ne];
|
|
28292
|
+
te && (te.fixCameraTransform.copy(Z), te.leftPanoPicture && (te.leftPanoPicture.zoom = Math.tan(W / 2 / 180 * Math.PI) / Math.tan(X / 2 / 180 * Math.PI)));
|
|
28283
28293
|
}
|
|
28284
28294
|
}
|
|
28285
28295
|
this.cameraMotion.setKeyframes([
|
|
@@ -28294,54 +28304,54 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28294
28304
|
{
|
|
28295
28305
|
progress: 0,
|
|
28296
28306
|
value: {
|
|
28297
|
-
longitude: (p =
|
|
28298
|
-
latitude: (g =
|
|
28299
|
-
fov:
|
|
28307
|
+
longitude: (p = J.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
|
|
28308
|
+
latitude: (g = J.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
|
|
28309
|
+
fov: W
|
|
28300
28310
|
}
|
|
28301
28311
|
},
|
|
28302
28312
|
{
|
|
28303
28313
|
progress: 1,
|
|
28304
28314
|
value: {
|
|
28305
|
-
longitude: (m =
|
|
28306
|
-
latitude: (E =
|
|
28315
|
+
longitude: (m = J.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
|
|
28316
|
+
latitude: (E = J.latitude) !== null && E !== void 0 ? E : this.cameraMotion.value.latitude,
|
|
28307
28317
|
fov: se
|
|
28308
28318
|
}
|
|
28309
28319
|
}
|
|
28310
28320
|
], z).catch(noop);
|
|
28311
28321
|
}
|
|
28312
|
-
var
|
|
28313
|
-
|
|
28322
|
+
var ve = this.locationMotion.setKeyframes(T, z, S);
|
|
28323
|
+
ve.then(
|
|
28314
28324
|
// resolve
|
|
28315
28325
|
// 动画结束
|
|
28316
28326
|
function() {
|
|
28317
|
-
for (var
|
|
28318
|
-
var be =
|
|
28327
|
+
for (var oe = 0, fe = s.modelScene.children; oe < fe.length; oe++) {
|
|
28328
|
+
var be = fe[oe];
|
|
28319
28329
|
be instanceof Model && be.show();
|
|
28320
28330
|
}
|
|
28321
|
-
var
|
|
28331
|
+
var ae = __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 });
|
|
28322
28332
|
s.emit("pano.arrived", createEvent("pano.arrived", {
|
|
28323
28333
|
options: o,
|
|
28324
28334
|
prevPano: U,
|
|
28325
28335
|
progress: 1,
|
|
28326
|
-
state:
|
|
28336
|
+
state: ae,
|
|
28327
28337
|
userAction: s.userAction,
|
|
28328
28338
|
error: null
|
|
28329
|
-
})), o.moveEndCallback && o.moveEndCallback(
|
|
28330
|
-
var
|
|
28331
|
-
if (
|
|
28339
|
+
})), o.moveEndCallback && o.moveEndCallback(ae);
|
|
28340
|
+
var ue = s.works.getObserver(s.currentPano);
|
|
28341
|
+
if (ue && ue.images.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
|
|
28332
28342
|
var me = {
|
|
28333
28343
|
map: s.videoTexture,
|
|
28334
|
-
size:
|
|
28335
|
-
matrix:
|
|
28336
|
-
panoMatrix:
|
|
28344
|
+
size: ue.images.video.size.clone(),
|
|
28345
|
+
matrix: ue.images.video.matrix.clone(),
|
|
28346
|
+
panoMatrix: ue.matrix.clone().premultiply(ue.work.transform),
|
|
28337
28347
|
alpha: 1
|
|
28338
28348
|
}, ge = createUuid(), Ae = s.videoTexture.image;
|
|
28339
28349
|
Ae.setAttribute("uuid", ge), canplayVideo().then(function(Te) {
|
|
28340
|
-
Te &&
|
|
28350
|
+
Te && ue.images.video && Ae.getAttribute("uuid") === ge && (Ae.oncanplay = function() {
|
|
28341
28351
|
Ae.oncanplay = noop, Ae.play();
|
|
28342
28352
|
}, Ae.ontimeupdate = function() {
|
|
28343
28353
|
Ae.currentTime > 0.5 && (Ae.ontimeupdate = noop, s.panoVideo.setMaterial(me));
|
|
28344
|
-
}, Ae.src =
|
|
28354
|
+
}, Ae.src = ue.images.video.source);
|
|
28345
28355
|
}).catch((function() {
|
|
28346
28356
|
Ae.removeAttribute("uuid");
|
|
28347
28357
|
}));
|
|
@@ -28354,7 +28364,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28354
28364
|
options: o,
|
|
28355
28365
|
prevPano: U,
|
|
28356
28366
|
progress: 0,
|
|
28357
|
-
state:
|
|
28367
|
+
state: V,
|
|
28358
28368
|
userAction: s.userAction,
|
|
28359
28369
|
error: null
|
|
28360
28370
|
})), o.moveCancelCallback && o.moveCancelCallback();
|
|
@@ -28475,27 +28485,27 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28475
28485
|
L.copy(O), C = !0;
|
|
28476
28486
|
}
|
|
28477
28487
|
v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(L.x + (O.x - L.x) * H, L.y + (O.y - L.y) * H, L.z + (O.z - L.z) * H);
|
|
28478
|
-
for (var z = [],
|
|
28479
|
-
var j = U[
|
|
28480
|
-
|
|
28481
|
-
}
|
|
28482
|
-
for (var re = 0,
|
|
28483
|
-
var
|
|
28484
|
-
if (!(
|
|
28485
|
-
var
|
|
28486
|
-
if (
|
|
28487
|
-
var se =
|
|
28488
|
+
for (var z = [], J = [], V = 0, U = this.locationMotion.keyframes; V < U.length; V++) {
|
|
28489
|
+
var j = U[V], K = j.key, ie = j.progress;
|
|
28490
|
+
K !== void 0 && (z.push(K), ie > this.locationMotion.progress && J.push(K));
|
|
28491
|
+
}
|
|
28492
|
+
for (var re = 0, ee = Object.keys(this.panoResources); re < ee.length; re++) {
|
|
28493
|
+
var Z = ee[re];
|
|
28494
|
+
if (!(J.indexOf(Z) >= 0)) {
|
|
28495
|
+
var X = this.panoResources[Z];
|
|
28496
|
+
if (X.leftPanoPicture) {
|
|
28497
|
+
var se = X.leftPanoPicture.map;
|
|
28488
28498
|
if (se) {
|
|
28489
28499
|
if (se === ((s = y.pano0) === null || s === void 0 ? void 0 : s.map) || se === ((u = y.pano1) === null || u === void 0 ? void 0 : u.map))
|
|
28490
28500
|
continue;
|
|
28491
|
-
se.dispose(),
|
|
28501
|
+
se.dispose(), X.leftPanoPicture = null;
|
|
28492
28502
|
}
|
|
28493
28503
|
}
|
|
28494
|
-
z.indexOf(
|
|
28504
|
+
z.indexOf(Z) >= 0 || delete this.panoResources[Z];
|
|
28495
28505
|
}
|
|
28496
28506
|
}
|
|
28497
|
-
var
|
|
28498
|
-
|
|
28507
|
+
var G = panoParse(P.panoId);
|
|
28508
|
+
G !== this.currentPano && (this.currentPano = G, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
|
|
28499
28509
|
userAction: this.userAction,
|
|
28500
28510
|
prevPano: panoParse(_.panoId),
|
|
28501
28511
|
state: __assign(__assign(__assign(__assign({}, panoParse(I.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), v),
|
|
@@ -28505,30 +28515,30 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28505
28515
|
}));
|
|
28506
28516
|
}
|
|
28507
28517
|
this.camera.setFromPose(v), 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);
|
|
28508
|
-
var
|
|
28509
|
-
if (
|
|
28510
|
-
for (var
|
|
28511
|
-
var me =
|
|
28512
|
-
Ae && (ge.projectionMatrix.fromArray(me.projectionMatrix), ge.projectionMatrixInverse.getInverse(ge.projectionMatrix), ge.matrix.fromArray(me.transform.matrix), ge.matrix.setPosition(this.camera.position), ge.matrix.decompose(ge.position, ge.quaternion, ge.scale), ge.matrixWorld.copy(ge.matrix), ge.matrixWorldInverse.getInverse(ge.matrixWorld), ge.matrixAutoUpdate = !1,
|
|
28518
|
+
var W = m, $ = W[1], ne = new THREE.Vector3(0, 0, 0), te = new THREE.Vector2().copy(this.camera.resolution);
|
|
28519
|
+
if ($ && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
|
|
28520
|
+
for (var ve = this.xrManager.cameraVR, oe = this.xrManager.referenceSpace, fe = this.xrManager.session.renderState.baseLayer, be = $.getViewerPose(oe), ae = (l = be == null ? void 0 : be.views) !== null && l !== void 0 ? l : [], ue = 0; ue < ae.length; ue++) {
|
|
28521
|
+
var me = ae[ue], ge = ve.cameras[ue], Ae = fe.getViewport(me);
|
|
28522
|
+
Ae && (ge.projectionMatrix.fromArray(me.projectionMatrix), ge.projectionMatrixInverse.getInverse(ge.projectionMatrix), ge.matrix.fromArray(me.transform.matrix), ge.matrix.setPosition(this.camera.position), ge.matrix.decompose(ge.position, ge.quaternion, ge.scale), ge.matrixWorld.copy(ge.matrix), ge.matrixWorldInverse.getInverse(ge.matrixWorld), ge.matrixAutoUpdate = !1, ne.copy(ge.position), ge.viewport.set(Ae.x, Ae.y, Ae.width, Ae.height), te.set(Ae.width, Ae.height));
|
|
28513
28523
|
}
|
|
28514
28524
|
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.camera.computePose((c = v.distance) !== null && c !== void 0 ? c : this.camera.pose.distance), this.xrManager.session.inputSources) {
|
|
28515
|
-
for (var
|
|
28516
|
-
if (this.xrManager.session.inputSources[
|
|
28517
|
-
var Te =
|
|
28525
|
+
for (var ue = 0; ue < this.xrManager.session.inputSources.length; ue++)
|
|
28526
|
+
if (this.xrManager.session.inputSources[ue] && this.xrManager.session.inputSources[ue].targetRayMode === "transient-pointer") {
|
|
28527
|
+
var Te = $.getPose(this.xrManager.session.inputSources[ue].targetRaySpace, oe);
|
|
28518
28528
|
if (Te) {
|
|
28519
|
-
var
|
|
28529
|
+
var he = Te.transform.orientation, Se = new THREE.Quaternion(he.x, he.y, he.z, he.w), _e = new THREE.Vector3(0, 0, -1).applyQuaternion(Se), Ee = new THREE.Raycaster(this.camera.position, _e);
|
|
28520
28530
|
this.gazeRay = Ee;
|
|
28521
28531
|
}
|
|
28522
28532
|
}
|
|
28523
28533
|
}
|
|
28524
28534
|
if (this.xrManager.machineType === "Oculus" || this.xrManager.machineType === "Pico") {
|
|
28525
|
-
for (var
|
|
28526
|
-
var Pe = ye.xrManager.controllers[
|
|
28535
|
+
for (var de = this.xrManager.session.inputSources, Ve = function(pe) {
|
|
28536
|
+
var Pe = ye.xrManager.controllers[pe], we = de[pe];
|
|
28527
28537
|
if (!we)
|
|
28528
28538
|
return "continue";
|
|
28529
|
-
Pe && Pe.update(we,
|
|
28530
|
-
var qe = ye.xrManager.getController(
|
|
28531
|
-
we.handedness === "left" ? ye.xrControllerRay.left.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)) : we.handedness === "right" && ye.xrControllerRay.right.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)), ye.controllerWrappers[
|
|
28539
|
+
Pe && Pe.update(we, $, oe);
|
|
28540
|
+
var qe = ye.xrManager.getController(pe), Ye = new THREE.Vector3(0, 1.2, 0), ut = qe.position.clone().add(ne).sub(Ye);
|
|
28541
|
+
we.handedness === "left" ? ye.xrControllerRay.left.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)) : we.handedness === "right" && ye.xrControllerRay.right.set(ut, new THREE.Vector3(0, 0, -1).applyEuler(qe.rotation)), ye.controllerWrappers[pe].position.copy(new THREE.Vector3(0, 0, 0).add(ne).sub(Ye));
|
|
28532
28542
|
var Ke = ye.modelScene.intersectRaycaster(ye.xrControllerRay.right);
|
|
28533
28543
|
if (Ke.length === 0) {
|
|
28534
28544
|
var ht = ye.works.getResolvedObserver(ye.currentPano);
|
|
@@ -28541,30 +28551,30 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28541
28551
|
if (we.handedness === "right") {
|
|
28542
28552
|
var Bt = ye.xrControllerRay.right.intersectObject(ye.xrCustomObjectsScene, !0), B = Ke[0].face.normal, F = B.clone(), N = Ke[0].point.clone();
|
|
28543
28553
|
ye.intersectMesh.position.copy(N);
|
|
28544
|
-
var
|
|
28545
|
-
if (ye.intersectMesh.lookAt(
|
|
28554
|
+
var Q = N.clone().add(F);
|
|
28555
|
+
if (ye.intersectMesh.lookAt(Q), Math.abs(B.y) > 0.99) {
|
|
28546
28556
|
var Y = ye.camera.position.clone().sub(N);
|
|
28547
28557
|
ye.intersectMesh.rotation.z = -Math.atan2(Y.z, Y.x);
|
|
28548
28558
|
}
|
|
28549
28559
|
ye.intersectMesh.visible = !0, ye.needsRender = !0, Bt.length > 0 ? (ye.pointerLines.right.setPoints(ut, Bt[0].point), ye.pointerLines.right.points.visible = !0, ye.intersectMesh.visible = !1) : (ye.pointerLines.right.points.visible = !1, ye.pointerLines.right.setPoints(ut, Ke[0].point));
|
|
28550
|
-
var
|
|
28560
|
+
var le = Ke[0], xe = createEvent("intersect.update", {
|
|
28551
28561
|
raycaster: (f = ye.xrControllerRay.right) !== null && f !== void 0 ? f : null,
|
|
28552
|
-
intersection:
|
|
28562
|
+
intersection: le != null ? le : null,
|
|
28553
28563
|
object: ye.intersectMesh
|
|
28554
28564
|
});
|
|
28555
28565
|
if (ye.emit("intersect.update", xe), xe.defaultPrevented)
|
|
28556
28566
|
return ye.hideIntersectMesh(), { value: void 0 };
|
|
28557
28567
|
} else
|
|
28558
28568
|
ye.pointerLines.left.setPoints(ut, Ke[0].point);
|
|
28559
|
-
}, ye = this,
|
|
28560
|
-
var Be = Ve(
|
|
28569
|
+
}, ye = this, ue = 0; ue < de.length; ue++) {
|
|
28570
|
+
var Be = Ve(ue);
|
|
28561
28571
|
if (typeof Be == "object")
|
|
28562
28572
|
return Be.value;
|
|
28563
28573
|
}
|
|
28564
|
-
this.updateControllerHelper(
|
|
28574
|
+
this.updateControllerHelper(de, e, r);
|
|
28565
28575
|
}
|
|
28566
28576
|
} else
|
|
28567
|
-
|
|
28577
|
+
$ || console.error("xrFrame丢失,请重试"), this.xrManager.session || console.error("session丢失,请重试"), this.xrManager.session && !this.xrManager.session.renderState.baseLayer && console.error("no layer found");
|
|
28568
28578
|
isEmptyObject(y) === !1 && this.modelScene.parameter.set(y), this.emit("camera.update", createEvent("camera.update", {
|
|
28569
28579
|
userAction: this.userAction,
|
|
28570
28580
|
state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
|
|
@@ -28576,30 +28586,30 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28576
28586
|
q && Fe.push(q);
|
|
28577
28587
|
}
|
|
28578
28588
|
var lt = /* @__PURE__ */ new Map();
|
|
28579
|
-
if (Fe.sort(function(
|
|
28580
|
-
var we = lt.get(
|
|
28581
|
-
typeof we == "undefined" && (we =
|
|
28582
|
-
var qe = lt.get(
|
|
28589
|
+
if (Fe.sort(function(pe, Pe) {
|
|
28590
|
+
var we = lt.get(pe);
|
|
28591
|
+
typeof we == "undefined" && (we = pe.standingPosition.distanceTo(Ie.standingPosition), lt.set(pe, we));
|
|
28592
|
+
var qe = lt.get(pe);
|
|
28583
28593
|
return typeof qe == "undefined" && (qe = Pe.standingPosition.distanceTo(Ie.standingPosition), lt.set(Pe, qe)), we - qe;
|
|
28584
28594
|
}), Fe.length) {
|
|
28585
28595
|
this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % Fe.length;
|
|
28586
|
-
var nt = Fe[this.accessibleObserverFloorCheckCount], ot = this.modelScene.models.find(function(
|
|
28587
|
-
return
|
|
28596
|
+
var nt = Fe[this.accessibleObserverFloorCheckCount], ot = this.modelScene.models.find(function(pe) {
|
|
28597
|
+
return pe.work === (nt == null ? void 0 : nt.work);
|
|
28588
28598
|
});
|
|
28589
28599
|
if (nt && ot && ot.visible) {
|
|
28590
28600
|
var At = 0.3, We = 0.05, Ct = 5e-3, He = nt.standingPosition.clone().applyMatrix4(nt.work.transform), Ne = panoStringify({
|
|
28591
28601
|
panoIndex: nt.panoIndex,
|
|
28592
28602
|
workCode: nt.work.workCode
|
|
28593
|
-
}), bt = adjustPanoCircleMeshVectors.map(function(
|
|
28594
|
-
scratchRaycaster.ray.origin.copy(He), scratchRaycaster.ray.origin.add(scratchVector3.copy(
|
|
28603
|
+
}), bt = adjustPanoCircleMeshVectors.map(function(pe) {
|
|
28604
|
+
scratchRaycaster.ray.origin.copy(He), scratchRaycaster.ray.origin.add(scratchVector3.copy(pe).setY(At)), scratchRaycaster.ray.direction.set(0, -1, 0), scratchRaycaster.firstHitOnly = !0, scratchRaycaster.floorIndex = -1;
|
|
28595
28605
|
var Pe = ot.intersectRaycaster(scratchRaycaster)[0];
|
|
28596
28606
|
return Pe && Pe.distance - Ct <= At ? new THREE.Vector3().copy(He).setY(Pe.point.y + Ct) : He;
|
|
28597
28607
|
});
|
|
28598
|
-
bt.sort(function(
|
|
28599
|
-
return Pe.y -
|
|
28608
|
+
bt.sort(function(pe, Pe) {
|
|
28609
|
+
return Pe.y - pe.y;
|
|
28600
28610
|
});
|
|
28601
|
-
var It = bt[Math.floor(bt.length / 2)], Tt = bt.filter(function(
|
|
28602
|
-
return
|
|
28611
|
+
var It = bt[Math.floor(bt.length / 2)], Tt = bt.filter(function(pe) {
|
|
28612
|
+
return pe.distanceTo(It) <= We;
|
|
28603
28613
|
})[0];
|
|
28604
28614
|
if (Tt) {
|
|
28605
28615
|
var yt = new THREE.Vector4(He.x, He.y, He.z, Tt.y - He.y), Rt = this.adjustPanoCircleMeshPositionFix.get(Ne);
|
|
@@ -28622,8 +28632,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28622
28632
|
}
|
|
28623
28633
|
}
|
|
28624
28634
|
if (ze)
|
|
28625
|
-
for (var Xe = 0,
|
|
28626
|
-
var tt =
|
|
28635
|
+
for (var Xe = 0, ce = ze.accessibleNodes; Xe < ce.length; Xe++) {
|
|
28636
|
+
var tt = ce[Xe], q = ze.work.observers[tt];
|
|
28627
28637
|
if (q) {
|
|
28628
28638
|
var Ne = panoStringify({
|
|
28629
28639
|
panoIndex: q.panoIndex,
|
|
@@ -28632,50 +28642,50 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28632
28642
|
rt.set(Ne, q);
|
|
28633
28643
|
}
|
|
28634
28644
|
}
|
|
28635
|
-
if (this.panoMeshes.forEach(function(
|
|
28645
|
+
if (this.panoMeshes.forEach(function(pe, Pe) {
|
|
28636
28646
|
var we = rt.get(Pe);
|
|
28637
|
-
we ? rt.delete(Pe) : (o.helper.remove(
|
|
28638
|
-
}), rt.forEach(function(
|
|
28639
|
-
var we = o.panoCircleMeshCreator(
|
|
28647
|
+
we ? rt.delete(Pe) : (o.helper.remove(pe), pe.dispose(), o.panoMeshes.delete(Pe));
|
|
28648
|
+
}), rt.forEach(function(pe, Pe) {
|
|
28649
|
+
var we = o.panoCircleMeshCreator(pe, {
|
|
28640
28650
|
aerialObserverMinHeight: o.aerialObserverMinHeight
|
|
28641
28651
|
});
|
|
28642
28652
|
o.panoMeshes.set(Pe, we), o.helper.add(we), rt.delete(Pe);
|
|
28643
|
-
}), this.panoMeshes.forEach(function(
|
|
28653
|
+
}), this.panoMeshes.forEach(function(pe, Pe) {
|
|
28644
28654
|
var we = o.works.getObserver(Pe);
|
|
28645
28655
|
if (we) {
|
|
28646
28656
|
var qe = we.position.distanceTo(we.standingPosition) > o.aerialObserverMinHeight;
|
|
28647
28657
|
if (qe)
|
|
28648
|
-
|
|
28658
|
+
pe.position.copy(we.position).applyMatrix4(we.work.transform), pe.scale.setScalar(18);
|
|
28649
28659
|
else {
|
|
28650
|
-
|
|
28660
|
+
pe.position.copy(we.standingPosition).applyMatrix4(we.work.transform);
|
|
28651
28661
|
var Ye = o.adjustPanoCircleMeshPositionFix.get(we.panoId);
|
|
28652
|
-
Ye && (scratchVector3.set(Ye.x, Ye.y, Ye.z), scratchVector3.equals(
|
|
28662
|
+
Ye && (scratchVector3.set(Ye.x, Ye.y, Ye.z), scratchVector3.equals(pe.position) && (pe.position.y += Ye.w)), pe.scale.setScalar(1.2);
|
|
28653
28663
|
}
|
|
28654
|
-
var ut = o.camera.position.clone().setY(
|
|
28664
|
+
var ut = o.camera.position.clone().setY(pe.position.y), Ke = new THREE.Vector3().copy(pe.position).sub(ut).normalize();
|
|
28655
28665
|
if (Pe === panoStringify(o.currentPano)) {
|
|
28656
|
-
var ht = clamp$1((0.5 - ut.distanceTo(
|
|
28666
|
+
var ht = clamp$1((0.5 - ut.distanceTo(pe.position)) / 0.5, 0, 1);
|
|
28657
28667
|
Ke.multiplyScalar(1 - ht).add(A.clone().multiplyScalar(ht));
|
|
28658
28668
|
}
|
|
28659
28669
|
if (Ke.length() > 0) {
|
|
28660
28670
|
var Bt = qe ? -Math.PI / 2 : 0, B = Math.atan2(Ke.x, Ke.z);
|
|
28661
|
-
|
|
28671
|
+
pe.quaternion.setFromEuler(new THREE.Euler(Bt, B, 0, "YXZ"));
|
|
28662
28672
|
}
|
|
28663
28673
|
} else
|
|
28664
|
-
|
|
28674
|
+
pe.visible = !1;
|
|
28665
28675
|
}), this.camera.pose.distance > 0.1 || C)
|
|
28666
|
-
this.panoMeshes.forEach(function(
|
|
28667
|
-
|
|
28676
|
+
this.panoMeshes.forEach(function(pe) {
|
|
28677
|
+
pe.setOpacity(0), pe.setCurrent(!1), pe.updateTime && pe.updateTime(e, r), pe.visible = !1;
|
|
28668
28678
|
});
|
|
28669
28679
|
else if (Ie) {
|
|
28670
|
-
var Me = Ie.work.observers, Ce = arrayMin(Ie.accessibleNodes, function(
|
|
28671
|
-
var Pe = Me[
|
|
28680
|
+
var Me = Ie.work.observers, Ce = arrayMin(Ie.accessibleNodes, function(pe) {
|
|
28681
|
+
var Pe = Me[pe];
|
|
28672
28682
|
return Pe ? Ie.standingPosition.distanceTo(Pe.standingPosition) : 1 / 0;
|
|
28673
28683
|
}, !0), ke = Ce[1];
|
|
28674
28684
|
ke = clamp$1(ke, 2.5, 1 / 0);
|
|
28675
|
-
var je = Ie.accessibleNodes.concat(Ie.panoIndex).map(function(
|
|
28676
|
-
return panoStringify({ panoIndex:
|
|
28685
|
+
var je = Ie.accessibleNodes.concat(Ie.panoIndex).map(function(pe) {
|
|
28686
|
+
return panoStringify({ panoIndex: pe, workCode: Ie.work.workCode });
|
|
28677
28687
|
});
|
|
28678
|
-
this.panoMeshes.forEach(function(
|
|
28688
|
+
this.panoMeshes.forEach(function(pe, Pe) {
|
|
28679
28689
|
var we = o.works.getObserver(Pe), qe = !1, Ye = 1;
|
|
28680
28690
|
if (je.indexOf(Pe) === -1)
|
|
28681
28691
|
qe = !1, Ye = 0;
|
|
@@ -28684,19 +28694,19 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28684
28694
|
else if (!we.loadable && !we.active)
|
|
28685
28695
|
qe = !1, Ye = 0;
|
|
28686
28696
|
else {
|
|
28687
|
-
var ut =
|
|
28688
|
-
qe = Ke && !
|
|
28689
|
-
var ht =
|
|
28697
|
+
var ut = pe.position.clone().project(o.camera), Ke = Math.abs(ut.x) < 1 && Math.abs(ut.y) < 1 && Math.abs(ut.z) < 1;
|
|
28698
|
+
qe = Ke && !pe.loading && pe.progress === 0 && $e !== null && panoStringify({ panoIndex: $e.panoIndex, workCode: $e.work.workCode }) === Pe;
|
|
28699
|
+
var ht = pe.position.clone().setY(o.camera.position.y).distanceTo(o.camera.position);
|
|
28690
28700
|
Ye = ht < 0.01 ? 0 : clamp$1(ke / ht, 0.1, 0.85);
|
|
28691
28701
|
}
|
|
28692
28702
|
if (we && we === ze) {
|
|
28693
28703
|
var Bt = we.position.distanceTo(we.standingPosition) > o.aerialObserverMinHeight;
|
|
28694
28704
|
if (Bt) {
|
|
28695
|
-
var ht =
|
|
28705
|
+
var ht = pe.position.distanceTo(o.camera.position);
|
|
28696
28706
|
ht < 35 && (Ye = 0);
|
|
28697
28707
|
}
|
|
28698
28708
|
}
|
|
28699
|
-
o.modelScene.parameter.resolveValue().modelAlpha > 0 && (Ye = 0),
|
|
28709
|
+
o.modelScene.parameter.resolveValue().modelAlpha > 0 && (Ye = 0), pe.setCurrent(qe), pe.setOpacity(Ye), pe.updateTime && pe.updateTime(e, r);
|
|
28700
28710
|
});
|
|
28701
28711
|
}
|
|
28702
28712
|
{
|
|
@@ -28705,7 +28715,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28705
28715
|
this.tiling.setObserver(null);
|
|
28706
28716
|
var Ht = {
|
|
28707
28717
|
renderer: this.renderer,
|
|
28708
|
-
resolution:
|
|
28718
|
+
resolution: te,
|
|
28709
28719
|
pixelRatio: 1,
|
|
28710
28720
|
time: this.camera.time,
|
|
28711
28721
|
cameraMatrix: this.xrManager.cameraVR.matrixWorld,
|
|
@@ -28722,7 +28732,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
|
|
|
28722
28732
|
this.tiling.setObserver(q);
|
|
28723
28733
|
var Ht = {
|
|
28724
28734
|
renderer: this.renderer,
|
|
28725
|
-
resolution:
|
|
28735
|
+
resolution: te,
|
|
28726
28736
|
pixelRatio: 1,
|
|
28727
28737
|
time: this.camera.time,
|
|
28728
28738
|
cameraMatrix: this.xrManager.cameraVR.matrixWorld,
|
|
@@ -29335,7 +29345,7 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
|
|
|
29335
29345
|
}
|
|
29336
29346
|
return Object.defineProperty(t, "version", {
|
|
29337
29347
|
get: function() {
|
|
29338
|
-
return "6.7.0-alpha.
|
|
29348
|
+
return "6.7.0-alpha.32";
|
|
29339
29349
|
},
|
|
29340
29350
|
enumerable: !1,
|
|
29341
29351
|
configurable: !0
|
|
@@ -29516,175 +29526,175 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
|
|
|
29516
29526
|
u.throwError(c);
|
|
29517
29527
|
}), l;
|
|
29518
29528
|
}, t.prototype.load_ = function(e, r, o, s) {
|
|
29519
|
-
var u = this, l, c, f, d, h, p, g, m, E, y
|
|
29529
|
+
var u = this, l, c, f, d, h, p, g, m, E, y;
|
|
29520
29530
|
s === void 0 && (s = !0);
|
|
29531
|
+
var v = {};
|
|
29532
|
+
typeof o == "number" ? v.duration = o : typeof o == "object" && Object.assign(v, o), this.works === emptyWorks && (v.duration === void 0 && (v.duration = 0), v.effect === void 0 && (v.effect = "instant"));
|
|
29521
29533
|
var A = {};
|
|
29522
|
-
|
|
29523
|
-
var b =
|
|
29524
|
-
Object.assign(b, A.model), !b["3d-tiles"] && A["3d-tiles"] && (b["3d-tiles"] = A["3d-tiles"]), !b.textureOptions && A.textureOptions && (b.textureOptions = A.textureOptions), !b.textureOptions && this.textureOptions && (b.textureOptions = this.textureOptions);
|
|
29525
|
-
var T = [];
|
|
29534
|
+
Object.assign(A, v.model), !A["3d-tiles"] && v["3d-tiles"] && (A["3d-tiles"] = v["3d-tiles"]), !A.textureOptions && v.textureOptions && (A.textureOptions = v.textureOptions), !A.textureOptions && this.textureOptions && (A.textureOptions = this.textureOptions);
|
|
29535
|
+
var b = [];
|
|
29526
29536
|
if (Array.isArray(e))
|
|
29527
|
-
for (var
|
|
29528
|
-
var
|
|
29529
|
-
|
|
29537
|
+
for (var T = 0, S = e; T < S.length; T++) {
|
|
29538
|
+
var R = S[T];
|
|
29539
|
+
R instanceof Work ? b.push(R) : typeof R != "string" && "work" in R ? b.push(parseWork(R.work, R)) : b.push(parseWork(R));
|
|
29530
29540
|
}
|
|
29531
29541
|
else
|
|
29532
|
-
e instanceof Work ?
|
|
29533
|
-
|
|
29534
|
-
var
|
|
29542
|
+
e instanceof Work ? b.push(e) : b.push(parseWork(e));
|
|
29543
|
+
v.mode === "add" && (b = [].concat(this.works, b));
|
|
29544
|
+
var M;
|
|
29535
29545
|
try {
|
|
29536
|
-
|
|
29537
|
-
} catch (
|
|
29538
|
-
return this.throwError(
|
|
29546
|
+
M = createWorks(b);
|
|
29547
|
+
} catch (Z) {
|
|
29548
|
+
return this.throwError(Z), Promise.reject(Z);
|
|
29539
29549
|
}
|
|
29540
|
-
for (var
|
|
29541
|
-
var
|
|
29542
|
-
this.bindWorkFetcher(
|
|
29550
|
+
for (var w = 0, P = M; w < P.length; w++) {
|
|
29551
|
+
var _ = P[w];
|
|
29552
|
+
this.bindWorkFetcher(_);
|
|
29543
29553
|
}
|
|
29544
29554
|
r === void 0 && (r = "inherit"), r === "inherit" && this.works === emptyWorks && (r = "initial");
|
|
29545
|
-
var
|
|
29546
|
-
workCode: L.work.workCode,
|
|
29547
|
-
panoIndex: L.panoIndex
|
|
29548
|
-
} : {
|
|
29555
|
+
var I = this.currentMode, C = M.initial, H = C.work.observers[0], L = H ? {
|
|
29549
29556
|
workCode: H.work.workCode,
|
|
29557
|
+
panoIndex: H.panoIndex
|
|
29558
|
+
} : {
|
|
29559
|
+
workCode: C.work.workCode,
|
|
29550
29560
|
panoIndex: 0
|
|
29551
|
-
},
|
|
29561
|
+
}, O = (l = C.mode) !== null && l !== void 0 ? l : H ? "Panorama" : "Mapview", k = {};
|
|
29552
29562
|
if (r === "inherit") {
|
|
29553
|
-
var
|
|
29554
|
-
return
|
|
29563
|
+
var D = this.getCurrentState(), q = M.filter(function(Z) {
|
|
29564
|
+
return Z.workCode === D.workCode;
|
|
29555
29565
|
})[0];
|
|
29556
|
-
if (
|
|
29557
|
-
|
|
29558
|
-
workCode:
|
|
29559
|
-
panoIndex:
|
|
29560
|
-
},
|
|
29561
|
-
longitude:
|
|
29562
|
-
latitude:
|
|
29563
|
-
fov:
|
|
29564
|
-
distance:
|
|
29565
|
-
offset:
|
|
29566
|
+
if (q)
|
|
29567
|
+
L = {
|
|
29568
|
+
workCode: D.workCode,
|
|
29569
|
+
panoIndex: D.panoIndex
|
|
29570
|
+
}, O = D.mode, k = {
|
|
29571
|
+
longitude: D.latitude,
|
|
29572
|
+
latitude: D.latitude,
|
|
29573
|
+
fov: D.fov,
|
|
29574
|
+
distance: D.distance,
|
|
29575
|
+
offset: D.offset.clone()
|
|
29566
29576
|
};
|
|
29567
29577
|
else {
|
|
29568
29578
|
r = {
|
|
29569
|
-
mode:
|
|
29579
|
+
mode: I
|
|
29570
29580
|
};
|
|
29571
|
-
var
|
|
29572
|
-
|
|
29573
|
-
}
|
|
29574
|
-
}
|
|
29575
|
-
if (r === "initial" && (typeof
|
|
29576
|
-
workCode:
|
|
29577
|
-
panoIndex:
|
|
29578
|
-
}),
|
|
29579
|
-
longitude:
|
|
29580
|
-
latitude:
|
|
29581
|
-
fov:
|
|
29582
|
-
distance:
|
|
29583
|
-
offset: (d =
|
|
29581
|
+
var z = (f = (c = M[0]) === null || c === void 0 ? void 0 : c.observers) === null || f === void 0 ? void 0 : f[this.panoIndex];
|
|
29582
|
+
z ? (r.workCode = z.work.workCode, r.panoIndex = z.panoIndex) : typeof M.initial.panoIndex == "number" ? (r.workCode = M.initial.work.workCode, r.panoIndex = M.initial.panoIndex) : (r.mode === "Panorama" || r.mode === "VRPanorama" || r.mode === "XRPanorama") && (r.mode = "Mapview"), r.mode === I && (r.longitude = this.camera.pose.longitude, r.latitude = this.camera.pose.latitude, r.fov = this.camera.pose.fov);
|
|
29583
|
+
}
|
|
29584
|
+
}
|
|
29585
|
+
if (r === "initial" && (typeof C.panoIndex == "number" && (L = {
|
|
29586
|
+
workCode: C.work.workCode,
|
|
29587
|
+
panoIndex: C.panoIndex
|
|
29588
|
+
}), C.mode && (O = C.mode), k = {
|
|
29589
|
+
longitude: C.longitude,
|
|
29590
|
+
latitude: C.latitude,
|
|
29591
|
+
fov: C.fov,
|
|
29592
|
+
distance: C.distance,
|
|
29593
|
+
offset: (d = C.offset) === null || d === void 0 ? void 0 : d.clone()
|
|
29584
29594
|
}), typeof r == "object") {
|
|
29585
|
-
if (
|
|
29586
|
-
var
|
|
29587
|
-
workCode: (g = (p = r.workCode) !== null && p !== void 0 ? p :
|
|
29595
|
+
if (O = (h = r.mode) !== null && h !== void 0 ? h : I, typeof r.panoIndex == "number") {
|
|
29596
|
+
var z = M.getObserver({
|
|
29597
|
+
workCode: (g = (p = r.workCode) !== null && p !== void 0 ? p : C.work.workCode) !== null && g !== void 0 ? g : "",
|
|
29588
29598
|
panoIndex: r.panoIndex
|
|
29589
29599
|
});
|
|
29590
|
-
|
|
29591
|
-
workCode:
|
|
29592
|
-
panoIndex:
|
|
29600
|
+
z && (L = {
|
|
29601
|
+
workCode: z.work.workCode,
|
|
29602
|
+
panoIndex: z.panoIndex
|
|
29593
29603
|
});
|
|
29594
29604
|
}
|
|
29595
|
-
|
|
29605
|
+
k = {
|
|
29596
29606
|
longitude: r.longitude,
|
|
29597
29607
|
latitude: r.latitude,
|
|
29598
29608
|
fov: r.fov,
|
|
29599
29609
|
distance: r.distance,
|
|
29600
|
-
offset:
|
|
29610
|
+
offset: r.offset ? new THREE.Vector3().copy(r.offset) : void 0
|
|
29601
29611
|
};
|
|
29602
29612
|
}
|
|
29603
|
-
var
|
|
29604
|
-
(
|
|
29605
|
-
var
|
|
29606
|
-
(
|
|
29613
|
+
var J = (m = v.duration) !== null && m !== void 0 ? m : this.modeChangeDuration;
|
|
29614
|
+
(O === "Floorplan" || O === "Topview" || O === "Mapview") && I === O && (J = 0);
|
|
29615
|
+
var V = "fly";
|
|
29616
|
+
(O === "Panorama" || O === "VRPanorama" || O === "XRPanorama") && I === O && (V = (E = v.effect) !== null && E !== void 0 ? E : "fade"), this.emit("works.request", createEvent("works.request", {
|
|
29607
29617
|
input: e,
|
|
29608
|
-
works:
|
|
29618
|
+
works: M,
|
|
29609
29619
|
userAction: s
|
|
29610
29620
|
}));
|
|
29611
|
-
var
|
|
29612
|
-
var
|
|
29613
|
-
r === "inherit" && (
|
|
29614
|
-
var
|
|
29615
|
-
state:
|
|
29616
|
-
currentState:
|
|
29617
|
-
duration:
|
|
29618
|
-
effect:
|
|
29621
|
+
var U = function(Z, X, se) {
|
|
29622
|
+
var G = u.getCurrentState(), W = __assign(__assign({ mode: Z }, X), se);
|
|
29623
|
+
r === "inherit" && (W = u.getCurrentState()), u.pano = X;
|
|
29624
|
+
var $ = __assign(__assign({ initial: {
|
|
29625
|
+
state: W,
|
|
29626
|
+
currentState: G,
|
|
29627
|
+
duration: J,
|
|
29628
|
+
effect: V,
|
|
29619
29629
|
userAction: s
|
|
29620
|
-
} }, u.commonParams()), u.controllerInits[
|
|
29621
|
-
if (u.controller &&
|
|
29622
|
-
u.controller.updateWork(
|
|
29630
|
+
} }, u.commonParams()), u.controllerInits[Z]), ne = Controllers[W.mode].initAnimationEndState($);
|
|
29631
|
+
if (u.controller && I === Z)
|
|
29632
|
+
u.controller.updateWork(M, ne, { effect: V, duration: J }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(Z, $));
|
|
29623
29633
|
else {
|
|
29624
29634
|
if (u.controller)
|
|
29625
29635
|
u.controller.destroy();
|
|
29626
29636
|
else {
|
|
29627
|
-
var
|
|
29628
|
-
u.camera.setFromPose(
|
|
29637
|
+
var te = Controllers[Z].initAnimationEndState($);
|
|
29638
|
+
u.camera.setFromPose(te), u.emit("camera.update", createEvent("camera.update", {
|
|
29629
29639
|
state: u.getCurrentState(),
|
|
29630
29640
|
userAction: s
|
|
29631
29641
|
}));
|
|
29632
29642
|
}
|
|
29633
|
-
u.controller = u.applyController(
|
|
29634
|
-
var
|
|
29635
|
-
prevMode:
|
|
29636
|
-
mode:
|
|
29643
|
+
u.controller = u.applyController(Z, $);
|
|
29644
|
+
var ve = createEvent("mode.change", {
|
|
29645
|
+
prevMode: I,
|
|
29646
|
+
mode: Z,
|
|
29637
29647
|
state: ne,
|
|
29638
29648
|
userAction: s
|
|
29639
29649
|
});
|
|
29640
29650
|
try {
|
|
29641
|
-
u.emit("mode.change",
|
|
29642
|
-
} catch (
|
|
29643
|
-
console.error(
|
|
29651
|
+
u.emit("mode.change", ve);
|
|
29652
|
+
} catch (oe) {
|
|
29653
|
+
console.error(oe);
|
|
29644
29654
|
}
|
|
29645
29655
|
}
|
|
29646
29656
|
u.updateTime.apply(u, __spreadArray([u.currentUpdateArgs.time, 0], u.currentUpdateArgs.args, !1));
|
|
29647
29657
|
};
|
|
29648
|
-
worksMap.set(this,
|
|
29649
|
-
var
|
|
29650
|
-
if (
|
|
29651
|
-
this.modelScene.loaded === !1 && (this.camera.setFromPose(
|
|
29652
|
-
var
|
|
29653
|
-
|
|
29654
|
-
return
|
|
29658
|
+
worksMap.set(this, M);
|
|
29659
|
+
var j = Promise.resolve();
|
|
29660
|
+
if (O === t.Mode.Floorplan || O === t.Mode.Topview || O === t.Mode.Mapview || O === t.Mode.Model) {
|
|
29661
|
+
this.modelScene.loaded === !1 && (this.camera.setFromPose(k), assignPose(this.state, this.camera.pose));
|
|
29662
|
+
var K = this.modelScene.setModels(M, A);
|
|
29663
|
+
j = Promise.all(K.map(function(Z) {
|
|
29664
|
+
return Z.loadedReady;
|
|
29655
29665
|
})).then(function() {
|
|
29656
|
-
u.needsRender = !0,
|
|
29666
|
+
u.needsRender = !0, U(O, L, k), u.emit("camera.update", createEvent("camera.update", {
|
|
29657
29667
|
state: u.getCurrentState(),
|
|
29658
29668
|
userAction: s
|
|
29659
29669
|
}));
|
|
29660
29670
|
});
|
|
29661
29671
|
} else {
|
|
29662
|
-
|
|
29663
|
-
var
|
|
29672
|
+
U(O, L, k);
|
|
29673
|
+
var ie = this.controller, re = !1;
|
|
29664
29674
|
this.modelScene.autoRefine = !1;
|
|
29665
29675
|
var ee = function() {
|
|
29666
|
-
u.works ===
|
|
29676
|
+
u.works === M && re === !1 && (u.needsRender = !0, u.emit("camera.update", createEvent("camera.update", {
|
|
29667
29677
|
state: u.getCurrentState(),
|
|
29668
29678
|
userAction: s
|
|
29669
|
-
})),
|
|
29670
|
-
},
|
|
29671
|
-
|
|
29672
|
-
return
|
|
29673
|
-
})).then(noop),
|
|
29679
|
+
})), re = !0, u.modelScene.autoRefine = !0), ie.off("pano.arrived", ee), ie.off("pano.cancel", ee);
|
|
29680
|
+
}, K = this.modelScene.setModels(M, A);
|
|
29681
|
+
j = Promise.all(K.map(function(X) {
|
|
29682
|
+
return X.initReady;
|
|
29683
|
+
})).then(noop), ie.once("pano.arrived", ee), ie.once("pano.cancel", ee), setTimeout(ee, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
|
|
29674
29684
|
}
|
|
29675
29685
|
return this.emit("works.load", createEvent("works.load", {
|
|
29676
29686
|
input: e,
|
|
29677
29687
|
userAction: s,
|
|
29678
|
-
works:
|
|
29679
|
-
})),
|
|
29688
|
+
works: M
|
|
29689
|
+
})), j.then(function() {
|
|
29680
29690
|
return u.ready();
|
|
29681
29691
|
}).then(function() {
|
|
29682
|
-
var
|
|
29692
|
+
var Z;
|
|
29683
29693
|
u.emit("works.ready", createEvent("works.ready", {
|
|
29684
29694
|
input: e,
|
|
29685
29695
|
userAction: s,
|
|
29686
|
-
works:
|
|
29687
|
-
})), (
|
|
29696
|
+
works: M
|
|
29697
|
+
})), (Z = u.analysis) === null || Z === void 0 || Z.work(M);
|
|
29688
29698
|
});
|
|
29689
29699
|
}, t.prototype.reset = function() {
|
|
29690
29700
|
var e = this, r = this.loadWorkTask.then(function() {
|
|
@@ -29790,7 +29800,7 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
|
|
|
29790
29800
|
if (!this.renderer)
|
|
29791
29801
|
throw new Error("renderer is not initialized.");
|
|
29792
29802
|
var f = now(), d = this.renderer.getPixelRatio(), h = this.renderer.getRenderTarget(), p = this.getSize(new THREE.Vector2()), g = 0, m = 0, E = 1, y = 1, v, A, b, T, S;
|
|
29793
|
-
typeof e == "number" ? (g = e, typeof r == "number" && (m = r), typeof o == "number" && (E = o), typeof s == "number" && (y = s), v = u, A = l, S = c) : (g = e.x, m = e.y, E = e.width, y = e.height, v = e.pixelRatio, A = e.flipY, b = e.helperVisible, T = e.skipPanorama, S = e.buffer), g = Math.
|
|
29803
|
+
typeof e == "number" ? (g = e, typeof r == "number" && (m = r), typeof o == "number" && (E = o), typeof s == "number" && (y = s), v = u, A = l, S = c) : (g = e.x, m = e.y, E = e.width, y = e.height, v = e.pixelRatio, A = e.flipY, b = e.helperVisible, T = e.skipPanorama, S = e.buffer), g = Math.floor(g), m = Math.floor(m), E = Math.floor(E), y = Math.floor(y), v = Math.floor(v != null ? v : d), A = A != null ? A : !1;
|
|
29794
29804
|
var R = this.helperVisible, M = this.modelScene.parameter.modelAlpha;
|
|
29795
29805
|
this.helperVisible = b != null ? b : this.helperVisible, T && (this.controller instanceof Controllers.Panorama || this.controller instanceof Controllers.VRPanorama || this.controller instanceof Controllers.XRPanorama) && T === !0 && this.modelScene.parameter.set("modelAlpha", 1), this.modelScene.update(this.renderer, this.camera);
|
|
29796
29806
|
var w = this.getPixelsRenderTarget;
|
|
@@ -29799,16 +29809,16 @@ var DEFAULT_MODE_CHANGE_DURATION = 1e3, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST
|
|
|
29799
29809
|
this.renderer.autoClear = !0, this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0, this.renderer.autoClearStencil = !0, this.renderer.setScissorTest(!1);
|
|
29800
29810
|
var k = this.scene.background;
|
|
29801
29811
|
this.scene.background = this.camera.isOrthographicCamera ? null : k, this.renderer.render(this.scene, this.camera), this.scene.background = k, this.renderer.autoClear = P, this.renderer.autoClearColor = _, this.renderer.autoClearDepth = I, this.renderer.autoClearStencil = C, this.renderer.setClearColor(H, L), this.renderer.setScissorTest(O), this.helperVisible = R, M === void 0 ? this.modelScene.parameter.reset("modelAlpha") : this.modelScene.parameter.set("modelAlpha", M), this.renderer.setRenderTarget(h), this.camera.clearViewOffset(), this.camera.pixelRatio = d, this.camera.resolution.copy(p), this.camera.aspect = this.camera.resolution.width / this.camera.resolution.height, this.camera.updateTime(f), this.modelScene.update(this.renderer, this.camera), this.scene.update(this.renderer, this.camera);
|
|
29802
|
-
var D = E * v, q = y * v, z = D * q,
|
|
29812
|
+
var D = E * v, q = y * v, z = D * q, J = z * 4;
|
|
29803
29813
|
if (S) {
|
|
29804
|
-
if (S.length !==
|
|
29805
|
-
throw new Error("buffer length is not equals pixels ".concat(
|
|
29814
|
+
if (S.length !== J)
|
|
29815
|
+
throw new Error("buffer length is not equals pixels ".concat(J));
|
|
29806
29816
|
} else
|
|
29807
|
-
S = new Uint8Array(
|
|
29817
|
+
S = new Uint8Array(J);
|
|
29808
29818
|
if (this.renderer.readRenderTargetPixels(w, 0, 0, E * v, y * v, S), A)
|
|
29809
|
-
for (var
|
|
29810
|
-
for (ie = (q - Math.floor(j / D) - 1) * D + j % D,
|
|
29811
|
-
U = S[j * 4 +
|
|
29819
|
+
for (var V = z / 2, U = 0, j = 0, K = 0, ie = 0; j < V; j++)
|
|
29820
|
+
for (ie = (q - Math.floor(j / D) - 1) * D + j % D, K = 0; K < 4; K++)
|
|
29821
|
+
U = S[j * 4 + K], S[j * 4 + K] = S[ie * 4 + K], S[ie * 4 + K] = U;
|
|
29812
29822
|
return S;
|
|
29813
29823
|
}, t.prototype.getElement = function() {
|
|
29814
29824
|
var e;
|