@realsee/dnalogel 3.43.0 → 3.44.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 (158) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/CSS3DRenderPlugin/utils/three/CSS3DObject.d.ts +4 -2
  3. package/dist/CSS3DRenderPlugin/utils/three/CSS3DRenderer.d.ts +2 -1
  4. package/dist/CSS3DRenderPlugin/utils/three/CSS3DSprite.d.ts +4 -0
  5. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +6 -1
  6. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
  7. package/dist/PanoMeasurePlugin/Controller/index.d.ts +2 -0
  8. package/dist/Sculpt/Meshes/Line.d.ts +19 -1
  9. package/dist/Sculpt/utils/color.d.ts +1 -1
  10. package/dist/index.cjs.js +102 -68
  11. package/dist/index.js +7374 -7116
  12. package/dist/index.umd.js +106 -72
  13. package/dist/shared-utils/five/getPosition.d.ts +12 -4
  14. package/dist/shared-utils/five/initialCSS3DRender.d.ts +2 -0
  15. package/dist/shared-utils/math/deg2Rad.d.ts +1 -1
  16. package/dist/shared-utils/math/rad2Deg.d.ts +1 -1
  17. package/dist/shared-utils/positionToVector3.d.ts +6 -6
  18. package/{libs/shared-utils/three/PointSelector.d.ts → dist/shared-utils/three/PointSelector/index.d.ts} +23 -7
  19. package/dist/shared-utils/three/{PointHelper.d.ts → PointSelector/utils/PointHelper.d.ts} +11 -3
  20. package/dist/shared-utils/three/PointSelector/utils/PointHelper2.d.ts +30 -0
  21. package/dist/shared-utils/three/{PointSelectorHelper.d.ts → PointSelector/utils/PointSelectorHelper.d.ts} +9 -10
  22. package/dist/shared-utils/three/PointSelector/utils/typing.d.ts +8 -0
  23. package/dist/shared-utils/three/index.d.ts +2 -3
  24. package/libs/AreaMakerPlugin/Controller.js +5 -18
  25. package/libs/AreaMakerPlugin/index.js +4 -17
  26. package/libs/AreaMakerPlugin/utils/Item.js +13 -26
  27. package/libs/CSS3DRenderPlugin/Controller.js +9 -6
  28. package/libs/CSS3DRenderPlugin/index.js +12 -9
  29. package/libs/CSS3DRenderPlugin/utils/getAllCSS3DObject.js +6 -6
  30. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.d.ts +4 -2
  31. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +73 -56
  32. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +11 -4
  33. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.d.ts +2 -1
  34. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.js +14 -14
  35. package/libs/CSS3DRenderPlugin/utils/three/CSS3DSprite.d.ts +4 -0
  36. package/libs/CSS3DRenderPlugin/utils/three/CSS3DSprite.js +13 -0
  37. package/libs/CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js +85 -0
  38. package/libs/CruisePlugin/BaseController.js +20 -33
  39. package/libs/CruisePlugin/Move.js +25 -23
  40. package/libs/CruisePlugin/Work.js +10 -8
  41. package/libs/CruisePlugin/index.js +23 -21
  42. package/libs/CurrentPanoImagePlugin/Controller.js +30 -43
  43. package/libs/CurrentPanoImagePlugin/index.js +5 -18
  44. package/libs/GuideLinePlugin/Controller.js +15 -13
  45. package/libs/GuideLinePlugin/GuideLineItem.js +19 -17
  46. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +4 -5
  47. package/libs/GuideLinePlugin/GuideLineModeItem.js +21 -19
  48. package/libs/GuideLinePlugin/index.js +23 -21
  49. package/libs/ModelMakerPlugin/Controller.js +19 -30
  50. package/libs/ModelMakerPlugin/index.js +11 -22
  51. package/libs/ModelTVVideoPlugin/Plugin.js +13 -10
  52. package/libs/ModelTVVideoPlugin/index.js +12 -9
  53. package/libs/Object3DHelperPlugin/Controller.js +7 -5
  54. package/libs/Object3DHelperPlugin/index.js +23 -21
  55. package/libs/PanoCompassPlugin/Controller.js +18 -15
  56. package/libs/PanoCompassPlugin/index.js +21 -18
  57. package/libs/PanoDoorLabelPlugin/BaseController.js +24 -37
  58. package/libs/PanoDoorLabelPlugin/Controller.js +56 -69
  59. package/libs/PanoDoorLabelPlugin/index.js +5 -18
  60. package/libs/PanoMeasurePlugin/Components/Controller0.js +40 -47
  61. package/libs/PanoMeasurePlugin/Components/Controller1.js +72 -79
  62. package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +6 -1
  63. package/libs/PanoMeasurePlugin/Controller/BaseController.js +53 -39
  64. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
  65. package/libs/PanoMeasurePlugin/Controller/EditController.js +177 -153
  66. package/libs/PanoMeasurePlugin/Controller/MixedController.js +1 -1
  67. package/libs/PanoMeasurePlugin/Controller/WatchController.js +60 -74
  68. package/libs/PanoMeasurePlugin/Controller/index.d.ts +2 -0
  69. package/libs/PanoMeasurePlugin/Controller/index.js +59 -60
  70. package/libs/PanoMeasurePlugin/Model/area.js +30 -44
  71. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +3 -16
  72. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +42 -49
  73. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +1 -1
  74. package/libs/PanoMeasurePlugin/index.js +35 -40
  75. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +23 -36
  76. package/libs/PanoSpatialTagPlugin/Plugin.js +41 -38
  77. package/libs/PanoSpatialTagPlugin/index.js +10 -7
  78. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +29 -43
  79. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +55 -69
  80. package/libs/PanoTagPlugin/Components/Tag/index.js +9 -19
  81. package/libs/PanoTagPlugin/Components/TagContainer.js +42 -52
  82. package/libs/PanoTagPlugin/Components/TagItem.js +9 -19
  83. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +23 -33
  84. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +29 -39
  85. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +11 -21
  86. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +18 -28
  87. package/libs/PanoTagPlugin/controller/TagRender.js +18 -16
  88. package/libs/PanoTagPlugin/controller/TagUtil.js +12 -9
  89. package/libs/PanoTagPlugin/controller/index.js +27 -25
  90. package/libs/PanoTagPlugin/index.js +28 -26
  91. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +43 -57
  92. package/libs/PanoVideoPlugin/Controller.js +52 -65
  93. package/libs/PanoVideoPlugin/VideoMeshController.js +11 -25
  94. package/libs/PanoVideoPlugin/index.js +8 -21
  95. package/libs/PipelinePlugin/Controller.js +44 -57
  96. package/libs/PipelinePlugin/index.js +5 -18
  97. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +20 -34
  98. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +16 -30
  99. package/libs/PipelinePlugin/utils/Objects/Pipe.js +39 -53
  100. package/libs/Sculpt/Meshes/Box.js +3 -3
  101. package/libs/Sculpt/Meshes/Cylinder.js +14 -14
  102. package/libs/Sculpt/Meshes/Line.d.ts +19 -1
  103. package/libs/Sculpt/Meshes/Line.js +40 -41
  104. package/libs/Sculpt/Meshes/LineWithDots.js +5 -6
  105. package/libs/Sculpt/Meshes/Point.js +3 -3
  106. package/libs/Sculpt/Meshes/Polyline.js +3 -3
  107. package/libs/Sculpt/Meshes/Prism.js +11 -12
  108. package/libs/Sculpt/Meshes/Rectangle.js +3 -3
  109. package/libs/Sculpt/Objects/Point/Editor.js +10 -10
  110. package/libs/Sculpt/Objects/Polygon/Editor.js +6 -6
  111. package/libs/Sculpt/Objects/Polyline/Editor.js +4 -4
  112. package/libs/Sculpt/index.js +3 -3
  113. package/libs/Sculpt/utils/Modules/Global.js +1 -1
  114. package/libs/Sculpt/utils/color.d.ts +1 -1
  115. package/libs/Sculpt/utils/three/ColoredMesh.js +3 -3
  116. package/libs/base/BasePlugin.js +4 -4
  117. package/libs/floorplan/Components/Compass.js +29 -31
  118. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +9 -22
  119. package/libs/floorplan/MapviewFloorplanPlugin/index.js +6 -19
  120. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +5 -18
  121. package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -18
  122. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +48 -61
  123. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -18
  124. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +28 -41
  125. package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -18
  126. package/libs/floorplan/index.js +3 -3
  127. package/libs/index.js +140 -137
  128. package/libs/shared-utils/five/getPosition.d.ts +12 -4
  129. package/libs/shared-utils/five/getPosition.js +23 -23
  130. package/libs/shared-utils/five/index.js +2 -2
  131. package/libs/shared-utils/five/initialCSS3DRender.d.ts +2 -0
  132. package/libs/shared-utils/five/initialCSS3DRender.js +17 -0
  133. package/libs/shared-utils/five/lookObject.js +3 -3
  134. package/libs/shared-utils/index.js +38 -40
  135. package/libs/shared-utils/logger.js +1 -1
  136. package/libs/shared-utils/math/deg2Rad.d.ts +1 -1
  137. package/libs/shared-utils/math/rad2Deg.d.ts +1 -1
  138. package/libs/shared-utils/positionToVector3.d.ts +6 -6
  139. package/{dist/shared-utils/three/PointSelector.d.ts → libs/shared-utils/three/PointSelector/index.d.ts} +23 -7
  140. package/libs/shared-utils/three/{PointSelector.js → PointSelector/index.js} +54 -45
  141. package/libs/shared-utils/three/{PointHelper.d.ts → PointSelector/utils/PointHelper.d.ts} +11 -3
  142. package/libs/shared-utils/three/PointSelector/utils/PointHelper.js +95 -0
  143. package/libs/shared-utils/three/PointSelector/utils/PointHelper2.d.ts +30 -0
  144. package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +153 -0
  145. package/libs/shared-utils/three/{PointSelectorHelper.d.ts → PointSelector/utils/PointSelectorHelper.d.ts} +9 -10
  146. package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +60 -0
  147. package/libs/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.js +3 -4
  148. package/libs/shared-utils/three/PointSelector/utils/typing.d.ts +8 -0
  149. package/libs/shared-utils/three/index.d.ts +2 -3
  150. package/libs/shared-utils/three/index.js +3 -3
  151. package/package.json +3 -3
  152. package/dist/shared-utils/three/PointDomHelper.d.ts +0 -18
  153. package/libs/shared-utils/three/PointDomHelper.d.ts +0 -18
  154. package/libs/shared-utils/three/PointDomHelper.js +0 -62
  155. package/libs/shared-utils/three/PointHelper.js +0 -73
  156. package/libs/shared-utils/three/PointSelectorHelper.js +0 -52
  157. /package/dist/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.d.ts +0 -0
  158. /package/libs/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.d.ts +0 -0
