@realsee/five 6.6.4 → 6.7.0-alpha.1

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 (53) hide show
  1. package/docs/classes/five.Five.html +57 -57
  2. package/docs/classes/five.Work.html +16 -16
  3. package/docs/classes/five.WorkResolvedObserver.html +16 -16
  4. package/docs/classes/sticker.Sticker.html +2 -2
  5. package/docs/functions/five.loadAt3d.html +1 -1
  6. package/docs/functions/five.loadDome.html +1 -1
  7. package/docs/functions/five.loadFbx.html +1 -1
  8. package/docs/functions/five.loadPbm.html +1 -1
  9. package/docs/functions/five.parseWork.html +1 -1
  10. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +5 -5
  11. package/docs/interfaces/five.TileHeader.html +2 -2
  12. package/docs/interfaces/five.TilesetHeader.html +4 -4
  13. package/docs/interfaces/five.TrajectoryHeader.html +2 -2
  14. package/docs/interfaces/five.WorkCubeImage.html +2 -2
  15. package/docs/interfaces/five.WorkImage.html +3 -3
  16. package/docs/interfaces/five.WorkInitial.html +8 -8
  17. package/docs/interfaces/five.WorkModel.html +6 -6
  18. package/docs/interfaces/five.WorkModelLayer.html +2 -2
  19. package/docs/interfaces/five.WorkObserver.html +18 -18
  20. package/docs/interfaces/five.WorkTile.html +4 -4
  21. package/docs/interfaces/five.WorkVideo.html +4 -4
  22. package/docs/types/five.ParseOptions.html +6 -6
  23. package/docs/types/five.PostProcessingType.html +1 -1
  24. package/five/index.js +20 -20
  25. package/five/index.mjs +510 -636
  26. package/gltf-loader/index.js +2 -2
  27. package/gltf-loader/index.mjs +145 -145
  28. package/line/index.js +2 -2
  29. package/line/index.mjs +9 -9
  30. package/package.json +1 -1
  31. package/plugins/index.js +1 -1
  32. package/plugins/index.mjs +1 -1
  33. package/react/index.js +1 -1
  34. package/react/index.mjs +1 -1
  35. package/shader-lib/index.js +1 -1
  36. package/shader-lib/index.mjs +1 -1
  37. package/sticker/index.js +2 -2
  38. package/sticker/index.mjs +6 -6
  39. package/umd/five-gltf-loader.js +2 -2
  40. package/umd/five-line.js +2 -2
  41. package/umd/five-plugins.js +1 -1
  42. package/umd/five-react.js +1 -1
  43. package/umd/five-shader-lib.js +1 -1
  44. package/umd/five-sticker.js +2 -2
  45. package/umd/five-vfx.js +1 -1
  46. package/umd/five-vue.js +1 -1
  47. package/umd/five.js +20 -20
  48. package/vfx/index.js +1 -1
  49. package/vfx/index.mjs +1 -1
  50. package/vue/index.js +1 -1
  51. package/vue/index.mjs +1 -1
  52. package/work-downloader/index.js +1 -1
  53. package/work-downloader/index.mjs +1 -1
package/five/index.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  * @license
3
3
  * @realsee/five
4
4
  * Generated: 9/25/2025
5
- * Version: 6.6.4
5
+ * Version: 6.7.0-alpha.1
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -759,8 +759,8 @@ CryptoJS.lib.Cipher || (function(n) {
759
759
  },
760
760
  _doCryptBlock: function(w, C, I, H, M, B, L, O) {
761
761
  for (var F = this._nRounds, Q = w[C] ^ I[0], V = w[C + 1] ^ I[1], J = w[C + 2] ^ I[2], j = w[C + 3] ^ I[3], N = 4, D = 1; D < F; D++)
762
- var U = H[Q >>> 24] ^ M[V >>> 16 & 255] ^ B[J >>> 8 & 255] ^ L[j & 255] ^ I[N++], z = H[V >>> 24] ^ M[J >>> 16 & 255] ^ B[j >>> 8 & 255] ^ L[Q & 255] ^ I[N++], G = H[J >>> 24] ^ M[j >>> 16 & 255] ^ B[Q >>> 8 & 255] ^ L[V & 255] ^ I[N++], j = H[j >>> 24] ^ M[Q >>> 16 & 255] ^ B[V >>> 8 & 255] ^ L[J & 255] ^ I[N++], Q = U, V = z, J = G;
763
- U = (O[Q >>> 24] << 24 | O[V >>> 16 & 255] << 16 | O[J >>> 8 & 255] << 8 | O[j & 255]) ^ I[N++], z = (O[V >>> 24] << 24 | O[J >>> 16 & 255] << 16 | O[j >>> 8 & 255] << 8 | O[Q & 255]) ^ I[N++], G = (O[J >>> 24] << 24 | O[j >>> 16 & 255] << 16 | O[Q >>> 8 & 255] << 8 | O[V & 255]) ^ I[N++], j = (O[j >>> 24] << 24 | O[Q >>> 16 & 255] << 16 | O[V >>> 8 & 255] << 8 | O[J & 255]) ^ I[N++], w[C] = U, w[C + 1] = z, w[C + 2] = G, w[C + 3] = j;
762
+ var U = H[Q >>> 24] ^ M[V >>> 16 & 255] ^ B[J >>> 8 & 255] ^ L[j & 255] ^ I[N++], z = H[V >>> 24] ^ M[J >>> 16 & 255] ^ B[j >>> 8 & 255] ^ L[Q & 255] ^ I[N++], K = H[J >>> 24] ^ M[j >>> 16 & 255] ^ B[Q >>> 8 & 255] ^ L[V & 255] ^ I[N++], j = H[j >>> 24] ^ M[Q >>> 16 & 255] ^ B[V >>> 8 & 255] ^ L[J & 255] ^ I[N++], Q = U, V = z, J = K;
763
+ U = (O[Q >>> 24] << 24 | O[V >>> 16 & 255] << 16 | O[J >>> 8 & 255] << 8 | O[j & 255]) ^ I[N++], z = (O[V >>> 24] << 24 | O[J >>> 16 & 255] << 16 | O[j >>> 8 & 255] << 8 | O[Q & 255]) ^ I[N++], K = (O[J >>> 24] << 24 | O[j >>> 16 & 255] << 16 | O[Q >>> 8 & 255] << 8 | O[V & 255]) ^ I[N++], j = (O[j >>> 24] << 24 | O[Q >>> 16 & 255] << 16 | O[V >>> 8 & 255] << 8 | O[J & 255]) ^ I[N++], w[C] = U, w[C + 1] = z, w[C + 2] = K, w[C + 3] = j;
764
764
  },
765
765
  keySize: 8
766
766
  });
