@realsee/dnalogel 3.52.3 → 3.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/index.cjs.js +40 -40
  3. package/dist/index.d.ts +1 -79
  4. package/dist/index.js +1606 -1567
  5. package/dist/index.umd.js +34 -34
  6. package/dist/shared-utils/exports.d.ts +2 -0
  7. package/dist/shared-utils/five/FivePuppet.d.ts +63 -0
  8. package/dist/shared-utils/index.d.ts +1 -0
  9. package/dist/shared-utils/math/planimetry.d.ts +1 -1
  10. package/libs/AreaMakerPlugin/Controller.js +14 -12
  11. package/libs/AreaMakerPlugin/index.js +4 -2
  12. package/libs/AreaMakerPlugin/utils/Item.js +4 -2
  13. package/libs/CSS3DRenderPlugin/Controller.js +4 -2
  14. package/libs/CSS3DRenderPlugin/index.js +7 -5
  15. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +4 -2
  16. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +4 -2
  17. package/libs/CruisePlugin/BaseController.js +6 -4
  18. package/libs/CruisePlugin/Move.js +4 -3
  19. package/libs/CruisePlugin/Work.js +3 -2
  20. package/libs/CruisePlugin/index.js +8 -7
  21. package/libs/CurrentPanoImagePlugin/Controller.js +4 -2
  22. package/libs/CurrentPanoImagePlugin/index.js +5 -3
  23. package/libs/GuideLinePlugin/Controller.js +6 -5
  24. package/libs/GuideLinePlugin/GuideLineItem.js +4 -3
  25. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
  26. package/libs/GuideLinePlugin/GuideLineModeItem.js +4 -3
  27. package/libs/GuideLinePlugin/index.js +8 -7
  28. package/libs/ModelMakerPlugin/Controller.js +4 -2
  29. package/libs/ModelMakerPlugin/index.js +4 -2
  30. package/libs/ModelTVVideoPlugin/Plugin.js +5 -3
  31. package/libs/ModelTVVideoPlugin/index.js +4 -2
  32. package/libs/Object3DHelperPlugin/Controller.js +4 -2
  33. package/libs/Object3DHelperPlugin/index.js +7 -5
  34. package/libs/PanoCompassPlugin/Controller.js +3 -2
  35. package/libs/PanoCompassPlugin/index.js +4 -3
  36. package/libs/PanoDoorLabelPlugin/BaseController.js +3 -2
  37. package/libs/PanoDoorLabelPlugin/Controller.js +3 -2
  38. package/libs/PanoDoorLabelPlugin/index.js +4 -3
  39. package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
  40. package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
  41. package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
  42. package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
  43. package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
  44. package/libs/PanoMeasurePlugin/Model/area.js +3 -2
  45. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +2 -0
  46. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +3 -2
  47. package/libs/PanoMeasurePlugin/index.js +14 -13
  48. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +4 -2
  49. package/libs/PanoRulerProPlugin/Controller.js +11 -10
  50. package/libs/PanoRulerProPlugin/RulerItems.js +3 -2
  51. package/libs/PanoRulerProPlugin/index.js +4 -3
  52. package/libs/PanoSpatialTagPlugin/Plugin.js +4 -3
  53. package/libs/PanoSpatialTagPlugin/index.js +1 -0
  54. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +4 -2
  55. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +4 -2
  56. package/libs/PanoTagPlugin/Components/Tag/index.js +4 -3
  57. package/libs/PanoTagPlugin/Components/TagContainer.js +43 -42
  58. package/libs/PanoTagPlugin/Components/TagItem.js +4 -3
  59. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +3 -2
  60. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
  61. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
  62. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
  63. package/libs/PanoTagPlugin/controller/TagRender.js +4 -3
  64. package/libs/PanoTagPlugin/controller/TagUtil.js +4 -2
  65. package/libs/PanoTagPlugin/controller/index.js +7 -6
  66. package/libs/PanoTagPlugin/index.js +13 -12
  67. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -2
  68. package/libs/PanoVideoPlugin/Controller.js +4 -2
  69. package/libs/PanoVideoPlugin/VideoMeshController.js +52 -50
  70. package/libs/PanoVideoPlugin/index.js +7 -5
  71. package/libs/PipelinePlugin/Controller.js +4 -2
  72. package/libs/PipelinePlugin/index.js +5 -3
  73. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +4 -2
  74. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +4 -2
  75. package/libs/PipelinePlugin/utils/Objects/Pipe.js +20 -18
  76. package/libs/Sculpt/Meshes/Cylinder.js +6 -5
  77. package/libs/Sculpt/Meshes/Line.js +3 -2
  78. package/libs/Sculpt/Meshes/LineWithDots.js +3 -2
  79. package/libs/Sculpt/Meshes/Point.js +6 -5
  80. package/libs/Sculpt/Meshes/Polygon.js +11 -10
  81. package/libs/Sculpt/Meshes/Rectangle.js +4 -3
  82. package/libs/Sculpt/Objects/Line/Editor.js +7 -6
  83. package/libs/Sculpt/index.js +18 -17
  84. package/libs/Sculpt/utils/export.js +5 -5
  85. package/libs/Sculpt/utils/three/ColoredMesh.js +3 -2
  86. package/libs/base/BasePlugin.js +4 -3
  87. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +4 -2
  88. package/libs/floorplan/MapviewFloorplanPlugin/index.js +5 -3
  89. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +4 -2
  90. package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -3
  91. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +19 -17
  92. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -3
  93. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +4 -2
  94. package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -3
  95. package/libs/floorplan/index.js +1 -0
  96. package/libs/index.d.ts +1 -79
  97. package/libs/index.js +156 -170
  98. package/libs/shared-utils/exports.d.ts +2 -0
  99. package/libs/shared-utils/exports.js +82 -0
  100. package/libs/shared-utils/five/FivePuppet.d.ts +63 -0
  101. package/libs/shared-utils/five/FivePuppet.js +48 -0
  102. package/libs/shared-utils/five/index.js +3 -2
  103. package/libs/shared-utils/five/lookObject.js +3 -2
  104. package/libs/shared-utils/index.d.ts +1 -0
  105. package/libs/shared-utils/index.js +10 -78
  106. package/libs/shared-utils/logger.js +1 -1
  107. package/libs/shared-utils/math/planimetry.d.ts +1 -1
  108. package/libs/shared-utils/three/index.js +1 -0
  109. package/package.json +2 -2
