@realsee/dnalogel 3.47.14 → 3.47.15

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 (99) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/PanoTagPlugin/utils/requestIdleCallback.d.ts +1 -1
  3. package/dist/Sculpt/Meshes/Line.d.ts +1 -0
  4. package/dist/Sculpt/Meshes/Polygon.d.ts +1 -0
  5. package/dist/index.cjs.js +52 -52
  6. package/dist/index.js +18633 -18631
  7. package/dist/index.umd.js +49 -49
  8. package/libs/AreaMakerPlugin/Controller.js +78 -150
  9. package/libs/AreaMakerPlugin/index.js +3 -75
  10. package/libs/AreaMakerPlugin/utils/Item.js +111 -185
  11. package/libs/CSS3DRenderPlugin/Controller.js +29 -86
  12. package/libs/CSS3DRenderPlugin/index.js +12 -69
  13. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +58 -127
  14. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +113 -174
  15. package/libs/CruisePlugin/BaseController.js +50 -122
  16. package/libs/CruisePlugin/Move.js +21 -74
  17. package/libs/CruisePlugin/Work.js +46 -99
  18. package/libs/CruisePlugin/index.js +26 -79
  19. package/libs/CurrentPanoImagePlugin/Controller.js +104 -176
  20. package/libs/CurrentPanoImagePlugin/index.js +4 -76
  21. package/libs/GuideLinePlugin/Controller.js +26 -79
  22. package/libs/GuideLinePlugin/GuideLineItem.js +24 -77
  23. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +2 -3
  24. package/libs/GuideLinePlugin/GuideLineModeItem.js +22 -75
  25. package/libs/GuideLinePlugin/index.js +26 -79
  26. package/libs/ModelMakerPlugin/Controller.js +83 -139
  27. package/libs/ModelMakerPlugin/index.js +16 -72
  28. package/libs/ModelTVVideoPlugin/Plugin.js +48 -105
  29. package/libs/ModelTVVideoPlugin/index.js +7 -64
  30. package/libs/Object3DHelperPlugin/Controller.js +32 -56
  31. package/libs/Object3DHelperPlugin/index.js +12 -35
  32. package/libs/PanoCompassPlugin/Controller.js +37 -93
  33. package/libs/PanoCompassPlugin/index.js +11 -67
  34. package/libs/PanoDoorLabelPlugin/BaseController.js +25 -97
  35. package/libs/PanoDoorLabelPlugin/Controller.js +115 -187
  36. package/libs/PanoDoorLabelPlugin/index.js +4 -76
  37. package/libs/PanoMeasurePlugin/Components/Controller0.js +83 -128
  38. package/libs/PanoMeasurePlugin/Components/Controller1.js +96 -141
  39. package/libs/PanoMeasurePlugin/Controller/EditController.js +66 -111
  40. package/libs/PanoMeasurePlugin/Controller/WatchController.js +51 -121
  41. package/libs/PanoMeasurePlugin/Controller/index.js +59 -101
  42. package/libs/PanoMeasurePlugin/Model/area.js +21 -91
  43. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +0 -73
  44. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +27 -72
  45. package/libs/PanoMeasurePlugin/index.js +25 -67
  46. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +17 -89
  47. package/libs/PanoSpatialTagPlugin/Plugin.js +106 -163
  48. package/libs/PanoSpatialTagPlugin/index.js +5 -62
  49. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +67 -141
  50. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +208 -281
  51. package/libs/PanoTagPlugin/Components/Tag/index.js +180 -251
  52. package/libs/PanoTagPlugin/Components/TagContainer.js +80 -151
  53. package/libs/PanoTagPlugin/Components/TagItem.js +67 -138
  54. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +61 -132
  55. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +28 -99
  56. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +30 -101
  57. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +36 -107
  58. package/libs/PanoTagPlugin/controller/TagRender.js +68 -121
  59. package/libs/PanoTagPlugin/controller/TagUtil.js +79 -132
  60. package/libs/PanoTagPlugin/controller/index.js +55 -108
  61. package/libs/PanoTagPlugin/index.js +31 -84
  62. package/libs/PanoTagPlugin/utils/requestIdleCallback.d.ts +1 -1
  63. package/libs/PanoTagPlugin/utils/requestIdleCallback.js +5 -13
  64. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +30 -104
  65. package/libs/PanoVideoPlugin/Controller.js +64 -136
  66. package/libs/PanoVideoPlugin/VideoMeshController.js +74 -148
  67. package/libs/PanoVideoPlugin/index.js +8 -80
  68. package/libs/PipelinePlugin/Controller.js +128 -199
  69. package/libs/PipelinePlugin/index.js +5 -76
  70. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +17 -91
  71. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +14 -88
  72. package/libs/PipelinePlugin/utils/Objects/Pipe.js +56 -130
  73. package/libs/Sculpt/Meshes/Box.js +5 -6
  74. package/libs/Sculpt/Meshes/Cylinder.js +2 -3
  75. package/libs/Sculpt/Meshes/Line.d.ts +1 -0
  76. package/libs/Sculpt/Meshes/Line.js +23 -17
  77. package/libs/Sculpt/Meshes/Point.js +9 -10
  78. package/libs/Sculpt/Meshes/Polygon.d.ts +1 -0
  79. package/libs/Sculpt/Meshes/Polygon.js +24 -18
  80. package/libs/Sculpt/Meshes/Polyline.js +4 -5
  81. package/libs/Sculpt/Meshes/Rectangle.js +3 -4
  82. package/libs/Sculpt/Objects/Line/Editor.js +2 -3
  83. package/libs/Sculpt/utils/three/ColoredMesh.js +3 -4
  84. package/libs/base/BasePlugin.js +3 -4
  85. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +59 -128
  86. package/libs/floorplan/MapviewFloorplanPlugin/index.js +6 -75
  87. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +59 -129
  88. package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -75
  89. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +62 -134
  90. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -76
  91. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +81 -151
  92. package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -75
  93. package/libs/floorplan/index.js +0 -1
  94. package/libs/index.js +62 -62
  95. package/libs/shared-utils/five/index.js +2 -3
  96. package/libs/shared-utils/five/lookObject.js +17 -18
  97. package/libs/shared-utils/logger.js +1 -1
  98. package/libs/shared-utils/three/index.js +0 -1
  99. package/package.json +1 -1
