@realsee/five 6.7.0-alpha.19 → 6.7.0-alpha.20

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 (109) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/navigation.js +1 -1
  3. package/docs/assets/search.js +1 -1
  4. package/docs/classes/five.AnimationFrameLoop.html +1 -1
  5. package/docs/classes/five.Five.html +48 -38
  6. package/docs/classes/five.FivePass.html +20 -0
  7. package/docs/classes/five.FullScreenQuad.html +7 -0
  8. package/docs/classes/five.Model.html +1 -1
  9. package/docs/classes/five.ModelScene.html +1 -1
  10. package/docs/classes/five.PBMContainer.html +1 -1
  11. package/docs/classes/five.PBMGroup.html +1 -1
  12. package/docs/classes/five.PBMMesh.html +1 -1
  13. package/docs/classes/five.PBMMeshMaterial.html +1 -1
  14. package/docs/classes/five.PBMPointCloud.html +1 -1
  15. package/docs/classes/five.PBMPointCloudMaterial.html +1 -1
  16. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  17. package/docs/classes/five.Parameter.html +1 -1
  18. package/docs/classes/five.Pass.html +11 -0
  19. package/docs/classes/five.Tile3D.html +1 -1
  20. package/docs/classes/five.TileNode.html +1 -1
  21. package/docs/classes/five.TrajectoryNode.html +1 -1
  22. package/docs/classes/five.WorkResolvedObserver.html +1 -1
  23. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  24. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  25. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  26. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  27. package/docs/classes/line.LineGeometry.html +1 -1
  28. package/docs/classes/line.LineMaterial.html +1 -1
  29. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  30. package/docs/classes/line.THREE_Line2.html +1 -1
  31. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  32. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  33. package/docs/classes/vfx.Airflow.html +1 -1
  34. package/docs/classes/vfx.Flame.html +1 -1
  35. package/docs/classes/vfx.Particle.html +1 -1
  36. package/docs/classes/vfx.ParticleGPU.html +1 -1
  37. package/docs/classes/vfx.SpotLight.html +1 -1
  38. package/docs/hierarchy.html +1 -1
  39. package/docs/interfaces/five.EventCallback.html +1 -1
  40. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +1 -1
  41. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  42. package/docs/interfaces/five.PBMMaterial.html +1 -1
  43. package/docs/interfaces/five.PBMMeshMaterialParameters.html +1 -1
  44. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +1 -1
  45. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  46. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  47. package/docs/interfaces/five.ParameterMaterialValue.html +1 -1
  48. package/docs/interfaces/five.ParameterTilesetValue.html +1 -1
  49. package/docs/interfaces/five.ParameterValue.html +1 -1
  50. package/docs/interfaces/five.ResolvedParameterValue.html +1 -1
  51. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +1 -1
  52. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  53. package/docs/interfaces/five.ViewLayer.html +1 -1
  54. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  55. package/docs/interfaces/five.WorkImage.html +1 -1
  56. package/docs/interfaces/five.WorkObserver.html +1 -1
  57. package/docs/interfaces/five.WorkTile.html +1 -1
  58. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  59. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  60. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  61. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +1 -1
  62. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
  63. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
  64. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  65. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  66. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  67. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  68. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  69. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  70. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  71. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  72. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  73. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  74. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  75. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  76. package/docs/interfaces/react.FiveInjectionTypes.html +1 -1
  77. package/docs/modules/five.html +1 -1
  78. package/docs/types/five.ParseOptions.html +1 -1
  79. package/five/index.d.ts +71 -0
  80. package/five/index.js +63 -41
  81. package/five/index.mjs +983 -790
  82. package/gltf-loader/index.js +3 -3
  83. package/gltf-loader/index.mjs +3 -3
  84. package/line/index.js +3 -3
  85. package/line/index.mjs +3 -3
  86. package/package.json +1 -1
  87. package/plugins/index.js +2 -2
  88. package/plugins/index.mjs +2 -2
  89. package/react/index.js +2 -2
  90. package/react/index.mjs +2 -2
  91. package/shader-lib/index.js +9 -9
  92. package/shader-lib/index.mjs +203 -203
  93. package/sticker/index.js +3 -3
  94. package/sticker/index.mjs +3 -3
  95. package/umd/five-gltf-loader.js +3 -3
  96. package/umd/five-line.js +3 -3
  97. package/umd/five-plugins.js +2 -2
  98. package/umd/five-react.js +2 -2
  99. package/umd/five-shader-lib.js +7 -7
  100. package/umd/five-sticker.js +3 -3
  101. package/umd/five-vfx.js +2 -2
  102. package/umd/five-vue.js +2 -2
  103. package/umd/five.js +63 -41
  104. package/vfx/index.js +2 -2
  105. package/vfx/index.mjs +2 -2
  106. package/vue/index.js +2 -2
  107. package/vue/index.mjs +2 -2
  108. package/work-downloader/index.js +2 -2
  109. package/work-downloader/index.mjs +2 -2
package/five/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 11/26/2025
5
- * Version: 6.7.0-alpha.19
4
+ * Generated: 11/28/2025
5
+ * Version: 6.7.0-alpha.20
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -253,7 +253,7 @@
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
255
  */import * as THREE from "three";
256
- import { Object3D, SphereGeometry, MeshBasicMaterial, Mesh } from "three";
256
+ import { Object3D, SphereGeometry, MeshBasicMaterial, Mesh, Vector2, WebGLRenderTarget, RGBAFormat, LinearFilter, Clock as Clock$1 } from "three";
257
257
  var version = Number(THREE.REVISION);
258
258
  if (version < 115 || version > 117)
259
259
  throw new Error('"Five" needs "THREE.js" version between 125 - 117.');
@@ -757,10 +757,10 @@ CryptoJS.lib.Cipher || (function(n) {
757
757
  var P = M[w + 1];
758
758
  M[w + 1] = M[w + 3], M[w + 3] = P, this._doCryptBlock(M, w, this._invKeySchedule, c, f, d, h, r), P = M[w + 1], M[w + 1] = M[w + 3], M[w + 3] = P;
759
759
  },
760
- _doCryptBlock: function(M, w, P, O, C, I, _, H) {
761
- for (var L = this._nRounds, U = M[w] ^ P[0], j = M[w + 1] ^ P[1], G = M[w + 2] ^ P[2], Q = M[w + 3] ^ P[3], k = 4, D = 1; D < L; D++)
762
- var q = O[U >>> 24] ^ C[j >>> 16 & 255] ^ I[G >>> 8 & 255] ^ _[Q & 255] ^ P[k++], z = O[j >>> 24] ^ C[G >>> 16 & 255] ^ I[Q >>> 8 & 255] ^ _[U & 255] ^ P[k++], J = O[G >>> 24] ^ C[Q >>> 16 & 255] ^ I[U >>> 8 & 255] ^ _[j & 255] ^ P[k++], Q = O[Q >>> 24] ^ C[U >>> 16 & 255] ^ I[j >>> 8 & 255] ^ _[G & 255] ^ P[k++], U = q, j = z, G = J;
763
- q = (H[U >>> 24] << 24 | H[j >>> 16 & 255] << 16 | H[G >>> 8 & 255] << 8 | H[Q & 255]) ^ P[k++], z = (H[j >>> 24] << 24 | H[G >>> 16 & 255] << 16 | H[Q >>> 8 & 255] << 8 | H[U & 255]) ^ P[k++], J = (H[G >>> 24] << 24 | H[Q >>> 16 & 255] << 16 | H[U >>> 8 & 255] << 8 | H[j & 255]) ^ P[k++], Q = (H[Q >>> 24] << 24 | H[U >>> 16 & 255] << 16 | H[j >>> 8 & 255] << 8 | H[G & 255]) ^ P[k++], M[w] = q, M[w + 1] = z, M[w + 2] = J, M[w + 3] = Q;
760
+ _doCryptBlock: function(M, w, P, O, C, I, H, F) {
761
+ for (var L = this._nRounds, q = M[w] ^ P[0], j = M[w + 1] ^ P[1], G = M[w + 2] ^ P[2], Q = M[w + 3] ^ P[3], k = 4, D = 1; D < L; D++)
762
+ var U = O[q >>> 24] ^ C[j >>> 16 & 255] ^ I[G >>> 8 & 255] ^ H[Q & 255] ^ P[k++], z = O[j >>> 24] ^ C[G >>> 16 & 255] ^ I[Q >>> 8 & 255] ^ H[q & 255] ^ P[k++], J = O[G >>> 24] ^ C[Q >>> 16 & 255] ^ I[q >>> 8 & 255] ^ H[j & 255] ^ P[k++], Q = O[Q >>> 24] ^ C[q >>> 16 & 255] ^ I[j >>> 8 & 255] ^ H[G & 255] ^ P[k++], q = U, j = z, G = J;
763
+ U = (F[q >>> 24] << 24 | F[j >>> 16 & 255] << 16 | F[G >>> 8 & 255] << 8 | F[Q & 255]) ^ P[k++], z = (F[j >>> 24] << 24 | F[G >>> 16 & 255] << 16 | F[Q >>> 8 & 255] << 8 | F[q & 255]) ^ P[k++], J = (F[G >>> 24] << 24 | F[Q >>> 16 & 255] << 16 | F[q >>> 8 & 255] << 8 | F[j & 255]) ^ P[k++], Q = (F[Q >>> 24] << 24 | F[q >>> 16 & 255] << 16 | F[j >>> 8 & 255] << 8 | F[G & 255]) ^ P[k++], M[w] = U, M[w + 1] = z, M[w + 2] = J, M[w + 3] = Q;
764
764
  },
765
765
  keySize: 8
766
766
  });