@@ -1,51 +1,38 @@
1
- var f = Object.defineProperty, m = Object.defineProperties;
2
- var b = Object.getOwnPropertyDescriptors;
3
- var p = Object.getOwnPropertySymbols;
1
+ var f = Object.defineProperty, b = Object.defineProperties;
2
+ var m = Object.getOwnPropertyDescriptors;
3
+ var c = Object.getOwnPropertySymbols;
4
4
  var M = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
5
- var l = (o, t, r) => t in o ? f(o, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[t] = r, a = (o, t) => {
6
- for (var r in t || (t = {}))
7
- M.call(t, r) && l(o, r, t[r]);
8
- if (p)
9
- for (var r of p(t))
10
- W.call(t, r) && l(o, r, t[r]);
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 (c)
9
+ for (var e of c(t))
10
+ W.call(t, e) && l(o, e, t[e]);
11
11
  return o;
12
- }, d = (o, t) => m(o, b(t));
13
- var s = (o, t, r) => (l(o, typeof t != "symbol" ? t + "" : t, r), r);
14
- import { VideoMeshController as c } from "./VideoMeshController.js";
12
+ }, d = (o, t) => b(o, m(t));
13
+ var s = (o, t, e) => (l(o, typeof t != "symbol" ? t + "" : t, e), e);
14
+ import { VideoMeshController as p } from "./VideoMeshController.js";
15
15
  import { Controller as _ } from "../base/BasePlugin.js";
