@realsee/dnalogel 3.47.13 → 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 (101) hide show
  1. package/CHANGELOG.md +8 -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 +2 -1
  5. package/dist/index.cjs.js +53 -53
  6. package/dist/index.js +18650 -18640
  7. package/dist/index.umd.js +47 -47
  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 +50 -41
  77. package/libs/Sculpt/Meshes/Point.js +9 -10
  78. package/libs/Sculpt/Meshes/Polygon.d.ts +2 -1
  79. package/libs/Sculpt/Meshes/Polygon.js +47 -37
  80. package/libs/Sculpt/Meshes/Polyline.js +18 -16
  81. package/libs/Sculpt/Meshes/Rectangle.js +3 -4
  82. package/libs/Sculpt/Objects/Line/Editor.js +2 -3
  83. package/libs/Sculpt/Objects/Rectangle/index.js +1 -1
  84. package/libs/Sculpt/utils/removeAllTag.js +4 -4
  85. package/libs/Sculpt/utils/three/ColoredMesh.js +3 -4
  86. package/libs/base/BasePlugin.js +3 -4
  87. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +59 -128
  88. package/libs/floorplan/MapviewFloorplanPlugin/index.js +6 -75
  89. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +59 -129
  90. package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -75
  91. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +62 -134
  92. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -76
  93. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +81 -151
  94. package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -75
  95. package/libs/floorplan/index.js +0 -1
  96. package/libs/index.js +62 -62
  97. package/libs/shared-utils/five/index.js +2 -3
  98. package/libs/shared-utils/five/lookObject.js +17 -18
  99. package/libs/shared-utils/logger.js +1 -1
  100. package/libs/shared-utils/three/index.js +0 -1
  101. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
- var g = Object.defineProperty;
2
- var c = Object.getOwnPropertySymbols;
1
+ var m = Object.defineProperty;
2
+ var p = Object.getOwnPropertySymbols;
3
3
  var v = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
