@realsee/five 6.7.0-alpha.12 → 6.7.0-alpha.13

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 (118) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/search.js +1 -1
  3. package/docs/classes/five.Model.html +1 -1
  4. package/docs/classes/five.ModelScene.html +1 -1
  5. package/docs/classes/five.PBMContainer.html +1 -1
  6. package/docs/classes/five.PBMGroup.html +1 -1
  7. package/docs/classes/five.PBMMesh.html +1 -1
  8. package/docs/classes/five.PBMMeshMaterial.html +1 -1
  9. package/docs/classes/five.PBMPointCloud.html +1 -1
  10. package/docs/classes/five.PBMPointCloudMaterial.html +1 -1
  11. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  12. package/docs/classes/five.PanoCircleMeshSolid.html +5 -5
  13. package/docs/classes/five.Parameter.html +1 -1
  14. package/docs/classes/five.Tile3D.html +1 -1
  15. package/docs/classes/five.TileNode.html +1 -1
  16. package/docs/classes/five.TrajectoryNode.html +1 -1
  17. package/docs/classes/five.Work.html +16 -16
  18. package/docs/classes/five.WorkResolvedObserver.html +17 -17
  19. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  20. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  21. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  22. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  23. package/docs/classes/line.LineGeometry.html +1 -1
  24. package/docs/classes/line.LineMaterial.html +1 -1
  25. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  26. package/docs/classes/line.THREE_Line2.html +1 -1
  27. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  28. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  29. package/docs/classes/vfx.Airflow.html +1 -1
  30. package/docs/classes/vfx.Flame.html +1 -1
  31. package/docs/classes/vfx.Particle.html +1 -1
  32. package/docs/classes/vfx.ParticleGPU.html +1 -1
  33. package/docs/classes/vfx.SpotLight.html +1 -1
  34. package/docs/functions/five.parseWork.html +1 -1
  35. package/docs/functions/vue.useFiveWorks.html +2 -2
  36. package/docs/hierarchy.html +1 -1
  37. package/docs/interfaces/five.LooseWorkPanorama.html +1 -1
  38. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
  39. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +5 -3
  40. package/docs/interfaces/five.ModelLike.html +1 -1
  41. package/docs/interfaces/five.PBMMaterial.html +1 -1
  42. package/docs/interfaces/five.PBMMeshMaterialParameters.html +1 -1
  43. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +1 -1
  44. package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +2 -2
  45. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +12 -10
  46. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +5 -3
  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 +12 -10
  53. package/docs/interfaces/five.ViewLayer.html +1 -1
  54. package/docs/interfaces/five.WorkCubeImage.html +2 -2
  55. package/docs/interfaces/five.WorkImage.html +3 -3
  56. package/docs/interfaces/five.WorkInitial.html +8 -8
  57. package/docs/interfaces/five.WorkModel.html +8 -8
  58. package/docs/interfaces/five.WorkModelLayer.html +6 -6
  59. package/docs/interfaces/five.WorkObserver.html +18 -18
  60. package/docs/interfaces/five.WorkTile.html +4 -4
  61. package/docs/interfaces/five.WorkVideo.html +4 -4
  62. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +12 -10
  63. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  64. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  65. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +35 -24
  66. package/docs/interfaces/plugins.DynamicPathLinePluginType.Config.html +22 -12
  67. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +9 -9
  68. package/docs/interfaces/plugins.DynamicPathLinePluginType.Params.html +3 -3
  69. package/docs/interfaces/plugins.DynamicPathLinePluginType.PathConfig.html +12 -4
  70. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +4 -4
  71. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  72. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  73. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  74. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  75. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  76. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  77. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  78. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  79. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  80. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  81. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  82. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  83. package/docs/interfaces/react.FiveInjectionTypes.html +1 -1
  84. package/docs/types/five.ParseOptions.html +6 -6
  85. package/docs/types/plugins.DynamicPathLinePluginType.PluginData.html +2 -2
  86. package/docs/types/plugins.DynamicPathLinePluginType.ServerData.html +2 -2
  87. package/five/index.d.ts +6 -2
  88. package/five/index.js +66 -56
  89. package/five/index.mjs +2100 -2053
  90. package/gltf-loader/index.js +3 -3
  91. package/gltf-loader/index.mjs +3 -3
  92. package/line/index.js +3 -3
  93. package/line/index.mjs +3 -3
  94. package/package.json +1 -1
  95. package/plugins/index.d.ts +63 -7
  96. package/plugins/index.js +111 -26
  97. package/plugins/index.mjs +1182 -943
  98. package/react/index.js +2 -2
  99. package/react/index.mjs +2 -2
  100. package/shader-lib/index.js +2 -2
  101. package/shader-lib/index.mjs +2 -2
  102. package/sticker/index.js +3 -3
  103. package/sticker/index.mjs +3 -3
  104. package/umd/five-gltf-loader.js +3 -3
  105. package/umd/five-line.js +3 -3
  106. package/umd/five-plugins.js +111 -26
  107. package/umd/five-react.js +2 -2
  108. package/umd/five-shader-lib.js +2 -2
  109. package/umd/five-sticker.js +3 -3
  110. package/umd/five-vfx.js +2 -2
  111. package/umd/five-vue.js +2 -2
  112. package/umd/five.js +66 -56
  113. package/vfx/index.js +2 -2
  114. package/vfx/index.mjs +2 -2
  115. package/vue/index.js +2 -2
  116. package/vue/index.mjs +2 -2
  117. package/work-downloader/index.js +2 -2
  118. package/work-downloader/index.mjs +2 -2
package/plugins/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/11/4
5
- * Version: 6.7.0-alpha.12
4
+ * Generated: 2025/11/10
5
+ * Version: 6.7.0-alpha.13
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,59 +252,59 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
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
- */import { Subscribe as Pn, AnimationFrameLoop as ct, Camera as An, PanoCircleMesh as Sn } from "@realsee/five";
255
+ */import { Subscribe as Mn, AnimationFrameLoop as ct, Camera as An, PanoCircleMesh as xn } from "@realsee/five";
256
256
  import * as v from "three";
