@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,27 +1,99 @@
1
1
  import { PanoVideoPluginController as r } from "./Controller.js";
2
- import { typings as j } from "./typings/index.js";
2
+ import { typings as Qo } from "./typings/index.js";
3
3
  import "./VideoMeshController.js";
4
4
  import "./utils/shader.js";
5
5
  import "three";
6
6
  import "hammerjs";
7
7
  import "three/examples/jsm/renderers/CSS3DRenderer";
8
8
  import "@realsee/five/line";
9
- import "../shared-utils/three/THREESphere.js";
10
- import "animejs";
11
- import "../shared-utils/animationFrame/index.js";
12
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
13
- import "./utils/index.js";
9
+ import "../Sculpt/utils/Modules/Global.js";
10
+ import "../Sculpt/utils/Modules/Cursor.js";
11
+ import "../Object3DHelperPlugin/Controller.js";
14
12
  import "../base/BasePlugin.js";
15
13
  import "../shared-utils/Subscribe.js";
14
+ import "../shared-utils/three/THREESphere.js";
15
+ import "animejs";
16
16
  import "../shared-utils/Utils/FiveUtil.js";
17
17
  import "../shared-utils/Utils/BaseUtil.js";
18
18
  import "../shared-utils/Utils/WorkUtil.js";
19
19
  import "../shared-utils/five/transformPosition.js";
20
20
  import "../shared-utils/five/getFiveModel.js";
21
21
  import "../shared-utils/url/absoluteUrl.js";
22
- const T = (o) => new r(o);
22
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
23
+ import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
24
+ import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
25
+ import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
26
+ import "../shared-utils/three/IObject3D.js";
27
+ import "../shared-utils/three/boundingBox.js";
28
+ import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
29
+ import "../shared-utils/Object3DHelper/utils/direction.js";
30
+ import "../shared-utils/Object3DHelper/Constants/color.js";
31
+ import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
32
+ import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
33
+ import "../shared-utils/positionToVector3.js";
34
+ import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
35
+ import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
36
+ import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
37
+ import "../CSS3DRenderPlugin/utils/even.js";
38
+ import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
39
+ import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
40
+ import "../shared-utils/three/centerPoint.js";
41
+ import "../shared-utils/three/getObjectVisible.js";
42
+ import "../shared-utils/isNil.js";
43
+ import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
44
+ import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
45
+ import "../shared-utils/util.js";
46
+ import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
47
+ import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
48
+ import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
49
+ import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
50
+ import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
51
+ import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
52
+ import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
53
+ import "../shared-utils/Object3DHelper/Controller/MoveController.js";
54
+ import "../shared-utils/Object3DHelper/Base/BaseController.js";
55
+ import "../shared-utils/threex/domevents/index.js";
56
+ import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
57
+ import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
58
+ import "../Sculpt/utils/three/rayOnLine.js";
59
+ import "../Object3DHelperPlugin/FiveControllerWrapper.js";
60
+ import "../shared-utils/Object3DHelper/index.js";
61
+ import "../shared-utils/Object3DHelper/Controller/RotateController.js";
62
+ import "../shared-utils/math/rad2Deg.js";
63
+ import "../shared-utils/math/deg2Rad.js";
64
+ import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
65
+ import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
66
+ import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
67
+ import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
68
+ import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
69
+ import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
70
+ import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
71
+ import "../shared-utils/five/fiveModelLoad.js";
72
+ import "../shared-utils/five/FiveDomEvents.js";
73
+ import "../shared-utils/five/calculateThreeMouse.js";
74
+ import "../shared-utils/three/THREERaycaster.js";
75
+ import "../shared-utils/three/PointSelector/index.js";
76
+ import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
77
+ import "../shared-utils/three/Magnifier.js";
78
+ import "../shared-utils/three/PointSelector/utils/PointHelper.js";
79
+ import "../shared-utils/three/Assets/index.js";
80
+ import "../shared-utils/three/PointSelector/utils/html.js";
81
+ import "../shared-utils/five/initialCSS3DRender.js";
82
+ import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
83
+ import "../Sculpt/Meshes/Line.js";
84
+ import "../Sculpt/typings/style.js";
85
+ import "../shared-utils/five/FiveLine.js";
86
+ import "../shared-utils/tag.js";
87
+ import "../shared-utils/five/vector3ToScreen.js";
88
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
89
+ import "../shared-utils/isTouchDevice.js";
90
+ import "../shared-utils/five/getPosition.js";
91
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
92
+ import "../shared-utils/animationFrame/index.js";
93
+ import "./utils/index.js";
94
+ const Mo = (o) => new r(o);
23
95
  export {
24
- T as PanoVideoPlugin,
25
- j as PanoVideoPluginType,
26
- T as default
96
+ Mo as PanoVideoPlugin,
97
+ Qo as PanoVideoPluginType,
98
+ Mo as default
27
99
  };