4
- var f = (n, r, i) => r in n ? g(n, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[r] = i, a = (n, r) => {
5
- for (var i in r || (r = {}))
6
- v.call(r, i) && f(n, i, r[i]);
7
- if (c)
8
- for (var i of c(r))
9
- b.call(r, i) && f(n, i, r[i]);
10
- return n;
4
+ var g = (r, o, e) => o in r ? m(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e, a = (r, o) => {
5
+ for (var e in o || (o = {}))
6
+ v.call(o, e) && g(r, e, o[e]);
7
+ if (p)
8
+ for (var e of p(o))
9
+ b.call(o, e) && g(r, e, o[e]);
10
+ return r;
11
11
  };
12
- var o = (n, r, i) => (f(n, typeof r != "symbol" ? r + "" : r, i), i);
13
- var l = (n, r, i) => new Promise((e, t) => {
14
- var s = (m) => {
12
+ var n = (r, o, e) => (g(r, typeof o != "symbol" ? o + "" : o, e), e);
13
+ var u = (r, o, e) => new Promise((i, t) => {
14
+ var s = (d) => {
15
15
  try {
16
- d(i.next(m));
17
- } catch (u) {
18
- t(u);
16
+ f(e.next(d));
17
+ } catch (c) {
18
+ t(c);
19
19
  }
20
- }, p = (m) => {
20
+ }, l = (d) => {
21
21
  try {
22
- d(i.throw(m));
23
- } catch (u) {
24
- t(u);
22
+ f(e.throw(d));
23
+ } catch (c) {
24
+ t(c);
25
25
  }
26
- }, d = (m) => m.done ? e(m.value) : Promise.resolve(m.value).then(s, p);
27
- d((i = i.apply(n, r)).next());
26
+ }, f = (d) => d.done ? i(d.value) : Promise.resolve(d.value).then(s, l);
27
+ f((e = e.apply(r, o)).next());
28
28
  });
29
29
  import * as h from "three";
30
30
  import { Controller as M } from "../base/BasePlugin.js";
@@ -33,7 +33,6 @@ import "hammerjs";
33
33
  import "three/examples/jsm/renderers/CSS3DRenderer";
34
34
  import "@realsee/five/line";
35
35
  import "../shared-utils/tag.js";
36
- import "../Sculpt/utils/Modules/Global.js";
37
36
  import "../shared-utils/three/THREESphere.js";
38
37
  import "animejs";
39
38
  import { equal as P } from "../shared-utils/equal.js";
@@ -50,86 +49,15 @@ import "../shared-utils/animationFrame/index.js";
50
49
  import "../shared-utils/positionToVector3.js";
51
50
  import "../shared-utils/five/vector3ToScreen.js";
52
51
  import "../shared-utils/three/temp.js";
53
- import "../Sculpt/utils/Modules/Cursor.js";
54
- import "../Object3DHelperPlugin/Controller.js";
55
- import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
56
- import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
57
- import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
58
- import "../shared-utils/three/IObject3D.js";
59
- import "../shared-utils/three/boundingBox.js";
60
- import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
61
- import "../shared-utils/Object3DHelper/utils/direction.js";
62
- import "../shared-utils/Object3DHelper/Constants/color.js";
63
- import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
64
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
65
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
66
- import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
67
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
68
- import "../CSS3DRenderPlugin/utils/even.js";
69
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
70
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
71
- import "../shared-utils/three/centerPoint.js";
72
- import "../shared-utils/three/getObjectVisible.js";
73
- import "../shared-utils/isNil.js";
74
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
75
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
76
- import "../shared-utils/util.js";
77
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
78
- import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
79
- import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
80
- import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
81
- import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
82
- import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
83
- import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
84
- import "../shared-utils/Object3DHelper/Controller/MoveController.js";
85
- import "../shared-utils/Object3DHelper/Base/BaseController.js";
86
- import "../shared-utils/threex/domevents/index.js";
87
- import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
88
- import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
89
- import "../Sculpt/utils/three/rayOnLine.js";
90
- import "../Object3DHelperPlugin/FiveControllerWrapper.js";
91
- import "../shared-utils/Object3DHelper/index.js";
92
- import "../shared-utils/Object3DHelper/Controller/RotateController.js";
93
- import "../shared-utils/math/rad2Deg.js";
94
- import "../shared-utils/math/deg2Rad.js";
95
- import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
96
- import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
97
- import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
98
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
99
- import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
100
- import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
101
- import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
102
- import "../shared-utils/five/fiveModelLoad.js";
103
- import "../shared-utils/five/FiveDomEvents.js";
104
- import "../shared-utils/five/calculateThreeMouse.js";
105
- import "../shared-utils/three/THREERaycaster.js";
106
- import "../shared-utils/three/PointSelector/index.js";
107
- import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
108
- import "../shared-utils/three/Magnifier.js";
109
- import "../shared-utils/three/PointSelector/utils/PointHelper.js";
110
- import "../shared-utils/three/Assets/index.js";
111
- import "../shared-utils/three/PointSelector/utils/html.js";
112
- import "../shared-utils/five/initialCSS3DRender.js";
113
- import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
114
- import "../Sculpt/Meshes/Line.js";
115
- import "../Sculpt/typings/style.js";
116
- import "../shared-utils/five/FiveLine.js";
117
- import "../Sculpt/utils/removeAllTag.js";
118
- import "../Sculpt/utils/Meshes/getLengthHTML.js";
119
- import "../shared-utils/three/applyObjectMatrixWorld.js";
120
- import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
121
- import "../shared-utils/isTouchDevice.js";
122
- import "../shared-utils/five/getPosition.js";
123
- import "../shared-utils/five/getRaycasterByNdcPosition.js";
124
52
  import "../shared-utils/isTruelyObject.js";
125
- class le extends M {
126
- constructor(i, e) {
127
- super(i);
53
+ class $ extends M {
54
+ constructor(e, i) {
55
+ super(e);
128
56
  // ==================== public properties ====================
129
57
  /** 插件当前状态 */
130
- o(this, "state");
58
+ n(this, "state");
131
59
  /** 查询问题使用的调试对象 */
132
- o(this, "checkMsg", {
60
+ n(this, "checkMsg", {
133
61
  /** mesh 隐藏的原因 */
134
62
  meshHidden: "",
135
63
  /** 插件 enabled 校验信息 */
@@ -138,47 +66,47 @@ class le extends M {
138
66
  pluginHidden: ""
139
67
  });
140
68
  // ==================== private properties ====================
141
- o(this, "group", new h.Group());
142
- o(this, "mesh");
143
- o(this, "textureLoadingPromise");
144
- o(this, "opacityAnimeTween");
69
+ n(this, "group", new h.Group());
70
+ n(this, "mesh");
71
+ n(this, "textureLoadingPromise");
72
+ n(this, "opacityAnimeTween");
145
73
  /** 是否正在走点动画中 */
146
- o(this, "isInPanoMoveAnime", !1);
74
+ n(this, "isInPanoMoveAnime", !1);
147
75
  /** 上一次走点的全景图索引 */
148
- o(this, "lastArrivedPanoIndex", -1);
76
+ n(this, "lastArrivedPanoIndex", -1);
149
77
  /** config 的原始值 */
150
- o(this, "_config");
78
+ n(this, "_config");
151
79
  /** disposed 的原始值 */
152
- o(this, "_disposed", !1);
80
+ n(this, "_disposed", !1);
153
81
  /**
154
82
  * 销毁插件
155
83
  * @todo 销毁贴图时,最好还是直接销毁贴图吧,this.mesh?.material.map 这种都是很深层的引用了。THREE 的建议我看也是自己去管理和销毁公共贴图。
156
84
  */
157
- o(this, "dispose", () => {
85
+ n(this, "dispose", () => {
158
86
  this.five.scene.remove(this.group), this.group.remove(...this.group.children), this.five.off("dispose", this.dispose), this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("panoWillArrive", this.onFivePanoWillArrive);
159
87
  });
160
- o(this, "checkMeshVisible", () => this.state.visible ? this.config.imageURL === "" ? { result: !1, msg: "图片不存在" } : this.mesh.material.map ? this.five.work ? this.five.getCurrentState().mode !== "Panorama" ? { result: !1, msg: "非全景模式" } : this.isInPanoMoveAnime ? { result: !1, msg: "处于走点动画中" } : { result: !0, msg: "" } : { result: !1, msg: "Five 数据未加载" } : { result: !1, msg: "指南针贴图未加载" } : { result: !1, msg: "插件隐藏" });
88
+ n(this, "checkMeshVisible", () => this.state.visible ? this.config.imageURL === "" ? { result: !1, msg: "图片不存在" } : this.mesh.material.map ? this.five.work ? this.five.getCurrentState().mode !== "Panorama" ? { result: !1, msg: "非全景模式" } : this.isInPanoMoveAnime ? { result: !1, msg: "处于走点动画中" } : { result: !0, msg: "" } : { result: !1, msg: "Five 数据未加载" } : { result: !1, msg: "指南针贴图未加载" } : { result: !1, msg: "插件隐藏" });
161
89
  /** 贴图加载完成的回调 */
162
- o(this, "onTextureLoaded", (i) => {
163
- this.mesh.material.map = i, this.mesh.material.needsUpdate = !0, this.updateMeshVisible();
90
+ n(this, "onTextureLoaded", (e) => {
91
+ this.mesh.material.map = e, this.mesh.material.needsUpdate = !0, this.updateMeshVisible();
164
92
  });
165
93
  /** Five load Work 后 */
166
- o(this, "onFiveWillLoad", () => {
94
+ n(this, "onFiveWillLoad", () => {
167
95
  this.lastArrivedPanoIndex = -1, this.updateMeshVisible();
168
96
  });
169
97
  /** 走点前 */
170
- o(this, "onFivePanoWillArrive", (i) => {
171
- var e;
172
- i !== this.five.getCurrentState().panoIndex && (this.isInPanoMoveAnime = !0, (e = this.opacityAnimeTween) == null || e.dispose(), this.updateMeshVisible());
98
+ n(this, "onFivePanoWillArrive", (e) => {
99
+ var i;
100
+ e !== this.five.getCurrentState().panoIndex && (this.isInPanoMoveAnime = !0, (i = this.opacityAnimeTween) == null || i.dispose(), this.updateMeshVisible());
173
101
  });
174
102
  /** 走点后 */
175
103
  // eslint-disable-next-line @typescript-eslint/member-ordering
176
- o(this, "onFivePanoArrived", (i) => {
177
- i !== this.lastArrivedPanoIndex && (this.lastArrivedPanoIndex = i, this.isInPanoMoveAnime = !1, this.updateMeshPosition(i), this.updateMeshVisible(), this.five.needsRender = !0);
104
+ n(this, "onFivePanoArrived", (e) => {
105
+ e !== this.lastArrivedPanoIndex && (this.lastArrivedPanoIndex = e, this.isInPanoMoveAnime = !1, this.updateMeshPosition(e), this.updateMeshVisible(), this.five.needsRender = !0);
178
106
  });
179
- o(this, "onMeshVisibleChange", (i) => {
180
- var e;
181
- if ((e = this.opacityAnimeTween) == null || e.dispose(), !i) {
107
+ n(this, "onMeshVisibleChange", (e) => {
108
+ var i;
109
+ if ((i = this.opacityAnimeTween) == null || i.dispose(), !e) {
182
110
  this.mesh.visible = !1;
183
111
  return;
184
112
  }
@@ -187,21 +115,21 @@ class le extends M {
187
115
  (s = this.mesh) == null || s.material.setValues({ opacity: t }), this.five.needsRender = !0;
188
116
  }).play();
189
117
  });
190
- o(this, "onFiveModeChange", () => {
118
+ n(this, "onFiveModeChange", () => {
191
119
  this.updateMeshVisible();
192
120
  });
193
- this.five = i;
121
+ this.five = e;
194
122
  const t = {
195
123
  enabled: !0,
196
124
  visible: !0
197
125
  };
198
- this.state = Object.assign(t, e == null ? void 0 : e.initialState);
126
+ this.state = Object.assign(t, i == null ? void 0 : i.initialState);
199
127
  const s = a({
200
128
  width: 1.4,
201
129
  yOffset: 0.01,
202
130
  yRotate: 0,
203
131
  imageURL: this.absoluteUrl("/release/web/logo.7febb17f.png")
204
- }, e == null ? void 0 : e.config);
132
+ }, i == null ? void 0 : i.config);
205
133
  this._config = s, this.group.name = "current-pano-image-plugin-group", this.mesh = new h.Mesh(
206
134
  new h.PlaneBufferGeometry(this.config.width, this.config.width),
207
135
  new h.MeshBasicMaterial({ transparent: !0, opacity: 0, depthTest: !1 })
@@ -219,48 +147,48 @@ class le extends M {
219
147
  * 启用插件,响应用户操作并展示UI
220
148
  * @param options
221
149
  */
222
- enable(i = {}) {
150
+ enable(e = {}) {
223
151
  var t;
224
152
  if (this.state.enabled)
225
153
  return;
226
- const e = (t = i.userAction) != null ? t : !0;
227
- this.updateState({ enabled: !0 }, e), this.checkMsg.pluginDisabled = "", this._enable({ userAction: e });
154
+ const i = (t = e.userAction) != null ? t : !0;
155
+ this.updateState({ enabled: !0 }, i), this.checkMsg.pluginDisabled = "", this._enable({ userAction: i });
228
156
  }
229
157
  /** 禁用插件
230
158
  * @param `options` `<Option> | <undefined>`
231
159
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
232
160
  */
233
- disable(i = {}) {
161
+ disable(e = {}) {
234
162
  var t;
235
163
  if (this.state.enabled === !1)
236
164
  return;
237
- const e = (t = i.userAction) != null ? t : !0;
238
- this.updateState({ enabled: !1 }, e), this.checkMsg.pluginDisabled = "调用 disable 禁用", this._disable({ userAction: e });
165
+ const i = (t = e.userAction) != null ? t : !0;
166
+ this.updateState({ enabled: !1 }, i), this.checkMsg.pluginDisabled = "调用 disable 禁用", this._disable({ userAction: i });
239
167
  }
240
168
  /** 插件内容整体展示
241
169
  * @param `options` `<Partial<BaseOptions>> | <undefined>`
242
170
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
243
171
  */
244
- show(i) {
245
- return l(this, null, function* () {
172
+ show(e) {
173
+ return u(this, null, function* () {
246
174
  if (this.state.visible)
247
175
  return Promise.resolve();
248
176
  if (this.disposed)
249
177
  return Promise.reject(new Error("不能在已销毁的插件上调用 show"));
250
- const e = a({ userAction: !0 }, i);
251
- this.updateState({ visible: !0 }, e.userAction), this.checkMsg.pluginHidden = "", this._show(e);
178
+ const i = a({ userAction: !0 }, e);
179
+ this.updateState({ visible: !0 }, i.userAction), this.checkMsg.pluginHidden = "", this._show(i);
252
180
  });
253
181
  }
254
182
  /** 插件内容整体隐藏
255
183
  * @param `options` `<Partial<BaseOptions>> | <undefined>`
256
184
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
257
185
  */
258
- hide(i) {
259
- return l(this, null, function* () {
186
+ hide(e) {
187
+ return u(this, null, function* () {
260
188
  if (this.state.visible === !1)
261
189
  return;
262
- const e = a({ userAction: !0 }, i);
263
- this.updateState({ visible: !1 }, e.userAction), this.checkMsg.pluginDisabled = "调用 hide 隐藏", this._hide(e);
190
+ const i = a({ userAction: !0 }, e);
191
+ this.updateState({ visible: !1 }, i.userAction), this.checkMsg.pluginDisabled = "调用 hide 隐藏", this._hide(i);
264
192
  });
265
193
  }
266
194
  /** 更改插件 State
@@ -268,24 +196,24 @@ class le extends M {
268
196
  * @param `options` `<Option> | <undefined>`
269
197
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
270
198
  */
271
- setState(i, e = {}) {
199
+ setState(e, i = {}) {
272
200
  const t = this.state;
273
- if (P(i, t, { deep: !0 }))
201
+ if (P(e, t, { deep: !0 }))
274
202
  return;
275
- const s = e.userAction !== void 0 ? e.userAction : !0;
276
- if (this.updateState(i, s), i.enabled !== void 0 && t.enabled !== i.enabled && (i.enabled ? this.checkMsg.pluginDisabled = "" : this.checkMsg.pluginDisabled = "调用 setState 禁用", i.enabled ? this._enable({ userAction: s }) : this._disable({ userAction: s })), i.visible !== void 0 && t.visible !== i.visible) {
277
- const p = { userAction: s, anime: { duration: 500 } };
278
- i.visible ? this.checkMsg.pluginHidden = "" : this.checkMsg.pluginHidden = "调用 setState 隐藏", i.visible ? this._show(p) : this._hide(p);
203
+ const s = i.userAction !== void 0 ? i.userAction : !0;
204
+ if (this.updateState(e, s), e.enabled !== void 0 && t.enabled !== e.enabled && (e.enabled ? this.checkMsg.pluginDisabled = "" : this.checkMsg.pluginDisabled = "调用 setState 禁用", e.enabled ? this._enable({ userAction: s }) : this._disable({ userAction: s })), e.visible !== void 0 && t.visible !== e.visible) {
205
+ const l = { userAction: s, anime: { duration: 500 } };
206
+ e.visible ? this.checkMsg.pluginHidden = "" : this.checkMsg.pluginHidden = "调用 setState 隐藏", e.visible ? this._show(l) : this._hide(l);
279
207
  }
280
208
  }
281
209
  /** 更改插件 Config
282
210
  * @param `config` `<Partial<Plugin.Config>>` 插件属性 `config` 的子集。
283
211
  * @param `options` `<Option> | <undefined>`
284
212
  */
285
- updateConfig(i, e = {}) {
286
- var p;
287
- const t = this.config, s = a(a({}, t), i);
288
- this._config = s, t.imageURL !== s.imageURL && this.reloadTexture(s.imageURL), t.yOffset !== s.yOffset && this.updateMeshPosition(this.five.getCurrentState().panoIndex), t.yRotate !== s.yRotate && this.updateMeshQuaternion(s.yRotate), t.width !== s.width && (this.mesh.geometry = new h.PlaneBufferGeometry(s.width, s.width)), this.hooks.emit("configChange", { prevConfig: t, config: s, userAction: (p = e.userAction) != null ? p : !0 });
213
+ updateConfig(e, i = {}) {
214
+ var l;
215
+ const t = this.config, s = a(a({}, t), e);
216
+ this._config = s, t.imageURL !== s.imageURL && this.reloadTexture(s.imageURL), t.yOffset !== s.yOffset && this.updateMeshPosition(this.five.getCurrentState().panoIndex), t.yRotate !== s.yRotate && this.updateMeshQuaternion(s.yRotate), t.width !== s.width && (this.mesh.geometry = new h.PlaneBufferGeometry(s.width, s.width)), this.hooks.emit("configChange", { prevConfig: t, config: s, userAction: (l = i.userAction) != null ? l : !0 });
289
217
  }
290
218
  /** 问什么看不到模型 */
291
219
  __whyCantSeeMesh() {
@@ -298,60 +226,60 @@ class le extends M {
298
226
  if (this.checkMsg.meshHidden)
299
227
  return this.checkMsg.meshHidden;
300
228
  }
301
- updateState(i, e) {
229
+ updateState(e, i) {
302
230
  const t = this.state;
303
- this.state = a(a({}, this.state), i), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: e });
231
+ this.state = a(a({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: i });
304
232
  }
305
233
  /** 根据各种条件更新 Mesh 的可见性 */
306
234
  updateMeshVisible() {
307
- const { result: i, msg: e } = this.checkMeshVisible();
308
- this.checkMsg.meshHidden = e, i !== this.mesh.visible && this.onMeshVisibleChange(i);
235
+ const { result: e, msg: i } = this.checkMeshVisible();
236
+ this.checkMsg.meshHidden = i, e !== this.mesh.visible && this.onMeshVisibleChange(e);
309
237
  }
310
238
  /** 根据点位更新 Mesh 坐标 */
311
- updateMeshPosition(i) {
312
- const e = this.workUtil.getObserverStandingPosition(i);
313
- if (!e) {
239
+ updateMeshPosition(e) {
240
+ const i = this.workUtil.getObserverStandingPosition(e);
241
+ if (!i) {
314
242
  console.warn("CurrentPanoImagePlugin: 无法获取到当前点位的 standingPosition");
315
243
  return;
316
244
  }
317
- const t = e.clone().setY(e.y + this.config.yOffset);
245
+ const t = i.clone().setY(i.y + this.config.yOffset);
318
246
  t && this.mesh.position.copy(t);
319
247
  }
320
248
  /** 重新加载贴图,调用时会先清除已有的贴图 */
321
- reloadTexture(i) {
322
- return l(this, null, function* () {
323
- if (this.mesh.material.map = null, i !== "") {
324
- const e = w(i);
325
- this.textureLoadingPromise = e;
326
- const t = yield e;
327
- t.minFilter = h.LinearFilter, this.textureLoadingPromise === e && (this.onTextureLoaded(t), this.textureLoadingPromise = null);
249
+ reloadTexture(e) {
250
+ return u(this, null, function* () {
251
+ if (this.mesh.material.map = null, e !== "") {
252
+ const i = w(e);
253
+ this.textureLoadingPromise = i;
254
+ const t = yield i;
255
+ t.minFilter = h.LinearFilter, this.textureLoadingPromise === i && (this.onTextureLoaded(t), this.textureLoadingPromise = null);
328
256
  }
329
257
  this.updateMeshVisible();
330
258
  });
331
259
  }
332
260
  /** north_rad 变化时,需要更新模型的旋转角度 */
333
- updateMeshQuaternion(i) {
334
- const e = new h.Quaternion();
335
- e.multiplyQuaternions(
261
+ updateMeshQuaternion(e) {
262
+ const i = new h.Quaternion();
263
+ i.multiplyQuaternions(
336
264
  // 沿着自身 X 轴旋转 -90 度
337
265
  new h.Quaternion().setFromAxisAngle(new h.Vector3(1, 0, 0), -Math.PI / 2),
338
266
  // 沿着自身 Z 轴旋转 rad 弧度
339
- new h.Quaternion().setFromAxisAngle(new h.Vector3(0, 0, 1), i)
340
- ), this.mesh.quaternion.copy(e);
267
+ new h.Quaternion().setFromAxisAngle(new h.Vector3(0, 0, 1), e)
268
+ ), this.mesh.quaternion.copy(i);
341
269
  }
342
- _enable(i) {
343
- this.hooks.emit("enable", { userAction: i.userAction }), this.config.imageURL && !this.mesh.material.map && !this.textureLoadingPromise && this.reloadTexture(this.config.imageURL), this.five.scene.add(this.group), this.five.needsRender = !0, this.five.work && this.onFiveWillLoad(), this.five.getCurrentState().mode === "Panorama" && (this.onFiveModeChange(), this.onFivePanoArrived(this.five.getCurrentState().panoIndex)), this.five.on("willLoad", this.onFiveWillLoad), this.five.on("panoArrived", this.onFivePanoArrived), this.five.on("panoWillArrive", this.onFivePanoWillArrive), this.five.on("modeChange", this.onFiveModeChange);
270
+ _enable(e) {
271
+ this.hooks.emit("enable", { userAction: e.userAction }), this.config.imageURL && !this.mesh.material.map && !this.textureLoadingPromise && this.reloadTexture(this.config.imageURL), this.five.scene.add(this.group), this.five.needsRender = !0, this.five.work && this.onFiveWillLoad(), this.five.getCurrentState().mode === "Panorama" && (this.onFiveModeChange(), this.onFivePanoArrived(this.five.getCurrentState().panoIndex)), this.five.on("willLoad", this.onFiveWillLoad), this.five.on("panoArrived", this.onFivePanoArrived), this.five.on("panoWillArrive", this.onFivePanoWillArrive), this.five.on("modeChange", this.onFiveModeChange);
344
272
  }
345
- _disable(i) {
346
- this.hooks.emit("disable", { userAction: i.userAction }), this.five.scene.remove(this.group), this.five.needsRender = !0, this.five.off("willLoad", this.onFiveWillLoad), this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("panoWillArrive", this.onFivePanoWillArrive), this.five.off("modeChange", this.onFiveModeChange);
273
+ _disable(e) {
274
+ this.hooks.emit("disable", { userAction: e.userAction }), this.five.scene.remove(this.group), this.five.needsRender = !0, this.five.off("willLoad", this.onFiveWillLoad), this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("panoWillArrive", this.onFivePanoWillArrive), this.five.off("modeChange", this.onFiveModeChange);
347
275
  }
348
- _show(i) {
349
- this.hooks.emit("show", i), this.updateMeshVisible(), this.five.needsRender = !0;
276
+ _show(e) {
277
+ this.hooks.emit("show", e), this.updateMeshVisible(), this.five.needsRender = !0;
350
278
  }
351
- _hide(i) {
352
- this.hooks.emit("hide", i), this.updateMeshVisible(), this.five.needsRender = !0;
279
+ _hide(e) {
280
+ this.hooks.emit("hide", e), this.updateMeshVisible(), this.five.needsRender = !0;
353
281
  }
354
282
  }
355
283
  export {
356
- le as CurrentPanoImagePluginController
284
+ $ as CurrentPanoImagePluginController
357
285
  };
@@ -14,89 +14,17 @@ import "../shared-utils/Utils/BaseUtil.js";
14
14
  import "../shared-utils/Utils/WorkUtil.js";
15
15
  import "../shared-utils/five/transformPosition.js";
16
16
  import "../shared-utils/three/temp.js";
17
- import "../Sculpt/utils/Modules/Global.js";
18
- import "../Sculpt/utils/Modules/Cursor.js";
19
- import "../Object3DHelperPlugin/Controller.js";
20
17
  import "../shared-utils/three/THREESphere.js";
21
- import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
22
- import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
23
- import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
24
- import "../shared-utils/three/IObject3D.js";
25
- import "../shared-utils/three/boundingBox.js";
26
- import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
27
- import "../shared-utils/Object3DHelper/utils/direction.js";
28
- import "../shared-utils/Object3DHelper/Constants/color.js";
29
- import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
30
- import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
31
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
32
- import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
33
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
34
- import "../CSS3DRenderPlugin/utils/even.js";
35
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
36
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
37
- import "../shared-utils/three/centerPoint.js";
38
- import "../shared-utils/three/getObjectVisible.js";
39
18
  import "animejs";
40
- import "../shared-utils/isNil.js";
41
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
42
19
  import "../shared-utils/url/absoluteUrl.js";
43
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
44
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
45
- import "../shared-utils/util.js";
46
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
47
- import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
48
- import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
49
- import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
50
- import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
51
- import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
52
- import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
53
- import "../shared-utils/Object3DHelper/Controller/MoveController.js";
54
- import "../shared-utils/Object3DHelper/Base/BaseController.js";
55
- import "../shared-utils/threex/domevents/index.js";
56
- import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
57
- import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
58
- import "../Sculpt/utils/three/rayOnLine.js";
59
- import "../Object3DHelperPlugin/FiveControllerWrapper.js";
60
- import "../shared-utils/Object3DHelper/index.js";
61
- import "../shared-utils/Object3DHelper/Controller/RotateController.js";
62
- import "../shared-utils/math/rad2Deg.js";
63
- import "../shared-utils/math/deg2Rad.js";
64
- import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
65
- import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
66
- import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
67
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
68
- import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
69
- import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
70
- import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
71
- import "../shared-utils/five/fiveModelLoad.js";
72
- import "../shared-utils/five/FiveDomEvents.js";
73
- import "../shared-utils/five/calculateThreeMouse.js";
74
- import "../shared-utils/three/THREERaycaster.js";
75
- import "../shared-utils/three/PointSelector/index.js";
76
- import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
77
- import "../shared-utils/three/Magnifier.js";
78
- import "../shared-utils/three/PointSelector/utils/PointHelper.js";
79
- import "../shared-utils/three/Assets/index.js";
80
- import "../shared-utils/three/PointSelector/utils/html.js";
81
- import "../shared-utils/five/initialCSS3DRender.js";
82
- import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
83
- import "../Sculpt/Meshes/Line.js";
84
- import "../Sculpt/typings/style.js";
85
- import "../shared-utils/five/FiveLine.js";
86
- import "../Sculpt/utils/removeAllTag.js";
87
- import "../Sculpt/utils/Meshes/getLengthHTML.js";
88
- import "../shared-utils/three/applyObjectMatrixWorld.js";
89
- import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
90
- import "../shared-utils/isTouchDevice.js";
91
- import "../shared-utils/five/getPosition.js";
92
- import "../shared-utils/five/getRaycasterByNdcPosition.js";
20
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
93
21
  import "../shared-utils/animationFrame/BetterTween.js";
94
22
  import "../shared-utils/animationFrame/index.js";
95
23
  import "../shared-utils/equal.js";
96
24
  import "../shared-utils/isTruelyObject.js";
97
25
  import "../shared-utils/three/loadTexture.js";
98
- const Ur = (r, o) => new t(r, o);
26
+ const z = (r, o) => new t(r, o);
99
27
  export {
100
- Ur as CurrentPanoImagePlugin,
101
- Ur as default
28
+ z as CurrentPanoImagePlugin,
29
+ z as default
102
30
  };