@realsee/dnalogel 3.45.0 → 3.46.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 (100) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/Sculpt/Meshes/Line.d.ts +6 -1
  3. package/dist/Sculpt/utils/removeAllTag.d.ts +2 -0
  4. package/dist/index.cjs.js +53 -53
  5. package/dist/index.js +29600 -29557
  6. package/dist/index.umd.js +49 -49
  7. package/dist/shared-utils/tag.d.ts +6 -3
  8. package/libs/AreaMakerPlugin/Controller.js +151 -78
  9. package/libs/AreaMakerPlugin/index.js +77 -4
  10. package/libs/AreaMakerPlugin/utils/Item.js +191 -111
  11. package/libs/CSS3DRenderPlugin/Controller.js +90 -29
  12. package/libs/CSS3DRenderPlugin/index.js +76 -15
  13. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +133 -58
  14. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +182 -116
  15. package/libs/CruisePlugin/BaseController.js +122 -49
  16. package/libs/CruisePlugin/Move.js +74 -21
  17. package/libs/CruisePlugin/Work.js +99 -46
  18. package/libs/CruisePlugin/index.js +80 -27
  19. package/libs/CurrentPanoImagePlugin/Controller.js +177 -104
  20. package/libs/CurrentPanoImagePlugin/index.js +77 -4
  21. package/libs/GuideLinePlugin/Controller.js +79 -26
  22. package/libs/GuideLinePlugin/GuideLineItem.js +83 -30
  23. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
  24. package/libs/GuideLinePlugin/GuideLineModeItem.js +82 -29
  25. package/libs/GuideLinePlugin/index.js +80 -27
  26. package/libs/ModelMakerPlugin/Controller.js +140 -82
  27. package/libs/ModelMakerPlugin/index.js +76 -18
  28. package/libs/ModelTVVideoPlugin/Plugin.js +118 -57
  29. package/libs/ModelTVVideoPlugin/index.js +69 -8
  30. package/libs/Object3DHelperPlugin/Controller.js +67 -43
  31. package/libs/Object3DHelperPlugin/index.js +36 -13
  32. package/libs/PanoCompassPlugin/Controller.js +98 -42
  33. package/libs/PanoCompassPlugin/index.js +72 -16
  34. package/libs/PanoDoorLabelPlugin/BaseController.js +99 -26
  35. package/libs/PanoDoorLabelPlugin/Controller.js +188 -115
  36. package/libs/PanoDoorLabelPlugin/index.js +77 -4
  37. package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -88
  38. package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -126
  39. package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -72
  40. package/libs/PanoMeasurePlugin/Controller/WatchController.js +168 -92
  41. package/libs/PanoMeasurePlugin/Controller/index.js +110 -64
  42. package/libs/PanoMeasurePlugin/Model/area.js +115 -38
  43. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +79 -0
  44. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -45
  45. package/libs/PanoMeasurePlugin/index.js +77 -31
  46. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +99 -20
  47. package/libs/PanoSpatialTagPlugin/Plugin.js +211 -150
  48. package/libs/PanoSpatialTagPlugin/index.js +67 -6
  49. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +149 -68
  50. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +296 -216
  51. package/libs/PanoTagPlugin/Components/Tag/index.js +258 -187
  52. package/libs/PanoTagPlugin/Components/TagContainer.js +158 -87
  53. package/libs/PanoTagPlugin/Components/TagItem.js +145 -74
  54. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +133 -62
  55. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +110 -39
  56. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +106 -35
  57. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +114 -43
  58. package/libs/PanoTagPlugin/controller/TagRender.js +133 -80
  59. package/libs/PanoTagPlugin/controller/TagUtil.js +137 -84
  60. package/libs/PanoTagPlugin/controller/index.js +114 -61
  61. package/libs/PanoTagPlugin/index.js +90 -37
  62. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +122 -41
  63. package/libs/PanoVideoPlugin/Controller.js +138 -65
  64. package/libs/PanoVideoPlugin/VideoMeshController.js +150 -69
  65. package/libs/PanoVideoPlugin/index.js +83 -10
  66. package/libs/PipelinePlugin/Controller.js +200 -128
  67. package/libs/PipelinePlugin/index.js +77 -5
  68. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +103 -22
  69. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +96 -15
  70. package/libs/PipelinePlugin/utils/Objects/Pipe.js +137 -56
  71. package/libs/Sculpt/Meshes/Box.js +6 -5
  72. package/libs/Sculpt/Meshes/Cylinder.js +7 -6
  73. package/libs/Sculpt/Meshes/Line.d.ts +6 -1
  74. package/libs/Sculpt/Meshes/Line.js +80 -57
  75. package/libs/Sculpt/Meshes/Point.js +6 -5
  76. package/libs/Sculpt/Meshes/Polyline.js +5 -4
  77. package/libs/Sculpt/Meshes/Rectangle.js +3 -2
  78. package/libs/Sculpt/Objects/Base/index.js +20 -17
  79. package/libs/Sculpt/Objects/Line/Editor.js +11 -10
  80. package/libs/Sculpt/utils/removeAllTag.d.ts +2 -0
  81. package/libs/Sculpt/utils/removeAllTag.js +10 -0
  82. package/libs/Sculpt/utils/three/ColoredMesh.js +14 -13
  83. package/libs/base/BasePlugin.js +14 -13
  84. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +129 -59
  85. package/libs/floorplan/MapviewFloorplanPlugin/index.js +76 -6
  86. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +130 -59
  87. package/libs/floorplan/ModelFloorplanPlugin/index.js +76 -5
  88. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +159 -86
  89. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +77 -4
  90. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +152 -81
  91. package/libs/floorplan/TopviewFloorplanPlugin/index.js +76 -5
  92. package/libs/floorplan/index.js +1 -0
  93. package/libs/index.js +193 -192
  94. package/libs/shared-utils/five/index.js +3 -2
  95. package/libs/shared-utils/five/lookObject.js +3 -2
  96. package/libs/shared-utils/logger.js +1 -1
  97. package/libs/shared-utils/tag.d.ts +6 -3
  98. package/libs/shared-utils/tag.js +38 -24
  99. package/libs/shared-utils/three/index.js +1 -0
  100. package/package.json +1 -1
