@realsee/dnalogel 3.78.0-alpha.4 → 3.78.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 (144) hide show
  1. package/CHANGELOG.md +40 -10
  2. package/dist/DigitalPerformancePlugin/controller/index.d.ts +224 -0
  3. package/dist/DigitalPerformancePlugin/core/DigitalHuman.d.ts +55 -0
  4. package/dist/DigitalPerformancePlugin/core/DigitalPlayground.d.ts +40 -0
  5. package/dist/DigitalPerformancePlugin/core/DigitalStateMachine.d.ts +150 -0
  6. package/dist/DigitalPerformancePlugin/core/Trace.d.ts +9 -0
  7. package/dist/DigitalPerformancePlugin/index.d.ts +11 -0
  8. package/dist/DigitalPerformancePlugin/mock.d.ts +76 -0
  9. package/dist/DigitalPerformancePlugin/typings/index.d.ts +79 -0
  10. package/dist/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +0 -6
  11. package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +20 -2
  12. package/dist/Sculpt/Meshes/Line.d.ts +4 -0
  13. package/dist/Sculpt/Objects/Base/Editor.d.ts +9 -2
  14. package/dist/index.cjs.js +95 -82
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.js +14187 -12436
  17. package/dist/index.umd.js +87 -74
  18. package/dist/shared-utils/five/getFiveFromParentChain.d.ts +8 -0
  19. package/libs/AreaMakerPlugin/Controller.js +3 -2
  20. package/libs/AreaMakerPlugin/index.js +3 -2
  21. package/libs/AreaMakerPlugin/utils/Item.js +3 -2
  22. package/libs/CSS3DRenderPlugin/Controller.js +3 -2
  23. package/libs/CSS3DRenderPlugin/index.js +6 -5
  24. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +39 -38
  25. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +10 -9
  26. package/libs/CruisePlugin/BaseController.js +5 -4
  27. package/libs/CruisePlugin/Move.js +3 -2
  28. package/libs/CruisePlugin/Work.js +3 -2
  29. package/libs/CruisePlugin/index.js +7 -6
  30. package/libs/CurrentPanoImagePlugin/Controller.js +15 -14
  31. package/libs/CurrentPanoImagePlugin/index.js +4 -3
  32. package/libs/DigitalPerformancePlugin/controller/index.d.ts +2 -2
  33. package/libs/DigitalPerformancePlugin/controller/index.js +164 -173
  34. package/libs/DigitalPerformancePlugin/core/DigitalHuman.d.ts +16 -6
  35. package/libs/DigitalPerformancePlugin/core/DigitalHuman.js +128 -102
  36. package/libs/DigitalPerformancePlugin/core/DigitalPlayground.d.ts +11 -5
  37. package/libs/DigitalPerformancePlugin/core/DigitalPlayground.js +84 -74
  38. package/libs/DigitalPerformancePlugin/core/DigitalStateMachine.d.ts +7 -0
  39. package/libs/DigitalPerformancePlugin/mock.d.ts +6 -0
  40. package/libs/DigitalPerformancePlugin/mock.js +272 -274
  41. package/libs/GuideLinePlugin/Controller.js +7 -6
  42. package/libs/GuideLinePlugin/GuideLineItem.js +5 -4
  43. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +51 -48
  44. package/libs/GuideLinePlugin/GuideLineModeItem.js +5 -2
  45. package/libs/GuideLinePlugin/index.js +7 -6
  46. package/libs/MeasurePlugin/Controller.js +11 -10
  47. package/libs/MeasurePlugin/index.js +5 -4
  48. package/libs/MeasurePlugin/utils/MeasureMesh.js +3 -2
  49. package/libs/ModelChassisCompassPlugin/Plugin.js +4 -3
  50. package/libs/ModelChassisCompassPlugin/index.js +1 -0
  51. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +6 -5
  52. package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
  53. package/libs/ModelMakerPlugin/Controller.js +3 -2
  54. package/libs/ModelMakerPlugin/index.js +3 -2
  55. package/libs/ModelMakerPlugin/item/baseItem.js +3 -2
  56. package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
  57. package/libs/ModelMakerPlugin/item/polygonItem.js +3 -2
  58. package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
  59. package/libs/ModelTVVideoPlugin/Plugin.js +4 -3
  60. package/libs/ModelTVVideoPlugin/index.js +3 -2
  61. package/libs/ModelViewPlugin/Plugin.js +20 -19
  62. package/libs/ModelViewPlugin/index.js +1 -0
  63. package/libs/Object3DHelperPlugin/Controller.js +3 -2
  64. package/libs/Object3DHelperPlugin/index.js +6 -5
  65. package/libs/PanoCompassPlugin/Controller.js +3 -2
  66. package/libs/PanoCompassPlugin/index.js +4 -3
  67. package/libs/PanoDoorLabelPlugin/Controller.js +24 -23
  68. package/libs/PanoDoorLabelPlugin/index.js +4 -3
  69. package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
  70. package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
  71. package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
  72. package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
  73. package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
  74. package/libs/PanoMeasurePlugin/Model/area.js +3 -2
  75. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -0
  76. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +16 -15
  77. package/libs/PanoMeasurePlugin/index.js +14 -13
  78. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +3 -2
  79. package/libs/PanoRulerProPlugin/Controller.js +3 -2
  80. package/libs/PanoRulerProPlugin/RulerItems.js +42 -41
  81. package/libs/PanoRulerProPlugin/index.js +4 -3
  82. package/libs/PanoSpatialTagPlugin/Plugin.js +34 -33
  83. package/libs/PanoSpatialTagPlugin/index.js +1 -0
  84. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +141 -138
  85. package/libs/PanoTagPlugin/Components/Common/TagPopover/PopoverContent.js +3 -2
  86. package/libs/PanoTagPlugin/Components/Common/TagPopover/TagPopoverToolBar.js +3 -2
  87. package/libs/PanoTagPlugin/Components/Common/TagPopover/index.js +3 -2
  88. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
  89. package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
  90. package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
  91. package/libs/PanoTagPlugin/Components/TagItem.js +131 -122
  92. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +3 -2
  93. package/libs/PanoTagPlugin/controller/Tag/BoxTag.js +3 -2
  94. package/libs/PanoTagPlugin/controller/Tag/MaskTag.js +1 -0
  95. package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.d.ts +0 -6
  96. package/libs/PanoTagPlugin/controller/Tag/MaskTag.shaders.js +2 -90
  97. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
  98. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
  99. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
  100. package/libs/PanoTagPlugin/controller/Tag/PolygonTag.js +31 -29
  101. package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
  102. package/libs/PanoTagPlugin/controller/TagUtil.js +3 -2
  103. package/libs/PanoTagPlugin/controller/index.js +30 -29
  104. package/libs/PanoTagPlugin/index.js +12 -11
  105. package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +20 -2
  106. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -2
  107. package/libs/PanoTagPlugin/utils/tag/format.js +3 -2
  108. package/libs/PanoVideoPlugin/Controller.js +9 -8
  109. package/libs/PanoVideoPlugin/VideoMeshController.js +3 -2
  110. package/libs/PanoVideoPlugin/index.js +6 -5
  111. package/libs/PipelinePlugin/Controller.js +3 -2
  112. package/libs/PipelinePlugin/index.js +4 -3
  113. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +3 -2
  114. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -2
  115. package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -0
  116. package/libs/Sculpt/Meshes/Line.d.ts +4 -0
  117. package/libs/Sculpt/Meshes/Line.js +85 -76
  118. package/libs/Sculpt/Meshes/Point.js +28 -28
  119. package/libs/Sculpt/Meshes/Polygon.js +43 -43
  120. package/libs/Sculpt/Objects/Base/Editor.d.ts +9 -2
  121. package/libs/Sculpt/Objects/Base/Editor.js +72 -63
  122. package/libs/Sculpt/index.js +1 -1
  123. package/libs/Sculpt/utils/Modules/Cursor.js +7 -7
  124. package/libs/base/BasePlugin.js +5 -5
  125. package/libs/floorplan/FloorplanGuidePlugin/Controller.js +3 -2
  126. package/libs/floorplan/FloorplanGuidePlugin/index.js +4 -3
  127. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +3 -2
  128. package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -3
  129. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +3 -2
  130. package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -3
  131. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -2
  132. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -3
  133. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +3 -2
  134. package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -3
  135. package/libs/index.d.ts +1 -0
  136. package/libs/index.js +162 -150
  137. package/libs/shared-utils/five/getFiveFromParentChain.d.ts +8 -0
  138. package/libs/shared-utils/five/getFiveFromParentChain.js +20 -0
  139. package/libs/shared-utils/logger.js +1 -1
  140. package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +1 -0
  141. package/libs/shared-utils/url/replace-static-prefix.js +12 -7
  142. package/package.json +3 -3
  143. package/libs/PanoTagPlugin/controller/Tag/MaskTag1.d.ts +0 -202
  144. package/libs/PanoTagPlugin/controller/Tag/MaskTag1.js +0 -617