@@ -2070,8 +2070,8 @@ KEYUTIL.getKey = function(n, t, e) {
2070
2070
  if (n.indexOf("-END PRIVATE KEY-") != -1)
2071
2071
  return h.getKeyFromPlainPrivatePKCS8PEM(n);
2072
2072
  if (n.indexOf("-END RSA PRIVATE KEY-") != -1 && n.indexOf("4,ENCRYPTED") != -1) {
2073
- var _ = h.getDecryptedKeyHex(n, t), H = new RSAKey();
2074
- return H.readPKCS5PrvKeyHex(_), H;
2073
+ var H = h.getDecryptedKeyHex(n, t), F = new RSAKey();
2074
+ return F.readPKCS5PrvKeyHex(H), F;
2075
2075
  }
2076
2076
  if (n.indexOf("-END EC PRIVATE KEY-") != -1 && n.indexOf("4,ENCRYPTED") != -1) {
2077
2077
  var M = h.getDecryptedKeyHex(n, t), p = s(M, 0, [1], "04"), L = s(M, 0, [2, 0], "06"), k = s(M, 0, [3, 0], "03").substr(2), D = "";
@@ -3187,41 +3187,41 @@ function X509(n) {
3187
3187
  return E(T).replace(/\//, "\\/");
3188
3188
  }).join("/");
3189
3189
  }, this.getInfo = function() {
3190
- var v = function(q) {
3191
- var z = JSON.stringify(q.array).replace(/[\[\]\{\}\"]/g, "");
3190
+ var v = function(U) {
3191
+ var z = JSON.stringify(U.array).replace(/[\[\]\{\}\"]/g, "");
3192
3192
  return z;
3193
- }, E = function(q) {
3194
- for (var z = "", J = q.array, Q = 0; Q < J.length; Q++) {
3195
- var U = J[Q];
3196
- if (z += " policy oid: " + U.policyoid + `
3197
- `, U.array !== void 0)
3198
- for (var j = 0; j < U.array.length; j++) {
3199
- var G = U.array[j];
3193
+ }, E = function(U) {
3194
+ for (var z = "", J = U.array, Q = 0; Q < J.length; Q++) {
3195
+ var q = J[Q];
3196
+ if (z += " policy oid: " + q.policyoid + `
3197
+ `, q.array !== void 0)
3198
+ for (var j = 0; j < q.array.length; j++) {
3199
+ var G = q.array[j];
3200
3200
  G.cps !== void 0 && (z += " cps: " + G.cps + `
3201
3201
  `);
3202
3202
  }
3203
3203
  }
3204
3204
  return z;
3205
- }, b = function(q) {
3206
- for (var z = "", J = q.array, Q = 0; Q < J.length; Q++) {
3207
- var U = J[Q];
3205
+ }, b = function(U) {
3206
+ for (var z = "", J = U.array, Q = 0; Q < J.length; Q++) {
3207
+ var q = J[Q];
3208
3208
  try {
3209
- U.dpname.full[0].uri !== void 0 && (z += " " + U.dpname.full[0].uri + `
3209
+ q.dpname.full[0].uri !== void 0 && (z += " " + q.dpname.full[0].uri + `
3210
3210
  `);
3211
3211
  } catch (j) {
3212
3212
  }
3213
3213
  try {
3214
- U.dname.full[0].dn.hex !== void 0 && (z += " " + X509.hex2dn(U.dpname.full[0].dn.hex) + `
3214
+ q.dname.full[0].dn.hex !== void 0 && (z += " " + X509.hex2dn(q.dpname.full[0].dn.hex) + `
3215
3215
  `);
3216
3216
  } catch (j) {
3217
3217
  }
3218
3218
  }
3219
3219
  return z;
3220
- }, T = function(q) {
3221
- for (var z = "", J = q.array, Q = 0; Q < J.length; Q++) {
3222
- var U = J[Q];
3223
- U.caissuer !== void 0 && (z += " caissuer: " + U.caissuer + `
3224
- `), U.ocsp !== void 0 && (z += " ocsp: " + U.ocsp + `
3220
+ }, T = function(U) {
3221
+ for (var z = "", J = U.array, Q = 0; Q < J.length; Q++) {
3222
+ var q = J[Q];
3223
+ q.caissuer !== void 0 && (z += " caissuer: " + q.caissuer + `
3224
+ `), q.ocsp !== void 0 && (z += " ocsp: " + q.ocsp + `
3225
3225
  `);
3226
3226
  }
3227
3227
  return z;
@@ -3257,12 +3257,12 @@ function X509(n) {
3257
3257
  S += " " + this.getExtSubjectKeyIdentifier().kid.hex + `
3258
3258
  `;
3259
3259
  else if (O === "authorityKeyIdentifier") {
3260
- var _ = this.getExtAuthorityKeyIdentifier();
3261
- _.kid !== void 0 && (S += " kid=" + _.kid.hex + `
3260
+ var H = this.getExtAuthorityKeyIdentifier();
3261
+ H.kid !== void 0 && (S += " kid=" + H.kid.hex + `
3262
3262
  `);
3263
3263
  } else if (O === "extKeyUsage") {
3264
- var H = this.getExtExtKeyUsage().array;
3265
- S += " " + H.join(", ") + `
3264
+ var F = this.getExtExtKeyUsage().array;
3265
+ S += " " + F.join(", ") + `
3266
3266
  `;
3267
3267
  } else if (O === "subjectAltName") {
3268
3268
  var L = v(this.getExtSubjectAltName());
@@ -3904,53 +3904,53 @@ var PBMCustomShader = (
3904
3904
  var C = O[P];
3905
3905
  C in uniformsLib$1 || delete l[C];
3906
3906
  }
3907
- for (var I = r.customShaders.filter(function(U) {
3908
- return U.type.includes(S);
3909
- }), _ = 0, H = I; _ < H.length; _++) {
3910
- var L = H[_];
3907
+ for (var I = r.customShaders.filter(function(q) {
3908
+ return q.type.includes(S);
3909
+ }), H = 0, F = I; H < F.length; H++) {
3910
+ var L = F[H];
3911
3911
  for (var k in L.defines)
3912
3912
  k in u || Object.assign(u, (b = {}, b[k] = L.defines[k], b));
3913
3913
  for (var D in L.uniforms)
3914
3914
  D in l || Object.assign(l, (T = {}, T[D] = L.uniforms[D], T));
3915
3915
  }
3916
- v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, I.map(function(U) {
3917
- return U.vertex.mainBefore;
3918
- }).filter(function(U) {
3919
- return !!U;
3916
+ v.vertexShader = v.vertexShader.replace(/MAIN_BEFORE/g, I.map(function(q) {
3917
+ return q.vertex.mainBefore;
3918
+ }).filter(function(q) {
3919
+ return !!q;
3920
3920
  }).join(`
3921
- `)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, I.map(function(U) {
3922
- return U.vertex.mainStart;
3923
- }).filter(function(U) {
3924
- return !!U;
3921
+ `)), v.vertexShader = v.vertexShader.replace(/MAIN_START/g, I.map(function(q) {
3922
+ return q.vertex.mainStart;
3923
+ }).filter(function(q) {
3924
+ return !!q;
3925
3925
  }).join(`
3926
- `)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, I.map(function(U) {
3927
- return U.vertex.mainEnd;
3928
- }).filter(function(U) {
3929
- return !!U;
3926
+ `)), v.vertexShader = v.vertexShader.replace(/MAIN_END/g, I.map(function(q) {
3927
+ return q.vertex.mainEnd;
3928
+ }).filter(function(q) {
3929
+ return !!q;
3930
3930
  }).join(`
3931
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, I.map(function(U) {
3932
- return U.fragment.mainBefore;
3933
- }).filter(function(U) {
3934
- return !!U;
3931
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_BEFORE/g, I.map(function(q) {
3932
+ return q.fragment.mainBefore;
3933
+ }).filter(function(q) {
3934
+ return !!q;
3935
3935
  }).join(`
3936
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, I.map(function(U) {
3937
- return U.fragment.mainStart;
3938
- }).filter(function(U) {
3939
- return !!U;
3936
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_START/g, I.map(function(q) {
3937
+ return q.fragment.mainStart;
3938
+ }).filter(function(q) {
3939
+ return !!q;
3940
3940
  }).join(`
3941
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, I.map(function(U) {
3942
- return U.fragment.mainEnd;
3943
- }).filter(function(U) {
3944
- return !!U;
3941
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_END/g, I.map(function(q) {
3942
+ return q.fragment.mainEnd;
3943
+ }).filter(function(q) {
3944
+ return !!q;
3945
3945
  }).join(`
3946
- `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, I.map(function(U) {
3947
- return U.fragment.mainModelColor;
3948
- }).filter(function(U) {
3949
- return !!U;
3946
+ `)), v.fragmentShader = v.fragmentShader.replace(/MAIN_MODEL_COLOR/g, I.map(function(q) {
3947
+ return q.fragment.mainModelColor;
3948
+ }).filter(function(q) {
3949
+ return !!q;
3950
3950
  }).join(`
3951
3951
  `));
3952
- var q = String(r.clippers.length);
3953
- v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, q), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, q);
3952
+ var U = String(r.clippers.length);
3953
+ v.vertexShader = v.vertexShader.replace(/NUM_CLIPPERS/g, U), v.fragmentShader = v.fragmentShader.replace(/NUM_CLIPPERS/g, U);
3954
3954
  for (var z = 0, J = I; z < J.length; z++) {
3955
3955
  var Q = J[z];
3956
3956
  Q.onBeforeCompile && Q.onBeforeCompile(v, E);
@@ -4368,8 +4368,8 @@ var scratchViewport$1 = new THREE.Vector4(), pbmUniforms = {
4368
4368
  var E = v[y];
4369
4369
  E in uniformsLib || (s[E] = void 0);
4370
4370
  }
4371
- for (var b = r.customShaders.filter(function(_) {
4372
- return _.type.includes(p);
4371
+ for (var b = r.customShaders.filter(function(H) {
4372
+ return H.type.includes(p);
4373
4373
  }), T = 0, S = b; T < S.length; T++) {
4374
4374
  var R = S[T];
4375
4375
  for (var M in R.uniforms)
@@ -4377,40 +4377,40 @@ var scratchViewport$1 = new THREE.Vector4(), pbmUniforms = {
4377
4377
  for (var w in R.defines)
4378
4378
  w in o || Object.assign(o, (h = {}, h[w] = R.defines[w], h));
4379
4379
  }
4380
- toFastProperties(s), toFastProperties(o), c.vertexShader = c.vertexShader.replace(/MAIN_BEFORE/g, b.map(function(_) {
4381
- return _.vertex.mainBefore;
4382
- }).filter(function(_) {
4383
- return !!_;
4380
+ toFastProperties(s), toFastProperties(o), c.vertexShader = c.vertexShader.replace(/MAIN_BEFORE/g, b.map(function(H) {
4381
+ return H.vertex.mainBefore;
4382
+ }).filter(function(H) {
4383
+ return !!H;
4384
4384
  }).join(`
4385
- `)), c.vertexShader = c.vertexShader.replace(/MAIN_START/g, b.map(function(_) {
4386
- return _.vertex.mainStart;
4387
- }).filter(function(_) {
4388
- return !!_;
4385
+ `)), c.vertexShader = c.vertexShader.replace(/MAIN_START/g, b.map(function(H) {
4386
+ return H.vertex.mainStart;
4387
+ }).filter(function(H) {
4388
+ return !!H;
4389
4389
  }).join(`
4390
- `)), c.vertexShader = c.vertexShader.replace(/MAIN_END/g, b.map(function(_) {
4391
- return _.vertex.mainEnd;
4392
- }).filter(function(_) {
4393
- return !!_;
4390
+ `)), c.vertexShader = c.vertexShader.replace(/MAIN_END/g, b.map(function(H) {
4391
+ return H.vertex.mainEnd;
4392
+ }).filter(function(H) {
4393
+ return !!H;
4394
4394
  }).join(`
4395
- `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_BEFORE/g, b.map(function(_) {
4396
- return _.fragment.mainBefore;
4397
- }).filter(function(_) {
4398
- return !!_;
4395
+ `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_BEFORE/g, b.map(function(H) {
4396
+ return H.fragment.mainBefore;
4397
+ }).filter(function(H) {
4398
+ return !!H;
4399
4399
  }).join(`
4400
- `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_START/g, b.map(function(_) {
4401
- return _.fragment.mainStart;
4402
- }).filter(function(_) {
4403
- return !!_;
4400
+ `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_START/g, b.map(function(H) {
4401
+ return H.fragment.mainStart;
4402
+ }).filter(function(H) {
4403
+ return !!H;
4404
4404
  }).join(`
4405
- `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_END/g, b.map(function(_) {
4406
- return _.fragment.mainEnd;
4407
- }).filter(function(_) {
4408
- return !!_;
4405
+ `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_END/g, b.map(function(H) {
4406
+ return H.fragment.mainEnd;
4407
+ }).filter(function(H) {
4408
+ return !!H;
4409
4409
  }).join(`
4410
- `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_MODEL_COLOR/g, b.map(function(_) {
4411
- return _.fragment.mainModelColor;
4412
- }).filter(function(_) {
4413
- return !!_;
4410
+ `)), c.fragmentShader = c.fragmentShader.replace(/MAIN_MODEL_COLOR/g, b.map(function(H) {
4411
+ return H.fragment.mainModelColor;
4412
+ }).filter(function(H) {
4413
+ return !!H;
4414
4414
  }).join(`
4415
4415
  `));
4416
4416
  var P = String(r.clippers.length);
@@ -5201,21 +5201,21 @@ function ajax(n, t, e, r, o) {
5201
5201
  var P, O, C = now(), I = C - s;
5202
5202
  if (delete h[d], A.parentNode && A.parentNode.removeChild(A), p !== null && (window.clearTimeout(p), p = null), m !== !0) {
5203
5203
  if (w.indexOf("data:") !== 0) {
5204
- var _ = new NetworkResponseError(l, "XMLHttpRequest", 500);
5205
- r(_), f(_), (P = t.networkSubscribe) === null || P === void 0 || P.emit("network", l, "XMLHttpRequest", "error", _.message);
5204
+ var H = new NetworkResponseError(l, "XMLHttpRequest", 500);
5205
+ r(H), f(H), (P = t.networkSubscribe) === null || P === void 0 || P.emit("network", l, "XMLHttpRequest", "error", H.message);
5206
5206
  return;
5207
5207
  }
5208
- var H = w.split(","), L = (H[0].match(/:(.*?);/) || [])[1], k = H[1];
5208
+ var F = w.split(","), L = (F[0].match(/:(.*?);/) || [])[1], k = F[1];
5209
5209
  if (t.responseType === "arraybuffer" || t.responseType === "blob") {
5210
- for (var D = atob(H[1]), q = D.length, z = new Uint8Array(q), J = 0; J < q; J++)
5210
+ for (var D = atob(F[1]), U = D.length, z = new Uint8Array(U), J = 0; J < U; J++)
5211
5211
  z[J] = D.charCodeAt(J);
5212
5212
  t.responseType === "arraybuffer" ? k = z.buffer : k = new Blob([z], { type: L });
5213
5213
  }
5214
- var Q = {}, U = {
5214
+ var Q = {}, q = {
5215
5215
  body: k,
5216
5216
  meta: { origin: u, source: l, requestTime: s, responseTime: C, costs: I, headers: Q }
5217
5217
  };
5218
- e(U), c(U), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(U.meta)), m = !0;
5218
+ e(q), c(q), (O = t.networkSubscribe) === null || O === void 0 || O.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(q.meta)), m = !0;
5219
5219
  }
5220
5220
  };
5221
5221
  h[d] = y, A.src = l, document.body.appendChild(A), typeof t.timeout == "number" && (p = window.setTimeout(g, t.timeout));
@@ -5237,9 +5237,9 @@ function ajax(n, t, e, r, o) {
5237
5237
  var O = this.status;
5238
5238
  if (O === 0 || O >= 200 && O < 400) {
5239
5239
  v = !0, b();
5240
- var C = now(), I = C - s, _ = parseHeaders(this.getAllResponseHeaders()), H = w.total, L = {
5240
+ var C = now(), I = C - s, H = parseHeaders(this.getAllResponseHeaders()), F = w.total, L = {
5241
5241
  body: this.response,
5242
- meta: { origin: u, source: l, requestTime: s, responseTime: C, costs: I, headers: _, size: H }
5242
+ meta: { origin: u, source: l, requestTime: s, responseTime: C, costs: I, headers: H, size: F }
5243
5243
  };
5244
5244
  e(L), c(L), (P = t.networkSubscribe) === null || P === void 0 || P.emit("network", l, "XMLHttpRequest", "ok", JSON.stringify(L.meta));
5245
5245
  } else
@@ -5859,18 +5859,21 @@ var windowSTOContext = (function() {
5859
5859
  if (this.isAnimating !== !1) {
5860
5860
  var o = now(), s = o - t;
5861
5861
  t = o, deviceFrameTime = s;
5862
- for (var u = 0; u < this.frames.length; u++) {
5863
- var l = this.frames[u];
5864
- if (l.delay > 0) {
5865
- l.delay = l.delay - 1;
5862
+ for (var u = this.frames.slice(), l = 0; l < u.length; l++) {
5863
+ var c = u[l];
5864
+ if (c.delay > 0) {
5865
+ c.delay = c.delay - 1;
5866
5866
  continue;
5867
5867
  }
5868
5868
  try {
5869
- l.callback.apply(l, __spreadArray([o, s], e, !1));
5870
- } catch (c) {
5871
- console.error(c);
5869
+ c.callback.apply(c, __spreadArray([o, s], e, !1));
5870
+ } catch (d) {
5871
+ console.error(d);
5872
+ }
5873
+ if (c.once) {
5874
+ var f = this.frames.indexOf(c);
5875
+ this.frames.splice(f, 1);
5872
5876
  }
5873
- l.once && (this.frames.splice(u, 1), u--);
5874
5877
  }
5875
5878
  this.requestId = this.requestAnimationFrame(this.loop);
5876
5879
  }
@@ -6064,25 +6067,25 @@ var FACE_ORDER$2 = ["right", "left", "up", "down", "front", "back"], TextureLoad
6064
6067
  t[FACE_ORDER$2[4]],
6065
6068
  t[FACE_ORDER$2[5]]
6066
6069
  ], y = [], v = [0, 0, 0, 0, 0, 0], E = [], b = function(S) {
6067
- var R = (h = (d = e.imageURL) === null || d === void 0 ? void 0 : d.options) !== null && h !== void 0 ? h : { key: "unknown" }, M = applyImageURLOptions(g[S], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, R), { key: R.key + "." + FACE_ORDER$2[S] })), w = function(_) {
6068
- v[S] = _, s(v.reduce(function(H, L) {
6069
- return H + L;
6070
+ var R = (h = (d = e.imageURL) === null || d === void 0 ? void 0 : d.options) !== null && h !== void 0 ? h : { key: "unknown" }, M = applyImageURLOptions(g[S], (p = e.imageURL) === null || p === void 0 ? void 0 : p.transform, __assign(__assign({}, R), { key: R.key + "." + FACE_ORDER$2[S] })), w = function(H) {
6071
+ v[S] = H, s(v.reduce(function(F, L) {
6072
+ return F + L;
6070
6073
  }, 0) / 6);
6071
6074
  }, P = (m = e.viaAjax) !== null && m !== void 0 ? m : !1;
6072
6075
  if (P) {
6073
- var O = "blob", C = e.fetcher.ajax(M, { timeout: e.timeout, responseType: O }, void 0, void 0, w).then(function(_) {
6074
- return E[S] = _.meta, createImageBitmapLike(_.body);
6076
+ var O = "blob", C = e.fetcher.ajax(M, { timeout: e.timeout, responseType: O }, void 0, void 0, w).then(function(H) {
6077
+ return E[S] = H.meta, createImageBitmapLike(H.body);
6075
6078
  });
6076
6079
  y.push(C);
6077
6080
  } else {
6078
6081
  var I, C = Promise.resolve().then(function() {
6079
6082
  return createImageBitmapLikeImage();
6080
- }).then(function(H) {
6081
- return I = H, e.fetcher.loadImage(M, { timeout: e.timeout }, void 0, void 0, w, H);
6082
- }).then(function(H) {
6083
- return E[S] = H.meta, H.body;
6084
- }).catch(function(H) {
6085
- return I && I.close(), Promise.reject(H);
6083
+ }).then(function(F) {
6084
+ return I = F, e.fetcher.loadImage(M, { timeout: e.timeout }, void 0, void 0, w, F);
6085
+ }).then(function(F) {
6086
+ return E[S] = F.meta, F.body;
6087
+ }).catch(function(F) {
6088
+ return I && I.close(), Promise.reject(F);
6086
6089
  });
6087
6090
  y.push(C);
6088
6091
  }
@@ -7451,21 +7454,21 @@ function parsePBMModel(n) {
7451
7454
  var h = T[R];
7452
7455
  S += h.faces.indices.length;
7453
7456
  }
7454
- for (var M = new Float32Array(S * 3), w = new Float32Array(S * 2), P = new Float32Array(S * 3), O = c ? new Float32Array(S) : void 0, C = [], I = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], _ = 0, H = 0; H < T.length; H++) {
7455
- for (var L = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[H], k = h.vertices.xyz, D = h.vertices.uvs, q = h.faces.indices, z = h.faces.normals, J = h.vertices.marks, Q = q.length, R = 0; R < Q; R++) {
7456
- var U = q[R], j = M[_ * 3 + R * 3] = k[U * 3], G = M[_ * 3 + R * 3 + 1] = k[U * 3 + 1], oe = M[_ * 3 + R * 3 + 2] = k[U * 3 + 2];
7457
- O && (O[_ + R] = J[U]), w[_ * 2 + R * 2] = D[U * 2], w[_ * 2 + R * 2 + 1] = D[U * 2 + 1];
7457
+ for (var M = new Float32Array(S * 3), w = new Float32Array(S * 2), P = new Float32Array(S * 3), O = c ? new Float32Array(S) : void 0, C = [], I = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], H = 0, F = 0; F < T.length; F++) {
7458
+ for (var L = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[F], k = h.vertices.xyz, D = h.vertices.uvs, U = h.faces.indices, z = h.faces.normals, J = h.vertices.marks, Q = U.length, R = 0; R < Q; R++) {
7459
+ var q = U[R], j = M[H * 3 + R * 3] = k[q * 3], G = M[H * 3 + R * 3 + 1] = k[q * 3 + 1], oe = M[H * 3 + R * 3 + 2] = k[q * 3 + 2];
7460
+ O && (O[H + R] = J[q]), w[H * 2 + R * 2] = D[q * 2], w[H * 2 + R * 2 + 1] = D[q * 2 + 1];
7458
7461
  var ee = Math.floor(R / 3) * 3;
7459
- P[_ * 3 + R * 3] = z[ee], P[_ * 3 + R * 3 + 1] = z[ee + 1], P[_ * 3 + R * 3 + 2] = z[ee + 2], j < L[0] && (L[0] = j), G < L[1] && (L[1] = G), oe < L[2] && (L[2] = oe), j > L[3] && (L[3] = j), G > L[4] && (L[4] = G), oe > L[5] && (L[5] = oe);
7462
+ P[H * 3 + R * 3] = z[ee], P[H * 3 + R * 3 + 1] = z[ee + 1], P[H * 3 + R * 3 + 2] = z[ee + 2], j < L[0] && (L[0] = j), G < L[1] && (L[1] = G), oe < L[2] && (L[2] = oe), j > L[3] && (L[3] = j), G > L[4] && (L[4] = G), oe > L[5] && (L[5] = oe);
7460
7463
  }
7461
7464
  L[0] < I[0] && (I[0] = L[0]), L[1] < I[1] && (I[1] = L[1]), L[2] < I[2] && (I[2] = L[2]), L[3] > I[3] && (I[3] = L[3]), L[4] > I[4] && (I[4] = L[4]), L[5] > I[5] && (I[5] = L[5]), C.push({
7462
- materialIndex: H,
7465
+ materialIndex: F,
7463
7466
  name: h.name,
7464
7467
  chunkName: parseChunkName(h.name),
7465
- start: _,
7468
+ start: H,
7466
7469
  count: h.faces.indices.length,
7467
7470
  texture: (e = h.texture) !== null && e !== void 0 ? e : void 0
7468
- }), _ += Q;
7471
+ }), H += Q;
7469
7472
  }
7470
7473
  var Z = {
7471
7474
  createAt: o,
@@ -7485,22 +7488,22 @@ function parsePBMModel(n) {
7485
7488
  var h = T[R];
7486
7489
  $ += h.vertices.xyz.length / 3, S += h.faces.indices.length;
7487
7490
  }
7488
- for (var M = new Float32Array($ * 3), w = new Float32Array($ * 2), P = void 0, X = new Float32Array($), ne = new Uint32Array(S), O = c ? new Float32Array(S) : void 0, C = [], I = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], W = 0, _ = 0, H = 0; H < T.length; H++) {
7489
- for (var L = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[H], k = h.vertices.xyz, K = h.vertices.marks, D = h.vertices.uvs, q = h.faces.indices, re = k.length / 3, Q = q.length, R = 0; R < re; R++) {
7490
- var j = M[_ * 3 + R * 3] = k[R * 3], G = M[_ * 3 + R * 3 + 1] = k[R * 3 + 1], oe = M[_ * 3 + R * 3 + 2] = k[R * 3 + 2];
7491
- O && (O[_ + R] = K[R]), w[_ * 2 + R * 2] = D[R * 2], w[_ * 2 + R * 2 + 1] = D[R * 2 + 1], X[_ + R] = b, j < L[0] && (L[0] = j), G < L[1] && (L[1] = G), oe < L[2] && (L[2] = oe), j > L[3] && (L[3] = j), G > L[4] && (L[4] = G), oe > L[5] && (L[5] = oe);
7491
+ for (var M = new Float32Array($ * 3), w = new Float32Array($ * 2), P = void 0, X = new Float32Array($), ne = new Uint32Array(S), O = c ? new Float32Array(S) : void 0, C = [], I = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], W = 0, H = 0, F = 0; F < T.length; F++) {
7492
+ for (var L = [1 / 0, 1 / 0, 1 / 0, -1 / 0, -1 / 0, -1 / 0], h = T[F], k = h.vertices.xyz, K = h.vertices.marks, D = h.vertices.uvs, U = h.faces.indices, re = k.length / 3, Q = U.length, R = 0; R < re; R++) {
7493
+ var j = M[H * 3 + R * 3] = k[R * 3], G = M[H * 3 + R * 3 + 1] = k[R * 3 + 1], oe = M[H * 3 + R * 3 + 2] = k[R * 3 + 2];
7494
+ O && (O[H + R] = K[R]), w[H * 2 + R * 2] = D[R * 2], w[H * 2 + R * 2 + 1] = D[R * 2 + 1], X[H + R] = b, j < L[0] && (L[0] = j), G < L[1] && (L[1] = G), oe < L[2] && (L[2] = oe), j > L[3] && (L[3] = j), G > L[4] && (L[4] = G), oe > L[5] && (L[5] = oe);
7492
7495
  }
7493
7496
  L[0] < I[0] && (I[0] = L[0]), L[1] < I[1] && (I[1] = L[1]), L[2] < I[2] && (I[2] = L[2]), L[3] > I[3] && (I[3] = L[3]), L[4] > I[4] && (I[4] = L[4]), L[5] > I[5] && (I[5] = L[5]);
7494
7497
  for (var R = 0; R < Q; R++)
7495
- ne[W + R] = _ + q[R];
7498
+ ne[W + R] = H + U[R];
7496
7499
  C.push({
7497
- materialIndex: H,
7500
+ materialIndex: F,
7498
7501
  name: h.name,
7499
7502
  chunkName: parseChunkName(h.name),
7500
7503
  start: W,
7501
7504
  count: h.faces.indices.length,
7502
7505
  texture: (r = h.texture) !== null && r !== void 0 ? r : void 0
7503
- }), _ += re, W += Q;
7506
+ }), H += re, W += Q;
7504
7507
  }
7505
7508
  var Z = {
7506
7509
  createAt: o,
@@ -7543,19 +7546,19 @@ function parse$4(n, t, e, r, o, s, u) {
7543
7546
  C.min.x = O[0], C.min.y = O[1], C.min.z = O[2], C.max.x = O[3], C.max.y = O[4], C.max.z = O[5];
7544
7547
  var I = new THREE.BufferGeometry();
7545
7548
  I.setAttribute("position", new THREE.BufferAttribute(b, 3)), I.setAttribute("uv", new THREE.BufferAttribute(S, 2)), R && I.setAttribute("normal", new THREE.BufferAttribute(R, 3)), T && I.setAttribute("_feature_id_rsmask", new THREE.BufferAttribute(T, 1)), M && I.setIndex(new THREE.BufferAttribute(M, 1)), I.boundingBox = C, I.boundingSphere = C.getBoundingSphere(new THREE.Sphere());
7546
- for (var _ = 0, H = P; _ < H.length; _++) {
7547
- var L = H[_];
7549
+ for (var H = 0, F = P; H < F.length; H++) {
7550
+ var L = F[H];
7548
7551
  I.addGroup(L.start, L.count, L.materialIndex);
7549
7552
  }
7550
7553
  p.add(I);
7551
- for (var k = [], D = 0, q = P; D < q.length; D++) {
7552
- var L = q[D], z = void 0;
7554
+ for (var k = [], D = 0, U = P; D < U.length; D++) {
7555
+ var L = U[D], z = void 0;
7553
7556
  if (L.texture) {
7554
7557
  if (z = L.texture, r.length > 0 && r.indexOf(L.texture) === -1) {
7555
7558
  for (var J = 0, Q = r; J < Q.length; J++) {
7556
- var U = Q[J], j = isAbsoluteURL(U) ? U : pathJoin(e, U), G = j.slice(L.texture.length * -1) === L.texture;
7559
+ var q = Q[J], j = isAbsoluteURL(q) ? q : pathJoin(e, q), G = j.slice(L.texture.length * -1) === L.texture;
7557
7560
  if (G) {
7558
- z = U;
7561
+ z = q;
7559
7562
  break;
7560
7563
  }
7561
7564
  }
@@ -8564,9 +8567,9 @@ function parse$3(n, t, e, r, o) {
8564
8567
  for (var P = new THREE.Group(), O = 0; O < T.length; O++) {
8565
8568
  var C = parseGeometry(T[O].geometry);
8566
8569
  C.applyMatrix4(d), d.decompose(h, p, m), m.x * m.y * m.z < 0 && C.attributes.normal && C.attributes.position && C.attributes.uv && flipBufferGeometryNormals(C), l.add(C);
8567
- for (var I = [], _ = 0, H = T[O].material; _ < H.length; _++) {
8568
- var L = H[_], k = parseMaterial(L, t, e || "", r, f, o, A, l, g), D = k.material, q = k.textureReady;
8569
- u.push(q), I.push(D);
8570
+ for (var I = [], H = 0, F = T[O].material; H < F.length; H++) {
8571
+ var L = F[H], k = parseMaterial(L, t, e || "", r, f, o, A, l, g), D = k.material, U = k.textureReady;
8572
+ u.push(U), I.push(D);
8570
8573
  }
8571
8574
  var z = new PBMMesh(C, I);
8572
8575
  z.name = "chunk_" + O, z.matrix.compose(z.position, z.quaternion, z.scale), z.matrixAutoUpdate = !1, z.frustumCulled = !1, P.add(z);
@@ -8988,8 +8991,8 @@ var Parser = (
8988
8991
  Promise.all(m),
8989
8992
  Promise.all(A)
8990
8993
  ]).then(function(M) {
8991
- for (var w = M[0], P = M[1], O = M[2], C = M[3], I = M[4], _ = [], H = function(q, z) {
8992
- var J = w[q], Q = P[q], U = O[q], j = C[q], G = I[q];
8994
+ for (var w = M[0], P = M[1], O = M[2], C = M[3], I = M[4], H = [], F = function(U, z) {
8995
+ var J = w[U], Q = P[U], q = O[U], j = C[U], G = I[U];
8993
8996
  if (J === void 0)
8994
8997
  return "continue";
8995
8998
  J.updateMatrix(), J.matrixAutoUpdate = !0;
@@ -9011,20 +9014,20 @@ var Parser = (
9011
9014
  PATH_PROPERTIES[G.path] === PATH_PROPERTIES.weights ? J.traverse(function(ie) {
9012
9015
  ie.morphTargetInfluences && $.push(ie.name ? ie.name : ie.uuid);
9013
9016
  }) : $.push(ee);
9014
- var X = U.array;
9015
- if (U.normalized) {
9017
+ var X = q.array;
9018
+ if (q.normalized) {
9016
9019
  for (var ne = getNormalizedComponentScale(X.constructor), W = new Float32Array(X.length), K = 0, re = X.length; K < re; K++)
9017
9020
  W[K] = X[K] * ne;
9018
9021
  X = W;
9019
9022
  }
9020
9023
  for (var K = 0, re = $.length; K < re; K++) {
9021
9024
  var te = new oe($[K] + "." + PATH_PROPERTIES[G.path], Q.array, X, Z);
9022
- _.push(te);
9025
+ H.push(te);
9023
9026
  }
9024
9027
  }, L = 0, k = w.length; L < k; L++)
9025
- H(L);
9028
+ F(L);
9026
9029
  var D = f.name ? f.name : "animation_" + t;
9027
- return new THREE.AnimationClip(D, void 0, _);
9030
+ return new THREE.AnimationClip(D, void 0, H);
9028
9031
  });
9029
9032
  }
9030
9033
  return this.cache.set(e, o), o;
@@ -9087,9 +9090,9 @@ var Parser = (
9087
9090
  if (u.sparse !== void 0) {
9088
9091
  var R = WEBGL_TYPE_SIZES.SCALAR, M = WEBGL_COMPONENT_TYPES[u.sparse.indices.componentType], w = u.sparse.indices.byteOffset || 0, P = u.sparse.values.byteOffset || 0, O = new M(c[1], w, u.sparse.count * R), C = new h(c[2], P, u.sparse.count * d);
9089
9092
  f !== null && (E = new THREE.BufferAttribute(E.array.slice(), E.itemSize, E.normalized));
9090
- for (var I = 0, _ = O.length; I < _; I++) {
9091
- var H = O[I];
9092
- if (E.setX(H, C[I * d]), d >= 2 && E.setY(H, C[I * d + 1]), d >= 3 && E.setZ(H, C[I * d + 2]), d >= 4 && E.setW(H, C[I * d + 3]), d >= 5)
9093
+ for (var I = 0, H = O.length; I < H; I++) {
9094
+ var F = O[I];
9095
+ if (E.setX(F, C[I * d]), d >= 2 && E.setY(F, C[I * d + 1]), d >= 3 && E.setZ(F, C[I * d + 2]), d >= 4 && E.setW(F, C[I * d + 3]), d >= 5)
9093
9096
  throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
9094
9097
  }
9095
9098
  }
@@ -9462,11 +9465,11 @@ var Parser = (
9462
9465
  return t;
9463
9466
  var O = [];
9464
9467
  t.morphTargetsRelative = !0;
9465
- for (var C = function(I, _) {
9466
- var H = e.targets[I];
9467
- S ? O.push(r.loadAccessor(H.POSITION).then(function(L) {
9468
+ for (var C = function(I, H) {
9469
+ var F = e.targets[I];
9470
+ S ? O.push(r.loadAccessor(F.POSITION).then(function(L) {
9468
9471
  L && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[I] = L);
9469
- })) : t.attributes.position && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[I] = t.attributes.position), R ? O.push(r.loadAccessor(H.NORMAL).then(function(L) {
9472
+ })) : t.attributes.position && (t.morphAttributes.position = t.morphAttributes.position || [], t.morphAttributes.position[I] = t.attributes.position), R ? O.push(r.loadAccessor(F.NORMAL).then(function(L) {
9470
9473
  L && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[I] = L);
9471
9474
  })) : t.attributes.normal && (t.morphAttributes.normal = t.morphAttributes.normal || [], t.morphAttributes.normal[I] = t.attributes.normal);
9472
9475
  }, M = 0, w = e.targets.length; M < w; M++)
@@ -11671,8 +11674,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11671
11674
  for (var P = new u8(w), O = new u8(19), C = 0; C < M; ++C)
11672
11675
  O[clim[C]] = bits(n, h + C * 3, 7);
11673
11676
  h += M * 3;
11674
- for (var I = max(O), _ = (1 << I) - 1, H = hMap(O, I, 1), C = 0; C < w; ) {
11675
- var L = H[bits(n, h, _)];
11677
+ for (var I = max(O), H = (1 << I) - 1, F = hMap(O, I, 1), C = 0; C < w; ) {
11678
+ var L = F[bits(n, h, H)];
11676
11679
  h += L & 15;
11677
11680
  var b = L >> 4;
11678
11681
  if (b < 16)
@@ -11683,8 +11686,8 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11683
11686
  P[C++] = k;
11684
11687
  }
11685
11688
  }
11686
- var q = P.subarray(0, R), z = P.subarray(R);
11687
- g = max(q), y = max(z), m = hMap(q, g, 1), A = hMap(z, y, 1);
11689
+ var U = P.subarray(0, R), z = P.subarray(R);
11690
+ g = max(U), y = max(z), m = hMap(U, g, 1), A = hMap(z, y, 1);
11688
11691
  } else
11689
11692
  err(1);
11690
11693
  else {
@@ -11702,7 +11705,7 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11702
11705
  }
11703
11706
  }
11704
11707
  l && f(p + 131072);
11705
- for (var J = (1 << g) - 1, Q = (1 << y) - 1, U = h; ; U = h) {
11708
+ for (var J = (1 << g) - 1, Q = (1 << y) - 1, q = h; ; q = h) {
11706
11709
  var k = m[bits16(n, h) & J], j = k >> 4;
11707
11710
  if (h += k & 15, h > v) {
11708
11711
  c && err(0);
@@ -11711,7 +11714,7 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11711
11714
  if (k || err(2), j < 256)
11712
11715
  e[p++] = j;
11713
11716
  else if (j == 256) {
11714
- U = h, m = null;
11717
+ q = h, m = null;
11715
11718
  break;
11716
11719
  } else {
11717
11720
  var G = j - 254;
@@ -11741,7 +11744,7 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
11741
11744
  e[p] = e[p - z];
11742
11745
  }
11743
11746
  }
11744
- t.l = m, t.p = U, t.b = p, t.f = d, m && (d = 1, t.m = g, t.d = A, t.n = y);
11747
+ t.l = m, t.p = q, t.b = p, t.f = d, m && (d = 1, t.m = g, t.d = A, t.n = y);
11745
11748
  } while (!d);
11746
11749
  return p != e.length && u ? slc(e, 0, p) : e.subarray(0, p);
11747
11750
  }, et = /* @__PURE__ */ new u8(0), b2 = function(n, t) {
@@ -12440,11 +12443,11 @@ var FBXTreeParser = (
12440
12443
  var T = [0, 0, 0, 0], S = [0, 0, 0, 0];
12441
12444
  E.forEach(function(M, w) {
12442
12445
  var P = M, O = v[w];
12443
- S.forEach(function(C, I, _) {
12446
+ S.forEach(function(C, I, H) {
12444
12447
  if (P > C) {
12445
- _[I] = P, P = C;
12446
- var H = T[I];
12447
- T[I] = O, O = H;
12448
+ H[I] = P, P = C;
12449
+ var F = T[I];
12450
+ T[I] = O, O = F;
12448
12451
  }
12449
12452
  });
12450
12453
  }), v = T, E = S;
@@ -12490,9 +12493,9 @@ var FBXTreeParser = (
12490
12493
  h = THREE.ShapeUtils.triangulateShape(E, []);
12491
12494
  } else
12492
12495
  h = [[0, 1, 2]];
12493
- for (var R = function(_, H, L) {
12494
- t.vertex.push(e.vertexPositions[r[_ * 3]]), t.vertex.push(e.vertexPositions[r[_ * 3 + 1]]), t.vertex.push(e.vertexPositions[r[_ * 3 + 2]]), t.vertex.push(e.vertexPositions[r[H * 3]]), t.vertex.push(e.vertexPositions[r[H * 3 + 1]]), t.vertex.push(e.vertexPositions[r[H * 3 + 2]]), t.vertex.push(e.vertexPositions[r[L * 3]]), t.vertex.push(e.vertexPositions[r[L * 3 + 1]]), t.vertex.push(e.vertexPositions[r[L * 3 + 2]]), e.skeleton && (t.vertexWeights.push(c[_ * 4]), t.vertexWeights.push(c[_ * 4 + 1]), t.vertexWeights.push(c[_ * 4 + 2]), t.vertexWeights.push(c[_ * 4 + 3]), t.vertexWeights.push(c[H * 4]), t.vertexWeights.push(c[H * 4 + 1]), t.vertexWeights.push(c[H * 4 + 2]), t.vertexWeights.push(c[H * 4 + 3]), t.vertexWeights.push(c[L * 4]), t.vertexWeights.push(c[L * 4 + 1]), t.vertexWeights.push(c[L * 4 + 2]), t.vertexWeights.push(c[L * 4 + 3]), t.weightsIndices.push(f[_ * 4]), t.weightsIndices.push(f[_ * 4 + 1]), t.weightsIndices.push(f[_ * 4 + 2]), t.weightsIndices.push(f[_ * 4 + 3]), t.weightsIndices.push(f[H * 4]), t.weightsIndices.push(f[H * 4 + 1]), t.weightsIndices.push(f[H * 4 + 2]), t.weightsIndices.push(f[H * 4 + 3]), t.weightsIndices.push(f[L * 4]), t.weightsIndices.push(f[L * 4 + 1]), t.weightsIndices.push(f[L * 4 + 2]), t.weightsIndices.push(f[L * 4 + 3])), e.color && (t.colors.push(u[_ * 3]), t.colors.push(u[_ * 3 + 1]), t.colors.push(u[_ * 3 + 2]), t.colors.push(u[H * 3]), t.colors.push(u[H * 3 + 1]), t.colors.push(u[H * 3 + 2]), t.colors.push(u[L * 3]), t.colors.push(u[L * 3 + 1]), t.colors.push(u[L * 3 + 2])), e.material && e.material.mappingType !== "AllSame" && (t.materialIndex.push(o), t.materialIndex.push(o), t.materialIndex.push(o)), e.normal && (t.normal.push(s[_ * 3]), t.normal.push(s[_ * 3 + 1]), t.normal.push(s[_ * 3 + 2]), t.normal.push(s[H * 3]), t.normal.push(s[H * 3 + 1]), t.normal.push(s[H * 3 + 2]), t.normal.push(s[L * 3]), t.normal.push(s[L * 3 + 1]), t.normal.push(s[L * 3 + 2])), e.uv && e.uv.forEach(function(k, D) {
12495
- t.uvs[D] === void 0 && (t.uvs[D] = []), t.uvs[D].push(l[D][_ * 2]), t.uvs[D].push(l[D][_ * 2 + 1]), t.uvs[D].push(l[D][H * 2]), t.uvs[D].push(l[D][H * 2 + 1]), t.uvs[D].push(l[D][L * 2]), t.uvs[D].push(l[D][L * 2 + 1]);
12496
+ for (var R = function(H, F, L) {
12497
+ t.vertex.push(e.vertexPositions[r[H * 3]]), t.vertex.push(e.vertexPositions[r[H * 3 + 1]]), t.vertex.push(e.vertexPositions[r[H * 3 + 2]]), t.vertex.push(e.vertexPositions[r[F * 3]]), t.vertex.push(e.vertexPositions[r[F * 3 + 1]]), t.vertex.push(e.vertexPositions[r[F * 3 + 2]]), t.vertex.push(e.vertexPositions[r[L * 3]]), t.vertex.push(e.vertexPositions[r[L * 3 + 1]]), t.vertex.push(e.vertexPositions[r[L * 3 + 2]]), e.skeleton && (t.vertexWeights.push(c[H * 4]), t.vertexWeights.push(c[H * 4 + 1]), t.vertexWeights.push(c[H * 4 + 2]), t.vertexWeights.push(c[H * 4 + 3]), t.vertexWeights.push(c[F * 4]), t.vertexWeights.push(c[F * 4 + 1]), t.vertexWeights.push(c[F * 4 + 2]), t.vertexWeights.push(c[F * 4 + 3]), t.vertexWeights.push(c[L * 4]), t.vertexWeights.push(c[L * 4 + 1]), t.vertexWeights.push(c[L * 4 + 2]), t.vertexWeights.push(c[L * 4 + 3]), t.weightsIndices.push(f[H * 4]), t.weightsIndices.push(f[H * 4 + 1]), t.weightsIndices.push(f[H * 4 + 2]), t.weightsIndices.push(f[H * 4 + 3]), t.weightsIndices.push(f[F * 4]), t.weightsIndices.push(f[F * 4 + 1]), t.weightsIndices.push(f[F * 4 + 2]), t.weightsIndices.push(f[F * 4 + 3]), t.weightsIndices.push(f[L * 4]), t.weightsIndices.push(f[L * 4 + 1]), t.weightsIndices.push(f[L * 4 + 2]), t.weightsIndices.push(f[L * 4 + 3])), e.color && (t.colors.push(u[H * 3]), t.colors.push(u[H * 3 + 1]), t.colors.push(u[H * 3 + 2]), t.colors.push(u[F * 3]), t.colors.push(u[F * 3 + 1]), t.colors.push(u[F * 3 + 2]), t.colors.push(u[L * 3]), t.colors.push(u[L * 3 + 1]), t.colors.push(u[L * 3 + 2])), e.material && e.material.mappingType !== "AllSame" && (t.materialIndex.push(o), t.materialIndex.push(o), t.materialIndex.push(o)), e.normal && (t.normal.push(s[H * 3]), t.normal.push(s[H * 3 + 1]), t.normal.push(s[H * 3 + 2]), t.normal.push(s[F * 3]), t.normal.push(s[F * 3 + 1]), t.normal.push(s[F * 3 + 2]), t.normal.push(s[L * 3]), t.normal.push(s[L * 3 + 1]), t.normal.push(s[L * 3 + 2])), e.uv && e.uv.forEach(function(k, D) {
12498
+ t.uvs[D] === void 0 && (t.uvs[D] = []), t.uvs[D].push(l[D][H * 2]), t.uvs[D].push(l[D][H * 2 + 1]), t.uvs[D].push(l[D][F * 2]), t.uvs[D].push(l[D][F * 2 + 1]), t.uvs[D].push(l[D][L * 2]), t.uvs[D].push(l[D][L * 2 + 1]);
12496
12499
  });
12497
12500
  }, M = 0, w = h; M < w.length; M++) {
12498
12501
  var P = w[M], O = P[0], C = P[1], I = P[2];
@@ -13198,8 +13201,8 @@ function generateTransform(n) {
13198
13201
  var M = new THREE.Matrix4().scale(new THREE.Vector3().setFromMatrixScale(h)), w = new THREE.Matrix4().getInverse(M), P = T.clone().multiply(w);
13199
13202
  R.copy(v).multiply(y).multiply(P).multiply(S);
13200
13203
  }
13201
- var O = new THREE.Matrix4().getInverse(f), C = new THREE.Matrix4().getInverse(u), I = t.clone().multiply(c).multiply(f).multiply(e).multiply(r).multiply(o).multiply(O).multiply(l).multiply(u).multiply(s).multiply(C), _ = new THREE.Matrix4().copyPosition(I), H = d.clone().multiply(_);
13202
- return p.copyPosition(H), I = p.clone().multiply(R), I.premultiply(new THREE.Matrix4().getInverse(d)), I;
13204
+ var O = new THREE.Matrix4().getInverse(f), C = new THREE.Matrix4().getInverse(u), I = t.clone().multiply(c).multiply(f).multiply(e).multiply(r).multiply(o).multiply(O).multiply(l).multiply(u).multiply(s).multiply(C), H = new THREE.Matrix4().copyPosition(I), F = d.clone().multiply(H);
13205
+ return p.copyPosition(F), I = p.clone().multiply(R), I.premultiply(new THREE.Matrix4().getInverse(d)), I;
13203
13206
  }
13204
13207
  function getEulerOrder(n) {
13205
13208
  n = n || 0;
@@ -13433,7 +13436,7 @@ function loadX3p(n, t) {
13433
13436
  });
13434
13437
  }
13435
13438
  function parse$1(n, t) {
13436
- for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, b, T, S, R, M, w, P, O, C, I, _, H, L, k, D, q, z, J, Q, U, j, G, oe, ee, Z, $, X, ne, W, K, re, te, ie, ve, ae, fe, Ee, se = unzipSync(n), le = "", me = null, ge = 0, Ae = Object.keys(se); ge < Ae.length; ge++) {
13439
+ for (var e, r, o, s, u, l, c, f, d, h, p, m, A, g, y, v, E, b, T, S, R, M, w, P, O, C, I, H, F, L, k, D, U, z, J, Q, q, j, G, oe, ee, Z, $, X, ne, W, K, re, te, ie, ve, ae, fe, Ee, se = unzipSync(n), le = "", me = null, ge = 0, Ae = Object.keys(se); ge < Ae.length; ge++) {
13437
13440
  var ue = Ae[ge];
13438
13441
  /(^|\/)main\.xml$/i.test(ue) && (me = se[ue], le = ue.slice(0, ue.lastIndexOf("/") + 1));
13439
13442
  }
@@ -13457,11 +13460,11 @@ function parse$1(n, t) {
13457
13460
  z: {
13458
13461
  type: (P = (w = (M = he == null ? void 0 : he.querySelector("CZ AxisType")) === null || M === void 0 ? void 0 : M.textContent) === null || w === void 0 ? void 0 : w.toUpperCase()) !== null && P !== void 0 ? P : "A",
13459
13462
  dataType: (I = (C = (O = he == null ? void 0 : he.querySelector("CZ DataType")) === null || O === void 0 ? void 0 : O.textContent) === null || C === void 0 ? void 0 : C.toUpperCase()) !== null && I !== void 0 ? I : "D",
13460
- increment: Number((H = (_ = he == null ? void 0 : he.querySelector("CZ Increment")) === null || _ === void 0 ? void 0 : _.textContent) !== null && H !== void 0 ? H : "1"),
13463
+ increment: Number((F = (H = he == null ? void 0 : he.querySelector("CZ Increment")) === null || H === void 0 ? void 0 : H.textContent) !== null && F !== void 0 ? F : "1"),
13461
13464
  offset: Number((k = (L = he == null ? void 0 : he.querySelector("CZ Offset")) === null || L === void 0 ? void 0 : L.textContent) !== null && k !== void 0 ? k : "0")
13462
13465
  }
13463
13466
  }, ye = null, Be = xe.querySelector("Record1 Axes Rotation");
13464
- Be && (ye = new THREE.Matrix3(), ye.set(Number((q = (D = Be.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && q !== void 0 ? q : 0), Number((J = (z = Be.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && J !== void 0 ? J : 0), Number((U = (Q = Be.querySelector("r13")) === null || Q === void 0 ? void 0 : Q.textContent) !== null && U !== void 0 ? U : 0), Number((G = (j = Be.querySelector("r21")) === null || j === void 0 ? void 0 : j.textContent) !== null && G !== void 0 ? G : 0), Number((ee = (oe = Be.querySelector("r22")) === null || oe === void 0 ? void 0 : oe.textContent) !== null && ee !== void 0 ? ee : 0), Number(($ = (Z = Be.querySelector("r23")) === null || Z === void 0 ? void 0 : Z.textContent) !== null && $ !== void 0 ? $ : 0), Number((ne = (X = Be.querySelector("r31")) === null || X === void 0 ? void 0 : X.textContent) !== null && ne !== void 0 ? ne : 0), Number((K = (W = Be.querySelector("r32")) === null || W === void 0 ? void 0 : W.textContent) !== null && K !== void 0 ? K : 0), Number((te = (re = Be.querySelector("r33")) === null || re === void 0 ? void 0 : re.textContent) !== null && te !== void 0 ? te : 0)));
13467
+ Be && (ye = new THREE.Matrix3(), ye.set(Number((U = (D = Be.querySelector("r11")) === null || D === void 0 ? void 0 : D.textContent) !== null && U !== void 0 ? U : 0), Number((J = (z = Be.querySelector("r12")) === null || z === void 0 ? void 0 : z.textContent) !== null && J !== void 0 ? J : 0), Number((q = (Q = Be.querySelector("r13")) === null || Q === void 0 ? void 0 : Q.textContent) !== null && q !== void 0 ? q : 0), Number((G = (j = Be.querySelector("r21")) === null || j === void 0 ? void 0 : j.textContent) !== null && G !== void 0 ? G : 0), Number((ee = (oe = Be.querySelector("r22")) === null || oe === void 0 ? void 0 : oe.textContent) !== null && ee !== void 0 ? ee : 0), Number(($ = (Z = Be.querySelector("r23")) === null || Z === void 0 ? void 0 : Z.textContent) !== null && $ !== void 0 ? $ : 0), Number((ne = (X = Be.querySelector("r31")) === null || X === void 0 ? void 0 : X.textContent) !== null && ne !== void 0 ? ne : 0), Number((K = (W = Be.querySelector("r32")) === null || W === void 0 ? void 0 : W.textContent) !== null && K !== void 0 ? K : 0), Number((te = (re = Be.querySelector("r33")) === null || re === void 0 ? void 0 : re.textContent) !== null && te !== void 0 ? te : 0)));
13465
13468
  var Ie = (ie = xe.querySelector("Record3 DataLink PointDataLink")) === null || ie === void 0 ? void 0 : ie.textContent;
13466
13469
  if (typeof Ie != "string")
13467
13470
  throw new Error("X3p: PointDataLink not found.");
@@ -14112,19 +14115,19 @@ var BVHVector3 = (
14112
14115
  }
14113
14116
  var C = new BVHNode(++d, o, 0, s, 0);
14114
14117
  c[f++] = C;
14115
- var I = [], _ = [0, 1, 2], H = function(k, D) {
14118
+ var I = [], H = [0, 1, 2], F = function(k, D) {
14116
14119
  return I[D] - I[k];
14117
14120
  };
14118
14121
  function L(k) {
14119
- var D = k.startIndex, q = k.endIndex, z = k.extents;
14120
- I[0] = z[3] - z[0], I[1] = z[4] - z[1], I[2] = z[5] - z[2], _.sort(H);
14122
+ var D = k.startIndex, U = k.endIndex, z = k.extents;
14123
+ I[0] = z[3] - z[0], I[1] = z[4] - z[1], I[2] = z[5] - z[2], H.sort(F);
14121
14124
  for (var J = 0; J < 3; J++) {
14122
- for (var Q = _[J], U = z[Q] + z[Q + 3], j = D, G = q - 1, oe = -1, ee = void 0; j <= G; )
14123
- oe === -1 ? (ee = u[j], l[ee * 6 + Q] + l[ee * 6 + Q + 3] < U ? j++ : oe = ee) : (ee = u[G], l[ee * 6 + Q] + l[ee * 6 + Q + 3] >= U || (u[j] = ee, u[G] = oe, oe = -1, j++), G--);
14124
- if (j > D && j < q) {
14125
+ for (var Q = H[J], q = z[Q] + z[Q + 3], j = D, G = U - 1, oe = -1, ee = void 0; j <= G; )
14126
+ oe === -1 ? (ee = u[j], l[ee * 6 + Q] + l[ee * 6 + Q + 3] < q ? j++ : oe = ee) : (ee = u[G], l[ee * 6 + Q] + l[ee * 6 + Q + 3] >= q || (u[j] = ee, u[G] = oe, oe = -1, j++), G--);
14127
+ if (j > D && j < U) {
14125
14128
  var Z = new BVHNode(++d, calcExtents(u, l, D, j, EPSILON$1), D, j, k.deepth + 1);
14126
14129
  Z.deepth < r && Z.endIndex - Z.startIndex > e && (c[f++] = Z);
14127
- var $ = new BVHNode(++d, calcExtents(u, l, j, q, EPSILON$1), j, q, k.deepth + 1);
14130
+ var $ = new BVHNode(++d, calcExtents(u, l, j, U, EPSILON$1), j, U, k.deepth + 1);
14128
14131
  $.deepth < r && $.endIndex - $.startIndex > e && (c[f++] = $), k.node0 = Z, k.node1 = $, k.startIndex = 0, k.endIndex = 0;
14129
14132
  break;
14130
14133
  }
@@ -14158,26 +14161,26 @@ var BVHVector3 = (
14158
14161
  var b = intersectNodeBox(e, m, y, o);
14159
14162
  if (b !== null && !(s && b > v)) {
14160
14163
  for (var T = e.x, S = e.y, R = e.z, M = r.x, w = r.y, P = r.z, O = h[E + 6], C = h[E + 7], I = O; I < C; I++) {
14161
- var _ = c[I], H = _ * 3, L = new BVHVector3(0, 0, 0);
14162
- this.getPositionByIndex(H, L);
14163
- var k = L.x, D = L.y, q = L.z, z = new BVHVector3(0, 0, 0);
14164
- this.getPositionByIndex(H + 1, z);
14165
- var J = z.x, Q = z.y, U = z.z, j = new BVHVector3(0, 0, 0);
14166
- this.getPositionByIndex(H + 2, j);
14167
- var G = j.x, oe = j.y, ee = j.z, Z = J - k, $ = Q - D, X = U - q, ne = G - k, W = oe - D, K = ee - q, re = $ * K - X * W, te = X * ne - Z * K, ie = Z * W - $ * ne, ve = M * re + w * te + P * ie, ae = void 0;
14164
+ var H = c[I], F = H * 3, L = new BVHVector3(0, 0, 0);
14165
+ this.getPositionByIndex(F, L);
14166
+ var k = L.x, D = L.y, U = L.z, z = new BVHVector3(0, 0, 0);
14167
+ this.getPositionByIndex(F + 1, z);
14168
+ var J = z.x, Q = z.y, q = z.z, j = new BVHVector3(0, 0, 0);
14169
+ this.getPositionByIndex(F + 2, j);
14170
+ var G = j.x, oe = j.y, ee = j.z, Z = J - k, $ = Q - D, X = q - U, ne = G - k, W = oe - D, K = ee - U, re = $ * K - X * W, te = X * ne - Z * K, ie = Z * W - $ * ne, ve = M * re + w * te + P * ie, ae = void 0;
14168
14171
  if (ve > 0)
14169
14172
  ae = 1;
14170
14173
  else if (ve < 0)
14171
14174
  ae = -1, ve = -ve;
14172
14175
  else
14173
14176
  continue;
14174
- var fe = T - k, Ee = S - D, se = R - q, le = ae * (M * (Ee * K - se * W) + w * (se * ne - fe * K) + P * (fe * W - Ee * ne));
14177
+ var fe = T - k, Ee = S - D, se = R - U, le = ae * (M * (Ee * K - se * W) + w * (se * ne - fe * K) + P * (fe * W - Ee * ne));
14175
14178
  if (!(le < 0)) {
14176
14179
  var me = ae * (M * ($ * se - X * Ee) + w * (X * fe - Z * se) + P * (Z * Ee - $ * fe));
14177
14180
  if (!(me < 0) && !(le + me > ve)) {
14178
14181
  var ge = -ae * (fe * re + Ee * te + se * ie);
14179
14182
  if (!(ge < 0)) {
14180
- var Ae = ge / ve, ue = new BVHVector3(T + M * Ae, S + w * Ae, R + P * Ae), be = new BVHIntersect(L, z, j, _, ue);
14183
+ var Ae = ge / ve, ue = new BVHVector3(T + M * Ae, S + w * Ae, R + P * Ae), be = new BVHIntersect(L, z, j, H, ue);
14181
14184
  (!u || u(be)) && (s ? Ae < v && (v = Ae, l.length > 0 && (l.length = 0), l.push(be)) : l.push(be));
14182
14185
  }
14183
14186
  }
@@ -14238,19 +14241,19 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14238
14241
  return R[C] - R[O];
14239
14242
  };
14240
14243
  function P(O) {
14241
- var C = O.startIndex, I = O.endIndex, _ = O.extents;
14242
- R[0] = _[3] - _[0], R[1] = _[4] - _[1], R[2] = _[5] - _[2];
14243
- for (var H = M.sort(w)[0], L = ORDER_AXISES[H], k = (_[H] + _[H + 3]) / 2, D = C, q = I - 1, z = -1, J; D <= q; )
14244
- z === -1 ? (J = l[D], s(J, scratchVector3$8), scratchVector3$8[L] < k ? D++ : z = J) : (J = l[q], s(J, scratchVector3$8), scratchVector3$8[L] >= k || (l[D] = J, l[q] = z, z = -1, D++), q--);
14244
+ var C = O.startIndex, I = O.endIndex, H = O.extents;
14245
+ R[0] = H[3] - H[0], R[1] = H[4] - H[1], R[2] = H[5] - H[2];
14246
+ for (var F = M.sort(w)[0], L = ORDER_AXISES[F], k = (H[F] + H[F + 3]) / 2, D = C, U = I - 1, z = -1, J; D <= U; )
14247
+ z === -1 ? (J = l[D], s(J, scratchVector3$8), scratchVector3$8[L] < k ? D++ : z = J) : (J = l[U], s(J, scratchVector3$8), scratchVector3$8[L] >= k || (l[D] = J, l[U] = z, z = -1, D++), U--);
14245
14248
  if (D > C) {
14246
- var Q = _.slice();
14247
- Q[H + 3] = k + EPSILON;
14248
- var U = new BVHNode(++d, Q, C, D, O.deepth + 1);
14249
- U.deepth < r && U.endIndex - U.startIndex > e && (c[f++] = U), O.node0 = U;
14249
+ var Q = H.slice();
14250
+ Q[F + 3] = k + EPSILON;
14251
+ var q = new BVHNode(++d, Q, C, D, O.deepth + 1);
14252
+ q.deepth < r && q.endIndex - q.startIndex > e && (c[f++] = q), O.node0 = q;
14250
14253
  }
14251
14254
  if (I > D) {
14252
- var j = _.slice();
14253
- j[H] = k - EPSILON;
14255
+ var j = H.slice();
14256
+ j[F] = k - EPSILON;
14254
14257
  var G = new BVHNode(++d, j, D, I, O.deepth + 1);
14255
14258
  G.deepth < r && G.endIndex - G.startIndex > e && (c[f++] = G), O.node1 = G;
14256
14259
  }
@@ -14269,13 +14272,13 @@ var EPSILON = 1e-6, ORDER_AXISES = ["x", "y", "z"], scratchVector3$8 = new BVHVe
14269
14272
  for (var S = h[b + 6], R = h[b + 7], M = S; M < R; M++) {
14270
14273
  var w = c[M], P = new BVHVector3(0, 0, 0);
14271
14274
  this.getPositionByIndex(w, P);
14272
- var O = P.x, C = P.y, I = P.z, _ = e.x, H = e.y, L = e.z, k = r.x, D = r.y, q = r.z, z = k * (O - _) + D * (C - H) + q * (I - L);
14273
- if (z > 0 ? (_ += k * z, H += D * z, L += q * z) : z < 0 && (z = 0), k = O - _, D = C - H, q = I - L, k * k + D * D + q * q <= m) {
14274
- var J = new BVHVector3(_, H, L), Q = new BVHIntersect(P, P, P, w, J);
14275
+ var O = P.x, C = P.y, I = P.z, H = e.x, F = e.y, L = e.z, k = r.x, D = r.y, U = r.z, z = k * (O - H) + D * (C - F) + U * (I - L);
14276
+ if (z > 0 ? (H += k * z, F += D * z, L += U * z) : z < 0 && (z = 0), k = O - H, D = C - F, U = I - L, k * k + D * D + U * U <= m) {
14277
+ var J = new BVHVector3(H, F, L), Q = new BVHIntersect(P, P, P, w, J);
14275
14278
  (!u || u(Q)) && (s ? z < E && (E = z, l.length > 0 && (l.length = 0), l.push(Q)) : l.push(Q));
14276
14279
  }
14277
14280
  }
14278
- var U = y * BYTES_PER_NODE / 2, j = p[U + 16], G = p[U + 17];
14281
+ var q = y * BYTES_PER_NODE / 2, j = p[q + 16], G = p[q + 17];
14279
14282
  j && g.push(j), G && g.push(G);
14280
14283
  }
14281
14284
  }
@@ -14332,10 +14335,10 @@ function raycastMesh(n, t, e, r) {
14332
14335
  var P = v.intersectionPoint, O = new THREE.Vector3(P.x, P.y, P.z).applyMatrix4(u), C = e.ray.origin.distanceTo(O);
14333
14336
  if (C < e.near || C > e.far)
14334
14337
  return !1;
14335
- var I = v.pointA, _ = v.pointB, H = v.pointC, L = THREE.Triangle.getNormal(scratchIntersectionFaceA.set(I.x, I.y, I.z).applyMatrix4(u), scratchIntersectionFaceB.set(_.x, _.y, _.z).applyMatrix4(u), scratchIntersectionFaceC.set(H.x, H.y, H.z).applyMatrix4(u), new THREE.Vector3()), k = e.ray.direction.dot(L);
14338
+ var I = v.pointA, H = v.pointB, F = v.pointC, L = THREE.Triangle.getNormal(scratchIntersectionFaceA.set(I.x, I.y, I.z).applyMatrix4(u), scratchIntersectionFaceB.set(H.x, H.y, H.z).applyMatrix4(u), scratchIntersectionFaceC.set(F.x, F.y, F.z).applyMatrix4(u), new THREE.Vector3()), k = e.ray.direction.dot(L);
14336
14339
  if (S.side === THREE.FrontSide && k >= 0 || S.side === THREE.BackSide && k <= 0)
14337
14340
  return !1;
14338
- var D = new THREE.Face3(p ? p.array[T] : T, p ? p.array[T + 1] : T + 1, p ? p.array[T + 2] : T + 2, L), q = {
14341
+ var D = new THREE.Face3(p ? p.array[T] : T, p ? p.array[T + 1] : T + 1, p ? p.array[T + 2] : T + 2, L), U = {
14339
14342
  distance: C,
14340
14343
  object: n,
14341
14344
  face: D,
@@ -14343,7 +14346,7 @@ function raycastMesh(n, t, e, r) {
14343
14346
  distanceToRay: 0,
14344
14347
  faceIndex: b
14345
14348
  };
14346
- return intersectsMap.set(v, q), l(q);
14349
+ return intersectsMap.set(v, U), l(U);
14347
14350
  }), A = m.length, g = 0; g < A; g++) {
14348
14351
  var y = intersectsMap.get(m[g]);
14349
14352
  y && r.push(y);
@@ -14361,10 +14364,10 @@ function raycastPoints(n, t, e, r) {
14361
14364
  return !1;
14362
14365
  var w = T.pointA, P = scratchIntersectionFaceA.set(w.x, w.y, w.z).applyMatrix4(c), O = T.index, C = m ? m.array[O] : O, I;
14363
14366
  if (g) {
14364
- var _ = new THREE.Vector3().fromBufferAttribute(A, C).applyNormalMatrix(scratchNormalMatrix);
14365
- I = new THREE.Face3(C, C, C, _);
14367
+ var H = new THREE.Vector3().fromBufferAttribute(A, C).applyNormalMatrix(scratchNormalMatrix);
14368
+ I = new THREE.Face3(C, C, C, H);
14366
14369
  }
14367
- var H = {
14370
+ var F = {
14368
14371
  distance: M,
14369
14372
  object: n,
14370
14373
  face: I,
@@ -14372,7 +14375,7 @@ function raycastPoints(n, t, e, r) {
14372
14375
  distanceToRay: R.distanceTo(P),
14373
14376
  index: O
14374
14377
  };
14375
- return intersectsMap.set(T, H), d(H);
14378
+ return intersectsMap.set(T, F), d(F);
14376
14379
  }), v = y.length, E = 0; E < v; E++) {
14377
14380
  var b = intersectsMap.get(y[E]);
14378
14381
  b && r.push(b);
@@ -15566,8 +15569,8 @@ function build(n, t) {
15566
15569
  for (var y = [], v = function(R, M) {
15567
15570
  var w = m[R], P = w.name + "_" + w.smooth + "_" + A, O = n.materials[P];
15568
15571
  if (!O) {
15569
- for (var C = null, I = 0, _ = t; I < _.length; I++) {
15570
- var H = _[I], L = H.name, k = H.create;
15572
+ for (var C = null, I = 0, H = t; I < H.length; I++) {
15573
+ var F = H[I], L = F.name, k = F.create;
15571
15574
  L === w.mtllib && (C = k(w.name));
15572
15575
  }
15573
15576
  if (!C) {
@@ -15575,8 +15578,8 @@ function build(n, t) {
15575
15578
  C = [D, Promise.resolve([])];
15576
15579
  }
15577
15580
  O = C[0], O.name = w.name, O.flatShading = !(w.smooth || g.attributes.normal), O.vertexColors = A, n.materials[P] = O;
15578
- var q = C[1];
15579
- r.push(q), o.push(function() {
15581
+ var U = C[1];
15582
+ r.push(U), o.push(function() {
15580
15583
  return O.dispose();
15581
15584
  });
15582
15585
  }
@@ -16462,9 +16465,9 @@ var Tile3D = (
16462
16465
  u.refineProgress[0]++;
16463
16466
  }), this.loaded === !1 && this.autoRefine) {
16464
16467
  this.loaded = !0;
16465
- var _ = !1;
16468
+ var H = !1;
16466
16469
  this.tileset.needsRefinedTiles.forEach(function(ue) {
16467
- if (u.loaded !== !1 && ue.content && (ue.state.visible && (_ = !0), g.minLevelOfDetail >= 0)) {
16470
+ if (u.loaded !== !1 && ue.content && (ue.state.visible && (H = !0), g.minLevelOfDetail >= 0)) {
16468
16471
  if (M.skipLevelOfDetail) {
16469
16472
  if (ue.state.finalResolution) {
16470
16473
  var be = ue.state.ancestorWithContentAvailable, He = be && be.content ? be.content : ue.content, Ce = He.loadState;
@@ -16475,24 +16478,24 @@ var Tile3D = (
16475
16478
  (Ce === "UNLOADED" || Ce === "LOADING") && (u.loaded = !1);
16476
16479
  }
16477
16480
  }
16478
- }), _ && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
16481
+ }), H && this.tileset.selectedTiles.length === 0 && this.tileset.frameNumber < 500 && (this.loaded = !1), this.loaded === !0 && (this.refined = !1, this.refineProgress[1]++);
16479
16482
  }
16480
16483
  this.renderObjects.length = 0, this.backfaceObjects.length = 0, this.tileObjects.length = 0;
16481
- for (var H = this.children.length - 1; H >= 0; H--)
16482
- this.remove(this.children[H]);
16484
+ for (var F = this.children.length - 1; F >= 0; F--)
16485
+ this.remove(this.children[F]);
16483
16486
  M.skipLevelOfDetail || this.tileset.selectedTiles.sort(function(ue, be) {
16484
16487
  return ue.floor !== be.floor ? ue.floor - be.floor : ue.levelOfContent !== be.levelOfContent ? be.levelOfContent - ue.levelOfContent : ue.state.distanceToCamera !== be.state.distanceToCamera ? ue.state.distanceToCamera - be.state.distanceToCamera : ue.state.centerZDepth - be.state.centerZDepth;
16485
16488
  });
16486
16489
  for (var L = [], k = 0, D = this.tileset.selectedTiles; k < D.length; k++) {
16487
- var q = D[k], z = (p = (h = q.content) === null || h === void 0 ? void 0 : h.data) === null || p === void 0 ? void 0 : p.object;
16490
+ var U = D[k], z = (p = (h = U.content) === null || h === void 0 ? void 0 : h.data) === null || p === void 0 ? void 0 : p.object;
16488
16491
  if (z) {
16489
- var J = z.update(e, r, o, this, q, g);
16490
- if (L.push(q.id), J && (A = !0), this.tileset.hasMixedContent && M.skipLevelOfDetail) {
16491
- if (!q.state.finalResolution) {
16492
+ var J = z.update(e, r, o, this, U, g);
16493
+ if (L.push(U.id), J && (A = !0), this.tileset.hasMixedContent && M.skipLevelOfDetail) {
16494
+ if (!U.state.finalResolution) {
16492
16495
  var Q = cloneSkipBackfaceObject(z);
16493
16496
  Q.name = "skipBackface:" + z.name, this.backfaceObjects.push(Q);
16494
16497
  }
16495
- for (var U = q.state.selectionDepth, j = STENCIL_CONSTANT.TILE_MASK | U << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, G = THREE.GreaterEqualStencilFunc, oe = STENCIL_CONSTANT.SKIP_LOD_MASK, ee = THREE.ReplaceStencilOp, Z = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, $ = 0, X = z.materials; $ < X.length; $++) {
16498
+ for (var q = U.state.selectionDepth, j = STENCIL_CONSTANT.TILE_MASK | q << STENCIL_CONSTANT.SKIP_LOD_BIT_SHIFT, G = THREE.GreaterEqualStencilFunc, oe = STENCIL_CONSTANT.SKIP_LOD_MASK, ee = THREE.ReplaceStencilOp, Z = STENCIL_CONSTANT.TILE_MASK | STENCIL_CONSTANT.SKIP_LOD_MASK, $ = 0, X = z.materials; $ < X.length; $++) {
16496
16499
  var ne = X[$];
16497
16500
  ne.stencilWrite = !0, ne.stencilRef = j, ne.stencilFunc = G, ne.stencilFuncMask = oe, ne.stencilZPass = ee, ne.stencilWriteMask = Z;
16498
16501
  }
@@ -16506,11 +16509,11 @@ var Tile3D = (
16506
16509
  }
16507
16510
  var re = L.toString();
16508
16511
  if (tileVersionMap.get(this) !== re && (tileVersionMap.set(this, re), A = !0), M.skipLevelOfDetail && this.backfaceObjects.length)
16509
- for (var H = 0; H < this.backfaceObjects.length; H++)
16510
- this.renderObjects.push(this.backfaceObjects[H]);
16512
+ for (var F = 0; F < this.backfaceObjects.length; F++)
16513
+ this.renderObjects.push(this.backfaceObjects[F]);
16511
16514
  if (this.tileObjects.length)
16512
- for (var H = 0; H < this.tileObjects.length; H++)
16513
- this.renderObjects.push(this.tileObjects[H]);
16515
+ for (var F = 0; F < this.tileObjects.length; F++)
16516
+ this.renderObjects.push(this.tileObjects[F]);
16514
16517
  M.skipLevelOfDetail && this.renderObjects.push(this.clearStencilObject);
16515
16518
  for (var te = [], ie = 0, ve = this.tileset.selectedTrajectories; ie < ve.length; ie++) {
16516
16519
  var ae = ve[ie], fe = (m = ae.content.data) === null || m === void 0 ? void 0 : m.object;
@@ -16526,11 +16529,11 @@ var Tile3D = (
16526
16529
  be.traverse(function(Ce) {
16527
16530
  (Ce instanceof THREE.Mesh || Ce instanceof THREE.Line || Ce instanceof THREE.Points) && (Ce.renderOrder = He);
16528
16531
  });
16529
- }, Ae = this, H = 0; H < this.renderObjects.length; H++)
16530
- ge(H);
16532
+ }, Ae = this, F = 0; F < this.renderObjects.length; F++)
16533
+ ge(F);
16531
16534
  if (this.loaded)
16532
- for (var H = 0; H < this.renderObjects.length; H++)
16533
- this.add(this.renderObjects[H]);
16535
+ for (var F = 0; F < this.renderObjects.length; F++)
16536
+ this.add(this.renderObjects[F]);
16534
16537
  return A;
16535
16538
  }, t.prototype.dispose = function() {
16536
16539
  this.disposed = !0, this.tileset.reset(), this.tileset.root.children.length = 0, /^blob\:/.test(this.tileset.id) && URL.revokeObjectURL(this.tileset.id);
@@ -17146,15 +17149,15 @@ function mergeVertices(n, t) {
17146
17149
  e[b] = u, d.push(u), u++;
17147
17150
  }
17148
17151
  }
17149
- for (var _ = n.clone(), p = 0, m = l.length; p < m; p++) {
17150
- var A = l[p], H = n.getAttribute(A), L = new H.array.constructor(c[A]), S = new THREE.BufferAttribute(L, H.itemSize, H.normalized);
17151
- if (_.setAttribute(A, S), A in f)
17152
+ for (var H = n.clone(), p = 0, m = l.length; p < m; p++) {
17153
+ var A = l[p], F = n.getAttribute(A), L = new F.array.constructor(c[A]), S = new THREE.BufferAttribute(L, F.itemSize, F.normalized);
17154
+ if (H.setAttribute(A, S), A in f)
17152
17155
  for (var T = 0; T < f[A].length; T++) {
17153
17156
  var k = n.morphAttributes[A][T], L = new k.array.constructor(f[A][T]), D = new THREE.BufferAttribute(L, k.itemSize, k.normalized);
17154
- _.morphAttributes[A][T] = D;
17157
+ H.morphAttributes[A][T] = D;
17155
17158
  }
17156
17159
  }
17157
- return _.setIndex(d), _;
17160
+ return H.setIndex(d), H;
17158
17161
  }
17159
17162
  var scratchSphere$1 = new THREE.Sphere(), scratchMatrix4$1 = new THREE.Matrix4(), scratchMatrix4Inverse = new THREE.Matrix4();
17160
17163
  function getEdgesBySphere(n, t, e) {
@@ -17167,10 +17170,10 @@ function getEdgesBySphere(n, t, e) {
17167
17170
  var m = [];
17168
17171
  if (p.traverseVisible(function(Q) {
17169
17172
  if (Q instanceof THREE.Mesh) {
17170
- var U = getBvhTreeForMesh(Q);
17171
- if (U) {
17173
+ var q = getBvhTreeForMesh(Q);
17174
+ if (q) {
17172
17175
  scratchMatrix4$1.copy(Q.matrixWorld), scratchMatrix4Inverse.getInverse(scratchMatrix4$1), scratchSphere$1.copy(t).applyMatrix4(scratchMatrix4Inverse);
17173
- var j = U.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), G = new THREE.BufferGeometry();
17176
+ var j = q.trianglesInSphere(scratchSphere$1.center, scratchSphere$1.radius), G = new THREE.BufferGeometry();
17174
17177
  G.setAttribute("position", new THREE.BufferAttribute(j, 3)), G.applyMatrix4(Q.matrixWorld), G = mergeVertices(G, 0.01), m.push(G);
17175
17178
  }
17176
17179
  }
@@ -17185,14 +17188,14 @@ function getEdgesBySphere(n, t, e) {
17185
17188
  b.push({ a: M, b: w, c: P, normal: O });
17186
17189
  }
17187
17190
  for (var C = {}, T = 0, S = b.length; T < S; T++)
17188
- for (var I = b[T], _ = 0; _ < 3; _++) {
17189
- var H = I[A[_]], L = I[A[(_ + 1) % 3]], k = [Math.min(H, L), Math.max(H, L)], D = k[0] + "-" + k[1];
17191
+ for (var I = b[T], H = 0; H < 3; H++) {
17192
+ var F = I[A[H]], L = I[A[(H + 1) % 3]], k = [Math.min(F, L), Math.max(F, L)], D = k[0] + "-" + k[1];
17190
17193
  C[D] === void 0 ? C[D] = { index1: k[0], index2: k[1], face1: T } : C[D].face2 = T;
17191
17194
  }
17192
17195
  for (var D in C) {
17193
- var q = C[D];
17194
- if (q.face2 === void 0 || b[q.face1].normal.dot(b[q.face2].normal) <= r) {
17195
- var z = E[q.index1], J = E[q.index2];
17196
+ var U = C[D];
17197
+ if (U.face2 === void 0 || b[U.face1].normal.dot(b[U.face2].normal) <= r) {
17198
+ var z = E[U.index1], J = E[U.index2];
17196
17199
  o.push(new THREE.Line3(z, J));
17197
17200
  }
17198
17201
  }
@@ -17589,7 +17592,7 @@ var versionMap = /* @__PURE__ */ new WeakMap(), cameraBoxSize = new THREE.Vector
17589
17592
  }
17590
17593
  for (var s = 0; s < this.models.length; s++) {
17591
17594
  var u = this.models[s];
17592
- this.shownModels.indexOf(u) < 0 && scratchBoundingBox3.union(u.boundingBox);
17595
+ this.shownModels.indexOf(u) === -1 && scratchBoundingBox3.union(u.boundingBox);
17593
17596
  }
17594
17597
  scratchBoundingBox3.equals(this.boundingBox) || (this.boundingBox.copy(scratchBoundingBox3), this.parameter.set("boundingBox", this.boundingBox.clone()), o = !0);
17595
17598
  var f = this.boundingMesh.update(e, r, this);
@@ -18099,13 +18102,13 @@ function parse(n, t) {
18099
18102
  return K && K[K.length - 1] !== "/" && (K += "/"), K;
18100
18103
  })()
18101
18104
  });
18102
- var _ = void 0;
18103
- typeof I.model == "object" && (_ = {}, defineProperty(_, "work", {
18105
+ var H = void 0;
18106
+ typeof I.model == "object" && (H = {}, defineProperty(H, "work", {
18104
18107
  enumerable: !1,
18105
18108
  configurable: !1,
18106
18109
  writable: !1,
18107
18110
  value: t
18108
- }), defineProperty(_, "file", {
18111
+ }), defineProperty(H, "file", {
18109
18112
  enumerable: !0,
18110
18113
  configurable: !1,
18111
18114
  writable: !1,
@@ -18114,7 +18117,7 @@ function parse(n, t) {
18114
18117
  if (W)
18115
18118
  return relativeURL(W, t.baseURL);
18116
18119
  })()
18117
- }), defineProperty(_, "textureBase", {
18120
+ }), defineProperty(H, "textureBase", {
18118
18121
  enumerable: !0,
18119
18122
  configurable: !1,
18120
18123
  writable: !1,
@@ -18122,7 +18125,7 @@ function parse(n, t) {
18122
18125
  var W = I.model.material_base_url;
18123
18126
  return W && (W = relativeURL(W, t.baseURL)), W;
18124
18127
  })()
18125
- }), defineProperty(_, "textures", {
18128
+ }), defineProperty(H, "textures", {
18126
18129
  enumerable: !0,
18127
18130
  configurable: !1,
18128
18131
  writable: !1,
@@ -18130,19 +18133,19 @@ function parse(n, t) {
18130
18133
  var W = void 0;
18131
18134
  return Array.isArray(I.model.material_textures) && (W = I.model.material_textures.slice(), Object.freeze(W)), W;
18132
18135
  })()
18133
- }), defineProperty(_, "upAxis", {
18136
+ }), defineProperty(H, "upAxis", {
18134
18137
  enumerable: !0,
18135
18138
  configurable: !1,
18136
18139
  writable: !1,
18137
18140
  value: I.model.up_axis
18138
- }), defineProperty(_, "coordinate", {
18141
+ }), defineProperty(H, "coordinate", {
18139
18142
  enumerable: !0,
18140
18143
  configurable: !1,
18141
18144
  writable: !1,
18142
18145
  value: (function() {
18143
18146
  return jsonClone(I.model.coordinate);
18144
18147
  })()
18145
- }), defineProperty(_, "layers", {
18148
+ }), defineProperty(H, "layers", {
18146
18149
  enumerable: !0,
18147
18150
  configurable: !1,
18148
18151
  writable: !1,
@@ -18219,11 +18222,11 @@ function parse(n, t) {
18219
18222
  enumerable: !0,
18220
18223
  configurable: !1,
18221
18224
  writable: !1,
18222
- value: _
18225
+ value: H
18223
18226
  });
18224
- var H = [];
18227
+ var F = [];
18225
18228
  if (Array.isArray(I.observers) && I.panorama && Array.isArray(I.panorama.list || I.panorama.info)) {
18226
- for (var L = I.observers, k = (r = I.panorama.list || I.panorama.info) !== null && r !== void 0 ? r : [], D = (f = (l = (s = (o = I.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = I.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = I.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", q = Math.min(L.length, k.length), z = {}, J = function(W) {
18229
+ for (var L = I.observers, k = (r = I.panorama.list || I.panorama.info) !== null && r !== void 0 ? r : [], D = (f = (l = (s = (o = I.panorama) === null || o === void 0 ? void 0 : o.pano_high_cube_base_url) !== null && s !== void 0 ? s : (u = I.panorama) === null || u === void 0 ? void 0 : u.pano_cube_base_url) !== null && l !== void 0 ? l : (c = I.panorama) === null || c === void 0 ? void 0 : c.base_url) !== null && f !== void 0 ? f : "", U = Math.min(L.length, k.length), z = {}, J = function(W) {
18227
18230
  var K = W, re = I.panorama.pattern[K];
18228
18231
  if (typeof re == "string") {
18229
18232
  var te = new StringPattern(re);
@@ -18234,8 +18237,8 @@ function parse(n, t) {
18234
18237
  z[K] = function() {
18235
18238
  return re;
18236
18239
  };
18237
- }, Q = 0, U = Object.keys((d = I.panorama.pattern) !== null && d !== void 0 ? d : {}); Q < U.length; Q++) {
18238
- var j = U[Q];
18240
+ }, Q = 0, q = Object.keys((d = I.panorama.pattern) !== null && d !== void 0 ? d : {}); Q < q.length; Q++) {
18241
+ var j = q[Q];
18239
18242
  J(j);
18240
18243
  }
18241
18244
  for (var G = function(W, K) {
@@ -18316,25 +18319,25 @@ function parse(n, t) {
18316
18319
  if (accessibleNodesSet.clear(), K.accessible_nodes && Array.isArray(K.accessible_nodes))
18317
18320
  for (var ie = 0, ve = K.accessible_nodes; ie < ve.length; ie++) {
18318
18321
  var ae = ve[ie];
18319
- ae >= q || ae === W || accessibleNodesSet.add(ae);
18322
+ ae >= U || ae === W || accessibleNodesSet.add(ae);
18320
18323
  }
18321
18324
  else if (K.accessibleNodes && Array.isArray(K.accessibleNodes))
18322
18325
  for (var fe = 0, Ee = K.accessibleNodes; fe < Ee.length; fe++) {
18323
18326
  var ae = Ee[fe];
18324
- ae >= q || ae === W || accessibleNodesSet.add(ae);
18327
+ ae >= U || ae === W || accessibleNodesSet.add(ae);
18325
18328
  }
18326
18329
  else if (K.visible_nodes && Array.isArray(K.visible_nodes))
18327
18330
  for (var se = 0, le = K.visible_nodes; se < le.length; se++) {
18328
18331
  var ae = le[se];
18329
- ae >= q || ae === W || accessibleNodesSet.add(ae);
18332
+ ae >= U || ae === W || accessibleNodesSet.add(ae);
18330
18333
  }
18331
18334
  else if (K.visibleNodes && Array.isArray(K.visibleNodes))
18332
18335
  for (var me = 0, ge = K.visibleNodes; me < ge.length; me++) {
18333
18336
  var ae = ge[me];
18334
- ae >= q || ae === W || accessibleNodesSet.add(ae);
18337
+ ae >= U || ae === W || accessibleNodesSet.add(ae);
18335
18338
  }
18336
18339
  if (accessibleNodesSet.size === 0)
18337
- for (var Ae = 0; Ae < q; Ae++)
18340
+ for (var Ae = 0; Ae < U; Ae++)
18338
18341
  Ae !== W && accessibleNodesSet.add(Ae);
18339
18342
  var ue = Array.from(accessibleNodesSet);
18340
18343
  return accessibleNodesSet.clear(), Object.freeze(ue);
@@ -18506,15 +18509,15 @@ function parse(n, t) {
18506
18509
  })()
18507
18510
  }), ie;
18508
18511
  })()
18509
- }), H.push(te);
18510
- }, ee = 0; ee < q; ee++)
18512
+ }), F.push(te);
18513
+ }, ee = 0; ee < U; ee++)
18511
18514
  oe(ee);
18512
18515
  }
18513
18516
  defineProperty(t, "observers", {
18514
18517
  enumerable: !0,
18515
18518
  configurable: !1,
18516
18519
  writable: !1,
18517
- value: Object.freeze(H)
18520
+ value: Object.freeze(F)
18518
18521
  });
18519
18522
  var Z = {};
18520
18523
  if (defineProperty(Z, "work", {
@@ -20021,6 +20024,50 @@ void main() {
20021
20024
  this.tapMotion.dispose(), this.progressMotion.dispose(), this.progressOpacityMotion.dispose(), this.opacityMotion.dispose(), this.currentMotion.dispose(), this.panoMesh.material.dispose();
20022
20025
  }, t;
20023
20026
  })(THREE.Object3D)
20027
+ ), FullScreenQuad = (
20028
+ /** @class */
20029
+ (function() {
20030
+ function n(t) {
20031
+ this._scene = new THREE.Scene(), this._mesh = new THREE.Mesh(n.geometry, t), this._scene.add(this._mesh);
20032
+ }
20033
+ return Object.defineProperty(n.prototype, "material", {
20034
+ get: function() {
20035
+ return this._mesh.material;
20036
+ },
20037
+ set: function(t) {
20038
+ this._mesh.material = t;
20039
+ },
20040
+ enumerable: !1,
20041
+ configurable: !0
20042
+ }), n.prototype.dispose = function() {
20043
+ this._mesh.geometry.dispose();
20044
+ }, n.prototype.render = function(t) {
20045
+ t.render(this._scene, n.camera);
20046
+ }, n.camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1), n.geometry = new THREE.PlaneGeometry(2, 2), n;
20047
+ })()
20048
+ ), Pass$1 = (
20049
+ /** @class */
20050
+ (function() {
20051
+ function n() {
20052
+ this.enabled = !0, this.needsSwap = !0, this.clear = !1, this.renderToScreen = !0;
20053
+ }
20054
+ return n.prototype.setSize = function(t, e) {
20055
+ }, n.prototype.render = function(t, e, r, o, s) {
20056
+ console.error("THREE.Pass: .render() must be implemented in derived pass.");
20057
+ }, n.FullScreenQuad = FullScreenQuad, n;
20058
+ })()
20059
+ ), FivePass = (
20060
+ /** @class */
20061
+ (function(n) {
20062
+ __extends(t, n);
20063
+ function t(e) {
20064
+ var r = n.call(this) || this;
20065
+ return r.dependencies = e || ["color"], r;
20066
+ }
20067
+ return t.prototype.setGBuffer = function(e) {
20068
+ this.gbuffer = e;
20069
+ }, t;
20070
+ })(Pass$1)
20024
20071
  );
20025
20072
  function isSimilarValue(n, t, e) {
20026
20073
  var r = Math.abs(n - t);
@@ -20166,26 +20213,26 @@ function isEmptyObject(n) {
20166
20213
  * Licensed under the MIT license */
20167
20214
  var Hammer = (function(n, t, e, r) {
20168
20215
  var o = ["", "webkit", "Moz", "MS", "ms", "o"], s = t.createElement ? t.createElement("div") : r, u = "function", l = Math.round, c = Math.abs, f = Date.now;
20169
- function d(B, F, N) {
20170
- return setTimeout(E(B, N), F);
20216
+ function d(B, _, N) {
20217
+ return setTimeout(E(B, N), _);
20171
20218
  }
20172
- function h(B, F, N) {
20173
- return Array.isArray(B) ? (p(B, N[F], N), !0) : !1;
20219
+ function h(B, _, N) {
20220
+ return Array.isArray(B) ? (p(B, N[_], N), !0) : !1;
20174
20221
  }
20175
- function p(B, F, N) {
20222
+ function p(B, _, N) {
20176
20223
  var V;
20177
20224
  if (B)
20178
20225
  if (B.forEach)
20179
- B.forEach(F, N);
20226
+ B.forEach(_, N);
20180
20227
  else if (B.length !== r)
20181
20228
  for (V = 0; V < B.length; )
20182
- F.call(N, B[V], V, B), V++;
20229
+ _.call(N, B[V], V, B), V++;
20183
20230
  else
20184
20231
  for (V in B)
20185
- B.hasOwnProperty(V) && F.call(N, B[V], V, B);
20232
+ B.hasOwnProperty(V) && _.call(N, B[V], V, B);
20186
20233
  }
20187
- function m(B, F, N) {
20188
- var V = "DEPRECATED METHOD: " + F + `
20234
+ function m(B, _, N) {
20235
+ var V = "DEPRECATED METHOD: " + _ + `
20189
20236
  ` + N + ` AT
20190
20237
  `;
20191
20238
  return function() {
@@ -20194,10 +20241,10 @@ var Hammer = (function(n, t, e, r) {
20194
20241
  };
20195
20242
  }
20196
20243
  var A;
20197
- typeof Object.assign != "function" ? A = function(F) {
20198
- if (F === r || F === null)
20244
+ typeof Object.assign != "function" ? A = function(_) {
20245
+ if (_ === r || _ === null)
20199
20246
  throw new TypeError("Cannot convert undefined or null to object");
20200
- for (var N = Object(F), V = 1; V < arguments.length; V++) {
20247
+ for (var N = Object(_), V = 1; V < arguments.length; V++) {
20201
20248
  var Y = arguments[V];
20202
20249
  if (Y !== r && Y !== null)
20203
20250
  for (var ce in Y)
@@ -20205,57 +20252,57 @@ var Hammer = (function(n, t, e, r) {
20205
20252
  }
20206
20253
  return N;
20207
20254
  } : A = Object.assign;
20208
- var g = m(function(F, N, V) {
20255
+ var g = m(function(_, N, V) {
20209
20256
  for (var Y = Object.keys(N), ce = 0; ce < Y.length; )
20210
- (!V || V && F[Y[ce]] === r) && (F[Y[ce]] = N[Y[ce]]), ce++;
20211
- return F;
20212
- }, "extend", "Use `assign`."), y = m(function(F, N) {
20213
- return g(F, N, !0);
20257
+ (!V || V && _[Y[ce]] === r) && (_[Y[ce]] = N[Y[ce]]), ce++;
20258
+ return _;
20259
+ }, "extend", "Use `assign`."), y = m(function(_, N) {
20260
+ return g(_, N, !0);
20214
20261
  }, "merge", "Use `assign`.");
20215
- function v(B, F, N) {
20216
- var V = F.prototype, Y;
20262
+ function v(B, _, N) {
20263
+ var V = _.prototype, Y;
20217
20264
  Y = B.prototype = Object.create(V), Y.constructor = B, Y._super = V, N && A(Y, N);
20218
20265
  }
20219
- function E(B, F) {
20266
+ function E(B, _) {
20220
20267
  return function() {
20221
- return B.apply(F, arguments);
20268
+ return B.apply(_, arguments);
20222
20269
  };
20223
20270
  }
20224
- function b(B, F) {
20225
- return typeof B == u ? B.apply(F && F[0] || r, F) : B;
20271
+ function b(B, _) {
20272
+ return typeof B == u ? B.apply(_ && _[0] || r, _) : B;
20226
20273
  }
20227
- function T(B, F) {
20228
- return B === r ? F : B;
20274
+ function T(B, _) {
20275
+ return B === r ? _ : B;
20229
20276
  }
20230
- function S(B, F, N) {
20231
- p(P(F), function(V) {
20277
+ function S(B, _, N) {
20278
+ p(P(_), function(V) {
20232
20279
  B.addEventListener(V, N, !1);
20233
20280
  });
20234
20281
  }
20235
- function R(B, F, N) {
20236
- p(P(F), function(V) {
20282
+ function R(B, _, N) {
20283
+ p(P(_), function(V) {
20237
20284
  B.removeEventListener(V, N, !1);
20238
20285
  });
20239
20286
  }
20240
- function M(B, F) {
20287
+ function M(B, _) {
20241
20288
  for (; B; ) {
20242
- if (B == F)
20289
+ if (B == _)
20243
20290
  return !0;
20244
20291
  B = B.parentNode;
20245
20292
  }
20246
20293
  return !1;
20247
20294
  }
20248
- function w(B, F) {
20249
- return B.indexOf(F) > -1;
20295
+ function w(B, _) {
20296
+ return B.indexOf(_) > -1;
20250
20297
  }
20251
20298
  function P(B) {
20252
20299
  return B.trim().split(/\s+/g);
20253
20300
  }
20254
- function O(B, F, N) {
20301
+ function O(B, _, N) {
20255
20302
  if (B.indexOf && !N)
20256
- return B.indexOf(F);
20303
+ return B.indexOf(_);
20257
20304
  for (var V = 0; V < B.length; ) {
20258
- if (N && B[V][N] == F || !N && B[V] === F)
20305
+ if (N && B[V][N] == _ || !N && B[V] === _)
20259
20306
  return V;
20260
20307
  V++;
20261
20308
  }
@@ -20264,35 +20311,35 @@ var Hammer = (function(n, t, e, r) {
20264
20311
  function C(B) {
20265
20312
  return Array.prototype.slice.call(B, 0);
20266
20313
  }
20267
- function I(B, F, N) {
20314
+ function I(B, _, N) {
20268
20315
  for (var V = [], Y = [], ce = 0; ce < B.length; ) {
20269
- var Te = B[ce][F];
20316
+ var Te = B[ce][_];
20270
20317
  O(Y, Te) < 0 && V.push(B[ce]), Y[ce] = Te, ce++;
20271
20318
  }
20272
20319
  return V = V.sort(function(Ye, De) {
20273
- return Ye[F] > De[F];
20320
+ return Ye[_] > De[_];
20274
20321
  }), V;
20275
20322
  }
20276
- function _(B, F) {
20277
- for (var N, V, Y = F[0].toUpperCase() + F.slice(1), ce = 0; ce < o.length; ) {
20278
- if (N = o[ce], V = N ? N + Y : F, V in B)
20323
+ function H(B, _) {
20324
+ for (var N, V, Y = _[0].toUpperCase() + _.slice(1), ce = 0; ce < o.length; ) {
20325
+ if (N = o[ce], V = N ? N + Y : _, V in B)
20279
20326
  return V;
20280
20327
  ce++;
20281
20328
  }
20282
20329
  return r;
20283
20330
  }
20284
- var H = 1;
20331
+ var F = 1;
20285
20332
  function L() {
20286
- return H++;
20333
+ return F++;
20287
20334
  }
20288
20335
  function k(B) {
20289
- var F = B.ownerDocument || B;
20290
- return F.defaultView || F.parentWindow || n;
20336
+ var _ = B.ownerDocument || B;
20337
+ return _.defaultView || _.parentWindow || n;
20291
20338
  }
20292
- var D = /mobile|tablet|ip(ad|hone|od)|android/i, q = "ontouchstart" in n, z = _(n, "PointerEvent") !== r, J = q && D.test(navigator.userAgent), Q = "touch", U = "pen", j = "mouse", G = "kinect", oe = 25, ee = 1, Z = 2, $ = 4, X = 8, ne = 1, W = 2, K = 4, re = 8, te = 16, ie = W | K, ve = re | te, ae = ie | ve, fe = ["x", "y"], Ee = ["clientX", "clientY"];
20293
- function se(B, F) {
20339
+ var D = /mobile|tablet|ip(ad|hone|od)|android/i, U = "ontouchstart" in n, z = H(n, "PointerEvent") !== r, J = U && D.test(navigator.userAgent), Q = "touch", q = "pen", j = "mouse", G = "kinect", oe = 25, ee = 1, Z = 2, $ = 4, X = 8, ne = 1, W = 2, K = 4, re = 8, te = 16, ie = W | K, ve = re | te, ae = ie | ve, fe = ["x", "y"], Ee = ["clientX", "clientY"];
20340
+ function se(B, _) {
20294
20341
  var N = this;
20295
- this.manager = B, this.callback = F, this.element = B.element, this.target = B.options.inputTarget, this.domHandler = function(V) {
20342
+ this.manager = B, this.callback = _, this.element = B.element, this.target = B.options.inputTarget, this.domHandler = function(V) {
20296
20343
  b(B.options.enable, [B]) && N.handler(V);
20297
20344
  }, this.init();
20298
20345
  }
@@ -20317,94 +20364,94 @@ var Hammer = (function(n, t, e, r) {
20317
20364
  }
20318
20365
  };
20319
20366
  function le(B) {
20320
- var F, N = B.options.inputClass;
20321
- return N ? F = N : z ? F = $e : J ? F = Ne : q ? F = yt : F = ze, new F(B, me);
20322
- }
20323
- function me(B, F, N) {
20324
- var V = N.pointers.length, Y = N.changedPointers.length, ce = F & ee && V - Y === 0, Te = F & ($ | X) && V - Y === 0;
20325
- N.isFirst = !!ce, N.isFinal = !!Te, ce && (B.session = {}), N.eventType = F, ge(B, N), B.emit("hammer.input", N), B.recognize(N), B.session.prevInput = N;
20326
- }
20327
- function ge(B, F) {
20328
- var N = B.session, V = F.pointers, Y = V.length;
20329
- N.firstInput || (N.firstInput = be(F)), Y > 1 && !N.firstMultiple ? N.firstMultiple = be(F) : Y === 1 && (N.firstMultiple = !1);
20330
- var ce = N.firstInput, Te = N.firstMultiple, je = Te ? Te.center : ce.center, Ye = F.center = He(V);
20331
- F.timeStamp = f(), F.deltaTime = F.timeStamp - ce.timeStamp, F.angle = Ve(je, Ye), F.distance = he(je, Ye), Ae(N, F), F.offsetDirection = xe(F.deltaX, F.deltaY);
20332
- var De = Ce(F.deltaTime, F.deltaX, F.deltaY);
20333
- F.overallVelocityX = De.x, F.overallVelocityY = De.y, F.overallVelocity = c(De.x) > c(De.y) ? De.x : De.y, F.scale = Te ? Be(Te.pointers, V) : 1, F.rotation = Te ? ye(Te.pointers, V) : 0, F.maxPointers = N.prevInput ? F.pointers.length > N.prevInput.maxPointers ? F.pointers.length : N.prevInput.maxPointers : F.pointers.length, ue(N, F);
20367
+ var _, N = B.options.inputClass;
20368
+ return N ? _ = N : z ? _ = $e : J ? _ = Ne : U ? _ = yt : _ = ze, new _(B, me);
20369
+ }
20370
+ function me(B, _, N) {
20371
+ var V = N.pointers.length, Y = N.changedPointers.length, ce = _ & ee && V - Y === 0, Te = _ & ($ | X) && V - Y === 0;
20372
+ N.isFirst = !!ce, N.isFinal = !!Te, ce && (B.session = {}), N.eventType = _, ge(B, N), B.emit("hammer.input", N), B.recognize(N), B.session.prevInput = N;
20373
+ }
20374
+ function ge(B, _) {
20375
+ var N = B.session, V = _.pointers, Y = V.length;
20376
+ N.firstInput || (N.firstInput = be(_)), Y > 1 && !N.firstMultiple ? N.firstMultiple = be(_) : Y === 1 && (N.firstMultiple = !1);
20377
+ var ce = N.firstInput, Te = N.firstMultiple, je = Te ? Te.center : ce.center, Ye = _.center = He(V);
20378
+ _.timeStamp = f(), _.deltaTime = _.timeStamp - ce.timeStamp, _.angle = Ve(je, Ye), _.distance = he(je, Ye), Ae(N, _), _.offsetDirection = xe(_.deltaX, _.deltaY);
20379
+ var De = Ce(_.deltaTime, _.deltaX, _.deltaY);
20380
+ _.overallVelocityX = De.x, _.overallVelocityY = De.y, _.overallVelocity = c(De.x) > c(De.y) ? De.x : De.y, _.scale = Te ? Be(Te.pointers, V) : 1, _.rotation = Te ? ye(Te.pointers, V) : 0, _.maxPointers = N.prevInput ? _.pointers.length > N.prevInput.maxPointers ? _.pointers.length : N.prevInput.maxPointers : _.pointers.length, ue(N, _);
20334
20381
  var St = B.element;
20335
- M(F.srcEvent.target, St) && (St = F.srcEvent.target), F.target = St;
20382
+ M(_.srcEvent.target, St) && (St = _.srcEvent.target), _.target = St;
20336
20383
  }
20337
- function Ae(B, F) {
20338
- var N = F.center, V = B.offsetDelta || {}, Y = B.prevDelta || {}, ce = B.prevInput || {};
20339
- (F.eventType === ee || ce.eventType === $) && (Y = B.prevDelta = {
20384
+ function Ae(B, _) {
20385
+ var N = _.center, V = B.offsetDelta || {}, Y = B.prevDelta || {}, ce = B.prevInput || {};
20386
+ (_.eventType === ee || ce.eventType === $) && (Y = B.prevDelta = {
20340
20387
  x: ce.deltaX || 0,
20341
20388
  y: ce.deltaY || 0
20342
20389
  }, V = B.offsetDelta = {
20343
20390
  x: N.x,
20344
20391
  y: N.y
20345
- }), F.deltaX = Y.x + (N.x - V.x), F.deltaY = Y.y + (N.y - V.y);
20392
+ }), _.deltaX = Y.x + (N.x - V.x), _.deltaY = Y.y + (N.y - V.y);
20346
20393
  }
20347
- function ue(B, F) {
20348
- var N = B.lastInterval || F, V = F.timeStamp - N.timeStamp, Y, ce, Te, je;
20349
- if (F.eventType != X && (V > oe || N.velocity === r)) {
20350
- var Ye = F.deltaX - N.deltaX, De = F.deltaY - N.deltaY, St = Ce(V, Ye, De);
20351
- ce = St.x, Te = St.y, Y = c(St.x) > c(St.y) ? St.x : St.y, je = xe(Ye, De), B.lastInterval = F;
20394
+ function ue(B, _) {
20395
+ var N = B.lastInterval || _, V = _.timeStamp - N.timeStamp, Y, ce, Te, je;
20396
+ if (_.eventType != X && (V > oe || N.velocity === r)) {
20397
+ var Ye = _.deltaX - N.deltaX, De = _.deltaY - N.deltaY, St = Ce(V, Ye, De);
20398
+ ce = St.x, Te = St.y, Y = c(St.x) > c(St.y) ? St.x : St.y, je = xe(Ye, De), B.lastInterval = _;
20352
20399
  } else
20353
20400
  Y = N.velocity, ce = N.velocityX, Te = N.velocityY, je = N.direction;
20354
- F.velocity = Y, F.velocityX = ce, F.velocityY = Te, F.direction = je;
20401
+ _.velocity = Y, _.velocityX = ce, _.velocityY = Te, _.direction = je;
20355
20402
  }
20356
20403
  function be(B) {
20357
- for (var F = [], N = 0; N < B.pointers.length; )
20358
- F[N] = {
20404
+ for (var _ = [], N = 0; N < B.pointers.length; )
20405
+ _[N] = {
20359
20406
  clientX: l(B.pointers[N].clientX),
20360
20407
  clientY: l(B.pointers[N].clientY)
20361
20408
  }, N++;
20362
20409
  return {
20363
20410
  timeStamp: f(),
20364
- pointers: F,
20365
- center: He(F),
20411
+ pointers: _,
20412
+ center: He(_),
20366
20413
  deltaX: B.deltaX,
20367
20414
  deltaY: B.deltaY
20368
20415
  };
20369
20416
  }
20370
20417
  function He(B) {
20371
- var F = B.length;
20372
- if (F === 1)
20418
+ var _ = B.length;
20419
+ if (_ === 1)
20373
20420
  return {
20374
20421
  x: l(B[0].clientX),
20375
20422
  y: l(B[0].clientY)
20376
20423
  };
20377
- for (var N = 0, V = 0, Y = 0; Y < F; )
20424
+ for (var N = 0, V = 0, Y = 0; Y < _; )
20378
20425
  N += B[Y].clientX, V += B[Y].clientY, Y++;
20379
20426
  return {
20380
- x: l(N / F),
20381
- y: l(V / F)
20427
+ x: l(N / _),
20428
+ y: l(V / _)
20382
20429
  };
20383
20430
  }
20384
- function Ce(B, F, N) {
20431
+ function Ce(B, _, N) {
20385
20432
  return {
20386
- x: F / B || 0,
20433
+ x: _ / B || 0,
20387
20434
  y: N / B || 0
20388
20435
  };
20389
20436
  }
20390
- function xe(B, F) {
20391
- return B === F ? ne : c(B) >= c(F) ? B < 0 ? W : K : F < 0 ? re : te;
20437
+ function xe(B, _) {
20438
+ return B === _ ? ne : c(B) >= c(_) ? B < 0 ? W : K : _ < 0 ? re : te;
20392
20439
  }
20393
- function he(B, F, N) {
20440
+ function he(B, _, N) {
20394
20441
  N || (N = fe);
20395
- var V = F[N[0]] - B[N[0]], Y = F[N[1]] - B[N[1]];
20442
+ var V = _[N[0]] - B[N[0]], Y = _[N[1]] - B[N[1]];
20396
20443
  return Math.sqrt(V * V + Y * Y);
20397
20444
  }
20398
- function Ve(B, F, N) {
20445
+ function Ve(B, _, N) {
20399
20446
  N || (N = fe);
20400
- var V = F[N[0]] - B[N[0]], Y = F[N[1]] - B[N[1]];
20447
+ var V = _[N[0]] - B[N[0]], Y = _[N[1]] - B[N[1]];
20401
20448
  return Math.atan2(Y, V) * 180 / Math.PI;
20402
20449
  }
20403
- function ye(B, F) {
20404
- return Ve(F[1], F[0], Ee) + Ve(B[1], B[0], Ee);
20450
+ function ye(B, _) {
20451
+ return Ve(_[1], _[0], Ee) + Ve(B[1], B[0], Ee);
20405
20452
  }
20406
- function Be(B, F) {
20407
- return he(F[0], F[1], Ee) / he(B[0], B[1], Ee);
20453
+ function Be(B, _) {
20454
+ return he(_[0], _[1], Ee) / he(B[0], B[1], Ee);
20408
20455
  }
20409
20456
  var Ie = {
20410
20457
  mousedown: ee,
@@ -20419,13 +20466,13 @@ var Hammer = (function(n, t, e, r) {
20419
20466
  * handle mouse events
20420
20467
  * @param {Object} ev
20421
20468
  */
20422
- handler: function(F) {
20423
- var N = Ie[F.type];
20424
- N & ee && (F.button === 0 || F.button === 2) && (this.pressed = !0), N & Z && F.which !== 1 && (N = $), this.pressed && (N & $ && (this.pressed = !1), this.callback(this.manager, N, {
20425
- pointers: [F],
20426
- changedPointers: [F],
20469
+ handler: function(_) {
20470
+ var N = Ie[_.type];
20471
+ N & ee && (_.button === 0 || _.button === 2) && (this.pressed = !0), N & Z && _.which !== 1 && (N = $), this.pressed && (N & $ && (this.pressed = !1), this.callback(this.manager, N, {
20472
+ pointers: [_],
20473
+ changedPointers: [_],
20427
20474
  pointerType: j,
20428
- srcEvent: F
20475
+ srcEvent: _
20429
20476
  }));
20430
20477
  }
20431
20478
  });
@@ -20437,7 +20484,7 @@ var Hammer = (function(n, t, e, r) {
20437
20484
  pointerout: X
20438
20485
  }, Oe = {
20439
20486
  2: Q,
20440
- 3: U,
20487
+ 3: q,
20441
20488
  4: j,
20442
20489
  5: G
20443
20490
  // see https://twitter.com/jacobrossi/status/480596438489890816
@@ -20451,11 +20498,11 @@ var Hammer = (function(n, t, e, r) {
20451
20498
  * handle mouse events
20452
20499
  * @param {Object} ev
20453
20500
  */
20454
- handler: function(F) {
20455
- var N = this.store, V = !1, Y = !1, ce = F.type.toLowerCase().replace("ms", ""), Te = Fe[ce], je = Oe[F.pointerType] || F.pointerType, Ye = je == Q, De = O(N, F.pointerId, "pointerId");
20456
- Te & ee && (F.button === 0 || F.button === 2 || Ye) ? De < 0 && (N.push(F), De = N.length - 1) : Te & ($ | X) ? V = !0 : !Ye && F.buttons === 0 && (V = !0, Y = !0, Te = Fe.pointerup), !(De < 0) && (Y || (N[De] = F), this.callback(this.manager, Te, {
20501
+ handler: function(_) {
20502
+ var N = this.store, V = !1, Y = !1, ce = _.type.toLowerCase().replace("ms", ""), Te = Fe[ce], je = Oe[_.pointerType] || _.pointerType, Ye = je == Q, De = O(N, _.pointerId, "pointerId");
20503
+ Te & ee && (_.button === 0 || _.button === 2 || Ye) ? De < 0 && (N.push(_), De = N.length - 1) : Te & ($ | X) ? V = !0 : !Ye && _.buttons === 0 && (V = !0, Y = !0, Te = Fe.pointerup), !(De < 0) && (Y || (N[De] = _), this.callback(this.manager, Te, {
20457
20504
  pointers: N,
20458
- changedPointers: [F],
20505
+ changedPointers: [_],
20459
20506
  pointerType: je,
20460
20507
  srcEvent: N[De]
20461
20508
  }), V && N.splice(De, 1));
@@ -20471,22 +20518,22 @@ var Hammer = (function(n, t, e, r) {
20471
20518
  this.evTarget = nt, this.evWin = ot, this.started = !1, se.apply(this, arguments);
20472
20519
  }
20473
20520
  v(At, se, {
20474
- handler: function(F) {
20475
- var N = lt[F.type];
20521
+ handler: function(_) {
20522
+ var N = lt[_.type];
20476
20523
  if (N === ee && (this.started = !0), !!this.started) {
20477
- var V = We.call(this, F, N);
20524
+ var V = We.call(this, _, N);
20478
20525
  N & ($ | X) && V[0].length - V[1].length === 0 && (this.started = !1), this.callback(this.manager, N, {
20479
20526
  pointers: V[0],
20480
20527
  changedPointers: V[1],
20481
20528
  pointerType: Q,
20482
- srcEvent: F
20529
+ srcEvent: _
20483
20530
  });
20484
20531
  }
20485
20532
  }
20486
20533
  });
20487
- function We(B, F) {
20534
+ function We(B, _) {
20488
20535
  var N = C(B.touches), V = C(B.changedTouches);
20489
- return F & ($ | X) && (N = I(N.concat(V), "identifier")), [N, V];
20536
+ return _ & ($ | X) && (N = I(N.concat(V), "identifier")), [N, V];
20490
20537
  }
20491
20538
  var Ct = {
20492
20539
  touchstart: ee,
@@ -20498,28 +20545,28 @@ var Hammer = (function(n, t, e, r) {
20498
20545
  this.evTarget = _e, this.targetIds = {}, se.apply(this, arguments);
20499
20546
  }
20500
20547
  v(Ne, se, {
20501
- handler: function(F) {
20502
- var N = Ct[F.type], V = bt.call(this, F, N);
20548
+ handler: function(_) {
20549
+ var N = Ct[_.type], V = bt.call(this, _, N);
20503
20550
  V && this.callback(this.manager, N, {
20504
20551
  pointers: V[0],
20505
20552
  changedPointers: V[1],
20506
20553
  pointerType: Q,
20507
- srcEvent: F
20554
+ srcEvent: _
20508
20555
  });
20509
20556
  }
20510
20557
  });
20511
- function bt(B, F) {
20558
+ function bt(B, _) {
20512
20559
  var N = C(B.touches), V = this.targetIds;
20513
- if (F & (ee | Z) && N.length === 1)
20560
+ if (_ & (ee | Z) && N.length === 1)
20514
20561
  return V[N[0].identifier] = !0, [N, N];
20515
20562
  var Y, ce, Te = C(B.changedTouches), je = [], Ye = this.target;
20516
20563
  if (ce = N.filter(function(De) {
20517
20564
  return M(De.target, Ye);
20518
- }), F === ee)
20565
+ }), _ === ee)
20519
20566
  for (Y = 0; Y < ce.length; )
20520
20567
  V[ce[Y].identifier] = !0, Y++;
20521
20568
  for (Y = 0; Y < Te.length; )
20522
- V[Te[Y].identifier] && je.push(Te[Y]), F & ($ | X) && delete V[Te[Y].identifier], Y++;
20569
+ V[Te[Y].identifier] && je.push(Te[Y]), _ & ($ | X) && delete V[Te[Y].identifier], Y++;
20523
20570
  if (je.length)
20524
20571
  return [
20525
20572
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
@@ -20540,14 +20587,14 @@ var Hammer = (function(n, t, e, r) {
20540
20587
  * @param {String} inputEvent
20541
20588
  * @param {Object} inputData
20542
20589
  */
20543
- handler: function(F, N, V) {
20590
+ handler: function(_, N, V) {
20544
20591
  var Y = V.pointerType == Q, ce = V.pointerType == j;
20545
20592
  if (!(ce && V.sourceCapabilities && V.sourceCapabilities.firesTouchEvents)) {
20546
20593
  if (Y)
20547
20594
  Rt.call(this, N, V);
20548
20595
  else if (ce && it.call(this, V))
20549
20596
  return;
20550
- this.callback(F, N, V);
20597
+ this.callback(_, N, V);
20551
20598
  }
20552
20599
  },
20553
20600
  /**
@@ -20557,13 +20604,13 @@ var Hammer = (function(n, t, e, r) {
20557
20604
  this.touch.destroy(), this.mouse.destroy();
20558
20605
  }
20559
20606
  });
20560
- function Rt(B, F) {
20561
- B & ee ? (this.primaryTouch = F.changedPointers[0].identifier, tt.call(this, F)) : B & ($ | X) && tt.call(this, F);
20607
+ function Rt(B, _) {
20608
+ B & ee ? (this.primaryTouch = _.changedPointers[0].identifier, tt.call(this, _)) : B & ($ | X) && tt.call(this, _);
20562
20609
  }
20563
20610
  function tt(B) {
20564
- var F = B.changedPointers[0];
20565
- if (F.identifier === this.primaryTouch) {
20566
- var N = { x: F.clientX, y: F.clientY };
20611
+ var _ = B.changedPointers[0];
20612
+ if (_.identifier === this.primaryTouch) {
20613
+ var N = { x: _.clientX, y: _.clientY };
20567
20614
  this.lastTouches.push(N);
20568
20615
  var V = this.lastTouches, Y = function() {
20569
20616
  var ce = V.indexOf(N);
@@ -20573,16 +20620,16 @@ var Hammer = (function(n, t, e, r) {
20573
20620
  }
20574
20621
  }
20575
20622
  function it(B) {
20576
- for (var F = B.srcEvent.clientX, N = B.srcEvent.clientY, V = 0; V < this.lastTouches.length; V++) {
20577
- var Y = this.lastTouches[V], ce = Math.abs(F - Y.x), Te = Math.abs(N - Y.y);
20623
+ for (var _ = B.srcEvent.clientX, N = B.srcEvent.clientY, V = 0; V < this.lastTouches.length; V++) {
20624
+ var Y = this.lastTouches[V], ce = Math.abs(_ - Y.x), Te = Math.abs(N - Y.y);
20578
20625
  if (ce <= Tt && Te <= Tt)
20579
20626
  return !0;
20580
20627
  }
20581
20628
  return !1;
20582
20629
  }
20583
- var ct = s ? _(s.style, "touchAction") : r, Xe = ct !== r, de = "compute", we = "auto", Me = "manipulation", ke = "none", Ge = "pan-x", st = "pan-y", Qe = Ht();
20584
- function Je(B, F) {
20585
- this.manager = B, this.set(F);
20630
+ var ct = s ? H(s.style, "touchAction") : r, Xe = ct !== r, de = "compute", we = "auto", Me = "manipulation", ke = "none", Ge = "pan-x", st = "pan-y", Qe = Ht();
20631
+ function Je(B, _) {
20632
+ this.manager = B, this.set(_);
20586
20633
  }
20587
20634
  Je.prototype = {
20588
20635
  /**
@@ -20604,8 +20651,8 @@ var Hammer = (function(n, t, e, r) {
20604
20651
  */
20605
20652
  compute: function() {
20606
20653
  var B = [];
20607
- return p(this.manager.recognizers, function(F) {
20608
- b(F.options.enable, [F]) && (B = B.concat(F.getTouchAction()));
20654
+ return p(this.manager.recognizers, function(_) {
20655
+ b(_.options.enable, [_]) && (B = B.concat(_.getTouchAction()));
20609
20656
  }), ft(B.join(" "));
20610
20657
  },
20611
20658
  /**
@@ -20613,9 +20660,9 @@ var Hammer = (function(n, t, e, r) {
20613
20660
  * @param {Object} input
20614
20661
  */
20615
20662
  preventDefaults: function(B) {
20616
- var F = B.srcEvent, N = B.offsetDirection;
20663
+ var _ = B.srcEvent, N = B.offsetDirection;
20617
20664
  if (this.manager.session.prevented) {
20618
- F.preventDefault();
20665
+ _.preventDefault();
20619
20666
  return;
20620
20667
  }
20621
20668
  var V = this.actions, Y = w(V, ke) && !Qe[ke], ce = w(V, st) && !Qe[st], Te = w(V, Ge) && !Qe[Ge];
@@ -20625,7 +20672,7 @@ var Hammer = (function(n, t, e, r) {
20625
20672
  return;
20626
20673
  }
20627
20674
  if (!(Te && ce) && (Y || ce && N & ie || Te && N & ve))
20628
- return this.preventSrc(F);
20675
+ return this.preventSrc(_);
20629
20676
  },
20630
20677
  /**
20631
20678
  * call preventDefault to prevent the browser's default behavior (scrolling in most cases)
@@ -20638,15 +20685,15 @@ var Hammer = (function(n, t, e, r) {
20638
20685
  function ft(B) {
20639
20686
  if (w(B, ke))
20640
20687
  return ke;
20641
- var F = w(B, Ge), N = w(B, st);
20642
- return F && N ? ke : F || N ? F ? Ge : st : w(B, Me) ? Me : we;
20688
+ var _ = w(B, Ge), N = w(B, st);
20689
+ return _ && N ? ke : _ || N ? _ ? Ge : st : w(B, Me) ? Me : we;
20643
20690
  }
20644
20691
  function Ht() {
20645
20692
  if (!Xe)
20646
20693
  return !1;
20647
- var B = {}, F = n.CSS && n.CSS.supports;
20694
+ var B = {}, _ = n.CSS && n.CSS.supports;
20648
20695
  return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(N) {
20649
- B[N] = F ? n.CSS.supports("touch-action", N) : !0;
20696
+ B[N] = _ ? n.CSS.supports("touch-action", N) : !0;
20650
20697
  }), B;
20651
20698
  }
20652
20699
  var Ft = 1, dt = 2, Pt = 4, xt = 8, pt = xt, mt = 16, gt = 32;
@@ -20675,8 +20722,8 @@ var Hammer = (function(n, t, e, r) {
20675
20722
  recognizeWith: function(B) {
20676
20723
  if (h(B, "recognizeWith", this))
20677
20724
  return this;
20678
- var F = this.simultaneous;
20679
- return B = _t(B, this), F[B.id] || (F[B.id] = B, B.recognizeWith(this)), this;
20725
+ var _ = this.simultaneous;
20726
+ return B = _t(B, this), _[B.id] || (_[B.id] = B, B.recognizeWith(this)), this;
20680
20727
  },
20681
20728
  /**
20682
20729
  * drop the simultaneous link. it doesnt remove the link on the other recognizer.
@@ -20694,8 +20741,8 @@ var Hammer = (function(n, t, e, r) {
20694
20741
  requireFailure: function(B) {
20695
20742
  if (h(B, "requireFailure", this))
20696
20743
  return this;
20697
- var F = this.requireFail;
20698
- return B = _t(B, this), O(F, B) === -1 && (F.push(B), B.requireFailure(this)), this;
20744
+ var _ = this.requireFail;
20745
+ return B = _t(B, this), O(_, B) === -1 && (_.push(B), B.requireFailure(this)), this;
20699
20746
  },
20700
20747
  /**
20701
20748
  * drop the requireFailure link. it does not remove the link on the other recognizer.
@@ -20706,8 +20753,8 @@ var Hammer = (function(n, t, e, r) {
20706
20753
  if (h(B, "dropRequireFailure", this))
20707
20754
  return this;
20708
20755
  B = _t(B, this);
20709
- var F = O(this.requireFail, B);
20710
- return F > -1 && this.requireFail.splice(F, 1), this;
20756
+ var _ = O(this.requireFail, B);
20757
+ return _ > -1 && this.requireFail.splice(_, 1), this;
20711
20758
  },
20712
20759
  /**
20713
20760
  * has require failures boolean
@@ -20730,11 +20777,11 @@ var Hammer = (function(n, t, e, r) {
20730
20777
  * @param {Object} input
20731
20778
  */
20732
20779
  emit: function(B) {
20733
- var F = this, N = this.state;
20780
+ var _ = this, N = this.state;
20734
20781
  function V(Y) {
20735
- F.manager.emit(Y, B);
20782
+ _.manager.emit(Y, B);
20736
20783
  }
20737
- N < xt && V(F.options.event + Lt(N)), V(F.options.event), B.additionalEvent && V(B.additionalEvent), N >= xt && V(F.options.event + Lt(N));
20784
+ N < xt && V(_.options.event + Lt(N)), V(_.options.event), B.additionalEvent && V(B.additionalEvent), N >= xt && V(_.options.event + Lt(N));
20738
20785
  },
20739
20786
  /**
20740
20787
  * Check that all the require failure recognizers has failed,
@@ -20764,12 +20811,12 @@ var Hammer = (function(n, t, e, r) {
20764
20811
  * @param {Object} inputData
20765
20812
  */
20766
20813
  recognize: function(B) {
20767
- var F = A({}, B);
20768
- if (!b(this.options.enable, [this, F])) {
20814
+ var _ = A({}, B);
20815
+ if (!b(this.options.enable, [this, _])) {
20769
20816
  this.reset(), this.state = gt;
20770
20817
  return;
20771
20818
  }
20772
- this.state & (pt | mt | gt) && (this.state = Ft), this.state = this.process(F), this.state & (dt | Pt | xt | mt) && this.tryEmit(F);
20819
+ this.state & (pt | mt | gt) && (this.state = Ft), this.state = this.process(_), this.state & (dt | Pt | xt | mt) && this.tryEmit(_);
20773
20820
  },
20774
20821
  /**
20775
20822
  * return the state of the recognizer
@@ -20802,8 +20849,8 @@ var Hammer = (function(n, t, e, r) {
20802
20849
  function Ot(B) {
20803
20850
  return B == te ? "down" : B == re ? "up" : B == W ? "left" : B == K ? "right" : "";
20804
20851
  }
20805
- function _t(B, F) {
20806
- var N = F.manager;
20852
+ function _t(B, _) {
20853
+ var N = _.manager;
20807
20854
  return N ? N.get(B) : B;
20808
20855
  }
20809
20856
  function at() {
@@ -20828,8 +20875,8 @@ var Hammer = (function(n, t, e, r) {
20828
20875
  * @returns {Boolean} recognized
20829
20876
  */
20830
20877
  attrTest: function(B) {
20831
- var F = this.options.pointers;
20832
- return F === 0 || B.pointers.length === F;
20878
+ var _ = this.options.pointers;
20879
+ return _ === 0 || B.pointers.length === _;
20833
20880
  },
20834
20881
  /**
20835
20882
  * Process the input and return the state for the recognizer
@@ -20838,8 +20885,8 @@ var Hammer = (function(n, t, e, r) {
20838
20885
  * @returns {*} State
20839
20886
  */
20840
20887
  process: function(B) {
20841
- var F = this.state, N = B.eventType, V = F & (dt | Pt), Y = this.attrTest(B);
20842
- return V && (N & X || !Y) ? F | mt : V || Y ? N & $ ? F | xt : F & dt ? F | Pt : dt : gt;
20888
+ var _ = this.state, N = B.eventType, V = _ & (dt | Pt), Y = this.attrTest(B);
20889
+ return V && (N & X || !Y) ? _ | mt : V || Y ? N & $ ? _ | xt : _ & dt ? _ | Pt : dt : gt;
20843
20890
  }
20844
20891
  });
20845
20892
  function vt() {
@@ -20857,20 +20904,20 @@ var Hammer = (function(n, t, e, r) {
20857
20904
  direction: ae
20858
20905
  },
20859
20906
  getTouchAction: function() {
20860
- var B = this.options.direction, F = [];
20861
- return B & ie && F.push(st), B & ve && F.push(Ge), F;
20907
+ var B = this.options.direction, _ = [];
20908
+ return B & ie && _.push(st), B & ve && _.push(Ge), _;
20862
20909
  },
20863
20910
  directionTest: function(B) {
20864
- var F = this.options, N = !0, V = B.distance, Y = B.direction, ce = B.deltaX, Te = B.deltaY;
20865
- return Y & F.direction || (F.direction & ie ? (Y = ce === 0 ? ne : ce < 0 ? W : K, N = ce != this.pX, V = Math.abs(B.deltaX)) : (Y = Te === 0 ? ne : Te < 0 ? re : te, N = Te != this.pY, V = Math.abs(B.deltaY))), B.direction = Y, N && V > F.threshold && Y & F.direction;
20911
+ var _ = this.options, N = !0, V = B.distance, Y = B.direction, ce = B.deltaX, Te = B.deltaY;
20912
+ return Y & _.direction || (_.direction & ie ? (Y = ce === 0 ? ne : ce < 0 ? W : K, N = ce != this.pX, V = Math.abs(B.deltaX)) : (Y = Te === 0 ? ne : Te < 0 ? re : te, N = Te != this.pY, V = Math.abs(B.deltaY))), B.direction = Y, N && V > _.threshold && Y & _.direction;
20866
20913
  },
20867
20914
  attrTest: function(B) {
20868
20915
  return at.prototype.attrTest.call(this, B) && (this.state & dt || !(this.state & dt) && this.directionTest(B));
20869
20916
  },
20870
20917
  emit: function(B) {
20871
20918
  this.pX = B.deltaX, this.pY = B.deltaY;
20872
- var F = Ot(B.direction);
20873
- F && (B.additionalEvent = this.options.event + F), this._super.emit.call(this, B);
20919
+ var _ = Ot(B.direction);
20920
+ _ && (B.additionalEvent = this.options.event + _), this._super.emit.call(this, B);
20874
20921
  }
20875
20922
  });
20876
20923
  function wt() {
@@ -20894,8 +20941,8 @@ var Hammer = (function(n, t, e, r) {
20894
20941
  },
20895
20942
  emit: function(B) {
20896
20943
  if (B.scale !== 1) {
20897
- var F = B.scale < 1 ? "in" : "out";
20898
- B.additionalEvent = this.options.event + F;
20944
+ var _ = B.scale < 1 ? "in" : "out";
20945
+ B.additionalEvent = this.options.event + _;
20899
20946
  }
20900
20947
  this._super.emit.call(this, B);
20901
20948
  }
@@ -20920,13 +20967,13 @@ var Hammer = (function(n, t, e, r) {
20920
20967
  return [we];
20921
20968
  },
20922
20969
  process: function(B) {
20923
- var F = this.options, N = B.pointers.length === F.pointers, V = B.distance < F.threshold, Y = B.deltaTime > F.time;
20970
+ var _ = this.options, N = B.pointers.length === _.pointers, V = B.distance < _.threshold, Y = B.deltaTime > _.time;
20924
20971
  if (this._input = B, !V || !N || B.eventType & ($ | X) && !Y)
20925
20972
  this.reset();
20926
20973
  else if (B.eventType & ee)
20927
20974
  this.reset(), this._timer = d(function() {
20928
20975
  this.state = pt, this.tryEmit();
20929
- }, F.time, this);
20976
+ }, _.time, this);
20930
20977
  else if (B.eventType & $)
20931
20978
  return pt;
20932
20979
  return gt;
@@ -20977,12 +21024,12 @@ var Hammer = (function(n, t, e, r) {
20977
21024
  return vt.prototype.getTouchAction.call(this);
20978
21025
  },
20979
21026
  attrTest: function(B) {
20980
- var F = this.options.direction, N;
20981
- return F & (ie | ve) ? N = B.overallVelocity : F & ie ? N = B.overallVelocityX : F & ve && (N = B.overallVelocityY), this._super.attrTest.call(this, B) && F & B.offsetDirection && B.distance > this.options.threshold && B.maxPointers == this.options.pointers && c(N) > this.options.velocity && B.eventType & $;
21027
+ var _ = this.options.direction, N;
21028
+ return _ & (ie | ve) ? N = B.overallVelocity : _ & ie ? N = B.overallVelocityX : _ & ve && (N = B.overallVelocityY), this._super.attrTest.call(this, B) && _ & B.offsetDirection && B.distance > this.options.threshold && B.maxPointers == this.options.pointers && c(N) > this.options.velocity && B.eventType & $;
20982
21029
  },
20983
21030
  emit: function(B) {
20984
- var F = Ot(B.offsetDirection);
20985
- F && this.manager.emit(this.options.event + F, B), this.manager.emit(this.options.event, B);
21031
+ var _ = Ot(B.offsetDirection);
21032
+ _ && this.manager.emit(this.options.event + _, B), this.manager.emit(this.options.event, B);
20986
21033
  }
20987
21034
  });
20988
21035
  function Re() {
@@ -21010,19 +21057,19 @@ var Hammer = (function(n, t, e, r) {
21010
21057
  return [Me];
21011
21058
  },
21012
21059
  process: function(B) {
21013
- var F = this.options, N = B.pointers.length === F.pointers, V = B.distance < F.threshold, Y = B.deltaTime < F.time;
21060
+ var _ = this.options, N = B.pointers.length === _.pointers, V = B.distance < _.threshold, Y = B.deltaTime < _.time;
21014
21061
  if (this.reset(), B.eventType & ee && this.count === 0)
21015
21062
  return this.failTimeout();
21016
21063
  if (V && Y && N) {
21017
21064
  if (B.eventType != $)
21018
21065
  return this.failTimeout();
21019
- var ce = this.pTime ? B.timeStamp - this.pTime < F.interval : !0, Te = !this.pCenter || he(this.pCenter, B.center) < F.posThreshold;
21066
+ var ce = this.pTime ? B.timeStamp - this.pTime < _.interval : !0, Te = !this.pCenter || he(this.pCenter, B.center) < _.posThreshold;
21020
21067
  this.pTime = B.timeStamp, this.pCenter = B.center, !Te || !ce ? this.count = 1 : this.count += 1, this._input = B;
21021
- var je = this.count % F.taps;
21068
+ var je = this.count % _.taps;
21022
21069
  if (je === 0)
21023
21070
  return this.hasRequireFailures() ? (this._timer = d(function() {
21024
21071
  this.state = pt, this.tryEmit();
21025
- }, F.interval, this), dt) : pt;
21072
+ }, _.interval, this), dt) : pt;
21026
21073
  }
21027
21074
  return gt;
21028
21075
  },
@@ -21038,8 +21085,8 @@ var Hammer = (function(n, t, e, r) {
21038
21085
  this.state == pt && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
21039
21086
  }
21040
21087
  });
21041
- function qe(B, F) {
21042
- return F = F || {}, F.recognizers = T(F.recognizers, qe.defaults.preset), new Ke(B, F);
21088
+ function qe(B, _) {
21089
+ return _ = _ || {}, _.recognizers = T(_.recognizers, qe.defaults.preset), new Ke(B, _);
21043
21090
  }
21044
21091
  qe.VERSION = "2.0.7", qe.defaults = {
21045
21092
  /**
@@ -21138,8 +21185,8 @@ var Hammer = (function(n, t, e, r) {
21138
21185
  }
21139
21186
  };
21140
21187
  var rt = 1, ut = 2;
21141
- function Ke(B, F) {
21142
- this.options = A({}, qe.defaults, F || {}), this.options.inputTarget = this.options.inputTarget || B, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = B, this.input = le(this), this.touchAction = new Je(this, this.options.touchAction), ht(this, !0), p(this.options.recognizers, function(N) {
21188
+ function Ke(B, _) {
21189
+ this.options = A({}, qe.defaults, _ || {}), this.options.inputTarget = this.options.inputTarget || B, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = B, this.input = le(this), this.touchAction = new Je(this, this.options.touchAction), ht(this, !0), p(this.options.recognizers, function(N) {
21143
21190
  var V = this.add(new N[0](N[1]));
21144
21191
  N[2] && V.recognizeWith(N[2]), N[3] && V.requireFailure(N[3]);
21145
21192
  }, this);
@@ -21169,15 +21216,15 @@ var Hammer = (function(n, t, e, r) {
21169
21216
  * @param {Object} inputData
21170
21217
  */
21171
21218
  recognize: function(B) {
21172
- var F = this.session;
21173
- if (!F.stopped) {
21219
+ var _ = this.session;
21220
+ if (!_.stopped) {
21174
21221
  this.touchAction.preventDefaults(B);
21175
- var N, V = this.recognizers, Y = F.curRecognizer;
21176
- (!Y || Y && Y.state & pt) && (Y = F.curRecognizer = null);
21222
+ var N, V = this.recognizers, Y = _.curRecognizer;
21223
+ (!Y || Y && Y.state & pt) && (Y = _.curRecognizer = null);
21177
21224
  for (var ce = 0; ce < V.length; )
21178
- N = V[ce], F.stopped !== ut && // 1
21225
+ N = V[ce], _.stopped !== ut && // 1
21179
21226
  (!Y || N == Y || // 2
21180
- N.canRecognizeWith(Y)) ? N.recognize(B) : N.reset(), !Y && N.state & (dt | Pt | xt) && (Y = F.curRecognizer = N), ce++;
21227
+ N.canRecognizeWith(Y)) ? N.recognize(B) : N.reset(), !Y && N.state & (dt | Pt | xt) && (Y = _.curRecognizer = N), ce++;
21181
21228
  }
21182
21229
  },
21183
21230
  /**
@@ -21188,9 +21235,9 @@ var Hammer = (function(n, t, e, r) {
21188
21235
  get: function(B) {
21189
21236
  if (B instanceof Et)
21190
21237
  return B;
21191
- for (var F = this.recognizers, N = 0; N < F.length; N++)
21192
- if (F[N].options.event == B)
21193
- return F[N];
21238
+ for (var _ = this.recognizers, N = 0; N < _.length; N++)
21239
+ if (_[N].options.event == B)
21240
+ return _[N];
21194
21241
  return null;
21195
21242
  },
21196
21243
  /**
@@ -21202,8 +21249,8 @@ var Hammer = (function(n, t, e, r) {
21202
21249
  add: function(B) {
21203
21250
  if (h(B, "add", this))
21204
21251
  return this;
21205
- var F = this.get(B.options.event);
21206
- return F && this.remove(F), this.recognizers.push(B), B.manager = this, this.touchAction.update(), B;
21252
+ var _ = this.get(B.options.event);
21253
+ return _ && this.remove(_), this.recognizers.push(B), B.manager = this, this.touchAction.update(), B;
21207
21254
  },
21208
21255
  /**
21209
21256
  * remove a recognizer by name or instance
@@ -21214,8 +21261,8 @@ var Hammer = (function(n, t, e, r) {
21214
21261
  if (h(B, "remove", this))
21215
21262
  return this;
21216
21263
  if (B = this.get(B), B) {
21217
- var F = this.recognizers, N = O(F, B);
21218
- N !== -1 && (F.splice(N, 1), this.touchAction.update());
21264
+ var _ = this.recognizers, N = O(_, B);
21265
+ N !== -1 && (_.splice(N, 1), this.touchAction.update());
21219
21266
  }
21220
21267
  return this;
21221
21268
  },
@@ -21225,11 +21272,11 @@ var Hammer = (function(n, t, e, r) {
21225
21272
  * @param {Function} handler
21226
21273
  * @returns {EventEmitter} this
21227
21274
  */
21228
- on: function(B, F) {
21229
- if (B !== r && F !== r) {
21275
+ on: function(B, _) {
21276
+ if (B !== r && _ !== r) {
21230
21277
  var N = this.handlers;
21231
21278
  return p(P(B), function(V) {
21232
- N[V] = N[V] || [], N[V].push(F);
21279
+ N[V] = N[V] || [], N[V].push(_);
21233
21280
  }), this;
21234
21281
  }
21235
21282
  },
@@ -21239,11 +21286,11 @@ var Hammer = (function(n, t, e, r) {
21239
21286
  * @param {Function} [handler]
21240
21287
  * @returns {EventEmitter} this
21241
21288
  */
21242
- off: function(B, F) {
21289
+ off: function(B, _) {
21243
21290
  if (B !== r) {
21244
21291
  var N = this.handlers;
21245
21292
  return p(P(B), function(V) {
21246
- F ? N[V] && N[V].splice(O(N[V], F), 1) : delete N[V];
21293
+ _ ? N[V] && N[V].splice(O(N[V], _), 1) : delete N[V];
21247
21294
  }), this;
21248
21295
  }
21249
21296
  },
@@ -21252,15 +21299,15 @@ var Hammer = (function(n, t, e, r) {
21252
21299
  * @param {String} event
21253
21300
  * @param {Object} data
21254
21301
  */
21255
- emit: function(B, F) {
21256
- this.options.domEvents && Bt(B, F);
21302
+ emit: function(B, _) {
21303
+ this.options.domEvents && Bt(B, _);
21257
21304
  var N = this.handlers[B] && this.handlers[B].slice();
21258
21305
  if (!(!N || !N.length)) {
21259
- F.type = B, F.preventDefault = function() {
21260
- F.srcEvent.preventDefault();
21306
+ _.type = B, _.preventDefault = function() {
21307
+ _.srcEvent.preventDefault();
21261
21308
  };
21262
21309
  for (var V = 0; V < N.length; )
21263
- N[V](F), V++;
21310
+ N[V](_), V++;
21264
21311
  }
21265
21312
  },
21266
21313
  /**
@@ -21271,18 +21318,18 @@ var Hammer = (function(n, t, e, r) {
21271
21318
  this.element && ht(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
21272
21319
  }
21273
21320
  };
21274
- function ht(B, F) {
21321
+ function ht(B, _) {
21275
21322
  var N = B.element;
21276
21323
  if (N.style) {
21277
21324
  var V;
21278
21325
  p(B.options.cssProps, function(Y, ce) {
21279
- V = _(N.style, ce), F ? (B.oldCssProps[V] = N.style[V], N.style[V] = Y) : N.style[V] = B.oldCssProps[V] || "";
21280
- }), F || (B.oldCssProps = {});
21326
+ V = H(N.style, ce), _ ? (B.oldCssProps[V] = N.style[V], N.style[V] = Y) : N.style[V] = B.oldCssProps[V] || "";
21327
+ }), _ || (B.oldCssProps = {});
21281
21328
  }
21282
21329
  }
21283
- function Bt(B, F) {
21330
+ function Bt(B, _) {
21284
21331
  var N = t.createEvent("Event");
21285
- N.initEvent(B, !0, !0), N.gesture = F, F.target.dispatchEvent(N);
21332
+ N.initEvent(B, !0, !0), N.gesture = _, _.target.dispatchEvent(N);
21286
21333
  }
21287
21334
  return A(qe, {
21288
21335
  INPUT_START: ee,
@@ -21328,7 +21375,7 @@ var Hammer = (function(n, t, e, r) {
21328
21375
  assign: A,
21329
21376
  inherit: v,
21330
21377
  bindFn: E,
21331
- prefixed: _
21378
+ prefixed: H
21332
21379
  }), qe;
21333
21380
  })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), BaseController = (
21334
21381
  /** @class */
@@ -21497,15 +21544,15 @@ var Hammer = (function(n, t, e, r) {
21497
21544
  ]), s.on("panstart pan", function(C) {
21498
21545
  var I = u(s);
21499
21546
  if (!(I && !o(I.center))) {
21500
- var _ = createEvent("gesture.pan", {
21547
+ var H = createEvent("gesture.pan", {
21501
21548
  target: C.target,
21502
21549
  pointerType: C.pointerType,
21503
21550
  srcEvent: C.srcEvent,
21504
- pointers: C.pointers.map(function(H) {
21505
- var L = r.relativeClientPosition(H), k = r.createRaycasterFromCamera(L, r.camera);
21551
+ pointers: C.pointers.map(function(F) {
21552
+ var L = r.relativeClientPosition(F), k = r.createRaycasterFromCamera(L, r.camera);
21506
21553
  return {
21507
- x: H.x,
21508
- y: H.y,
21554
+ x: F.x,
21555
+ y: F.y,
21509
21556
  delta: 0,
21510
21557
  buttons: 0,
21511
21558
  coords: L,
@@ -21515,11 +21562,11 @@ var Hammer = (function(n, t, e, r) {
21515
21562
  isFirst: C.isFirst,
21516
21563
  isFinal: C.isFinal,
21517
21564
  scale: C.scale,
21518
- center: (function(H) {
21519
- var L = r.relativeClientPosition(H), k = r.createRaycasterFromCamera(L, r.camera);
21565
+ center: (function(F) {
21566
+ var L = r.relativeClientPosition(F), k = r.createRaycasterFromCamera(L, r.camera);
21520
21567
  return {
21521
- x: H.x,
21522
- y: H.y,
21568
+ x: F.x,
21569
+ y: F.y,
21523
21570
  delta: 0,
21524
21571
  buttons: 0,
21525
21572
  coords: L,
@@ -21533,21 +21580,21 @@ var Hammer = (function(n, t, e, r) {
21533
21580
  userAction: !0,
21534
21581
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21535
21582
  });
21536
- r.onPanGesture(_), b();
21583
+ r.onPanGesture(H), b();
21537
21584
  }
21538
21585
  }), s.on("tap", function(C) {
21539
21586
  if (!(C.pointerType === "mouse" && C.srcEvent.button !== 0)) {
21540
21587
  var I = u(s);
21541
21588
  if (!(I && !o(I.center))) {
21542
- var _ = createEvent("gesture.tap", {
21589
+ var H = createEvent("gesture.tap", {
21543
21590
  target: C.target,
21544
21591
  pointerType: C.pointerType,
21545
21592
  srcEvent: C.srcEvent,
21546
- pointers: C.pointers.map(function(H) {
21547
- var L = r.relativeClientPosition(H), k = r.createRaycasterFromCamera(L, r.camera);
21593
+ pointers: C.pointers.map(function(F) {
21594
+ var L = r.relativeClientPosition(F), k = r.createRaycasterFromCamera(L, r.camera);
21548
21595
  return {
21549
- x: H.x,
21550
- y: H.y,
21596
+ x: F.x,
21597
+ y: F.y,
21551
21598
  delta: 0,
21552
21599
  buttons: 0,
21553
21600
  coords: L,
@@ -21557,11 +21604,11 @@ var Hammer = (function(n, t, e, r) {
21557
21604
  isFirst: !0,
21558
21605
  isFinal: !0,
21559
21606
  scale: C.scale,
21560
- center: (function(H) {
21561
- var L = r.relativeClientPosition(H), k = r.createRaycasterFromCamera(L, r.camera);
21607
+ center: (function(F) {
21608
+ var L = r.relativeClientPosition(F), k = r.createRaycasterFromCamera(L, r.camera);
21562
21609
  return {
21563
- x: H.x,
21564
- y: H.y,
21610
+ x: F.x,
21611
+ y: F.y,
21565
21612
  delta: 0,
21566
21613
  buttons: 0,
21567
21614
  coords: L,
@@ -21575,22 +21622,22 @@ var Hammer = (function(n, t, e, r) {
21575
21622
  userAction: !0,
21576
21623
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21577
21624
  });
21578
- r.onTapGesture(_), b();
21625
+ r.onTapGesture(H), b();
21579
21626
  }
21580
21627
  }
21581
21628
  }), s.on("pinchstart pinch pinchend", function(C) {
21582
21629
  var I = u(s);
21583
21630
  if (!(I && !o(I.center))) {
21584
- var _ = createEvent("gesture.pinch", {
21631
+ var H = createEvent("gesture.pinch", {
21585
21632
  target: C.target,
21586
21633
  pointerType: C.pointerType,
21587
21634
  srcEvent: C.srcEvent,
21588
- pointers: C.pointers.map(function(H) {
21589
- var L, k = r.relativeClientPosition(H), D = new THREE.Raycaster();
21635
+ pointers: C.pointers.map(function(F) {
21636
+ var L, k = r.relativeClientPosition(F), D = new THREE.Raycaster();
21590
21637
  return D.params.Points = { threshold: 0.1 }, D.setFromCamera(k, r.camera), {
21591
- x: H.x,
21592
- y: H.y,
21593
- delta: (L = H.delta) !== null && L !== void 0 ? L : 0,
21638
+ x: F.x,
21639
+ y: F.y,
21640
+ delta: (L = F.delta) !== null && L !== void 0 ? L : 0,
21594
21641
  buttons: 0,
21595
21642
  coords: k,
21596
21643
  raycaster: D
@@ -21599,11 +21646,11 @@ var Hammer = (function(n, t, e, r) {
21599
21646
  isFirst: C.type === "pinchstart",
21600
21647
  isFinal: C.type === "pinchend",
21601
21648
  scale: C.scale,
21602
- center: (function(H) {
21603
- var L = r.relativeClientPosition(H), k = r.createRaycasterFromCamera(L, r.camera);
21649
+ center: (function(F) {
21650
+ var L = r.relativeClientPosition(F), k = r.createRaycasterFromCamera(L, r.camera);
21604
21651
  return {
21605
- x: H.x,
21606
- y: H.y,
21652
+ x: F.x,
21653
+ y: F.y,
21607
21654
  delta: 0,
21608
21655
  buttons: 0,
21609
21656
  coords: L,
@@ -21617,21 +21664,21 @@ var Hammer = (function(n, t, e, r) {
21617
21664
  userAction: !0,
21618
21665
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21619
21666
  });
21620
- r.onPinchGesture(_), b();
21667
+ r.onPinchGesture(H), b();
21621
21668
  }
21622
21669
  }), s.on("dbltap", function(C) {
21623
21670
  if (!(C.pointerType === "mouse" && C.srcEvent.button !== 0)) {
21624
21671
  var I = u(s);
21625
21672
  if (!(I && !o(I.center))) {
21626
- var _ = createEvent("gesture.dbltap", {
21673
+ var H = createEvent("gesture.dbltap", {
21627
21674
  target: C.target,
21628
21675
  pointerType: C.pointerType,
21629
21676
  srcEvent: C.srcEvent,
21630
- pointers: C.pointers.map(function(H) {
21631
- var L = r.relativeClientPosition(H), k = r.createRaycasterFromCamera(L, r.camera);
21677
+ pointers: C.pointers.map(function(F) {
21678
+ var L = r.relativeClientPosition(F), k = r.createRaycasterFromCamera(L, r.camera);
21632
21679
  return {
21633
- x: H.x,
21634
- y: H.y,
21680
+ x: F.x,
21681
+ y: F.y,
21635
21682
  delta: 0,
21636
21683
  buttons: 0,
21637
21684
  coords: L,
@@ -21641,11 +21688,11 @@ var Hammer = (function(n, t, e, r) {
21641
21688
  isFirst: !0,
21642
21689
  isFinal: !0,
21643
21690
  scale: C.scale,
21644
- center: (function(H) {
21645
- var L = r.relativeClientPosition(H), k = r.createRaycasterFromCamera(L, r.camera);
21691
+ center: (function(F) {
21692
+ var L = r.relativeClientPosition(F), k = r.createRaycasterFromCamera(L, r.camera);
21646
21693
  return {
21647
- x: H.x,
21648
- y: H.y,
21694
+ x: F.x,
21695
+ y: F.y,
21649
21696
  delta: 0,
21650
21697
  buttons: 0,
21651
21698
  coords: L,
@@ -21659,22 +21706,22 @@ var Hammer = (function(n, t, e, r) {
21659
21706
  userAction: !0,
21660
21707
  state: __assign(__assign({ mode: r.mode }, r.currentPano), clonePose(r.camera.pose))
21661
21708
  });
21662
- r.onDblTapGesture(_), b();
21709
+ r.onDblTapGesture(H), b();
21663
21710
  }
21664
21711
  }
21665
21712
  });
21666
- var d = null, h = null, p = function(C, I, _) {
21667
- var H = {
21668
- x: _.clientX,
21669
- y: _.clientY
21670
- }, L = r.relativeClientPosition(H), k = r.createRaycasterFromCamera(L, r.camera), D = __assign(__assign({}, H), { coords: L, raycaster: k, buttons: _.buttons, delta: 0 }), q = C === "pinchend" ? I : I - _.deltaY / 280, z = createEvent("gesture.pinch", {
21671
- target: _.target,
21713
+ var d = null, h = null, p = function(C, I, H) {
21714
+ var F = {
21715
+ x: H.clientX,
21716
+ y: H.clientY
21717
+ }, L = r.relativeClientPosition(F), k = r.createRaycasterFromCamera(L, r.camera), D = __assign(__assign({}, F), { coords: L, raycaster: k, buttons: H.buttons, delta: 0 }), U = C === "pinchend" ? I : I - H.deltaY / 280, z = createEvent("gesture.pinch", {
21718
+ target: H.target,
21672
21719
  pointerType: "mouse",
21673
- srcEvent: _,
21720
+ srcEvent: H,
21674
21721
  pointers: [__assign({}, D)],
21675
21722
  isFirst: C === "pinchstart",
21676
21723
  isFinal: C === "pinchend",
21677
- scale: clamp$1(q, 0.1, 10),
21724
+ scale: clamp$1(U, 0.1, 10),
21678
21725
  center: __assign({}, D),
21679
21726
  velocityX: 0,
21680
21727
  velocityY: 0,
@@ -21685,24 +21732,24 @@ var Hammer = (function(n, t, e, r) {
21685
21732
  });
21686
21733
  return z;
21687
21734
  }, m = function(C) {
21688
- var I, _ = { x: C.clientX, y: C.clientY };
21689
- if (o(_)) {
21735
+ var I, H = { x: C.clientX, y: C.clientY };
21736
+ if (o(H)) {
21690
21737
  if (C.preventDefault(), C.ctrlKey) {
21691
- var H = (I = d == null ? void 0 : d.prevEvent.scale) !== null && I !== void 0 ? I : 1, L = p(d ? "pinch" : "pinchstart", H, C);
21738
+ var F = (I = d == null ? void 0 : d.prevEvent.scale) !== null && I !== void 0 ? I : 1, L = p(d ? "pinch" : "pinchstart", F, C);
21692
21739
  d === null ? d = {
21693
21740
  firstEvent: L,
21694
21741
  prevEvent: L
21695
21742
  } : d.prevEvent = L, r.onPinchGesture(L), h !== null && window.clearTimeout(h), h = window.setTimeout(function() {
21696
- var U;
21743
+ var q;
21697
21744
  h = null;
21698
- var j = (U = d == null ? void 0 : d.prevEvent.scale) !== null && U !== void 0 ? U : 1, G = p("pinchend", j, C);
21745
+ var j = (q = d == null ? void 0 : d.prevEvent.scale) !== null && q !== void 0 ? q : 1, G = p("pinchend", j, C);
21699
21746
  d = null, r.onPinchGesture(G);
21700
21747
  }, 200);
21701
21748
  } else {
21702
- var k = (Math.abs(C.deltaY) > Math.abs(C.deltaX) ? C.deltaY : C.deltaX) / -60, D = r.mouseWheelState !== void 0, q = {
21749
+ var k = (Math.abs(C.deltaY) > Math.abs(C.deltaX) ? C.deltaY : C.deltaX) / -60, D = r.mouseWheelState !== void 0, U = {
21703
21750
  x: C.clientX,
21704
21751
  y: C.clientY
21705
- }, z = r.relativeClientPosition(q), J = r.createRaycasterFromCamera(z, r.camera), Q = __assign(__assign({}, q), { coords: z, raycaster: J, buttons: C.buttons, delta: k }), L = createEvent("gesture.mousewheel", {
21752
+ }, z = r.relativeClientPosition(U), J = r.createRaycasterFromCamera(z, r.camera), Q = __assign(__assign({}, U), { coords: z, raycaster: J, buttons: C.buttons, delta: k }), L = createEvent("gesture.mousewheel", {
21706
21753
  target: C.target,
21707
21754
  pointerType: "mouse",
21708
21755
  srcEvent: C,
@@ -21751,10 +21798,10 @@ var Hammer = (function(n, t, e, r) {
21751
21798
  }
21752
21799
  var I = !1;
21753
21800
  r.mouseMoveState || (I = !0);
21754
- var _ = {
21801
+ var H = {
21755
21802
  x: C.clientX,
21756
21803
  y: C.clientY
21757
- }, H = r.relativeClientPosition(_), L = r.createRaycasterFromCamera(H, r.camera), k = __assign(__assign({}, _), { coords: H, raycaster: L, buttons: C.buttons, delta: 0 }), D = createEvent("gesture.mousemove", {
21804
+ }, F = r.relativeClientPosition(H), L = r.createRaycasterFromCamera(F, r.camera), k = __assign(__assign({}, H), { coords: F, raycaster: L, buttons: C.buttons, delta: 0 }), D = createEvent("gesture.mousemove", {
21758
21805
  target: C.target,
21759
21806
  pointerType: "mouse",
21760
21807
  srcEvent: C,
@@ -21792,10 +21839,10 @@ var Hammer = (function(n, t, e, r) {
21792
21839
  timeStamp: now(),
21793
21840
  stop: noop
21794
21841
  });
21795
- var _ = now() - r.pressState.timeStamp, H = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { isFirst: I, isFinal: !1, center: __assign(__assign({}, r.pressState.event.center), { delta: _ }), pointers: r.pressState.event.pointers.map(function(L) {
21796
- return __assign(__assign({}, L), { delta: _ });
21842
+ var H = now() - r.pressState.timeStamp, F = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { isFirst: I, isFinal: !1, center: __assign(__assign({}, r.pressState.event.center), { delta: H }), pointers: r.pressState.event.pointers.map(function(L) {
21843
+ return __assign(__assign({}, L), { delta: H });
21797
21844
  }) }));
21798
- r.onPressGesture(H), r.pressState && (r.pressState.stop = AnimationFrameLoop.shared.add(function(L) {
21845
+ r.onPressGesture(F), r.pressState && (r.pressState.stop = AnimationFrameLoop.shared.add(function(L) {
21799
21846
  y(C);
21800
21847
  }, !0, 1));
21801
21848
  }, v = function(C) {
@@ -21803,7 +21850,7 @@ var Hammer = (function(n, t, e, r) {
21803
21850
  var I = {
21804
21851
  x: C.changedTouches[0].clientX,
21805
21852
  y: C.changedTouches[0].clientY
21806
- }, _ = r.relativeClientPosition(I), H = r.createRaycasterFromCamera(_, r.camera), L = __assign(__assign({}, I), { coords: _, raycaster: H, buttons: 0, delta: 0 }), k = createEvent("gesture.press", {
21853
+ }, H = r.relativeClientPosition(I), F = r.createRaycasterFromCamera(H, r.camera), L = __assign(__assign({}, I), { coords: H, raycaster: F, buttons: 0, delta: 0 }), k = createEvent("gesture.press", {
21807
21854
  target: C.target,
21808
21855
  pointerType: "touch",
21809
21856
  srcEvent: C,
@@ -21826,7 +21873,7 @@ var Hammer = (function(n, t, e, r) {
21826
21873
  var I = {
21827
21874
  x: C.clientX,
21828
21875
  y: C.clientY
21829
- }, _ = r.relativeClientPosition(I), H = r.createRaycasterFromCamera(_, r.camera), L = __assign(__assign({}, I), { coords: _, raycaster: H, buttons: C.buttons, delta: 0 }), k = createEvent("gesture.press", {
21876
+ }, H = r.relativeClientPosition(I), F = r.createRaycasterFromCamera(H, r.camera), L = __assign(__assign({}, I), { coords: H, raycaster: F, buttons: C.buttons, delta: 0 }), k = createEvent("gesture.press", {
21830
21877
  target: C.target,
21831
21878
  pointerType: "mouse",
21832
21879
  srcEvent: C,
@@ -21846,33 +21893,33 @@ var Hammer = (function(n, t, e, r) {
21846
21893
  }, b = function() {
21847
21894
  var C;
21848
21895
  if (r.pressState) {
21849
- var I = now() - r.pressState.timeStamp, _ = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { center: __assign(__assign({}, r.pressState.event.center), { delta: I }), isFirst: !1, isFinal: !0, pointers: r.pressState.event.pointers.map(function(H) {
21850
- return __assign(__assign({}, H), { delta: I });
21896
+ var I = now() - r.pressState.timeStamp, H = createEvent(r.pressState.event.type, __assign(__assign({}, r.pressState.event), { center: __assign(__assign({}, r.pressState.event.center), { delta: I }), isFirst: !1, isFinal: !0, pointers: r.pressState.event.pointers.map(function(F) {
21897
+ return __assign(__assign({}, F), { delta: I });
21851
21898
  }) }));
21852
- r.onPressGesture(_), (C = r.pressState) === null || C === void 0 || C.stop(), r.pressState = void 0;
21899
+ r.onPressGesture(H), (C = r.pressState) === null || C === void 0 || C.stop(), r.pressState = void 0;
21853
21900
  }
21854
21901
  }, T = null, S = function(C) {
21855
- var I, _ = !1, H = !1;
21902
+ var I, H = !1, F = !1;
21856
21903
  switch (C.type) {
21857
21904
  case "gesturestart":
21858
- _ = !0;
21905
+ H = !0;
21859
21906
  break;
21860
21907
  case "gestureend":
21861
- H = !0;
21908
+ F = !0;
21862
21909
  break;
21863
21910
  }
21864
21911
  var L = {
21865
21912
  x: C.clientX,
21866
21913
  y: C.clientY
21867
- }, k = r.relativeClientPosition(L), D = r.createRaycasterFromCamera(k, r.camera), q = __assign(__assign({}, L), { coords: k, raycaster: D, buttons: 0, delta: 0 }), z = createEvent("gesture.pinch", {
21914
+ }, k = r.relativeClientPosition(L), D = r.createRaycasterFromCamera(k, r.camera), U = __assign(__assign({}, L), { coords: k, raycaster: D, buttons: 0, delta: 0 }), z = createEvent("gesture.pinch", {
21868
21915
  target: C.target,
21869
21916
  pointerType: "mouse",
21870
21917
  srcEvent: C,
21871
- pointers: [__assign({}, q)],
21872
- isFirst: _,
21873
- isFinal: H,
21918
+ pointers: [__assign({}, U)],
21919
+ isFirst: H,
21920
+ isFinal: F,
21874
21921
  scale: (I = C.scale) !== null && I !== void 0 ? I : 1,
21875
- center: __assign({}, q),
21922
+ center: __assign({}, U),
21876
21923
  velocityX: 0,
21877
21924
  velocityY: 0,
21878
21925
  overallVelocityX: 0,
@@ -21887,18 +21934,18 @@ var Hammer = (function(n, t, e, r) {
21887
21934
  T = {
21888
21935
  firstEvent: I
21889
21936
  };
21890
- var _ = T.firstEvent;
21891
- _ && !o(_.center) || r.onPinchGesture(I);
21937
+ var H = T.firstEvent;
21938
+ H && !o(H.center) || r.onPinchGesture(I);
21892
21939
  }
21893
21940
  }, M = function(C) {
21894
21941
  if (C.preventDefault(), !isMobile && T) {
21895
- var I = S(C), _ = T.firstEvent;
21896
- _ && !o(_.center) || r.onPinchGesture(I);
21942
+ var I = S(C), H = T.firstEvent;
21943
+ H && !o(H.center) || r.onPinchGesture(I);
21897
21944
  }
21898
21945
  }, w = function(C) {
21899
21946
  if (C.preventDefault(), !isMobile && T) {
21900
- var I = S(C), _ = T.firstEvent;
21901
- T = null, !(_ && !o(_.center)) && r.onPinchGesture(I);
21947
+ var I = S(C), H = T.firstEvent;
21948
+ T = null, !(H && !o(H.center)) && r.onPinchGesture(I);
21902
21949
  }
21903
21950
  }, P = function(C) {
21904
21951
  if (C && typeof C.preventDefault == "function" && C.currentTarget === e && C.preventDefault(), typeof getSelection == "function") {
@@ -22173,7 +22220,7 @@ void main() {
22173
22220
  }
22174
22221
  this.inMomentumMovement && (this.cameraMotion.set({ longitude: d, latitude: A }, 0).catch(noop), y ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(E, b) {
22175
22222
  u.requestMomentumMovement(e, !1, l, b);
22176
- }, !0, 1));
22223
+ }, !0));
22177
22224
  }
22178
22225
  }, t.prototype.onPanGesture = function(e) {
22179
22226
  this.userAction = e.userAction, this.stopMomentumMovement(), this.hideIntersectMesh();
@@ -22594,8 +22641,8 @@ void main() {
22594
22641
  return;
22595
22642
  }
22596
22643
  this.inMomentumMovement && (this.cameraMotion.set({ longitude: h, latitude: A }, 0).catch(noop), y ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(E, b) {
22597
- u.requestMomentumMovement(e, !1, l, b | 0);
22598
- }, !0, 1));
22644
+ u.requestMomentumMovement(e, !1, l, b);
22645
+ }, !0));
22599
22646
  }
22600
22647
  }, t.prototype.onPanGesture = function(e) {
22601
22648
  this.userAction = e.userAction, this.stopMomentumMovement(), this.hideIntersectMesh();
@@ -23078,8 +23125,8 @@ void main() {
23078
23125
  }, function(me) {
23079
23126
  return e.pedding--, Promise.reject(me);
23080
23127
  }), W = new TileMesh(X, le), W.name = "tiling:tile-".concat(ve), W.visible = !1, W.appearDuration = I.appearDuration, I.tileMeshes.set(X, W), I.scene.add(W), W.updateTime(o), r = !0;
23081
- }, I = this, _ = 0, H = M; _ < H.length; _++) {
23082
- var L = H[_];
23128
+ }, I = this, H = 0, F = M; H < F.length; H++) {
23129
+ var L = F[H];
23083
23130
  C(L);
23084
23131
  }
23085
23132
  var k = [], D = [];
@@ -23088,17 +23135,17 @@ void main() {
23088
23135
  var W = ne.level >= m && ne.level <= A;
23089
23136
  X.visible !== W && (X.visible = W, r = !0);
23090
23137
  });
23091
- for (var q = D.sort(function(X, ne) {
23138
+ for (var U = D.sort(function(X, ne) {
23092
23139
  return ne.activeTime - X.activeTime;
23093
- }).slice(Math.max(0, this.maxCacheTile - k.length)), z = 0, J = q; z < J.length; z++) {
23140
+ }).slice(Math.max(0, this.maxCacheTile - k.length)), z = 0, J = U; z < J.length; z++) {
23094
23141
  var Q = J[z];
23095
23142
  this.tileMeshes.delete(Q.node), this.scene.remove(Q), Q.dispose(), r = !0;
23096
23143
  }
23097
23144
  if (r) {
23098
- var U = l.getRenderTarget();
23145
+ var q = l.getRenderTarget();
23099
23146
  scratchPrevClearColor$1.copy(l.getClearColor());
23100
23147
  var j = l.getClearAlpha(), G = l.autoClear, oe = l.autoClearColor, ee = l.autoClearDepth, Z = l.autoClearStencil, $ = l.clippingPlanes;
23101
- l.autoClear = !0, l.autoClearColor = !0, l.autoClearDepth = !0, l.autoClearStencil = !0, l.clippingPlanes = clippingPlanes, l.setRenderTarget(this.renderTarget), l.setClearColor(clearColor$1, clearAlpha), l.render(this.scene, this.camera), l.setRenderTarget(U), l.setClearColor(scratchPrevClearColor$1, j), l.autoClear = G, l.autoClearColor = oe, l.autoClearDepth = ee, l.autoClearStencil = Z, l.clippingPlanes = $;
23148
+ l.autoClear = !0, l.autoClearColor = !0, l.autoClearDepth = !0, l.autoClearStencil = !0, l.clippingPlanes = clippingPlanes, l.setRenderTarget(this.renderTarget), l.setClearColor(clearColor$1, clearAlpha), l.render(this.scene, this.camera), l.setRenderTarget(q), l.setClearColor(scratchPrevClearColor$1, j), l.autoClear = G, l.autoClearColor = oe, l.autoClearDepth = ee, l.autoClearStencil = Z, l.clippingPlanes = $;
23102
23149
  }
23103
23150
  return this.forceRenderWhenNextUpdate = !1, r;
23104
23151
  }, n;
@@ -23408,18 +23455,18 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23408
23455
  mapSize: h.pano0.mapSize,
23409
23456
  zoom: h.pano0.zoom,
23410
23457
  matrix: b.panoPicture.matrix.clone().premultiply(b.fixCameraTransform).setPosition(T.position)
23411
- }, _ = this.panoPictureObserverMap.get(h.pano0);
23412
- _ && this.panoPictureObserverMap.set(I, _), h.pano0 = I;
23458
+ }, H = this.panoPictureObserverMap.get(h.pano0);
23459
+ H && this.panoPictureObserverMap.set(I, H), h.pano0 = I;
23413
23460
  }
23414
23461
  P.copy(O), M = !0;
23415
23462
  }
23416
23463
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(P.x + (O.x - P.x) * w, P.y + (O.y - P.y) * w, P.z + (O.z - P.z) * w);
23417
- for (var H = [], L = [], k = 0, D = this.locationMotion.keyframes; k < D.length; k++) {
23418
- var q = D[k], z = q.key, J = q.progress;
23419
- z !== void 0 && (H.push(z), J > this.locationMotion.progress && L.push(z));
23464
+ for (var F = [], L = [], k = 0, D = this.locationMotion.keyframes; k < D.length; k++) {
23465
+ var U = D[k], z = U.key, J = U.progress;
23466
+ z !== void 0 && (F.push(z), J > this.locationMotion.progress && L.push(z));
23420
23467
  }
23421
- for (var Q = 0, U = Object.keys(this.panoResources); Q < U.length; Q++) {
23422
- var j = U[Q];
23468
+ for (var Q = 0, q = Object.keys(this.panoResources); Q < q.length; Q++) {
23469
+ var j = q[Q];
23423
23470
  if (!(L.indexOf(j) >= 0)) {
23424
23471
  var G = this.panoResources[j];
23425
23472
  if (G.panoPicture) {
@@ -23430,7 +23477,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23430
23477
  oe.dispose(), G.panoPicture = null;
23431
23478
  }
23432
23479
  }
23433
- H.indexOf(j) >= 0 || delete this.panoResources[j];
23480
+ F.indexOf(j) >= 0 || delete this.panoResources[j];
23434
23481
  }
23435
23482
  }
23436
23483
  var ee = panoParse(T.panoId);
@@ -23447,8 +23494,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23447
23494
  var Z = this.works.getObserver(this.currentPano), $ = this.locationMotion.ended ? this.getForwardObserverOrNot(this.camera) : null, X = this.works.getObserver(b.panoId), ne = this.works.getObserver(T.panoId);
23448
23495
  if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && Z) {
23449
23496
  for (var W = [], K = Z.work.observers, re = 0, te = Z.accessibleNodes; re < te.length; re++) {
23450
- var ie = te[re], _ = K[ie];
23451
- _ && W.push(_);
23497
+ var ie = te[re], H = K[ie];
23498
+ H && W.push(H);
23452
23499
  }
23453
23500
  var ve = /* @__PURE__ */ new Map();
23454
23501
  if (W.sort(function(de, we) {
@@ -23487,24 +23534,24 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23487
23534
  var xe = /* @__PURE__ */ new Map();
23488
23535
  if (X)
23489
23536
  for (var he = 0, Ve = X.accessibleNodes; he < Ve.length; he++) {
23490
- var ie = Ve[he], _ = X.work.observers[ie];
23491
- if (_) {
23537
+ var ie = Ve[he], H = X.work.observers[ie];
23538
+ if (H) {
23492
23539
  var ge = panoStringify({
23493
- panoIndex: _.panoIndex,
23494
- workCode: _.work.workCode
23540
+ panoIndex: H.panoIndex,
23541
+ workCode: H.work.workCode
23495
23542
  });
23496
- xe.set(ge, _);
23543
+ xe.set(ge, H);
23497
23544
  }
23498
23545
  }
23499
23546
  if (ne)
23500
23547
  for (var ye = 0, Be = ne.accessibleNodes; ye < Be.length; ye++) {
23501
- var ie = Be[ye], _ = ne.work.observers[ie];
23502
- if (_) {
23548
+ var ie = Be[ye], H = ne.work.observers[ie];
23549
+ if (H) {
23503
23550
  var ge = panoStringify({
23504
- panoIndex: _.panoIndex,
23505
- workCode: _.work.workCode
23551
+ panoIndex: H.panoIndex,
23552
+ workCode: H.work.workCode
23506
23553
  });
23507
- xe.set(ge, _);
23554
+ xe.set(ge, H);
23508
23555
  }
23509
23556
  }
23510
23557
  if (this.panoMeshes.forEach(function(de, we) {
@@ -23575,8 +23622,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23575
23622
  });
23576
23623
  }
23577
23624
  {
23578
- var w = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, Fe = Math.round(w), Oe = this.modelScene.parameter.pano0, Le = this.modelScene.parameter.pano1, Ue = Fe === 0 ? Oe : Le, _ = void 0;
23579
- if (Ue && (_ = this.works.getObserver(Ue.panoId), _ || (_ = this.panoPictureObserverMap.get(Ue))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = w < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !_ || !Ue || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
23625
+ var w = (l = this.modelScene.parameter.progress) !== null && l !== void 0 ? l : 1, Fe = Math.round(w), Oe = this.modelScene.parameter.pano0, Le = this.modelScene.parameter.pano1, Ue = Fe === 0 ? Oe : Le, H = void 0;
23626
+ if (Ue && (H = this.works.getObserver(Ue.panoId), H || (H = this.panoPictureObserverMap.get(Ue))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = w < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !H || !Ue || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
23580
23627
  this.tiling.setObserver(null);
23581
23628
  var $e = {
23582
23629
  renderer: this.renderer,
@@ -23594,7 +23641,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23594
23641
  this.tiling.update($e), this.modelScene.parameter.set("refinedScreen", null);
23595
23642
  } else {
23596
23643
  var lt = getImageSizeLevel(Ue.mapSize), nt = lt + 1, ot = new THREE.Vector2().copy(this.camera.resolution).multiplyScalar(this.camera.pixelRatio), At = Math.floor(this.tileLevelForFov(this.camera.fov, ot)), We = At > lt ? At : 0;
23597
- this.tiling.setObserver(_);
23644
+ this.tiling.setObserver(H);
23598
23645
  var $e = {
23599
23646
  renderer: this.renderer,
23600
23647
  resolution: this.camera.resolution,
@@ -23883,28 +23930,28 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
23883
23930
  { key: E, progress: 1, value: { distance: 0, count: 1 } }
23884
23931
  ], R = 0;
23885
23932
  } else {
23886
- var I = this.locationMotion.getKeyFrameSegment(v), _ = I[0], w = I[1], P = this.locationMotion.value, H = this.panoResourceFromLocationMotionKeyframe(_).position, O = this.panoResourceFromLocationMotionKeyframe(w).position, C = r.position, L = w.value.count - P.count, k = Math.max(H.distanceTo(O), b) * L, D = Math.max(O.distanceTo(C), b);
23933
+ var I = this.locationMotion.getKeyFrameSegment(v), H = I[0], w = I[1], P = this.locationMotion.value, F = this.panoResourceFromLocationMotionKeyframe(H).position, O = this.panoResourceFromLocationMotionKeyframe(w).position, C = r.position, L = w.value.count - P.count, k = Math.max(F.distanceTo(O), b) * L, D = Math.max(O.distanceTo(C), b);
23887
23934
  T = k + D, S = [
23888
- { key: _.key, progress: 0, value: __assign({}, P) },
23935
+ { key: H.key, progress: 0, value: __assign({}, P) },
23889
23936
  { key: w.key, progress: k / T, value: w.value },
23890
23937
  { key: E, progress: 1, value: { count: w.value.count + 1, distance: 0 } }
23891
23938
  ];
23892
- var q = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
23893
- q === 0 || q === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * q / z;
23939
+ var U = this.locationMotionKeyframesLength(this.locationMotion.keyframes), z = this.locationMotionKeyframesLength(S);
23940
+ U === 0 || U === 0 ? R = 0 : R = this.locationMotion.getProgressVelocity(v) * U / z;
23894
23941
  }
23895
23942
  var J = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" || r.effect === "model" ? T : 0), Q = {
23896
23943
  longitude: o.longitude,
23897
23944
  latitude: o.latitude,
23898
23945
  fov: o.fov
23899
- }, U = __assign(__assign({}, e), { mode: this.mode, longitude: (l = Q.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = Q.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = Q.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), j = this.currentPano;
23946
+ }, q = __assign(__assign({}, e), { mode: this.mode, longitude: (l = Q.longitude) !== null && l !== void 0 ? l : this.camera.pose.longitude, latitude: (c = Q.latitude) !== null && c !== void 0 ? c : this.camera.pose.latitude, fov: (f = Q.fov) !== null && f !== void 0 ? f : this.camera.pose.fov, offset: r.position.clone(), distance: this.camera.pose.distance }), j = this.currentPano;
23900
23947
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
23901
23948
  options: o,
23902
23949
  prevPano: j,
23903
23950
  progress: 0,
23904
- state: U,
23951
+ state: q,
23905
23952
  userAction: this.userAction,
23906
23953
  error: null
23907
- })), o.moveStartCallback && o.moveStartCallback(U), this.videoTexture && this.videoTexture.image instanceof HTMLVideoElement && this.videoTexture.image.getAttribute("src") && (this.videoTexture.image.pause(), this.videoTexture.image.removeAttribute("uuid"), this.videoTexture.image.removeAttribute("src"), this.videoTexture.image.oncanplay = noop, this.videoTexture.needsUpdate = !0), this.panoVideo.setMaterial(null), r.effect === "fly" || r.effect === "model")
23954
+ })), 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" || r.effect === "model")
23908
23955
  this.cameraMotion.set(Q, J).catch(noop);
23909
23956
  else {
23910
23957
  var G = coordinatesToVector({
@@ -24001,7 +24048,7 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24001
24048
  options: o,
24002
24049
  prevPano: j,
24003
24050
  progress: 0,
24004
- state: U,
24051
+ state: q,
24005
24052
  userAction: s.userAction,
24006
24053
  error: null
24007
24054
  })), o.moveCancelCallback && o.moveCancelCallback();
@@ -24023,19 +24070,19 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24023
24070
  var h = this.modelScene.intersectRaycaster(u)[0], p = h ? h.point : u.ray.origin.clone().add(u.ray.direction.clone().normalize().multiplyScalar(3)), m = p.clone().sub(l).normalize();
24024
24071
  if (m.length() === 0)
24025
24072
  return null;
24026
- var A = s.work.observers, g = s.accessibleNodes.filter(function(q) {
24027
- if (q === o.currentPano.panoIndex && s.work.workCode === o.currentPano.workCode)
24073
+ var A = s.work.observers, g = s.accessibleNodes.filter(function(U) {
24074
+ if (U === o.currentPano.panoIndex && s.work.workCode === o.currentPano.workCode)
24028
24075
  return !1;
24029
- var z = A[q];
24076
+ var z = A[U];
24030
24077
  if (!z)
24031
24078
  return !1;
24032
24079
  var J = z.standingPosition.clone().applyMatrix4(z.work.transform).project(e);
24033
24080
  return Math.abs(J.z) > 1 || Math.abs(J.x) > 1 || Math.abs(J.y) > 1 ? !1 : z.loadable || z.active;
24034
- }), y = /* @__PURE__ */ new Map(), v = g.slice().sort(function(q, z) {
24035
- var J = A[q], Q = y.get(J);
24081
+ }), y = /* @__PURE__ */ new Map(), v = g.slice().sort(function(U, z) {
24082
+ var J = A[U], Q = y.get(J);
24036
24083
  typeof Q == "undefined" && (Q = scratchVector3$3.copy(J.standingPosition).applyMatrix4(J.work.transform).distanceTo(l), y.set(J, Q));
24037
- var U = A[z], j = y.get(U);
24038
- return typeof j == "undefined" && (j = scratchVector3$3.copy(U.standingPosition).applyMatrix4(U.work.transform).distanceTo(l), y.set(U, j)), Q - j;
24084
+ var q = A[z], j = y.get(q);
24085
+ return typeof j == "undefined" && (j = scratchVector3$3.copy(q.standingPosition).applyMatrix4(q.work.transform).distanceTo(l), y.set(q, j)), Q - j;
24039
24086
  });
24040
24087
  y.clear();
24041
24088
  for (var E = 0, b = [Math.PI / 8, Math.PI / 6, Math.PI / 4, Math.PI / 3]; E < b.length; E++)
@@ -24054,21 +24101,21 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24054
24101
  } else
24055
24102
  O = new THREE.Vector3(0, 0, 0);
24056
24103
  if (O) {
24057
- var I = 0.4, _ = s.accessibleNodes.filter(function(q) {
24058
- if (q === o.currentPano.panoIndex && s.work.workCode === o.currentPano.workCode)
24104
+ var I = 0.4, H = s.accessibleNodes.filter(function(U) {
24105
+ if (U === o.currentPano.panoIndex && s.work.workCode === o.currentPano.workCode)
24059
24106
  return !1;
24060
- var z = A[q];
24107
+ var z = A[U];
24061
24108
  if (!z)
24062
24109
  return !1;
24063
24110
  var J = z.position.clone().applyMatrix4(z.work.transform).project(e);
24064
24111
  return Math.abs(J.z) > 1 || Math.abs(J.x) > 1 || Math.abs(J.y) > 1 ? !1 : z.loadable || z.active;
24065
- }), H = /* @__PURE__ */ new Map(), L = _.slice().sort(function(q, z) {
24066
- var J = A[q], Q = H.get(J);
24067
- typeof Q == "undefined" && (Q = scratchVector3$3.copy(J.position).applyMatrix4(J.work.transform).distanceTo(e.position), H.set(J, Q));
24068
- var U = A[z], j = H.get(U);
24069
- return typeof j == "undefined" && (j = scratchVector3$3.copy(U.position).applyMatrix4(U.work.transform).distanceTo(e.position), H.set(U, j)), Q - j;
24112
+ }), F = /* @__PURE__ */ new Map(), L = H.slice().sort(function(U, z) {
24113
+ var J = A[U], Q = F.get(J);
24114
+ typeof Q == "undefined" && (Q = scratchVector3$3.copy(J.position).applyMatrix4(J.work.transform).distanceTo(e.position), F.set(J, Q));
24115
+ var q = A[z], j = F.get(q);
24116
+ return typeof j == "undefined" && (j = scratchVector3$3.copy(q.position).applyMatrix4(q.work.transform).distanceTo(e.position), F.set(q, j)), Q - j;
24070
24117
  });
24071
- H.clear();
24118
+ F.clear();
24072
24119
  for (var k = 0, D = L; k < D.length; k++) {
24073
24120
  var M = D[k], w = A[M];
24074
24121
  if (w) {
@@ -24121,10 +24168,10 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24121
24168
  for (var b = {}, T = Math.PI / 6, S = Math.PI / 12, R = l.position.clone().applyMatrix4(l.work.transform).setY(0).sub(c.position.clone().applyMatrix4(l.work.transform).setY(0)).normalize(), M = [], w = [], P = [], O = l.work.observers, C = 0, I = l.accessibleNodes; C < I.length; C++) {
24122
24169
  var m = I[C];
24123
24170
  if (l.panoIndex !== m && !(m === this.currentPano.panoIndex && l.work.workCode === this.currentPano.workCode)) {
24124
- var _ = O[m];
24125
- if (_) {
24126
- var H = _.position.clone().applyMatrix4(_.work.transform).sub(l.position.clone().applyMatrix4(l.work.transform)).setY(0).normalize();
24127
- R.angleTo(H) < T && P.push(H);
24171
+ var H = O[m];
24172
+ if (H) {
24173
+ var F = H.position.clone().applyMatrix4(H.work.transform).sub(l.position.clone().applyMatrix4(l.work.transform)).setY(0).normalize();
24174
+ R.angleTo(F) < T && P.push(F);
24128
24175
  }
24129
24176
  }
24130
24177
  }
@@ -24132,8 +24179,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24132
24179
  return j.angleTo(R) - G.angleTo(R);
24133
24180
  })[0];
24134
24181
  if (k && k.angleTo(u) > S && (b.longitude = Math.atan2(-k.x, -k.z)), this.cameraMotion.value.latitude < -Math.PI / 4) {
24135
- var D = e.state.fov, q = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(D) : this.minLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(D) : this.maxLatitude, -Math.PI / 2, Math.PI / 2);
24136
- b.latitude = clamp$1(0, q, z);
24182
+ 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);
24183
+ b.latitude = clamp$1(0, U, z);
24137
24184
  }
24138
24185
  var J = __assign({}, e.state);
24139
24186
  if (J.workCode = l.work.workCode, J.panoIndex = l.panoIndex, b.longitude !== void 0 && (J.longitude = b.longitude), b.latitude !== void 0 && (J.latitude = b.latitude), b.fov !== void 0 && (J.fov = b.fov), J.distance = 0, J.offset = l.position.clone(), e.state = J, this.emit("gesture.tap", e), !e.defaultPrevented) {
@@ -24148,8 +24195,8 @@ var scratchRaycaster$1 = new THREE.Raycaster(), scratchVector3$3 = new THREE.Vec
24148
24195
  var Q = panoStringify({
24149
24196
  panoIndex: l.panoIndex,
24150
24197
  workCode: l.work.workCode
24151
- }), U = this.panoMeshes.get(Q);
24152
- U && (U.setDisabled(!1), U.setLoading(!0));
24198
+ }), q = this.panoMeshes.get(Q);
24199
+ q && (q.setDisabled(!1), q.setLoading(!0));
24153
24200
  }
24154
24201
  l && l.active && this.emit("pano.request", createEvent("pano.request", {
24155
24202
  userAction: e.userAction,
@@ -24251,8 +24298,8 @@ var updateEyeViewMatrices = /* @__PURE__ */ (function() {
24251
24298
  return o === r ? (r[12] = o[0] * u + o[4] * l + o[8] * c + o[12], r[13] = o[1] * u + o[5] * l + o[9] * c + o[13], r[14] = o[2] * u + o[6] * l + o[10] * c + o[14], r[15] = o[3] * u + o[7] * l + o[11] * c + o[15]) : (f = o[0], d = o[1], h = o[2], p = o[3], m = o[4], A = o[5], g = o[6], y = o[7], v = o[8], E = o[9], b = o[10], T = o[11], r[0] = f, r[1] = d, r[2] = h, r[3] = p, r[4] = m, r[5] = A, r[6] = g, r[7] = y, r[8] = v, r[9] = E, r[10] = b, r[11] = T, r[12] = f * u + m * l + v * c + o[12], r[13] = d * u + A * l + E * c + o[13], r[14] = h * u + g * l + b * c + o[14], r[15] = p * u + y * l + T * c + o[15]), r;
24252
24299
  }
24253
24300
  function e(r, o) {
24254
- var s = o[0], u = o[1], l = o[2], c = o[3], f = o[4], d = o[5], h = o[6], p = o[7], m = o[8], A = o[9], g = o[10], y = o[11], v = o[12], E = o[13], b = o[14], T = o[15], S = s * d - u * f, R = s * h - l * f, M = s * p - c * f, w = u * h - l * d, P = u * p - c * d, O = l * p - c * h, C = m * E - A * v, I = m * b - g * v, _ = m * T - y * v, H = A * b - g * E, L = A * T - y * E, k = g * T - y * b, D = S * k - R * L + M * H + w * _ - P * I + O * C;
24255
- return D ? (D = 1 / D, r[0] = (d * k - h * L + p * H) * D, r[1] = (l * L - u * k - c * H) * D, r[2] = (E * O - b * P + T * w) * D, r[3] = (g * P - A * O - y * w) * D, r[4] = (h * _ - f * k - p * I) * D, r[5] = (s * k - l * _ + c * I) * D, r[6] = (b * M - v * O - T * R) * D, r[7] = (m * O - g * M + y * R) * D, r[8] = (f * L - d * _ + p * C) * D, r[9] = (u * _ - s * L - c * C) * D, r[10] = (v * P - E * M + T * S) * D, r[11] = (A * M - m * P - y * S) * D, r[12] = (d * I - f * H - h * C) * D, r[13] = (s * H - u * I + l * C) * D, r[14] = (E * R - v * w - b * S) * D, r[15] = (m * w - A * R + g * S) * D, r) : null;
24301
+ var s = o[0], u = o[1], l = o[2], c = o[3], f = o[4], d = o[5], h = o[6], p = o[7], m = o[8], A = o[9], g = o[10], y = o[11], v = o[12], E = o[13], b = o[14], T = o[15], S = s * d - u * f, R = s * h - l * f, M = s * p - c * f, w = u * h - l * d, P = u * p - c * d, O = l * p - c * h, C = m * E - A * v, I = m * b - g * v, H = m * T - y * v, F = A * b - g * E, L = A * T - y * E, k = g * T - y * b, D = S * k - R * L + M * F + w * H - P * I + O * C;
24302
+ return D ? (D = 1 / D, r[0] = (d * k - h * L + p * F) * D, r[1] = (l * L - u * k - c * F) * D, r[2] = (E * O - b * P + T * w) * D, r[3] = (g * P - A * O - y * w) * D, r[4] = (h * H - f * k - p * I) * D, r[5] = (s * k - l * H + c * I) * D, r[6] = (b * M - v * O - T * R) * D, r[7] = (m * O - g * M + y * R) * D, r[8] = (f * L - d * H + p * C) * D, r[9] = (u * H - s * L - c * C) * D, r[10] = (v * P - E * M + T * S) * D, r[11] = (A * M - m * P - y * S) * D, r[12] = (d * I - f * F - h * C) * D, r[13] = (s * F - u * I + l * C) * D, r[14] = (E * R - v * w - b * S) * D, r[15] = (m * w - A * R + g * S) * D, r) : null;
24256
24303
  }
24257
24304
  return function(r, o, s) {
24258
24305
  n(r, o), s && t(r, r, s), e(r, r);
@@ -25084,14 +25131,14 @@ void main() {
25084
25131
  w.copy(P), R = !0;
25085
25132
  }
25086
25133
  p.distance = this.locationMotion.value.distance, p.offset = new THREE.Vector3(w.x + (P.x - w.x) * M, w.y + (P.y - w.y) * M, w.z + (P.z - w.z) * M);
25087
- for (var _ = [], H = [], L = 0, k = this.locationMotion.keyframes; L < k.length; L++) {
25088
- var D = k[L], q = D.key, z = D.progress;
25089
- q !== void 0 && (_.push(q), z > this.locationMotion.progress && H.push(q));
25134
+ for (var H = [], F = [], L = 0, k = this.locationMotion.keyframes; L < k.length; L++) {
25135
+ var D = k[L], U = D.key, z = D.progress;
25136
+ U !== void 0 && (H.push(U), z > this.locationMotion.progress && F.push(U));
25090
25137
  }
25091
25138
  for (var J = 0, Q = Object.keys(this.panoResources); J < Q.length; J++) {
25092
- var U = Q[J];
25093
- if (!(H.indexOf(U) >= 0)) {
25094
- var j = this.panoResources[U];
25139
+ var q = Q[J];
25140
+ if (!(F.indexOf(q) >= 0)) {
25141
+ var j = this.panoResources[q];
25095
25142
  if (j.panoPicture) {
25096
25143
  var G = j.panoPicture.map;
25097
25144
  if (G) {
@@ -25100,7 +25147,7 @@ void main() {
25100
25147
  G.dispose(), j.panoPicture = null;
25101
25148
  }
25102
25149
  }
25103
- _.indexOf(U) >= 0 || delete this.panoResources[U];
25150
+ H.indexOf(q) >= 0 || delete this.panoResources[q];
25104
25151
  }
25105
25152
  }
25106
25153
  this.currentPano = panoParse(b.panoId), this.emit("pano.moving", createEvent("pano.moving", {
@@ -25521,29 +25568,29 @@ void main() {
25521
25568
  latitude: r.latitude,
25522
25569
  fov: r.fov
25523
25570
  }, C = [], I = function(Q) {
25524
- var U = _.modelScene.models.find(function(ee) {
25571
+ var q = H.modelScene.models.find(function(ee) {
25525
25572
  return ee.work === Q;
25526
25573
  });
25527
- if (!U || U.visible === !1 || Q.observers.length <= 0)
25574
+ if (!q || q.visible === !1 || Q.observers.length <= 0)
25528
25575
  return "continue";
25529
25576
  if (scratchObserverBox$1.copy(Q.observerBox).expandByScalar(10).applyMatrix4(Q.transform), scratchObserverBox$1.containsPoint(d))
25530
25577
  for (var j = 0, G = Q.observers; j < G.length; j++) {
25531
25578
  var oe = G[j];
25532
25579
  C.push(oe);
25533
25580
  }
25534
- }, _ = this, H = 0, L = this.works; H < L.length; H++) {
25535
- var k = L[H];
25581
+ }, H = this, F = 0, L = this.works; F < L.length; F++) {
25582
+ var k = L[F];
25536
25583
  I(k);
25537
25584
  }
25538
25585
  var D = arrayMin(C, function(Q) {
25539
25586
  return scratchVector3$2.copy(Q.position).applyMatrix4(Q.work.transform).distanceTo(d);
25540
- }), q = D ? {
25587
+ }), U = D ? {
25541
25588
  workCode: D.work.workCode,
25542
25589
  panoIndex: D.panoIndex
25543
25590
  } : {
25544
25591
  workCode: "",
25545
25592
  panoIndex: 0
25546
- }, z = __assign(__assign({}, q), { mode: this.mode, longitude: (u = O.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = O.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = O.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), J = this.currentPano;
25593
+ }, z = __assign(__assign({}, U), { mode: this.mode, longitude: (u = O.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = O.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = O.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: e.clone(), distance: 0 }), J = this.currentPano;
25547
25594
  this.emit("pano.moveTo", createEvent("pano.moveTo", {
25548
25595
  options: r,
25549
25596
  prevPano: J,
@@ -25555,11 +25602,11 @@ void main() {
25555
25602
  // resolve
25556
25603
  // 动画结束
25557
25604
  function() {
25558
- for (var Q = 0, U = s.modelScene.children; Q < U.length; Q++) {
25559
- var j = U[Q];
25605
+ for (var Q = 0, q = s.modelScene.children; Q < q.length; Q++) {
25606
+ var j = q[Q];
25560
25607
  j instanceof Model && j.show();
25561
25608
  }
25562
- var G = __assign(__assign(__assign({}, q), { mode: s.mode }), clonePose(s.camera.pose));
25609
+ var G = __assign(__assign(__assign({}, U), { mode: s.mode }), clonePose(s.camera.pose));
25563
25610
  s.emit("pano.arrived", createEvent("pano.arrived", {
25564
25611
  options: r,
25565
25612
  prevPano: J,
@@ -25867,8 +25914,8 @@ void main() {
25867
25914
  return;
25868
25915
  }
25869
25916
  this.inMomentumMovement && (this.cameraMotion.set({ longitude: h, latitude: A }, 0).catch(noop), this.locationMotion.set({ x: y.offset.x, y: y.offset.y, z: y.offset.z, distance: y.distance }, 0).catch(noop), E ? this.inMomentumMovement = null : AnimationFrameLoop.shared.add(function(S, R) {
25870
- u.requestMomentumMovement(e, !1, l, R | 0);
25871
- }, !0, 1));
25917
+ u.requestMomentumMovement(e, !1, l, R);
25918
+ }, !0));
25872
25919
  }
25873
25920
  }, t.prototype.fixFinalState = function(e) {
25874
25921
  if (this.perspToOrthoMotion.getTargetKeyframe().value.perspToOrtho !== 1) {
@@ -25963,16 +26010,16 @@ void main() {
25963
26010
  y: w.offset.y,
25964
26011
  z: w.offset.z
25965
26012
  }, 0).catch(noop)), e.isFinal) {
25966
- var P = this.renderer.getSize(new THREE.Vector2()), O = 2 * e.velocityX * b / P.y, C = 2 * e.velocityY * b / P.y, I = new THREE.Vector3(), _ = new THREE.Vector3();
25967
- I.setFromMatrixColumn(this.camera.matrix, 0), I.multiplyScalar(-O), _.add(I), this.camera.pose.latitude < PANGESTURE_FORWARD_ANGLE ? I.setFromMatrixColumn(this.camera.matrix, 1) : (I.setFromMatrixColumn(this.camera.matrix, 0), I.crossVectors(this.camera.up, I)), I.multiplyScalar(C), _.add(I), this.inMomentumMovement = {
26013
+ var P = this.renderer.getSize(new THREE.Vector2()), O = 2 * e.velocityX * b / P.y, C = 2 * e.velocityY * b / P.y, I = new THREE.Vector3(), H = new THREE.Vector3();
26014
+ I.setFromMatrixColumn(this.camera.matrix, 0), I.multiplyScalar(-O), H.add(I), this.camera.pose.latitude < PANGESTURE_FORWARD_ANGLE ? I.setFromMatrixColumn(this.camera.matrix, 1) : (I.setFromMatrixColumn(this.camera.matrix, 0), I.crossVectors(this.camera.up, I)), I.multiplyScalar(C), H.add(I), this.inMomentumMovement = {
25968
26015
  uuid: createUuid()
25969
- }, this.requestMomentumMovement(e, !0, { longitude: 0, latitude: 0, x: _.x, y: _.y, z: _.z }, 0);
26016
+ }, this.requestMomentumMovement(e, !0, { longitude: 0, latitude: 0, x: H.x, y: H.y, z: H.z }, 0);
25970
26017
  }
25971
26018
  } else {
25972
26019
  var y = {
25973
26020
  x: e.center.x - o.x,
25974
26021
  y: e.center.y - o.y
25975
- }, H = this.coordinatesForOffset(y), L = formatRad$1(this.cameraMotion.value.longitude + H.longitude), k = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(k) : this.minLatitude, -Math.PI / 2, Math.PI / 2), q = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(k) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(this.cameraMotion.value.latitude + H.latitude, D, q);
26022
+ }, F = this.coordinatesForOffset(y), L = formatRad$1(this.cameraMotion.value.longitude + F.longitude), k = this.camera.pose.fov, D = clamp$1(typeof this.minLatitude == "function" ? this.minLatitude(k) : this.minLatitude, -Math.PI / 2, Math.PI / 2), U = clamp$1(typeof this.maxLatitude == "function" ? this.maxLatitude(k) : this.maxLatitude, -Math.PI / 2, Math.PI / 2), z = clamp$1(this.cameraMotion.value.latitude + F.latitude, D, U);
25976
26023
  this.camera.aspect < 1 && Math.abs(e.overallVelocityX) > 0.2 && Math.atan2(Math.abs(e.overallVelocityY), Math.abs(e.overallVelocityX)) < Math.PI / 6.923 && (z = this.cameraMotion.value.latitude);
25977
26024
  var w = __assign(__assign({}, this.currentPano), { mode: this.mode, longitude: L, latitude: z, fov: k, offset: this.camera.pose.offset, distance: this.camera.pose.distance });
25978
26025
  if (e.isFinal && Object.assign(e, { __fixFinalState: !0 }), e.state = w, this.emit("gesture.pan", e), e.defaultPrevented)
@@ -26756,11 +26803,11 @@ var LineSegments2 = (
26756
26803
  var O = THREE.MathUtils.lerp(m.z, A.z, P), C = O >= -1 && O <= 1, I = y.distanceTo(b) < d * 0.5;
26757
26804
  if (C && I) {
26758
26805
  E.start.fromBufferAttribute(h, S), E.end.fromBufferAttribute(p, S), E.start.applyMatrix4(T), E.end.applyMatrix4(T);
26759
- var _ = new THREE.Vector3(), H = new THREE.Vector3();
26760
- o.distanceSqToSegment(E.start, E.end, H, _), r.push({
26761
- point: H,
26762
- pointOnLine: _,
26763
- distance: o.origin.distanceTo(H),
26806
+ var H = new THREE.Vector3(), F = new THREE.Vector3();
26807
+ o.distanceSqToSegment(E.start, E.end, F, H), r.push({
26808
+ point: F,
26809
+ pointOnLine: H,
26810
+ distance: o.origin.distanceTo(F),
26764
26811
  object: this,
26765
26812
  faceIndex: S
26766
26813
  });
@@ -26838,7 +26885,7 @@ var circleImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA
26838
26885
  }
26839
26886
  return Object.defineProperty(t, "version", {
26840
26887
  get: function() {
26841
- return "6.7.0-alpha.19";
26888
+ return "6.7.0-alpha.20";
26842
26889
  },
26843
26890
  enumerable: !1,
26844
26891
  configurable: !0
@@ -27375,21 +27422,21 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27375
27422
  C.dispose();
27376
27423
  else {
27377
27424
  C.name = y;
27378
- var I = Array.isArray(C.image) ? C.image[0] : C.image, _ = (P = I == null ? void 0 : I.width) !== null && P !== void 0 ? P : 2048, H = {
27425
+ var I = Array.isArray(C.image) ? C.image[0] : C.image, H = (P = I == null ? void 0 : I.width) !== null && P !== void 0 ? P : 2048, F = {
27379
27426
  panoId: d,
27380
27427
  effect: f,
27381
27428
  effectEasing: (O = r.effectEasing) !== null && O !== void 0 ? O : defaultEffectEase,
27382
27429
  leftPanoPicture: {
27383
27430
  panoId: d,
27384
27431
  map: C,
27385
- mapSize: _,
27432
+ mapSize: H,
27386
27433
  matrix: h.matrix.clone(),
27387
27434
  zoom: 1
27388
27435
  },
27389
27436
  position: h.position.clone(),
27390
27437
  fixCameraTransform: new THREE.Matrix4()
27391
27438
  };
27392
- s.doMoveToPano(e, H, r);
27439
+ s.doMoveToPano(e, F, r);
27393
27440
  }
27394
27441
  },
27395
27442
  onError: function(w) {
@@ -27462,23 +27509,23 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27462
27509
  { key: v, progress: 1, value: { distance: 0, count: 1 } }
27463
27510
  ], S = 0;
27464
27511
  } else {
27465
- var C = this.locationMotion.getKeyFrameSegment(y), I = C[0], M = C[1], w = this.locationMotion.value, _ = this.panoResourceFromLocationMotionKeyframe(I).position, P = this.panoResourceFromLocationMotionKeyframe(M).position, O = r.position, H = M.value.count - w.count, L = Math.max(_.distanceTo(P), E) * H, k = Math.max(P.distanceTo(O), E);
27512
+ var C = this.locationMotion.getKeyFrameSegment(y), I = C[0], M = C[1], w = this.locationMotion.value, H = this.panoResourceFromLocationMotionKeyframe(I).position, P = this.panoResourceFromLocationMotionKeyframe(M).position, O = r.position, F = M.value.count - w.count, L = Math.max(H.distanceTo(P), E) * F, k = Math.max(P.distanceTo(O), E);
27466
27513
  b = L + k, T = [
27467
27514
  { key: I.key, progress: 0, value: __assign({}, w) },
27468
27515
  { key: M.key, progress: L / b, value: M.value },
27469
27516
  { key: v, progress: 1, value: { count: M.value.count + 1, distance: 0 } }
27470
27517
  ];
27471
- var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), q = this.locationMotionKeyframesLength(T);
27472
- S = this.locationMotion.getProgressVelocity(y) * D / q;
27518
+ var D = this.locationMotionKeyframesLength(this.locationMotion.keyframes), U = this.locationMotionKeyframesLength(T);
27519
+ S = this.locationMotion.getProgressVelocity(y) * D / U;
27473
27520
  }
27474
27521
  var z = r.effect === "instant" ? 0 : this.calculateMovingDuration(o.duration, r.effect === "fly" || r.effect === "model" ? b : 0), J = {
27475
27522
  longitude: o.longitude,
27476
27523
  latitude: o.latitude,
27477
27524
  fov: o.fov
27478
- }, Q = __assign(__assign({}, e), { mode: this.mode, longitude: (u = J.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = J.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = J.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), U = this.currentPano;
27525
+ }, Q = __assign(__assign({}, e), { mode: this.mode, longitude: (u = J.longitude) !== null && u !== void 0 ? u : this.camera.pose.longitude, latitude: (l = J.latitude) !== null && l !== void 0 ? l : this.camera.pose.latitude, fov: (c = J.fov) !== null && c !== void 0 ? c : this.camera.pose.fov, offset: r.position.clone(), distance: 0 }), q = this.currentPano;
27479
27526
  if (this.emit("pano.moveTo", createEvent("pano.moveTo", {
27480
27527
  options: o,
27481
- prevPano: U,
27528
+ prevPano: q,
27482
27529
  progress: 0,
27483
27530
  state: Q,
27484
27531
  userAction: this.userAction,
@@ -27544,7 +27591,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27544
27591
  var se = __assign(__assign({}, e), { mode: s.mode, longitude: s.camera.pose.longitude, latitude: s.camera.pose.latitude, fov: s.camera.pose.fov, offset: s.camera.pose.offset.clone(), distance: 0 });
27545
27592
  s.emit("pano.arrived", createEvent("pano.arrived", {
27546
27593
  options: o,
27547
- prevPano: U,
27594
+ prevPano: q,
27548
27595
  progress: 1,
27549
27596
  state: se,
27550
27597
  userAction: s.userAction,
@@ -27575,7 +27622,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27575
27622
  function() {
27576
27623
  s.emit("pano.cancel", createEvent("pano.cancel", {
27577
27624
  options: o,
27578
- prevPano: U,
27625
+ prevPano: q,
27579
27626
  progress: 0,
27580
27627
  state: Q,
27581
27628
  userAction: s.userAction,
@@ -27677,14 +27724,14 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27677
27724
  var y = {}, v = {}, E = this.camera.getDirection(new THREE.Vector3()), b = this.locationMotion.keyframes[0], T = this.locationMotion.keyframes[this.locationMotion.keyframes.length - 1], S = this.locationMotion.getKeyFrameSegment(e), R = S[0], M = S[1], w = this.panoResourceFromLocationMotionKeyframe(R), P = this.panoResourceFromLocationMotionKeyframe(M), O = this.panoResourceFromLocationMotionKeyframe(b), C = this.panoResourceFromLocationMotionKeyframe(T), I = !1;
27678
27725
  if (this.cameraMotion.ended === !1 && (this.cameraMotion.update(e), v.fov = this.cameraMotion.value.fov), this.modelAlphaMotion.ended === !1 && (this.modelAlphaMotion.update(e), y.modelAlpha = this.modelAlphaMotion.value.modelAlpha), this.perspToOrthoMotion.ended === !1 && (this.perspToOrthoMotion.update(e), this.camera.perspToOrtho.setScalar(clamp$1(this.perspToOrthoMotion.value.perspToOrtho, 0, 1))), this.locationMotion.ended === !1) {
27679
27726
  this.locationMotion.update(e);
27680
- var _ = this.locationMotion.value.count - M.value.count + 1, H = new THREE.Vector3().copy(w.position), L = new THREE.Vector3().copy(P.position);
27681
- if (y.progress = _, _ >= 0.01 && _ <= 0.99 && (y.progress = clamp$1(P.effectEasing(_), 0.01, 0.99)), P.leftPanoPicture && (_ < 1 ? w.leftPanoPicture && (y.pano0 = w.leftPanoPicture) : y.pano0 = P.leftPanoPicture, y.pano1 = P.leftPanoPicture), P.effect === "montage" ? y.transition = "BLACK" : P.effect === "spread" ? y.transition = "SPREAD" : y.transition = "FADE", P.effect === "zoomin" || P.effect === "zoomout")
27682
- y.progress = Math.pow(_, 3);
27727
+ var H = this.locationMotion.value.count - M.value.count + 1, F = new THREE.Vector3().copy(w.position), L = new THREE.Vector3().copy(P.position);
27728
+ if (y.progress = H, H >= 0.01 && H <= 0.99 && (y.progress = clamp$1(P.effectEasing(H), 0.01, 0.99)), P.leftPanoPicture && (H < 1 ? w.leftPanoPicture && (y.pano0 = w.leftPanoPicture) : y.pano0 = P.leftPanoPicture, y.pano1 = P.leftPanoPicture), P.effect === "montage" ? y.transition = "BLACK" : P.effect === "spread" ? y.transition = "SPREAD" : y.transition = "FADE", P.effect === "zoomin" || P.effect === "zoomout")
27729
+ y.progress = Math.pow(H, 3);
27683
27730
  else if (P.effect === "model" && this.camera.pose.distance < 0.01) {
27684
- var k = 1 - Math.pow(clamp$1(Math.abs(_ - 0.5) * 2, 0, 1), 4);
27731
+ var k = 1 - Math.pow(clamp$1(Math.abs(H - 0.5) * 2, 0, 1), 4);
27685
27732
  y.modelAlpha = k;
27686
27733
  }
27687
- if (_ < 1 && P.effect !== "fly") {
27734
+ if (H < 1 && P.effect !== "fly") {
27688
27735
  if (y.pano0 && w.leftPanoPicture) {
27689
27736
  var D = {
27690
27737
  panoId: y.pano0.panoId,
@@ -27692,14 +27739,14 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27692
27739
  mapSize: y.pano0.mapSize,
27693
27740
  zoom: y.pano0.zoom,
27694
27741
  matrix: w.leftPanoPicture.matrix.clone().setPosition(P.position)
27695
- }, q = this.panoPictureObserverMap.get(y.pano0);
27696
- q && this.panoPictureObserverMap.set(D, q), y.pano0 = D;
27742
+ }, U = this.panoPictureObserverMap.get(y.pano0);
27743
+ U && this.panoPictureObserverMap.set(D, U), y.pano0 = D;
27697
27744
  }
27698
- H.copy(L), I = !0;
27745
+ F.copy(L), I = !0;
27699
27746
  }
27700
- v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(H.x + (L.x - H.x) * _, H.y + (L.y - H.y) * _, H.z + (L.z - H.z) * _);
27701
- for (var z = [], J = [], Q = 0, U = this.locationMotion.keyframes; Q < U.length; Q++) {
27702
- var j = U[Q], G = j.key, oe = j.progress;
27747
+ v.distance = this.locationMotion.value.distance, v.offset = new THREE.Vector3(F.x + (L.x - F.x) * H, F.y + (L.y - F.y) * H, F.z + (L.z - F.z) * H);
27748
+ for (var z = [], J = [], Q = 0, q = this.locationMotion.keyframes; Q < q.length; Q++) {
27749
+ var j = q[Q], G = j.key, oe = j.progress;
27703
27750
  G !== void 0 && (z.push(G), oe > this.locationMotion.progress && J.push(G));
27704
27751
  }
27705
27752
  for (var ee = 0, Z = Object.keys(this.panoResources); ee < Z.length; ee++) {
@@ -27764,9 +27811,9 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27764
27811
  }
27765
27812
  if (Ke.length >= 1 && Ke[0].face)
27766
27813
  if (Re.handedness === "right") {
27767
- var Bt = ye.xrControllerRay.right.intersectObject(ye.xrCustomObjectsScene, !0), B = Ke[0].face.normal, F = B.clone(), N = Ke[0].point.clone();
27814
+ var Bt = ye.xrControllerRay.right.intersectObject(ye.xrCustomObjectsScene, !0), B = Ke[0].face.normal, _ = B.clone(), N = Ke[0].point.clone();
27768
27815
  ye.intersectMesh.position.copy(N);
27769
- var V = N.clone().add(F);
27816
+ var V = N.clone().add(_);
27770
27817
  if (ye.intersectMesh.lookAt(V), Math.abs(B.y) > 0.99) {
27771
27818
  var Y = ye.camera.position.clone().sub(N);
27772
27819
  ye.intersectMesh.rotation.z = -Math.atan2(Y.z, Y.x);
@@ -27797,8 +27844,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27797
27844
  var Ie = this.works.getResolvedObserver(this.currentPano), Ze = this.locationMotion.ended ? this.getForwardObserverOrNot(this.xrManager.cameraVR) : null, Se = this.works.getObserver(w.panoId), ze = this.works.getObserver(P.panoId);
27798
27845
  if (this.adjustPanoCircleMeshPositionBasedOnModel && this.helper.visible && Ie) {
27799
27846
  for (var Fe = [], Oe = Ie.work.observers, Le = 0, Ue = Ie.accessibleNodes; Le < Ue.length; Le++) {
27800
- var $e = Ue[Le], q = Oe[$e];
27801
- q && Fe.push(q);
27847
+ var $e = Ue[Le], U = Oe[$e];
27848
+ U && Fe.push(U);
27802
27849
  }
27803
27850
  var lt = /* @__PURE__ */ new Map();
27804
27851
  if (Fe.sort(function(pe, Pe) {
@@ -27837,24 +27884,24 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27837
27884
  var tt = /* @__PURE__ */ new Map();
27838
27885
  if (Se)
27839
27886
  for (var it = 0, ct = Se.accessibleNodes; it < ct.length; it++) {
27840
- var $e = ct[it], q = Se.work.observers[$e];
27841
- if (q) {
27887
+ var $e = ct[it], U = Se.work.observers[$e];
27888
+ if (U) {
27842
27889
  var Ne = panoStringify({
27843
- panoIndex: q.panoIndex,
27844
- workCode: q.work.workCode
27890
+ panoIndex: U.panoIndex,
27891
+ workCode: U.work.workCode
27845
27892
  });
27846
- tt.set(Ne, q);
27893
+ tt.set(Ne, U);
27847
27894
  }
27848
27895
  }
27849
27896
  if (ze)
27850
27897
  for (var Xe = 0, de = ze.accessibleNodes; Xe < de.length; Xe++) {
27851
- var $e = de[Xe], q = ze.work.observers[$e];
27852
- if (q) {
27898
+ var $e = de[Xe], U = ze.work.observers[$e];
27899
+ if (U) {
27853
27900
  var Ne = panoStringify({
27854
- panoIndex: q.panoIndex,
27855
- workCode: q.work.workCode
27901
+ panoIndex: U.panoIndex,
27902
+ workCode: U.work.workCode
27856
27903
  });
27857
- tt.set(Ne, q);
27904
+ tt.set(Ne, U);
27858
27905
  }
27859
27906
  }
27860
27907
  if (this.panoMeshes.forEach(function(pe, Pe) {
@@ -27925,8 +27972,8 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27925
27972
  });
27926
27973
  }
27927
27974
  {
27928
- var _ = (d = this.modelScene.parameter.progress) !== null && d !== void 0 ? d : 1, st = Math.round(_), Qe = this.modelScene.parameter.pano0, Je = this.modelScene.parameter.pano1, ft = st === 0 ? Qe : Je, q = void 0;
27929
- if (ft && (q = this.works.getObserver(ft.panoId), q || (q = this.panoPictureObserverMap.get(ft))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = _ < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !q || !ft || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
27975
+ var H = (d = this.modelScene.parameter.progress) !== null && d !== void 0 ? d : 1, st = Math.round(H), Qe = this.modelScene.parameter.pano0, Je = this.modelScene.parameter.pano1, ft = st === 0 ? Qe : Je, U = void 0;
27976
+ if (ft && (U = this.works.getObserver(ft.panoId), U || (U = this.panoPictureObserverMap.get(ft))), this.tiling.appearDuration = this.tileAppearDuration, this.tiling.maxRequest = H < (canUseNativeImageBitmap() ? 0.6 : 0.99) ? 0 : this.tileMaxRequest, this.tiling.imageOptions = this.imageOptions, !U || !ft || this.tileLevelForFov === !1 || this.camera.perspToOrtho.x > 0) {
27930
27977
  this.tiling.setObserver(null);
27931
27978
  var Ht = {
27932
27979
  renderer: this.renderer,
@@ -27944,7 +27991,7 @@ var CONTROLLER_EVNET_DELTA_TIME = 300, scratchRaycaster = new THREE.Raycaster(),
27944
27991
  this.tiling.update(Ht), this.modelScene.parameter.set("refinedScreen", null);
27945
27992
  } else {
27946
27993
  var Ft = getImageSizeLevel(ft.mapSize), dt = Ft + 1, Pt = 4;
27947
- this.tiling.setObserver(q);
27994
+ this.tiling.setObserver(U);
27948
27995
  var Ht = {
27949
27996
  renderer: this.renderer,
27950
27997
  resolution: ie,
@@ -28588,14 +28635,14 @@ void main() {
28588
28635
  /** @class */
28589
28636
  (function() {
28590
28637
  function n(t) {
28591
- var e, r, o, s;
28638
+ var e, r, o;
28592
28639
  this.type = "default", this.renderer = t.renderer, this.camera = t.camera, this.scene = t.scene, this.modelScene = t.modelScene, this.screenBuffers = [], this.enableLayeringRendering = (e = t.enableLayeringRendering) !== null && e !== void 0 ? e : !1;
28593
- var u = (r = this.renderer) === null || r === void 0 ? void 0 : r.getContext();
28594
- this.enableFragDepth = this.enableLayeringRendering && (typeof WebGL2RenderingContext != "undefined" && u instanceof WebGL2RenderingContext || u.getExtension("EXT_frag_depth") !== null), this.copyPass = new CopyPass(this.renderer), this.depthCopyPass = new DepthCopyPass(this.renderer);
28595
- var l = new THREE.DepthTexture(1, 1);
28596
- l.generateMipmaps = !1, l.format = THREE.DepthStencilFormat, l.type = THREE.UnsignedInt248Type, this.modelRenderTarget = new THREE.WebGLRenderTarget(1, 1, {
28597
- encoding: (s = (o = this.renderer) === null || o === void 0 ? void 0 : o.outputEncoding) !== null && s !== void 0 ? s : THREE.sRGBEncoding,
28598
- depthTexture: l,
28640
+ var s = this.renderer.getContext();
28641
+ this.enableFragDepth = this.enableLayeringRendering && (typeof WebGL2RenderingContext != "undefined" && s instanceof WebGL2RenderingContext || s.getExtension("EXT_frag_depth") !== null), this.copyPass = new CopyPass(this.renderer), this.depthCopyPass = new DepthCopyPass(this.renderer);
28642
+ var u = new THREE.DepthTexture(1, 1);
28643
+ u.generateMipmaps = !1, u.format = THREE.DepthStencilFormat, u.type = THREE.UnsignedInt248Type, this.modelRenderTarget = new THREE.WebGLRenderTarget(1, 1, {
28644
+ encoding: (o = (r = this.renderer) === null || r === void 0 ? void 0 : r.outputEncoding) !== null && o !== void 0 ? o : THREE.sRGBEncoding,
28645
+ depthTexture: u,
28599
28646
  generateMipmaps: !1,
28600
28647
  depthBuffer: !0,
28601
28648
  stencilBuffer: !0
@@ -28612,20 +28659,170 @@ void main() {
28612
28659
  }, n.prototype.dispose = function() {
28613
28660
  this.screenBuffers.forEach(function(t) {
28614
28661
  t && t.dispose();
28615
- }), this.screenBuffers = [];
28662
+ }), this.screenBuffers = [], this.copyPass.dispose(), this.depthCopyPass.dispose();
28663
+ }, n;
28664
+ })()
28665
+ ), VERTEX_SHADER = `
28666
+ varying vec3 vWorldNormal;
28667
+
28668
+ void main() {
28669
+ // 将normal变换到world space
28670
+ // 使用mat3(modelMatrix)而不是normalMatrix(normalMatrix会变换到view space)
28671
+ vWorldNormal = normalize(mat3(modelMatrix) * normal);
28672
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
28673
+ }
28674
+ `, FRAGMENT_SHADER = `
28675
+ varying vec3 vWorldNormal;
28676
+
28677
+ void main() {
28678
+ // 将normal从[-1,1]映射到[0,1]存储
28679
+ // 这是因为FragColor只能输出[0,1]范围的值
28680
+ //
28681
+ // 后续使用时需要反归一化:
28682
+ // vec3 normal = texture2D(tNormal, vUv).rgb;
28683
+ // normal = normal * 2.0 - 1.0; // 从[0,1]解码回[-1,1]
28684
+ // normal = normalize(normal); // 重新归一化
28685
+ gl_FragColor = vec4(vWorldNormal * 0.5 + 0.5, 1.0);
28686
+ }
28687
+ `, NormalPass = (
28688
+ /** @class */
28689
+ (function() {
28690
+ function n(t) {
28691
+ this.renderer = t, this.material = new THREE.ShaderMaterial({
28692
+ vertexShader: VERTEX_SHADER,
28693
+ fragmentShader: FRAGMENT_SHADER,
28694
+ side: THREE.DoubleSide,
28695
+ // 处理双面材质
28696
+ blending: THREE.NoBlending,
28697
+ depthWrite: !0,
28698
+ depthTest: !0
28699
+ });
28700
+ }
28701
+ return n.prototype.render = function(t, e, r) {
28702
+ var o = this.renderer.getRenderTarget(), s = t.overrideMaterial;
28703
+ t.overrideMaterial = this.material, this.renderer.setRenderTarget(r);
28704
+ var u = t.getObjectByName("bounding"), l = t.getObjectByName("helper");
28705
+ u && (u.visible = !1), l && (l.visible = !1), this.renderer.render(t, e), u && (u.visible = !0), l && (l.visible = !0), this.renderer.setRenderTarget(o), t.overrideMaterial = s;
28706
+ }, n.prototype.dispose = function() {
28707
+ this.material.dispose();
28616
28708
  }, n;
28617
28709
  })()
28710
+ ), EffectComposer = (
28711
+ /** @class */
28712
+ (function() {
28713
+ function n(t, e, r) {
28714
+ this.renderer = t;
28715
+ var o = {
28716
+ minFilter: LinearFilter,
28717
+ magFilter: LinearFilter,
28718
+ format: RGBAFormat,
28719
+ stencilBuffer: !1
28720
+ };
28721
+ if (e === void 0 || r === void 0) {
28722
+ var s = t.getSize(new Vector2());
28723
+ this._pixelRatio = t.getPixelRatio(), this._width = s.width, this._height = s.height;
28724
+ } else
28725
+ this._pixelRatio = 1, this._width = e, this._height = r;
28726
+ this.renderTarget1 = new WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio, o), this.renderTarget1.texture.name = "EffectComposer.rt1", this.renderTarget2 = new WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio, o), this.renderTarget2.texture.name = "EffectComposer.rt2", this.readBuffer = this.renderTarget1, this.writeBuffer = this.renderTarget2, this.renderToScreen = !0, this.passes = [], this.clock = new Clock$1();
28727
+ }
28728
+ return n.prototype.swapBuffers = function() {
28729
+ var t = this.readBuffer;
28730
+ this.readBuffer = this.writeBuffer, this.writeBuffer = t;
28731
+ }, n.prototype.addPass = function(t) {
28732
+ this.passes.push(t), t.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
28733
+ }, n.prototype.setGBuffer = function(t) {
28734
+ this.gbuffer = t;
28735
+ }, n.prototype.insertPass = function(t, e) {
28736
+ this.passes.splice(e, 0, t), t.setSize(this._width * this._pixelRatio, this._height * this._pixelRatio);
28737
+ }, n.prototype.isLastEnabledPass = function(t) {
28738
+ for (var e = t + 1; e < this.passes.length; e++)
28739
+ if (this.passes[e].enabled)
28740
+ return !1;
28741
+ return !0;
28742
+ }, n.prototype.render = function(t) {
28743
+ t === void 0 && (t = this.clock.getDelta());
28744
+ for (var e = this.renderer.getRenderTarget(), r = !1, o = 0; o < this.passes.length; o++) {
28745
+ var s = this.passes[o];
28746
+ s.enabled !== !1 && (s.renderToScreen = this.renderToScreen && this.isLastEnabledPass(o), this.gbuffer && s instanceof FivePass && s.setGBuffer(this.gbuffer), s.render(this.renderer, this.writeBuffer, this.readBuffer, t, r), s.needsSwap && this.swapBuffers());
28747
+ }
28748
+ this.renderer.setRenderTarget(e);
28749
+ }, n.prototype.reset = function(t) {
28750
+ var e = this.renderer.getSize(new Vector2());
28751
+ this._pixelRatio = this.renderer.getPixelRatio(), this._width = e.width, this._height = e.height, this.renderTarget1.dispose(), this.renderTarget2.dispose();
28752
+ var r = {
28753
+ minFilter: LinearFilter,
28754
+ magFilter: LinearFilter,
28755
+ format: RGBAFormat,
28756
+ stencilBuffer: !1
28757
+ };
28758
+ this.renderTarget1 = new WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio, r), this.renderTarget1.texture.name = "EffectComposer.rt1", this.renderTarget2 = new WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio, r), this.renderTarget2.texture.name = "EffectComposer.rt2", this.readBuffer = this.renderTarget1, this.writeBuffer = this.renderTarget2;
28759
+ }, n.prototype.setSize = function(t, e) {
28760
+ this._width = t, this._height = e;
28761
+ var r = this._width * this._pixelRatio, o = this._height * this._pixelRatio;
28762
+ this.renderTarget1.setSize(r, o), this.renderTarget2.setSize(r, o);
28763
+ for (var s = 0; s < this.passes.length; s++)
28764
+ this.passes[s].setSize(r, o);
28765
+ }, n.prototype.setPixelRatio = function(t) {
28766
+ this._pixelRatio = t, this.setSize(this._width, this._height);
28767
+ }, n.prototype.dispose = function() {
28768
+ this.renderTarget1.dispose(), this.renderTarget2.dispose();
28769
+ }, Object.defineProperty(n.prototype, "needsDepthGBuffer", {
28770
+ get: function() {
28771
+ for (var t = !1, e = 0, r = this.passes; e < r.length; e++) {
28772
+ var o = r[e];
28773
+ if (o instanceof FivePass && o.dependencies.includes("depth")) {
28774
+ t = !0;
28775
+ break;
28776
+ }
28777
+ }
28778
+ return t;
28779
+ },
28780
+ enumerable: !1,
28781
+ configurable: !0
28782
+ }), Object.defineProperty(n.prototype, "needsNormalGBuffer", {
28783
+ get: function() {
28784
+ for (var t = !1, e = 0, r = this.passes; e < r.length; e++) {
28785
+ var o = r[e];
28786
+ if (o instanceof FivePass && o.dependencies.includes("normal")) {
28787
+ t = !0;
28788
+ break;
28789
+ }
28790
+ }
28791
+ return t;
28792
+ },
28793
+ enumerable: !1,
28794
+ configurable: !0
28795
+ }), n;
28796
+ })()
28618
28797
  ), DefaultRenderer = (
28619
28798
  /** @class */
28620
28799
  (function(n) {
28621
28800
  __extends(t, n);
28622
28801
  function t(e) {
28623
28802
  var r = n.call(this, e) || this;
28624
- return r.type = "default", r;
28803
+ return r.modelNormalTarget = null, r.normalPass = new NormalPass(r.renderer), r.composer = new EffectComposer(r.renderer), r.gbuffer = /* @__PURE__ */ new Map(), r.gbuffer.set("color", r.modelRenderTarget.texture), r.gbuffer.set("depth", r.modelRenderTarget.depthTexture), r.composer.setGBuffer(r.gbuffer), r.type = "default", r;
28625
28804
  }
28626
28805
  return t.prototype.render = function(e) {
28627
- var r = this.renderer.getRenderTarget();
28628
- this.enableFragDepth ? (e && (this.renderer.setRenderTarget(this.modelRenderTarget), this.renderer.render(this.modelScene, this.camera)), this.depthCopyPass.render(this.modelRenderTarget.depthTexture, r), this.renderer.autoClearDepth = !1, this.renderer.autoClearColor = !0, this.copyPass.render(this.modelRenderTarget, r), this.renderer.setRenderTarget(r), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0) : (this.renderer.setRenderTarget(r), this.renderer.render(this.modelScene, this.camera), this.renderer.autoClearColor = !1, this.renderer.autoClearDepth = !1, this.renderer.render(this.scene, this.camera), this.renderer.autoClearColor = !0, this.renderer.autoClearDepth = !0);
28806
+ var r, o = this.renderer.getRenderTarget();
28807
+ this.renderer.setRenderTarget(this.modelRenderTarget), this.renderer.render(this.scene, this.camera), this.composer.needsNormalGBuffer ? (this.modelNormalTarget || (this.modelNormalTarget = new THREE.WebGLRenderTarget(this.modelRenderTarget.width, this.modelRenderTarget.height, {
28808
+ format: THREE.RGBAFormat,
28809
+ type: THREE.UnsignedByteType,
28810
+ generateMipmaps: !1,
28811
+ depthBuffer: !1,
28812
+ stencilBuffer: !1
28813
+ })), this.modelScene.traverse(function(s) {
28814
+ s instanceof PBMMesh && s.geometry.computeVertexNormals();
28815
+ }), this.normalPass.render(this.scene, this.camera, this.modelNormalTarget), this.gbuffer.set("normal", this.modelNormalTarget.texture)) : (this.gbuffer.delete("normal"), (r = this.modelNormalTarget) === null || r === void 0 || r.dispose(), this.modelNormalTarget = null), this.composer.passes.length > 0 ? (this.copyPass.render(this.modelRenderTarget, this.composer.readBuffer), this.composer.render()) : this.copyPass.render(this.modelRenderTarget, o), this.renderer.setRenderTarget(o);
28816
+ }, t.prototype.setSize = function(e, r, o) {
28817
+ var s = e * o, u = r * o;
28818
+ if (this.modelRenderTarget.width !== s || this.modelRenderTarget.height !== u) {
28819
+ this.modelRenderTarget.setSize(s, u), this.modelRenderTarget.depthTexture.dispose();
28820
+ var l = new THREE.DepthTexture(s, u);
28821
+ l.generateMipmaps = !1, l.format = THREE.DepthStencilFormat, l.type = THREE.UnsignedInt248Type, this.modelRenderTarget.depthTexture = l, this.modelRenderTarget.depthTexture.needsUpdate = !0, this.gbuffer.set("depth", this.modelRenderTarget.depthTexture);
28822
+ }
28823
+ this.modelNormalTarget && (this.modelNormalTarget.width !== s || this.modelNormalTarget.height !== u) && this.modelNormalTarget.setSize(s, u), this.composer.setSize(s, u);
28824
+ }, t.prototype.dispose = function() {
28825
+ n.prototype.dispose.call(this), this.modelNormalTarget && this.modelNormalTarget.dispose(), this.normalPass.dispose(), this.composer.dispose();
28629
28826
  }, t;
28630
28827
  })(BaseRenderer)
28631
28828
  ), Effect = (
@@ -29154,19 +29351,19 @@ void main() {
29154
29351
  g.getPixelsRenderTarget = new THREE.WebGLRenderTarget(1, 1, {
29155
29352
  encoding: (p = (h = g.renderer) === null || h === void 0 ? void 0 : h.outputEncoding) !== null && p !== void 0 ? p : THREE.sRGBEncoding,
29156
29353
  generateMipmaps: !1
29157
- }), g.viewport = Object.assign({ left: 0, bottom: 0, width: 1, height: 1 }, e.viewport), g.camera = new Camera(DEFAULT_CAMERA_FOV), g.scene = new Scene(), g.xrCustomObjectsScene = new THREE.Scene(), g.scene.add(g.xrCustomObjectsScene), g.scene.matrixAutoUpdate = !1, g.loadWorkTask = Promise.resolve(), g.requestProxy = (m = e.requestProxy) !== null && m !== void 0 ? m : DEFAULT_REQUEST_PROXY, g.networkSubscribe = new NetworkSubscribe(), g.networkSubscribe.on("network", function(H, L, k, D) {
29158
- var q;
29354
+ }), g.viewport = Object.assign({ left: 0, bottom: 0, width: 1, height: 1 }, e.viewport), g.camera = new Camera(DEFAULT_CAMERA_FOV), g.scene = new Scene(), g.xrCustomObjectsScene = new THREE.Scene(), g.scene.add(g.xrCustomObjectsScene), g.scene.matrixAutoUpdate = !1, g.loadWorkTask = Promise.resolve(), g.requestProxy = (m = e.requestProxy) !== null && m !== void 0 ? m : DEFAULT_REQUEST_PROXY, g.networkSubscribe = new NetworkSubscribe(), g.networkSubscribe.on("network", function(H, F, L, k) {
29355
+ var D;
29159
29356
  g.emit("network.resource", createEvent("network.resource", {
29160
29357
  source: H,
29161
- requestType: L,
29162
- requestState: k,
29163
- detail: D
29164
- })), (q = g.analysis) === null || q === void 0 || q.network(g.works, H, L, k, D);
29358
+ requestType: F,
29359
+ requestState: L,
29360
+ detail: k
29361
+ })), (D = g.analysis) === null || D === void 0 || D.network(g.works, H, F, L, k);
29165
29362
  }), g.readyCallbacks = [], g.syncingState = !1, g.helperGroup = new THREE.Group(), g.helperGroup.name = "helper", g.helperGroup.matrixAutoUpdate = !1, g.scene.add(g.helperGroup), worksMap.set(g, emptyWorks), g.modelScene = new ModelScene({
29166
29363
  fiveId: g.fiveId
29167
29364
  }), g.modelScene.addEventListener("model.create", function(H) {
29168
29365
  g.bindModel(H.model);
29169
- });
29366
+ }), g.scene.add(g.modelScene);
29170
29367
  var E = g.modelScene.setModels(emptyWorks, { forceReplaceImmediately: !0 })[0];
29171
29368
  defineProperty(E, "loaded", {
29172
29369
  get: function() {
@@ -29176,30 +29373,7 @@ void main() {
29176
29373
  }
29177
29374
  }), g.videoTexture = new THREE.VideoTexture(e.videoInstance || generateDefaultVideoElement());
29178
29375
  var b = initLights();
29179
- g.scene.add(b);
29180
- var T = new THREE.Group();
29181
- defineProperty(T, "children", {
29182
- get: function() {
29183
- return b.children;
29184
- },
29185
- set: function(H) {
29186
- b.children = H;
29187
- }
29188
- }), defineProperty(T, "visible", {
29189
- get: function() {
29190
- return b.visible;
29191
- },
29192
- set: function(H) {
29193
- b.visible = H;
29194
- }
29195
- }), defineProperty(T, "name", {
29196
- get: function() {
29197
- return b.name;
29198
- },
29199
- set: function(H) {
29200
- b.name = H;
29201
- }
29202
- }), g.modelScene.add(T), g.state = {
29376
+ g.scene.add(b), g.state = {
29203
29377
  mode: g.currentMode,
29204
29378
  workCode: g.pano.workCode,
29205
29379
  panoIndex: g.pano.panoIndex,
@@ -29208,28 +29382,28 @@ void main() {
29208
29382
  fov: g.camera.pose.fov,
29209
29383
  offset: g.camera.pose.offset.clone(),
29210
29384
  distance: g.camera.pose.distance
29211
- }, g.stateSynced = !1, g.destroyed = !1, g.paused = !0, typeof window != "undefined" && (e.play !== !1 && g.play(), g.stopAnimationLoop = AnimationFrameLoop.shared.add(function(H, L) {
29212
- for (var k = [], D = 2; D < arguments.length; D++)
29213
- k[D - 2] = arguments[D];
29214
- g.updateTime.apply(g, __spreadArray([H, L], k, !1));
29385
+ }, g.stateSynced = !1, g.destroyed = !1, g.paused = !0, typeof window != "undefined" && (e.play !== !1 && g.play(), g.stopAnimationLoop = AnimationFrameLoop.shared.add(function(H, F) {
29386
+ for (var L = [], k = 2; k < arguments.length; k++)
29387
+ L[k - 2] = arguments[k];
29388
+ g.updateTime.apply(g, __spreadArray([H, F], L, !1));
29215
29389
  }, !1, 0, 10));
29216
- var S = function() {
29390
+ var T = function() {
29217
29391
  typeof document != "undefined" && document.fullscreenElement === null && g.currentMode === "VRPanorama" && g.controller.emit("vr.requestExit", createEvent("vr.requestExit", {}));
29218
- }, R = function() {
29392
+ }, S = function() {
29219
29393
  g.needsRender = !0, g.modelSceneNeedsRender = !0;
29220
29394
  };
29221
- if (typeof document != "undefined" && document.addEventListener("fullscreenchange", S, !1), g.renderer && g.renderer.domElement.addEventListener("webglcontextrestored", R, !1), g.removeEventListeners = function() {
29222
- typeof document != "undefined" && document.removeEventListener("fullscreenchange", S, !1), g.renderer && g.renderer.domElement.removeEventListener("webglcontextrestored", R, !1);
29395
+ if (typeof document != "undefined" && document.addEventListener("fullscreenchange", T, !1), g.renderer && g.renderer.domElement.addEventListener("webglcontextrestored", S, !1), g.removeEventListeners = function() {
29396
+ typeof document != "undefined" && document.removeEventListener("fullscreenchange", T, !1), g.renderer && g.renderer.domElement.removeEventListener("webglcontextrestored", S, !1);
29223
29397
  }, g.plugins = {}, e.plugins && e.plugins.length)
29224
- for (var M = 0, w = e.plugins; M < w.length; M++) {
29225
- var P = w[M];
29226
- if (typeof P == "function")
29227
- P(g);
29228
- else if (Array.isArray(P)) {
29229
- var O = P[0], C = P[1], I = P[2];
29230
- if (typeof O == "function") {
29231
- var _ = O(g, I);
29232
- typeof C == "string" && (g.plugins[C] ? g.throwError(new Error("plugin name ".concat(C, " is exists."))) : g.plugins[C] = _);
29398
+ for (var R = 0, M = e.plugins; R < M.length; R++) {
29399
+ var w = M[R];
29400
+ if (typeof w == "function")
29401
+ w(g);
29402
+ else if (Array.isArray(w)) {
29403
+ var P = w[0], O = w[1], C = w[2];
29404
+ if (typeof P == "function") {
29405
+ var I = P(g, C);
29406
+ typeof O == "string" && (g.plugins[O] ? g.throwError(new Error("plugin name ".concat(O, " is exists."))) : g.plugins[O] = I);
29233
29407
  }
29234
29408
  }
29235
29409
  }
@@ -29237,7 +29411,7 @@ void main() {
29237
29411
  }
29238
29412
  return Object.defineProperty(t, "version", {
29239
29413
  get: function() {
29240
- return "6.7.0-alpha.19";
29414
+ return "6.7.0-alpha.20";
29241
29415
  },
29242
29416
  enumerable: !1,
29243
29417
  configurable: !0
@@ -29490,23 +29664,23 @@ void main() {
29490
29664
  this.bindWorkFetcher(O);
29491
29665
  }
29492
29666
  r === void 0 && (r = "inherit"), r === "inherit" && this.works === emptyWorks && (r = "initial");
29493
- var C = M.initial, I = C.work.observers[0], _ = I ? {
29667
+ var C = M.initial, I = C.work.observers[0], H = I ? {
29494
29668
  workCode: I.work.workCode,
29495
29669
  panoIndex: I.panoIndex
29496
29670
  } : {
29497
29671
  workCode: C.work.workCode,
29498
29672
  panoIndex: 0
29499
- }, H = (l = C.mode) !== null && l !== void 0 ? l : I ? "Panorama" : "Mapview", L = {};
29673
+ }, F = (l = C.mode) !== null && l !== void 0 ? l : I ? "Panorama" : "Mapview", L = {};
29500
29674
  if (r === "inherit") {
29501
- H = this.currentMode;
29675
+ F = this.currentMode;
29502
29676
  var k = (f = (c = M[0]) === null || c === void 0 ? void 0 : c.observers) === null || f === void 0 ? void 0 : f[this.panoIndex];
29503
- k ? _ = {
29677
+ k ? H = {
29504
29678
  workCode: k.work.workCode,
29505
29679
  panoIndex: k.panoIndex
29506
- } : typeof M.initial.panoIndex == "number" ? _ = {
29680
+ } : typeof M.initial.panoIndex == "number" ? H = {
29507
29681
  workCode: M.initial.work.workCode,
29508
29682
  panoIndex: M.initial.panoIndex
29509
- } : (H === "Panorama" || H === "VRPanorama" || H === "XRPanorama") && (H = "Mapview"), L = {
29683
+ } : (F === "Panorama" || F === "VRPanorama" || F === "XRPanorama") && (F = "Mapview"), L = {
29510
29684
  longitude: this.camera.pose.longitude,
29511
29685
  latitude: this.camera.pose.latitude,
29512
29686
  fov: this.camera.pose.fov,
@@ -29514,10 +29688,10 @@ void main() {
29514
29688
  offset: void 0
29515
29689
  };
29516
29690
  } else if (r === "initial")
29517
- typeof C.panoIndex == "number" && (_ = {
29691
+ typeof C.panoIndex == "number" && (H = {
29518
29692
  workCode: C.work.workCode,
29519
29693
  panoIndex: C.panoIndex
29520
- }), C.mode && (H = C.mode), L = {
29694
+ }), C.mode && (F = C.mode), L = {
29521
29695
  longitude: C.longitude,
29522
29696
  latitude: C.latitude,
29523
29697
  fov: C.fov,
@@ -29525,12 +29699,12 @@ void main() {
29525
29699
  offset: (d = C.offset) === null || d === void 0 ? void 0 : d.clone()
29526
29700
  };
29527
29701
  else {
29528
- if (H = (h = r.mode) !== null && h !== void 0 ? h : this.currentMode, typeof r.panoIndex == "number") {
29702
+ if (F = (h = r.mode) !== null && h !== void 0 ? h : this.currentMode, typeof r.panoIndex == "number") {
29529
29703
  var k = M.getObserver({
29530
29704
  workCode: (m = (p = r.workCode) !== null && p !== void 0 ? p : C.work.workCode) !== null && m !== void 0 ? m : "",
29531
29705
  panoIndex: r.panoIndex
29532
29706
  });
29533
- k && (_ = {
29707
+ k && (H = {
29534
29708
  workCode: k.work.workCode,
29535
29709
  panoIndex: k.panoIndex
29536
29710
  });
@@ -29543,41 +29717,41 @@ void main() {
29543
29717
  offset: r.offset
29544
29718
  };
29545
29719
  }
29546
- var D = __assign(__assign(__assign({}, _), { mode: H }), L), q = this.getCurrentState(), z = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
29547
- (H === "Floorplan" || H === "Topview" || H === "Mapview") && this.currentMode === H && (z = 0);
29720
+ var D = __assign(__assign(__assign({}, H), { mode: F }), L), U = this.getCurrentState(), z = (A = v.duration) !== null && A !== void 0 ? A : this.modeChangeDuration;
29721
+ (F === "Floorplan" || F === "Topview" || F === "Mapview") && this.currentMode === F && (z = 0);
29548
29722
  var J = "fly";
29549
- (H === "Panorama" || H === "VRPanorama" || H === "XRPanorama") && this.currentMode === H && (J = (g = v.effect) !== null && g !== void 0 ? g : "fade"), this.emit("works.request", createEvent("works.request", {
29723
+ (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", {
29550
29724
  input: e,
29551
29725
  works: M,
29552
29726
  state: D,
29553
29727
  userAction: s
29554
29728
  }));
29555
29729
  var Q = function() {
29556
- u.pano = _;
29730
+ u.pano = H;
29557
29731
  var Z = __assign(__assign({ initial: {
29558
29732
  state: D,
29559
- currentState: q,
29733
+ currentState: U,
29560
29734
  duration: z,
29561
29735
  effect: J,
29562
29736
  userAction: s
29563
- } }, u.commonParams()), u.controllerInits[H]), $ = Controllers[H].initAnimationEndState(Z);
29564
- if (u.controller && u.currentMode === H)
29565
- u.controller.updateWork(M, $, { effect: J, duration: z }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(H, Z));
29737
+ } }, u.commonParams()), u.controllerInits[F]), $ = Controllers[F].initAnimationEndState(Z);
29738
+ if (u.controller && u.currentMode === F)
29739
+ u.controller.updateWork(M, $, { effect: J, duration: z }, s) === !1 && (u.controller.destroy(), u.controller = u.applyController(F, Z));
29566
29740
  else {
29567
29741
  var X = u.currentMode;
29568
29742
  if (u.controller)
29569
29743
  u.controller.destroy();
29570
29744
  else {
29571
- var ne = Controllers[H].initAnimationEndState(Z);
29745
+ var ne = Controllers[F].initAnimationEndState(Z);
29572
29746
  u.camera.setFromPose(ne), u.emit("camera.update", createEvent("camera.update", {
29573
29747
  state: u.getCurrentState(),
29574
29748
  userAction: s
29575
29749
  }));
29576
29750
  }
29577
- u.controller = u.applyController(H, Z);
29751
+ u.controller = u.applyController(F, Z);
29578
29752
  var W = createEvent("mode.change", {
29579
29753
  prevMode: X,
29580
- mode: H,
29754
+ mode: F,
29581
29755
  state: $,
29582
29756
  userAction: s
29583
29757
  });
@@ -29590,11 +29764,11 @@ void main() {
29590
29764
  u.updateTime(u.currentUpdateArgs.time, 0, u.currentUpdateArgs.args);
29591
29765
  };
29592
29766
  worksMap.set(this, M);
29593
- var U = Promise.resolve();
29594
- if (H === t.Mode.Floorplan || H === t.Mode.Topview || H === t.Mode.Mapview || H === t.Mode.Model) {
29595
- this.modelScene.loaded === !1 && (this.camera.setFromPose(D), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = H);
29767
+ var q = Promise.resolve();
29768
+ if (F === t.Mode.Floorplan || F === t.Mode.Topview || F === t.Mode.Mapview || F === t.Mode.Model) {
29769
+ this.modelScene.loaded === !1 && (this.camera.setFromPose(D), assignPose(this.state, this.camera.pose)), this.controller || (this.currentMode = F);
29596
29770
  var j = this.modelScene.setModels(M, E);
29597
- U = Promise.all(j.map(function(Z) {
29771
+ q = Promise.all(j.map(function(Z) {
29598
29772
  return Z.loadedReady;
29599
29773
  })).then(function() {
29600
29774
  u.needsRender = !0, u.modelSceneNeedsRender = !0, Q(), u.emit("camera.update", createEvent("camera.update", {
@@ -29612,7 +29786,7 @@ void main() {
29612
29786
  userAction: s
29613
29787
  })), oe = !0, u.modelScene.autoRefine = !0), G.off("pano.arrived", ee), G.off("pano.cancel", ee);
29614
29788
  }, j = this.modelScene.setModels(M, E);
29615
- U = Promise.all(j.map(function($) {
29789
+ q = Promise.all(j.map(function($) {
29616
29790
  return $.initReady;
29617
29791
  })).then(noop), G.once("pano.arrived", ee), G.once("pano.cancel", ee), setTimeout(ee, ((y = v.duration) !== null && y !== void 0 ? y : this.modeChangeDuration) + 1e3);
29618
29792
  }
@@ -29621,7 +29795,7 @@ void main() {
29621
29795
  state: this.getCurrentState(),
29622
29796
  userAction: s,
29623
29797
  works: M
29624
- })), U.then(function() {
29798
+ })), q.then(function() {
29625
29799
  return u.ready();
29626
29800
  }).then(function() {
29627
29801
  var Z;
@@ -29754,9 +29928,9 @@ void main() {
29754
29928
  } else
29755
29929
  T = new Uint8Array(C);
29756
29930
  if (this.renderer.readRenderTargetPixels(M, 0, 0, A * y, g * y, T), v)
29757
- for (var I = O / 2, _ = 0, H = 0, L = 0, k = 0; H < I; H++)
29758
- for (k = (P - Math.floor(H / w) - 1) * w + H % w, L = 0; L < 4; L++)
29759
- _ = T[H * 4 + L], T[H * 4 + L] = T[k * 4 + L], T[k * 4 + L] = _;
29931
+ for (var I = O / 2, H = 0, F = 0, L = 0, k = 0; F < I; F++)
29932
+ for (k = (P - Math.floor(F / w) - 1) * w + F % w, L = 0; L < 4; L++)
29933
+ H = T[F * 4 + L], T[F * 4 + L] = T[k * 4 + L], T[k * 4 + L] = H;
29760
29934
  return T;
29761
29935
  }, t.prototype.getElement = function() {
29762
29936
  var e;
@@ -29819,6 +29993,10 @@ void main() {
29819
29993
  return this.throwError(new Error("controller is not initialized.")), Promise.resolve();
29820
29994
  if (!l)
29821
29995
  return this.throwError(new Error("renderer is not initialized.")), Promise.resolve();
29996
+ typeof e == "number" && this.pano.workCode && (e = {
29997
+ workCode: this.pano.workCode,
29998
+ panoIndex: e
29999
+ });
29822
30000
  var c = this.works.getObserver(e);
29823
30001
  if (!c)
29824
30002
  return this.throwError(new Error("pano ".concat(JSON.stringify(e), " not existed."))), Promise.resolve();
@@ -29997,11 +30175,11 @@ void main() {
29997
30175
  userAction: !1,
29998
30176
  state: this.state
29999
30177
  })), this.readyCallbacks.length && this.stateSynced) {
30000
- var I = this.currentMode, _ = I === t.Mode.Floorplan || I === t.Mode.Topview || I === t.Mode.Mapview || I === t.Mode.Model;
30001
- if (!_ || this.modelScene.loaded) {
30002
- var H = this.readyCallbacks.slice();
30178
+ var I = this.currentMode, H = I === t.Mode.Floorplan || I === t.Mode.Topview || I === t.Mode.Mapview || I === t.Mode.Model;
30179
+ if (!H || this.modelScene.loaded) {
30180
+ var F = this.readyCallbacks.slice();
30003
30181
  this.readyCallbacks.length = 0;
30004
- for (var L = 0, k = H; L < k.length; L++) {
30182
+ for (var L = 0, k = F; L < k.length; L++) {
30005
30183
  var D = k[L];
30006
30184
  this.controller instanceof Controllers.Panorama && D.tile === !0 && !this.controller.isTileReady() ? this.readyCallbacks.push(D) : D();
30007
30185
  }
@@ -30219,6 +30397,18 @@ void main() {
30219
30397
  }
30220
30398
  }
30221
30399
  return null;
30400
+ }, t.prototype.addPass = function(e) {
30401
+ this._buildInRendererType !== "default" && this.throwError(new Error("addPass is not supported when using built-in renderer type other than 'default'.")), this.renderer || this.throwError(new Error("renderer is not initialized."));
30402
+ var r = this.getBuiltinRenderer(this.renderer);
30403
+ r.composer.addPass(e);
30404
+ }, t.prototype.removePass = function(e) {
30405
+ this._buildInRendererType !== "default" && this.throwError(new Error("removePass is not supported when using built-in renderer type other than 'default'.")), this.renderer || this.throwError(new Error("renderer is not initialized."));
30406
+ var r = this.getBuiltinRenderer(this.renderer), o = r.composer.passes.indexOf(e);
30407
+ o !== -1 && r.composer.passes.splice(o, 1);
30408
+ }, t.prototype.insertPass = function(e, r) {
30409
+ this._buildInRendererType !== "default" && this.throwError(new Error("insertPass is not supported when using built-in renderer type other than 'default'.")), this.renderer || this.throwError(new Error("renderer is not initialized."));
30410
+ var o = this.getBuiltinRenderer(this.renderer);
30411
+ o.composer.insertPass(e, r);
30222
30412
  }, Object.defineProperty(t.prototype, "enableIOSEDR", {
30223
30413
  /**
30224
30414
  * @deprecated
@@ -30329,6 +30519,8 @@ export {
30329
30519
  PBMCustomShader as CustomShader,
30330
30520
  Fetcher,
30331
30521
  Five,
30522
+ FivePass,
30523
+ FullScreenQuad,
30332
30524
  InternalWebGLRenderer,
30333
30525
  Model,
30334
30526
  ModelScene,
@@ -30347,6 +30539,7 @@ export {
30347
30539
  PanoCircleMeshCustom,
30348
30540
  PanoCircleMeshSolid,
30349
30541
  Parameter,
30542
+ Pass$1 as Pass,
30350
30543
  Scene,
30351
30544
  Subscribe,
30352
30545
  TextureLoader,