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