16
16
  import "./utils/shader.js";
17
17
  import "three";
18
18
  import "hammerjs";
19
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
20
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
21
- import "../shared-utils/positionToVector3.js";
22
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
23
19
  import "three/examples/jsm/renderers/CSS3DRenderer";
24
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
25
- import "../shared-utils/util.js";
26
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
27
- import "../CSS3DRenderPlugin/utils/even.js";
28
- import "../shared-utils/Subscribe.js";
29
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
30
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
31
- import "../shared-utils/three/centerPoint.js";
32
- import "../shared-utils/three/getObjectVisible.js";
33
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
34
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
35
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
20
+ import "@realsee/five/line";
36
21
  import "../shared-utils/three/THREESphere.js";
37
22
  import "animejs";
38
23
  import "../shared-utils/animationFrame/index.js";
24
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
39
25
  import "./utils/index.js";
26
+ import "../shared-utils/Subscribe.js";
40
27
  import "../shared-utils/Utils/FiveUtil.js";
41
28
  import "../shared-utils/Utils/BaseUtil.js";
42
29
  import "../shared-utils/Utils/WorkUtil.js";
43
30
  import "../shared-utils/five/transformPosition.js";
44
31
  import "../shared-utils/five/getFiveModel.js";
45
32
  import "../shared-utils/url/absoluteUrl.js";