@@ -3191,8 +3191,8 @@ function X509(n) {
3191
3191
  var z = JSON.stringify(U.array).replace(/[\[\]\{\}\"]/g, "");
3192
3192
  return z;
3193
3193
  }, E = function(U) {
3194
- for (var z = "", G = U.array, j = 0; j < G.length; j++) {
3195
- var Q = G[j];
3194
+ for (var z = "", K = U.array, j = 0; j < K.length; j++) {
3195
+ var Q = K[j];
3196
3196
  if (z += " policy oid: " + Q.policyoid + `
3197
3197
  `, Q.array !== void 0)
3198
3198
  for (var V = 0; V < Q.array.length; V++) {
@@ -3203,8 +3203,8 @@ function X509(n) {
3203
3203
  }
3204
3204
  return z;
3205
3205
  }, b = function(U) {
3206
- for (var z = "", G = U.array, j = 0; j < G.length; j++) {
3207
- var Q = G[j];
3206
+ for (var z = "", K = U.array, j = 0; j < K.length; j++) {
3207
+ var Q = K[j];
3208
3208
  try {
3209
3209
  Q.dpname.full[0].uri !== void 0 && (z += " " + Q.dpname.full[0].uri + `
3210
3210
  `);
@@ -3218,8 +3218,8 @@ function X509(n) {
3218
3218
  }
3219
3219
  return z;
3220
3220
  }, T = function(U) {
3221
- for (var z = "", G = U.array, j = 0; j < G.length; j++) {
3222
- var Q = G[j];
3221
+ for (var z = "", K = U.array, j = 0; j < K.length; j++) {
3222
+ var Q = K[j];
3223
3223
  Q.caissuer !== void 0 && (z += " caissuer: " + Q.caissuer + `
3224
3224
  `), Q.ocsp !== void 0 && (z += " ocsp: " + Q.ocsp + `
3225
3225
  `);
@@ -3951,8 +3951,8 @@ var PBMCustomShader = (
3951
3951
  `));
3952
3952
  var U = String(r.clippers.length);
3953
3953
  v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, U), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, U);
3954
- for (var z = 0, G = B; z < G.length; z++) {
3955
- var j = G[z];
3954
+ for (var z = 0, K = B; z < K.length; z++) {
3955
+ var j = K[z];
3956
3956
  j.onBeforeCompile && j.onBeforeCompile(v, E);
3957
3957
  }
3958
3958
  };
@@ -5207,8 +5207,8 @@ function ajax(n, t, e, r, o) {
5207
5207
  }
5208
5208
  var O = C.split(","), F = (O[0].match(/:(.*?);/) || [])[1], N = O[1];
5209
5209
  if (t.responseType === "arraybuffer" || t.responseType === "blob") {
5210
- for (var D = atob(O[1]), U = D.length, z = new Uint8Array(U), G = 0; G < U; G++)
5211
- z[G] = D.charCodeAt(G);
5210
+ for (var D = atob(O[1]), U = D.length, z = new Uint8Array(U), K = 0; K < U; K++)
5211
+ z[K] = D.charCodeAt(K);
5212
5212
  t.responseType === "arraybuffer" ? N = z.buffer : N = new Blob([z], { type: F });
5213
5213
  }
5214
5214
  var j = {}, Q = {
@@ -5427,6 +5427,17 @@ function omitUndefinedFields(n) {
5427
5427
  }
5428
5428
  return t;
5429
5429
  }
5430
+ var hrefAElement = typeof document != "undefined" ? document.createElement("a") : { href: "" };
5431
+ function isAbsoluteURL(n) {
5432
+ return n.indexOf("/") === 0 || /^[0-9a-z]+\:/i.test(n);
5433
+ }
5434
+ function getFullURL(n) {
5435
+ if (typeof URL != "undefined")
5436
+ return new URL(n, location.href).href;
5437
+ hrefAElement.href = n;
5438
+ var t = hrefAElement.href;
5439
+ return hrefAElement.href = "", t;
5440
+ }
5430
5441
  function pathJoin() {
5431
5442
  for (var n = [], t = 0; t < arguments.length; t++)
5432
5443
  n[t] = arguments[t];
@@ -5442,8 +5453,31 @@ function pathJoin() {
5442
5453
  }
5443
5454
  return e.join("/");
5444
5455
  }
5445
- function isAbsoluteURL(n) {
5446
- return n.indexOf("/") === 0 || /^[0-9a-z]+\:/i.test(n);
5456
+ function appendSearch(n, t) {
5457
+ if (t === void 0 && (t = ""), (t[0] === "?" || t[0] === "&") && (t = t.slice(1)), !t)
5458
+ return n;
5459
+ var e = n.indexOf("#"), r = "";
5460
+ return e >= 0 && (r = n.slice(e), n = n.slice(0, e)), (n[n.length - 1] === "?" || n[n.length - 1] === "&") && (n = n.slice(0, -1)), n.indexOf("?") >= 0 ? "".concat(n, "&").concat(t).concat(r) : "".concat(n, "?").concat(t).concat(r);
5461
+ }
5462
+ function normalizeURL(n) {
5463
+ var t, e = /^(http\:|https\:|file\:)?\/\/[^/]/.exec(n);
5464
+ if (!e)
5465
+ return n;
5466
+ var r = e[1] || "", o = n.slice(r.length + 2), s = o.indexOf("#");
5467
+ s >= 0 && (n.slice(s), o = n.slice(0, s));
5468
+ var u = o.indexOf("?");
5469
+ u >= 0 && (n.slice(u), o = n.slice(0, u));
5470
+ for (var l = o.split("/"), c = l.shift(), f = (t = l.pop()) !== null && t !== void 0 ? t : "", d = [], h = 0, p = l; h < p.length; h++) {
5471
+ var m = p[h];
5472
+ if (!(m === "" || m === ".")) {
5473
+ if (m === "..") {
5474
+ d.pop();
5475
+ continue;
5476
+ }
5477
+ d.push(m);
5478
+ }
5479
+ }
5480
+ return r + "//" + c + "/" + d.join("/") + "/" + f;
5447
5481
  }
5448
5482
  var webp = "data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAIAAUAmJaQAA3AA/vz0AAA=", avif = "data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAAGhbWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAsaWxvYwAAAABEAAACAAEAAAABAAAB3gAAABkAAgAAAAEAAAHJAAAAFQAAAEJpaW5mAAAAAAACAAAAGmluZmUCAAAAAAEAAGF2MDFDb2xvcgAAAAAaaW5mZQIAAAAAAgAAYXYwMUFscGhhAAAAABppcmVmAAAAAAAAAA5hdXhsAAIAAQABAAAA12lwcnAAAACxaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIAAoAAAAAUaXNwZQAAAAAAAAACAAAAAgAAAA5waXhpAAAAAAEIAAAADGF2MUOBABwAAAAAOGF1eEMAAAAAdXJuOm1wZWc6bXBlZ0I6Y2ljcDpzeXN0ZW1zOmF1eGlsaWFyeTphbHBoYQAAAAAeaXBtYQAAAAAAAAACAAEEAQKDBAACBAUGhwgAAAA2bWRhdBIACgQYADLVMgsWQBhhIAQqrNj/+BIACgUYADLEoDIOFkADDDDCQAACDaqCCb4=", heif = "data:image/heif;base64,AAAAGGZ0eXBoZWljAAAAAG1pZjFoZWljAAABL21ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAHBpY3QAAAAAAAAAAAAAAAAAAAAADnBpdG0AAAAAAAEAAAAjaWluZgAAAAAAAQAAABVpbmZlAgAAAAABAABodmMxAAAAAK9pcHJwAAAAkmlwY28AAAB2aHZjQwEBYAAAAAAAAAAAAADwAPz9+PgAACcDoAABAB5AAQwG//8BYAAAAwAAAwAAAwAAAwAAAwAAreTLgSChAAEAI0IBBwFgAAADAAADAAADAAADAAADAAChInJJlreTLySZNdggogABAAdEAcA98DMkAAAAFGlzcGUAAAAAAAAAAgAAAAIAAAAVaXBtYQAAAAAAAAABAAECgQIAAAAiaWxvYwAAAABEQAABAAEAAAAAAU8AAQAAAAAAAAAOAAAAFm1kYXQAAAAKJgGvLvkQwuWM4A==";
5449
5483
  function checkImage(n) {
@@ -6075,38 +6109,7 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
6075
6109
  });
6076
6110
  }, n;
6077
6111
  })()
6078
- ), dequeuing = !1, queue = [];
6079
- function dequeue(n) {
6080
- if (n === void 0 && (n = !1), !(!n && dequeuing)) {
6081
- dequeuing = !0;
6082
- var t = queue.shift();
6083
- if (t) {
6084
- try {
6085
- t();
6086
- } catch (e) {
6087
- }
6088
- AnimationFrameLoop.shared.add(function() {
6089
- return dequeue(!0);
6090
- }, !0, 2, -100);
6091
- } else
6092
- dequeuing = !1;
6093
- }
6094
- }
6095
- function delay$1(n) {
6096
- return new Promise(function(t, e) {
6097
- var r = function() {
6098
- try {
6099
- t(n());
6100
- } catch (o) {
6101
- e(o);
6102
- }
6103
- };
6104
- queue.push(r), AnimationFrameLoop.shared.add(function() {
6105
- return dequeue();
6106
- }, !0, 2, -100);
6107
- });
6108
- }
6109
- var commonjsGlobal = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, indexMinimal = {}, minimal$1 = {}, aspromise, hasRequiredAspromise;
6112
+ ), commonjsGlobal = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, indexMinimal = {}, minimal$1 = {}, aspromise, hasRequiredAspromise;
6110
6113
  function requireAspromise() {
6111
6114
  if (hasRequiredAspromise) return aspromise;
6112
6115
  hasRequiredAspromise = 1, aspromise = n;
@@ -7374,14 +7377,11 @@ function loadPbm(n, t) {
7374
7377
  responseType: "arraybuffer"
7375
7378
  });
7376
7379
  }).then(function(b) {
7377
- return E.byteLength = b.body.byteLength, delay$1(function() {
7378
- var T = new Uint8Array(b.body);
7379
- return Model$2.decode(T);
7380
- });
7380
+ E.byteLength = b.body.byteLength;
7381
+ var T = new Uint8Array(b.body);
7382
+ return Model$2.decode(T);
7381
7383
  }).then(function(b) {
7382
- return delay$1(function() {
7383
- return parse$4(b, f, h, p, m, A, d);
7384
- });
7384
+ return parse$4(b, f, h, p, m, A, d);
7385
7385
  }).then(function(b) {
7386
7386
  A.clear();
7387
7387
  var T = new THREE.Group();
@@ -7452,9 +7452,9 @@ function parsePBMModel(n) {
7452
7452
  S += h.faces.indices.length;
7453
7453
  }
7454
7454
  for (var w = new Float32Array(S * 3), C = new Float32Array(S * 2), I = new Float32Array(S * 3), H = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], L = 0, O = 0; O < T.length; O++) {
7455
- for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, D = h.vertices.uvs, U = h.faces.indices, z = h.faces.normals, G = h.vertices.marks, j = U.length, R = 0; R < j; R++) {
7455
+ for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, D = h.vertices.uvs, U = h.faces.indices, z = h.faces.normals, K = h.vertices.marks, j = U.length, R = 0; R < j; R++) {
7456
7456
  var Q = U[R], V = w[L * 3 + R * 3] = N[Q * 3], J = w[L * 3 + R * 3 + 1] = N[Q * 3 + 1], W = w[L * 3 + R * 3 + 2] = N[Q * 3 + 2];
7457
- H && (H[L + R] = G[Q]), C[L * 2 + R * 2] = D[Q * 2], C[L * 2 + R * 2 + 1] = D[Q * 2 + 1];
7457
+ H && (H[L + R] = K[Q]), C[L * 2 + R * 2] = D[Q * 2], C[L * 2 + R * 2 + 1] = D[Q * 2 + 1];
7458
7458
  var X = Math.floor(R / 3) * 3;
7459
7459
  I[L * 3 + R * 3] = z[X], I[L * 3 + R * 3 + 1] = z[X + 1], I[L * 3 + R * 3 + 2] = z[X + 2], V < F[0] && (F[0] = V), J < F[1] && (F[1] = J), W < F[2] && (F[2] = W), V > F[3] && (F[3] = V), J > F[4] && (F[4] = J), W > F[5] && (F[5] = W);
7460
7460
  }
@@ -7485,10 +7485,10 @@ function parsePBMModel(n) {
7485
7485
  var h = T[R];
7486
7486
  Y += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7487
7487
  }
7488
- for (var w = new Float32Array(Y * 3), C = new Float32Array(Y * 2), I = void 0, K = new Float32Array(Y), ee = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, L = 0, O = 0; O < T.length; O++) {
7489
- for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, re = h.vertices.marks, D = h.vertices.uvs, U = h.faces.indices, ie = N.length / 3, j = U.length, R = 0; R < ie; R++) {
7488
+ for (var w = new Float32Array(Y * 3), C = new Float32Array(Y * 2), I = void 0, G = new Float32Array(Y), ee = new Uint32Array(S), H = c ? new Float32Array(S) : void 0, M = [], B = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], te = 0, L = 0, O = 0; O < T.length; O++) {
7489
+ for (var F = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[O], N = h.vertices.xyz, ne = h.vertices.marks, D = h.vertices.uvs, U = h.faces.indices, ie = N.length / 3, j = U.length, R = 0; R < ie; R++) {
7490
7490
  var V = w[L * 3 + R * 3] = N[R * 3], J = w[L * 3 + R * 3 + 1] = N[R * 3 + 1], W = w[L * 3 + R * 3 + 2] = N[R * 3 + 2];
7491
- H && (H[L + R] = re[R]), C[L * 2 + R * 2] = D[R * 2], C[L * 2 + R * 2 + 1] = D[R * 2 + 1], K[L + R] = b, V < F[0] && (F[0] = V), J < F[1] && (F[1] = J), W < F[2] && (F[2] = W), V > F[3] && (F[3] = V), J > F[4] && (F[4] = J), W > F[5] && (F[5] = W);
7491
+ H && (H[L + R] = ne[R]), C[L * 2 + R * 2] = D[R * 2], C[L * 2 + R * 2 + 1] = D[R * 2 + 1], G[L + R] = b, V < F[0] && (F[0] = V), J < F[1] && (F[1] = J), W < F[2] && (F[2] = W), V > F[3] && (F[3] = V), J > F[4] && (F[4] = J), W > F[5] && (F[5] = W);
7492
7492
  }
7493
7493
  F[0] < B[0] && (B[0] = F[0]), F[1] < B[1] && (B[1] = F[1]), F[2] < B[2] && (B[2] = F[2]), F[3] > B[3] && (B[3] = F[3]), F[4] > B[4] && (B[4] = F[4]), F[5] > B[5] && (B[5] = F[5]);
7494
7494
  for (var R = 0; R < j; R++)
@@ -7552,8 +7552,8 @@ function parse$4(n, t, e, r, o, s, u) {
7552
7552
  var F = U[D], z = void 0;
7553
7553
  if (F.texture) {
7554
7554
  if (z = F.texture, r.length > 0 && r.indexOf(F.texture) === -1) {
7555
- for (var G = 0, j = r; G < j.length; G++) {
7556
- var Q = j[G], V = isAbsoluteURL(Q) ? Q : pathJoin(e, Q), J = V.slice(F.texture.length * -1) === F.texture;
7555
+ for (var K = 0, j = r; K < j.length; K++) {
7556
+ var Q = j[K], V = isAbsoluteURL(Q) ? Q : pathJoin(e, Q), J = V.slice(F.texture.length * -1) === F.texture;
7557
7557
  if (J) {
7558
7558
  z = Q;
7559
7559
  break;
@@ -7570,27 +7570,27 @@ function parse$4(n, t, e, r, o, s, u) {
7570
7570
  X.name = "model_floor_" + C, X.userData.createAt = v, X.userData.description = E, X.matrix.compose(X.position, X.quaternion, X.scale), X.matrixAutoUpdate = !1, X.frustumCulled = !1, c = v, f = E, d.push(X);
7571
7571
  }
7572
7572
  o = autoRestImageOptionsByTextureLength(o, m);
7573
- for (var Z = [], Y = function(re) {
7573
+ for (var Z = [], Y = function(ne) {
7574
7574
  var ie = void 0;
7575
- s && (ie = s.get(re)), ie || (ie = loadTexture$1(re, e, o, u), s && s.set(re, ie)), Z.push(ie.then(function(ce) {
7576
- for (var ae = 0, de = h[re]; ae < de.length; ae++) {
7575
+ s && (ie = s.get(ne)), ie || (ie = loadTexture$1(ne, e, o, u), s && s.set(ne, ie)), Z.push(ie.then(function(ce) {
7576
+ for (var ae = 0, de = h[ne]; ae < de.length; ae++) {
7577
7577
  var ge = de[ae];
7578
7578
  ge.map && (p.delete(ge.map), ge.map.dispose()), ge.map = ce, p.add(ce);
7579
7579
  }
7580
7580
  return ce;
7581
7581
  }).catch(function() {
7582
- for (var ce = 0, ae = h[re]; ce < ae.length; ce++) {
7582
+ for (var ce = 0, ae = h[ne]; ce < ae.length; ce++) {
7583
7583
  var de = ae[ce];
7584
7584
  de.map && (p.delete(de.map), de.map.dispose()), de.map = null, de.color = new THREE.Color(16777215);
7585
7585
  }
7586
7586
  return null;
7587
7587
  }));
7588
- }, K = 0, ee = Object.keys(h); K < ee.length; K++) {
7589
- var te = ee[K];
7588
+ }, G = 0, ee = Object.keys(h); G < ee.length; G++) {
7589
+ var te = ee[G];
7590
7590
  Y(te);
7591
7591
  }
7592
- return Promise.all(Z).then(function(re) {
7593
- var ie = re.filter(function(ce) {
7592
+ return Promise.all(Z).then(function(ne) {
7593
+ var ie = ne.filter(function(ce) {
7594
7594
  return ce instanceof THREE.Texture;
7595
7595
  });
7596
7596
  return {
@@ -7972,21 +7972,17 @@ function loadAt3d(n, t) {
7972
7972
  }).then(function(b) {
7973
7973
  return lzma(b.body);
7974
7974
  }).then(function(b) {
7975
- return delay$1(function() {
7976
- for (var T, S = {
7977
- chunks: [],
7978
- createAt: void 0,
7979
- description: void 0
7980
- }, R = 0, w = b; R < w.length; R++) {
7981
- var C = w[R], I = Model$2.decode(C);
7982
- I.chunks.length && ((T = S.chunks).push.apply(T, I.chunks), S.createAt = I.createAt, S.description = I.description);
7983
- }
7984
- return S;
7985
- });
7975
+ for (var T, S = {
7976
+ chunks: [],
7977
+ createAt: void 0,
7978
+ description: void 0
7979
+ }, R = 0, w = b; R < w.length; R++) {
7980
+ var C = w[R], I = Model$2.decode(C);
7981
+ I.chunks.length && ((T = S.chunks).push.apply(T, I.chunks), S.createAt = I.createAt, S.description = I.description);
7982
+ }
7983
+ return S;
7986
7984
  }).then(function(b) {
7987
- return delay$1(function() {
7988
- return parse$4(b, f, h, p, m, A, d);
7989
- });
7985
+ return parse$4(b, f, h, p, m, A, d);
7990
7986
  }).then(function(b) {
7991
7987
  A.clear();
7992
7988
  var T = new THREE.Group();
@@ -8581,8 +8577,8 @@ function parse$3(n, t, e, r, o) {
8581
8577
  objects: s,
8582
8578
  textures: Array.from(g),
8583
8579
  dispose: function() {
8584
- l.forEach(function(G) {
8585
- G.dispose();
8580
+ l.forEach(function(K) {
8581
+ K.dispose();
8586
8582
  }), l.clear();
8587
8583
  }
8588
8584
  };
@@ -8866,12 +8862,6 @@ function values(n) {
8866
8862
  t.push(n[e]);
8867
8863
  return t;
8868
8864
  }
8869
- function appendSearch(n, t) {
8870
- if (t === void 0 && (t = ""), (t[0] === "?" || t[0] === "&") && (t = t.slice(1)), !t)
8871
- return n;
8872
- var e = n.indexOf("#"), r = "";
8873
- return e >= 0 && (r = n.slice(e), n = n.slice(0, e)), (n[n.length - 1] === "?" || n[n.length - 1] === "&") && (n = n.slice(0, -1)), n.indexOf("?") >= 0 ? "".concat(n, "&").concat(t).concat(r) : "".concat(n, "?").concat(t).concat(r);
8874
- }
8875
8865
  function composeDsiposeSet(n) {
8876
8866
  var t = Array.from(n);
8877
8867
  return function() {
@@ -8995,10 +8985,10 @@ var Parser = (
8995
8985
  Promise.all(A)
8996
8986
  ]).then(function(w) {
8997
8987
  for (var C = w[0], I = w[1], H = w[2], M = w[3], B = w[4], L = [], O = function(U, z) {
8998
- var G = C[U], j = I[U], Q = H[U], V = M[U], J = B[U];
8999
- if (G === void 0)
8988
+ var K = C[U], j = I[U], Q = H[U], V = M[U], J = B[U];
8989
+ if (K === void 0)
9000
8990
  return "continue";
9001
- G.updateMatrix(), G.matrixAutoUpdate = !0;
8991
+ K.updateMatrix(), K.matrixAutoUpdate = !0;
9002
8992
  var W = void 0;
9003
8993
  switch (PATH_PROPERTIES[J.path]) {
9004
8994
  case PATH_PROPERTIES.weights:
@@ -9013,18 +9003,18 @@ var Parser = (
9013
9003
  W = THREE.VectorKeyframeTrack;
9014
9004
  break;
9015
9005
  }
9016
- var X = G.name ? G.name : G.uuid, Z = V.interpolation !== void 0 ? INTERPOLATION[V.interpolation] : THREE.InterpolateLinear, Y = [];
9017
- PATH_PROPERTIES[J.path] === PATH_PROPERTIES.weights ? G.traverse(function(ae) {
9006
+ var X = K.name ? K.name : K.uuid, Z = V.interpolation !== void 0 ? INTERPOLATION[V.interpolation] : THREE.InterpolateLinear, Y = [];
9007
+ PATH_PROPERTIES[J.path] === PATH_PROPERTIES.weights ? K.traverse(function(ae) {
9018
9008
  ae.morphTargetInfluences && Y.push(ae.name ? ae.name : ae.uuid);
9019
9009
  }) : Y.push(X);
9020
- var K = Q.array;
9010
+ var G = Q.array;
9021
9011
  if (Q.normalized) {
9022
- for (var ee = getNormalizedComponentScale(K.constructor), te = new Float32Array(K.length), re = 0, ie = K.length; re < ie; re++)
9023
- te[re] = K[re] * ee;
9024
- K = te;
9012
+ for (var ee = getNormalizedComponentScale(G.constructor), te = new Float32Array(G.length), ne = 0, ie = G.length; ne < ie; ne++)
9013
+ te[ne] = G[ne] * ee;
9014
+ G = te;
9025
9015
  }
9026
- for (var re = 0, ie = Y.length; re < ie; re++) {
9027
- var ce = new W(Y[re] + "." + PATH_PROPERTIES[J.path], j.array, K, Z);
9016
+ for (var ne = 0, ie = Y.length; ne < ie; ne++) {
9017
+ var ce = new W(Y[ne] + "." + PATH_PROPERTIES[J.path], j.array, G, Z);
9028
9018
  L.push(ce);
9029
9019
  }
9030
9020
  }, F = 0, N = C.length; F < N; F++)
@@ -11658,9 +11648,9 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11658
11648
  var u = !e, l = u || t.i != 2, c = t.i;
11659
11649
  u && (e = new u8(o * 3));
11660
11650
  var f = function(te) {
11661
- var re = e.length;
11662
- if (te > re) {
11663
- var ie = new u8(Math.max(re * 2, te));
11651
+ var ne = e.length;
11652
+ if (te > ne) {
11653
+ var ie = new u8(Math.max(ne * 2, te));
11664
11654
  ie.set(e), e = ie;
11665
11655
  }
11666
11656
  }, d = t.f || 0, h = t.p || 0, p = t.b || 0, m = t.l, A = t.d, g = t.m, y = t.n, v = o * 8;
@@ -11708,8 +11698,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11708
11698
  }
11709
11699
  }
11710
11700
  l && f(p + 131072);
11711
- for (var G = (1 << g) - 1, j = (1 << y) - 1, Q = h; ; Q = h) {
11712
- var N = m[bits16(n, h) & G], V = N >> 4;
11701
+ for (var K = (1 << g) - 1, j = (1 << y) - 1, Q = h; ; Q = h) {
11702
+ var N = m[bits16(n, h) & K], V = N >> 4;
11713
11703
  if (h += N & 15, h > v) {
11714
11704
  c && err(0);
11715
11705
  break;
@@ -11739,9 +11729,9 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11739
11729
  l && f(p + 131072);
11740
11730
  var Y = p + J;
11741
11731
  if (p < z) {
11742
- var K = s - z, ee = Math.min(z, Y);
11743
- for (K + p < 0 && err(3); p < ee; ++p)
11744
- e[p] = r[K + p];
11732
+ var G = s - z, ee = Math.min(z, Y);
11733
+ for (G + p < 0 && err(3); p < ee; ++p)
11734
+ e[p] = r[G + p];
11745
11735
  }
11746
11736
  for (; p < Y; ++p)
11747
11737
  e[p] = e[p - z];
@@ -13439,15 +13429,15 @@ function loadX3p(n, t) {
13439
13429
  });
13440
13430
  }
13441
13431
  function parse$1(n, t) {
13442
- for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, b, T, S, R, w, C, I, H, M, B, L, O, F, N, D, U, z, G, j, Q, V, J, W, X, Z, Y, K, ee, te, re, ie, ce, ae, de, ge, ye, xe, le = unzipSync(n), he = "", ne = null, se = 0, pe = Object.keys(le); se < pe.length; se++) {
13432
+ for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, b, T, S, R, w, C, I, H, M, B, L, O, F, N, D, U, z, K, j, Q, V, J, W, X, Z, Y, G, ee, te, ne, ie, ce, ae, de, ge, ye, xe, le = unzipSync(n), he = "", re = null, se = 0, pe = Object.keys(le); se < pe.length; se++) {
13443
13433
  var me = pe[se];
13444
- /(^|\/)main\.xml$/i.test(me) && (ne = le[me], he = me.slice(0, me.lastIndexOf("/") + 1));
13434
+ /(^|\/)main\.xml$/i.test(me) && (re = le[me], he = me.slice(0, me.lastIndexOf("/") + 1));
13445
13435
  }
13446
- if (!ne)
13436
+ if (!re)
13447
13437
  throw new Error("X3p: main.xml not found.");
13448
13438
  if (typeof DOMParser == "undefined")
13449
13439
  throw new Error("X3p: DOMParser not found.");
13450
- var Ne = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), qe = new DOMParser(), Ye = decodeText(ne), Ve = qe.parseFromString(Ye, "text/xml"), ve = Ve.querySelector("Record1 Axes"), Ke = {
13440
+ var Ne = (e = t.color) !== null && e !== void 0 ? e : new THREE.Color(10066329), qe = new DOMParser(), Ye = decodeText(re), Ve = qe.parseFromString(Ye, "text/xml"), ve = Ve.querySelector("Record1 Axes"), Ke = {
13451
13441
  x: {
13452
13442
  type: (s = (o = (r = ve == null ? void 0 : ve.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",
13453
13443
  dataType: (c = (l = (u = ve == null ? void 0 : ve.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",
@@ -13467,7 +13457,7 @@ function parse$1(n, t) {
13467
13457
  offset: Number((N = (F = ve == null ? void 0 : ve.querySelector("CZ Offset")) === null || F === void 0 ? void 0 : F.textContent) !== null && N !== void 0 ? N : "0")
13468
13458
  }
13469
13459
  }, Te = null, Le = Ve.querySelector("Record1 Axes Rotation");
13470
- Le && (Te = new THREE.Matrix3(), Te.set(Number((U = (D = Le.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && U !== void 0 ? U : 0), Number((G = (z = Le.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && G !== void 0 ? G : 0), Number((Q = (j = Le.querySelector("r13")) === null || j === void 0 ? void 0 : j.textContent) !== null && Q !== void 0 ? Q : 0), Number((J = (V = Le.querySelector("r21")) === null || V === void 0 ? void 0 : V.textContent) !== null && J !== void 0 ? J : 0), Number((X = (W = Le.querySelector("r22")) === null || W === void 0 ? void 0 : W.textContent) !== null && X !== void 0 ? X : 0), Number((Y = (Z = Le.querySelector("r23")) === null || Z === void 0 ? void 0 : Z.textContent) !== null && Y !== void 0 ? Y : 0), Number((ee = (K = Le.querySelector("r31")) === null || K === void 0 ? void 0 : K.textContent) !== null && ee !== void 0 ? ee : 0), Number((re = (te = Le.querySelector("r32")) === null || te === void 0 ? void 0 : te.textContent) !== null && re !== void 0 ? re : 0), Number((ce = (ie = Le.querySelector("r33")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && ce !== void 0 ? ce : 0)));
13460
+ Le && (Te = new THREE.Matrix3(), Te.set(Number((U = (D = Le.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && U !== void 0 ? U : 0), Number((K = (z = Le.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && K !== void 0 ? K : 0), Number((Q = (j = Le.querySelector("r13")) === null || j === void 0 ? void 0 : j.textContent) !== null && Q !== void 0 ? Q : 0), Number((J = (V = Le.querySelector("r21")) === null || V === void 0 ? void 0 : V.textContent) !== null && J !== void 0 ? J : 0), Number((X = (W = Le.querySelector("r22")) === null || W === void 0 ? void 0 : W.textContent) !== null && X !== void 0 ? X : 0), Number((Y = (Z = Le.querySelector("r23")) === null || Z === void 0 ? void 0 : Z.textContent) !== null && Y !== void 0 ? Y : 0), Number((ee = (G = Le.querySelector("r31")) === null || G === void 0 ? void 0 : G.textContent) !== null && ee !== void 0 ? ee : 0), Number((ne = (te = Le.querySelector("r32")) === null || te === void 0 ? void 0 : te.textContent) !== null && ne !== void 0 ? ne : 0), Number((ce = (ie = Le.querySelector("r33")) === null || ie === void 0 ? void 0 : ie.textContent) !== null && ce !== void 0 ? ce : 0)));
13471
13461
  var Ie = (ae = Ve.querySelector("Record3 DataLink PointDataLink")) === null || ae === void 0 ? void 0 : ae.textContent;
13472
13462
  if (typeof Ie != "string")
13473
13463
  throw new Error("X3p: PointDataLink not found.");
@@ -14103,8 +14093,8 @@ var BVHVector3 = (
14103
14093
  function F(N) {
14104
14094
  var D = N.startIndex, U = N.endIndex, z = N.extents;
14105
14095
  B[0] = z[3] - z[0], B[1] = z[4] - z[1], B[2] = z[5] - z[2], L.sort(O);
14106
- for (var G = 0; G < 3; G++) {
14107
- for (var j = L[G], Q = z[j] + z[j + 3], V = D, J = U - 1, W = -1, X = void 0; V <= J; )
14096
+ for (var K = 0; K < 3; K++) {
14097
+ for (var j = L[K], Q = z[j] + z[j + 3], V = D, J = U - 1, W = -1, X = void 0; V <= J; )
14108
14098
  W === -1 ? (X = u[V], l[X * 6 + j] + l[X * 6 + j + 3] < Q ? V++ : W = X) : (X = u[J], l[X * 6 + j] + l[X * 6 + j + 3] >= Q || (u[V] = X, u[J] = W, W = -1, V++), J--);
14109
14099
  if (V > D && V < U) {
14110
14100
  var Z = new BVHNode(++d, calcExtents(u, l, D, V, EPSILON$1), D, V, N.deepth + 1);
@@ -14147,19 +14137,19 @@ var BVHVector3 = (
14147
14137
  this.getPositionByIndex(O, F);
14148
14138
  var N = F.x, D = F.y, U = F.z, z = new BVHVector3(0, 0, 0);
14149
14139
  this.getPositionByIndex(O + 1, z);
14150
- var G = z.x, j = z.y, Q = z.z, V = new BVHVector3(0, 0, 0);
14140
+ var K = z.x, j = z.y, Q = z.z, V = new BVHVector3(0, 0, 0);
14151
14141
  this.getPositionByIndex(O + 2, V);
14152
- var J = V.x, W = V.y, X = V.z, Z = G - N, Y = j - D, K = Q - U, ee = J - N, te = W - D, re = X - U, ie = Y * re - K * te, ce = K * ee - Z * re, ae = Z * te - Y * ee, de = w * ie + C * ce + I * ae, ge = void 0;
14142
+ var J = V.x, W = V.y, X = V.z, Z = K - N, Y = j - D, G = Q - U, ee = J - N, te = W - D, ne = X - U, ie = Y * ne - G * te, ce = G * ee - Z * ne, ae = Z * te - Y * ee, de = w * ie + C * ce + I * ae, ge = void 0;
14153
14143
  if (de > 0)
14154
14144
  ge = 1;
14155
14145
  else if (de < 0)
14156
14146
  ge = -1, de = -de;
14157
14147
  else
14158
14148
  continue;
14159
- var ye = T - N, xe = S - D, le = R - U, he = ge * (w * (xe * re - le * te) + C * (le * ee - ye * re) + I * (ye * te - xe * ee));
14149
+ var ye = T - N, xe = S - D, le = R - U, he = ge * (w * (xe * ne - le * te) + C * (le * ee - ye * ne) + I * (ye * te - xe * ee));
14160
14150
  if (!(he < 0)) {
14161
- var ne = ge * (w * (Y * le - K * xe) + C * (K * ye - Z * le) + I * (Z * xe - Y * ye));
14162
- if (!(ne < 0) && !(he + ne > de)) {
14151
+ var re = ge * (w * (Y * le - G * xe) + C * (G * ye - Z * le) + I * (Z * xe - Y * ye));
14152
+ if (!(re < 0) && !(he + re > de)) {
14163
14153
  var se = -ge * (ye * ie + xe * ce + le * ae);
14164
14154
  if (!(se < 0)) {
14165
14155
  var pe = se / de, me = new BVHVector3(T + w * pe, S + C * pe, R + I * pe), Ne = new BVHIntersect(F, z, V, L, me);
@@ -14225,8 +14215,8 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14225
14215
  function I(H) {
14226
14216
  var M = H.startIndex, B = H.endIndex, L = H.extents;
14227
14217
  R[0] = L[3] - L[0], R[1] = L[4] - L[1], R[2] = L[5] - L[2];
14228
- for (var O = w.sort(C)[0], F = ORDER_AXISES[O], N = (L[O] + L[O + 3]) / 2, D = M, U = B - 1, z = -1, G; D <= U; )
14229
- z === -1 ? (G = l[D], s(G, scratchVector3$8), scratchVector3$8[F] < N ? D++ : z = G) : (G = l[U], s(G, scratchVector3$8), scratchVector3$8[F] >= N || (l[D] = G, l[U] = z, z = -1, D++), U--);
14218
+ for (var O = w.sort(C)[0], F = ORDER_AXISES[O], N = (L[O] + L[O + 3]) / 2, D = M, U = B - 1, z = -1, K; D <= U; )
14219
+ z === -1 ? (K = l[D], s(K, scratchVector3$8), scratchVector3$8[F] < N ? D++ : z = K) : (K = l[U], s(K, scratchVector3$8), scratchVector3$8[F] >= N || (l[D] = K, l[U] = z, z = -1, D++), U--);
14230
14220
  if (D > M) {
14231
14221
  var j = L.slice();
14232
14222
  j[O + 3] = N + EPSILON;
@@ -14256,7 +14246,7 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14256
14246
  this.getPositionByIndex(C, I);
14257
14247
  var H = I.x, M = I.y, B = I.z, L = e.x, O = e.y, F = e.z, N = r.x, D = r.y, U = r.z, z = N * (H - L) + D * (M - O) + U * (B - F);
14258
14248
  if (z > 0 ? (L += N * z, O += D * z, F += U * z) : z < 0 && (z = 0), N = H - L, D = M - O, U = B - F, N * N + D * D + U * U <= m) {
14259
- var G = new BVHVector3(L, O, F), j = new BVHIntersect(I, I, I, C, G);
14249
+ var K = new BVHVector3(L, O, F), j = new BVHIntersect(I, I, I, C, K);
14260
14250
  (!u || u(j)) && (s ? z < E && (E = z, l.length > 0 && (l.length = 0), l.push(j)) : l.push(j));
14261
14251
  }
14262
14252
  }
@@ -15215,26 +15205,6 @@ var TileRequestScheduler = (
15215
15205
  }, n;
15216
15206
  })()
15217
15207
  );
15218
- function normalizeURL(n) {
15219
- var t, e = /^(http\:|https\:|file\:)?\/\/[^/]/.exec(n);
15220
- if (!e)
15221
- return n;
15222
- var r = e[1] || "", o = n.slice(r.length + 2), s = o.indexOf("#");
15223
- s >= 0 && (n.slice(s), o = n.slice(0, s));
15224
- var u = o.indexOf("?");
15225
- u >= 0 && (n.slice(u), o = n.slice(0, u));
15226
- for (var l = o.split("/"), c = l.shift(), f = (t = l.pop()) !== null && t !== void 0 ? t : "", d = [], h = 0, p = l; h < p.length; h++) {
15227
- var m = p[h];
15228
- if (!(m === "" || m === ".")) {
15229
- if (m === "..") {
15230
- d.pop();
15231
- continue;
15232
- }
15233
- d.push(m);
15234
- }
15235
- }
15236
- return r + "//" + c + "/" + d.join("/") + "/" + f;
15237
- }
15238
15208
  function normalizeTileHeader(n, t) {
15239
15209
  var e;
15240
15210
  if (n.content) {
@@ -16431,16 +16401,16 @@ var Tile3D = (
16431
16401
  maxScreenSpaceError: g.maxScreenSpaceError,
16432
16402
  memoryAdjustedOverflow: g.memoryAdjustedOverflow,
16433
16403
  memoryAdjustedScreenSpaceError: g.memoryAdjustedScreenSpaceError
16434
- }, R = g.cacheCameras.map(function(ne) {
16435
- return ne.updateProjectionMatrix(), __assign(__assign({}, S), { camera: {
16404
+ }, R = g.cacheCameras.map(function(re) {
16405
+ return re.updateProjectionMatrix(), __assign(__assign({}, S), { camera: {
16436
16406
  type: r.type,
16437
- position: new THREE.Vector3().copy(ne.position),
16438
- direction: ne.getWorldDirection(new THREE.Vector3()),
16439
- up: new THREE.Vector3().copy(ne.up),
16440
- projectionMatrix: ne.projectionMatrix.clone(),
16441
- visible: ne.visible,
16407
+ position: new THREE.Vector3().copy(re.position),
16408
+ direction: re.getWorldDirection(new THREE.Vector3()),
16409
+ up: new THREE.Vector3().copy(re.up),
16410
+ projectionMatrix: re.projectionMatrix.clone(),
16411
+ visible: re.visible,
16442
16412
  refine: !0
16443
- }, cullingVolume: new CullingVolume().setFromCamera(ne) });
16413
+ }, cullingVolume: new CullingVolume().setFromCamera(re) });
16444
16414
  });
16445
16415
  this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), A = !0);
16446
16416
  var w = !this.autoRefine;
@@ -16453,9 +16423,9 @@ var Tile3D = (
16453
16423
  g.pano1 && H.setFromMatrixPosition(g.pano1.matrix), I.distanceTo(H) < 10 && (w = !0);
16454
16424
  }
16455
16425
  }
16456
- if (w || this.tileset.update(S, R), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(ne) {
16457
- if (c.refineProgress[1]++, ne.content) {
16458
- var se = ne.content.loadState;
16426
+ if (w || this.tileset.update(S, R), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(re) {
16427
+ if (c.refineProgress[1]++, re.content) {
16428
+ var se = re.content.loadState;
16459
16429
  if (se === "UNLOADED" || se === "LOADING") {
16460
16430
  c.refined = !1;
16461
16431
  return;
@@ -16465,22 +16435,22 @@ var Tile3D = (
16465
16435
  }), this.loaded === !1 && this.autoRefine) {
16466
16436
  this.loaded = !0;
16467
16437
  var M = !1;
16468
- this.tileset.needsRefinedTiles.forEach(function(ne) {
16469
- if (c.loaded !== !1 && ne.content) {
16470
- if (ne.state.visible && (M = !0), S.skipLevelOfDetail) {
16471
- if (ne.state.finalResolution) {
16472
- var se = ne.state.ancestorWithContentAvailable, pe = se && se.content ? se.content : ne.content, me = pe.loadState;
16438
+ this.tileset.needsRefinedTiles.forEach(function(re) {
16439
+ if (c.loaded !== !1 && re.content) {
16440
+ if (re.state.visible && (M = !0), S.skipLevelOfDetail) {
16441
+ if (re.state.finalResolution) {
16442
+ var se = re.state.ancestorWithContentAvailable, pe = se && se.content ? se.content : re.content, me = pe.loadState;
16473
16443
  (me === "UNLOADED" || me === "LOADING") && (c.loaded = !1);
16474
16444
  }
16475
- } else if (ne.state.visible && ne.levelOfContent <= 0) {
16476
- var me = ne.content.loadState;
16445
+ } else if (re.state.visible && re.levelOfContent <= 0) {
16446
+ var me = re.content.loadState;
16477
16447
  (me === "UNLOADED" || me === "LOADING") && (c.loaded = !1);
16478
16448
  }
16479
16449
  }
16480
16450
  }), M && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
16481
16451
  }
16482
- this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), S.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(ne, se) {
16483
- return ne.floor !== se.floor ? ne.floor - se.floor : ne.levelOfContent !== se.levelOfContent ? se.levelOfContent - ne.levelOfContent : ne.state.distanceToCamera !== se.state.distanceToCamera ? ne.state.distanceToCamera - se.state.distanceToCamera : ne.state.centerZDepth - se.state.centerZDepth;
16452
+ this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0, this.remove.apply(this, this.children), S.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(re, se) {
16453
+ return re.floor !== se.floor ? re.floor - se.floor : re.levelOfContent !== se.levelOfContent ? se.levelOfContent - re.levelOfContent : re.state.distanceToCamera !== se.state.distanceToCamera ? re.state.distanceToCamera - se.state.distanceToCamera : re.state.centerZDepth - se.state.centerZDepth;
16484
16454
  });
16485
16455
  for (var B = [], L = 0, O = this.tileset.selectedTiles; L < O.length; L++) {
16486
16456
  var F = O[L], N = (d = (f = F.content) === null || f === void 0 ? void 0 : f.data) === null || d === void 0 ? void 0 : d.object;
@@ -16491,13 +16461,13 @@ var Tile3D = (
16491
16461
  var U = cloneSkipBackfaceObject(N);
16492
16462
  U.name = "skipBackface:" + N.name, this.backfaceObjects.push(U);
16493
16463
  }
16494
- for (var z = F.state.selectionDepth, G = STENCIL_CONSTANT.TILE_MASK | z << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, j = THREE.GreaterEqualStencilFunc, Q = STENCIL_CONSTANT.SKIP_LOD_MASK, V = THREE.ReplaceStencilOp, J = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, W = 0, X = N.materials; W < X.length; W++) {
16464
+ for (var z = F.state.selectionDepth, K = STENCIL_CONSTANT.TILE_MASK | z << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, j = THREE.GreaterEqualStencilFunc, Q = STENCIL_CONSTANT.SKIP_LOD_MASK, V = THREE.ReplaceStencilOp, J = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, W = 0, X = N.materials; W < X.length; W++) {
16495
16465
  var Z = X[W];
16496
- Z.stencilWrite = !0, Z.stencilRef = G, Z.stencilFunc = j, Z.stencilFuncMask = Q, Z.stencilZPass = V, Z.stencilWriteMask = J;
16466
+ Z.stencilWrite = !0, Z.stencilRef = K, Z.stencilFunc = j, Z.stencilFuncMask = Q, Z.stencilZPass = V, Z.stencilWriteMask = J;
16497
16467
  }
16498
16468
  } else
16499
- for (var Y = 0, K = N.materials; Y < K.length; Y++) {
16500
- var Z = K[Y];
16469
+ for (var Y = 0, G = N.materials; Y < G.length; Y++) {
16470
+ var Z = G[Y];
16501
16471
  Z.stencilWrite = !1, Z.stencilRef = STENCIL_CONSTANT.TILE_MASK, Z.stencilFunc = THREE.AlwaysStencilFunc, Z.stencilFuncMask = STENCIL_CONSTANT.TILE_MASK, Z.stencilZPass = THREE.ReplaceStencilOp, Z.stencilWriteMask = STENCIL_CONSTANT.TILE_MASK;
16502
16472
  }
16503
16473
  this.tileObjects.push(N);
@@ -16505,8 +16475,8 @@ var Tile3D = (
16505
16475
  }
16506
16476
  var ee = B.toString();
16507
16477
  tileVersionMap.get(this) !== ee && (tileVersionMap.set(this, ee), A = !0), S.skipLevelOfDetail && this.backfaceObjects.length && (u = this.renderObjects).push.apply(u, this.backfaceObjects), this.tileObjects.length && (l = this.renderObjects).push.apply(l, this.tileObjects), S.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16508
- for (var te = [], re = 0, ie = this.tileset.selectedTrajectories; re < ie.length; re++) {
16509
- var ce = ie[re], ae = (h = ce.content.data) === null || h === void 0 ? void 0 : h.object;
16478
+ for (var te = [], ne = 0, ie = this.tileset.selectedTrajectories; ne < ie.length; ne++) {
16479
+ var ce = ie[ne], ae = (h = ce.content.data) === null || h === void 0 ? void 0 : h.object;
16510
16480
  if (ae) {
16511
16481
  var D = ae.update(e, r, o, this, ce, g);
16512
16482
  te.push(ce.id), D && (A = !0), this.renderObjects.push(ae);
@@ -16514,8 +16484,8 @@ var Tile3D = (
16514
16484
  }
16515
16485
  var de = te.toString();
16516
16486
  trajectoryVersionMap.get(this) !== de && (trajectoryVersionMap.set(this, de), A = !0);
16517
- for (var ge = Math.min(0, ((m = (p = this.parent) === null || p === void 0 ? void 0 : p.children) !== null && m !== void 0 ? m : []).indexOf(this)), ye = ge * 1e4, xe = function(ne) {
16518
- var se = le.renderObjects[ne], pe = ne + ye;
16487
+ for (var ge = Math.min(0, ((m = (p = this.parent) === null || p === void 0 ? void 0 : p.children) !== null && m !== void 0 ? m : []).indexOf(this)), ye = ge * 1e4, xe = function(re) {
16488
+ var se = le.renderObjects[re], pe = re + ye;
16519
16489
  se.traverse(function(me) {
16520
16490
  (me instanceof THREE.Mesh || me instanceof THREE.Line || me instanceof THREE.Points) && (me.renderOrder = pe);
16521
16491
  }), le.add(se);
@@ -16964,191 +16934,169 @@ function loadViewLayers(n, t) {
16964
16934
  });
16965
16935
  });
16966
16936
  }
16967
- var BufferGeometryUtils = {
16968
- computeTangents: function(n) {
16969
- var t = n.index, e = n.attributes;
16970
- if (t === null || e.position === void 0 || e.normal === void 0 || e.uv === void 0) {
16971
- console.warn("THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");
16972
- return;
16973
- }
16974
- var r = t.array, o = e.position.array, s = e.normal.array, u = e.uv.array, l = o.length / 3;
16975
- e.tangent === void 0 && n.setAttribute("tangent", new THREE.BufferAttribute(new Float32Array(4 * l), 4));
16976
- for (var c = e.tangent.array, f = [], d = [], h = 0; h < l; h++)
16977
- f[h] = new THREE.Vector3(), d[h] = new THREE.Vector3();
16978
- var p = new THREE.Vector3(), m = new THREE.Vector3(), A = new THREE.Vector3(), g = new THREE.Vector2(), y = new THREE.Vector2(), v = new THREE.Vector2(), E = new THREE.Vector3(), b = new THREE.Vector3();
16979
- function T(G, j, Q) {
16980
- p.fromArray(o, G * 3), m.fromArray(o, j * 3), A.fromArray(o, Q * 3), g.fromArray(u, G * 2), y.fromArray(u, j * 2), v.fromArray(u, Q * 2);
16981
- var V = m.x - p.x, J = A.x - p.x, W = m.y - p.y, X = A.y - p.y, Z = m.z - p.z, Y = A.z - p.z, K = y.x - g.x, ee = v.x - g.x, te = y.y - g.y, re = v.y - g.y, ie = 1 / (K * re - ee * te);
16982
- E.set((re * V - te * J) * ie, (re * W - te * X) * ie, (re * Z - te * Y) * ie), b.set((K * J - ee * V) * ie, (K * X - ee * W) * ie, (K * Y - ee * Z) * ie), f[G].add(E), f[j].add(E), f[Q].add(E), d[G].add(b), d[j].add(b), d[Q].add(b);
16983
- }
16984
- var S = n.groups;
16985
- S.length === 0 && (S = [{
16986
- start: 0,
16987
- count: r.length
16988
- }]);
16989
- for (var h = 0, R = S.length; h < R; ++h)
16990
- for (var w = S[h], C = w.start, I = w.count, H = C, M = C + I; H < M; H += 3)
16991
- T(r[H + 0], r[H + 1], r[H + 2]);
16992
- var B = new THREE.Vector3(), L = new THREE.Vector3(), O = new THREE.Vector3(), F = new THREE.Vector3(), N, D, U;
16993
- function z(G) {
16994
- O.fromArray(s, G * 3), F.copy(O), D = f[G], B.copy(D), B.sub(O.multiplyScalar(O.dot(D))).normalize(), L.crossVectors(F, D), U = L.dot(d[G]), N = U < 0 ? -1 : 1, c[G * 4] = B.x, c[G * 4 + 1] = B.y, c[G * 4 + 2] = B.z, c[G * 4 + 3] = N;
16995
- }
16996
- for (var h = 0, R = S.length; h < R; ++h)
16997
- for (var w = S[h], C = w.start, I = w.count, H = C, M = C + I; H < M; H += 3)
16998
- z(r[H + 0]), z(r[H + 1]), z(r[H + 2]);
16999
- },
17000
- /**
17001
- * @param {Array<THREE.BufferGeometry>} geometries
17002
- * @param {Boolean} useGroups
17003
- * @return {THREE.BufferGeometry}
17004
- */
17005
- mergeBufferGeometries: function(n, t) {
17006
- for (var e = n[0].index !== null, r = new Set(Object.keys(n[0].attributes)), o = new Set(Object.keys(n[0].morphAttributes)), s = {}, u = {}, l = new THREE.BufferGeometry(), c = 0, f = 0; f < n.length; ++f) {
17007
- var d = n[f];
17008
- if (e !== (d.index !== null))
16937
+ function createSimpleBoxBufferGeometry(n, t, e) {
16938
+ n === void 0 && (n = 1), t === void 0 && (t = 1), e === void 0 && (e = 1);
16939
+ var r = n / 2, o = t / 2, s = e / 2, u = new Float32Array([
16940
+ -r,
16941
+ +o,
16942
+ +s,
16943
+ +r,
16944
+ +o,
16945
+ +s,
16946
+ +r,
16947
+ +o,
16948
+ -s,
16949
+ -r,
16950
+ +o,
16951
+ -s,
16952
+ -r,
16953
+ -o,
16954
+ +s,
16955
+ +r,
16956
+ -o,
16957
+ +s,
16958
+ +r,
16959
+ -o,
16960
+ -s,
16961
+ -r,
16962
+ -o,
16963
+ -s
16964
+ ]), l = new Uint32Array([
16965
+ 0,
16966
+ 4,
16967
+ 1,
16968
+ 1,
16969
+ 4,
16970
+ 5,
16971
+ 1,
16972
+ 5,
16973
+ 2,
16974
+ 2,
16975
+ 5,
16976
+ 6,
16977
+ 2,
16978
+ 6,
16979
+ 3,
16980
+ 3,
16981
+ 6,
16982
+ 7,
16983
+ 3,
16984
+ 7,
16985
+ 0,
16986
+ 0,
16987
+ 7,
16988
+ 4,
16989
+ 3,
16990
+ 0,
16991
+ 2,
16992
+ 2,
16993
+ 0,
16994
+ 1,
16995
+ 4,
16996
+ 7,
16997
+ 5,
16998
+ 5,
16999
+ 7,
17000
+ 6
17001
+ ]), c = new THREE.BufferGeometry();
17002
+ return c.setAttribute("position", new THREE.BufferAttribute(u, 3)), c.setIndex(new THREE.BufferAttribute(l, 1)), c.addGroup(0, c.index.count, 0), c.computeBoundingBox(), c.computeBoundingSphere(), c;
17003
+ }
17004
+ function mergeBufferGeometries(n, t) {
17005
+ for (var e = n[0].index !== null, r = new Set(Object.keys(n[0].attributes)), o = new Set(Object.keys(n[0].morphAttributes)), s = {}, u = {}, l = new THREE.BufferGeometry(), c = 0; c < n.length; ++c) {
17006
+ var f = n[c];
17007
+ if (e !== (f.index !== null))
17008
+ return null;
17009
+ for (var d in f.attributes) {
17010
+ if (!r.has(d))
17009
17011
  return null;
17010
- for (var h in d.attributes) {
17011
- if (!r.has(h))
17012
- return null;
17013
- s[h] === void 0 && (s[h] = []), s[h].push(d.attributes[h]);
17014
- }
17015
- for (var h in d.morphAttributes) {
17016
- if (!o.has(h))
17017
- return null;
17018
- u[h] === void 0 && (u[h] = []), u[h].push(d.morphAttributes[h]);
17019
- }
17020
- if (l.userData.mergedUserData = l.userData.mergedUserData || [], l.userData.mergedUserData.push(d.userData), t) {
17021
- var p;
17022
- if (e)
17023
- p = d.index.count;
17024
- else if (d.attributes.position !== void 0)
17025
- p = d.attributes.position.count;
17026
- else
17027
- return null;
17028
- l.addGroup(c, p, f), c += p;
17029
- }
17030
- }
17031
- if (e) {
17032
- for (var m = 0, A = [], f = 0; f < n.length; ++f) {
17033
- for (var g = n[f].index, y = 0; y < g.count; ++y)
17034
- A.push(g.getX(y) + m);
17035
- m += n[f].attributes.position.count;
17036
- }
17037
- l.setIndex(A);
17012
+ s[d] === void 0 && (s[d] = []), s[d].push(f.attributes[d]);
17038
17013
  }
17039
- for (var h in s) {
17040
- var v = this.mergeBufferAttributes(s[h]);
17041
- if (!v)
17014
+ for (var d in f.morphAttributes) {
17015
+ if (!o.has(d))
17042
17016
  return null;
17043
- l.setAttribute(h, v);
17017
+ u[d] === void 0 && (u[d] = []), u[d].push(f.morphAttributes[d]);
17044
17018
  }
17045
- for (var h in u) {
17046
- var E = u[h][0].length;
17047
- if (E === 0)
17048
- break;
17049
- l.morphAttributes = l.morphAttributes || {}, l.morphAttributes[h] = [];
17050
- for (var f = 0; f < E; ++f) {
17051
- for (var b = [], y = 0; y < u[h].length; ++y)
17052
- b.push(u[h][y][f]);
17053
- var T = this.mergeBufferAttributes(b);
17054
- if (!T)
17055
- return null;
17056
- l.morphAttributes[h].push(T);
17057
- }
17019
+ l.userData.mergedUserData = l.userData.mergedUserData || [], l.userData.mergedUserData.push(f.userData);
17020
+ }
17021
+ if (e) {
17022
+ for (var h = 0, p = [], c = 0; c < n.length; ++c) {
17023
+ for (var m = n[c].index, A = 0; A < m.count; ++A)
17024
+ p.push(m.getX(A) + h);
17025
+ h += n[c].attributes.position.count;
17058
17026
  }
17059
- return l;
17060
- },
17061
- /**
17062
- * @param {Array<THREE.BufferAttribute>} attributes
17063
- * @return {THREE.BufferAttribute}
17064
- */
17065
- mergeBufferAttributes: function(n) {
17066
- for (var t, e, r, o = 0, s = 0; s < n.length; ++s) {
17067
- var u = n[s];
17068
- if (u.isInterleavedBufferAttribute || (t === void 0 && (t = u.array.constructor), t !== u.array.constructor) || (e === void 0 && (e = u.itemSize), e !== u.itemSize) || (r === void 0 && (r = u.normalized), r !== u.normalized))
17027
+ l.setIndex(p);
17028
+ }
17029
+ for (var d in s) {
17030
+ var g = mergeBufferAttributes(s[d]);
17031
+ if (!g)
17032
+ return null;
17033
+ l.setAttribute(d, g);
17034
+ }
17035
+ for (var d in u) {
17036
+ var y = u[d][0].length;
17037
+ if (y === 0)
17038
+ break;
17039
+ l.morphAttributes = l.morphAttributes || {}, l.morphAttributes[d] = [];
17040
+ for (var c = 0; c < y; ++c) {
17041
+ for (var v = [], A = 0; A < u[d].length; ++A)
17042
+ v.push(u[d][A][c]);
17043
+ var E = mergeBufferAttributes(v);
17044
+ if (!E)
17069
17045
  return null;
17070
- o += u.array.length;
17071
- }
17072
- for (var l = new t(o), c = 0, s = 0; s < n.length; ++s)
17073
- l.set(n[s].array, c), c += n[s].array.length;
17074
- return new THREE.BufferAttribute(l, e, r);
17075
- },
17076
- /**
17077
- * @param {Array<THREE.BufferAttribute>} attributes
17078
- * @return {Array<THREE.InterleavedBufferAttribute>}
17079
- */
17080
- interleaveAttributes: function(n) {
17081
- for (var t, e = 0, r = 0, o = 0, s = n.length; o < s; ++o) {
17082
- var u = n[o];
17083
- if (t === void 0 && (t = u.array.constructor), t !== u.array.constructor)
17084
- return console.warn("AttributeBuffers of different types cannot be interleaved"), null;
17085
- e += u.array.length, r += u.itemSize;
17086
- }
17087
- for (var l = new THREE.InterleavedBuffer(new t(e), r), c = 0, f = [], d = ["getX", "getY", "getZ", "getW"], h = ["setX", "setY", "setZ", "setW"], p = 0, s = n.length; p < s; p++) {
17088
- var u = n[p], m = u.itemSize, A = u.count, g = new THREE.InterleavedBufferAttribute(l, m, c, u.normalized);
17089
- f.push(g), c += m;
17090
- for (var y = 0; y < A; y++)
17091
- for (var v = 0; v < m; v++)
17092
- g[h[v]](y, u[d[v]](y));
17093
- }
17094
- return f;
17095
- },
17096
- /**
17097
- * @param {THREE.BufferGeometry} geometry
17098
- * @return {number}
17099
- */
17100
- estimateBytesUsed: function(n) {
17101
- var t = 0;
17102
- for (var e in n.attributes) {
17103
- var r = n.getAttribute(e);
17104
- t += r.count * r.itemSize * r.array.BYTES_PER_ELEMENT;
17105
- }
17106
- var o = n.getIndex();
17107
- return t += o ? o.count * o.itemSize * o.array.BYTES_PER_ELEMENT : 0, t;
17108
- },
17109
- /**
17110
- * @param {THREE.BufferGeometry} geometry
17111
- * @param {number} tolerance
17112
- * @return {THREE.BufferGeometry>}
17113
- */
17114
- mergeVertices: function(n, t) {
17115
- t === void 0 && (t = 1e-4), t = Math.max(t, Number.EPSILON);
17116
- for (var e = {}, r = n.getIndex(), o = n.getAttribute("position"), s = r ? r.count : o.count, u = 0, l = Object.keys(n.attributes), c = {}, f = {}, d = [], h = ["getX", "getY", "getZ", "getW"], p = 0, m = l.length; p < m; p++) {
17117
- var A = l[p];
17118
- c[A] = [];
17119
- var g = n.morphAttributes[A];
17120
- g && (f[A] = new Array(g.length).fill().map(function() {
17121
- return [];
17122
- }));
17123
- }
17124
- for (var y = Math.log10(1 / t), v = Math.pow(10, y), p = 0; p < s; p++) {
17125
- for (var E = r ? r.getX(p) : p, b = "", T = 0, m = l.length; T < m; T++)
17126
- for (var A = l[T], S = n.getAttribute(A), R = S.itemSize, w = 0; w < R; w++)
17127
- b += "".concat(~~(S[h[w]](E) * v), ",");
17128
- if (b in e)
17129
- d.push(e[b]);
17130
- else {
17131
- for (var T = 0, m = l.length; T < m; T++)
17132
- for (var A = l[T], S = n.getAttribute(A), g = n.morphAttributes[A], R = S.itemSize, C = c[A], I = f[A], w = 0; w < R; w++) {
17133
- var H = h[w];
17134
- if (C.push(S[H](E)), g)
17135
- for (var M = 0, B = g.length; M < B; M++)
17136
- I[M].push(g[M][H](E));
17137
- }
17138
- e[b] = u, d.push(u), u++;
17139
- }
17046
+ l.morphAttributes[d].push(E);
17140
17047
  }
17141
- for (var L = n.clone(), p = 0, m = l.length; p < m; p++) {
17142
- var A = l[p], O = n.getAttribute(A), F = new O.array.constructor(c[A]), S = new THREE.BufferAttribute(F, O.itemSize, O.normalized);
17143
- if (L.setAttribute(A, S), A in f)
17144
- for (var T = 0; T < f[A].length; T++) {
17145
- var N = n.morphAttributes[A][T], F = new N.array.constructor(f[A][T]), D = new THREE.BufferAttribute(F, N.itemSize, N.normalized);
17146
- L.morphAttributes[A][T] = D;
17048
+ }
17049
+ return l;
17050
+ }
17051
+ function mergeBufferAttributes(n) {
17052
+ for (var t, e, r, o = 0, s = 0; s < n.length; ++s) {
17053
+ var u = n[s];
17054
+ if (u.isInterleavedBufferAttribute || (t === void 0 && (t = u.array.constructor), t !== u.array.constructor) || (e === void 0 && (e = u.itemSize), e !== u.itemSize) || (r === void 0 && (r = u.normalized), r !== u.normalized))
17055
+ return null;
17056
+ o += u.array.length;
17057
+ }
17058
+ for (var l = new t(o), c = 0, s = 0; s < n.length; ++s)
17059
+ l.set(n[s].array, c), c += n[s].array.length;
17060
+ return new THREE.BufferAttribute(l, e, r);
17061
+ }
17062
+ function mergeVertices(n, t) {
17063
+ t === void 0 && (t = 1e-4), t = Math.max(t, Number.EPSILON);
17064
+ for (var e = {}, r = n.getIndex(), o = n.getAttribute("position"), s = r ? r.count : o.count, u = 0, l = Object.keys(n.attributes), c = {}, f = {}, d = [], h = ["getX", "getY", "getZ", "getW"], p = 0, m = l.length; p < m; p++) {
17065
+ var A = l[p];
17066
+ c[A] = [];
17067
+ var g = n.morphAttributes[A];
17068
+ g && (f[A] = new Array(g.length).fill().map(function() {
17069
+ return [];
17070
+ }));
17071
+ }
17072
+ for (var y = Math.log10(1 / t), v = Math.pow(10, y), p = 0; p < s; p++) {
17073
+ for (var E = r ? r.getX(p) : p, b = "", T = 0, m = l.length; T < m; T++)
17074
+ for (var A = l[T], S = n.getAttribute(A), R = S.itemSize, w = 0; w < R; w++)
17075
+ b += "".concat(~~(S[h[w]](E) * v), ",");
17076
+ if (b in e)
17077
+ d.push(e[b]);
17078
+ else {
17079
+ for (var T = 0, m = l.length; T < m; T++)
17080
+ for (var A = l[T], S = n.getAttribute(A), g = n.morphAttributes[A], R = S.itemSize, C = c[A], I = f[A], w = 0; w < R; w++) {
17081
+ var H = h[w];
17082
+ if (C.push(S[H](E)), g)
17083
+ for (var M = 0, B = g.length; M < B; M++)
17084
+ I[M].push(g[M][H](E));
17147
17085
  }
17086
+ e[b] = u, d.push(u), u++;
17148
17087
  }
17149
- return L.setIndex(d), L;
17150
17088
  }
17151
- }, scratchSphere$1 = new THREE.Sphere(), scratchMatrix4$1 = new THREE.Matrix4(), scratchMatrix4Inverse = new THREE.Matrix4();
17089
+ for (var L = n.clone(), p = 0, m = l.length; p < m; p++) {
17090
+ var A = l[p], O = n.getAttribute(A), F = new O.array.constructor(c[A]), S = new THREE.BufferAttribute(F, O.itemSize, O.normalized);
17091
+ if (L.setAttribute(A, S), A in f)
17092
+ for (var T = 0; T < f[A].length; T++) {
17093
+ var N = n.morphAttributes[A][T], F = new N.array.constructor(f[A][T]), D = new THREE.BufferAttribute(F, N.itemSize, N.normalized);
17094
+ L.morphAttributes[A][T] = D;
17095
+ }
17096
+ }
17097
+ return L.setIndex(d), L;
17098
+ }
17099
+ var scratchSphere$1 = new THREE.Sphere(), scratchMatrix4$1 = new THREE.Matrix4(), scratchMatrix4Inverse = new THREE.Matrix4();
17152
17100
  function getEdgesBySphere(n, t, e) {
17153
17101
  e === void 0 && (e = 30 / 180 * Math.PI);
17154
17102
  for (var r = Math.cos(e), o = [], s = 0, u = n.children; s < u.length; s++) {
@@ -17163,12 +17111,12 @@ function getEdgesBySphere(n, t, e) {
17163
17111
  if (Q) {
17164
17112
  scratchMatrix4$1.copy(j.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17165
17113
  var V = Q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), J = new THREE.BufferGeometry();
17166
- J.setAttribute("position", new THREE.BufferAttribute(V, 3)), J.applyMatrix4(j.matrixWorld), J = BufferGeometryUtils.mergeVertices(J, 0.01), m.push(J);
17114
+ J.setAttribute("position", new THREE.BufferAttribute(V, 3)), J.applyMatrix4(j.matrixWorld), J = mergeVertices(J, 0.01), m.push(J);
17167
17115
  }
17168
17116
  }
17169
17117
  }), m.length === 0)
17170
17118
  return;
17171
- for (var A = ["a", "b", "c"], g = BufferGeometryUtils.mergeBufferGeometries(m, !1), y = g.getAttribute("position").array, v = ((h = g.getIndex()) === null || h === void 0 ? void 0 : h.array) || [], E = [], b = [], T = 0, S = y.length; T < S; T += 3) {
17119
+ for (var A = ["a", "b", "c"], g = mergeBufferGeometries(m), y = g.getAttribute("position").array, v = ((h = g.getIndex()) === null || h === void 0 ? void 0 : h.array) || [], E = [], b = [], T = 0, S = y.length; T < S; T += 3) {
17172
17120
  var R = new THREE.Vector3(y[T], y[T + 1], y[T + 2]);
17173
17121
  E.push(R);
17174
17122
  }
@@ -17184,8 +17132,8 @@ function getEdgesBySphere(n, t, e) {
17184
17132
  for (var D in M) {
17185
17133
  var U = M[D];
17186
17134
  if (U.face2 === void 0 || b[U.face1].normal.dot(b[U.face2].normal) <= r) {
17187
- var z = E[U.index1], G = E[U.index2];
17188
- o.push(new THREE.Line3(z, G));
17135
+ var z = E[U.index1], K = E[U.index2];
17136
+ o.push(new THREE.Line3(z, K));
17189
17137
  }
17190
17138
  }
17191
17139
  E.length = 0, b.length = 0;
@@ -17992,8 +17940,8 @@ function parse(n, t) {
17992
17940
  var V, J, W, X = [];
17993
17941
  if (Array.isArray(H.model.layers))
17994
17942
  for (var Z = 0, Y = H.model.layers; Z < Y.length; Z++) {
17995
- var K = Y[Z];
17996
- if (K && K.tileset_url) {
17943
+ var G = Y[Z];
17944
+ if (G && G.tileset_url) {
17997
17945
  var ee = {};
17998
17946
  defineProperty(ee, "work", {
17999
17947
  enumerable: !1,
@@ -18004,28 +17952,28 @@ function parse(n, t) {
18004
17952
  enumerable: !0,
18005
17953
  configurable: !1,
18006
17954
  writable: !1,
18007
- value: (V = K.name) !== null && V !== void 0 ? V : ""
17955
+ value: (V = G.name) !== null && V !== void 0 ? V : ""
18008
17956
  }), defineProperty(ee, "type", {
18009
17957
  enumerable: !0,
18010
17958
  configurable: !1,
18011
17959
  writable: !1,
18012
- value: (J = K.type) !== null && J !== void 0 ? J : "mesh"
17960
+ value: (J = G.type) !== null && J !== void 0 ? J : "mesh"
18013
17961
  }), defineProperty(ee, "upAxis", {
18014
17962
  enumerable: !0,
18015
17963
  configurable: !1,
18016
17964
  writable: !1,
18017
- value: (W = K.up_axis) !== null && W !== void 0 ? W : "Z"
17965
+ value: (W = G.up_axis) !== null && W !== void 0 ? W : "Z"
18018
17966
  }), defineProperty(ee, "tileset", {
18019
17967
  enumerable: !0,
18020
17968
  configurable: !1,
18021
17969
  writable: !1,
18022
- value: relativeURL(K.tileset_url, t.baseURL)
17970
+ value: relativeURL(G.tileset_url, t.baseURL)
18023
17971
  }), X.push(ee);
18024
17972
  }
18025
17973
  }
18026
17974
  if (typeof H.model.tiles == "object") {
18027
- var K = H.model.tiles;
18028
- if (K && K.tileset_url) {
17975
+ var G = H.model.tiles;
17976
+ if (G && G.tileset_url) {
18029
17977
  var ee = {};
18030
17978
  defineProperty(ee, "work", {
18031
17979
  enumerable: !1,
@@ -18051,7 +17999,7 @@ function parse(n, t) {
18051
17999
  enumerable: !0,
18052
18000
  configurable: !1,
18053
18001
  writable: !1,
18054
- value: relativeURL(K.tileset_url, t.baseURL)
18002
+ value: relativeURL(G.tileset_url, t.baseURL)
18055
18003
  }), X.push(ee);
18056
18004
  }
18057
18005
  }
@@ -18142,26 +18090,26 @@ function parse(n, t) {
18142
18090
  configurable: !1,
18143
18091
  writable: !1,
18144
18092
  value: (function() {
18145
- var Z, Y, K = ((Y = (Z = J.accessible_nodes) !== null && Z !== void 0 ? Z : J.accessibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
18093
+ var Z, Y, G = ((Y = (Z = J.accessible_nodes) !== null && Z !== void 0 ? Z : J.accessibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
18146
18094
  return te < N;
18147
18095
  });
18148
- if (K.length === 0)
18096
+ if (G.length === 0)
18149
18097
  for (var ee = 0; ee < N; ee++)
18150
- ee !== V && K.push(ee);
18151
- return Object.freeze(K);
18098
+ ee !== V && G.push(ee);
18099
+ return Object.freeze(G);
18152
18100
  })()
18153
18101
  }), defineProperty(X, "visibleNodes", {
18154
18102
  enumerable: !0,
18155
18103
  configurable: !1,
18156
18104
  writable: !1,
18157
18105
  value: (function() {
18158
- var Z, Y, K = ((Y = (Z = J.visible_nodes) !== null && Z !== void 0 ? Z : J.visibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
18106
+ var Z, Y, G = ((Y = (Z = J.visible_nodes) !== null && Z !== void 0 ? Z : J.visibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
18159
18107
  return te < N;
18160
18108
  });
18161
- if (K.length === 0)
18109
+ if (G.length === 0)
18162
18110
  for (var ee = 0; ee < N; ee++)
18163
- ee !== V && K.push(ee);
18164
- return Object.freeze(K);
18111
+ ee !== V && G.push(ee);
18112
+ return Object.freeze(G);
18165
18113
  })()
18166
18114
  }), defineProperty(X, "images", {
18167
18115
  enumerable: !0,
@@ -18175,8 +18123,8 @@ function parse(n, t) {
18175
18123
  writable: !1,
18176
18124
  value: t
18177
18125
  });
18178
- for (var Y = 0, K = FACE_ORDER$1; Y < K.length; Y++) {
18179
- var ee = K[Y];
18126
+ for (var Y = 0, G = FACE_ORDER$1; Y < G.length; Y++) {
18127
+ var ee = G[Y];
18180
18128
  defineProperty(Z, ee, {
18181
18129
  enumerable: !0,
18182
18130
  configurable: !1,
@@ -18192,20 +18140,20 @@ function parse(n, t) {
18192
18140
  var te = getImageSizeFromURL(Z[FACE_ORDER$1[0]]);
18193
18141
  if (te) {
18194
18142
  if (W.size_list) {
18195
- var re = W.size_list.slice().sort(function(ye, xe) {
18143
+ var ne = W.size_list.slice().sort(function(ye, xe) {
18196
18144
  return ye - xe;
18197
18145
  });
18198
- return Object.freeze(re);
18146
+ return Object.freeze(ne);
18199
18147
  } else if (W.tiles) {
18200
- for (var re = [
18148
+ for (var ne = [
18201
18149
  te
18202
18150
  ], ie = W.tiles.slice().sort(function(xe, le) {
18203
18151
  return xe - le;
18204
18152
  }), ce = 0, ae = ie; ce < ae.length; ce++) {
18205
18153
  var de = ae[ce], ge = 512 * Math.pow(2, de);
18206
- ge > te && re.push(ge);
18154
+ ge > te && ne.push(ge);
18207
18155
  }
18208
- return Object.freeze(re);
18156
+ return Object.freeze(ne);
18209
18157
  }
18210
18158
  }
18211
18159
  return Object.freeze([]);
@@ -18217,15 +18165,15 @@ function parse(n, t) {
18217
18165
  value: (function() {
18218
18166
  var te = getImageSizeFromURL(Z.front);
18219
18167
  if (te) {
18220
- var re = Z.sizeList.slice();
18221
- if (re[0]) {
18222
- var ie = getTileLevel(re[0]);
18168
+ var ne = Z.sizeList.slice();
18169
+ if (ne[0]) {
18170
+ var ie = getTileLevel(ne[0]);
18223
18171
  if (ie)
18224
18172
  for (var ce = ie - 1; ce >= 0; ce--)
18225
- re.unshift(512 * Math.pow(2, ce));
18173
+ ne.unshift(512 * Math.pow(2, ce));
18226
18174
  }
18227
- if (!(re.length <= 0)) {
18228
- for (var ae = [], de = 0, ge = re; de < ge.length; de++) {
18175
+ if (!(ne.length <= 0)) {
18176
+ for (var ae = [], de = 0, ge = ne; de < ge.length; de++) {
18229
18177
  var ye = ge[de], xe = getTileLevel(ye);
18230
18178
  if (typeof xe == "number") {
18231
18179
  var le = {};
@@ -18251,8 +18199,8 @@ function parse(n, t) {
18251
18199
  writable: !1,
18252
18200
  value: 1
18253
18201
  });
18254
- for (var he = 0, ne = FACE_ORDER$1; he < ne.length; he++) {
18255
- var se = ne[he];
18202
+ for (var he = 0, re = FACE_ORDER$1; he < re.length; he++) {
18203
+ var se = re[he];
18256
18204
  defineProperty(le, se, {
18257
18205
  enumerable: !0,
18258
18206
  configurable: !1,
@@ -18336,11 +18284,11 @@ function parse(n, t) {
18336
18284
  value: t
18337
18285
  }), H.initial) {
18338
18286
  if (t.observers.length > 0) {
18339
- var G = void 0;
18340
- isNumber(H.initial.panoIndex) ? G = H.initial.panoIndex : isNumber(H.initial.pano_index) ? G = H.initial.pano_index : isNumber(H.initial.pano) && (G = H.initial.pano), typeof G == "number" && (G = clamp$1(G, 0, t.observers.length - 1), defineProperty(z, "panoIndex", {
18287
+ var K = void 0;
18288
+ isNumber(H.initial.panoIndex) ? K = H.initial.panoIndex : isNumber(H.initial.pano_index) ? K = H.initial.pano_index : isNumber(H.initial.pano) && (K = H.initial.pano), typeof K == "number" && (K = clamp$1(K, 0, t.observers.length - 1), defineProperty(z, "panoIndex", {
18341
18289
  enumerable: !0,
18342
18290
  writable: !0,
18343
- value: G
18291
+ value: K
18344
18292
  }));
18345
18293
  }
18346
18294
  if (H.initial.mode === "Panorama" && t.observers.length === 0 || H.initial.mode === "Floorplan" || H.initial.mode === "Topview" || H.initial.mode === "Model" || H.initial.mode === "Mapview" ? defineProperty(z, "mode", {
@@ -18711,7 +18659,7 @@ function parsePano(n, t) {
18711
18659
  })()
18712
18660
  }), t;
18713
18661
  }
18714
- var workVerifySet = /* @__PURE__ */ new WeakSet(), hrefAElement = typeof document != "undefined" ? document.createElement("a") : { href: "" }, Work = (
18662
+ var workVerifySet = /* @__PURE__ */ new WeakSet(), Work = (
18715
18663
  /** @class */
18716
18664
  (function() {
18717
18665
  function n(t, e) {
@@ -18754,7 +18702,7 @@ Error work input:
18754
18702
  }
18755
18703
  t = pathJoin(this.baseURL, t);
18756
18704
  }
18757
- return hrefAElement.href = t, t = hrefAElement.href, t;
18705
+ return t = getFullURL(t), t;
18758
18706
  }, n.prototype.verifyURL = function(t) {
18759
18707
  return typeof verifyURL(this.getURL(t), this.allowHosts) == "string";
18760
18708
  }, n.prototype.toJSON = function() {
@@ -19835,74 +19783,7 @@ function isSimilarVector3(n, t) {
19835
19783
  function notSimilarVector3(n, t) {
19836
19784
  return !isSimilarVector3(n, t);
19837
19785
  }
19838
- function createBoxGeometry(n, t, e) {
19839
- n === void 0 && (n = 1), t === void 0 && (t = 1), e === void 0 && (e = 1);
19840
- var r = n / 2, o = t / 2, s = e / 2, u = new Float32Array([
19841
- -r,
19842
- +o,
19843
- +s,
19844
- +r,
19845
- +o,
19846
- +s,
19847
- +r,
19848
- +o,
19849
- -s,
19850
- -r,
19851
- +o,
19852
- -s,
19853
- -r,
19854
- -o,
19855
- +s,
19856
- +r,
19857
- -o,
19858
- +s,
19859
- +r,
19860
- -o,
19861
- -s,
19862
- -r,
19863
- -o,
19864
- -s
19865
- ]), l = new Uint32Array([
19866
- 0,
19867
- 4,
19868
- 1,
19869
- 1,
19870
- 4,
19871
- 5,
19872
- 1,
19873
- 5,
19874
- 2,
19875
- 2,
19876
- 5,
19877
- 6,
19878
- 2,
19879
- 6,
19880
- 3,
19881
- 3,
19882
- 6,
19883
- 7,
19884
- 3,
19885
- 7,
19886
- 0,
19887
- 0,
19888
- 7,
19889
- 4,
19890
- 3,
19891
- 0,
19892
- 2,
19893
- 2,
19894
- 0,
19895
- 1,
19896
- 4,
19897
- 7,
19898
- 5,
19899
- 5,
19900
- 7,
19901
- 6
19902
- ]), c = new THREE.BufferGeometry();
19903
- return c.setAttribute("position", new THREE.BufferAttribute(u, 3)), c.setIndex(new THREE.BufferAttribute(l, 1)), c.addGroup(0, c.index.count, 0), c.computeBoundingBox(), c.computeBoundingSphere(), c;
19904
- }
19905
- var scratchGeometry = createBoxGeometry(1, 1, 1);
19786
+ var scratchGeometry = createSimpleBoxBufferGeometry(1, 1, 1);
19906
19787
  scratchGeometry.applyMatrix4(new THREE.Matrix4().makeScale(-1, 1, 1));
19907
19788
  var versionMap = /* @__PURE__ */ new WeakMap(), cameraBoxSize = new THREE.Vector3(1, 1, 1), scratchBoundingBox = new THREE.Box3(), scratchBoundingBoxSize = new THREE.Vector3(), scratchCameraBox = new THREE.Box3(), scratchPosition = new THREE.Vector3(), scratchScale = new THREE.Vector3(), BoundingMesh$1 = (
19908
19789
  /** @class */
@@ -19935,16 +19816,7 @@ var versionMap = /* @__PURE__ */ new WeakMap(), cameraBoxSize = new THREE.Vector
19935
19816
  }
19936
19817
  }, t;
19937
19818
  })(PBMMesh)
19938
- );
19939
- function cameraWorldToLocal(n, t) {
19940
- var e = new THREE.Vector3(0, 0, -1);
19941
- e.applyQuaternion(n.quaternion);
19942
- var r = t.quaternion.clone().inverse();
19943
- e.applyQuaternion(r);
19944
- var o = Math.atan2(e.x, -e.z), s = -Math.asin(e.y);
19945
- return { theta: o, phi: s, lookAtVector: e };
19946
- }
19947
- var PI = Math.PI, TAU = PI * 2;
19819
+ ), PI = Math.PI, TAU = PI * 2;
19948
19820
  function stepNumber(n, t, e) {
19949
19821
  if (n === t)
19950
19822
  return t;
@@ -20198,7 +20070,7 @@ var Hammer = (function(n, t, e, r) {
20198
20070
  var _ = P.ownerDocument || P;
20199
20071
  return _.defaultView || _.parentWindow || n;
20200
20072
  }
20201
- var D = /mobile|tablet|ip(ad|hone|od)|android/i, U = "ontouchstart" in n, z = L(n, "PointerEvent") !== r, G = U && D.test(navigator.userAgent), j = "touch", Q = "pen", V = "mouse", J = "kinect", W = 25, X = 1, Z = 2, Y = 4, K = 8, ee = 1, te = 2, re = 4, ie = 8, ce = 16, ae = te | re, de = ie | ce, ge = ae | de, ye = ["x", "y"], xe = ["clientX", "clientY"];
20073
+ var D = /mobile|tablet|ip(ad|hone|od)|android/i, U = "ontouchstart" in n, z = L(n, "PointerEvent") !== r, K = U && D.test(navigator.userAgent), j = "touch", Q = "pen", V = "mouse", J = "kinect", W = 25, X = 1, Z = 2, Y = 4, G = 8, ee = 1, te = 2, ne = 4, ie = 8, ce = 16, ae = te | ne, de = ie | ce, ge = ae | de, ye = ["x", "y"], xe = ["clientX", "clientY"];
20202
20074
  function le(P, _) {
20203
20075
  var k = this;
20204
20076
  this.manager = P, this.callback = _, this.element = P.element, this.target = P.options.inputTarget, this.domHandler = function(q) {
@@ -20227,10 +20099,10 @@ var Hammer = (function(n, t, e, r) {
20227
20099
  };
20228
20100
  function he(P) {
20229
20101
  var _, k = P.options.inputClass;
20230
- return k ? _ = k : z ? _ = Be : G ? _ = Ue : U ? _ = ht : _ = ke, new _(P, ne);
20102
+ return k ? _ = k : z ? _ = Be : K ? _ = Ue : U ? _ = ht : _ = ke, new _(P, re);
20231
20103
  }
20232
- function ne(P, _, k) {
20233
- var q = k.pointers.length, $ = k.changedPointers.length, oe = _ & X && q - $ === 0, be = _ & (Y | K) && q - $ === 0;
20104
+ function re(P, _, k) {
20105
+ var q = k.pointers.length, $ = k.changedPointers.length, oe = _ & X && q - $ === 0, be = _ & (Y | G) && q - $ === 0;
20234
20106
  k.isFirst = !!oe, k.isFinal = !!be, oe && (P.session = {}), k.eventType = _, se(P, k), P.emit("hammer.input", k), P.recognize(k), P.session.prevInput = k;
20235
20107
  }
20236
20108
  function se(P, _) {
@@ -20255,7 +20127,7 @@ var Hammer = (function(n, t, e, r) {
20255
20127
  }
20256
20128
  function me(P, _) {
20257
20129
  var k = P.lastInterval || _, q = _.timeStamp - k.timeStamp, $, oe, be, De;
20258
- if (_.eventType != K && (q > W || k.velocity === r)) {
20130
+ if (_.eventType != G && (q > W || k.velocity === r)) {
20259
20131
  var Xe = _.deltaX - k.deltaX, Fe = _.deltaY - k.deltaY, lt = Ye(q, Xe, Fe);
20260
20132
  oe = lt.x, be = lt.y, $ = c(lt.x) > c(lt.y) ? lt.x : lt.y, De = Ve(Xe, Fe), P.lastInterval = _;
20261
20133
  } else
@@ -20297,7 +20169,7 @@ var Hammer = (function(n, t, e, r) {
20297
20169
  };
20298
20170
  }
20299
20171
  function Ve(P, _) {
20300
- return P === _ ? ee : c(P) >= c(_) ? P < 0 ? te : re : _ < 0 ? ie : ce;
20172
+ return P === _ ? ee : c(P) >= c(_) ? P < 0 ? te : ne : _ < 0 ? ie : ce;
20301
20173
  }
20302
20174
  function ve(P, _, k) {
20303
20175
  k || (k = ye);
@@ -20342,8 +20214,8 @@ var Hammer = (function(n, t, e, r) {
20342
20214
  pointerdown: X,
20343
20215
  pointermove: Z,
20344
20216
  pointerup: Y,
20345
- pointercancel: K,
20346
- pointerout: K
20217
+ pointercancel: G,
20218
+ pointerout: G
20347
20219
  }, _e = {
20348
20220
  2: j,
20349
20221
  3: Q,
@@ -20362,7 +20234,7 @@ var Hammer = (function(n, t, e, r) {
20362
20234
  */
20363
20235
  handler: function(_) {
20364
20236
  var k = this.store, q = !1, $ = !1, oe = _.type.toLowerCase().replace("ms", ""), be = Pe[oe], De = _e[_.pointerType] || _.pointerType, Xe = De == j, Fe = H(k, _.pointerId, "pointerId");
20365
- be & X && (_.button === 0 || _.button === 2 || Xe) ? Fe < 0 && (k.push(_), Fe = k.length - 1) : be & (Y | K) ? q = !0 : !Xe && _.buttons === 0 && (q = !0, $ = !0, be = Pe.pointerup), !(Fe < 0) && ($ || (k[Fe] = _), this.callback(this.manager, be, {
20237
+ be & X && (_.button === 0 || _.button === 2 || Xe) ? Fe < 0 && (k.push(_), Fe = k.length - 1) : be & (Y | G) ? q = !0 : !Xe && _.buttons === 0 && (q = !0, $ = !0, be = Pe.pointerup), !(Fe < 0) && ($ || (k[Fe] = _), this.callback(this.manager, be, {
20366
20238
  pointers: k,
20367
20239
  changedPointers: [_],
20368
20240
  pointerType: De,
@@ -20374,7 +20246,7 @@ var Hammer = (function(n, t, e, r) {
20374
20246
  touchstart: X,
20375
20247
  touchmove: Z,
20376
20248
  touchend: Y,
20377
- touchcancel: K
20249
+ touchcancel: G
20378
20250
  }, Qe = "touchstart", We = "touchstart touchmove touchend touchcancel";
20379
20251
  function gt() {
20380
20252
  this.evTarget = Qe, this.evWin = We, this.started = !1, le.apply(this, arguments);
@@ -20384,7 +20256,7 @@ var Hammer = (function(n, t, e, r) {
20384
20256
  var k = je[_.type];
20385
20257
  if (k === X && (this.started = !0), !!this.started) {
20386
20258
  var q = Je.call(this, _, k);
20387
- k & (Y | K) && q[0].length - q[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
20259
+ k & (Y | G) && q[0].length - q[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
20388
20260
  pointers: q[0],
20389
20261
  changedPointers: q[1],
20390
20262
  pointerType: j,
@@ -20395,13 +20267,13 @@ var Hammer = (function(n, t, e, r) {
20395
20267
  });
20396
20268
  function Je(P, _) {
20397
20269
  var k = M(P.touches), q = M(P.changedTouches);
20398
- return _ & (Y | K) && (k = B(k.concat(q), "identifier")), [k, q];
20270
+ return _ & (Y | G) && (k = B(k.concat(q), "identifier")), [k, q];
20399
20271
  }
20400
20272
  var At = {
20401
20273
  touchstart: X,
20402
20274
  touchmove: Z,
20403
20275
  touchend: Y,
20404
- touchcancel: K
20276
+ touchcancel: G
20405
20277
  }, we = "touchstart touchmove touchend touchcancel";
20406
20278
  function Ue() {
20407
20279
  this.evTarget = we, this.targetIds = {}, le.apply(this, arguments);
@@ -20428,7 +20300,7 @@ var Hammer = (function(n, t, e, r) {
20428
20300
  for ($ = 0; $ < oe.length; )
20429
20301
  q[oe[$].identifier] = !0, $++;
20430
20302
  for ($ = 0; $ < be.length; )
20431
- q[be[$].identifier] && De.push(be[$]), _ & (Y | K) && delete q[be[$].identifier], $++;
20303
+ q[be[$].identifier] && De.push(be[$]), _ & (Y | G) && delete q[be[$].identifier], $++;
20432
20304
  if (De.length)
20433
20305
  return [
20434
20306
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
@@ -20467,7 +20339,7 @@ var Hammer = (function(n, t, e, r) {
20467
20339
  }
20468
20340
  });
20469
20341
  function pt(P, _) {
20470
- P & X ? (this.primaryTouch = _.changedPointers[0].identifier, ze.call(this, _)) : P & (Y | K) && ze.call(this, _);
20342
+ P & X ? (this.primaryTouch = _.changedPointers[0].identifier, ze.call(this, _)) : P & (Y | G) && ze.call(this, _);
20471
20343
  }
20472
20344
  function ze(P) {
20473
20345
  var _ = P.changedPointers[0];
@@ -20709,7 +20581,7 @@ var Hammer = (function(n, t, e, r) {
20709
20581
  return P & St ? "cancel" : P & xt ? "end" : P & Pt ? "move" : P & at ? "start" : "";
20710
20582
  }
20711
20583
  function Lt(P) {
20712
- return P == ce ? "down" : P == ie ? "up" : P == te ? "left" : P == re ? "right" : "";
20584
+ return P == ce ? "down" : P == ie ? "up" : P == te ? "left" : P == ne ? "right" : "";
20713
20585
  }
20714
20586
  function _t(P, _) {
20715
20587
  var k = _.manager;
@@ -20748,7 +20620,7 @@ var Hammer = (function(n, t, e, r) {
20748
20620
  */
20749
20621
  process: function(P) {
20750
20622
  var _ = this.state, k = P.eventType, q = _ & (at | Pt), $ = this.attrTest(P);
20751
- return q && (k & K || !$) ? _ | St : q || $ ? k & Y ? _ | xt : _ & at ? _ | Pt : at : Ge;
20623
+ return q && (k & G || !$) ? _ | St : q || $ ? k & Y ? _ | xt : _ & at ? _ | Pt : at : Ge;
20752
20624
  }
20753
20625
  });
20754
20626
  function Rt() {
@@ -20771,7 +20643,7 @@ var Hammer = (function(n, t, e, r) {
20771
20643
  },
20772
20644
  directionTest: function(P) {
20773
20645
  var _ = this.options, k = !0, q = P.distance, $ = P.direction, oe = P.deltaX, be = P.deltaY;
20774
- return $ & _.direction || (_.direction & ae ? ($ = oe === 0 ? ee : oe < 0 ? te : re, k = oe != this.pX, q = Math.abs(P.deltaX)) : ($ = be === 0 ? ee : be < 0 ? ie : ce, k = be != this.pY, q = Math.abs(P.deltaY))), P.direction = $, k && q > _.threshold && $ & _.direction;
20646
+ return $ & _.direction || (_.direction & ae ? ($ = oe === 0 ? ee : oe < 0 ? te : ne, k = oe != this.pX, q = Math.abs(P.deltaX)) : ($ = be === 0 ? ee : be < 0 ? ie : ce, k = be != this.pY, q = Math.abs(P.deltaY))), P.direction = $, k && q > _.threshold && $ & _.direction;
20775
20647
  },
20776
20648
  attrTest: function(P) {
20777
20649
  return ot.prototype.attrTest.call(this, P) && (this.state & at || !(this.state & at) && this.directionTest(P));
@@ -20830,7 +20702,7 @@ var Hammer = (function(n, t, e, r) {
20830
20702
  },
20831
20703
  process: function(P) {
20832
20704
  var _ = this.options, k = P.pointers.length === _.pointers, q = P.distance < _.threshold, $ = P.deltaTime > _.time;
20833
- if (this._input = P, !q || !k || P.eventType & (Y | K) && !$)
20705
+ if (this._input = P, !q || !k || P.eventType & (Y | G) && !$)
20834
20706
  this.reset();
20835
20707
  else if (P.eventType & X)
20836
20708
  this.reset(), this._timer = d(function() {
@@ -21197,7 +21069,7 @@ var Hammer = (function(n, t, e, r) {
21197
21069
  INPUT_START: X,
21198
21070
  INPUT_MOVE: Z,
21199
21071
  INPUT_END: Y,
21200
- INPUT_CANCEL: K,
21072
+ INPUT_CANCEL: G,
21201
21073
  STATE_POSSIBLE: It,
21202
21074
  STATE_BEGAN: at,
21203
21075
  STATE_CHANGED: Pt,
@@ -21207,7 +21079,7 @@ var Hammer = (function(n, t, e, r) {
21207
21079
  STATE_FAILED: Ge,
21208
21080
  DIRECTION_NONE: ee,
21209
21081
  DIRECTION_LEFT: te,
21210
- DIRECTION_RIGHT: re,
21082
+ DIRECTION_RIGHT: ne,
21211
21083
  DIRECTION_UP: ie,
21212
21084
  DIRECTION_DOWN: ce,
21213
21085
  DIRECTION_HORIZONTAL: ae,
@@ -21239,12 +21111,7 @@ var Hammer = (function(n, t, e, r) {
21239
21111
  bindFn: E,
21240
21112
  prefixed: L
21241
21113
  }), Re;
21242
- })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {});
21243
- function calculateThreeMouse(n, t, e) {
21244
- var r = t.getBoundingClientRect(), o = r.top, s = r.left, u = r.width, l = r.height;
21245
- return e && (s = s + u * e.left, o = o + l * (1 - e.bottom - e.height), u = u * e.width, l = l * e.height), new THREE.Vector2((n.x - s) / u * 2 - 1, -(n.y - o) / l * 2 + 1);
21246
- }
21247
- var BaseController = (
21114
+ })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), BaseController = (
21248
21115
  /** @class */
21249
21116
  (function(n) {
21250
21117
  __extends(t, n);
@@ -21390,13 +21257,14 @@ var BaseController = (
21390
21257
  }, t.prototype.onMouseMove = function(e) {
21391
21258
  this.stopMomentumMovement(), this.emit("gesture.mousemove", e);
21392
21259
  }, t.prototype.relativeClientPosition = function(e) {
21393
- return calculateThreeMouse(e, this.element, this.viewport);
21260
+ var r = this.element.getBoundingClientRect(), o = r.top, s = r.left, u = r.width, l = r.height;
21261
+ return s = s + u * this.viewport.left, o = o + l * (1 - this.viewport.bottom - this.viewport.height), u = u * this.viewport.width, l = l * this.viewport.height, new THREE.Vector2((e.x - s) / u * 2 - 1, -(e.y - o) / l * 2 + 1);
21394
21262
  }, t.prototype.createRaycasterFromCamera = function(e, r) {
21395
21263
  var o = new THREE.Raycaster();
21396
21264
  return o.params.Points = { threshold: 0.1 }, o.firstHitOnly = !0, o.near = r.near, o.far = r.far, o.setFromCamera(e, this.camera), o;
21397
21265
  }, t.prototype.bindEvents = function(e) {
21398
21266
  var r = this, o = function(M) {
21399
- var B = calculateThreeMouse(M, r.element, r.viewport);
21267
+ var B = r.relativeClientPosition(M);
21400
21268
  return !(Math.abs(B.x) > 1 || Math.abs(B.y) > 1);
21401
21269
  }, s = new Hammer.Manager(e), u = function(M) {
21402
21270
  var B = M.session;
@@ -21615,7 +21483,7 @@ var BaseController = (
21615
21483
  var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, U = {
21616
21484
  x: M.clientX,
21617
21485
  y: M.clientY
21618
- }, z = r.relativeClientPosition(U), G = r.createRaycasterFromCamera(z, r.camera), j = __assign(__assign({}, U), { coords: z, raycaster: G, buttons: M.buttons, delta: N }), F = createEvent("gesture.mousewheel", {
21486
+ }, z = r.relativeClientPosition(U), K = r.createRaycasterFromCamera(z, r.camera), j = __assign(__assign({}, U), { coords: z, raycaster: K, buttons: M.buttons, delta: N }), F = createEvent("gesture.mousewheel", {
21619
21487
  target: M.target,
21620
21488
  pointerType: "mouse",
21621
21489
  srcEvent: M,
@@ -22823,7 +22691,7 @@ void main() {
22823
22691
  this.disposed = !0, this.material.map && this.material.map.dispose(), this.material.dispose();
22824
22692
  }, t;
22825
22693
  })(THREE.Mesh)
22826
- ), boundingGeometry = createBoxGeometry(20, 20, 20);
22694
+ ), boundingGeometry = createSimpleBoxBufferGeometry(20, 20, 20);
22827
22695
  boundingGeometry.applyMatrix4(new THREE.Matrix4().makeScale(-1, 1, 1));
22828
22696
  var BOUNDING_MATERIAL_VERTEX_SHADER = `
22829
22697
  varying vec4 vFinalPosition;
@@ -22928,49 +22796,49 @@ void main() {
22928
22796
  var S = scratchCameraProjectMatrix.copy(f);
22929
22797
  S.elements[0] *= p, S.elements[5] *= p, this.camera.projectionMatrix.equals(S) || (this.camera.projectionMatrix.copy(S), this.camera.projectionMatrixInverse.getInverse(this.camera.projectionMatrix), r = !0), scratchSceneQuaternionInverse.copy(this.scene.quaternion).inverse(), scratchSceneMatrixInverse.makeRotationFromQuaternion(scratchSceneQuaternionInverse), scratchFrustumMatrix.copy(this.camera.matrix), scratchFrustumMatrix.setPosition(0, 0, 0), scratchFrustumMatrix.premultiply(scratchSceneMatrixInverse), scratchFrustumMatrixInverse.getInverse(scratchFrustumMatrix), scratchFrustumProjectMatrix.multiplyMatrices(this.camera.projectionMatrix, scratchFrustumMatrixInverse), this.frustum.setFromProjectionMatrix(scratchFrustumProjectMatrix);
22930
22798
  var R = this.frustum.planes[5].normal, w = [];
22931
- A >= m && traverseTileCubeNode(this.tileTree, function(K) {
22932
- if (!(K.level < m)) {
22933
- if (K.level > A || !e.frustum.intersectsBox(K.box))
22799
+ A >= m && traverseTileCubeNode(this.tileTree, function(G) {
22800
+ if (!(G.level < m)) {
22801
+ if (G.level > A || !e.frustum.intersectsBox(G.box))
22934
22802
  return !1;
22935
- w.push(K);
22803
+ w.push(G);
22936
22804
  }
22937
22805
  });
22938
22806
  var C = /* @__PURE__ */ new WeakMap();
22939
- w.sort(function(K, ee) {
22940
- if (K.level !== ee.level)
22941
- return K.level - ee.level;
22942
- var te = C.get(K);
22943
- te === void 0 && (te = K.box.getCenter(scratchSortVector3).angleTo(R), C.set(K, te));
22944
- var re = C.get(ee);
22945
- return re === void 0 && (re = ee.box.getCenter(scratchSortVector3).angleTo(R), C.set(ee, re)), te - re;
22807
+ w.sort(function(G, ee) {
22808
+ if (G.level !== ee.level)
22809
+ return G.level - ee.level;
22810
+ var te = C.get(G);
22811
+ te === void 0 && (te = G.box.getCenter(scratchSortVector3).angleTo(R), C.set(G, te));
22812
+ var ne = C.get(ee);
22813
+ return ne === void 0 && (ne = ee.box.getCenter(scratchSortVector3).angleTo(R), C.set(ee, ne)), te - ne;
22946
22814
  });
22947
22815
  var I = /* @__PURE__ */ new WeakSet(), H = this.observer.images.tiles;
22948
22816
  if (H)
22949
- for (var M = function(K) {
22950
- var ee = H.find(function(ne) {
22951
- return ne.level === K.level;
22817
+ for (var M = function(G) {
22818
+ var ee = H.find(function(re) {
22819
+ return re.level === G.level;
22952
22820
  });
22953
22821
  if (!ee)
22954
22822
  return "continue";
22955
- I.add(K);
22956
- var te = B.tileMeshes.get(K);
22823
+ I.add(G);
22824
+ var te = B.tileMeshes.get(G);
22957
22825
  if (te) {
22958
22826
  te.appearDuration = B.appearDuration;
22959
- var re = te.updateTime(o);
22960
- return re && (r = !0), "continue";
22827
+ var ne = te.updateTime(o);
22828
+ return ne && (r = !0), "continue";
22961
22829
  }
22962
22830
  if (B.pedding >= B.maxRequest)
22963
22831
  return "continue";
22964
- var ie = Math.pow(2, K.level) * K.position.y, ce = Math.pow(2, K.level) * K.position.x, ae = panoStringify({
22832
+ var ie = Math.pow(2, G.level) * G.position.y, ce = Math.pow(2, G.level) * G.position.x, ae = panoStringify({
22965
22833
  panoIndex: B.observer.panoIndex,
22966
22834
  workCode: B.observer.work.workCode
22967
- }), de = "".concat(ae, ".").concat(K.face, ".").concat(K.level, ".").concat(ie, ".").concat(ce), ge = ee.work.getURL(ee[K.face]), ye = ee.size, xe = B.imageOptions.transform, le = __assign(__assign({}, pick(B.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(de), size: ee.scale >= 1 ? void 0 : ye * K.size * ee.scale, cut: K.size === 1 ? void 0 : [
22968
- ye * K.position.x,
22969
- ye * K.position.y,
22970
- ye * K.size,
22971
- ye * K.size
22835
+ }), de = "".concat(ae, ".").concat(G.face, ".").concat(G.level, ".").concat(ie, ".").concat(ce), ge = ee.work.getURL(ee[G.face]), ye = ee.size, xe = B.imageOptions.transform, le = __assign(__assign({}, pick(B.imageOptions, ["format", "sharpen", "forceUseExifOrientation", "mappings"])), { key: "pano_tile.".concat(de), size: ee.scale >= 1 ? void 0 : ye * G.size * ee.scale, cut: G.size === 1 ? void 0 : [
22836
+ ye * G.position.x,
22837
+ ye * G.position.y,
22838
+ ye * G.size,
22839
+ ye * G.size
22972
22840
  ] });
22973
- K.level === 1 && ee.scale >= 0.5 && (le.format === "jpg" || /\.jpg$/.test(ge)) && (le.size = void 0, le.quality || (le.quality = 70)), K.size === 1 && console.warn("tile: ".concat(le.key, " should not appear.")), B.pedding++;
22841
+ G.level === 1 && ee.scale >= 0.5 && (le.format === "jpg" || /\.jpg$/.test(ge)) && (le.size = void 0, le.quality || (le.quality = 70)), G.size === 1 && console.warn("tile: ".concat(le.key, " should not appear.")), B.pedding++;
22974
22842
  var he = B.textureLoader.loadTexture(ge, {
22975
22843
  imageURL: {
22976
22844
  transform: xe,
@@ -22980,30 +22848,30 @@ void main() {
22980
22848
  magFilter: THREE.LinearFilter,
22981
22849
  generateMipmaps: !1,
22982
22850
  fetcher: getFetcher(B.observer.work)
22983
- }).then(function(ne) {
22984
- return ne.body;
22851
+ }).then(function(re) {
22852
+ return re.body;
22985
22853
  });
22986
- he.then(function(ne) {
22987
- return initTexture(ne, l);
22988
- }).then(function(ne) {
22989
- return e.pedding--, ne;
22990
- }, function(ne) {
22991
- return e.pedding--, Promise.reject(ne);
22992
- }), te = new TileMesh(K, he), te.name = "tiling:tile-".concat(de), te.visible = !1, te.appearDuration = B.appearDuration, B.tileMeshes.set(K, te), B.scene.add(te), te.updateTime(o), r = !0;
22854
+ he.then(function(re) {
22855
+ return initTexture(re, l);
22856
+ }).then(function(re) {
22857
+ return e.pedding--, re;
22858
+ }, function(re) {
22859
+ return e.pedding--, Promise.reject(re);
22860
+ }), te = new TileMesh(G, he), te.name = "tiling:tile-".concat(de), te.visible = !1, te.appearDuration = B.appearDuration, B.tileMeshes.set(G, te), B.scene.add(te), te.updateTime(o), r = !0;
22993
22861
  }, B = this, L = 0, O = w; L < O.length; L++) {
22994
22862
  var F = O[L];
22995
22863
  M(F);
22996
22864
  }
22997
22865
  var N = [], D = [];
22998
- this.tileMeshes.forEach(function(K, ee) {
22999
- I.has(ee) ? N.push(K) : D.push(K);
22866
+ this.tileMeshes.forEach(function(G, ee) {
22867
+ I.has(ee) ? N.push(G) : D.push(G);
23000
22868
  var te = ee.level >= m && ee.level <= A;
23001
- K.visible !== te && (K.visible = te, r = !0);
22869
+ G.visible !== te && (G.visible = te, r = !0);
23002
22870
  });
23003
- for (var U = D.sort(function(K, ee) {
23004
- return ee.activeTime - K.activeTime;
23005
- }).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0, G = U; z < G.length; z++) {
23006
- var j = G[z];
22871
+ for (var U = D.sort(function(G, ee) {
22872
+ return ee.activeTime - G.activeTime;
22873
+ }).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0, K = U; z < K.length; z++) {
22874
+ var j = K[z];
23007
22875
  this.tileMeshes.delete(j.node), this.scene.remove(j), j.dispose(), r = !0;
23008
22876
  }
23009
22877
  if (r) {
@@ -23015,7 +22883,7 @@ void main() {
23015
22883
  return this.forceRenderWhenNextUpdate = !1, r;
23016
22884
  }, n;
23017
22885
  })()
23018
- ), ROTATE_Y_PI_MATRIX = new THREE.Matrix4().makeRotationAxis(new THREE.Vector3(0, 1, 0), Math.PI), sharedGeometry$1 = createBoxGeometry(2, 2, 2);
22886
+ ), ROTATE_Y_PI_MATRIX = new THREE.Matrix4().makeRotationAxis(new THREE.Vector3(0, 1, 0), Math.PI), sharedGeometry$1 = createSimpleBoxBufferGeometry(2, 2, 2);
23019
22887
  sharedGeometry$1.applyMatrix4(new THREE.Matrix4().makeScale(-1, 1, 1));
23020
22888
  var PANO_VIDEO_MATERIAL_VERTEX_SHADER = `
23021
22889
 
@@ -23317,8 +23185,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23317
23185
  var N = F[O], D = N.key, U = N.progress;
23318
23186
  D !== void 0 && (B.push(D), U > this.locationMotion.progress && L.push(D));
23319
23187
  }
23320
- for (var z = 0, G = Object.keys(this.panoResources); z < G.length; z++) {
23321
- var j = G[z];
23188
+ for (var z = 0, K = Object.keys(this.panoResources); z < K.length; z++) {
23189
+ var j = K[z];
23322
23190
  if (!(L.indexOf(j) >= 0)) {
23323
23191
  var Q = this.panoResources[j];
23324
23192
  if (Q.panoPicture) {
@@ -23345,34 +23213,34 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23345
23213
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
23346
23214
  var W = this.works.getObserver(this.currentPano), X = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, Z = this.works.getObserver(E.panoId), Y = this.works.getObserver(b.panoId);
23347
23215
  if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && W) {
23348
- for (var K = [], ee = W.work.observers, te = 0, re = W.accessibleNodes; te < re.length; te++) {
23349
- var ie = re[te], M = ee[ie];
23350
- M && K.push(M);
23216
+ for (var G = [], ee = W.work.observers, te = 0, ne = W.accessibleNodes; te < ne.length; te++) {
23217
+ var ie = ne[te], M = ee[ie];
23218
+ M && G.push(M);
23351
23219
  }
23352
23220
  var ce = /* @__PURE__ */ new Map();
23353
- if (K.sort(function(ue, Ae) {
23221
+ if (G.sort(function(ue, Ae) {
23354
23222
  var Me = ce.get(ue);
23355
23223
  typeof Me == "undefined" && (Me = ue.standingPosition.distanceTo(W.standingPosition), ce.set(ue, Me));
23356
23224
  var He = ce.get(ue);
23357
23225
  return typeof He == "undefined" && (He = Ae.standingPosition.distanceTo(W.standingPosition), ce.set(Ae, He)), Me - He;
23358
- }), K.length) {
23359
- this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % K.length;
23360
- var ae = K[this.accessibleObserverFloorCheckCount], de = this.modelScene.models.find(function(ue) {
23226
+ }), G.length) {
23227
+ this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % G.length;
23228
+ var ae = G[this.accessibleObserverFloorCheckCount], de = this.modelScene.models.find(function(ue) {
23361
23229
  return ue.work === (ae == null ? void 0 : ae.work);
23362
23230
  });
23363
23231
  if (ae && de && de.visible) {
23364
23232
  var ge = 0.3, ye = 0.05, xe = 5e-3, le = ae.standingPosition.clone().applyMatrix4(ae.work.transform), he = panoStringify({
23365
23233
  panoIndex: ae.panoIndex,
23366
23234
  workCode: ae.work.workCode
23367
- }), ne = adjustPanoCircleMeshVectors.map(function(ue) {
23235
+ }), re = adjustPanoCircleMeshVectors.map(function(ue) {
23368
23236
  scratchRaycaster$1.ray.origin.copy(le), scratchRaycaster$1.ray.origin.add(scratchVector3$3.copy(ue).setY(ge)), scratchRaycaster$1.ray.direction.set(0, -1, 0), scratchRaycaster$1.firstHitOnly = !0, scratchRaycaster$1.floorIndex = -1;
23369
23237
  var Ae = de.intersectRaycaster(scratchRaycaster$1)[0];
23370
23238
  return Ae && Ae.distance - xe <= ge ? new THREE.Vector3().copy(le).setY(Ae.point.y + xe) : le;
23371
23239
  });
23372
- ne.sort(function(ue, Ae) {
23240
+ re.sort(function(ue, Ae) {
23373
23241
  return Ae.y - ue.y;
23374
23242
  });
23375
- var se = ne[Math.floor(ne.length / 2)], pe = ne.filter(function(ue) {
23243
+ var se = re[Math.floor(re.length / 2)], pe = re.filter(function(ue) {
23376
23244
  return ue.distanceTo(se) <= ye;
23377
23245
  })[0];
23378
23246
  if (pe) {
@@ -23772,7 +23640,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23772
23640
  var U = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
23773
23641
  U === 0 || U === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * U / z;
23774
23642
  }
23775
- var G = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), j = {
23643
+ var K = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), j = {
23776
23644
  longitude: o.longitude,
23777
23645
  latitude: o.latitude,
23778
23646
  fov: o.fov
@@ -23785,7 +23653,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23785
23653
  userAction: this.userAction,
23786
23654
  error: null
23787
23655
  })), 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, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
23788
- this.cameraMotion.set(j, G).catch(noop);
23656
+ this.cameraMotion.set(j, K).catch(noop);
23789
23657
  else {
23790
23658
  var J = coordinatesToVector({
23791
23659
  longitude: this.cameraMotion.value.longitude,
@@ -23797,13 +23665,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23797
23665
  X.lookAt(J);
23798
23666
  var Z = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion);
23799
23667
  X.lookAt(W);
23800
- var Y = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion), K = new THREE.Matrix4().getInverse(Z).premultiply(Y), ee = this.cameraMotion.value.fov, te = (p = j.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, re = 1;
23801
- r.effect === "zoomin" ? re = 1.5 : r.effect === "zoomout" && (re = 0.4);
23802
- for (var ie = clamp$1(te * re, 1, 170), ce = 0; ce < S.length - 1; ce++) {
23668
+ var Y = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion), G = new THREE.Matrix4().getInverse(Z).premultiply(Y), ee = this.cameraMotion.value.fov, te = (p = j.fov) !== null && p !== void 0 ? p : this.cameraMotion.value.fov, ne = 1;
23669
+ r.effect === "zoomin" ? ne = 1.5 : r.effect === "zoomout" && (ne = 0.4);
23670
+ for (var ie = clamp$1(te * ne, 1, 170), ce = 0; ce < S.length - 1; ce++) {
23803
23671
  var ae = S[ce].key;
23804
23672
  if (ae) {
23805
23673
  var de = this.panoResources[ae];
23806
- de && (de.fixCameraTransform.copy(K), de.panoPicture && (de.panoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
23674
+ de && (de.fixCameraTransform.copy(G), de.panoPicture && (de.panoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
23807
23675
  }
23808
23676
  }
23809
23677
  this.cameraMotion.setKeyframes([
@@ -23831,9 +23699,9 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23831
23699
  fov: te
23832
23700
  }
23833
23701
  }
23834
- ], G).catch(noop);
23702
+ ], K).catch(noop);
23835
23703
  }
23836
- var ge = this.locationMotion.setKeyframes(S, G, R);
23704
+ var ge = this.locationMotion.setKeyframes(S, K, R);
23837
23705
  ge.then(
23838
23706
  // resolve
23839
23707
  // 动画结束
@@ -23851,21 +23719,21 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23851
23719
  userAction: s.userAction,
23852
23720
  error: null
23853
23721
  })), o.moveEndCallback && o.moveEndCallback(he);
23854
- var ne = s.works.getObserver(e);
23855
- if (ne && ne.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
23722
+ var re = s.works.getObserver(e);
23723
+ if (re && re.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
23856
23724
  var se = {
23857
23725
  map: s.videoTexture,
23858
- size: ne.video.size.clone(),
23859
- matrix: ne.video.matrix.clone(),
23860
- panoMatrix: ne.matrix.clone().premultiply(ne.work.transform),
23726
+ size: re.video.size.clone(),
23727
+ matrix: re.video.matrix.clone(),
23728
+ panoMatrix: re.matrix.clone().premultiply(re.work.transform),
23861
23729
  alpha: 1
23862
23730
  }, pe = createUuid(), me = s.videoTexture.image;
23863
23731
  me.setAttribute("uuid", pe), me.oncanplay = noop, me.ontimeupdate = noop, canplayVideo().then(function(qe) {
23864
- qe && ne.video && me.getAttribute("uuid") === pe && (me.oncanplay = function() {
23732
+ qe && re.video && me.getAttribute("uuid") === pe && (me.oncanplay = function() {
23865
23733
  me.oncanplay = noop, me.play();
23866
23734
  }, me.ontimeupdate = function() {
23867
23735
  me.currentTime > 0.5 && (me.ontimeupdate = noop, s.panoVideo.setMaterial(se));
23868
- }, me.src = ne.video.source);
23736
+ }, me.src = re.video.source);
23869
23737
  }).catch((function() {
23870
23738
  me.removeAttribute("uuid");
23871
23739
  }));
@@ -23988,11 +23856,11 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23988
23856
  var D = e.state.fov, U = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(D) : this.minLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(D) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
23989
23857
  b.latitude = clamp$1(0, U, z);
23990
23858
  }
23991
- var G = __assign({}, e.state);
23992
- if (G.workCode = l.work.workCode, G.panoIndex = l.panoIndex, b.longitude !== void 0 && (G.longitude = b.longitude), b.latitude !== void 0 && (G.latitude = b.latitude), b.fov !== void 0 && (G.fov = b.fov), G.distance = 0, G.offset = l.position.clone(), e.state = G, this.emit("gesture.tap", e), !e.defaultPrevented) {
23859
+ var K = __assign({}, e.state);
23860
+ if (K.workCode = l.work.workCode, K.panoIndex = l.panoIndex, b.longitude !== void 0 && (K.longitude = b.longitude), b.latitude !== void 0 && (K.latitude = b.latitude), b.fov !== void 0 && (K.fov = b.fov), K.distance = 0, K.offset = l.position.clone(), e.state = K, this.emit("gesture.tap", e), !e.defaultPrevented) {
23993
23861
  if (this.emit("pano.select", createEvent("pano.select", {
23994
23862
  prevPano: this.currentPano,
23995
- state: G,
23863
+ state: K,
23996
23864
  userAction: e.userAction,
23997
23865
  options: b,
23998
23866
  progress: 0,
@@ -24008,7 +23876,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24008
23876
  userAction: e.userAction,
24009
23877
  prevPano: this.currentPano,
24010
23878
  progress: 0,
24011
- state: G,
23879
+ state: K,
24012
23880
  options: b,
24013
23881
  error: null
24014
23882
  }));
@@ -24931,8 +24799,8 @@ void main() {
24931
24799
  B.copy(L), R = !0;
24932
24800
  }
24933
24801
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(B.x + (L.x - B.x) * O, B.y + (L.y - B.y) * O, B.z + (L.z - B.z) * O);
24934
- for (var D = [], U = [], z = 0, G = this.locationMotion.keyframes; z < G.length; z++) {
24935
- var j = G[z], Q = j.key, V = j.progress;
24802
+ for (var D = [], U = [], z = 0, K = this.locationMotion.keyframes; z < K.length; z++) {
24803
+ var j = K[z], Q = j.key, V = j.progress;
24936
24804
  Q !== void 0 && (D.push(Q), V > this.locationMotion.progress && U.push(Q));
24937
24805
  }
24938
24806
  for (var J = 0, W = Object.keys(this.panoResources); J < W.length; J++) {
@@ -24960,12 +24828,12 @@ void main() {
24960
24828
  }));
24961
24829
  }
24962
24830
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), p.offset && this.camera.position.copy(p.offset);
24963
- var K = this.camera.pose.longitude, ee = this.camera.pose.latitude;
24964
- this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose(), (K !== this.camera.pose.longitude || ee !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop), this.emit("camera.update", createEvent("camera.update", {
24831
+ var G = this.camera.pose.longitude, ee = this.camera.pose.latitude;
24832
+ this.camera.quaternion.fromArray(this.cardboard.sensor.getOrientation()), this.camera.computePose(), (G !== this.camera.pose.longitude || ee !== this.camera.pose.latitude) && (this.cameraMotion.set(pick(this.camera.pose, ["longitude", "latitude"]), 0).catch(noop), this.emit("camera.update", createEvent("camera.update", {
24965
24833
  userAction: !0,
24966
24834
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
24967
24835
  }))), this.works.getObserver(this.currentPano);
24968
- var te = this.works.getObserver(E.panoId), re = this.works.getObserver(b.panoId), ie = /* @__PURE__ */ new Map();
24836
+ var te = this.works.getObserver(E.panoId), ne = this.works.getObserver(b.panoId), ie = /* @__PURE__ */ new Map();
24969
24837
  if (te)
24970
24838
  for (var ce = 0, ae = te.accessibleNodes; ce < ae.length; ce++) {
24971
24839
  var de = ae[ce], N = te.work.observers[de];
@@ -24977,9 +24845,9 @@ void main() {
24977
24845
  ie.set(ge, N);
24978
24846
  }
24979
24847
  }
24980
- if (re)
24981
- for (var ye = 0, xe = re.accessibleNodes; ye < xe.length; ye++) {
24982
- var de = xe[ye], N = re.work.observers[de];
24848
+ if (ne)
24849
+ for (var ye = 0, xe = ne.accessibleNodes; ye < xe.length; ye++) {
24850
+ var de = xe[ye], N = ne.work.observers[de];
24983
24851
  if (N) {
24984
24852
  var ge = panoStringify({
24985
24853
  panoIndex: N.panoIndex,
@@ -25013,7 +24881,7 @@ void main() {
25013
24881
  });
25014
24882
  }
25015
24883
  {
25016
- var O = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, he = Math.round(O), ne = this.modelScene.parameter.pano0, se = this.modelScene.parameter.pano1, pe = he === 0 ? ne : se, N = void 0;
24884
+ var O = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, he = Math.round(O), re = this.modelScene.parameter.pano0, se = this.modelScene.parameter.pano1, pe = he === 0 ? re : se, N = void 0;
25017
24885
  if (pe && (N = this.works.getObserver(pe.panoId), N || (N = this.panoPictureObserverMap.get(pe))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = O < 0.6 ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !N || !pe || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
25018
24886
  this.tiling.setObserver(null);
25019
24887
  var me = {
@@ -25050,16 +24918,16 @@ void main() {
25050
24918
  matrixInverse: this.tiling.camera.matrixWorldInverse,
25051
24919
  projectionMatrix: this.tiling.camera.projectionMatrix,
25052
24920
  pano: he,
25053
- opacity: (ne == null ? void 0 : ne.panoId) === (se == null ? void 0 : se.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
24921
+ opacity: (re == null ? void 0 : re.panoId) === (se == null ? void 0 : se.panoId) ? 1 : easeInQuart(Math.abs(((c = this.modelScene.parameter.progress) !== null && c !== void 0 ? c : 0) - 0.5) * 2)
25054
24922
  }, Le = this.modelScene.parameter.refinedScreen;
25055
24923
  (Ke || Te.pano !== (Le == null ? void 0 : Le.pano) || Te.opacity !== (Le == null ? void 0 : Le.opacity)) && this.modelScene.parameter.set("refinedScreen", Te);
25056
24924
  }
25057
24925
  }
25058
24926
  this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
25059
24927
  {
25060
- var Ie = b.effect, $e = this.modelScene.parameter, ne = $e.pano0, se = $e.pano1;
25061
- if (ne && se && ne !== se && Ie === "fly" && this.flyEffectUseDepthBuffer) {
25062
- if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== ne.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== se.panoId) {
24928
+ var Ie = b.effect, $e = this.modelScene.parameter, re = $e.pano0, se = $e.pano1;
24929
+ if (re && se && re !== se && Ie === "fly" && this.flyEffectUseDepthBuffer) {
24930
+ if (((f = this.modelScene.parameter.pano0Depth) === null || f === void 0 ? void 0 : f.panoId) !== re.panoId || ((d = this.modelScene.parameter.pano1Depth) === null || d === void 0 ? void 0 : d.panoId) !== se.panoId) {
25063
24931
  var tt = 500, ke = 512;
25064
24932
  this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== ke && this.pano0DepthCubeRenderTarget.setSize(ke, ke) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(ke, {
25065
24933
  minFilter: THREE.NearestFilter,
@@ -25071,11 +24939,11 @@ void main() {
25071
24939
  generateMipmaps: !1
25072
24940
  });
25073
24941
  var Pe = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
25074
- Pe.matrix.copy(ne.matrix), Pe.matrixWorld.copy(Pe.matrix), Pe.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Pe, tt);
24942
+ Pe.matrix.copy(re.matrix), Pe.matrixWorld.copy(Pe.matrix), Pe.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Pe, tt);
25075
24943
  var _e = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
25076
24944
  _e.matrix.copy(se.matrix), _e.matrixWorld.copy(_e.matrix), _e.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, _e, tt), this.modelScene.parameter.set({
25077
24945
  pano0Depth: {
25078
- panoId: ne.panoId,
24946
+ panoId: re.panoId,
25079
24947
  map: this.pano0DepthCubeRenderTarget.texture,
25080
24948
  mapSize: this.pano0DepthCubeRenderTarget.width,
25081
24949
  maxDepth: tt
@@ -25388,10 +25256,10 @@ void main() {
25388
25256
  } : {
25389
25257
  workCode: "",
25390
25258
  panoIndex: 0
25391
- }, z = __assign(__assign({}, U), { mode: this.mode, longitude: (u = H.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = H.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = H.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), G = this.currentPano;
25259
+ }, z = __assign(__assign({}, U), { mode: this.mode, longitude: (u = H.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = H.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = H.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), K = this.currentPano;
25392
25260
  this.emit("pano.moveTo", createEvent("pano.moveTo", {
25393
25261
  options: r,
25394
- prevPano: G,
25262
+ prevPano: K,
25395
25263
  progress: 0,
25396
25264
  state: z,
25397
25265
  userAction: this.userAction,
@@ -25407,7 +25275,7 @@ void main() {
25407
25275
  var J = __assign(__assign(__assign({}, U), { mode: s.mode }), clonePose(s.camera.pose));
25408
25276
  s.emit("pano.arrived", createEvent("pano.arrived", {
25409
25277
  options: r,
25410
- prevPano: G,
25278
+ prevPano: K,
25411
25279
  progress: 0,
25412
25280
  state: J,
25413
25281
  userAction: s.userAction,
@@ -25419,7 +25287,7 @@ void main() {
25419
25287
  function() {
25420
25288
  r.moveCancelCallback && r.moveCancelCallback(), s.emit("pano.cancel", createEvent("pano.cancel", {
25421
25289
  options: r,
25422
- prevPano: G,
25290
+ prevPano: K,
25423
25291
  progress: 0,
25424
25292
  state: z,
25425
25293
  userAction: s.userAction,
@@ -25831,10 +25699,10 @@ void main() {
25831
25699
  longitude: C.longitude,
25832
25700
  latitude: C.latitude
25833
25701
  }, 0).catch(noop), e.isFinal) {
25834
- var G = e.velocityX, j = e.velocityY;
25702
+ var K = e.velocityX, j = e.velocityY;
25835
25703
  this.inMomentumMovement = {
25836
25704
  uuid: createUuid()
25837
- }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: G, y: j })), { x: 0, y: 0, z: 0 }), 0);
25705
+ }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: K, y: j })), { x: 0, y: 0, z: 0 }), 0);
25838
25706
  }
25839
25707
  }
25840
25708
  }
@@ -26683,7 +26551,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
26683
26551
  }
26684
26552
  return Object.defineProperty(t, "version", {
26685
26553
  get: function() {
26686
- return "6.6.4";
26554
+ return "6.7.0-alpha.1";
26687
26555
  },
26688
26556
  enumerable: !1,
26689
26557
  configurable: !0
@@ -27316,11 +27184,11 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27316
27184
  var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), U = this.locationMotionKeyframesLength(T);
27317
27185
  S = this.locationMotion.getProgressVelocity(y) * D / U;
27318
27186
  }
27319
- var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), G = {
27187
+ var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), K = {
27320
27188
  longitude: o.longitude,
27321
27189
  latitude: o.latitude,
27322
27190
  fov: o.fov
27323
- }, j = __assign(__assign({}, e), { mode: this.mode, longitude: (u = G.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = G.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = G.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), Q = this.currentPano;
27191
+ }, j = __assign(__assign({}, e), { mode: this.mode, longitude: (u = K.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = K.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = K.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), Q = this.currentPano;
27324
27192
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
27325
27193
  options: o,
27326
27194
  prevPano: Q,
@@ -27329,25 +27197,25 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27329
27197
  userAction: this.userAction,
27330
27198
  error: null
27331
27199
  })), o.moveStartCallback && o.moveStartCallback(j), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly")
27332
- this.cameraMotion.set(G, z).catch(noop);
27200
+ this.cameraMotion.set(K, z).catch(noop);
27333
27201
  else {
27334
27202
  var V = coordinatesToVector({
27335
27203
  longitude: this.cameraMotion.value.longitude,
27336
27204
  latitude: this.cameraMotion.value.latitude
27337
27205
  }), J = coordinatesToVector({
27338
- longitude: (f = G.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
27339
- latitude: (d = G.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
27206
+ longitude: (f = K.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
27207
+ latitude: (d = K.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
27340
27208
  }), W = new THREE.Object3D();
27341
27209
  W.lookAt(V);
27342
27210
  var X = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion);
27343
27211
  W.lookAt(J);
27344
- var Z = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), Y = new THREE.Matrix4().getInverse(X).premultiply(Z), K = this.cameraMotion.value.fov, ee = (h = G.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
27212
+ var Z = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion), Y = new THREE.Matrix4().getInverse(X).premultiply(Z), G = this.cameraMotion.value.fov, ee = (h = K.fov) !== null && h !== void 0 ? h : this.cameraMotion.value.fov, te = 1;
27345
27213
  r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
27346
- for (var re = ee * te, ie = 0; ie < T.length - 1; ie++) {
27214
+ for (var ne = ee * te, ie = 0; ie < T.length - 1; ie++) {
27347
27215
  var ce = T[ie].key;
27348
27216
  if (ce) {
27349
27217
  var ae = this.panoResources[ce];
27350
- ae && (ae.fixCameraTransform.copy(Y), ae.leftPanoPicture && (ae.leftPanoPicture.zoom = Math.tan(re / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
27218
+ ae && (ae.fixCameraTransform.copy(Y), ae.leftPanoPicture && (ae.leftPanoPicture.zoom = Math.tan(ne / 2 / 180 * Math.PI) / Math.tan(G / 2 / 180 * Math.PI)));
27351
27219
  }
27352
27220
  }
27353
27221
  this.cameraMotion.setKeyframes([
@@ -27362,16 +27230,16 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27362
27230
  {
27363
27231
  progress: 0,
27364
27232
  value: {
27365
- longitude: (p = G.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
27366
- latitude: (m = G.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
27367
- fov: re
27233
+ longitude: (p = K.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
27234
+ latitude: (m = K.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
27235
+ fov: ne
27368
27236
  }
27369
27237
  },
27370
27238
  {
27371
27239
  progress: 1,
27372
27240
  value: {
27373
- longitude: (A = G.longitude) !== null && A !== void 0 ? A : this.cameraMotion.value.longitude,
27374
- latitude: (g = G.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
27241
+ longitude: (A = K.longitude) !== null && A !== void 0 ? A : this.cameraMotion.value.longitude,
27242
+ latitude: (g = K.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
27375
27243
  fov: ee
27376
27244
  }
27377
27245
  }
@@ -27397,7 +27265,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27397
27265
  })), o.moveEndCallback && o.moveEndCallback(le);
27398
27266
  var he = s.works.getObserver(s.currentPano);
27399
27267
  if (he && he.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
27400
- var ne = {
27268
+ var re = {
27401
27269
  map: s.videoTexture,
27402
27270
  size: he.video.size.clone(),
27403
27271
  matrix: he.video.matrix.clone(),
@@ -27408,7 +27276,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27408
27276
  me && he.video && pe.getAttribute("uuid") === se && (pe.oncanplay = function() {
27409
27277
  pe.oncanplay = noop, pe.play();
27410
27278
  }, pe.ontimeupdate = function() {
27411
- pe.currentTime > 0.5 && (pe.ontimeupdate = noop, s.panoVideo.setMaterial(ne));
27279
+ pe.currentTime > 0.5 && (pe.ontimeupdate = noop, s.panoVideo.setMaterial(re));
27412
27280
  }, pe.src = he.video.source);
27413
27281
  }).catch((function() {
27414
27282
  pe.removeAttribute("uuid");
@@ -27539,20 +27407,20 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27539
27407
  O.copy(F), M = !0;
27540
27408
  }
27541
27409
  v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(O.x + (F.x - O.x) * N, O.y + (F.y - O.y) * N, O.z + (F.z - O.z) * N);
27542
- for (var z = [], G = [], j = 0, Q = this.locationMotion.keyframes; j < Q.length; j++) {
27410
+ for (var z = [], K = [], j = 0, Q = this.locationMotion.keyframes; j < Q.length; j++) {
27543
27411
  var V = Q[j], J = V.key, W = V.progress;
27544
- J !== void 0 && (z.push(J), W > this.locationMotion.progress && G.push(J));
27412
+ J !== void 0 && (z.push(J), W > this.locationMotion.progress && K.push(J));
27545
27413
  }
27546
27414
  for (var X = 0, Z = Object.keys(this.panoResources); X < Z.length; X++) {
27547
27415
  var Y = Z[X];
27548
- if (!(G.indexOf(Y) >= 0)) {
27549
- var K = this.panoResources[Y];
27550
- if (K.leftPanoPicture) {
27551
- var ee = K.leftPanoPicture.map;
27416
+ if (!(K.indexOf(Y) >= 0)) {
27417
+ var G = this.panoResources[Y];
27418
+ if (G.leftPanoPicture) {
27419
+ var ee = G.leftPanoPicture.map;
27552
27420
  if (ee) {
27553
27421
  if (ee === ((s = y.pano0) === null || s === void 0 ? void 0 : s.map) || ee === ((u = y.pano1) === null || u === void 0 ? void 0 : u.map))
27554
27422
  continue;
27555
- ee.dispose(), K.leftPanoPicture = null;
27423
+ ee.dispose(), G.leftPanoPicture = null;
27556
27424
  }
27557
27425
  }
27558
27426
  z.indexOf(Y) >= 0 || delete this.panoResources[Y];
@@ -27569,13 +27437,13 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27569
27437
  }));
27570
27438
  }
27571
27439
  this.camera.setFromPose(v), this.xrManager.cameraVR.projectionMatrix.copy(this.camera.projectionMatrix), this.xrManager.cameraVR.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), this.xrManager.cameraVR.matrix.copy(this.camera.matrix), this.xrManager.cameraVR.position.copy(this.camera.position), this.xrManager.cameraVR.quaternion.copy(this.camera.quaternion), this.xrManager.cameraVR.scale.copy(this.camera.scale), this.xrManager.cameraVR.matrixAutoUpdate = !1, this.xrManager.cameraVR.matrixWorld.copy(this.camera.matrixWorld);
27572
- var re = A, ie = re[1], ce = new THREE.Vector3(0, 0, 0), ae = new THREE.Vector2().copy(this.camera.resolution);
27440
+ var ne = A, ie = ne[1], ce = new THREE.Vector3(0, 0, 0), ae = new THREE.Vector2().copy(this.camera.resolution);
27573
27441
  if (ie && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
27574
27442
  var de = this.xrManager.cameraVR, ge = this.xrManager.referenceSpace, ye = this.xrManager.session.renderState.baseLayer, xe = ie.getViewerPose(ge), le = (l = xe == null ? void 0 : xe.views) !== null && l !== void 0 ? l : [];
27575
27443
  this.renderer.setFramebuffer(ye.framebuffer);
27576
27444
  for (var he = 0; he < le.length; he++) {
27577
- var ne = le[he], se = de.cameras[he], pe = ye.getViewport(ne);
27578
- pe && (se.projectionMatrix.fromArray(ne.projectionMatrix), se.projectionMatrixInverse.getInverse(se.projectionMatrix), se.matrix.fromArray(ne.transform.matrix), se.matrix.setPosition(this.camera.position), se.matrix.decompose(se.position, se.quaternion, se.scale), se.matrixWorld.copy(se.matrix), se.matrixWorldInverse.getInverse(se.matrixWorld), se.matrixAutoUpdate = !1, ce.copy(se.position), se.viewport.set(pe.x, pe.y, pe.width, pe.height), ae.set(pe.width, pe.height));
27445
+ var re = le[he], se = de.cameras[he], pe = ye.getViewport(re);
27446
+ pe && (se.projectionMatrix.fromArray(re.projectionMatrix), se.projectionMatrixInverse.getInverse(se.projectionMatrix), se.matrix.fromArray(re.transform.matrix), se.matrix.setPosition(this.camera.position), se.matrix.decompose(se.position, se.quaternion, se.scale), se.matrixWorld.copy(se.matrix), se.matrixWorldInverse.getInverse(se.matrixWorld), se.matrixAutoUpdate = !1, ce.copy(se.position), se.viewport.set(pe.x, pe.y, pe.width, pe.height), ae.set(pe.width, pe.height));
27579
27447
  }
27580
27448
  if (this.xrManager.setProjectionFromUnion(this.xrManager.cameraVR, this.xrManager.cameraL, this.xrManager.cameraR), this.camera.quaternion.copy(this.xrManager.cameraVR.quaternion), this.camera.scale.copy(this.xrManager.cameraVR.scale), this.camera.matrix.compose(this.camera.position, this.camera.quaternion, this.camera.scale), this.camera.computePose((c = v.distance) !== null && c !== void 0 ? c : this.camera.pose.distance), this.xrManager.session && this.xrManager.session.inputSources) {
27581
27449
  for (var he = 0; he < this.xrManager.session.inputSources.length; he++)
@@ -29054,7 +28922,7 @@ void main() {
29054
28922
  }
29055
28923
  return Object.defineProperty(t, "version", {
29056
28924
  get: function() {
29057
- return "6.6.4";
28925
+ return "6.7.0-alpha.1";
29058
28926
  },
29059
28927
  enumerable: !1,
29060
28928
  configurable: !0
@@ -29284,15 +29152,15 @@ void main() {
29284
29152
  else
29285
29153
  e instanceof Work ? E.push(e) : E.push(parseWork(e));
29286
29154
  for (var R = createWorks(E), w = function(Y) {
29287
- var K = C, ee = new Fetcher({
29155
+ var G = C, ee = new Fetcher({
29288
29156
  get networkSubscribe() {
29289
- return K.networkSubscribe;
29157
+ return G.networkSubscribe;
29290
29158
  },
29291
29159
  requestProxy: function(te) {
29292
- return Promise.resolve(te).then(function(re) {
29293
- return K.requestProxy(re);
29294
- }).then(function(re) {
29295
- var ie = verifyURL(re, Y.allowHosts);
29160
+ return Promise.resolve(te).then(function(ne) {
29161
+ return G.requestProxy(ne);
29162
+ }).then(function(ne) {
29163
+ var ie = verifyURL(ne, Y.allowHosts);
29296
29164
  if (ie instanceof Error)
29297
29165
  throw ie;
29298
29166
  return ie;
@@ -29358,8 +29226,8 @@ void main() {
29358
29226
  offset: r.offset
29359
29227
  };
29360
29228
  }
29361
- var U = __assign(__assign(__assign({}, O), { mode: F }), N), z = this.getCurrentState(), G = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
29362
- (F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (G = 0);
29229
+ var U = __assign(__assign(__assign({}, O), { mode: F }), N), z = this.getCurrentState(), K = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
29230
+ (F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (K = 0);
29363
29231
  var j = "fly";
29364
29232
  (F === "Panorama" || F === "VRPanorama" || F === "XRPanorama") && this.currentMode === F && (j = (g = v.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
29365
29233
  input: e,
@@ -29372,12 +29240,12 @@ void main() {
29372
29240
  var Y = __assign(__assign({ initial: {
29373
29241
  state: U,
29374
29242
  currentState: z,
29375
- duration: G,
29243
+ duration: K,
29376
29244
  effect: j,
29377
29245
  userAction: s
29378
- } }, u.commonParams()), u.controllerInits[F]), K = Controllers[F].initAnimationEndState(Y);
29246
+ } }, u.commonParams()), u.controllerInits[F]), G = Controllers[F].initAnimationEndState(Y);
29379
29247
  if (u.controller && u.currentMode === F)
29380
- u.controller.updateWork(R, K, { effect: j, duration: G }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(F, Y));
29248
+ u.controller.updateWork(R, G, { effect: j, duration: K }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(F, Y));
29381
29249
  else {
29382
29250
  var ee = u.currentMode;
29383
29251
  if (u.controller)
@@ -29390,14 +29258,14 @@ void main() {
29390
29258
  }));
29391
29259
  }
29392
29260
  u.controller = u.applyController(F, Y);
29393
- var re = createEvent("mode.change", {
29261
+ var ne = createEvent("mode.change", {
29394
29262
  prevMode: ee,
29395
29263
  mode: F,
29396
- state: K,
29264
+ state: G,
29397
29265
  userAction: s
29398
29266
  });
29399
29267
  try {
29400
- u.emit("mode.change", re);
29268
+ u.emit("mode.change", ne);
29401
29269
  } catch (ie) {
29402
29270
  console.error(ie);
29403
29271
  }
@@ -29427,8 +29295,8 @@ void main() {
29427
29295
  userAction: s
29428
29296
  })), X = !0, u.modelScene.autoRefine = !0), W.off("pano.arrived", Z), W.off("pano.cancel", Z);
29429
29297
  }, J = this.loadModels(R, v);
29430
- V = Promise.all(J.map(function(K) {
29431
- return K.initReady;
29298
+ V = Promise.all(J.map(function(G) {
29299
+ return G.initReady;
29432
29300
  })).then(noop), W.once("pano.arrived", Z), W.once("pano.cancel", Z), setTimeout(Z, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
29433
29301
  }
29434
29302
  return this.emit("works.load", createEvent("works.load", {
@@ -30062,7 +29930,13 @@ void main() {
30062
29930
  var e = this.works.getObserver(this.pano);
30063
29931
  if (e) {
30064
29932
  var r = new THREE.Object3D();
30065
- return r.matrix.copy(e.matrix).premultiply(e.work.transform), r.matrix.decompose(r.position, r.quaternion, r.scale), r.matrixAutoUpdate = !1, cameraWorldToLocal(this.camera, r);
29933
+ r.matrix.copy(e.matrix).premultiply(e.work.transform), r.matrix.decompose(r.position, r.quaternion, r.scale), r.matrixAutoUpdate = !1;
29934
+ var o = new THREE.Vector3(0, 0, -1);
29935
+ o.applyQuaternion(this.camera.quaternion);
29936
+ var s = r.quaternion.clone().inverse();
29937
+ o.applyQuaternion(s);
29938
+ var u = Math.atan2(o.x, -o.z), l = -Math.asin(o.y);
29939
+ return { theta: u, phi: l, lookAtVector: o };
30066
29940
  }
30067
29941
  }
30068
29942
  return null;