@@ -1,30 +1,30 @@
1
1
  var j = Object.defineProperty;
2
2
  var v = Object.getOwnPropertySymbols;
3
3
  var P = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
4
- var A = (d, n, e) => n in d ? j(d, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[n] = e, l = (d, n) => {
5
- for (var e in n || (n = {}))
6
- P.call(n, e) && A(d, e, n[e]);
4
+ var A = (m, a, t) => a in m ? j(m, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[a] = t, u = (m, a) => {
5
+ for (var t in a || (a = {}))
6
+ P.call(a, t) && A(m, t, a[t]);
7
7
  if (v)
8
- for (var e of v(n))
9
- _.call(n, e) && A(d, e, n[e]);
10
- return d;
8
+ for (var t of v(a))
9
+ _.call(a, t) && A(m, t, a[t]);
10
+ return m;
11
11
  };
12
- var u = (d, n, e) => (A(d, typeof n != "symbol" ? n + "" : n, e), e);
13
- var p = (d, n, e) => new Promise((t, i) => {
14
- var s = (a) => {
12
+ var d = (m, a, t) => (A(m, typeof a != "symbol" ? a + "" : a, t), t);
13
+ var c = (m, a, t) => new Promise((e, i) => {
14
+ var s = (o) => {
15
15
  try {
16
- h(e.next(a));
17
- } catch (c) {
18
- i(c);
16
+ p(t.next(o));
17
+ } catch (h) {
18
+ i(h);
19
19
  }
20
- }, r = (a) => {
20
+ }, r = (o) => {
21
21
  try {
22
- h(e.throw(a));
23
- } catch (c) {
24
- i(c);
22
+ p(t.throw(o));
23
+ } catch (h) {
24
+ i(h);
25
25
  }
26
- }, h = (a) => a.done ? t(a.value) : Promise.resolve(a.value).then(s, r);
27
- h((e = e.apply(d, n)).next());
26
+ }, p = (o) => o.done ? e(o.value) : Promise.resolve(o.value).then(s, r);
27
+ p((t = t.apply(m, a)).next());
28
28
  });
29
29
  import * as F from "three";
30
30
  import { Controller as S } from "../base/BasePluginWithData.js";
@@ -38,15 +38,86 @@ import "../shared-utils/Subscribe.js";
38
38
  import "hammerjs";
39
39
  import "three/examples/jsm/renderers/CSS3DRenderer";
40
40
  import "@realsee/five/line";
41
+ import "../Sculpt/utils/Modules/Global.js";
42
+ import "../Sculpt/utils/Modules/Cursor.js";
43
+ import "../Object3DHelperPlugin/Controller.js";
41
44
  import "../shared-utils/three/THREESphere.js";
45
+ import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
46
+ import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
47
+ import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
48
+ import "../shared-utils/three/IObject3D.js";
49
+ import "../shared-utils/three/boundingBox.js";
50
+ import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
51
+ import "../shared-utils/Object3DHelper/utils/direction.js";
52
+ import "../shared-utils/Object3DHelper/Constants/color.js";
53
+ import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
54
+ import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
55
+ import "../shared-utils/positionToVector3.js";
56
+ import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
57
+ import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
58
+ import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
59
+ import "../CSS3DRenderPlugin/utils/even.js";
60
+ import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
61
+ import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
62
+ import "../shared-utils/three/centerPoint.js";
63
+ import "../shared-utils/three/getObjectVisible.js";
42
64
  import "animejs";
65
+ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
43
66
  import "../shared-utils/Utils/FiveUtil.js";
44
67
  import "../shared-utils/Utils/BaseUtil.js";
45
68
  import "../shared-utils/Utils/WorkUtil.js";
46
69
  import "../shared-utils/five/transformPosition.js";
47
70
  import "../shared-utils/five/getFiveModel.js";
48
71
  import "../shared-utils/url/absoluteUrl.js";
49
- import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
72
+ import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
73
+ import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
74
+ import "../shared-utils/util.js";
75
+ import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
76
+ import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
77
+ import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
78
+ import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
79
+ import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
80
+ import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
81
+ import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
82
+ import "../shared-utils/Object3DHelper/Controller/MoveController.js";
83
+ import "../shared-utils/Object3DHelper/Base/BaseController.js";
84
+ import "../shared-utils/threex/domevents/index.js";
85
+ import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
86
+ import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
87
+ import "../Sculpt/utils/three/rayOnLine.js";
88
+ import "../Object3DHelperPlugin/FiveControllerWrapper.js";
89
+ import "../shared-utils/Object3DHelper/index.js";
90
+ import "../shared-utils/Object3DHelper/Controller/RotateController.js";
91
+ import "../shared-utils/math/rad2Deg.js";
92
+ import "../shared-utils/math/deg2Rad.js";
93
+ import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
94
+ import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
95
+ import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
96
+ import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
97
+ import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
98
+ import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
99
+ import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
100
+ import "../shared-utils/five/fiveModelLoad.js";
101
+ import "../shared-utils/five/FiveDomEvents.js";
102
+ import "../shared-utils/five/calculateThreeMouse.js";
103
+ import "../shared-utils/three/THREERaycaster.js";
104
+ import "../shared-utils/three/PointSelector/index.js";
105
+ import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
106
+ import "../shared-utils/three/Magnifier.js";
107
+ import "../shared-utils/three/PointSelector/utils/PointHelper.js";
108
+ import "../shared-utils/three/Assets/index.js";
109
+ import "../shared-utils/three/PointSelector/utils/html.js";
110
+ import "../shared-utils/five/initialCSS3DRender.js";
111
+ import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
112
+ import "../Sculpt/Meshes/Line.js";
113
+ import "../Sculpt/typings/style.js";
114
+ import "../shared-utils/five/FiveLine.js";
115
+ import "../shared-utils/tag.js";
116
+ import "../shared-utils/five/vector3ToScreen.js";
117
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
118
+ import "../shared-utils/isTouchDevice.js";
119
+ import "../shared-utils/five/getPosition.js";
120
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
50
121
  import "../shared-utils/isTruelyObject.js";
51
122
  import "../shared-utils/animationFrame/index.js";
52
123
  import "./utils/Objects/Pipe.js";
@@ -55,11 +126,11 @@ import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
55
126
  import "../shared-utils/three/Extras/Core/Interpolations.js";
56
127
  import "../shared-utils/three/Extras/Core/Interpolations2.js";
57
128
  const g = { flowSpeed: 0.6, rotateSpeed: 0 };
58
- class ne extends S {
59
- constructor(e) {
60
- super(e);
129
+ class Pe extends S {
130
+ constructor(t) {
131
+ super(t);
61
132
  // ==================== public properties ====================
62
- u(this, "data");
133
+ d(this, "data");
63
134
  /** 插件状态
64
135
  * @property `visible` `<boolean>` 是否可见
65
136
  * @property `enabled` `<boolean>` 是否启用
@@ -68,29 +139,29 @@ class ne extends S {
68
139
  * @property `speed.flowSpeed` `<number>` 横向流动速度,默认是 0.6 m/s
69
140
  * @property `speed.rotateSpeed` `<number>` 纵向旋转速度:默认是 0 deg/s
70
141
  */
71
- u(this, "state");
142
+ d(this, "state");
72
143
  /** 当前插件所有新增 THREE 相关副作用都在 group 下 */
73
- u(this, "group");
144
+ d(this, "group");
74
145
  /** 用于展示水流的水管 */
75
- u(this, "pipeObjects", []);
146
+ d(this, "pipeObjects", []);
76
147
  // ==================== private properties ====================
77
148
  /** 水管贴图缓存 */
78
- u(this, "texturePromiseCache", /* @__PURE__ */ new Map());
149
+ d(this, "texturePromiseCache", /* @__PURE__ */ new Map());
79
150
  /** 销毁插件,移除所有副作用,销毁后将不响应任何 API */
80
- u(this, "dispose", () => {
81
- this.disable(), this.five.scene.remove(this.group), this.texturePromiseCache.forEach((e) => e.then((t) => t.dispose())), this.texturePromiseCache.clear();
151
+ d(this, "dispose", () => {
152
+ this.disable(), this.five.scene.remove(this.group), this.texturePromiseCache.forEach((t) => t.then((e) => e.dispose())), this.texturePromiseCache.clear();
82
153
  });
83
- u(this, "onWantsFiveTapGesture", (...e) => {
84
- const [t] = e, i = t.intersectObjects(this.pipeObjects, !1);
154
+ d(this, "onWantsFiveTapGesture", (...t) => {
155
+ const [e] = t, i = e.intersectObjects(this.pipeObjects, !1);
85
156
  if (i.length === 0 || !this.data)
86
157
  return;
87
- const h = i[0].object.customID, a = this.data.pipes.find(({ id: o }) => o === h), c = this.data.pipelines.find((o) => a && o.pipes.includes(a));
88
- if (!(!a || !c))
158
+ const p = i[0].object.customID, o = this.data.pipes.find(({ id: n }) => n === p), h = this.data.pipelines.find((n) => o && n.pipes.includes(o));
159
+ if (!(!o || !h))
89
160
  return this.hooks.emit("tap", {
90
161
  intersectObjects: i,
91
- pipe: a,
92
- pipeline: c,
93
- wantsFiveTapGestureParams: e
162
+ pipe: o,
163
+ pipeline: h,
164
+ wantsFiveTapGestureParams: t
94
165
  }), !1;
95
166
  });
96
167
  this.state = {
@@ -99,7 +170,7 @@ class ne extends S {
99
170
  enabled: !0,
100
171
  isFlowing: !1,
101
172
  speed: g
102
- }, this.five = e, this.group = new F.Group(), this.group.name = "water-pipe-group", this.five.scene.add(this.group), this.five.once("dispose", this.dispose), this.five.on("wantsTapGesture", this.onWantsFiveTapGesture);
173
+ }, this.five = t, this.group = new F.Group(), this.group.name = "water-pipe-group", this.five.scene.add(this.group), this.five.once("dispose", this.dispose), this.five.on("wantsTapGesture", this.onWantsFiveTapGesture);
103
174
  }
104
175
  /** 加载管道数据,重复调用会使用新数据覆盖旧数据
105
176
  * @param `data` `<Plugin.ServerData>` Open API 接口返回的数据。
@@ -111,20 +182,20 @@ class ne extends S {
111
182
  * 函数返回的 string 就是当前 water 对应的贴图地址。
112
183
  */
113
184
  // eslint-disable-next-line max-params
114
- load(e, t, i, s) {
115
- return p(this, null, function* () {
185
+ load(t, e, i, s) {
186
+ return c(this, null, function* () {
116
187
  const r = this.data;
117
- this.data = yield this.formatData(e, s), this.removeAllPipes(), this.hooks.emit("dataChange", this.data, r), this.pipeObjects = yield Promise.all(
118
- this.data.pipes.filter((h) => !!(h != null && h.texture)).map((b) => p(this, [b], function* ({ id: h, texture: a, path: c, radius: o }) {
119
- const m = yield this.loadPipeTexture(a), f = { id: h, path: c, textureURL: a, texture: m, geometryConfig: { radius: o } };
188
+ this.data = yield this.formatData(t, s), this.removeAllPipes(), this.hooks.emit("dataChange", this.data, r), this.pipeObjects = yield Promise.all(
189
+ this.data.pipes.filter((p) => !!(p != null && p.texture)).map((b) => c(this, [b], function* ({ id: p, texture: o, path: h, radius: n }) {
190
+ const l = yield this.loadPipeTexture(o), f = { id: p, path: h, textureURL: o, texture: l, geometryConfig: { radius: n } };
120
191
  return new D(f);
121
192
  }))
122
- ), this.data.pipelines.forEach((h) => {
123
- h.pipes.reduce((a, c) => {
124
- const o = this.findPipeObjectWithID(c.id);
125
- return o == null || o.setInitialDisplacement(a), a + ((o == null ? void 0 : o.pathLength) || 0);
193
+ ), this.data.pipelines.forEach((p) => {
194
+ p.pipes.reduce((o, h) => {
195
+ const n = this.findPipeObjectWithID(h.id);
196
+ return n == null || n.setInitialDisplacement(o), o + ((n == null ? void 0 : n.pathLength) || 0);
126
197
  }, 0);
127
- }), this.hooks.emit("dataLoaded", this.data), this.state.visible === !1 && this.pipeObjects.forEach((h) => h.setOpacity(0)), this.state.enabled && (this.group.add(...this.pipeObjects), this.five.needsRender = !0), t && this.setState(t, { userAction: i });
198
+ }), this.hooks.emit("dataLoaded", this.data), this.state.visible === !1 && this.pipeObjects.forEach((p) => p.setOpacity(0)), this.state.enabled && (this.group.add(...this.pipeObjects), this.five.needsRender = !0), e && this.setState(e, { userAction: i });
128
199
  });
129
200
  }
130
201
  /** 更改插件 State
@@ -132,18 +203,18 @@ class ne extends S {
132
203
  * @param `options` `<Option> | <undefined>`
133
204
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
134
205
  */
135
- setState(e, t = {}) {
206
+ setState(t, e = {}) {
136
207
  const i = this.state;
137
- if (O(e, i, { deep: !0 }))
208
+ if (O(t, i, { deep: !0 }))
138
209
  return;
139
- const s = t.userAction !== void 0 ? t.userAction : !0;
140
- if (this.updateState(e, s), e.enabled !== void 0 && i.enabled !== e.enabled && (e.enabled ? this._enable({ userAction: s }) : this._disable({ userAction: s })), e.visible !== void 0 && i.visible !== e.visible) {
210
+ const s = e.userAction !== void 0 ? e.userAction : !0;
211
+ if (this.updateState(t, s), t.enabled !== void 0 && i.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: s }) : this._disable({ userAction: s })), t.visible !== void 0 && i.visible !== t.visible) {
141
212
  const r = { userAction: s, anime: { duration: 500 } };
142
- e.visible ? this._show(r) : this._hide(r);
213
+ t.visible ? this._show(r) : this._hide(r);
143
214
  }
144
- if (e.isFlowing !== void 0 && i.isFlowing !== e.isFlowing && (e.isFlowing ? this._flow() : this._stopFlow()), e.speed !== void 0 && !O(i.speed, this.state.speed, { deep: !0 }) && this._setSpeed(e.speed), e.target !== void 0 && !O(i.target, this.state.target, { deep: !0 })) {
215
+ if (t.isFlowing !== void 0 && i.isFlowing !== t.isFlowing && (t.isFlowing ? this._flow() : this._stopFlow()), t.speed !== void 0 && !O(i.speed, this.state.speed, { deep: !0 }) && this._setSpeed(t.speed), t.target !== void 0 && !O(i.target, this.state.target, { deep: !0 })) {
145
216
  const r = {
146
- target: e.target,
217
+ target: t.target,
147
218
  showAnime: { duration: 500 },
148
219
  hideAnime: { duration: 500 }
149
220
  };
@@ -154,23 +225,23 @@ class ne extends S {
154
225
  * @param `options` `<Option> | <undefined>`
155
226
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
156
227
  */
157
- enable(e = {}) {
228
+ enable(t = {}) {
158
229
  var i;
159
230
  if (this.state.enabled)
160
231
  return;
161
- const t = (i = e.userAction) != null ? i : !0;
162
- this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
232
+ const e = (i = t.userAction) != null ? i : !0;
233
+ this.updateState({ enabled: !0 }, e), this._enable({ userAction: e });
163
234
  }
164
235
  /** 禁用插件
165
236
  * @param `options` `<Option> | <undefined>`
166
237
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
167
238
  */
168
- disable(e = {}) {
239
+ disable(t = {}) {
169
240
  var i;
170
241
  if (this.state.enabled === !1)
171
242
  return;
172
- const t = (i = e.userAction) != null ? i : !0;
173
- this.updateState({ enabled: !1, isFlowing: !1 }, t), this._disable({ userAction: t });
243
+ const e = (i = t.userAction) != null ? i : !0;
244
+ this.updateState({ enabled: !1, isFlowing: !1 }, e), this._disable({ userAction: e });
174
245
  }
175
246
  /** 展示管道模型,注意如果通过 `switchPipelines` 更改过 `visibleIDs`,则只会展示这一部分模型。
176
247
  * @param `options` `<Partial<ShowHideOptions>> | <undefined>`
@@ -179,14 +250,14 @@ class ne extends S {
179
250
  * @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
180
251
  */
181
252
  show() {
182
- return p(this, arguments, function* (e = {}) {
253
+ return c(this, arguments, function* (t = {}) {
183
254
  if (this.state.visible)
184
255
  return;
185
- const t = l({
256
+ const e = u({
186
257
  userAction: !0,
187
258
  anime: { duration: 500 }
188
- }, e);
189
- this.updateState({ visible: !0 }, t.userAction), yield this._show(t);
259
+ }, t);
260
+ this.updateState({ visible: !0 }, e.userAction), yield this._show(e);
190
261
  });
191
262
  }
192
263
  /** 插件内容整体隐藏
@@ -196,14 +267,14 @@ class ne extends S {
196
267
  * @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
197
268
  */
198
269
  hide() {
199
- return p(this, arguments, function* (e = {}) {
270
+ return c(this, arguments, function* (t = {}) {
200
271
  if (this.state.visible === !1)
201
272
  return;
202
- const t = l({
273
+ const e = u({
203
274
  userAction: !0,
204
275
  anime: { duration: 500 }
205
- }, e);
206
- this.updateState({ visible: !1 }, t.userAction), yield this._hide(t);
276
+ }, t);
277
+ this.updateState({ visible: !1 }, e.userAction), yield this._hide(e);
207
278
  });
208
279
  }
209
280
  /** 切换管路
@@ -216,124 +287,124 @@ class ne extends S {
216
287
  * @param `options.anime` `<AnimeOptions> | <undefined>` 兜底的动画配置。
217
288
  * @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
218
289
  * */
219
- switchPipelines(e) {
220
- return p(this, null, function* () {
221
- var c, o, b, m, f, w;
290
+ switchPipelines(t) {
291
+ return c(this, null, function* () {
292
+ var h, n, b, l, f, w;
222
293
  if (!this.data)
223
294
  return;
224
- const t = (c = e == null ? void 0 : e.target) != null ? c : null, i = (o = e == null ? void 0 : e.userAction) != null ? o : !0;
225
- this.updateState({ target: t }, i);
226
- const s = { duration: 500 }, r = (m = (b = e == null ? void 0 : e.hideAnime) != null ? b : e == null ? void 0 : e.anime) != null ? m : s, h = (w = (f = e == null ? void 0 : e.showAnime) != null ? f : e == null ? void 0 : e.anime) != null ? w : s, a = {
227
- target: t,
228
- showAnime: h,
295
+ const e = (h = t == null ? void 0 : t.target) != null ? h : null, i = (n = t == null ? void 0 : t.userAction) != null ? n : !0;
296
+ this.updateState({ target: e }, i);
297
+ const s = { duration: 500 }, r = (l = (b = t == null ? void 0 : t.hideAnime) != null ? b : t == null ? void 0 : t.anime) != null ? l : s, p = (w = (f = t == null ? void 0 : t.showAnime) != null ? f : t == null ? void 0 : t.anime) != null ? w : s, o = {
298
+ target: e,
299
+ showAnime: p,
229
300
  hideAnime: r
230
301
  };
231
- this._switchPipelines(a);
302
+ this._switchPipelines(o);
232
303
  });
233
304
  }
234
305
  /** 开始流动 */
235
- flow(e = {}) {
306
+ flow(t = {}) {
236
307
  var i;
237
308
  if (this.state.isFlowing)
238
309
  return;
239
- const t = (i = e.userAction) != null ? i : !0;
240
- this.updateState({ isFlowing: !0 }, t), this._flow();
310
+ const e = (i = t.userAction) != null ? i : !0;
311
+ this.updateState({ isFlowing: !0 }, e), this._flow();
241
312
  }
242
313
  /** 停止流动 */
243
- stopFlow(e = {}) {
314
+ stopFlow(t = {}) {
244
315
  var i;
245
316
  if (this.state.isFlowing === !1)
246
317
  return;
247
- const t = (i = e.userAction) != null ? i : !0;
248
- this.updateState({ isFlowing: !1 }, t), this._stopFlow();
318
+ const e = (i = t.userAction) != null ? i : !0;
319
+ this.updateState({ isFlowing: !1 }, e), this._stopFlow();
249
320
  }
250
321
  /** 更改水管流速
251
322
  * @param `options` `<SetSpeedOptions> | <undefined>`
252
323
  * @param `options.speed` `<Speed> | <undefined>` 参考 `state.speed` 的描述。
253
324
  * @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
254
325
  */
255
- setSpeed(e) {
326
+ setSpeed(t) {
256
327
  var s, r;
257
- const t = (s = e == null ? void 0 : e.speed) != null ? s : g, i = (r = e.userAction) != null ? r : !0;
258
- this.updateState({ speed: t }, i), this._setSpeed(t);
328
+ const e = (s = t == null ? void 0 : t.speed) != null ? s : g, i = (r = t.userAction) != null ? r : !0;
329
+ this.updateState({ speed: e }, i), this._setSpeed(e);
259
330
  }
260
- formatData(e, t) {
261
- return p(this, null, function* () {
262
- return y(e, t);
331
+ formatData(t, e) {
332
+ return c(this, null, function* () {
333
+ return y(t, e);
263
334
  });
264
335
  }
265
- _enable(e) {
266
- this.hooks.emit("enable", { userAction: e.userAction }), this.five.scene.add(this.group), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture);
336
+ _enable(t) {
337
+ this.hooks.emit("enable", { userAction: t.userAction }), this.five.scene.add(this.group), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture);
267
338
  }
268
- _disable(e) {
269
- this.hooks.emit("disable", { userAction: e.userAction }), this.disposeAnime(), this.five.scene.remove(this.group), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture);
339
+ _disable(t) {
340
+ this.hooks.emit("disable", { userAction: t.userAction }), this.disposeAnime(), this.five.scene.remove(this.group), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture);
270
341
  }
271
- _show(e) {
272
- return p(this, null, function* () {
342
+ _show(t) {
343
+ return c(this, null, function* () {
273
344
  var s;
274
- this.hooks.emit("show", { userAction: e.userAction });
275
- const t = (s = e == null ? void 0 : e.anime) != null ? s : { duration: 500 }, i = this.findPipeObjectWithTarget(this.state.target);
276
- yield Promise.all(i.map((r) => r == null ? void 0 : r.show(t))), this.five.needsRender = !0;
345
+ this.hooks.emit("show", { userAction: t.userAction });
346
+ const e = (s = t == null ? void 0 : t.anime) != null ? s : { duration: 500 }, i = this.findPipeObjectWithTarget(this.state.target);
347
+ yield Promise.all(i.map((r) => r == null ? void 0 : r.show(e))), this.five.needsRender = !0;
277
348
  });
278
349
  }
279
- _hide(e) {
280
- return p(this, null, function* () {
350
+ _hide(t) {
351
+ return c(this, null, function* () {
281
352
  var i;
282
- this.hooks.emit("hide", { userAction: e.userAction });
283
- const t = (i = e == null ? void 0 : e.anime) != null ? i : { duration: 500 };
284
- yield Promise.all(this.pipeObjects.map((s) => s.hide(t))), this.five.needsRender = !0;
353
+ this.hooks.emit("hide", { userAction: t.userAction });
354
+ const e = (i = t == null ? void 0 : t.anime) != null ? i : { duration: 500 };
355
+ yield Promise.all(this.pipeObjects.map((s) => s.hide(e))), this.five.needsRender = !0;
285
356
  });
286
357
  }
287
- _switchPipelines(e) {
288
- return p(this, null, function* () {
358
+ _switchPipelines(t) {
359
+ return c(this, null, function* () {
289
360
  if (!this.data)
290
361
  return;
291
- const t = this.findPipeObjectWithTarget(e.target), i = e.hideAnime;
362
+ const e = this.findPipeObjectWithTarget(t.target), i = t.hideAnime;
292
363
  yield Promise.all(this.pipeObjects.map((r) => r.hide(i)));
293
- const s = e.showAnime;
294
- yield Promise.all(t.map((r) => r.show(s)));
364
+ const s = t.showAnime;
365
+ yield Promise.all(e.map((r) => r.show(s)));
295
366
  });
296
367
  }
297
368
  _flow() {
298
- this.pipeObjects.forEach((e) => e.flow());
369
+ this.pipeObjects.forEach((t) => t.flow());
299
370
  }
300
371
  _stopFlow() {
301
- this.pipeObjects.forEach((e) => e.stopFlow());
372
+ this.pipeObjects.forEach((t) => t.stopFlow());
302
373
  }
303
- _setSpeed(e) {
304
- this.pipeObjects.forEach((t) => t.setSpeed(e));
374
+ _setSpeed(t) {
375
+ this.pipeObjects.forEach((e) => e.setSpeed(t));
305
376
  }
306
- updateState(e, t) {
377
+ updateState(t, e) {
307
378
  const i = this.state;
308
- this.state = l(l({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: t });
379
+ this.state = u(u({}, this.state), t), this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
309
380
  }
310
381
  /** 加载管道贴图,如果再加载中,复用之前的加载 Promise */
311
- loadPipeTexture(e) {
312
- return p(this, null, function* () {
313
- const t = this.texturePromiseCache.get(e);
314
- if (t)
315
- return t;
316
- const i = x(e);
317
- return this.texturePromiseCache.set(e, i), i;
382
+ loadPipeTexture(t) {
383
+ return c(this, null, function* () {
384
+ const e = this.texturePromiseCache.get(t);
385
+ if (e)
386
+ return e;
387
+ const i = x(t);
388
+ return this.texturePromiseCache.set(t, i), i;
318
389
  });
319
390
  }
320
391
  /** 销毁所有动画 */
321
392
  disposeAnime() {
322
- this.pipeObjects.forEach((e) => e.disposeAnime()), this.five.needsRender = !0;
393
+ this.pipeObjects.forEach((t) => t.disposeAnime()), this.five.needsRender = !0;
323
394
  }
324
395
  /** 移除所有管道模型 */
325
396
  removeAllPipes() {
326
- this.disposeAnime(), this.group.remove(...this.pipeObjects), this.pipeObjects.forEach((e) => e.dispose()), this.pipeObjects = [], this.five.needsRender = !0;
397
+ this.disposeAnime(), this.group.remove(...this.pipeObjects), this.pipeObjects.forEach((t) => t.dispose()), this.pipeObjects = [], this.five.needsRender = !0;
327
398
  }
328
399
  /** 根据 ID 查找管道模型 */
329
- findPipeObjectWithID(e) {
330
- return this.pipeObjects.find(({ customID: t }) => t === e);
400
+ findPipeObjectWithID(t) {
401
+ return this.pipeObjects.find(({ customID: e }) => e === t);
331
402
  }
332
403
  /** 根据 target 查找管道模型 */
333
- findPipeObjectWithTarget(e) {
334
- return e ? C({ data: this.data, target: e }).map(({ id: i }) => this.findPipeObjectWithID(i)).filter(T) : this.pipeObjects;
404
+ findPipeObjectWithTarget(t) {
405
+ return t ? C({ data: this.data, target: t }).map(({ id: i }) => this.findPipeObjectWithID(i)).filter(T) : this.pipeObjects;
335
406
  }
336
407
  }
337
408
  export {
338
- ne as Controller
409
+ Pe as Controller
339
410
  };