@realsee/dnalogel 3.50.14 → 3.50.15-alpha.1

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 (110) hide show
  1. package/README.md +116 -0
  2. package/dist/Sculpt/Objects/Base/index.d.ts +1 -1
  3. package/dist/Sculpt/index.d.ts +4 -4
  4. package/dist/index.cjs.js +262 -262
  5. package/dist/index.js +4235 -4231
  6. package/dist/index.umd.js +263 -263
  7. package/dist/shared-utils/five/index.d.ts +2 -0
  8. package/dist/shared-utils/tag.d.ts +1 -1
  9. package/dist/shared-utils/three/index.d.ts +1 -0
  10. package/libs/AreaMakerPlugin/Controller.js +104 -74
  11. package/libs/AreaMakerPlugin/index.js +33 -3
  12. package/libs/AreaMakerPlugin/utils/Item.js +66 -36
  13. package/libs/CSS3DRenderPlugin/Controller.js +39 -19
  14. package/libs/CSS3DRenderPlugin/index.js +34 -14
  15. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +60 -35
  16. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +98 -78
  17. package/libs/CruisePlugin/BaseController.js +59 -29
  18. package/libs/CruisePlugin/Move.js +33 -14
  19. package/libs/CruisePlugin/Work.js +66 -47
  20. package/libs/CruisePlugin/index.js +38 -19
  21. package/libs/CurrentPanoImagePlugin/Controller.js +68 -38
  22. package/libs/CurrentPanoImagePlugin/index.js +34 -4
  23. package/libs/GuideLinePlugin/Controller.js +69 -50
  24. package/libs/GuideLinePlugin/GuideLineItem.js +34 -15
  25. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
  26. package/libs/GuideLinePlugin/GuideLineModeItem.js +34 -15
  27. package/libs/GuideLinePlugin/index.js +38 -19
  28. package/libs/ModelMakerPlugin/Controller.js +60 -42
  29. package/libs/ModelMakerPlugin/index.js +34 -16
  30. package/libs/ModelTVVideoPlugin/Plugin.js +48 -28
  31. package/libs/ModelTVVideoPlugin/index.js +24 -4
  32. package/libs/Object3DHelperPlugin/Controller.js +49 -30
  33. package/libs/Object3DHelperPlugin/index.js +36 -17
  34. package/libs/PanoCompassPlugin/Controller.js +33 -13
  35. package/libs/PanoCompassPlugin/index.js +34 -14
  36. package/libs/PanoDoorLabelPlugin/BaseController.js +55 -25
  37. package/libs/PanoDoorLabelPlugin/Controller.js +99 -69
  38. package/libs/PanoDoorLabelPlugin/index.js +34 -4
  39. package/libs/PanoMeasurePlugin/Components/Controller0.js +8 -8
  40. package/libs/PanoMeasurePlugin/Components/Controller1.js +8 -8
  41. package/libs/PanoMeasurePlugin/Controller/WatchController.js +75 -49
  42. package/libs/PanoMeasurePlugin/Controller/index.js +16 -16
  43. package/libs/PanoMeasurePlugin/Model/area.js +41 -15
  44. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +29 -0
  45. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +8 -8
  46. package/libs/PanoMeasurePlugin/index.js +3 -3
  47. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +43 -15
  48. package/libs/PanoRulerProPlugin/Controller.js +60 -30
  49. package/libs/PanoRulerProPlugin/RulerItems.js +85 -55
  50. package/libs/PanoRulerProPlugin/index.js +33 -3
  51. package/libs/PanoSpatialTagPlugin/Plugin.js +54 -34
  52. package/libs/PanoSpatialTagPlugin/index.js +22 -2
  53. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +79 -49
  54. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +235 -206
  55. package/libs/PanoTagPlugin/Components/Tag/index.js +152 -125
  56. package/libs/PanoTagPlugin/Components/TagContainer.js +97 -70
  57. package/libs/PanoTagPlugin/Components/TagItem.js +31 -4
  58. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +29 -2
  59. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +55 -28
  60. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +53 -26
  61. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +54 -27
  62. package/libs/PanoTagPlugin/controller/TagRender.js +48 -29
  63. package/libs/PanoTagPlugin/controller/TagUtil.js +33 -14
  64. package/libs/PanoTagPlugin/controller/index.js +49 -30
  65. package/libs/PanoTagPlugin/index.js +41 -22
  66. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +59 -29
  67. package/libs/PanoVideoPlugin/Controller.js +91 -61
  68. package/libs/PanoVideoPlugin/VideoMeshController.js +56 -26
  69. package/libs/PanoVideoPlugin/index.js +36 -6
  70. package/libs/PipelinePlugin/Controller.js +80 -51
  71. package/libs/PipelinePlugin/index.js +34 -5
  72. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +44 -14
  73. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +43 -13
  74. package/libs/PipelinePlugin/utils/Objects/Pipe.js +61 -31
  75. package/libs/Sculpt/Meshes/Box.js +3 -2
  76. package/libs/Sculpt/Meshes/Cylinder.js +3 -2
  77. package/libs/Sculpt/Meshes/Line.js +9 -8
  78. package/libs/Sculpt/Meshes/LineWithDots.js +8 -7
  79. package/libs/Sculpt/Meshes/Point.js +3 -2
  80. package/libs/Sculpt/Meshes/Polygon.js +3 -2
  81. package/libs/Sculpt/Meshes/Prism.js +9 -8
  82. package/libs/Sculpt/Meshes/Rectangle.js +3 -2
  83. package/libs/Sculpt/Objects/Base/index.d.ts +1 -1
  84. package/libs/Sculpt/Objects/Line/Editor.js +7 -6
  85. package/libs/Sculpt/index.d.ts +4 -4
  86. package/libs/Sculpt/index.js +3 -2
  87. package/libs/Sculpt/utils/three/ColoredMesh.js +6 -5
  88. package/libs/base/BasePlugin.js +4 -3
  89. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +89 -60
  90. package/libs/floorplan/MapviewFloorplanPlugin/index.js +34 -5
  91. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +79 -50
  92. package/libs/floorplan/ModelFloorplanPlugin/index.js +34 -5
  93. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +68 -38
  94. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +34 -4
  95. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +104 -75
  96. package/libs/floorplan/TopviewFloorplanPlugin/index.js +34 -5
  97. package/libs/floorplan/index.js +1 -0
  98. package/libs/index.js +28 -28
  99. package/libs/shared-utils/five/fiveModelLoad.js +1 -0
  100. package/libs/shared-utils/five/index.d.ts +2 -0
  101. package/libs/shared-utils/five/index.js +3 -2
  102. package/libs/shared-utils/five/lookObject.js +3 -2
  103. package/libs/shared-utils/index.js +42 -35
  104. package/libs/shared-utils/logger.js +1 -1
  105. package/libs/shared-utils/tag.d.ts +1 -1
  106. package/libs/shared-utils/tag.js +41 -41
  107. package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +3 -2
  108. package/libs/shared-utils/three/index.d.ts +1 -0
  109. package/libs/shared-utils/three/index.js +1 -0
  110. package/package.json +1 -1
