@realsee/dnalogel 3.50.14 → 3.50.15-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +116 -0
  2. package/dist/Sculpt/Objects/Base/index.d.ts +1 -1
  3. package/dist/Sculpt/index.d.ts +4 -4
  4. package/dist/index.cjs.js +262 -262
  5. package/dist/index.js +4235 -4231
  6. package/dist/index.umd.js +263 -263
  7. package/dist/shared-utils/five/index.d.ts +2 -0
  8. package/dist/shared-utils/tag.d.ts +1 -1
  9. package/dist/shared-utils/three/index.d.ts +1 -0
  10. package/libs/AreaMakerPlugin/Controller.js +104 -74
  11. package/libs/AreaMakerPlugin/index.js +33 -3
  12. package/libs/AreaMakerPlugin/utils/Item.js +66 -36
  13. package/libs/CSS3DRenderPlugin/Controller.js +39 -19
  14. package/libs/CSS3DRenderPlugin/index.js +34 -14
  15. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +60 -35
  16. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +98 -78
  17. package/libs/CruisePlugin/BaseController.js +59 -29
  18. package/libs/CruisePlugin/Move.js +33 -14
  19. package/libs/CruisePlugin/Work.js +66 -47
  20. package/libs/CruisePlugin/index.js +38 -19
  21. package/libs/CurrentPanoImagePlugin/Controller.js +68 -38
  22. package/libs/CurrentPanoImagePlugin/index.js +34 -4
  23. package/libs/GuideLinePlugin/Controller.js +69 -50
  24. package/libs/GuideLinePlugin/GuideLineItem.js +34 -15
  25. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
  26. package/libs/GuideLinePlugin/GuideLineModeItem.js +34 -15
  27. package/libs/GuideLinePlugin/index.js +38 -19
  28. package/libs/ModelMakerPlugin/Controller.js +60 -42
  29. package/libs/ModelMakerPlugin/index.js +34 -16
  30. package/libs/ModelTVVideoPlugin/Plugin.js +48 -28
  31. package/libs/ModelTVVideoPlugin/index.js +24 -4
  32. package/libs/Object3DHelperPlugin/Controller.js +49 -30
  33. package/libs/Object3DHelperPlugin/index.js +36 -17
  34. package/libs/PanoCompassPlugin/Controller.js +33 -13
  35. package/libs/PanoCompassPlugin/index.js +34 -14
  36. package/libs/PanoDoorLabelPlugin/BaseController.js +55 -25
  37. package/libs/PanoDoorLabelPlugin/Controller.js +99 -69
  38. package/libs/PanoDoorLabelPlugin/index.js +34 -4
  39. package/libs/PanoMeasurePlugin/Components/Controller0.js +8 -8
  40. package/libs/PanoMeasurePlugin/Components/Controller1.js +8 -8
  41. package/libs/PanoMeasurePlugin/Controller/WatchController.js +75 -49
  42. package/libs/PanoMeasurePlugin/Controller/index.js +16 -16
  43. package/libs/PanoMeasurePlugin/Model/area.js +41 -15
  44. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +29 -0
  45. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +8 -8
  46. package/libs/PanoMeasurePlugin/index.js +3 -3
  47. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +43 -15
  48. package/libs/PanoRulerProPlugin/Controller.js +60 -30
  49. package/libs/PanoRulerProPlugin/RulerItems.js +85 -55
  50. package/libs/PanoRulerProPlugin/index.js +33 -3
  51. package/libs/PanoSpatialTagPlugin/Plugin.js +54 -34
  52. package/libs/PanoSpatialTagPlugin/index.js +22 -2
  53. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +79 -49
  54. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +235 -206
  55. package/libs/PanoTagPlugin/Components/Tag/index.js +152 -125
  56. package/libs/PanoTagPlugin/Components/TagContainer.js +97 -70
  57. package/libs/PanoTagPlugin/Components/TagItem.js +31 -4
  58. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +29 -2
  59. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +55 -28
  60. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +53 -26
  61. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +54 -27
  62. package/libs/PanoTagPlugin/controller/TagRender.js +48 -29
  63. package/libs/PanoTagPlugin/controller/TagUtil.js +33 -14
  64. package/libs/PanoTagPlugin/controller/index.js +49 -30
  65. package/libs/PanoTagPlugin/index.js +41 -22
  66. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +59 -29
  67. package/libs/PanoVideoPlugin/Controller.js +91 -61
  68. package/libs/PanoVideoPlugin/VideoMeshController.js +56 -26
  69. package/libs/PanoVideoPlugin/index.js +36 -6
  70. package/libs/PipelinePlugin/Controller.js +80 -51
  71. package/libs/PipelinePlugin/index.js +34 -5
  72. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +44 -14
  73. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +43 -13
  74. package/libs/PipelinePlugin/utils/Objects/Pipe.js +61 -31
  75. package/libs/Sculpt/Meshes/Box.js +3 -2
  76. package/libs/Sculpt/Meshes/Cylinder.js +3 -2
  77. package/libs/Sculpt/Meshes/Line.js +9 -8
  78. package/libs/Sculpt/Meshes/LineWithDots.js +8 -7
  79. package/libs/Sculpt/Meshes/Point.js +3 -2
  80. package/libs/Sculpt/Meshes/Polygon.js +3 -2
  81. package/libs/Sculpt/Meshes/Prism.js +9 -8
  82. package/libs/Sculpt/Meshes/Rectangle.js +3 -2
  83. package/libs/Sculpt/Objects/Base/index.d.ts +1 -1
  84. package/libs/Sculpt/Objects/Line/Editor.js +7 -6
  85. package/libs/Sculpt/index.d.ts +4 -4
  86. package/libs/Sculpt/index.js +3 -2
  87. package/libs/Sculpt/utils/three/ColoredMesh.js +6 -5
  88. package/libs/base/BasePlugin.js +4 -3
  89. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +89 -60
  90. package/libs/floorplan/MapviewFloorplanPlugin/index.js +34 -5
  91. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +79 -50
  92. package/libs/floorplan/ModelFloorplanPlugin/index.js +34 -5
  93. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +68 -38
  94. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +34 -4
  95. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +104 -75
  96. package/libs/floorplan/TopviewFloorplanPlugin/index.js +34 -5
  97. package/libs/floorplan/index.js +1 -0
  98. package/libs/index.js +28 -28
  99. package/libs/shared-utils/five/fiveModelLoad.js +1 -0
  100. package/libs/shared-utils/five/index.d.ts +2 -0
  101. package/libs/shared-utils/five/index.js +3 -2
  102. package/libs/shared-utils/five/lookObject.js +3 -2
  103. package/libs/shared-utils/index.js +42 -35
  104. package/libs/shared-utils/logger.js +1 -1
  105. package/libs/shared-utils/tag.d.ts +1 -1
  106. package/libs/shared-utils/tag.js +41 -41
  107. package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +3 -2
  108. package/libs/shared-utils/three/index.d.ts +1 -0
  109. package/libs/shared-utils/three/index.js +1 -0
  110. package/package.json +1 -1