257
- import { EventDispatcher as Jt, Vector3 as ye, MOUSE as Me, TOUCH as _e, Spherical as Wt, Quaternion as Xt, Vector2 as Te, Object3D as $t, Matrix4 as Mn } from "three";
258
- import { BasePlugin as Ct } from "@realsee/five/plugins";
259
- function _n(h) {
260
- return /^https?:\/\/|^\/\//.test(h) || /^data:/.test(h);
257
+ import { EventDispatcher as Jt, Vector3 as ye, MOUSE as Se, TOUCH as _e, Spherical as Wt, Quaternion as Xt, Vector2 as Te, Object3D as $t, Matrix4 as Sn } from "three";
258
+ import { BasePlugin as Ot } from "@realsee/five/plugins";
259
+ function _n(f) {
260
+ return /^https?:\/\/|^\/\//.test(f) || /^data:/.test(f);
261
261
  }
262
- function Cn(h, o) {
263
- return _n(o) ? o : "".concat(h).concat(o);
262
+ function On(f, o) {
263
+ return _n(o) ? o : "".concat(f).concat(o);
264
264
  }
265
265
  var Xe;
266
- (function(h) {
266
+ (function(f) {
267
267
  var o = (
268
268
  /** @class */
269
269
  (function() {
270
270
  function e(n, t) {
271
- this.hooks = new Pn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = n, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
271
+ this.hooks = new Mn(), this.staticPrefix = "//vr-image-4.realsee-cdn.cn", this.five = n, t != null && t.staticPrefix && (this.staticPrefix = t.staticPrefix);
272
272
  }
273
273
  return e.prototype.getCurrentState = function() {
274
274
  return this.state;
275
275
  }, e.prototype.absoluteUrl = function(n) {
276
- return Cn(this.staticPrefix, n);
276
+ return On(this.staticPrefix, n);
277
277
  }, e;
278
278
  })()
279
279
  );
280
- h.Controller = o;
280
+ f.Controller = o;
281
281
  })(Xe || (Xe = {}));
282
- var Mt = function(h, o) {
283
- return Mt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
282
+ var St = function(f, o) {
283
+ return St = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
284
284
  e.__proto__ = n;
285
285
  } || function(e, n) {
286
286
  for (var t in n) Object.prototype.hasOwnProperty.call(n, t) && (e[t] = n[t]);
287
- }, Mt(h, o);
287
+ }, St(f, o);
288
288
  };
289
- function he(h, o) {
289
+ function he(f, o) {
290
290
  if (typeof o != "function" && o !== null)
291
291
  throw new TypeError("Class extends value " + String(o) + " is not a constructor or null");
292
- Mt(h, o);
292
+ St(f, o);
293
293
  function e() {
294
- this.constructor = h;
294
+ this.constructor = f;
295
295
  }
296
- h.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
296
+ f.prototype = o === null ? Object.create(o) : (e.prototype = o.prototype, new e());
297
297
  }
298
- var V = function() {
299
- return V = Object.assign || function(o) {
298
+ var z = function() {
299
+ return z = Object.assign || function(o) {
300
300
  for (var e, n = 1, t = arguments.length; n < t; n++) {
301
301
  e = arguments[n];
302
302
  for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && (o[a] = e[a]);
303
303
  }
304
304
  return o;
305
- }, V.apply(this, arguments);
305
+ }, z.apply(this, arguments);
306
306
  };
307
- function Le(h, o, e, n) {
307
+ function De(f, o, e, n) {
308
308
  function t(a) {
309
309
  return a instanceof e ? a : new e(function(s) {
310
310
  s(a);
@@ -314,24 +314,24 @@ function Le(h, o, e, n) {
314
314
  function l(g) {
315
315
  try {
316
316
  c(n.next(g));
317
- } catch (y) {
318
- s(y);
317
+ } catch (w) {
318
+ s(w);
319
319
  }
320
320
  }
321
- function f(g) {
321
+ function h(g) {
322
322
  try {
323
323
  c(n.throw(g));
324
- } catch (y) {
325
- s(y);
324
+ } catch (w) {
325
+ s(w);
326
326
  }
327
327
  }
328
328
  function c(g) {
329
- g.done ? a(g.value) : t(g.value).then(l, f);
329
+ g.done ? a(g.value) : t(g.value).then(l, h);
330
330
  }
331
- c((n = n.apply(h, o || [])).next());
331
+ c((n = n.apply(f, o || [])).next());
332
332
  });
333
333
  }
334
- function De(h, o) {
334
+ function Ne(f, o) {
335
335
  var e = { label: 0, sent: function() {
336
336
  if (a[0] & 1) throw a[1];
337
337
  return a[1];
@@ -341,10 +341,10 @@ function De(h, o) {
341
341
  }), s;
342
342
  function l(c) {
343
343
  return function(g) {
344
- return f([c, g]);
344
+ return h([c, g]);
345
345
  };
346
346
  }
347
- function f(c) {
347
+ function h(c) {
348
348
  if (n) throw new TypeError("Generator is already executing.");
349
349
  for (; s && (s = 0, c[0] && (e = 0)), e; ) try {
350
350
  if (n = 1, t && (a = c[0] & 2 ? t.return : c[0] ? t.throw || ((a = t.return) && a.call(t), 0) : t.next) && !(a = a.call(t, c[1])).done) return a;
@@ -381,7 +381,7 @@ function De(h, o) {
381
381
  a[2] && e.ops.pop(), e.trys.pop();
382
382
  continue;
383
383
  }
384
- c = o.call(h, e);
384
+ c = o.call(f, e);
385
385
  } catch (g) {
386
386
  c = [6, g], t = 0;
387
387
  } finally {
@@ -391,12 +391,12 @@ function De(h, o) {
391
391
  return { value: c[0] ? c[1] : void 0, done: !0 };
392
392
  }
393
393
  }
394
- function qt(h, o, e) {
394
+ function qt(f, o, e) {
395
395
  if (e || arguments.length === 2) for (var n = 0, t = o.length, a; n < t; n++)
396
396
  (a || !(n in o)) && (a || (a = Array.prototype.slice.call(o, 0, n)), a[n] = o[n]);
397
- return h.concat(a || Array.prototype.slice.call(o));
397
+ return f.concat(a || Array.prototype.slice.call(o));
398
398
  }
399
- function On(h) {
399
+ function Cn(f) {
400
400
  return new Promise(function(o, e) {
401
401
  var n = new Image();
402
402
  n.onload = function() {
@@ -405,99 +405,99 @@ function On(h) {
405
405
  }, n.onerror = function(t) {
406
406
  n.onload = n.onerror = function() {
407
407
  }, e(t);
408
- }, n.crossOrigin = "", n.src = h;
408
+ }, n.crossOrigin = "", n.src = f;
409
409
  });
410
410
  }
411
- var In = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), Et = typeof performance != "undefined" ? (function() {
412
- return In + performance.now();
411
+ var Ln = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), Et = typeof performance != "undefined" ? (function() {
412
+ return Ln + performance.now();
413
413
  }) : (function() {
414
414
  return Date.now();
415
415
  });
416
- function st(h, o, e) {
417
- return h + (o - h) * e;
416
+ function st(f, o, e) {
417
+ return f + (o - f) * e;
418
418
  }
419
- function Nn(h, o, e, n) {
420
- var t = (o * e + 2 * h) / Math.pow(e, 3), a = -(2 * o * e + 3 * h) / Math.pow(e, 2), s = o, l = h;
419
+ function Fn(f, o, e, n) {
420
+ var t = (o * e + 2 * f) / Math.pow(e, 3), a = -(2 * o * e + 3 * f) / Math.pow(e, 2), s = o, l = f;
421
421
  return t * Math.pow(n, 3) + a * Math.pow(n, 2) + s * n + l;
422
422
  }
423
- function kn(h, o, e, n) {
424
- var t = (o * e + 2 * h) / Math.pow(e, 3), a = -(2 * o * e + 3 * h) / Math.pow(e, 2), s = o;
423
+ function In(f, o, e, n) {
424
+ var t = (o * e + 2 * f) / Math.pow(e, 3), a = -(2 * o * e + 3 * f) / Math.pow(e, 2), s = o;
425
425
  return 3 * t * Math.pow(n, 2) + 2 * a * n + s;
426
426
  }
427
- function Ln(h, o, e, n) {
427
+ function Dn(f, o, e, n) {
428
428
  var t = n[1] - n[0];
429
- return h = lt(h, n), o = lt(o, n), o - h > t / 2 ? st(h + t, o, e) : h - o > t / 2 ? st(h - t, o, e) : st(h, o, e);
429
+ return f = lt(f, n), o = lt(o, n), o - f > t / 2 ? st(f + t, o, e) : f - o > t / 2 ? st(f - t, o, e) : st(f, o, e);
430
430
  }
431
- function lt(h, o) {
431
+ function lt(f, o) {
432
432
  var e = o[1] - o[0];
433
- return h < o[0] ? lt(h + e, o) : h >= o[1] ? lt(h - e, o) : h;
433
+ return f < o[0] ? lt(f + e, o) : f >= o[1] ? lt(f - e, o) : f;
434
434
  }
435
- function Dn(h, o, e, n) {
436
- return n ? Ln(h, o, e, n) : st(h, o, e);
435
+ function Nn(f, o, e, n) {
436
+ return n ? Dn(f, o, e, n) : st(f, o, e);
437
437
  }
438
438
  var Kt = (
439
439
  /** @class */
440
440
  (function() {
441
- function h(o) {
441
+ function f(o) {
442
442
  this.config = {}, this.progress = 1, this.ended = !0, this.value = {}, this.startTime = Et(), this.startVelocity = 0, this.duration = 0, this.keyframes = [];
443
443
  for (var e in o) {
444
444
  var n = o[e];
445
445
  typeof n == "number" ? (this.value[e] = n, this.config[e] = { circle: !1 }) : (this.value[e] = n.value, this.config[e] = { circle: n.circle });
446
446
  }
447
447
  this.keyframes = [
448
- { progress: 0, value: V({}, this.value) },
449
- { progress: 1, value: V({}, this.value) }
448
+ { progress: 0, value: z({}, this.value) },
449
+ { progress: 1, value: z({}, this.value) }
450
450
  ];
451
451
  }
452
- return h.prototype.getProgress = function(o) {
452
+ return f.prototype.getProgress = function(o) {
453
453
  var e = o - this.startTime;
454
- return e < 0 ? 0 : e >= this.duration ? 1 : 1 - Nn(1, this.startVelocity, this.duration, e);
455
- }, h.prototype.getValue = function(o) {
454
+ return e < 0 ? 0 : e >= this.duration ? 1 : 1 - Fn(1, this.startVelocity, this.duration, e);
455
+ }, f.prototype.getValue = function(o) {
456
456
  for (var e = 1; e < this.keyframes.length; e++)
457
457
  if (this.keyframes[e].progress > o) {
458
458
  var n = this.keyframes[e - 1], t = this.keyframes[e], a = {};
459
459
  for (var s in this.config) {
460
460
  var l = (o - n.progress) / (t.progress - n.progress);
461
- a[s] = Dn(n.value[s], t.value[s], l, this.config[s].circle);
461
+ a[s] = Nn(n.value[s], t.value[s], l, this.config[s].circle);
462
462
  }
463
463
  return a;
464
464
  }
465
- return V({}, this.keyframes[this.keyframes.length - 1].value);
466
- }, h.prototype.getProgressVelocity = function(o) {
465
+ return z({}, this.keyframes[this.keyframes.length - 1].value);
466
+ }, f.prototype.getProgressVelocity = function(o) {
467
467
  var e = o - this.startTime;
468
- return e >= this.duration ? 0 : kn(1, this.startVelocity, this.duration, e);
469
- }, h.prototype.update = function(o) {
468
+ return e >= this.duration ? 0 : In(1, this.startVelocity, this.duration, e);
469
+ }, f.prototype.update = function(o) {
470
470
  return this.ended ? !0 : (this.progress = Math.min(1, Math.max(0, this.progress, this.getProgress(o))), this.value = this.getValue(this.progress), this.ended = this.progress >= 1, this.ended && this.callbacks && (this.callbacks[0](), this.callbacks = void 0), this.ended);
471
- }, h.prototype.getKeyFrameSegment = function(o) {
471
+ }, f.prototype.getKeyFrameSegment = function(o) {
472
472
  for (var e = this.getProgress(o), n = 1; n < this.keyframes.length; n++)
473
473
  if (this.keyframes[n].progress > e)
474
474
  return [this.keyframes[n - 1], this.keyframes[n]];
475
475
  return [this.keyframes[this.keyframes.length - 2], this.keyframes[this.keyframes.length - 1]];
476
- }, h.prototype.getTargetKeyframe = function() {
476
+ }, f.prototype.getTargetKeyframe = function() {
477
477
  return this.keyframes[this.keyframes.length - 1];
478
- }, h.prototype.set = function(o, e, n, t) {
478
+ }, f.prototype.set = function(o, e, n, t) {
479
479
  var a;
480
480
  n === void 0 && (n = 0), isNaN(e) && (e = 0), isNaN(n) && (n = 0), t = t != null ? t : Et();
481
- var s = this.getProgress(t), l = this.getValue(s), f = {};
481
+ var s = this.getProgress(t), l = this.getValue(s), h = {};
482
482
  for (var c in this.config)
483
- f[c] = (a = o[c]) !== null && a !== void 0 ? a : l[c];
483
+ h[c] = (a = o[c]) !== null && a !== void 0 ? a : l[c];
484
484
  var g = [
485
485
  { progress: 0, value: l },
486
- { progress: 1, value: f }
486
+ { progress: 1, value: h }
487
487
  ];
488
488
  return this.setKeyframes(g, e, n, t);
489
- }, h.prototype.setKeyframes = function(o, e, n, t) {
489
+ }, f.prototype.setKeyframes = function(o, e, n, t) {
490
490
  var a = this;
491
491
  if (n === void 0 && (n = 0), o.length < 2)
492
492
  throw new Error("keyframes invalid.");
493
493
  return isNaN(e) && (e = 0), isNaN(n) && (n = 0), this.callbacks && (this.callbacks[1](new Error("motion aborted.")), this.callbacks = void 0), new Promise(function(s, l) {
494
- t = t != null ? t : Et(), a.progress = 0, a.ended = !1, a.startTime = t, a.startVelocity = n, a.keyframes = o, a.duration = e, e === 0 ? (a.progress = 1, a.value = V({}, o[o.length - 1].value)) : a.value = V({}, o[0].value), a.callbacks = [s, l];
494
+ t = t != null ? t : Et(), a.progress = 0, a.ended = !1, a.startTime = t, a.startVelocity = n, a.keyframes = o, a.duration = e, e === 0 ? (a.progress = 1, a.value = z({}, o[o.length - 1].value)) : a.value = z({}, o[0].value), a.callbacks = [s, l];
495
495
  });
496
- }, h.prototype.dispose = function() {
496
+ }, f.prototype.dispose = function() {
497
497
  this.callbacks && (this.callbacks[1](new Error("motion dispose.")), this.callbacks = void 0);
498
- }, h;
498
+ }, f;
499
499
  })()
500
- ), Fn = [
500
+ ), kn = [
501
501
  { progress: 0, value: { scale: 0, opacity: 0, shadow: 2 } },
502
502
  { progress: 0.2, value: { scale: 0.5, opacity: 1, shadow: 1 } },
503
503
  { progress: 0.8, value: { scale: 2, opacity: 0, shadow: 0.5 } },
@@ -561,10 +561,10 @@ void main() {
561
561
  }
562
562
  `, Vn = (
563
563
  /** @class */
564
- (function(h) {
565
- he(o, h);
564
+ (function(f) {
565
+ he(o, f);
566
566
  function o(e, n) {
567
- var t = h.call(this, e) || this;
567
+ var t = f.call(this, e) || this;
568
568
  t.canvas = document.createElement("canvas"), t.group = new v.Group(), t.wrapper = document.createElement("div"), t.style = document.createElement("style"), t.itemMaskMesh = (function() {
569
569
  var l = new v.Mesh(new v.SphereBufferGeometry(1, 60, 40), new v.ShaderMaterial({
570
570
  vertexShader: Un,
@@ -587,19 +587,19 @@ void main() {
587
587
  }, t.onFiveWantsMoveToPano = function(l) {
588
588
  t.state.mode === "box" && t.select();
589
589
  }, t.loadPanoMask = function(l) {
590
- return Le(t, void 0, void 0, function() {
591
- var f, c, g, y, w, x, A, S, O, T;
592
- return De(this, function(b) {
593
- switch (b.label) {
590
+ return De(t, void 0, void 0, function() {
591
+ var h, c, g, w, P, T, M, x, C, b;
592
+ return Ne(this, function(y) {
593
+ switch (y.label) {
594
594
  case 0:
595
- return f = this, c = f.five, g = f.canvas, y = f.itemMaskMesh, w = f.data, x = g.getContext("2d"), A = c.observers[l], S = (T = w == null ? void 0 : w.object_mask_list.find(function(P) {
596
- return P.derived_id === String(A.derivedId);
597
- })) === null || T === void 0 ? void 0 : T.object_mask_url, S ? [4, On(S)] : [
595
+ return h = this, c = h.five, g = h.canvas, w = h.itemMaskMesh, P = h.data, T = g.getContext("2d"), M = c.observers[l], x = (b = P == null ? void 0 : P.object_mask_list.find(function(A) {
596
+ return A.derived_id === String(M.derivedId);
597
+ })) === null || b === void 0 ? void 0 : b.object_mask_url, x ? [4, Cn(x)] : [
598
598
  2
599
599
  /*return*/
600
600
  ];
601
601
  case 1:
602
- return O = b.sent(), g.width = O.width, g.height = O.height, x == null || x.drawImage(O, 0, 0, O.width, O.height), y.material.uniforms.map.value.image = O, y.material.uniforms.map.value.minFilter = v.LinearFilter, y.material.uniforms.map.value.needsUpdate = !0, y.position.copy(A.position), y.quaternion.copy(A.quaternion), c.scene.add(y), c.needsRender = !0, [
602
+ return C = y.sent(), g.width = C.width, g.height = C.height, T == null || T.drawImage(C, 0, 0, C.width, C.height), w.material.uniforms.map.value.image = C, w.material.uniforms.map.value.minFilter = v.LinearFilter, w.material.uniforms.map.value.needsUpdate = !0, w.position.copy(M.position), w.quaternion.copy(M.quaternion), c.scene.add(w), c.needsRender = !0, [
603
603
  2
604
604
  /*return*/
605
605
  ];
@@ -607,43 +607,43 @@ void main() {
607
607
  });
608
608
  });
609
609
  }, t.onFiveMouseMove = function(l) {
610
- var f;
610
+ var h;
611
611
  if (t.state.mode === "mask" && t.five.state.mode === "Panorama") {
612
- var c = t, g = c.five, y = c.itemMaskMesh, w = g.observers[g.state.panoIndex], x = (f = l.pointers[0]) === null || f === void 0 ? void 0 : f.raycaster;
613
- if (x) {
614
- var A = x.intersectObjects(t.group.children.filter(function(S) {
615
- return S.userData.visible_viewpoint.includes(String(w.derivedId));
612
+ var c = t, g = c.five, w = c.itemMaskMesh, P = g.observers[g.state.panoIndex], T = (h = l.pointers[0]) === null || h === void 0 ? void 0 : h.raycaster;
613
+ if (T) {
614
+ var M = T.intersectObjects(t.group.children.filter(function(x) {
615
+ return x.userData.visible_viewpoint.includes(String(P.derivedId));
616
616
  }), !0)[0];
617
- A ? y.material.uniforms.color.value = A.object.userData.color : y.material.uniforms.color.value = new v.Vector4(0, 0, 0, 1);
617
+ M ? w.material.uniforms.color.value = M.object.userData.color : w.material.uniforms.color.value = new v.Vector4(0, 0, 0, 1);
618
618
  }
619
619
  }
620
620
  }, t.onFiveTapGesture = function(l) {
621
- var f = t.five, c = f.observers[f.state.panoIndex];
621
+ var h = t.five, c = h.observers[h.state.panoIndex];
622
622
  if (l) {
623
- var g = l.intersectObjects(t.group.children.filter(function(x) {
624
- return x.userData.visible_viewpoint.includes(String(c.derivedId));
623
+ var g = l.intersectObjects(t.group.children.filter(function(T) {
624
+ return T.userData.visible_viewpoint.includes(String(c.derivedId));
625
625
  }), !0)[0];
626
626
  if (g) {
627
627
  t.select(g.object.name), t.stopAnimation && t.stopAnimation(), t.tapPosition = g.point, t.changeTapScreenPosition();
628
- var y = new Kt({
628
+ var w = new Kt({
629
629
  opacity: 0,
630
630
  scale: 0,
631
631
  shadow: 2
632
- }), w = new Kt({
632
+ }), P = new Kt({
633
633
  opacity: 0,
634
634
  scale: 0,
635
635
  shadow: 2
636
636
  });
637
- return y.setKeyframes(Fn, 1e3), w.setKeyframes(Bn, 1e3), t.stopAnimation = ct.shared.add(function(x, A) {
638
- var S, O = y.update(x), T = w.update(x);
639
- t.wrapper.firstChild.style.opacity = "".concat(y.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(y.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(y.value.shadow, "px #fff"), t.wrapper.lastChild.style.opacity = "".concat(w.value.opacity), t.wrapper.lastChild.style.transform = "scale(".concat(w.value.scale, ")"), t.wrapper.lastChild.style.boxShadow = "0 0 0 ".concat(w.value.shadow, "px #fff"), O && T && ((S = t.stopAnimation) === null || S === void 0 || S.call(t), t.stopAnimation = void 0, f.getElement().parentElement.removeChild(t.wrapper));
640
- }, !1, 0, 10), f.getElement().parentElement.appendChild(t.wrapper), !1;
637
+ return w.setKeyframes(kn, 1e3), P.setKeyframes(Bn, 1e3), t.stopAnimation = ct.shared.add(function(T, M) {
638
+ var x, C = w.update(T), b = P.update(T);
639
+ t.wrapper.firstChild.style.opacity = "".concat(w.value.opacity), t.wrapper.firstChild.style.transform = "scale(".concat(w.value.scale, ")"), t.wrapper.firstChild.style.boxShadow = "0 0 0 ".concat(w.value.shadow, "px #fff"), t.wrapper.lastChild.style.opacity = "".concat(P.value.opacity), t.wrapper.lastChild.style.transform = "scale(".concat(P.value.scale, ")"), t.wrapper.lastChild.style.boxShadow = "0 0 0 ".concat(P.value.shadow, "px #fff"), C && b && ((x = t.stopAnimation) === null || x === void 0 || x.call(t), t.stopAnimation = void 0, h.getElement().parentElement.removeChild(t.wrapper));
640
+ }, !1, 0, 10), h.getElement().parentElement.appendChild(t.wrapper), !1;
641
641
  }
642
642
  }
643
643
  }, t.changeTapScreenPosition = function() {
644
644
  if (t.tapPosition) {
645
- var l = t.tapPosition.clone().project(t.five.camera), f = (l.x + 1) / 2, c = -(l.y - 1) / 2;
646
- t.wrapper.style.opacity = l.z > 0 && l.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(f * 100, "%, ").concat(c * 100, "%)");
645
+ var l = t.tapPosition.clone().project(t.five.camera), h = (l.x + 1) / 2, c = -(l.y - 1) / 2;
646
+ t.wrapper.style.opacity = l.z > 0 && l.z < 1 ? "1" : "0", t.wrapper.style.transform = "translate(".concat(h * 100, "%, ").concat(c * 100, "%)");
647
647
  }
648
648
  }, t.onFiveCameraUpdate = function(l) {
649
649
  t.changeTapScreenPosition();
@@ -658,7 +658,7 @@ void main() {
658
658
  selectAll: !1
659
659
  };
660
660
  t.state = Object.assign(a, n == null ? void 0 : n.initialState);
661
- var s = V({}, n == null ? void 0 : n.config);
661
+ var s = z({}, n == null ? void 0 : n.config);
662
662
  return t._config = s, t.group.rotateX(Math.PI), t.wrapper.className = "ItemMaskPlugin", t.wrapper.innerHTML = '<span class="ItemMaskPluginCircle"></span><span class="ItemMaskPluginCircle"></span>', t.style.innerHTML = `
663
663
  .ItemMaskPlugin {
664
664
  position: absolute;
@@ -681,23 +681,23 @@ void main() {
681
681
  }
682
682
  return Object.defineProperty(o.prototype, "config", {
683
683
  get: function() {
684
- return V({}, this._config);
684
+ return z({}, this._config);
685
685
  },
686
686
  enumerable: !1,
687
687
  configurable: !0
688
688
  }), o.prototype.updateState = function(e, n) {
689
689
  var t = this.state;
690
- this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
690
+ this.state = z(z({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
691
691
  }, o.prototype.load = function(e) {
692
- return Le(this, void 0, void 0, function() {
692
+ return De(this, void 0, void 0, function() {
693
693
  var n, t, a = this;
694
- return De(this, function(s) {
694
+ return Ne(this, function(s) {
695
695
  return this.data = e, n = e.data_list.map(function(l) {
696
- var f, c = l.position.end.map(function(C) {
697
- return Number(C);
698
- }), g = l.position.start.map(function(C) {
699
- return Number(C);
700
- }), y = Math.abs(c[0] - g[0]), w = Math.abs(c[1] - g[1]), x = Math.abs(c[2] - g[2]), A = c[0] / 2 + g[0] / 2, S = c[1] / 2 + g[1] / 2, O = c[2] / 2 + g[2] / 2, T = new v.Vector3(A, S, O), b = new v.BoxBufferGeometry(y, w, x), P = new v.ShaderMaterial({
696
+ var h, c = l.position.end.map(function(_) {
697
+ return Number(_);
698
+ }), g = l.position.start.map(function(_) {
699
+ return Number(_);
700
+ }), w = Math.abs(c[0] - g[0]), P = Math.abs(c[1] - g[1]), T = Math.abs(c[2] - g[2]), M = c[0] / 2 + g[0] / 2, x = c[1] / 2 + g[1] / 2, C = c[2] / 2 + g[2] / 2, b = new v.Vector3(M, x, C), y = new v.BoxBufferGeometry(w, P, T), A = new v.ShaderMaterial({
701
701
  vertexShader: `
702
702
  varying vec2 vUv;
703
703
  void main() {
@@ -733,9 +733,9 @@ void main() {
733
733
  depthWrite: !1,
734
734
  depthTest: !1,
735
735
  transparent: !0
736
- }), m = new v.Mesh(b, P);
737
- return m.position.copy(T), m.name = "".concat(l.category_name).concat(l.index), m.userData.color = new ((f = v.Vector4).bind.apply(f, qt(qt([void 0], l.mask_color.map(function(C) {
738
- return C / 255;
736
+ }), m = new v.Mesh(y, A);
737
+ return m.position.copy(b), m.name = "".concat(l.category_name).concat(l.index), m.userData.color = new ((h = v.Vector4).bind.apply(h, qt(qt([void 0], l.mask_color.map(function(_) {
738
+ return _ / 255;
739
739
  }).reverse(), !1), [1], !1)))(), m.userData.visible_viewpoint = Object.keys(l.visible_viewpoint), m;
740
740
  }), (t = this.group).add.apply(t, n), [
741
741
  2
@@ -781,23 +781,23 @@ void main() {
781
781
  }
782
782
  }, o;
783
783
  })(Xe.Controller)
784
- ), tr = function(h, o) {
785
- return new Vn(h, o);
784
+ ), tr = function(f, o) {
785
+ return new Vn(f, o);
786
786
  };
787
787
  /*! Hammer.JS - v2.0.7 - 2016-04-22
788
788
  * http://hammerjs.github.io/
789
789
  *
790
790
  * Copyright (c) 2016 Jorik Tangelder;
791
791
  * Licensed under the MIT license */
792
- var Tt = (function(h, o, e, n) {
793
- var t = ["", "webkit", "Moz", "MS", "ms", "o"], a = o.createElement ? o.createElement("div") : n, s = "function", l = Math.round, f = Math.abs, c = Date.now;
792
+ var Tt = (function(f, o, e, n) {
793
+ var t = ["", "webkit", "Moz", "MS", "ms", "o"], a = o.createElement ? o.createElement("div") : n, s = "function", l = Math.round, h = Math.abs, c = Date.now;
794
794
  function g(r, i, u) {
795
- return setTimeout(b(r, u), i);
796
- }
797
- function y(r, i, u) {
798
- return Array.isArray(r) ? (w(r, u[i], u), !0) : !1;
795
+ return setTimeout(y(r, u), i);
799
796
  }
800
797
  function w(r, i, u) {
798
+ return Array.isArray(r) ? (P(r, u[i], u), !0) : !1;
799
+ }
800
+ function P(r, i, u) {
801
801
  var p;
802
802
  if (r)
803
803
  if (r.forEach)
@@ -809,60 +809,60 @@ var Tt = (function(h, o, e, n) {
809
809
  for (p in r)
810
810
  r.hasOwnProperty(p) && i.call(u, r[p], p, r);
811
811
  }
812
- function x(r, i, u) {
812
+ function T(r, i, u) {
813
813
  var p = "DEPRECATED METHOD: " + i + `
814
814
  ` + u + ` AT
815
815
  `;
816
816
  return function() {
817
- var E = new Error("get-stack-trace"), M = E && E.stack ? E.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", k = h.console && (h.console.warn || h.console.log);
818
- return k && k.call(h.console, p, M), r.apply(this, arguments);
817
+ var E = new Error("get-stack-trace"), O = E && E.stack ? E.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", N = f.console && (f.console.warn || f.console.log);
818
+ return N && N.call(f.console, p, O), r.apply(this, arguments);
819
819
  };
820
820
  }
821
- var A;
822
- typeof Object.assign != "function" ? A = function(i) {
821
+ var M;
822
+ typeof Object.assign != "function" ? M = function(i) {
823
823
  if (i === n || i === null)
824
824
  throw new TypeError("Cannot convert undefined or null to object");
825
825
  for (var u = Object(i), p = 1; p < arguments.length; p++) {
826
826
  var E = arguments[p];
827
827
  if (E !== n && E !== null)
828
- for (var M in E)
829
- E.hasOwnProperty(M) && (u[M] = E[M]);
828
+ for (var O in E)
829
+ E.hasOwnProperty(O) && (u[O] = E[O]);
830
830
  }
831
831
  return u;
832
- } : A = Object.assign;
833
- var S = x(function(i, u, p) {
834
- for (var E = Object.keys(u), M = 0; M < E.length; )
835
- (!p || p && i[E[M]] === n) && (i[E[M]] = u[E[M]]), M++;
832
+ } : M = Object.assign;
833
+ var x = T(function(i, u, p) {
834
+ for (var E = Object.keys(u), O = 0; O < E.length; )
835
+ (!p || p && i[E[O]] === n) && (i[E[O]] = u[E[O]]), O++;
836
836
  return i;
837
- }, "extend", "Use `assign`."), O = x(function(i, u) {
838
- return S(i, u, !0);
837
+ }, "extend", "Use `assign`."), C = T(function(i, u) {
838
+ return x(i, u, !0);
839
839
  }, "merge", "Use `assign`.");
840
- function T(r, i, u) {
840
+ function b(r, i, u) {
841
841
  var p = i.prototype, E;
842
- E = r.prototype = Object.create(p), E.constructor = r, E._super = p, u && A(E, u);
842
+ E = r.prototype = Object.create(p), E.constructor = r, E._super = p, u && M(E, u);
843
843
  }
844
- function b(r, i) {
844
+ function y(r, i) {
845
845
  return function() {
846
846
  return r.apply(i, arguments);
847
847
  };
848
848
  }
849
- function P(r, i) {
849
+ function A(r, i) {
850
850
  return typeof r == s ? r.apply(i && i[0] || n, i) : r;
851
851
  }
852
852
  function m(r, i) {
853
853
  return r === n ? i : r;
854
854
  }
855
- function C(r, i, u) {
856
- w(U(i), function(p) {
855
+ function _(r, i, u) {
856
+ P(W(i), function(p) {
857
857
  r.addEventListener(p, u, !1);
858
858
  });
859
859
  }
860
- function _(r, i, u) {
861
- w(U(i), function(p) {
860
+ function S(r, i, u) {
861
+ P(W(i), function(p) {
862
862
  r.removeEventListener(p, u, !1);
863
863
  });
864
864
  }
865
- function H(r, i) {
865
+ function U(r, i) {
866
866
  for (; r; ) {
867
867
  if (r == i)
868
868
  return !0;
@@ -870,13 +870,13 @@ var Tt = (function(h, o, e, n) {
870
870
  }
871
871
  return !1;
872
872
  }
873
- function G(r, i) {
873
+ function R(r, i) {
874
874
  return r.indexOf(i) > -1;
875
875
  }
876
- function U(r) {
876
+ function W(r) {
877
877
  return r.trim().split(/\s+/g);
878
878
  }
879
- function Q(r, i, u) {
879
+ function Z(r, i, u) {
880
880
  if (r.indexOf && !u)
881
881
  return r.indexOf(i);
882
882
  for (var p = 0; p < r.length; ) {
@@ -886,42 +886,42 @@ var Tt = (function(h, o, e, n) {
886
886
  }
887
887
  return -1;
888
888
  }
889
- function oe(r) {
889
+ function X(r) {
890
890
  return Array.prototype.slice.call(r, 0);
891
891
  }
892
- function le(r, i, u) {
893
- for (var p = [], E = [], M = 0; M < r.length; ) {
894
- var k = r[M][i];
895
- Q(E, k) < 0 && p.push(r[M]), E[M] = k, M++;
892
+ function oe(r, i, u) {
893
+ for (var p = [], E = [], O = 0; O < r.length; ) {
894
+ var N = r[O][i];
895
+ Z(E, N) < 0 && p.push(r[O]), E[O] = N, O++;
896
896
  }
897
- return p = p.sort(function(ce, $) {
898
- return ce[i] > $[i];
897
+ return p = p.sort(function(ce, ee) {
898
+ return ce[i] > ee[i];
899
899
  }), p;
900
900
  }
901
- function J(r, i) {
902
- for (var u, p, E = i[0].toUpperCase() + i.slice(1), M = 0; M < t.length; ) {
903
- if (u = t[M], p = u ? u + E : i, p in r)
901
+ function H(r, i) {
902
+ for (var u, p, E = i[0].toUpperCase() + i.slice(1), O = 0; O < t.length; ) {
903
+ if (u = t[O], p = u ? u + E : i, p in r)
904
904
  return p;
905
- M++;
905
+ O++;
906
906
  }
907
907
  return n;
908
908
  }
909
- var Z = 1;
910
- function D() {
911
- return Z++;
909
+ var q = 1;
910
+ function I() {
911
+ return q++;
912
912
  }
913
- function I(r) {
913
+ function F(r) {
914
914
  var i = r.ownerDocument || r;
915
- return i.defaultView || i.parentWindow || h;
915
+ return i.defaultView || i.parentWindow || f;
916
916
  }
917
- var N = /mobile|tablet|ip(ad|hone|od)|android/i, B = "ontouchstart" in h, Y = J(h, "PointerEvent") !== n, ae = B && N.test(navigator.userAgent), X = "touch", R = "pen", ee = "mouse", j = "kinect", z = 25, L = 1, ie = 2, W = 4, q = 8, Ce = 1, Pe = 2, Oe = 4, Ie = 8, Ae = 16, ue = Pe | Oe, de = Ie | Ae, Ue = ue | de, Re = ["x", "y"], Ne = ["clientX", "clientY"];
918
- function se(r, i) {
917
+ var L = /mobile|tablet|ip(ad|hone|od)|android/i, D = "ontouchstart" in f, G = H(f, "PointerEvent") !== n, re = D && L.test(navigator.userAgent), Q = "touch", V = "pen", te = "mouse", Y = "kinect", j = 25, k = 1, se = 2, K = 4, J = 8, Oe = 1, Me = 2, Ce = 4, Le = 8, Ae = 16, ue = Me | Ce, de = Le | Ae, Ue = ue | de, Re = ["x", "y"], Fe = ["clientX", "clientY"];
918
+ function le(r, i) {
919
919
  var u = this;
920
920
  this.manager = r, this.callback = i, this.element = r.element, this.target = r.options.inputTarget, this.domHandler = function(p) {
921
- P(r.options.enable, [r]) && u.handler(p);
921
+ A(r.options.enable, [r]) && u.handler(p);
922
922
  }, this.init();
923
923
  }
924
- se.prototype = {
924
+ le.prototype = {
925
925
  /**
926
926
  * should handle the inputEvent data and trigger the callback
927
927
  * @virtual
@@ -932,53 +932,53 @@ var Tt = (function(h, o, e, n) {
932
932
  * bind the events
933
933
  */
934
934
  init: function() {
935
- this.evEl && C(this.element, this.evEl, this.domHandler), this.evTarget && C(this.target, this.evTarget, this.domHandler), this.evWin && C(I(this.element), this.evWin, this.domHandler);
935
+ this.evEl && _(this.element, this.evEl, this.domHandler), this.evTarget && _(this.target, this.evTarget, this.domHandler), this.evWin && _(F(this.element), this.evWin, this.domHandler);
936
936
  },
937
937
  /**
938
938
  * unbind the events
939
939
  */
940
940
  destroy: function() {
941
- this.evEl && _(this.element, this.evEl, this.domHandler), this.evTarget && _(this.target, this.evTarget, this.domHandler), this.evWin && _(I(this.element), this.evWin, this.domHandler);
941
+ this.evEl && S(this.element, this.evEl, this.domHandler), this.evTarget && S(this.target, this.evTarget, this.domHandler), this.evWin && S(F(this.element), this.evWin, this.domHandler);
942
942
  }
943
943
  };
944
944
  function Ke(r) {
945
945
  var i, u = r.options.inputClass;
946
- return u ? i = u : Y ? i = ht : ae ? i = $e : B ? i = dt : i = Je, new i(r, Ze);
946
+ return u ? i = u : G ? i = ht : re ? i = $e : D ? i = dt : i = Je, new i(r, Ze);
947
947
  }
948
948
  function Ze(r, i, u) {
949
- var p = u.pointers.length, E = u.changedPointers.length, M = i & L && p - E === 0, k = i & (W | q) && p - E === 0;
950
- u.isFirst = !!M, u.isFinal = !!k, M && (r.session = {}), u.eventType = i, d(r, u), r.emit("hammer.input", u), r.recognize(u), r.session.prevInput = u;
949
+ var p = u.pointers.length, E = u.changedPointers.length, O = i & k && p - E === 0, N = i & (K | J) && p - E === 0;
950
+ u.isFirst = !!O, u.isFinal = !!N, O && (r.session = {}), u.eventType = i, d(r, u), r.emit("hammer.input", u), r.recognize(u), r.session.prevInput = u;
951
951
  }
952
952
  function d(r, i) {
953
953
  var u = r.session, p = i.pointers, E = p.length;
954
- u.firstInput || (u.firstInput = te(i)), E > 1 && !u.firstMultiple ? u.firstMultiple = te(i) : E === 1 && (u.firstMultiple = !1);
955
- var M = u.firstInput, k = u.firstMultiple, ne = k ? k.center : M.center, ce = i.center = ve(p);
956
- i.timeStamp = c(), i.deltaTime = i.timeStamp - M.timeStamp, i.angle = ft(ne, ce), i.distance = Qe(ne, ce), F(u, i), i.offsetDirection = be(i.deltaX, i.deltaY);
957
- var $ = Ve(i.deltaTime, i.deltaX, i.deltaY);
958
- i.overallVelocityX = $.x, i.overallVelocityY = $.y, i.overallVelocity = f($.x) > f($.y) ? $.x : $.y, i.scale = k ? an(k.pointers, p) : 1, i.rotation = k ? rn(k.pointers, p) : 0, i.maxPointers = u.prevInput ? i.pointers.length > u.prevInput.maxPointers ? i.pointers.length : u.prevInput.maxPointers : i.pointers.length, K(u, i);
954
+ u.firstInput || (u.firstInput = ne(i)), E > 1 && !u.firstMultiple ? u.firstMultiple = ne(i) : E === 1 && (u.firstMultiple = !1);
955
+ var O = u.firstInput, N = u.firstMultiple, ae = N ? N.center : O.center, ce = i.center = pe(p);
956
+ i.timeStamp = c(), i.deltaTime = i.timeStamp - O.timeStamp, i.angle = ft(ae, ce), i.distance = Qe(ae, ce), B(u, i), i.offsetDirection = be(i.deltaX, i.deltaY);
957
+ var ee = Ve(i.deltaTime, i.deltaX, i.deltaY);
958
+ i.overallVelocityX = ee.x, i.overallVelocityY = ee.y, i.overallVelocity = h(ee.x) > h(ee.y) ? ee.x : ee.y, i.scale = N ? an(N.pointers, p) : 1, i.rotation = N ? rn(N.pointers, p) : 0, i.maxPointers = u.prevInput ? i.pointers.length > u.prevInput.maxPointers ? i.pointers.length : u.prevInput.maxPointers : i.pointers.length, $(u, i);
959
959
  var ge = r.element;
960
- H(i.srcEvent.target, ge) && (ge = i.srcEvent.target), i.target = ge;
960
+ U(i.srcEvent.target, ge) && (ge = i.srcEvent.target), i.target = ge;
961
961
  }
962
- function F(r, i) {
963
- var u = i.center, p = r.offsetDelta || {}, E = r.prevDelta || {}, M = r.prevInput || {};
964
- (i.eventType === L || M.eventType === W) && (E = r.prevDelta = {
965
- x: M.deltaX || 0,
966
- y: M.deltaY || 0
962
+ function B(r, i) {
963
+ var u = i.center, p = r.offsetDelta || {}, E = r.prevDelta || {}, O = r.prevInput || {};
964
+ (i.eventType === k || O.eventType === K) && (E = r.prevDelta = {
965
+ x: O.deltaX || 0,
966
+ y: O.deltaY || 0
967
967
  }, p = r.offsetDelta = {
968
968
  x: u.x,
969
969
  y: u.y
970
970
  }), i.deltaX = E.x + (u.x - p.x), i.deltaY = E.y + (u.y - p.y);
971
971
  }
972
- function K(r, i) {
973
- var u = r.lastInterval || i, p = i.timeStamp - u.timeStamp, E, M, k, ne;
974
- if (i.eventType != q && (p > z || u.velocity === n)) {
975
- var ce = i.deltaX - u.deltaX, $ = i.deltaY - u.deltaY, ge = Ve(p, ce, $);
976
- M = ge.x, k = ge.y, E = f(ge.x) > f(ge.y) ? ge.x : ge.y, ne = be(ce, $), r.lastInterval = i;
972
+ function $(r, i) {
973
+ var u = r.lastInterval || i, p = i.timeStamp - u.timeStamp, E, O, N, ae;
974
+ if (i.eventType != J && (p > j || u.velocity === n)) {
975
+ var ce = i.deltaX - u.deltaX, ee = i.deltaY - u.deltaY, ge = Ve(p, ce, ee);
976
+ O = ge.x, N = ge.y, E = h(ge.x) > h(ge.y) ? ge.x : ge.y, ae = be(ce, ee), r.lastInterval = i;
977
977
  } else
978
- E = u.velocity, M = u.velocityX, k = u.velocityY, ne = u.direction;
979
- i.velocity = E, i.velocityX = M, i.velocityY = k, i.direction = ne;
978
+ E = u.velocity, O = u.velocityX, N = u.velocityY, ae = u.direction;
979
+ i.velocity = E, i.velocityX = O, i.velocityY = N, i.direction = ae;
980
980
  }
981
- function te(r) {
981
+ function ne(r) {
982
982
  for (var i = [], u = 0; u < r.pointers.length; )
983
983
  i[u] = {
984
984
  clientX: l(r.pointers[u].clientX),
@@ -987,12 +987,12 @@ var Tt = (function(h, o, e, n) {
987
987
  return {
988
988
  timeStamp: c(),
989
989
  pointers: i,
990
- center: ve(i),
990
+ center: pe(i),
991
991
  deltaX: r.deltaX,
992
992
  deltaY: r.deltaY
993
993
  };
994
994
  }
995
- function ve(r) {
995
+ function pe(r) {
996
996
  var i = r.length;
997
997
  if (i === 1)
998
998
  return {
@@ -1013,7 +1013,7 @@ var Tt = (function(h, o, e, n) {
1013
1013
  };
1014
1014
  }
1015
1015
  function be(r, i) {
1016
- return r === i ? Ce : f(r) >= f(i) ? r < 0 ? Pe : Oe : i < 0 ? Ie : Ae;
1016
+ return r === i ? Oe : h(r) >= h(i) ? r < 0 ? Me : Ce : i < 0 ? Le : Ae;
1017
1017
  }
1018
1018
  function Qe(r, i, u) {
1019
1019
  u || (u = Re);
@@ -1026,139 +1026,139 @@ var Tt = (function(h, o, e, n) {
1026
1026
  return Math.atan2(E, p) * 180 / Math.PI;
1027
1027
  }
1028
1028
  function rn(r, i) {
1029
- return ft(i[1], i[0], Ne) + ft(r[1], r[0], Ne);
1029
+ return ft(i[1], i[0], Fe) + ft(r[1], r[0], Fe);
1030
1030
  }
1031
1031
  function an(r, i) {
1032
- return Qe(i[0], i[1], Ne) / Qe(r[0], r[1], Ne);
1032
+ return Qe(i[0], i[1], Fe) / Qe(r[0], r[1], Fe);
1033
1033
  }
1034
1034
  var on = {
1035
- mousedown: L,
1036
- mousemove: ie,
1037
- mouseup: W
1035
+ mousedown: k,
1036
+ mousemove: se,
1037
+ mouseup: K
1038
1038
  }, sn = "mousedown", ln = "mousemove mouseup";
1039
1039
  function Je() {
1040
- this.evEl = sn, this.evWin = ln, this.pressed = !1, se.apply(this, arguments);
1040
+ this.evEl = sn, this.evWin = ln, this.pressed = !1, le.apply(this, arguments);
1041
1041
  }
1042
- T(Je, se, {
1042
+ b(Je, le, {
1043
1043
  /**
1044
1044
  * handle mouse events
1045
1045
  * @param {Object} ev
1046
1046
  */
1047
1047
  handler: function(i) {
1048
1048
  var u = on[i.type];
1049
- u & L && (i.button === 0 || i.button === 2) && (this.pressed = !0), u & ie && i.which !== 1 && (u = W), this.pressed && (u & W && (this.pressed = !1), this.callback(this.manager, u, {
1049
+ u & k && (i.button === 0 || i.button === 2) && (this.pressed = !0), u & se && i.which !== 1 && (u = K), this.pressed && (u & K && (this.pressed = !1), this.callback(this.manager, u, {
1050
1050
  pointers: [i],
1051
1051
  changedPointers: [i],
1052
- pointerType: ee,
1052
+ pointerType: te,
1053
1053
  srcEvent: i
1054
1054
  }));
1055
1055
  }
1056
1056
  });
1057
- var Nt = {
1058
- pointerdown: L,
1059
- pointermove: ie,
1060
- pointerup: W,
1061
- pointercancel: q,
1062
- pointerout: q
1057
+ var Ft = {
1058
+ pointerdown: k,
1059
+ pointermove: se,
1060
+ pointerup: K,
1061
+ pointercancel: J,
1062
+ pointerout: J
1063
1063
  }, un = {
1064
- 2: X,
1065
- 3: R,
1066
- 4: ee,
1067
- 5: j
1064
+ 2: Q,
1065
+ 3: V,
1066
+ 4: te,
1067
+ 5: Y
1068
1068
  // see https://twitter.com/jacobrossi/status/480596438489890816
1069
- }, kt = "pointerdown", Lt = "pointermove pointerup pointercancel";
1070
- h.MSPointerEvent && !h.PointerEvent && (kt = "MSPointerDown", Lt = "MSPointerMove MSPointerUp MSPointerCancel");
1069
+ }, It = "pointerdown", Dt = "pointermove pointerup pointercancel";
1070
+ f.MSPointerEvent && !f.PointerEvent && (It = "MSPointerDown", Dt = "MSPointerMove MSPointerUp MSPointerCancel");
1071
1071
  function ht() {
1072
- this.evEl = kt, this.evWin = Lt, se.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
1072
+ this.evEl = It, this.evWin = Dt, le.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
1073
1073
  }
1074
- T(ht, se, {
1074
+ b(ht, le, {
1075
1075
  /**
1076
1076
  * handle mouse events
1077
1077
  * @param {Object} ev
1078
1078
  */
1079
1079
  handler: function(i) {
1080
- var u = this.store, p = !1, E = !1, M = i.type.toLowerCase().replace("ms", ""), k = Nt[M], ne = un[i.pointerType] || i.pointerType, ce = ne == X, $ = Q(u, i.pointerId, "pointerId");
1081
- k & L && (i.button === 0 || i.button === 2 || ce) ? $ < 0 && (u.push(i), $ = u.length - 1) : k & (W | q) ? p = !0 : !ce && i.buttons === 0 && (p = !0, E = !0, k = Nt.pointerup), !($ < 0) && (E || (u[$] = i), this.callback(this.manager, k, {
1080
+ var u = this.store, p = !1, E = !1, O = i.type.toLowerCase().replace("ms", ""), N = Ft[O], ae = un[i.pointerType] || i.pointerType, ce = ae == Q, ee = Z(u, i.pointerId, "pointerId");
1081
+ N & k && (i.button === 0 || i.button === 2 || ce) ? ee < 0 && (u.push(i), ee = u.length - 1) : N & (K | J) ? p = !0 : !ce && i.buttons === 0 && (p = !0, E = !0, N = Ft.pointerup), !(ee < 0) && (E || (u[ee] = i), this.callback(this.manager, N, {
1082
1082
  pointers: u,
1083
1083
  changedPointers: [i],
1084
- pointerType: ne,
1085
- srcEvent: u[$]
1086
- }), p && u.splice($, 1));
1084
+ pointerType: ae,
1085
+ srcEvent: u[ee]
1086
+ }), p && u.splice(ee, 1));
1087
1087
  }
1088
1088
  });
1089
1089
  var cn = {
1090
- touchstart: L,
1091
- touchmove: ie,
1092
- touchend: W,
1093
- touchcancel: q
1090
+ touchstart: k,
1091
+ touchmove: se,
1092
+ touchend: K,
1093
+ touchcancel: J
1094
1094
  }, fn = "touchstart", hn = "touchstart touchmove touchend touchcancel";
1095
- function Dt() {
1096
- this.evTarget = fn, this.evWin = hn, this.started = !1, se.apply(this, arguments);
1095
+ function Nt() {
1096
+ this.evTarget = fn, this.evWin = hn, this.started = !1, le.apply(this, arguments);
1097
1097
  }
1098
- T(Dt, se, {
1098
+ b(Nt, le, {
1099
1099
  handler: function(i) {
1100
1100
  var u = cn[i.type];
1101
- if (u === L && (this.started = !0), !!this.started) {
1101
+ if (u === k && (this.started = !0), !!this.started) {
1102
1102
  var p = dn.call(this, i, u);
1103
- u & (W | q) && p[0].length - p[1].length === 0 && (this.started = !1), this.callback(this.manager, u, {
1103
+ u & (K | J) && p[0].length - p[1].length === 0 && (this.started = !1), this.callback(this.manager, u, {
1104
1104
  pointers: p[0],
1105
1105
  changedPointers: p[1],
1106
- pointerType: X,
1106
+ pointerType: Q,
1107
1107
  srcEvent: i
1108
1108
  });
1109
1109
  }
1110
1110
  }
1111
1111
  });
1112
1112
  function dn(r, i) {
1113
- var u = oe(r.touches), p = oe(r.changedTouches);
1114
- return i & (W | q) && (u = le(u.concat(p), "identifier")), [u, p];
1115
- }
1116
- var pn = {
1117
- touchstart: L,
1118
- touchmove: ie,
1119
- touchend: W,
1120
- touchcancel: q
1121
- }, vn = "touchstart touchmove touchend touchcancel";
1113
+ var u = X(r.touches), p = X(r.changedTouches);
1114
+ return i & (K | J) && (u = oe(u.concat(p), "identifier")), [u, p];
1115
+ }
1116
+ var vn = {
1117
+ touchstart: k,
1118
+ touchmove: se,
1119
+ touchend: K,
1120
+ touchcancel: J
1121
+ }, pn = "touchstart touchmove touchend touchcancel";
1122
1122
  function $e() {
1123
- this.evTarget = vn, this.targetIds = {}, se.apply(this, arguments);
1123
+ this.evTarget = pn, this.targetIds = {}, le.apply(this, arguments);
1124
1124
  }
1125
- T($e, se, {
1125
+ b($e, le, {
1126
1126
  handler: function(i) {
1127
- var u = pn[i.type], p = mn.call(this, i, u);
1127
+ var u = vn[i.type], p = mn.call(this, i, u);
1128
1128
  p && this.callback(this.manager, u, {
1129
1129
  pointers: p[0],
1130
1130
  changedPointers: p[1],
1131
- pointerType: X,
1131
+ pointerType: Q,
1132
1132
  srcEvent: i
1133
1133
  });
1134
1134
  }
1135
1135
  });
1136
1136
  function mn(r, i) {
1137
- var u = oe(r.touches), p = this.targetIds;
1138
- if (i & (L | ie) && u.length === 1)
1137
+ var u = X(r.touches), p = this.targetIds;
1138
+ if (i & (k | se) && u.length === 1)
1139
1139
  return p[u[0].identifier] = !0, [u, u];
1140
- var E, M, k = oe(r.changedTouches), ne = [], ce = this.target;
1141
- if (M = u.filter(function($) {
1142
- return H($.target, ce);
1143
- }), i === L)
1144
- for (E = 0; E < M.length; )
1145
- p[M[E].identifier] = !0, E++;
1146
- for (E = 0; E < k.length; )
1147
- p[k[E].identifier] && ne.push(k[E]), i & (W | q) && delete p[k[E].identifier], E++;
1148
- if (ne.length)
1140
+ var E, O, N = X(r.changedTouches), ae = [], ce = this.target;
1141
+ if (O = u.filter(function(ee) {
1142
+ return U(ee.target, ce);
1143
+ }), i === k)
1144
+ for (E = 0; E < O.length; )
1145
+ p[O[E].identifier] = !0, E++;
1146
+ for (E = 0; E < N.length; )
1147
+ p[N[E].identifier] && ae.push(N[E]), i & (K | J) && delete p[N[E].identifier], E++;
1148
+ if (ae.length)
1149
1149
  return [
1150
1150
  // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
1151
- le(M.concat(ne), "identifier"),
1152
- ne
1151
+ oe(O.concat(ae), "identifier"),
1152
+ ae
1153
1153
  ];
1154
1154
  }
1155
- var gn = 2500, Ft = 25;
1155
+ var gn = 2500, kt = 25;
1156
1156
  function dt() {
1157
- se.apply(this, arguments);
1158
- var r = b(this.handler, this);
1157
+ le.apply(this, arguments);
1158
+ var r = y(this.handler, this);
1159
1159
  this.touch = new $e(this.manager, r), this.mouse = new Je(this.manager, r), this.primaryTouch = null, this.lastTouches = [];
1160
1160
  }
1161
- T(dt, se, {
1161
+ b(dt, le, {
1162
1162
  /**
1163
1163
  * handle mouse and touch events
1164
1164
  * @param {Hammer} manager
@@ -1166,11 +1166,11 @@ var Tt = (function(h, o, e, n) {
1166
1166
  * @param {Object} inputData
1167
1167
  */
1168
1168
  handler: function(i, u, p) {
1169
- var E = p.pointerType == X, M = p.pointerType == ee;
1170
- if (!(M && p.sourceCapabilities && p.sourceCapabilities.firesTouchEvents)) {
1169
+ var E = p.pointerType == Q, O = p.pointerType == te;
1170
+ if (!(O && p.sourceCapabilities && p.sourceCapabilities.firesTouchEvents)) {
1171
1171
  if (E)
1172
1172
  yn.call(this, u, p);
1173
- else if (M && bn.call(this, p))
1173
+ else if (O && bn.call(this, p))
1174
1174
  return;
1175
1175
  this.callback(i, u, p);
1176
1176
  }
@@ -1183,7 +1183,7 @@ var Tt = (function(h, o, e, n) {
1183
1183
  }
1184
1184
  });
1185
1185
  function yn(r, i) {
1186
- r & L ? (this.primaryTouch = i.changedPointers[0].identifier, Bt.call(this, i)) : r & (W | q) && Bt.call(this, i);
1186
+ r & k ? (this.primaryTouch = i.changedPointers[0].identifier, Bt.call(this, i)) : r & (K | J) && Bt.call(this, i);
1187
1187
  }
1188
1188
  function Bt(r) {
1189
1189
  var i = r.changedPointers[0];
@@ -1191,25 +1191,25 @@ var Tt = (function(h, o, e, n) {
1191
1191
  var u = { x: i.clientX, y: i.clientY };
1192
1192
  this.lastTouches.push(u);
1193
1193
  var p = this.lastTouches, E = function() {
1194
- var M = p.indexOf(u);
1195
- M > -1 && p.splice(M, 1);
1194
+ var O = p.indexOf(u);
1195
+ O > -1 && p.splice(O, 1);
1196
1196
  };
1197
1197
  setTimeout(E, gn);
1198
1198
  }
1199
1199
  }
1200
1200
  function bn(r) {
1201
1201
  for (var i = r.srcEvent.clientX, u = r.srcEvent.clientY, p = 0; p < this.lastTouches.length; p++) {
1202
- var E = this.lastTouches[p], M = Math.abs(i - E.x), k = Math.abs(u - E.y);
1203
- if (M <= Ft && k <= Ft)
1202
+ var E = this.lastTouches[p], O = Math.abs(i - E.x), N = Math.abs(u - E.y);
1203
+ if (O <= kt && N <= kt)
1204
1204
  return !0;
1205
1205
  }
1206
1206
  return !1;
1207
1207
  }
1208
- var Ut = a ? J(a.style, "touchAction") : n, Rt = Ut !== n, Vt = "compute", zt = "auto", pt = "manipulation", ke = "none", ze = "pan-x", je = "pan-y", et = En();
1209
- function vt(r, i) {
1208
+ var Ut = a ? H(a.style, "touchAction") : n, Rt = Ut !== n, Vt = "compute", zt = "auto", vt = "manipulation", Ie = "none", ze = "pan-x", je = "pan-y", et = En();
1209
+ function pt(r, i) {
1210
1210
  this.manager = r, this.set(i);
1211
1211
  }
1212
- vt.prototype = {
1212
+ pt.prototype = {
1213
1213
  /**
1214
1214
  * set the touchAction value on the element or enable the polyfill
1215
1215
  * @param {String} value
@@ -1229,8 +1229,8 @@ var Tt = (function(h, o, e, n) {
1229
1229
  */
1230
1230
  compute: function() {
1231
1231
  var r = [];
1232
- return w(this.manager.recognizers, function(i) {
1233
- P(i.options.enable, [i]) && (r = r.concat(i.getTouchAction()));
1232
+ return P(this.manager.recognizers, function(i) {
1233
+ A(i.options.enable, [i]) && (r = r.concat(i.getTouchAction()));
1234
1234
  }), wn(r.join(" "));
1235
1235
  },
1236
1236
  /**
@@ -1243,13 +1243,13 @@ var Tt = (function(h, o, e, n) {
1243
1243
  i.preventDefault();
1244
1244
  return;
1245
1245
  }
1246
- var p = this.actions, E = G(p, ke) && !et[ke], M = G(p, je) && !et[je], k = G(p, ze) && !et[ze];
1246
+ var p = this.actions, E = R(p, Ie) && !et[Ie], O = R(p, je) && !et[je], N = R(p, ze) && !et[ze];
1247
1247
  if (E) {
1248
- var ne = r.pointers.length === 1, ce = r.distance < 2, $ = r.deltaTime < 250;
1249
- if (ne && ce && $)
1248
+ var ae = r.pointers.length === 1, ce = r.distance < 2, ee = r.deltaTime < 250;
1249
+ if (ae && ce && ee)
1250
1250
  return;
1251
1251
  }
1252
- if (!(k && M) && (E || M && u & ue || k && u & de))
1252
+ if (!(N && O) && (E || O && u & ue || N && u & de))
1253
1253
  return this.preventSrc(i);
1254
1254
  },
1255
1255
  /**
@@ -1261,22 +1261,22 @@ var Tt = (function(h, o, e, n) {
1261
1261
  }
1262
1262
  };
1263
1263
  function wn(r) {
1264
- if (G(r, ke))
1265
- return ke;
1266
- var i = G(r, ze), u = G(r, je);
1267
- return i && u ? ke : i || u ? i ? ze : je : G(r, pt) ? pt : zt;
1264
+ if (R(r, Ie))
1265
+ return Ie;
1266
+ var i = R(r, ze), u = R(r, je);
1267
+ return i && u ? Ie : i || u ? i ? ze : je : R(r, vt) ? vt : zt;
1268
1268
  }
1269
1269
  function En() {
1270
1270
  if (!Rt)
1271
1271
  return !1;
1272
- var r = {}, i = h.CSS && h.CSS.supports;
1272
+ var r = {}, i = f.CSS && f.CSS.supports;
1273
1273
  return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(u) {
1274
- r[u] = i ? h.CSS.supports("touch-action", u) : !0;
1274
+ r[u] = i ? f.CSS.supports("touch-action", u) : !0;
1275
1275
  }), r;
1276
1276
  }
1277
- var tt = 1, fe = 2, Fe = 4, Se = 8, we = Se, Ge = 16, me = 32;
1277
+ var tt = 1, fe = 2, ke = 4, xe = 8, we = xe, Ge = 16, me = 32;
1278
1278
  function Ee(r) {
1279
- this.options = A({}, this.defaults, r || {}), this.id = D(), this.manager = null, this.options.enable = m(this.options.enable, !0), this.state = tt, this.simultaneous = {}, this.requireFail = [];
1279
+ this.options = M({}, this.defaults, r || {}), this.id = I(), this.manager = null, this.options.enable = m(this.options.enable, !0), this.state = tt, this.simultaneous = {}, this.requireFail = [];
1280
1280
  }
1281
1281
  Ee.prototype = {
1282
1282
  /**
@@ -1290,7 +1290,7 @@ var Tt = (function(h, o, e, n) {
1290
1290
  * @return {Recognizer}
1291
1291
  */
1292
1292
  set: function(r) {
1293
- return A(this.options, r), this.manager && this.manager.touchAction.update(), this;
1293
+ return M(this.options, r), this.manager && this.manager.touchAction.update(), this;
1294
1294
  },
1295
1295
  /**
1296
1296
  * recognize simultaneous with an other recognizer.
@@ -1298,7 +1298,7 @@ var Tt = (function(h, o, e, n) {
1298
1298
  * @returns {Recognizer} this
1299
1299
  */
1300
1300
  recognizeWith: function(r) {
1301
- if (y(r, "recognizeWith", this))
1301
+ if (w(r, "recognizeWith", this))
1302
1302
  return this;
1303
1303
  var i = this.simultaneous;
1304
1304
  return r = nt(r, this), i[r.id] || (i[r.id] = r, r.recognizeWith(this)), this;
@@ -1309,7 +1309,7 @@ var Tt = (function(h, o, e, n) {
1309
1309
  * @returns {Recognizer} this
1310
1310
  */
1311
1311
  dropRecognizeWith: function(r) {
1312
- return y(r, "dropRecognizeWith", this) ? this : (r = nt(r, this), delete this.simultaneous[r.id], this);
1312
+ return w(r, "dropRecognizeWith", this) ? this : (r = nt(r, this), delete this.simultaneous[r.id], this);
1313
1313
  },
1314
1314
  /**
1315
1315
  * recognizer can only run when an other is failing
@@ -1317,10 +1317,10 @@ var Tt = (function(h, o, e, n) {
1317
1317
  * @returns {Recognizer} this
1318
1318
  */
1319
1319
  requireFailure: function(r) {
1320
- if (y(r, "requireFailure", this))
1320
+ if (w(r, "requireFailure", this))
1321
1321
  return this;
1322
1322
  var i = this.requireFail;
1323
- return r = nt(r, this), Q(i, r) === -1 && (i.push(r), r.requireFailure(this)), this;
1323
+ return r = nt(r, this), Z(i, r) === -1 && (i.push(r), r.requireFailure(this)), this;
1324
1324
  },
1325
1325
  /**
1326
1326
  * drop the requireFailure link. it does not remove the link on the other recognizer.
@@ -1328,10 +1328,10 @@ var Tt = (function(h, o, e, n) {
1328
1328
  * @returns {Recognizer} this
1329
1329
  */
1330
1330
  dropRequireFailure: function(r) {
1331
- if (y(r, "dropRequireFailure", this))
1331
+ if (w(r, "dropRequireFailure", this))
1332
1332
  return this;
1333
1333
  r = nt(r, this);
1334
- var i = Q(this.requireFail, r);
1334
+ var i = Z(this.requireFail, r);
1335
1335
  return i > -1 && this.requireFail.splice(i, 1), this;
1336
1336
  },
1337
1337
  /**
@@ -1359,7 +1359,7 @@ var Tt = (function(h, o, e, n) {
1359
1359
  function p(E) {
1360
1360
  i.manager.emit(E, r);
1361
1361
  }
1362
- u < Se && p(i.options.event + jt(u)), p(i.options.event), r.additionalEvent && p(r.additionalEvent), u >= Se && p(i.options.event + jt(u));
1362
+ u < xe && p(i.options.event + jt(u)), p(i.options.event), r.additionalEvent && p(r.additionalEvent), u >= xe && p(i.options.event + jt(u));
1363
1363
  },
1364
1364
  /**
1365
1365
  * Check that all the require failure recognizers has failed,
@@ -1389,12 +1389,12 @@ var Tt = (function(h, o, e, n) {
1389
1389
  * @param {Object} inputData
1390
1390
  */
1391
1391
  recognize: function(r) {
1392
- var i = A({}, r);
1393
- if (!P(this.options.enable, [this, i])) {
1392
+ var i = M({}, r);
1393
+ if (!A(this.options.enable, [this, i])) {
1394
1394
  this.reset(), this.state = me;
1395
1395
  return;
1396
1396
  }
1397
- this.state & (we | Ge | me) && (this.state = tt), this.state = this.process(i), this.state & (fe | Fe | Se | Ge) && this.tryEmit(i);
1397
+ this.state & (we | Ge | me) && (this.state = tt), this.state = this.process(i), this.state & (fe | ke | xe | Ge) && this.tryEmit(i);
1398
1398
  },
1399
1399
  /**
1400
1400
  * return the state of the recognizer
@@ -1422,19 +1422,19 @@ var Tt = (function(h, o, e, n) {
1422
1422
  }
1423
1423
  };
1424
1424
  function jt(r) {
1425
- return r & Ge ? "cancel" : r & Se ? "end" : r & Fe ? "move" : r & fe ? "start" : "";
1425
+ return r & Ge ? "cancel" : r & xe ? "end" : r & ke ? "move" : r & fe ? "start" : "";
1426
1426
  }
1427
1427
  function Gt(r) {
1428
- return r == Ae ? "down" : r == Ie ? "up" : r == Pe ? "left" : r == Oe ? "right" : "";
1428
+ return r == Ae ? "down" : r == Le ? "up" : r == Me ? "left" : r == Ce ? "right" : "";
1429
1429
  }
1430
1430
  function nt(r, i) {
1431
1431
  var u = i.manager;
1432
1432
  return u ? u.get(r) : r;
1433
1433
  }
1434
- function pe() {
1434
+ function ve() {
1435
1435
  Ee.apply(this, arguments);
1436
1436
  }
1437
- T(pe, Ee, {
1437
+ b(ve, Ee, {
1438
1438
  /**
1439
1439
  * @namespace
1440
1440
  * @memberof AttrRecognizer
@@ -1463,14 +1463,14 @@ var Tt = (function(h, o, e, n) {
1463
1463
  * @returns {*} State
1464
1464
  */
1465
1465
  process: function(r) {
1466
- var i = this.state, u = r.eventType, p = i & (fe | Fe), E = this.attrTest(r);
1467
- return p && (u & q || !E) ? i | Ge : p || E ? u & W ? i | Se : i & fe ? i | Fe : fe : me;
1466
+ var i = this.state, u = r.eventType, p = i & (fe | ke), E = this.attrTest(r);
1467
+ return p && (u & J || !E) ? i | Ge : p || E ? u & K ? i | xe : i & fe ? i | ke : fe : me;
1468
1468
  }
1469
1469
  });
1470
1470
  function rt() {
1471
- pe.apply(this, arguments), this.pX = null, this.pY = null;
1471
+ ve.apply(this, arguments), this.pX = null, this.pY = null;
1472
1472
  }
1473
- T(rt, pe, {
1473
+ b(rt, ve, {
1474
1474
  /**
1475
1475
  * @namespace
1476
1476
  * @memberof PanRecognizer
@@ -1486,11 +1486,11 @@ var Tt = (function(h, o, e, n) {
1486
1486
  return r & ue && i.push(je), r & de && i.push(ze), i;
1487
1487
  },
1488
1488
  directionTest: function(r) {
1489
- var i = this.options, u = !0, p = r.distance, E = r.direction, M = r.deltaX, k = r.deltaY;
1490
- return E & i.direction || (i.direction & ue ? (E = M === 0 ? Ce : M < 0 ? Pe : Oe, u = M != this.pX, p = Math.abs(r.deltaX)) : (E = k === 0 ? Ce : k < 0 ? Ie : Ae, u = k != this.pY, p = Math.abs(r.deltaY))), r.direction = E, u && p > i.threshold && E & i.direction;
1489
+ var i = this.options, u = !0, p = r.distance, E = r.direction, O = r.deltaX, N = r.deltaY;
1490
+ return E & i.direction || (i.direction & ue ? (E = O === 0 ? Oe : O < 0 ? Me : Ce, u = O != this.pX, p = Math.abs(r.deltaX)) : (E = N === 0 ? Oe : N < 0 ? Le : Ae, u = N != this.pY, p = Math.abs(r.deltaY))), r.direction = E, u && p > i.threshold && E & i.direction;
1491
1491
  },
1492
1492
  attrTest: function(r) {
1493
- return pe.prototype.attrTest.call(this, r) && (this.state & fe || !(this.state & fe) && this.directionTest(r));
1493
+ return ve.prototype.attrTest.call(this, r) && (this.state & fe || !(this.state & fe) && this.directionTest(r));
1494
1494
  },
1495
1495
  emit: function(r) {
1496
1496
  this.pX = r.deltaX, this.pY = r.deltaY;
@@ -1499,9 +1499,9 @@ var Tt = (function(h, o, e, n) {
1499
1499
  }
1500
1500
  });
1501
1501
  function mt() {
1502
- pe.apply(this, arguments);
1502
+ ve.apply(this, arguments);
1503
1503
  }
1504
- T(mt, pe, {
1504
+ b(mt, ve, {
1505
1505
  /**
1506
1506
  * @namespace
1507
1507
  * @memberof PinchRecognizer
@@ -1512,7 +1512,7 @@ var Tt = (function(h, o, e, n) {
1512
1512
  pointers: 2
1513
1513
  },
1514
1514
  getTouchAction: function() {
1515
- return [ke];
1515
+ return [Ie];
1516
1516
  },
1517
1517
  attrTest: function(r) {
1518
1518
  return this._super.attrTest.call(this, r) && (Math.abs(r.scale - 1) > this.options.threshold || this.state & fe);
@@ -1528,7 +1528,7 @@ var Tt = (function(h, o, e, n) {
1528
1528
  function gt() {
1529
1529
  Ee.apply(this, arguments), this._timer = null, this._input = null;
1530
1530
  }
1531
- T(gt, Ee, {
1531
+ b(gt, Ee, {
1532
1532
  /**
1533
1533
  * @namespace
1534
1534
  * @memberof PressRecognizer
@@ -1546,13 +1546,13 @@ var Tt = (function(h, o, e, n) {
1546
1546
  },
1547
1547
  process: function(r) {
1548
1548
  var i = this.options, u = r.pointers.length === i.pointers, p = r.distance < i.threshold, E = r.deltaTime > i.time;
1549
- if (this._input = r, !p || !u || r.eventType & (W | q) && !E)
1549
+ if (this._input = r, !p || !u || r.eventType & (K | J) && !E)
1550
1550
  this.reset();
1551
- else if (r.eventType & L)
1551
+ else if (r.eventType & k)
1552
1552
  this.reset(), this._timer = g(function() {
1553
1553
  this.state = we, this.tryEmit();
1554
1554
  }, i.time, this);
1555
- else if (r.eventType & W)
1555
+ else if (r.eventType & K)
1556
1556
  return we;
1557
1557
  return me;
1558
1558
  },
@@ -1560,13 +1560,13 @@ var Tt = (function(h, o, e, n) {
1560
1560
  clearTimeout(this._timer);
1561
1561
  },
1562
1562
  emit: function(r) {
1563
- this.state === we && (r && r.eventType & W ? this.manager.emit(this.options.event + "up", r) : (this._input.timeStamp = c(), this.manager.emit(this.options.event, this._input)));
1563
+ this.state === we && (r && r.eventType & K ? this.manager.emit(this.options.event + "up", r) : (this._input.timeStamp = c(), this.manager.emit(this.options.event, this._input)));
1564
1564
  }
1565
1565
  });
1566
1566
  function yt() {
1567
- pe.apply(this, arguments);
1567
+ ve.apply(this, arguments);
1568
1568
  }
1569
- T(yt, pe, {
1569
+ b(yt, ve, {
1570
1570
  /**
1571
1571
  * @namespace
1572
1572
  * @memberof RotateRecognizer
@@ -1577,16 +1577,16 @@ var Tt = (function(h, o, e, n) {
1577
1577
  pointers: 2
1578
1578
  },
1579
1579
  getTouchAction: function() {
1580
- return [ke];
1580
+ return [Ie];
1581
1581
  },
1582
1582
  attrTest: function(r) {
1583
1583
  return this._super.attrTest.call(this, r) && (Math.abs(r.rotation) > this.options.threshold || this.state & fe);
1584
1584
  }
1585
1585
  });
1586
1586
  function bt() {
1587
- pe.apply(this, arguments);
1587
+ ve.apply(this, arguments);
1588
1588
  }
1589
- T(bt, pe, {
1589
+ b(bt, ve, {
1590
1590
  /**
1591
1591
  * @namespace
1592
1592
  * @memberof SwipeRecognizer
@@ -1603,17 +1603,17 @@ var Tt = (function(h, o, e, n) {
1603
1603
  },
1604
1604
  attrTest: function(r) {
1605
1605
  var i = this.options.direction, u;
1606
- return i & (ue | de) ? u = r.overallVelocity : i & ue ? u = r.overallVelocityX : i & de && (u = r.overallVelocityY), this._super.attrTest.call(this, r) && i & r.offsetDirection && r.distance > this.options.threshold && r.maxPointers == this.options.pointers && f(u) > this.options.velocity && r.eventType & W;
1606
+ return i & (ue | de) ? u = r.overallVelocity : i & ue ? u = r.overallVelocityX : i & de && (u = r.overallVelocityY), this._super.attrTest.call(this, r) && i & r.offsetDirection && r.distance > this.options.threshold && r.maxPointers == this.options.pointers && h(u) > this.options.velocity && r.eventType & K;
1607
1607
  },
1608
1608
  emit: function(r) {
1609
1609
  var i = Gt(r.offsetDirection);
1610
1610
  i && this.manager.emit(this.options.event + i, r), this.manager.emit(this.options.event, r);
1611
1611
  }
1612
1612
  });
1613
- function it() {
1613
+ function at() {
1614
1614
  Ee.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
1615
1615
  }
1616
- T(it, Ee, {
1616
+ b(at, Ee, {
1617
1617
  /**
1618
1618
  * @namespace
1619
1619
  * @memberof PinchRecognizer
@@ -1632,19 +1632,19 @@ var Tt = (function(h, o, e, n) {
1632
1632
  // a multi-tap can be a bit off the initial position
1633
1633
  },
1634
1634
  getTouchAction: function() {
1635
- return [pt];
1635
+ return [vt];
1636
1636
  },
1637
1637
  process: function(r) {
1638
1638
  var i = this.options, u = r.pointers.length === i.pointers, p = r.distance < i.threshold, E = r.deltaTime < i.time;
1639
- if (this.reset(), r.eventType & L && this.count === 0)
1639
+ if (this.reset(), r.eventType & k && this.count === 0)
1640
1640
  return this.failTimeout();
1641
1641
  if (p && E && u) {
1642
- if (r.eventType != W)
1642
+ if (r.eventType != K)
1643
1643
  return this.failTimeout();
1644
- var M = this.pTime ? r.timeStamp - this.pTime < i.interval : !0, k = !this.pCenter || Qe(this.pCenter, r.center) < i.posThreshold;
1645
- this.pTime = r.timeStamp, this.pCenter = r.center, !k || !M ? this.count = 1 : this.count += 1, this._input = r;
1646
- var ne = this.count % i.taps;
1647
- if (ne === 0)
1644
+ var O = this.pTime ? r.timeStamp - this.pTime < i.interval : !0, N = !this.pCenter || Qe(this.pCenter, r.center) < i.posThreshold;
1645
+ this.pTime = r.timeStamp, this.pCenter = r.center, !N || !O ? this.count = 1 : this.count += 1, this._input = r;
1646
+ var ae = this.count % i.taps;
1647
+ if (ae === 0)
1648
1648
  return this.hasRequireFailures() ? (this._timer = g(function() {
1649
1649
  this.state = we, this.tryEmit();
1650
1650
  }, i.interval, this), fe) : we;
@@ -1711,8 +1711,8 @@ var Tt = (function(h, o, e, n) {
1711
1711
  [mt, { enable: !1 }, ["rotate"]],
1712
1712
  [bt, { direction: ue }],
1713
1713
  [rt, { direction: ue }, ["swipe"]],
1714
- [it],
1715
- [it, { event: "doubletap", taps: 2 }, ["tap"]],
1714
+ [at],
1715
+ [at, { event: "doubletap", taps: 2 }, ["tap"]],
1716
1716
  [gt]
1717
1717
  ],
1718
1718
  /**
@@ -1764,7 +1764,7 @@ var Tt = (function(h, o, e, n) {
1764
1764
  };
1765
1765
  var Tn = 1, Yt = 2;
1766
1766
  function wt(r, i) {
1767
- this.options = A({}, Be.defaults, i || {}), this.options.inputTarget = this.options.inputTarget || r, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = r, this.input = Ke(this), this.touchAction = new vt(this, this.options.touchAction), Ht(this, !0), w(this.options.recognizers, function(u) {
1767
+ this.options = M({}, Be.defaults, i || {}), this.options.inputTarget = this.options.inputTarget || r, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = r, this.input = Ke(this), this.touchAction = new pt(this, this.options.touchAction), Ht(this, !0), P(this.options.recognizers, function(u) {
1768
1768
  var p = this.add(new u[0](u[1]));
1769
1769
  u[2] && p.recognizeWith(u[2]), u[3] && p.requireFailure(u[3]);
1770
1770
  }, this);
@@ -1776,7 +1776,7 @@ var Tt = (function(h, o, e, n) {
1776
1776
  * @returns {Manager}
1777
1777
  */
1778
1778
  set: function(r) {
1779
- return A(this.options, r), r.touchAction && this.touchAction.update(), r.inputTarget && (this.input.destroy(), this.input.target = r.inputTarget, this.input.init()), this;
1779
+ return M(this.options, r), r.touchAction && this.touchAction.update(), r.inputTarget && (this.input.destroy(), this.input.target = r.inputTarget, this.input.init()), this;
1780
1780
  },
1781
1781
  /**
1782
1782
  * stop recognizing for this session.
@@ -1799,10 +1799,10 @@ var Tt = (function(h, o, e, n) {
1799
1799
  this.touchAction.preventDefaults(r);
1800
1800
  var u, p = this.recognizers, E = i.curRecognizer;
1801
1801
  (!E || E && E.state & we) && (E = i.curRecognizer = null);
1802
- for (var M = 0; M < p.length; )
1803
- u = p[M], i.stopped !== Yt && // 1
1802
+ for (var O = 0; O < p.length; )
1803
+ u = p[O], i.stopped !== Yt && // 1
1804
1804
  (!E || u == E || // 2
1805
- u.canRecognizeWith(E)) ? u.recognize(r) : u.reset(), !E && u.state & (fe | Fe | Se) && (E = i.curRecognizer = u), M++;
1805
+ u.canRecognizeWith(E)) ? u.recognize(r) : u.reset(), !E && u.state & (fe | ke | xe) && (E = i.curRecognizer = u), O++;
1806
1806
  }
1807
1807
  },
1808
1808
  /**
@@ -1825,7 +1825,7 @@ var Tt = (function(h, o, e, n) {
1825
1825
  * @returns {Recognizer|Manager}
1826
1826
  */
1827
1827
  add: function(r) {
1828
- if (y(r, "add", this))
1828
+ if (w(r, "add", this))
1829
1829
  return this;
1830
1830
  var i = this.get(r.options.event);
1831
1831
  return i && this.remove(i), this.recognizers.push(r), r.manager = this, this.touchAction.update(), r;
@@ -1836,10 +1836,10 @@ var Tt = (function(h, o, e, n) {
1836
1836
  * @returns {Manager}
1837
1837
  */
1838
1838
  remove: function(r) {
1839
- if (y(r, "remove", this))
1839
+ if (w(r, "remove", this))
1840
1840
  return this;
1841
1841
  if (r = this.get(r), r) {
1842
- var i = this.recognizers, u = Q(i, r);
1842
+ var i = this.recognizers, u = Z(i, r);
1843
1843
  u !== -1 && (i.splice(u, 1), this.touchAction.update());
1844
1844
  }
1845
1845
  return this;
@@ -1853,7 +1853,7 @@ var Tt = (function(h, o, e, n) {
1853
1853
  on: function(r, i) {
1854
1854
  if (r !== n && i !== n) {
1855
1855
  var u = this.handlers;
1856
- return w(U(r), function(p) {
1856
+ return P(W(r), function(p) {
1857
1857
  u[p] = u[p] || [], u[p].push(i);
1858
1858
  }), this;
1859
1859
  }
@@ -1867,8 +1867,8 @@ var Tt = (function(h, o, e, n) {
1867
1867
  off: function(r, i) {
1868
1868
  if (r !== n) {
1869
1869
  var u = this.handlers;
1870
- return w(U(r), function(p) {
1871
- i ? u[p] && u[p].splice(Q(u[p], i), 1) : delete u[p];
1870
+ return P(W(r), function(p) {
1871
+ i ? u[p] && u[p].splice(Z(u[p], i), 1) : delete u[p];
1872
1872
  }), this;
1873
1873
  }
1874
1874
  },
@@ -1878,7 +1878,7 @@ var Tt = (function(h, o, e, n) {
1878
1878
  * @param {Object} data
1879
1879
  */
1880
1880
  emit: function(r, i) {
1881
- this.options.domEvents && xn(r, i);
1881
+ this.options.domEvents && Pn(r, i);
1882
1882
  var u = this.handlers[r] && this.handlers[r].slice();
1883
1883
  if (!(!u || !u.length)) {
1884
1884
  i.type = r, i.preventDefault = function() {
@@ -1900,63 +1900,63 @@ var Tt = (function(h, o, e, n) {
1900
1900
  var u = r.element;
1901
1901
  if (u.style) {
1902
1902
  var p;
1903
- w(r.options.cssProps, function(E, M) {
1904
- p = J(u.style, M), i ? (r.oldCssProps[p] = u.style[p], u.style[p] = E) : u.style[p] = r.oldCssProps[p] || "";
1903
+ P(r.options.cssProps, function(E, O) {
1904
+ p = H(u.style, O), i ? (r.oldCssProps[p] = u.style[p], u.style[p] = E) : u.style[p] = r.oldCssProps[p] || "";
1905
1905
  }), i || (r.oldCssProps = {});
1906
1906
  }
1907
1907
  }
1908
- function xn(r, i) {
1908
+ function Pn(r, i) {
1909
1909
  var u = o.createEvent("Event");
1910
1910
  u.initEvent(r, !0, !0), u.gesture = i, i.target.dispatchEvent(u);
1911
1911
  }
1912
- return A(Be, {
1913
- INPUT_START: L,
1914
- INPUT_MOVE: ie,
1915
- INPUT_END: W,
1916
- INPUT_CANCEL: q,
1912
+ return M(Be, {
1913
+ INPUT_START: k,
1914
+ INPUT_MOVE: se,
1915
+ INPUT_END: K,
1916
+ INPUT_CANCEL: J,
1917
1917
  STATE_POSSIBLE: tt,
1918
1918
  STATE_BEGAN: fe,
1919
- STATE_CHANGED: Fe,
1920
- STATE_ENDED: Se,
1919
+ STATE_CHANGED: ke,
1920
+ STATE_ENDED: xe,
1921
1921
  STATE_RECOGNIZED: we,
1922
1922
  STATE_CANCELLED: Ge,
1923
1923
  STATE_FAILED: me,
1924
- DIRECTION_NONE: Ce,
1925
- DIRECTION_LEFT: Pe,
1926
- DIRECTION_RIGHT: Oe,
1927
- DIRECTION_UP: Ie,
1924
+ DIRECTION_NONE: Oe,
1925
+ DIRECTION_LEFT: Me,
1926
+ DIRECTION_RIGHT: Ce,
1927
+ DIRECTION_UP: Le,
1928
1928
  DIRECTION_DOWN: Ae,
1929
1929
  DIRECTION_HORIZONTAL: ue,
1930
1930
  DIRECTION_VERTICAL: de,
1931
1931
  DIRECTION_ALL: Ue,
1932
1932
  Manager: wt,
1933
- Input: se,
1934
- TouchAction: vt,
1933
+ Input: le,
1934
+ TouchAction: pt,
1935
1935
  TouchInput: $e,
1936
1936
  MouseInput: Je,
1937
1937
  PointerEventInput: ht,
1938
1938
  TouchMouseInput: dt,
1939
- SingleTouchInput: Dt,
1939
+ SingleTouchInput: Nt,
1940
1940
  Recognizer: Ee,
1941
- AttrRecognizer: pe,
1942
- Tap: it,
1941
+ AttrRecognizer: ve,
1942
+ Tap: at,
1943
1943
  Pan: rt,
1944
1944
  Swipe: bt,
1945
1945
  Pinch: mt,
1946
1946
  Rotate: yt,
1947
1947
  Press: gt,
1948
- on: C,
1949
- off: _,
1950
- each: w,
1951
- merge: O,
1952
- extend: S,
1953
- assign: A,
1954
- inherit: T,
1955
- bindFn: b,
1956
- prefixed: J
1948
+ on: _,
1949
+ off: S,
1950
+ each: P,
1951
+ merge: C,
1952
+ extend: x,
1953
+ assign: M,
1954
+ inherit: b,
1955
+ bindFn: y,
1956
+ prefixed: H
1957
1957
  }), Be;
1958
- })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), qe = function(h, o) {
1959
- o === void 0 && console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'), o === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), this.object = h, this.domElement = o, this.enabled = !0, this.target = new ye(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !1, this.keyPanSpeed = 7, this.autoRotate = !1, this.autoRotateSpeed = 2, this.enableKeys = !0, this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }, this.mouseButtons = { LEFT: Me.ROTATE, MIDDLE: Me.DOLLY, RIGHT: Me.PAN }, this.touches = { ONE: _e.ROTATE, TWO: _e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function() {
1958
+ })(typeof window != "undefined" ? window : {}, typeof document != "undefined" ? document : {}), qe = function(f, o) {
1959
+ o === void 0 && console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'), o === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), this.object = f, this.domElement = o, this.enabled = !0, this.target = new ye(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !1, this.keyPanSpeed = 7, this.autoRotate = !1, this.autoRotateSpeed = 2, this.enableKeys = !0, this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }, this.mouseButtons = { LEFT: Se.ROTATE, MIDDLE: Se.DOLLY, RIGHT: Se.PAN }, this.touches = { ONE: _e.ROTATE, TWO: _e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function() {
1960
1960
  return c.phi;
1961
1961
  }, this.getAzimuthalAngle = function() {
1962
1962
  return c.theta;
@@ -1965,13 +1965,13 @@ var Tt = (function(h, o, e, n) {
1965
1965
  }, this.reset = function() {
1966
1966
  e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(n), e.update(), l = s.NONE;
1967
1967
  }, this.update = (function() {
1968
- var d = new ye(), F = new Xt().setFromUnitVectors(h.up, new ye(0, 1, 0)), K = F.clone().inverse(), te = new ye(), ve = new Xt();
1968
+ var d = new ye(), B = new Xt().setFromUnitVectors(f.up, new ye(0, 1, 0)), $ = B.clone().inverse(), ne = new ye(), pe = new Xt();
1969
1969
  return function() {
1970
1970
  var be = e.object.position;
1971
- return d.copy(be).sub(e.target), d.applyQuaternion(F), c.setFromVector3(d), e.autoRotate && l === s.NONE && U(H()), e.enableDamping ? (c.theta += g.theta * e.dampingFactor, c.phi += g.phi * e.dampingFactor) : (c.theta += g.theta, c.phi += g.phi), c.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), c.radius *= y, c.radius = Math.max(e.minDistance, Math.min(e.maxDistance, c.radius)), e.enableDamping === !0 ? e.target.addScaledVector(w, e.dampingFactor) : e.target.add(w), d.setFromSpherical(c), d.applyQuaternion(K), be.copy(e.target).add(d), e.object.lookAt(e.target), e.enableDamping === !0 ? (g.theta *= 1 - e.dampingFactor, g.phi *= 1 - e.dampingFactor, w.multiplyScalar(1 - e.dampingFactor)) : (g.set(0, 0, 0), w.set(0, 0, 0)), y = 1, x || te.distanceToSquared(e.object.position) > f || 8 * (1 - ve.dot(e.object.quaternion)) > f ? (e.dispatchEvent(n), te.copy(e.object.position), ve.copy(e.object.quaternion), x = !1, !0) : !1;
1971
+ return d.copy(be).sub(e.target), d.applyQuaternion(B), c.setFromVector3(d), e.autoRotate && l === s.NONE && W(U()), e.enableDamping ? (c.theta += g.theta * e.dampingFactor, c.phi += g.phi * e.dampingFactor) : (c.theta += g.theta, c.phi += g.phi), c.theta = Math.max(e.minAzimuthAngle, Math.min(e.maxAzimuthAngle, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), c.radius *= w, c.radius = Math.max(e.minDistance, Math.min(e.maxDistance, c.radius)), e.enableDamping === !0 ? e.target.addScaledVector(P, e.dampingFactor) : e.target.add(P), d.setFromSpherical(c), d.applyQuaternion($), be.copy(e.target).add(d), e.object.lookAt(e.target), e.enableDamping === !0 ? (g.theta *= 1 - e.dampingFactor, g.phi *= 1 - e.dampingFactor, P.multiplyScalar(1 - e.dampingFactor)) : (g.set(0, 0, 0), P.set(0, 0, 0)), w = 1, T || ne.distanceToSquared(e.object.position) > h || 8 * (1 - pe.dot(e.object.quaternion)) > h ? (e.dispatchEvent(n), ne.copy(e.object.position), pe.copy(e.object.quaternion), T = !1, !0) : !1;
1972
1972
  };
1973
1973
  })(), this.dispose = function() {
1974
- e.domElement.removeEventListener("contextmenu", Ze, !1), e.domElement.removeEventListener("mousedown", Ae, !1), e.domElement.removeEventListener("wheel", Ue, !1), e.domElement.removeEventListener("touchstart", Ne, !1), e.domElement.removeEventListener("touchend", Ke, !1), e.domElement.removeEventListener("touchmove", se, !1), document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.domElement.removeEventListener("keydown", Re, !1);
1974
+ e.domElement.removeEventListener("contextmenu", Ze, !1), e.domElement.removeEventListener("mousedown", Ae, !1), e.domElement.removeEventListener("wheel", Ue, !1), e.domElement.removeEventListener("touchstart", Fe, !1), e.domElement.removeEventListener("touchend", Ke, !1), e.domElement.removeEventListener("touchmove", le, !1), document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.domElement.removeEventListener("keydown", Re, !1);
1975
1975
  };
1976
1976
  var e = this, n = { type: "change" }, t = { type: "start" }, a = { type: "end" }, s = {
1977
1977
  NONE: -1,
@@ -1982,182 +1982,182 @@ var Tt = (function(h, o, e, n) {
1982
1982
  TOUCH_PAN: 4,
1983
1983
  TOUCH_DOLLY_PAN: 5,
1984
1984
  TOUCH_DOLLY_ROTATE: 6
1985
- }, l = s.NONE, f = 1e-6, c = new Wt(), g = new Wt(), y = 1, w = new ye(), x = !1, A = new Te(), S = new Te(), O = new Te(), T = new Te(), b = new Te(), P = new Te(), m = new Te(), C = new Te(), _ = new Te();
1986
- function H() {
1985
+ }, l = s.NONE, h = 1e-6, c = new Wt(), g = new Wt(), w = 1, P = new ye(), T = !1, M = new Te(), x = new Te(), C = new Te(), b = new Te(), y = new Te(), A = new Te(), m = new Te(), _ = new Te(), S = new Te();
1986
+ function U() {
1987
1987
  return 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
1988
1988
  }
1989
- function G() {
1989
+ function R() {
1990
1990
  return Math.pow(0.95, e.zoomSpeed);
1991
1991
  }
1992
- function U(d) {
1992
+ function W(d) {
1993
1993
  g.theta -= d;
1994
1994
  }
1995
- function Q(d) {
1995
+ function Z(d) {
1996
1996
  g.phi -= d;
1997
1997
  }
1998
- var oe = (function() {
1998
+ var X = (function() {
1999
1999
  var d = new ye();
2000
- return function(K, te) {
2001
- d.setFromMatrixColumn(te, 0), d.multiplyScalar(-K), w.add(d);
2000
+ return function($, ne) {
2001
+ d.setFromMatrixColumn(ne, 0), d.multiplyScalar(-$), P.add(d);
2002
2002
  };
2003
- })(), le = (function() {
2003
+ })(), oe = (function() {
2004
2004
  var d = new ye();
2005
- return function(K, te) {
2006
- e.screenSpacePanning === !0 ? d.setFromMatrixColumn(te, 1) : (d.setFromMatrixColumn(te, 0), d.crossVectors(e.object.up, d)), d.multiplyScalar(K), w.add(d);
2005
+ return function($, ne) {
2006
+ e.screenSpacePanning === !0 ? d.setFromMatrixColumn(ne, 1) : (d.setFromMatrixColumn(ne, 0), d.crossVectors(e.object.up, d)), d.multiplyScalar($), P.add(d);
2007
2007
  };
2008
- })(), J = (function() {
2008
+ })(), H = (function() {
2009
2009
  var d = new ye();
2010
- return function(K, te) {
2011
- var ve = e.domElement;
2010
+ return function($, ne) {
2011
+ var pe = e.domElement;
2012
2012
  if (e.object.isPerspectiveCamera) {
2013
2013
  var Ve = e.object.position;
2014
2014
  d.copy(Ve).sub(e.target);
2015
2015
  var be = d.length();
2016
- be *= Math.tan(e.object.fov / 2 * Math.PI / 180), oe(2 * K * be / ve.clientHeight, e.object.matrix), le(2 * te * be / ve.clientHeight, e.object.matrix);
2017
- } else e.object.isOrthographicCamera ? (oe(K * (e.object.right - e.object.left) / e.object.zoom / ve.clientWidth, e.object.matrix), le(te * (e.object.top - e.object.bottom) / e.object.zoom / ve.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2016
+ be *= Math.tan(e.object.fov / 2 * Math.PI / 180), X(2 * $ * be / pe.clientHeight, e.object.matrix), oe(2 * ne * be / pe.clientHeight, e.object.matrix);
2017
+ } else e.object.isOrthographicCamera ? (X($ * (e.object.right - e.object.left) / e.object.zoom / pe.clientWidth, e.object.matrix), oe(ne * (e.object.top - e.object.bottom) / e.object.zoom / pe.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2018
2018
  };
2019
2019
  })();
2020
- function Z(d) {
2021
- e.object.isPerspectiveCamera ? y /= d : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * d)), e.object.updateProjectionMatrix(), x = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2022
- }
2023
- function D(d) {
2024
- e.object.isPerspectiveCamera ? y *= d : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), x = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2020
+ function q(d) {
2021
+ e.object.isPerspectiveCamera ? w /= d : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom * d)), e.object.updateProjectionMatrix(), T = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2025
2022
  }
2026
2023
  function I(d) {
2027
- A.set(d.clientX, d.clientY);
2024
+ e.object.isPerspectiveCamera ? w *= d : e.object.isOrthographicCamera ? (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), T = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2028
2025
  }
2029
- function N(d) {
2026
+ function F(d) {
2027
+ M.set(d.clientX, d.clientY);
2028
+ }
2029
+ function L(d) {
2030
2030
  m.set(d.clientX, d.clientY);
2031
2031
  }
2032
- function B(d) {
2033
- T.set(d.clientX, d.clientY);
2032
+ function D(d) {
2033
+ b.set(d.clientX, d.clientY);
2034
2034
  }
2035
- function Y(d) {
2036
- S.set(d.clientX, d.clientY), O.subVectors(S, A).multiplyScalar(e.rotateSpeed);
2037
- var F = e.domElement;
2038
- U(2 * Math.PI * O.x / F.clientHeight), Q(2 * Math.PI * O.y / F.clientHeight), A.copy(S), e.update();
2035
+ function G(d) {
2036
+ x.set(d.clientX, d.clientY), C.subVectors(x, M).multiplyScalar(e.rotateSpeed);
2037
+ var B = e.domElement;
2038
+ W(2 * Math.PI * C.x / B.clientHeight), Z(2 * Math.PI * C.y / B.clientHeight), M.copy(x), e.update();
2039
2039
  }
2040
- function ae(d) {
2041
- C.set(d.clientX, d.clientY), _.subVectors(C, m), _.y > 0 ? Z(G()) : _.y < 0 && D(G()), m.copy(C), e.update();
2040
+ function re(d) {
2041
+ _.set(d.clientX, d.clientY), S.subVectors(_, m), S.y > 0 ? q(R()) : S.y < 0 && I(R()), m.copy(_), e.update();
2042
2042
  }
2043
- function X(d) {
2044
- b.set(d.clientX, d.clientY), P.subVectors(b, T).multiplyScalar(e.panSpeed), J(P.x, P.y), T.copy(b), e.update();
2043
+ function Q(d) {
2044
+ y.set(d.clientX, d.clientY), A.subVectors(y, b).multiplyScalar(e.panSpeed), H(A.x, A.y), b.copy(y), e.update();
2045
2045
  }
2046
- function R(d) {
2047
- d.deltaY < 0 ? D(G()) : d.deltaY > 0 && Z(G()), e.update();
2046
+ function V(d) {
2047
+ d.deltaY < 0 ? I(R()) : d.deltaY > 0 && q(R()), e.update();
2048
2048
  }
2049
- function ee(d) {
2050
- var F = !1;
2049
+ function te(d) {
2050
+ var B = !1;
2051
2051
  switch (d.keyCode) {
2052
2052
  case e.keys.UP:
2053
- J(0, e.keyPanSpeed), F = !0;
2053
+ H(0, e.keyPanSpeed), B = !0;
2054
2054
  break;
2055
2055
  case e.keys.BOTTOM:
2056
- J(0, -e.keyPanSpeed), F = !0;
2056
+ H(0, -e.keyPanSpeed), B = !0;
2057
2057
  break;
2058
2058
  case e.keys.LEFT:
2059
- J(e.keyPanSpeed, 0), F = !0;
2059
+ H(e.keyPanSpeed, 0), B = !0;
2060
2060
  break;
2061
2061
  case e.keys.RIGHT:
2062
- J(-e.keyPanSpeed, 0), F = !0;
2062
+ H(-e.keyPanSpeed, 0), B = !0;
2063
2063
  break;
2064
2064
  }
2065
- F && (d.preventDefault(), e.update());
2065
+ B && (d.preventDefault(), e.update());
2066
2066
  }
2067
- function j(d) {
2067
+ function Y(d) {
2068
2068
  if (d.touches.length == 1)
2069
- A.set(d.touches[0].pageX, d.touches[0].pageY);
2069
+ M.set(d.touches[0].pageX, d.touches[0].pageY);
2070
2070
  else {
2071
- var F = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), K = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2072
- A.set(F, K);
2071
+ var B = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), $ = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2072
+ M.set(B, $);
2073
2073
  }
2074
2074
  }
2075
- function z(d) {
2075
+ function j(d) {
2076
2076
  if (d.touches.length == 1)
2077
- T.set(d.touches[0].pageX, d.touches[0].pageY);
2077
+ b.set(d.touches[0].pageX, d.touches[0].pageY);
2078
2078
  else {
2079
- var F = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), K = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2080
- T.set(F, K);
2079
+ var B = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), $ = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2080
+ b.set(B, $);
2081
2081
  }
2082
2082
  }
2083
- function L(d) {
2084
- var F = d.touches[0].pageX - d.touches[1].pageX, K = d.touches[0].pageY - d.touches[1].pageY, te = Math.sqrt(F * F + K * K);
2085
- m.set(0, te);
2083
+ function k(d) {
2084
+ var B = d.touches[0].pageX - d.touches[1].pageX, $ = d.touches[0].pageY - d.touches[1].pageY, ne = Math.sqrt(B * B + $ * $);
2085
+ m.set(0, ne);
2086
2086
  }
2087
- function ie(d) {
2088
- e.enableZoom && L(d), e.enablePan && z(d);
2087
+ function se(d) {
2088
+ e.enableZoom && k(d), e.enablePan && j(d);
2089
2089
  }
2090
- function W(d) {
2091
- e.enableZoom && L(d), e.enableRotate && j(d);
2090
+ function K(d) {
2091
+ e.enableZoom && k(d), e.enableRotate && Y(d);
2092
2092
  }
2093
- function q(d) {
2093
+ function J(d) {
2094
2094
  if (d.touches.length == 1)
2095
- S.set(d.touches[0].pageX, d.touches[0].pageY);
2095
+ x.set(d.touches[0].pageX, d.touches[0].pageY);
2096
2096
  else {
2097
- var F = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), K = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2098
- S.set(F, K);
2097
+ var B = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), $ = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2098
+ x.set(B, $);
2099
2099
  }
2100
- O.subVectors(S, A).multiplyScalar(e.rotateSpeed);
2101
- var te = e.domElement;
2102
- U(2 * Math.PI * O.x / te.clientHeight), Q(2 * Math.PI * O.y / te.clientHeight), A.copy(S);
2100
+ C.subVectors(x, M).multiplyScalar(e.rotateSpeed);
2101
+ var ne = e.domElement;
2102
+ W(2 * Math.PI * C.x / ne.clientHeight), Z(2 * Math.PI * C.y / ne.clientHeight), M.copy(x);
2103
2103
  }
2104
- function Ce(d) {
2104
+ function Oe(d) {
2105
2105
  if (d.touches.length == 1)
2106
- b.set(d.touches[0].pageX, d.touches[0].pageY);
2106
+ y.set(d.touches[0].pageX, d.touches[0].pageY);
2107
2107
  else {
2108
- var F = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), K = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2109
- b.set(F, K);
2108
+ var B = 0.5 * (d.touches[0].pageX + d.touches[1].pageX), $ = 0.5 * (d.touches[0].pageY + d.touches[1].pageY);
2109
+ y.set(B, $);
2110
2110
  }
2111
- P.subVectors(b, T).multiplyScalar(e.panSpeed), J(P.x, P.y), T.copy(b);
2111
+ A.subVectors(y, b).multiplyScalar(e.panSpeed), H(A.x, A.y), b.copy(y);
2112
2112
  }
2113
- function Pe(d) {
2114
- var F = d.touches[0].pageX - d.touches[1].pageX, K = d.touches[0].pageY - d.touches[1].pageY, te = Math.sqrt(F * F + K * K);
2115
- C.set(0, te), _.set(0, Math.pow(C.y / m.y, e.zoomSpeed)), Z(_.y), m.copy(C);
2113
+ function Me(d) {
2114
+ var B = d.touches[0].pageX - d.touches[1].pageX, $ = d.touches[0].pageY - d.touches[1].pageY, ne = Math.sqrt(B * B + $ * $);
2115
+ _.set(0, ne), S.set(0, Math.pow(_.y / m.y, e.zoomSpeed)), q(S.y), m.copy(_);
2116
2116
  }
2117
- function Oe(d) {
2118
- e.enableZoom && Pe(d), e.enablePan && Ce(d);
2117
+ function Ce(d) {
2118
+ e.enableZoom && Me(d), e.enablePan && Oe(d);
2119
2119
  }
2120
- function Ie(d) {
2121
- e.enableZoom && Pe(d), e.enableRotate && q(d);
2120
+ function Le(d) {
2121
+ e.enableZoom && Me(d), e.enableRotate && J(d);
2122
2122
  }
2123
2123
  function Ae(d) {
2124
2124
  if (e.enabled !== !1) {
2125
2125
  d.preventDefault(), e.domElement.focus ? e.domElement.focus() : window.focus();
2126
- var F;
2126
+ var B;
2127
2127
  switch (d.button) {
2128
2128
  case 0:
2129
- F = e.mouseButtons.LEFT;
2129
+ B = e.mouseButtons.LEFT;
2130
2130
  break;
2131
2131
  case 1:
2132
- F = e.mouseButtons.MIDDLE;
2132
+ B = e.mouseButtons.MIDDLE;
2133
2133
  break;
2134
2134
  case 2:
2135
- F = e.mouseButtons.RIGHT;
2135
+ B = e.mouseButtons.RIGHT;
2136
2136
  break;
2137
2137
  default:
2138
- F = -1;
2138
+ B = -1;
2139
2139
  }
2140
- switch (F) {
2141
- case Me.DOLLY:
2140
+ switch (B) {
2141
+ case Se.DOLLY:
2142
2142
  if (e.enableZoom === !1) return;
2143
- N(d), l = s.DOLLY;
2143
+ L(d), l = s.DOLLY;
2144
2144
  break;
2145
- case Me.ROTATE:
2145
+ case Se.ROTATE:
2146
2146
  if (d.ctrlKey || d.metaKey || d.shiftKey) {
2147
2147
  if (e.enablePan === !1) return;
2148
- B(d), l = s.PAN;
2148
+ D(d), l = s.PAN;
2149
2149
  } else {
2150
2150
  if (e.enableRotate === !1) return;
2151
- I(d), l = s.ROTATE;
2151
+ F(d), l = s.ROTATE;
2152
2152
  }
2153
2153
  break;
2154
- case Me.PAN:
2154
+ case Se.PAN:
2155
2155
  if (d.ctrlKey || d.metaKey || d.shiftKey) {
2156
2156
  if (e.enableRotate === !1) return;
2157
- I(d), l = s.ROTATE;
2157
+ F(d), l = s.ROTATE;
2158
2158
  } else {
2159
2159
  if (e.enablePan === !1) return;
2160
- B(d), l = s.PAN;
2160
+ D(d), l = s.PAN;
2161
2161
  }
2162
2162
  break;
2163
2163
  default:
@@ -2171,15 +2171,15 @@ var Tt = (function(h, o, e, n) {
2171
2171
  switch (d.preventDefault(), l) {
2172
2172
  case s.ROTATE:
2173
2173
  if (e.enableRotate === !1) return;
2174
- Y(d);
2174
+ G(d);
2175
2175
  break;
2176
2176
  case s.DOLLY:
2177
2177
  if (e.enableZoom === !1) return;
2178
- ae(d);
2178
+ re(d);
2179
2179
  break;
2180
2180
  case s.PAN:
2181
2181
  if (e.enablePan === !1) return;
2182
- X(d);
2182
+ Q(d);
2183
2183
  break;
2184
2184
  }
2185
2185
  }
@@ -2187,23 +2187,23 @@ var Tt = (function(h, o, e, n) {
2187
2187
  e.enabled !== !1 && (document.removeEventListener("mousemove", ue, !1), document.removeEventListener("mouseup", de, !1), e.dispatchEvent(a), l = s.NONE);
2188
2188
  }
2189
2189
  function Ue(d) {
2190
- e.enabled === !1 || e.enableZoom === !1 || l !== s.NONE && l !== s.ROTATE || (d.preventDefault(), d.stopPropagation(), e.dispatchEvent(t), R(d), e.dispatchEvent(a));
2190
+ e.enabled === !1 || e.enableZoom === !1 || l !== s.NONE && l !== s.ROTATE || (d.preventDefault(), d.stopPropagation(), e.dispatchEvent(t), V(d), e.dispatchEvent(a));
2191
2191
  }
2192
2192
  function Re(d) {
2193
- e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || ee(d);
2193
+ e.enabled === !1 || e.enableKeys === !1 || e.enablePan === !1 || te(d);
2194
2194
  }
2195
- function Ne(d) {
2195
+ function Fe(d) {
2196
2196
  if (e.enabled !== !1) {
2197
2197
  switch (d.preventDefault(), d.touches.length) {
2198
2198
  case 1:
2199
2199
  switch (e.touches.ONE) {
2200
2200
  case _e.ROTATE:
2201
2201
  if (e.enableRotate === !1) return;
2202
- j(d), l = s.TOUCH_ROTATE;
2202
+ Y(d), l = s.TOUCH_ROTATE;
2203
2203
  break;
2204
2204
  case _e.PAN:
2205
2205
  if (e.enablePan === !1) return;
2206
- z(d), l = s.TOUCH_PAN;
2206
+ j(d), l = s.TOUCH_PAN;
2207
2207
  break;
2208
2208
  default:
2209
2209
  l = s.NONE;
@@ -2213,11 +2213,11 @@ var Tt = (function(h, o, e, n) {
2213
2213
  switch (e.touches.TWO) {
2214
2214
  case _e.DOLLY_PAN:
2215
2215
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2216
- ie(d), l = s.TOUCH_DOLLY_PAN;
2216
+ se(d), l = s.TOUCH_DOLLY_PAN;
2217
2217
  break;
2218
2218
  case _e.DOLLY_ROTATE:
2219
2219
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2220
- W(d), l = s.TOUCH_DOLLY_ROTATE;
2220
+ K(d), l = s.TOUCH_DOLLY_ROTATE;
2221
2221
  break;
2222
2222
  default:
2223
2223
  l = s.NONE;
@@ -2229,24 +2229,24 @@ var Tt = (function(h, o, e, n) {
2229
2229
  l !== s.NONE && e.dispatchEvent(t);
2230
2230
  }
2231
2231
  }
2232
- function se(d) {
2232
+ function le(d) {
2233
2233
  if (e.enabled !== !1)
2234
2234
  switch (d.preventDefault(), d.stopPropagation(), l) {
2235
2235
  case s.TOUCH_ROTATE:
2236
2236
  if (e.enableRotate === !1) return;
2237
- q(d), e.update();
2237
+ J(d), e.update();
2238
2238
  break;
2239
2239
  case s.TOUCH_PAN:
2240
2240
  if (e.enablePan === !1) return;
2241
- Ce(d), e.update();
2241
+ Oe(d), e.update();
2242
2242
  break;
2243
2243
  case s.TOUCH_DOLLY_PAN:
2244
2244
  if (e.enableZoom === !1 && e.enablePan === !1) return;
2245
- Oe(d), e.update();
2245
+ Ce(d), e.update();
2246
2246
  break;
2247
2247
  case s.TOUCH_DOLLY_ROTATE:
2248
2248
  if (e.enableZoom === !1 && e.enableRotate === !1) return;
2249
- Ie(d), e.update();
2249
+ Le(d), e.update();
2250
2250
  break;
2251
2251
  default:
2252
2252
  l = s.NONE;
@@ -2258,112 +2258,112 @@ var Tt = (function(h, o, e, n) {
2258
2258
  function Ze(d) {
2259
2259
  e.enabled !== !1 && d.preventDefault();
2260
2260
  }
2261
- e.domElement.addEventListener("contextmenu", Ze, !1), e.domElement.addEventListener("mousedown", Ae, !1), e.domElement.addEventListener("wheel", Ue, !1), e.domElement.addEventListener("touchstart", Ne, !1), e.domElement.addEventListener("touchend", Ke, !1), e.domElement.addEventListener("touchmove", se, !1), e.domElement.addEventListener("keydown", Re, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2261
+ e.domElement.addEventListener("contextmenu", Ze, !1), e.domElement.addEventListener("mousedown", Ae, !1), e.domElement.addEventListener("wheel", Ue, !1), e.domElement.addEventListener("touchstart", Fe, !1), e.domElement.addEventListener("touchend", Ke, !1), e.domElement.addEventListener("touchmove", le, !1), e.domElement.addEventListener("keydown", Re, !1), e.domElement.tabIndex === -1 && (e.domElement.tabIndex = 0), this.update();
2262
2262
  };
2263
2263
  qe.prototype = Object.create(Jt.prototype);
2264
2264
  qe.prototype.constructor = qe;
2265
- var _t = function(h, o) {
2266
- qe.call(this, h, o), this.mouseButtons.LEFT = Me.PAN, this.mouseButtons.RIGHT = Me.ROTATE, this.touches.ONE = _e.PAN, this.touches.TWO = _e.DOLLY_ROTATE;
2265
+ var _t = function(f, o) {
2266
+ qe.call(this, f, o), this.mouseButtons.LEFT = Se.PAN, this.mouseButtons.RIGHT = Se.ROTATE, this.touches.ONE = _e.PAN, this.touches.TWO = _e.DOLLY_ROTATE;
2267
2267
  };
2268
2268
  _t.prototype = Object.create(Jt.prototype);
2269
2269
  _t.prototype.constructor = _t;
2270
- var xe = function(h) {
2271
- $t.call(this), this.element = h, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.addEventListener("removed", function() {
2270
+ var Pe = function(f) {
2271
+ $t.call(this), this.element = f, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.addEventListener("removed", function() {
2272
2272
  this.traverse(function(o) {
2273
2273
  o.element instanceof Element && o.element.parentNode !== null && o.element.parentNode.removeChild(o.element);
2274
2274
  });
2275
2275
  });
2276
2276
  };
2277
- xe.prototype = Object.create($t.prototype);
2278
- xe.prototype.constructor = xe;
2279
- var ut = function(h) {
2280
- xe.call(this, h);
2277
+ Pe.prototype = Object.create($t.prototype);
2278
+ Pe.prototype.constructor = Pe;
2279
+ var ut = function(f) {
2280
+ Pe.call(this, f);
2281
2281
  };
2282
- ut.prototype = Object.create(xe.prototype);
2282
+ ut.prototype = Object.create(Pe.prototype);
2283
2283
  ut.prototype.constructor = ut;
2284
2284
  var zn = function() {
2285
- var h = this, o, e, n, t, a = new Mn(), s = {
2285
+ var f = this, o, e, n, t, a = new Sn(), s = {
2286
2286
  camera: { fov: 0, style: "" },
2287
2287
  objects: /* @__PURE__ */ new WeakMap()
2288
2288
  }, l = document.createElement("div");
2289
2289
  l.style.overflow = "hidden", this.domElement = l;
2290
- var f = document.createElement("div");
2291
- f.style.WebkitTransformStyle = "preserve-3d", f.style.transformStyle = "preserve-3d", f.style.pointerEvents = "none", l.appendChild(f);
2290
+ var h = document.createElement("div");
2291
+ h.style.WebkitTransformStyle = "preserve-3d", h.style.transformStyle = "preserve-3d", h.style.pointerEvents = "none", l.appendChild(h);
2292
2292
  var c = /Trident/i.test(navigator.userAgent);
2293
2293
  this.getSize = function() {
2294
2294
  return {
2295
2295
  width: o,
2296
2296
  height: e
2297
2297
  };
2298
- }, this.setSize = function(T, b) {
2299
- o = T, e = b, n = o / 2, t = e / 2, l.style.width = T + "px", l.style.height = b + "px", f.style.width = T + "px", f.style.height = b + "px";
2298
+ }, this.setSize = function(b, y) {
2299
+ o = b, e = y, n = o / 2, t = e / 2, l.style.width = b + "px", l.style.height = y + "px", h.style.width = b + "px", h.style.height = y + "px";
2300
2300
  };
2301
- function g(T) {
2302
- return Math.abs(T) < 1e-10 ? 0 : T;
2303
- }
2304
- function y(T) {
2305
- var b = T.elements;
2306
- return "matrix3d(" + g(b[0]) + "," + g(-b[1]) + "," + g(b[2]) + "," + g(b[3]) + "," + g(b[4]) + "," + g(-b[5]) + "," + g(b[6]) + "," + g(b[7]) + "," + g(b[8]) + "," + g(-b[9]) + "," + g(b[10]) + "," + g(b[11]) + "," + g(b[12]) + "," + g(-b[13]) + "," + g(b[14]) + "," + g(b[15]) + ")";
2307
- }
2308
- function w(T, b) {
2309
- var P = T.elements, m = "matrix3d(" + g(P[0]) + "," + g(P[1]) + "," + g(P[2]) + "," + g(P[3]) + "," + g(-P[4]) + "," + g(-P[5]) + "," + g(-P[6]) + "," + g(-P[7]) + "," + g(P[8]) + "," + g(P[9]) + "," + g(P[10]) + "," + g(P[11]) + "," + g(P[12]) + "," + g(P[13]) + "," + g(P[14]) + "," + g(P[15]) + ")";
2310
- return c ? "translate(-50%,-50%)translate(" + n + "px," + t + "px)" + b + m : "translate(-50%,-50%)" + m;
2311
- }
2312
- function x(T, b, P, m) {
2313
- if (T instanceof xe) {
2314
- T.onBeforeRender(h, b, P);
2315
- var C;
2316
- T instanceof ut ? (a.copy(P.matrixWorldInverse), a.transpose(), a.copyPosition(T.matrixWorld), a.scale(T.scale), a.elements[3] = 0, a.elements[7] = 0, a.elements[11] = 0, a.elements[15] = 1, C = w(a, m)) : C = w(T.matrixWorld, m);
2317
- var _ = T.element, H = s.objects.get(T);
2318
- if (H === void 0 || H.style !== C) {
2319
- _.style.WebkitTransform = C, _.style.transform = C;
2320
- var G = { style: C };
2321
- c && (G.distanceToCameraSquared = A(P, T)), s.objects.set(T, G);
2322
- }
2323
- _.style.display = T.visible ? "" : "none", _.parentNode !== f && f.appendChild(_), T.onAfterRender(h, b, P);
2301
+ function g(b) {
2302
+ return Math.abs(b) < 1e-10 ? 0 : b;
2303
+ }
2304
+ function w(b) {
2305
+ var y = b.elements;
2306
+ return "matrix3d(" + g(y[0]) + "," + g(-y[1]) + "," + g(y[2]) + "," + g(y[3]) + "," + g(y[4]) + "," + g(-y[5]) + "," + g(y[6]) + "," + g(y[7]) + "," + g(y[8]) + "," + g(-y[9]) + "," + g(y[10]) + "," + g(y[11]) + "," + g(y[12]) + "," + g(-y[13]) + "," + g(y[14]) + "," + g(y[15]) + ")";
2307
+ }
2308
+ function P(b, y) {
2309
+ var A = b.elements, m = "matrix3d(" + g(A[0]) + "," + g(A[1]) + "," + g(A[2]) + "," + g(A[3]) + "," + g(-A[4]) + "," + g(-A[5]) + "," + g(-A[6]) + "," + g(-A[7]) + "," + g(A[8]) + "," + g(A[9]) + "," + g(A[10]) + "," + g(A[11]) + "," + g(A[12]) + "," + g(A[13]) + "," + g(A[14]) + "," + g(A[15]) + ")";
2310
+ return c ? "translate(-50%,-50%)translate(" + n + "px," + t + "px)" + y + m : "translate(-50%,-50%)" + m;
2311
+ }
2312
+ function T(b, y, A, m) {
2313
+ if (b instanceof Pe) {
2314
+ b.onBeforeRender(f, y, A);
2315
+ var _;
2316
+ b instanceof ut ? (a.copy(A.matrixWorldInverse), a.transpose(), a.copyPosition(b.matrixWorld), a.scale(b.scale), a.elements[3] = 0, a.elements[7] = 0, a.elements[11] = 0, a.elements[15] = 1, _ = P(a, m)) : _ = P(b.matrixWorld, m);
2317
+ var S = b.element, U = s.objects.get(b);
2318
+ if (U === void 0 || U.style !== _) {
2319
+ S.style.WebkitTransform = _, S.style.transform = _;
2320
+ var R = { style: _ };
2321
+ c && (R.distanceToCameraSquared = M(A, b)), s.objects.set(b, R);
2322
+ }
2323
+ S.style.display = b.visible ? "" : "none", S.parentNode !== h && h.appendChild(S), b.onAfterRender(f, y, A);
2324
2324
  }
2325
- for (var U = 0, Q = T.children.length; U < Q; U++)
2326
- x(T.children[U], b, P, m);
2325
+ for (var W = 0, Z = b.children.length; W < Z; W++)
2326
+ T(b.children[W], y, A, m);
2327
2327
  }
2328
- var A = (function() {
2329
- var T = new ye(), b = new ye();
2330
- return function(P, m) {
2331
- return T.setFromMatrixPosition(P.matrixWorld), b.setFromMatrixPosition(m.matrixWorld), T.distanceToSquared(b);
2328
+ var M = (function() {
2329
+ var b = new ye(), y = new ye();
2330
+ return function(A, m) {
2331
+ return b.setFromMatrixPosition(A.matrixWorld), y.setFromMatrixPosition(m.matrixWorld), b.distanceToSquared(y);
2332
2332
  };
2333
2333
  })();
2334
- function S(T) {
2335
- var b = [];
2336
- return T.traverse(function(P) {
2337
- P instanceof xe && b.push(P);
2338
- }), b;
2339
- }
2340
- function O(T) {
2341
- for (var b = S(T).sort(function(_, H) {
2342
- var G = s.objects.get(_).distanceToCameraSquared, U = s.objects.get(H).distanceToCameraSquared;
2343
- return G - U;
2344
- }), P = b.length, m = 0, C = b.length; m < C; m++)
2345
- b[m].element.style.zIndex = P - m;
2346
- }
2347
- this.render = function(T, b) {
2348
- var P = b.projectionMatrix.elements[5] * t;
2349
- if (s.camera.fov !== P && (b.isPerspectiveCamera ? (l.style.WebkitPerspective = P + "px", l.style.perspective = P + "px") : (l.style.WebkitPerspective = "", l.style.perspective = ""), s.camera.fov = P), T.autoUpdate === !0 && T.updateMatrixWorld(), b.parent === null && b.updateMatrixWorld(), b.isOrthographicCamera)
2350
- var m = -(b.right + b.left) / 2, C = (b.top + b.bottom) / 2;
2351
- var _ = b.isOrthographicCamera ? "scale(" + P + ")translate(" + g(m) + "px," + g(C) + "px)" + y(b.matrixWorldInverse) : "translateZ(" + P + "px)" + y(b.matrixWorldInverse), H = _ + "translate(" + n + "px," + t + "px)";
2352
- s.camera.style !== H && !c && (f.style.WebkitTransform = H, f.style.transform = H, s.camera.style = H), x(T, T, b, _), c && O(T);
2334
+ function x(b) {
2335
+ var y = [];
2336
+ return b.traverse(function(A) {
2337
+ A instanceof Pe && y.push(A);
2338
+ }), y;
2339
+ }
2340
+ function C(b) {
2341
+ for (var y = x(b).sort(function(S, U) {
2342
+ var R = s.objects.get(S).distanceToCameraSquared, W = s.objects.get(U).distanceToCameraSquared;
2343
+ return R - W;
2344
+ }), A = y.length, m = 0, _ = y.length; m < _; m++)
2345
+ y[m].element.style.zIndex = A - m;
2346
+ }
2347
+ this.render = function(b, y) {
2348
+ var A = y.projectionMatrix.elements[5] * t;
2349
+ if (s.camera.fov !== A && (y.isPerspectiveCamera ? (l.style.WebkitPerspective = A + "px", l.style.perspective = A + "px") : (l.style.WebkitPerspective = "", l.style.perspective = ""), s.camera.fov = A), b.autoUpdate === !0 && b.updateMatrixWorld(), y.parent === null && y.updateMatrixWorld(), y.isOrthographicCamera)
2350
+ var m = -(y.right + y.left) / 2, _ = (y.top + y.bottom) / 2;
2351
+ var S = y.isOrthographicCamera ? "scale(" + A + ")translate(" + g(m) + "px," + g(_) + "px)" + w(y.matrixWorldInverse) : "translateZ(" + A + "px)" + w(y.matrixWorldInverse), U = S + "translate(" + n + "px," + t + "px)";
2352
+ s.camera.style !== U && !c && (h.style.WebkitTransform = U, h.style.transform = U, s.camera.style = U), T(b, b, y, S), c && C(b);
2353
2353
  };
2354
2354
  };
2355
- function Zt(h, o, e) {
2355
+ function Zt(f, o, e) {
2356
2356
  var n = o.getBoundingClientRect(), t = n.top, a = n.left, s = n.width, l = n.height;
2357
- return new v.Vector2((h.x - a) / s * 2 - 1, -(h.y - t) / l * 2 + 1);
2357
+ return new v.Vector2((f.x - a) / s * 2 - 1, -(f.y - t) / l * 2 + 1);
2358
2358
  }
2359
2359
  var jn = (
2360
2360
  /** @class */
2361
- (function(h) {
2362
- he(o, h);
2361
+ (function(f) {
2362
+ he(o, f);
2363
2363
  function o(e, n, t, a, s) {
2364
- var l = h.call(this) || this;
2364
+ var l = f.call(this) || this;
2365
2365
  l.type = "RoundedBoxGeometry", s = isNaN(s) ? 1 : Math.max(1, Math.floor(s)), e = isNaN(e) ? 1 : e, n = isNaN(n) ? 1 : n, t = isNaN(t) ? 1 : t, a = isNaN(a) ? 0.15 : a, a = Math.min(a, Math.min(e, Math.min(n, Math.min(t))) / 2);
2366
- var f = e / 2 - a, c = n / 2 - a, g = t / 2 - a;
2366
+ var h = e / 2 - a, c = n / 2 - a, g = t / 2 - a;
2367
2367
  l.parameters = {
2368
2368
  width: e,
2369
2369
  height: n,
@@ -2371,12 +2371,12 @@ var jn = (
2371
2371
  radius: a,
2372
2372
  radiusSegments: s
2373
2373
  };
2374
- var y = s + 1, w = y * s + 1 << 3, x = new v.BufferAttribute(new Float32Array(w * 3), 3), A = new v.BufferAttribute(new Float32Array(w * 3), 3), S = [], O = [];
2374
+ var w = s + 1, P = w * s + 1 << 3, T = new v.BufferAttribute(new Float32Array(P * 3), 3), M = new v.BufferAttribute(new Float32Array(P * 3), 3), x = [], C = [];
2375
2375
  new v.Vector3();
2376
- var T = new v.Vector3(), b = [], P = [], m = [], C = y * s, _ = y * s + 1;
2377
- H(), U(), G(), Q(), le(), oe();
2378
- function H() {
2379
- for (var D = [
2376
+ var b = new v.Vector3(), y = [], A = [], m = [], _ = w * s, S = w * s + 1;
2377
+ U(), W(), R(), Z(), oe(), X();
2378
+ function U() {
2379
+ for (var I = [
2380
2380
  new v.Vector3(1, 1, 1),
2381
2381
  new v.Vector3(1, 1, -1),
2382
2382
  new v.Vector3(-1, 1, -1),
@@ -2385,37 +2385,37 @@ var jn = (
2385
2385
  new v.Vector3(1, -1, -1),
2386
2386
  new v.Vector3(-1, -1, -1),
2387
2387
  new v.Vector3(-1, -1, 1)
2388
- ], I = 0; I < 8; I++)
2389
- S.push([]), O.push([]);
2390
- for (var N = Math.PI / 2, B = new v.Vector3(f, c, g), Y = 0; Y <= s; Y++) {
2391
- var ae = Y / s, X = ae * N, R = Math.cos(X), ee = Math.sin(X);
2392
- if (Y == s) {
2393
- T.set(0, 1, 0);
2394
- var j = T.clone().multiplyScalar(a).add(B);
2395
- S[0].push(j), b.push(j);
2396
- var z = T.clone();
2397
- O[0].push(z), P.push(z);
2388
+ ], F = 0; F < 8; F++)
2389
+ x.push([]), C.push([]);
2390
+ for (var L = Math.PI / 2, D = new v.Vector3(h, c, g), G = 0; G <= s; G++) {
2391
+ var re = G / s, Q = re * L, V = Math.cos(Q), te = Math.sin(Q);
2392
+ if (G == s) {
2393
+ b.set(0, 1, 0);
2394
+ var Y = b.clone().multiplyScalar(a).add(D);
2395
+ x[0].push(Y), y.push(Y);
2396
+ var j = b.clone();
2397
+ C[0].push(j), A.push(j);
2398
2398
  continue;
2399
2399
  }
2400
- for (var L = 0; L <= s; L++) {
2401
- var ie = L / s, W = ie * N;
2402
- T.x = R * Math.cos(W), T.y = ee, T.z = R * Math.sin(W);
2403
- var j = T.clone().multiplyScalar(a).add(B);
2404
- S[0].push(j), b.push(j);
2405
- var z = T.clone().normalize();
2406
- O[0].push(z), P.push(z);
2400
+ for (var k = 0; k <= s; k++) {
2401
+ var se = k / s, K = se * L;
2402
+ b.x = V * Math.cos(K), b.y = te, b.z = V * Math.sin(K);
2403
+ var Y = b.clone().multiplyScalar(a).add(D);
2404
+ x[0].push(Y), y.push(Y);
2405
+ var j = b.clone().normalize();
2406
+ C[0].push(j), A.push(j);
2407
2407
  }
2408
2408
  }
2409
- for (var q = 1; q < 8; q++)
2410
- for (var I = 0; I < S[0].length; I++) {
2411
- var j = S[0][I].clone().multiply(D[q]);
2412
- S[q].push(j), b.push(j);
2413
- var z = O[0][I].clone().multiply(D[q]);
2414
- O[q].push(z), P.push(z);
2409
+ for (var J = 1; J < 8; J++)
2410
+ for (var F = 0; F < x[0].length; F++) {
2411
+ var Y = x[0][F].clone().multiply(I[J]);
2412
+ x[J].push(Y), y.push(Y);
2413
+ var j = C[0][F].clone().multiply(I[J]);
2414
+ C[J].push(j), A.push(j);
2415
2415
  }
2416
2416
  }
2417
- function G() {
2418
- for (var D = [
2417
+ function R() {
2418
+ for (var I = [
2419
2419
  !0,
2420
2420
  !1,
2421
2421
  !0,
@@ -2424,133 +2424,133 @@ var jn = (
2424
2424
  !0,
2425
2425
  !1,
2426
2426
  !0
2427
- ], I = y * (s - 1), N = 0; N < 8; N++) {
2428
- for (var B = _ * N, Y = 0; Y < s - 1; Y++)
2429
- for (var ae = Y * y, X = (Y + 1) * y, R = 0; R < s; R++) {
2430
- var ee = R + 1, j = B + ae + R, z = B + ae + ee, L = B + X + R, ie = B + X + ee;
2431
- D[N] ? (m.push(j), m.push(L), m.push(z), m.push(z), m.push(L), m.push(ie)) : (m.push(j), m.push(z), m.push(L), m.push(z), m.push(ie), m.push(L));
2427
+ ], F = w * (s - 1), L = 0; L < 8; L++) {
2428
+ for (var D = S * L, G = 0; G < s - 1; G++)
2429
+ for (var re = G * w, Q = (G + 1) * w, V = 0; V < s; V++) {
2430
+ var te = V + 1, Y = D + re + V, j = D + re + te, k = D + Q + V, se = D + Q + te;
2431
+ I[L] ? (m.push(Y), m.push(k), m.push(j), m.push(j), m.push(k), m.push(se)) : (m.push(Y), m.push(j), m.push(k), m.push(j), m.push(se), m.push(k));
2432
2432
  }
2433
- for (var R = 0; R < s; R++) {
2434
- var j = B + I + R, z = B + I + R + 1, L = B + C;
2435
- D[N] ? (m.push(j), m.push(L), m.push(z)) : (m.push(j), m.push(z), m.push(L));
2433
+ for (var V = 0; V < s; V++) {
2434
+ var Y = D + F + V, j = D + F + V + 1, k = D + _;
2435
+ I[L] ? (m.push(Y), m.push(k), m.push(j)) : (m.push(Y), m.push(j), m.push(k));
2436
2436
  }
2437
2437
  }
2438
2438
  }
2439
- function U() {
2440
- var D = C, I = C + _, N = C + _ * 2, B = C + _ * 3;
2441
- m.push(D), m.push(I), m.push(N), m.push(D), m.push(N), m.push(B), D = C + _ * 4, I = C + _ * 5, N = C + _ * 6, B = C + _ * 7, m.push(D), m.push(N), m.push(I), m.push(D), m.push(B), m.push(N), D = 0, I = _, N = _ * 4, B = _ * 5, m.push(D), m.push(N), m.push(I), m.push(I), m.push(N), m.push(B), D = _ * 2, I = _ * 3, N = _ * 6, B = _ * 7, m.push(D), m.push(N), m.push(I), m.push(I), m.push(N), m.push(B), D = s, I = s + _ * 3, N = s + _ * 4, B = s + _ * 7, m.push(D), m.push(I), m.push(N), m.push(I), m.push(B), m.push(N), D = s + _, I = s + _ * 2, N = s + _ * 5, B = s + _ * 6, m.push(D), m.push(N), m.push(I), m.push(I), m.push(N), m.push(B);
2442
- }
2443
- function Q() {
2444
- for (var D = 0; D < 4; D++)
2445
- for (var I = D * _, N = 4 * _ + I, B = (D & 1) === 1, Y = 0; Y < s; Y++) {
2446
- var ae = Y + 1, X = I + Y, R = I + ae, ee = N + Y, j = N + ae;
2447
- B ? (m.push(X), m.push(ee), m.push(R), m.push(R), m.push(ee), m.push(j)) : (m.push(X), m.push(R), m.push(ee), m.push(R), m.push(j), m.push(ee));
2439
+ function W() {
2440
+ var I = _, F = _ + S, L = _ + S * 2, D = _ + S * 3;
2441
+ m.push(I), m.push(F), m.push(L), m.push(I), m.push(L), m.push(D), I = _ + S * 4, F = _ + S * 5, L = _ + S * 6, D = _ + S * 7, m.push(I), m.push(L), m.push(F), m.push(I), m.push(D), m.push(L), I = 0, F = S, L = S * 4, D = S * 5, m.push(I), m.push(L), m.push(F), m.push(F), m.push(L), m.push(D), I = S * 2, F = S * 3, L = S * 6, D = S * 7, m.push(I), m.push(L), m.push(F), m.push(F), m.push(L), m.push(D), I = s, F = s + S * 3, L = s + S * 4, D = s + S * 7, m.push(I), m.push(F), m.push(L), m.push(F), m.push(D), m.push(L), I = s + S, F = s + S * 2, L = s + S * 5, D = s + S * 6, m.push(I), m.push(L), m.push(F), m.push(F), m.push(L), m.push(D);
2442
+ }
2443
+ function Z() {
2444
+ for (var I = 0; I < 4; I++)
2445
+ for (var F = I * S, L = 4 * S + F, D = (I & 1) === 1, G = 0; G < s; G++) {
2446
+ var re = G + 1, Q = F + G, V = F + re, te = L + G, Y = L + re;
2447
+ D ? (m.push(Q), m.push(te), m.push(V), m.push(V), m.push(te), m.push(Y)) : (m.push(Q), m.push(V), m.push(te), m.push(V), m.push(Y), m.push(te));
2448
2448
  }
2449
2449
  }
2450
- function oe() {
2451
- for (var D = [0, 2, 4, 6], I = [1, 3, 5, 7], N = 0; N < 4; N++)
2452
- for (var B = _ * D[N], Y = _ * I[N], ae = 1 >= N, X = 0; X < s; X++) {
2453
- var R = X * y, ee = (X + 1) * y, j = B + R, z = B + ee, L = Y + R, ie = Y + ee;
2454
- ae ? (m.push(j), m.push(L), m.push(z), m.push(z), m.push(L), m.push(ie)) : (m.push(j), m.push(z), m.push(L), m.push(z), m.push(ie), m.push(L));
2450
+ function X() {
2451
+ for (var I = [0, 2, 4, 6], F = [1, 3, 5, 7], L = 0; L < 4; L++)
2452
+ for (var D = S * I[L], G = S * F[L], re = 1 >= L, Q = 0; Q < s; Q++) {
2453
+ var V = Q * w, te = (Q + 1) * w, Y = D + V, j = D + te, k = G + V, se = G + te;
2454
+ re ? (m.push(Y), m.push(k), m.push(j), m.push(j), m.push(k), m.push(se)) : (m.push(Y), m.push(j), m.push(k), m.push(j), m.push(se), m.push(k));
2455
2455
  }
2456
2456
  }
2457
- function le() {
2458
- for (var D = s - 1, I = [0, 1, 4, 5], N = [3, 2, 7, 6], B = [0, 1, 1, 0], Y = 0; Y < 4; Y++)
2459
- for (var ae = I[Y] * _, X = N[Y] * _, R = 0; R <= D; R++) {
2460
- var ee = ae + s + R * y, j = ae + (R != D ? s + (R + 1) * y : _ - 1), z = X + s + R * y, L = X + (R != D ? s + (R + 1) * y : _ - 1);
2461
- B[Y] ? (m.push(ee), m.push(z), m.push(j), m.push(j), m.push(z), m.push(L)) : (m.push(ee), m.push(j), m.push(z), m.push(j), m.push(L), m.push(z));
2457
+ function oe() {
2458
+ for (var I = s - 1, F = [0, 1, 4, 5], L = [3, 2, 7, 6], D = [0, 1, 1, 0], G = 0; G < 4; G++)
2459
+ for (var re = F[G] * S, Q = L[G] * S, V = 0; V <= I; V++) {
2460
+ var te = re + s + V * w, Y = re + (V != I ? s + (V + 1) * w : S - 1), j = Q + s + V * w, k = Q + (V != I ? s + (V + 1) * w : S - 1);
2461
+ D[G] ? (m.push(te), m.push(j), m.push(Y), m.push(Y), m.push(j), m.push(k)) : (m.push(te), m.push(Y), m.push(j), m.push(Y), m.push(k), m.push(j));
2462
2462
  }
2463
2463
  }
2464
- for (var J = 0, Z = 0; Z < b.length; Z++)
2465
- x.setXYZ(J, b[Z].x, b[Z].y, b[Z].z), A.setXYZ(J, P[Z].x, P[Z].y, P[Z].z), J++;
2466
- return l.setIndex(new v.BufferAttribute(new Uint16Array(m), 1)), l.setAttribute("position", x), l.setAttribute("normal", A), l;
2464
+ for (var H = 0, q = 0; q < y.length; q++)
2465
+ T.setXYZ(H, y[q].x, y[q].y, y[q].z), M.setXYZ(H, A[q].x, A[q].y, A[q].z), H++;
2466
+ return l.setIndex(new v.BufferAttribute(new Uint16Array(m), 1)), l.setAttribute("position", T), l.setAttribute("normal", M), l;
2467
2467
  }
2468
2468
  return o;
2469
2469
  })(v.BufferGeometry)
2470
2470
  );
2471
- function Ye(h, o) {
2472
- return typeof h != "number" || typeof o != "number" ? !1 : Math.abs(h - o) < 1e-3;
2471
+ function Ye(f, o) {
2472
+ return typeof f != "number" || typeof o != "number" ? !1 : Math.abs(f - o) < 1e-3;
2473
2473
  }
2474
- function He(h, o, e, n) {
2474
+ function He(f, o, e, n) {
2475
2475
  n === void 0 && (n = function(a) {
2476
2476
  return a;
2477
2477
  });
2478
2478
  var t = n(e);
2479
- return h * (1 - t) + o * t;
2479
+ return f * (1 - t) + o * t;
2480
2480
  }
2481
- var re = Number((Math.PI / 2).toFixed(5));
2482
- function Gn(h, o, e) {
2481
+ var ie = Number((Math.PI / 2).toFixed(5));
2482
+ function Gn(f, o, e) {
2483
2483
  var n = new v.Shape();
2484
- return n.moveTo(e, 0), n.lineTo(h - e, 0), n.absarc(h - e, e, e, -re, 0, !1), n.lineTo(h, o - e), n.absarc(h - e, o - e, e, 0, re, !1), n.lineTo(e, o), n.absarc(e, o - e, e, re, Math.PI, !1), n.lineTo(0, e), n.absarc(e, e, e, Math.PI, Math.PI * 1.5, !1), n;
2484
+ return n.moveTo(e, 0), n.lineTo(f - e, 0), n.absarc(f - e, e, e, -ie, 0, !1), n.lineTo(f, o - e), n.absarc(f - e, o - e, e, 0, ie, !1), n.lineTo(e, o), n.absarc(e, o - e, e, ie, Math.PI, !1), n.lineTo(0, e), n.absarc(e, e, e, Math.PI, Math.PI * 1.5, !1), n;
2485
2485
  }
2486
- var We = function(h) {
2486
+ var We = function(f) {
2487
2487
  var o = document.createElement("div");
2488
- o.innerText = h;
2489
- var e = new xe(o);
2490
- return e.name = h, e.scale.set(0.3, 0.3, 0.3), o.style.pointerEvents = "none", o.style.backfaceVisibility = "hidden", e;
2491
- }, at = function(h) {
2488
+ o.innerText = f;
2489
+ var e = new Pe(o);
2490
+ return e.name = f, e.scale.set(0.3, 0.3, 0.3), o.style.pointerEvents = "none", o.style.backfaceVisibility = "hidden", e;
2491
+ }, it = function(f) {
2492
2492
  var o = new v.PlaneGeometry(5, 5), e = new v.MeshBasicMaterial({
2493
2493
  transparent: !0,
2494
2494
  opacity: 0
2495
2495
  }), n = new v.Mesh(o, e), t = document.createElement("div");
2496
- t.innerText = h;
2497
- var a = new xe(t);
2498
- return a.name = h, a.scale.set(0.3, 0.3, 0.3), t.style.color = "#ffffff", t.style.opacity = "0.5", t.style.pointerEvents = "none", t.style.backfaceVisibility = "hidden", n.rotateX(-re), n.add(a), n;
2496
+ t.innerText = f;
2497
+ var a = new Pe(t);
2498
+ return a.name = f, a.scale.set(0.3, 0.3, 0.3), t.style.color = "#ffffff", t.style.opacity = "0.5", t.style.pointerEvents = "none", t.style.backfaceVisibility = "hidden", n.rotateX(-ie), n.add(a), n;
2499
2499
  }, Yn = (
2500
2500
  /** @class */
2501
- (function(h) {
2502
- he(o, h);
2501
+ (function(f) {
2502
+ he(o, f);
2503
2503
  function o(e, n) {
2504
- var t = h.call(this, e) || this;
2504
+ var t = f.call(this, e) || this;
2505
2505
  t.camera = new An(90), t.scene = new v.Scene(), t.renderer = new v.WebGLRenderer({ antialias: !0, alpha: !0 }), t.css3drenderer = new zn(), t.ambientLight = new v.AmbientLight(16777215, 0.7), t.wrapper = document.createElement("div"), t.arrows = document.createElement("div"), t.arrowLeft = document.createElement("div"), t.arrowRight = document.createElement("div"), t.arrowFront = document.createElement("div"), t.arrowBack = document.createElement("div"), t.arrowTop = document.createElement("div"), t.arrowBottom = document.createElement("div"), t.spherical = null, t.dragging = !1, t.style = document.createElement("style"), t.directionalLight = new v.DirectionalLight(16777215, 0.2), t.box = new v.Mesh(new jn(8, 8, 8, 0.5, 20), new v.MeshPhongMaterial({ color: 16777215 })), t.faces = new v.Group(), t.orient = function(l) {
2506
- var f = l.longitude, c = l.latitude;
2506
+ var h = l.longitude, c = l.latitude;
2507
2507
  t.dragging = !1, t.spherical = null, t.controls.enableDamping = !1, t.five.setState(Object.assign({
2508
2508
  latitude: c
2509
- }, f !== void 0 ? {
2510
- longitude: f + t.config.fixedLongitude
2509
+ }, h !== void 0 ? {
2510
+ longitude: h + t.config.fixedLongitude
2511
2511
  } : {})), t.five.ready().then(function() {
2512
2512
  t.controls.enableDamping = !0, t.setState({ arrowsVisible: !0 });
2513
2513
  });
2514
2514
  }, t.onRenderFrame = function() {
2515
- var l, f, c, g, y;
2515
+ var l, h, c, g, w;
2516
2516
  if (t.renderer.render(t.scene, t.camera), t.css3drenderer.render(t.scene, t.camera), t.directionalLight.position.copy(t.camera.position), (l = t.controls) === null || l === void 0 || l.update(), t.dragging) {
2517
2517
  t.camera.computePose(), t.updateByCamera();
2518
- var w = t.camera.pose, x = w.longitude, A = w.latitude;
2519
- t.five.setState({ longitude: x, latitude: A }, !0), t.updateArrows({ longitude: x, latitude: A });
2520
- } else if (t.spherical && (!Ye(t.spherical.pi, (f = t.controls) === null || f === void 0 ? void 0 : f.getPolarAngle()) || !Ye(t.spherical.theta, (c = t.controls) === null || c === void 0 ? void 0 : c.getAzimuthalAngle()))) {
2521
- t.spherical = { pi: (g = t.controls) === null || g === void 0 ? void 0 : g.getPolarAngle(), theta: (y = t.controls) === null || y === void 0 ? void 0 : y.getAzimuthalAngle() }, t.camera.computePose(), t.updateByCamera();
2522
- var S = t.camera.pose, x = S.longitude, A = S.latitude;
2523
- t.five.setState({ longitude: x, latitude: A }, !0), t.updateArrows({ longitude: x, latitude: A });
2518
+ var P = t.camera.pose, T = P.longitude, M = P.latitude;
2519
+ t.five.setState({ longitude: T, latitude: M }, !0), t.updateArrows({ longitude: T, latitude: M });
2520
+ } else if (t.spherical && (!Ye(t.spherical.pi, (h = t.controls) === null || h === void 0 ? void 0 : h.getPolarAngle()) || !Ye(t.spherical.theta, (c = t.controls) === null || c === void 0 ? void 0 : c.getAzimuthalAngle()))) {
2521
+ t.spherical = { pi: (g = t.controls) === null || g === void 0 ? void 0 : g.getPolarAngle(), theta: (w = t.controls) === null || w === void 0 ? void 0 : w.getAzimuthalAngle() }, t.camera.computePose(), t.updateByCamera();
2522
+ var x = t.camera.pose, T = x.longitude, M = x.latitude;
2523
+ t.five.setState({ longitude: T, latitude: M }, !0), t.updateArrows({ longitude: T, latitude: M });
2524
2524
  } else
2525
2525
  t.spherical = null;
2526
2526
  }, t.onTapGesture = function(l) {
2527
- var f = l.pointers[0].clientX, c = l.pointers[0].clientY, g = Zt({ x: f, y: c }, t.wrapper), y = new v.Raycaster();
2528
- y.setFromCamera(g, t.camera);
2529
- var w = y.intersectObjects(t.faces.children, !1)[0];
2530
- if (w) {
2531
- var x = w.object.userData, A = x.longitude, S = x.latitude;
2532
- t.orient({ longitude: A, latitude: S });
2527
+ var h = l.pointers[0].clientX, c = l.pointers[0].clientY, g = Zt({ x: h, y: c }, t.wrapper), w = new v.Raycaster();
2528
+ w.setFromCamera(g, t.camera);
2529
+ var P = w.intersectObjects(t.faces.children, !1)[0];
2530
+ if (P) {
2531
+ var T = P.object.userData, M = T.longitude, x = T.latitude;
2532
+ t.orient({ longitude: M, latitude: x });
2533
2533
  }
2534
2534
  }, t.onFiveWantsGesture = function() {
2535
2535
  if (t.spherical)
2536
2536
  return !1;
2537
2537
  }, t.onFiveModeChange = function(l) {
2538
- t.controls && (t.controls.maxPolarAngle = l === "Topview" ? 0 : re);
2538
+ t.controls && (t.controls.maxPolarAngle = l === "Topview" ? 0 : ie);
2539
2539
  }, t.onCameraUpdate = function(l) {
2540
- var f = l.state;
2540
+ var h = l.state;
2541
2541
  if (!t.dragging && !t.spherical) {
2542
- var c = f.longitude, g = f.latitude;
2542
+ var c = h.longitude, g = h.latitude;
2543
2543
  t.camera.pose.longitude === c && t.camera.pose.latitude === g || (t.camera.setFromPose({ longitude: c, latitude: g, distance: 20, offset: new v.Vector3(0, 0, 0) }), t.updateByCamera(), t.updateArrows({ longitude: c, latitude: g }));
2544
2544
  }
2545
2545
  }, t.onPanStart = function(l) {
2546
2546
  t.dragging = !0, t.spherical = {};
2547
2547
  }, t.onMouseMove = function(l) {
2548
2548
  if (!t.dragging) {
2549
- var f = Zt({ x: l.clientX, y: l.clientY }, t.wrapper), c = new v.Raycaster();
2550
- c.setFromCamera(f, t.camera);
2549
+ var h = Zt({ x: l.clientX, y: l.clientY }, t.wrapper), c = new v.Raycaster();
2550
+ c.setFromCamera(h, t.camera);
2551
2551
  var g = c.intersectObjects(t.faces.children, !1)[0];
2552
- t.faces.children.forEach(function(y) {
2553
- y.material.opacity = 0, y.children[0].element.style.color = "";
2552
+ t.faces.children.forEach(function(w) {
2553
+ w.material.opacity = 0, w.children[0].element.style.color = "";
2554
2554
  }), g && (g.object.material.opacity = 0.3, g.object.children[0].element.style.color = "#336dff");
2555
2555
  }
2556
2556
  }, t.onPanEnd = function(l) {
@@ -2564,7 +2564,7 @@ var We = function(h) {
2564
2564
  arrowsVisible: !1
2565
2565
  };
2566
2566
  t.state = Object.assign(a, n == null ? void 0 : n.initialState);
2567
- var s = V({ fixedLongitude: 0, orthoView: !0 }, n == null ? void 0 : n.config);
2567
+ var s = z({ fixedLongitude: 0, orthoView: !0 }, n == null ? void 0 : n.config);
2568
2568
  return t._config = s, t.state.enabled && t._enable({ userAction: !1 }), t.mc = new Tt.Manager(t.wrapper), t.mc.add(new Tt.Tap({ interval: 410 })), t.mc.add(new Tt.Pan({ threshold: 10, pointers: 0 })), t.camera.setFromPose({
2569
2569
  distance: 20,
2570
2570
  offset: new v.Vector3(0, 0, 0),
@@ -2619,13 +2619,13 @@ var We = function(h) {
2619
2619
  }
2620
2620
  return Object.defineProperty(o.prototype, "config", {
2621
2621
  get: function() {
2622
- return V({}, this._config);
2622
+ return z({}, this._config);
2623
2623
  },
2624
2624
  enumerable: !1,
2625
2625
  configurable: !0
2626
2626
  }), o.prototype.updateState = function(e, n) {
2627
2627
  var t = this.state;
2628
- this.state = V(V({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
2628
+ this.state = z(z({}, this.state), e), typeof e.arrowsVisible == "boolean" && this.handleArrowsVisible(e.arrowsVisible), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
2629
2629
  }, o.prototype.appendTo = function(e) {
2630
2630
  if (e) {
2631
2631
  e.appendChild(this.wrapper);
@@ -2636,13 +2636,13 @@ var We = function(h) {
2636
2636
  this.renderer.setClearAlpha(0), this.renderer.domElement.style.outline = "none", this.initDom(), this.initFaces(), this.initControls(), this.initLights();
2637
2637
  var e = this.cylinder;
2638
2638
  e.position.y = -3;
2639
- var n = at("西");
2639
+ var n = it("西");
2640
2640
  n.position.set(-19, 0, 0), e.add(n);
2641
- var t = at("东");
2641
+ var t = it("东");
2642
2642
  t.position.set(19, 0, 0), e.add(t);
2643
- var a = at("北");
2643
+ var a = it("北");
2644
2644
  a.position.set(0, 0, -19), e.add(a);
2645
- var s = at("南");
2645
+ var s = it("南");
2646
2646
  s.position.set(0, 0, 19), e.add(s), this.updateByCamera(), this.scene.add(e, this.box, this.faces), this.scene.rotation.y = this.config.fixedLongitude;
2647
2647
  }, o.prototype.initDom = function() {
2648
2648
  this.style.innerHTML = `
@@ -2749,11 +2749,11 @@ var We = function(h) {
2749
2749
  }, o.prototype.bindEvents = function() {
2750
2750
  var e = this;
2751
2751
  this.five.on("renderFrame", this.onRenderFrame), this.five.on("camera.update", this.onCameraUpdate), this.five.on("wantsGesture", this.onFiveWantsGesture), this.five.on("modeChange", this.onFiveModeChange), this.mc.on("tap", this.onTapGesture), this.mc.on("panstart", this.onPanStart), this.mc.on("panend", this.onPanEnd), this.wrapper.addEventListener("mousemove", this.onMouseMove), this.arrowTop.onclick = function() {
2752
- return e.orient({ longitude: 0, latitude: re });
2752
+ return e.orient({ longitude: 0, latitude: ie });
2753
2753
  }, this.arrowLeft.onclick = function() {
2754
- return e.orient({ longitude: -re, latitude: 0 });
2754
+ return e.orient({ longitude: -ie, latitude: 0 });
2755
2755
  }, this.arrowRight.onclick = function() {
2756
- return e.orient({ longitude: re, latitude: 0 });
2756
+ return e.orient({ longitude: ie, latitude: 0 });
2757
2757
  }, this.arrowFront.onclick = function() {
2758
2758
  return e.orient({ longitude: 0, latitude: 0 });
2759
2759
  }, this.arrowBack.onclick = function() {
@@ -2775,19 +2775,19 @@ var We = function(h) {
2775
2775
  });
2776
2776
  this.cylinder.geometry = new v.CylinderGeometry(n, t, 0.01, 50, 1, !0), this.cylinder.material.uniforms.radiusTop.value = n, this.cylinder.material.uniforms.radiusBottom.value = t, this.cylinder.material.needsUpdate = !0, this.cylinder.children.forEach(function(l) {
2777
2777
  l.position.normalize().multiplyScalar(a), l.scale.set(e, e, e);
2778
- var f = l.children[0];
2779
- f && (f.element.style.opacity = s.toString());
2778
+ var h = l.children[0];
2779
+ h && (h.element.style.opacity = s.toString());
2780
2780
  });
2781
2781
  }, o.prototype.updateArrows = function(e) {
2782
2782
  e.longitude;
2783
- var n = e.latitude, t = re - n < 0.02;
2783
+ var n = e.latitude, t = ie - n < 0.02;
2784
2784
  this.setState({ arrowsVisible: t });
2785
2785
  }, o.prototype.handleArrowsVisible = function(e) {
2786
2786
  var n = this;
2787
2787
  if (this.state.enabled)
2788
2788
  if (this.cylinder.material.uniforms.opacity.value = e ? 0.4 : 1, this.cylinder.material.needsUpdate = !0, e) {
2789
2789
  var t = this.five.getCurrentState(), a = t.longitude, s = t.latitude;
2790
- if (re - s < 0.03)
2790
+ if (ie - s < 0.03)
2791
2791
  this.five.state.mode === "Topview" || this.five.state.mode === "Mapview" ? (this.faces.getObjectByName("上").element.className = "active", this.arrows.innerHTML = "", this.arrows.appendChild(this.arrowBack), this.arrows.appendChild(this.arrowLeft), this.arrows.appendChild(this.arrowRight), this.arrows.appendChild(this.arrowFront), this.arrows.style.transform = "rotate(".concat((a - this.config.fixedLongitude) / Math.PI * 180, "deg)")) : (this.arrows.innerHTML = "", this.faces.getObjectByName("上").element.className = "");
2792
2792
  else {
2793
2793
  switch (this.arrows.innerHTML = "", this.arrows.appendChild(this.arrowTop), this.config.orthoView && this.five.ready().then(function() {
@@ -2798,7 +2798,7 @@ var We = function(h) {
2798
2798
  case Ye(0, a - this.config.fixedLongitude):
2799
2799
  this.arrows.appendChild(this.arrowLeft), this.arrows.appendChild(this.arrowRight), this.arrows.appendChild(this.arrowBottom), this.faces.getObjectByName("前").element.className = "active";
2800
2800
  break;
2801
- case Ye(re, a - this.config.fixedLongitude):
2801
+ case Ye(ie, a - this.config.fixedLongitude):
2802
2802
  this.arrows.appendChild(this.arrowFront), this.arrows.appendChild(this.arrowBack), this.arrows.appendChild(this.arrowBottom), this.faces.getObjectByName("右").element.className = "active";
2803
2803
  break;
2804
2804
  case Ye(Math.PI, a - this.config.fixedLongitude):
@@ -2834,17 +2834,17 @@ var We = function(h) {
2834
2834
  var a = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2835
2835
  a.rotateY(Math.PI), a.position.z = -4.1, a.add(We("后")), a.userData = { longitude: Math.PI, latitude: 0 };
2836
2836
  var s = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2837
- s.rotateY(re), s.position.x = 4.1, s.add(We("右")), s.userData = { longitude: re, latitude: 0 };
2837
+ s.rotateY(ie), s.position.x = 4.1, s.add(We("右")), s.userData = { longitude: ie, latitude: 0 };
2838
2838
  var l = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2839
- l.rotateY(-re), l.position.x = -4.1, l.add(We("左")), l.userData = { longitude: -re, latitude: 0 };
2840
- var f = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2841
- f.rotateX(-re), f.position.y = 4.1, f.add(We("上")), f.userData = { longitude: 0, latitude: re }, this.faces.add(t, a, l, s, f);
2839
+ l.rotateY(-ie), l.position.x = -4.1, l.add(We("左")), l.userData = { longitude: -ie, latitude: 0 };
2840
+ var h = new v.Mesh(n, new v.MeshBasicMaterial({ transparent: !0, color: 3370495, opacity: 0 }));
2841
+ h.rotateX(-ie), h.position.y = 4.1, h.add(We("上")), h.userData = { longitude: 0, latitude: ie }, this.faces.add(t, a, l, s, h);
2842
2842
  }, o.prototype.initControls = function() {
2843
2843
  var e = this.controls = new qe(this.camera, this.renderer.domElement);
2844
- e.enableZoom = !1, e.enableDamping = !0, e.enablePan = !1, e.maxPolarAngle = re, e.dampingFactor = 0.15, e.rotateSpeed = 0.25;
2844
+ e.enableZoom = !1, e.enableDamping = !0, e.enablePan = !1, e.maxPolarAngle = ie, e.dampingFactor = 0.15, e.rotateSpeed = 0.25;
2845
2845
  }, o.prototype.load = function(e) {
2846
- return Le(this, void 0, void 0, function() {
2847
- return De(this, function(n) {
2846
+ return De(this, void 0, void 0, function() {
2847
+ return Ne(this, function(n) {
2848
2848
  return [
2849
2849
  2
2850
2850
  /*return*/
@@ -2870,14 +2870,14 @@ var We = function(h) {
2870
2870
  }
2871
2871
  }, o;
2872
2872
  })(Xe.Controller)
2873
- ), nr = function(h, o) {
2874
- return new Yn(h, o);
2873
+ ), nr = function(f, o) {
2874
+ return new Yn(f, o);
2875
2875
  }, Hn = (
2876
2876
  /** @class */
2877
- (function(h) {
2878
- he(o, h);
2877
+ (function(f) {
2878
+ he(o, f);
2879
2879
  function o(e, n) {
2880
- var t = h.call(this, e) || this;
2880
+ var t = f.call(this, e) || this;
2881
2881
  return t.data = {}, t.pluginName = "BackgroundPlugin", t._onFiveCameraUpdate = function(a) {
2882
2882
  var s = (Math.PI / 2 - Math.max(a.latitude, 0)) / (Math.PI / 2), l = Math.max(0.2 - s, 0) * 10;
2883
2883
  t.gradientBg && (t.gradientBg.style.transform = "translateY(-".concat((1 - s) * 50, "%)")), t.groundBg && (t.groundBg.style.backgroundImage = "radial-gradient(circle, #2E303350 ".concat(l * 100, "%, transparent ").concat(l * 120, "%)"));
@@ -2886,8 +2886,8 @@ var We = function(h) {
2886
2886
  }, t._removeEventListener = function() {
2887
2887
  t.five.off("cameraUpdate", t._onFiveCameraUpdate);
2888
2888
  }, t.load = function() {
2889
- return Le(t, void 0, void 0, function() {
2890
- return De(this, function(a) {
2889
+ return De(t, void 0, void 0, function() {
2890
+ return Ne(this, function(a) {
2891
2891
  return [
2892
2892
  2
2893
2893
  /*return*/
@@ -2905,8 +2905,8 @@ var We = function(h) {
2905
2905
  }
2906
2906
  t.state.enabled || (t._onFiveCameraUpdate(t.five.getPose(), !1), t.gradientBg && s.appendChild(t.gradientBg), t.groundBg && s.appendChild(t.groundBg), t.style && document.head.appendChild(t.style), t._addEventListener(), t.hooks.emit("enable", { userAction: !0 }), t.state.enabled = !0);
2907
2907
  }, t.disable = function(a) {
2908
- var s, l, f, c;
2909
- t.state.enabled && ((l = (s = t.gradientBg) === null || s === void 0 ? void 0 : s.parentNode) === null || l === void 0 || l.removeChild(t.gradientBg), (c = (f = t.groundBg) === null || f === void 0 ? void 0 : f.parentNode) === null || c === void 0 || c.removeChild(t.groundBg), t.style && document.head.removeChild(t.style), t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1);
2908
+ var s, l, h, c;
2909
+ t.state.enabled && ((l = (s = t.gradientBg) === null || s === void 0 ? void 0 : s.parentNode) === null || l === void 0 || l.removeChild(t.gradientBg), (c = (h = t.groundBg) === null || h === void 0 ? void 0 : h.parentNode) === null || c === void 0 || c.removeChild(t.groundBg), t.style && document.head.removeChild(t.style), t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1);
2910
2910
  }, t.dispose = function() {
2911
2911
  t._removeEventListener(), t.hooks.emit("disable", { userAction: !0 }), t.state.enabled = !1;
2912
2912
  }, t.state = {
@@ -2935,9 +2935,9 @@ var We = function(h) {
2935
2935
  `, t.enable()), t;
2936
2936
  }
2937
2937
  return o;
2938
- })(Ct.Controller)
2939
- ), rr = function(h, o) {
2940
- return new Hn(h, o);
2938
+ })(Ot.Controller)
2939
+ ), rr = function(f, o) {
2940
+ return new Hn(f, o);
2941
2941
  };
2942
2942
  new v.Matrix4().fromArray([
2943
2943
  1,
@@ -2957,13 +2957,13 @@ new v.Matrix4().fromArray([
2957
2957
  0,
2958
2958
  1
2959
2959
  ]);
2960
- var xt = (
2960
+ var Pt = (
2961
2961
  /** @class */
2962
2962
  (function() {
2963
- function h(o, e, n, t, a) {
2963
+ function f(o, e, n, t, a) {
2964
2964
  this.R = o, this.Q = e, this.A = n, this.B = t, this.C = a, this.cov = NaN, this.x = NaN;
2965
2965
  }
2966
- return h.prototype.filter = function(o, e) {
2966
+ return f.prototype.filter = function(o, e) {
2967
2967
  if (e === void 0 && (e = 0), isNaN(this.x))
2968
2968
  this.x = 1 / this.C * o, this.cov = 1 / this.C * this.Q * (1 / this.C);
2969
2969
  else {
@@ -2971,14 +2971,14 @@ var xt = (
2971
2971
  this.x = n + a * (o - this.C * n), this.cov = t - a * this.C * t;
2972
2972
  }
2973
2973
  return this.x;
2974
- }, h;
2974
+ }, f;
2975
2975
  })()
2976
2976
  ), Wn = (
2977
2977
  /** @class */
2978
- (function(h) {
2979
- he(o, h);
2978
+ (function(f) {
2979
+ he(o, f);
2980
2980
  function o(e, n) {
2981
- var t = h.call(this, e) || this;
2981
+ var t = f.call(this, e) || this;
2982
2982
  t.dispose = function() {
2983
2983
  t.disable();
2984
2984
  }, t.five = e;
@@ -2987,7 +2987,7 @@ var xt = (
2987
2987
  visible: !0
2988
2988
  };
2989
2989
  t.state = Object.assign(a, n == null ? void 0 : n.initialState);
2990
- var s = V({}, n == null ? void 0 : n.config);
2990
+ var s = z({}, n == null ? void 0 : n.config);
2991
2991
  return t._config = s, t.state.enabled && t._enable({ userAction: !1 }), t.cancelAnimation = null, t.skipStart = 0, t.skipEnd = 0, t.location = 0, t.totalDistance = 0, t.trajectory = null, t.currentKeyFrame = null, t.nextKeyframe = null, t.nextButOneKeyframe = null, t.keyframes = [], t.rate = t.config.rate || 1, t.virualCamera = t.five.camera.clone(), t.playingState = {
2992
2992
  keyframeIndex: null,
2993
2993
  progress: null
@@ -3004,16 +3004,16 @@ var xt = (
3004
3004
  }
3005
3005
  return Object.defineProperty(o.prototype, "config", {
3006
3006
  get: function() {
3007
- return V({}, this._config);
3007
+ return z({}, this._config);
3008
3008
  },
3009
3009
  enumerable: !1,
3010
3010
  configurable: !0
3011
3011
  }), o.prototype.updateState = function(e, n) {
3012
3012
  var t = this.state;
3013
- this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3013
+ this.state = z(z({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3014
3014
  }, o.prototype.load = function(e) {
3015
- return Le(this, void 0, void 0, function() {
3016
- return De(this, function(n) {
3015
+ return De(this, void 0, void 0, function() {
3016
+ return Ne(this, function(n) {
3017
3017
  return [
3018
3018
  2
3019
3019
  /*return*/
@@ -3022,25 +3022,25 @@ var xt = (
3022
3022
  });
3023
3023
  }, o.prototype.loadTrajectory = function(e) {
3024
3024
  this.trajectory = e, this.cancelAnimation && this.cancelAnimation(), this.playingState.keyframeIndex = null, this.playingState.progress = null;
3025
- var n = 0.01, t = 0.1, a = 1, s = 0, l = 1, f = new xt(n, t, a, s, l), c = new xt(n, t, a, s, l), g = new xt(n, t, a, s, l);
3025
+ var n = 0.01, t = 0.1, a = 1, s = 0, l = 1, h = new Pt(n, t, a, s, l), c = new Pt(n, t, a, s, l), g = new Pt(n, t, a, s, l);
3026
3026
  if (this.trajectory && this.trajectory.content.loadState === "READY") {
3027
- for (var y = this.trajectory.content.data.positionArray, w = new Float32Array(y.length / 3), x = 0; x < w.length; x++)
3028
- if (x === 0)
3029
- w[x] = 0;
3027
+ for (var w = this.trajectory.content.data.positionArray, P = new Float32Array(w.length / 3), T = 0; T < P.length; T++)
3028
+ if (T === 0)
3029
+ P[T] = 0;
3030
3030
  else {
3031
- var A = new v.Vector3(y[x - 3], y[x - 2], y[x - 1]), S = new v.Vector3(y[x], y[x + 1], y[x + 2]);
3032
- w[x] = S.distanceTo(A) + w[x - 1];
3031
+ var M = new v.Vector3(w[T - 3], w[T - 2], w[T - 1]), x = new v.Vector3(w[T], w[T + 1], w[T + 2]);
3032
+ P[T] = x.distanceTo(M) + P[T - 1];
3033
3033
  }
3034
- this.totalDistance = w[w.length - 1];
3035
- for (var x = 0; x < w.length; x++) {
3036
- for (var O = new v.Vector3(0, 0, 0), T = 0, b = x - 5; b < x + 6; b++)
3037
- b >= 0 && b < w.length && (O.add(new v.Vector3(y[b * 3], y[b * 3 + 1], y[b * 3 + 2])), T++);
3038
- O.divideScalar(T).applyMatrix4(e.transform);
3039
- var P = f.filter(O.x), m = c.filter(O.y), C = g.filter(O.z), _ = {
3040
- position: new v.Vector3(P, m, C),
3041
- location: w[x]
3034
+ this.totalDistance = P[P.length - 1];
3035
+ for (var T = 0; T < P.length; T++) {
3036
+ for (var C = new v.Vector3(0, 0, 0), b = 0, y = T - 5; y < T + 6; y++)
3037
+ y >= 0 && y < P.length && (C.add(new v.Vector3(w[y * 3], w[y * 3 + 1], w[y * 3 + 2])), b++);
3038
+ C.divideScalar(b).applyMatrix4(e.transform);
3039
+ var A = h.filter(C.x), m = c.filter(C.y), _ = g.filter(C.z), S = {
3040
+ position: new v.Vector3(A, m, _),
3041
+ location: P[T]
3042
3042
  };
3043
- this.keyframes.push(_);
3043
+ this.keyframes.push(S);
3044
3044
  }
3045
3045
  } else
3046
3046
  throw new Error("trajectory content is not ready");
@@ -3055,22 +3055,22 @@ var xt = (
3055
3055
  keyframeIndex: null,
3056
3056
  progress: null
3057
3057
  };
3058
- this.playingState.keyframeIndex !== null && this.playingState.progress !== null ? (t.keyframeIndex = this.playingState.keyframeIndex, t.progress = this.playingState.progress) : this.playingState.keyframeIndex === null && this.playingState.progress === null && (this.playingState.keyframeIndex = this.skipStart, this.playingState.progress = 0, this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()), this.virualCamera.lookAt(this.keyframes[1].position.clone()), this.virualCamera.computePose(), this.five.setState(V({}, this.virualCamera.pose)));
3058
+ this.playingState.keyframeIndex !== null && this.playingState.progress !== null ? (t.keyframeIndex = this.playingState.keyframeIndex, t.progress = this.playingState.progress) : this.playingState.keyframeIndex === null && this.playingState.progress === null && (this.playingState.keyframeIndex = this.skipStart, this.playingState.progress = 0, this.virualCamera.position.copy(this.keyframes[this.playingState.keyframeIndex].position.clone()), this.virualCamera.lookAt(this.keyframes[1].position.clone()), this.virualCamera.computePose(), this.five.setState(z({}, this.virualCamera.pose)));
3059
3059
  var a = this.playingState.keyframeIndex, s = 0;
3060
- this.cancelAnimation = ct.shared.add(function(l, f) {
3060
+ this.cancelAnimation = ct.shared.add(function(l, h) {
3061
3061
  if (a === n - 1 - e.skipEnd && e.cancelAnimation) {
3062
3062
  e.cancelAnimation();
3063
3063
  return;
3064
3064
  }
3065
3065
  e.currentKeyFrame = e.keyframes[a], e.nextKeyframe = e.keyframes[a + 1], a + 2 <= n - 1 ? e.nextButOneKeyframe = e.keyframes[a + 2] : e.nextButOneKeyframe = null;
3066
- var c = e.currentKeyFrame.position.clone(), g = e.nextKeyframe.position.clone(), y = e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(), w = c.clone().add(y.clone().multiplyScalar(0.01)), x = new v.Vector3();
3067
- e.nextButOneKeyframe !== null ? x = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : x.copy(y);
3068
- var A = g.clone().add(x.clone().multiplyScalar(0.01));
3069
- s += f / 1e3 * e.rate;
3070
- var S = s / c.distanceTo(g);
3071
- S = S >= 1 ? 1 : S, t.keyframeIndex !== null && t.progress !== null && (S = t.progress, t.keyframeIndex = null, t.progress = null);
3072
- var O = c.clone().lerp(g, S), T = w.clone().lerp(A, S);
3073
- e.virualCamera.position.copy(O), e.virualCamera.lookAt(T), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(V({}, e.virualCamera.pose)), e.location = e.keyframes[a].location + c.clone().distanceTo(O), S === 1 ? (s = 0, a++, e.playingState.keyframeIndex = a, e.playingState.progress = 0) : (e.playingState.keyframeIndex = a, e.playingState.progress = S);
3066
+ var c = e.currentKeyFrame.position.clone(), g = e.nextKeyframe.position.clone(), w = e.nextKeyframe.position.clone().sub(e.currentKeyFrame.position.clone()).normalize(), P = c.clone().add(w.clone().multiplyScalar(0.01)), T = new v.Vector3();
3067
+ e.nextButOneKeyframe !== null ? T = e.nextButOneKeyframe.position.clone().sub(e.nextKeyframe.position.clone()).normalize() : T.copy(w);
3068
+ var M = g.clone().add(T.clone().multiplyScalar(0.01));
3069
+ s += h / 1e3 * e.rate;
3070
+ var x = s / c.distanceTo(g);
3071
+ x = x >= 1 ? 1 : x, t.keyframeIndex !== null && t.progress !== null && (x = t.progress, t.keyframeIndex = null, t.progress = null);
3072
+ var C = c.clone().lerp(g, x), b = P.clone().lerp(M, x);
3073
+ e.virualCamera.position.copy(C), e.virualCamera.lookAt(b), e.virualCamera.updateMatrixWorld(), e.virualCamera.updateMatrix(), e.virualCamera.computePose(), e.five.setState(z({}, e.virualCamera.pose)), e.location = e.keyframes[a].location + c.clone().distanceTo(C), x === 1 ? (s = 0, a++, e.playingState.keyframeIndex = a, e.playingState.progress = 0) : (e.playingState.keyframeIndex = a, e.playingState.progress = x);
3074
3074
  });
3075
3075
  }, o.prototype.pause = function() {
3076
3076
  this.cancelAnimation && this.cancelAnimation();
@@ -3104,11 +3104,11 @@ var xt = (
3104
3104
  }
3105
3105
  }, o;
3106
3106
  })(Xe.Controller)
3107
- ), ir = function(h, o) {
3108
- return new Wn(h, o);
3107
+ ), ar = function(f, o) {
3108
+ return new Wn(f, o);
3109
3109
  };
3110
- function Qt(h, o, e) {
3111
- return h < o ? o : h > e ? e : h;
3110
+ function Qt(f, o, e) {
3111
+ return f < o ? o : f > e ? e : f;
3112
3112
  }
3113
3113
  var Xn = (
3114
3114
  /* glsl */
@@ -3143,16 +3143,16 @@ void main() {
3143
3143
  gl_FragColor.a = gl_FragColor.a * opacity;
3144
3144
  }
3145
3145
  `
3146
- ), Kn = [1, 5, 2, 6, 3, 7, 4, 8, 9, 13, 10, 14, 11, 15, 12, 16], Pt = 512, At = 512, ot = 128, Zn = (
3146
+ ), Kn = [1, 5, 2, 6, 3, 7, 4, 8, 9, 13, 10, 14, 11, 15, 12, 16], Mt = 512, At = 512, ot = 128, Zn = (
3147
3147
  /** @class */
3148
- (function(h) {
3149
- he(o, h);
3148
+ (function(f) {
3149
+ he(o, f);
3150
3150
  function o(e, n) {
3151
- var t = h.call(this, e) || this;
3151
+ var t = f.call(this, e) || this;
3152
3152
  t.group = new v.Group(), t.mesh = (function() {
3153
3153
  var l = new v.CylinderGeometry(0.12, 0.12, 1, 32, 1, !0);
3154
3154
  l.translate(0, 0.5, 0);
3155
- var f = new v.ShaderMaterial({
3155
+ var h = new v.ShaderMaterial({
3156
3156
  vertexShader: Xn,
3157
3157
  fragmentShader: qn,
3158
3158
  uniforms: {
@@ -3162,22 +3162,22 @@ void main() {
3162
3162
  },
3163
3163
  transparent: !0,
3164
3164
  depthTest: !1
3165
- }), c = new v.Mesh(l, f);
3165
+ }), c = new v.Mesh(l, h);
3166
3166
  return c;
3167
- })(), t.panoMesh = new Sn({ scale: 1.5 }), t.stop = function() {
3168
- }, t.drawLine = function(l, f) {
3167
+ })(), t.panoMesh = new xn({ scale: 1.5 }), t.stop = function() {
3168
+ }, t.drawLine = function(l, h) {
3169
3169
  if (t.ctx) {
3170
3170
  var c = (function() {
3171
- var w, x = Pt / 16 | 0;
3172
- return x * ((w = Kn[l]) !== null && w !== void 0 ? w : 0);
3173
- })(), g = (1 - (f + l * 150) % 1200 / 1200) * (At + ot), y = t.ctx.createLinearGradient(0, g - ot, 0, g);
3174
- y.addColorStop(0, "rgba(255,255,255,0)"), y.addColorStop(0.5, "rgba(255,255,255,1)"), y.addColorStop(1, "rgba(255,255,255,0)"), t.ctx.fillStyle = y, t.ctx.fillRect(c, g - ot, 3, ot);
3171
+ var P, T = Mt / 16 | 0;
3172
+ return T * ((P = Kn[l]) !== null && P !== void 0 ? P : 0);
3173
+ })(), g = (1 - (h + l * 150) % 1200 / 1200) * (At + ot), w = t.ctx.createLinearGradient(0, g - ot, 0, g);
3174
+ w.addColorStop(0, "rgba(255,255,255,0)"), w.addColorStop(0.5, "rgba(255,255,255,1)"), w.addColorStop(1, "rgba(255,255,255,0)"), t.ctx.fillStyle = w, t.ctx.fillRect(c, g - ot, 3, ot);
3175
3175
  }
3176
3176
  }, t.anime = function(l) {
3177
3177
  if (t.ctx && t.startTime) {
3178
- t.ctx.clearRect(0, 0, Pt, At);
3179
- for (var f = 0; f < 16; f++)
3180
- t.drawLine(f, l - t.startTime);
3178
+ t.ctx.clearRect(0, 0, Mt, At);
3179
+ for (var h = 0; h < 16; h++)
3180
+ t.drawLine(h, l - t.startTime);
3181
3181
  var c = Qt((l - t.startTime) / 1e3, 0, 1), g = Qt((l - t.startTime) / 300, 0, t.config.maxOpacity);
3182
3182
  t.panoMesh.setOpacity(g), t.mesh.material.uniforms.progress.value = c, t.mesh.material.uniforms.opacity.value = g, t.mesh.material.uniforms.map.value.needsUpdate = !0, t.five.needsRender = !0;
3183
3183
  }
@@ -3189,26 +3189,26 @@ void main() {
3189
3189
  visible: !0
3190
3190
  };
3191
3191
  t.state = Object.assign(a, n == null ? void 0 : n.initialState);
3192
- var s = V(V({}, n == null ? void 0 : n.config), { maxOpacity: 1 });
3193
- return t._config = s, typeof document == "undefined" || (t.canvas = document.createElement("canvas"), t.ctx = t.canvas.getContext("2d"), t.canvas.width = Pt, t.canvas.height = At, t.ctx.shadowColor = "rgba(255,255,255,0.5)", t.ctx.shadowBlur = 6, t.ctx.shadowOffsetX = 0, t.ctx.shadowOffsetY = 0, t.mesh.material.uniforms.map.value = new v.CanvasTexture(t.canvas), t.group.add(t.mesh), t.panoMesh.setProgress(1), t.panoMesh.setOpacity(0), t.group.add(t.panoMesh), t.state.enabled && t._enable({ userAction: !1 })), t;
3192
+ var s = z(z({}, n == null ? void 0 : n.config), { maxOpacity: 1 });
3193
+ return t._config = s, typeof document == "undefined" || (t.canvas = document.createElement("canvas"), t.ctx = t.canvas.getContext("2d"), t.canvas.width = Mt, t.canvas.height = At, t.ctx.shadowColor = "rgba(255,255,255,0.5)", t.ctx.shadowBlur = 6, t.ctx.shadowOffsetX = 0, t.ctx.shadowOffsetY = 0, t.mesh.material.uniforms.map.value = new v.CanvasTexture(t.canvas), t.group.add(t.mesh), t.panoMesh.setProgress(1), t.panoMesh.setOpacity(0), t.group.add(t.panoMesh), t.state.enabled && t._enable({ userAction: !1 })), t;
3194
3194
  }
3195
3195
  return Object.defineProperty(o.prototype, "config", {
3196
3196
  get: function() {
3197
- return V({}, this._config);
3197
+ return z({}, this._config);
3198
3198
  },
3199
3199
  enumerable: !1,
3200
3200
  configurable: !0
3201
3201
  }), o.prototype.updateState = function(e, n) {
3202
3202
  var t = this.state;
3203
- this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3203
+ this.state = z(z({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3204
3204
  }, o.prototype.updateConfig = function(e, n) {
3205
3205
  var t;
3206
3206
  n === void 0 && (n = {});
3207
- var a = this.config, s = V(V({}, a), e);
3207
+ var a = this.config, s = z(z({}, a), e);
3208
3208
  this._config = s, this.hooks.emit("configChange", { prevConfig: a, config: s, userAction: (t = n.userAction) !== null && t !== void 0 ? t : !0 });
3209
3209
  }, o.prototype.load = function(e) {
3210
- return Le(this, void 0, void 0, function() {
3211
- return De(this, function(n) {
3210
+ return De(this, void 0, void 0, function() {
3211
+ return Ne(this, function(n) {
3212
3212
  return [
3213
3213
  2
3214
3214
  /*return*/
@@ -3244,15 +3244,15 @@ void main() {
3244
3244
  e.enabled ? this._enable(s) : this._disable(s);
3245
3245
  }
3246
3246
  }, o;
3247
- })(Ct.Controller)
3248
- ), ar = function(h, o) {
3249
- return new Zn(h, o);
3250
- }, Ot = (
3247
+ })(Ot.Controller)
3248
+ ), ir = function(f, o) {
3249
+ return new Zn(f, o);
3250
+ }, Ct = (
3251
3251
  /** @class */
3252
- (function(h) {
3253
- he(o, h);
3252
+ (function(f) {
3253
+ he(o, f);
3254
3254
  function o() {
3255
- var e = h.call(this) || this;
3255
+ var e = f.call(this) || this;
3256
3256
  e.type = "LineSegmentsGeometry";
3257
3257
  var n = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], t = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], a = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
3258
3258
  return e.setIndex(a), e.setAttribute("position", new v.Float32BufferAttribute(n, 3)), e.setAttribute("uv", new v.Float32BufferAttribute(t, 2)), e;
@@ -3296,7 +3296,7 @@ void main() {
3296
3296
  if (e !== void 0 && n !== void 0) {
3297
3297
  var t = this.boundingSphere.center;
3298
3298
  this.boundingBox.getCenter(t);
3299
- for (var a = 0, s = new v.Vector3(), l = 0, f = e.count; l < f; l++)
3299
+ for (var a = 0, s = new v.Vector3(), l = 0, h = e.count; l < h; l++)
3300
3300
  s.fromBufferAttribute(e, l), a = Math.max(a, t.distanceToSquared(s)), s.fromBufferAttribute(n, l), a = Math.max(a, t.distanceToSquared(s));
3301
3301
  this.boundingSphere.radius = Math.sqrt(a), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
3302
3302
  }
@@ -3304,8 +3304,8 @@ void main() {
3304
3304
  }, o;
3305
3305
  })(v.InstancedBufferGeometry)
3306
3306
  );
3307
- Object.assign(Ot.prototype, { isLineSegmentsGeometry: !0 });
3308
- var St = {
3307
+ Object.assign(Ct.prototype, { isLineSegmentsGeometry: !0 });
3308
+ var xt = {
3309
3309
  uniforms: v.UniformsUtils.merge([
3310
3310
  v.UniformsLib.common,
3311
3311
  v.UniformsLib.fog,
@@ -3326,8 +3326,12 @@ var St = {
3326
3326
  // 波动频率
3327
3327
  waveDir: { value: 2 },
3328
3328
  // 波动方向控制:0=无, 1=X, 2=Y, 3=Z
3329
- startOffset: { value: 0 }
3329
+ startOffset: { value: 0 },
3330
3330
  // 新起点的偏移距离
3331
+ endOffset: { value: 0 },
3332
+ // 新增:终点偏移距离
3333
+ range: { value: 0.3 }
3334
+ // 流光过渡范围
3331
3335
  }
3332
3336
  ]),
3333
3337
  vertexShader: `
@@ -3345,6 +3349,7 @@ var St = {
3345
3349
  uniform float waveFreq;
3346
3350
  uniform float waveDir;
3347
3351
  uniform float startOffset;
3352
+ uniform float endOffset; // 新增
3348
3353
 
3349
3354
  attribute vec3 instanceStart;
3350
3355
  attribute vec3 instanceEnd;
@@ -3390,7 +3395,8 @@ var St = {
3390
3395
  if (waveDir > 0.5) { // 0 表示不波动
3391
3396
  float adjustedDistanceStart = max(0.0, instanceDistanceStart - startOffset);
3392
3397
  float adjustedDistanceEnd = max(0.0, instanceDistanceEnd - startOffset);
3393
- float adjustedTotalLength = max(0.01, totalLength - startOffset);
3398
+ float adjustedTotalLength = totalLength - startOffset - endOffset;
3399
+ adjustedTotalLength = max(0.01, adjustedTotalLength);
3394
3400
  float phaseStart = adjustedDistanceStart / adjustedTotalLength;
3395
3401
  float phaseEnd = adjustedDistanceEnd / adjustedTotalLength;
3396
3402
  float waveStart = sin(phaseStart * waveFreq - time * 2.0) * waveAmp;
@@ -3445,11 +3451,12 @@ var St = {
3445
3451
  vec4 clip = (position.y < 0.5) ? clipStart : clipEnd;
3446
3452
  offset *= clip.w;
3447
3453
  clip.xy += offset;
3448
-
3454
+
3449
3455
  gl_Position = clip;
3450
3456
 
3451
3457
  float adjustedDistanceEnd = max(0.0, instanceDistanceEnd - startOffset);
3452
- float adjustedTotalLength = max(0.01, totalLength - startOffset);
3458
+ float adjustedTotalLength = totalLength - startOffset - endOffset;
3459
+ adjustedTotalLength = max(0.01, adjustedTotalLength);
3453
3460
  vDistanceProgress = adjustedDistanceEnd / adjustedTotalLength;
3454
3461
 
3455
3462
  #include <logdepthbuf_vertex>
@@ -3461,6 +3468,7 @@ var St = {
3461
3468
  uniform vec3 diffuse;
3462
3469
  uniform float opacity;
3463
3470
  uniform float animationProgress;
3471
+ uniform float range;
3464
3472
  varying float vDistanceProgress;
3465
3473
 
3466
3474
  #ifdef USE_DASH
@@ -3497,33 +3505,46 @@ var St = {
3497
3505
 
3498
3506
  gl_FragColor = vec4(diffuseColor.rgb, diffuseColor.a);
3499
3507
 
3500
- float range = 0.3;
3501
- float alpha = 0.0;
3502
- float diff = abs(vDistanceProgress - animationProgress);
3503
- diff = min(diff, 1.0 - diff);
3504
- if (diff < range) {
3505
- alpha = 1.0 - diff / range;
3508
+ // 裁剪超出终点的部分
3509
+ if (vDistanceProgress > 1.0) {
3510
+ discard;
3506
3511
  }
3507
- if (vDistanceProgress > 0.9) {
3508
- alpha = min(alpha, (1.0 - vDistanceProgress) / 0.1);
3512
+
3513
+ float alpha = 0.0;
3514
+ float diff = (1.0 - 2.0 * range) * vDistanceProgress + range - animationProgress;
3515
+ // 使用绝对值计算,在animationProgress前后range范围内过渡
3516
+ if (abs(diff) < range) {
3517
+ alpha = 1.0 - abs(diff) / range;
3518
+ } else {
3519
+ alpha = 0.0;
3509
3520
  }
3521
+
3510
3522
  alpha = clamp(alpha, 0.0, 1.0);
3511
3523
  gl_FragColor.a = alpha;
3512
3524
 
3525
+ //增加开头和结尾的渐变alpha遮罩,长度为0.1
3526
+ float startFadeLength = 0.05;
3527
+ if (vDistanceProgress < startFadeLength) {
3528
+ gl_FragColor.a *= vDistanceProgress / startFadeLength;
3529
+ }
3530
+ float endFadeStart = 1.0 - startFadeLength;
3531
+ if (vDistanceProgress > endFadeStart) {
3532
+ gl_FragColor.a *= (1.0 - vDistanceProgress) / startFadeLength;
3533
+ }
3513
3534
  #include <tonemapping_fragment>
3514
3535
  #include <fog_fragment>
3515
3536
  #include <premultiplied_alpha_fragment>
3516
3537
  }
3517
3538
  `
3518
- }, It = (
3539
+ }, Lt = (
3519
3540
  /** @class */
3520
- (function(h) {
3521
- he(o, h);
3541
+ (function(f) {
3542
+ he(o, f);
3522
3543
  function o(e) {
3523
- var n = h.call(this, {
3524
- uniforms: v.UniformsUtils.clone(St.uniforms),
3525
- vertexShader: St.vertexShader,
3526
- fragmentShader: St.fragmentShader,
3544
+ var n = f.call(this, {
3545
+ uniforms: v.UniformsUtils.clone(xt.uniforms),
3546
+ vertexShader: xt.vertexShader,
3547
+ fragmentShader: xt.fragmentShader,
3527
3548
  clipping: !0
3528
3549
  }) || this;
3529
3550
  return n.type = "LineMaterial", n.dashed = !1, Object.defineProperties(n, {
@@ -3634,55 +3655,82 @@ var St = {
3634
3655
  set: function(t) {
3635
3656
  this.uniforms.startOffset.value = t;
3636
3657
  }
3658
+ },
3659
+ endOffset: {
3660
+ enumerable: !0,
3661
+ get: function() {
3662
+ return this.uniforms.endOffset.value;
3663
+ },
3664
+ set: function(t) {
3665
+ this.uniforms.endOffset.value = t;
3666
+ }
3667
+ },
3668
+ range: {
3669
+ enumerable: !0,
3670
+ get: function() {
3671
+ return this.uniforms.range.value;
3672
+ },
3673
+ set: function(t) {
3674
+ this.uniforms.range.value = t;
3675
+ }
3676
+ },
3677
+ animationProgress: {
3678
+ enumerable: !0,
3679
+ get: function() {
3680
+ return this.uniforms.animationProgress.value;
3681
+ },
3682
+ set: function(t) {
3683
+ this.uniforms.animationProgress.value = t;
3684
+ }
3637
3685
  }
3638
3686
  }), n.setValues(e), n;
3639
3687
  }
3640
3688
  return o;
3641
3689
  })(v.ShaderMaterial)
3642
3690
  );
3643
- Object.assign(It.prototype, { isLineMaterial: !0 });
3691
+ Object.assign(Lt.prototype, { isLineMaterial: !0 });
3644
3692
  var en = (
3645
3693
  /** @class */
3646
- (function(h) {
3647
- he(o, h);
3694
+ (function(f) {
3695
+ he(o, f);
3648
3696
  function o(e, n) {
3649
- var t = h.call(this) || this;
3650
- return t.type = "LineSegments2", t.geometry = e !== void 0 ? e : new Ot(), t.material = n !== void 0 ? n : new It({ color: Math.random() * 16777215 }), t;
3697
+ var t = f.call(this) || this;
3698
+ return t.type = "LineSegments2", t.geometry = e !== void 0 ? e : new Ct(), t.material = n !== void 0 ? n : new Lt({ color: Math.random() * 16777215 }), t;
3651
3699
  }
3652
3700
  return o.prototype.computeLineDistances = function() {
3653
- for (var e = this.geometry, n = e.attributes.instanceStart, t = e.attributes.instanceEnd, a = new Float32Array(2 * n.count), s = new v.Vector3(), l = new v.Vector3(), f = 0, c = 0, g = n.count; c < g; c++)
3654
- s.fromBufferAttribute(n, c), l.fromBufferAttribute(t, c), f += s.distanceTo(l);
3655
- this.material.uniforms.totalLength.value = f;
3656
- for (var c = 0, y = 0, g = n.count; c < g; c++, y += 2) {
3701
+ for (var e = this.geometry, n = e.attributes.instanceStart, t = e.attributes.instanceEnd, a = new Float32Array(2 * n.count), s = new v.Vector3(), l = new v.Vector3(), h = 0, c = 0, g = n.count; c < g; c++)
3702
+ s.fromBufferAttribute(n, c), l.fromBufferAttribute(t, c), h += s.distanceTo(l);
3703
+ this.material.uniforms.totalLength.value = h;
3704
+ for (var c = 0, w = 0, g = n.count; c < g; c++, w += 2) {
3657
3705
  s.fromBufferAttribute(n, c), l.fromBufferAttribute(t, c);
3658
- var w = s.distanceTo(l);
3659
- a[y] = y === 0 ? 0 : a[y - 1], a[y + 1] = a[y] + w;
3706
+ var P = s.distanceTo(l);
3707
+ a[w] = w === 0 ? 0 : a[w - 1], a[w + 1] = a[w] + P;
3660
3708
  }
3661
- var x = new v.InstancedInterleavedBuffer(a, 2, 1);
3662
- return e.setAttribute("instanceDistanceStart", new v.InterleavedBufferAttribute(x, 1, 0)), e.setAttribute("instanceDistanceEnd", new v.InterleavedBufferAttribute(x, 1, 1)), this;
3709
+ var T = new v.InstancedInterleavedBuffer(a, 2, 1);
3710
+ return e.setAttribute("instanceDistanceStart", new v.InterleavedBufferAttribute(T, 1, 0)), e.setAttribute("instanceDistanceEnd", new v.InterleavedBufferAttribute(T, 1, 1)), this;
3663
3711
  }, o.prototype.raycast = function(e, n) {
3664
3712
  e.camera === null && console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');
3665
- var t = e.ray, a = e.camera, s = a.projectionMatrix, l = this.geometry, f = this.material, c = f.resolution, g = f.linewidth, y = l.attributes.instanceStart, w = l.attributes.instanceEnd, x = new v.Vector4(), A = new v.Vector4(), S = new v.Vector4(), O = new v.Vector3(), T = new v.Matrix4(), b = new v.Line3(), P = new v.Vector3();
3666
- t.at(1, S), S.w = 1, S.applyMatrix4(a.matrixWorldInverse), S.applyMatrix4(s), S.multiplyScalar(1 / S.w), S.x *= c.x / 2, S.y *= c.y / 2, S.z = 0, O.copy(S);
3713
+ var t = e.ray, a = e.camera, s = a.projectionMatrix, l = this.geometry, h = this.material, c = h.resolution, g = h.linewidth, w = l.attributes.instanceStart, P = l.attributes.instanceEnd, T = new v.Vector4(), M = new v.Vector4(), x = new v.Vector4(), C = new v.Vector3(), b = new v.Matrix4(), y = new v.Line3(), A = new v.Vector3();
3714
+ t.at(1, x), x.w = 1, x.applyMatrix4(a.matrixWorldInverse), x.applyMatrix4(s), x.multiplyScalar(1 / x.w), x.x *= c.x / 2, x.y *= c.y / 2, x.z = 0, C.copy(x);
3667
3715
  var m = this.matrixWorld;
3668
- T.multiplyMatrices(a.matrixWorldInverse, m);
3669
- for (var C = 0, _ = y.count; C < _; C++) {
3670
- x.fromBufferAttribute(y, C), A.fromBufferAttribute(w, C), x.w = 1, A.w = 1, x.applyMatrix4(T), A.applyMatrix4(T), x.applyMatrix4(s), A.applyMatrix4(s), x.multiplyScalar(1 / x.w), A.multiplyScalar(1 / A.w);
3671
- var H = x.z < -1 && A.z < -1, G = x.z > 1 && A.z > 1;
3672
- if (!(H || G)) {
3673
- x.x *= c.x / 2, x.y *= c.y / 2, A.x *= c.x / 2, A.y *= c.y / 2, b.start.copy(x), b.start.z = 0, b.end.copy(A), b.end.z = 0;
3674
- var U = b.closestPointToPointParameter(O, !0);
3675
- b.at(U, P);
3676
- var Q = v.MathUtils.lerp(x.z, A.z, U), oe = Q >= -1 && Q <= 1, le = O.distanceTo(P) < g * 0.5;
3677
- if (oe && le) {
3678
- b.start.fromBufferAttribute(y, C), b.end.fromBufferAttribute(w, C), b.start.applyMatrix4(m), b.end.applyMatrix4(m);
3679
- var J = new v.Vector3(), Z = new v.Vector3();
3680
- t.distanceSqToSegment(b.start, b.end, Z, J), n.push({
3681
- point: Z,
3682
- pointOnLine: J,
3683
- distance: t.origin.distanceTo(Z),
3716
+ b.multiplyMatrices(a.matrixWorldInverse, m);
3717
+ for (var _ = 0, S = w.count; _ < S; _++) {
3718
+ T.fromBufferAttribute(w, _), M.fromBufferAttribute(P, _), T.w = 1, M.w = 1, T.applyMatrix4(b), M.applyMatrix4(b), T.applyMatrix4(s), M.applyMatrix4(s), T.multiplyScalar(1 / T.w), M.multiplyScalar(1 / M.w);
3719
+ var U = T.z < -1 && M.z < -1, R = T.z > 1 && M.z > 1;
3720
+ if (!(U || R)) {
3721
+ T.x *= c.x / 2, T.y *= c.y / 2, M.x *= c.x / 2, M.y *= c.y / 2, y.start.copy(T), y.start.z = 0, y.end.copy(M), y.end.z = 0;
3722
+ var W = y.closestPointToPointParameter(C, !0);
3723
+ y.at(W, A);
3724
+ var Z = v.MathUtils.lerp(T.z, M.z, W), X = Z >= -1 && Z <= 1, oe = C.distanceTo(A) < g * 0.5;
3725
+ if (X && oe) {
3726
+ y.start.fromBufferAttribute(w, _), y.end.fromBufferAttribute(P, _), y.start.applyMatrix4(m), y.end.applyMatrix4(m);
3727
+ var H = new v.Vector3(), q = new v.Vector3();
3728
+ t.distanceSqToSegment(y.start, y.end, q, H), n.push({
3729
+ point: q,
3730
+ pointOnLine: H,
3731
+ distance: t.origin.distanceTo(q),
3684
3732
  object: this,
3685
- faceIndex: C
3733
+ faceIndex: _
3686
3734
  });
3687
3735
  }
3688
3736
  }
@@ -3693,10 +3741,10 @@ var en = (
3693
3741
  Object.assign(en.prototype, { isLineSegments2: !0 });
3694
3742
  var tn = (
3695
3743
  /** @class */
3696
- (function(h) {
3697
- he(o, h);
3744
+ (function(f) {
3745
+ he(o, f);
3698
3746
  function o(e, n) {
3699
- var t = h.call(this, e, n) || this;
3747
+ var t = f.call(this, e, n) || this;
3700
3748
  return t.type = "Line2", t;
3701
3749
  }
3702
3750
  return o;
@@ -3705,20 +3753,20 @@ var tn = (
3705
3753
  Object.assign(tn.prototype, { isLine2: !0 });
3706
3754
  var nn = (
3707
3755
  /** @class */
3708
- (function(h) {
3709
- he(o, h);
3756
+ (function(f) {
3757
+ he(o, f);
3710
3758
  function o() {
3711
- var e = h.call(this) || this;
3759
+ var e = f.call(this) || this;
3712
3760
  return e.type = "LineGeometry", e;
3713
3761
  }
3714
3762
  return o.prototype.setPositions = function(e) {
3715
3763
  for (var n = e.length - 3, t = new Float32Array(2 * n), a = 0; a < n; a += 3)
3716
3764
  t[2 * a] = e[a], t[2 * a + 1] = e[a + 1], t[2 * a + 2] = e[a + 2], t[2 * a + 3] = e[a + 3], t[2 * a + 4] = e[a + 4], t[2 * a + 5] = e[a + 5];
3717
- return h.prototype.setPositions.call(this, t), this;
3765
+ return f.prototype.setPositions.call(this, t), this;
3718
3766
  }, o.prototype.setColors = function(e) {
3719
3767
  for (var n = e.length - 3, t = new Float32Array(2 * n), a = 0; a < n; a += 3)
3720
3768
  t[2 * a] = e[a], t[2 * a + 1] = e[a + 1], t[2 * a + 2] = e[a + 2], t[2 * a + 3] = e[a + 3], t[2 * a + 4] = e[a + 4], t[2 * a + 5] = e[a + 5];
3721
- return h.prototype.setColors.call(this, t), this;
3769
+ return f.prototype.setColors.call(this, t), this;
3722
3770
  }, o.prototype.fromLine = function(e) {
3723
3771
  var n = e.geometry;
3724
3772
  if (n instanceof v.Geometry) {
@@ -3729,16 +3777,16 @@ var nn = (
3729
3777
  }, o.prototype.copy = function() {
3730
3778
  return this;
3731
3779
  }, o;
3732
- })(Ot)
3780
+ })(Ct)
3733
3781
  );
3734
3782
  Object.assign(nn.prototype, { isLineGeometry: !0 });
3735
3783
  var Qn = (
3736
3784
  /** @class */
3737
- (function(h) {
3738
- he(o, h);
3785
+ (function(f) {
3786
+ he(o, f);
3739
3787
  function o(e, n) {
3740
- var t = h.call(this, e) || this;
3741
- t.paths = /* @__PURE__ */ new Map(), t.animationId = null, t.up = new v.Vector3(0, 1, 0);
3788
+ var t = f.call(this, e) || this;
3789
+ t.paths = /* @__PURE__ */ new Map(), t.up = new v.Vector3(0, 1, 0);
3742
3790
  var a = {
3743
3791
  enabled: !0,
3744
3792
  visible: !0,
@@ -3751,43 +3799,48 @@ var Qn = (
3751
3799
  divisions: 100,
3752
3800
  lineWidth: 2,
3753
3801
  color: 16777215,
3754
- duration: 3,
3802
+ speed: 3,
3803
+ range: 0.3,
3755
3804
  waveAmp: 0.05,
3756
3805
  waveFreq: 20,
3757
3806
  particleCount: 50,
3758
- maxDistance: 0.1
3807
+ maxDistance: 0.1,
3808
+ lineYOffset: 0.1,
3809
+ subMeshWidth: 0.3,
3810
+ subMeshColor: 65535,
3811
+ subMeshOpacity: 0.3
3759
3812
  };
3760
- return t._config = V(V({}, s), n == null ? void 0 : n.config), n != null && n.paths && n.paths.length > 0 && n.paths.forEach(function(l) {
3813
+ return t._config = z(z({}, s), n == null ? void 0 : n.config), n != null && n.paths && n.paths.length > 0 && n.paths.forEach(function(l) {
3761
3814
  t.addPath(l);
3762
3815
  }), t.state.enabled && t._enable({ userAction: !1 }), t;
3763
3816
  }
3764
3817
  return Object.defineProperty(o.prototype, "config", {
3765
3818
  get: function() {
3766
- return V({}, this._config);
3819
+ return z({}, this._config);
3767
3820
  },
3768
3821
  enumerable: !1,
3769
3822
  configurable: !0
3770
3823
  }), o.prototype.updateState = function(e, n) {
3771
3824
  var t = this.state;
3772
- this.state = V(V({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3825
+ this.state = z(z({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: n });
3773
3826
  }, o.prototype.load = function(e, n) {
3774
- return Le(this, void 0, void 0, function() {
3827
+ return De(this, void 0, void 0, function() {
3775
3828
  var t, a = this;
3776
- return De(this, function(s) {
3829
+ return Ne(this, function(s) {
3777
3830
  return this.clearAllPaths(), e.paths.forEach(function(l) {
3778
- var f, c, g = l.points.map(function(y) {
3779
- return new v.Vector3(y.x, y.y, y.z);
3831
+ var h, c, g = l.points.map(function(w) {
3832
+ return new v.Vector3(w.x, w.y, w.z);
3780
3833
  });
3781
3834
  a.addPath({
3782
3835
  id: l.id,
3783
3836
  points: g,
3784
- enabled: (f = l.enabled) !== null && f !== void 0 ? f : !0,
3837
+ enabled: (h = l.enabled) !== null && h !== void 0 ? h : !0,
3785
3838
  visible: (c = l.visible) !== null && c !== void 0 ? c : !0,
3786
3839
  color: l.color,
3787
3840
  lineWidth: l.lineWidth
3788
3841
  });
3789
- }), t = /* @__PURE__ */ new Map(), this.paths.forEach(function(l, f) {
3790
- t.set(f, l.config);
3842
+ }), t = /* @__PURE__ */ new Map(), this.paths.forEach(function(l, h) {
3843
+ t.set(h, l.config);
3791
3844
  }), this.data = { paths: t }, this.hooks.emit("dataLoaded", this.data), n && this.setState(n), [
3792
3845
  2
3793
3846
  /*return*/
@@ -3795,35 +3848,54 @@ var Qn = (
3795
3848
  });
3796
3849
  });
3797
3850
  }, o.prototype.addPath = function(e) {
3798
- var n, t;
3851
+ var n, t, a, s, l, h;
3799
3852
  if (e.points.length < 2)
3800
3853
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e.id, " 至少需要2个点")), !1;
3801
3854
  if (this.paths.has(e.id))
3802
3855
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e.id, " 已存在")), !1;
3803
- var a = new v.CatmullRomCurve3(e.points), s = this.createLines(e, a), l = this.createParticles(), f = l.particles, c = l.particleGeometry, g = l.particleMaterial, y = l.particleInfos, w = l.particlePositions, x = {
3856
+ var c = new v.CatmullRomCurve3(e.points), g = this.createLines(e, c), w = this.createParticles(), P = w.particles, T = w.particleGeometry, M = w.particleMaterial, x = w.particleInfos, C = w.particlePositions, b = (n = e.subMeshColor) !== null && n !== void 0 ? n : this._config.subMeshColor, y = (t = e.subMeshWidth) !== null && t !== void 0 ? t : this._config.subMeshWidth, A = (a = e.subMeshOpacity) !== null && a !== void 0 ? a : this._config.subMeshOpacity, m = (s = e.enableSubMesh) !== null && s !== void 0 ? s : !0, _ = this.createSubMeshGeometry(e, c, y), S = this.createSubMeshMaterial(b, A), U = c.getLength();
3857
+ S.uniforms.totalLength.value = U;
3858
+ var R = new v.Mesh(_, S);
3859
+ R.visible = m, this.five.scene.add(R);
3860
+ var W = {
3804
3861
  id: e.id,
3805
3862
  config: e,
3806
- curve: a,
3807
- lines: s,
3808
- particles: f,
3809
- particleGeometry: c,
3810
- particleMaterial: g,
3811
- particleInfos: y,
3812
- particlePositions: w,
3813
- enabled: (n = e.enabled) !== null && n !== void 0 ? n : !0,
3814
- visible: (t = e.visible) !== null && t !== void 0 ? t : !0,
3815
- startOffset: 0
3863
+ curve: c,
3864
+ lines: g,
3865
+ particles: P,
3866
+ particleGeometry: T,
3867
+ particleMaterial: M,
3868
+ particleInfos: x,
3869
+ particlePositions: C,
3870
+ enabled: (l = e.enabled) !== null && l !== void 0 ? l : !0,
3871
+ visible: (h = e.visible) !== null && h !== void 0 ? h : !0,
3872
+ startOffset: 0,
3873
+ endOffset: 0,
3874
+ lastAnimationProgress: 0,
3875
+ cycleStartTime: performance.now() / 1e3,
3876
+ isInitialAnimation: !0,
3877
+ subMeshUnfoldProgress: 0,
3878
+ subMeshUnfoldStarted: !1,
3879
+ lastUpdateTime: performance.now() / 1e3,
3880
+ subMesh: R,
3881
+ subMeshGeometry: _,
3882
+ subMeshMaterial: S,
3883
+ subMeshColor: b,
3884
+ subMeshWidth: y,
3885
+ subMeshOpacity: A,
3886
+ animationId: null,
3887
+ enableSubMesh: m
3816
3888
  };
3817
- this.paths.set(e.id, x);
3818
- var A = this.data, S = /* @__PURE__ */ new Map();
3819
- return this.paths.forEach(function(O, T) {
3820
- S.set(T, O.config);
3821
- }), this.data = { paths: S }, this.hooks.emit("dataChange", this.data, A), this.hooks.emit("pathAdd", e.id, e), this.state.playing && this.animationId === null && this.startAnimation(), !0;
3889
+ this.paths.set(e.id, W);
3890
+ var Z = this.data, X = /* @__PURE__ */ new Map();
3891
+ return this.paths.forEach(function(oe, H) {
3892
+ X.set(H, oe.config);
3893
+ }), this.data = { paths: X }, this.hooks.emit("dataChange", this.data, Z), this.hooks.emit("pathAdd", e.id, e), this.state.playing && this.startPathAnimation(e.id), !0;
3822
3894
  }, o.prototype.removePath = function(e) {
3823
3895
  var n = this.paths.get(e);
3824
3896
  if (!n)
3825
3897
  return console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1;
3826
- this.disposePathResources(n), this.paths.delete(e);
3898
+ this.stopPathAnimation(e), this.disposePathResources(n), this.paths.delete(e);
3827
3899
  var t = this.data, a = /* @__PURE__ */ new Map();
3828
3900
  return this.paths.forEach(function(s, l) {
3829
3901
  a.set(l, s.config);
@@ -3838,58 +3910,60 @@ var Qn = (
3838
3910
  var n = this.paths.get(e);
3839
3911
  return n ? (n.visible = !0, n.lines.forEach(function(t) {
3840
3912
  return t.visible = !0;
3841
- }), n.particles.visible = !0, this.hooks.emit("pathShow", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3913
+ }), n.particles.visible = !0, n.subMesh.visible = !0, this.hooks.emit("pathShow", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3842
3914
  }, o.prototype.hidePath = function(e) {
3843
3915
  var n = this.paths.get(e);
3844
3916
  return n ? (n.visible = !1, n.lines.forEach(function(t) {
3845
3917
  return t.visible = !1;
3846
- }), n.particles.visible = !1, this.hooks.emit("pathHide", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3918
+ }), n.particles.visible = !1, n.subMesh.visible = !1, this.hooks.emit("pathHide", e), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
3847
3919
  }, o.prototype.getPathIds = function() {
3848
3920
  return Array.from(this.paths.keys());
3849
3921
  }, o.prototype.getPathConfig = function(e) {
3850
3922
  var n = this.paths.get(e);
3851
- return n ? V({}, n.config) : void 0;
3923
+ return n ? z({}, n.config) : void 0;
3852
3924
  }, o.prototype.clearAllPaths = function() {
3853
3925
  var e = this;
3854
- this.paths.forEach(function(a) {
3855
- e.disposePathResources(a);
3926
+ this.paths.forEach(function(a, s) {
3927
+ e.stopPathAnimation(s), e.disposePathResources(a);
3856
3928
  }), this.paths.clear();
3857
3929
  var n = this.data, t = /* @__PURE__ */ new Map();
3858
3930
  this.paths.forEach(function(a, s) {
3859
3931
  t.set(s, a.config);
3860
3932
  }), this.data = { paths: t }, this.hooks.emit("dataChange", this.data, n);
3861
3933
  }, o.prototype.getPositions = function(e, n) {
3862
- for (var t = [], a = [], s = 0, l = [], f = 0; f <= n; f++) {
3863
- var c = f / n, g = e.getPoint(c);
3864
- l.push(g.clone()), f > 0 && (s += g.distanceTo(l[f - 1]));
3934
+ for (var t = [], a = [], s = 0, l = [], h = 0; h <= n; h++) {
3935
+ var c = h / n, g = e.getPoint(c);
3936
+ l.push(g.clone()), h > 0 && (s += g.distanceTo(l[h - 1]));
3865
3937
  }
3866
- for (var y = 0, f = 0; f < n; f++) {
3867
- f > 0 && (y += l[f].distanceTo(l[f - 1]));
3868
- var w = y / s;
3869
- t.push(l[f].x, l[f].y, l[f].z), a.push(w);
3938
+ for (var w = 0, h = 0; h < n; h++) {
3939
+ h > 0 && (w += l[h].distanceTo(l[h - 1]));
3940
+ var P = w / s;
3941
+ t.push(l[h].x, l[h].y, l[h].z), a.push(P);
3870
3942
  }
3871
3943
  return { positions: t, distanceProgress: a };
3872
3944
  }, o.prototype.createLines = function(e, n) {
3873
- for (var t = this, a, s, l = [], f = this._config, c = f.lineCount, g = f.spacing, y = f.divisions, w = f.waveAmp, x = f.waveFreq, A = (a = e.lineWidth) !== null && a !== void 0 ? a : this._config.lineWidth, S = (s = e.color) !== null && s !== void 0 ? s : this._config.color, O = function(P) {
3874
- var m = (P - (c - 1) / 2) * g, C = e.points.map(function(oe, le) {
3875
- var J = le / (e.points.length - 1), Z = n.getTangent(J).normalize(), D = new v.Vector3().crossVectors(t.up, Z).normalize(), I = m * Math.abs((le - e.points.length / 2) / e.points.length - 0.5) * -1;
3876
- return oe.clone().addScaledVector(D, m + I).add(new v.Vector3(0, 0.02 * (P % 2 === 0 ? 1 : 0), 0));
3877
- }), _ = new v.CatmullRomCurve3(C), H = T.getPositions(_, y).positions, G = new nn();
3878
- G.setPositions(H);
3879
- var U = new It({
3880
- color: S,
3881
- linewidth: A * (P % 2 === 0 ? 1 : 0.5),
3945
+ for (var t = this, a, s, l = [], h = this._config, c = h.lineCount, g = h.spacing, w = h.divisions, P = h.waveAmp, T = h.waveFreq, M = h.range, x = h.lineYOffset, C = (a = e.lineWidth) !== null && a !== void 0 ? a : this._config.lineWidth, b = (s = e.color) !== null && s !== void 0 ? s : this._config.color, y = function(_) {
3946
+ var S = (_ - (c - 1) / 2) * g, U = e.points.map(function(H, q) {
3947
+ var I = q / (e.points.length - 1), F = n.getTangent(I).normalize(), L = new v.Vector3().crossVectors(t.up, F).normalize(), D = S * Math.abs((q - e.points.length / 2) / e.points.length - 0.5) * -1;
3948
+ return H.clone().addScaledVector(L, S + D).add(new v.Vector3(0, x + 0.02 * (_ % 2 === 0 ? 1 : 0), 0));
3949
+ }), R = new v.CatmullRomCurve3(U), W = A.getPositions(R, w).positions, Z = new nn();
3950
+ Z.setPositions(W);
3951
+ var X = new Lt({
3952
+ color: b,
3953
+ linewidth: C * (_ % 2 === 0 ? 1 : 0.5),
3882
3954
  transparent: !0,
3883
- opacity: 1
3955
+ opacity: 1,
3956
+ depthWrite: !1
3884
3957
  });
3885
- U.resolution.set(T.five.camera.resolution.x, T.five.camera.resolution.y), P === 0 ? U.waveDir = 1 : P === 1 ? U.waveDir = 2 : P === 2 ? U.waveDir = 0 : P === 3 ? U.waveDir = 3 : P === 4 && (U.waveDir = 1), U.waveAmp = w, U.waveFreq = x, Object.assign(U.uniforms, {
3958
+ X.resolution.set(A.five.camera.resolution.x, A.five.camera.resolution.y), _ === 0 ? X.waveDir = 1 : _ === 1 ? X.waveDir = 2 : _ === 2 ? X.waveDir = 0 : _ === 3 ? X.waveDir = 3 : _ === 4 && (X.waveDir = 1), X.waveAmp = P, X.waveFreq = T, Object.assign(X.uniforms, {
3886
3959
  time: { value: 0 },
3887
- startOffset: { value: 0 }
3960
+ startOffset: { value: 0 },
3961
+ range: { value: M }
3888
3962
  });
3889
- var Q = new tn(G, U);
3890
- Q.computeLineDistances(), l.push(Q), T.five.scene.add(Q);
3891
- }, T = this, b = 0; b < c; b++)
3892
- O(b);
3963
+ var oe = new tn(Z, X);
3964
+ oe.computeLineDistances(), l.push(oe), A.five.scene.add(oe);
3965
+ }, A = this, m = 0; m < c; m++)
3966
+ y(m);
3893
3967
  return l;
3894
3968
  }, o.prototype.createParticleMaterial = function() {
3895
3969
  return new v.ShaderMaterial({
@@ -3918,8 +3992,8 @@ var Qn = (
3918
3992
  `
3919
3993
  });
3920
3994
  }, o.prototype.createParticles = function() {
3921
- for (var e = this._config.particleCount, n = new Float32Array(e * 3), t = new v.BufferGeometry(), a = this.createParticleMaterial(), s = new v.Points(t, a), l = new Float32Array(e), f = [], c = 0; c < e; c++)
3922
- n[c * 3] = 9999, n[c * 3 + 1] = 9999, n[c * 3 + 2] = 9999, l[c] = v.MathUtils.randFloat(3, 9), f.push({
3995
+ for (var e = this._config.particleCount, n = new Float32Array(e * 3), t = new v.BufferGeometry(), a = this.createParticleMaterial(), s = new v.Points(t, a), l = new Float32Array(e), h = [], c = 0; c < e; c++)
3996
+ n[c * 3] = 9999, n[c * 3 + 1] = 9999, n[c * 3 + 2] = 9999, l[c] = v.MathUtils.randFloat(3, 9), h.push({
3923
3997
  velocity: new v.Vector3(),
3924
3998
  life: 3 + Math.random() * 2,
3925
3999
  age: 0,
@@ -3927,15 +4001,129 @@ var Qn = (
3927
4001
  alpha: 0,
3928
4002
  startPos: new v.Vector3()
3929
4003
  });
3930
- return t.setAttribute("position", new v.BufferAttribute(n, 3)), t.setAttribute("size", new v.BufferAttribute(l, 1)), s.frustumCulled = !1, this.five.scene.add(s), { particles: s, particleGeometry: t, particleMaterial: a, particleInfos: f, particlePositions: n };
4004
+ return t.setAttribute("position", new v.BufferAttribute(n, 3)), t.setAttribute("size", new v.BufferAttribute(l, 1)), s.frustumCulled = !1, this.five.scene.add(s), { particles: s, particleGeometry: t, particleMaterial: a, particleInfos: h, particlePositions: n };
4005
+ }, o.prototype.createSubMeshGeometry = function(e, n, t) {
4006
+ for (var a = this._config.divisions, s = new v.BufferGeometry(), l = n.getPoints(a), h = [], c = [], g = [], w = [], P = 0, T = [0], M = 1; M < l.length; M++)
4007
+ P += l[M].distanceTo(l[M - 1]), T.push(P);
4008
+ for (var x = P, M = 0; M < l.length; M++) {
4009
+ var C = l[M], b = M / (l.length - 1), y = n.getTangent(b).normalize(), A = new v.Vector3().crossVectors(this.up, y).normalize(), m = t / 2, _ = C.clone().addScaledVector(A, -m);
4010
+ h.push(_.x, _.y, _.z), c.push(0, T[M] / x), w.push(T[M] / x);
4011
+ var S = C.clone().addScaledVector(A, m);
4012
+ h.push(S.x, S.y, S.z), c.push(1, T[M] / x), w.push(T[M] / x);
4013
+ }
4014
+ for (var M = 0; M < l.length - 1; M++) {
4015
+ var U = M * 2;
4016
+ g.push(U, U + 1, U + 2), g.push(U + 1, U + 3, U + 2);
4017
+ }
4018
+ return s.setAttribute("position", new v.Float32BufferAttribute(h, 3)), s.setAttribute("uv", new v.Float32BufferAttribute(c, 2)), s.setAttribute("distanceProgress", new v.Float32BufferAttribute(w, 1)), s.setIndex(g), s.computeVertexNormals(), s;
4019
+ }, o.prototype.createAlphaMapTexture = function(e, n, t) {
4020
+ for (var a = 256, s = 1, l = a * s, h = new Uint8Array(l), c = 1 / e, g = n / 2, w = 0; w < a; w++) {
4021
+ var P = w / a, T = Math.floor(P / c), M = (P - T * c) / c, x = 0, C = M;
4022
+ if (C > 0.5 && (C = 1 - C), C < g) {
4023
+ var b = 1 - C / g, y = b * b * b;
4024
+ x = t + (1 - t) * y;
4025
+ } else
4026
+ x = t;
4027
+ h[w] = Math.floor(x * 255);
4028
+ }
4029
+ var A = new v.DataTexture(h, a, s, v.RedFormat);
4030
+ return A.needsUpdate = !0, A.wrapS = v.RepeatWrapping, A.wrapT = v.ClampToEdgeWrapping, A.minFilter = v.LinearFilter, A.magFilter = v.LinearFilter, A;
4031
+ }, o.prototype.createSubMeshMaterial = function(e, n) {
4032
+ var t = this._config.range, a = this.createAlphaMapTexture(3, 1, n);
4033
+ return new v.ShaderMaterial({
4034
+ transparent: !0,
4035
+ side: v.BackSide,
4036
+ depthWrite: !1,
4037
+ uniforms: {
4038
+ baseColor: { value: new v.Color(e) },
4039
+ baseOpacity: { value: n },
4040
+ animationProgress: { value: 0 },
4041
+ range: { value: t },
4042
+ startOffset: { value: 0 },
4043
+ endOffset: { value: 0 },
4044
+ totalLength: { value: 1 },
4045
+ unfoldProgress: { value: 0 },
4046
+ alphaMap: { value: a }
4047
+ },
4048
+ vertexShader: `
4049
+ attribute float distanceProgress;
4050
+ varying vec2 vUv;
4051
+ varying float vDistanceProgress;
4052
+
4053
+ void main() {
4054
+ vUv = uv;
4055
+ vDistanceProgress = distanceProgress;
4056
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
4057
+ }
4058
+ `,
4059
+ fragmentShader: `
4060
+ uniform vec3 baseColor;
4061
+ uniform float baseOpacity;
4062
+ uniform float animationProgress;
4063
+ uniform float range;
4064
+ uniform float startOffset;
4065
+ uniform float endOffset;
4066
+ uniform float totalLength;
4067
+ uniform float unfoldProgress;
4068
+ uniform sampler2D alphaMap;
4069
+
4070
+ varying vec2 vUv;
4071
+ varying float vDistanceProgress;
4072
+
4073
+ void main() {
4074
+ // 计算调整后的距离进度
4075
+ float adjustedDistanceStart = max(0.0, startOffset);
4076
+ float adjustedTotalLength = totalLength - startOffset - endOffset;
4077
+ adjustedTotalLength = max(0.01, adjustedTotalLength);
4078
+ float adjustedProgress = (vDistanceProgress * totalLength - adjustedDistanceStart) / adjustedTotalLength;
4079
+
4080
+ // 如果在裁剪范围外,丢弃片段
4081
+ if (adjustedProgress < 0.0 || adjustedProgress > 1.0) {
4082
+ discard;
4083
+ }
4084
+
4085
+ // 展开效果:只显示已展开的部分
4086
+ if (adjustedProgress > unfoldProgress) {
4087
+ discard;
4088
+ }
4089
+
4090
+ // 计算 UV 坐标用于采样 alphaMap
4091
+ // u 坐标 = 当前位置 + 动画进度(形成移动效果)
4092
+ float u = fract(adjustedProgress - animationProgress);
4093
+ vec2 uv = vec2(u, 0.5);
4094
+
4095
+ // 从 alphaMap 采样透明度
4096
+ float sampledAlpha = texture2D(alphaMap, uv).r;
4097
+
4098
+ // 展开前进头部的渐变遮罩(0.05 的百分比)
4099
+ float unfoldFadeLength = 0.05;
4100
+ float distanceToUnfoldEdge = unfoldProgress - adjustedProgress;
4101
+ if (distanceToUnfoldEdge < unfoldFadeLength && distanceToUnfoldEdge > 0.0) {
4102
+ sampledAlpha *= distanceToUnfoldEdge / unfoldFadeLength;
4103
+ }
4104
+
4105
+ // 增加开头和结尾的渐变 alpha 遮罩
4106
+ float fadeLength = 0.05;
4107
+ if (adjustedProgress < fadeLength) {
4108
+ sampledAlpha *= adjustedProgress / fadeLength;
4109
+ }
4110
+ float endFadeStart = 1.0 - fadeLength;
4111
+ if (adjustedProgress > endFadeStart) {
4112
+ sampledAlpha *= (1.0 - adjustedProgress) / fadeLength;
4113
+ }
4114
+
4115
+ gl_FragColor = vec4(baseColor, sampledAlpha);
4116
+ }
4117
+ `
4118
+ });
3931
4119
  }, o.prototype.projectPointsToScreen = function(e, n) {
3932
4120
  for (var t = [], a = 0, s = 0; s < e.length; s++) {
3933
4121
  var l = e[s];
3934
4122
  s > 0 && (a += l.distanceTo(e[s - 1]));
3935
- var f = l.clone().project(n), c = f.x < -1 || f.x > 1 || f.y < -1 || f.y > 1 || f.z < 0 || f.z > 1;
4123
+ var h = l.clone().project(n), c = h.x < -1 || h.x > 1 || h.y < -1 || h.y > 1 || h.z < -1 || h.z > 1;
3936
4124
  t.push({
3937
4125
  point: l.clone(),
3938
- screenPos: new v.Vector2(f.x, f.y),
4126
+ screenPos: new v.Vector2(h.x, h.y),
3939
4127
  distanceFromStart: a,
3940
4128
  isOffscreen: c
3941
4129
  });
@@ -3958,51 +4146,80 @@ var Qn = (
3958
4146
  index: n,
3959
4147
  distance: t
3960
4148
  };
3961
- }, o.prototype.updateAnimation = function() {
3962
- var e = performance.now() / 1e3, n = this._config, t = n.duration, a = n.particleCount, s = n.maxDistance, l = e % t / t;
3963
- this.paths.forEach(function(f) {
3964
- if (f.enabled) {
3965
- f.lines.forEach(function(b) {
3966
- b.material.uniforms.time.value = e, b.material.uniforms.animationProgress.value = l;
3967
- });
3968
- var c = null, g = 1 / 0;
3969
- if (f.lines.forEach(function(b) {
3970
- for (var P = b.geometry, m = P.attributes.instanceDistanceStart, C = P.attributes.instanceDistanceEnd, _ = m.count, H = 0; H < _; H++) {
3971
- var G = m.getX(H) / b.material.uniforms.totalLength.value, U = C.getX(H) / b.material.uniforms.totalLength.value;
3972
- if (l >= G && l <= U) {
3973
- var Q = (l - G) / (U - G), oe = new v.Vector3().fromBufferAttribute(P.attributes.instanceStart, H), le = new v.Vector3().fromBufferAttribute(P.attributes.instanceEnd, H), J = new v.Vector3().lerpVectors(oe, le, Q), Z = Math.abs(l - (G + U) / 2);
3974
- Z < g && (g = Z, c = J);
4149
+ }, o.prototype.findFarestOffscreenPoint = function(e) {
4150
+ for (var n, t = ((n = e[e.length - 1]) === null || n === void 0 ? void 0 : n.distanceFromStart) || 0, a = -1, s = e.length - 1; s >= 0; s--)
4151
+ if (!e[s].isOffscreen) {
4152
+ a = s;
4153
+ break;
4154
+ }
4155
+ if (a === -1)
4156
+ return null;
4157
+ var l = a + 1;
4158
+ return l < e.length && e[l].isOffscreen ? {
4159
+ index: l,
4160
+ distance: e[l].distanceFromStart,
4161
+ totalLength: t
4162
+ } : { index: e.length - 1, distance: t, totalLength: t };
4163
+ }, o.prototype.updatePathAnimation = function(e) {
4164
+ var n, t = this.paths.get(e);
4165
+ if (!(!t || !t.enabled)) {
4166
+ var a = performance.now() / 1e3, s = this._config, l = s.speed, h = s.particleCount, c = s.maxDistance, g = ((n = t.lines[0]) === null || n === void 0 ? void 0 : n.material.uniforms.totalLength.value) || 1, w = Math.max(0.01, g - t.startOffset - t.endOffset), P = (a - t.cycleStartTime) * l / w % 1;
4167
+ if (t.isInitialAnimation) {
4168
+ if (t.enableSubMesh && P >= 0.2 && !t.subMeshUnfoldStarted && (t.subMeshUnfoldStarted = !0), t.enableSubMesh && t.subMeshUnfoldStarted && t.subMeshUnfoldProgress < 1) {
4169
+ var T = a - t.lastUpdateTime, M = 0.5;
4170
+ t.subMeshUnfoldProgress = Math.min(1, t.subMeshUnfoldProgress + M * T), t.subMeshMaterial.uniforms.unfoldProgress.value = t.subMeshUnfoldProgress;
4171
+ }
4172
+ P < t.lastAnimationProgress && (!t.enableSubMesh || t.subMeshUnfoldProgress >= 1) && (t.isInitialAnimation = !1);
4173
+ } else
4174
+ t.enableSubMesh && (t.subMeshMaterial.uniforms.unfoldProgress.value = 1);
4175
+ if (t.lastAnimationProgress = P, t.lastUpdateTime = a, t.isInitialAnimation && t.lines.forEach(function(R) {
4176
+ R.material.uniforms.time.value = a, R.material.uniforms.animationProgress.value = P;
4177
+ }), t.isInitialAnimation) {
4178
+ var x = null, C = 1 / 0;
4179
+ if (t.lines.forEach(function(R) {
4180
+ for (var W = R.geometry, Z = W.attributes.instanceDistanceStart, X = W.attributes.instanceDistanceEnd, oe = Z.count, H = 0; H < oe; H++) {
4181
+ var q = Z.getX(H) / R.material.uniforms.totalLength.value, I = X.getX(H) / R.material.uniforms.totalLength.value;
4182
+ if (P >= q && P <= I) {
4183
+ var F = (P - q) / (I - q), L = new v.Vector3().fromBufferAttribute(W.attributes.instanceStart, H), D = new v.Vector3().fromBufferAttribute(W.attributes.instanceEnd, H), G = new v.Vector3().lerpVectors(L, D, F), re = Math.abs(P - (q + I) / 2);
4184
+ re < C && (C = re, x = G);
3975
4185
  }
3976
4186
  }
3977
- }), c)
3978
- for (var y = 0; y < a; y++) {
3979
- var w = f.particleInfos[y];
3980
- !w.active && Math.random() < 0.05 && (w.active = !0, w.age = 0, w.life = 3 + Math.random() * 2, w.velocity.set((Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4), f.particlePositions[y * 3] = c.x, f.particlePositions[y * 3 + 1] = c.y, f.particlePositions[y * 3 + 2] = c.z, w.startPos.copy(c), w.alpha = 0);
4187
+ }), x)
4188
+ for (var b = 0; b < h; b++) {
4189
+ var y = t.particleInfos[b];
4190
+ !y.active && Math.random() < 0.05 && (y.active = !0, y.age = 0, y.life = 3 + Math.random() * 2, y.velocity.set((Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4, (Math.random() - 0.5) * 1e-4), t.particlePositions[b * 3] = x.x, t.particlePositions[b * 3 + 1] = x.y, t.particlePositions[b * 3 + 2] = x.z, y.startPos.copy(x), y.alpha = 0);
3981
4191
  }
3982
- for (var y = 0; y < a; y++) {
3983
- var w = f.particleInfos[y];
3984
- if (w.active) {
3985
- w.age += 0.016;
3986
- var x = f.particlePositions[y * 3] - w.startPos.x, A = f.particlePositions[y * 3 + 1] - w.startPos.y, S = f.particlePositions[y * 3 + 2] - w.startPos.z, O = Math.sqrt(x * x + A * A + S * S);
3987
- (O >= s || w.age >= w.life) && (w.active = !1, f.particlePositions[y * 3] = 9999, f.particlePositions[y * 3 + 1] = 9999, f.particlePositions[y * 3 + 2] = 9999, w.alpha = 0), w.velocity.x += (Math.random() - 0.5) * 1e-4, w.velocity.z += (Math.random() - 0.5) * 1e-4, w.velocity.y += 1e-4, w.velocity.multiplyScalar(0.99), f.particlePositions[y * 3] += w.velocity.x, f.particlePositions[y * 3 + 1] += w.velocity.y, f.particlePositions[y * 3 + 2] += w.velocity.z;
3988
- var T = w.age / w.life;
3989
- T < 0.2 ? w.alpha = T / 0.2 : T > 0.8 ? w.alpha = (1 - T) / 0.2 : w.alpha = 1;
4192
+ for (var b = 0; b < h; b++) {
4193
+ var y = t.particleInfos[b];
4194
+ if (y.active) {
4195
+ y.age += 0.016;
4196
+ var A = t.particlePositions[b * 3] - y.startPos.x, m = t.particlePositions[b * 3 + 1] - y.startPos.y, _ = t.particlePositions[b * 3 + 2] - y.startPos.z, S = Math.sqrt(A * A + m * m + _ * _);
4197
+ (S >= c || y.age >= y.life) && (y.active = !1, t.particlePositions[b * 3] = 9999, t.particlePositions[b * 3 + 1] = 9999, t.particlePositions[b * 3 + 2] = 9999, y.alpha = 0), y.velocity.x += (Math.random() - 0.5) * 1e-4, y.velocity.z += (Math.random() - 0.5) * 1e-4, y.velocity.y += 1e-4, y.velocity.multiplyScalar(0.99), t.particlePositions[b * 3] += y.velocity.x, t.particlePositions[b * 3 + 1] += y.velocity.y, t.particlePositions[b * 3 + 2] += y.velocity.z;
4198
+ var U = y.age / y.life;
4199
+ U < 0.2 ? y.alpha = U / 0.2 : U > 0.8 ? y.alpha = (1 - U) / 0.2 : y.alpha = 1;
3990
4200
  }
3991
4201
  }
3992
- f.particleGeometry.attributes.position.needsUpdate = !0, f.particleMaterial.opacity = 0.6;
4202
+ t.particleGeometry.attributes.position.needsUpdate = !0, t.particleMaterial.opacity = 0.6;
3993
4203
  }
3994
- }), this.five.needsRender = !0;
3995
- }, o.prototype.startAnimation = function() {
3996
- var e = this;
3997
- this.animationId === null && this.paths.size !== 0 && (this.animationId = ct.shared.add(function() {
3998
- e.updateAnimation();
3999
- }), this.updateState({ playing: !0 }, !1), this.hooks.emit("animationStart"));
4000
- }, o.prototype.stopAnimation = function() {
4001
- this.animationId !== null && (this.animationId(), this.animationId = null), this.updateState({ playing: !1 }, !1), this.hooks.emit("animationStop");
4204
+ t.enableSubMesh && (t.subMeshMaterial.uniforms.animationProgress.value = P), this.five.needsRender = !0;
4205
+ }
4206
+ }, o.prototype.startPathAnimation = function(e) {
4207
+ var n = this, t = this.paths.get(e);
4208
+ if (!t)
4209
+ return console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1;
4210
+ if (t.animationId !== null)
4211
+ return !1;
4212
+ var a = performance.now() / 1e3;
4213
+ return t.cycleStartTime = a, t.lastUpdateTime = a, t.animationId = ct.shared.add(function() {
4214
+ n.updatePathAnimation(e);
4215
+ }), !0;
4216
+ }, o.prototype.stopPathAnimation = function(e) {
4217
+ var n = this.paths.get(e);
4218
+ return n ? (n.animationId !== null && (n.animationId(), n.animationId = null), !0) : (console.warn("DynamicPathLinePlugin: 路径 ".concat(e, " 不存在")), !1);
4002
4219
  }, o.prototype._enable = function(e) {
4003
- this.paths.size > 0 && this.startAnimation();
4220
+ this.paths.size > 0 && this.state.playing && this.play();
4004
4221
  }, o.prototype._disable = function(e) {
4005
- this.stopAnimation();
4222
+ this.pause();
4006
4223
  }, o.prototype.enable = function(e) {
4007
4224
  var n;
4008
4225
  if (!this.state.enabled) {
@@ -4020,28 +4237,50 @@ var Qn = (
4020
4237
  this.paths.forEach(function(a) {
4021
4238
  a.lines.forEach(function(s) {
4022
4239
  return s.visible = !0;
4023
- }), a.particles.visible = !0;
4240
+ }), a.particles.visible = !0, a.subMesh.visible = !0;
4024
4241
  }), this.updateState({ visible: !0 }, t);
4025
4242
  }, o.prototype.hide = function(e) {
4026
4243
  var n, t = (n = e == null ? void 0 : e.userAction) !== null && n !== void 0 ? n : !0;
4027
4244
  this.paths.forEach(function(a) {
4028
4245
  a.lines.forEach(function(s) {
4029
4246
  return s.visible = !1;
4030
- }), a.particles.visible = !1;
4247
+ }), a.particles.visible = !1, a.subMesh.visible = !1;
4031
4248
  }), this.updateState({ visible: !1 }, t);
4032
4249
  }, o.prototype.setState = function(e, n) {
4033
4250
  var t;
4034
- t = n == null ? void 0 : n.userAction, e.enabled !== void 0 && e.enabled !== this.state.enabled && (e.enabled ? this.enable(n) : this.disable(n)), e.visible !== void 0 && e.visible !== this.state.visible && (e.visible ? this.show(n) : this.hide(n)), e.playing !== void 0 && e.playing !== this.state.playing && (e.playing ? this.startAnimation() : this.stopAnimation());
4251
+ t = n == null ? void 0 : n.userAction, e.enabled !== void 0 && e.enabled !== this.state.enabled && (e.enabled ? this.enable(n) : this.disable(n)), e.visible !== void 0 && e.visible !== this.state.visible && (e.visible ? this.show(n) : this.hide(n));
4035
4252
  }, o.prototype.play = function() {
4036
- this.startAnimation();
4253
+ var e = this;
4254
+ this.paths.forEach(function(n, t) {
4255
+ e.startPathAnimation(t);
4256
+ }), this.updateState({ playing: !0 }, !1), this.hooks.emit("animationStart");
4037
4257
  }, o.prototype.pause = function() {
4038
- this.stopAnimation();
4258
+ var e = this;
4259
+ this.paths.forEach(function(n, t) {
4260
+ e.stopPathAnimation(t);
4261
+ }), this.updateState({ playing: !1 }, !1), this.hooks.emit("animationStop");
4262
+ }, o.prototype.reset = function() {
4263
+ var e = this;
4264
+ this.paths.forEach(function(n, t) {
4265
+ e.stopPathAnimation(t);
4266
+ }), this.paths.forEach(function(n) {
4267
+ n.isInitialAnimation = !0, n.subMeshUnfoldProgress = 0, n.subMeshUnfoldStarted = !1, n.lastAnimationProgress = 0, n.cycleStartTime = performance.now() / 1e3, n.lastUpdateTime = performance.now() / 1e3, n.startOffset = 0, n.endOffset = 0, n.lines.forEach(function(l) {
4268
+ l.visible = !0, l.material.uniforms.time.value = 0, l.material.uniforms.animationProgress.value = 0, l.material.uniforms.startOffset.value = 0, l.material.uniforms.endOffset.value = 0;
4269
+ }), n.particles.visible = !0;
4270
+ for (var t = e._config.particleCount, a = 0; a < t; a++) {
4271
+ var s = n.particleInfos[a];
4272
+ s.active = !1, s.age = 0, s.alpha = 0, n.particlePositions[a * 3] = 9999, n.particlePositions[a * 3 + 1] = 9999, n.particlePositions[a * 3 + 2] = 9999;
4273
+ }
4274
+ n.particleGeometry.attributes.position.needsUpdate = !0, n.subMeshMaterial && (n.subMeshMaterial.uniforms.unfoldProgress.value = 0, n.subMeshMaterial.uniforms.animationProgress.value = 0, n.subMeshMaterial.uniforms.startOffset.value = 0, n.subMeshMaterial.uniforms.endOffset.value = 0);
4275
+ });
4039
4276
  }, o.prototype.updateScreenProjection = function(e) {
4040
4277
  var n = this, t = function(s) {
4041
- var l = n.projectPointsToScreen(s.config.points, n.five.camera), f = n.findNearestOffscreenPoint(l);
4042
- f && (s.startOffset = f.distance, s.lines.forEach(function(c) {
4043
- c.material.uniforms.startOffset.value = s.startOffset;
4044
- }));
4278
+ var l = n.projectPointsToScreen(s.config.points, n.five.camera), h = n.findNearestOffscreenPoint(l);
4279
+ h && (s.startOffset = h.distance);
4280
+ var c = n.findFarestOffscreenPoint(l);
4281
+ c && (s.endOffset = c.totalLength - c.distance), s.lines.forEach(function(g) {
4282
+ g.material.uniforms.startOffset.value = s.startOffset, g.material.uniforms.endOffset.value = s.endOffset;
4283
+ }), s.subMeshMaterial.uniforms.startOffset.value = s.startOffset, s.subMeshMaterial.uniforms.endOffset.value = s.endOffset, s.cycleStartTime = performance.now() / 1e3, s.lastAnimationProgress = 0;
4045
4284
  };
4046
4285
  if (e) {
4047
4286
  var a = this.paths.get(e);
@@ -4054,13 +4293,13 @@ var Qn = (
4054
4293
  var n = this;
4055
4294
  e.lines.forEach(function(t) {
4056
4295
  n.five.scene.remove(t), t.geometry.dispose(), t.material.dispose();
4057
- }), this.five.scene.remove(e.particles), e.particleGeometry.dispose(), e.particleMaterial.dispose();
4296
+ }), this.five.scene.remove(e.particles), e.particleGeometry.dispose(), e.particleMaterial.dispose(), this.five.scene.remove(e.subMesh), e.subMeshGeometry.dispose(), e.subMeshMaterial.dispose();
4058
4297
  }, o.prototype.dispose = function() {
4059
- this.stopAnimation(), this.clearAllPaths(), this.hooks.emit("dispose");
4298
+ this.pause(), this.clearAllPaths(), this.hooks.emit("dispose");
4060
4299
  }, o;
4061
- })(Ct.Controller)
4062
- ), or = function(h, o) {
4063
- return new Qn(h, o);
4300
+ })(Ot.Controller)
4301
+ ), or = function(f, o) {
4302
+ return new Qn(f, o);
4064
4303
  };
4065
4304
  export {
4066
4305
  rr as BackgroundPlugin,
@@ -4070,7 +4309,7 @@ export {
4070
4309
  tr as ItemMaskPlugin,
4071
4310
  qe as OrbitControls,
4072
4311
  nr as OrientationPlugin,
4073
- ar as PanoAnimePlugin,
4312
+ ir as PanoAnimePlugin,
4074
4313
  jn as RoundedBoxGeometry,
4075
- ir as TrajectoryPlugin
4314
+ ar as TrajectoryPlugin
4076
4315
  };