46
- class rr extends _ {
47
- constructor(r) {
48
- super(r);
33
+ class F extends _ {
34
+ constructor(e) {
35
+ super(e);
49
36
  s(this, "controllerMap", /* @__PURE__ */ new Map());
50
37
  s(this, "data");
51
38
  s(this, "enabled", !0);
@@ -62,16 +49,16 @@ class rr extends _ {
62
49
  return this._disposed;
63
50
  }
64
51
  /** 加载点位视频数据,加载数据并不代表会加载点位视频。 */
65
- load(r, e) {
52
+ load(e, r) {
66
53
  var i;
67
54
  if (this.disposed)
68
55
  return this.logWarning("插件已被销毁");
69
- typeof ((i = e == null ? void 0 : e.initialState) == null ? void 0 : i.enabled) != "undefined" && e.initialState.enabled !== this.enabled && (e.initialState.enabled ? this.enable() : this.disable()), r.list.forEach((n) => {
56
+ 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) => {
70
57
  const u = n.pano_index, g = n.render_id;
71
58
  n.video_list.forEach((h) => {
72
59
  this.controllerMap.set(
73
60
  h.render_id,
74
- new c(this.five, d(a({}, h), {
61
+ new p(this.five, d(a({}, h), {
75
62
  panoIndex: u,
76
63
  renderID: g,
77
64
  hooks: this.hooks,
@@ -79,41 +66,41 @@ class rr extends _ {
79
66
  }))
80
67
  );
81
68
  });
82
- }), this.data = r, this.hooks.emit("dataLoaded", r);
69
+ }), this.data = e, this.hooks.emit("dataLoaded", e);
83
70
  }
84
71
  /** 开启插件功能。 */
85
- enable(r) {
72
+ enable(e) {
86
73
  var i;
87
74
  if (this.disposed)
88
75
  return this.logWarning("插件已被销毁");
89
76
  if (this.enabled)
90
77
  return;
91
78
  this.enabled = !0, Array.from(this.controllerMap.values()).forEach((n) => n.enable());
92
- const e = (i = r == null ? void 0 : r.userAction) != null ? i : !0;
93
- this.hooks.emit("enable", { userAction: e });
79
+ const r = (i = e == null ? void 0 : e.userAction) != null ? i : !0;
80
+ this.hooks.emit("enable", { userAction: r });
94
81
  }
95
82
  /** 禁用插件功能。 */
96
- disable(r) {
83
+ disable(e) {
97
84
  var i;
98
85
  if (this.disposed)
99
86
  return this.logWarning("插件已被销毁");
100
87
  if (!this.enabled)
101
88
  return;
102
89
  this.enabled = !1, Array.from(this.controllerMap.values()).forEach((n) => n.disable());
103
- const e = (i = r == null ? void 0 : r.userAction) != null ? i : !0;
104
- this.hooks.emit("disable", { userAction: e });
90
+ const r = (i = e == null ? void 0 : e.userAction) != null ? i : !0;
91
+ this.hooks.emit("disable", { userAction: r });
105
92
  }
106
93
  /** 看向某个视频。
107
94
  * - 会自动切换到全景模式。
108
95
  * - 如果遇到不能自动播放的问题,需要放到用户交互事件中调用。
109
96
  */
110
- lookAtVideoItemByRenderID(r) {
97
+ lookAtVideoItemByRenderID(e) {
111
98
  if (this.disposed)
112
99
  return this.logWarning("插件已被销毁");
113
- const e = this.controllerMap.get(r);
114
- if (!e)
115
- return this.logWarning(`ID 为 ${r} 的点位视频不存在`);
116
- e.lookAtVideo();
100
+ const r = this.controllerMap.get(e);
101
+ if (!r)
102
+ return this.logWarning(`ID 为 ${e} 的点位视频不存在`);
103
+ r.lookAtVideo();
117
104
  }
118
105
  /**
119
106
  * 取消静音。
@@ -131,26 +118,26 @@ class rr extends _ {
131
118
  * }}
132
119
  * ```
133
120
  */
134
- unmuteByRenderID(r) {
121
+ unmuteByRenderID(e) {
135
122
  if (this.disposed)
136
123
  return this.logWarning("插件已被销毁");
137
- const e = this.controllerMap.get(r);
138
- if (!e)
139
- return this.logWarning(`ID 为 ${r} 的点位视频不存在`);
140
- e.unmute();
124
+ const r = this.controllerMap.get(e);
125
+ if (!r)
126
+ return this.logWarning(`ID 为 ${e} 的点位视频不存在`);
127
+ r.unmute();
141
128
  }
142
129
  /** 为一个点位添加视频(可以是多条)。 */
143
- add(r, e) {
130
+ add(e, r) {
144
131
  if (this.disposed)
145
132
  return this.logWarning("插件已被销毁");
146
- e.forEach((i) => {
133
+ r.forEach((i) => {
147
134
  if (this.controllerMap.get(i.render_id))
148
135
  return this.logWarning(`ID 为 ${i.render_id} 的点位视频已存在`);
149
136
  const n = i.render_id;
150
137
  this.controllerMap.set(
151
138
  i.render_id,
152
- new c(this.five, d(a({}, i), {
153
- panoIndex: r,
139
+ new p(this.five, d(a({}, i), {
140
+ panoIndex: e,
154
141
  renderID: n,
155
142
  hooks: this.hooks,
156
143
  initialState: { enabled: this.enabled }
@@ -159,32 +146,32 @@ class rr extends _ {
159
146
  });
160
147
  }
161
148
  /** 根据 VideoItem render_id 删除某个视频。 */
162
- removeByRenderID(r) {
149
+ removeByRenderID(e) {
163
150
  if (this.disposed)
164
151
  return this.logWarning("插件已被销毁");
165
- const e = this.controllerMap.get(r);
166
- if (!e)
167
- return this.logWarning(`ID 为 ${r} 的点位视频不存在`);
168
- e.dispose(), this.controllerMap.delete(r);
152
+ const r = this.controllerMap.get(e);
153
+ if (!r)
154
+ return this.logWarning(`ID 为 ${e} 的点位视频不存在`);
155
+ r.dispose(), this.controllerMap.delete(e);
169
156
  }
170
157
  /** 清空现有数据 */
171
158
  clear() {
172
159
  if (this.disposed)
173
160
  return this.logWarning("插件已被销毁");
174
- Array.from(this.controllerMap.values()).forEach((r) => r.dispose()), this.controllerMap.clear();
161
+ Array.from(this.controllerMap.values()).forEach((e) => e.dispose()), this.controllerMap.clear();
175
162
  }
176
163
  /** 销毁插件 */
177
164
  dispose() {
178
165
  if (this.disposed)
179
166
  return this.logWarning("插件已被销毁");
180
- this._disposed = !0, Array.from(this.controllerMap.values()).forEach((r) => r.dispose()), this.controllerMap.clear();
167
+ this._disposed = !0, Array.from(this.controllerMap.values()).forEach((e) => e.dispose()), this.controllerMap.clear();
181
168
  }
182
169
  /** 控制台打印警告 */
183
170
  // TODO: 全局函数 curry 化
184
- logWarning(r) {
185
- console.warn("⛔ ==> [PanoVideoPluginController]:", r);
171
+ logWarning(e) {
172
+ console.warn("⛔ ==> [PanoVideoPluginController]:", e);
186
173
  }
187
174
  }
188
175
  export {
189
- rr as PanoVideoPluginController
176
+ F as PanoVideoPluginController
190
177
  };
@@ -4,28 +4,14 @@ 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 { 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
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
8
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
9
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
7
+ import "three/examples/jsm/renderers/CSS3DRenderer";
8
+ import "@realsee/five/line";
10
9
  import "../shared-utils/three/THREESphere.js";
11
10
  import A from "animejs";
12
11
  import { requestAnimationFrameInterval as D } from "../shared-utils/animationFrame/index.js";
13
12
  import E from "./utils/index.js";
14
- import "../shared-utils/positionToVector3.js";
15
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
16
- import "three/examples/jsm/renderers/CSS3DRenderer";
17
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
18
- import "../shared-utils/util.js";
19
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
20
- import "../CSS3DRenderPlugin/utils/even.js";
21
- import "../shared-utils/Subscribe.js";
22
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
23
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
24
- import "../shared-utils/three/centerPoint.js";
25
- import "../shared-utils/three/getObjectVisible.js";
26
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
27
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
28
- class ie {
13
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
14
+ class z {
29
15
  /** 初始化视频、模型以及相关事件监听。 */
30
16
  constructor(e, i) {
31
17
  t(this, "video");
@@ -64,18 +50,18 @@ class ie {
64
50
  });
65
51
  /** 把 uv 值转换成位置 */
66
52
  t(this, "uv2Position", (e, i) => {
67
- var c;
53
+ var p;
68
54
  const n = Math.PI, a = Math.PI * 2, d = e, s = 1 - i, r = new l(
69
55
  -1 * Math.cos(a * d) * Math.sin(n * s),
70
56
  1 * Math.cos(n * s),
71
57
  1 * Math.sin(a * d) * Math.sin(n * s)
72
58
  );
73
59
  r.setX(-r.x);
74
- const h = (c = this.five.work) == null ? void 0 : c.observers[this.panoIndex];
60
+ const h = (p = this.five.work) == null ? void 0 : p.observers[this.panoIndex];
75
61
  if (!h)
76
62
  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;
63
+ const f = h.position.clone(), c = h.quaternion.clone(), u = r.clone();
64
+ return u.applyAxisAngle(new l(0, 1, 0), Math.PI / 2), u.applyQuaternion(c), u.add(f), u;
79
65
  });
80
66
  /** Five 数据加载后需要根据点位位姿调整点位模型位置 */
81
67
  t(this, "onFiveDataLoaded", () => {
@@ -296,10 +282,10 @@ class ie {
296
282
  checkIntersectionInBounding(e, i) {
297
283
  if (!i.uv)
298
284
  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;
285
+ const [o, n] = i.uv.toArray(), [a, d, s, r] = e, h = 1 - d - r, f = a + s, c = h + r;
286
+ return o >= a && o <= f && n >= h && n <= c;
301
287
  }
302
288
  }
303
289
  export {
304
- ie as VideoMeshController
290
+ z as VideoMeshController
305
291
  };
@@ -1,40 +1,27 @@
1
1
  import { PanoVideoPluginController as r } from "./Controller.js";
2
- import { typings as J } from "./typings/index.js";
2
+ import { typings as j } from "./typings/index.js";
3
3
  import "./VideoMeshController.js";
4
4
  import "./utils/shader.js";
5
5
  import "three";
6
6
  import "hammerjs";
7
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
8
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
9
- import "../shared-utils/positionToVector3.js";
10
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
11
7
  import "three/examples/jsm/renderers/CSS3DRenderer";
12
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
13
- import "../shared-utils/util.js";
14
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
15
- import "../CSS3DRenderPlugin/utils/even.js";
16
- import "../shared-utils/Subscribe.js";
17
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
18
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
19
- import "../shared-utils/three/centerPoint.js";
20
- import "../shared-utils/three/getObjectVisible.js";
21
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
22
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
23
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
8
+ import "@realsee/five/line";
24
9
  import "../shared-utils/three/THREESphere.js";
25
10
  import "animejs";
26
11
  import "../shared-utils/animationFrame/index.js";
12
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
27
13
  import "./utils/index.js";
28
14
  import "../base/BasePlugin.js";
15
+ import "../shared-utils/Subscribe.js";
29
16
  import "../shared-utils/Utils/FiveUtil.js";
30
17
  import "../shared-utils/Utils/BaseUtil.js";
31
18
  import "../shared-utils/Utils/WorkUtil.js";
32
19
  import "../shared-utils/five/transformPosition.js";
33
20
  import "../shared-utils/five/getFiveModel.js";
34
21
  import "../shared-utils/url/absoluteUrl.js";
35
- const G = (o) => new r(o);
22
+ const T = (o) => new r(o);
36
23
  export {
37
- G as PanoVideoPlugin,
38
- J as PanoVideoPluginType,
39
- G as default
24
+ T as PanoVideoPlugin,
25
+ j as PanoVideoPluginType,
26
+ T as default
40
27
  };
@@ -1,30 +1,30 @@
1
1
  var j = Object.defineProperty;
2
2
  var v = Object.getOwnPropertySymbols;
3
3
  var P = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
4
- var A = (c, n, e) => n in c ? j(c, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[n] = e, m = (c, n) => {
4
+ var A = (d, n, e) => n in d ? j(d, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[n] = e, l = (d, n) => {
5
5
  for (var e in n || (n = {}))
6
- P.call(n, e) && A(c, e, n[e]);
6
+ P.call(n, e) && A(d, e, n[e]);
7
7
  if (v)
8
8
  for (var e of v(n))
9
- _.call(n, e) && A(c, e, n[e]);
10
- return c;
9
+ _.call(n, e) && A(d, e, n[e]);
10
+ return d;
11
11
  };
12
- var u = (c, n, e) => (A(c, typeof n != "symbol" ? n + "" : n, e), e);
13
- var d = (c, n, e) => new Promise((t, i) => {
12
+ var u = (d, n, e) => (A(d, typeof n != "symbol" ? n + "" : n, e), e);
13
+ var p = (d, n, e) => new Promise((t, i) => {
14
14
  var s = (a) => {
15
15
  try {
16
- o(e.next(a));
17
- } catch (p) {
18
- i(p);
16
+ h(e.next(a));
17
+ } catch (c) {
18
+ i(c);
19
19
  }
20
20
  }, r = (a) => {
21
21
  try {
22
- o(e.throw(a));
23
- } catch (p) {
24
- i(p);
22
+ h(e.throw(a));
23
+ } catch (c) {
24
+ i(c);
25
25
  }
26
- }, o = (a) => a.done ? t(a.value) : Promise.resolve(a.value).then(s, r);
27
- o((e = e.apply(c, n)).next());
26
+ }, h = (a) => a.done ? t(a.value) : Promise.resolve(a.value).then(s, r);
27
+ h((e = e.apply(d, n)).next());
28
28
  });
29
29
  import * as F from "three";
30
30
  import { Controller as S } from "../base/BasePluginWithData.js";
@@ -36,22 +36,8 @@ import { ObjectFlowPipe as D } from "./utils/Objects/FlowPipe.js";
36
36
  import "../base/BasePlugin.js";
37
37
  import "../shared-utils/Subscribe.js";
38
38
  import "hammerjs";
39
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
40
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
41
- import "../shared-utils/positionToVector3.js";
42
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
43
39
  import "three/examples/jsm/renderers/CSS3DRenderer";
44
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
45
- import "../shared-utils/util.js";
46
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
47
- import "../CSS3DRenderPlugin/utils/even.js";
48
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
49
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
50
- import "../shared-utils/three/centerPoint.js";
51
- import "../shared-utils/three/getObjectVisible.js";
52
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
53
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
54
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
40
+ import "@realsee/five/line";
55
41
  import "../shared-utils/three/THREESphere.js";
56
42
  import "animejs";
57
43
  import "../shared-utils/Utils/FiveUtil.js";
@@ -60,6 +46,7 @@ import "../shared-utils/Utils/WorkUtil.js";
60
46
  import "../shared-utils/five/transformPosition.js";
61
47
  import "../shared-utils/five/getFiveModel.js";
62
48
  import "../shared-utils/url/absoluteUrl.js";
49
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
63
50
  import "../shared-utils/isTruelyObject.js";
64
51
  import "../shared-utils/animationFrame/index.js";
65
52
  import "./utils/Objects/Pipe.js";
@@ -68,7 +55,7 @@ import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
68
55
  import "../shared-utils/three/Extras/Core/Interpolations.js";
69
56
  import "../shared-utils/three/Extras/Core/Interpolations2.js";
70
57
  const g = { flowSpeed: 0.6, rotateSpeed: 0 };
71
- class Oe extends S {
58
+ class ne extends S {
72
59
  constructor(e) {
73
60
  super(e);
74
61
  // ==================== public properties ====================
@@ -97,12 +84,12 @@ class Oe extends S {
97
84
  const [t] = e, i = t.intersectObjects(this.pipeObjects, !1);
98
85
  if (i.length === 0 || !this.data)
99
86
  return;
100
- const o = i[0].object.customID, a = this.data.pipes.find(({ id: h }) => h === o), p = this.data.pipelines.find((h) => a && h.pipes.includes(a));
101
- if (!(!a || !p))
87
+ const h = i[0].object.customID, a = this.data.pipes.find(({ id: o }) => o === h), c = this.data.pipelines.find((o) => a && o.pipes.includes(a));
88
+ if (!(!a || !c))
102
89
  return this.hooks.emit("tap", {
103
90
  intersectObjects: i,
104
91
  pipe: a,
105
- pipeline: p,
92
+ pipeline: c,
106
93
  wantsFiveTapGestureParams: e
107
94
  }), !1;
108
95
  });
@@ -125,19 +112,19 @@ class Oe extends S {
125
112
  */
126
113
  // eslint-disable-next-line max-params
127
114
  load(e, t, i, s) {
128
- return d(this, null, function* () {
115
+ return p(this, null, function* () {
129
116
  const r = this.data;
130
117
  this.data = yield this.formatData(e, s), this.removeAllPipes(), this.hooks.emit("dataChange", this.data, r), this.pipeObjects = yield Promise.all(
131
- this.data.pipes.filter((o) => !!(o != null && o.texture)).map((b) => d(this, [b], function* ({ id: o, texture: a, path: p, radius: h }) {
132
- const l = yield this.loadPipeTexture(a), f = { id: o, path: p, textureURL: a, texture: l, geometryConfig: { radius: h } };
118
+ this.data.pipes.filter((h) => !!(h != null && h.texture)).map((b) => p(this, [b], function* ({ id: h, texture: a, path: c, radius: o }) {
119
+ const m = yield this.loadPipeTexture(a), f = { id: h, path: c, textureURL: a, texture: m, geometryConfig: { radius: o } };
133
120
  return new D(f);
134
121
  }))
135
- ), this.data.pipelines.forEach((o) => {
136
- o.pipes.reduce((a, p) => {
137
- const h = this.findPipeObjectWithID(p.id);
138
- return h == null || h.setInitialDisplacement(a), a + ((h == null ? void 0 : h.pathLength) || 0);
122
+ ), this.data.pipelines.forEach((h) => {
123
+ h.pipes.reduce((a, c) => {
124
+ const o = this.findPipeObjectWithID(c.id);
125
+ return o == null || o.setInitialDisplacement(a), a + ((o == null ? void 0 : o.pathLength) || 0);
139
126
  }, 0);
140
- }), this.hooks.emit("dataLoaded", this.data), this.state.visible === !1 && this.pipeObjects.forEach((o) => o.setOpacity(0)), this.state.enabled && (this.group.add(...this.pipeObjects), this.five.needsRender = !0), t && this.setState(t, { userAction: i });
127
+ }), this.hooks.emit("dataLoaded", this.data), this.state.visible === !1 && this.pipeObjects.forEach((h) => h.setOpacity(0)), this.state.enabled && (this.group.add(...this.pipeObjects), this.five.needsRender = !0), t && this.setState(t, { userAction: i });
141
128
  });
142
129
  }
143
130
  /** 更改插件 State
@@ -192,10 +179,10 @@ class Oe extends S {
192
179
  * @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
193
180
  */
194
181
  show() {
195
- return d(this, arguments, function* (e = {}) {
182
+ return p(this, arguments, function* (e = {}) {
196
183
  if (this.state.visible)
197
184
  return;
198
- const t = m({
185
+ const t = l({
199
186
  userAction: !0,
200
187
  anime: { duration: 500 }
201
188
  }, e);
@@ -209,10 +196,10 @@ class Oe extends S {
209
196
  * @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
210
197
  */
211
198
  hide() {
212
- return d(this, arguments, function* (e = {}) {
199
+ return p(this, arguments, function* (e = {}) {
213
200
  if (this.state.visible === !1)
214
201
  return;
215
- const t = m({
202
+ const t = l({
216
203
  userAction: !0,
217
204
  anime: { duration: 500 }
218
205
  }, e);
@@ -230,15 +217,15 @@ class Oe extends S {
230
217
  * @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
231
218
  * */
232
219
  switchPipelines(e) {
233
- return d(this, null, function* () {
234
- var p, h, b, l, f, w;
220
+ return p(this, null, function* () {
221
+ var c, o, b, m, f, w;
235
222
  if (!this.data)
236
223
  return;
237
- const t = (p = e == null ? void 0 : e.target) != null ? p : null, i = (h = e == null ? void 0 : e.userAction) != null ? h : !0;
224
+ const t = (c = e == null ? void 0 : e.target) != null ? c : null, i = (o = e == null ? void 0 : e.userAction) != null ? o : !0;
238
225
  this.updateState({ target: t }, i);
239
- const s = { duration: 500 }, r = (l = (b = e == null ? void 0 : e.hideAnime) != null ? b : e == null ? void 0 : e.anime) != null ? l : s, o = (w = (f = e == null ? void 0 : e.showAnime) != null ? f : e == null ? void 0 : e.anime) != null ? w : s, a = {
226
+ const s = { duration: 500 }, r = (m = (b = e == null ? void 0 : e.hideAnime) != null ? b : e == null ? void 0 : e.anime) != null ? m : s, h = (w = (f = e == null ? void 0 : e.showAnime) != null ? f : e == null ? void 0 : e.anime) != null ? w : s, a = {
240
227
  target: t,
241
- showAnime: o,
228
+ showAnime: h,
242
229
  hideAnime: r
243
230
  };
244
231
  this._switchPipelines(a);
@@ -271,7 +258,7 @@ class Oe extends S {
271
258
  this.updateState({ speed: t }, i), this._setSpeed(t);
272
259
  }
273
260
  formatData(e, t) {
274
- return d(this, null, function* () {
261
+ return p(this, null, function* () {
275
262
  return y(e, t);
276
263
  });
277
264
  }
@@ -282,7 +269,7 @@ class Oe extends S {
282
269
  this.hooks.emit("disable", { userAction: e.userAction }), this.disposeAnime(), this.five.scene.remove(this.group), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture);
283
270
  }
284
271
  _show(e) {
285
- return d(this, null, function* () {
272
+ return p(this, null, function* () {
286
273
  var s;
287
274
  this.hooks.emit("show", { userAction: e.userAction });
288
275
  const t = (s = e == null ? void 0 : e.anime) != null ? s : { duration: 500 }, i = this.findPipeObjectWithTarget(this.state.target);
@@ -290,7 +277,7 @@ class Oe extends S {
290
277
  });
291
278
  }
292
279
  _hide(e) {
293
- return d(this, null, function* () {
280
+ return p(this, null, function* () {
294
281
  var i;
295
282
  this.hooks.emit("hide", { userAction: e.userAction });
296
283
  const t = (i = e == null ? void 0 : e.anime) != null ? i : { duration: 500 };
@@ -298,7 +285,7 @@ class Oe extends S {
298
285
  });
299
286
  }
300
287
  _switchPipelines(e) {
301
- return d(this, null, function* () {
288
+ return p(this, null, function* () {
302
289
  if (!this.data)
303
290
  return;
304
291
  const t = this.findPipeObjectWithTarget(e.target), i = e.hideAnime;
@@ -318,11 +305,11 @@ class Oe extends S {
318
305
  }
319
306
  updateState(e, t) {
320
307
  const i = this.state;
321
- this.state = m(m({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: t });
308
+ this.state = l(l({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: t });
322
309
  }
323
310
  /** 加载管道贴图,如果再加载中,复用之前的加载 Promise */
324
311
  loadPipeTexture(e) {
325
- return d(this, null, function* () {
312
+ return p(this, null, function* () {
326
313
  const t = this.texturePromiseCache.get(e);
327
314
  if (t)
328
315
  return t;
@@ -348,5 +335,5 @@ class Oe extends S {
348
335
  }
349
336
  }
350
337
  export {
351
- Oe as Controller
338
+ ne as Controller
352
339
  };
@@ -4,22 +4,8 @@ import "../base/BasePluginWithData.js";
4
4
  import "../base/BasePlugin.js";
5
5
  import "../shared-utils/Subscribe.js";
6
6
  import "hammerjs";
7
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
8
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
9
- import "../shared-utils/positionToVector3.js";
10
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
11
7
  import "three/examples/jsm/renderers/CSS3DRenderer";
12
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
13
- import "../shared-utils/util.js";
14
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
15
- import "../CSS3DRenderPlugin/utils/even.js";
16
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
17
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
18
- import "../shared-utils/three/centerPoint.js";
19
- import "../shared-utils/three/getObjectVisible.js";
20
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
21
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
22
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
8
+ import "@realsee/five/line";
23
9
  import "../shared-utils/three/THREESphere.js";
24
10
  import "animejs";
25
11
  import "../shared-utils/Utils/FiveUtil.js";
@@ -28,6 +14,7 @@ import "../shared-utils/Utils/WorkUtil.js";
28
14
  import "../shared-utils/five/transformPosition.js";
29
15
  import "../shared-utils/five/getFiveModel.js";
30
16
  import "../shared-utils/url/absoluteUrl.js";
17
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
31
18
  import "../shared-utils/equal.js";
32
19
  import "../shared-utils/isTruelyObject.js";
33
20
  import "../shared-utils/isNil.js";
@@ -40,8 +27,8 @@ import "../shared-utils/animationFrame/BetterTween.js";
40
27
  import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
41
28
  import "../shared-utils/three/Extras/Core/Interpolations.js";
42
29
  import "../shared-utils/three/Extras/Core/Interpolations2.js";
43
- const S = (r) => new o(r);
30
+ const E = (r) => new o(r);
44
31
  export {
45
- S as PipelinePlugin,
46
- S as default
32
+ E as PipelinePlugin,
33
+ E as default
47
34
  };