@realsee/five 6.5.0-alpha.13 → 6.5.0-alpha.14

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.
Files changed (42) hide show
  1. package/docs/assets/search.js +1 -1
  2. package/docs/classes/five.Five.html +20 -20
  3. package/docs/classes/five.Model.html +12 -12
  4. package/docs/classes/five.Parameter.html +5 -5
  5. package/docs/classes/five.Tile.html +1 -1
  6. package/docs/classes/five.Tile3DModel.html +21 -23
  7. package/docs/interfaces/five.ParameterTilesetValue.html +4 -4
  8. package/docs/interfaces/five.ParameterValue.html +6 -6
  9. package/docs/interfaces/five.ResolvedParameterValue.html +6 -6
  10. package/docs/interfaces/five.ViewLayer.html +22 -24
  11. package/docs/types/five.TilesetFrameState.html +1 -1
  12. package/five/index.d.ts +3 -9
  13. package/five/index.js +35 -35
  14. package/five/index.mjs +1099 -1119
  15. package/gltf-loader/index.js +3 -3
  16. package/gltf-loader/index.mjs +3 -3
  17. package/line/index.js +3 -3
  18. package/line/index.mjs +3 -3
  19. package/package.json +1 -1
  20. package/plugins/index.js +2 -2
  21. package/plugins/index.mjs +2 -2
  22. package/react/index.js +2 -2
  23. package/react/index.mjs +2 -2
  24. package/shader-lib/index.js +2 -2
  25. package/shader-lib/index.mjs +2 -2
  26. package/sticker/index.js +3 -3
  27. package/sticker/index.mjs +3 -3
  28. package/umd/five-gltf-loader.js +3 -3
  29. package/umd/five-line.js +3 -3
  30. package/umd/five-plugins.js +2 -2
  31. package/umd/five-react.js +2 -2
  32. package/umd/five-shader-lib.js +2 -2
  33. package/umd/five-sticker.js +3 -3
  34. package/umd/five-vfx.js +2 -2
  35. package/umd/five-vue.js +2 -2
  36. package/umd/five.js +35 -35
  37. package/vfx/index.js +2 -2
  38. package/vfx/index.mjs +2 -2
  39. package/vue/index.js +2 -2
  40. package/vue/index.mjs +2 -2
  41. package/work-downloader/index.js +2 -2
  42. 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: 7/29/2025
5
- * Version: 6.5.0-alpha.13
4
+ * Generated: 7/30/2025
5
+ * Version: 6.5.0-alpha.14
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
  C[w + 1] = C[w + 3], C[w + 3] = L, this._doCryptBlock(C, w, this._invKeySchedule, c, d, f, h, r), L = C[w + 1], C[w + 1] = C[w + 3], C[w + 3] = L;
759
759
  },
760
760
  _doCryptBlock: function(C, w, L, H, M, P, B, O) {
761
- for (var _ = this._nRounds, q = C[w] ^ L[0], X = C[w + 1] ^ L[1], Z = C[w + 2] ^ L[2], U = C[w + 3] ^ L[3], N = 4, D = 1; D < _; D++)
762
- var J = H[q >>> 24] ^ M[X >>> 16 & 255] ^ P[Z >>> 8 & 255] ^ B[U & 255] ^ L[N++], K = H[X >>> 24] ^ M[Z >>> 16 & 255] ^ P[U >>> 8 & 255] ^ B[q & 255] ^ L[N++], Q = H[Z >>> 24] ^ M[U >>> 16 & 255] ^ P[q >>> 8 & 255] ^ B[X & 255] ^ L[N++], U = H[U >>> 24] ^ M[q >>> 16 & 255] ^ P[X >>> 8 & 255] ^ B[Z & 255] ^ L[N++], q = J, X = K, Z = Q;
763
- J = (O[q >>> 24] << 24 | O[X >>> 16 & 255] << 16 | O[Z >>> 8 & 255] << 8 | O[U & 255]) ^ L[N++], K = (O[X >>> 24] << 24 | O[Z >>> 16 & 255] << 16 | O[U >>> 8 & 255] << 8 | O[q & 255]) ^ L[N++], Q = (O[Z >>> 24] << 24 | O[U >>> 16 & 255] << 16 | O[q >>> 8 & 255] << 8 | O[X & 255]) ^ L[N++], U = (O[U >>> 24] << 24 | O[q >>> 16 & 255] << 16 | O[X >>> 8 & 255] << 8 | O[Z & 255]) ^ L[N++], C[w] = J, C[w + 1] = K, C[w + 2] = Q, C[w + 3] = U;
761
+ for (var _ = this._nRounds, U = C[w] ^ L[0], X = C[w + 1] ^ L[1], j = C[w + 2] ^ L[2], Q = C[w + 3] ^ L[3], N = 4, D = 1; D < _; D++)
762
+ var G = H[U >>> 24] ^ M[X >>> 16 & 255] ^ P[j >>> 8 & 255] ^ B[Q & 255] ^ L[N++], K = H[X >>> 24] ^ M[j >>> 16 & 255] ^ P[Q >>> 8 & 255] ^ B[U & 255] ^ L[N++], J = H[j >>> 24] ^ M[Q >>> 16 & 255] ^ P[U >>> 8 & 255] ^ B[X & 255] ^ L[N++], Q = H[Q >>> 24] ^ M[U >>> 16 & 255] ^ P[X >>> 8 & 255] ^ B[j & 255] ^ L[N++], U = G, X = K, j = J;
763
+ G = (O[U >>> 24] << 24 | O[X >>> 16 & 255] << 16 | O[j >>> 8 & 255] << 8 | O[Q & 255]) ^ L[N++], K = (O[X >>> 24] << 24 | O[j >>> 16 & 255] << 16 | O[Q >>> 8 & 255] << 8 | O[U & 255]) ^ L[N++], J = (O[j >>> 24] << 24 | O[Q >>> 16 & 255] << 16 | O[U >>> 8 & 255] << 8 | O[X & 255]) ^ L[N++], Q = (O[Q >>> 24] << 24 | O[U >>> 16 & 255] << 16 | O[X >>> 8 & 255] << 8 | O[j & 255]) ^ L[N++], C[w] = G, C[w + 1] = K, C[w + 2] = J, C[w + 3] = Q;
764
764
  },
765
765
  keySize: 8
766
766
  });
@@ -3187,41 +3187,41 @@ function X509(n) {
3187
3187
  return y(T).replace(/\//, "\\/");
3188
3188
  }).join("/");