@@ -47,6 +47,7 @@ import "../../shared-utils/three/core/Sphere.js";
47
47
  import "animejs";
48
48
  import { waitFiveModelLoaded as G } from "../../shared-utils/five/fiveModelLoad.js";
49
49
  import { nextFrame as N } from "../../shared-utils/animationFrame/index.js";
50
+ import "../../shared-utils/five/FivePuppet.js";
50
51
  import { DebugUtil as V } from "../utils/DebugUtil.js";
51
52
  import { safeObj as T } from "../../shared-utils/safeObj.js";
52
53
  import { PointTag as z } from "./Tag/PointTag.js";
@@ -152,6 +153,7 @@ import "../../shared-utils/isTouchDevice.js";
152
153
  import "../../shared-utils/five/getPosition.js";
153
154
  import "../../shared-utils/five/getRaycasterByNdcPosition.js";
154
155
  import "../../shared-utils/three/PointSelector/utils/contents.js";
156
+ import "@realsee/five";
155
157
  import "../utils/noTypecheck.js";
156
158
  import "../Components/Tag/AudioTag/index.js";
157
159
  import "../Components/Tag/AudioTag/AudioTag.js";
@@ -183,7 +185,6 @@ import "../utils/tag/calculateTagConfig.js";
183
185
  import "../../shared-utils/typescript/entries.js";
184
186
  import "../utils/tag/adaptConfig.js";
185
187
  import "../typings/tag/TagConfig.js";
186
- import "@realsee/five";
187
188
  import "../../shared-utils/three/blink.js";
188
189
  import "../../shared-utils/vectorToCoordinate.js";
189
190
  import "../../shared-utils/formatRad.js";
@@ -211,8 +212,8 @@ import "../../base/BasePlugin.js";
211
212
  import "../utils/addDebugPoints.js";
212
213
  import "../Components/TagItem.js";
213
214
  import "../Components/Common/TagPoint.js";
