@realsee/five 6.6.3 → 6.7.0-alpha.0

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.3
5
+ * Version: 6.7.0-alpha.0
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 = {
@@ -5429,6 +5429,17 @@ function omitUndefinedFields(n) {
5429
5429
  }
5430
5430
  return t;
5431
5431
  }
5432
+ var hrefAElement = typeof document != "undefined" ? document.createElement("a") : { href: "" };
5433
+ function isAbsoluteURL(n) {
5434
+ return n.indexOf("/") === 0 || /^[0-9a-z]+\:/i.test(n);
5435
+ }
5436
+ function getFullURL(n) {
5437
+ if (typeof URL != "undefined")
5438
+ return new URL(n, location.href).href;
5439
+ hrefAElement.href = n;
5440
+ var t = hrefAElement.href;
5441
+ return hrefAElement.href = "", t;
5442
+ }
5432
5443
  function pathJoin() {
5433
5444
  for (var n = [], t = 0; t < arguments.length; t++)
5434
5445
  n[t] = arguments[t];
@@ -5444,8 +5455,31 @@ function pathJoin() {
5444
5455
  }
5445
5456
  return e.join("/");
5446
5457
  }
5447
- function isAbsoluteURL(n) {
5448
- return n.indexOf("/") === 0 || /^[0-9a-z]+\:/i.test(n);
5458
+ function appendSearch(n, t) {
5459
+ if (t === void 0 && (t = ""), (t[0] === "?" || t[0] === "&") && (t = t.slice(1)), !t)
5460
+ return n;
5461
+ var e = n.indexOf("#"), r = "";
5462
+ 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);
5463
+ }
5464
+ function normalizeURL(n) {
5465
+ var t, e = /^(http\:|https\:|file\:)?\/\/[^/]/.exec(n);
5466
+ if (!e)
5467
+ return n;
5468
+ var r = e[1] || "", o = n.slice(r.length + 2), s = o.indexOf("#");
5469
+ s >= 0 && (n.slice(s), o = n.slice(0, s));
5470
+ var u = o.indexOf("?");
5471
+ u >= 0 && (n.slice(u), o = n.slice(0, u));
5472
+ 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++) {
5473
+ var m = p[h];
5474
+ if (!(m === "" || m === ".")) {
5475
+ if (m === "..") {
5476
+ d.pop();
5477
+ continue;
5478
+ }
5479
+ d.push(m);
5480
+ }
5481
+ }
5482
+ return r + "//" + c + "/" + d.join("/") + "/" + f;
5449
5483
  }
5450
5484
  var webp = "data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAIAAUAmJaQAA3AA/vz0AAA=", avif = "data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAAGhbWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAsaWxvYwAAAABEAAACAAEAAAABAAAB3gAAABkAAgAAAAEAAAHJAAAAFQAAAEJpaW5mAAAAAAACAAAAGmluZmUCAAAAAAEAAGF2MDFDb2xvcgAAAAAaaW5mZQIAAAAAAgAAYXYwMUFscGhhAAAAABppcmVmAAAAAAAAAA5hdXhsAAIAAQABAAAA12lwcnAAAACxaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIAAoAAAAAUaXNwZQAAAAAAAAACAAAAAgAAAA5waXhpAAAAAAEIAAAADGF2MUOBABwAAAAAOGF1eEMAAAAAdXJuOm1wZWc6bXBlZ0I6Y2ljcDpzeXN0ZW1zOmF1eGlsaWFyeTphbHBoYQAAAAAeaXBtYQAAAAAAAAACAAEEAQKDBAACBAUGhwgAAAA2bWRhdBIACgQYADLVMgsWQBhhIAQqrNj/+BIACgUYADLEoDIOFkADDDDCQAACDaqCCb4=", heif = "data:image/heif;base64,AAAAGGZ0eXBoZWljAAAAAG1pZjFoZWljAAABL21ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAHBpY3QAAAAAAAAAAAAAAAAAAAAADnBpdG0AAAAAAAEAAAAjaWluZgAAAAAAAQAAABVpbmZlAgAAAAABAABodmMxAAAAAK9pcHJwAAAAkmlwY28AAAB2aHZjQwEBYAAAAAAAAAAAAADwAPz9+PgAACcDoAABAB5AAQwG//8BYAAAAwAAAwAAAwAAAwAAAwAAreTLgSChAAEAI0IBBwFgAAADAAADAAADAAADAAADAAChInJJlreTLySZNdggogABAAdEAcA98DMkAAAAFGlzcGUAAAAAAAAAAgAAAAIAAAAVaXBtYQAAAAAAAAABAAECgQIAAAAiaWxvYwAAAABEQAABAAEAAAAAAU8AAQAAAAAAAAAOAAAAFm1kYXQAAAAKJgGvLvkQwuWM4A==";
5451
5485
  function checkImage(n) {
@@ -6077,38 +6111,7 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
6077
6111
  });
6078
6112
  }, n;
6079
6113
  })()
6080
- ), dequeuing = !1, queue = [];
6081
- function dequeue(n) {
6082
- if (n === void 0 && (n = !1), !(!n && dequeuing)) {
6083
- dequeuing = !0;
6084
- var t = queue.shift();
6085
- if (t) {
6086
- try {
6087
- t();
6088
- } catch (e) {
6089
- }
6090
- AnimationFrameLoop.shared.add(function() {
6091
- return dequeue(!0);
6092
- }, !0, 2, -100);
6093
- } else
6094
- dequeuing = !1;
6095
- }
6096
- }
6097
- function delay$1(n) {
6098
- return new Promise(function(t, e) {
6099
- var r = function() {
6100
- try {
6101
- t(n());
6102
- } catch (o) {
6103
- e(o);
6104
- }
6105
- };
6106
- queue.push(r), AnimationFrameLoop.shared.add(function() {
6107
- return dequeue();
6108
- }, !0, 2, -100);
6109
- });
6110
- }
6111
- var commonjsGlobal = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, indexMinimal = {}, minimal$1 = {}, aspromise, hasRequiredAspromise;
6114
+ ), commonjsGlobal = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, indexMinimal = {}, minimal$1 = {}, aspromise, hasRequiredAspromise;
6112
6115
  function requireAspromise() {
6113
6116
  if (hasRequiredAspromise) return aspromise;
6114
6117
  hasRequiredAspromise = 1, aspromise = n;
@@ -7376,14 +7379,11 @@ function loadPbm(n, t) {
7376
7379
  responseType: "arraybuffer"
7377
7380
  });
7378
7381
  }).then(function(b) {
7379
- return E.byteLength = b.body.byteLength, delay$1(function() {
7380
- var T = new Uint8Array(b.body);
7381
- return Model$2.decode(T);
7382
- });
7382
+ E.byteLength = b.body.byteLength;
7383
+ var T = new Uint8Array(b.body);
7384
+ return Model$2.decode(T);
7383
7385
  }).then(function(b) {
7384
- return delay$1(function() {
7385
- return parse$4(b, f, h, p, m, A, d);
7386
- });
7386
+ return parse$4(b, f, h, p, m, A, d);
7387
7387
  }).then(function(b) {
7388
7388
  A.clear();
7389
7389
  var T = new THREE.Group();
@@ -7454,9 +7454,9 @@ function parsePBMModel(n) {
7454
7454
  S += h.faces.indices.length;
7455
7455
  }
7456
7456
  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++) {
7457
- 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++) {
7457
+ 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++) {
7458
7458
  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];
7459
- H && (H[L + R] = G[Q]), C[L * 2 + R * 2] = D[Q * 2], C[L * 2 + R * 2 + 1] = D[Q * 2 + 1];
7459
+ H && (H[L + R] = K[Q]), C[L * 2 + R * 2] = D[Q * 2], C[L * 2 + R * 2 + 1] = D[Q * 2 + 1];
7460
7460
  var X = Math.floor(R / 3) * 3;
7461
7461
  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);
7462
7462
  }
@@ -7487,10 +7487,10 @@ function parsePBMModel(n) {
7487
7487
  var h = T[R];
7488
7488
  Y += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7489
7489
  }
7490
- 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++) {
7491
- 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++) {
7490
+ 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++) {
7491
+ 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++) {
7492
7492
  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];
7493
- 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);
7493
+ 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);
7494
7494
  }
7495
7495
  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]);
7496
7496
  for (var R = 0; R < j; R++)