3189
3189
  }, this.getInfo = function() {
3190
- var v = function(J) {
3191
- var K = JSON.stringify(J.array).replace(/[\[\]\{\}\"]/g, "");
3190
+ var v = function(G) {
3191
+ var K = JSON.stringify(G.array).replace(/[\[\]\{\}\"]/g, "");
3192
3192
  return K;
3193
- }, y = function(J) {
3194
- for (var K = "", Q = J.array, U = 0; U < Q.length; U++) {
3195
- var q = Q[U];
3196
- if (K += " policy oid: " + q.policyoid + `
3197
- `, q.array !== void 0)
3198
- for (var X = 0; X < q.array.length; X++) {
3199
- var Z = q.array[X];
3200
- Z.cps !== void 0 && (K += " cps: " + Z.cps + `
3193
+ }, y = function(G) {
3194
+ for (var K = "", J = G.array, Q = 0; Q < J.length; Q++) {
3195
+ var U = J[Q];
3196
+ if (K += " policy oid: " + U.policyoid + `
3197
+ `, U.array !== void 0)
3198
+ for (var X = 0; X < U.array.length; X++) {
3199
+ var j = U.array[X];
3200
+ j.cps !== void 0 && (K += " cps: " + j.cps + `
3201
3201
  `);
3202
3202
  }
3203
3203
  }
3204
3204
  return K;
3205
- }, b = function(J) {
3206
- for (var K = "", Q = J.array, U = 0; U < Q.length; U++) {
3207
- var q = Q[U];
3205
+ }, b = function(G) {
3206
+ for (var K = "", J = G.array, Q = 0; Q < J.length; Q++) {
3207
+ var U = J[Q];
3208
3208
  try {
3209
- q.dpname.full[0].uri !== void 0 && (K += " " + q.dpname.full[0].uri + `
3209
+ U.dpname.full[0].uri !== void 0 && (K += " " + U.dpname.full[0].uri + `
3210
3210
  `);
3211
3211
  } catch (X) {
3212
3212
  }
3213
3213
  try {
3214
- q.dname.full[0].dn.hex !== void 0 && (K += " " + X509.hex2dn(q.dpname.full[0].dn.hex) + `
3214
+ U.dname.full[0].dn.hex !== void 0 && (K += " " + X509.hex2dn(U.dpname.full[0].dn.hex) + `
3215
3215
  `);
3216
3216
  } catch (X) {
3217
3217
  }
3218
3218
  }
3219
3219
  return K;
3220
- }, T = function(J) {
3221
- for (var K = "", Q = J.array, U = 0; U < Q.length; U++) {
3222
- var q = Q[U];
3223
- q.caissuer !== void 0 && (K += " caissuer: " + q.caissuer + `
3224
- `), q.ocsp !== void 0 && (K += " ocsp: " + q.ocsp + `
3220
+ }, T = function(G) {
3221
+ for (var K = "", J = G.array, Q = 0; Q < J.length; Q++) {
3222
+ var U = J[Q];
3223
+ U.caissuer !== void 0 && (K += " caissuer: " + U.caissuer + `
3224
+ `), U.ocsp !== void 0 && (K += " ocsp: " + U.ocsp + `
3225
3225
  `);
3226
3226
  }
3227
3227
  return K;
@@ -3876,8 +3876,8 @@ var PBMCustomShader = (
3876
3876
  var M = H[L];
3877
3877
  M in uniformsLib$1 || delete l[M];
3878
3878
  }
3879
- for (var P = r.customShaders.filter(function(q) {
3880
- return q.type.includes(S);
3879
+ for (var P = r.customShaders.filter(function(U) {
3880
+ return U.type.includes(S);
3881
3881
  }), B = 0, O = P; B < O.length; B++) {
3882
3882
  var _ = O[B];
3883
3883
  for (var N in _.defines)
@@ -3885,47 +3885,47 @@ var PBMCustomShader = (
3885
3885
  for (var D in _.uniforms)
3886
3886
  D in l || Object.assign(l, (T = {}, T[D] = _.uniforms[D], T));
3887
3887
  }
3888
- v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, P.map(function(q) {
3889
- return q.vertex.mainBefore;
3890
- }).filter(function(q) {
3891
- return !!q;
3888
+ v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, P.map(function(U) {
3889
+ return U.vertex.mainBefore;
3890
+ }).filter(function(U) {
3891
+ return !!U;
3892
3892
  }).join(`
3893
- `)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, P.map(function(q) {
3894
- return q.vertex.mainStart;
3895
- }).filter(function(q) {
3896
- return !!q;
3893
+ `)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, P.map(function(U) {
3894
+ return U.vertex.mainStart;
3895
+ }).filter(function(U) {
3896
+ return !!U;
3897
3897
  }).join(`
3898
- `)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, P.map(function(q) {
3899
- return q.vertex.mainEnd;
3900
- }).filter(function(q) {
3901
- return !!q;
3898
+ `)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, P.map(function(U) {
3899
+ return U.vertex.mainEnd;
3900
+ }).filter(function(U) {
3901
+ return !!U;
3902
3902
  }).join(`
3903
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, P.map(function(q) {
3904
- return q.fragment.mainBefore;
3905
- }).filter(function(q) {
3906
- return !!q;
3903
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, P.map(function(U) {
3904
+ return U.fragment.mainBefore;
3905
+ }).filter(function(U) {
3906
+ return !!U;
3907
3907
  }).join(`
3908
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, P.map(function(q) {
3909
- return q.fragment.mainStart;
3910
- }).filter(function(q) {
3911
- return !!q;
3908
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, P.map(function(U) {
3909
+ return U.fragment.mainStart;
3910
+ }).filter(function(U) {
3911
+ return !!U;
3912
3912
  }).join(`
3913
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, P.map(function(q) {
3914
- return q.fragment.mainEnd;
3915
- }).filter(function(q) {
3916
- return !!q;
3913
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, P.map(function(U) {
3914
+ return U.fragment.mainEnd;
3915
+ }).filter(function(U) {
3916
+ return !!U;
3917
3917
  }).join(`
3918
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, P.map(function(q) {
3919
- return q.fragment.mainModelColor;
3920
- }).filter(function(q) {
3921
- return !!q;
3918
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, P.map(function(U) {
3919
+ return U.fragment.mainModelColor;
3920
+ }).filter(function(U) {
3921
+ return !!U;
3922
3922
  }).join(`
3923
3923
  `));
3924
- var J = String(r.clippers.length);
3925
- v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, J), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, J);
3926
- for (var K = 0, Q = P; K < Q.length; K++) {
3927
- var U = Q[K];
3928
- U.onBeforeCompile && U.onBeforeCompile(v, y);
3924
+ var G = String(r.clippers.length);
3925
+ v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, G), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, G);
3926
+ for (var K = 0, J = P; K < J.length; K++) {
3927
+ var Q = J[K];
3928
+ Q.onBeforeCompile && Q.onBeforeCompile(v, y);
3929
3929
  }
3930
3930
  };
3931
3931
  var c = "";
@@ -4722,7 +4722,7 @@ var parameterValueEqualFn = {
4722
4722
  skipLevelOfDetail: valueEqual,
4723
4723
  mostDetail: valueEqual,
4724
4724
  loadSiblings: valueEqual,
4725
- loadAll: valueEqual,
4725
+ cameraCulling: valueEqual,
4726
4726
  maxMemoryUsage: valueEqual,
4727
4727
  maxRequests: valueEqual,
4728
4728
  requestOrder: valueEqual,
@@ -4804,7 +4804,7 @@ var defaultGradientTexture = function() {
4804
4804
  skipLevelOfDetail: !1,
4805
4805
  mostDetail: !1,
4806
4806
  loadSiblings: !1,
4807
- loadAll: !1,
4807
+ cameraCulling: !0,
4808
4808
  maxMemoryUsage: 256,
4809
4809
  // MB
4810
4810
  maxRequests: 6,
@@ -5180,21 +5180,21 @@ function ajax(n, t, e, r, o) {
5180
5180
  var O, _, N = now(), D = N - s;
5181
5181
  if (delete E[g], b.parentNode && b.parentNode.removeChild(b), v !== null && (window.clearTimeout(v), v = null), y !== !0) {
5182
5182
  if (B.indexOf("data:") !== 0) {
5183
- var J = new NetworkResponseError(l, "Script", 500);
5184
- r(J), d(J), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "Script", "error", J.message);
5183
+ var G = new NetworkResponseError(l, "Script", 500);
5184
+ r(G), d(G), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "Script", "error", G.message);
5185
5185
  return;
5186
5186
  }
5187
- var K = B.split(","), Q = (K[0].match(/:(.*?);/) || [])[1], U = K[1];
5187
+ var K = B.split(","), J = (K[0].match(/:(.*?);/) || [])[1], Q = K[1];
5188
5188
  if (t.responseType === "arraybuffer" || t.responseType === "blob") {
5189
- for (var q = atob(K[1]), X = q.length, Z = new Uint8Array(X), W = 0; W < X; W++)
5190
- Z[W] = q.charCodeAt(W);
5191
- t.responseType === "arraybuffer" ? U = Z.buffer : U = new Blob([Z], { type: Q });
5189
+ for (var U = atob(K[1]), X = U.length, j = new Uint8Array(X), $ = 0; $ < X; $++)
5190
+ j[$] = U.charCodeAt($);
5191
+ t.responseType === "arraybuffer" ? Q = j.buffer : Q = new Blob([j], { type: J });
5192
5192
  }
5193
- var G = {}, ne = {
5194
- body: U,
5195
- meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: D, headers: G }
5193
+ var q = {}, re = {
5194
+ body: Q,
5195
+ meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: D, headers: q }
5196
5196
  };
5197
- e(ne), c(ne), (_ = t.networkSubscribe) === null || _ === void 0 || _.emit("network", l, "Script", "ok", JSON.stringify(ne.meta)), y = !0;
5197
+ e(re), c(re), (_ = t.networkSubscribe) === null || _ === void 0 || _.emit("network", l, "Script", "ok", JSON.stringify(re.meta)), y = !0;
5198
5198
  }
5199
5199
  };
5200
5200
  E[g] = S, b.src = l, document.body.appendChild(b), typeof t.timeout == "number" && (v = window.setTimeout(T, t.timeout));
@@ -5216,11 +5216,11 @@ function ajax(n, t, e, r, o) {
5216
5216
  var _ = this.status;
5217
5217
  if (_ === 0 || _ >= 200 && _ < 400) {
5218
5218
  R = !0, w();
5219
- var N = now(), D = N - s, J = parseHeaders(this.getAllResponseHeaders()), K = B.total, Q = {
5219
+ var N = now(), D = N - s, G = parseHeaders(this.getAllResponseHeaders()), K = B.total, J = {
5220
5220
  body: this.response,
5221
- meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: D, headers: J, size: K }
5221
+ meta: { origin: u, source: l, requestTime: s, responseTime: N, costs: D, headers: G, size: K }
5222
5222
  };
5223
- e(Q), c(Q), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(Q.meta));
5223
+ e(J), c(J), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(J.meta));
5224
5224
  } else
5225
5225
  P.call(this);
5226
5226
  }
@@ -5901,8 +5901,8 @@ var FACE_ORDER$1 = ["right", "left", "up", "down", "front", "back"], TextureLoad
5901
5901
  t[FACE_ORDER$1[5]]
5902
5902
  ], E = [], v = [0, 0, 0, 0, 0, 0], y = [], b = function(S) {
5903
5903
  var R = (h = (f = e.imageURL) === null || f === void 0 ? void 0 : f.options) !== null && h !== void 0 ? h : { key: "unknown" }, C = applyImageURLOptions(m[S], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, R), { key: R.key + "." + FACE_ORDER$1[S] })), w = getProtocol(C), L = function(N) {
5904
- v[S] = N, s(v.reduce(function(D, J) {
5905
- return D + J;
5904
+ v[S] = N, s(v.reduce(function(D, G) {
5905
+ return D + G;
5906
5906
  }, 0) / 6);
5907
5907
  }, H = (g = e.viaAjax) !== null && g !== void 0 ? g : !1, M = /^https?:$/.test(w), P = isJsonpSource(C);
5908
5908
  if (P ? H = !0 : M || (H = !1), H) {
@@ -7387,8 +7387,8 @@ function parsePBMModel(n) {
7387
7387
  break;
7388
7388
  }
7389
7389
  }
7390
- for (var A = n.chunks.sort(function(se, de) {
7391
- return chunkOrder(se) - chunkOrder(de);
7390
+ for (var A = n.chunks.sort(function(ae, fe) {
7391
+ return chunkOrder(ae) - chunkOrder(fe);
7392
7392
  }), m = [], E = 0, v = A; E < v.length; E++) {
7393
7393
  var h = v[E], y = parseFloorName(h.name);
7394
7394
  m[y] || (m[y] = []), m[y].push(h);
@@ -7402,11 +7402,11 @@ function parsePBMModel(n) {
7402
7402
  S += h.faces.indices.length;
7403
7403
  }
7404
7404
  for (var C = new Float32Array(S * 3), w = new Float32Array(S * 2), L = new Float32Array(S * 3), H = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], B = 0, O = 0; O < T.length; O++) {
7405
- for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, D = h.vertices.uvs, J = h.faces.indices, K = h.faces.normals, Q = h.vertices.marks, U = J.length, R = 0; R < U; R++) {
7406
- var q = J[R], X = C[B * 3 + R * 3] = N[q * 3], Z = C[B * 3 + R * 3 + 1] = N[q * 3 + 1], W = C[B * 3 + R * 3 + 2] = N[q * 3 + 2];
7407
- H && (H[B + R] = Q[q]), w[B * 2 + R * 2] = D[q * 2], w[B * 2 + R * 2 + 1] = D[q * 2 + 1];
7408
- var G = Math.floor(R / 3) * 3;
7409
- L[B * 3 + R * 3] = K[G], L[B * 3 + R * 3 + 1] = K[G + 1], L[B * 3 + R * 3 + 2] = K[G + 2], X < _[0] && (_[0] = X), Z < _[1] && (_[1] = Z), W < _[2] && (_[2] = W), X > _[3] && (_[3] = X), Z > _[4] && (_[4] = Z), W > _[5] && (_[5] = W);
7405
+ for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, D = h.vertices.uvs, G = h.faces.indices, K = h.faces.normals, J = h.vertices.marks, Q = G.length, R = 0; R < Q; R++) {
7406
+ var U = G[R], X = C[B * 3 + R * 3] = N[U * 3], j = C[B * 3 + R * 3 + 1] = N[U * 3 + 1], $ = C[B * 3 + R * 3 + 2] = N[U * 3 + 2];
7407
+ H && (H[B + R] = J[U]), w[B * 2 + R * 2] = D[U * 2], w[B * 2 + R * 2 + 1] = D[U * 2 + 1];
7408
+ var q = Math.floor(R / 3) * 3;
7409
+ L[B * 3 + R * 3] = K[q], L[B * 3 + R * 3 + 1] = K[q + 1], L[B * 3 + R * 3 + 2] = K[q + 2], X < _[0] && (_[0] = X), j < _[1] && (_[1] = j), $ < _[2] && (_[2] = $), X > _[3] && (_[3] = X), j > _[4] && (_[4] = j), $ > _[5] && (_[5] = $);
7410
7410
  }
7411
7411
  _[0] < P[0] && (P[0] = _[0]), _[1] < P[1] && (P[1] = _[1]), _[2] < P[2] && (P[2] = _[2]), _[3] > P[3] && (P[3] = _[3]), _[4] > P[4] && (P[4] = _[4]), _[5] > P[5] && (P[5] = _[5]), M.push({
7412
7412
  materialIndex: O,
@@ -7415,9 +7415,9 @@ function parsePBMModel(n) {
7415
7415
  start: B,
7416
7416
  count: h.faces.indices.length,
7417
7417
  texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
7418
- }), B += U;
7418
+ }), B += Q;
7419
7419
  }
7420
- var ne = {
7420
+ var re = {
7421
7421
  createAt: o,
7422
7422
  description: s,
7423
7423
  vertices: C,
@@ -7429,20 +7429,20 @@ function parsePBMModel(n) {
7429
7429
  groups: M,
7430
7430
  extents: P
7431
7431
  };
7432
- u.push(ne);
7432
+ u.push(re);
7433
7433
  } else {
7434
- for (var S = 0, $ = 0, R = 0; R < T.length; R++) {
7434
+ for (var S = 0, Y = 0, R = 0; R < T.length; R++) {
7435
7435
  var h = T[R];
7436
- $ += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7436
+ Y += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7437
7437
  }
7438
- for (var C = new Float32Array($ * 3), w = new Float32Array($ * 2), L = void 0, ee = new Float32Array($), re = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], le = 0, B = 0, O = 0; O < T.length; O++) {
7439
- for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, ie = h.vertices.marks, D = h.vertices.uvs, J = h.faces.indices, oe = N.length / 3, U = J.length, R = 0; R < oe; R++) {
7440
- var X = C[B * 3 + R * 3] = N[R * 3], Z = C[B * 3 + R * 3 + 1] = N[R * 3 + 1], W = C[B * 3 + R * 3 + 2] = N[R * 3 + 2];
7441
- H && (H[B + R] = ie[R]), w[B * 2 + R * 2] = D[R * 2], w[B * 2 + R * 2 + 1] = D[R * 2 + 1], ee[B + R] = b, X < _[0] && (_[0] = X), Z < _[1] && (_[1] = Z), W < _[2] && (_[2] = W), X > _[3] && (_[3] = X), Z > _[4] && (_[4] = Z), W > _[5] && (_[5] = W);
7438
+ for (var C = new Float32Array(Y * 3), w = new Float32Array(Y * 2), L = void 0, ee = new Float32Array(Y), ne = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], P = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], le = 0, B = 0, O = 0; O < T.length; O++) {
7439
+ for (var _ = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, ie = h.vertices.marks, D = h.vertices.uvs, G = h.faces.indices, se = N.length / 3, Q = G.length, R = 0; R < se; R++) {
7440
+ var X = C[B * 3 + R * 3] = N[R * 3], j = C[B * 3 + R * 3 + 1] = N[R * 3 + 1], $ = C[B * 3 + R * 3 + 2] = N[R * 3 + 2];
7441
+ H && (H[B + R] = ie[R]), w[B * 2 + R * 2] = D[R * 2], w[B * 2 + R * 2 + 1] = D[R * 2 + 1], ee[B + R] = b, X < _[0] && (_[0] = X), j < _[1] && (_[1] = j), $ < _[2] && (_[2] = $), X > _[3] && (_[3] = X), j > _[4] && (_[4] = j), $ > _[5] && (_[5] = $);
7442
7442
  }
7443
7443
  _[0] < P[0] && (P[0] = _[0]), _[1] < P[1] && (P[1] = _[1]), _[2] < P[2] && (P[2] = _[2]), _[3] > P[3] && (P[3] = _[3]), _[4] > P[4] && (P[4] = _[4]), _[5] > P[5] && (P[5] = _[5]);
7444
- for (var R = 0; R < U; R++)
7445
- re[le + R] = B + J[R];
7444
+ for (var R = 0; R < Q; R++)
7445
+ ne[le + R] = B + G[R];
7446
7446
  M.push({
7447
7447
  materialIndex: O,
7448
7448
  name: h.name,
@@ -7450,21 +7450,21 @@ function parsePBMModel(n) {
7450
7450
  start: le,
7451
7451
  count: h.faces.indices.length,
7452
7452
  texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
7453
- }), B += oe, le += U;
7453
+ }), B += se, le += Q;
7454
7454
  }
7455
- var ne = {
7455
+ var re = {
7456
7456
  createAt: o,
7457
7457
  description: s,
7458
7458
  vertices: C,
7459
7459
  uvs: w,
7460
7460
  normals: L,
7461
7461
  masks: H,
7462
- indices: re,
7462
+ indices: ne,
7463
7463
  floorIndex: b,
7464
7464
  groups: M,
7465
7465
  extents: P
7466
7466
  };
7467
- u.push(ne);
7467
+ u.push(re);
7468
7468
  }
7469
7469
  }
7470
7470
  return u;
@@ -7499,51 +7499,51 @@ function parse$4(n, t, e, r, o, s, u) {
7499
7499
  P.addGroup(_.start, _.count, _.materialIndex);
7500
7500
  }
7501
7501
  p.add(P);
7502
- for (var N = [], D = 0, J = L; D < J.length; D++) {
7503
- var _ = J[D], K = r[_.chunkName] || (_.texture ? pathJoin(e || "", _.texture) : void 0), Q = new PBMMeshMaterial(t ? "phong" : "basic");
7504
- Q.floorIndex = w, P.attributes.normal === void 0 && (Q.flatShading = !0), P.attributes._feature_id_rsmask && (Q.defines.USE_VERTEX_MARK = !0), N.push(Q), K ? (g++, h[K] ? h[K].push(Q) : h[K] = [Q]) : Q.color = new THREE.Color(16777215), p.add(Q);
7502
+ for (var N = [], D = 0, G = L; D < G.length; D++) {
7503
+ var _ = G[D], K = r[_.chunkName] || (_.texture ? pathJoin(e || "", _.texture) : void 0), J = new PBMMeshMaterial(t ? "phong" : "basic");
7504
+ J.floorIndex = w, P.attributes.normal === void 0 && (J.flatShading = !0), P.attributes._feature_id_rsmask && (J.defines.USE_VERTEX_MARK = !0), N.push(J), K ? (g++, h[K] ? h[K].push(J) : h[K] = [J]) : J.color = new THREE.Color(16777215), p.add(J);
7505
7505
  }
7506
- var U = new PBMMesh(P, N);
7507
- U.name = "model_floor_" + w, U.userData.createAt = v, U.userData.description = y, U.matrix.compose(U.position, U.quaternion, U.scale), U.matrixAutoUpdate = !1, U.frustumCulled = !1, c = v, d = y, f.push(U);
7506
+ var Q = new PBMMesh(P, N);
7507
+ Q.name = "model_floor_" + w, Q.userData.createAt = v, Q.userData.description = y, Q.matrix.compose(Q.position, Q.quaternion, Q.scale), Q.matrixAutoUpdate = !1, Q.frustumCulled = !1, c = v, d = y, f.push(Q);
7508
7508
  }
7509
- var q = function(X) {
7509
+ var U = function(X) {
7510
7510
  X = autoRestImageOptionsByTextureLength(X, g);
7511
- for (var Z = [], W = function(ee) {
7512
- var re = null;
7513
- ee in s && (re = s[ee]), re || (re = loadTexture$1(ee, X, u)), Z.push(re.then(function(le) {
7514
- for (var ie = 0, oe = h[ee]; ie < oe.length; ie++) {
7515
- var se = oe[ie];
7516
- se.map && (p.delete(se.map), se.map.dispose()), se.map = le, p.add(le);
7511
+ for (var j = [], $ = function(ee) {
7512
+ var ne = null;
7513
+ ee in s && (ne = s[ee]), ne || (ne = loadTexture$1(ee, X, u)), j.push(ne.then(function(le) {
7514
+ for (var ie = 0, se = h[ee]; ie < se.length; ie++) {
7515
+ var ae = se[ie];
7516
+ ae.map && (p.delete(ae.map), ae.map.dispose()), ae.map = le, p.add(le);
7517
7517
  }
7518
7518
  return le;
7519
7519
  }).catch(function() {
7520
7520
  for (var le = 0, ie = h[ee]; le < ie.length; le++) {
7521
- var oe = ie[le];
7522
- oe.map && (p.delete(oe.map), oe.map.dispose()), oe.map = null, oe.color = new THREE.Color(16777215);
7521
+ var se = ie[le];
7522
+ se.map && (p.delete(se.map), se.map.dispose()), se.map = null, se.color = new THREE.Color(16777215);
7523
7523
  }
7524
7524
  return null;
7525
7525
  }));
7526
- }, G = 0, ne = Object.keys(h); G < ne.length; G++) {
7527
- var $ = ne[G];
7528
- W($);
7529
- }
7530
- for (var $ in s)
7531
- delete s[$];
7532
- return Promise.all(Z).then(function(ee) {
7533
- return ee.filter(function(re) {
7534
- return re;
7526
+ }, q = 0, re = Object.keys(h); q < re.length; q++) {
7527
+ var Y = re[q];
7528
+ $(Y);
7529
+ }
7530
+ for (var Y in s)
7531
+ delete s[Y];
7532
+ return Promise.all(j).then(function(ee) {
7533
+ return ee.filter(function(ne) {
7534
+ return ne;
7535
7535
  });
7536
7536
  });
7537
7537
  };
7538
- return q(o).then(function(X) {
7538
+ return U(o).then(function(X) {
7539
7539
  return {
7540
7540
  createAt: c,
7541
7541
  description: d,
7542
7542
  objects: f,
7543
7543
  textures: X,
7544
7544
  dispose: function() {
7545
- p.forEach(function(Z) {
7546
- Z.dispose();
7545
+ p.forEach(function(j) {
7546
+ j.dispose();
7547
7547
  }), p.clear();
7548
7548
  }
7549
7549
  };
@@ -8497,8 +8497,8 @@ function parse$3(n, t, e, r, o) {
8497
8497
  var M = parseGeometry(T[H].geometry);
8498
8498
  M.applyMatrix4(f), f.decompose(h, p, g), g.x * g.y * g.z < 0 && M.attributes.normal && M.attributes.position && M.attributes.uv && flipBufferGeometryNormals(M), l.add(M);
8499
8499
  for (var P = [], B = 0, O = T[H].material; B < O.length; B++) {
8500
- var _ = O[B], N = parseMaterial(_, t, e || "", r, d, o, A, l, m), D = N.material, J = N.textureReady;
8501
- u.push(J), P.push(D);
8500
+ var _ = O[B], N = parseMaterial(_, t, e || "", r, d, o, A, l, m), D = N.material, G = N.textureReady;
8501
+ u.push(G), P.push(D);
8502
8502
  }
8503
8503
  var K = new PBMMesh(M, P);
8504
8504
  K.name = "chunk_" + H, K.matrix.compose(K.position, K.quaternion, K.scale), K.matrixAutoUpdate = !1, K.frustumCulled = !1, L.add(K);
@@ -8513,8 +8513,8 @@ function parse$3(n, t, e, r, o) {
8513
8513
  objects: s,
8514
8514
  textures: Array.from(m),
8515
8515
  dispose: function() {
8516
- l.forEach(function(Q) {
8517
- Q.dispose();
8516
+ l.forEach(function(J) {
8517
+ J.dispose();
8518
8518
  }), l.clear();
8519
8519
  }
8520
8520
  };
@@ -8938,38 +8938,38 @@ var Parser = (
8938
8938
  Promise.all(g),
8939
8939
  Promise.all(A)
8940
8940
  ]).then(function(C) {
8941
- for (var w = C[0], L = C[1], H = C[2], M = C[3], P = C[4], B = [], O = function(J, K) {
8942
- var Q = w[J], U = L[J], q = H[J], X = M[J], Z = P[J];
8943
- if (Q === void 0)
8941
+ for (var w = C[0], L = C[1], H = C[2], M = C[3], P = C[4], B = [], O = function(G, K) {
8942
+ var J = w[G], Q = L[G], U = H[G], X = M[G], j = P[G];
8943
+ if (J === void 0)
8944
8944
  return "continue";
8945
- Q.updateMatrix(), Q.matrixAutoUpdate = !0;
8946
- var W = void 0;
8947
- switch (PATH_PROPERTIES[Z.path]) {
8945
+ J.updateMatrix(), J.matrixAutoUpdate = !0;
8946
+ var $ = void 0;
8947
+ switch (PATH_PROPERTIES[j.path]) {
8948
8948
  case PATH_PROPERTIES.weights:
8949
- W = THREE.NumberKeyframeTrack;
8949
+ $ = THREE.NumberKeyframeTrack;
8950
8950
  break;
8951
8951
  case PATH_PROPERTIES.rotation:
8952
- W = THREE.QuaternionKeyframeTrack;
8952
+ $ = THREE.QuaternionKeyframeTrack;
8953
8953
  break;
8954
8954
  case PATH_PROPERTIES.position:
8955
8955
  case PATH_PROPERTIES.scale:
8956
8956
  default:
8957
- W = THREE.VectorKeyframeTrack;
8957
+ $ = THREE.VectorKeyframeTrack;
8958
8958
  break;
8959
8959
  }
8960
- var G = Q.name ? Q.name : Q.uuid, ne = X.interpolation !== void 0 ? INTERPOLATION[X.interpolation] : THREE.InterpolateLinear, $ = [];
8961
- PATH_PROPERTIES[Z.path] === PATH_PROPERTIES.weights ? Q.traverse(function(de) {
8962
- de.morphTargetInfluences && $.push(de.name ? de.name : de.uuid);
8963
- }) : $.push(G);
8964
- var ee = q.array;
8965
- if (q.normalized) {
8966
- for (var re = getNormalizedComponentScale(ee.constructor), le = new Float32Array(ee.length), ie = 0, oe = ee.length; ie < oe; ie++)
8967
- le[ie] = ee[ie] * re;
8960
+ var q = J.name ? J.name : J.uuid, re = X.interpolation !== void 0 ? INTERPOLATION[X.interpolation] : THREE.InterpolateLinear, Y = [];
8961
+ PATH_PROPERTIES[j.path] === PATH_PROPERTIES.weights ? J.traverse(function(fe) {
8962
+ fe.morphTargetInfluences && Y.push(fe.name ? fe.name : fe.uuid);
8963
+ }) : Y.push(q);
8964
+ var ee = U.array;
8965
+ if (U.normalized) {
8966
+ for (var ne = getNormalizedComponentScale(ee.constructor), le = new Float32Array(ee.length), ie = 0, se = ee.length; ie < se; ie++)
8967
+ le[ie] = ee[ie] * ne;
8968
8968
  ee = le;
8969
8969
  }
8970
- for (var ie = 0, oe = $.length; ie < oe; ie++) {
8971
- var se = new W($[ie] + "." + PATH_PROPERTIES[Z.path], U.array, ee, ne);
8972
- B.push(se);
8970
+ for (var ie = 0, se = Y.length; ie < se; ie++) {
8971
+ var ae = new $(Y[ie] + "." + PATH_PROPERTIES[j.path], Q.array, ee, re);
8972
+ B.push(ae);
8973
8973
  }
8974
8974
  }, _ = 0, N = w.length; _ < N; _++)
8975
8975
  O(_);
@@ -11626,8 +11626,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11626
11626
  var d = function(le) {
11627
11627
  var ie = e.length;
11628
11628
  if (le > ie) {
11629
- var oe = new u8(Math.max(ie * 2, le));
11630
- oe.set(e), e = oe;
11629
+ var se = new u8(Math.max(ie * 2, le));
11630
+ se.set(e), e = se;
11631
11631
  }
11632
11632
  }, f = t.f || 0, h = t.p || 0, p = t.b || 0, g = t.l, A = t.d, m = t.m, E = t.n, v = o * 8;
11633
11633
  do {
@@ -11655,8 +11655,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11655
11655
  L[M++] = N;
11656
11656
  }
11657
11657
  }
11658
- var J = L.subarray(0, R), K = L.subarray(R);
11659
- m = max(J), E = max(K), g = hMap(J, m, 1), A = hMap(K, E, 1);
11658
+ var G = L.subarray(0, R), K = L.subarray(R);
11659
+ m = max(G), E = max(K), g = hMap(G, m, 1), A = hMap(K, E, 1);
11660
11660
  } else
11661
11661
  err(1);
11662
11662
  else {
@@ -11674,8 +11674,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11674
11674
  }
11675
11675
  }
11676
11676
  l && d(p + 131072);
11677
- for (var Q = (1 << m) - 1, U = (1 << E) - 1, q = h; ; q = h) {
11678
- var N = g[bits16(n, h) & Q], X = N >> 4;
11677
+ for (var J = (1 << m) - 1, Q = (1 << E) - 1, U = h; ; U = h) {
11678
+ var N = g[bits16(n, h) & J], X = N >> 4;
11679
11679
  if (h += N & 15, h > v) {
11680
11680
  c && err(0);
11681
11681
  break;
@@ -11683,37 +11683,37 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11683
11683
  if (N || err(2), X < 256)
11684
11684
  e[p++] = X;
11685
11685
  else if (X == 256) {
11686
- q = h, g = null;
11686
+ U = h, g = null;
11687
11687
  break;
11688
11688
  } else {
11689
- var Z = X - 254;
11689
+ var j = X - 254;
11690
11690
  if (X > 264) {
11691
- var M = X - 257, W = fleb[M];
11692
- Z = bits(n, h, (1 << W) - 1) + fl[M], h += W;
11691
+ var M = X - 257, $ = fleb[M];
11692
+ j = bits(n, h, (1 << $) - 1) + fl[M], h += $;
11693
11693
  }
11694
- var G = A[bits16(n, h) & U], ne = G >> 4;
11695
- G || err(3), h += G & 15;
11696
- var K = fd[ne];
11697
- if (ne > 3) {
11698
- var W = fdeb[ne];
11699
- K += bits16(n, h) & (1 << W) - 1, h += W;
11694
+ var q = A[bits16(n, h) & Q], re = q >> 4;
11695
+ q || err(3), h += q & 15;
11696
+ var K = fd[re];
11697
+ if (re > 3) {
11698
+ var $ = fdeb[re];
11699
+ K += bits16(n, h) & (1 << $) - 1, h += $;
11700
11700
  }
11701
11701
  if (h > v) {
11702
11702
  c && err(0);
11703
11703
  break;
11704
11704
  }
11705
11705
  l && d(p + 131072);
11706
- var $ = p + Z;
11706
+ var Y = p + j;
11707
11707
  if (p < K) {
11708
- var ee = s - K, re = Math.min(K, $);
11709
- for (ee + p < 0 && err(3); p < re; ++p)
11708
+ var ee = s - K, ne = Math.min(K, Y);
11709
+ for (ee + p < 0 && err(3); p < ne; ++p)
11710
11710
  e[p] = r[ee + p];
11711
11711
  }
11712
- for (; p < $; ++p)
11712
+ for (; p < Y; ++p)
11713
11713
  e[p] = e[p - K];
11714
11714
  }
11715
11715
  }
11716
- t.l = g, t.p = q, t.b = p, t.f = f, g && (f = 1, t.m = m, t.d = A, t.n = E);
11716
+ t.l = g, t.p = U, t.b = p, t.f = f, g && (f = 1, t.m = m, t.d = A, t.n = E);
11717
11717
  } while (!f);
11718
11718
  return p != e.length && u ? slc(e, 0, p) : e.subarray(0, p);
11719
11719
  }, et = /* @__PURE__ */ new u8(0), b2 = function(n, t) {
@@ -13393,50 +13393,50 @@ function loadX3p(n, t) {
13393
13393
  });
13394
13394
  }
13395
13395
  function parse$1(n, t) {
13396
- for (var e, r, o, s, u, l, c, d, f, h, p, g, A, m, E, v, y, b, T, S, R, C, w, L, H, M, P, B, O, _, N, D, J, K, Q, U, q, X, Z, W, G, ne, $, ee, re, le, ie, oe, se, de, he, Re, ce, Ce, j = unzipSync(n), te = "", V = null, be = 0, fe = Object.keys(j); be < fe.length; be++) {
13397
- var ve = fe[be];
13398
- /(^|\/)main\.xml$/i.test(ve) && (V = j[ve], te = ve.slice(0, ve.lastIndexOf("/") + 1));
13396
+ for (var e, r, o, s, u, l, c, d, f, h, p, g, A, m, E, v, y, b, T, S, R, C, w, L, H, M, P, B, O, _, N, D, G, K, J, Q, U, X, j, $, q, re, Y, ee, ne, le, ie, se, ae, fe, he, xe, de, Re, te = unzipSync(n), W = "", z = null, Ce = 0, ce = Object.keys(te); Ce < ce.length; Ce++) {
13397
+ var ve = ce[Ce];
13398
+ /(^|\/)main\.xml$/i.test(ve) && (z = te[ve], W = ve.slice(0, ve.lastIndexOf("/") + 1));
13399
13399
  }
13400
- if (!V)
13400
+ if (!z)
13401
13401
  throw new Error("X3p: main.xml not found.");
13402
13402
  if (typeof DOMParser == "undefined")
13403
13403
  throw new Error("X3p: DOMParser not found.");
13404
- var Ve = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), rt = new DOMParser(), We = decodeText(V), me = rt.parseFromString(We, "text/xml"), ae = me.querySelector("Record1 Axes"), pe = {
13404
+ var Ve = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), rt = new DOMParser(), We = decodeText(z), me = rt.parseFromString(We, "text/xml"), oe = me.querySelector("Record1 Axes"), pe = {
13405
13405
  x: {
13406
- type: (s = (o = (r = ae == null ? void 0 : ae.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",
13407
- dataType: (c = (l = (u = ae == null ? void 0 : ae.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",
13408
- increment: Number((f = (d = ae == null ? void 0 : ae.querySelector("CX Increment")) === null || d === void 0 ? void 0 : d.textContent) !== null && f !== void 0 ? f : "1"),
13409
- offset: Number((p = (h = ae == null ? void 0 : ae.querySelector("CX Offset")) === null || h === void 0 ? void 0 : h.textContent) !== null && p !== void 0 ? p : "0")
13406
+ type: (s = (o = (r = oe == null ? void 0 : oe.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",
13407
+ dataType: (c = (l = (u = oe == null ? void 0 : oe.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",
13408
+ increment: Number((f = (d = oe == null ? void 0 : oe.querySelector("CX Increment")) === null || d === void 0 ? void 0 : d.textContent) !== null && f !== void 0 ? f : "1"),
13409
+ offset: Number((p = (h = oe == null ? void 0 : oe.querySelector("CX Offset")) === null || h === void 0 ? void 0 : h.textContent) !== null && p !== void 0 ? p : "0")
13410
13410
  },
13411
13411
  y: {
13412
- type: (m = (A = (g = ae == null ? void 0 : ae.querySelector("CY AxisType")) === null || g === void 0 ? void 0 : g.textContent) === null || A === void 0 ? void 0 : A.toUpperCase()) !== null && m !== void 0 ? m : "I",
13413
- dataType: (y = (v = (E = ae == null ? void 0 : ae.querySelector("CY DataType")) === null || E === void 0 ? void 0 : E.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && y !== void 0 ? y : "D",
13414
- increment: Number((T = (b = ae == null ? void 0 : ae.querySelector("CY Increment")) === null || b === void 0 ? void 0 : b.textContent) !== null && T !== void 0 ? T : "1"),
13415
- offset: Number((R = (S = ae == null ? void 0 : ae.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
13412
+ type: (m = (A = (g = oe == null ? void 0 : oe.querySelector("CY AxisType")) === null || g === void 0 ? void 0 : g.textContent) === null || A === void 0 ? void 0 : A.toUpperCase()) !== null && m !== void 0 ? m : "I",
13413
+ dataType: (y = (v = (E = oe == null ? void 0 : oe.querySelector("CY DataType")) === null || E === void 0 ? void 0 : E.textContent) === null || v === void 0 ? void 0 : v.toUpperCase()) !== null && y !== void 0 ? y : "D",
13414
+ increment: Number((T = (b = oe == null ? void 0 : oe.querySelector("CY Increment")) === null || b === void 0 ? void 0 : b.textContent) !== null && T !== void 0 ? T : "1"),
13415
+ offset: Number((R = (S = oe == null ? void 0 : oe.querySelector("CY Offset")) === null || S === void 0 ? void 0 : S.textContent) !== null && R !== void 0 ? R : "0")
13416
13416
  },
13417
13417
  z: {
13418
- type: (L = (w = (C = ae == null ? void 0 : ae.querySelector("CZ AxisType")) === null || C === void 0 ? void 0 : C.textContent) === null || w === void 0 ? void 0 : w.toUpperCase()) !== null && L !== void 0 ? L : "A",
13419
- dataType: (P = (M = (H = ae == null ? void 0 : ae.querySelector("CZ DataType")) === null || H === void 0 ? void 0 : H.textContent) === null || M === void 0 ? void 0 : M.toUpperCase()) !== null && P !== void 0 ? P : "D",
13420
- increment: Number((O = (B = ae == null ? void 0 : ae.querySelector("CZ Increment")) === null || B === void 0 ? void 0 : B.textContent) !== null && O !== void 0 ? O : "1"),
13421
- offset: Number((N = (_ = ae == null ? void 0 : ae.querySelector("CZ Offset")) === null || _ === void 0 ? void 0 : _.textContent) !== null && N !== void 0 ? N : "0")
13422
- }
13423
- }, Me = null, Se = me.querySelector("Record1 Axes Rotation");
13424
- Se && (Me = new THREE.Matrix3(), Me.set(Number((J = (D = Se.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && J !== void 0 ? J : 0), Number((Q = (K = Se.querySelector("r12")) === null || K === void 0 ? void 0 : K.textContent) !== null && Q !== void 0 ? Q : 0), Number((q = (U = Se.querySelector("r13")) === null || U === void 0 ? void 0 : U.textContent) !== null && q !== void 0 ? q : 0), Number((Z = (X = Se.querySelector("r21")) === null || X === void 0 ? void 0 : X.textContent) !== null && Z !== void 0 ? Z : 0), Number((G = (W = Se.querySelector("r22")) === null || W === void 0 ? void 0 : W.textContent) !== null && G !== void 0 ? G : 0), Number(($ = (ne = Se.querySelector("r23")) === null || ne === void 0 ? void 0 : ne.textContent) !== null && $ !== void 0 ? $ : 0), Number((re = (ee = Se.querySelector("r31")) === null || ee === void 0 ? void 0 : ee.textContent) !== null && re !== void 0 ? re : 0), Number((ie = (le = Se.querySelector("r32")) === null || le === void 0 ? void 0 : le.textContent) !== null && ie !== void 0 ? ie : 0), Number((se = (oe = Se.querySelector("r33")) === null || oe === void 0 ? void 0 : oe.textContent) !== null && se !== void 0 ? se : 0)));
13425
- var Pe = (de = me.querySelector("Record3 DataLink PointDataLink")) === null || de === void 0 ? void 0 : de.textContent;
13418
+ type: (L = (w = (C = oe == null ? void 0 : oe.querySelector("CZ AxisType")) === null || C === void 0 ? void 0 : C.textContent) === null || w === void 0 ? void 0 : w.toUpperCase()) !== null && L !== void 0 ? L : "A",
13419
+ dataType: (P = (M = (H = oe == null ? void 0 : oe.querySelector("CZ DataType")) === null || H === void 0 ? void 0 : H.textContent) === null || M === void 0 ? void 0 : M.toUpperCase()) !== null && P !== void 0 ? P : "D",
13420
+ increment: Number((O = (B = oe == null ? void 0 : oe.querySelector("CZ Increment")) === null || B === void 0 ? void 0 : B.textContent) !== null && O !== void 0 ? O : "1"),
13421
+ offset: Number((N = (_ = oe == null ? void 0 : oe.querySelector("CZ Offset")) === null || _ === void 0 ? void 0 : _.textContent) !== null && N !== void 0 ? N : "0")
13422
+ }
13423
+ }, Me = null, Te = me.querySelector("Record1 Axes Rotation");
13424
+ Te && (Me = new THREE.Matrix3(), Me.set(Number((G = (D = Te.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && G !== void 0 ? G : 0), Number((J = (K = Te.querySelector("r12")) === null || K === void 0 ? void 0 : K.textContent) !== null && J !== void 0 ? J : 0), Number((U = (Q = Te.querySelector("r13")) === null || Q === void 0 ? void 0 : Q.textContent) !== null && U !== void 0 ? U : 0), Number((j = (X = Te.querySelector("r21")) === null || X === void 0 ? void 0 : X.textContent) !== null && j !== void 0 ? j : 0), Number((q = ($ = Te.querySelector("r22")) === null || $ === void 0 ? void 0 : $.textContent) !== null && q !== void 0 ? q : 0), Number((Y = (re = Te.querySelector("r23")) === null || re === void 0 ? void 0 : re.textContent) !== null && Y !== void 0 ? Y : 0), Number((ne = (ee = Te.querySelector("r31")) === null || ee === void 0 ? void 0 : ee.textContent) !== null && ne !== void 0 ? ne : 0), Number((ie = (le = Te.querySelector("r32")) === null || le === void 0 ? void 0 : le.textContent) !== null && ie !== void 0 ? ie : 0), Number((ae = (se = Te.querySelector("r33")) === null || se === void 0 ? void 0 : se.textContent) !== null && ae !== void 0 ? ae : 0)));
13425
+ var Pe = (fe = me.querySelector("Record3 DataLink PointDataLink")) === null || fe === void 0 ? void 0 : fe.textContent;
13426
13426
  if (typeof Pe != "string")
13427
13427
  throw new Error("X3p: PointDataLink not found.");
13428
- Pe = pathJoin(te, Pe);
13429
- var Fe = j[Pe];
13428
+ Pe = pathJoin(W, Pe);
13429
+ var Fe = te[Pe];
13430
13430
  if (!Fe)
13431
13431
  throw new Error("X3p: ".concat(Fe, " not found."));
13432
- for (var Ae = getPointArray(Fe.buffer, pe.z.dataType), Te = Number((Re = (he = me.querySelector("Record3 MatrixDimension SizeX")) === null || he === void 0 ? void 0 : he.textContent) !== null && Re !== void 0 ? Re : "0"), Ie = Number((Ce = (ce = me.querySelector("Record3 MatrixDimension SizeY")) === null || ce === void 0 ? void 0 : ce.textContent) !== null && Ce !== void 0 ? Ce : "0"), Be = Math.floor(Te - 1), qe = Math.floor(Ie - 1), ke = Be + 1, Ne = qe + 1, _e = new Float32Array(ke * Ne * 3), Ue = new Float32Array(ke * Ne * 2), De = new Uint32Array(Be * qe * 6), je = new THREE.Box3(), xe = 0; xe < Ne; xe++)
13433
- for (var Oe = xe * pe.y.increment + pe.y.offset, we = 0; we < ke; we++) {
13434
- var Le = xe * ke + we, He = we * pe.x.increment + pe.x.offset, Ge = Ae[Le], Ze = !isNaN(Ge), Ye = Ze ? Ge : NaN;
13435
- _vector.set(He, -Oe, Ye), Me && _vector.applyMatrix3(Me), Ze && je.expandByPoint(_vector), _e[Le * 3 + 0] = _vector.x, _e[Le * 3 + 1] = _vector.y, _e[Le * 3 + 2] = _vector.z, Ue[Le * 2 + 0] = we / Be, Ue[Le * 2 + 1] = 1 - xe / qe;
13432
+ for (var Ae = getPointArray(Fe.buffer, pe.z.dataType), be = Number((xe = (he = me.querySelector("Record3 MatrixDimension SizeX")) === null || he === void 0 ? void 0 : he.textContent) !== null && xe !== void 0 ? xe : "0"), Ie = Number((Re = (de = me.querySelector("Record3 MatrixDimension SizeY")) === null || de === void 0 ? void 0 : de.textContent) !== null && Re !== void 0 ? Re : "0"), Be = Math.floor(be - 1), qe = Math.floor(Ie - 1), ke = Be + 1, Ne = qe + 1, _e = new Float32Array(ke * Ne * 3), Ue = new Float32Array(ke * Ne * 2), De = new Uint32Array(Be * qe * 6), je = new THREE.Box3(), Se = 0; Se < Ne; Se++)
13433
+ for (var Oe = Se * pe.y.increment + pe.y.offset, we = 0; we < ke; we++) {
13434
+ var Le = Se * ke + we, He = we * pe.x.increment + pe.x.offset, Ge = Ae[Le], Ze = !isNaN(Ge), Ye = Ze ? Ge : NaN;
13435
+ _vector.set(He, -Oe, Ye), Me && _vector.applyMatrix3(Me), Ze && je.expandByPoint(_vector), _e[Le * 3 + 0] = _vector.x, _e[Le * 3 + 1] = _vector.y, _e[Le * 3 + 2] = _vector.z, Ue[Le * 2 + 0] = we / Be, Ue[Le * 2 + 1] = 1 - Se / qe;
13436
13436
  }
13437
- for (var xe = 0; xe < qe; xe++)
13437
+ for (var Se = 0; Se < qe; Se++)
13438
13438
  for (var we = 0; we < Be; we++) {
13439
- var Qe = we + ke * xe, ye = we + ke * (xe + 1), Mt = we + 1 + ke * (xe + 1), vt = we + 1 + ke * xe, at = (xe * Be + we) * 6;
13439
+ var Qe = we + ke * Se, ye = we + ke * (Se + 1), Mt = we + 1 + ke * (Se + 1), vt = we + 1 + ke * Se, at = (Se * Be + we) * 6;
13440
13440
  De[at + 0] = Qe, De[at + 1] = ye, De[at + 2] = vt, De[at + 3] = ye, De[at + 4] = Mt, De[at + 5] = vt;
13441
13441
  }
13442
13442
  var Je = new THREE.BufferGeometry();
@@ -13804,7 +13804,7 @@ var scratchVector3$7 = new THREE.Vector3(), scratchPlane = new THREE.Plane(), sc
13804
13804
  var o = r.getCenter(scratchVector3$7).sub(t.camera.position);
13805
13805
  this.state.centerZDepth = t.camera.direction.dot(o), this.state.centerScreenY = t.camera.up.dot(o);
13806
13806
  var s = this.parent ? this.parent.state.visibilityPlaneMask : CullingVolume.MASK_INDETERMINATE;
13807
- this.state.visibilityPlaneMask = t.cullingVolume.computeVisibilityWithPlaneMask(r, s), this.state.visible = this.state.visibilityPlaneMask !== CullingVolume.MASK_OUTSIDE;
13807
+ this.state.visibilityPlaneMask = t.cullingVolume.computeVisibilityWithPlaneMask(r, s), this.state.visible = this.state.visibilityPlaneMask !== CullingVolume.MASK_OUTSIDE, t.cameraCulling || (this.state.visible = !0);
13808
13808
  } else
13809
13809
  this.state.distanceToCamera = 0, this.state.centerZDepth = 0, this.state.visibilityPlaneMask = CullingVolume.MASK_INDETERMINATE, this.state.visible = !0;
13810
13810
  if ((this.levelOfContent <= t.minLevelOfDetail || this.geometricError >= t.maxGeometricError) && (this.state.visible = !0), this.viewerRequestVolume) {
@@ -14018,16 +14018,16 @@ var BVHVector3 = (
14018
14018
  return P[D] - P[N];
14019
14019
  };
14020
14020
  function _(N) {
14021
- var D = N.startIndex, J = N.endIndex, K = N.extents;
14021
+ var D = N.startIndex, G = N.endIndex, K = N.extents;
14022
14022
  P[0] = K[3] - K[0], P[1] = K[4] - K[1], P[2] = K[5] - K[2], B.sort(O);
14023
- for (var Q = 0; Q < 3; Q++) {
14024
- for (var U = B[Q], q = K[U] + K[U + 3], X = D, Z = J - 1, W = -1, G = void 0; X <= Z; )
14025
- W === -1 ? (G = u[X], l[G * 6 + U] + l[G * 6 + U + 3] < q ? X++ : W = G) : (G = u[Z], l[G * 6 + U] + l[G * 6 + U + 3] >= q || (u[X] = G, u[Z] = W, W = -1, X++), Z--);
14026
- if (X > D && X < J) {
14027
- var ne = new BVHNode(++f, calcExtents(u, l, D, X, EPSILON$1), D, X, N.deepth + 1);
14028
- ne.deepth < r && ne.endIndex - ne.startIndex > e && (c[d++] = ne);
14029
- var $ = new BVHNode(++f, calcExtents(u, l, X, J, EPSILON$1), X, J, N.deepth + 1);
14030
- $.deepth < r && $.endIndex - $.startIndex > e && (c[d++] = $), N.node0 = ne, N.node1 = $, N.startIndex = 0, N.endIndex = 0;
14023
+ for (var J = 0; J < 3; J++) {
14024
+ for (var Q = B[J], U = K[Q] + K[Q + 3], X = D, j = G - 1, $ = -1, q = void 0; X <= j; )
14025
+ $ === -1 ? (q = u[X], l[q * 6 + Q] + l[q * 6 + Q + 3] < U ? X++ : $ = q) : (q = u[j], l[q * 6 + Q] + l[q * 6 + Q + 3] >= U || (u[X] = q, u[j] = $, $ = -1, X++), j--);
14026
+ if (X > D && X < G) {
14027
+ var re = new BVHNode(++f, calcExtents(u, l, D, X, EPSILON$1), D, X, N.deepth + 1);
14028
+ re.deepth < r && re.endIndex - re.startIndex > e && (c[d++] = re);
14029
+ var Y = new BVHNode(++f, calcExtents(u, l, X, G, EPSILON$1), X, G, N.deepth + 1);
14030
+ Y.deepth < r && Y.endIndex - Y.startIndex > e && (c[d++] = Y), N.node0 = re, N.node1 = Y, N.startIndex = 0, N.endIndex = 0;
14031
14031
  break;
14032
14032
  }
14033
14033
  }
@@ -14053,14 +14053,14 @@ var BVHVector3 = (
14053
14053
  }, t.prototype.intersectRay = function(e, r, o, s) {
14054
14054
  for (var u = this.offsetArray, l = this.rootNodePacked, c = new Float32Array(l), d = new Uint32Array(l), f = new Uint16Array(l), h = new BVHVector3(1 / r.x, 1 / r.y, 1 / r.z), p = [0], g, A, m, E; (g = p.pop()) !== void 0; )
14055
14055
  if (E = g * BYTES_PER_NODE / 4, intersectNodeBox(e, h, c[E], c[E + 1], c[E + 2], c[E + 3], c[E + 4], c[E + 5])) {
14056
- for (var v = d[E + 6], y = d[E + 7], b = void 0, T = void 0, S = void 0, R = e.x, C = e.y, w = e.z, L = r.x, H = r.y, M = r.z, P = void 0, B = void 0, O = void 0, _ = void 0, N = void 0, D = void 0, J = void 0, K = void 0, Q = void 0, U = void 0, q = void 0, X = void 0, Z = void 0, W = void 0, G = void 0, ne = void 0, $ = void 0, ee = void 0, re = void 0, le = void 0, ie = void 0, oe = void 0, se = void 0, de = void 0, he = void 0, Re = void 0, ce = void 0; v < y; v++) {
14057
- if (b = u[v], T = b * 3, this.getPositionByIndex(T, scratchVector3$6), P = scratchVector3$6.x, B = scratchVector3$6.y, O = scratchVector3$6.z, this.getPositionByIndex(T + 1, scratchVector3$6), _ = scratchVector3$6.x, N = scratchVector3$6.y, D = scratchVector3$6.z, this.getPositionByIndex(T + 2, scratchVector3$6), J = scratchVector3$6.x, K = scratchVector3$6.y, Q = scratchVector3$6.z, U = _ - P, q = N - B, X = D - O, Z = J - P, W = K - B, G = Q - O, ne = q * G - X * W, $ = X * Z - U * G, ee = U * W - q * Z, se = L * ne + H * $ + M * ee, se > 0)
14058
- oe = 1;
14059
- else if (se < 0)
14060
- oe = -1, se = -se;
14056
+ for (var v = d[E + 6], y = d[E + 7], b = void 0, T = void 0, S = void 0, R = e.x, C = e.y, w = e.z, L = r.x, H = r.y, M = r.z, P = void 0, B = void 0, O = void 0, _ = void 0, N = void 0, D = void 0, G = void 0, K = void 0, J = void 0, Q = void 0, U = void 0, X = void 0, j = void 0, $ = void 0, q = void 0, re = void 0, Y = void 0, ee = void 0, ne = void 0, le = void 0, ie = void 0, se = void 0, ae = void 0, fe = void 0, he = void 0, xe = void 0, de = void 0; v < y; v++) {
14057
+ if (b = u[v], T = b * 3, this.getPositionByIndex(T, scratchVector3$6), P = scratchVector3$6.x, B = scratchVector3$6.y, O = scratchVector3$6.z, this.getPositionByIndex(T + 1, scratchVector3$6), _ = scratchVector3$6.x, N = scratchVector3$6.y, D = scratchVector3$6.z, this.getPositionByIndex(T + 2, scratchVector3$6), G = scratchVector3$6.x, K = scratchVector3$6.y, J = scratchVector3$6.z, Q = _ - P, U = N - B, X = D - O, j = G - P, $ = K - B, q = J - O, re = U * q - X * $, Y = X * j - Q * q, ee = Q * $ - U * j, ae = L * re + H * Y + M * ee, ae > 0)
14058
+ se = 1;
14059
+ else if (ae < 0)
14060
+ se = -1, ae = -ae;
14061
14061
  else
14062
14062
  continue;
14063
- re = R - P, le = C - B, ie = w - O, de = oe * (L * (le * G - ie * W) + H * (ie * Z - re * G) + M * (re * W - le * Z)), !(de < 0) && (he = oe * (L * (q * ie - X * le) + H * (X * re - U * ie) + M * (U * le - q * re)), !(he < 0) && (de + he > se || (Re = -oe * (re * ne + le * $ + ie * ee), !(Re < 0) && (ce = Re / se, s.push(new BVHIntersect([P, B, O, _, N, D, J, K, Q], [R + L * ce, C + H * ce, w + M * ce], b))))));
14063
+ ne = R - P, le = C - B, ie = w - O, fe = se * (L * (le * q - ie * $) + H * (ie * j - ne * q) + M * (ne * $ - le * j)), !(fe < 0) && (he = se * (L * (U * ie - X * le) + H * (X * ne - Q * ie) + M * (Q * le - U * ne)), !(he < 0) && (fe + he > ae || (xe = -se * (ne * re + le * Y + ie * ee), !(xe < 0) && (de = xe / ae, s.push(new BVHIntersect([P, B, O, _, N, D, G, K, J], [R + L * de, C + H * de, w + M * de], b))))));
14064
14064
  }
14065
14065
  E = g * BYTES_PER_NODE / 2, A = f[E + 16], m = f[E + 17], A && p.push(A), m && p.push(m);
14066
14066
  }
@@ -14112,19 +14112,19 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$5 = new BVHVe
14112
14112
  function L(H) {
14113
14113
  var M = H.startIndex, P = H.endIndex, B = H.extents;
14114
14114
  R[0] = B[3] - B[0], R[1] = B[4] - B[1], R[2] = B[5] - B[2];
14115
- for (var O = C.sort(w)[0], _ = ORDER_AXISES[O], N = (B[O] + B[O + 3]) / 2, D = M, J = P - 1, K = -1, Q; D <= J; )
14116
- K === -1 ? (Q = l[D], s(Q, scratchVector3$5), scratchVector3$5[_] < N ? D++ : K = Q) : (Q = l[J], s(Q, scratchVector3$5), scratchVector3$5[_] >= N || (l[D] = Q, l[J] = K, K = -1, D++), J--);
14115
+ for (var O = C.sort(w)[0], _ = ORDER_AXISES[O], N = (B[O] + B[O + 3]) / 2, D = M, G = P - 1, K = -1, J; D <= G; )
14116
+ K === -1 ? (J = l[D], s(J, scratchVector3$5), scratchVector3$5[_] < N ? D++ : K = J) : (J = l[G], s(J, scratchVector3$5), scratchVector3$5[_] >= N || (l[D] = J, l[G] = K, K = -1, D++), G--);
14117
14117
  if (D > M) {
14118
- var U = B.slice();
14119
- U[O + 3] = N + EPSILON;
14120
- var q = new BVHNode(++f, U, M, D, H.deepth + 1);
14121
- q.deepth < r && q.endIndex - q.startIndex > e && (c[d++] = q), H.node0 = q;
14118
+ var Q = B.slice();
14119
+ Q[O + 3] = N + EPSILON;
14120
+ var U = new BVHNode(++f, Q, M, D, H.deepth + 1);
14121
+ U.deepth < r && U.endIndex - U.startIndex > e && (c[d++] = U), H.node0 = U;
14122
14122
  }
14123
14123
  if (P > D) {
14124
14124
  var X = B.slice();
14125
14125
  X[O] = N - EPSILON;
14126
- var Z = new BVHNode(++f, X, D, P, H.deepth + 1);
14127
- Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[d++] = Z), H.node1 = Z;
14126
+ var j = new BVHNode(++f, X, D, P, H.deepth + 1);
14127
+ j.deepth < r && j.endIndex - j.startIndex > e && (c[d++] = j), H.node1 = j;
14128
14128
  }
14129
14129
  H.startIndex = 0, H.endIndex = 0;
14130
14130
  }
@@ -14801,16 +14801,6 @@ var TileRequestScheduler = (
14801
14801
  t.sort(function(e, r) {
14802
14802
  return r.state.distanceToCamera === 0 && e.state.distanceToCamera === 0 ? r.state.centerZDepth - e.state.centerZDepth : r.state.distanceToCamera - e.state.distanceToCamera;
14803
14803
  });
14804
- }, n.prototype.loadAllTiles = function(t, e) {
14805
- var r = this._loadAllTilesTraversalStack;
14806
- for (r.push(t); r.length > 0; ) {
14807
- var o = r.pop();
14808
- o.content && o.content.loadState === "UNLOADED" && o.state.requestedFrameNumber < e.frameNumber && this.tileset.requestedTiles.push(o), this.touchTile(o, e);
14809
- for (var s = 0, u = o.children; s < u.length; s++) {
14810
- var l = u[s];
14811
- r.push(l);
14812
- }
14813
- }
14814
14804
  }, n;
14815
14805
  }()
14816
14806
  ), TilesetNormalTraverser = (
@@ -14827,7 +14817,7 @@ var TileRequestScheduler = (
14827
14817
  var l = u[s];
14828
14818
  this._traversalStack.reset(), this._emptyTraversalStack.reset(), l.camera.refine && (this._canSelectTile = l.camera.visible, this.updateTile(e, l), this.executeTraversal(e, l));
14829
14819
  }
14830
- this._traversalStack.reset(), this._emptyTraversalStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, this.updateTile(e, r), this.executeTraversal(e, r)), r.loadAll && this.loadAllTiles(e, r);
14820
+ this._traversalStack.reset(), this._emptyTraversalStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, this.updateTile(e, r), this.executeTraversal(e, r));
14831
14821
  }, t.prototype.reset = function() {
14832
14822
  n.prototype.reset.call(this), this._traversalStack.reset(), this._emptyTraversalStack.reset();
14833
14823
  }, t.prototype.executeTraversal = function(e, r) {
@@ -14881,7 +14871,7 @@ var TileRequestScheduler = (
14881
14871
  var l = u[s];
14882
14872
  this._traversalStack.reset(), l.camera.refine && (this._canSelectTile = l.camera.visible, this.updateTile(e, l), this.executeTraversal(e, l), this.traverseAndSelect(e, l));
14883
14873
  }
14884
- this.tileset.hasMixedContent = !1, this._traversalStack.reset(), this._descendantTraversalStack.reset(), this._selectionTraversalStack.reset(), this._selectionTraversalancestorStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, this.updateTile(e, r), this.executeTraversal(e, r), this.traverseAndSelect(e, r)), r.loadAll && this.loadAllTiles(e, r);
14874
+ this.tileset.hasMixedContent = !1, this._traversalStack.reset(), this._descendantTraversalStack.reset(), this._selectionTraversalStack.reset(), this._selectionTraversalancestorStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, this.updateTile(e, r), this.executeTraversal(e, r), this.traverseAndSelect(e, r));
14885
14875
  }, t.prototype.reset = function() {
14886
14876
  n.prototype.reset.call(this), this._traversalStack.reset(), this._descendantTraversalStack.reset(), this._selectionTraversalStack.reset(), this._selectionTraversalancestorStack.reset();
14887
14877
  }, t.prototype.executeTraversal = function(e, r) {
@@ -14975,7 +14965,7 @@ var TileRequestScheduler = (
14975
14965
  var l = u[s];
14976
14966
  this._traversalStack.reset(), l.camera.refine && (this._canSelectTile = l.camera.visible, e.updateState(l), this.executeTraversal(e, l));
14977
14967
  }
14978
- this._traversalStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, e.updateState(r), this.executeTraversal(e, r)), r.loadAll && this.loadAllTiles(e, r);
14968
+ this._traversalStack.reset(), r.camera.refine && (this._canSelectTile = r.camera.visible, e.updateState(r), this.executeTraversal(e, r));
14979
14969
  }, t.prototype.reset = function() {
14980
14970
  n.prototype.reset.call(this), this._traversalStack.reset();
14981
14971
  }, t.prototype.executeTraversal = function(e, r) {
@@ -15421,8 +15411,8 @@ function build(n, t) {
15421
15411
  M = [D, Promise.resolve([])];
15422
15412
  }
15423
15413
  H = M[0], H.name = w.name, H.flatShading = !(w.smooth || m.attributes.normal), H.vertexColors = A, n.materials[L] = H;
15424
- var J = M[1];
15425
- r.push(J), o.push(function() {
15414
+ var G = M[1];
15415
+ r.push(G), o.push(function() {
15426
15416
  return H.dispose();
15427
15417
  });
15428
15418
  }
@@ -16234,7 +16224,9 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
16234
16224
  (S === "Panorama" || S === "VRPanorama" || S === "XRPanorama") && E.modelAlpha < 0.1 && (T = E.panoramaMinGeometricError);
16235
16225
  var R = E.maxGeometricError;
16236
16226
  R = Math.max(T, R);
16237
- var C = {
16227
+ var C = E.maxRequests;
16228
+ E.progress > 0.01 && E.progress < 0.99 && (C = 0);
16229
+ var w = {
16238
16230
  debug: E.tileDebug,
16239
16231
  time: now(),
16240
16232
  camera: {
@@ -16258,28 +16250,28 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
16258
16250
  skipLevelOfDetail: E.skipLevelOfDetail,
16259
16251
  mostDetail: E.mostDetail,
16260
16252
  loadSiblings: E.loadSiblings,
16261
- loadAll: E.loadAll,
16253
+ cameraCulling: E.cameraCulling,
16262
16254
  maxMemoryUsage: E.maxMemoryUsage,
16263
- maxRequests: E.maxRequests,
16255
+ maxRequests: C,
16264
16256
  requestOrder: E.requestOrder,
16265
16257
  maxScreenSpaceError: E.maxScreenSpaceError,
16266
16258
  memoryAdjustedOverflow: E.memoryAdjustedOverflow,
16267
16259
  memoryAdjustedScreenSpaceError: E.memoryAdjustedScreenSpaceError
16268
- }, w = E.cacheCameras.map(function(j) {
16269
- return j.updateProjectionMatrix(), __assign(__assign({}, C), { camera: {
16260
+ }, L = E.cacheCameras.map(function(W) {
16261
+ return W.updateProjectionMatrix(), __assign(__assign({}, w), { camera: {
16270
16262
  type: r.type,
16271
- position: new THREE.Vector3().copy(j.position),
16272
- direction: j.getWorldDirection(new THREE.Vector3()),
16273
- up: new THREE.Vector3().copy(j.up),
16274
- projectionMatrix: j.projectionMatrix.clone(),
16275
- visible: j.visible,
16263
+ position: new THREE.Vector3().copy(W.position),
16264
+ direction: W.getWorldDirection(new THREE.Vector3()),
16265
+ up: new THREE.Vector3().copy(W.up),
16266
+ projectionMatrix: W.projectionMatrix.clone(),
16267
+ visible: W.visible,
16276
16268
  refine: !0
16277
- }, cullingVolume: new CullingVolume().setFromCamera(j) });
16269
+ }, cullingVolume: new CullingVolume().setFromCamera(W) });
16278
16270
  });
16279
- if (this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), m = !0), this.autoRefine && this.tileset.update(C, w), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(j) {
16280
- if (d.refineProgress[1]++, j.content) {
16281
- var te = j.content.loadState;
16282
- if (te === "UNLOADED" || te === "LOADING") {
16271
+ if (this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), m = !0), this.autoRefine && this.tileset.update(w, L), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(W) {
16272
+ if (d.refineProgress[1]++, W.content) {
16273
+ var z = W.content.loadState;
16274
+ if (z === "UNLOADED" || z === "LOADING") {
16283
16275
  d.refined = !1;
16284
16276
  return;
16285
16277
  }
@@ -16287,65 +16279,65 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
16287
16279
  d.refineProgress[0]++;
16288
16280
  }), this.loaded === !1 && this.autoRefine) {
16289
16281
  this.loaded = !0;
16290
- var L = !1;
16291
- this.tileset.needsRefinedTiles.forEach(function(j) {
16292
- if (d.loaded !== !1 && j.content) {
16293
- if (j.state.visible && (L = !0), C.skipLevelOfDetail) {
16294
- if (j.state.finalResolution) {
16295
- var te = j.state.ancestorWithContentAvailable, V = te && te.content ? te.content : j.content, be = V.loadState;
16296
- (be === "UNLOADED" || be === "LOADING") && (d.loaded = !1);
16282
+ var H = !1;
16283
+ this.tileset.needsRefinedTiles.forEach(function(W) {
16284
+ if (d.loaded !== !1 && W.content) {
16285
+ if (W.state.visible && (H = !0), w.skipLevelOfDetail) {
16286
+ if (W.state.finalResolution) {
16287
+ var z = W.state.ancestorWithContentAvailable, Ce = z && z.content ? z.content : W.content, ce = Ce.loadState;
16288
+ (ce === "UNLOADED" || ce === "LOADING") && (d.loaded = !1);
16297
16289
  }
16298
- } else if (j.state.visible && j.levelOfContent <= 0) {
16299
- var be = j.content.loadState;
16300
- (be === "UNLOADED" || be === "LOADING") && (d.loaded = !1);
16290
+ } else if (W.state.visible && W.levelOfContent <= 0) {
16291
+ var ce = W.content.loadState;
16292
+ (ce === "UNLOADED" || ce === "LOADING") && (d.loaded = !1);
16301
16293
  }
16302
16294
  }
16303
- }), L && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
16304
- }
16305
- this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.debugObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), C.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(j, te) {
16306
- return j.floor !== te.floor ? j.floor - te.floor : j.levelOfContent !== te.levelOfContent ? te.levelOfContent - j.levelOfContent : j.state.distanceToCamera !== te.state.distanceToCamera ? j.state.distanceToCamera - te.state.distanceToCamera : j.state.centerZDepth - te.state.centerZDepth;
16307
- }), C.debug === "root-bounding-volume" && this.tileset.root.boundingVolumeDebugObject && this.debugObjects.push(this.tileset.root.boundingVolumeDebugObject);
16308
- for (var H = [], M = 0, P = this.tileset.selectedTiles; M < P.length; M++) {
16309
- var B = P[M];
16310
- C.debug === "selected-bounding-volume" && B.boundingVolumeDebugObject && this.debugObjects.push(B.boundingVolumeDebugObject);
16311
- var O = (h = (f = B.content) === null || f === void 0 ? void 0 : f.data) === null || h === void 0 ? void 0 : h.object;
16312
- if (O) {
16313
- var _ = O.update(e, r, o, this, B, E);
16314
- if (H.push(B.id), _ && (m = !0), this.tileset.hasMixedContent && C.skipLevelOfDetail) {
16315
- if (!B.state.finalResolution) {
16316
- var N = this.cloneSkipBackfaceObject(O);
16317
- this.backfaceObjects.push(N);
16295
+ }), H && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
16296
+ }
16297
+ this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.debugObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), w.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(W, z) {
16298
+ return W.floor !== z.floor ? W.floor - z.floor : W.levelOfContent !== z.levelOfContent ? z.levelOfContent - W.levelOfContent : W.state.distanceToCamera !== z.state.distanceToCamera ? W.state.distanceToCamera - z.state.distanceToCamera : W.state.centerZDepth - z.state.centerZDepth;
16299
+ }), w.debug === "root-bounding-volume" && this.tileset.root.boundingVolumeDebugObject && this.debugObjects.push(this.tileset.root.boundingVolumeDebugObject);
16300
+ for (var M = [], P = 0, B = this.tileset.selectedTiles; P < B.length; P++) {
16301
+ var O = B[P];
16302
+ w.debug === "selected-bounding-volume" && O.boundingVolumeDebugObject && this.debugObjects.push(O.boundingVolumeDebugObject);
16303
+ var _ = (h = (f = O.content) === null || f === void 0 ? void 0 : f.data) === null || h === void 0 ? void 0 : h.object;
16304
+ if (_) {
16305
+ var N = _.update(e, r, o, this, O, E);
16306
+ if (M.push(O.id), N && (m = !0), this.tileset.hasMixedContent && w.skipLevelOfDetail) {
16307
+ if (!O.state.finalResolution) {
16308
+ var D = this.cloneSkipBackfaceObject(_);
16309
+ this.backfaceObjects.push(D);
16318
16310
  }
16319
- for (var D = B.state.selectionDepth, J = STENCIL_CONSTANT.TILE_MASK | D << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, K = THREE.GreaterEqualStencilFunc, Q = STENCIL_CONSTANT.SKIP_LOD_MASK, U = THREE.ReplaceStencilOp, q = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, X = 0, Z = O.materials; X < Z.length; X++) {
16320
- var W = Z[X];
16321
- W.stencilWrite = !0, W.stencilRef = J, W.stencilFunc = K, W.stencilFuncMask = Q, W.stencilZPass = U, W.stencilWriteMask = q;
16311
+ for (var G = O.state.selectionDepth, K = STENCIL_CONSTANT.TILE_MASK | G << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, J = THREE.GreaterEqualStencilFunc, Q = STENCIL_CONSTANT.SKIP_LOD_MASK, U = THREE.ReplaceStencilOp, X = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, j = 0, $ = _.materials; j < $.length; j++) {
16312
+ var q = $[j];
16313
+ q.stencilWrite = !0, q.stencilRef = K, q.stencilFunc = J, q.stencilFuncMask = Q, q.stencilZPass = U, q.stencilWriteMask = X;
16322
16314
  }
16323
16315
  } else
16324
- for (var G = 0, ne = O.materials; G < ne.length; G++) {
16325
- var W = ne[G];
16326
- W.stencilWrite = !1, W.stencilRef = STENCIL_CONSTANT.TILE_MASK, W.stencilFunc = THREE.AlwaysStencilFunc, W.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, W.stencilZPass = THREE.ReplaceStencilOp, W.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16316
+ for (var re = 0, Y = _.materials; re < Y.length; re++) {
16317
+ var q = Y[re];
16318
+ q.stencilWrite = !1, q.stencilRef = STENCIL_CONSTANT.TILE_MASK, q.stencilFunc = THREE.AlwaysStencilFunc, q.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, q.stencilZPass = THREE.ReplaceStencilOp, q.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16327
16319
  }
16328
- this.tileObjects.push(O);
16329
- }
16330
- }
16331
- var $ = H.toString();
16332
- tileVersionMap.get(this) !== $ && (tileVersionMap.set(this, $), m = !0), C.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), C.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16333
- for (var ee = [], re = 0, le = this.tileset.selectedTrajectories; re < le.length; re++) {
16334
- var ie = le[re], oe = (p = ie.content.data) === null || p === void 0 ? void 0 : p.object;
16335
- if (oe) {
16336
- var _ = oe.update(e, r, o, this, ie, E);
16337
- ee.push(ie.id), _ && (m = !0), this.renderObjects.push(oe);
16338
- }
16339
- }
16340
- var se = ee.toString();
16341
- trajectoryVersionMap.get(this) !== se && (trajectoryVersionMap.set(this, se), m = !0), C.debug && (c = this.renderObjects).push.apply(c, this.debugObjects);
16342
- for (var de = Math.min(0, ((A = (g = this.parent) === null || g === void 0 ? void 0 : g.children) !== null && A !== void 0 ? A : []).indexOf(this)), he = de * 1e4, Re = function(j) {
16343
- var te = ce.renderObjects[j], V = j + he;
16344
- te.traverse(function(be) {
16345
- (be instanceof THREE.Mesh || be instanceof THREE.Line || be instanceof THREE.Points) && (be.renderOrder = V);
16346
- }), ce.add(te);
16347
- }, ce = this, Ce = 0; Ce < this.renderObjects.length; Ce++)
16348
- Re(Ce);
16320
+ this.tileObjects.push(_);
16321
+ }
16322
+ }
16323
+ var ee = M.toString();
16324
+ tileVersionMap.get(this) !== ee && (tileVersionMap.set(this, ee), m = !0), w.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), w.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16325
+ for (var ne = [], le = 0, ie = this.tileset.selectedTrajectories; le < ie.length; le++) {
16326
+ var se = ie[le], ae = (p = se.content.data) === null || p === void 0 ? void 0 : p.object;
16327
+ if (ae) {
16328
+ var N = ae.update(e, r, o, this, se, E);
16329
+ ne.push(se.id), N && (m = !0), this.renderObjects.push(ae);
16330
+ }
16331
+ }
16332
+ var fe = ne.toString();
16333
+ trajectoryVersionMap.get(this) !== fe && (trajectoryVersionMap.set(this, fe), m = !0), w.debug && (c = this.renderObjects).push.apply(c, this.debugObjects);
16334
+ for (var he = Math.min(0, ((A = (g = this.parent) === null || g === void 0 ? void 0 : g.children) !== null && A !== void 0 ? A : []).indexOf(this)), xe = he * 1e4, de = function(W) {
16335
+ var z = Re.renderObjects[W], Ce = W + xe;
16336
+ z.traverse(function(ce) {
16337
+ (ce instanceof THREE.Mesh || ce instanceof THREE.Line || ce instanceof THREE.Points) && (ce.renderOrder = Ce);
16338
+ }), Re.add(z);
16339
+ }, Re = this, te = 0; te < this.renderObjects.length; te++)
16340
+ de(te);
16349
16341
  return m;
16350
16342
  }, t.prototype.dispose = function() {
16351
16343
  this.disposed = !0, this.tileset.reset(), /^blob\:/.test(this.tileset.id) && URL.revokeObjectURL(this.tileset.id), this.remove.apply(this, this.children), this.refined = !1, this.loaded = !1, this.refineProgress[0] = this.refineProgress[1] = 0;
@@ -16547,19 +16539,6 @@ var scratchVector3$3 = new THREE.Vector3(), scratchSphereBoundingVolume = new Sp
16547
16539
  },
16548
16540
  enumerable: !1,
16549
16541
  configurable: !0
16550
- }), Object.defineProperty(t.prototype, "loadAll", {
16551
- /**
16552
- * @deprecated
16553
- * use `.parameter.loadAll` `.parameter.set('loadAll', loadAll)` instend
16554
- */
16555
- get: function() {
16556
- return this.parameter.resolveValue().loadAll;
16557
- },
16558
- set: function(e) {
16559
- this.parameter.set("loadAll", e);
16560
- },
16561
- enumerable: !1,
16562
- configurable: !0
16563
16542
  }), Object.defineProperty(t.prototype, "maxMemoryUsage", {
16564
16543
  /**
16565
16544
  * @deprecated
@@ -16909,10 +16888,10 @@ function parse(n, t, e) {
16909
16888
  var P = verify(w);
16910
16889
  if (P instanceof Error)
16911
16890
  return P;
16912
- Array.isArray(t.transform) ? e.transform.fromArray(t.transform) : t.transform && e.transform.copy(t.transform), n = w.map(function(j) {
16913
- return JSON.parse(j);
16914
- }).reduce(function(j, te) {
16915
- return deepMerge(j, te);
16891
+ Array.isArray(t.transform) ? e.transform.fromArray(t.transform) : t.transform && e.transform.copy(t.transform), n = w.map(function(te) {
16892
+ return JSON.parse(te);
16893
+ }).reduce(function(te, W) {
16894
+ return deepMerge(te, W);
16916
16895
  }), defineProperty(e, "raw", {
16917
16896
  configurable: !1,
16918
16897
  get: function() {
@@ -16971,31 +16950,31 @@ function parse(n, t, e) {
16971
16950
  return D;
16972
16951
  }
16973
16952
  });
16974
- var J;
16975
- n.model.textureBase ? J = textureURL$1(_, "", n.model.textureBase, t) : n.model.material_base_url ? J = textureURL$1(_, "", n.model.material_base_url, t) : N.file && (J = N.file.split("/").slice(0, -1).join("/").replace("/model/", "/materials/")), defineProperty(N, "textureBase", {
16953
+ var G;
16954
+ n.model.textureBase ? G = textureURL$1(_, "", n.model.textureBase, t) : n.model.material_base_url ? G = textureURL$1(_, "", n.model.material_base_url, t) : N.file && (G = N.file.split("/").slice(0, -1).join("/").replace("/model/", "/materials/")), defineProperty(N, "textureBase", {
16976
16955
  configurable: !1,
16977
16956
  get: function() {
16978
- return J;
16957
+ return G;
16979
16958
  }
16980
16959
  });
16981
16960
  var K;
16982
- Array.isArray(n.model.textures) ? (K = n.model.textures.map(function(j) {
16983
- var te, V;
16984
- return textureURL$1(_, j, (V = (te = n.model.textureBase) !== null && te !== void 0 ? te : n.model.material_base_url) !== null && V !== void 0 ? V : "", t);
16985
- }), Object.freeze(K)) : Array.isArray(n.model.material_textures) && (K = n.model.material_textures.map(function(j) {
16986
- var te, V;
16987
- return textureURL$1(_, j, (V = (te = n.model.textureBase) !== null && te !== void 0 ? te : n.model.material_base_url) !== null && V !== void 0 ? V : "", t);
16961
+ Array.isArray(n.model.textures) ? (K = n.model.textures.map(function(te) {
16962
+ var W, z;
16963
+ return textureURL$1(_, te, (z = (W = n.model.textureBase) !== null && W !== void 0 ? W : n.model.material_base_url) !== null && z !== void 0 ? z : "", t);
16964
+ }), Object.freeze(K)) : Array.isArray(n.model.material_textures) && (K = n.model.material_textures.map(function(te) {
16965
+ var W, z;
16966
+ return textureURL$1(_, te, (z = (W = n.model.textureBase) !== null && W !== void 0 ? W : n.model.material_base_url) !== null && z !== void 0 ? z : "", t);
16988
16967
  }), Object.freeze(K)), defineProperty(N, "textures", {
16989
16968
  configurable: !1,
16990
16969
  get: function() {
16991
16970
  return K;
16992
16971
  }
16993
16972
  });
16994
- var Q = [];
16973
+ var J = [];
16995
16974
  if (Array.isArray(n.model.tiles))
16996
- for (var U = 0, q = n.model.tiles; U < q.length; U++) {
16997
- var X = q[U];
16998
- X && (X.tileset || X.tileset_url) && Q.push(Object.freeze({
16975
+ for (var Q = 0, U = n.model.tiles; Q < U.length; Q++) {
16976
+ var X = U[Q];
16977
+ X && (X.tileset || X.tileset_url) && J.push(Object.freeze({
16999
16978
  type: (s = X.type) !== null && s !== void 0 ? s : "mesh",
17000
16979
  name: (u = X.name) !== null && u !== void 0 ? u : "",
17001
16980
  upAxis: (c = (l = X.upAxis) !== null && l !== void 0 ? l : X.up_axis) !== null && c !== void 0 ? c : "-Y",
@@ -17003,26 +16982,26 @@ function parse(n, t, e) {
17003
16982
  }));
17004
16983
  }
17005
16984
  else
17006
- n.model.tiles && (n.model.tiles.tileset || n.model.tiles.tileset_url) && Q.push(Object.freeze({
16985
+ n.model.tiles && (n.model.tiles.tileset || n.model.tiles.tileset_url) && J.push(Object.freeze({
17007
16986
  type: (d = n.model.tiles.type) !== null && d !== void 0 ? d : "mesh",
17008
16987
  name: (f = n.model.tiles.name) !== null && f !== void 0 ? f : "lod",
17009
16988
  upAxis: (p = (h = n.model.tiles.upAxis) !== null && h !== void 0 ? h : n.model.tiles.up_axis) !== null && p !== void 0 ? p : "-Y",
17010
16989
  tileset: fileURL(_, n.model.tiles.tileset || n.model.tiles.tileset_url, t)
17011
16990
  }));
17012
16991
  if (Array.isArray(n.model.layers))
17013
- for (var Z = 0, W = n.model.layers; Z < W.length; Z++) {
17014
- var G = W[Z];
17015
- G && (G.tileset || G.tileset_url) && Q.push(Object.freeze({
17016
- type: (g = G.type) !== null && g !== void 0 ? g : "mesh",
17017
- name: (A = G.name) !== null && A !== void 0 ? A : "",
17018
- upAxis: (m = G.upAxis) !== null && m !== void 0 ? m : G.up_axis,
17019
- tileset: fileURL(_, G.tileset || G.tileset_url, t)
16992
+ for (var j = 0, $ = n.model.layers; j < $.length; j++) {
16993
+ var q = $[j];
16994
+ q && (q.tileset || q.tileset_url) && J.push(Object.freeze({
16995
+ type: (g = q.type) !== null && g !== void 0 ? g : "mesh",
16996
+ name: (A = q.name) !== null && A !== void 0 ? A : "",
16997
+ upAxis: (m = q.upAxis) !== null && m !== void 0 ? m : q.up_axis,
16998
+ tileset: fileURL(_, q.tileset || q.tileset_url, t)
17020
16999
  }));
17021
17000
  }
17022
- Object.freeze(Q), defineProperty(N, "layers", {
17001
+ Object.freeze(J), defineProperty(N, "layers", {
17023
17002
  configurable: !1,
17024
17003
  get: function() {
17025
- return Q;
17004
+ return J;
17026
17005
  }
17027
17006
  }), defineProperty(e, "model", {
17028
17007
  configurable: !1,
@@ -17034,14 +17013,14 @@ function parse(n, t, e) {
17034
17013
  }
17035
17014
  if (P instanceof Error)
17036
17015
  return P;
17037
- var ne = /* @__PURE__ */ new Set(), $ = /* @__PURE__ */ new Set();
17016
+ var re = /* @__PURE__ */ new Set(), Y = /* @__PURE__ */ new Set();
17038
17017
  {
17039
17018
  var ee = [];
17040
17019
  if (n.observers && Array.isArray(n.observers)) {
17041
- var re = [];
17042
- n.panorama && (Array.isArray(n.panorama) ? re = n.panorama : Array.isArray(n.panorama.list) ? re = n.panorama.list : Array.isArray(n.panorama.info) && (re = n.panorama.info));
17043
- for (var le = function(j) {
17044
- var te = {
17020
+ var ne = [];
17021
+ n.panorama && (Array.isArray(n.panorama) ? ne = n.panorama : Array.isArray(n.panorama.list) ? ne = n.panorama.list : Array.isArray(n.panorama.info) && (ne = n.panorama.info));
17022
+ for (var le = function(te) {
17023
+ var W = {
17045
17024
  getResolvedPosition: function(Ee) {
17046
17025
  return Ee.copy(this.position).applyMatrix4(this.work.transform), Ee;
17047
17026
  },
@@ -17054,107 +17033,107 @@ function parse(n, t, e) {
17054
17033
  getResolvedMatrix: function(Ee) {
17055
17034
  return Ee.copy(this.matrix).premultiply(this.work.transform), Ee;
17056
17035
  }
17057
- }, V = n.observers[j];
17058
- if (!V)
17036
+ }, z = n.observers[te];
17037
+ if (!z)
17059
17038
  return "break";
17060
- var be = re[j];
17061
- if (!be)
17039
+ var Ce = ne[te];
17040
+ if (!Ce)
17062
17041
  return "break";
17063
- V = Object.assign({}, V, be, {
17042
+ z = Object.assign({}, z, Ce, {
17064
17043
  // 处理 active
17065
17044
  // observer.active | panorama.active 有一个 false 则为 false
17066
- active: V.active !== !1 && be.active !== !1
17067
- }), defineProperty(te, "work", {
17045
+ active: z.active !== !1 && Ce.active !== !1
17046
+ }), defineProperty(W, "work", {
17068
17047
  configurable: !1,
17069
17048
  get: function() {
17070
17049
  return e;
17071
17050
  }
17072
- }), defineProperty(te, "index", {
17051
+ }), defineProperty(W, "index", {
17073
17052
  configurable: !1,
17074
17053
  get: function() {
17075
- return j;
17054
+ return te;
17076
17055
  }
17077
- }), $.add(j), defineProperty(te, "panoIndex", {
17056
+ }), Y.add(te), defineProperty(W, "panoIndex", {
17078
17057
  configurable: !1,
17079
17058
  get: function() {
17080
- return j;
17059
+ return te;
17081
17060
  }
17082
17061
  });
17083
- var fe = panoStringify({
17062
+ var ce = panoStringify({
17084
17063
  workCode: e.workCode,
17085
- panoIndex: j
17064
+ panoIndex: te
17086
17065
  });
17087
- ne.add(fe), defineProperty(te, "panoId", {
17066
+ re.add(ce), defineProperty(W, "panoId", {
17088
17067
  configurable: !1,
17089
17068
  get: function() {
17090
- return fe;
17069
+ return ce;
17091
17070
  }
17092
17071
  });
17093
17072
  var ve = Object.freeze({
17094
17073
  workCode: e.workCode,
17095
- panoIndex: j
17074
+ panoIndex: te
17096
17075
  });
17097
- defineProperty(te, "pano", {
17076
+ defineProperty(W, "pano", {
17098
17077
  configurable: !1,
17099
17078
  get: function() {
17100
17079
  return ve;
17101
17080
  }
17102
17081
  });
17103
- var Ve = V.active !== !1;
17104
- defineProperty(te, "active", {
17082
+ var Ve = z.active !== !1;
17083
+ defineProperty(W, "active", {
17105
17084
  configurable: !1,
17106
17085
  get: function() {
17107
17086
  return Ve;
17108
17087
  }
17109
17088
  });
17110
- var rt = V.loadable === !0;
17111
- defineProperty(te, "loadable", {
17089
+ var rt = z.loadable === !0;
17090
+ defineProperty(W, "loadable", {
17112
17091
  configurable: !1,
17113
17092
  get: function() {
17114
17093
  return rt;
17115
17094
  }
17116
17095
  });
17117
- var We = V.derived_id;
17118
- defineProperty(te, "derivedId", {
17096
+ var We = z.derived_id;
17097
+ defineProperty(W, "derivedId", {
17119
17098
  configurable: !1,
17120
17099
  get: function() {
17121
17100
  return We;
17122
17101
  }
17123
17102
  });
17124
- var me = V.derived_id_str;
17125
- defineProperty(te, "derivedIdStr", {
17103
+ var me = z.derived_id_str;
17104
+ defineProperty(W, "derivedIdStr", {
17126
17105
  configurable: !1,
17127
17106
  get: function() {
17128
17107
  return me;
17129
17108
  }
17130
17109
  });
17131
- var ae = (S = (b = (v = (E = n.panorama) === null || E === void 0 ? void 0 : E.pano_high_cube_base_url) !== null && v !== void 0 ? v : (y = n.panorama) === null || y === void 0 ? void 0 : y.pano_cube_base_url) !== null && b !== void 0 ? b : (T = n.panorama) === null || T === void 0 ? void 0 : T.base_url) !== null && S !== void 0 ? S : "", pe = {
17132
- up: panoURL(_, ae, V.images ? V.images.up : V.up, j, t),
17133
- down: panoURL(_, ae, V.images ? V.images.down : V.down, j, t),
17134
- right: panoURL(_, ae, V.images ? V.images.right : V.right, j, t),
17135
- left: panoURL(_, ae, V.images ? V.images.left : V.left, j, t),
17136
- front: panoURL(_, ae, V.images ? V.images.front : V.front, j, t),
17137
- back: panoURL(_, ae, V.images ? V.images.back : V.back, j, t)
17110
+ var oe = (S = (b = (v = (E = n.panorama) === null || E === void 0 ? void 0 : E.pano_high_cube_base_url) !== null && v !== void 0 ? v : (y = n.panorama) === null || y === void 0 ? void 0 : y.pano_cube_base_url) !== null && b !== void 0 ? b : (T = n.panorama) === null || T === void 0 ? void 0 : T.base_url) !== null && S !== void 0 ? S : "", pe = {
17111
+ up: panoURL(_, oe, z.images ? z.images.up : z.up, te, t),
17112
+ down: panoURL(_, oe, z.images ? z.images.down : z.down, te, t),
17113
+ right: panoURL(_, oe, z.images ? z.images.right : z.right, te, t),
17114
+ left: panoURL(_, oe, z.images ? z.images.left : z.left, te, t),
17115
+ front: panoURL(_, oe, z.images ? z.images.front : z.front, te, t),
17116
+ back: panoURL(_, oe, z.images ? z.images.back : z.back, te, t)
17138
17117
  };
17139
- if (V.size_list)
17140
- pe.sizeList = V.size_list.slice();
17118
+ if (z.size_list)
17119
+ pe.sizeList = z.size_list.slice();
17141
17120
  else {
17142
17121
  var Me = getImageSizeFromURL(pe.up);
17143
- if (Me && (pe.sizeList = [Me], V.tiles))
17144
- for (var Se = V.tiles.slice().sort(function(Ee, $e) {
17122
+ if (Me && (pe.sizeList = [Me], z.tiles))
17123
+ for (var Te = z.tiles.slice().sort(function(Ee, $e) {
17145
17124
  return Ee - $e;
17146
17125
  }).map(function(Ee) {
17147
17126
  return 512 * Math.pow(2, Ee);
17148
- }), Pe = 0, Fe = Se; Pe < Fe.length; Pe++) {
17127
+ }), Pe = 0, Fe = Te; Pe < Fe.length; Pe++) {
17149
17128
  var Ae = Fe[Pe];
17150
17129
  Ae > Me && pe.sizeList.push(Ae);
17151
17130
  }
17152
17131
  }
17153
- var Te = void 0;
17154
- if (V.images)
17155
- Te = V.images.tiles;
17156
- else if (Array.isArray(V.size_list)) {
17157
- var Ie = V.size_list.slice().sort(function(Ee, $e) {
17132
+ var be = void 0;
17133
+ if (z.images)
17134
+ be = z.images.tiles;
17135
+ else if (Array.isArray(z.size_list)) {
17136
+ var Ie = z.size_list.slice().sort(function(Ee, $e) {
17158
17137
  return Ee - $e;
17159
17138
  });
17160
17139
  if (Ie[0]) {
@@ -17162,13 +17141,13 @@ function parse(n, t, e) {
17162
17141
  if (Be)
17163
17142
  for (var qe = Be - 1; qe >= 0; qe--)
17164
17143
  Ie.unshift(512 * Math.pow(2, qe));
17165
- Te = Ie;
17144
+ be = Ie;
17166
17145
  }
17167
- } else if (Array.isArray(V.tiles)) {
17168
- if (Te = V.tiles.slice(), typeof Te[0] == "number") {
17169
- for (var ke = Te[0]; --ke >= 0; )
17170
- Te.unshift(ke);
17171
- Te = Te.sort(function(Ee, $e) {
17146
+ } else if (Array.isArray(z.tiles)) {
17147
+ if (be = z.tiles.slice(), typeof be[0] == "number") {
17148
+ for (var ke = be[0]; --ke >= 0; )
17149
+ be.unshift(ke);
17150
+ be = be.sort(function(Ee, $e) {
17172
17151
  return Ee - $e;
17173
17152
  }).map(function(Ee) {
17174
17153
  return 512 * Math.pow(2, Ee);
@@ -17183,11 +17162,11 @@ function parse(n, t, e) {
17183
17162
  if (Be)
17184
17163
  for (var qe = Be - 1; qe >= 0; qe--)
17185
17164
  Ie.unshift(512 * Math.pow(2, qe));
17186
- Te = Ie;
17165
+ be = Ie;
17187
17166
  }
17188
17167
  }
17189
- if (Te) {
17190
- for (var Ne = [], _e = 0, Ue = Te; _e < Ue.length; _e++) {
17168
+ if (be) {
17169
+ for (var Ne = [], _e = 0, Ue = be; _e < Ue.length; _e++) {
17191
17170
  var Ae = Ue[_e];
17192
17171
  if (typeof Ae == "number") {
17193
17172
  var De = getTileLevel(Ae);
@@ -17197,11 +17176,11 @@ function parse(n, t, e) {
17197
17176
  if (!je)
17198
17177
  continue;
17199
17178
  if (Ae > je) {
17200
- var xe = replaceImageSize(pe.up, Ae), Oe = replaceImageSize(pe.down, Ae), we = replaceImageSize(pe.right, Ae), Le = replaceImageSize(pe.left, Ae), He = replaceImageSize(pe.front, Ae), Ge = replaceImageSize(pe.back, Ae);
17201
- Ne.push(Object.freeze({ level: De, size: Ae, scale: 1, up: xe, down: Oe, right: we, left: Le, front: He, back: Ge }));
17179
+ var Se = replaceImageSize(pe.up, Ae), Oe = replaceImageSize(pe.down, Ae), we = replaceImageSize(pe.right, Ae), Le = replaceImageSize(pe.left, Ae), He = replaceImageSize(pe.front, Ae), Ge = replaceImageSize(pe.back, Ae);
17180
+ Ne.push(Object.freeze({ level: De, size: Ae, scale: 1, up: Se, down: Oe, right: we, left: Le, front: He, back: Ge }));
17202
17181
  } else {
17203
- var xe = pe.up, Oe = pe.down, we = pe.right, Le = pe.left, He = pe.front, Ge = pe.back;
17204
- Ne.push(Object.freeze({ level: De, size: je, scale: Ae / je, up: xe, down: Oe, right: we, left: Le, front: He, back: Ge }));
17182
+ var Se = pe.up, Oe = pe.down, we = pe.right, Le = pe.left, He = pe.front, Ge = pe.back;
17183
+ Ne.push(Object.freeze({ level: De, size: je, scale: Ae / je, up: Se, down: Oe, right: we, left: Le, front: He, back: Ge }));
17205
17184
  }
17206
17185
  } else {
17207
17186
  var De = Ae.level;
@@ -17210,8 +17189,8 @@ function parse(n, t, e) {
17210
17189
  var Me = Ae.size;
17211
17190
  if (typeof Me != "number")
17212
17191
  continue;
17213
- var xe = panoURL(_, ae, Ae.up, j, t), Oe = panoURL(_, ae, Ae.down, j, t), we = panoURL(_, ae, Ae.right, j, t), Le = panoURL(_, ae, Ae.left, j, t), He = panoURL(_, ae, Ae.front, j, t), Ge = panoURL(_, ae, Ae.back, j, t);
17214
- Ne.push(Object.freeze({ level: De, size: Me, scale: (R = Ae.scale) !== null && R !== void 0 ? R : 1, up: xe, down: Oe, right: we, left: Le, front: He, back: Ge }));
17192
+ var Se = panoURL(_, oe, Ae.up, te, t), Oe = panoURL(_, oe, Ae.down, te, t), we = panoURL(_, oe, Ae.right, te, t), Le = panoURL(_, oe, Ae.left, te, t), He = panoURL(_, oe, Ae.front, te, t), Ge = panoURL(_, oe, Ae.back, te, t);
17193
+ Ne.push(Object.freeze({ level: De, size: Me, scale: (R = Ae.scale) !== null && R !== void 0 ? R : 1, up: Se, down: Oe, right: we, left: Le, front: He, back: Ge }));
17215
17194
  }
17216
17195
  }
17217
17196
  Ne = sortTile(Ne), Object.freeze(Ne), defineProperty(pe, "tiles", {
@@ -17221,191 +17200,191 @@ function parse(n, t, e) {
17221
17200
  }
17222
17201
  });
17223
17202
  }
17224
- Object.freeze(pe), defineProperty(te, "images", {
17203
+ Object.freeze(pe), defineProperty(W, "images", {
17225
17204
  configurable: !1,
17226
17205
  get: function() {
17227
17206
  return pe;
17228
17207
  }
17229
17208
  });
17230
17209
  var Ze = new THREE.Vector3();
17231
- if (V.position instanceof THREE.Vector3)
17232
- Ze.copy(V.position);
17233
- else if (Array.isArray(V.position))
17234
- Ze.fromArray(V.position);
17210
+ if (z.position instanceof THREE.Vector3)
17211
+ Ze.copy(z.position);
17212
+ else if (Array.isArray(z.position))
17213
+ Ze.fromArray(z.position);
17235
17214
  else
17236
17215
  return "break";
17237
- Object.freeze(Ze), e.observerBox.expandByPoint(Ze), defineProperty(te, "position", {
17216
+ Object.freeze(Ze), e.observerBox.expandByPoint(Ze), defineProperty(W, "position", {
17238
17217
  configurable: !1,
17239
17218
  get: function() {
17240
17219
  return Ze;
17241
17220
  }
17242
17221
  });
17243
17222
  var Ye = new THREE.Vector3();
17244
- if (V.standingPosition instanceof THREE.Vector3)
17245
- Ye.copy(V.standingPosition);
17246
- else if (Array.isArray(V.standingPosition))
17247
- Ye.fromArray(V.standingPosition);
17248
- else if (V.standing_position instanceof THREE.Vector3)
17249
- Ye.copy(V.standing_position);
17250
- else if (Array.isArray(V.standing_position))
17251
- Ye.fromArray(V.standing_position);
17223
+ if (z.standingPosition instanceof THREE.Vector3)
17224
+ Ye.copy(z.standingPosition);
17225
+ else if (Array.isArray(z.standingPosition))
17226
+ Ye.fromArray(z.standingPosition);
17227
+ else if (z.standing_position instanceof THREE.Vector3)
17228
+ Ye.copy(z.standing_position);
17229
+ else if (Array.isArray(z.standing_position))
17230
+ Ye.fromArray(z.standing_position);
17252
17231
  else
17253
17232
  return "break";
17254
- Object.freeze(Ye), e.observerBox.expandByPoint(Ye), defineProperty(te, "standingPosition", {
17233
+ Object.freeze(Ye), e.observerBox.expandByPoint(Ye), defineProperty(W, "standingPosition", {
17255
17234
  configurable: !1,
17256
17235
  get: function() {
17257
17236
  return Ye;
17258
17237
  }
17259
17238
  });
17260
17239
  var Qe = new THREE.Quaternion();
17261
- if (V.quaternion instanceof THREE.Quaternion)
17262
- Qe.copy(V.quaternion);
17263
- else if (Array.isArray(V.quaternion))
17264
- Qe.fromArray(V.quaternion);
17265
- else if (V.quaternion) {
17266
- var ye = V.quaternion, Mt = ye.x, vt = ye.y, at = ye.z, Je = ye.w;
17240
+ if (z.quaternion instanceof THREE.Quaternion)
17241
+ Qe.copy(z.quaternion);
17242
+ else if (Array.isArray(z.quaternion))
17243
+ Qe.fromArray(z.quaternion);
17244
+ else if (z.quaternion) {
17245
+ var ye = z.quaternion, Mt = ye.x, vt = ye.y, at = ye.z, Je = ye.w;
17267
17246
  Qe.set(Mt, vt, at, Je);
17268
17247
  } else
17269
17248
  return "break";
17270
- Object.freeze(Qe), defineProperty(te, "quaternion", {
17249
+ Object.freeze(Qe), defineProperty(W, "quaternion", {
17271
17250
  configurable: !1,
17272
17251
  get: function() {
17273
17252
  return Qe;
17274
17253
  }
17275
17254
  });
17276
17255
  var dt = new THREE.Matrix4().compose(Ze, Qe, PANO_TEXTURE_SCALE);
17277
- Object.freeze(dt), defineProperty(te, "matrix", {
17256
+ Object.freeze(dt), defineProperty(W, "matrix", {
17278
17257
  configurable: !1,
17279
17258
  get: function() {
17280
17259
  return dt;
17281
17260
  }
17282
17261
  });
17283
17262
  var nt = 0;
17284
- isNumber(V.floorIndex) ? nt = V.floorIndex : isNumber(V.floor_index) ? nt = V.floor_index : isNumber(V.floor) && (nt = V.floor), defineProperty(te, "floorIndex", {
17263
+ isNumber(z.floorIndex) ? nt = z.floorIndex : isNumber(z.floor_index) ? nt = z.floor_index : isNumber(z.floor) && (nt = z.floor), defineProperty(W, "floorIndex", {
17285
17264
  configurable: !1,
17286
17265
  get: function() {
17287
17266
  return nt;
17288
17267
  }
17289
17268
  });
17290
17269
  var Ke;
17291
- V.video && (Ke = {
17270
+ z.video && (Ke = {
17292
17271
  source: "",
17293
17272
  matrix: new THREE.Matrix4(),
17294
17273
  size: new THREE.Vector2()
17295
- }, typeof V.video.source == "string" && (Ke.source = V.video.source), V.video.matrix instanceof THREE.Matrix4 ? Ke.matrix.copy(V.video.matrix) : Array.isArray(V.video.matrix) && Ke.matrix.fromArray(V.video.matrix), V.video.size instanceof THREE.Vector2 ? Ke.size.copy(V.video.size) : Array.isArray(V.video.size) && Ke.size.fromArray(V.video.size), Object.freeze(Ke)), defineProperty(te, "video", {
17274
+ }, typeof z.video.source == "string" && (Ke.source = z.video.source), z.video.matrix instanceof THREE.Matrix4 ? Ke.matrix.copy(z.video.matrix) : Array.isArray(z.video.matrix) && Ke.matrix.fromArray(z.video.matrix), z.video.size instanceof THREE.Vector2 ? Ke.size.copy(z.video.size) : Array.isArray(z.video.size) && Ke.size.fromArray(z.video.size), Object.freeze(Ke)), defineProperty(W, "video", {
17296
17275
  configurable: !1,
17297
17276
  get: function() {
17298
17277
  return Ke;
17299
17278
  }
17300
- }), Array.isArray(V.accessibleNodes) ? (te.accessibleNodes = V.accessibleNodes.slice(), te.accessibleIds = V.accessibleNodes.map(function(Ee) {
17279
+ }), Array.isArray(z.accessibleNodes) ? (W.accessibleNodes = z.accessibleNodes.slice(), W.accessibleIds = z.accessibleNodes.map(function(Ee) {
17301
17280
  return panoStringify({
17302
17281
  workCode: e.workCode,
17303
17282
  panoIndex: Ee
17304
17283
  });
17305
- })) : Array.isArray(V.accessible_nodes) && (te.accessibleNodes = V.accessible_nodes.slice(), te.accessibleIds = V.accessible_nodes.map(function(Ee) {
17284
+ })) : Array.isArray(z.accessible_nodes) && (W.accessibleNodes = z.accessible_nodes.slice(), W.accessibleIds = z.accessible_nodes.map(function(Ee) {
17306
17285
  return panoStringify({
17307
17286
  workCode: e.workCode,
17308
17287
  panoIndex: Ee
17309
17288
  });
17310
- })), Array.isArray(V.visibleNodes) ? (te.visibleNodes = V.visibleNodes.slice(), te.visibleIds = V.visibleNodes.map(function(Ee) {
17289
+ })), Array.isArray(z.visibleNodes) ? (W.visibleNodes = z.visibleNodes.slice(), W.visibleIds = z.visibleNodes.map(function(Ee) {
17311
17290
  return panoStringify({
17312
17291
  workCode: e.workCode,
17313
17292
  panoIndex: Ee
17314
17293
  });
17315
- })) : Array.isArray(V.visible_nodes) && (te.visibleNodes = V.visible_nodes.slice(), te.visibleIds = V.visible_nodes.map(function(Ee) {
17294
+ })) : Array.isArray(z.visible_nodes) && (W.visibleNodes = z.visible_nodes.slice(), W.visibleIds = z.visible_nodes.map(function(Ee) {
17316
17295
  return panoStringify({
17317
17296
  workCode: e.workCode,
17318
17297
  panoIndex: Ee
17319
17298
  });
17320
- })), ee[j] = te;
17299
+ })), ee[te] = W;
17321
17300
  }, ie = 0; ie < n.observers.length; ie++) {
17322
- var oe = le(ie);
17323
- if (oe === "break")
17301
+ var se = le(ie);
17302
+ if (se === "break")
17324
17303
  break;
17325
17304
  }
17326
17305
  }
17327
- for (var se = function(j) {
17328
- if (j.accessibleIds) {
17329
- var be = j.accessibleIds.filter(function(ae) {
17330
- return ne.has(ae);
17306
+ for (var ae = function(te) {
17307
+ if (te.accessibleIds) {
17308
+ var Ce = te.accessibleIds.filter(function(oe) {
17309
+ return re.has(oe);
17331
17310
  });
17332
- Object.freeze(be), defineProperty(j, "accessibleIds", {
17311
+ Object.freeze(Ce), defineProperty(te, "accessibleIds", {
17333
17312
  configurable: !1,
17334
17313
  get: function() {
17335
- return be;
17314
+ return Ce;
17336
17315
  }
17337
17316
  });
17338
17317
  } else {
17339
- for (var te = [], V = 0; V < ee.length; V++)
17340
- ee[V] !== j && (Math.abs(ee[V].position.y - j.position.y) > 3 || ee[V].position.distanceTo(j.position) > 10 || te.push(ee[V].panoId));
17341
- Object.freeze(te), defineProperty(j, "accessibleIds", {
17318
+ for (var W = [], z = 0; z < ee.length; z++)
17319
+ ee[z] !== te && (Math.abs(ee[z].position.y - te.position.y) > 3 || ee[z].position.distanceTo(te.position) > 10 || W.push(ee[z].panoId));
17320
+ Object.freeze(W), defineProperty(te, "accessibleIds", {
17342
17321
  configurable: !1,
17343
17322
  get: function() {
17344
- return te;
17323
+ return W;
17345
17324
  }
17346
17325
  });
17347
17326
  }
17348
- if (j.accessibleNodes) {
17349
- var ve = j.accessibleNodes.filter(function(ae) {
17350
- return $.has(ae);
17327
+ if (te.accessibleNodes) {
17328
+ var ve = te.accessibleNodes.filter(function(oe) {
17329
+ return Y.has(oe);
17351
17330
  });
17352
- Object.freeze(ve), defineProperty(j, "accessibleNodes", {
17331
+ Object.freeze(ve), defineProperty(te, "accessibleNodes", {
17353
17332
  configurable: !1,
17354
17333
  get: function() {
17355
17334
  return ve;
17356
17335
  }
17357
17336
  });
17358
17337
  } else {
17359
- for (var fe = [], V = 0; V < ee.length; V++)
17360
- ee[V] !== j && (Math.abs(ee[V].position.y - j.position.y) > 3 || ee[V].position.distanceTo(j.position) > 10 || fe.push(ee[V].panoIndex));
17361
- Object.freeze(fe), defineProperty(j, "accessibleNodes", {
17338
+ for (var ce = [], z = 0; z < ee.length; z++)
17339
+ ee[z] !== te && (Math.abs(ee[z].position.y - te.position.y) > 3 || ee[z].position.distanceTo(te.position) > 10 || ce.push(ee[z].panoIndex));
17340
+ Object.freeze(ce), defineProperty(te, "accessibleNodes", {
17362
17341
  configurable: !1,
17363
17342
  get: function() {
17364
- return fe;
17343
+ return ce;
17365
17344
  }
17366
17345
  });
17367
17346
  }
17368
- if (j.visibleIds) {
17369
- var rt = j.visibleIds.filter(function(ae) {
17370
- return ne.has(ae);
17347
+ if (te.visibleIds) {
17348
+ var rt = te.visibleIds.filter(function(oe) {
17349
+ return re.has(oe);
17371
17350
  });
17372
- Object.freeze(rt), defineProperty(j, "visibleIds", {
17351
+ Object.freeze(rt), defineProperty(te, "visibleIds", {
17373
17352
  configurable: !1,
17374
17353
  get: function() {
17375
17354
  return rt;
17376
17355
  }
17377
17356
  });
17378
17357
  } else {
17379
- var Ve = j.accessibleIds.slice();
17380
- Object.freeze(Ve), defineProperty(j, "visibleIds", {
17358
+ var Ve = te.accessibleIds.slice();
17359
+ Object.freeze(Ve), defineProperty(te, "visibleIds", {
17381
17360
  configurable: !1,
17382
17361
  get: function() {
17383
17362
  return Ve;
17384
17363
  }
17385
17364
  });
17386
17365
  }
17387
- if (j.visibleNodes) {
17388
- var me = j.visibleNodes.filter(function(ae) {
17389
- return $.has(ae);
17366
+ if (te.visibleNodes) {
17367
+ var me = te.visibleNodes.filter(function(oe) {
17368
+ return Y.has(oe);
17390
17369
  });
17391
- Object.freeze(me), defineProperty(j, "visibleNodes", {
17370
+ Object.freeze(me), defineProperty(te, "visibleNodes", {
17392
17371
  configurable: !1,
17393
17372
  get: function() {
17394
17373
  return me;
17395
17374
  }
17396
17375
  });
17397
17376
  } else {
17398
- var We = j.accessibleNodes.slice();
17399
- Object.freeze(We), defineProperty(j, "visibleNodes", {
17377
+ var We = te.accessibleNodes.slice();
17378
+ Object.freeze(We), defineProperty(te, "visibleNodes", {
17400
17379
  configurable: !1,
17401
17380
  get: function() {
17402
17381
  return We;
17403
17382
  }
17404
17383
  });
17405
17384
  }
17406
- }, de = 0, he = ee; de < he.length; de++) {
17407
- var Re = he[de];
17408
- se(Re);
17385
+ }, fe = 0, he = ee; fe < he.length; fe++) {
17386
+ var xe = he[fe];
17387
+ ae(xe);
17409
17388
  }
17410
17389
  Object.freeze(ee), defineProperty(e, "observers", {
17411
17390
  configurable: !1,
@@ -17418,15 +17397,15 @@ function parse(n, t, e) {
17418
17397
  return P;
17419
17398
  if (n.initial) {
17420
17399
  if ((n.initial.mode === "Panorama" && e.observers.length === 0 || n.initial.mode === "Floorplan" || n.initial.mode === "Topview" || n.initial.mode === "Model" || n.initial.mode === "Mapview" || n.initial.mode === "DepthPanorama") && (e.initial.mode = n.initial.mode), isNumber(n.initial.latitude) && (e.initial.latitude = n.initial.latitude), isNumber(n.initial.longitude) ? e.initial.longitude = n.initial.longitude : isNumber(n.initial.heading) && (e.initial.longitude = headingToLongitude(n.initial.heading)), isNumber(n.initial.fov) && (e.initial.fov = n.initial.fov), e.observers.length > 0) {
17421
- var ce = void 0;
17422
- isNumber(n.initial.panoIndex) ? ce = n.initial.panoIndex : isNumber(n.initial.pano_index) ? ce = n.initial.pano_index : isNumber(n.initial.pano) && (ce = n.initial.pano), typeof ce == "number" && (ce = clamp$1(ce, 0, e.observers.length - 1), e.initial.panoIndex = ce);
17400
+ var de = void 0;
17401
+ isNumber(n.initial.panoIndex) ? de = n.initial.panoIndex : isNumber(n.initial.pano_index) ? de = n.initial.pano_index : isNumber(n.initial.pano) && (de = n.initial.pano), typeof de == "number" && (de = clamp$1(de, 0, e.observers.length - 1), e.initial.panoIndex = de);
17423
17402
  }
17424
17403
  if (isNumber(n.initial.distance) && (e.initial.distance = n.initial.distance), Array.isArray(n.initial.offset)) {
17425
- var Ce = [0, 0, 0].map(function(j, te) {
17426
- var V = Number(n.initial.offset[te]);
17427
- return isNaN(V) || !isFinite(V) ? 0 : V;
17404
+ var Re = [0, 0, 0].map(function(te, W) {
17405
+ var z = Number(n.initial.offset[W]);
17406
+ return isNaN(z) || !isFinite(z) ? 0 : z;
17428
17407
  });
17429
- e.initial.offset = new THREE.Vector3().fromArray(Ce);
17408
+ e.initial.offset = new THREE.Vector3().fromArray(Re);
17430
17409
  } else typeof n.initial.offset == "object" && typeof n.initial.offset.x == "number" && typeof n.initial.offset.y == "number" && typeof n.initial.offset.z == "number" && (e.initial.offset = new THREE.Vector3(n.initial.offset.x, n.initial.offset.y, n.initial.offset.z));
17431
17410
  !e.initial.mode && typeof e.initial.panoIndex == "number" && (e.initial.mode = "Panorama");
17432
17411
  }
@@ -17940,10 +17919,10 @@ var BufferGeometryUtils = {
17940
17919
  for (var c = e.tangent.array, d = [], f = [], h = 0; h < l; h++)
17941
17920
  d[h] = new THREE.Vector3(), f[h] = new THREE.Vector3();
17942
17921
  var p = new THREE.Vector3(), g = new THREE.Vector3(), A = new THREE.Vector3(), m = new THREE.Vector2(), E = new THREE.Vector2(), v = new THREE.Vector2(), y = new THREE.Vector3(), b = new THREE.Vector3();
17943
- function T(Q, U, q) {
17944
- p.fromArray(o, Q * 3), g.fromArray(o, U * 3), A.fromArray(o, q * 3), m.fromArray(u, Q * 2), E.fromArray(u, U * 2), v.fromArray(u, q * 2);
17945
- var X = g.x - p.x, Z = A.x - p.x, W = g.y - p.y, G = A.y - p.y, ne = g.z - p.z, $ = A.z - p.z, ee = E.x - m.x, re = v.x - m.x, le = E.y - m.y, ie = v.y - m.y, oe = 1 / (ee * ie - re * le);
17946
- y.set((ie * X - le * Z) * oe, (ie * W - le * G) * oe, (ie * ne - le * $) * oe), b.set((ee * Z - re * X) * oe, (ee * G - re * W) * oe, (ee * $ - re * ne) * oe), d[Q].add(y), d[U].add(y), d[q].add(y), f[Q].add(b), f[U].add(b), f[q].add(b);
17922
+ function T(J, Q, U) {
17923
+ p.fromArray(o, J * 3), g.fromArray(o, Q * 3), A.fromArray(o, U * 3), m.fromArray(u, J * 2), E.fromArray(u, Q * 2), v.fromArray(u, U * 2);
17924
+ var X = g.x - p.x, j = A.x - p.x, $ = g.y - p.y, q = A.y - p.y, re = g.z - p.z, Y = A.z - p.z, ee = E.x - m.x, ne = v.x - m.x, le = E.y - m.y, ie = v.y - m.y, se = 1 / (ee * ie - ne * le);
17925
+ y.set((ie * X - le * j) * se, (ie * $ - le * q) * se, (ie * re - le * Y) * se), b.set((ee * j - ne * X) * se, (ee * q - ne * $) * se, (ee * Y - ne * re) * se), d[J].add(y), d[Q].add(y), d[U].add(y), f[J].add(b), f[Q].add(b), f[U].add(b);
17947
17926
  }
17948
17927
  var S = n.groups;
17949
17928
  S.length === 0 && (S = [{
@@ -17953,9 +17932,9 @@ var BufferGeometryUtils = {
17953
17932
  for (var h = 0, R = S.length; h < R; ++h)
17954
17933
  for (var C = S[h], w = C.start, L = C.count, H = w, M = w + L; H < M; H += 3)
17955
17934
  T(r[H + 0], r[H + 1], r[H + 2]);
17956
- var P = new THREE.Vector3(), B = new THREE.Vector3(), O = new THREE.Vector3(), _ = new THREE.Vector3(), N, D, J;
17957
- function K(Q) {
17958
- O.fromArray(s, Q * 3), _.copy(O), D = d[Q], P.copy(D), P.sub(O.multiplyScalar(O.dot(D))).normalize(), B.crossVectors(_, D), J = B.dot(f[Q]), N = J < 0 ? -1 : 1, c[Q * 4] = P.x, c[Q * 4 + 1] = P.y, c[Q * 4 + 2] = P.z, c[Q * 4 + 3] = N;
17935
+ var P = new THREE.Vector3(), B = new THREE.Vector3(), O = new THREE.Vector3(), _ = new THREE.Vector3(), N, D, G;
17936
+ function K(J) {
17937
+ O.fromArray(s, J * 3), _.copy(O), D = d[J], P.copy(D), P.sub(O.multiplyScalar(O.dot(D))).normalize(), B.crossVectors(_, D), G = B.dot(f[J]), N = G < 0 ? -1 : 1, c[J * 4] = P.x, c[J * 4 + 1] = P.y, c[J * 4 + 2] = P.z, c[J * 4 + 3] = N;
17959
17938
  }
17960
17939
  for (var h = 0, R = S.length; h < R; ++h)
17961
17940
  for (var C = S[h], w = C.start, L = C.count, H = w, M = w + L; H < M; H += 3)
@@ -18123,13 +18102,13 @@ function getEdgesBySphere(n, t, e) {
18123
18102
  var p = (f = (d = c.content) === null || d === void 0 ? void 0 : d.data) === null || f === void 0 ? void 0 : f.object;
18124
18103
  if (p && p.visible) {
18125
18104
  var g = [];
18126
- if (p.traverseVisible(function(U) {
18127
- if (U instanceof THREE.Mesh) {
18128
- var q = bvhMeshMap.get(U);
18129
- if (q) {
18130
- scratchMatrix4.copy(U.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
18131
- var X = q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), Z = new THREE.BufferGeometry();
18132
- Z.setAttribute("position", new THREE.BufferAttribute(X, 3)), Z.applyMatrix4(U.matrixWorld), Z = BufferGeometryUtils.mergeVertices(Z, 0.01), g.push(Z);
18105
+ if (p.traverseVisible(function(Q) {
18106
+ if (Q instanceof THREE.Mesh) {
18107
+ var U = bvhMeshMap.get(Q);
18108
+ if (U) {
18109
+ scratchMatrix4.copy(Q.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
18110
+ var X = U.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), j = new THREE.BufferGeometry();
18111
+ j.setAttribute("position", new THREE.BufferAttribute(X, 3)), j.applyMatrix4(Q.matrixWorld), j = BufferGeometryUtils.mergeVertices(j, 0.01), g.push(j);
18133
18112
  }
18134
18113
  }
18135
18114
  }), g.length === 0)
@@ -18148,10 +18127,10 @@ function getEdgesBySphere(n, t, e) {
18148
18127
  M[D] === void 0 ? M[D] = { index1: N[0], index2: N[1], face1: T } : M[D].face2 = T;
18149
18128
  }
18150
18129
  for (var D in M) {
18151
- var J = M[D];
18152
- if (J.face2 === void 0 || b[J.face1].normal.dot(b[J.face2].normal) <= r) {
18153
- var K = y[J.index1], Q = y[J.index2];
18154
- o.push(new THREE.Line3(K, Q));
18130
+ var G = M[D];
18131
+ if (G.face2 === void 0 || b[G.face1].normal.dot(b[G.face2].normal) <= r) {
18132
+ var K = y[G.index1], J = y[G.index2];
18133
+ o.push(new THREE.Line3(K, J));
18155
18134
  }
18156
18135
  }
18157
18136
  y.length = 0, b.length = 0;
@@ -18233,21 +18212,21 @@ var scratchBoundingBox$1 = new THREE.Box3(), scratchViewLayerBox = new THREE.Box
18233
18212
  }), s;
18234
18213
  }, t.prototype.update = function(e, r, o) {
18235
18214
  var s = !1;
18236
- this.needsRender === !0 && (this.needsRender = !1, s = !0);
18237
- var u = this.parameter.resolveValue(), l = this.loaded;
18215
+ this.needsRender === !0 && (this.needsRender = !1, s = !0), this.parameter.resolveValue();
18216
+ var u = this.loaded;
18238
18217
  this.refined = !this.metaPending, this.loaded = !this.metaPending, this.refineProgress[0] = this.refineProgress[1] = 0, this.work.transform.equals(this.matrix) || (this.matrix.copy(this.work.transform), this.matrix.decompose(this.position, this.quaternion, this.scale), s = !0);
18239
- for (var c = 0, d = this.children; c < d.length; c++) {
18240
- var f = d[c];
18241
- this.autoRefine === !1 ? f.autoRefine = !1 : f.autoRefine = u.progress <= 0.01 || u.progress >= 0.99;
18242
- var h = f.update(e, r, o, this);
18243
- h && (s = !0), f.refined === !1 && (this.refined = !1), f.loaded === !1 && (this.loaded = !1), this.refineProgress[0] += f.refineProgress[0], this.refineProgress[1] += f.refineProgress[1];
18218
+ for (var l = 0, c = this.children; l < c.length; l++) {
18219
+ var d = c[l];
18220
+ d.autoRefine = this.autoRefine;
18221
+ var f = d.update(e, r, o, this);
18222
+ f && (s = !0), d.refined === !1 && (this.refined = !1), d.loaded === !1 && (this.loaded = !1), this.refineProgress[0] += d.refineProgress[0], this.refineProgress[1] += d.refineProgress[1];
18244
18223
  }
18245
18224
  scratchBoundingBox$1.makeEmpty(), scratchObserverBox.copy(this.work.observerBox), scratchObserverBox.isEmpty() || (scratchObserverBox.max.x += 1, scratchObserverBox.max.z += 1, scratchObserverBox.max.y += 1, scratchObserverBox.min.x -= 1, scratchObserverBox.min.z -= 1, scratchBoundingBox$1.union(scratchObserverBox));
18246
- for (var p = 0, g = this.viewLayers; p < g.length; p++) {
18247
- var f = g[p];
18248
- f.boundingBox.isEmpty() || (scratchViewLayerBox.copy(f.boundingBox).applyMatrix4(f.matrix), scratchBoundingBox$1.union(scratchViewLayerBox));
18225
+ for (var h = 0, p = this.viewLayers; h < p.length; h++) {
18226
+ var d = p[h];
18227
+ d.boundingBox.isEmpty() || (scratchViewLayerBox.copy(d.boundingBox).applyMatrix4(d.matrix), scratchBoundingBox$1.union(scratchViewLayerBox));
18249
18228
  }
18250
- return this.boundingBox.copy(scratchBoundingBox$1), l === !1 && this.loaded === !0 && this.dispatchEvent({ type: "load" }), s;
18229
+ return this.boundingBox.copy(scratchBoundingBox$1), u === !1 && this.loaded === !0 && this.dispatchEvent({ type: "load" }), s;
18251
18230
  }, t.prototype.localToEnu = function(e) {
18252
18231
  return e.applyMatrix4(localToEnuMatrix);
18253
18232
  }, t.prototype.enuToLocal = function(e) {
@@ -19603,48 +19582,48 @@ var Hammer = function(n, t, e, r) {
19603
19582
  return Array.isArray(I) ? (p(I, k[F], k), !0) : !1;
19604
19583
  }
19605
19584
  function p(I, F, k) {
19606
- var z;
19585
+ var V;
19607
19586
  if (I)
19608
19587
  if (I.forEach)
19609
19588
  I.forEach(F, k);
19610
19589
  else if (I.length !== r)
19611
- for (z = 0; z < I.length; )
19612
- F.call(k, I[z], z, I), z++;
19590
+ for (V = 0; V < I.length; )
19591
+ F.call(k, I[V], V, I), V++;
19613
19592
  else
19614
- for (z in I)
19615
- I.hasOwnProperty(z) && F.call(k, I[z], z, I);
19593
+ for (V in I)
19594
+ I.hasOwnProperty(V) && F.call(k, I[V], V, I);
19616
19595
  }
19617
19596
  function g(I, F, k) {
19618
- var z = "DEPRECATED METHOD: " + F + `
19597
+ var V = "DEPRECATED METHOD: " + F + `
19619
19598
  ` + k + ` AT
19620
19599
  `;
19621
19600
  return function() {
19622
- var Y = new Error("get-stack-trace"), ue = Y && Y.stack ? Y.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", ge = n.console && (n.console.warn || n.console.log);
19623
- return ge && ge.call(n.console, z, ue), I.apply(this, arguments);
19601
+ var Z = new Error("get-stack-trace"), ue = Z && Z.stack ? Z.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", ge = n.console && (n.console.warn || n.console.log);
19602
+ return ge && ge.call(n.console, V, ue), I.apply(this, arguments);
19624
19603
  };
19625
19604
  }
19626
19605
  var A;
19627
19606
  typeof Object.assign != "function" ? A = function(F) {
19628
19607
  if (F === r || F === null)
19629
19608
  throw new TypeError("Cannot convert undefined or null to object");
19630
- for (var k = Object(F), z = 1; z < arguments.length; z++) {
19631
- var Y = arguments[z];
19632
- if (Y !== r && Y !== null)
19633
- for (var ue in Y)
19634
- Y.hasOwnProperty(ue) && (k[ue] = Y[ue]);
19609
+ for (var k = Object(F), V = 1; V < arguments.length; V++) {
19610
+ var Z = arguments[V];
19611
+ if (Z !== r && Z !== null)
19612
+ for (var ue in Z)
19613
+ Z.hasOwnProperty(ue) && (k[ue] = Z[ue]);
19635
19614
  }
19636
19615
  return k;
19637
19616
  } : A = Object.assign;
19638
- var m = g(function(F, k, z) {
19639
- for (var Y = Object.keys(k), ue = 0; ue < Y.length; )
19640
- (!z || z && F[Y[ue]] === r) && (F[Y[ue]] = k[Y[ue]]), ue++;
19617
+ var m = g(function(F, k, V) {
19618
+ for (var Z = Object.keys(k), ue = 0; ue < Z.length; )
19619
+ (!V || V && F[Z[ue]] === r) && (F[Z[ue]] = k[Z[ue]]), ue++;
19641
19620
  return F;
19642
19621
  }, "extend", "Use `assign`."), E = g(function(F, k) {
19643
19622
  return m(F, k, !0);
19644
19623
  }, "merge", "Use `assign`.");
19645
19624
  function v(I, F, k) {
19646
- var z = F.prototype, Y;
19647
- Y = I.prototype = Object.create(z), Y.constructor = I, Y._super = z, k && A(Y, k);
19625
+ var V = F.prototype, Z;
19626
+ Z = I.prototype = Object.create(V), Z.constructor = I, Z._super = V, k && A(Z, k);
19648
19627
  }
19649
19628
  function y(I, F) {
19650
19629
  return function() {
@@ -19658,13 +19637,13 @@ var Hammer = function(n, t, e, r) {
19658
19637
  return I === r ? F : I;
19659
19638
  }
19660
19639
  function S(I, F, k) {
19661
- p(L(F), function(z) {
19662
- I.addEventListener(z, k, !1);
19640
+ p(L(F), function(V) {
19641
+ I.addEventListener(V, k, !1);
19663
19642
  });
19664
19643
  }
19665
19644
  function R(I, F, k) {
19666
- p(L(F), function(z) {
19667
- I.removeEventListener(z, k, !1);
19645
+ p(L(F), function(V) {
19646
+ I.removeEventListener(V, k, !1);
19668
19647
  });
19669
19648
  }
19670
19649
  function C(I, F) {
@@ -19684,10 +19663,10 @@ var Hammer = function(n, t, e, r) {
19684
19663
  function H(I, F, k) {
19685
19664
  if (I.indexOf && !k)
19686
19665
  return I.indexOf(F);
19687
- for (var z = 0; z < I.length; ) {
19688
- if (k && I[z][k] == F || !k && I[z] === F)
19689
- return z;
19690
- z++;
19666
+ for (var V = 0; V < I.length; ) {
19667
+ if (k && I[V][k] == F || !k && I[V] === F)
19668
+ return V;
19669
+ V++;
19691
19670
  }
19692
19671
  return -1;
19693
19672
  }
@@ -19695,18 +19674,18 @@ var Hammer = function(n, t, e, r) {
19695
19674
  return Array.prototype.slice.call(I, 0);
19696
19675
  }
19697
19676
  function P(I, F, k) {
19698
- for (var z = [], Y = [], ue = 0; ue < I.length; ) {
19677
+ for (var V = [], Z = [], ue = 0; ue < I.length; ) {
19699
19678
  var ge = I[ue][F];
19700
- H(Y, ge) < 0 && z.push(I[ue]), Y[ue] = ge, ue++;
19679
+ H(Z, ge) < 0 && V.push(I[ue]), Z[ue] = ge, ue++;
19701
19680
  }
19702
- return z = z.sort(function(it, ze) {
19681
+ return V = V.sort(function(it, ze) {
19703
19682
  return it[F] > ze[F];
19704
- }), z;
19683
+ }), V;
19705
19684
  }
19706
19685
  function B(I, F) {
19707
- for (var k, z, Y = F[0].toUpperCase() + F.slice(1), ue = 0; ue < o.length; ) {
19708
- if (k = o[ue], z = k ? k + Y : F, z in I)
19709
- return z;
19686
+ for (var k, V, Z = F[0].toUpperCase() + F.slice(1), ue = 0; ue < o.length; ) {
19687
+ if (k = o[ue], V = k ? k + Z : F, V in I)
19688
+ return V;
19710
19689
  ue++;
19711
19690
  }
19712
19691
  return r;
@@ -19719,14 +19698,14 @@ var Hammer = function(n, t, e, r) {
19719
19698
  var F = I.ownerDocument || I;
19720
19699
  return F.defaultView || F.parentWindow || n;
19721
19700
  }
19722
- var D = /mobile|tablet|ip(ad|hone|od)|android/i, J = "ontouchstart" in n, K = B(n, "PointerEvent") !== r, Q = J && D.test(navigator.userAgent), U = "touch", q = "pen", X = "mouse", Z = "kinect", W = 25, G = 1, ne = 2, $ = 4, ee = 8, re = 1, le = 2, ie = 4, oe = 8, se = 16, de = le | ie, he = oe | se, Re = de | he, ce = ["x", "y"], Ce = ["clientX", "clientY"];
19723
- function j(I, F) {
19701
+ var D = /mobile|tablet|ip(ad|hone|od)|android/i, G = "ontouchstart" in n, K = B(n, "PointerEvent") !== r, J = G && D.test(navigator.userAgent), Q = "touch", U = "pen", X = "mouse", j = "kinect", $ = 25, q = 1, re = 2, Y = 4, ee = 8, ne = 1, le = 2, ie = 4, se = 8, ae = 16, fe = le | ie, he = se | ae, xe = fe | he, de = ["x", "y"], Re = ["clientX", "clientY"];
19702
+ function te(I, F) {
19724
19703
  var k = this;
19725
- this.manager = I, this.callback = F, this.element = I.element, this.target = I.options.inputTarget, this.domHandler = function(z) {
19726
- b(I.options.enable, [I]) && k.handler(z);
19704
+ this.manager = I, this.callback = F, this.element = I.element, this.target = I.options.inputTarget, this.domHandler = function(V) {
19705
+ b(I.options.enable, [I]) && k.handler(V);
19727
19706
  }, this.init();
19728
19707
  }
19729
- j.prototype = {
19708
+ te.prototype = {
19730
19709
  /**
19731
19710
  * should handle the inputEvent data and trigger the callback
19732
19711
  * @virtual
@@ -19746,42 +19725,42 @@ var Hammer = function(n, t, e, r) {
19746
19725
  this.evEl && R(this.element, this.evEl, this.domHandler), this.evTarget && R(this.target, this.evTarget, this.domHandler), this.evWin && R(N(this.element), this.evWin, this.domHandler);
19747
19726
  }
19748
19727
  };
19749
- function te(I) {
19728
+ function W(I) {
19750
19729
  var F, k = I.options.inputClass;
19751
- return k ? F = k : K ? F = Ne : Q ? F = Le : J ? F = Ye : F = Te, new F(I, V);
19730
+ return k ? F = k : K ? F = Ne : J ? F = Le : G ? F = Ye : F = be, new F(I, z);
19752
19731
  }
19753
- function V(I, F, k) {
19754
- var z = k.pointers.length, Y = k.changedPointers.length, ue = F & G && z - Y === 0, ge = F & ($ | ee) && z - Y === 0;
19755
- k.isFirst = !!ue, k.isFinal = !!ge, ue && (I.session = {}), k.eventType = F, be(I, k), I.emit("hammer.input", k), I.recognize(k), I.session.prevInput = k;
19732
+ function z(I, F, k) {
19733
+ var V = k.pointers.length, Z = k.changedPointers.length, ue = F & q && V - Z === 0, ge = F & (Y | ee) && V - Z === 0;
19734
+ k.isFirst = !!ue, k.isFinal = !!ge, ue && (I.session = {}), k.eventType = F, Ce(I, k), I.emit("hammer.input", k), I.recognize(k), I.session.prevInput = k;
19756
19735
  }
19757
- function be(I, F) {
19758
- var k = I.session, z = F.pointers, Y = z.length;
19759
- k.firstInput || (k.firstInput = Ve(F)), Y > 1 && !k.firstMultiple ? k.firstMultiple = Ve(F) : Y === 1 && (k.firstMultiple = !1);
19760
- var ue = k.firstInput, ge = k.firstMultiple, Xe = ge ? ge.center : ue.center, it = F.center = rt(z);
19761
- F.timeStamp = d(), F.deltaTime = F.timeStamp - ue.timeStamp, F.angle = pe(Xe, it), F.distance = ae(Xe, it), fe(k, F), F.offsetDirection = me(F.deltaX, F.deltaY);
19736
+ function Ce(I, F) {
19737
+ var k = I.session, V = F.pointers, Z = V.length;
19738
+ k.firstInput || (k.firstInput = Ve(F)), Z > 1 && !k.firstMultiple ? k.firstMultiple = Ve(F) : Z === 1 && (k.firstMultiple = !1);
19739
+ var ue = k.firstInput, ge = k.firstMultiple, Xe = ge ? ge.center : ue.center, it = F.center = rt(V);
19740
+ F.timeStamp = d(), F.deltaTime = F.timeStamp - ue.timeStamp, F.angle = pe(Xe, it), F.distance = oe(Xe, it), ce(k, F), F.offsetDirection = me(F.deltaX, F.deltaY);
19762
19741
  var ze = We(F.deltaTime, F.deltaX, F.deltaY);
19763
- F.overallVelocityX = ze.x, F.overallVelocityY = ze.y, F.overallVelocity = c(ze.x) > c(ze.y) ? ze.x : ze.y, F.scale = ge ? Se(ge.pointers, z) : 1, F.rotation = ge ? Me(ge.pointers, z) : 0, F.maxPointers = k.prevInput ? F.pointers.length > k.prevInput.maxPointers ? F.pointers.length : k.prevInput.maxPointers : F.pointers.length, ve(k, F);
19742
+ F.overallVelocityX = ze.x, F.overallVelocityY = ze.y, F.overallVelocity = c(ze.x) > c(ze.y) ? ze.x : ze.y, F.scale = ge ? Te(ge.pointers, V) : 1, F.rotation = ge ? Me(ge.pointers, V) : 0, F.maxPointers = k.prevInput ? F.pointers.length > k.prevInput.maxPointers ? F.pointers.length : k.prevInput.maxPointers : F.pointers.length, ve(k, F);
19764
19743
  var Et = I.element;
19765
19744
  C(F.srcEvent.target, Et) && (Et = F.srcEvent.target), F.target = Et;
19766
19745
  }
19767
- function fe(I, F) {
19768
- var k = F.center, z = I.offsetDelta || {}, Y = I.prevDelta || {}, ue = I.prevInput || {};
19769
- (F.eventType === G || ue.eventType === $) && (Y = I.prevDelta = {
19746
+ function ce(I, F) {
19747
+ var k = F.center, V = I.offsetDelta || {}, Z = I.prevDelta || {}, ue = I.prevInput || {};
19748
+ (F.eventType === q || ue.eventType === Y) && (Z = I.prevDelta = {
19770
19749
  x: ue.deltaX || 0,
19771
19750
  y: ue.deltaY || 0
19772
- }, z = I.offsetDelta = {
19751
+ }, V = I.offsetDelta = {
19773
19752
  x: k.x,
19774
19753
  y: k.y
19775
- }), F.deltaX = Y.x + (k.x - z.x), F.deltaY = Y.y + (k.y - z.y);
19754
+ }), F.deltaX = Z.x + (k.x - V.x), F.deltaY = Z.y + (k.y - V.y);
19776
19755
  }
19777
19756
  function ve(I, F) {
19778
- var k = I.lastInterval || F, z = F.timeStamp - k.timeStamp, Y, ue, ge, Xe;
19779
- if (F.eventType != ee && (z > W || k.velocity === r)) {
19780
- var it = F.deltaX - k.deltaX, ze = F.deltaY - k.deltaY, Et = We(z, it, ze);
19781
- ue = Et.x, ge = Et.y, Y = c(Et.x) > c(Et.y) ? Et.x : Et.y, Xe = me(it, ze), I.lastInterval = F;
19757
+ var k = I.lastInterval || F, V = F.timeStamp - k.timeStamp, Z, ue, ge, Xe;
19758
+ if (F.eventType != ee && (V > $ || k.velocity === r)) {
19759
+ var it = F.deltaX - k.deltaX, ze = F.deltaY - k.deltaY, Et = We(V, it, ze);
19760
+ ue = Et.x, ge = Et.y, Z = c(Et.x) > c(Et.y) ? Et.x : Et.y, Xe = me(it, ze), I.lastInterval = F;
19782
19761
  } else
19783
- Y = k.velocity, ue = k.velocityX, ge = k.velocityY, Xe = k.direction;
19784
- F.velocity = Y, F.velocityX = ue, F.velocityY = ge, F.direction = Xe;
19762
+ Z = k.velocity, ue = k.velocityX, ge = k.velocityY, Xe = k.direction;
19763
+ F.velocity = Z, F.velocityX = ue, F.velocityY = ge, F.direction = Xe;
19785
19764
  }
19786
19765
  function Ve(I) {
19787
19766
  for (var F = [], k = 0; k < I.pointers.length; )
@@ -19804,11 +19783,11 @@ var Hammer = function(n, t, e, r) {
19804
19783
  x: l(I[0].clientX),
19805
19784
  y: l(I[0].clientY)
19806
19785
  };
19807
- for (var k = 0, z = 0, Y = 0; Y < F; )
19808
- k += I[Y].clientX, z += I[Y].clientY, Y++;
19786
+ for (var k = 0, V = 0, Z = 0; Z < F; )
19787
+ k += I[Z].clientX, V += I[Z].clientY, Z++;
19809
19788
  return {
19810
19789
  x: l(k / F),
19811
- y: l(z / F)
19790
+ y: l(V / F)
19812
19791
  };
19813
19792
  }
19814
19793
  function We(I, F, k) {
@@ -19818,40 +19797,40 @@ var Hammer = function(n, t, e, r) {
19818
19797
  };
19819
19798
  }
19820
19799
  function me(I, F) {
19821
- return I === F ? re : c(I) >= c(F) ? I < 0 ? le : ie : F < 0 ? oe : se;
19800
+ return I === F ? ne : c(I) >= c(F) ? I < 0 ? le : ie : F < 0 ? se : ae;
19822
19801
  }
19823
- function ae(I, F, k) {
19824
- k || (k = ce);
19825
- var z = F[k[0]] - I[k[0]], Y = F[k[1]] - I[k[1]];
19826
- return Math.sqrt(z * z + Y * Y);
19802
+ function oe(I, F, k) {
19803
+ k || (k = de);
19804
+ var V = F[k[0]] - I[k[0]], Z = F[k[1]] - I[k[1]];
19805
+ return Math.sqrt(V * V + Z * Z);
19827
19806
  }
19828
19807
  function pe(I, F, k) {
19829
- k || (k = ce);
19830
- var z = F[k[0]] - I[k[0]], Y = F[k[1]] - I[k[1]];
19831
- return Math.atan2(Y, z) * 180 / Math.PI;
19808
+ k || (k = de);
19809
+ var V = F[k[0]] - I[k[0]], Z = F[k[1]] - I[k[1]];
19810
+ return Math.atan2(Z, V) * 180 / Math.PI;
19832
19811
  }
19833
19812
  function Me(I, F) {
19834
- return pe(F[1], F[0], Ce) + pe(I[1], I[0], Ce);
19813
+ return pe(F[1], F[0], Re) + pe(I[1], I[0], Re);
19835
19814
  }
19836
- function Se(I, F) {
19837
- return ae(F[0], F[1], Ce) / ae(I[0], I[1], Ce);
19815
+ function Te(I, F) {
19816
+ return oe(F[0], F[1], Re) / oe(I[0], I[1], Re);
19838
19817
  }
19839
19818
  var Pe = {
19840
- mousedown: G,
19841
- mousemove: ne,
19842
- mouseup: $
19819
+ mousedown: q,
19820
+ mousemove: re,
19821
+ mouseup: Y
19843
19822
  }, Fe = "mousedown", Ae = "mousemove mouseup";
19844
- function Te() {
19845
- this.evEl = Fe, this.evWin = Ae, this.pressed = !1, j.apply(this, arguments);
19823
+ function be() {
19824
+ this.evEl = Fe, this.evWin = Ae, this.pressed = !1, te.apply(this, arguments);
19846
19825
  }
19847
- v(Te, j, {
19826
+ v(be, te, {
19848
19827
  /**
19849
19828
  * handle mouse events
19850
19829
  * @param {Object} ev
19851
19830
  */
19852
19831
  handler: function(F) {
19853
19832
  var k = Pe[F.type];
19854
- k & G && (F.button === 0 || F.button === 2) && (this.pressed = !0), k & ne && F.which !== 1 && (k = $), this.pressed && (k & $ && (this.pressed = !1), this.callback(this.manager, k, {
19833
+ k & q && (F.button === 0 || F.button === 2) && (this.pressed = !0), k & re && F.which !== 1 && (k = Y), this.pressed && (k & Y && (this.pressed = !1), this.callback(this.manager, k, {
19855
19834
  pointers: [F],
19856
19835
  changedPointers: [F],
19857
19836
  pointerType: X,
@@ -19860,96 +19839,96 @@ var Hammer = function(n, t, e, r) {
19860
19839
  }
19861
19840
  });
19862
19841
  var Ie = {
19863
- pointerdown: G,
19864
- pointermove: ne,
19865
- pointerup: $,
19842
+ pointerdown: q,
19843
+ pointermove: re,
19844
+ pointerup: Y,
19866
19845
  pointercancel: ee,
19867
19846
  pointerout: ee
19868
19847
  }, Be = {
19869
- 2: U,
19870
- 3: q,
19848
+ 2: Q,
19849
+ 3: U,
19871
19850
  4: X,
19872
- 5: Z
19851
+ 5: j
19873
19852
  // see https://twitter.com/jacobrossi/status/480596438489890816
19874
19853
  }, qe = "pointerdown", ke = "pointermove pointerup pointercancel";
19875
19854
  n.MSPointerEvent && !n.PointerEvent && (qe = "MSPointerDown", ke = "MSPointerMove MSPointerUp MSPointerCancel");
19876
19855
  function Ne() {
19877
- this.evEl = qe, this.evWin = ke, j.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
19856
+ this.evEl = qe, this.evWin = ke, te.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
19878
19857
  }
19879
- v(Ne, j, {
19858
+ v(Ne, te, {
19880
19859
  /**
19881
19860
  * handle mouse events
19882
19861
  * @param {Object} ev
19883
19862
  */
19884
19863
  handler: function(F) {
19885
- var k = this.store, z = !1, Y = !1, ue = F.type.toLowerCase().replace("ms", ""), ge = Ie[ue], Xe = Be[F.pointerType] || F.pointerType, it = Xe == U, ze = H(k, F.pointerId, "pointerId");
19886
- ge & G && (F.button === 0 || F.button === 2 || it) ? ze < 0 && (k.push(F), ze = k.length - 1) : ge & ($ | ee) ? z = !0 : !it && F.buttons === 0 && (z = !0, Y = !0, ge = Ie.pointerup), !(ze < 0) && (Y || (k[ze] = F), this.callback(this.manager, ge, {
19864
+ var k = this.store, V = !1, Z = !1, ue = F.type.toLowerCase().replace("ms", ""), ge = Ie[ue], Xe = Be[F.pointerType] || F.pointerType, it = Xe == Q, ze = H(k, F.pointerId, "pointerId");
19865
+ ge & q && (F.button === 0 || F.button === 2 || it) ? ze < 0 && (k.push(F), ze = k.length - 1) : ge & (Y | ee) ? V = !0 : !it && F.buttons === 0 && (V = !0, Z = !0, ge = Ie.pointerup), !(ze < 0) && (Z || (k[ze] = F), this.callback(this.manager, ge, {
19887
19866
  pointers: k,
19888
19867
  changedPointers: [F],
19889
19868
  pointerType: Xe,
19890
19869
  srcEvent: k[ze]
19891
- }), z && k.splice(ze, 1));
19870
+ }), V && k.splice(ze, 1));
19892
19871
  }
19893
19872
  });
19894
19873
  var _e = {
19895
- touchstart: G,
19896
- touchmove: ne,
19897
- touchend: $,
19874
+ touchstart: q,
19875
+ touchmove: re,
19876
+ touchend: Y,
19898
19877
  touchcancel: ee
19899
19878
  }, Ue = "touchstart", De = "touchstart touchmove touchend touchcancel";
19900
19879
  function je() {
19901
- this.evTarget = Ue, this.evWin = De, this.started = !1, j.apply(this, arguments);
19880
+ this.evTarget = Ue, this.evWin = De, this.started = !1, te.apply(this, arguments);
19902
19881
  }
19903
- v(je, j, {
19882
+ v(je, te, {
19904
19883
  handler: function(F) {
19905
19884
  var k = _e[F.type];
19906
- if (k === G && (this.started = !0), !!this.started) {
19907
- var z = xe.call(this, F, k);
19908
- k & ($ | ee) && z[0].length - z[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
19909
- pointers: z[0],
19910
- changedPointers: z[1],
19911
- pointerType: U,
19885
+ if (k === q && (this.started = !0), !!this.started) {
19886
+ var V = Se.call(this, F, k);
19887
+ k & (Y | ee) && V[0].length - V[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
19888
+ pointers: V[0],
19889
+ changedPointers: V[1],
19890
+ pointerType: Q,
19912
19891
  srcEvent: F
19913
19892
  });
19914
19893
  }
19915
19894
  }
19916
19895
  });
19917
- function xe(I, F) {
19918
- var k = M(I.touches), z = M(I.changedTouches);
19919
- return F & ($ | ee) && (k = P(k.concat(z), "identifier")), [k, z];
19896
+ function Se(I, F) {
19897
+ var k = M(I.touches), V = M(I.changedTouches);
19898
+ return F & (Y | ee) && (k = P(k.concat(V), "identifier")), [k, V];
19920
19899
  }
19921
19900
  var Oe = {
19922
- touchstart: G,
19923
- touchmove: ne,
19924
- touchend: $,
19901
+ touchstart: q,
19902
+ touchmove: re,
19903
+ touchend: Y,
19925
19904
  touchcancel: ee
19926
19905
  }, we = "touchstart touchmove touchend touchcancel";
19927
19906
  function Le() {
19928
- this.evTarget = we, this.targetIds = {}, j.apply(this, arguments);
19907
+ this.evTarget = we, this.targetIds = {}, te.apply(this, arguments);
19929
19908
  }
19930
- v(Le, j, {
19909
+ v(Le, te, {
19931
19910
  handler: function(F) {
19932
- var k = Oe[F.type], z = He.call(this, F, k);
19933
- z && this.callback(this.manager, k, {
19934
- pointers: z[0],
19935
- changedPointers: z[1],
19936
- pointerType: U,
19911
+ var k = Oe[F.type], V = He.call(this, F, k);
19912
+ V && this.callback(this.manager, k, {
19913
+ pointers: V[0],
19914
+ changedPointers: V[1],
19915
+ pointerType: Q,
19937
19916
  srcEvent: F
19938
19917
  });
19939
19918
  }
19940
19919
  });
19941
19920
  function He(I, F) {
19942
- var k = M(I.touches), z = this.targetIds;
19943
- if (F & (G | ne) && k.length === 1)
19944
- return z[k[0].identifier] = !0, [k, k];
19945
- var Y, ue, ge = M(I.changedTouches), Xe = [], it = this.target;
19921
+ var k = M(I.touches), V = this.targetIds;
19922
+ if (F & (q | re) && k.length === 1)
19923
+ return V[k[0].identifier] = !0, [k, k];
19924
+ var Z, ue, ge = M(I.changedTouches), Xe = [], it = this.target;
19946
19925
  if (ue = k.filter(function(ze) {
19947
19926
  return C(ze.target, it);
19948
- }), F === G)
19949
- for (Y = 0; Y < ue.length; )
19950
- z[ue[Y].identifier] = !0, Y++;
19951
- for (Y = 0; Y < ge.length; )
19952
- z[ge[Y].identifier] && Xe.push(ge[Y]), F & ($ | ee) && delete z[ge[Y].identifier], Y++;
19927
+ }), F === q)
19928
+ for (Z = 0; Z < ue.length; )
19929
+ V[ue[Z].identifier] = !0, Z++;
19930
+ for (Z = 0; Z < ge.length; )
19931
+ V[ge[Z].identifier] && Xe.push(ge[Z]), F & (Y | ee) && delete V[ge[Z].identifier], Z++;
19953
19932
  if (Xe.length)
19954
19933
  return [
19955
19934
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
@@ -19959,25 +19938,25 @@ var Hammer = function(n, t, e, r) {
19959
19938
  }
19960
19939
  var Ge = 2500, Ze = 25;
19961
19940
  function Ye() {
19962
- j.apply(this, arguments);
19941
+ te.apply(this, arguments);
19963
19942
  var I = y(this.handler, this);
19964
- this.touch = new Le(this.manager, I), this.mouse = new Te(this.manager, I), this.primaryTouch = null, this.lastTouches = [];
19943
+ this.touch = new Le(this.manager, I), this.mouse = new be(this.manager, I), this.primaryTouch = null, this.lastTouches = [];
19965
19944
  }
19966
- v(Ye, j, {
19945
+ v(Ye, te, {
19967
19946
  /**
19968
19947
  * handle mouse and touch events
19969
19948
  * @param {Hammer} manager
19970
19949
  * @param {String} inputEvent
19971
19950
  * @param {Object} inputData
19972
19951
  */
19973
- handler: function(F, k, z) {
19974
- var Y = z.pointerType == U, ue = z.pointerType == X;
19975
- if (!(ue && z.sourceCapabilities && z.sourceCapabilities.firesTouchEvents)) {
19976
- if (Y)
19977
- Qe.call(this, k, z);
19978
- else if (ue && Mt.call(this, z))
19952
+ handler: function(F, k, V) {
19953
+ var Z = V.pointerType == Q, ue = V.pointerType == X;
19954
+ if (!(ue && V.sourceCapabilities && V.sourceCapabilities.firesTouchEvents)) {
19955
+ if (Z)
19956
+ Qe.call(this, k, V);
19957
+ else if (ue && Mt.call(this, V))
19979
19958
  return;
19980
- this.callback(F, k, z);
19959
+ this.callback(F, k, V);
19981
19960
  }
19982
19961
  },
19983
19962
  /**
@@ -19988,23 +19967,23 @@ var Hammer = function(n, t, e, r) {
19988
19967
  }
19989
19968
  });
19990
19969
  function Qe(I, F) {
19991
- I & G ? (this.primaryTouch = F.changedPointers[0].identifier, ye.call(this, F)) : I & ($ | ee) && ye.call(this, F);
19970
+ I & q ? (this.primaryTouch = F.changedPointers[0].identifier, ye.call(this, F)) : I & (Y | ee) && ye.call(this, F);
19992
19971
  }
19993
19972
  function ye(I) {
19994
19973
  var F = I.changedPointers[0];
19995
19974
  if (F.identifier === this.primaryTouch) {
19996
19975
  var k = { x: F.clientX, y: F.clientY };
19997
19976
  this.lastTouches.push(k);
19998
- var z = this.lastTouches, Y = function() {
19999
- var ue = z.indexOf(k);
20000
- ue > -1 && z.splice(ue, 1);
19977
+ var V = this.lastTouches, Z = function() {
19978
+ var ue = V.indexOf(k);
19979
+ ue > -1 && V.splice(ue, 1);
20001
19980
  };
20002
- setTimeout(Y, Ge);
19981
+ setTimeout(Z, Ge);
20003
19982
  }
20004
19983
  }
20005
19984
  function Mt(I) {
20006
- for (var F = I.srcEvent.clientX, k = I.srcEvent.clientY, z = 0; z < this.lastTouches.length; z++) {
20007
- var Y = this.lastTouches[z], ue = Math.abs(F - Y.x), ge = Math.abs(k - Y.y);
19985
+ for (var F = I.srcEvent.clientX, k = I.srcEvent.clientY, V = 0; V < this.lastTouches.length; V++) {
19986
+ var Z = this.lastTouches[V], ue = Math.abs(F - Z.x), ge = Math.abs(k - Z.y);
20008
19987
  if (ue <= Ze && ge <= Ze)
20009
19988
  return !0;
20010
19989
  }
@@ -20048,13 +20027,13 @@ var Hammer = function(n, t, e, r) {
20048
20027
  F.preventDefault();
20049
20028
  return;
20050
20029
  }
20051
- var z = this.actions, Y = w(z, Ke) && !bt[Ke], ue = w(z, $e) && !bt[$e], ge = w(z, Ee) && !bt[Ee];
20052
- if (Y) {
20030
+ var V = this.actions, Z = w(V, Ke) && !bt[Ke], ue = w(V, $e) && !bt[$e], ge = w(V, Ee) && !bt[Ee];
20031
+ if (Z) {
20053
20032
  var Xe = I.pointers.length === 1, it = I.distance < 2, ze = I.deltaTime < 250;
20054
20033
  if (Xe && it && ze)
20055
20034
  return;
20056
20035
  }
20057
- if (!(ge && ue) && (Y || ue && k & de || ge && k & he))
20036
+ if (!(ge && ue) && (Z || ue && k & fe || ge && k & he))
20058
20037
  return this.preventSrc(F);
20059
20038
  },
20060
20039
  /**
@@ -20161,10 +20140,10 @@ var Hammer = function(n, t, e, r) {
20161
20140
  */
20162
20141
  emit: function(I) {
20163
20142
  var F = this, k = this.state;
20164
- function z(Y) {
20165
- F.manager.emit(Y, I);
20143
+ function V(Z) {
20144
+ F.manager.emit(Z, I);
20166
20145
  }
20167
- k < gt && z(F.options.event + st(k)), z(F.options.event), I.additionalEvent && z(I.additionalEvent), k >= gt && z(F.options.event + st(k));
20146
+ k < gt && V(F.options.event + st(k)), V(F.options.event), I.additionalEvent && V(I.additionalEvent), k >= gt && V(F.options.event + st(k));
20168
20147
  },
20169
20148
  /**
20170
20149
  * Check that all the require failure recognizers has failed,
@@ -20230,7 +20209,7 @@ var Hammer = function(n, t, e, r) {
20230
20209
  return I & At ? "cancel" : I & gt ? "end" : I & St ? "move" : I & tt ? "start" : "";
20231
20210
  }
20232
20211
  function ut(I) {
20233
- return I == se ? "down" : I == oe ? "up" : I == le ? "left" : I == ie ? "right" : "";
20212
+ return I == ae ? "down" : I == se ? "up" : I == le ? "left" : I == ie ? "right" : "";
20234
20213
  }
20235
20214
  function lt(I, F) {
20236
20215
  var k = F.manager;
@@ -20268,8 +20247,8 @@ var Hammer = function(n, t, e, r) {
20268
20247
  * @returns {*} State
20269
20248
  */
20270
20249
  process: function(I) {
20271
- var F = this.state, k = I.eventType, z = F & (tt | St), Y = this.attrTest(I);
20272
- return z && (k & ee || !Y) ? F | At : z || Y ? k & $ ? F | gt : F & tt ? F | St : tt : ht;
20250
+ var F = this.state, k = I.eventType, V = F & (tt | St), Z = this.attrTest(I);
20251
+ return V && (k & ee || !Z) ? F | At : V || Z ? k & Y ? F | gt : F & tt ? F | St : tt : ht;
20273
20252
  }
20274
20253
  });
20275
20254
  function It() {
@@ -20284,15 +20263,15 @@ var Hammer = function(n, t, e, r) {
20284
20263
  event: "pan",
20285
20264
  threshold: 10,
20286
20265
  pointers: 1,
20287
- direction: Re
20266
+ direction: xe
20288
20267
  },
20289
20268
  getTouchAction: function() {
20290
20269
  var I = this.options.direction, F = [];
20291
- return I & de && F.push($e), I & he && F.push(Ee), F;
20270
+ return I & fe && F.push($e), I & he && F.push(Ee), F;
20292
20271
  },
20293
20272
  directionTest: function(I) {
20294
- var F = this.options, k = !0, z = I.distance, Y = I.direction, ue = I.deltaX, ge = I.deltaY;
20295
- return Y & F.direction || (F.direction & de ? (Y = ue === 0 ? re : ue < 0 ? le : ie, k = ue != this.pX, z = Math.abs(I.deltaX)) : (Y = ge === 0 ? re : ge < 0 ? oe : se, k = ge != this.pY, z = Math.abs(I.deltaY))), I.direction = Y, k && z > F.threshold && Y & F.direction;
20273
+ var F = this.options, k = !0, V = I.distance, Z = I.direction, ue = I.deltaX, ge = I.deltaY;
20274
+ return Z & F.direction || (F.direction & fe ? (Z = ue === 0 ? ne : ue < 0 ? le : ie, k = ue != this.pX, V = Math.abs(I.deltaX)) : (Z = ge === 0 ? ne : ge < 0 ? se : ae, k = ge != this.pY, V = Math.abs(I.deltaY))), I.direction = Z, k && V > F.threshold && Z & F.direction;
20296
20275
  },
20297
20276
  attrTest: function(I) {
20298
20277
  return ct.prototype.attrTest.call(this, I) && (this.state & tt || !(this.state & tt) && this.directionTest(I));
@@ -20350,14 +20329,14 @@ var Hammer = function(n, t, e, r) {
20350
20329
  return [dt];
20351
20330
  },
20352
20331
  process: function(I) {
20353
- var F = this.options, k = I.pointers.length === F.pointers, z = I.distance < F.threshold, Y = I.deltaTime > F.time;
20354
- if (this._input = I, !z || !k || I.eventType & ($ | ee) && !Y)
20332
+ var F = this.options, k = I.pointers.length === F.pointers, V = I.distance < F.threshold, Z = I.deltaTime > F.time;
20333
+ if (this._input = I, !V || !k || I.eventType & (Y | ee) && !Z)
20355
20334
  this.reset();
20356
- else if (I.eventType & G)
20335
+ else if (I.eventType & q)
20357
20336
  this.reset(), this._timer = f(function() {
20358
20337
  this.state = ft, this.tryEmit();
20359
20338
  }, F.time, this);
20360
- else if (I.eventType & $)
20339
+ else if (I.eventType & Y)
20361
20340
  return ft;
20362
20341
  return ht;
20363
20342
  },
@@ -20365,7 +20344,7 @@ var Hammer = function(n, t, e, r) {
20365
20344
  clearTimeout(this._timer);
20366
20345
  },
20367
20346
  emit: function(I) {
20368
- this.state === ft && (I && I.eventType & $ ? this.manager.emit(this.options.event + "up", I) : (this._input.timeStamp = d(), this.manager.emit(this.options.event, this._input)));
20347
+ this.state === ft && (I && I.eventType & Y ? this.manager.emit(this.options.event + "up", I) : (this._input.timeStamp = d(), this.manager.emit(this.options.event, this._input)));
20369
20348
  }
20370
20349
  });
20371
20350
  function wt() {
@@ -20400,7 +20379,7 @@ var Hammer = function(n, t, e, r) {
20400
20379
  event: "swipe",
20401
20380
  threshold: 10,
20402
20381
  velocity: 0.3,
20403
- direction: de | he,
20382
+ direction: fe | he,
20404
20383
  pointers: 1
20405
20384
  },
20406
20385
  getTouchAction: function() {
@@ -20408,7 +20387,7 @@ var Hammer = function(n, t, e, r) {
20408
20387
  },
20409
20388
  attrTest: function(I) {
20410
20389
  var F = this.options.direction, k;
20411
- return F & (de | he) ? k = I.overallVelocity : F & de ? k = I.overallVelocityX : F & he && (k = I.overallVelocityY), this._super.attrTest.call(this, I) && F & I.offsetDirection && I.distance > this.options.threshold && I.maxPointers == this.options.pointers && c(k) > this.options.velocity && I.eventType & $;
20390
+ return F & (fe | he) ? k = I.overallVelocity : F & fe ? k = I.overallVelocityX : F & he && (k = I.overallVelocityY), this._super.attrTest.call(this, I) && F & I.offsetDirection && I.distance > this.options.threshold && I.maxPointers == this.options.pointers && c(k) > this.options.velocity && I.eventType & Y;
20412
20391
  },
20413
20392
  emit: function(I) {
20414
20393
  var F = ut(I.offsetDirection);
@@ -20440,13 +20419,13 @@ var Hammer = function(n, t, e, r) {
20440
20419
  return [nt];
20441
20420
  },
20442
20421
  process: function(I) {
20443
- var F = this.options, k = I.pointers.length === F.pointers, z = I.distance < F.threshold, Y = I.deltaTime < F.time;
20444
- if (this.reset(), I.eventType & G && this.count === 0)
20422
+ var F = this.options, k = I.pointers.length === F.pointers, V = I.distance < F.threshold, Z = I.deltaTime < F.time;
20423
+ if (this.reset(), I.eventType & q && this.count === 0)
20445
20424
  return this.failTimeout();
20446
- if (z && Y && k) {
20447
- if (I.eventType != $)
20425
+ if (V && Z && k) {
20426
+ if (I.eventType != Y)
20448
20427
  return this.failTimeout();
20449
- var ue = this.pTime ? I.timeStamp - this.pTime < F.interval : !0, ge = !this.pCenter || ae(this.pCenter, I.center) < F.posThreshold;
20428
+ var ue = this.pTime ? I.timeStamp - this.pTime < F.interval : !0, ge = !this.pCenter || oe(this.pCenter, I.center) < F.posThreshold;
20450
20429
  this.pTime = I.timeStamp, this.pCenter = I.center, !ge || !ue ? this.count = 1 : this.count += 1, this._input = I;
20451
20430
  var Xe = this.count % F.taps;
20452
20431
  if (Xe === 0)
@@ -20514,8 +20493,8 @@ var Hammer = function(n, t, e, r) {
20514
20493
  // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
20515
20494
  [wt, { enable: !1 }],
20516
20495
  [Lt, { enable: !1 }, ["rotate"]],
20517
- [yt, { direction: de }],
20518
- [It, { direction: de }, ["swipe"]],
20496
+ [yt, { direction: fe }],
20497
+ [It, { direction: fe }, ["swipe"]],
20519
20498
  [Pt],
20520
20499
  [Pt, { event: "doubletap", taps: 2 }, ["tap"]],
20521
20500
  [Ft]
@@ -20569,9 +20548,9 @@ var Hammer = function(n, t, e, r) {
20569
20548
  };
20570
20549
  var Bt = 1, mt = 2;
20571
20550
  function Rt(I, F) {
20572
- this.options = A({}, xt.defaults, F || {}), this.options.inputTarget = this.options.inputTarget || I, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = I, this.input = te(this), this.touchAction = new Tt(this, this.options.touchAction), Ct(this, !0), p(this.options.recognizers, function(k) {
20573
- var z = this.add(new k[0](k[1]));
20574
- k[2] && z.recognizeWith(k[2]), k[3] && z.requireFailure(k[3]);
20551
+ this.options = A({}, xt.defaults, F || {}), this.options.inputTarget = this.options.inputTarget || I, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = I, this.input = W(this), this.touchAction = new Tt(this, this.options.touchAction), Ct(this, !0), p(this.options.recognizers, function(k) {
20552
+ var V = this.add(new k[0](k[1]));
20553
+ k[2] && V.recognizeWith(k[2]), k[3] && V.requireFailure(k[3]);
20575
20554
  }, this);
20576
20555
  }
20577
20556
  Rt.prototype = {
@@ -20602,12 +20581,12 @@ var Hammer = function(n, t, e, r) {
20602
20581
  var F = this.session;
20603
20582
  if (!F.stopped) {
20604
20583
  this.touchAction.preventDefaults(I);
20605
- var k, z = this.recognizers, Y = F.curRecognizer;
20606
- (!Y || Y && Y.state & ft) && (Y = F.curRecognizer = null);
20607
- for (var ue = 0; ue < z.length; )
20608
- k = z[ue], F.stopped !== mt && // 1
20609
- (!Y || k == Y || // 2
20610
- k.canRecognizeWith(Y)) ? k.recognize(I) : k.reset(), !Y && k.state & (tt | St | gt) && (Y = F.curRecognizer = k), ue++;
20584
+ var k, V = this.recognizers, Z = F.curRecognizer;
20585
+ (!Z || Z && Z.state & ft) && (Z = F.curRecognizer = null);
20586
+ for (var ue = 0; ue < V.length; )
20587
+ k = V[ue], F.stopped !== mt && // 1
20588
+ (!Z || k == Z || // 2
20589
+ k.canRecognizeWith(Z)) ? k.recognize(I) : k.reset(), !Z && k.state & (tt | St | gt) && (Z = F.curRecognizer = k), ue++;
20611
20590
  }
20612
20591
  },
20613
20592
  /**
@@ -20658,8 +20637,8 @@ var Hammer = function(n, t, e, r) {
20658
20637
  on: function(I, F) {
20659
20638
  if (I !== r && F !== r) {
20660
20639
  var k = this.handlers;
20661
- return p(L(I), function(z) {
20662
- k[z] = k[z] || [], k[z].push(F);
20640
+ return p(L(I), function(V) {
20641
+ k[V] = k[V] || [], k[V].push(F);
20663
20642
  }), this;
20664
20643
  }
20665
20644
  },
@@ -20672,8 +20651,8 @@ var Hammer = function(n, t, e, r) {
20672
20651
  off: function(I, F) {
20673
20652
  if (I !== r) {
20674
20653
  var k = this.handlers;
20675
- return p(L(I), function(z) {
20676
- F ? k[z] && k[z].splice(H(k[z], F), 1) : delete k[z];
20654
+ return p(L(I), function(V) {
20655
+ F ? k[V] && k[V].splice(H(k[V], F), 1) : delete k[V];
20677
20656
  }), this;
20678
20657
  }
20679
20658
  },
@@ -20689,8 +20668,8 @@ var Hammer = function(n, t, e, r) {
20689
20668
  F.type = I, F.preventDefault = function() {
20690
20669
  F.srcEvent.preventDefault();
20691
20670
  };
20692
- for (var z = 0; z < k.length; )
20693
- k[z](F), z++;
20671
+ for (var V = 0; V < k.length; )
20672
+ k[V](F), V++;
20694
20673
  }
20695
20674
  },
20696
20675
  /**
@@ -20704,9 +20683,9 @@ var Hammer = function(n, t, e, r) {
20704
20683
  function Ct(I, F) {
20705
20684
  var k = I.element;
20706
20685
  if (k.style) {
20707
- var z;
20708
- p(I.options.cssProps, function(Y, ue) {
20709
- z = B(k.style, ue), F ? (I.oldCssProps[z] = k.style[z], k.style[z] = Y) : k.style[z] = I.oldCssProps[z] || "";
20686
+ var V;
20687
+ p(I.options.cssProps, function(Z, ue) {
20688
+ V = B(k.style, ue), F ? (I.oldCssProps[V] = k.style[V], k.style[V] = Z) : k.style[V] = I.oldCssProps[V] || "";
20710
20689
  }), F || (I.oldCssProps = {});
20711
20690
  }
20712
20691
  }
@@ -20715,9 +20694,9 @@ var Hammer = function(n, t, e, r) {
20715
20694
  k.initEvent(I, !0, !0), k.gesture = F, F.target.dispatchEvent(k);
20716
20695
  }
20717
20696
  return A(xt, {
20718
- INPUT_START: G,
20719
- INPUT_MOVE: ne,
20720
- INPUT_END: $,
20697
+ INPUT_START: q,
20698
+ INPUT_MOVE: re,
20699
+ INPUT_END: Y,
20721
20700
  INPUT_CANCEL: ee,
20722
20701
  STATE_POSSIBLE: ot,
20723
20702
  STATE_BEGAN: tt,
@@ -20726,19 +20705,19 @@ var Hammer = function(n, t, e, r) {
20726
20705
  STATE_RECOGNIZED: ft,
20727
20706
  STATE_CANCELLED: At,
20728
20707
  STATE_FAILED: ht,
20729
- DIRECTION_NONE: re,
20708
+ DIRECTION_NONE: ne,
20730
20709
  DIRECTION_LEFT: le,
20731
20710
  DIRECTION_RIGHT: ie,
20732
- DIRECTION_UP: oe,
20733
- DIRECTION_DOWN: se,
20734
- DIRECTION_HORIZONTAL: de,
20711
+ DIRECTION_UP: se,
20712
+ DIRECTION_DOWN: ae,
20713
+ DIRECTION_HORIZONTAL: fe,
20735
20714
  DIRECTION_VERTICAL: he,
20736
- DIRECTION_ALL: Re,
20715
+ DIRECTION_ALL: xe,
20737
20716
  Manager: Rt,
20738
- Input: j,
20717
+ Input: te,
20739
20718
  TouchAction: Tt,
20740
20719
  TouchInput: Le,
20741
- MouseInput: Te,
20720
+ MouseInput: be,
20742
20721
  PointerEventInput: Ne,
20743
20722
  TouchMouseInput: Ye,
20744
20723
  SingleTouchInput: je,
@@ -21100,14 +21079,14 @@ var BaseController = (
21100
21079
  y: B.clientY
21101
21080
  }, _ = r.relativeClientPosition(O), N = new THREE.Raycaster();
21102
21081
  N.params.Points = { threshold: 0.1 }, N.setFromCamera(_, r.camera);
21103
- var D = __assign(__assign({}, O), { coords: _, raycaster: N, buttons: B.buttons, delta: 0 }), J = M === "pinchend" ? P : P - B.deltaY / 280, K = createEvent("gesture.pinch", {
21082
+ var D = __assign(__assign({}, O), { coords: _, raycaster: N, buttons: B.buttons, delta: 0 }), G = M === "pinchend" ? P : P - B.deltaY / 280, K = createEvent("gesture.pinch", {
21104
21083
  target: B.target,
21105
21084
  pointerType: "mouse",
21106
21085
  srcEvent: B,
21107
21086
  pointers: [__assign({}, D)],
21108
21087
  isFirst: M === "pinchstart",
21109
21088
  isFinal: M === "pinchend",
21110
- scale: clamp$1(J, 0.1, 10),
21089
+ scale: clamp$1(G, 0.1, 10),
21111
21090
  center: __assign({}, D),
21112
21091
  velocityX: 0,
21113
21092
  velocityY: 0,
@@ -21126,26 +21105,26 @@ var BaseController = (
21126
21105
  firstEvent: _,
21127
21106
  prevEvent: _
21128
21107
  } : f.prevEvent = _, r.onPinchGesture(_), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
21129
- var q;
21108
+ var U;
21130
21109
  h = null;
21131
- var X = (q = f == null ? void 0 : f.prevEvent.scale) !== null && q !== void 0 ? q : 1, Z = p("pinchend", X, M);
21132
- f = null, r.onPinchGesture(Z);
21110
+ var X = (U = f == null ? void 0 : f.prevEvent.scale) !== null && U !== void 0 ? U : 1, j = p("pinchend", X, M);
21111
+ f = null, r.onPinchGesture(j);
21133
21112
  }, 200);
21134
21113
  } else {
21135
- var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, J = {
21114
+ var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, G = {
21136
21115
  x: M.clientX,
21137
21116
  y: M.clientY
21138
- }, K = r.relativeClientPosition(J), Q = new THREE.Raycaster();
21139
- Q.params.Points = { threshold: 0.1 }, Q.setFromCamera(K, r.camera);
21140
- var U = __assign(__assign({}, J), { coords: K, raycaster: Q, buttons: M.buttons, delta: N }), _ = createEvent("gesture.mousewheel", {
21117
+ }, K = r.relativeClientPosition(G), J = new THREE.Raycaster();
21118
+ J.params.Points = { threshold: 0.1 }, J.setFromCamera(K, r.camera);
21119
+ var Q = __assign(__assign({}, G), { coords: K, raycaster: J, buttons: M.buttons, delta: N }), _ = createEvent("gesture.mousewheel", {
21141
21120
  target: M.target,
21142
21121
  pointerType: "mouse",
21143
21122
  srcEvent: M,
21144
- pointers: [__assign({}, U)],
21123
+ pointers: [__assign({}, Q)],
21145
21124
  isFirst: D,
21146
21125
  isFinal: !1,
21147
21126
  scale: 0,
21148
- center: __assign({}, U),
21127
+ center: __assign({}, Q),
21149
21128
  velocityX: 0,
21150
21129
  velocityY: 0,
21151
21130
  overallVelocityX: 0,
@@ -21160,11 +21139,11 @@ var BaseController = (
21160
21139
  target: M.target,
21161
21140
  pointerType: "mouse",
21162
21141
  srcEvent: M,
21163
- pointers: [__assign(__assign({}, U), { delta: 0 })],
21142
+ pointers: [__assign(__assign({}, Q), { delta: 0 })],
21164
21143
  isFirst: !1,
21165
21144
  isFinal: !0,
21166
21145
  scale: 0,
21167
- center: __assign(__assign({}, U), { delta: 0 }),
21146
+ center: __assign(__assign({}, Q), { delta: 0 }),
21168
21147
  velocityX: 0,
21169
21148
  velocityY: 0,
21170
21149
  overallVelocityX: 0,
@@ -21307,15 +21286,15 @@ var BaseController = (
21307
21286
  y: M.clientY
21308
21287
  }, N = r.relativeClientPosition(_), D = new THREE.Raycaster();
21309
21288
  D.params.Points = { threshold: 0.1 }, D.setFromCamera(N, r.camera);
21310
- var J = __assign(__assign({}, _), { coords: N, raycaster: D, buttons: 0, delta: 0 }), K = createEvent("gesture.pinch", {
21289
+ var G = __assign(__assign({}, _), { coords: N, raycaster: D, buttons: 0, delta: 0 }), K = createEvent("gesture.pinch", {
21311
21290
  target: M.target,
21312
21291
  pointerType: "mouse",
21313
21292
  srcEvent: M,
21314
- pointers: [__assign({}, J)],
21293
+ pointers: [__assign({}, G)],
21315
21294
  isFirst: B,
21316
21295
  isFinal: O,
21317
21296
  scale: (P = M.scale) !== null && P !== void 0 ? P : 1,
21318
- center: __assign({}, J),
21297
+ center: __assign({}, G),
21319
21298
  velocityX: 0,
21320
21299
  velocityY: 0,
21321
21300
  overallVelocityX: 0,
@@ -22512,84 +22491,84 @@ void main() {
22512
22491
  var y = new THREE.Matrix4().compose(this.scene.position, h, this.scene.scale);
22513
22492
  this.camera.matrix.equals(y) || (this.camera.matrix.copy(y), this.camera.matrixWorld.copy(this.camera.matrix), this.camera.position.copy(this.scene.position), this.camera.quaternion.copy(h), this.camera.scale.copy(this.scene.scale), d = !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);
22514
22493
  var b = this.frustum.planes[5].normal, T = [];
22515
- l >= u && traverseTileCubeNode(this.tileTree, function(G) {
22516
- if (!(G.level < u)) {
22517
- if (G.level > l || !c.frustum.intersectsBox(G.box))
22494
+ l >= u && traverseTileCubeNode(this.tileTree, function(q) {
22495
+ if (!(q.level < u)) {
22496
+ if (q.level > l || !c.frustum.intersectsBox(q.box))
22518
22497
  return !1;
22519
- T.push(G);
22498
+ T.push(q);
22520
22499
  }
22521
22500
  });
22522
22501
  var S = /* @__PURE__ */ new WeakMap();
22523
- T.sort(function(G, ne) {
22524
- if (G.level !== ne.level)
22525
- return G.level - ne.level;
22526
- var $ = S.get(G);
22527
- $ === void 0 && ($ = G.box.getCenter(scratchSortVector3).angleTo(b), S.set(G, $));
22528
- var ee = S.get(ne);
22529
- return ee === void 0 && (ee = ne.box.getCenter(scratchSortVector3).angleTo(b), S.set(ne, ee)), $ - ee;
22502
+ T.sort(function(q, re) {
22503
+ if (q.level !== re.level)
22504
+ return q.level - re.level;
22505
+ var Y = S.get(q);
22506
+ Y === void 0 && (Y = q.box.getCenter(scratchSortVector3).angleTo(b), S.set(q, Y));
22507
+ var ee = S.get(re);
22508
+ return ee === void 0 && (ee = re.box.getCenter(scratchSortVector3).angleTo(b), S.set(re, ee)), Y - ee;
22530
22509
  });
22531
22510
  var R = /* @__PURE__ */ new WeakSet(), C = this.observer.images.tiles;
22532
22511
  if (C)
22533
- for (var w = function(G) {
22534
- var ne = C.find(function(ce) {
22535
- return ce.level === G.level;
22512
+ for (var w = function(q) {
22513
+ var re = C.find(function(de) {
22514
+ return de.level === q.level;
22536
22515
  });
22537
- if (!ne)
22516
+ if (!re)
22538
22517
  return "continue";
22539
- R.add(G);
22540
- var $ = L.tileMeshes.get(G);
22541
- if ($) {
22542
- $.appearDuration = L.appearDuration;
22543
- var ee = $.updateTime(p);
22518
+ R.add(q);
22519
+ var Y = L.tileMeshes.get(q);
22520
+ if (Y) {
22521
+ Y.appearDuration = L.appearDuration;
22522
+ var ee = Y.updateTime(p);
22544
22523
  return ee && (d = !0), "continue";
22545
22524
  }
22546
22525
  if (L.pedding >= L.maxRequest)
22547
22526
  return "continue";
22548
- var re = Math.pow(2, G.level) * G.position.y, le = Math.pow(2, G.level) * G.position.x, ie = "".concat(L.observer.panoId, ".").concat(G.face, ".").concat(G.level, ".").concat(re, ".").concat(le), oe = ne[G.face], se = ne.size, de = L.imageOptions.transform, he = __assign(__assign({}, pick(L.imageOptions, ["format", "sharpen", "mappings"])), { key: "pano_tile.".concat(ie), size: ne.scale >= 1 ? void 0 : se * G.size * ne.scale, cut: G.size === 1 ? void 0 : [
22549
- se * G.position.x,
22550
- se * G.position.y,
22551
- se * G.size,
22552
- se * G.size
22527
+ var ne = Math.pow(2, q.level) * q.position.y, le = Math.pow(2, q.level) * q.position.x, ie = "".concat(L.observer.panoId, ".").concat(q.face, ".").concat(q.level, ".").concat(ne, ".").concat(le), se = re[q.face], ae = re.size, fe = L.imageOptions.transform, he = __assign(__assign({}, pick(L.imageOptions, ["format", "sharpen", "mappings"])), { key: "pano_tile.".concat(ie), size: re.scale >= 1 ? void 0 : ae * q.size * re.scale, cut: q.size === 1 ? void 0 : [
22528
+ ae * q.position.x,
22529
+ ae * q.position.y,
22530
+ ae * q.size,
22531
+ ae * q.size
22553
22532
  ] });
22554
- G.level === 1 && ne.scale >= 0.5 && (he.format === "jpg" || /\.jpg$/.test(oe)) && (he.size = void 0, he.quality || (he.quality = 70)), G.size === 1 && console.warn("tile: ".concat(he.key, " should not appear.")), L.pedding++;
22555
- var Re = L.textureLoader.loadTexture(oe, {
22533
+ q.level === 1 && re.scale >= 0.5 && (he.format === "jpg" || /\.jpg$/.test(se)) && (he.size = void 0, he.quality || (he.quality = 70)), q.size === 1 && console.warn("tile: ".concat(he.key, " should not appear.")), L.pedding++;
22534
+ var xe = L.textureLoader.loadTexture(se, {
22556
22535
  imageURL: {
22557
- transform: de,
22536
+ transform: fe,
22558
22537
  options: he
22559
22538
  },
22560
22539
  minFilter: THREE.LinearFilter,
22561
22540
  magFilter: THREE.LinearFilter,
22562
22541
  generateMipmaps: !1,
22563
22542
  fetcher: getFetcher(L.observer.work)
22564
- }).then(function(ce) {
22565
- return ce.body;
22543
+ }).then(function(de) {
22544
+ return de.body;
22566
22545
  });
22567
- Re.then(function(ce) {
22568
- return c.pedding--, ce;
22569
- }, function(ce) {
22570
- return c.pedding--, Promise.reject(ce);
22571
- }), $ = new TileMesh(G, Re), $.name = "tiling:tile-".concat(ie), $.visible = !1, $.appearDuration = L.appearDuration, L.tileMeshes.set(G, $), L.scene.add($), $.updateTime(p), d = !0;
22546
+ xe.then(function(de) {
22547
+ return c.pedding--, de;
22548
+ }, function(de) {
22549
+ return c.pedding--, Promise.reject(de);
22550
+ }), Y = new TileMesh(q, xe), Y.name = "tiling:tile-".concat(ie), Y.visible = !1, Y.appearDuration = L.appearDuration, L.tileMeshes.set(q, Y), L.scene.add(Y), Y.updateTime(p), d = !0;
22572
22551
  }, L = this, H = 0, M = T; H < M.length; H++) {
22573
22552
  var P = M[H];
22574
22553
  w(P);
22575
22554
  }
22576
22555
  var B = [], O = [];
22577
- this.tileMeshes.forEach(function(G, ne) {
22578
- R.has(ne) ? B.push(G) : O.push(G);
22579
- var $ = ne.level >= u && ne.level <= l;
22580
- G.visible !== $ && (G.visible = $, d = !0);
22556
+ this.tileMeshes.forEach(function(q, re) {
22557
+ R.has(re) ? B.push(q) : O.push(q);
22558
+ var Y = re.level >= u && re.level <= l;
22559
+ q.visible !== Y && (q.visible = Y, d = !0);
22581
22560
  });
22582
- for (var _ = O.sort(function(G, ne) {
22583
- return ne.activeTime - G.activeTime;
22561
+ for (var _ = O.sort(function(q, re) {
22562
+ return re.activeTime - q.activeTime;
22584
22563
  }).slice(Math.max(0, this.maxCacheTile - B.length)), N = 0, D = _; N < D.length; N++) {
22585
- var J = D[N];
22586
- this.tileMeshes.delete(J.node), this.scene.remove(J), J.dispose(), d = !0;
22564
+ var G = D[N];
22565
+ this.tileMeshes.delete(G.node), this.scene.remove(G), G.dispose(), d = !0;
22587
22566
  }
22588
22567
  if (d) {
22589
22568
  var K = t.getRenderTarget();
22590
22569
  scratchPrevClearColor$1.copy(t.getClearColor());
22591
- var Q = t.getClearAlpha(), U = t.autoClear, q = t.autoClearColor, X = t.autoClearDepth, Z = t.autoClearStencil, W = t.clippingPlanes;
22592
- t.autoClear = !0, t.autoClearColor = !0, t.autoClearDepth = !0, t.autoClearStencil = !0, t.clippingPlanes = clippingPlanes, t.setRenderTarget(this.renderTarget), t.setClearColor(clearColor$1, clearAlpha), t.render(this.scene, this.camera), t.setRenderTarget(K), t.setClearColor(scratchPrevClearColor$1, Q), t.autoClear = U, t.autoClearColor = q, t.autoClearDepth = X, t.autoClearStencil = Z, t.clippingPlanes = W;
22570
+ var J = t.getClearAlpha(), Q = t.autoClear, U = t.autoClearColor, X = t.autoClearDepth, j = t.autoClearStencil, $ = t.clippingPlanes;
22571
+ t.autoClear = !0, t.autoClearColor = !0, t.autoClearDepth = !0, t.autoClearStencil = !0, t.clippingPlanes = clippingPlanes, t.setRenderTarget(this.renderTarget), t.setClearColor(clearColor$1, clearAlpha), t.render(this.scene, this.camera), t.setRenderTarget(K), t.setClearColor(scratchPrevClearColor$1, J), t.autoClear = Q, t.autoClearColor = U, t.autoClearDepth = X, t.autoClearStencil = j, t.clippingPlanes = $;
22593
22572
  }
22594
22573
  return this.forceRenderWhenNextUpdate = !1, d;
22595
22574
  }, n;
@@ -22838,7 +22817,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
22838
22817
  return Math.log(l) * Math.LOG2E;
22839
22818
  }, s = t.height / 2 / Math.tan(r(n / 2)) * Math.tan(r(45)) * 2, u = Math.max(o(s / 512), 0);
22840
22819
  return u < 2.3 && u > 0.1 && (u = 1), u = u % 1 > 0.75 ? Math.ceil(u) : Math.floor(u), u;
22841
- }, tileAppearDuration: 0.5, tileMaxRequest: 3, flyEffectUseDepthBuffer: !1 }), PanoramaController = (
22820
+ }, tileAppearDuration: 0.5, tileMaxRequest: 3, flyEffectUseDepthBuffer: !0 }), PanoramaController = (
22842
22821
  /** @class */
22843
22822
  function(n) {
22844
22823
  __extends(t, n);
@@ -22967,26 +22946,26 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
22967
22946
  }
22968
22947
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(C.x + (w.x - C.x) * L, C.y + (w.y - C.y) * L, C.z + (w.z - C.z) * L);
22969
22948
  for (var P = [], B = [], O = 0, _ = this.locationMotion.keyframes; O < _.length; O++) {
22970
- var N = _[O], D = N.key, J = N.progress;
22971
- D !== void 0 && (P.push(D), J > this.locationMotion.progress && B.push(D));
22949
+ var N = _[O], D = N.key, G = N.progress;
22950
+ D !== void 0 && (P.push(D), G > this.locationMotion.progress && B.push(D));
22972
22951
  }
22973
- for (var K = 0, Q = Object.keys(this.panoResources); K < Q.length; K++) {
22974
- var U = Q[K];
22975
- if (!(B.indexOf(U) >= 0)) {
22976
- var q = this.panoResources[U];
22977
- if (q.panoPicture) {
22978
- var X = q.panoPicture.map;
22952
+ for (var K = 0, J = Object.keys(this.panoResources); K < J.length; K++) {
22953
+ var Q = J[K];
22954
+ if (!(B.indexOf(Q) >= 0)) {
22955
+ var U = this.panoResources[Q];
22956
+ if (U.panoPicture) {
22957
+ var X = U.panoPicture.map;
22979
22958
  if (X) {
22980
22959
  if (X === ((s = h.pano0) === null || s === void 0 ? void 0 : s.map) || X === ((u = h.pano1) === null || u === void 0 ? void 0 : u.map))
22981
22960
  continue;
22982
- X.dispose(), q.panoPicture = null;
22961
+ X.dispose(), U.panoPicture = null;
22983
22962
  }
22984
22963
  }
22985
- P.indexOf(U) >= 0 || delete this.panoResources[U];
22964
+ P.indexOf(Q) >= 0 || delete this.panoResources[Q];
22986
22965
  }
22987
22966
  }
22988
- var Z = panoParse(b.panoId);
22989
- Z !== this.currentPano && (this.currentPano = Z, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
22967
+ var j = panoParse(b.panoId);
22968
+ j !== this.currentPano && (this.currentPano = j, this.accessibleObserverFloorCheckCount = 0), this.emit("pano.moving", createEvent("pano.moving", {
22990
22969
  userAction: this.userAction,
22991
22970
  prevPano: panoParse(T.panoId),
22992
22971
  state: __assign(__assign(__assign(__assign({}, panoParse(S.panoId)), { mode: this.mode }), clonePose(this.camera.pose)), p),
@@ -22996,106 +22975,106 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
22996
22975
  }));
22997
22976
  }
22998
22977
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
22999
- var W = this.works.getResolvedObserver(this.currentPano), G = this.locationMotion.ended ? this.getForwardObserverOrNot() : null;
22978
+ var $ = this.works.getResolvedObserver(this.currentPano), q = this.locationMotion.ended ? this.getForwardObserverOrNot() : null;
23000
22979
  if (this.camera.pose.distance > 0.1 || R)
23001
- for (var ne = 0, $ = Object.keys(this.panoMeshes); ne < $.length; ne++) {
23002
- var ee = $[ne], re = this.panoMeshes[ee];
23003
- re.setOpacity(0), re.setCurrent(!1), re.updateTime && re.updateTime(e, r), re.visible = !1;
22980
+ for (var re = 0, Y = Object.keys(this.panoMeshes); re < Y.length; re++) {
22981
+ var ee = Y[re], ne = this.panoMeshes[ee];
22982
+ ne.setOpacity(0), ne.setCurrent(!1), ne.updateTime && ne.updateTime(e, r), ne.visible = !1;
23004
22983
  }
23005
- else if (W) {
23006
- var le = arrayMin(W.visibleIds, function(Le) {
22984
+ else if ($) {
22985
+ var le = arrayMin($.visibleIds, function(Le) {
23007
22986
  var He = o.works.getResolvedObserver(Le);
23008
- return He ? W.standingPosition.distanceTo(He.standingPosition) : 1 / 0;
22987
+ return He ? $.standingPosition.distanceTo(He.standingPosition) : 1 / 0;
23009
22988
  }, !0), ie = le[1];
23010
22989
  ie = clamp$1(ie, 2.5, 1 / 0);
23011
- for (var oe = W.visibleIds.concat(panoStringify(this.currentPano)), se = this.camera.getDirection(new THREE.Vector3()), de = 0, he = Object.keys(this.panoMeshes); de < he.length; de++) {
23012
- var ee = he[de], re = this.panoMeshes[ee], M = this.works.getResolvedObserver(ee);
23013
- if (oe.indexOf(ee) === -1)
23014
- re.setCurrent(!1), re.setOpacity(0);
22990
+ for (var se = $.visibleIds.concat(panoStringify(this.currentPano)), ae = this.camera.getDirection(new THREE.Vector3()), fe = 0, he = Object.keys(this.panoMeshes); fe < he.length; fe++) {
22991
+ var ee = he[fe], ne = this.panoMeshes[ee], M = this.works.getResolvedObserver(ee);
22992
+ if (se.indexOf(ee) === -1)
22993
+ ne.setCurrent(!1), ne.setOpacity(0);
23015
22994
  else if (!M)
23016
- re.setCurrent(!1), re.setOpacity(0);
22995
+ ne.setCurrent(!1), ne.setOpacity(0);
23017
22996
  else if (!M.loadable && !M.active)
23018
- re.setCurrent(!1), re.setOpacity(0);
22997
+ ne.setCurrent(!1), ne.setOpacity(0);
23019
22998
  else {
23020
- var Re = re.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
23021
- re.setCurrent(!re.loading && re.progress === 0 && G !== null && G.panoId === ee), re.setOpacity(Re < 0.01 ? 0 : clamp$1(ie / Re * 1.2, 0.4, 0.85));
23022
- var ce = this.camera.position.clone().setY(re.position.y), Ce = new THREE.Vector3().copy(re.position).sub(ce).normalize();
22999
+ var xe = ne.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
23000
+ ne.setCurrent(!ne.loading && ne.progress === 0 && q !== null && q.panoId === ee), ne.setOpacity(xe < 0.01 ? 0 : clamp$1(ie / xe * 1.2, 0.4, 0.85));
23001
+ var de = this.camera.position.clone().setY(ne.position.y), Re = new THREE.Vector3().copy(ne.position).sub(de).normalize();
23023
23002
  if (ee === panoStringify(this.currentPano)) {
23024
- var j = clamp$1((0.5 - ce.distanceTo(re.position)) / 0.5, 0, 1);
23025
- Ce.multiplyScalar(1 - j).add(se.clone().multiplyScalar(j));
23003
+ var te = clamp$1((0.5 - de.distanceTo(ne.position)) / 0.5, 0, 1);
23004
+ Re.multiplyScalar(1 - te).add(ae.clone().multiplyScalar(te));
23026
23005
  }
23027
- Ce.length() > 0 && re.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(Ce.x, Ce.z), 0));
23006
+ Re.length() > 0 && ne.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(Re.x, Re.z), 0));
23028
23007
  }
23029
- re.updateTime && re.updateTime(e, r);
23008
+ ne.updateTime && ne.updateTime(e, r);
23030
23009
  }
23031
23010
  }
23032
- if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && W) {
23033
- for (var te = [], V = 0, be = W.accessibleIds; V < be.length; V++) {
23034
- var ee = be[V], M = this.works.getResolvedObserver(ee);
23035
- M && te.push(M);
23011
+ if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && $) {
23012
+ for (var W = [], z = 0, Ce = $.accessibleIds; z < Ce.length; z++) {
23013
+ var ee = Ce[z], M = this.works.getResolvedObserver(ee);
23014
+ M && W.push(M);
23036
23015
  }
23037
- if (te.sort(function(Le, He) {
23038
- return Le.standingPosition.distanceTo(W.standingPosition) - He.standingPosition.distanceTo(W.standingPosition);
23039
- }), te.length) {
23040
- this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % te.length;
23041
- var fe = te[this.accessibleObserverFloorCheckCount], re = this.panoMeshes[fe.panoId], ve = this.modelScene.models.find(function(He) {
23042
- return He.work === (fe == null ? void 0 : fe.work);
23016
+ if (W.sort(function(Le, He) {
23017
+ return Le.standingPosition.distanceTo($.standingPosition) - He.standingPosition.distanceTo($.standingPosition);
23018
+ }), W.length) {
23019
+ this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % W.length;
23020
+ var ce = W[this.accessibleObserverFloorCheckCount], ne = this.panoMeshes[ce.panoId], ve = this.modelScene.models.find(function(He) {
23021
+ return He.work === (ce == null ? void 0 : ce.work);
23043
23022
  });
23044
- if (fe && re && ve && ve.visible) {
23023
+ if (ce && ne && ve && ve.visible) {
23045
23024
  var Ve = 0.3, rt = 0.05, We = 5e-3, me = adjustPanoCircleMeshVectors.map(function(He) {
23046
- scratchVector3$1.copy(He), scratchVector3$1.setY(Ve), scratchRaycaster$1.ray.origin.copy(fe.standingPosition), scratchRaycaster$1.ray.origin.add(scratchVector3$1), scratchRaycaster$1.ray.direction.set(0, -1, 0);
23025
+ scratchVector3$1.copy(He), scratchVector3$1.setY(Ve), scratchRaycaster$1.ray.origin.copy(ce.standingPosition), scratchRaycaster$1.ray.origin.add(scratchVector3$1), scratchRaycaster$1.ray.direction.set(0, -1, 0);
23047
23026
  var Ge = ve.intersectRaycaster(scratchRaycaster$1, null, !0)[0];
23048
- return Ge && Ge.distance - We <= Ve ? new THREE.Vector3().copy(fe.standingPosition).setY(Ge.point.y + We) : fe.standingPosition;
23027
+ return Ge && Ge.distance - We <= Ve ? new THREE.Vector3().copy(ce.standingPosition).setY(Ge.point.y + We) : ce.standingPosition;
23049
23028
  });
23050
23029
  me.sort(function(He, Ge) {
23051
23030
  return Ge.y - He.y;
23052
23031
  });
23053
- var ae = me[Math.floor(me.length / 2)], pe = me.filter(function(He) {
23054
- return He.distanceTo(ae) <= rt;
23032
+ var oe = me[Math.floor(me.length / 2)], pe = me.filter(function(He) {
23033
+ return He.distanceTo(oe) <= rt;
23055
23034
  })[0];
23056
- pe && !pe.equals(re.position) && (re.position.copy(pe), this.needsRender = !0);
23035
+ pe && !pe.equals(ne.position) && (ne.position.copy(pe), this.needsRender = !0);
23057
23036
  }
23058
23037
  this.accessibleObserverFloorCheckCount++;
23059
23038
  }
23060
23039
  }
23061
23040
  {
23062
- var L = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, Me = Math.round(L), Se = this.modelScene.parameter.pano0, Pe = this.modelScene.parameter.pano1, Fe = Me === 0 ? Se : Pe, M = void 0;
23041
+ var L = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, Me = Math.round(L), Te = this.modelScene.parameter.pano0, Pe = this.modelScene.parameter.pano1, Fe = Me === 0 ? Te : Pe, M = void 0;
23063
23042
  if (Fe && (M = this.works.getResolvedObserver(Fe.panoId), M || (M = this.panoPictureObserverMap.get(Fe))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = L <= 0.5 || L < 1 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !M || !Fe || this.tileLevelForFov === !1)
23064
23043
  this.tiling.setObserver(null), this.tiling.update(this.renderer, this.camera, null, new THREE.Matrix4(), 1, 0, 0), this.modelScene.parameter.set("refinedScreen", null);
23065
23044
  else {
23066
- var Ae = getImageSizeLevel(Fe.mapSize), Te = Ae + 1, Ie = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Be = Math.floor(this.tileLevelForFov(this.camera.fov, Ie)), qe = Be > Ae ? Be : 0;
23045
+ var Ae = getImageSizeLevel(Fe.mapSize), be = Ae + 1, Ie = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), Be = Math.floor(this.tileLevelForFov(this.camera.fov, Ie)), qe = Be > Ae ? Be : 0;
23067
23046
  this.tiling.setObserver(M);
23068
- var ke = this.tiling.update(this.renderer, this.camera, Fe.map, Fe.matrix, Fe.zoom, Te, qe), Ne = {
23047
+ var ke = this.tiling.update(this.renderer, this.camera, Fe.map, Fe.matrix, Fe.zoom, be, qe), Ne = {
23069
23048
  map: this.tiling.renderTarget.texture,
23070
23049
  matrixInverse: this.tiling.camera.matrixWorldInverse,
23071
23050
  projectionMatrix: this.tiling.camera.projectionMatrix,
23072
23051
  pano: Me,
23073
- opacity: (Se == null ? void 0 : Se.panoId) === (Pe == null ? void 0 : Pe.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
23052
+ opacity: (Te == null ? void 0 : Te.panoId) === (Pe == null ? void 0 : Pe.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
23074
23053
  }, _e = this.modelScene.parameter.refinedScreen;
23075
23054
  (ke || Ne.pano !== (_e == null ? void 0 : _e.pano) || Ne.opacity !== (_e == null ? void 0 : _e.opacity)) && this.modelScene.parameter.set("refinedScreen", Ne);
23076
23055
  }
23077
23056
  }
23078
- this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), W && W.video && (this.needsRender = !0), this.intersectMesh.scale.setScalar(clamp$1(this.cameraMotion.value.fov / 45, 0, 1));
23057
+ this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e), $ && $.video && (this.needsRender = !0), this.intersectMesh.scale.setScalar(clamp$1(this.cameraMotion.value.fov / 45, 0, 1));
23079
23058
  {
23080
- var Ue = b.effect, De = this.modelScene.parameter, Se = De.pano0, Pe = De.pano1;
23081
- if (Se && Pe && Se !== Pe && Ue === "fly" && this.flyEffectUseDepthBuffer) {
23082
- if (((d = this.modelScene.parameter.pano0Depth) === null || d === void 0 ? void 0 : d.panoId) !== Se.panoId || ((f = this.modelScene.parameter.pano1Depth) === null || f === void 0 ? void 0 : f.panoId) !== Pe.panoId) {
23083
- var je = 500, xe = 512;
23084
- this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== xe && this.pano0DepthCubeRenderTarget.setSize(xe, xe) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(xe, {
23059
+ var Ue = b.effect, De = this.modelScene.parameter, Te = De.pano0, Pe = De.pano1;
23060
+ if (Te && Pe && Te !== Pe && Ue === "fly" && this.flyEffectUseDepthBuffer) {
23061
+ if (((d = this.modelScene.parameter.pano0Depth) === null || d === void 0 ? void 0 : d.panoId) !== Te.panoId || ((f = this.modelScene.parameter.pano1Depth) === null || f === void 0 ? void 0 : f.panoId) !== Pe.panoId) {
23062
+ var je = 500, Se = 512;
23063
+ this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== Se && this.pano0DepthCubeRenderTarget.setSize(Se, Se) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Se, {
23085
23064
  minFilter: THREE.NearestFilter,
23086
23065
  magFilter: THREE.NearestFilter,
23087
23066
  generateMipmaps: !1
23088
- }), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== xe && this.pano1DepthCubeRenderTarget.setSize(xe, xe) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(xe, {
23067
+ }), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== Se && this.pano1DepthCubeRenderTarget.setSize(Se, Se) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Se, {
23089
23068
  minFilter: THREE.NearestFilter,
23090
23069
  magFilter: THREE.NearestFilter,
23091
23070
  generateMipmaps: !1
23092
23071
  });
23093
23072
  var Oe = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
23094
- Oe.matrix.copy(Se.matrix), Oe.matrixWorld.copy(Oe.matrix), Oe.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Oe, je);
23073
+ Oe.matrix.copy(Te.matrix), Oe.matrixWorld.copy(Oe.matrix), Oe.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Oe, je);
23095
23074
  var we = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
23096
23075
  we.matrix.copy(Pe.matrix), we.matrixWorld.copy(we.matrix), we.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, we, je), this.modelScene.parameter.set({
23097
23076
  pano0Depth: {
23098
- panoId: Se.panoId,
23077
+ panoId: Te.panoId,
23099
23078
  map: this.pano0DepthCubeRenderTarget.texture,
23100
23079
  mapSize: this.pano0DepthCubeRenderTarget.width,
23101
23080
  maxDepth: je
@@ -23369,41 +23348,41 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23369
23348
  { key: w.key, progress: N / T, value: w.value },
23370
23349
  { key: y, progress: 1, value: { count: w.value.count + 1, distance: 0 } }
23371
23350
  ];
23372
- var J = this.locationMotionKeyframesLength(this.locationMotion.keyframes), K = this.locationMotionKeyframesLength(S);
23373
- J === 0 || J === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * J / K;
23351
+ var G = this.locationMotionKeyframesLength(this.locationMotion.keyframes), K = this.locationMotionKeyframesLength(S);
23352
+ G === 0 || G === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * G / K;
23374
23353
  }
23375
- var Q = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), U = {
23354
+ var J = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), Q = {
23376
23355
  longitude: o.longitude,
23377
23356
  latitude: o.latitude,
23378
23357
  fov: o.fov
23379
- }, q = __assign(__assign({}, e), { mode: this.mode, longitude: (l = U.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = U.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (d = U.fov) !== null && d !== void 0 ? d : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), X = this.currentPano;
23358
+ }, U = __assign(__assign({}, e), { mode: this.mode, longitude: (l = Q.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = Q.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (d = Q.fov) !== null && d !== void 0 ? d : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), X = this.currentPano;
23380
23359
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
23381
23360
  options: o,
23382
23361
  prevPano: X,
23383
23362
  progress: 0,
23384
- state: q,
23363
+ state: U,
23385
23364
  userAction: this.userAction,
23386
23365
  error: null
23387
- })), o.moveStartCallback && o.moveStartCallback(q), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop$1, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
23388
- this.cameraMotion.set(U, Q).catch(noop$1);
23366
+ })), o.moveStartCallback && o.moveStartCallback(U), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop$1, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
23367
+ this.cameraMotion.set(Q, J).catch(noop$1);
23389
23368
  else {
23390
- var Z = coordinatesToVector({
23369
+ var j = coordinatesToVector({
23391
23370
  longitude: this.cameraMotion.value.longitude,
23392
23371
  latitude: this.cameraMotion.value.latitude
23393
- }), W = coordinatesToVector({
23394
- longitude: (f = U.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
23395
- latitude: (h = U.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
23396
- }), G = new THREE.Object3D();
23397
- G.lookAt(Z);
23398
- var ne = new THREE.Matrix4().makeRotationFromQuaternion(G.quaternion);
23399
- G.lookAt(W);
23400
- var $ = new THREE.Matrix4().makeRotationFromQuaternion(G.quaternion), ee = new THREE.Matrix4().getInverse(ne).premultiply($), re = this.cameraMotion.value.fov, le = (p = U.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, ie = 1;
23372
+ }), $ = coordinatesToVector({
23373
+ longitude: (f = Q.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
23374
+ latitude: (h = Q.latitude) !== null && h !== void 0 ? h : this.cameraMotion.value.latitude
23375
+ }), q = new THREE.Object3D();
23376
+ q.lookAt(j);
23377
+ var re = new THREE.Matrix4().makeRotationFromQuaternion(q.quaternion);
23378
+ q.lookAt($);
23379
+ var Y = new THREE.Matrix4().makeRotationFromQuaternion(q.quaternion), ee = new THREE.Matrix4().getInverse(re).premultiply(Y), ne = this.cameraMotion.value.fov, le = (p = Q.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, ie = 1;
23401
23380
  r.effect === "zoomin" ? ie = 1.5 : r.effect === "zoomout" && (ie = 0.4);
23402
- for (var oe = clamp$1(le * ie, 1, 170), se = 0; se < S.length - 1; se++) {
23403
- var de = S[se].key;
23404
- if (de) {
23405
- var he = this.panoResources[de];
23406
- he && (he.fixCameraTransform.copy(ee), he.panoPicture && (he.panoPicture.zoom = Math.tan(oe / 2 / 180 * Math.PI) / Math.tan(re / 2 / 180 * Math.PI)));
23381
+ for (var se = clamp$1(le * ie, 1, 170), ae = 0; ae < S.length - 1; ae++) {
23382
+ var fe = S[ae].key;
23383
+ if (fe) {
23384
+ var he = this.panoResources[fe];
23385
+ he && (he.fixCameraTransform.copy(ee), he.panoPicture && (he.panoPicture.zoom = Math.tan(se / 2 / 180 * Math.PI) / Math.tan(ne / 2 / 180 * Math.PI)));
23407
23386
  }
23408
23387
  }
23409
23388
  this.cameraMotion.setKeyframes([
@@ -23418,54 +23397,54 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23418
23397
  {
23419
23398
  progress: 0,
23420
23399
  value: {
23421
- longitude: (g = U.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
23422
- latitude: (A = U.latitude) !== null && A !== void 0 ? A : this.cameraMotion.value.latitude,
23423
- fov: oe
23400
+ longitude: (g = Q.longitude) !== null && g !== void 0 ? g : this.cameraMotion.value.longitude,
23401
+ latitude: (A = Q.latitude) !== null && A !== void 0 ? A : this.cameraMotion.value.latitude,
23402
+ fov: se
23424
23403
  }
23425
23404
  },
23426
23405
  {
23427
23406
  progress: 1,
23428
23407
  value: {
23429
- longitude: (m = U.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
23430
- latitude: (E = U.latitude) !== null && E !== void 0 ? E : this.cameraMotion.value.latitude,
23408
+ longitude: (m = Q.longitude) !== null && m !== void 0 ? m : this.cameraMotion.value.longitude,
23409
+ latitude: (E = Q.latitude) !== null && E !== void 0 ? E : this.cameraMotion.value.latitude,
23431
23410
  fov: le
23432
23411
  }
23433
23412
  }
23434
- ], Q).catch(noop$1);
23413
+ ], J).catch(noop$1);
23435
23414
  }
23436
- var Re = this.locationMotion.setKeyframes(S, Q, R);
23437
- Re.then(
23415
+ var xe = this.locationMotion.setKeyframes(S, J, R);
23416
+ xe.then(
23438
23417
  // resolve
23439
23418
  // 动画结束
23440
23419
  function() {
23441
- for (var ce = 0, Ce = s.modelScene.children; ce < Ce.length; ce++) {
23442
- var j = Ce[ce];
23443
- j instanceof Model && j.show();
23420
+ for (var de = 0, Re = s.modelScene.children; de < Re.length; de++) {
23421
+ var te = Re[de];
23422
+ te instanceof Model && te.show();
23444
23423
  }
23445
- var te = __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 });
23424
+ var W = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: s.camera.pose.distance });
23446
23425
  s.emit("pano.arrived", createEvent("pano.arrived", {
23447
23426
  options: o,
23448
23427
  prevPano: X,
23449
23428
  progress: 1,
23450
- state: te,
23429
+ state: W,
23451
23430
  userAction: s.userAction,
23452
23431
  error: null
23453
- })), o.moveEndCallback && o.moveEndCallback(te);
23454
- var V = s.works.getResolvedObserver(e);
23455
- if (V && V.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
23456
- var be = {
23432
+ })), o.moveEndCallback && o.moveEndCallback(W);
23433
+ var z = s.works.getResolvedObserver(e);
23434
+ if (z && z.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
23435
+ var Ce = {
23457
23436
  map: s.videoTexture,
23458
- size: V.video.size,
23459
- matrix: V.video.matrix,
23460
- panoMatrix: V.matrix,
23437
+ size: z.video.size,
23438
+ matrix: z.video.matrix,
23439
+ panoMatrix: z.matrix,
23461
23440
  alpha: 1
23462
- }, fe = createUuid(), ve = s.videoTexture.image;
23463
- ve.setAttribute("uuid", fe), canplayVideo().then(function(Ve) {
23464
- Ve && V.video && ve.getAttribute("uuid") === fe && (ve.oncanplay = function() {
23441
+ }, ce = createUuid(), ve = s.videoTexture.image;
23442
+ ve.setAttribute("uuid", ce), canplayVideo().then(function(Ve) {
23443
+ Ve && z.video && ve.getAttribute("uuid") === ce && (ve.oncanplay = function() {
23465
23444
  ve.oncanplay = noop$1, ve.play();
23466
23445
  }, ve.ontimeupdate = function() {
23467
- ve.currentTime > 0.5 && (ve.ontimeupdate = noop$1, s.panoVideo.setMaterial(be));
23468
- }, ve.src = V.video.source);
23446
+ ve.currentTime > 0.5 && (ve.ontimeupdate = noop$1, s.panoVideo.setMaterial(Ce));
23447
+ }, ve.src = z.video.source);
23469
23448
  }).catch(function() {
23470
23449
  ve.removeAttribute("uuid");
23471
23450
  });
@@ -23478,7 +23457,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23478
23457
  options: o,
23479
23458
  prevPano: X,
23480
23459
  progress: 0,
23481
- state: q,
23460
+ state: U,
23482
23461
  userAction: s.userAction,
23483
23462
  error: null
23484
23463
  })), o.moveCancelCallback && o.moveCancelCallback();
@@ -23529,19 +23508,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23529
23508
  }
23530
23509
  var u = e.center.raycaster, l = this.camera.getDirection(new THREE.Vector3()).setY(0), c = null, d = this.works.getResolvedObserver(this.currentPano);
23531
23510
  if (d) {
23532
- var f = d.accessibleIds.filter(function(q) {
23533
- if (q === panoStringify(r.currentPano))
23511
+ var f = d.accessibleIds.filter(function(U) {
23512
+ if (U === panoStringify(r.currentPano))
23534
23513
  return !1;
23535
- var X = r.works.getResolvedObserver(q);
23514
+ var X = r.works.getResolvedObserver(U);
23536
23515
  return !X || X.position.distanceTo(r.camera.position) > r.maxAccessibleDistance ? !1 : X.loadable || X.active;
23537
23516
  }), h = this.modelScene.intersectRaycaster(u)[0];
23538
23517
  if (h) {
23539
- var p = arrayMin(f, function(q) {
23540
- var X = r.works.getResolvedObserver(q);
23518
+ var p = arrayMin(f, function(U) {
23519
+ var X = r.works.getResolvedObserver(U);
23541
23520
  if (!X)
23542
23521
  return 1 / 0;
23543
- var Z = X.standingPosition.clone();
23544
- return Z.distanceTo(h.point);
23522
+ var j = X.standingPosition.clone();
23523
+ return j.distanceTo(h.point);
23545
23524
  }, !0), g = p[0], A = p[1];
23546
23525
  g && A < this.panoTapTriggerRadius && (c = (o = this.works.getResolvedObserver(g)) !== null && o !== void 0 ? o : null);
23547
23526
  }
@@ -23566,31 +23545,31 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$1 = new THREE.Vec
23566
23545
  }
23567
23546
  }
23568
23547
  }
23569
- var _ = L.length > 0 ? L : __spreadArray(__spreadArray([], C, !0), w, !0), N = _.slice().sort(function(q, X) {
23570
- return q.angleTo(R) - X.angleTo(R);
23548
+ var _ = L.length > 0 ? L : __spreadArray(__spreadArray([], C, !0), w, !0), N = _.slice().sort(function(U, X) {
23549
+ return U.angleTo(R) - X.angleTo(R);
23571
23550
  })[0];
23572
23551
  if (N && N.angleTo(l) > S && (b.longitude = Math.atan2(-N.x, -N.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
23573
- var D = e.state.fov, J = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(D) : this.minLatitude, -Math.PI / 2, Math.PI / 2), K = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(D) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
23574
- b.latitude = clamp$1(0, J, K);
23552
+ var D = e.state.fov, G = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(D) : this.minLatitude, -Math.PI / 2, Math.PI / 2), K = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(D) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
23553
+ b.latitude = clamp$1(0, G, K);
23575
23554
  }
23576
- var Q = __assign({}, e.state);
23577
- if (Q.workCode = c.pano.workCode, Q.panoIndex = c.pano.panoIndex, b.longitude !== void 0 && (Q.longitude = b.longitude), b.latitude !== void 0 && (Q.latitude = b.latitude), b.fov !== void 0 && (Q.fov = b.fov), Q.distance = 0, Q.offset = c.position.clone(), e.state = Q, this.emit("gesture.tap", e), !e.defaultPrevented) {
23555
+ var J = __assign({}, e.state);
23556
+ if (J.workCode = c.pano.workCode, J.panoIndex = c.pano.panoIndex, b.longitude !== void 0 && (J.longitude = b.longitude), b.latitude !== void 0 && (J.latitude = b.latitude), b.fov !== void 0 && (J.fov = b.fov), J.distance = 0, J.offset = c.position.clone(), e.state = J, this.emit("gesture.tap", e), !e.defaultPrevented) {
23578
23557
  if (this.emit("pano.select", createEvent("pano.select", {
23579
23558
  prevPano: this.currentPano,
23580
- state: Q,
23559
+ state: J,
23581
23560
  userAction: e.userAction,
23582
23561
  options: b,
23583
23562
  progress: 0,
23584
23563
  error: null
23585
23564
  })), c && !c.active) {
23586
- var U = c.panoId;
23587
- this.panoMeshes[U] && (this.panoMeshes[U].setDisabled(!1), this.panoMeshes[U].setLoading(!0));
23565
+ var Q = c.panoId;
23566
+ this.panoMeshes[Q] && (this.panoMeshes[Q].setDisabled(!1), this.panoMeshes[Q].setLoading(!0));
23588
23567
  }
23589
23568
  c && c.active && this.emit("pano.request", createEvent("pano.request", {
23590
23569
  userAction: e.userAction,
23591
23570
  prevPano: this.currentPano,
23592
23571
  progress: 0,
23593
- state: Q,
23572
+ state: J,
23594
23573
  options: b,
23595
23574
  error: null
23596
23575
  }));
@@ -24536,23 +24515,23 @@ void main() {
24536
24515
  M.copy(P), S = !0;
24537
24516
  }
24538
24517
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(M.x + (P.x - M.x) * B, M.y + (P.y - M.y) * B, M.z + (P.z - M.z) * B);
24539
- for (var N = [], D = [], J = 0, K = this.locationMotion.keyframes; J < K.length; J++) {
24540
- var Q = K[J], U = Q.key, q = Q.progress;
24541
- U !== void 0 && (N.push(U), q > this.locationMotion.progress && D.push(U));
24518
+ for (var N = [], D = [], G = 0, K = this.locationMotion.keyframes; G < K.length; G++) {
24519
+ var J = K[G], Q = J.key, U = J.progress;
24520
+ Q !== void 0 && (N.push(Q), U > this.locationMotion.progress && D.push(Q));
24542
24521
  }
24543
- for (var X = 0, Z = Object.keys(this.panoResources); X < Z.length; X++) {
24544
- var W = Z[X];
24545
- if (!(D.indexOf(W) >= 0)) {
24546
- var G = this.panoResources[W];
24547
- if (G.panoPicture) {
24548
- var ne = G.panoPicture.map;
24549
- if (ne) {
24550
- if (ne === ((o = h.pano0) === null || o === void 0 ? void 0 : o.map) || ne === ((s = h.pano1) === null || s === void 0 ? void 0 : s.map))
24522
+ for (var X = 0, j = Object.keys(this.panoResources); X < j.length; X++) {
24523
+ var $ = j[X];
24524
+ if (!(D.indexOf($) >= 0)) {
24525
+ var q = this.panoResources[$];
24526
+ if (q.panoPicture) {
24527
+ var re = q.panoPicture.map;
24528
+ if (re) {
24529
+ if (re === ((o = h.pano0) === null || o === void 0 ? void 0 : o.map) || re === ((s = h.pano1) === null || s === void 0 ? void 0 : s.map))
24551
24530
  continue;
24552
- ne.dispose(), G.panoPicture = null;
24531
+ re.dispose(), q.panoPicture = null;
24553
24532
  }
24554
24533
  }
24555
- N.indexOf(W) >= 0 || delete this.panoResources[W];
24534
+ N.indexOf($) >= 0 || delete this.panoResources[$];
24556
24535
  }
24557
24536
  }
24558
24537
  this.currentPano = panoParse(H.panoId), this.emit("pano.moving", createEvent("pano.moving", {
@@ -24565,74 +24544,74 @@ void main() {
24565
24544
  }));
24566
24545
  }
24567
24546
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), p.offset && this.camera.position.copy(p.offset), panoEqual(this.currentPano, f) && this.updatePanoMeshesVisible();
24568
- var $ = this.camera.pose.longitude, ee = this.camera.pose.latitude;
24547
+ var Y = this.camera.pose.longitude, ee = this.camera.pose.latitude;
24569
24548
  this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose();
24570
- var re = this.works.getResolvedObserver(this.currentPano);
24549
+ var ne = this.works.getResolvedObserver(this.currentPano);
24571
24550
  if (this.camera.pose.distance > 0.1 || S)
24572
24551
  for (var le = 0, ie = Object.keys(this.panoMeshes); le < ie.length; le++) {
24573
- var oe = ie[le], se = this.panoMeshes[oe];
24574
- se.setOpacity(0), se.updateTime && se.updateTime(e, r), se.visible = !1;
24552
+ var se = ie[le], ae = this.panoMeshes[se];
24553
+ ae.setOpacity(0), ae.updateTime && ae.updateTime(e, r), ae.visible = !1;
24575
24554
  }
24576
- else if (re)
24577
- for (var de = re.visibleIds.concat(panoStringify(this.currentPano)), he = 0, Re = de; he < Re.length; he++) {
24578
- var oe = Re[he], ce = panoParse(oe), _ = this.works.getResolvedObserver(ce);
24555
+ else if (ne)
24556
+ for (var fe = ne.visibleIds.concat(panoStringify(this.currentPano)), he = 0, xe = fe; he < xe.length; he++) {
24557
+ var se = xe[he], de = panoParse(se), _ = this.works.getResolvedObserver(de);
24579
24558
  if (_) {
24580
- var se = this.panoMeshes[oe];
24559
+ var ae = this.panoMeshes[se];
24581
24560
  if (!_.loadable && !_.active) {
24582
- se.setOpacity(0);
24561
+ ae.setOpacity(0);
24583
24562
  continue;
24584
24563
  }
24585
- var Ce = se.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
24586
- Ce < 0.05 ? se.setOpacity(0) : se.setOpacity(clamp$1(1.5 / Ce, 0, 1)), panoEqual(this.currentPano, ce) && se.setOpacity(0), se.lookAt(this.camera.position);
24564
+ var Re = ae.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
24565
+ Re < 0.05 ? ae.setOpacity(0) : ae.setOpacity(clamp$1(1.5 / Re, 0, 1)), panoEqual(this.currentPano, de) && ae.setOpacity(0), ae.lookAt(this.camera.position);
24587
24566
  }
24588
24567
  }
24589
24568
  if (this.locationMotion.ended)
24590
- for (var j = this.intersect(e), te = 0, V = this.works.resolvedObservers; te < V.length; te++) {
24591
- var _ = V[te], se = this.panoMeshes[_.panoId];
24592
- se && (se.setCurrent(se === j), se.updateTime && se.updateTime(e, r));
24569
+ for (var te = this.intersect(e), W = 0, z = this.works.resolvedObservers; W < z.length; W++) {
24570
+ var _ = z[W], ae = this.panoMeshes[_.panoId];
24571
+ ae && (ae.setCurrent(ae === te), ae.updateTime && ae.updateTime(e, r));
24593
24572
  }
24594
- ($ !== this.camera.pose.longitude || ee !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop$1), this.emit("camera.update", createEvent("camera.update", {
24573
+ (Y !== this.camera.pose.longitude || ee !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop$1), this.emit("camera.update", createEvent("camera.update", {
24595
24574
  userAction: !0,
24596
24575
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
24597
24576
  })));
24598
24577
  {
24599
- var B = (u = this.modelScene.parameter.progress) !== null && u !== void 0 ? u : 1, be = Math.round(B), fe = this.modelScene.parameter.pano0, ve = this.modelScene.parameter.pano1, ce = be === 0 ? fe : ve, _ = void 0;
24600
- if (ce && (_ = this.works.getResolvedObserver(ce.panoId), _ || (_ = this.panoPictureObserverMap.get(ce))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = B <= 0.5 ? 0 : B < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !_ || !ce || this.tileLevelForFov === !1)
24578
+ var B = (u = this.modelScene.parameter.progress) !== null && u !== void 0 ? u : 1, Ce = Math.round(B), ce = this.modelScene.parameter.pano0, ve = this.modelScene.parameter.pano1, de = Ce === 0 ? ce : ve, _ = void 0;
24579
+ if (de && (_ = this.works.getResolvedObserver(de.panoId), _ || (_ = this.panoPictureObserverMap.get(de))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = B <= 0.5 ? 0 : B < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !_ || !de || this.tileLevelForFov === !1)
24601
24580
  this.tiling.setObserver(null), this.tiling.update(this.renderer, this.camera, null, new THREE.Matrix4(), 1, 0, 0), this.modelScene.parameter.set("refinedScreen", null);
24602
24581
  else {
24603
- var Ve = getImageSizeLevel(ce.mapSize), rt = Ve + 1, We = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), me = Math.floor(this.tileLevelForFov(this.camera.fov, We)), ae = me > Ve ? me : 0;
24582
+ var Ve = getImageSizeLevel(de.mapSize), rt = Ve + 1, We = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), me = Math.floor(this.tileLevelForFov(this.camera.fov, We)), oe = me > Ve ? me : 0;
24604
24583
  this.tiling.setObserver(_);
24605
- var pe = this.tiling.update(this.renderer, this.camera, ce.map, ce.matrix, ce.zoom, rt, ae), Me = {
24584
+ var pe = this.tiling.update(this.renderer, this.camera, de.map, de.matrix, de.zoom, rt, oe), Me = {
24606
24585
  map: this.tiling.renderTarget.texture,
24607
24586
  matrixInverse: this.tiling.camera.matrixWorldInverse,
24608
24587
  projectionMatrix: this.tiling.camera.projectionMatrix,
24609
- pano: be,
24610
- opacity: (fe == null ? void 0 : fe.panoId) === (ve == null ? void 0 : ve.panoId) ? 1 : easeInQuart(Math.abs(((l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 0) - 0.5) * 2)
24611
- }, Se = this.modelScene.parameter.refinedScreen;
24612
- (pe || Me.pano !== (Se == null ? void 0 : Se.pano) || Me.opacity !== (Se == null ? void 0 : Se.opacity)) && this.modelScene.parameter.set("refinedScreen", Me);
24588
+ pano: Ce,
24589
+ opacity: (ce == null ? void 0 : ce.panoId) === (ve == null ? void 0 : ve.panoId) ? 1 : easeInQuart(Math.abs(((l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 0) - 0.5) * 2)
24590
+ }, Te = this.modelScene.parameter.refinedScreen;
24591
+ (pe || Me.pano !== (Te == null ? void 0 : Te.pano) || Me.opacity !== (Te == null ? void 0 : Te.opacity)) && this.modelScene.parameter.set("refinedScreen", Me);
24613
24592
  }
24614
24593
  }
24615
24594
  this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
24616
24595
  {
24617
- var Pe = y.effect, Fe = this.modelScene.parameter, fe = Fe.pano0, ve = Fe.pano1;
24618
- if (fe && ve && fe !== ve && Pe === "fly" && this.flyEffectUseDepthBuffer) {
24619
- if (((c = this.modelScene.parameter.pano0Depth) === null || c === void 0 ? void 0 : c.panoId) !== fe.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== ve.panoId) {
24620
- var Ae = 500, Te = 512;
24621
- this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== Te && this.pano0DepthCubeRenderTarget.setSize(Te, Te) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Te, {
24596
+ var Pe = y.effect, Fe = this.modelScene.parameter, ce = Fe.pano0, ve = Fe.pano1;
24597
+ if (ce && ve && ce !== ve && Pe === "fly" && this.flyEffectUseDepthBuffer) {
24598
+ if (((c = this.modelScene.parameter.pano0Depth) === null || c === void 0 ? void 0 : c.panoId) !== ce.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== ve.panoId) {
24599
+ var Ae = 500, be = 512;
24600
+ this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== be && this.pano0DepthCubeRenderTarget.setSize(be, be) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(be, {
24622
24601
  minFilter: THREE.NearestFilter,
24623
24602
  magFilter: THREE.NearestFilter,
24624
24603
  generateMipmaps: !1
24625
- }), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== Te && this.pano1DepthCubeRenderTarget.setSize(Te, Te) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(Te, {
24604
+ }), this.pano1DepthCubeRenderTarget ? this.pano1DepthCubeRenderTarget.width !== be && this.pano1DepthCubeRenderTarget.setSize(be, be) : this.pano1DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(be, {
24626
24605
  minFilter: THREE.NearestFilter,
24627
24606
  magFilter: THREE.NearestFilter,
24628
24607
  generateMipmaps: !1
24629
24608
  });
24630
24609
  var Ie = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
24631
- Ie.matrix.copy(fe.matrix), Ie.matrixWorld.copy(Ie.matrix), Ie.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ie, Ae);
24610
+ Ie.matrix.copy(ce.matrix), Ie.matrixWorld.copy(Ie.matrix), Ie.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Ie, Ae);
24632
24611
  var Be = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
24633
24612
  Be.matrix.copy(ve.matrix), Be.matrixWorld.copy(Be.matrix), Be.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Be, Ae), this.modelScene.parameter.set({
24634
24613
  pano0Depth: {
24635
- panoId: fe.panoId,
24614
+ panoId: ce.panoId,
24636
24615
  map: this.pano0DepthCubeRenderTarget.texture,
24637
24616
  mapSize: this.pano0DepthCubeRenderTarget.width,
24638
24617
  maxDepth: Ae
@@ -24911,8 +24890,8 @@ void main() {
24911
24890
  // 动画结束
24912
24891
  function() {
24913
24892
  for (var N = 0, D = s.modelScene.children; N < D.length; N++) {
24914
- var J = D[N];
24915
- J instanceof Model && J.show();
24893
+ var G = D[N];
24894
+ G instanceof Model && G.show();
24916
24895
  }
24917
24896
  var K = __assign(__assign(__assign({}, B), { mode: s.mode }), clonePose(s.camera.pose));
24918
24897
  s.emit("pano.arrived", createEvent("pano.arrived", {
@@ -25291,7 +25270,7 @@ void main() {
25291
25270
  var E = {
25292
25271
  x: e.center.x - o.x,
25293
25272
  y: e.center.y - o.y
25294
- }, O = this.coordinatesForOffset(E), _ = formatRad(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), J = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), K = clamp$1(this.cameraMotion.value.latitude + O.latitude, D, J);
25273
+ }, O = this.coordinatesForOffset(E), _ = formatRad(this.cameraMotion.value.longitude + O.longitude), N = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(N) : this.minLatitude, -Math.PI / 2, Math.PI / 2), G = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(N) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), K = clamp$1(this.cameraMotion.value.latitude + O.latitude, D, G);
25295
25274
  this.camera.aspect < 1 && Math.abs(e.overallVelocityX) > 0.2 && Math.atan2(Math.abs(e.overallVelocityY), Math.abs(e.overallVelocityX)) < Math.PI / 6.923 && (K = this.cameraMotion.value.latitude);
25296
25275
  var w = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: _, latitude: K, fov: N, offset: this.camera.pose.offset, distance: this.camera.pose.distance });
25297
25276
  if (e.isFinal && Object.assign(e, { __fixFinalState: !0 }), e.state = w, this.emit("gesture.pan", e), e.defaultPrevented)
@@ -25305,10 +25284,10 @@ void main() {
25305
25284
  longitude: w.longitude,
25306
25285
  latitude: w.latitude
25307
25286
  }, 0).catch(noop$1), e.isFinal) {
25308
- var Q = e.velocityX, U = e.velocityY;
25287
+ var J = e.velocityX, Q = e.velocityY;
25309
25288
  this.inMomentumMovement = {
25310
25289
  uuid: createUuid()
25311
- }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: Q, y: U })), { x: 0, y: 0, z: 0 }), 0);
25290
+ }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: J, y: Q })), { x: 0, y: 0, z: 0 }), 0);
25312
25291
  }
25313
25292
  }
25314
25293
  }
@@ -26099,7 +26078,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
26099
26078
  }
26100
26079
  return Object.defineProperty(t, "version", {
26101
26080
  get: function() {
26102
- return "6.5.0-alpha.13";
26081
+ return "6.5.0-alpha.14";
26103
26082
  },
26104
26083
  enumerable: !1,
26105
26084
  configurable: !0
@@ -26732,41 +26711,41 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26732
26711
  { key: C.key, progress: _ / b, value: C.value },
26733
26712
  { key: v, progress: 1, value: { count: C.value.count + 1, distance: 0 } }
26734
26713
  ];
26735
- var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), J = this.locationMotionKeyframesLength(T);
26736
- S = this.locationMotion.getProgressVelocity(E) * D / J;
26714
+ var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), G = this.locationMotionKeyframesLength(T);
26715
+ S = this.locationMotion.getProgressVelocity(E) * D / G;
26737
26716
  }
26738
- var K = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), Q = {
26717
+ var K = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), J = {
26739
26718
  longitude: o.longitude,
26740
26719
  latitude: o.latitude,
26741
26720
  fov: o.fov
26742
- }, U = __assign(__assign({}, e), { mode: this.mode, longitude: (u = Q.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = Q.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = Q.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), q = this.currentPano;
26721
+ }, Q = __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;
26743
26722
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
26744
26723
  options: o,
26745
- prevPano: q,
26724
+ prevPano: U,
26746
26725
  progress: 0,
26747
- state: U,
26726
+ state: Q,
26748
26727
  userAction: this.userAction,
26749
26728
  error: null
26750
- })), o.moveStartCallback && o.moveStartCallback(U), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop$1, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
26751
- this.cameraMotion.set(Q, K).catch(noop$1);
26729
+ })), o.moveStartCallback && o.moveStartCallback(Q), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop$1, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
26730
+ this.cameraMotion.set(J, K).catch(noop$1);
26752
26731
  else {
26753
26732
  var X = coordinatesToVector({
26754
26733
  longitude: this.cameraMotion.value.longitude,
26755
26734
  latitude: this.cameraMotion.value.latitude
26756
- }), Z = coordinatesToVector({
26757
- longitude: (d = Q.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
26758
- latitude: (f = Q.latitude) !== null && f !== void 0 ? f : this.cameraMotion.value.latitude
26759
- }), W = new THREE.Object3D();
26760
- W.lookAt(X);
26761
- var G = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion);
26762
- W.lookAt(Z);
26763
- var ne = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), $ = new THREE.Matrix4().getInverse(G).premultiply(ne), ee = this.cameraMotion.value.fov, re = (h = Q.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, le = 1;
26735
+ }), j = coordinatesToVector({
26736
+ longitude: (d = J.longitude) !== null && d !== void 0 ? d : this.cameraMotion.value.longitude,
26737
+ latitude: (f = J.latitude) !== null && f !== void 0 ? f : this.cameraMotion.value.latitude
26738
+ }), $ = new THREE.Object3D();
26739
+ $.lookAt(X);
26740
+ var q = new THREE.Matrix4().makeRotationFromQuaternion($.quaternion);
26741
+ $.lookAt(j);
26742
+ var re = new THREE.Matrix4().makeRotationFromQuaternion($.quaternion), Y = new THREE.Matrix4().getInverse(q).premultiply(re), ee = this.cameraMotion.value.fov, ne = (h = J.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, le = 1;
26764
26743
  r.effect === "zoomin" ? le = 1.5 : r.effect === "zoomout" && (le = 0.4);
26765
- for (var ie = re * le, oe = 0; oe < T.length - 1; oe++) {
26766
- var se = T[oe].key;
26767
- if (se) {
26768
- var de = this.panoResources[se];
26769
- de && (de.fixCameraTransform.copy($), de.leftPanoPicture && (de.leftPanoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
26744
+ for (var ie = ne * le, se = 0; se < T.length - 1; se++) {
26745
+ var ae = T[se].key;
26746
+ if (ae) {
26747
+ var fe = this.panoResources[ae];
26748
+ fe && (fe.fixCameraTransform.copy(Y), fe.leftPanoPicture && (fe.leftPanoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
26770
26749
  }
26771
26750
  }
26772
26751
  this.cameraMotion.setKeyframes([
@@ -26781,17 +26760,17 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26781
26760
  {
26782
26761
  progress: 0,
26783
26762
  value: {
26784
- longitude: (p = Q.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
26785
- latitude: (g = Q.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
26763
+ longitude: (p = J.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
26764
+ latitude: (g = J.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
26786
26765
  fov: ie
26787
26766
  }
26788
26767
  },
26789
26768
  {
26790
26769
  progress: 1,
26791
26770
  value: {
26792
- longitude: (A = Q.longitude) !== null && A !== void 0 ? A : this.cameraMotion.value.longitude,
26793
- latitude: (m = Q.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
26794
- fov: re
26771
+ longitude: (A = J.longitude) !== null && A !== void 0 ? A : this.cameraMotion.value.longitude,
26772
+ latitude: (m = J.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
26773
+ fov: ne
26795
26774
  }
26796
26775
  }
26797
26776
  ], K).catch(noop$1);
@@ -26801,36 +26780,36 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26801
26780
  // resolve
26802
26781
  // 动画结束
26803
26782
  function() {
26804
- for (var Re = 0, ce = s.modelScene.children; Re < ce.length; Re++) {
26805
- var Ce = ce[Re];
26806
- Ce instanceof Model && Ce.show();
26783
+ for (var xe = 0, de = s.modelScene.children; xe < de.length; xe++) {
26784
+ var Re = de[xe];
26785
+ Re instanceof Model && Re.show();
26807
26786
  }
26808
- var j = __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 });
26787
+ var te = __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 });
26809
26788
  s.emit("pano.arrived", createEvent("pano.arrived", {
26810
26789
  options: o,
26811
- prevPano: q,
26790
+ prevPano: U,
26812
26791
  progress: 1,
26813
- state: j,
26792
+ state: te,
26814
26793
  userAction: s.userAction,
26815
26794
  error: null
26816
- })), o.moveEndCallback && o.moveEndCallback(j);
26817
- var te = s.works.getResolvedObserver(s.currentPano);
26818
- if (te && te.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
26819
- var V = {
26795
+ })), o.moveEndCallback && o.moveEndCallback(te);
26796
+ var W = s.works.getResolvedObserver(s.currentPano);
26797
+ if (W && W.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
26798
+ var z = {
26820
26799
  map: s.videoTexture,
26821
- size: te.video.size,
26822
- matrix: te.video.matrix,
26823
- panoMatrix: te.matrix,
26800
+ size: W.video.size,
26801
+ matrix: W.video.matrix,
26802
+ panoMatrix: W.matrix,
26824
26803
  alpha: 1
26825
- }, be = createUuid(), fe = s.videoTexture.image;
26826
- fe.setAttribute("uuid", be), canplayVideo().then(function(ve) {
26827
- ve && te.video && fe.getAttribute("uuid") === be && (fe.oncanplay = function() {
26828
- fe.oncanplay = noop$1, fe.play();
26829
- }, fe.ontimeupdate = function() {
26830
- fe.currentTime > 0.5 && (fe.ontimeupdate = noop$1, s.panoVideo.setMaterial(V));
26831
- }, fe.src = te.video.source);
26804
+ }, Ce = createUuid(), ce = s.videoTexture.image;
26805
+ ce.setAttribute("uuid", Ce), canplayVideo().then(function(ve) {
26806
+ ve && W.video && ce.getAttribute("uuid") === Ce && (ce.oncanplay = function() {
26807
+ ce.oncanplay = noop$1, ce.play();
26808
+ }, ce.ontimeupdate = function() {
26809
+ ce.currentTime > 0.5 && (ce.ontimeupdate = noop$1, s.panoVideo.setMaterial(z));
26810
+ }, ce.src = W.video.source);
26832
26811
  }).catch(function() {
26833
- fe.removeAttribute("uuid");
26812
+ ce.removeAttribute("uuid");
26834
26813
  });
26835
26814
  }
26836
26815
  },
@@ -26839,9 +26818,9 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26839
26818
  function() {
26840
26819
  s.emit("pano.cancel", createEvent("pano.cancel", {
26841
26820
  options: o,
26842
- prevPano: q,
26821
+ prevPano: U,
26843
26822
  progress: 0,
26844
- state: U,
26823
+ state: Q,
26845
26824
  userAction: s.userAction,
26846
26825
  error: null
26847
26826
  })), o.moveCancelCallback && o.moveCancelCallback();
@@ -26938,29 +26917,29 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26938
26917
  mapSize: A.pano0.mapSize,
26939
26918
  zoom: A.pano0.zoom,
26940
26919
  matrix: P.leftPanoPicture.matrix.clone().setPosition(B.position)
26941
- }, J = this.panoPictureObserverMap.get(A.pano0);
26942
- J && this.panoPictureObserverMap.set(D, J), A.pano0 = D;
26920
+ }, G = this.panoPictureObserverMap.get(A.pano0);
26921
+ G && this.panoPictureObserverMap.set(D, G), A.pano0 = D;
26943
26922
  }
26944
26923
  O.copy(_), w = !0;
26945
26924
  }
26946
26925
  m.distance = this.locationMotion.value.distance, m.offset = new THREE.Vector3(O.x + (_.x - O.x) * N, O.y + (_.y - O.y) * N, O.z + (_.z - O.z) * N);
26947
- for (var K = [], Q = [], U = 0, q = this.locationMotion.keyframes; U < q.length; U++) {
26948
- var X = q[U], Z = X.key, W = X.progress;
26949
- Z !== void 0 && (K.push(Z), W > this.locationMotion.progress && Q.push(Z));
26950
- }
26951
- for (var G = 0, ne = Object.keys(this.panoResources); G < ne.length; G++) {
26952
- var $ = ne[G];
26953
- if (!(Q.indexOf($) >= 0)) {
26954
- var ee = this.panoResources[$];
26926
+ for (var K = [], J = [], Q = 0, U = this.locationMotion.keyframes; Q < U.length; Q++) {
26927
+ var X = U[Q], j = X.key, $ = X.progress;
26928
+ j !== void 0 && (K.push(j), $ > this.locationMotion.progress && J.push(j));
26929
+ }
26930
+ for (var q = 0, re = Object.keys(this.panoResources); q < re.length; q++) {
26931
+ var Y = re[q];
26932
+ if (!(J.indexOf(Y) >= 0)) {
26933
+ var ee = this.panoResources[Y];
26955
26934
  if (ee.leftPanoPicture) {
26956
- var re = ee.leftPanoPicture.map;
26957
- if (re) {
26958
- if (re === ((s = A.pano0) === null || s === void 0 ? void 0 : s.map) || re === ((u = A.pano1) === null || u === void 0 ? void 0 : u.map))
26935
+ var ne = ee.leftPanoPicture.map;
26936
+ if (ne) {
26937
+ if (ne === ((s = A.pano0) === null || s === void 0 ? void 0 : s.map) || ne === ((u = A.pano1) === null || u === void 0 ? void 0 : u.map))
26959
26938
  continue;
26960
- re.dispose(), ee.leftPanoPicture = null;
26939
+ ne.dispose(), ee.leftPanoPicture = null;
26961
26940
  }
26962
26941
  }
26963
- K.indexOf($) >= 0 || delete this.panoResources[$];
26942
+ K.indexOf(Y) >= 0 || delete this.panoResources[Y];
26964
26943
  }
26965
26944
  }
26966
26945
  var le = panoParse(B.panoId);
@@ -26974,8 +26953,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26974
26953
  }));
26975
26954
  }
26976
26955
  isEmptyObject(A) === !1 && this.modelScene.parameter.set(A), isEmptyObject(m) === !1 && this.setCamera(m);
26977
- var ie = this.works.getResolvedObserver(this.currentPano), oe = p[1];
26978
- if (!oe) {
26956
+ var ie = this.works.getResolvedObserver(this.currentPano), se = p[1];
26957
+ if (!se) {
26979
26958
  console.error("xrFrame丢失,请重试");
26980
26959
  return;
26981
26960
  }
@@ -26983,36 +26962,36 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
26983
26962
  console.error("session丢失,请重试");
26984
26963
  return;
26985
26964
  }
26986
- var se = this.xrManager.referenceSpace;
26987
- if (se) {
26988
- var de = this.xrManager.cameraVR, he = this.xrManager.cameraL, Re = this.xrManager.cameraR, ce = [he, Re], Ce = oe.getViewerPose(se), j = new THREE.Vector3(0, 0, 0);
26989
- if (Ce) {
26990
- var te;
26991
- te = this.xrManager.session.renderState.baseLayer;
26992
- var V = Ce.views;
26993
- if (!te) {
26965
+ var ae = this.xrManager.referenceSpace;
26966
+ if (ae) {
26967
+ var fe = this.xrManager.cameraVR, he = this.xrManager.cameraL, xe = this.xrManager.cameraR, de = [he, xe], Re = se.getViewerPose(ae), te = new THREE.Vector3(0, 0, 0);
26968
+ if (Re) {
26969
+ var W;
26970
+ W = this.xrManager.session.renderState.baseLayer;
26971
+ var z = Re.views;
26972
+ if (!W) {
26994
26973
  console.error("no layer found");
26995
26974
  return;
26996
26975
  }
26997
- this.renderer.setFramebuffer(te.framebuffer);
26998
- var be = !1;
26999
- V.length !== de.cameras.length && (de.cameras.length = 0, be = !0), this.parallaxCameraMatrixs = [];
27000
- var fe = new THREE.Vector3(), ve = new THREE.Vector3();
27001
- new THREE.Matrix4().fromArray(V[0].transform.matrix).decompose(fe, new THREE.Quaternion(), new THREE.Vector3()), new THREE.Matrix4().fromArray(V[1].transform.matrix).decompose(ve, new THREE.Quaternion(), new THREE.Vector3()), ve.clone().sub(fe).normalize();
26976
+ this.renderer.setFramebuffer(W.framebuffer);
26977
+ var Ce = !1;
26978
+ z.length !== fe.cameras.length && (fe.cameras.length = 0, Ce = !0), this.parallaxCameraMatrixs = [];
26979
+ var ce = new THREE.Vector3(), ve = new THREE.Vector3();
26980
+ new THREE.Matrix4().fromArray(z[0].transform.matrix).decompose(ce, new THREE.Quaternion(), new THREE.Vector3()), new THREE.Matrix4().fromArray(z[1].transform.matrix).decompose(ve, new THREE.Quaternion(), new THREE.Vector3()), ve.clone().sub(ce).normalize();
27002
26981
  var Ve = new THREE.Vector3(), rt = new THREE.Quaternion(), We = new THREE.Vector3();
27003
26982
  this.camera.matrix.decompose(Ve, rt, We);
27004
- for (var me = 0; me < V.length; me++) {
27005
- var ae = V[me], pe = te.getViewport(ae), Me = ce[me];
27006
- Me.matrix.fromArray(ae.transform.matrix);
27007
- var Se = new THREE.Vector3(), Pe = new THREE.Quaternion(), Fe = new THREE.Vector3();
27008
- Me.matrix.decompose(Se, Pe, Fe), j.copy(Ve), Me.position.copy(Ve), Me.quaternion.copy(Pe), Me.scale.copy(Fe), Me.updateMatrix(), Me.projectionMatrix.fromArray(ae.projectionMatrix), Me.viewport.set(pe.x, pe.y, pe.width, pe.height), be === !0 && de.cameras.push(Me);
26983
+ for (var me = 0; me < z.length; me++) {
26984
+ var oe = z[me], pe = W.getViewport(oe), Me = de[me];
26985
+ Me.matrix.fromArray(oe.transform.matrix);
26986
+ var Te = new THREE.Vector3(), Pe = new THREE.Quaternion(), Fe = new THREE.Vector3();
26987
+ Me.matrix.decompose(Te, Pe, Fe), te.copy(Ve), Me.position.copy(Ve), Me.quaternion.copy(Pe), Me.scale.copy(Fe), Me.updateMatrix(), Me.projectionMatrix.fromArray(oe.projectionMatrix), Me.viewport.set(pe.x, pe.y, pe.width, pe.height), Ce === !0 && fe.cameras.push(Me);
27009
26988
  }
27010
26989
  if (this.xrManager.session && this.xrManager.session.inputSources) {
27011
26990
  for (var me = 0; me < this.xrManager.session.inputSources.length; me++)
27012
26991
  if (this.xrManager.session.inputSources[me] && this.xrManager.session.inputSources[me].targetRayMode === "transient-pointer") {
27013
- var Ae = oe.getPose(this.xrManager.session.inputSources[me].targetRaySpace, se);
26992
+ var Ae = se.getPose(this.xrManager.session.inputSources[me].targetRaySpace, ae);
27014
26993
  if (Ae) {
27015
- var Te = new THREE.Vector3(0, 0, -1).applyQuaternion(Ae.transform.orientation), Ie = new THREE.Raycaster(this.camera.position, Te);
26994
+ var be = new THREE.Vector3(0, 0, -1).applyQuaternion(Ae.transform.orientation), Ie = new THREE.Raycaster(this.camera.position, be);
27016
26995
  this.gazeRay = Ie;
27017
26996
  }
27018
26997
  }
@@ -27021,18 +27000,18 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27021
27000
  for (var Be = this.xrManager.session.inputSources, me = 0; me < Be.length; me++) {
27022
27001
  var qe = this.xrManager.controllers[me], ke = Be[me];
27023
27002
  if (ke) {
27024
- qe && qe.update(ke, oe, se);
27025
- var Ie = this.xrManager.getController(me), Ne = new THREE.Vector3(0, 1.2, 0), _e = Ie.position.clone().add(j).sub(Ne);
27026
- ke.handedness === "left" ? this.xrControllerRay.left.set(_e, new THREE.Vector3(0, 0, -1).applyEuler(Ie.rotation)) : ke.handedness === "right" && this.xrControllerRay.right.set(_e, new THREE.Vector3(0, 0, -1).applyEuler(Ie.rotation)), this.controllerWrappers[me].position.copy(new THREE.Vector3(0, 0, 0).add(j).sub(Ne));
27003
+ qe && qe.update(ke, se, ae);
27004
+ var Ie = this.xrManager.getController(me), Ne = new THREE.Vector3(0, 1.2, 0), _e = Ie.position.clone().add(te).sub(Ne);
27005
+ ke.handedness === "left" ? this.xrControllerRay.left.set(_e, new THREE.Vector3(0, 0, -1).applyEuler(Ie.rotation)) : ke.handedness === "right" && this.xrControllerRay.right.set(_e, new THREE.Vector3(0, 0, -1).applyEuler(Ie.rotation)), this.controllerWrappers[me].position.copy(new THREE.Vector3(0, 0, 0).add(te).sub(Ne));
27027
27006
  var Ue = this.modelScene.intersectRaycaster(this.xrControllerRay.right);
27028
27007
  if (Ue.length === 0 && (Ue = this.xrControllerRay.right.intersectObject(this.boundingMesh, !0).map(function(F) {
27029
27008
  var k;
27030
27009
  return __assign({ floor: (k = ie == null ? void 0 : ie.floorIndex) !== null && k !== void 0 ? k : 0 }, F);
27031
27010
  })), Ue.length >= 1 && Ue[0].face)
27032
27011
  if (ke.handedness === "right") {
27033
- var De = this.xrControllerRay.right.intersectObject(this.xrCustomObjectsScene, !0), je = Ue[0].face.normal, xe = je.clone(), Oe = Ue[0].point.clone();
27012
+ var De = this.xrControllerRay.right.intersectObject(this.xrCustomObjectsScene, !0), je = Ue[0].face.normal, Se = je.clone(), Oe = Ue[0].point.clone();
27034
27013
  this.intersectMesh.position.copy(Oe);
27035
- var we = Oe.clone().add(xe);
27014
+ var we = Oe.clone().add(Se);
27036
27015
  if (this.intersectMesh.lookAt(we), Math.abs(je.y) > 0.99) {
27037
27016
  var Le = this.camera.position.clone().sub(Oe);
27038
27017
  this.intersectMesh.rotation.z = -Math.atan2(Le.z, Le.x);
@@ -27065,30 +27044,30 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27065
27044
  }, !0), vt = Mt[1];
27066
27045
  vt = clamp$1(vt, 2.5, 1 / 0);
27067
27046
  for (var at = ie.visibleIds.concat(panoStringify(this.currentPano)), Je = this.getForwardObserverOrNot(), dt = this.camera.getDirection(new THREE.Vector3()), nt = 0, Ke = Object.keys(this.panoMeshes); nt < Ke.length; nt++) {
27068
- var Qe = Ke[nt], ye = this.panoMeshes[Qe], J = this.works.getResolvedObserver(Qe);
27047
+ var Qe = Ke[nt], ye = this.panoMeshes[Qe], G = this.works.getResolvedObserver(Qe);
27069
27048
  if (at.indexOf(Qe) === -1)
27070
27049
  ye.setCurrent(!1), ye.setOpacity(0);
27071
- else if (!J)
27050
+ else if (!G)
27072
27051
  ye.setCurrent(!1), ye.setOpacity(0);
27073
- else if (!J.loadable && !J.active)
27052
+ else if (!G.loadable && !G.active)
27074
27053
  ye.setCurrent(!1), ye.setOpacity(0);
27075
27054
  else {
27076
27055
  var Ee = ye.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);
27077
27056
  ye.setCurrent(!ye.loading && ye.progress === 0 && Je !== null && Je.panoId === Qe), ye.setOpacity(Ee < 0.01 ? 0 : clamp$1(vt / Ee * 1.2, 0.65, 0.98));
27078
- var $e = this.camera.position.clone().setY(ye.position.y), Te = new THREE.Vector3().copy(ye.position).sub($e).normalize();
27057
+ var $e = this.camera.position.clone().setY(ye.position.y), be = new THREE.Vector3().copy(ye.position).sub($e).normalize();
27079
27058
  if (Qe === panoStringify(this.currentPano)) {
27080
27059
  var bt = clamp$1((0.5 - $e.distanceTo(ye.position)) / 0.5, 0, 1);
27081
- Te.multiplyScalar(1 - bt).add(dt.clone().multiplyScalar(bt));
27060
+ be.multiplyScalar(1 - bt).add(dt.clone().multiplyScalar(bt));
27082
27061
  }
27083
- Te.length() > 0 && ye.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(Te.x, Te.z), 0));
27062
+ be.length() > 0 && ye.quaternion.setFromEuler(new THREE.Euler(0, Math.atan2(be.x, be.z), 0));
27084
27063
  }
27085
27064
  ye.updateTime && ye.updateTime(e, r);
27086
27065
  }
27087
27066
  }
27088
27067
  if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && ie) {
27089
27068
  for (var Tt = [], Ht = 0, Ot = ie.accessibleIds; Ht < Ot.length; Ht++) {
27090
- var Qe = Ot[Ht], J = this.works.getResolvedObserver(Qe);
27091
- J && Tt.push(J);
27069
+ var Qe = Ot[Ht], G = this.works.getResolvedObserver(Qe);
27070
+ G && Tt.push(G);
27092
27071
  }
27093
27072
  if (Tt.sort(function(_t, I) {
27094
27073
  return _t.standingPosition.distanceTo(ie.standingPosition) - I.standingPosition.distanceTo(ie.standingPosition);
@@ -27115,12 +27094,12 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27115
27094
  }
27116
27095
  }
27117
27096
  {
27118
- var N = (c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 1, pt = Math.round(N), st = this.modelScene.parameter.pano0, ut = this.modelScene.parameter.pano1, lt = pt === 0 ? st : ut, J = void 0;
27119
- if (lt && (J = this.works.getResolvedObserver(lt.panoId), J || (J = this.panoPictureObserverMap.get(lt))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N <= 0.5 ? 0 : N < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !J || !lt || this.tileLevelForFov === !1)
27097
+ var N = (c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 1, pt = Math.round(N), st = this.modelScene.parameter.pano0, ut = this.modelScene.parameter.pano1, lt = pt === 0 ? st : ut, G = void 0;
27098
+ if (lt && (G = this.works.getResolvedObserver(lt.panoId), G || (G = this.panoPictureObserverMap.get(lt))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = N <= 0.5 ? 0 : N < 1 ? 1 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !G || !lt || this.tileLevelForFov === !1)
27120
27099
  this.tiling.setObserver(null), this.tiling.update(this.renderer, this.camera, null, new THREE.Matrix4(), 1, 0, 0), this.modelScene.parameter.set("refinedScreen", null);
27121
27100
  else {
27122
27101
  var ct = getImageSizeLevel(lt.mapSize), It = ct + 1, Lt = 4;
27123
- this.tiling.setObserver(J);
27102
+ this.tiling.setObserver(G);
27124
27103
  var Ft = this.tiling.update(this.renderer, this.camera, lt.map, lt.matrix, lt.zoom, It, Lt), wt = {
27125
27104
  map: this.tiling.renderTarget.texture,
27126
27105
  matrixInverse: this.tiling.camera.matrixWorldInverse,
@@ -27763,11 +27742,12 @@ void main() {
27763
27742
  });
27764
27743
  }
27765
27744
  return n.prototype.render = function(t) {
27766
- }, n.prototype.setSize = function(t, e) {
27767
- if (this.modelRenderTarget.width !== t || this.modelRenderTarget.height !== e) {
27768
- this.modelRenderTarget.setSize(t, e), this.modelRenderTarget.depthTexture.dispose();
27769
- var r = new THREE.DepthTexture(t, e);
27770
- r.generateMipmaps = !1, r.format = THREE.DepthStencilFormat, r.type = THREE.UnsignedInt248Type, this.modelRenderTarget.depthTexture = r, this.modelRenderTarget.depthTexture.needsUpdate = !0;
27745
+ }, n.prototype.setSize = function(t, e, r) {
27746
+ var o = t * r, s = e * r;
27747
+ if (this.modelRenderTarget.width !== o || this.modelRenderTarget.height !== s) {
27748
+ this.modelRenderTarget.setSize(o, s), this.modelRenderTarget.depthTexture.dispose();
27749
+ var u = new THREE.DepthTexture(o, s);
27750
+ u.generateMipmaps = !1, u.format = THREE.DepthStencilFormat, u.type = THREE.UnsignedInt248Type, this.modelRenderTarget.depthTexture = u, this.modelRenderTarget.depthTexture.needsUpdate = !0;
27771
27751
  }
27772
27752
  }, n.prototype.dispose = function() {
27773
27753
  this.screenBuffers.forEach(function(t) {
@@ -27786,7 +27766,6 @@ void main() {
27786
27766
  return t.prototype.render = function(e) {
27787
27767
  var r = this.renderer.getRenderTarget();
27788
27768
  this.enableFragDepth ? (e && (this.renderer.setRenderTarget(this.modelRenderTarget), this.renderer.render(this.modelScene, this.camera)), this.depthCopyPass.render(this.modelRenderTarget.depthTexture, r), this.renderer.autoClearDepth = !1, this.renderer.autoClearColor = !0, this.copyPass.render(this.modelRenderTarget, r), this.renderer.setRenderTarget(r), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0) : (this.renderer.setRenderTarget(r), this.renderer.render(this.modelScene, this.camera), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0);
27789
- }, t.prototype.setSize = function(e, r) {
27790
27769
  }, t;
27791
27770
  }(BaseRenderer)
27792
27771
  ), Effect = (
@@ -27902,17 +27881,17 @@ var EDLEffect = (
27902
27881
  __extends(t, n);
27903
27882
  function t(e, r, o, s) {
27904
27883
  var u = n.call(this, e, r, o, s) || this;
27905
- return u.sharedV2 = new THREE.Vector2(), u.renderer = e, u.material = new EDLMaterial(), mesh$1.material = u.material, u.material.needsUpdate = !0, u;
27884
+ return u.renderer = e, u.material = new EDLMaterial(), mesh$1.material = u.material, u.material.needsUpdate = !0, u;
27906
27885
  }
27907
27886
  return t.prototype.render = function(e) {
27908
27887
  this.modelScene.parameter.set("logDepthAlpha", 1), this.modelScene.update(this.renderer, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0, this.renderer.setRenderTarget(e[0]), this.renderer.render(this.scene, this.camera);
27909
- var r = this.camera, o = this.material.uniforms, s = this.renderer.getSize(this.sharedV2);
27910
- o.uScreenWidth.value = s.x, o.uScreenHeight.value = s.y;
27911
- var u = r.projectionMatrix, l = new Float32Array(16);
27912
- l.set(u.elements);
27913
- for (var c = new Float32Array(this.material.neighbourCount * 2), d = 0; d < this.material.neighbourCount; d++)
27914
- c[2 * d + 0] = Math.cos(2 * d * Math.PI / this.material.neighbourCount), c[2 * d + 1] = Math.sin(2 * d * Math.PI / this.material.neighbourCount);
27915
- o.uNeighbours.value = c, o.uNear.value = r.near, o.uFar.value = r.far, o.uEDLColor.value = e[0].texture, o.uProj.value = l, o.uEdlStrength.value = 0.5, o.uRadius.value = 1, this.renderer.setRenderTarget(e[1]), this.renderer.render(edlEffectScene, passCamera$1), this.modelScene.parameter.reset("logDepthAlpha"), this.modelScene.update(this.renderer, this.camera);
27888
+ var r = this.camera, o = this.material.uniforms;
27889
+ o.uScreenWidth.value = this.camera.resolution.x, o.uScreenHeight.value = this.camera.resolution.y;
27890
+ var s = r.projectionMatrix, u = new Float32Array(16);
27891
+ u.set(s.elements);
27892
+ for (var l = new Float32Array(this.material.neighbourCount * 2), c = 0; c < this.material.neighbourCount; c++)
27893
+ l[2 * c + 0] = Math.cos(2 * c * Math.PI / this.material.neighbourCount), l[2 * c + 1] = Math.sin(2 * c * Math.PI / this.material.neighbourCount);
27894
+ o.uNeighbours.value = l, o.uNear.value = r.near, o.uFar.value = r.far, o.uEDLColor.value = e[0].texture, o.uProj.value = u, o.uEdlStrength.value = 0.05, o.uRadius.value = 1.5, this.renderer.setRenderTarget(e[1]), this.renderer.render(edlEffectScene, passCamera$1), this.modelScene.parameter.reset("logDepthAlpha"), this.modelScene.update(this.renderer, this.camera);
27916
27895
  }, t.prototype.dispose = function() {
27917
27896
  this.copyPass.dispose();
27918
27897
  }, t;
@@ -27940,15 +27919,16 @@ var EDLEffect = (
27940
27919
  return t.prototype.render = function(e) {
27941
27920
  var r = this.renderer.getRenderTarget();
27942
27921
  this.enableFragDepth ? (e && this.edlEffect.render(this.screenBuffers), this.depthCopyPass.render(this.modelRenderTarget.depthTexture, r), this.renderer.autoClearDepth = !1, this.renderer.autoClearColor = !0, this.copyPass.render(this.modelRenderTarget, r), this.renderer.setRenderTarget(r), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0) : (this.edlEffect.render(this.screenBuffers), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0);
27943
- }, t.prototype.setSize = function(e, r) {
27944
- if (this.modelRenderTarget.width !== e || this.modelRenderTarget.height !== r) {
27945
- this.modelRenderTarget.setSize(e, r), this.modelRenderTarget.depthTexture.dispose();
27946
- var o = new THREE.DepthTexture(e, r);
27947
- o.generateMipmaps = !1, o.format = THREE.DepthStencilFormat, o.type = THREE.UnsignedInt248Type, this.modelRenderTarget.depthTexture = o, this.modelRenderTarget.depthTexture.needsUpdate = !0;
27948
- }
27949
- for (var s = 0, u = this.screenBuffers; s < u.length; s++) {
27950
- var l = u[s];
27951
- l && l.setSize(e, r);
27922
+ }, t.prototype.setSize = function(e, r, o) {
27923
+ var s = e * o, u = r * o;
27924
+ if (this.modelRenderTarget.width !== s || this.modelRenderTarget.height !== u) {
27925
+ this.modelRenderTarget.setSize(s, u), this.modelRenderTarget.depthTexture.dispose();
27926
+ var l = new THREE.DepthTexture(s, u);
27927
+ l.generateMipmaps = !1, l.format = THREE.DepthStencilFormat, l.type = THREE.UnsignedInt248Type, this.modelRenderTarget.depthTexture = l, this.modelRenderTarget.depthTexture.needsUpdate = !0;
27928
+ }
27929
+ for (var c = 0, d = this.screenBuffers; c < d.length; c++) {
27930
+ var f = d[c];
27931
+ f && f.setSize(s, u);
27952
27932
  }
27953
27933
  }, t.prototype.dispose = function() {
27954
27934
  this.screenBuffers.forEach(function(e) {
@@ -28048,15 +28028,16 @@ var HQEffect = (
28048
28028
  return t.prototype.render = function(e) {
28049
28029
  var r = this.renderer.getRenderTarget();
28050
28030
  this.enableFragDepth ? (e && this.hqEffect.render(this.screenBuffers), this.depthCopyPass.render(this.modelRenderTarget.depthTexture, r), this.renderer.autoClearDepth = !1, this.renderer.autoClearColor = !0, this.copyPass.render(this.modelRenderTarget, r), this.renderer.setRenderTarget(r), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0) : (this.hqEffect.render(this.screenBuffers), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0);
28051
- }, t.prototype.setSize = function(e, r) {
28052
- if (this.modelRenderTarget.width !== e || this.modelRenderTarget.height !== r) {
28053
- this.modelRenderTarget.setSize(e, r), this.modelRenderTarget.depthTexture.dispose();
28054
- var o = new THREE.DepthTexture(e, r);
28055
- o.generateMipmaps = !1, o.format = THREE.DepthStencilFormat, o.type = THREE.UnsignedInt248Type, this.modelRenderTarget.depthTexture = o, this.modelRenderTarget.depthTexture.needsUpdate = !0;
28056
- }
28057
- for (var s = 0, u = this.screenBuffers; s < u.length; s++) {
28058
- var l = u[s];
28059
- l && l.setSize(e, r);
28031
+ }, t.prototype.setSize = function(e, r, o) {
28032
+ var s = e * o, u = r * o;
28033
+ if (this.modelRenderTarget.width !== s || this.modelRenderTarget.height !== u) {
28034
+ this.modelRenderTarget.setSize(s, u), this.modelRenderTarget.depthTexture.dispose();
28035
+ var l = new THREE.DepthTexture(s, u);
28036
+ l.generateMipmaps = !1, l.format = THREE.DepthStencilFormat, l.type = THREE.UnsignedInt248Type, this.modelRenderTarget.depthTexture = l, this.modelRenderTarget.depthTexture.needsUpdate = !0;
28037
+ }
28038
+ for (var c = 0, d = this.screenBuffers; c < d.length; c++) {
28039
+ var f = d[c];
28040
+ f && f.setSize(s, u);
28060
28041
  }
28061
28042
  }, t.prototype.dispose = function() {
28062
28043
  this.screenBuffers.forEach(function(e) {
@@ -28269,7 +28250,6 @@ void main() {
28269
28250
  return t.prototype.render = function(e) {
28270
28251
  var r = this.renderer.getRenderTarget();
28271
28252
  this.enableFragDepth ? (e && (this.luminanceAdaptiveEffect.enable = !0, this.luminanceAdaptiveEffect.render(this.screenBuffers)), this.depthCopyPass.render(this.modelRenderTarget.depthTexture, r), this.renderer.autoClearDepth = !1, this.renderer.autoClearColor = !0, this.copyPass.render(this.modelRenderTarget, r), this.renderer.setRenderTarget(r), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0) : (this.luminanceAdaptiveEffect.enable = !0, this.luminanceAdaptiveEffect.render(this.screenBuffers), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0), this.modelScene.needsRender = !0;
28272
- }, t.prototype.setSize = function(e, r) {
28273
28253
  }, t;
28274
28254
  }(BaseRenderer)
28275
28255
  ), DEFAULT_MODE_CHANGE_DURATION = 800, DEFAULT_CAMERA_FOV = 90, DEFAULT_REQUEST_PROXY = function(n) {
@@ -28367,7 +28347,7 @@ void main() {
28367
28347
  }
28368
28348
  return Object.defineProperty(t, "version", {
28369
28349
  get: function() {
28370
- return "6.5.0-alpha.13";
28350
+ return "6.5.0-alpha.14";
28371
28351
  },
28372
28352
  enumerable: !1,
28373
28353
  configurable: !0
@@ -28597,17 +28577,17 @@ void main() {
28597
28577
  }
28598
28578
  else
28599
28579
  E.push(parseWork(e));
28600
- for (var T = createWorks(E), S = function(W) {
28601
- var G = R, ne = new Fetcher({
28602
- allowHosts: W.allowHosts,
28580
+ for (var T = createWorks(E), S = function($) {
28581
+ var q = R, re = new Fetcher({
28582
+ allowHosts: $.allowHosts,
28603
28583
  get requestProxy() {
28604
- return G.requestProxy;
28584
+ return q.requestProxy;
28605
28585
  },
28606
28586
  get networkSubscribe() {
28607
- return G.networkSubscribe;
28587
+ return q.networkSubscribe;
28608
28588
  }
28609
28589
  });
28610
- registerFetcher(W, ne);
28590
+ registerFetcher($, re);
28611
28591
  }, R = this, C = 0, w = T; C < w.length; C++) {
28612
28592
  var L = w[C];
28613
28593
  S(L);
@@ -28666,8 +28646,8 @@ void main() {
28666
28646
  offset: r.offset
28667
28647
  };
28668
28648
  }
28669
- var N = __assign(__assign(__assign({}, P), { mode: B }), O), D = this.getCurrentState(), J = (p = m.duration) !== null && p !== void 0 ? p : this.modeChangeDuration;
28670
- (B === "Floorplan" || B === "Topview" || B === "Mapview") && this.currentMode === B && (J = 0);
28649
+ var N = __assign(__assign(__assign({}, P), { mode: B }), O), D = this.getCurrentState(), G = (p = m.duration) !== null && p !== void 0 ? p : this.modeChangeDuration;
28650
+ (B === "Floorplan" || B === "Topview" || B === "Mapview") && this.currentMode === B && (G = 0);
28671
28651
  var K = "fly";
28672
28652
  (B === "Panorama" || B === "VRPanorama" || B === "XRPanorama") && this.currentMode === B && (K = (g = m.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
28673
28653
  input: e,
@@ -28675,85 +28655,85 @@ void main() {
28675
28655
  state: N,
28676
28656
  userAction: s
28677
28657
  }));
28678
- var Q = function() {
28658
+ var J = function() {
28679
28659
  u.pano = P;
28680
- var W = __assign(__assign({ initial: {
28660
+ var $ = __assign(__assign({ initial: {
28681
28661
  state: N,
28682
28662
  currentState: D,
28683
- duration: J,
28663
+ duration: G,
28684
28664
  effect: K,
28685
28665
  userAction: s
28686
- } }, u.commonParams()), u.controllerInits[B]), G = Controllers[B].initAnimationEndState(W);
28666
+ } }, u.commonParams()), u.controllerInits[B]), q = Controllers[B].initAnimationEndState($);
28687
28667
  if (u.controller && u.currentMode === B)
28688
- u.controller.updateWork(T, G, { effect: K, duration: J }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(B, W));
28668
+ u.controller.updateWork(T, q, { effect: K, duration: G }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(B, $));
28689
28669
  else {
28690
- var ne = u.currentMode;
28670
+ var re = u.currentMode;
28691
28671
  if (u.controller)
28692
28672
  u.controller.destroy();
28693
28673
  else {
28694
- var $ = Controllers[B].initAnimationEndState(W);
28695
- u.camera.setFromPose($), u.emit("camera.update", createEvent("camera.update", {
28674
+ var Y = Controllers[B].initAnimationEndState($);
28675
+ u.camera.setFromPose(Y), u.emit("camera.update", createEvent("camera.update", {
28696
28676
  state: u.getCurrentState(),
28697
28677
  userAction: s
28698
28678
  }));
28699
28679
  }
28700
- u.controller = u.applyController(B, W);
28680
+ u.controller = u.applyController(B, $);
28701
28681
  var ee = createEvent("mode.change", {
28702
- prevMode: ne,
28682
+ prevMode: re,
28703
28683
  mode: B,
28704
- state: G,
28684
+ state: q,
28705
28685
  userAction: s
28706
28686
  });
28707
28687
  try {
28708
28688
  u.emit("mode.change", ee);
28709
- } catch (re) {
28710
- console.error(re);
28689
+ } catch (ne) {
28690
+ console.error(ne);
28711
28691
  }
28712
28692
  }
28713
28693
  u.updateTime(u.currentUpdateArgs.time, 0, u.currentUpdateArgs.args);
28714
28694
  };
28715
28695
  worksMap.set(this, T);
28716
- var U = Promise.resolve();
28696
+ var Q = Promise.resolve();
28717
28697
  if (B === t.Mode.Floorplan || B === t.Mode.Topview || B === t.Mode.Mapview || B === t.Mode.Model) {
28718
28698
  this.modelScene.loaded === !1 && (this.camera.setFromPose(N), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = B);
28719
- var q = this.loadModels(T, m);
28720
- U = Promise.all(q.map(function(W) {
28721
- return W.loadedReady;
28699
+ var U = this.loadModels(T, m);
28700
+ Q = Promise.all(U.map(function($) {
28701
+ return $.loadedReady;
28722
28702
  })).then(function() {
28723
- u.needsRender = !0, u.modelSceneNeedsRender = !0, Q(), u.emit("camera.update", createEvent("camera.update", {
28703
+ u.needsRender = !0, u.modelSceneNeedsRender = !0, J(), u.emit("camera.update", createEvent("camera.update", {
28724
28704
  state: u.getCurrentState(),
28725
28705
  userAction: s
28726
28706
  }));
28727
28707
  });
28728
28708
  } else {
28729
- Q();
28709
+ J();
28730
28710
  var X = !1;
28731
28711
  this.modelScene.autoRefine = !1;
28732
- var Z = function() {
28712
+ var j = function() {
28733
28713
  u.works === T && X === !1 && (u.needsRender = !0, u.modelSceneNeedsRender = !0, u.emit("camera.update", createEvent("camera.update", {
28734
28714
  state: u.getCurrentState(),
28735
28715
  userAction: s
28736
28716
  })), X = !0, u.modelScene.autoRefine = !0);
28737
- }, q = this.loadModels(T, m);
28738
- U = Promise.all(q.map(function(G) {
28739
- return G.initReady;
28740
- })).then(noop$1), this.controller.once("pano.arrived", Z), this.controller.once("pano.cancel", Z), setTimeout(Z, ((A = m.duration) !== null && A !== void 0 ? A : this.modeChangeDuration) + 1e3);
28717
+ }, U = this.loadModels(T, m);
28718
+ Q = Promise.all(U.map(function(q) {
28719
+ return q.initReady;
28720
+ })).then(noop$1), this.controller.once("pano.arrived", j), this.controller.once("pano.cancel", j), setTimeout(j, ((A = m.duration) !== null && A !== void 0 ? A : this.modeChangeDuration) + 1e3);
28741
28721
  }
28742
28722
  return this.emit("works.load", createEvent("works.load", {
28743
28723
  input: e,
28744
28724
  state: this.getCurrentState(),
28745
28725
  userAction: s,
28746
28726
  works: T
28747
- })), U.then(function() {
28727
+ })), Q.then(function() {
28748
28728
  return u.ready();
28749
28729
  }).then(function() {
28750
- var W;
28730
+ var $;
28751
28731
  u.emit("works.ready", createEvent("works.ready", {
28752
28732
  input: e,
28753
28733
  state: u.getCurrentState(),
28754
28734
  userAction: s,
28755
28735
  works: T
28756
- })), (W = u.analysis) === null || W === void 0 || W.work(T);
28736
+ })), ($ = u.analysis) === null || $ === void 0 || $.work(T);
28757
28737
  });
28758
28738
  }, t.prototype.reset = function() {
28759
28739
  var e = this, r = this.loadWorkTask.then(function() {
@@ -28901,12 +28881,12 @@ void main() {
28901
28881
  }), t.prototype.render = function(e) {
28902
28882
  var r = this.renderer;
28903
28883
  if (r) {
28904
- var o = r.getRenderTarget(), s = r.autoClear, u = r.autoClearColor, l = r.autoClearDepth, c = r.autoClearStencil, d = scratchClearColor.copy(r.getClearColor()), f = r.getClearAlpha(), h = r.getViewport(scratchViewport), p = r.getScissor(scratchScissor), g = r.getScissorTest(), A = r.getSize(scratchRenderSize), m = Math.floor(A.x * this.viewport.left), E = Math.floor(A.y * this.viewport.bottom), v = Math.floor(A.x * this.viewport.width), y = Math.floor(A.y * this.viewport.height);
28905
- r.setClearColor(this.backgroundColor, this.backgroundAlpha), r.setViewport(m, E, v, y), r.setScissor(m, E, v, y), r.setScissorTest(!0);
28906
- var b = this.scene.background;
28907
- this.modelScene.background = this.camera.isOrthographicCamera ? null : b, this.modelScene.environment = this.scene.environment, this.scene.background = null;
28908
- var T = this.getBuiltinRenderer(r);
28909
- T.setSize(A.x, A.y), this.controller ? this.controller.render(T, this.onlyRenderIfNeeds ? this.modelSceneNeedsRender : !0) : T.render(this.onlyRenderIfNeeds ? this.modelSceneNeedsRender : !0), this.scene.background = b, this.modelScene.background = null, this.modelScene.environment = null, this.poweredByRealsee && this.currentMode !== "VRPanorama" && this.currentMode !== "XRPanorama" && r.getRenderTarget() !== this.getPixelsRenderTarget && renderPoweredByRealsee(r), r.setRenderTarget(o), r.autoClear = s, r.autoClearColor = u, r.autoClearDepth = l, r.autoClearStencil = c, r.setClearColor(d, f), r.setViewport(h), r.setScissor(p), r.setScissorTest(g), e && AnimationFrameLoop.shared.add(e, !0);
28884
+ var o = r.getRenderTarget(), s = r.autoClear, u = r.autoClearColor, l = r.autoClearDepth, c = r.autoClearStencil, d = scratchClearColor.copy(r.getClearColor()), f = r.getClearAlpha(), h = r.getViewport(scratchViewport), p = r.getScissor(scratchScissor), g = r.getScissorTest(), A = r.getSize(scratchRenderSize), m = r.getPixelRatio(), E = Math.floor(A.x * this.viewport.left), v = Math.floor(A.y * this.viewport.bottom), y = Math.floor(A.x * this.viewport.width), b = Math.floor(A.y * this.viewport.height);
28885
+ r.setClearColor(this.backgroundColor, this.backgroundAlpha), r.setViewport(E, v, y, b), r.setScissor(E, v, y, b), r.setScissorTest(!0);
28886
+ var T = this.scene.background;
28887
+ this.modelScene.background = this.camera.isOrthographicCamera ? null : T, this.modelScene.environment = this.scene.environment, this.scene.background = null;
28888
+ var S = this.getBuiltinRenderer(r);
28889
+ S.setSize(A.x, A.y, m), this.controller ? this.controller.render(S, this.onlyRenderIfNeeds ? this.modelSceneNeedsRender : !0) : S.render(this.onlyRenderIfNeeds ? this.modelSceneNeedsRender : !0), this.scene.background = T, this.modelScene.background = null, this.modelScene.environment = null, this.poweredByRealsee && this.currentMode !== "VRPanorama" && this.currentMode !== "XRPanorama" && r.getRenderTarget() !== this.getPixelsRenderTarget && renderPoweredByRealsee(r), r.setRenderTarget(o), r.autoClear = s, r.autoClearColor = u, r.autoClearDepth = l, r.autoClearStencil = c, r.setClearColor(d, f), r.setViewport(h), r.setScissor(p), r.setScissorTest(g), e && AnimationFrameLoop.shared.add(e, !0);
28910
28890
  }
28911
28891
  }, t.prototype.updateTime = function(e, r) {
28912
28892
  for (var o, s = this, u = [], l = 2; l < arguments.length; l++)