@@ -1,27 +1,100 @@
1
1
  import { PanoVideoPluginController as r } from "./Controller.js";
2
- import { typings as j } from "./typings/index.js";
2
+ import { typings as Ro } 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 "../Sculpt/utils/removeAllTag.js";
89
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
90
+ import "../shared-utils/isTouchDevice.js";
91
+ import "../shared-utils/five/getPosition.js";
92
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
93
+ import "../shared-utils/animationFrame/index.js";
94
+ import "./utils/index.js";
95
+ const No = (o) => new r(o);
23
96
  export {
24
- T as PanoVideoPlugin,
25
- j as PanoVideoPluginType,
26
- T as default
97
+ No as PanoVideoPlugin,
98
+ Ro as PanoVideoPluginType,
99
+ No as default
27
100
  };
@@ -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,87 @@ 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 "../Sculpt/utils/removeAllTag.js";
118
+ import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
119
+ import "../shared-utils/isTouchDevice.js";
120
+ import "../shared-utils/five/getPosition.js";
121
+ import "../shared-utils/five/getRaycasterByNdcPosition.js";
50
122
  import "../shared-utils/isTruelyObject.js";
51
123
  import "../shared-utils/animationFrame/index.js";
52
124
  import "./utils/Objects/Pipe.js";
@@ -55,11 +127,11 @@ import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
55
127
  import "../shared-utils/three/Extras/Core/Interpolations.js";
56
128
  import "../shared-utils/three/Extras/Core/Interpolations2.js";
