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