@@ -1,13 +1,12 @@
1
1
  var g = Object.defineProperty;
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);
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);
4
4
  import { vertexShader as M, fragmentShader as P } from "./utils/shader.js";
5
- import { VideoTexture as F, LinearFilter as c, ShaderMaterial as y, Vector4 as x, SphereBufferGeometry as L, Mesh as V, Vector3 as m, Quaternion as b } from "three";
5
+ import { VideoTexture as F, LinearFilter as m, ShaderMaterial as y, Vector4 as x, SphereBufferGeometry as L, Mesh as V, Vector3 as l, Quaternion as b } from "three";
6
6
  import "hammerjs";
7
7
  import "three/examples/jsm/renderers/CSS3DRenderer";
8
8
  import "@realsee/five/line";
9
9
  import "../shared-utils/tag.js";
10
- import "../Sculpt/utils/Modules/Global.js";
11
10
  import "../shared-utils/three/THREESphere.js";
12
11
  import A from "animejs";
13
12
  import { requestAnimationFrameInterval as D } from "../shared-utils/animationFrame/index.js";
@@ -21,83 +20,10 @@ import "../shared-utils/Subscribe.js";
21
20
  import "../shared-utils/Utils/WorkUtil.js";
22
21
  import "../shared-utils/five/transformPosition.js";
23
22
  import "../shared-utils/three/temp.js";