@@ -7,3 +7,5 @@ export declare function checkFiveModelLoaded(five: Five): {
7
7
  export * from './mode';
8
8
  export * from './lookObject';
9
9
  export * from './lookPoint';
10
+ export * from './fiveModelLoad';
11
+ export * from './FiveDomEvents';
@@ -47,7 +47,7 @@ export declare class LightTag {
47
47
  disable(): void;
48
48
  destroy(): void;
49
49
  setTransformMatrix(matrix: THREE.Matrix4): void;
50
- setPosition(position: THREE.Vector3, positionsForRotate?: THREE.Vector3[]): void;
50
+ setPosition(position: AnyPosition, positionsForRotate?: AnyPosition[]): void;
51
51
  updateScreenPosition(): void;
52
52
  private onCameraUpdate;
53
53
  private onFiveEveryReady;
@@ -1,5 +1,6 @@
1
1
  export * from './Magnifier';
2
2
  export * from './getCoords';
3
+ export * from './PointSelector';
3
4
  export * from './PointSelector/utils/PointHelper';
4
5
  export * from './PointSelector/utils/PointSelectorHelper';
5
6
  export * from './core/Object3D';
@@ -2,35 +2,36 @@ var M = Object.defineProperty, C = Object.defineProperties;
2
2
  var S = Object.getOwnPropertyDescriptors;
3
3
  var f = Object.getOwnPropertySymbols;
4
4
  var A = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
5
- var m = (h, o, t) => o in h ? M(h, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[o] = t, d = (h, o) => {
6
- for (var t in o || (o = {}))
7
- A.call(o, t) && m(h, t, o[t]);
5
+ var p = (h, n, t) => n in h ? M(h, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[n] = t, d = (h, n) => {
6
+ for (var t in n || (n = {}))
7
+ A.call(n, t) && p(h, t, n[t]);
8
8
  if (f)
9
- for (var t of f(o))
10
- _.call(o, t) && m(h, t, o[t]);
9
+ for (var t of f(n))
10
+ _.call(n, t) && p(h, t, n[t]);
11
11
  return h;
12
- }, p = (h, o) => C(h, S(o));
13
- var r = (h, o, t) => (m(h, typeof o != "symbol" ? o + "" : o, t), t);
14
- var u = (h, o, t) => new Promise((i, e) => {
15
- var s = (n) => {
12
+ }, u = (h, n) => C(h, S(n));
13
+ var a = (h, n, t) => (p(h, typeof n != "symbol" ? n + "" : n, t), t);
14
+ var l = (h, n, t) => new Promise((i, e) => {
15
+ var o = (s) => {
16
16
  try {
17
- c(t.next(n));
18
- } catch (l) {
19
- e(l);
17
+ m(t.next(s));
18
+ } catch (c) {
19
+ e(c);
20
20
  }
21
- }, a = (n) => {
21
+ }, r = (s) => {
22
22
  try {
23
- c(t.throw(n));
24
- } catch (l) {
25
- e(l);
23
+ m(t.throw(s));
24
+ } catch (c) {
25
+ e(c);
26
26
  }
27
- }, c = (n) => n.done ? i(n.value) : Promise.resolve(n.value).then(s, a);
28
- c((t = t.apply(h, o)).next());
27
+ }, m = (s) => s.done ? i(s.value) : Promise.resolve(s.value).then(o, r);
28
+ m((t = t.apply(h, n)).next());
29
29
  });
30
30
  import * as g from "three";
31
31
  import { Controller as k } from "../base/BasePluginWithData.js";
32
32
  import "../shared-utils/tag.js";
33
33
  import "hammerjs";
34
+ import "../shared-utils/three/PointSelector/index.js";
34
35
  import "three/examples/jsm/renderers/CSS3DRenderer";
35
36
  import "@realsee/five/line";
36
37
  import "../vendor/three/examples/jsm/lines/LineGeometry.js";
@@ -51,6 +52,35 @@ import "../shared-utils/positionToVector3.js";
51
52
  import "../shared-utils/five/vector3ToScreen.js";
52
53
  import "../shared-utils/three/temp.js";
53
54
  import "../shared-utils/dom/resizeObserver.js";
55
+ import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
56
+ import "../shared-utils/three/Magnifier.js";
57
+ import "../shared-utils/three/PointSelector/utils/PointHelper.js";
58
+ import "../shared-utils/three/Assets/index.js";
59
+ import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
60
+ import "../CSS3DRenderPlugin/utils/even.js";
61
+ import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
62
+ import "../shared-utils/three/centerPoint.js";
63
+ import "../shared-utils/three/getObjectVisible.js";
64
+ import "../shared-utils/isNil.js";
65
+ import "../shared-utils/three/PointSelector/utils/html.js";
66
+ import "../shared-utils/five/initialCSS3DRender.js";
67
+ import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
68
+ import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
69
+ import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
70
+ import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
71
+ import "../Sculpt/Meshes/Line.js";
72
+ import "../Sculpt/typings/style.js";
73
+ import "../shared-utils/five/FiveLine.js";
74
+ import "../shared-utils/three/IObject3D.js";
75
+ import "../Sculpt/utils/removeAllTag.js";
76
+ import "../Sculpt/utils/Meshes/getLengthHTML.js";
77
+ import "../shared-utils/three/applyObjectMatrixWorld.js";
78
+ import "../shared-utils/util.js";
79
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
80
+ import "../shared-utils/isTouchDevice.js";
81
+ import "../shared-utils/five/getPosition.js";
82
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
83
+ import "../shared-utils/three/PointSelector/utils/contents.js";
54
84
  import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
55
85
  import "../vendor/three/build/three.module.js";
56
86
  import "../shared-utils/isTruelyObject.js";
@@ -62,7 +92,7 @@ import "../components/AreaLabel/LabelItem.js";
62
92
  import "../vendor/svelte/internal/index.js";
63
93
  import "../components/AreaLabel/Assets/roomLabelBg.js";
64
94
  import "../shared-utils/math/planimetry.js";
65
- class ht extends k {
95
+ class Ot extends k {
66
96
  /** AreaMakerPlugin
67
97
  * @param `five` `<Five>` Five 实例
68
98
  * @param `params` `<PluginType.Params> | <undefined>` 插件初始化参数
@@ -72,68 +102,68 @@ class ht extends k {
72
102
  super(t);
73
103
  // ==================== public properties ====================
74
104
  /** 插件当前状态 */
75
- r(this, "state");
105
+ a(this, "state");
76
106
  /** 标注模型 { id: item } 的映射表 */
77
- r(this, "itemMap");
107
+ a(this, "itemMap");
78
108
  /** 自定义 DOM */
79
- r(this, "itemRenderer");
109
+ a(this, "itemRenderer");
80
110
  /** 标注模型容器 */
81
- r(this, "modelGroup");
111
+ a(this, "modelGroup");
82
112
  /** 当前使用的数据 */
83
- r(this, "data");
113
+ a(this, "data");
84
114
  /** tag 容器 */
85
- r(this, "tagDomContainer");
115
+ a(this, "tagDomContainer");
86
116
  /** 查询问题使用的调试对象 */
87
- r(this, "checkMsg", {
117
+ a(this, "checkMsg", {
88
118
  childrenMountedState: ""
89
119
  });
90
120
  // ==================== private properties ====================
91
121
  /** 是否在 Five Change Mode 动画中 */
92
- r(this, "isInFiveChangeModeAnime", !1);
122
+ a(this, "isInFiveChangeModeAnime", !1);
93
123
  /** 子组件是否挂载 */
94
- r(this, "childrenMountedState", !1);
124
+ a(this, "childrenMountedState", !1);
95
125
  /** config 的原始值 */
96
- r(this, "_config");
126
+ a(this, "_config");
97
127
  /** disposed 的原始值 */
98
- r(this, "_disposed", !1);
128
+ a(this, "_disposed", !1);
99
129
  /** 销毁插件,移除所有副作用,销毁后将不响应任何 API */
100
- r(this, "dispose", () => {
130
+ a(this, "dispose", () => {
101
131
  this.five.scene.remove(this.modelGroup);
102
132
  });
103
- r(this, "onFiveInitAnimationWillStart", () => {
133
+ a(this, "onFiveInitAnimationWillStart", () => {
104
134
  this.isInFiveChangeModeAnime = !0, this.updateChildrenMountedState();
105
135
  });
106
- r(this, "onFiveInitAnimationEnded", () => {
136
+ a(this, "onFiveInitAnimationEnded", () => {
107
137
  this.isInFiveChangeModeAnime = !1, this.updateChildrenMountedState();
108
138
  });
109
- r(this, "onFiveCameraUpdate", () => {
139
+ a(this, "onFiveCameraUpdate", () => {
110
140
  const t = this.five.camera;
111
- [...this.itemMap.values()].sort((e, s) => {
112
- const a = e.tagPosition.distanceTo(t.position);
113
- return s.tagPosition.distanceTo(t.position) - a;
114
- }).forEach((e, s) => {
115
- var a;
116
- (a = this.getMaskItemByID(e.id)) == null || a.setTagZIndex(s * 10);
141
+ [...this.itemMap.values()].sort((e, o) => {
142
+ const r = e.tagPosition.distanceTo(t.position);
143
+ return o.tagPosition.distanceTo(t.position) - r;
144
+ }).forEach((e, o) => {
145
+ var r;
146
+ (r = this.getMaskItemByID(e.id)) == null || r.setTagZIndex(o * 10);
117
147
  });
118
148
  });
119
- r(this, "onFiveModeChange", () => {
149
+ a(this, "onFiveModeChange", () => {
120
150
  this.updateChildrenMountedState();
121
151
  });
122
- r(this, "onMakerTagClick", (t) => {
152
+ a(this, "onMakerTagClick", (t) => {
123
153
  this.hooks.emit("wantsTap", { target: t.target, intersectObjects: [] });
124
154
  });
125
- r(this, "onWantsFiveTapGesture", (t) => {
126
- const i = Array.from(this.itemMap.values()).filter((n) => n.mounted && n.visible).map((n) => ({
127
- makerItem: n,
128
- intersects: n.modelGroup.getRaycastIntersects(t)
129
- })).filter(({ intersects: n }) => n.length > 0);
155
+ a(this, "onWantsFiveTapGesture", (t) => {
156
+ const i = Array.from(this.itemMap.values()).filter((s) => s.mounted && s.visible).map((s) => ({
157
+ makerItem: s,
158
+ intersects: s.modelGroup.getRaycastIntersects(t)
159
+ })).filter(({ intersects: s }) => s.length > 0);
130
160
  if (i.length === 0)
131
161
  return;
132
- const e = i.reduce((n, l) => {
133
- const v = n.intersects[0].distance, b = l.intersects[0].distance;
134
- return v < b ? n : l;
135
- }), s = this.fiveUtil.model.intersectRaycaster(t)[0];
136
- if (this.config.modelDepthTest && s && s.distance < e.intersects[0].distance)
162
+ const e = i.reduce((s, c) => {
163
+ const v = s.intersects[0].distance, b = c.intersects[0].distance;
164
+ return v < b ? s : c;
165
+ }), o = this.fiveUtil.model.intersectRaycaster(t)[0];
166
+ if (this.config.modelDepthTest && o && o.distance < e.intersects[0].distance)
137
167
  return;
138
168
  if (this.hooks.emit("wantsTap", {
139
169
  target: e.makerItem,
@@ -147,10 +177,10 @@ class ht extends k {
147
177
  visible: !0
148
178
  };
149
179
  this.state = Object.assign(e, i == null ? void 0 : i.initialState);
150
- const s = d({
180
+ const o = d({
151
181
  modelDepthTest: !0
152
182
  }, i == null ? void 0 : i.config);
153
- this._config = s, this.modelGroup = new g.Group(), this.modelGroup.name = "ModelMakerPluginGroup", this.itemMap = /* @__PURE__ */ new Map(), this.state.enabled && this._enable({ userAction: !1 });
183
+ this._config = o, this.modelGroup = new g.Group(), this.modelGroup.name = "ModelMakerPluginGroup", this.itemMap = /* @__PURE__ */ new Map(), this.state.enabled && this._enable({ userAction: !1 });
154
184
  }
155
185
  /** 插件配置项 */
156
186
  get config() {
@@ -162,11 +192,11 @@ class ht extends k {
162
192
  }
163
193
  /** 加载数据,重复调用会使用新数据覆盖旧数据 */
164
194
  load(t) {
165
- return u(this, null, function* () {
195
+ return l(this, null, function* () {
166
196
  const i = this.data;
167
197
  this.data = this.formatData(t), this.hooks.emit("dataChange", this.data, i), this.modelGroup.remove(...this.modelGroup.children), this.itemMap.forEach((e) => e.unmount()), this.itemMap.clear(), this.childrenMountedState = !1, this.checkMsg.childrenMountedState = "", this.data.list.forEach((e) => {
168
- const s = new D(this, e);
169
- s.itemRenderer = this.itemRenderer, this.modelGroup.add(s.modelGroup), this.itemMap.set(e.id, s), s.hooks.on("tagClick", this.onMakerTagClick);
198
+ const o = new D(this, e);
199
+ o.itemRenderer = this.itemRenderer, this.modelGroup.add(o.modelGroup), this.itemMap.set(e.id, o), o.hooks.on("tagClick", this.onMakerTagClick);
170
200
  }), this.updateChildrenMountedState();
171
201
  });
172
202
  }
@@ -201,7 +231,7 @@ class ht extends k {
201
231
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
202
232
  */
203
233
  show(t) {
204
- return u(this, null, function* () {
234
+ return l(this, null, function* () {
205
235
  if (this.state.visible)
206
236
  return Promise.resolve();
207
237
  if (this.disposed)
@@ -215,7 +245,7 @@ class ht extends k {
215
245
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
216
246
  */
217
247
  hide(t) {
218
- return u(this, null, function* () {
248
+ return l(this, null, function* () {
219
249
  if (this.state.visible === !1)
220
250
  return;
221
251
  const i = d({ userAction: !0 }, t);
@@ -265,10 +295,10 @@ class ht extends k {
265
295
  const e = this.state;
266
296
  if (I(t, e, { deep: !0 }))
267
297
  return;
268
- const s = i.userAction !== void 0 ? i.userAction : !0;
269
- if (this.updateState(t, s), t.enabled !== void 0 && e.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: s }) : this._disable({ userAction: s })), t.visible !== void 0 && e.visible !== t.visible) {
270
- const a = { userAction: s, anime: { duration: 500 } };
271
- t.visible ? this._show(a) : this._hide(a);
298
+ const o = i.userAction !== void 0 ? i.userAction : !0;
299
+ if (this.updateState(t, o), t.enabled !== void 0 && e.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: o }) : this._disable({ userAction: o })), t.visible !== void 0 && e.visible !== t.visible) {
300
+ const r = { userAction: o, anime: { duration: 500 } };
301
+ t.visible ? this._show(r) : this._hide(r);
272
302
  }
273
303
  }
274
304
  /** 更改插件 Config
@@ -276,9 +306,9 @@ class ht extends k {
276
306
  * @param `options` `<Option> | <undefined>`
277
307
  */
278
308
  updateConfig(t, i = {}) {
279
- var a;
280
- const e = this.config, s = d(d({}, e), t);
281
- this._config = s, this.hooks.emit("configChange", { prevConfig: e, config: s, userAction: (a = i.userAction) != null ? a : !0 });
309
+ var r;
310
+ const e = this.config, o = d(d({}, e), t);
311
+ this._config = o, this.hooks.emit("configChange", { prevConfig: e, config: o, userAction: (r = i.userAction) != null ? r : !0 });
282
312
  }
283
313
  /** 根据 ID 获取标注 */
284
314
  getMaskItemByID(t) {
@@ -290,12 +320,12 @@ class ht extends k {
290
320
  }
291
321
  return i(t) ? {
292
322
  list: t.list.filter((e) => e.object_data.points.length >= 3).map((e) => {
293
- const s = new g.Shape(), a = e.object_data.points[0];
294
- return s.moveTo(a[0], a[2]), e.object_data.points.slice(1).forEach((n) => s.lineTo(n[0], n[2])), s.lineTo(a[0], a[2]), p(d({}, e), {
323
+ const o = new g.Shape(), r = e.object_data.points[0];
324
+ return o.moveTo(r[0], r[2]), e.object_data.points.slice(1).forEach((s) => o.lineTo(s[0], s[2])), o.lineTo(r[0], r[2]), u(d({}, e), {
295
325
  floor_index: e.object_data.floorIndex,
296
- object_data: p(d({}, e.object_data), {
297
- bottom_y: a[1] + e.object_data.fixedY,
298
- shape: s.toJSON(),
326
+ object_data: u(d({}, e.object_data), {
327
+ bottom_y: r[1] + e.object_data.fixedY,
328
+ shape: o.toJSON(),
299
329
  height: e.object_data.height + e.object_data.fixedHeight
300
330
  })
301
331
  });
@@ -326,16 +356,16 @@ class ht extends k {
326
356
  this.hooks.emit("disable", { userAction: t.userAction }), this.five.scene.remove(this.modelGroup), this.updateChildrenMountedState(), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture), this.five.off("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.off("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.off("modeChange", this.onFiveModeChange), this.five.off("cameraUpdate", this.onFiveCameraUpdate);
327
357
  }
328
358
  _show(t) {
329
- return u(this, null, function* () {
359
+ return l(this, null, function* () {
330
360
  this.hooks.emit("show", t), this.five.needsRender = !0;
331
361
  });
332
362
  }
333
363
  _hide(t) {
334
- return u(this, null, function* () {
364
+ return l(this, null, function* () {
335
365
  this.hooks.emit("hide", t), this.five.needsRender = !0;
336
366
  });
337
367
  }
338
368
  }
339
369
  export {
340
- ht as Controller
370
+ Ot as Controller
341
371
  };
@@ -14,15 +14,45 @@ import "../shared-utils/five/transformPosition.js";
14
14
  import "../shared-utils/three/temp.js";
15
15
  import "../shared-utils/dom/resizeObserver.js";
16
16
  import "hammerjs";
17
+ import "../shared-utils/three/PointSelector/index.js";
18
+ import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
19
+ import "../shared-utils/three/Magnifier.js";
20
+ import "../shared-utils/three/PointSelector/utils/PointHelper.js";
21
+ import "../shared-utils/three/Assets/index.js";
22
+ import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
17
23
  import "three/examples/jsm/renderers/CSS3DRenderer";
24
+ import "../CSS3DRenderPlugin/utils/even.js";
25
+ import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
26
+ import "../shared-utils/three/centerPoint.js";
27
+ import "../shared-utils/three/getObjectVisible.js";
18
28
  import "@realsee/five/line";
19
29
  import "../vendor/three/examples/jsm/lines/LineGeometry.js";
20
30
  import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
21
31
  import "../vendor/three/build/three.module.js";
22
32
  import "../shared-utils/three/core/Sphere.js";
23
33
  import "animejs";
24
- import "../shared-utils/url/absoluteUrl.js";
34
+ import "../shared-utils/isNil.js";
25
35
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
36
+ import "../shared-utils/three/PointSelector/utils/html.js";
37
+ import "../shared-utils/five/initialCSS3DRender.js";
38
+ import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
39
+ import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
40
+ import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
41
+ import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
42
+ import "../Sculpt/Meshes/Line.js";
43
+ import "../Sculpt/typings/style.js";
44
+ import "../shared-utils/five/FiveLine.js";
45
+ import "../shared-utils/three/IObject3D.js";
46
+ import "../Sculpt/utils/removeAllTag.js";
47
+ import "../Sculpt/utils/Meshes/getLengthHTML.js";
48
+ import "../shared-utils/three/applyObjectMatrixWorld.js";
49
+ import "../shared-utils/util.js";
50
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
51
+ import "../shared-utils/isTouchDevice.js";
52
+ import "../shared-utils/five/getPosition.js";
53
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
54
+ import "../shared-utils/three/PointSelector/utils/contents.js";
55
+ import "../shared-utils/url/absoluteUrl.js";
26
56
  import "../shared-utils/equal.js";
27
57
  import "../shared-utils/isTruelyObject.js";
28
58
  import "./utils/Item.js";
@@ -34,7 +64,7 @@ import "../components/AreaLabel/LabelItem.js";
34
64
  import "../vendor/svelte/internal/index.js";
35
65
  import "../components/AreaLabel/Assets/roomLabelBg.js";
36
66
  import "../shared-utils/math/planimetry.js";
37
- const L = (r, o) => new t(r, o);
67
+ const ur = (r, o) => new t(r, o);
38
68
  export {
39
- L as AreaMakerPlugin
69
+ ur as AreaMakerPlugin
40
70
  };
@@ -1,10 +1,11 @@
1
1
  var b = Object.defineProperty;
2
- var k = (n, e, t) => e in n ? b(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var i = (n, e, t) => (k(n, typeof e != "symbol" ? e + "" : e, t), t);
4
- import * as a from "three";
2
+ var k = (a, e, t) => e in a ? b(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var i = (a, e, t) => (k(a, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import * as r from "three";
5
5
  import "../../shared-utils/tag.js";
6
6
  import "hammerjs";
7
7
  import { Subscribe as y } from "../../shared-utils/Subscribe.js";
8
+ import "../../shared-utils/three/PointSelector/index.js";
8
9
  import "three/examples/jsm/renderers/CSS3DRenderer";
9
10
  import "@realsee/five/line";
10
11
  import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
@@ -24,9 +25,38 @@ import "../../shared-utils/Utils/FiveUtil.js";
24
25
  import "../../shared-utils/Utils/BaseUtil.js";
25
26
  import "../../shared-utils/Utils/WorkUtil.js";
26
27
  import "../../shared-utils/five/transformPosition.js";
28
+ import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
29
+ import "../../shared-utils/three/Magnifier.js";
30
+ import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
31
+ import "../../shared-utils/three/Assets/index.js";
32
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
33
+ import "../../CSS3DRenderPlugin/utils/even.js";
34
+ import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
35
+ import "../../shared-utils/three/centerPoint.js";
36
+ import "../../shared-utils/three/getObjectVisible.js";
37
+ import "../../shared-utils/isNil.js";
38
+ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
39
+ import "../../shared-utils/three/PointSelector/utils/html.js";
40
+ import "../../shared-utils/five/initialCSS3DRender.js";
41
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
42
+ import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
43
+ import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
44
+ import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
45
+ import "../../Sculpt/Meshes/Line.js";
46
+ import "../../Sculpt/typings/style.js";
47
+ import "../../shared-utils/five/FiveLine.js";
48
+ import "../../shared-utils/three/IObject3D.js";
49
+ import "../../Sculpt/utils/removeAllTag.js";
50
+ import "../../Sculpt/utils/Meshes/getLengthHTML.js";
51
+ import "../../shared-utils/three/applyObjectMatrixWorld.js";
52
+ import "../../shared-utils/util.js";
53
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
54
+ import "../../shared-utils/isTouchDevice.js";
55
+ import "../../shared-utils/five/getPosition.js";
56
+ import "../../shared-utils/five/getRaycasterByNdcPosition.js";
57
+ import "../../shared-utils/three/PointSelector/utils/contents.js";
27
58
  import "../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
28
59
  import "../../vendor/three/build/three.module.js";
29
- import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
30
60
  import "../../shared-utils/animationFrame/index.js";
31
61
  import "../../vendor/svelte/internal/index.js";
32
62
  import "../../components/AreaLabel/Assets/roomLabelBg.js";
@@ -40,7 +70,7 @@ class P extends T {
40
70
  this.areaMakerItem.makerObject.raycast(t, s);
41
71
  }
42
72
  }
43
- class st {
73
+ class At {
44
74
  constructor(e, t) {
45
75
  i(this, "id");
46
76
  /** 标注名称 */
@@ -78,9 +108,9 @@ class st {
78
108
  /** 标注标签是否可见 */
79
109
  i(this, "tagVisible", null);
80
110
  /** 标注标签的世界坐标 */
81
- i(this, "tagPosition", new a.Vector3());
111
+ i(this, "tagPosition", new r.Vector3());
82
112
  /** 标注标签的 NDC 坐标 */
83
- i(this, "tagNDCPosition", new a.Vector3());
113
+ i(this, "tagNDCPosition", new r.Vector3());
84
114
  /** 标注标签的 transform */
85
115
  i(this, "tagTransform", { left: 0, top: 0 });
86
116
  /** 标注标签的显示层级 */
@@ -120,21 +150,21 @@ class st {
120
150
  // }
121
151
  /** 透明度动画 */
122
152
  i(this, "doOpacityAnime", (e) => {
123
- var l;
124
- (l = this.opacityAnime) == null || l.dispose();
125
- const t = e.duration, [s, o] = e.makerObjectOpacity, [h, r] = e.outlineOpacity;
153
+ var m;
154
+ (m = this.opacityAnime) == null || m.dispose();
155
+ const t = e.duration, [s, o] = e.makerObjectOpacity, [h, n] = e.outlineOpacity;
126
156
  if (t === 0) {
127
- this.makerObject.material.opacity = o, this.outline.material.opacity = r;
157
+ this.makerObject.material.opacity = o, this.outline.material.opacity = n;
128
158
  return;
129
159
  }
130
- return new Promise((m) => {
160
+ return new Promise((p) => {
131
161
  this.opacityAnime = new O({ makerObjectOpacity: s, outlineOpacity: h }).to({
132
162
  makerObjectOpacity: o,
133
- outlineOpacity: r
134
- }).onUpdate(({ makerObjectOpacity: p, outlineOpacity: c }) => {
135
- this.makerObject.material.opacity = p, this.outline.material.opacity = c, this.plugin.five.needsRender = !0;
136
- }).onComplete(() => m(!0)).onDispose(() => {
137
- this.makerObject.material.opacity = o, this.outline.material.opacity = r, this.plugin.five.needsRender = !0, m(!1);
163
+ outlineOpacity: n
164
+ }).onUpdate(({ makerObjectOpacity: l, outlineOpacity: c }) => {
165
+ this.makerObject.material.opacity = l, this.outline.material.opacity = c, this.plugin.five.needsRender = !0;
166
+ }).onComplete(() => p(!0)).onDispose(() => {
167
+ this.makerObject.material.opacity = o, this.outline.material.opacity = n, this.plugin.five.needsRender = !0, p(!1);
138
168
  }).play();
139
169
  });
140
170
  });
@@ -195,8 +225,8 @@ class st {
195
225
  const [o] = this.plugin.fiveUtil.model.intersectRaycaster(d), h = this.tagPosition.distanceTo(t.camera.position);
196
226
  if (o && o.distance + 0.1 < h)
197
227
  return { result: !1, msg: "标注标签被 Five 模型遮挡" };
198
- const r = this.tagNDCPosition;
199
- return Math.abs(r.x) > 1.2 || Math.abs(r.y) > 1.2 || Math.abs(r.z) > 1 ? { result: !1, msg: "标注标签不在屏幕内" } : { result: !0, msg: "" };
228
+ const n = this.tagNDCPosition;
229
+ return Math.abs(n.x) > 1.2 || Math.abs(n.y) > 1.2 || Math.abs(n.z) > 1 ? { result: !1, msg: "标注标签不在屏幕内" } : { result: !0, msg: "" };
200
230
  });
201
231
  /** 相机位姿发生变化时,更新标签 */
202
232
  i(this, "onFiveCameraUpdate", () => {
@@ -210,11 +240,11 @@ class st {
210
240
  };
211
241
  this.containerResizeTimeoutID && clearTimeout(this.containerResizeTimeoutID), this.containerResizeTimeoutID = setTimeout(t, 100);
212
242
  });
213
- var m, p, c, g;
214
- const s = t.object_data, o = s.bottom_y, h = s.height, r = new a.Color((m = s.color) != null ? m : "#FFFFFF"), l = (p = s.opacity) != null ? p : 0.4;
215
- this.data = t, this.id = t.id, this.name = (c = t.name) != null ? c : "", this.plugin = e, this.height = h, this.bottomY = o, this.opacity = l, this.shape = new a.Shape().fromJSON(s.shape), this.floorIndex = t.floor_index, this.makerObject = new a.Mesh(f(this.shape, h), j(r, l)), u(this.makerObject, o), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline = new C(
216
- new a.EdgesGeometry(this.makerObject.geometry),
217
- new a.LineBasicMaterial({ color: r, transparent: !0 })
243
+ var p, l, c, g;
244
+ const s = t.object_data, o = s.bottom_y, h = s.height, n = new r.Color((p = s.color) != null ? p : "#FFFFFF"), m = (l = s.opacity) != null ? l : 0.4;
245
+ this.data = t, this.id = t.id, this.name = (c = t.name) != null ? c : "", this.plugin = e, this.height = h, this.bottomY = o, this.opacity = m, this.shape = new r.Shape().fromJSON(s.shape), this.floorIndex = t.floor_index, this.makerObject = new r.Mesh(f(this.shape, h), j(n, m)), u(this.makerObject, o), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline = new C(
246
+ new r.EdgesGeometry(this.makerObject.geometry),
247
+ new r.LineBasicMaterial({ color: n, transparent: !0 })
218
248
  ), u(this.outline, o), this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.setHeight(h), this.modelGroup = new P(this), this.modelGroup.visible = (g = s.visible) != null ? g : !0;
219
249
  }
220
250
  /** 挂载标注 */
@@ -252,7 +282,7 @@ class st {
252
282
  * @example setColor('#FF0000')
253
283
  */
254
284
  setColor(e) {
255
- const t = new a.Color(e);
285
+ const t = new r.Color(e);
256
286
  this.makerObject.material.color = t, this.outline.material.color = t, this.plugin.five.needsRender = !0;
257
287
  }
258
288
  /** 更改标注高度
@@ -261,8 +291,8 @@ class st {
261
291
  setHeight(e) {
262
292
  if (e <= 0)
263
293
  throw new Error("高度必须大于 0");
264
- this.height = e, this.makerObject.geometry = f(this.shape, e), this.outline.geometry = new a.EdgesGeometry(this.makerObject.geometry);
265
- const t = this.shape.extractPoints(10).shape.slice(0, -1), s = M(t), o = new a.Vector3(s.x, s.y, e);
294
+ this.height = e, this.makerObject.geometry = f(this.shape, e), this.outline.geometry = new r.EdgesGeometry(this.makerObject.geometry);
295
+ const t = this.shape.extractPoints(10).shape.slice(0, -1), s = M(t), o = new r.Vector3(s.x, s.y, e);
266
296
  u(o, this.bottomY), this.tagPosition.copy(o), this.updateTag(), this.plugin.five.needsRender = !0;
267
297
  }
268
298
  /** 更改标注标签的显示层级
@@ -278,23 +308,23 @@ class st {
278
308
  this.tagZIndex !== e && ((t = this.tagApp) == null || t.$set({ zIndex: e }));
279
309
  }
280
310
  }
281
- function f(n, e) {
282
- return new a.ExtrudeBufferGeometry(n, {
311
+ function f(a, e) {
312
+ return new r.ExtrudeBufferGeometry(a, {
283
313
  depth: e,
284
314
  bevelEnabled: !1
285
315
  });
286
316
  }
287
- function j(n, e) {
288
- return new a.MeshBasicMaterial({
289
- color: n,
317
+ function j(a, e) {
318
+ return new r.MeshBasicMaterial({
319
+ color: a,
290
320
  opacity: e,
291
321
  transparent: !0
292
322
  });
293
323
  }
294
- function u(n, e) {
295
- const t = new a.Matrix4(), s = new a.Matrix4().makeRotationX(Math.PI / 2), o = new a.Matrix4().makeTranslation(0, 0, -e), h = new a.Matrix4().makeScale(1, 1, -1);
296
- t.multiply(s), t.multiply(o), t.multiply(h), n.applyMatrix4(t);
324
+ function u(a, e) {
325
+ const t = new r.Matrix4(), s = new r.Matrix4().makeRotationX(Math.PI / 2), o = new r.Matrix4().makeTranslation(0, 0, -e), h = new r.Matrix4().makeScale(1, 1, -1);
326
+ t.multiply(s), t.multiply(o), t.multiply(h), a.applyMatrix4(t);
297
327
  }
298
328
  export {
299
- st as AreaMakerItem
329
+ At as AreaMakerItem
300
330
  };