@@ -284,8 +284,8 @@ export interface TagConfig<C extends TagContentType = TagContentType> {
284
284
  debug?: boolean;
285
285
  /**
286
286
  * @description 触发方式
287
- * @description hover - 鼠标悬停触发
288
- * @description click - 点击触发(fold/unfold模式)
287
+ * @description hover - 鼠标悬停触发,移出后面板消失
288
+ * @description click - 点击触发(fold/unfold模式),再次点击隐藏
289
289
  * @default 'hover'
290
290
  */
291
291
  trigger?: 'hover' | 'click';
@@ -355,6 +355,12 @@ export interface TagConfig<C extends TagContentType = TagContentType> {
355
355
  * @description 鼠标悬停前的拦截函数,返回 true 允许 hover,false 阻止 hover
356
356
  */
357
357
  beforeOpen?: (tag?: TagInstance) => boolean | undefined;
358
+ /**
359
+ * @description 鼠标离开标签区域后的回调(在 hover 结束时触发,无论 beforeOpen 是否拦截过本次 hover)
360
+ * @param tag 当前标签实例
361
+ * @param event 原生 PointerEvent,可通过 event.pointerType 区分 'mouse' / 'touch' / 'pen'
362
+ */
363
+ onHoverEnd?: (tag?: TagInstance, event?: PointerEvent) => void;
358
364
  };
359
365
  /**
360
366
  * @description 标签法线相关配置
@@ -371,6 +377,18 @@ export interface TagConfig<C extends TagContentType = TagContentType> {
371
377
  */
372
378
  lineWidth?: number;
373
379
  };
380
+ /**
381
+ * @description Polygon mesh 渲染相关配置
382
+ * @experimental 此配置为实验性 API,后续可能调整
383
+ */
384
+ __experimental_PolygonMeshConfig?: {
385
+ /**
386
+ * @description 是否启用默认的 Polygon mesh 渲染。设为 false 可禁用插件内置的多边形面渲染,
387
+ * 适用于业务侧自定义 Polygon mesh 渲染的场景。
388
+ * @default true
389
+ */
390
+ enabled?: boolean;
391
+ };
374
392
  }
375
393
  export declare const defaultGlobalConfig: TagConfig;