@@ -7554,8 +7554,8 @@ function parse$4(n, t, e, r, o, s, u) {
7554
7554
  var F = U[D], z = void 0;
7555
7555
  if (F.texture) {
7556
7556
  if (z = F.texture, r.length > 0 && r.indexOf(F.texture) === -1) {
7557
- for (var G = 0, j = r; G < j.length; G++) {
7558
- var Q = j[G], V = isAbsoluteURL(Q) ? Q : pathJoin(e, Q), J = V.slice(F.texture.length * -1) === F.texture;
7557
+ for (var K = 0, j = r; K < j.length; K++) {
7558
+ var Q = j[K], V = isAbsoluteURL(Q) ? Q : pathJoin(e, Q), J = V.slice(F.texture.length * -1) === F.texture;
7559
7559
  if (J) {
7560
7560
  z = Q;
7561
7561
  break;
@@ -7572,27 +7572,27 @@ function parse$4(n, t, e, r, o, s, u) {
7572
7572
  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);
7573
7573
  }
7574
7574
  o = autoRestImageOptionsByTextureLength(o, m);
7575
- for (var Z = [], Y = function(re) {
7575
+ for (var Z = [], Y = function(ne) {
7576
7576
  var ie = void 0;
7577
- s && (ie = s.get(re)), ie || (ie = loadTexture$1(re, e, o, u), s && s.set(re, ie)), Z.push(ie.then(function(ce) {
7578
- for (var ae = 0, de = h[re]; ae < de.length; ae++) {
7577
+ s && (ie = s.get(ne)), ie || (ie = loadTexture$1(ne, e, o, u), s && s.set(ne, ie)), Z.push(ie.then(function(ce) {
7578
+ for (var ae = 0, de = h[ne]; ae < de.length; ae++) {
7579
7579
  var ge = de[ae];
7580
7580
  ge.map && (p.delete(ge.map), ge.map.dispose()), ge.map = ce, p.add(ce);
7581
7581
  }
7582
7582
  return ce;
7583
7583
  }).catch(function() {
7584
- for (var ce = 0, ae = h[re]; ce < ae.length; ce++) {
7584
+ for (var ce = 0, ae = h[ne]; ce < ae.length; ce++) {
7585
7585
  var de = ae[ce];
7586
7586
  de.map && (p.delete(de.map), de.map.dispose()), de.map = null, de.color = new THREE.Color(16777215);
7587
7587
  }
7588
7588
  return null;
7589
7589
  }));
7590
- }, K = 0, ee = Object.keys(h); K < ee.length; K++) {
7591
- var te = ee[K];
7590
+ }, G = 0, ee = Object.keys(h); G < ee.length; G++) {
7591
+ var te = ee[G];
7592
7592
  Y(te);
7593
7593
  }
7594
- return Promise.all(Z).then(function(re) {
7595
- var ie = re.filter(function(ce) {
7594
+ return Promise.all(Z).then(function(ne) {
7595
+ var ie = ne.filter(function(ce) {
7596
7596
  return ce instanceof THREE.Texture;
7597
7597
  });
7598
7598
  return {
@@ -7974,21 +7974,17 @@ function loadAt3d(n, t) {
7974
7974
  }).then(function(b) {
7975
7975
  return lzma(b.body);
7976
7976
  }).then(function(b) {
7977
- return delay$1(function() {
7978
- for (var T, S = {
7979
- chunks: [],
7980
- createAt: void 0,
7981
- description: void 0
7982
- }, R = 0, w = b; R < w.length; R++) {
7983
- var C = w[R], I = Model$2.decode(C);
7984
- I.chunks.length && ((T = S.chunks).push.apply(T, I.chunks), S.createAt = I.createAt, S.description = I.description);
7985
- }
7986
- return S;
7987
- });
7977
+ for (var T, S = {
7978
+ chunks: [],
7979
+ createAt: void 0,
7980
+ description: void 0
7981
+ }, R = 0, w = b; R < w.length; R++) {
7982
+ var C = w[R], I = Model$2.decode(C);
7983
+ I.chunks.length && ((T = S.chunks).push.apply(T, I.chunks), S.createAt = I.createAt, S.description = I.description);
7984
+ }
7985
+ return S;
7988
7986
  }).then(function(b) {
7989
- return delay$1(function() {
7990
- return parse$4(b, f, h, p, m, A, d);
7991
- });
7987
+ return parse$4(b, f, h, p, m, A, d);
7992
7988
  }).then(function(b) {
7993
7989
  A.clear();
7994
7990
  var T = new THREE.Group();
@@ -8583,8 +8579,8 @@ function parse$3(n, t, e, r, o) {
8583
8579
  objects: s,
8584
8580
  textures: Array.from(g),
8585
8581
  dispose: function() {
8586
- l.forEach(function(G) {
8587
- G.dispose();
8582
+ l.forEach(function(K) {
8583
+ K.dispose();
8588
8584
  }), l.clear();
8589
8585
  }
8590
8586
  };
@@ -8868,12 +8864,6 @@ function values(n) {
8868
8864
  t.push(n[e]);
8869
8865
  return t;
8870
8866
  }
8871
- function appendSearch(n, t) {
8872
- if (t === void 0 && (t = ""), (t[0] === "?" || t[0] === "&") && (t = t.slice(1)), !t)
8873
- return n;
8874
- var e = n.indexOf("#"), r = "";
8875
- 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);
8876
- }
8877
8867
  function composeDsiposeSet(n) {
8878
8868
  var t = Array.from(n);
8879
8869
  return function() {
@@ -8997,10 +8987,10 @@ var Parser = (
8997
8987
  Promise.all(A)
8998
8988
  ]).then(function(w) {
8999
8989
  for (var C = w[0], I = w[1], H = w[2], M = w[3], B = w[4], L = [], O = function(U, z) {
9000
- var G = C[U], j = I[U], Q = H[U], V = M[U], J = B[U];
9001
- if (G === void 0)
8990
+ var K = C[U], j = I[U], Q = H[U], V = M[U], J = B[U];
8991
+ if (K === void 0)
9002
8992
  return "continue";
9003
- G.updateMatrix(), G.matrixAutoUpdate = !0;
8993
+ K.updateMatrix(), K.matrixAutoUpdate = !0;
9004
8994
  var W = void 0;
9005
8995
  switch (PATH_PROPERTIES[J.path]) {
9006
8996
  case PATH_PROPERTIES.weights:
@@ -9015,18 +9005,18 @@ var Parser = (
9015
9005
  W = THREE.VectorKeyframeTrack;
9016
9006
  break;
9017
9007
  }
9018
- var X = G.name ? G.name : G.uuid, Z = V.interpolation !== void 0 ? INTERPOLATION[V.interpolation] : THREE.InterpolateLinear, Y = [];
9019
- PATH_PROPERTIES[J.path] === PATH_PROPERTIES.weights ? G.traverse(function(ae) {
9008
+ var X = K.name ? K.name : K.uuid, Z = V.interpolation !== void 0 ? INTERPOLATION[V.interpolation] : THREE.InterpolateLinear, Y = [];
9009
+ PATH_PROPERTIES[J.path] === PATH_PROPERTIES.weights ? K.traverse(function(ae) {
9020
9010
  ae.morphTargetInfluences && Y.push(ae.name ? ae.name : ae.uuid);
9021
9011
  }) : Y.push(X);
9022
- var K = Q.array;
9012
+ var G = Q.array;
9023
9013
  if (Q.normalized) {
9024
- for (var ee = getNormalizedComponentScale(K.constructor), te = new Float32Array(K.length), re = 0, ie = K.length; re < ie; re++)
9025
- te[re] = K[re] * ee;
9026
- K = te;
9014
+ for (var ee = getNormalizedComponentScale(G.constructor), te = new Float32Array(G.length), ne = 0, ie = G.length; ne < ie; ne++)
9015
+ te[ne] = G[ne] * ee;
9016
+ G = te;
9027
9017
  }
9028
- for (var re = 0, ie = Y.length; re < ie; re++) {
9029
- var ce = new W(Y[re] + "." + PATH_PROPERTIES[J.path], j.array, K, Z);
9018
+ for (var ne = 0, ie = Y.length; ne < ie; ne++) {
9019
+ var ce = new W(Y[ne] + "." + PATH_PROPERTIES[J.path], j.array, G, Z);
9030
9020
  L.push(ce);
9031
9021
  }
9032
9022
  }, F = 0, N = C.length; F < N; F++)
@@ -11660,9 +11650,9 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11660
11650
  var u = !e, l = u || t.i != 2, c = t.i;
11661
11651
  u && (e = new u8(o * 3));
11662
11652
  var f = function(te) {
11663
- var re = e.length;
11664
- if (te > re) {
11665
- var ie = new u8(Math.max(re * 2, te));
11653
+ var ne = e.length;
11654
+ if (te > ne) {
11655
+ var ie = new u8(Math.max(ne * 2, te));
11666
11656
  ie.set(e), e = ie;
11667
11657
  }
11668
11658
  }, 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;
@@ -11710,8 +11700,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11710
11700
  }
11711
11701
  }
11712
11702
  l && f(p + 131072);
11713
- for (var G = (1 << g) - 1, j = (1 << y) - 1, Q = h; ; Q = h) {
11714
- var N = m[bits16(n, h) & G], V = N >> 4;
11703
+ for (var K = (1 << g) - 1, j = (1 << y) - 1, Q = h; ; Q = h) {
11704
+ var N = m[bits16(n, h) & K], V = N >> 4;
11715
11705
  if (h += N & 15, h > v) {
11716
11706
  c && err(0);
11717
11707
  break;
@@ -11741,9 +11731,9 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11741
11731
  l && f(p + 131072);
11742
11732
  var Y = p + J;
11743
11733
  if (p < z) {
11744
- var K = s - z, ee = Math.min(z, Y);
11745
- for (K + p < 0 && err(3); p < ee; ++p)
11746
- e[p] = r[K + p];
11734
+ var G = s - z, ee = Math.min(z, Y);
11735
+ for (G + p < 0 && err(3); p < ee; ++p)
11736
+ e[p] = r[G + p];
11747
11737
  }
11748
11738
  for (; p < Y; ++p)
11749
11739
  e[p] = e[p - z];
@@ -13441,15 +13431,15 @@ function loadX3p(n, t) {
13441
13431
  });
13442
13432
  }
13443
13433
  function parse$1(n, t) {
13444
- 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++) {
13434
+ 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++) {
13445
13435
  var me = pe[se];
13446
- /(^|\/)main\.xml$/i.test(me) && (ne = le[me], he = me.slice(0, me.lastIndexOf("/") + 1));
13436
+ /(^|\/)main\.xml$/i.test(me) && (re = le[me], he = me.slice(0, me.lastIndexOf("/") + 1));
13447
13437
  }
13448
- if (!ne)
13438
+ if (!re)
13449
13439
  throw new Error("X3p: main.xml not found.");
13450
13440
  if (typeof DOMParser == "undefined")
13451
13441
  throw new Error("X3p: DOMParser not found.");
13452
- 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 = {
13442
+ 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 = {
13453
13443
  x: {
13454
13444
  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",
13455
13445
  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",
@@ -13469,7 +13459,7 @@ function parse$1(n, t) {
13469
13459
  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")
13470
13460
  }
13471
13461
  }, Te = null, Le = Ve.querySelector("Record1 Axes Rotation");
13472
- 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)));
13462
+ 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)));
13473
13463
  var Ie = (ae = Ve.querySelector("Record3 DataLink PointDataLink")) === null || ae === void 0 ? void 0 : ae.textContent;
13474
13464
  if (typeof Ie != "string")
13475
13465
  throw new Error("X3p: PointDataLink not found.");
@@ -14105,8 +14095,8 @@ var BVHVector3 = (
14105
14095
  function F(N) {
14106
14096
  var D = N.startIndex, U = N.endIndex, z = N.extents;
14107
14097
  B[0] = z[3] - z[0], B[1] = z[4] - z[1], B[2] = z[5] - z[2], L.sort(O);
14108
- for (var G = 0; G < 3; G++) {
14109
- for (var j = L[G], Q = z[j] + z[j + 3], V = D, J = U - 1, W = -1, X = void 0; V <= J; )
14098
+ for (var K = 0; K < 3; K++) {
14099
+ for (var j = L[K], Q = z[j] + z[j + 3], V = D, J = U - 1, W = -1, X = void 0; V <= J; )
14110
14100
  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--);
14111
14101
  if (V > D && V < U) {
14112
14102
  var Z = new BVHNode(++d, calcExtents(u, l, D, V, EPSILON$1), D, V, N.deepth + 1);
@@ -14149,19 +14139,19 @@ var BVHVector3 = (
14149
14139
  this.getPositionByIndex(O, F);
14150
14140
  var N = F.x, D = F.y, U = F.z, z = new BVHVector3(0, 0, 0);
14151
14141
  this.getPositionByIndex(O + 1, z);
14152
- var G = z.x, j = z.y, Q = z.z, V = new BVHVector3(0, 0, 0);
14142
+ var K = z.x, j = z.y, Q = z.z, V = new BVHVector3(0, 0, 0);
14153
14143
  this.getPositionByIndex(O + 2, V);
14154
- 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;
14144
+ 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;
14155
14145
  if (de > 0)
14156
14146
  ge = 1;
14157
14147
  else if (de < 0)
14158
14148
  ge = -1, de = -de;
14159
14149
  else
14160
14150
  continue;
14161
- 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));
14151
+ 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));
14162
14152
  if (!(he < 0)) {
14163
- var ne = ge * (w * (Y * le - K * xe) + C * (K * ye - Z * le) + I * (Z * xe - Y * ye));
14164
- if (!(ne < 0) && !(he + ne > de)) {
14153
+ var re = ge * (w * (Y * le - G * xe) + C * (G * ye - Z * le) + I * (Z * xe - Y * ye));
14154
+ if (!(re < 0) && !(he + re > de)) {
14165
14155
  var se = -ge * (ye * ie + xe * ce + le * ae);
14166
14156
  if (!(se < 0)) {
14167
14157
  var pe = se / de, me = new BVHVector3(T + w * pe, S + C * pe, R + I * pe), Ne = new BVHIntersect(F, z, V, L, me);
@@ -14227,8 +14217,8 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14227
14217
  function I(H) {
14228
14218
  var M = H.startIndex, B = H.endIndex, L = H.extents;
14229
14219
  R[0] = L[3] - L[0], R[1] = L[4] - L[1], R[2] = L[5] - L[2];
14230
- 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; )
14231
- 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--);
14220
+ 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; )
14221
+ 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--);
14232
14222
  if (D > M) {
14233
14223
  var j = L.slice();
14234
14224
  j[O + 3] = N + EPSILON;
@@ -14258,7 +14248,7 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14258
14248
  this.getPositionByIndex(C, I);
14259
14249
  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);
14260
14250
  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) {
14261
- var G = new BVHVector3(L, O, F), j = new BVHIntersect(I, I, I, C, G);
14251
+ var K = new BVHVector3(L, O, F), j = new BVHIntersect(I, I, I, C, K);
14262
14252
  (!u || u(j)) && (s ? z < E && (E = z, l.length > 0 && (l.length = 0), l.push(j)) : l.push(j));
14263
14253
  }
14264
14254
  }
@@ -15217,26 +15207,6 @@ var TileRequestScheduler = (
15217
15207
  }, n;
15218
15208
  })()
15219
15209
  );
15220
- function normalizeURL(n) {
15221
- var t, e = /^(http\:|https\:|file\:)?\/\/[^/]/.exec(n);
15222
- if (!e)
15223
- return n;
15224
- var r = e[1] || "", o = n.slice(r.length + 2), s = o.indexOf("#");
15225
- s >= 0 && (n.slice(s), o = n.slice(0, s));
15226
- var u = o.indexOf("?");
15227
- u >= 0 && (n.slice(u), o = n.slice(0, u));
15228
- 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++) {
15229
- var m = p[h];
15230
- if (!(m === "" || m === ".")) {
15231
- if (m === "..") {
15232
- d.pop();
15233
- continue;
15234
- }
15235
- d.push(m);
15236
- }
15237
- }
15238
- return r + "//" + c + "/" + d.join("/") + "/" + f;
15239
- }
15240
15210
  function normalizeTileHeader(n, t) {
15241
15211
  var e;
15242
15212
  if (n.content) {
@@ -16433,16 +16403,16 @@ var Tile3D = (
16433
16403
  maxScreenSpaceError: g.maxScreenSpaceError,
16434
16404
  memoryAdjustedOverflow: g.memoryAdjustedOverflow,
16435
16405
  memoryAdjustedScreenSpaceError: g.memoryAdjustedScreenSpaceError
16436
- }, R = g.cacheCameras.map(function(ne) {
16437
- return ne.updateProjectionMatrix(), __assign(__assign({}, S), { camera: {
16406
+ }, R = g.cacheCameras.map(function(re) {
16407
+ return re.updateProjectionMatrix(), __assign(__assign({}, S), { camera: {
16438
16408
  type: r.type,
16439
- position: new THREE.Vector3().copy(ne.position),
16440
- direction: ne.getWorldDirection(new THREE.Vector3()),
16441
- up: new THREE.Vector3().copy(ne.up),
16442
- projectionMatrix: ne.projectionMatrix.clone(),
16443
- visible: ne.visible,
16409
+ position: new THREE.Vector3().copy(re.position),
16410
+ direction: re.getWorldDirection(new THREE.Vector3()),
16411
+ up: new THREE.Vector3().copy(re.up),
16412
+ projectionMatrix: re.projectionMatrix.clone(),
16413
+ visible: re.visible,
16444
16414
  refine: !0
16445
- }, cullingVolume: new CullingVolume().setFromCamera(ne) });
16415
+ }, cullingVolume: new CullingVolume().setFromCamera(re) });
16446
16416
  });
16447
16417
  this.updateWorldMatrix(!0, !1), this.tileset.transform.equals(this.matrixWorld) || (this.tileset.transform.copy(this.matrixWorld), A = !0);
16448
16418
  var w = !this.autoRefine;
@@ -16455,9 +16425,9 @@ var Tile3D = (
16455
16425
  g.pano1 && H.setFromMatrixPosition(g.pano1.matrix), I.distanceTo(H) < 10 && (w = !0);
16456
16426
  }
16457
16427
  }
16458
- if (w || this.tileset.update(S, R), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(ne) {
16459
- if (c.refineProgress[1]++, ne.content) {
16460
- var se = ne.content.loadState;
16428
+ if (w || this.tileset.update(S, R), this.refined = !0, this.refineProgress[0] = 0, this.refineProgress[1] = 0, this.tileset.needsRefinedTiles.forEach(function(re) {
16429
+ if (c.refineProgress[1]++, re.content) {
16430
+ var se = re.content.loadState;
16461
16431
  if (se === "UNLOADED" || se === "LOADING") {
16462
16432
  c.refined = !1;
16463
16433
  return;
@@ -16467,22 +16437,22 @@ var Tile3D = (
16467
16437
  }), this.loaded === !1 && this.autoRefine) {
16468
16438
  this.loaded = !0;
16469
16439
  var M = !1;
16470
- this.tileset.needsRefinedTiles.forEach(function(ne) {
16471
- if (c.loaded !== !1 && ne.content) {
16472
- if (ne.state.visible && (M = !0), S.skipLevelOfDetail) {
16473
- if (ne.state.finalResolution) {
16474
- var se = ne.state.ancestorWithContentAvailable, pe = se && se.content ? se.content : ne.content, me = pe.loadState;
16440
+ this.tileset.needsRefinedTiles.forEach(function(re) {
16441
+ if (c.loaded !== !1 && re.content) {
16442
+ if (re.state.visible && (M = !0), S.skipLevelOfDetail) {
16443
+ if (re.state.finalResolution) {
16444
+ var se = re.state.ancestorWithContentAvailable, pe = se && se.content ? se.content : re.content, me = pe.loadState;
16475
16445
  (me === "UNLOADED" || me === "LOADING") && (c.loaded = !1);
16476
16446
  }
16477
- } else if (ne.state.visible && ne.levelOfContent <= 0) {
16478
- var me = ne.content.loadState;
16447
+ } else if (re.state.visible && re.levelOfContent <= 0) {
16448
+ var me = re.content.loadState;
16479
16449
  (me === "UNLOADED" || me === "LOADING") && (c.loaded = !1);
16480
16450
  }
16481
16451
  }
16482
16452
  }), M && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
16483
16453
  }
16484
- 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) {
16485
- 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;
16454
+ 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) {
16455
+ 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;
16486
16456
  });
16487
16457
  for (var B = [], L = 0, O = this.tileset.selectedTiles; L < O.length; L++) {
16488
16458
  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;
@@ -16493,13 +16463,13 @@ var Tile3D = (
16493
16463
  var U = cloneSkipBackfaceObject(N);
16494
16464
  U.name = "skipBackface:" + N.name, this.backfaceObjects.push(U);
16495
16465
  }
16496
- 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++) {
16466
+ 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++) {
16497
16467
  var Z = X[W];
16498
- Z.stencilWrite = !0, Z.stencilRef = G, Z.stencilFunc = j, Z.stencilFuncMask = Q, Z.stencilZPass = V, Z.stencilWriteMask = J;
16468
+ Z.stencilWrite = !0, Z.stencilRef = K, Z.stencilFunc = j, Z.stencilFuncMask = Q, Z.stencilZPass = V, Z.stencilWriteMask = J;
16499
16469
  }
16500
16470
  } else
16501
- for (var Y = 0, K = N.materials; Y < K.length; Y++) {
16502
- var Z = K[Y];
16471
+ for (var Y = 0, G = N.materials; Y < G.length; Y++) {
16472
+ var Z = G[Y];
16503
16473
  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;
16504
16474
  }
16505
16475
  this.tileObjects.push(N);
@@ -16507,8 +16477,8 @@ var Tile3D = (
16507
16477
  }
16508
16478
  var ee = B.toString();
16509
16479
  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);
16510
- for (var te = [], re = 0, ie = this.tileset.selectedTrajectories; re < ie.length; re++) {
16511
- var ce = ie[re], ae = (h = ce.content.data) === null || h === void 0 ? void 0 : h.object;
16480
+ for (var te = [], ne = 0, ie = this.tileset.selectedTrajectories; ne < ie.length; ne++) {
16481
+ var ce = ie[ne], ae = (h = ce.content.data) === null || h === void 0 ? void 0 : h.object;
16512
16482
  if (ae) {
16513
16483
  var D = ae.update(e, r, o, this, ce, g);
16514
16484
  te.push(ce.id), D && (A = !0), this.renderObjects.push(ae);
@@ -16516,8 +16486,8 @@ var Tile3D = (
16516
16486
  }
16517
16487
  var de = te.toString();
16518
16488
  trajectoryVersionMap.get(this) !== de && (trajectoryVersionMap.set(this, de), A = !0);
16519
- 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) {
16520
- var se = le.renderObjects[ne], pe = ne + ye;
16489
+ 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) {
16490
+ var se = le.renderObjects[re], pe = re + ye;
16521
16491
  se.traverse(function(me) {
16522
16492
  (me instanceof THREE.Mesh || me instanceof THREE.Line || me instanceof THREE.Points) && (me.renderOrder = pe);
16523
16493
  }), le.add(se);
@@ -16966,191 +16936,169 @@ function loadViewLayers(n, t) {
16966
16936
  });
16967
16937
  });
16968
16938
  }
16969
- var BufferGeometryUtils = {
16970
- computeTangents: function(n) {
16971
- var t = n.index, e = n.attributes;
16972
- if (t === null || e.position === void 0 || e.normal === void 0 || e.uv === void 0) {
16973
- console.warn("THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");
16974
- return;
16975
- }
16976
- var r = t.array, o = e.position.array, s = e.normal.array, u = e.uv.array, l = o.length / 3;
16977
- e.tangent === void 0 && n.setAttribute("tangent", new THREE.BufferAttribute(new Float32Array(4 * l), 4));
16978
- for (var c = e.tangent.array, f = [], d = [], h = 0; h < l; h++)
16979
- f[h] = new THREE.Vector3(), d[h] = new THREE.Vector3();
16980
- 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();
16981
- function T(G, j, Q) {
16982
- 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);
16983
- 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);
16984
- 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);
16985
- }
16986
- var S = n.groups;
16987
- S.length === 0 && (S = [{
16988
- start: 0,
16989
- count: r.length
16990
- }]);
16991
- for (var h = 0, R = S.length; h < R; ++h)
16992
- for (var w = S[h], C = w.start, I = w.count, H = C, M = C + I; H < M; H += 3)
16993
- T(r[H + 0], r[H + 1], r[H + 2]);
16994
- var B = new THREE.Vector3(), L = new THREE.Vector3(), O = new THREE.Vector3(), F = new THREE.Vector3(), N, D, U;
16995
- function z(G) {
16996
- 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;
16997
- }
16998
- for (var h = 0, R = S.length; h < R; ++h)
16999
- for (var w = S[h], C = w.start, I = w.count, H = C, M = C + I; H < M; H += 3)
17000
- z(r[H + 0]), z(r[H + 1]), z(r[H + 2]);
17001
- },
17002
- /**
17003
- * @param {Array<THREE.BufferGeometry>} geometries
17004
- * @param {Boolean} useGroups
17005
- * @return {THREE.BufferGeometry}
17006
- */
17007
- mergeBufferGeometries: function(n, t) {
17008
- 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) {
17009
- var d = n[f];
17010
- if (e !== (d.index !== null))
16939
+ function createSimpleBoxBufferGeometry(n, t, e) {
16940
+ n === void 0 && (n = 1), t === void 0 && (t = 1), e === void 0 && (e = 1);
16941
+ var r = n / 2, o = t / 2, s = e / 2, u = new Float32Array([
16942
+ -r,
16943
+ +o,
16944
+ +s,
16945
+ +r,
16946
+ +o,
16947
+ +s,
16948
+ +r,
16949
+ +o,
16950
+ -s,
16951
+ -r,
16952
+ +o,
16953
+ -s,
16954
+ -r,
16955
+ -o,
16956
+ +s,
16957
+ +r,
16958
+ -o,
16959
+ +s,
16960
+ +r,
16961
+ -o,
16962
+ -s,
16963
+ -r,
16964
+ -o,
16965
+ -s
16966
+ ]), l = new Uint32Array([
16967
+ 0,
16968
+ 4,
16969
+ 1,
16970
+ 1,
16971
+ 4,
16972
+ 5,
16973
+ 1,
16974
+ 5,
16975
+ 2,
16976
+ 2,
16977
+ 5,
16978
+ 6,
16979
+ 2,
16980
+ 6,
16981
+ 3,
16982
+ 3,
16983
+ 6,
16984
+ 7,
16985
+ 3,
16986
+ 7,
16987
+ 0,
16988
+ 0,
16989
+ 7,
16990
+ 4,
16991
+ 3,
16992
+ 0,
16993
+ 2,
16994
+ 2,
16995
+ 0,
16996
+ 1,
16997
+ 4,
16998
+ 7,
16999
+ 5,
17000
+ 5,
17001
+ 7,
17002
+ 6
17003
+ ]), c = new THREE.BufferGeometry();
17004
+ 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;
17005
+ }
17006
+ function mergeBufferGeometries(n, t) {
17007
+ 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) {
17008
+ var f = n[c];
17009
+ if (e !== (f.index !== null))
17010
+ return null;
17011
+ for (var d in f.attributes) {
17012
+ if (!r.has(d))
17011
17013
  return null;
17012
- for (var h in d.attributes) {
17013
- if (!r.has(h))
17014
- return null;
17015
- s[h] === void 0 && (s[h] = []), s[h].push(d.attributes[h]);
17016
- }
17017
- for (var h in d.morphAttributes) {
17018
- if (!o.has(h))
17019
- return null;
17020
- u[h] === void 0 && (u[h] = []), u[h].push(d.morphAttributes[h]);
17021
- }
17022
- if (l.userData.mergedUserData = l.userData.mergedUserData || [], l.userData.mergedUserData.push(d.userData), t) {
17023
- var p;
17024
- if (e)
17025
- p = d.index.count;
17026
- else if (d.attributes.position !== void 0)
17027
- p = d.attributes.position.count;
17028
- else
17029
- return null;
17030
- l.addGroup(c, p, f), c += p;
17031
- }
17032
- }
17033
- if (e) {
17034
- for (var m = 0, A = [], f = 0; f < n.length; ++f) {
17035
- for (var g = n[f].index, y = 0; y < g.count; ++y)
17036
- A.push(g.getX(y) + m);
17037
- m += n[f].attributes.position.count;
17038
- }
17039
- l.setIndex(A);
17014
+ s[d] === void 0 && (s[d] = []), s[d].push(f.attributes[d]);
17040
17015
  }
17041
- for (var h in s) {
17042
- var v = this.mergeBufferAttributes(s[h]);
17043
- if (!v)
17016
+ for (var d in f.morphAttributes) {
17017
+ if (!o.has(d))
17044
17018
  return null;
17045
- l.setAttribute(h, v);
17019
+ u[d] === void 0 && (u[d] = []), u[d].push(f.morphAttributes[d]);
17046
17020
  }
17047
- for (var h in u) {
17048
- var E = u[h][0].length;
17049
- if (E === 0)
17050
- break;
17051
- l.morphAttributes = l.morphAttributes || {}, l.morphAttributes[h] = [];
17052
- for (var f = 0; f < E; ++f) {
17053
- for (var b = [], y = 0; y < u[h].length; ++y)
17054
- b.push(u[h][y][f]);
17055
- var T = this.mergeBufferAttributes(b);
17056
- if (!T)
17057
- return null;
17058
- l.morphAttributes[h].push(T);
17059
- }
17021
+ l.userData.mergedUserData = l.userData.mergedUserData || [], l.userData.mergedUserData.push(f.userData);
17022
+ }
17023
+ if (e) {
17024
+ for (var h = 0, p = [], c = 0; c < n.length; ++c) {
17025
+ for (var m = n[c].index, A = 0; A < m.count; ++A)
17026
+ p.push(m.getX(A) + h);
17027
+ h += n[c].attributes.position.count;
17060
17028
  }
17061
- return l;
17062
- },
17063
- /**
17064
- * @param {Array<THREE.BufferAttribute>} attributes
17065
- * @return {THREE.BufferAttribute}
17066
- */
17067
- mergeBufferAttributes: function(n) {
17068
- for (var t, e, r, o = 0, s = 0; s < n.length; ++s) {
17069
- var u = n[s];
17070
- 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))
17029
+ l.setIndex(p);
17030
+ }
17031
+ for (var d in s) {
17032
+ var g = mergeBufferAttributes(s[d]);
17033
+ if (!g)
17034
+ return null;
17035
+ l.setAttribute(d, g);
17036
+ }
17037
+ for (var d in u) {
17038
+ var y = u[d][0].length;
17039
+ if (y === 0)
17040
+ break;
17041
+ l.morphAttributes = l.morphAttributes || {}, l.morphAttributes[d] = [];
17042
+ for (var c = 0; c < y; ++c) {
17043
+ for (var v = [], A = 0; A < u[d].length; ++A)
17044
+ v.push(u[d][A][c]);
17045
+ var E = mergeBufferAttributes(v);
17046
+ if (!E)
17071
17047
  return null;
17072
- o += u.array.length;
17073
- }
17074
- for (var l = new t(o), c = 0, s = 0; s < n.length; ++s)
17075
- l.set(n[s].array, c), c += n[s].array.length;
17076
- return new THREE.BufferAttribute(l, e, r);
17077
- },
17078
- /**
17079
- * @param {Array<THREE.BufferAttribute>} attributes
17080
- * @return {Array<THREE.InterleavedBufferAttribute>}
17081
- */
17082
- interleaveAttributes: function(n) {
17083
- for (var t, e = 0, r = 0, o = 0, s = n.length; o < s; ++o) {
17084
- var u = n[o];
17085
- if (t === void 0 && (t = u.array.constructor), t !== u.array.constructor)
17086
- return console.warn("AttributeBuffers of different types cannot be interleaved"), null;
17087
- e += u.array.length, r += u.itemSize;
17088
- }
17089
- 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++) {
17090
- var u = n[p], m = u.itemSize, A = u.count, g = new THREE.InterleavedBufferAttribute(l, m, c, u.normalized);
17091
- f.push(g), c += m;
17092
- for (var y = 0; y < A; y++)
17093
- for (var v = 0; v < m; v++)
17094
- g[h[v]](y, u[d[v]](y));
17095
- }
17096
- return f;
17097
- },
17098
- /**
17099
- * @param {THREE.BufferGeometry} geometry
17100
- * @return {number}
17101
- */
17102
- estimateBytesUsed: function(n) {
17103
- var t = 0;
17104
- for (var e in n.attributes) {
17105
- var r = n.getAttribute(e);
17106
- t += r.count * r.itemSize * r.array.BYTES_PER_ELEMENT;
17107
- }
17108
- var o = n.getIndex();
17109
- return t += o ? o.count * o.itemSize * o.array.BYTES_PER_ELEMENT : 0, t;
17110
- },
17111
- /**
17112
- * @param {THREE.BufferGeometry} geometry
17113
- * @param {number} tolerance
17114
- * @return {THREE.BufferGeometry>}
17115
- */
17116
- mergeVertices: function(n, t) {
17117
- t === void 0 && (t = 1e-4), t = Math.max(t, Number.EPSILON);
17118
- 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++) {
17119
- var A = l[p];
17120
- c[A] = [];
17121
- var g = n.morphAttributes[A];
17122
- g && (f[A] = new Array(g.length).fill().map(function() {
17123
- return [];
17124
- }));
17125
- }
17126
- for (var y = Math.log10(1 / t), v = Math.pow(10, y), p = 0; p < s; p++) {
17127
- for (var E = r ? r.getX(p) : p, b = "", T = 0, m = l.length; T < m; T++)
17128
- for (var A = l[T], S = n.getAttribute(A), R = S.itemSize, w = 0; w < R; w++)
17129
- b += "".concat(~~(S[h[w]](E) * v), ",");
17130
- if (b in e)
17131
- d.push(e[b]);
17132
- else {
17133
- for (var T = 0, m = l.length; T < m; T++)
17134
- 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++) {
17135
- var H = h[w];
17136
- if (C.push(S[H](E)), g)
17137
- for (var M = 0, B = g.length; M < B; M++)
17138
- I[M].push(g[M][H](E));
17139
- }
17140
- e[b] = u, d.push(u), u++;
17141
- }
17048
+ l.morphAttributes[d].push(E);
17142
17049
  }
17143
- for (var L = n.clone(), p = 0, m = l.length; p < m; p++) {
17144
- var A = l[p], O = n.getAttribute(A), F = new O.array.constructor(c[A]), S = new THREE.BufferAttribute(F, O.itemSize, O.normalized);
17145
- if (L.setAttribute(A, S), A in f)
17146
- for (var T = 0; T < f[A].length; T++) {
17147
- var N = n.morphAttributes[A][T], F = new N.array.constructor(f[A][T]), D = new THREE.BufferAttribute(F, N.itemSize, N.normalized);
17148
- L.morphAttributes[A][T] = D;
17050
+ }
17051
+ return l;
17052
+ }
17053
+ function mergeBufferAttributes(n) {
17054
+ for (var t, e, r, o = 0, s = 0; s < n.length; ++s) {
17055
+ var u = n[s];
17056
+ 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))
17057
+ return null;
17058
+ o += u.array.length;
17059
+ }
17060
+ for (var l = new t(o), c = 0, s = 0; s < n.length; ++s)
17061
+ l.set(n[s].array, c), c += n[s].array.length;
17062
+ return new THREE.BufferAttribute(l, e, r);
17063
+ }
17064
+ function mergeVertices(n, t) {
17065
+ t === void 0 && (t = 1e-4), t = Math.max(t, Number.EPSILON);
17066
+ 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++) {
17067
+ var A = l[p];
17068
+ c[A] = [];
17069
+ var g = n.morphAttributes[A];
17070
+ g && (f[A] = new Array(g.length).fill().map(function() {
17071
+ return [];
17072
+ }));
17073
+ }
17074
+ for (var y = Math.log10(1 / t), v = Math.pow(10, y), p = 0; p < s; p++) {
17075
+ for (var E = r ? r.getX(p) : p, b = "", T = 0, m = l.length; T < m; T++)
17076
+ for (var A = l[T], S = n.getAttribute(A), R = S.itemSize, w = 0; w < R; w++)
17077
+ b += "".concat(~~(S[h[w]](E) * v), ",");
17078
+ if (b in e)
17079
+ d.push(e[b]);
17080
+ else {
17081
+ for (var T = 0, m = l.length; T < m; T++)
17082
+ for (var A = l[T], S = n.getAttribute(A), g = n.morphAttributes[A], R = S.itemSize, C = c[A], I = f[A], w = 0; w < R; w++) {
17083
+ var H = h[w];
17084
+ if (C.push(S[H](E)), g)
17085
+ for (var M = 0, B = g.length; M < B; M++)
17086
+ I[M].push(g[M][H](E));
17149
17087
  }
17088
+ e[b] = u, d.push(u), u++;
17150
17089
  }
17151
- return L.setIndex(d), L;
17152
17090
  }
17153
- }, scratchSphere$1 = new THREE.Sphere(), scratchMatrix4$1 = new THREE.Matrix4(), scratchMatrix4Inverse = new THREE.Matrix4();
17091
+ for (var L = n.clone(), p = 0, m = l.length; p < m; p++) {
17092
+ var A = l[p], O = n.getAttribute(A), F = new O.array.constructor(c[A]), S = new THREE.BufferAttribute(F, O.itemSize, O.normalized);
17093
+ if (L.setAttribute(A, S), A in f)
17094
+ for (var T = 0; T < f[A].length; T++) {
17095
+ var N = n.morphAttributes[A][T], F = new N.array.constructor(f[A][T]), D = new THREE.BufferAttribute(F, N.itemSize, N.normalized);
17096
+ L.morphAttributes[A][T] = D;
17097
+ }
17098
+ }
17099
+ return L.setIndex(d), L;
17100
+ }
17101
+ var scratchSphere$1 = new THREE.Sphere(), scratchMatrix4$1 = new THREE.Matrix4(), scratchMatrix4Inverse = new THREE.Matrix4();
17154
17102
  function getEdgesBySphere(n, t, e) {
17155
17103
  e === void 0 && (e = 30 / 180 * Math.PI);
17156
17104
  for (var r = Math.cos(e), o = [], s = 0, u = n.children; s < u.length; s++) {
@@ -17165,12 +17113,12 @@ function getEdgesBySphere(n, t, e) {
17165
17113
  if (Q) {
17166
17114
  scratchMatrix4$1.copy(j.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17167
17115
  var V = Q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), J = new THREE.BufferGeometry();
17168
- J.setAttribute("position", new THREE.BufferAttribute(V, 3)), J.applyMatrix4(j.matrixWorld), J = BufferGeometryUtils.mergeVertices(J, 0.01), m.push(J);
17116
+ J.setAttribute("position", new THREE.BufferAttribute(V, 3)), J.applyMatrix4(j.matrixWorld), J = mergeVertices(J, 0.01), m.push(J);
17169
17117
  }
17170
17118
  }
17171
17119
  }), m.length === 0)
17172
17120
  return;
17173
- 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) {
17121
+ 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) {
17174
17122
  var R = new THREE.Vector3(y[T], y[T + 1], y[T + 2]);
17175
17123
  E.push(R);
17176
17124
  }
@@ -17186,8 +17134,8 @@ function getEdgesBySphere(n, t, e) {
17186
17134
  for (var D in M) {
17187
17135
  var U = M[D];
17188
17136
  if (U.face2 === void 0 || b[U.face1].normal.dot(b[U.face2].normal) <= r) {
17189
- var z = E[U.index1], G = E[U.index2];
17190
- o.push(new THREE.Line3(z, G));
17137
+ var z = E[U.index1], K = E[U.index2];
17138
+ o.push(new THREE.Line3(z, K));
17191
17139
  }
17192
17140
  }
17193
17141
  E.length = 0, b.length = 0;
@@ -17994,8 +17942,8 @@ function parse(n, t) {
17994
17942
  var V, J, W, X = [];
17995
17943
  if (Array.isArray(H.model.layers))
17996
17944
  for (var Z = 0, Y = H.model.layers; Z < Y.length; Z++) {
17997
- var K = Y[Z];
17998
- if (K && K.tileset_url) {
17945
+ var G = Y[Z];
17946
+ if (G && G.tileset_url) {
17999
17947
  var ee = {};
18000
17948
  defineProperty(ee, "work", {
18001
17949
  enumerable: !1,
@@ -18006,28 +17954,28 @@ function parse(n, t) {
18006
17954
  enumerable: !0,
18007
17955
  configurable: !1,
18008
17956
  writable: !1,
18009
- value: (V = K.name) !== null && V !== void 0 ? V : ""
17957
+ value: (V = G.name) !== null && V !== void 0 ? V : ""
18010
17958
  }), defineProperty(ee, "type", {
18011
17959
  enumerable: !0,
18012
17960
  configurable: !1,
18013
17961
  writable: !1,
18014
- value: (J = K.type) !== null && J !== void 0 ? J : "mesh"
17962
+ value: (J = G.type) !== null && J !== void 0 ? J : "mesh"
18015
17963
  }), defineProperty(ee, "upAxis", {
18016
17964
  enumerable: !0,
18017
17965
  configurable: !1,
18018
17966
  writable: !1,
18019
- value: (W = K.up_axis) !== null && W !== void 0 ? W : "Z"
17967
+ value: (W = G.up_axis) !== null && W !== void 0 ? W : "Z"
18020
17968
  }), defineProperty(ee, "tileset", {
18021
17969
  enumerable: !0,
18022
17970
  configurable: !1,
18023
17971
  writable: !1,
18024
- value: relativeURL(K.tileset_url, t.baseURL)
17972
+ value: relativeURL(G.tileset_url, t.baseURL)
18025
17973
  }), X.push(ee);
18026
17974
  }
18027
17975
  }
18028
17976
  if (typeof H.model.tiles == "object") {
18029
- var K = H.model.tiles;
18030
- if (K && K.tileset_url) {
17977
+ var G = H.model.tiles;
17978
+ if (G && G.tileset_url) {
18031
17979
  var ee = {};
18032
17980
  defineProperty(ee, "work", {
18033
17981
  enumerable: !1,
@@ -18053,7 +18001,7 @@ function parse(n, t) {
18053
18001
  enumerable: !0,
18054
18002
  configurable: !1,
18055
18003
  writable: !1,
18056
- value: relativeURL(K.tileset_url, t.baseURL)
18004
+ value: relativeURL(G.tileset_url, t.baseURL)
18057
18005
  }), X.push(ee);
18058
18006
  }
18059
18007
  }
@@ -18144,26 +18092,26 @@ function parse(n, t) {
18144
18092
  configurable: !1,
18145
18093
  writable: !1,
18146
18094
  value: (function() {
18147
- var Z, Y, K = ((Y = (Z = J.accessible_nodes) !== null && Z !== void 0 ? Z : J.accessibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
18095
+ var Z, Y, G = ((Y = (Z = J.accessible_nodes) !== null && Z !== void 0 ? Z : J.accessibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
18148
18096
  return te < N;
18149
18097
  });
18150
- if (K.length === 0)
18098
+ if (G.length === 0)
18151
18099
  for (var ee = 0; ee < N; ee++)
18152
- ee !== V && K.push(ee);
18153
- return Object.freeze(K);
18100
+ ee !== V && G.push(ee);
18101
+ return Object.freeze(G);
18154
18102
  })()
18155
18103
  }), defineProperty(X, "visibleNodes", {
18156
18104
  enumerable: !0,
18157
18105
  configurable: !1,
18158
18106
  writable: !1,
18159
18107
  value: (function() {
18160
- var Z, Y, K = ((Y = (Z = J.visible_nodes) !== null && Z !== void 0 ? Z : J.visibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
18108
+ var Z, Y, G = ((Y = (Z = J.visible_nodes) !== null && Z !== void 0 ? Z : J.visibleNodes) !== null && Y !== void 0 ? Y : []).filter(function(te) {
18161
18109
  return te < N;
18162
18110
  });
18163
- if (K.length === 0)
18111
+ if (G.length === 0)
18164
18112
  for (var ee = 0; ee < N; ee++)
18165
- ee !== V && K.push(ee);
18166
- return Object.freeze(K);
18113
+ ee !== V && G.push(ee);
18114
+ return Object.freeze(G);
18167
18115
  })()
18168
18116
  }), defineProperty(X, "images", {
18169
18117
  enumerable: !0,
@@ -18177,8 +18125,8 @@ function parse(n, t) {
18177
18125
  writable: !1,
18178
18126
  value: t
18179
18127
  });
18180
- for (var Y = 0, K = FACE_ORDER$1; Y < K.length; Y++) {
18181
- var ee = K[Y];
18128
+ for (var Y = 0, G = FACE_ORDER$1; Y < G.length; Y++) {
18129
+ var ee = G[Y];
18182
18130
  defineProperty(Z, ee, {
18183
18131
  enumerable: !0,
18184
18132
  configurable: !1,
@@ -18194,20 +18142,20 @@ function parse(n, t) {
18194
18142
  var te = getImageSizeFromURL(Z[FACE_ORDER$1[0]]);
18195
18143
  if (te) {
18196
18144
  if (W.size_list) {
18197
- var re = W.size_list.slice().sort(function(ye, xe) {
18145
+ var ne = W.size_list.slice().sort(function(ye, xe) {
18198
18146
  return ye - xe;
18199
18147
  });
18200
- return Object.freeze(re);
18148
+ return Object.freeze(ne);
18201
18149
  } else if (W.tiles) {
18202
- for (var re = [
18150
+ for (var ne = [
18203
18151
  te
18204
18152
  ], ie = W.tiles.slice().sort(function(xe, le) {
18205
18153
  return xe - le;
18206
18154
  }), ce = 0, ae = ie; ce < ae.length; ce++) {
18207
18155
  var de = ae[ce], ge = 512 * Math.pow(2, de);
18208
- ge > te && re.push(ge);
18156
+ ge > te && ne.push(ge);
18209
18157
  }
18210
- return Object.freeze(re);
18158
+ return Object.freeze(ne);
18211
18159
  }
18212
18160
  }
18213
18161
  return Object.freeze([]);
@@ -18219,15 +18167,15 @@ function parse(n, t) {
18219
18167
  value: (function() {
18220
18168
  var te = getImageSizeFromURL(Z.front);
18221
18169
  if (te) {
18222
- var re = Z.sizeList.slice();
18223
- if (re[0]) {
18224
- var ie = getTileLevel(re[0]);
18170
+ var ne = Z.sizeList.slice();
18171
+ if (ne[0]) {
18172
+ var ie = getTileLevel(ne[0]);
18225
18173
  if (ie)
18226
18174
  for (var ce = ie - 1; ce >= 0; ce--)
18227
- re.unshift(512 * Math.pow(2, ce));
18175
+ ne.unshift(512 * Math.pow(2, ce));
18228
18176
  }
18229
- if (!(re.length <= 0)) {
18230
- for (var ae = [], de = 0, ge = re; de < ge.length; de++) {
18177
+ if (!(ne.length <= 0)) {
18178
+ for (var ae = [], de = 0, ge = ne; de < ge.length; de++) {
18231
18179
  var ye = ge[de], xe = getTileLevel(ye);
18232
18180
  if (typeof xe == "number") {
18233
18181
  var le = {};
@@ -18253,8 +18201,8 @@ function parse(n, t) {
18253
18201
  writable: !1,
18254
18202
  value: 1
18255
18203
  });
18256
- for (var he = 0, ne = FACE_ORDER$1; he < ne.length; he++) {
18257
- var se = ne[he];
18204
+ for (var he = 0, re = FACE_ORDER$1; he < re.length; he++) {
18205
+ var se = re[he];
18258
18206
  defineProperty(le, se, {
18259
18207
  enumerable: !0,
18260
18208
  configurable: !1,
@@ -18338,11 +18286,11 @@ function parse(n, t) {
18338
18286
  value: t
18339
18287
  }), H.initial) {
18340
18288
  if (t.observers.length > 0) {
18341
- var G = void 0;
18342
- 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", {
18289
+ var K = void 0;
18290
+ 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", {
18343
18291
  enumerable: !0,
18344
18292
  writable: !0,
18345
- value: G
18293
+ value: K
18346
18294
  }));
18347
18295
  }
18348
18296
  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", {
@@ -18713,7 +18661,7 @@ function parsePano(n, t) {
18713
18661
  })()
18714
18662
  }), t;
18715
18663
  }
18716
- var workVerifySet = /* @__PURE__ */ new WeakSet(), hrefAElement = typeof document != "undefined" ? document.createElement("a") : { href: "" }, Work = (
18664
+ var workVerifySet = /* @__PURE__ */ new WeakSet(), Work = (
18717
18665
  /** @class */
18718
18666
  (function() {
18719
18667
  function n(t, e) {
@@ -18756,7 +18704,7 @@ Error work input:
18756
18704
  }
18757
18705
  t = pathJoin(this.baseURL, t);
18758
18706
  }
18759
- return hrefAElement.href = t, t = hrefAElement.href, t;
18707
+ return t = getFullURL(t), t;
18760
18708
  }, n.prototype.verifyURL = function(t) {
18761
18709
  return typeof verifyURL(this.getURL(t), this.allowHosts) == "string";
18762
18710
  }, n.prototype.toJSON = function() {
@@ -19837,74 +19785,7 @@ function isSimilarVector3(n, t) {
19837
19785
  function notSimilarVector3(n, t) {
19838
19786
  return !isSimilarVector3(n, t);
19839
19787
  }
19840
- function createBoxGeometry(n, t, e) {
19841
- n === void 0 && (n = 1), t === void 0 && (t = 1), e === void 0 && (e = 1);
19842
- var r = n / 2, o = t / 2, s = e / 2, u = new Float32Array([
19843
- -r,
19844
- +o,
19845
- +s,
19846
- +r,
19847
- +o,
19848
- +s,
19849
- +r,
19850
- +o,
19851
- -s,
19852
- -r,
19853
- +o,
19854
- -s,
19855
- -r,
19856
- -o,
19857
- +s,
19858
- +r,
19859
- -o,
19860
- +s,
19861
- +r,
19862
- -o,
19863
- -s,
19864
- -r,
19865
- -o,
19866
- -s
19867
- ]), l = new Uint32Array([
19868
- 0,
19869
- 4,
19870
- 1,
19871
- 1,
19872
- 4,
19873
- 5,
19874
- 1,
19875
- 5,
19876
- 2,
19877
- 2,
19878
- 5,
19879
- 6,
19880
- 2,
19881
- 6,
19882
- 3,
19883
- 3,
19884
- 6,
19885
- 7,
19886
- 3,
19887
- 7,
19888
- 0,
19889
- 0,
19890
- 7,
19891
- 4,
19892
- 3,
19893
- 0,
19894
- 2,
19895
- 2,
19896
- 0,
19897
- 1,
19898
- 4,
19899
- 7,
19900
- 5,
19901
- 5,
19902
- 7,
19903
- 6
19904
- ]), c = new THREE.BufferGeometry();
19905
- 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;
19906
- }
19907
- var scratchGeometry = createBoxGeometry(1, 1, 1);
19788
+ var scratchGeometry = createSimpleBoxBufferGeometry(1, 1, 1);
19908
19789
  scratchGeometry.applyMatrix4(new THREE.Matrix4().makeScale(-1, 1, 1));
19909
19790
  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 = (
19910
19791
  /** @class */
@@ -19937,16 +19818,7 @@ var versionMap = /* @__PURE__ */ new WeakMap(), cameraBoxSize = new THREE.Vector
19937
19818
  }
19938
19819
  }, t;
19939
19820
  })(PBMMesh)
19940
- );
19941
- function cameraWorldToLocal(n, t) {
19942
- var e = new THREE.Vector3(0, 0, -1);
19943
- e.applyQuaternion(n.quaternion);
19944
- var r = t.quaternion.clone().inverse();
19945
- e.applyQuaternion(r);
19946
- var o = Math.atan2(e.x, -e.z), s = -Math.asin(e.y);
19947
- return { theta: o, phi: s, lookAtVector: e };
19948
- }
19949
- var PI = Math.PI, TAU = PI * 2;
19821
+ ), PI = Math.PI, TAU = PI * 2;
19950
19822
  function stepNumber(n, t, e) {
19951
19823
  if (n === t)
19952
19824
  return t;
@@ -20200,7 +20072,7 @@ var Hammer = (function(n, t, e, r) {
20200
20072
  var _ = P.ownerDocument || P;
20201
20073
  return _.defaultView || _.parentWindow || n;
20202
20074
  }
20203
- 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"];
20075
+ 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"];
20204
20076
  function le(P, _) {
20205
20077
  var k = this;
20206
20078
  this.manager = P, this.callback = _, this.element = P.element, this.target = P.options.inputTarget, this.domHandler = function(q) {
@@ -20229,10 +20101,10 @@ var Hammer = (function(n, t, e, r) {
20229
20101
  };
20230
20102
  function he(P) {
20231
20103
  var _, k = P.options.inputClass;
20232
- return k ? _ = k : z ? _ = Be : G ? _ = Ue : U ? _ = ht : _ = ke, new _(P, ne);
20104
+ return k ? _ = k : z ? _ = Be : K ? _ = Ue : U ? _ = ht : _ = ke, new _(P, re);
20233
20105
  }
20234
- function ne(P, _, k) {
20235
- var q = k.pointers.length, $ = k.changedPointers.length, oe = _ & X && q - $ === 0, be = _ & (Y | K) && q - $ === 0;
20106
+ function re(P, _, k) {
20107
+ var q = k.pointers.length, $ = k.changedPointers.length, oe = _ & X && q - $ === 0, be = _ & (Y | G) && q - $ === 0;
20236
20108
  k.isFirst = !!oe, k.isFinal = !!be, oe && (P.session = {}), k.eventType = _, se(P, k), P.emit("hammer.input", k), P.recognize(k), P.session.prevInput = k;
20237
20109
  }
20238
20110
  function se(P, _) {
@@ -20257,7 +20129,7 @@ var Hammer = (function(n, t, e, r) {
20257
20129
  }
20258
20130
  function me(P, _) {
20259
20131
  var k = P.lastInterval || _, q = _.timeStamp - k.timeStamp, $, oe, be, De;
20260
- if (_.eventType != K && (q > W || k.velocity === r)) {
20132
+ if (_.eventType != G && (q > W || k.velocity === r)) {
20261
20133
  var Xe = _.deltaX - k.deltaX, Fe = _.deltaY - k.deltaY, lt = Ye(q, Xe, Fe);
20262
20134
  oe = lt.x, be = lt.y, $ = c(lt.x) > c(lt.y) ? lt.x : lt.y, De = Ve(Xe, Fe), P.lastInterval = _;
20263
20135
  } else
@@ -20299,7 +20171,7 @@ var Hammer = (function(n, t, e, r) {
20299
20171
  };
20300
20172
  }
20301
20173
  function Ve(P, _) {
20302
- return P === _ ? ee : c(P) >= c(_) ? P < 0 ? te : re : _ < 0 ? ie : ce;
20174
+ return P === _ ? ee : c(P) >= c(_) ? P < 0 ? te : ne : _ < 0 ? ie : ce;
20303
20175
  }
20304
20176
  function ve(P, _, k) {
20305
20177
  k || (k = ye);
@@ -20344,8 +20216,8 @@ var Hammer = (function(n, t, e, r) {
20344
20216
  pointerdown: X,
20345
20217
  pointermove: Z,
20346
20218
  pointerup: Y,
20347
- pointercancel: K,
20348
- pointerout: K
20219
+ pointercancel: G,
20220
+ pointerout: G
20349
20221
  }, _e = {
20350
20222
  2: j,
20351
20223
  3: Q,
@@ -20364,7 +20236,7 @@ var Hammer = (function(n, t, e, r) {
20364
20236
  */
20365
20237
  handler: function(_) {
20366
20238
  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");
20367
- 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, {
20239
+ 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, {
20368
20240
  pointers: k,
20369
20241
  changedPointers: [_],
20370
20242
  pointerType: De,
@@ -20376,7 +20248,7 @@ var Hammer = (function(n, t, e, r) {
20376
20248
  touchstart: X,
20377
20249
  touchmove: Z,
20378
20250
  touchend: Y,
20379
- touchcancel: K
20251
+ touchcancel: G
20380
20252
  }, Qe = "touchstart", We = "touchstart touchmove touchend touchcancel";
20381
20253
  function gt() {
20382
20254
  this.evTarget = Qe, this.evWin = We, this.started = !1, le.apply(this, arguments);
@@ -20386,7 +20258,7 @@ var Hammer = (function(n, t, e, r) {
20386
20258
  var k = je[_.type];
20387
20259
  if (k === X && (this.started = !0), !!this.started) {
20388
20260
  var q = Je.call(this, _, k);
20389
- k & (Y | K) && q[0].length - q[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
20261
+ k & (Y | G) && q[0].length - q[1].length === 0 && (this.started = !1), this.callback(this.manager, k, {
20390
20262
  pointers: q[0],
20391
20263
  changedPointers: q[1],
20392
20264
  pointerType: j,
@@ -20397,13 +20269,13 @@ var Hammer = (function(n, t, e, r) {
20397
20269
  });
20398
20270
  function Je(P, _) {
20399
20271
  var k = M(P.touches), q = M(P.changedTouches);
20400
- return _ & (Y | K) && (k = B(k.concat(q), "identifier")), [k, q];
20272
+ return _ & (Y | G) && (k = B(k.concat(q), "identifier")), [k, q];
20401
20273
  }
20402
20274
  var At = {
20403
20275
  touchstart: X,
20404
20276
  touchmove: Z,
20405
20277
  touchend: Y,
20406
- touchcancel: K
20278
+ touchcancel: G
20407
20279
  }, we = "touchstart touchmove touchend touchcancel";
20408
20280
  function Ue() {
20409
20281
  this.evTarget = we, this.targetIds = {}, le.apply(this, arguments);
@@ -20430,7 +20302,7 @@ var Hammer = (function(n, t, e, r) {
20430
20302
  for ($ = 0; $ < oe.length; )
20431
20303
  q[oe[$].identifier] = !0, $++;
20432
20304
  for ($ = 0; $ < be.length; )
20433
- q[be[$].identifier] && De.push(be[$]), _ & (Y | K) && delete q[be[$].identifier], $++;
20305
+ q[be[$].identifier] && De.push(be[$]), _ & (Y | G) && delete q[be[$].identifier], $++;
20434
20306
  if (De.length)
20435
20307
  return [
20436
20308
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
@@ -20469,7 +20341,7 @@ var Hammer = (function(n, t, e, r) {
20469
20341
  }
20470
20342
  });
20471
20343
  function pt(P, _) {
20472
- P & X ? (this.primaryTouch = _.changedPointers[0].identifier, ze.call(this, _)) : P & (Y | K) && ze.call(this, _);
20344
+ P & X ? (this.primaryTouch = _.changedPointers[0].identifier, ze.call(this, _)) : P & (Y | G) && ze.call(this, _);
20473
20345
  }
20474
20346
  function ze(P) {
20475
20347
  var _ = P.changedPointers[0];
@@ -20711,7 +20583,7 @@ var Hammer = (function(n, t, e, r) {
20711
20583
  return P & St ? "cancel" : P & xt ? "end" : P & Pt ? "move" : P & at ? "start" : "";
20712
20584
  }
20713
20585
  function Lt(P) {
20714
- return P == ce ? "down" : P == ie ? "up" : P == te ? "left" : P == re ? "right" : "";
20586
+ return P == ce ? "down" : P == ie ? "up" : P == te ? "left" : P == ne ? "right" : "";
20715
20587
  }
20716
20588
  function _t(P, _) {
20717
20589
  var k = _.manager;
@@ -20750,7 +20622,7 @@ var Hammer = (function(n, t, e, r) {
20750
20622
  */
20751
20623
  process: function(P) {
20752
20624
  var _ = this.state, k = P.eventType, q = _ & (at | Pt), $ = this.attrTest(P);
20753
- return q && (k & K || !$) ? _ | St : q || $ ? k & Y ? _ | xt : _ & at ? _ | Pt : at : Ge;
20625
+ return q && (k & G || !$) ? _ | St : q || $ ? k & Y ? _ | xt : _ & at ? _ | Pt : at : Ge;
20754
20626
  }
20755
20627
  });
20756
20628
  function Rt() {
@@ -20773,7 +20645,7 @@ var Hammer = (function(n, t, e, r) {
20773
20645
  },
20774
20646
  directionTest: function(P) {
20775
20647
  var _ = this.options, k = !0, q = P.distance, $ = P.direction, oe = P.deltaX, be = P.deltaY;
20776
- 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;
20648
+ return $ & _.direction || (_.direction & ae ? ($ = oe === 0 ? ee : oe < 0 ? te : ne, k = oe != this.pX, q = Math.abs(P.deltaX)) : ($ = be === 0 ? ee : be < 0 ? ie : ce, k = be != this.pY, q = Math.abs(P.deltaY))), P.direction = $, k && q > _.threshold && $ & _.direction;
20777
20649
  },
20778
20650
  attrTest: function(P) {
20779
20651
  return ot.prototype.attrTest.call(this, P) && (this.state & at || !(this.state & at) && this.directionTest(P));
@@ -20832,7 +20704,7 @@ var Hammer = (function(n, t, e, r) {
20832
20704
  },
20833
20705
  process: function(P) {
20834
20706
  var _ = this.options, k = P.pointers.length === _.pointers, q = P.distance < _.threshold, $ = P.deltaTime > _.time;
20835
- if (this._input = P, !q || !k || P.eventType & (Y | K) && !$)
20707
+ if (this._input = P, !q || !k || P.eventType & (Y | G) && !$)
20836
20708
  this.reset();
20837
20709
  else if (P.eventType & X)
20838
20710
  this.reset(), this._timer = d(function() {
@@ -21199,7 +21071,7 @@ var Hammer = (function(n, t, e, r) {
21199
21071
  INPUT_START: X,
21200
21072
  INPUT_MOVE: Z,
21201
21073
  INPUT_END: Y,
21202
- INPUT_CANCEL: K,
21074
+ INPUT_CANCEL: G,
21203
21075
  STATE_POSSIBLE: It,
21204
21076
  STATE_BEGAN: at,
21205
21077
  STATE_CHANGED: Pt,
@@ -21209,7 +21081,7 @@ var Hammer = (function(n, t, e, r) {
21209
21081
  STATE_FAILED: Ge,
21210
21082
  DIRECTION_NONE: ee,
21211
21083
  DIRECTION_LEFT: te,
21212
- DIRECTION_RIGHT: re,
21084
+ DIRECTION_RIGHT: ne,
21213
21085
  DIRECTION_UP: ie,
21214
21086
  DIRECTION_DOWN: ce,
21215
21087
  DIRECTION_HORIZONTAL: ae,
@@ -21241,12 +21113,7 @@ var Hammer = (function(n, t, e, r) {
21241
21113
  bindFn: E,
21242
21114
  prefixed: L
21243
21115
  }), Re;
21244
- })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {});
21245
- function calculateThreeMouse(n, t, e) {
21246
- var r = t.getBoundingClientRect(), o = r.top, s = r.left, u = r.width, l = r.height;
21247
- 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);
21248
- }
21249
- var BaseController = (
21116
+ })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), BaseController = (
21250
21117
  /** @class */
21251
21118
  (function(n) {
21252
21119
  __extends(t, n);
@@ -21392,13 +21259,14 @@ var BaseController = (
21392
21259
  }, t.prototype.onMouseMove = function(e) {
21393
21260
  this.stopMomentumMovement(), this.emit("gesture.mousemove", e);
21394
21261
  }, t.prototype.relativeClientPosition = function(e) {
21395
- return calculateThreeMouse(e, this.element, this.viewport);
21262
+ var r = this.element.getBoundingClientRect(), o = r.top, s = r.left, u = r.width, l = r.height;
21263
+ 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);
21396
21264
  }, t.prototype.createRaycasterFromCamera = function(e, r) {
21397
21265
  var o = new THREE.Raycaster();
21398
21266
  return o.params.Points = { threshold: 0.1 }, o.firstHitOnly = !0, o.near = r.near, o.far = r.far, o.setFromCamera(e, this.camera), o;
21399
21267
  }, t.prototype.bindEvents = function(e) {
21400
21268
  var r = this, o = function(M) {
21401
- var B = calculateThreeMouse(M, r.element, r.viewport);
21269
+ var B = r.relativeClientPosition(M);
21402
21270
  return !(Math.abs(B.x) > 1 || Math.abs(B.y) > 1);
21403
21271
  }, s = new Hammer.Manager(e), u = function(M) {
21404
21272
  var B = M.session;
@@ -21617,7 +21485,7 @@ var BaseController = (
21617
21485
  var N = (Math.abs(M.deltaY) > Math.abs(M.deltaX) ? M.deltaY : M.deltaX) / -60, D = r.mouseWheelState !== void 0, U = {
21618
21486
  x: M.clientX,
21619
21487
  y: M.clientY
21620
- }, 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", {
21488
+ }, 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", {
21621
21489
  target: M.target,
21622
21490
  pointerType: "mouse",
21623
21491
  srcEvent: M,
@@ -22825,7 +22693,7 @@ void main() {
22825
22693
  this.disposed = !0, this.material.map && this.material.map.dispose(), this.material.dispose();
22826
22694
  }, t;
22827
22695
  })(THREE.Mesh)
22828
- ), boundingGeometry = createBoxGeometry(20, 20, 20);
22696
+ ), boundingGeometry = createSimpleBoxBufferGeometry(20, 20, 20);
22829
22697
  boundingGeometry.applyMatrix4(new THREE.Matrix4().makeScale(-1, 1, 1));
22830
22698
  var BOUNDING_MATERIAL_VERTEX_SHADER = `
22831
22699
  varying vec4 vFinalPosition;
@@ -22930,49 +22798,49 @@ void main() {
22930
22798
  var S = scratchCameraProjectMatrix.copy(f);
22931
22799
  S.elements[0] *= p, S.elements[5] *= p, this.camera.projectionMatrix.equals(S) || (this.camera.projectionMatrix.copy(S), this.camera.projectionMatrixInverse.getInverse(this.camera.projectionMatrix), r = !0), scratchSceneQuaternionInverse.copy(this.scene.quaternion).inverse(), scratchSceneMatrixInverse.makeRotationFromQuaternion(scratchSceneQuaternionInverse), scratchFrustumMatrix.copy(this.camera.matrix), scratchFrustumMatrix.setPosition(0, 0, 0), scratchFrustumMatrix.premultiply(scratchSceneMatrixInverse), scratchFrustumMatrixInverse.getInverse(scratchFrustumMatrix), scratchFrustumProjectMatrix.multiplyMatrices(this.camera.projectionMatrix, scratchFrustumMatrixInverse), this.frustum.setFromProjectionMatrix(scratchFrustumProjectMatrix);
22932
22800
  var R = this.frustum.planes[5].normal, w = [];
22933
- A >= m && traverseTileCubeNode(this.tileTree, function(K) {
22934
- if (!(K.level < m)) {
22935
- if (K.level > A || !e.frustum.intersectsBox(K.box))
22801
+ A >= m && traverseTileCubeNode(this.tileTree, function(G) {
22802
+ if (!(G.level < m)) {
22803
+ if (G.level > A || !e.frustum.intersectsBox(G.box))
22936
22804
  return !1;
22937
- w.push(K);
22805
+ w.push(G);
22938
22806
  }
22939
22807
  });
22940
22808
  var C = /* @__PURE__ */ new WeakMap();
22941
- w.sort(function(K, ee) {
22942
- if (K.level !== ee.level)
22943
- return K.level - ee.level;
22944
- var te = C.get(K);
22945
- te === void 0 && (te = K.box.getCenter(scratchSortVector3).angleTo(R), C.set(K, te));
22946
- var re = C.get(ee);
22947
- return re === void 0 && (re = ee.box.getCenter(scratchSortVector3).angleTo(R), C.set(ee, re)), te - re;
22809
+ w.sort(function(G, ee) {
22810
+ if (G.level !== ee.level)
22811
+ return G.level - ee.level;
22812
+ var te = C.get(G);
22813
+ te === void 0 && (te = G.box.getCenter(scratchSortVector3).angleTo(R), C.set(G, te));
22814
+ var ne = C.get(ee);
22815
+ return ne === void 0 && (ne = ee.box.getCenter(scratchSortVector3).angleTo(R), C.set(ee, ne)), te - ne;
22948
22816
  });
22949
22817
  var I = /* @__PURE__ */ new WeakSet(), H = this.observer.images.tiles;
22950
22818
  if (H)
22951
- for (var M = function(K) {
22952
- var ee = H.find(function(ne) {
22953
- return ne.level === K.level;
22819
+ for (var M = function(G) {
22820
+ var ee = H.find(function(re) {
22821
+ return re.level === G.level;
22954
22822
  });
22955
22823
  if (!ee)
22956
22824
  return "continue";
22957
- I.add(K);
22958
- var te = B.tileMeshes.get(K);
22825
+ I.add(G);
22826
+ var te = B.tileMeshes.get(G);
22959
22827
  if (te) {
22960
22828
  te.appearDuration = B.appearDuration;
22961
- var re = te.updateTime(o);
22962
- return re && (r = !0), "continue";
22829
+ var ne = te.updateTime(o);
22830
+ return ne && (r = !0), "continue";
22963
22831
  }
22964
22832
  if (B.pedding >= B.maxRequest)
22965
22833
  return "continue";
22966
- var ie = Math.pow(2, K.level) * K.position.y, ce = Math.pow(2, K.level) * K.position.x, ae = panoStringify({
22834
+ var ie = Math.pow(2, G.level) * G.position.y, ce = Math.pow(2, G.level) * G.position.x, ae = panoStringify({
22967
22835
  panoIndex: B.observer.panoIndex,
22968
22836
  workCode: B.observer.work.workCode
22969
- }), 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 : [
22970
- ye * K.position.x,
22971
- ye * K.position.y,
22972
- ye * K.size,
22973
- ye * K.size
22837
+ }), 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 : [
22838
+ ye * G.position.x,
22839
+ ye * G.position.y,
22840
+ ye * G.size,
22841
+ ye * G.size
22974
22842
  ] });
22975
- 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++;
22843
+ 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++;
22976
22844
  var he = B.textureLoader.loadTexture(ge, {
22977
22845
  imageURL: {
22978
22846
  transform: xe,
@@ -22982,30 +22850,30 @@ void main() {
22982
22850
  magFilter: THREE.LinearFilter,
22983
22851
  generateMipmaps: !1,
22984
22852
  fetcher: getFetcher(B.observer.work)
22985
- }).then(function(ne) {
22986
- return ne.body;
22853
+ }).then(function(re) {
22854
+ return re.body;
22987
22855
  });
22988
- he.then(function(ne) {
22989
- return initTexture(ne, l);
22990
- }).then(function(ne) {
22991
- return e.pedding--, ne;
22992
- }, function(ne) {
22993
- return e.pedding--, Promise.reject(ne);
22994
- }), 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;
22856
+ he.then(function(re) {
22857
+ return initTexture(re, l);
22858
+ }).then(function(re) {
22859
+ return e.pedding--, re;
22860
+ }, function(re) {
22861
+ return e.pedding--, Promise.reject(re);
22862
+ }), 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;
22995
22863
  }, B = this, L = 0, O = w; L < O.length; L++) {
22996
22864
  var F = O[L];
22997
22865
  M(F);
22998
22866
  }
22999
22867
  var N = [], D = [];
23000
- this.tileMeshes.forEach(function(K, ee) {
23001
- I.has(ee) ? N.push(K) : D.push(K);
22868
+ this.tileMeshes.forEach(function(G, ee) {
22869
+ I.has(ee) ? N.push(G) : D.push(G);
23002
22870
  var te = ee.level >= m && ee.level <= A;
23003
- K.visible !== te && (K.visible = te, r = !0);
22871
+ G.visible !== te && (G.visible = te, r = !0);
23004
22872
  });
23005
- for (var U = D.sort(function(K, ee) {
23006
- return ee.activeTime - K.activeTime;
23007
- }).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0, G = U; z < G.length; z++) {
23008
- var j = G[z];
22873
+ for (var U = D.sort(function(G, ee) {
22874
+ return ee.activeTime - G.activeTime;
22875
+ }).slice(Math.max(0, this.maxCacheTile - N.length)), z = 0, K = U; z < K.length; z++) {
22876
+ var j = K[z];
23009
22877
  this.tileMeshes.delete(j.node), this.scene.remove(j), j.dispose(), r = !0;
23010
22878
  }
23011
22879
  if (r) {
@@ -23017,7 +22885,7 @@ void main() {
23017
22885
  return this.forceRenderWhenNextUpdate = !1, r;
23018
22886
  }, n;
23019
22887
  })()
23020
- ), ROTATE_Y_PI_MATRIX = new THREE.Matrix4().makeRotationAxis(new THREE.Vector3(0, 1, 0), Math.PI), sharedGeometry$1 = createBoxGeometry(2, 2, 2);
22888
+ ), ROTATE_Y_PI_MATRIX = new THREE.Matrix4().makeRotationAxis(new THREE.Vector3(0, 1, 0), Math.PI), sharedGeometry$1 = createSimpleBoxBufferGeometry(2, 2, 2);
23021
22889
  sharedGeometry$1.applyMatrix4(new THREE.Matrix4().makeScale(-1, 1, 1));
23022
22890
  var PANO_VIDEO_MATERIAL_VERTEX_SHADER = `
23023
22891
 
@@ -23319,8 +23187,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23319
23187
  var N = F[O], D = N.key, U = N.progress;
23320
23188
  D !== void 0 && (B.push(D), U > this.locationMotion.progress && L.push(D));
23321
23189
  }
23322
- for (var z = 0, G = Object.keys(this.panoResources); z < G.length; z++) {
23323
- var j = G[z];
23190
+ for (var z = 0, K = Object.keys(this.panoResources); z < K.length; z++) {
23191
+ var j = K[z];
23324
23192
  if (!(L.indexOf(j) >= 0)) {
23325
23193
  var Q = this.panoResources[j];
23326
23194
  if (Q.panoPicture) {
@@ -23347,34 +23215,34 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23347
23215
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), isEmptyObject(p) === !1 && this.setCamera(p);
23348
23216
  var W = this.works.getObserver(this.currentPano), X = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, Z = this.works.getObserver(E.panoId), Y = this.works.getObserver(b.panoId);
23349
23217
  if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && W) {
23350
- for (var K = [], ee = W.work.observers, te = 0, re = W.accessibleNodes; te < re.length; te++) {
23351
- var ie = re[te], M = ee[ie];
23352
- M && K.push(M);
23218
+ for (var G = [], ee = W.work.observers, te = 0, ne = W.accessibleNodes; te < ne.length; te++) {
23219
+ var ie = ne[te], M = ee[ie];
23220
+ M && G.push(M);
23353
23221
  }
23354
23222
  var ce = /* @__PURE__ */ new Map();
23355
- if (K.sort(function(ue, Ae) {
23223
+ if (G.sort(function(ue, Ae) {
23356
23224
  var Me = ce.get(ue);
23357
23225
  typeof Me == "undefined" && (Me = ue.standingPosition.distanceTo(W.standingPosition), ce.set(ue, Me));
23358
23226
  var He = ce.get(ue);
23359
23227
  return typeof He == "undefined" && (He = Ae.standingPosition.distanceTo(W.standingPosition), ce.set(Ae, He)), Me - He;
23360
- }), K.length) {
23361
- this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % K.length;
23362
- var ae = K[this.accessibleObserverFloorCheckCount], de = this.modelScene.models.find(function(ue) {
23228
+ }), G.length) {
23229
+ this.accessibleObserverFloorCheckCount = this.accessibleObserverFloorCheckCount % G.length;
23230
+ var ae = G[this.accessibleObserverFloorCheckCount], de = this.modelScene.models.find(function(ue) {
23363
23231
  return ue.work === (ae == null ? void 0 : ae.work);
23364
23232
  });
23365
23233
  if (ae && de && de.visible) {
23366
23234
  var ge = 0.3, ye = 0.05, xe = 5e-3, le = ae.standingPosition.clone().applyMatrix4(ae.work.transform), he = panoStringify({
23367
23235
  panoIndex: ae.panoIndex,
23368
23236
  workCode: ae.work.workCode
23369
- }), ne = adjustPanoCircleMeshVectors.map(function(ue) {
23237
+ }), re = adjustPanoCircleMeshVectors.map(function(ue) {
23370
23238
  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;
23371
23239
  var Ae = de.intersectRaycaster(scratchRaycaster$1)[0];
23372
23240
  return Ae && Ae.distance - xe <= ge ? new THREE.Vector3().copy(le).setY(Ae.point.y + xe) : le;
23373
23241
  });
23374
- ne.sort(function(ue, Ae) {
23242
+ re.sort(function(ue, Ae) {
23375
23243
  return Ae.y - ue.y;
23376
23244
  });
23377
- var se = ne[Math.floor(ne.length / 2)], pe = ne.filter(function(ue) {
23245
+ var se = re[Math.floor(re.length / 2)], pe = re.filter(function(ue) {
23378
23246
  return ue.distanceTo(se) <= ye;
23379
23247
  })[0];
23380
23248
  if (pe) {
@@ -23774,7 +23642,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23774
23642
  var U = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
23775
23643
  U === 0 || U === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * U / z;
23776
23644
  }
23777
- var G = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), j = {
23645
+ var K = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? T : 0), j = {
23778
23646
  longitude: o.longitude,
23779
23647
  latitude: o.latitude,
23780
23648
  fov: o.fov
@@ -23787,7 +23655,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23787
23655
  userAction: this.userAction,
23788
23656
  error: null
23789
23657
  })), 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")
23790
- this.cameraMotion.set(j, G).catch(noop);
23658
+ this.cameraMotion.set(j, K).catch(noop);
23791
23659
  else {
23792
23660
  var J = coordinatesToVector({
23793
23661
  longitude: this.cameraMotion.value.longitude,
@@ -23799,13 +23667,13 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23799
23667
  X.lookAt(J);
23800
23668
  var Z = new THREE.Matrix4().makeRotationFromQuaternion(X.quaternion);
23801
23669
  X.lookAt(W);
23802
- 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;
23803
- r.effect === "zoomin" ? re = 1.5 : r.effect === "zoomout" && (re = 0.4);
23804
- for (var ie = clamp$1(te * re, 1, 170), ce = 0; ce < S.length - 1; ce++) {
23670
+ 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;
23671
+ r.effect === "zoomin" ? ne = 1.5 : r.effect === "zoomout" && (ne = 0.4);
23672
+ for (var ie = clamp$1(te * ne, 1, 170), ce = 0; ce < S.length - 1; ce++) {
23805
23673
  var ae = S[ce].key;
23806
23674
  if (ae) {
23807
23675
  var de = this.panoResources[ae];
23808
- de && (de.fixCameraTransform.copy(K), de.panoPicture && (de.panoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
23676
+ de && (de.fixCameraTransform.copy(G), de.panoPicture && (de.panoPicture.zoom = Math.tan(ie / 2 / 180 * Math.PI) / Math.tan(ee / 2 / 180 * Math.PI)));
23809
23677
  }
23810
23678
  }
23811
23679
  this.cameraMotion.setKeyframes([
@@ -23833,9 +23701,9 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23833
23701
  fov: te
23834
23702
  }
23835
23703
  }
23836
- ], G).catch(noop);
23704
+ ], K).catch(noop);
23837
23705
  }
23838
- var ge = this.locationMotion.setKeyframes(S, G, R);
23706
+ var ge = this.locationMotion.setKeyframes(S, K, R);
23839
23707
  ge.then(
23840
23708
  // resolve
23841
23709
  // 动画结束
@@ -23853,21 +23721,21 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23853
23721
  userAction: s.userAction,
23854
23722
  error: null
23855
23723
  })), o.moveEndCallback && o.moveEndCallback(he);
23856
- var ne = s.works.getObserver(e);
23857
- if (ne && ne.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
23724
+ var re = s.works.getObserver(e);
23725
+ if (re && re.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
23858
23726
  var se = {
23859
23727
  map: s.videoTexture,
23860
- size: ne.video.size.clone(),
23861
- matrix: ne.video.matrix.clone(),
23862
- panoMatrix: ne.matrix.clone().premultiply(ne.work.transform),
23728
+ size: re.video.size.clone(),
23729
+ matrix: re.video.matrix.clone(),
23730
+ panoMatrix: re.matrix.clone().premultiply(re.work.transform),
23863
23731
  alpha: 1
23864
23732
  }, pe = createUuid(), me = s.videoTexture.image;
23865
23733
  me.setAttribute("uuid", pe), me.oncanplay = noop, me.ontimeupdate = noop, canplayVideo().then(function(qe) {
23866
- qe && ne.video && me.getAttribute("uuid") === pe && (me.oncanplay = function() {
23734
+ qe && re.video && me.getAttribute("uuid") === pe && (me.oncanplay = function() {
23867
23735
  me.oncanplay = noop, me.play();
23868
23736
  }, me.ontimeupdate = function() {
23869
23737
  me.currentTime > 0.5 && (me.ontimeupdate = noop, s.panoVideo.setMaterial(se));
23870
- }, me.src = ne.video.source);
23738
+ }, me.src = re.video.source);
23871
23739
  }).catch((function() {
23872
23740
  me.removeAttribute("uuid");
23873
23741
  }));
@@ -23990,11 +23858,11 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23990
23858
  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);
23991
23859
  b.latitude = clamp$1(0, U, z);
23992
23860
  }
23993
- var G = __assign({}, e.state);
23994
- 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) {
23861
+ var K = __assign({}, e.state);
23862
+ 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) {
23995
23863
  if (this.emit("pano.select", createEvent("pano.select", {
23996
23864
  prevPano: this.currentPano,
23997
- state: G,
23865
+ state: K,
23998
23866
  userAction: e.userAction,
23999
23867
  options: b,
24000
23868
  progress: 0,
@@ -24010,7 +23878,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24010
23878
  userAction: e.userAction,
24011
23879
  prevPano: this.currentPano,
24012
23880
  progress: 0,
24013
- state: G,
23881
+ state: K,
24014
23882
  options: b,
24015
23883
  error: null
24016
23884
  }));
@@ -24933,8 +24801,8 @@ void main() {
24933
24801
  B.copy(L), R = !0;
24934
24802
  }
24935
24803
  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);
24936
- for (var D = [], U = [], z = 0, G = this.locationMotion.keyframes; z < G.length; z++) {
24937
- var j = G[z], Q = j.key, V = j.progress;
24804
+ for (var D = [], U = [], z = 0, K = this.locationMotion.keyframes; z < K.length; z++) {
24805
+ var j = K[z], Q = j.key, V = j.progress;
24938
24806
  Q !== void 0 && (D.push(Q), V > this.locationMotion.progress && U.push(Q));
24939
24807
  }
24940
24808
  for (var J = 0, W = Object.keys(this.panoResources); J < W.length; J++) {
@@ -24962,12 +24830,12 @@ void main() {
24962
24830
  }));
24963
24831
  }
24964
24832
  isEmptyObject(h) === !1 && this.modelScene.parameter.set(h), p.offset && this.camera.position.copy(p.offset);
24965
- var K = this.camera.pose.longitude, ee = this.camera.pose.latitude;
24966
- 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", {
24833
+ var G = this.camera.pose.longitude, ee = this.camera.pose.latitude;
24834
+ 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", {
24967
24835
  userAction: !0,
24968
24836
  state: __assign(__assign(__assign({}, this.currentPano), { mode: this.mode }), clonePose(this.camera.pose))
24969
24837
  }))), this.works.getObserver(this.currentPano);
24970
- var te = this.works.getObserver(E.panoId), re = this.works.getObserver(b.panoId), ie = /* @__PURE__ */ new Map();
24838
+ var te = this.works.getObserver(E.panoId), ne = this.works.getObserver(b.panoId), ie = /* @__PURE__ */ new Map();
24971
24839
  if (te)
24972
24840
  for (var ce = 0, ae = te.accessibleNodes; ce < ae.length; ce++) {
24973
24841
  var de = ae[ce], N = te.work.observers[de];
@@ -24979,9 +24847,9 @@ void main() {
24979
24847
  ie.set(ge, N);
24980
24848
  }
24981
24849
  }
24982
- if (re)
24983
- for (var ye = 0, xe = re.accessibleNodes; ye < xe.length; ye++) {
24984
- var de = xe[ye], N = re.work.observers[de];
24850
+ if (ne)
24851
+ for (var ye = 0, xe = ne.accessibleNodes; ye < xe.length; ye++) {
24852
+ var de = xe[ye], N = ne.work.observers[de];
24985
24853
  if (N) {
24986
24854
  var ge = panoStringify({
24987
24855
  panoIndex: N.panoIndex,
@@ -25015,7 +24883,7 @@ void main() {
25015
24883
  });
25016
24884
  }
25017
24885
  {
25018
- 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;
24886
+ 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;
25019
24887
  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) {
25020
24888
  this.tiling.setObserver(null);
25021
24889
  var me = {
@@ -25052,16 +24920,16 @@ void main() {
25052
24920
  matrixInverse: this.tiling.camera.matrixWorldInverse,
25053
24921
  projectionMatrix: this.tiling.camera.projectionMatrix,
25054
24922
  pano: he,
25055
- 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)
24923
+ 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)
25056
24924
  }, Le = this.modelScene.parameter.refinedScreen;
25057
24925
  (Ke || Te.pano !== (Le == null ? void 0 : Le.pano) || Te.opacity !== (Le == null ? void 0 : Le.opacity)) && this.modelScene.parameter.set("refinedScreen", Te);
25058
24926
  }
25059
24927
  }
25060
24928
  this.panoVideo.object.position.copy(this.camera.position), this.panoVideo.updateTime(e);
25061
24929
  {
25062
- var Ie = b.effect, $e = this.modelScene.parameter, ne = $e.pano0, se = $e.pano1;
25063
- if (ne && se && ne !== se && Ie === "fly" && this.flyEffectUseDepthBuffer) {
25064
- 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) {
24930
+ var Ie = b.effect, $e = this.modelScene.parameter, re = $e.pano0, se = $e.pano1;
24931
+ if (re && se && re !== se && Ie === "fly" && this.flyEffectUseDepthBuffer) {
24932
+ 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) {
25065
24933
  var tt = 500, ke = 512;
25066
24934
  this.pano0DepthCubeRenderTarget ? this.pano0DepthCubeRenderTarget.width !== ke && this.pano0DepthCubeRenderTarget.setSize(ke, ke) : this.pano0DepthCubeRenderTarget = new THREE.WebGLCubeRenderTarget(ke, {
25067
24935
  minFilter: THREE.NearestFilter,
@@ -25073,11 +24941,11 @@ void main() {
25073
24941
  generateMipmaps: !1
25074
24942
  });
25075
24943
  var Pe = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano0DepthCubeRenderTarget);
25076
- Pe.matrix.copy(ne.matrix), Pe.matrixWorld.copy(Pe.matrix), Pe.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Pe, tt);
24944
+ Pe.matrix.copy(re.matrix), Pe.matrixWorld.copy(Pe.matrix), Pe.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, Pe, tt);
25077
24945
  var _e = new THREE.CubeCamera(this.camera.near, this.camera.far, this.pano1DepthCubeRenderTarget);
25078
24946
  _e.matrix.copy(se.matrix), _e.matrixWorld.copy(_e.matrix), _e.matrixAutoUpdate = !1, renderDepthCube(this.renderer, this.modelScene, _e, tt), this.modelScene.parameter.set({
25079
24947
  pano0Depth: {
25080
- panoId: ne.panoId,
24948
+ panoId: re.panoId,
25081
24949
  map: this.pano0DepthCubeRenderTarget.texture,
25082
24950
  mapSize: this.pano0DepthCubeRenderTarget.width,
25083
24951
  maxDepth: tt
@@ -25390,10 +25258,10 @@ void main() {
25390
25258
  } : {
25391
25259
  workCode: "",
25392
25260
  panoIndex: 0
25393
- }, 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;
25261
+ }, 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;
25394
25262
  this.emit("pano.moveTo", createEvent("pano.moveTo", {
25395
25263
  options: r,
25396
- prevPano: G,
25264
+ prevPano: K,
25397
25265
  progress: 0,
25398
25266
  state: z,
25399
25267
  userAction: this.userAction,
@@ -25409,7 +25277,7 @@ void main() {
25409
25277
  var J = __assign(__assign(__assign({}, U), { mode: s.mode }), clonePose(s.camera.pose));
25410
25278
  s.emit("pano.arrived", createEvent("pano.arrived", {
25411
25279
  options: r,
25412
- prevPano: G,
25280
+ prevPano: K,
25413
25281
  progress: 0,
25414
25282
  state: J,
25415
25283
  userAction: s.userAction,
@@ -25421,7 +25289,7 @@ void main() {
25421
25289
  function() {
25422
25290
  r.moveCancelCallback && r.moveCancelCallback(), s.emit("pano.cancel", createEvent("pano.cancel", {
25423
25291
  options: r,
25424
- prevPano: G,
25292
+ prevPano: K,
25425
25293
  progress: 0,
25426
25294
  state: z,
25427
25295
  userAction: s.userAction,
@@ -25833,10 +25701,10 @@ void main() {
25833
25701
  longitude: C.longitude,
25834
25702
  latitude: C.latitude
25835
25703
  }, 0).catch(noop), e.isFinal) {
25836
- var G = e.velocityX, j = e.velocityY;
25704
+ var K = e.velocityX, j = e.velocityY;
25837
25705
  this.inMomentumMovement = {
25838
25706
  uuid: createUuid()
25839
- }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: G, y: j })), { x: 0, y: 0, z: 0 }), 0);
25707
+ }, this.requestMomentumMovement(e, !0, __assign(__assign({}, this.coordinatesForOffset({ x: K, y: j })), { x: 0, y: 0, z: 0 }), 0);
25840
25708
  }
25841
25709
  }
25842
25710
  }
@@ -26685,7 +26553,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
26685
26553
  }
26686
26554
  return Object.defineProperty(t, "version", {
26687
26555
  get: function() {
26688
- return "6.6.3";
26556
+ return "6.7.0-alpha.0";
26689
26557
  },
26690
26558
  enumerable: !1,
26691
26559
  configurable: !0
@@ -27318,11 +27186,11 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27318
27186
  var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), U = this.locationMotionKeyframesLength(T);
27319
27187
  S = this.locationMotion.getProgressVelocity(y) * D / U;
27320
27188
  }
27321
- var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), G = {
27189
+ var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" ? b : 0), K = {
27322
27190
  longitude: o.longitude,
27323
27191
  latitude: o.latitude,
27324
27192
  fov: o.fov
27325
- }, 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;
27193
+ }, 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;
27326
27194
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
27327
27195
  options: o,
27328
27196
  prevPano: Q,
@@ -27331,25 +27199,25 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27331
27199
  userAction: this.userAction,
27332
27200
  error: null
27333
27201
  })), 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")
27334
- this.cameraMotion.set(G, z).catch(noop);
27202
+ this.cameraMotion.set(K, z).catch(noop);
27335
27203
  else {
27336
27204
  var V = coordinatesToVector({
27337
27205
  longitude: this.cameraMotion.value.longitude,
27338
27206
  latitude: this.cameraMotion.value.latitude
27339
27207
  }), J = coordinatesToVector({
27340
- longitude: (f = G.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
27341
- latitude: (d = G.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
27208
+ longitude: (f = K.longitude) !== null && f !== void 0 ? f : this.cameraMotion.value.longitude,
27209
+ latitude: (d = K.latitude) !== null && d !== void 0 ? d : this.cameraMotion.value.latitude
27342
27210
  }), W = new THREE.Object3D();
27343
27211
  W.lookAt(V);
27344
27212
  var X = new THREE.Matrix4().makeRotationFromQuaternion(W.quaternion);
27345
27213
  W.lookAt(J);
27346
- 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;
27214
+ 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;
27347
27215
  r.effect === "zoomin" ? te = 1.5 : r.effect === "zoomout" && (te = 0.4);
27348
- for (var re = ee * te, ie = 0; ie < T.length - 1; ie++) {
27216
+ for (var ne = ee * te, ie = 0; ie < T.length - 1; ie++) {
27349
27217
  var ce = T[ie].key;
27350
27218
  if (ce) {
27351
27219
  var ae = this.panoResources[ce];
27352
- ae && (ae.fixCameraTransform.copy(Y), ae.leftPanoPicture && (ae.leftPanoPicture.zoom = Math.tan(re / 2 / 180 * Math.PI) / Math.tan(K / 2 / 180 * Math.PI)));
27220
+ ae && (ae.fixCameraTransform.copy(Y), ae.leftPanoPicture && (ae.leftPanoPicture.zoom = Math.tan(ne / 2 / 180 * Math.PI) / Math.tan(G / 2 / 180 * Math.PI)));
27353
27221
  }
27354
27222
  }
27355
27223
  this.cameraMotion.setKeyframes([
@@ -27364,16 +27232,16 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27364
27232
  {
27365
27233
  progress: 0,
27366
27234
  value: {
27367
- longitude: (p = G.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
27368
- latitude: (m = G.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
27369
- fov: re
27235
+ longitude: (p = K.longitude) !== null && p !== void 0 ? p : this.cameraMotion.value.longitude,
27236
+ latitude: (m = K.latitude) !== null && m !== void 0 ? m : this.cameraMotion.value.latitude,
27237
+ fov: ne
27370
27238
  }
27371
27239
  },
27372
27240
  {
27373
27241
  progress: 1,
27374
27242
  value: {
27375
- longitude: (A = G.longitude) !== null && A !== void 0 ? A : this.cameraMotion.value.longitude,
27376
- latitude: (g = G.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
27243
+ longitude: (A = K.longitude) !== null && A !== void 0 ? A : this.cameraMotion.value.longitude,
27244
+ latitude: (g = K.latitude) !== null && g !== void 0 ? g : this.cameraMotion.value.latitude,
27377
27245
  fov: ee
27378
27246
  }
27379
27247
  }
@@ -27399,7 +27267,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27399
27267
  })), o.moveEndCallback && o.moveEndCallback(le);
27400
27268
  var he = s.works.getObserver(s.currentPano);
27401
27269
  if (he && he.video && s.videoTexture && s.videoTexture.image instanceof HTMLVideoElement) {
27402
- var ne = {
27270
+ var re = {
27403
27271
  map: s.videoTexture,
27404
27272
  size: he.video.size.clone(),
27405
27273
  matrix: he.video.matrix.clone(),
@@ -27410,7 +27278,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27410
27278
  me && he.video && pe.getAttribute("uuid") === se && (pe.oncanplay = function() {
27411
27279
  pe.oncanplay = noop, pe.play();
27412
27280
  }, pe.ontimeupdate = function() {
27413
- pe.currentTime > 0.5 && (pe.ontimeupdate = noop, s.panoVideo.setMaterial(ne));
27281
+ pe.currentTime > 0.5 && (pe.ontimeupdate = noop, s.panoVideo.setMaterial(re));
27414
27282
  }, pe.src = he.video.source);
27415
27283
  }).catch((function() {
27416
27284
  pe.removeAttribute("uuid");
@@ -27541,20 +27409,20 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27541
27409
  O.copy(F), M = !0;
27542
27410
  }
27543
27411
  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);
27544
- for (var z = [], G = [], j = 0, Q = this.locationMotion.keyframes; j < Q.length; j++) {
27412
+ for (var z = [], K = [], j = 0, Q = this.locationMotion.keyframes; j < Q.length; j++) {
27545
27413
  var V = Q[j], J = V.key, W = V.progress;
27546
- J !== void 0 && (z.push(J), W > this.locationMotion.progress && G.push(J));
27414
+ J !== void 0 && (z.push(J), W > this.locationMotion.progress && K.push(J));
27547
27415
  }
27548
27416
  for (var X = 0, Z = Object.keys(this.panoResources); X < Z.length; X++) {
27549
27417
  var Y = Z[X];
27550
- if (!(G.indexOf(Y) >= 0)) {
27551
- var K = this.panoResources[Y];
27552
- if (K.leftPanoPicture) {
27553
- var ee = K.leftPanoPicture.map;
27418
+ if (!(K.indexOf(Y) >= 0)) {
27419
+ var G = this.panoResources[Y];
27420
+ if (G.leftPanoPicture) {
27421
+ var ee = G.leftPanoPicture.map;
27554
27422
  if (ee) {
27555
27423
  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))
27556
27424
  continue;
27557
- ee.dispose(), K.leftPanoPicture = null;
27425
+ ee.dispose(), G.leftPanoPicture = null;
27558
27426
  }
27559
27427
  }
27560
27428
  z.indexOf(Y) >= 0 || delete this.panoResources[Y];
@@ -27571,13 +27439,13 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27571
27439
  }));
27572
27440
  }
27573
27441
  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);
27574
- var re = A, ie = re[1], ce = new THREE.Vector3(0, 0, 0), ae = new THREE.Vector2().copy(this.camera.resolution);
27442
+ var ne = A, ie = ne[1], ce = new THREE.Vector3(0, 0, 0), ae = new THREE.Vector2().copy(this.camera.resolution);
27575
27443
  if (ie && this.xrManager.session && this.xrManager.referenceSpace && this.xrManager.session.renderState.baseLayer) {
27576
27444
  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 : [];
27577
27445
  this.renderer.setFramebuffer(ye.framebuffer);
27578
27446
  for (var he = 0; he < le.length; he++) {
27579
- var ne = le[he], se = de.cameras[he], pe = ye.getViewport(ne);
27580
- 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));
27447
+ var re = le[he], se = de.cameras[he], pe = ye.getViewport(re);
27448
+ 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));
27581
27449
  }
27582
27450
  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) {
27583
27451
  for (var he = 0; he < this.xrManager.session.inputSources.length; he++)
@@ -29056,7 +28924,7 @@ void main() {
29056
28924
  }
29057
28925
  return Object.defineProperty(t, "version", {
29058
28926
  get: function() {
29059
- return "6.6.3";
28927
+ return "6.7.0-alpha.0";
29060
28928
  },
29061
28929
  enumerable: !1,
29062
28930
  configurable: !0
@@ -29286,15 +29154,15 @@ void main() {
29286
29154
  else
29287
29155
  e instanceof Work ? E.push(e) : E.push(parseWork(e));
29288
29156
  for (var R = createWorks(E), w = function(Y) {
29289
- var K = C, ee = new Fetcher({
29157
+ var G = C, ee = new Fetcher({
29290
29158
  get networkSubscribe() {
29291
- return K.networkSubscribe;
29159
+ return G.networkSubscribe;
29292
29160
  },
29293
29161
  requestProxy: function(te) {
29294
- return Promise.resolve(te).then(function(re) {
29295
- return K.requestProxy(re);
29296
- }).then(function(re) {
29297
- var ie = verifyURL(re, Y.allowHosts);
29162
+ return Promise.resolve(te).then(function(ne) {
29163
+ return G.requestProxy(ne);
29164
+ }).then(function(ne) {
29165
+ var ie = verifyURL(ne, Y.allowHosts);
29298
29166
  if (ie instanceof Error)
29299
29167
  throw ie;
29300
29168
  return ie;
@@ -29360,8 +29228,8 @@ void main() {
29360
29228
  offset: r.offset
29361
29229
  };
29362
29230
  }
29363
- var U = __assign(__assign(__assign({}, O), { mode: F }), N), z = this.getCurrentState(), G = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
29364
- (F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (G = 0);
29231
+ var U = __assign(__assign(__assign({}, O), { mode: F }), N), z = this.getCurrentState(), K = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
29232
+ (F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (K = 0);
29365
29233
  var j = "fly";
29366
29234
  (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", {
29367
29235
  input: e,
@@ -29374,12 +29242,12 @@ void main() {
29374
29242
  var Y = __assign(__assign({ initial: {
29375
29243
  state: U,
29376
29244
  currentState: z,
29377
- duration: G,
29245
+ duration: K,
29378
29246
  effect: j,
29379
29247
  userAction: s
29380
- } }, u.commonParams()), u.controllerInits[F]), K = Controllers[F].initAnimationEndState(Y);
29248
+ } }, u.commonParams()), u.controllerInits[F]), G = Controllers[F].initAnimationEndState(Y);
29381
29249
  if (u.controller && u.currentMode === F)
29382
- u.controller.updateWork(R, K, { effect: j, duration: G }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(F, Y));
29250
+ u.controller.updateWork(R, G, { effect: j, duration: K }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(F, Y));
29383
29251
  else {
29384
29252
  var ee = u.currentMode;
29385
29253
  if (u.controller)
@@ -29392,14 +29260,14 @@ void main() {
29392
29260
  }));
29393
29261
  }
29394
29262
  u.controller = u.applyController(F, Y);
29395
- var re = createEvent("mode.change", {
29263
+ var ne = createEvent("mode.change", {
29396
29264
  prevMode: ee,
29397
29265
  mode: F,
29398
- state: K,
29266
+ state: G,
29399
29267
  userAction: s
29400
29268
  });
29401
29269
  try {
29402
- u.emit("mode.change", re);
29270
+ u.emit("mode.change", ne);
29403
29271
  } catch (ie) {
29404
29272
  console.error(ie);
29405
29273
  }
@@ -29429,8 +29297,8 @@ void main() {
29429
29297
  userAction: s
29430
29298
  })), X = !0, u.modelScene.autoRefine = !0), W.off("pano.arrived", Z), W.off("pano.cancel", Z);
29431
29299
  }, J = this.loadModels(R, v);
29432
- V = Promise.all(J.map(function(K) {
29433
- return K.initReady;
29300
+ V = Promise.all(J.map(function(G) {
29301
+ return G.initReady;
29434
29302
  })).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);
29435
29303
  }
29436
29304
  return this.emit("works.load", createEvent("works.load", {
@@ -30064,7 +29932,13 @@ void main() {
30064
29932
  var e = this.works.getObserver(this.pano);
30065
29933
  if (e) {
30066
29934
  var r = new THREE.Object3D();
30067
- 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);
29935
+ r.matrix.copy(e.matrix).premultiply(e.work.transform), r.matrix.decompose(r.position, r.quaternion, r.scale), r.matrixAutoUpdate = !1;
29936
+ var o = new THREE.Vector3(0, 0, -1);
29937
+ o.applyQuaternion(this.camera.quaternion);
29938
+ var s = r.quaternion.clone().inverse();
29939
+ o.applyQuaternion(s);
29940
+ var u = Math.atan2(o.x, -o.z), l = -Math.asin(o.y);
29941
+ return { theta: u, phi: l, lookAtVector: o };
30068
29942
  }
30069
29943
  }
30070
29944
  return null;