@@ -1,17 +1,17 @@
1
- var f = Object.defineProperty, m = Object.defineProperties;
1
+ var g = Object.defineProperty, f = Object.defineProperties;
2
2
  var b = Object.getOwnPropertyDescriptors;
3
- var p = Object.getOwnPropertySymbols;
3
+ var h = Object.getOwnPropertySymbols;
4
4
  var M = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
5
- var l = (o, t, e) => t in o ? f(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e, a = (o, t) => {
6
- for (var e in t || (t = {}))
7
- M.call(t, e) && l(o, e, t[e]);
8
- if (p)
9
- for (var e of p(t))
10
- W.call(t, e) && l(o, e, t[e]);
5
+ var l = (o, i, r) => i in o ? g(o, i, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[i] = r, a = (o, i) => {
6
+ for (var r in i || (i = {}))
7
+ M.call(i, r) && l(o, r, i[r]);
8
+ if (h)
9
+ for (var r of h(i))
10
+ W.call(i, r) && l(o, r, i[r]);
11
11
  return o;
12
- }, d = (o, t) => m(o, b(t));
13
- var s = (o, t, e) => (l(o, typeof t != "symbol" ? t + "" : t, e), e);
14
- import { VideoMeshController as c } from "./VideoMeshController.js";
12
+ }, p = (o, i) => f(o, b(i));
13
+ var s = (o, i, r) => (l(o, typeof i != "symbol" ? i + "" : i, r), r);
14
+ import { VideoMeshController as m } from "./VideoMeshController.js";
15
15
  import { Controller as _ } from "../base/BasePlugin.js";
16
16
  import "./utils/shader.js";
17
17
  import "../shared-utils/tag.js";
@@ -27,20 +27,50 @@ import "../shared-utils/five/transformPosition.js";
27
27
  import "../shared-utils/three/temp.js";
28
28
  import "../shared-utils/dom/resizeObserver.js";
29
29
  import "hammerjs";
30
+ import "../shared-utils/three/PointSelector/index.js";
31
+ import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
32
+ import "../shared-utils/three/Magnifier.js";
33
+ import "../shared-utils/three/PointSelector/utils/PointHelper.js";
34
+ import "../shared-utils/three/Assets/index.js";
35
+ import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
30
36
  import "three/examples/jsm/renderers/CSS3DRenderer";
37
+ import "../CSS3DRenderPlugin/utils/even.js";
38
+ import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
39
+ import "../shared-utils/three/centerPoint.js";
40
+ import "../shared-utils/three/getObjectVisible.js";
31
41
  import "@realsee/five/line";
32
42
  import "../vendor/three/examples/jsm/lines/LineGeometry.js";
33
43
  import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
34
44
  import "../vendor/three/build/three.module.js";
35
45
  import "../shared-utils/three/core/Sphere.js";
36
46
  import "animejs";
37
- import "../shared-utils/animationFrame/index.js";
47
+ import "../shared-utils/isNil.js";
38
48
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
49
+ import "../shared-utils/three/PointSelector/utils/html.js";
50
+ import "../shared-utils/five/initialCSS3DRender.js";
51
+ import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
52
+ import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
53
+ import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
54
+ import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
55
+ import "../Sculpt/Meshes/Line.js";
56
+ import "../Sculpt/typings/style.js";
57
+ import "../shared-utils/five/FiveLine.js";
58
+ import "../shared-utils/three/IObject3D.js";
59
+ import "../Sculpt/utils/removeAllTag.js";
60
+ import "../Sculpt/utils/Meshes/getLengthHTML.js";
61
+ import "../shared-utils/three/applyObjectMatrixWorld.js";
62
+ import "../shared-utils/util.js";
63
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
64
+ import "../shared-utils/isTouchDevice.js";
65
+ import "../shared-utils/five/getPosition.js";
66
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
67
+ import "../shared-utils/three/PointSelector/utils/contents.js";
68
+ import "../shared-utils/animationFrame/index.js";
39
69
  import "./utils/index.js";
40
70
  import "../shared-utils/url/absoluteUrl.js";
41
- class T extends _ {
42
- constructor(e) {
43
- super(e);
71
+ class Er extends _ {
72
+ constructor(r) {
73
+ super(r);
44
74
  s(this, "controllerMap", /* @__PURE__ */ new Map());
45
75
  s(this, "data");
46
76
  s(this, "enabled", !0);
@@ -57,58 +87,58 @@ class T extends _ {
57
87
  return this._disposed;
58
88
  }
59
89
  /** 加载点位视频数据,加载数据并不代表会加载点位视频。 */
60
- load(e, r) {
61
- var i;
90
+ load(r, t) {
91
+ var e;
62
92
  if (this.disposed)
63
93
  return this.logWarning("插件已被销毁");
64
- typeof ((i = r == null ? void 0 : r.initialState) == null ? void 0 : i.enabled) != "undefined" && r.initialState.enabled !== this.enabled && (r.initialState.enabled ? this.enable() : this.disable()), e.list.forEach((n) => {
65
- const u = n.pano_index, g = n.render_id;
66
- n.video_list.forEach((h) => {
94
+ typeof ((e = t == null ? void 0 : t.initialState) == null ? void 0 : e.enabled) != "undefined" && t.initialState.enabled !== this.enabled && (t.initialState.enabled ? this.enable() : this.disable()), r.list.forEach((n) => {
95
+ const c = n.pano_index, u = n.render_id;
96
+ n.video_list.forEach((d) => {
67
97
  this.controllerMap.set(
68
- h.render_id,
69
- new c(this.five, d(a({}, h), {
70
- panoIndex: u,
71
- renderID: g,
98
+ d.render_id,
99
+ new m(this.five, p(a({}, d), {
100
+ panoIndex: c,
101
+ renderID: u,
72
102
  hooks: this.hooks,
73
103
  initialState: { enabled: this.enabled }
74
104
  }))
75
105
  );
76
106
  });
77
- }), this.data = e, this.hooks.emit("dataLoaded", e);
107
+ }), this.data = r, this.hooks.emit("dataLoaded", r);
78
108
  }
79
109
  /** 开启插件功能。 */
80
- enable(e) {
81
- var i;
110
+ enable(r) {
111
+ var e;
82
112
  if (this.disposed)
83
113
  return this.logWarning("插件已被销毁");
84
114
  if (this.enabled)
85
115
  return;
86
116
  this.enabled = !0, Array.from(this.controllerMap.values()).forEach((n) => n.enable());
87
- const r = (i = e == null ? void 0 : e.userAction) != null ? i : !0;
88
- this.hooks.emit("enable", { userAction: r });
117
+ const t = (e = r == null ? void 0 : r.userAction) != null ? e : !0;
118
+ this.hooks.emit("enable", { userAction: t });
89
119
  }
90
120
  /** 禁用插件功能。 */
91
- disable(e) {
92
- var i;
121
+ disable(r) {
122
+ var e;
93
123
  if (this.disposed)
94
124
  return this.logWarning("插件已被销毁");
95
125
  if (!this.enabled)
96
126
  return;
97
127
  this.enabled = !1, Array.from(this.controllerMap.values()).forEach((n) => n.disable());
98
- const r = (i = e == null ? void 0 : e.userAction) != null ? i : !0;
99
- this.hooks.emit("disable", { userAction: r });
128
+ const t = (e = r == null ? void 0 : r.userAction) != null ? e : !0;
129
+ this.hooks.emit("disable", { userAction: t });
100
130
  }
101
131
  /** 看向某个视频。
102
132
  * - 会自动切换到全景模式。
103
133
  * - 如果遇到不能自动播放的问题,需要放到用户交互事件中调用。
104
134
  */
105
- lookAtVideoItemByRenderID(e) {
135
+ lookAtVideoItemByRenderID(r) {
106
136
  if (this.disposed)
107
137
  return this.logWarning("插件已被销毁");
108
- const r = this.controllerMap.get(e);
109
- if (!r)
110
- return this.logWarning(`ID 为 ${e} 的点位视频不存在`);
111
- r.lookAtVideo();
138
+ const t = this.controllerMap.get(r);
139
+ if (!t)
140
+ return this.logWarning(`ID 为 ${r} 的点位视频不存在`);
141
+ t.lookAtVideo();
112
142
  }
113
143
  /**
114
144
  * 取消静音。
@@ -126,26 +156,26 @@ class T extends _ {
126
156
  * }}
127
157
  * ```
128
158
  */
129
- unmuteByRenderID(e) {
159
+ unmuteByRenderID(r) {
130
160
  if (this.disposed)
131
161
  return this.logWarning("插件已被销毁");
132
- const r = this.controllerMap.get(e);
133
- if (!r)
134
- return this.logWarning(`ID 为 ${e} 的点位视频不存在`);
135
- r.unmute();
162
+ const t = this.controllerMap.get(r);
163
+ if (!t)
164
+ return this.logWarning(`ID 为 ${r} 的点位视频不存在`);
165
+ t.unmute();
136
166
  }
137
167
  /** 为一个点位添加视频(可以是多条)。 */
138
- add(e, r) {
168
+ add(r, t) {
139
169
  if (this.disposed)
140
170
  return this.logWarning("插件已被销毁");
141
- r.forEach((i) => {
142
- if (this.controllerMap.get(i.render_id))
143
- return this.logWarning(`ID 为 ${i.render_id} 的点位视频已存在`);
144
- const n = i.render_id;
171
+ t.forEach((e) => {
172
+ if (this.controllerMap.get(e.render_id))
173
+ return this.logWarning(`ID 为 ${e.render_id} 的点位视频已存在`);
174
+ const n = e.render_id;
145
175
  this.controllerMap.set(
146
- i.render_id,
147
- new c(this.five, d(a({}, i), {
148
- panoIndex: e,
176
+ e.render_id,
177
+ new m(this.five, p(a({}, e), {
178
+ panoIndex: r,
149
179
  renderID: n,
150
180
  hooks: this.hooks,
151
181
  initialState: { enabled: this.enabled }
@@ -154,32 +184,32 @@ class T extends _ {
154
184
  });
155
185
  }
156
186
  /** 根据 VideoItem render_id 删除某个视频。 */
157
- removeByRenderID(e) {
187
+ removeByRenderID(r) {
158
188
  if (this.disposed)
159
189
  return this.logWarning("插件已被销毁");
160
- const r = this.controllerMap.get(e);
161
- if (!r)
162
- return this.logWarning(`ID 为 ${e} 的点位视频不存在`);
163
- r.dispose(), this.controllerMap.delete(e);
190
+ const t = this.controllerMap.get(r);
191
+ if (!t)
192
+ return this.logWarning(`ID 为 ${r} 的点位视频不存在`);
193
+ t.dispose(), this.controllerMap.delete(r);
164
194
  }
165
195
  /** 清空现有数据 */
166
196
  clear() {
167
197
  if (this.disposed)
168
198
  return this.logWarning("插件已被销毁");
169
- Array.from(this.controllerMap.values()).forEach((e) => e.dispose()), this.controllerMap.clear();
199
+ Array.from(this.controllerMap.values()).forEach((r) => r.dispose()), this.controllerMap.clear();
170
200
  }
171
201
  /** 销毁插件 */
172
202
  dispose() {
173
203
  if (this.disposed)
174
204
  return this.logWarning("插件已被销毁");
175
- this._disposed = !0, Array.from(this.controllerMap.values()).forEach((e) => e.dispose()), this.controllerMap.clear();
205
+ this._disposed = !0, Array.from(this.controllerMap.values()).forEach((r) => r.dispose()), this.controllerMap.clear();
176
206
  }
177
207
  /** 控制台打印警告 */
178
208
  // TODO: 全局函数 curry 化
179
- logWarning(e) {
180
- console.warn("⛔ ==> [PanoVideoPluginController]:", e);
209
+ logWarning(r) {
210
+ console.warn("⛔ ==> [PanoVideoPluginController]:", r);
181
211
  }
182
212
  }
183
213
  export {
184
- T as PanoVideoPluginController
214
+ Er as PanoVideoPluginController
185
215
  };
@@ -3,8 +3,9 @@ var I = (v, e, i) => e in v ? g(v, e, { enumerable: !0, configurable: !0, writab
3
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
5
  import "../shared-utils/tag.js";
6
- 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
+ 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";
7
7
  import "hammerjs";
8
+ import "../shared-utils/three/PointSelector/index.js";
8
9
  import "three/examples/jsm/renderers/CSS3DRenderer";
9
10
  import "@realsee/five/line";
10
11
  import "../vendor/three/examples/jsm/lines/LineGeometry.js";
@@ -22,10 +23,39 @@ import "../shared-utils/Utils/WorkUtil.js";
22
23
  import "../shared-utils/five/transformPosition.js";
23
24
  import "../shared-utils/three/temp.js";
24
25
  import "../shared-utils/dom/resizeObserver.js";
26
+ import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
27
+ import "../shared-utils/three/Magnifier.js";
28
+ import "../shared-utils/three/PointSelector/utils/PointHelper.js";
29
+ import "../shared-utils/three/Assets/index.js";
30
+ import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
31
+ import "../CSS3DRenderPlugin/utils/even.js";
32
+ import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
33
+ import "../shared-utils/three/centerPoint.js";
34
+ import "../shared-utils/three/getObjectVisible.js";
35
+ import "../shared-utils/isNil.js";
36
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
37
+ import "../shared-utils/three/PointSelector/utils/html.js";
38
+ import "../shared-utils/five/initialCSS3DRender.js";
39
+ import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
40
+ import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
41
+ import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
42
+ import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
43
+ import "../Sculpt/Meshes/Line.js";
44
+ import "../Sculpt/typings/style.js";
45
+ import "../shared-utils/five/FiveLine.js";
46
+ import "../shared-utils/three/IObject3D.js";
47
+ import "../Sculpt/utils/removeAllTag.js";
48
+ import "../Sculpt/utils/Meshes/getLengthHTML.js";
49
+ import "../shared-utils/three/applyObjectMatrixWorld.js";
50
+ import "../shared-utils/util.js";
51
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
52
+ import "../shared-utils/isTouchDevice.js";
53
+ import "../shared-utils/five/getPosition.js";
54
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
55
+ import "../shared-utils/three/PointSelector/utils/contents.js";
25
56
  import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
26
57
  import "../vendor/three/build/three.module.js";
27
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
28
- class ie {
58
+ class we {
29
59
  /** 初始化视频、模型以及相关事件监听。 */
30
60
  constructor(e, i) {
31
61
  t(this, "video");
@@ -64,18 +94,18 @@ class ie {
64
94
  });
65
95
  /** 把 uv 值转换成位置 */
66
96
  t(this, "uv2Position", (e, i) => {
67
- var c;
68
- const n = Math.PI, a = Math.PI * 2, d = e, s = 1 - i, r = new l(
69
- -1 * Math.cos(a * d) * Math.sin(n * s),
70
- 1 * Math.cos(n * s),
71
- 1 * Math.sin(a * d) * Math.sin(n * s)
97
+ var f;
98
+ const o = Math.PI, a = Math.PI * 2, d = e, s = 1 - i, r = new p(
99
+ -1 * Math.cos(a * d) * Math.sin(o * s),
100
+ 1 * Math.cos(o * s),
101
+ 1 * Math.sin(a * d) * Math.sin(o * s)
72
102
  );
73
103
  r.setX(-r.x);
74
- const h = (c = this.five.work) == null ? void 0 : c.observers[this.panoIndex];
104
+ const h = (f = this.five.work) == null ? void 0 : f.observers[this.panoIndex];
75
105
  if (!h)
76
106
  return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);
77
- const f = h.position.clone(), p = h.quaternion.clone(), u = r.clone();
78
- return u.applyAxisAngle(new l(0, 1, 0), Math.PI / 2), u.applyQuaternion(p), u.add(f), u;
107
+ const l = h.position.clone(), m = h.quaternion.clone(), u = r.clone();
108
+ return u.applyAxisAngle(new p(0, 1, 0), Math.PI / 2), u.applyQuaternion(m), u.add(l), u;
79
109
  });
80
110
  /** Five 数据加载后需要根据点位位姿调整点位模型位置 */
81
111
  t(this, "onFiveDataLoaded", () => {
@@ -84,8 +114,8 @@ class ie {
84
114
  if (!e)
85
115
  return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);
86
116
  this.observer = e;
87
- const { x: i, y: o, z: n, w: a } = e.quaternion, d = new b(i, o, n, a), s = e.position;
88
- 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);
117
+ const { x: i, y: n, z: o, w: a } = e.quaternion, d = new b(i, n, o, a), s = e.position;
118
+ 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);
89
119
  });
90
120
  /** 兼容视频播放 */
91
121
  t(this, "onFiveWantsMoveToPano", (e) => {
@@ -124,14 +154,14 @@ class ie {
124
154
  if (!i)
125
155
  return;
126
156
  if (this.checkIntersectionInBounding(this.origin, i)) {
127
- const n = {
157
+ const o = {
128
158
  target: this,
129
159
  _preventDefaultReturn: !1,
130
160
  preventDefault: () => {
131
- n._preventDefaultReturn = !0;
161
+ o._preventDefaultReturn = !0;
132
162
  }
133
163
  };
134
- return this.hooks.emit("click", n), n._preventDefaultReturn === !1 && (this.video.muted = !this.video.muted), !1;
164
+ return this.hooks.emit("click", o), o._preventDefaultReturn === !1 && (this.video.muted = !this.video.muted), !1;
135
165
  }
136
166
  });
137
167
  /** video canplaythrough 事件触发 */
@@ -187,15 +217,15 @@ class ie {
187
217
  });
188
218
  var r, h;
189
219
  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;
190
- const o = document.createElement("video");
191
- o.crossOrigin = "anonymous", o.autoplay = !1, o.muted = !0, o.loop = !0, o.playsInline = !0, this.video = o;
192
- const n = new F(this.video);
193
- n.minFilter = m, n.magFilter = m;
220
+ const n = document.createElement("video");
221
+ n.crossOrigin = "anonymous", n.autoplay = !1, n.muted = !0, n.loop = !0, n.playsInline = !0, this.video = n;
222
+ const o = new F(this.video);
223
+ o.minFilter = c, o.magFilter = c;
194
224
  const a = new y({
195
225
  vertexShader: M,
196
226
  fragmentShader: P,
197
227
  uniforms: {
198
- map: { value: n },
228
+ map: { value: o },
199
229
  size: {
200
230
  value: new x(this.origin[0], 1 - this.origin[1] - this.origin[3], this.origin[2], this.origin[3])
201
231
  },
@@ -243,8 +273,8 @@ class ie {
243
273
  const i = this.uv2Position(e[0], e[1]);
244
274
  if (!i)
245
275
  return;
246
- const o = new l().subVectors(i, this.observer.position).normalize(), { longitude: n, latitude: a } = E(o);
247
- this.five.setState({ panoIndex: this.panoIndex, longitude: n, latitude: a }), this.onFiveWantsMoveToPano(this.panoIndex);
276
+ const n = new p().subVectors(i, this.observer.position).normalize(), { longitude: o, latitude: a } = E(n);
277
+ this.five.setState({ panoIndex: this.panoIndex, longitude: o, latitude: a }), this.onFiveWantsMoveToPano(this.panoIndex);
248
278
  }
249
279
  /** 获取视频中心点的 uv */
250
280
  getUVCenter() {
@@ -296,10 +326,10 @@ class ie {
296
326
  checkIntersectionInBounding(e, i) {
297
327
  if (!i.uv)
298
328
  return !1;
299
- const [o, n] = i.uv.toArray(), [a, d, s, r] = e, h = 1 - d - r, f = a + s, p = h + r;
300
- return o >= a && o <= f && n >= h && n <= p;
329
+ const [n, o] = i.uv.toArray(), [a, d, s, r] = e, h = 1 - d - r, l = a + s, m = h + r;
330
+ return n >= a && n <= l && o >= h && o <= m;
301
331
  }
302
332
  }
303
333
  export {
304
- ie as VideoMeshController
334
+ we as VideoMeshController
305
335
  };
@@ -1,5 +1,5 @@
1
1
  import { PanoVideoPluginController as r } from "./Controller.js";
2
- import { typings as E } from "./typings/index.js";
2
+ import { typings as lo } from "./typings/index.js";
3
3
  import "./VideoMeshController.js";
4
4
  import "./utils/shader.js";
5
5
  import "../shared-utils/tag.js";
@@ -15,21 +15,51 @@ import "../shared-utils/five/transformPosition.js";
15
15
  import "../shared-utils/three/temp.js";
16
16
  import "../shared-utils/dom/resizeObserver.js";
17
17
  import "hammerjs";
18
+ import "../shared-utils/three/PointSelector/index.js";
19
+ import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
20
+ import "../shared-utils/three/Magnifier.js";
21
+ import "../shared-utils/three/PointSelector/utils/PointHelper.js";
22
+ import "../shared-utils/three/Assets/index.js";
23
+ import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
18
24
  import "three/examples/jsm/renderers/CSS3DRenderer";
25
+ import "../CSS3DRenderPlugin/utils/even.js";
26
+ import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
27
+ import "../shared-utils/three/centerPoint.js";
28
+ import "../shared-utils/three/getObjectVisible.js";
19
29
  import "@realsee/five/line";
20
30
  import "../vendor/three/examples/jsm/lines/LineGeometry.js";
21
31
  import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
22
32
  import "../vendor/three/build/three.module.js";
23
33
  import "../shared-utils/three/core/Sphere.js";
24
34
  import "animejs";
25
- import "../shared-utils/animationFrame/index.js";
35
+ import "../shared-utils/isNil.js";
26
36
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
37
+ import "../shared-utils/three/PointSelector/utils/html.js";
38
+ import "../shared-utils/five/initialCSS3DRender.js";
39
+ import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
40
+ import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
41
+ import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
42
+ import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
43
+ import "../Sculpt/Meshes/Line.js";
44
+ import "../Sculpt/typings/style.js";
45
+ import "../shared-utils/five/FiveLine.js";
46
+ import "../shared-utils/three/IObject3D.js";
47
+ import "../Sculpt/utils/removeAllTag.js";
48
+ import "../Sculpt/utils/Meshes/getLengthHTML.js";
49
+ import "../shared-utils/three/applyObjectMatrixWorld.js";
50
+ import "../shared-utils/util.js";
51
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
52
+ import "../shared-utils/isTouchDevice.js";
53
+ import "../shared-utils/five/getPosition.js";
54
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
55
+ import "../shared-utils/three/PointSelector/utils/contents.js";
56
+ import "../shared-utils/animationFrame/index.js";
27
57
  import "./utils/index.js";
28
58
  import "../base/BasePlugin.js";
29
59
  import "../shared-utils/url/absoluteUrl.js";
30
- const A = (o) => new r(o);
60
+ const no = (o) => new r(o);
31
61
  export {
32
- A as PanoVideoPlugin,
33
- E as PanoVideoPluginType,
34
- A as default
62
+ no as PanoVideoPlugin,
63
+ lo as PanoVideoPluginType,
64
+ no as default
35
65
  };