376
394
  type ConfigFunction = (five: Five, tagState: {
@@ -65,6 +65,7 @@ import "../../../shared-utils/three/IObject3D.js";
65
65
  import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
66
66
  import "../../../shared-utils/three/applyObjectMatrixWorld.js";
67
67
  import "../../../shared-utils/util.js";
68
+ import "../../../shared-utils/five/getFiveFromParentChain.js";
68
69
  import "../../../shared-utils/three/core/LineGeometry.js";
69
70
  import "../../../shared-utils/three/core/LineMaterial.js";
70
71
  import "../../../shared-utils/three/core/Line2.js";
@@ -81,7 +82,7 @@ import "../../../vendor/animejs/lib/anime.es.js";
81
82
  import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
82
83
  import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
83
84
  import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
84
- function di(o, i, t) {
85
+ function yi(o, i, t) {
85
86
  var v, b, j, C, A;
86
87
  const D = (v = t == null ? void 0 : t.useCache) != null ? v : !0;
87
88
  if (!o)
@@ -127,5 +128,5 @@ function di(o, i, t) {
127
128
  return P(T), Object.values(f).forEach((e) => P(e)), T._isMerged = !0, T;
128
129
  }
129
130
  export {
130
- di as calculateTagConfig
131
+ yi as calculateTagConfig
131
132
  };
@@ -48,6 +48,7 @@ import "../../../shared-utils/three/IObject3D.js";
48
48
  import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
49
49
  import "../../../shared-utils/three/applyObjectMatrixWorld.js";
50
50
  import "../../../shared-utils/util.js";
51
+ import "../../../shared-utils/five/getFiveFromParentChain.js";
51
52
  import "../../../shared-utils/three/core/LineGeometry.js";
52
53
  import "../../../shared-utils/three/core/LineMaterial.js";
53
54
  import "../../../shared-utils/three/core/Line2.js";
@@ -68,7 +69,7 @@ import "@realsee/five";
68
69
  function n(i) {
69
70
  return i.stickType ? i.stickType : i.pointType === "PointTag" && i.dimensionType === "3D" ? "3DPoint" : i.pointType === "PlaneTag" ? "Plane" : "2DPoint";
70
71
  }
71
- function Li(i) {
72
+ function _i(i) {
72
73
  var r, o, p, m;
73
74
  if (i.stickType || (i.stickType = n(i)), i.contentType === "VRLink" || i.contentType === "PanoLink" || i.contentType === "Link") {
74
75
  const t = i;
@@ -82,6 +83,6 @@ function Li(i) {
82
83
  }), i;
83
84
  }
84
85
  export {
85
- Li as default,
86
+ _i as default,
86
87
  n as getTagStickType
87
88
  };
@@ -1,17 +1,17 @@
1
1
  var u = Object.defineProperty, g = Object.defineProperties;
2
2
  var b = Object.getOwnPropertyDescriptors;
3
- var h = Object.getOwnPropertySymbols;
3
+ var m = Object.getOwnPropertySymbols;
4
4
  var M = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
5
5
  var l = (e, i, r) => i in e ? u(e, i, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[i] = r, p = (e, i) => {
6
6
  for (var r in i || (i = {}))
7
7
  M.call(i, r) && l(e, r, i[r]);
8
- if (h)
9
- for (var r of h(i))
8
+ if (m)
9
+ for (var r of m(i))
10
10
  W.call(i, r) && l(e, r, i[r]);
11
11
  return e;
12
12
  }, a = (e, i) => g(e, b(i));
13
13
  var s = (e, i, r) => (l(e, typeof i != "symbol" ? i + "" : i, r), r);
14
- import { VideoMeshController as m } from "./VideoMeshController.js";
14
+ import { VideoMeshController as h } from "./VideoMeshController.js";
15
15
  import { Controller as _ } from "../base/BasePlugin.js";
16
16
  import "./utils/shader.js";
17
17
  import "../shared-utils/tag.js";
@@ -65,6 +65,7 @@ import "../Sculpt/typings/style.js";
65
65
  import "../shared-utils/three/IObject3D.js";
66
66
  import "../Sculpt/utils/Meshes/getLengthHTML.js";
67
67
  import "../shared-utils/three/applyObjectMatrixWorld.js";
68
+ import "../shared-utils/five/getFiveFromParentChain.js";
68
69
  import "../shared-utils/three/core/LineGeometry.js";
69
70
  import "../shared-utils/three/core/LineMaterial.js";
70
71
  import "../shared-utils/three/core/Line2.js";
@@ -83,7 +84,7 @@ import "../Sculpt/utils/three/rayOnLine.js";
83
84
  import "../shared-utils/animationFrame/index.js";
84
85
  import "./utils/index.js";
85
86
  import "../shared-utils/url/defaultUrls.js";
86
- class qr extends _ {
87
+ class zr extends _ {
87
88
  constructor(r) {
88
89
  super(r);
89
90
  s(this, "controllerMap", /* @__PURE__ */ new Map());
@@ -111,7 +112,7 @@ class qr extends _ {
111
112
  n.video_list.forEach((d) => {
112
113
  this.controllerMap.set(
113
114
  d.render_id,
114
- new m(this.five, a(p({}, d), {
115
+ new h(this.five, a(p({}, d), {
115
116
  fiveUtil: this.fiveUtil,
116
117
  panoIndex: c,
117
118
  renderID: f,
@@ -190,7 +191,7 @@ class qr extends _ {
190
191
  const n = o.render_id;
191
192
  this.controllerMap.set(
192
193
  o.render_id,
193
- new m(this.five, a(p({}, o), {
194
+ new h(this.five, a(p({}, o), {
194
195
  fiveUtil: this.fiveUtil,
195
196
  panoIndex: r,
196
197
  renderID: n,
@@ -228,5 +229,5 @@ class qr extends _ {
228
229
  }
229
230
  }
230
231
  export {
231
- qr as PanoVideoPluginController
232
+ zr as PanoVideoPluginController
232
233
  };
@@ -54,6 +54,7 @@ import "../shared-utils/three/IObject3D.js";
54
54
  import "../Sculpt/utils/Meshes/getLengthHTML.js";
55
55
  import "../shared-utils/three/applyObjectMatrixWorld.js";
56
56
  import "../shared-utils/util.js";
57
+ import "../shared-utils/five/getFiveFromParentChain.js";
57
58
  import "../shared-utils/three/core/LineGeometry.js";
58
59
  import "../shared-utils/three/core/LineMaterial.js";
59
60
  import "../shared-utils/three/core/Line2.js";
@@ -70,7 +71,7 @@ import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
70
71
  import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
71
72
  import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
72
73
  import "@realsee/five";
73
- class Qi {
74
+ class $i {
74
75
  /** 初始化视频、模型以及相关事件监听。 */
75
76
  constructor(i, e) {
76
77
  t(this, "video");
@@ -345,5 +346,5 @@ class Qi {
345
346
  }
346
347
  }
347
348
  export {
348
- Qi as VideoMeshController
349
+ $i as VideoMeshController
349
350
  };
@@ -1,5 +1,5 @@
1
1
  import { PanoVideoPluginController as r } from "./Controller.js";
2
- import { typings as jo } from "./typings/index.js";
2
+ import { typings as ko } from "./typings/index.js";
3
3
  import "./VideoMeshController.js";
4
4
  import "./utils/shader.js";
5
5
  import "../shared-utils/tag.js";
@@ -53,6 +53,7 @@ import "../Sculpt/typings/style.js";
53
53
  import "../shared-utils/three/IObject3D.js";
54
54
  import "../Sculpt/utils/Meshes/getLengthHTML.js";
55
55
  import "../shared-utils/three/applyObjectMatrixWorld.js";
56
+ import "../shared-utils/five/getFiveFromParentChain.js";
56
57
  import "../shared-utils/three/core/LineGeometry.js";
57
58
  import "../shared-utils/three/core/LineMaterial.js";
58
59
  import "../shared-utils/three/core/Line2.js";
@@ -72,9 +73,9 @@ import "../shared-utils/animationFrame/index.js";
72
73
  import "./utils/index.js";
73
74
  import "../base/BasePlugin.js";
74
75
  import "../shared-utils/url/defaultUrls.js";
75
- const To = (o) => new r(o);
76
+ const bo = (o) => new r(o);
76
77
  export {
77
- To as PanoVideoPlugin,
78
- jo as PanoVideoPluginType,
79
- To as default
78
+ bo as PanoVideoPlugin,
79
+ ko as PanoVideoPluginType,
80
+ bo as default
80
81
  };
@@ -82,6 +82,7 @@ import "../shared-utils/three/IObject3D.js";
82
82
  import "../Sculpt/utils/Meshes/getLengthHTML.js";
83
83
  import "../shared-utils/three/applyObjectMatrixWorld.js";
84
84
  import "../shared-utils/util.js";
85
+ import "../shared-utils/five/getFiveFromParentChain.js";
85
86
  import "../shared-utils/three/core/LineGeometry.js";
86
87
  import "../shared-utils/three/core/LineMaterial.js";
87
88
  import "../shared-utils/three/core/Line2.js";
@@ -107,7 +108,7 @@ import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
107
108
  import "../shared-utils/three/Extras/Core/Interpolations.js";
108
109
  import "../shared-utils/three/Extras/Core/Interpolations2.js";
109
110
  const g = { flowSpeed: 0.6, rotateSpeed: 0 };
110
- class re extends S {
111
+ class ae extends S {
111
112
  constructor(t) {
112
113
  super(t);
113
114
  // ==================== public properties ====================
@@ -387,5 +388,5 @@ class re extends S {
387
388
  }
388
389
  }
389
390
  export {
390
- re as Controller
391
+ ae as Controller
391
392
  };
@@ -52,6 +52,7 @@ import "../Sculpt/typings/style.js";
52
52
  import "../shared-utils/three/IObject3D.js";
53
53
  import "../Sculpt/utils/Meshes/getLengthHTML.js";
54
54
  import "../shared-utils/three/applyObjectMatrixWorld.js";
55
+ import "../shared-utils/five/getFiveFromParentChain.js";
55
56
  import "../shared-utils/three/core/LineGeometry.js";
56
57
  import "../shared-utils/three/core/LineMaterial.js";
57
58
  import "../shared-utils/three/core/Line2.js";
@@ -79,8 +80,8 @@ import "../shared-utils/animationFrame/BetterTween.js";
79
80
  import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
80
81
  import "../shared-utils/three/Extras/Core/Interpolations.js";
81
82
  import "../shared-utils/three/Extras/Core/Interpolations2.js";
82
- const Br = (r) => new o(r);
83
+ const Dr = (r) => new o(r);
83
84
  export {
84
- Br as PipelinePlugin,
85
- Br as default
85
+ Dr as PipelinePlugin,
86
+ Dr as default
86
87
  };
@@ -52,6 +52,7 @@ import "../../../shared-utils/three/IObject3D.js";
52
52
  import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
53
53
  import "../../../shared-utils/three/applyObjectMatrixWorld.js";
54
54
  import "../../../shared-utils/util.js";
55
+ import "../../../shared-utils/five/getFiveFromParentChain.js";
55
56
  import "../../../shared-utils/three/core/LineGeometry.js";
56
57
  import "../../../shared-utils/three/core/LineMaterial.js";
57
58
  import "../../../shared-utils/three/core/Line2.js";
@@ -92,7 +93,7 @@ const d = (
92
93
  }
93
94
  `
94
95
  );
95
- class jt extends h {
96
+ class kt extends h {
96
97
  constructor(t) {
97
98
  super(t, d);
98
99
  /** 初始状态下,当前水管内的水流在整体管道上的位移
@@ -150,5 +151,5 @@ class jt extends h {
150
151
  }
151
152
  }
152
153
  export {
153
- jt as ObjectFlowPipe
154
+ kt as ObjectFlowPipe
154
155
  };
@@ -52,6 +52,7 @@ import "../../../shared-utils/three/IObject3D.js";
52
52
  import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
53
53
  import "../../../shared-utils/three/applyObjectMatrixWorld.js";
54
54
  import "../../../shared-utils/util.js";
55
+ import "../../../shared-utils/five/getFiveFromParentChain.js";
55
56
  import "../../../shared-utils/three/core/LineGeometry.js";
56
57
  import "../../../shared-utils/three/core/LineMaterial.js";
57
58
  import "../../../shared-utils/three/core/Line2.js";
@@ -73,7 +74,7 @@ import "../../../shared-utils/animationFrame/index.js";
73
74
  import "../../../shared-utils/three/Extras/Curves/BezierCurve3.js";
74
75
  import "../../../shared-utils/three/Extras/Core/Interpolations.js";
75
76
  import "../../../shared-utils/three/Extras/Core/Interpolations2.js";
76
- class Ri extends a {
77
+ class ki extends a {
77
78
  constructor(i) {
78
79
  super(i);
79
80
  p(this, "imageCount", 64);
@@ -96,5 +97,5 @@ class Ri extends a {
96
97
  }
97
98
  }
98
99
  export {
99
- Ri as ObjectHighlightPipe
100
+ ki as ObjectHighlightPipe
100
101
  };
@@ -77,6 +77,7 @@ import "../../../shared-utils/three/IObject3D.js";
77
77
  import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
78
78
  import "../../../shared-utils/three/applyObjectMatrixWorld.js";
79
79
  import "../../../shared-utils/util.js";
80
+ import "../../../shared-utils/five/getFiveFromParentChain.js";
80
81
  import "../../../shared-utils/three/core/LineGeometry.js";
81
82
  import "../../../shared-utils/three/core/LineMaterial.js";
82
83
  import "../../../shared-utils/three/core/Line2.js";
@@ -36,6 +36,10 @@ export declare class LineMesh extends IObject3D implements RenderDomObjectType {
36
36
  private paramsStyle;
37
37
  private lastRenderDomItem;
38
38
  private lastFOV;
39
+ private fiveListenersInited;
40
+ private fiveRef?;
41
+ private initFiveListeners;
42
+ private removeFiveListeners;
39
43
  constructor(params?: Partial<LineMeshStyle & LineData>);
40
44
  updateMatrixWorld(force?: boolean): void;
41
45
  setPoints(points: AnyPositions): void;
@@ -1,34 +1,35 @@
1
1
  var $ = Object.defineProperty, Y = Object.defineProperties;
2
2
  var q = Object.getOwnPropertyDescriptors;
3
- var B = Object.getOwnPropertySymbols;
3
+ var P = Object.getOwnPropertySymbols;
4
4
  var J = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
5
- var L = (a, n, e) => n in a ? $(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e, g = (a, n) => {
5
+ var T = (a, n, e) => n in a ? $(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e, p = (a, n) => {
6
6
  for (var e in n || (n = {}))
7
- J.call(n, e) && L(a, e, n[e]);
8
- if (B)
9
- for (var e of B(n))
10
- K.call(n, e) && L(a, e, n[e]);
7
+ J.call(n, e) && T(a, e, n[e]);
8
+ if (P)
9
+ for (var e of P(n))
10
+ K.call(n, e) && T(a, e, n[e]);
11
11
  return a;
12
- }, E = (a, n) => Y(a, q(n));
13
- var o = (a, n, e) => (L(a, typeof n != "symbol" ? n + "" : n, e), e);
14
- import * as v from "three";
12
+ }, M = (a, n) => Y(a, q(n));
13
+ var o = (a, n, e) => (T(a, typeof n != "symbol" ? n + "" : n, e), e);
14
+ import * as u from "three";
15
15
  import { DEFAULT_LINE_COLOR as Q, DEFAULT_LINE_WIDTH as X, DEFAULT_HIGHLIGHT_OPACITY as Z } from "../typings/style.js";
16
16
  import { anyPositionToVector3 as ee } from "../../shared-utils/positionToVector3.js";
17
17
  import { IObject3D as te } from "../../shared-utils/three/IObject3D.js";
18
18
  import { LightTag as ie } from "../../shared-utils/tag.js";
19
19
  import "../../vendor/hammerjs/hammer.js";
20
20
  import "../../shared-utils/three/PointSelector/index.js";
21
- import { centerPoint as U } from "../../shared-utils/three/centerPoint.js";
21
+ import { centerPoint as B } from "../../shared-utils/three/centerPoint.js";
22
22
  import "../../shared-utils/three/CSS3DRenderer/index.js";
23
23
  import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
24
24
  import { getLengthHTML as se } from "../utils/Meshes/getLengthHTML.js";
25
- import { localToWorld as V } from "../../shared-utils/three/applyObjectMatrixWorld.js";
26
- import { LineGeometry as H } from "../../shared-utils/three/core/LineGeometry.js";
27
- import { LineMaterial as oe } from "../../shared-utils/three/core/LineMaterial.js";
28
- import { THREE_Line2 as F } from "../../shared-utils/three/core/Line2.js";
29
- import { LineMaterial2 as ne } from "../../shared-utils/three/core/LineMaterial2.js";
30
- import { transformUnit as le } from "../utils/unit.js";
31
- import { RenderDom as T } from "../utils/renderDom.js";
25
+ import { localToWorld as U } from "../../shared-utils/three/applyObjectMatrixWorld.js";
26
+ import { getFiveFromParentChain as oe } from "../../shared-utils/five/getFiveFromParentChain.js";
27
+ import { LineGeometry as E } from "../../shared-utils/three/core/LineGeometry.js";
28
+ import { LineMaterial as ne } from "../../shared-utils/three/core/LineMaterial.js";
29
+ import { THREE_Line2 as V } from "../../shared-utils/three/core/Line2.js";
30
+ import { LineMaterial2 as he } from "../../shared-utils/three/core/LineMaterial2.js";
31
+ import { transformUnit as re } from "../utils/unit.js";
32
+ import { RenderDom as L } from "../utils/renderDom.js";
32
33
  import "../../shared-utils/three/core/Sphere.js";
33
34
  import "../../shared-utils/three/blink.js";
34
35
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
@@ -38,7 +39,7 @@ import { notNil as m } from "../../shared-utils/isNil.js";
38
39
  import "../../shared-utils/five/FivePuppet.js";
39
40
  class We extends te {
40
41
  constructor(e) {
41
- var h, l, f, d;
42
+ var r, h, f;
42
43
  super();
43
44
  o(this, "name", "LineMesh");
44
45
  o(this, "type", "Line2");
@@ -54,6 +55,8 @@ class We extends te {
54
55
  o(this, "paramsStyle", {});
55
56
  o(this, "lastRenderDomItem");
56
57
  o(this, "lastFOV");
58
+ o(this, "fiveListenersInited", !1);
59
+ o(this, "fiveRef");
57
60
  o(this, "_onAdded", () => {
58
61
  this.doms.length === 0 && this.paramsStyle.lengthEnable && this.updateDomItems();
59
62
  });
@@ -75,26 +78,22 @@ class We extends te {
75
78
  o(this, "onPanoArrived", () => {
76
79
  setTimeout(() => this.updateDomItems({ force: !0 }), 100);
77
80
  });
78
- this.paramsStyle = g({ dashed: !1, lineOpacity: 1 }, e), this.geometry = new H();
81
+ this.paramsStyle = p({ dashed: !1, lineOpacity: 1 }, e), this.geometry = new E();
79
82
  const i = {
80
- color: new v.Color((h = e == null ? void 0 : e.lineColor) != null ? h : Q),
81
- linewidth: (l = e == null ? void 0 : e.lineWidth) != null ? l : X,
83
+ color: new u.Color((r = e == null ? void 0 : e.lineColor) != null ? r : Q),
84
+ linewidth: (h = e == null ? void 0 : e.lineWidth) != null ? h : X,
82
85
  dashScale: 1,
83
86
  dashSize: 0.02,
84
87
  gapSize: 0.02,
85
88
  opacity: (f = e == null ? void 0 : e.lineOpacity) != null ? f : 1,
86
89
  depthWrite: !1,
87
90
  transparent: !0
88
- }, s = new oe(E(g({}, i), { dashed: !1, depthTest: !0 })), t = new ne(E(g({}, i), { dashed: !0, depthTest: !1 }));
89
- if (this.line1 = new F(this.geometry, s), this.line2 = new F(this.geometry, t), this.line1.renderOrder = 2, this.line2.renderOrder = 2, this.line1.name = "line1", this.line2.name = "line2", this.add(this.line1), this.five) {
90
- const y = (d = this.five.renderer) == null ? void 0 : d.getSize(new v.Vector2());
91
- y && this.setResolution(y.width, y.height), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("cameraFovUpdate", this.onCameraUpdate), this.five.on("panoArrived", this.onPanoArrived);
92
- }
93
- e && this.setStyle(e), e != null && e.points && this.setPoints(e.points), this.addEventListener("removed", () => {
94
- this.five && (this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("cameraFovUpdate", this.onCameraUpdate), this.five.off("panoArrived", this.onPanoArrived)), T.cacheObject.delete(this), T.checkDom(this);
91
+ }, s = new ne(M(p({}, i), { dashed: !1, depthTest: !0 })), t = new he(M(p({}, i), { dashed: !0, depthTest: !1 }));
92
+ this.line1 = new V(this.geometry, s), this.line2 = new V(this.geometry, t), this.line1.renderOrder = 2, this.line2.renderOrder = 2, this.line1.name = "line1", this.line2.name = "line2", this.add(this.line1), this.initFiveListeners(), e && this.setStyle(e), e != null && e.points && this.setPoints(e.points), this.addEventListener("removed", () => {
93
+ this.removeFiveListeners(), L.cacheObject.delete(this), L.checkDom(this);
95
94
  }), this.addEventListener("added", () => {
96
- T.cacheObject.add(this);
97
- }), T.checkDomEveryFrame();
95
+ this.initFiveListeners(), L.cacheObject.add(this);
96
+ }), L.checkDomEveryFrame();
98
97
  }
99
98
  get style() {
100
99
  return {
@@ -118,7 +117,7 @@ class We extends te {
118
117
  }
119
118
  get color() {
120
119
  var e;
121
- return new v.Color((e = this.line1.material.three_color) != null ? e : this.paramsStyle.lineColor);
120
+ return new u.Color((e = this.line1.material.three_color) != null ? e : this.paramsStyle.lineColor);
122
121
  }
123
122
  get dashed() {
124
123
  return this.paramsStyle.dashed;
@@ -130,9 +129,7 @@ class We extends te {
130
129
  return this.paramsStyle.occlusionMode;
131
130
  }
132
131
  get five() {
133
- var i, s;
134
- const e = (s = (i = window.globalModules) == null ? void 0 : i.five) != null ? s : window.$five;
135
- return e || console.error("请先调用 Sculpt.modules.init(five) "), e;
132
+ return oe(this);
136
133
  }
137
134
  set geometry(e) {
138
135
  var i;
@@ -141,10 +138,22 @@ class We extends te {
141
138
  get geometry() {
142
139
  return this._geometry;
143
140
  }
141
+ initFiveListeners() {
142
+ var s;
143
+ const e = this.five;
144
+ if (!e || this.fiveListenersInited)
145
+ return;
146
+ this.fiveListenersInited = !0, this.fiveRef = e;
147
+ const i = (s = e.renderer) == null ? void 0 : s.getSize(new u.Vector2());
148
+ i && this.setResolution(i.width, i.height), e.on("cameraUpdate", this.onCameraUpdate), e.on("cameraFovUpdate", this.onCameraUpdate), e.on("panoArrived", this.onPanoArrived);
149
+ }
150
+ removeFiveListeners() {
151
+ this.fiveRef && (this.fiveRef.off("cameraUpdate", this.onCameraUpdate), this.fiveRef.off("cameraFovUpdate", this.onCameraUpdate), this.fiveRef.off("panoArrived", this.onPanoArrived), this.fiveRef = void 0), this.fiveListenersInited = !1;
152
+ }
144
153
  updateMatrixWorld(e) {
145
154
  var i;
146
155
  if (super.updateMatrixWorld(e), this.points) {
147
- const s = (i = V(this, this.points)) == null ? void 0 : i.map((t) => t.toArray().join(",")).join(",");
156
+ const s = (i = U(this, this.points)) == null ? void 0 : i.map((t) => t.toArray().join(",")).join(",");
148
157
  s !== this.lastRenderDomItem && (this.updateDomItems(), this.lastRenderDomItem = s);
149
158
  }
150
159
  }
@@ -153,14 +162,14 @@ class We extends te {
153
162
  return;
154
163
  const i = e.map(ee).filter(m);
155
164
  if (this.points = i, i.length < 2) {
156
- const t = new H();
165
+ const t = new E();
157
166
  this.line1.geometry = t, this.line2.geometry = t, this.updateDomItems();
158
167
  return;
159
168
  }
160
169
  const s = i.flatMap((t) => [t.x, t.y, t.z]);
161
170
  if (s.length > 2) {
162
171
  this.line1.geometry.dispose();
163
- const t = new H();
172
+ const t = new E();
164
173
  this.line1.geometry = t, this.line2.geometry = t;
165
174
  }
166
175
  this.line1.geometry.setPositions(s), this.line1.computeLineDistances(), this.updateDomItems(), this.needsRender = !0;
@@ -172,19 +181,19 @@ class We extends te {
172
181
  (t.x !== e || t.y !== i) && (t.set(e, i), this.needsRender = !0);
173
182
  }
174
183
  setStyle(e) {
175
- var t, h, l, f;
176
- if (this.paramsStyle = g(g({}, this.paramsStyle), e), m(e.lineColor)) {
177
- const d = new v.Color(e.lineColor);
184
+ var t, r, h, f;
185
+ if (this.paramsStyle = p(p({}, this.paramsStyle), e), m(e.lineColor)) {
186
+ const d = new u.Color(e.lineColor);
178
187
  this.line1.material.three_color = d, this.line2.material.three_color = d;
179
188
  }
180
189
  m(e.lineWidth) && (this.line1.material.linewidth = e.lineWidth, this.line2.material.linewidth = e.lineWidth), m(e.dashed) && (this.line1.material.dashed = e.dashed), m(e.lineOpacity) && (this.line1.material.opacity = e.lineOpacity, this.line2.material.opacity = e.lineOpacity), this.updateDomItems({ force: !0 });
181
- const i = (h = (t = e.occlusionVisibility) != null ? t : this.paramsStyle.occlusionVisibility) != null ? h : !0, s = (f = (l = e.occlusionMode) != null ? l : this.paramsStyle.occlusionMode) != null ? f : "translucence";
190
+ const i = (r = (t = e.occlusionVisibility) != null ? t : this.paramsStyle.occlusionVisibility) != null ? r : !0, s = (f = (h = e.occlusionMode) != null ? h : this.paramsStyle.occlusionMode) != null ? f : "translucence";
182
191
  i ? this.dashed ? (this.remove(this.line2), this.line1.material.dashed = !0, this.line1.material.depthTest = !1) : s === "depthTest" ? (this.remove(this.line2), this.line1.material.dashed = !1, this.line1.material.depthTest = !1) : s === "translucence" && (this.line1.material.depthTest = !0, this.line2.material.depthTest = !1, this.line1.material.dashed = !0, this.line2.material.dashed = !0, this.addIfNotExists(this.line2)) : (this.remove(this.line2), this.line1.material.depthTest = !0, this.line1.material.dashed = this.paramsStyle.dashed), this.doms.forEach((d) => d.intersectCheck = !i), this.needsRender = !0;
183
192
  }
184
193
  highlight(e) {
185
194
  var i, s;
186
195
  if (this.highlighted = !0, e != null && e.color) {
187
- const t = new v.Color(e.color);
196
+ const t = new u.Color(e.color);
188
197
  this.colorBeforeHighlight = (i = this.colorBeforeHighlight) != null ? i : this.line1.material.three_color, this.line1.material.three_color = t, this.line2.material.three_color = t;
189
198
  } else {
190
199
  this.opacityBeforeHighlight = (s = this.opacityBeforeHighlight) != null ? s : this.line1.material.opacity;
@@ -204,56 +213,56 @@ class We extends te {
204
213
  return i();
205
214
  if (!this.five)
206
215
  return console.error("Five not found");
207
- const s = this.points.map((t, h) => h !== 0 ? [this.points[h - 1], t] : null).filter(m).map((t) => V(this, t));
208
- s.forEach(([t, h], l) => {
209
- var y;
210
- const f = U(t, h);
211
- this.doms[l] = (y = this.doms[l]) != null ? y : (() => {
212
- var S;
213
- const r = new ie(this.five), u = (S = this.paramsStyle.occlusionVisibility) != null ? S : !0;
214
- return r.intersectCheck = !u, r.simulate3D = !0, r;
215
- })(), this.doms[l].setPosition(f, [t, h]);
216
- const d = (r, u) => {
217
- var _, D, b;
218
- const S = (_ = u == null ? void 0 : u.force) != null ? _ : !1;
219
- if (!(this.doms[l].__text === r && !S))
220
- if (this.doms[l].__text = r, r instanceof HTMLElement)
221
- this.doms[l].container.innerHTML = "", this.doms[l].container.appendChild(r);
222
- else if (r) {
223
- const w = (() => {
216
+ const s = this.points.map((t, r) => r !== 0 ? [this.points[r - 1], t] : null).filter(m).map((t) => U(this, t));
217
+ s.forEach(([t, r], h) => {
218
+ var H;
219
+ const f = B(t, r);
220
+ this.doms[h] = (H = this.doms[h]) != null ? H : (() => {
221
+ var v;
222
+ const l = new ie(this.five), g = (v = this.paramsStyle.occlusionVisibility) != null ? v : !0;
223
+ return l.intersectCheck = !g, l.simulate3D = !0, l;
224
+ })(), this.doms[h].setPosition(f, [t, r]);
225
+ const d = (l, g) => {
226
+ var _, I, D;
227
+ const v = (_ = g == null ? void 0 : g.force) != null ? _ : !1;
228
+ if (!(this.doms[h].__text === l && !v))
229
+ if (this.doms[h].__text = l, l instanceof HTMLElement)
230
+ this.doms[h].container.innerHTML = "", this.doms[h].container.appendChild(l);
231
+ else if (l) {
232
+ const R = (() => {
224
233
  if (!this.five || !this.five.camera)
225
234
  return 0;
226
- const p = this.five.getElement();
227
- if (!p)
235
+ const y = this.five.getElement();
236
+ if (!y)
228
237
  return 0;
229
- const c = p.clientWidth, M = p.clientHeight, C = c / 2, I = M / 2, O = t.clone().project(this.five.camera), W = h.clone().project(this.five.camera), P = {
238
+ const c = y.clientWidth, S = y.clientHeight, C = c / 2, b = S / 2, O = t.clone().project(this.five.camera), F = r.clone().project(this.five.camera), w = {
230
239
  x: O.x * C,
231
- y: O.y * I
232
- }, R = {
233
- x: W.x * C,
234
- y: W.y * I
240
+ y: O.y * b
241
+ }, W = {
242
+ x: F.x * C,
243
+ y: F.y * b
235
244
  };
236
- return Math.sqrt(Math.pow(R.x - P.x, 2) + Math.pow(R.y - P.y, 2));
237
- })(), A = (() => !this.five || !this.five.camera ? 20 : U(t, h).distanceTo(this.five.camera.position))(), j = ((b = (D = this.five) == null ? void 0 : D.camera) == null ? void 0 : b.fov) || 60, z = 2 * Math.tan(0.5 * j / 180 * Math.PI), k = `--distance-scale: ${Math.max(Math.min(1 - z * A / 40, 1), 0)};`, G = (p) => {
245
+ return Math.sqrt(Math.pow(W.x - w.x, 2) + Math.pow(W.y - w.y, 2));
246
+ })(), A = (() => !this.five || !this.five.camera ? 20 : B(t, r).distanceTo(this.five.camera.position))(), j = ((D = (I = this.five) == null ? void 0 : I.camera) == null ? void 0 : D.fov) || 60, z = 2 * Math.tan(0.5 * j / 180 * Math.PI), k = `--distance-scale: ${Math.max(Math.min(1 - z * A / 40, 1), 0)};`, G = (y) => {
238
247
  const c = document.createElement("div");
239
- c.classList.add("LineLengthTag"), c.style.visibility = "hidden", c.style.position = "absolute", c.style.padding = "2px 8px", c.style.fontFamily = "Arial-BoldMT", c.style.fontSize = "14px", c.innerText = p, document.body.appendChild(c);
240
- const M = c.offsetWidth;
241
- return document.body.removeChild(c), M;
248
+ c.classList.add("LineLengthTag"), c.style.visibility = "hidden", c.style.position = "absolute", c.style.padding = "2px 8px", c.style.fontFamily = "Arial-BoldMT", c.style.fontSize = "14px", c.innerText = y, document.body.appendChild(c);
249
+ const S = c.offsetWidth;
250
+ return document.body.removeChild(c), S;
242
251
  };
243
252
  let x = 0;
244
- const N = G(r);
245
- w > 0 && N > w && (x = -20), this.doms[l].container.innerHTML = se(r, {
253
+ const N = G(l);
254
+ R > 0 && N > R && (x = -20), this.doms[h].container.innerHTML = se(l, {
246
255
  style: `${k} ${this.paramsStyle.cssStyle || ""}`,
247
256
  offsetY: x
248
257
  });
249
258
  } else
250
- this.doms[l].container.innerHTML = "";
259
+ this.doms[h].container.innerHTML = "";
251
260
  };
252
261
  if (this.paramsStyle.tip)
253
262
  d(this.paramsStyle.tip, e);
254
263
  else {
255
- const r = le(t.distanceTo(h), this.paramsStyle.lengthUnit, this.paramsStyle.precision);
256
- d(r || null, e);
264
+ const l = re(t.distanceTo(r), this.paramsStyle.lengthUnit, this.paramsStyle.precision);
265
+ d(l || null, e);
257
266
  }
258
267
  }), this.doms.length > s.length && (this.doms.slice(s.length).forEach((t) => t.destroy()), this.doms.length = s.length);
259
268
  }