24
- import "../Sculpt/utils/Modules/Cursor.js";
25
- import "../Object3DHelperPlugin/Controller.js";
26
- import "../base/BasePlugin.js";
27
- import "../shared-utils/url/absoluteUrl.js";
28
23
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
29
- import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
30
- import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
31
- import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
32
- import "../shared-utils/three/IObject3D.js";
33
- import "../shared-utils/three/boundingBox.js";
34
- import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
35
- import "../shared-utils/Object3DHelper/utils/direction.js";
36
- import "../shared-utils/Object3DHelper/Constants/color.js";
37
- import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
38
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
39
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
40
- import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
41
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
42
- import "../CSS3DRenderPlugin/utils/even.js";
43
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
44
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
45
- import "../shared-utils/three/centerPoint.js";
46
- import "../shared-utils/three/getObjectVisible.js";
47
- import "../shared-utils/isNil.js";
48
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
49
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
50
- import "../shared-utils/util.js";
51
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
52
- import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
53
- import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
54
- import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
55
- import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
56
- import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
57
- import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
58
- import "../shared-utils/Object3DHelper/Controller/MoveController.js";
59
- import "../shared-utils/Object3DHelper/Base/BaseController.js";
60
- import "../shared-utils/threex/domevents/index.js";
61
- import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
62
- import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
63
- import "../Sculpt/utils/three/rayOnLine.js";
64
- import "../Object3DHelperPlugin/FiveControllerWrapper.js";
65
- import "../shared-utils/Object3DHelper/index.js";
66
- import "../shared-utils/Object3DHelper/Controller/RotateController.js";
67
- import "../shared-utils/math/rad2Deg.js";
68
- import "../shared-utils/math/deg2Rad.js";
69
- import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
70
- import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
71
- import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
72
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
73
- import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
74
- import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
75
- import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
76
- import "../shared-utils/five/fiveModelLoad.js";
77
- import "../shared-utils/five/FiveDomEvents.js";
78
- import "../shared-utils/five/calculateThreeMouse.js";
79
- import "../shared-utils/three/THREERaycaster.js";
80
- import "../shared-utils/three/PointSelector/index.js";
81
- import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
82
- import "../shared-utils/three/Magnifier.js";
83
- import "../shared-utils/three/PointSelector/utils/PointHelper.js";
84
- import "../shared-utils/three/Assets/index.js";
85
- import "../shared-utils/three/PointSelector/utils/html.js";
86
- import "../shared-utils/five/initialCSS3DRender.js";
87
- import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
88
- import "../Sculpt/Meshes/Line.js";
89
- import "../Sculpt/typings/style.js";
90
- import "../shared-utils/five/FiveLine.js";
91
- import "../Sculpt/utils/removeAllTag.js";
92
- import "../Sculpt/utils/Meshes/getLengthHTML.js";
93
- import "../shared-utils/three/applyObjectMatrixWorld.js";
94
- import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
95
- import "../shared-utils/isTouchDevice.js";
96
- import "../shared-utils/five/getPosition.js";
97
- import "../shared-utils/five/getRaycasterByNdcPosition.js";
98
- class ge {
24
+ class K {
99
25
  /** 初始化视频、模型以及相关事件监听。 */
100
- constructor(i, e) {
26
+ constructor(e, i) {
101
27
  t(this, "video");
102
28
  t(this, "_id");
103
29
  /** 视频资源地址 */
@@ -133,75 +59,75 @@ class ge {
133
59
  this.video.muted = !1;
134
60
  });
135
61
  /** 把 uv 值转换成位置 */
136
- t(this, "uv2Position", (i, e) => {
137
- var f;
138
- const o = Math.PI, a = Math.PI * 2, d = i, r = 1 - e, s = new m(
139
- -1 * Math.cos(a * d) * Math.sin(o * r),
140
- 1 * Math.cos(o * r),
141
- 1 * Math.sin(a * d) * Math.sin(o * r)
62
+ t(this, "uv2Position", (e, i) => {
63
+ var c;
64
+ const n = Math.PI, a = Math.PI * 2, d = e, s = 1 - i, r = new l(
65
+ -1 * Math.cos(a * d) * Math.sin(n * s),
66
+ 1 * Math.cos(n * s),
67
+ 1 * Math.sin(a * d) * Math.sin(n * s)
142
68
  );
143
- s.setX(-s.x);
144
- const h = (f = this.five.work) == null ? void 0 : f.observers[this.panoIndex];
69
+ r.setX(-r.x);
70
+ const h = (c = this.five.work) == null ? void 0 : c.observers[this.panoIndex];
145
71
  if (!h)
146
72
  return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);
147
- const u = h.position.clone(), l = h.quaternion.clone(), p = s.clone();
148
- return p.applyAxisAngle(new m(0, 1, 0), Math.PI / 2), p.applyQuaternion(l), p.add(u), p;
73
+ const f = h.position.clone(), p = h.quaternion.clone(), u = r.clone();
74
+ return u.applyAxisAngle(new l(0, 1, 0), Math.PI / 2), u.applyQuaternion(p), u.add(f), u;
149
75
  });
150
76
  /** Five 数据加载后需要根据点位位姿调整点位模型位置 */
151
77
  t(this, "onFiveDataLoaded", () => {
152
- var s;
153
- const i = (s = this.five.work) == null ? void 0 : s.observers[this.panoIndex];
154
- if (!i)
78
+ var r;
79
+ const e = (r = this.five.work) == null ? void 0 : r.observers[this.panoIndex];
80
+ if (!e)
155
81
  return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);
156
- this.observer = i;
157
- const { x: e, y: n, z: o, w: a } = i.quaternion, d = new b(e, n, o, a), r = i.position;
158
- this.videoMesh.position.fromArray([r.x, r.y, r.z]), this.videoMesh.quaternion.set(0, 0, 0, 1), this.videoMesh.rotateOnAxis(new m(0, 1, 0), Math.PI / 2), this.videoMesh.applyQuaternion(d);
82
+ this.observer = e;
83
+ const { x: i, y: o, z: n, w: a } = e.quaternion, d = new b(i, o, n, a), s = e.position;
84
+ this.videoMesh.position.fromArray([s.x, s.y, s.z]), this.videoMesh.quaternion.set(0, 0, 0, 1), this.videoMesh.rotateOnAxis(new l(0, 1, 0), Math.PI / 2), this.videoMesh.applyQuaternion(d);
159
85
  });
160
86
  /** 兼容视频播放 */
161
- t(this, "onFiveWantsMoveToPano", (i) => {
162
- i === this.panoIndex && (this.hasVideoEverPlayed || this.video.play().catch(() => {
87
+ t(this, "onFiveWantsMoveToPano", (e) => {
88
+ e === this.panoIndex && (this.hasVideoEverPlayed || this.video.play().catch(() => {
163
89
  }));
164
90
  });
165
91
  /** 走到某个点位上时,挂载/卸载视频 */
166
- t(this, "onFivePanoArrived", (i) => {
92
+ t(this, "onFivePanoArrived", (e) => {
167
93
  if (this.disposed)
168
94
  return this.logWarning("实例已被销毁");
169
- this.enabled && this.panoIndex === i && this.mount();
95
+ this.enabled && this.panoIndex === e && this.mount();
170
96
  });
171
- t(this, "onFivePanoWillArrive", (i) => {
172
- if (i !== this.panoIndex)
97
+ t(this, "onFivePanoWillArrive", (e) => {
98
+ if (e !== this.panoIndex)
173
99
  return this.unmount();
174
- this.panoIndex !== i && this.unmount();
100
+ this.panoIndex !== e && this.unmount();
175
101
  });
176
102
  /** Five 模型变化 */
177
- t(this, "onFiveModeChange", (i) => {
178
- i !== "Panorama" && this.hide();
103
+ t(this, "onFiveModeChange", (e) => {
104
+ e !== "Panorama" && this.hide();
179
105
  });
180
106
  /** Five mode change 动画结束 */
181
107
  t(this, "onFiveInitAnimationEnded", () => {
182
- const i = this.five.getCurrentState();
183
- i.mode === "Panorama" && i.panoIndex === this.panoIndex && this.mount();
108
+ const e = this.five.getCurrentState();
109
+ e.mode === "Panorama" && e.panoIndex === this.panoIndex && this.mount();
184
110
  });
185
111
  /** Five Canvas 点击 */
186
- t(this, "onFiveWantsTapGesture", (i) => {
112
+ t(this, "onFiveWantsTapGesture", (e) => {
187
113
  if (!this.five.scene.children.includes(this.videoMesh))
188
114
  return;
189
115
  if (this.disposed)
190
116
  return this.logWarning("实例已被销毁");
191
117
  if (!this.enabled)
192
118
  return this.logWarning("实例已被禁用");
193
- const [e] = i.intersectObject(this.videoMesh);
194
- if (!e)
119
+ const [i] = e.intersectObject(this.videoMesh);
120
+ if (!i)
195
121
  return;
196
- if (this.checkIntersectionInBounding(this.origin, e)) {
197
- const o = {
122
+ if (this.checkIntersectionInBounding(this.origin, i)) {
123
+ const n = {
198
124
  target: this,
199
125
  _preventDefaultReturn: !1,
200
126
  preventDefault: () => {
201
- o._preventDefaultReturn = !0;
127
+ n._preventDefaultReturn = !0;
202
128
  }
203
129
  };
204
- return this.hooks.emit("click", o), o._preventDefaultReturn === !1 && (this.video.muted = !this.video.muted), !1;
130
+ return this.hooks.emit("click", n), n._preventDefaultReturn === !1 && (this.video.muted = !this.video.muted), !1;
205
131
  }
206
132
  });
207
133
  /** video canplaythrough 事件触发 */
@@ -230,16 +156,16 @@ class ge {
230
156
  if (this.enabled && this.panoIndex === this.five.getCurrentState().panoIndex && this.five.getCurrentState().mode === "Panorama" && (this.renderFiveDisposer || (this.renderFiveDisposer = D(() => {
231
157
  this.five.needsRender = !0;
232
158
  }, 30)), this.five.scene.add(this.videoMesh), this.videoMesh.material.uniforms.opacity.value === 0)) {
233
- const i = {
159
+ const e = {
234
160
  value: 0
235
161
  };
236
162
  A({
237
- targets: i,
163
+ targets: e,
238
164
  value: 1,
239
165
  duration: 300,
240
166
  easing: "linear",
241
167
  update: () => {
242
- this.videoMesh.material.uniforms.opacity.value = i.value;
168
+ this.videoMesh.material.uniforms.opacity.value = e.value;
243
169
  },
244
170
  complete: () => {
245
171
  this.videoMesh.material.uniforms.opacity.value = 1;
@@ -252,20 +178,20 @@ class ge {
252
178
  });
253
179
  /** video pause 事件触发 */
254
180
  t(this, "onVideoPaused", () => {
255
- var i;
256
- (i = this.renderFiveDisposer) == null || i.call(this), this.renderFiveDisposer = void 0;
181
+ var e;
182
+ (e = this.renderFiveDisposer) == null || e.call(this), this.renderFiveDisposer = void 0;
257
183
  });
258
- var s, h;
259
- 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 = (s = e.initialState) == null ? void 0 : s.enabled) != null ? h : !0;
260
- const n = document.createElement("video");
261
- n.crossOrigin = "anonymous", n.autoplay = !1, n.muted = !0, n.loop = !0, n.playsInline = !0, this.video = n;
262
- const o = new F(this.video);
263
- o.minFilter = c, o.magFilter = c;
184
+ var r, h;
185
+ 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;
186
+ const o = document.createElement("video");
187
+ o.crossOrigin = "anonymous", o.autoplay = !1, o.muted = !0, o.loop = !0, o.playsInline = !0, this.video = o;
188
+ const n = new F(this.video);
189
+ n.minFilter = m, n.magFilter = m;
264
190
  const a = new y({
265
191
  vertexShader: M,
266
192
  fragmentShader: P,
267
193
  uniforms: {
268
- map: { value: o },
194
+ map: { value: n },
269
195
  size: {
270
196
  value: new x(this.origin[0], 1 - this.origin[1] - this.origin[3], this.origin[2], this.origin[3])
271
197
  },
@@ -275,8 +201,8 @@ class ge {
275
201
  transparent: !0
276
202
  }), d = new L(1, 64, 64);
277
203
  d.scale(-1, 1, 1);
278
- const r = new V(d, a);
279
- r.name = "pano-video-plugin", this.videoMesh = r, this.five.work && this.onFiveDataLoaded(), this.enabled && this.addEventListeners(), this.mountIfNeeded(), window[`__PANOVIDEO_${this.renderID}_DEBUG__`] = this;
204
+ const s = new V(d, a);
205
+ s.name = "pano-video-plugin", this.videoMesh = s, this.five.work && this.onFiveDataLoaded(), this.enabled && this.addEventListeners(), this.mountIfNeeded(), window[`__PANOVIDEO_${this.renderID}_DEBUG__`] = this;
280
206
  }
281
207
  /** 传入的 ID,不可更改 */
282
208
  get renderID() {
@@ -307,21 +233,21 @@ class ge {
307
233
  lookAtVideo() {
308
234
  if (!this.observer)
309
235
  return;
310
- const i = this.getUVCenter();
311
- if (!i)
312
- return;
313
- const e = this.uv2Position(i[0], i[1]);
236
+ const e = this.getUVCenter();
314
237
  if (!e)
315
238
  return;
316
- const n = new m().subVectors(e, this.observer.position).normalize(), { longitude: o, latitude: a } = E(n);
317
- this.five.setState({ panoIndex: this.panoIndex, longitude: o, latitude: a }), this.onFiveWantsMoveToPano(this.panoIndex);
239
+ const i = this.uv2Position(e[0], e[1]);
240
+ if (!i)
241
+ return;
242
+ const o = new l().subVectors(i, this.observer.position).normalize(), { longitude: n, latitude: a } = E(o);
243
+ this.five.setState({ panoIndex: this.panoIndex, longitude: n, latitude: a }), this.onFiveWantsMoveToPano(this.panoIndex);
318
244
  }
319
245
  /** 获取视频中心点的 uv */
320
246
  getUVCenter() {
321
247
  if (!this.origin)
322
248
  return;
323
- const i = this.origin[0] + this.origin[2] / 2, e = this.origin[1] + this.origin[3] / 2;
324
- return [i, e];
249
+ const e = this.origin[0] + this.origin[2] / 2, i = this.origin[1] + this.origin[3] / 2;
250
+ return [e, i];
325
251
  }
326
252
  /** 添加时间监听 */
327
253
  addEventListeners() {
@@ -333,8 +259,8 @@ class ge {
333
259
  }
334
260
  /** 如果满足 mount 条件,mount */
335
261
  mountIfNeeded() {
336
- const i = this.five.getCurrentState();
337
- i.mode === "Panorama" && i.panoIndex === this.panoIndex && this.enabled && this.mount();
262
+ const e = this.five.getCurrentState();
263
+ e.mode === "Panorama" && e.panoIndex === this.panoIndex && this.enabled && this.mount();
338
264
  }
339
265
  /** 挂载:加载视频资源;添加模型。 */
340
266
  mount() {
@@ -342,10 +268,10 @@ class ge {
342
268
  return this.logWarning("插件已经销毁,无法挂载。");
343
269
  if (this.url === "")
344
270
  return this.logWarning("视频资源不存在。");
345
- this.video.src !== this.url && (this.video.src = this.url), this.video.paused && this.video.play().catch((i) => {
346
- this.logWarning(i instanceof Error ? i.message : "视频播放失败。"), this.five.once("gesture", () => {
347
- this.video.play().catch((e) => {
348
- this.logWarning(e instanceof Error ? e.message : "自动播放视频失败。");
271
+ this.video.src !== this.url && (this.video.src = this.url), this.video.paused && this.video.play().catch((e) => {
272
+ this.logWarning(e instanceof Error ? e.message : "视频播放失败。"), this.five.once("gesture", () => {
273
+ this.video.play().catch((i) => {
274
+ this.logWarning(i instanceof Error ? i.message : "自动播放视频失败。");
349
275
  });
350
276
  });
351
277
  });
@@ -359,17 +285,17 @@ class ge {
359
285
  this.video.pause(), this.videoMesh.material.uniforms.opacity.value = 0, this.five.scene.remove(this.videoMesh);
360
286
  }
361
287
  /** 控制台打印警告 */
362
- logWarning(i) {
363
- console.warn("⛔ ==> [VideoMeshController]:", i);
288
+ logWarning(e) {
289
+ console.warn("⛔ ==> [VideoMeshController]:", e);
364
290
  }
365
291
  /** 检测射线与模型的交点是不是在视频的范围内 */
366
- checkIntersectionInBounding(i, e) {
367
- if (!e.uv)
292
+ checkIntersectionInBounding(e, i) {
293
+ if (!i.uv)
368
294
  return !1;
369
- const [n, o] = e.uv.toArray(), [a, d, r, s] = i, h = 1 - d - s, u = a + r, l = h + s;
370
- return n >= a && n <= u && o >= h && o <= l;
295
+ const [o, n] = i.uv.toArray(), [a, d, s, r] = e, h = 1 - d - r, f = a + s, p = h + r;
296
+ return o >= a && o <= f && n >= h && n <= p;
371
297
  }
372
298
  }
373
299
  export {
374
- ge as VideoMeshController
300
+ K as VideoMeshController
375
301
  };
@@ -1,5 +1,5 @@
1
1
  import { PanoVideoPluginController as r } from "./Controller.js";
2
- import { typings as Wo } from "./typings/index.js";
2
+ import { typings as z } from "./typings/index.js";
3
3
  import "./VideoMeshController.js";
4
4
  import "./utils/shader.js";
5
5
  import "three";
@@ -16,88 +16,16 @@ import "../shared-utils/Subscribe.js";
16
16
  import "../shared-utils/Utils/WorkUtil.js";
17
17
  import "../shared-utils/five/transformPosition.js";
18
18
  import "../shared-utils/three/temp.js";
19
- import "../Sculpt/utils/Modules/Global.js";
20
- import "../Sculpt/utils/Modules/Cursor.js";
21
- import "../Object3DHelperPlugin/Controller.js";
22
- import "../base/BasePlugin.js";
23
19
  import "../shared-utils/three/THREESphere.js";
24
20
  import "animejs";
25
- import "../shared-utils/url/absoluteUrl.js";
26
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
27
- import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
28
- import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
29
- import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
30
- import "../shared-utils/three/IObject3D.js";
31
- import "../shared-utils/three/boundingBox.js";
32
- import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
33
- import "../shared-utils/Object3DHelper/utils/direction.js";
34
- import "../shared-utils/Object3DHelper/Constants/color.js";
35
- import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
36
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
37
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
38
- import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
39
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
40
- import "../CSS3DRenderPlugin/utils/even.js";
41
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
42
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
43
- import "../shared-utils/three/centerPoint.js";
44
- import "../shared-utils/three/getObjectVisible.js";
45
- import "../shared-utils/isNil.js";
46
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
47
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
48
- import "../shared-utils/util.js";
49
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
50
- import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
51
- import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
52
- import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
53
- import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
54
- import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
55
- import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
56
- import "../shared-utils/Object3DHelper/Controller/MoveController.js";
57
- import "../shared-utils/Object3DHelper/Base/BaseController.js";
58
- import "../shared-utils/threex/domevents/index.js";
59
- import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
60
- import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
61
- import "../Sculpt/utils/three/rayOnLine.js";
62
- import "../Object3DHelperPlugin/FiveControllerWrapper.js";
63
- import "../shared-utils/Object3DHelper/index.js";
64
- import "../shared-utils/Object3DHelper/Controller/RotateController.js";
65
- import "../shared-utils/math/rad2Deg.js";
66
- import "../shared-utils/math/deg2Rad.js";
67
- import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
68
- import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
69
- import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
70
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
71
- import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
72
- import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
73
- import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
74
- import "../shared-utils/five/fiveModelLoad.js";
75
- import "../shared-utils/five/FiveDomEvents.js";
76
- import "../shared-utils/five/calculateThreeMouse.js";
77
- import "../shared-utils/three/THREERaycaster.js";
78
- import "../shared-utils/three/PointSelector/index.js";
79
- import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
80
- import "../shared-utils/three/Magnifier.js";
81
- import "../shared-utils/three/PointSelector/utils/PointHelper.js";
82
- import "../shared-utils/three/Assets/index.js";
83
- import "../shared-utils/three/PointSelector/utils/html.js";
84
- import "../shared-utils/five/initialCSS3DRender.js";
85
- import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
86
- import "../Sculpt/Meshes/Line.js";
87
- import "../Sculpt/typings/style.js";
88
- import "../shared-utils/five/FiveLine.js";
89
- import "../Sculpt/utils/removeAllTag.js";
90
- import "../Sculpt/utils/Meshes/getLengthHTML.js";
91
- import "../shared-utils/three/applyObjectMatrixWorld.js";
92
- import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
93
- import "../shared-utils/isTouchDevice.js";
94
- import "../shared-utils/five/getPosition.js";
95
- import "../shared-utils/five/getRaycasterByNdcPosition.js";
96
21
  import "../shared-utils/animationFrame/index.js";
22
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
97
23
  import "./utils/index.js";
98
- const Ro = (o) => new r(o);
24
+ import "../base/BasePlugin.js";
25
+ import "../shared-utils/url/absoluteUrl.js";
26
+ const k = (o) => new r(o);
99
27
  export {
100
- Ro as PanoVideoPlugin,
101
- Wo as PanoVideoPluginType,
102
- Ro as default
28
+ k as PanoVideoPlugin,
29
+ z as PanoVideoPluginType,
30
+ k as default
103
31
  };