57
129
  const g = { flowSpeed: 0.6, rotateSpeed: 0 };
58
- class ne extends S {
59
- constructor(e) {
60
- super(e);
130
+ class _e extends S {
131
+ constructor(t) {
132
+ super(t);
61
133
  // ==================== public properties ====================
62
- u(this, "data");
134
+ d(this, "data");
63
135
  /** 插件状态
64
136
  * @property `visible` `<boolean>` 是否可见
65
137
  * @property `enabled` `<boolean>` 是否启用
@@ -68,29 +140,29 @@ class ne extends S {
68
140
  * @property `speed.flowSpeed` `<number>` 横向流动速度,默认是 0.6 m/s
69
141
  * @property `speed.rotateSpeed` `<number>` 纵向旋转速度:默认是 0 deg/s
70
142
  */
71
- u(this, "state");
143
+ d(this, "state");
72
144
  /** 当前插件所有新增 THREE 相关副作用都在 group 下 */
73
- u(this, "group");
145
+ d(this, "group");
74
146
  /** 用于展示水流的水管 */
75
- u(this, "pipeObjects", []);
147
+ d(this, "pipeObjects", []);
76
148
  // ==================== private properties ====================
77
149
  /** 水管贴图缓存 */
78
- u(this, "texturePromiseCache", /* @__PURE__ */ new Map());
150
+ d(this, "texturePromiseCache", /* @__PURE__ */ new Map());
79
151
  /** 销毁插件,移除所有副作用,销毁后将不响应任何 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();
152
+ d(this, "dispose", () => {
153
+ this.disable(), this.five.scene.remove(this.group), this.texturePromiseCache.forEach((t) => t.then((e) => e.dispose())), this.texturePromiseCache.clear();
82
154
  });
83
- u(this, "onWantsFiveTapGesture", (...e) => {
84
- const [t] = e, i = t.intersectObjects(this.pipeObjects, !1);
155
+ d(this, "onWantsFiveTapGesture", (...t) => {
156
+ const [e] = t, i = e.intersectObjects(this.pipeObjects, !1);
85
157
  if (i.length === 0 || !this.data)
86
158
  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))
159
+ 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));
160
+ if (!(!o || !h))
89
161
  return this.hooks.emit("tap", {
90
162
  intersectObjects: i,
91
- pipe: a,
92
- pipeline: c,
93
- wantsFiveTapGestureParams: e
163
+ pipe: o,
164
+ pipeline: h,
165
+ wantsFiveTapGestureParams: t
94
166
  }), !1;
95
167
  });
96
168
  this.state = {
@@ -99,7 +171,7 @@ class ne extends S {
99
171
  enabled: !0,
100
172
  isFlowing: !1,
101
173
  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);
174
+ }, 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
175
  }
104
176
  /** 加载管道数据,重复调用会使用新数据覆盖旧数据
105
177
  * @param `data` `<Plugin.ServerData>` Open API 接口返回的数据。
@@ -111,20 +183,20 @@ class ne extends S {
111
183
  * 函数返回的 string 就是当前 water 对应的贴图地址。
112
184
  */
113
185
  // eslint-disable-next-line max-params
114
- load(e, t, i, s) {
115
- return p(this, null, function* () {
186
+ load(t, e, i, s) {
187
+ return c(this, null, function* () {
116
188
  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 } };
189
+ this.data = yield this.formatData(t, s), this.removeAllPipes(), this.hooks.emit("dataChange", this.data, r), this.pipeObjects = yield Promise.all(
190
+ this.data.pipes.filter((p) => !!(p != null && p.texture)).map((b) => c(this, [b], function* ({ id: p, texture: o, path: h, radius: n }) {
191
+ const l = yield this.loadPipeTexture(o), f = { id: p, path: h, textureURL: o, texture: l, geometryConfig: { radius: n } };
120
192
  return new D(f);
121
193
  }))
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);
194
+ ), this.data.pipelines.forEach((p) => {
195
+ p.pipes.reduce((o, h) => {
196
+ const n = this.findPipeObjectWithID(h.id);
197
+ return n == null || n.setInitialDisplacement(o), o + ((n == null ? void 0 : n.pathLength) || 0);
126
198
  }, 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 });
199
+ }), 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
200
  });
129
201
  }
130
202
  /** 更改插件 State
@@ -132,18 +204,18 @@ class ne extends S {
132
204
  * @param `options` `<Option> | <undefined>`
133
205
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
134
206
  */
135
- setState(e, t = {}) {
207
+ setState(t, e = {}) {
136
208
  const i = this.state;
137
- if (O(e, i, { deep: !0 }))
209
+ if (O(t, i, { deep: !0 }))
138
210
  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) {
211
+ const s = e.userAction !== void 0 ? e.userAction : !0;
212
+ 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
213
  const r = { userAction: s, anime: { duration: 500 } };
142
- e.visible ? this._show(r) : this._hide(r);
214
+ t.visible ? this._show(r) : this._hide(r);
143
215
  }
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 })) {
216
+ 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
217
  const r = {
146
- target: e.target,
218
+ target: t.target,
147
219
  showAnime: { duration: 500 },
148
220
  hideAnime: { duration: 500 }
149
221
  };
@@ -154,23 +226,23 @@ class ne extends S {
154
226
  * @param `options` `<Option> | <undefined>`
155
227
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
156
228
  */
157
- enable(e = {}) {
229
+ enable(t = {}) {
158
230
  var i;
159
231
  if (this.state.enabled)
160
232
  return;
161
- const t = (i = e.userAction) != null ? i : !0;
162
- this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
233
+ const e = (i = t.userAction) != null ? i : !0;
234
+ this.updateState({ enabled: !0 }, e), this._enable({ userAction: e });
163
235
  }
164
236
  /** 禁用插件
165
237
  * @param `options` `<Option> | <undefined>`
166
238
  * @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
167
239
  */
168
- disable(e = {}) {
240
+ disable(t = {}) {
169
241
  var i;
170
242
  if (this.state.enabled === !1)
171
243
  return;
172
- const t = (i = e.userAction) != null ? i : !0;
173
- this.updateState({ enabled: !1, isFlowing: !1 }, t), this._disable({ userAction: t });
244
+ const e = (i = t.userAction) != null ? i : !0;
245
+ this.updateState({ enabled: !1, isFlowing: !1 }, e), this._disable({ userAction: e });
174
246
  }
175
247
  /** 展示管道模型,注意如果通过 `switchPipelines` 更改过 `visibleIDs`,则只会展示这一部分模型。
176
248
  * @param `options` `<Partial<ShowHideOptions>> | <undefined>`
@@ -179,14 +251,14 @@ class ne extends S {
179
251
  * @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
180
252
  */
181
253
  show() {
182
- return p(this, arguments, function* (e = {}) {
254
+ return c(this, arguments, function* (t = {}) {
183
255
  if (this.state.visible)
184
256
  return;
185
- const t = l({
257
+ const e = u({
186
258
  userAction: !0,
187
259
  anime: { duration: 500 }
188
- }, e);
189
- this.updateState({ visible: !0 }, t.userAction), yield this._show(t);
260
+ }, t);
261
+ this.updateState({ visible: !0 }, e.userAction), yield this._show(e);
190
262
  });
191
263
  }
192
264
  /** 插件内容整体隐藏
@@ -196,14 +268,14 @@ class ne extends S {
196
268
  * @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
197
269
  */
198
270
  hide() {
199
- return p(this, arguments, function* (e = {}) {
271
+ return c(this, arguments, function* (t = {}) {
200
272
  if (this.state.visible === !1)
201
273
  return;
202
- const t = l({
274
+ const e = u({
203
275
  userAction: !0,
204
276
  anime: { duration: 500 }
205
- }, e);
206
- this.updateState({ visible: !1 }, t.userAction), yield this._hide(t);
277
+ }, t);
278
+ this.updateState({ visible: !1 }, e.userAction), yield this._hide(e);
207
279
  });
208
280
  }
209
281
  /** 切换管路
@@ -216,124 +288,124 @@ class ne extends S {
216
288
  * @param `options.anime` `<AnimeOptions> | <undefined>` 兜底的动画配置。
217
289
  * @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
218
290
  * */
219
- switchPipelines(e) {
220
- return p(this, null, function* () {
221
- var c, o, b, m, f, w;
291
+ switchPipelines(t) {
292
+ return c(this, null, function* () {
293
+ var h, n, b, l, f, w;
222
294
  if (!this.data)
223
295
  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,
296
+ const e = (h = t == null ? void 0 : t.target) != null ? h : null, i = (n = t == null ? void 0 : t.userAction) != null ? n : !0;
297
+ this.updateState({ target: e }, i);
298
+ 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 = {
299
+ target: e,
300
+ showAnime: p,
229
301
  hideAnime: r
230
302
  };
231
- this._switchPipelines(a);
303
+ this._switchPipelines(o);
232
304
  });
233
305
  }
234
306
  /** 开始流动 */
235
- flow(e = {}) {
307
+ flow(t = {}) {
236
308
  var i;
237
309
  if (this.state.isFlowing)
238
310
  return;
239
- const t = (i = e.userAction) != null ? i : !0;
240
- this.updateState({ isFlowing: !0 }, t), this._flow();
311
+ const e = (i = t.userAction) != null ? i : !0;
312
+ this.updateState({ isFlowing: !0 }, e), this._flow();
241
313
  }
242
314
  /** 停止流动 */
243
- stopFlow(e = {}) {
315
+ stopFlow(t = {}) {
244
316
  var i;
245
317
  if (this.state.isFlowing === !1)
246
318
  return;
247
- const t = (i = e.userAction) != null ? i : !0;
248
- this.updateState({ isFlowing: !1 }, t), this._stopFlow();
319
+ const e = (i = t.userAction) != null ? i : !0;
320
+ this.updateState({ isFlowing: !1 }, e), this._stopFlow();
249
321
  }
250
322
  /** 更改水管流速
251
323
  * @param `options` `<SetSpeedOptions> | <undefined>`
252
324
  * @param `options.speed` `<Speed> | <undefined>` 参考 `state.speed` 的描述。
253
325
  * @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
254
326
  */
255
- setSpeed(e) {
327
+ setSpeed(t) {
256
328
  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);
329
+ const e = (s = t == null ? void 0 : t.speed) != null ? s : g, i = (r = t.userAction) != null ? r : !0;
330
+ this.updateState({ speed: e }, i), this._setSpeed(e);
259
331
  }
260
- formatData(e, t) {
261
- return p(this, null, function* () {
262
- return y(e, t);
332
+ formatData(t, e) {
333
+ return c(this, null, function* () {
334
+ return y(t, e);
263
335
  });
264
336
  }
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);
337
+ _enable(t) {
338
+ this.hooks.emit("enable", { userAction: t.userAction }), this.five.scene.add(this.group), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture);
267
339
  }
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);
340
+ _disable(t) {
341
+ 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
342
  }
271
- _show(e) {
272
- return p(this, null, function* () {
343
+ _show(t) {
344
+ return c(this, null, function* () {
273
345
  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;
346
+ this.hooks.emit("show", { userAction: t.userAction });
347
+ const e = (s = t == null ? void 0 : t.anime) != null ? s : { duration: 500 }, i = this.findPipeObjectWithTarget(this.state.target);
348
+ yield Promise.all(i.map((r) => r == null ? void 0 : r.show(e))), this.five.needsRender = !0;
277
349
  });
278
350
  }
279
- _hide(e) {
280
- return p(this, null, function* () {
351
+ _hide(t) {
352
+ return c(this, null, function* () {
281
353
  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;
354
+ this.hooks.emit("hide", { userAction: t.userAction });
355
+ const e = (i = t == null ? void 0 : t.anime) != null ? i : { duration: 500 };
356
+ yield Promise.all(this.pipeObjects.map((s) => s.hide(e))), this.five.needsRender = !0;
285
357
  });
286
358
  }
287
- _switchPipelines(e) {
288
- return p(this, null, function* () {
359
+ _switchPipelines(t) {
360
+ return c(this, null, function* () {
289
361
  if (!this.data)
290
362
  return;
291
- const t = this.findPipeObjectWithTarget(e.target), i = e.hideAnime;
363
+ const e = this.findPipeObjectWithTarget(t.target), i = t.hideAnime;
292
364
  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)));
365
+ const s = t.showAnime;
366
+ yield Promise.all(e.map((r) => r.show(s)));
295
367
  });
296
368
  }
297
369
  _flow() {
298
- this.pipeObjects.forEach((e) => e.flow());
370
+ this.pipeObjects.forEach((t) => t.flow());
299
371
  }
300
372
  _stopFlow() {
301
- this.pipeObjects.forEach((e) => e.stopFlow());
373
+ this.pipeObjects.forEach((t) => t.stopFlow());
302
374
  }
303
- _setSpeed(e) {
304
- this.pipeObjects.forEach((t) => t.setSpeed(e));
375
+ _setSpeed(t) {
376
+ this.pipeObjects.forEach((e) => e.setSpeed(t));
305
377
  }
306
- updateState(e, t) {
378
+ updateState(t, e) {
307
379
  const i = this.state;
308
- this.state = l(l({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: t });
380
+ this.state = u(u({}, this.state), t), this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
309
381
  }
310
382
  /** 加载管道贴图,如果再加载中,复用之前的加载 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;
383
+ loadPipeTexture(t) {
384
+ return c(this, null, function* () {
385
+ const e = this.texturePromiseCache.get(t);
386
+ if (e)
387
+ return e;
388
+ const i = x(t);
389
+ return this.texturePromiseCache.set(t, i), i;
318
390
  });
319
391
  }
320
392
  /** 销毁所有动画 */
321
393
  disposeAnime() {
322
- this.pipeObjects.forEach((e) => e.disposeAnime()), this.five.needsRender = !0;
394
+ this.pipeObjects.forEach((t) => t.disposeAnime()), this.five.needsRender = !0;
323
395
  }
324
396
  /** 移除所有管道模型 */
325
397
  removeAllPipes() {
326
- this.disposeAnime(), this.group.remove(...this.pipeObjects), this.pipeObjects.forEach((e) => e.dispose()), this.pipeObjects = [], this.five.needsRender = !0;
398
+ this.disposeAnime(), this.group.remove(...this.pipeObjects), this.pipeObjects.forEach((t) => t.dispose()), this.pipeObjects = [], this.five.needsRender = !0;
327
399
  }
328
400
  /** 根据 ID 查找管道模型 */
329
- findPipeObjectWithID(e) {
330
- return this.pipeObjects.find(({ customID: t }) => t === e);
401
+ findPipeObjectWithID(t) {
402
+ return this.pipeObjects.find(({ customID: e }) => e === t);
331
403
  }
332
404
  /** 根据 target 查找管道模型 */
333
- findPipeObjectWithTarget(e) {
334
- return e ? C({ data: this.data, target: e }).map(({ id: i }) => this.findPipeObjectWithID(i)).filter(T) : this.pipeObjects;
405
+ findPipeObjectWithTarget(t) {
406
+ return t ? C({ data: this.data, target: t }).map(({ id: i }) => this.findPipeObjectWithID(i)).filter(T) : this.pipeObjects;
335
407
  }
336
408
  }
337
409
  export {
338
- ne as Controller
410
+ _e as Controller
339
411
  };