214
- const C = "Dnalogel-PanoTagPlugin", uo = (d) => `${C}--${d}`;
215
- class vo extends B {
215
+ const C = "Dnalogel-PanoTagPlugin", vo = (d) => `${C}--${d}`;
216
+ class yo extends B {
216
217
  constructor(e, t) {
217
218
  super(e);
218
219
  /** state */
@@ -628,7 +629,7 @@ class vo extends B {
628
629
  }
629
630
  }
630
631
  export {
631
- vo as PanoTagPluginController,
632
- vo as default,
633
- uo as pluginFlag
632
+ yo as PanoTagPluginController,
633
+ yo as default,
634
+ vo as pluginFlag
634
635
  };
@@ -1,7 +1,7 @@
1
1
  import r from "./controller/index.js";
2
- import { pluginFlag as qr } from "./controller/index.js";
3
- import { defaultGlobalConfig as zr } from "./typings/tag/TagConfig.js";
4
- import { ContentType as Br, DimensionType as Er, PointType as Hr } from "./Archive/deprecated.js";
2
+ import { pluginFlag as vr } from "./controller/index.js";
3
+ import { defaultGlobalConfig as Ar } from "./typings/tag/TagConfig.js";
4
+ import { ContentType as Er, DimensionType as Hr, PointType as Ir } from "./Archive/deprecated.js";
5
5
  import "three";
6
6
  import "../vendor/object-assign-deep/objectAssignDeep.js";
7
7
  import "../shared-utils/positionToVector3.js";
@@ -97,6 +97,8 @@ import "../shared-utils/three/getObjectVisible.js";
97
97
  import "@realsee/five/line";
98
98
  import "../shared-utils/three/core/Sphere.js";
99
99
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
100
+ import "../shared-utils/five/FivePuppet.js";
101
+ import "@realsee/five";
100
102
  import "../shared-utils/three/PointSelector/utils/html.js";
101
103
  import "../shared-utils/five/initialCSS3DRender.js";
102
104
  import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
@@ -148,7 +150,6 @@ import "./controller/Tag/BaseTag.js";
148
150
  import "./utils/tag/calculateTagConfig.js";
149
151
  import "../shared-utils/typescript/entries.js";
150
152
  import "./utils/tag/adaptConfig.js";
151
- import "@realsee/five";
152
153
  import "../shared-utils/five/mode.js";
153
154
  import "../shared-utils/three/blink.js";
154
155
  import "../shared-utils/vectorToCoordinate.js";
@@ -185,14 +186,14 @@ import "./Components/TagContainer.js";
185
186
  import "./Components/TagItem.js";
186
187
  import "./Components/Common/TagPoint.js";
187
188
  import "../shared-utils/animationFrame/BetterTween.js";
188
- const hr = (o, t) => new r(o, t);
189
+ const jr = (o, t) => new r(o, t);
189
190
  export {
190
- Br as ContentType,
191
- Er as DimensionType,
192
- hr as PanoTagPlugin,
191
+ Er as ContentType,
192
+ Hr as DimensionType,
193
+ jr as PanoTagPlugin,
193
194
  r as PanoTagPluginController,
194
- Hr as PointType,
195
- hr as default,
196
- zr as defaultGlobalConfig,
197
- qr as pluginFlag
195
+ Ir as PointType,
196
+ jr as default,
197
+ Ar as defaultGlobalConfig,
198
+ vr as pluginFlag
198
199
  };
@@ -25,6 +25,7 @@ import "@realsee/five/line";
25
25
  import "../../../shared-utils/three/core/Sphere.js";
26
26
  import "animejs";
27
27
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
28
+ import "../../../shared-utils/five/FivePuppet.js";
28
29
  import "../../../shared-utils/positionToVector3.js";
29
30
  import "../../../shared-utils/five/vector3ToScreen.js";
30
31
  import "../../../shared-utils/five/getFiveModel.js";
@@ -68,7 +69,7 @@ import "../../../shared-utils/isTouchDevice.js";
68
69
  import "../../../shared-utils/five/getPosition.js";
69
70
  import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
70
71
  import "../../../shared-utils/three/PointSelector/utils/contents.js";
71
- function oi(o, i, t) {
72
+ function ii(o, i, t) {
72
73
  var v, b, j, C, A;
73
74
  const D = (v = t == null ? void 0 : t.useCache) != null ? v : !0;
74
75
  if (!o)
@@ -114,5 +115,5 @@ function oi(o, i, t) {
114
115
  return P(T), Object.values(f).forEach((r) => P(r)), T._isMerged = !0, T;
115
116
  }
116
117
  export {
117
- oi as calculateTagConfig
118
+ ii as calculateTagConfig
118
119
  };
@@ -46,6 +46,8 @@ import "../shared-utils/isNil.js";
46
46
  import "../shared-utils/three/core/Sphere.js";
47
47
  import "animejs";
48
48
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
49
+ import "../shared-utils/five/FivePuppet.js";
50
+ import "@realsee/five";
49
51
  import "../shared-utils/three/PointSelector/utils/html.js";
50
52
  import "../shared-utils/five/initialCSS3DRender.js";
51
53
  import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
@@ -69,7 +71,7 @@ import "../shared-utils/three/PointSelector/utils/contents.js";
69
71
  import "../shared-utils/animationFrame/index.js";
70
72
  import "./utils/index.js";
71
73
  import "../shared-utils/url/absoluteUrl.js";
72
- class Cr extends _ {
74
+ class $r extends _ {
73
75
  constructor(r) {
74
76
  super(r);
75
77
  s(this, "controllerMap", /* @__PURE__ */ new Map());
@@ -212,5 +214,5 @@ class Cr extends _ {
212
214
  }
213
215
  }
214
216
  export {
215
- Cr as PanoVideoPluginController
217
+ $r as PanoVideoPluginController
216
218
  };
@@ -1,6 +1,6 @@
1
1
  var g = Object.defineProperty;
2
- var I = (v, e, i) => e in v ? g(v, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : v[e] = i;
3
- var t = (v, e, i) => (I(v, typeof e != "symbol" ? e + "" : e, i), i);
2
+ var I = (v, i, e) => i in v ? g(v, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : v[i] = e;
3
+ var t = (v, i, e) => (I(v, typeof i != "symbol" ? i + "" : i, e), e);
4
4
  import { vertexShader as M, fragmentShader as P } from "./utils/shader.js";
5
5
  import "../shared-utils/tag.js";
6
6
  import { VideoTexture as F, LinearFilter as c, ShaderMaterial as y, Vector4 as x, SphereBufferGeometry as L, Mesh as V, Vector3 as p, Quaternion as b } from "three";
@@ -11,6 +11,7 @@ import "@realsee/five/line";
11
11
  import "../shared-utils/three/core/Sphere.js";
12
12
  import A from "animejs";
13
13
  import { requestAnimationFrameInterval as D } from "../shared-utils/animationFrame/index.js";
14
+ import "../shared-utils/five/FivePuppet.js";
14
15
  import E from "./utils/index.js";
15
16
  import "../shared-utils/positionToVector3.js";
16
17
  import "../shared-utils/five/vector3ToScreen.js";
@@ -56,9 +57,10 @@ import "../shared-utils/isTouchDevice.js";
56
57
  import "../shared-utils/five/getPosition.js";
57
58
  import "../shared-utils/five/getRaycasterByNdcPosition.js";
58
59
  import "../shared-utils/three/PointSelector/utils/contents.js";
59
- class _e {
60
+ import "@realsee/five";
61
+ class Ci {
60
62
  /** 初始化视频、模型以及相关事件监听。 */
61
- constructor(e, i) {
63
+ constructor(i, e) {
62
64
  t(this, "video");
63
65
  t(this, "_id");
64
66
  /** 视频资源地址 */
@@ -94,9 +96,9 @@ class _e {
94
96
  this.video.muted = !1;
95
97
  });
96
98
  /** 把 uv 值转换成位置 */
97
- t(this, "uv2Position", (e, i) => {
99
+ t(this, "uv2Position", (i, e) => {
98
100
  var f;
99
- const o = Math.PI, a = Math.PI * 2, d = e, s = 1 - i, r = new p(
101
+ const o = Math.PI, a = Math.PI * 2, d = i, s = 1 - e, r = new p(
100
102
  -1 * Math.cos(a * d) * Math.sin(o * s),
101
103
  1 * Math.cos(o * s),
102
104
  1 * Math.sin(a * d) * Math.sin(o * s)
@@ -111,50 +113,50 @@ class _e {
111
113
  /** Five 数据加载后需要根据点位位姿调整点位模型位置 */
112
114
  t(this, "onFiveDataLoaded", () => {
113
115
  var r;
114
- const e = (r = this.five.work) == null ? void 0 : r.observers[this.panoIndex];
115
- if (!e)
116
+ const i = (r = this.five.work) == null ? void 0 : r.observers[this.panoIndex];
117
+ if (!i)
116
118
  return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);
117
- this.observer = e;
118
- const { x: i, y: n, z: o, w: a } = e.quaternion, d = new b(i, n, o, a), s = e.position;
119
+ this.observer = i;
120
+ const { x: e, y: n, z: o, w: a } = i.quaternion, d = new b(e, n, o, a), s = i.position;
119
121
  this.videoMesh.position.fromArray([s.x, s.y, s.z]), this.videoMesh.quaternion.set(0, 0, 0, 1), this.videoMesh.rotateOnAxis(new p(0, 1, 0), Math.PI / 2), this.videoMesh.applyQuaternion(d);
120
122
  });
121
123
  /** 兼容视频播放 */
122
- t(this, "onFiveWantsMoveToPano", (e) => {
123
- e === this.panoIndex && (this.hasVideoEverPlayed || this.video.play().catch(() => {
124
+ t(this, "onFiveWantsMoveToPano", (i) => {
125
+ i === this.panoIndex && (this.hasVideoEverPlayed || this.video.play().catch(() => {
124
126
  }));
125
127
  });
126
128
  /** 走到某个点位上时,挂载/卸载视频 */
127
- t(this, "onFivePanoArrived", (e) => {
129
+ t(this, "onFivePanoArrived", (i) => {
128
130
  if (this.disposed)
129
131
  return this.logWarning("实例已被销毁");
130
- this.enabled && this.panoIndex === e && this.mount();
132
+ this.enabled && this.panoIndex === i && this.mount();
131
133
  });
132
- t(this, "onFivePanoWillArrive", (e) => {
133
- if (e !== this.panoIndex)
134
+ t(this, "onFivePanoWillArrive", (i) => {
135
+ if (i !== this.panoIndex)
134
136
  return this.unmount();
135
- this.panoIndex !== e && this.unmount();
137
+ this.panoIndex !== i && this.unmount();
136
138
  });
137
139
  /** Five 模型变化 */
138
- t(this, "onFiveModeChange", (e) => {
139
- e !== "Panorama" && this.hide();
140
+ t(this, "onFiveModeChange", (i) => {
141
+ i !== "Panorama" && this.hide();
140
142
  });
141
143
  /** Five mode change 动画结束 */
142
144
  t(this, "onFiveInitAnimationEnded", () => {
143
- const e = this.five.getCurrentState();
144
- e.mode === "Panorama" && e.panoIndex === this.panoIndex && this.mount();
145
+ const i = this.five.getCurrentState();
146
+ i.mode === "Panorama" && i.panoIndex === this.panoIndex && this.mount();
145
147
  });
146
148
  /** Five Canvas 点击 */
147
- t(this, "onFiveWantsTapGesture", (e) => {
149
+ t(this, "onFiveWantsTapGesture", (i) => {
148
150
  if (!this.five.scene.children.includes(this.videoMesh))
149
151
  return;
150
152
  if (this.disposed)
151
153
  return this.logWarning("实例已被销毁");
152
154
  if (!this.enabled)
153
155
  return this.logWarning("实例已被禁用");
154
- const [i] = e.intersectObject(this.videoMesh);
155
- if (!i)
156
+ const [e] = i.intersectObject(this.videoMesh);
157
+ if (!e)
156
158
  return;
157
- if (this.checkIntersectionInBounding(this.origin, i)) {
159
+ if (this.checkIntersectionInBounding(this.origin, e)) {
158
160
  const o = {
159
161
  target: this,
160
162
  _preventDefaultReturn: !1,
@@ -191,16 +193,16 @@ class _e {
191
193
  if (this.enabled && this.panoIndex === this.five.getCurrentState().panoIndex && this.five.getCurrentState().mode === "Panorama" && (this.renderFiveDisposer || (this.renderFiveDisposer = D(() => {
192
194
  this.five.needsRender = !0;
193
195
  }, 30)), this.five.scene.add(this.videoMesh), this.videoMesh.material.uniforms.opacity.value === 0)) {
194
- const e = {
196
+ const i = {
195
197
  value: 0
196
198
  };
197
199
  A({
198
- targets: e,
200
+ targets: i,
199
201
  value: 1,
200
202
  duration: 300,
201
203
  easing: "linear",
202
204
  update: () => {
203
- this.videoMesh.material.uniforms.opacity.value = e.value;
205
+ this.videoMesh.material.uniforms.opacity.value = i.value;
204
206
  },
205
207
  complete: () => {
206
208
  this.videoMesh.material.uniforms.opacity.value = 1;
@@ -213,11 +215,11 @@ class _e {
213
215
  });
214
216
  /** video pause 事件触发 */
215
217
  t(this, "onVideoPaused", () => {
216
- var e;
217
- (e = this.renderFiveDisposer) == null || e.call(this), this.renderFiveDisposer = void 0;
218
+ var i;
219
+ (i = this.renderFiveDisposer) == null || i.call(this), this.renderFiveDisposer = void 0;
218
220
  });
219
221
  var r, h;
220
- this.five = e, this.panoIndex = i.panoIndex, this._id = i.renderID, this.url = i.url, this.origin = i.origin.slice(), this.hooks = i.hooks, this._enabled = (h = (r = i.initialState) == null ? void 0 : r.enabled) != null ? h : !0;
222
+ this.five = i, this.panoIndex = e.panoIndex, this._id = e.renderID, this.url = e.url, this.origin = e.origin.slice(), this.hooks = e.hooks, this._enabled = (h = (r = e.initialState) == null ? void 0 : r.enabled) != null ? h : !0;
221
223
  const n = document.createElement("video");
222
224
  n.crossOrigin = "anonymous", n.autoplay = !1, n.muted = !0, n.loop = !0, n.playsInline = !0, this.video = n;
223
225
  const o = new F(this.video);
@@ -268,21 +270,21 @@ class _e {
268
270
  lookAtVideo() {
269
271
  if (!this.observer)
270
272
  return;
271
- const e = this.getUVCenter();
272
- if (!e)
273
- return;
274
- const i = this.uv2Position(e[0], e[1]);
273
+ const i = this.getUVCenter();
275
274
  if (!i)
276
275
  return;
277
- const n = new p().subVectors(i, this.observer.position).normalize(), { longitude: o, latitude: a } = E(n);
276
+ const e = this.uv2Position(i[0], i[1]);
277
+ if (!e)
278
+ return;
279
+ const n = new p().subVectors(e, this.observer.position).normalize(), { longitude: o, latitude: a } = E(n);
278
280
  this.five.setState({ panoIndex: this.panoIndex, longitude: o, latitude: a }), this.onFiveWantsMoveToPano(this.panoIndex);
279
281
  }
280
282
  /** 获取视频中心点的 uv */
281
283
  getUVCenter() {
282
284
  if (!this.origin)
283
285
  return;
284
- const e = this.origin[0] + this.origin[2] / 2, i = this.origin[1] + this.origin[3] / 2;
285
- return [e, i];
286
+ const i = this.origin[0] + this.origin[2] / 2, e = this.origin[1] + this.origin[3] / 2;
287
+ return [i, e];
286
288
  }
287
289
  /** 添加时间监听 */
288
290
  addEventListeners() {
@@ -294,8 +296,8 @@ class _e {
294
296
  }
295
297
  /** 如果满足 mount 条件,mount */
296
298
  mountIfNeeded() {
297
- const e = this.five.getCurrentState();
298
- e.mode === "Panorama" && e.panoIndex === this.panoIndex && this.enabled && this.mount();
299
+ const i = this.five.getCurrentState();
300
+ i.mode === "Panorama" && i.panoIndex === this.panoIndex && this.enabled && this.mount();
299
301
  }
300
302
  /** 挂载:加载视频资源;添加模型。 */
301
303
  mount() {
@@ -303,10 +305,10 @@ class _e {
303
305
  return this.logWarning("插件已经销毁,无法挂载。");
304
306
  if (this.url === "")
305
307
  return this.logWarning("视频资源不存在。");
306
- this.video.src !== this.url && (this.video.src = this.url), this.video.paused && this.video.play().catch((e) => {
307
- this.logWarning(e instanceof Error ? e.message : "视频播放失败。"), this.five.once("gesture", () => {
308
- this.video.play().catch((i) => {
309
- this.logWarning(i instanceof Error ? i.message : "自动播放视频失败。");
308
+ this.video.src !== this.url && (this.video.src = this.url), this.video.paused && this.video.play().catch((i) => {
309
+ this.logWarning(i instanceof Error ? i.message : "视频播放失败。"), this.five.once("gesture", () => {
310
+ this.video.play().catch((e) => {
311
+ this.logWarning(e instanceof Error ? e.message : "自动播放视频失败。");
310
312
  });
311
313
  });
312
314
  });
@@ -320,17 +322,17 @@ class _e {
320
322
  this.video.pause(), this.videoMesh.material.uniforms.opacity.value = 0, this.five.scene.remove(this.videoMesh);
321
323
  }
322
324
  /** 控制台打印警告 */
323
- logWarning(e) {
324
- console.warn("⛔ ==> [VideoMeshController]:", e);
325
+ logWarning(i) {
326
+ console.warn("⛔ ==> [VideoMeshController]:", i);
325
327
  }
326
328
  /** 检测射线与模型的交点是不是在视频的范围内 */
327
- checkIntersectionInBounding(e, i) {
328
- if (!i.uv)
329
+ checkIntersectionInBounding(i, e) {
330
+ if (!e.uv)
329
331
  return !1;
330
- const [n, o] = i.uv.toArray(), [a, d, s, r] = e, h = 1 - d - r, l = a + s, m = h + r;
332
+ const [n, o] = e.uv.toArray(), [a, d, s, r] = i, h = 1 - d - r, l = a + s, m = h + r;
331
333
  return n >= a && n <= l && o >= h && o <= m;
332
334
  }
333
335
  }
334
336
  export {
335
- _e as VideoMeshController
337
+ Ci as VideoMeshController
336
338
  };
@@ -1,5 +1,5 @@
1
1
  import { PanoVideoPluginController as r } from "./Controller.js";
2
- import { typings as Po } from "./typings/index.js";
2
+ import { typings as go } from "./typings/index.js";
3
3
  import "./VideoMeshController.js";
4
4
  import "./utils/shader.js";
5
5
  import "../shared-utils/tag.js";
@@ -34,6 +34,8 @@ import "../shared-utils/isNil.js";
34
34
  import "../shared-utils/three/core/Sphere.js";
35
35
  import "animejs";
36
36
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
37
+ import "../shared-utils/five/FivePuppet.js";
38
+ import "@realsee/five";
37
39
  import "../shared-utils/three/PointSelector/utils/html.js";
38
40
  import "../shared-utils/five/initialCSS3DRender.js";
39
41
  import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
@@ -58,9 +60,9 @@ import "../shared-utils/animationFrame/index.js";
58
60
  import "./utils/index.js";
59
61
  import "../base/BasePlugin.js";
60
62
  import "../shared-utils/url/absoluteUrl.js";
61
- const eo = (o) => new r(o);
63
+ const lo = (o) => new r(o);
62
64
  export {
63
- eo as PanoVideoPlugin,
64
- Po as PanoVideoPluginType,
65
- eo as default
65
+ lo as PanoVideoPlugin,
66
+ go as PanoVideoPluginType,
67
+ lo as default
66
68
  };
@@ -38,6 +38,7 @@ import "../shared-utils/three/core/Sphere.js";
38
38
  import "animejs";
39
39
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
40
40
  import { equal as O } from "../shared-utils/equal.js";
41
+ import "../shared-utils/five/FivePuppet.js";
41
42
  import { loadTexture as x } from "../shared-utils/three/loadTexture.js";
42
43
  import { format as y, getPipesFromLibrary as C } from "./utils/formatData.js";
43
44
  import { ObjectFlowPipe as D } from "./utils/Objects/FlowPipe.js";
@@ -85,6 +86,7 @@ import "../shared-utils/isTouchDevice.js";
85
86
  import "../shared-utils/five/getPosition.js";
86
87
  import "../shared-utils/five/getRaycasterByNdcPosition.js";
87
88
  import "../shared-utils/three/PointSelector/utils/contents.js";
89
+ import "@realsee/five";
88
90
  import "../shared-utils/isTruelyObject.js";
89
91
  import "../shared-utils/animationFrame/index.js";
90
92
  import "./utils/Objects/Pipe.js";
@@ -93,7 +95,7 @@ import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
93
95
  import "../shared-utils/three/Extras/Core/Interpolations.js";
94
96
  import "../shared-utils/three/Extras/Core/Interpolations2.js";
95
97
  const g = { flowSpeed: 0.6, rotateSpeed: 0 };
96
- class Be extends S {
98
+ class Ke extends S {
97
99
  constructor(e) {
98
100
  super(e);
99
101
  // ==================== public properties ====================
@@ -373,5 +375,5 @@ class Be extends S {
373
375
  }
374
376
  }
375
377
  export {
376
- Be as Controller
378
+ Ke as Controller
377
379
  };
@@ -33,6 +33,8 @@ import "../shared-utils/isNil.js";
33
33
  import "../shared-utils/three/core/Sphere.js";
34
34
  import "animejs";
35
35
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
36
+ import "../shared-utils/five/FivePuppet.js";
37
+ import "@realsee/five";
36
38
  import "../shared-utils/three/PointSelector/utils/html.js";
37
39
  import "../shared-utils/five/initialCSS3DRender.js";
38
40
  import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
@@ -65,8 +67,8 @@ import "../shared-utils/animationFrame/BetterTween.js";
65
67
  import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
66
68
  import "../shared-utils/three/Extras/Core/Interpolations.js";
67
69
  import "../shared-utils/three/Extras/Core/Interpolations2.js";
68
- const dr = (r) => new o(r);
70
+ const wr = (r) => new o(r);
69
71
  export {
70
- dr as PipelinePlugin,
71
- dr as default
72
+ wr as PipelinePlugin,
73
+ wr as default
72
74
  };
@@ -10,6 +10,7 @@ import "@realsee/five/line";
10
10
  import "../../../shared-utils/three/core/Sphere.js";
11
11
  import "animejs";
12
12
  import { requestAnimationFrameInterval as c } from "../../../shared-utils/animationFrame/index.js";
13
+ import "../../../shared-utils/five/FivePuppet.js";
13
14
  import { ObjectPipe as h } from "./Pipe.js";
14
15
  import "../../../shared-utils/positionToVector3.js";
15
16
  import "../../../shared-utils/five/vector3ToScreen.js";
@@ -55,6 +56,7 @@ import "../../../shared-utils/isTouchDevice.js";
55
56
  import "../../../shared-utils/five/getPosition.js";
56
57
  import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
57
58
  import "../../../shared-utils/three/PointSelector/utils/contents.js";
59
+ import "@realsee/five";
58
60
  import "../../../shared-utils/animationFrame/BetterTween.js";
59
61
  import "../../../shared-utils/three/Extras/Curves/BezierCurve3.js";
60
62
  import "../../../shared-utils/three/Extras/Core/Interpolations.js";
@@ -78,7 +80,7 @@ const d = (
78
80
  }
79
81
  `
80
82
  );
81
- class St extends h {
83
+ class It extends h {
82
84
  constructor(t) {
83
85
  super(t, d);
84
86
  /** 初始状态下,当前水管内的水流在整体管道上的位移
@@ -136,5 +138,5 @@ class St extends h {
136
138
  }
137
139
  }
138
140
  export {
139
- St as ObjectFlowPipe
141
+ It as ObjectFlowPipe
140
142
  };
@@ -10,6 +10,7 @@ import "@realsee/five/line";
10
10
  import "../../../shared-utils/three/core/Sphere.js";
11
11
  import "animejs";
12
12
  import { tweenProgress as h } from "../../../shared-utils/animationFrame/BetterTween.js";
13
+ import "../../../shared-utils/five/FivePuppet.js";
13
14
  import { ObjectPipe as a } from "./Pipe.js";
14
15
  import "../../../shared-utils/positionToVector3.js";
15
16
  import "../../../shared-utils/five/vector3ToScreen.js";
@@ -55,11 +56,12 @@ import "../../../shared-utils/isTouchDevice.js";
55
56
  import "../../../shared-utils/five/getPosition.js";
56
57
  import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
57
58
  import "../../../shared-utils/three/PointSelector/utils/contents.js";
59
+ import "@realsee/five";
58
60
  import "../../../shared-utils/animationFrame/index.js";
59
61
  import "../../../shared-utils/three/Extras/Curves/BezierCurve3.js";
60
62
  import "../../../shared-utils/three/Extras/Core/Interpolations.js";
61
63
  import "../../../shared-utils/three/Extras/Core/Interpolations2.js";
62
- class Ai extends a {
64
+ class vi extends a {
63
65
  constructor(i) {
64
66
  super(i);
65
67
  p(this, "imageCount", 64);
@@ -82,5 +84,5 @@ class Ai extends a {
82
84
  }
83
85
  }
84
86
  export {
85
- Ai as ObjectHighlightPipe
87
+ vi as ObjectHighlightPipe
86
88
  };
@@ -10,21 +10,21 @@ var f = (p, e, t) => e in p ? d(p, e, { enumerable: !0, configurable: !0, writab
10
10
  return p;
11
11
  };
12
12
  var n = (p, e, t) => (f(p, typeof e != "symbol" ? e + "" : e, t), t);
13
- var l = (p, e, t) => new Promise((i, a) => {
13
+ var l = (p, e, t) => new Promise((i, m) => {
14
14
  var o = (s) => {
15
15
  try {
16
- m(t.next(s));
16
+ a(t.next(s));
17
17
  } catch (c) {
18
- a(c);
18
+ m(c);
19
19
  }
20
20
  }, r = (s) => {
21
21
  try {
22
- m(t.throw(s));
22
+ a(t.throw(s));
23
23
  } catch (c) {
24
- a(c);
24
+ m(c);
25
25
  }
26
- }, m = (s) => s.done ? i(s.value) : Promise.resolve(s.value).then(o, r);
27
- m((t = t.apply(p, e)).next());
26
+ }, a = (s) => s.done ? i(s.value) : Promise.resolve(s.value).then(o, r);
27
+ a((t = t.apply(p, e)).next());
28
28
  });
29
29
  import * as u from "three";
30
30
  import "../../../shared-utils/tag.js";
@@ -35,6 +35,7 @@ import "@realsee/five/line";
35
35
  import "../../../shared-utils/three/core/Sphere.js";
36
36
  import "animejs";
37
37
  import { BetterTween as g } from "../../../shared-utils/animationFrame/BetterTween.js";
38
+ import "../../../shared-utils/five/FivePuppet.js";
38
39
  import { CustomBezierCurve3 as x } from "../../../shared-utils/three/Extras/Curves/BezierCurve3.js";
39
40
  import "../../../shared-utils/positionToVector3.js";
40
41
  import "../../../shared-utils/five/vector3ToScreen.js";
@@ -80,6 +81,7 @@ import "../../../shared-utils/isTouchDevice.js";
80
81
  import "../../../shared-utils/five/getPosition.js";
81
82
  import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
82
83
  import "../../../shared-utils/three/PointSelector/utils/contents.js";
84
+ import "@realsee/five";
83
85
  import "../../../shared-utils/animationFrame/index.js";
84
86
  import "../../../shared-utils/three/Extras/Core/Interpolations.js";
85
87
  import "../../../shared-utils/three/Extras/Core/Interpolations2.js";
@@ -127,9 +129,9 @@ class h extends u.Mesh {
127
129
  /** u / m: 每米水管对应到贴图上,应该对应的 u 的长度 */
128
130
  n(this, "uPreMeter", 1);
129
131
  t.geometryConfig && (this.geometryConfig = y(y({}, this.geometryConfig), t.geometryConfig)), this.customID = t.id || this.uuid, this.pathPoints = t.path, this.path = h.calculatePath(t.path.map((s) => new u.Vector3().fromArray(s))), this.pathLength = this.path.getLength(), this.texture = h.formatTexture(t.texture);
130
- const { radius: a, tubularSegments: o, radialSegments: r } = this.geometryConfig, m = h.formatTexture(t.texture);
132
+ const { radius: m, tubularSegments: o, radialSegments: r } = this.geometryConfig, a = h.formatTexture(t.texture);
131
133
  this.geometry = h.formatGeometryUV(
132
- new u.TubeBufferGeometry(this.path, o, a, r),
134
+ new u.TubeBufferGeometry(this.path, o, m, r),
133
135
  this.pathLength,
134
136
  this.uPreMeter
135
137
  ), this.material = new u.ShaderMaterial({
@@ -138,7 +140,7 @@ class h extends u.Mesh {
138
140
  uOffset: { value: 0 },
139
141
  vOffset: { value: 0 },
140
142
  envMap: {
141
- value: m
143
+ value: a
142
144
  }
143
145
  },
144
146
  transparent: !0,
@@ -153,11 +155,11 @@ class h extends u.Mesh {
153
155
  static calculatePath(t) {
154
156
  return t.length === 2 ? new u.LineCurve3(t[0], t[1]) : new x(t);
155
157
  }
156
- static formatGeometryUV(t, i, a) {
158
+ static formatGeometryUV(t, i, m) {
157
159
  const o = t.getAttribute("uv");
158
160
  for (let r = 0; r < o.count; r++) {
159
- const m = o.getX(r) * i * a;
160
- o.setX(r, m);
161
+ const a = o.getX(r) * i * m;
162
+ o.setX(r, a);
161
163
  }
162
164
  return t;
163
165
  }
@@ -174,9 +176,9 @@ class h extends u.Mesh {
174
176
  const i = 0;
175
177
  if (typeof (t == null ? void 0 : t.duration) != "number")
176
178
  return this.setOpacity(i);
177
- const a = this.material.uniforms.opacity.value;
178
- return a === i ? !0 : new Promise((r) => {
179
- this.opacityAnime = new g({ progress: a }).to({ progress: i }).onUpdate(({ progress: m }) => this.setOpacity(m)).onComplete(() => r(!0)).onDispose(() => {
179
+ const m = this.material.uniforms.opacity.value;
180
+ return m === i ? !0 : new Promise((r) => {
181
+ this.opacityAnime = new g({ progress: m }).to({ progress: i }).onUpdate(({ progress: a }) => this.setOpacity(a)).onComplete(() => r(!0)).onDispose(() => {
180
182
  this.setOpacity(i), r(!1);
181
183
  }).play();
182
184
  });
@@ -189,9 +191,9 @@ class h extends u.Mesh {
189
191
  const i = 1;
190
192
  if (typeof (t == null ? void 0 : t.duration) != "number")
191
193
  return this.setOpacity(i);
192
- const a = this.material.uniforms.opacity.value;
194
+ const m = this.material.uniforms.opacity.value;
193
195
  return new Promise((r) => {
194
- this.opacityAnime = new g({ progress: a }).to({ progress: i }).onUpdate(({ progress: m }) => this.setOpacity(m)).onComplete(() => r(!0)).onDispose(() => {
196
+ this.opacityAnime = new g({ progress: m }).to({ progress: i }).onUpdate(({ progress: a }) => this.setOpacity(a)).onComplete(() => r(!0)).onDispose(() => {
195
197
  this.setOpacity(i), r(!1);
196
198
  }).play();
197
199
  });