@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
@@ -2,36 +2,36 @@ var $ = Object.defineProperty, _ = Object.defineProperties;
2
2
  var k = Object.getOwnPropertyDescriptors;
3
3
  var R = Object.getOwnPropertySymbols;
4
4
  var P = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
5
- var C = (n, e, t) => e in n ? $(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, g = (n, e) => {
5
+ var C = (s, e, t) => e in s ? $(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, g = (s, e) => {
6
6
  for (var t in e || (e = {}))
7
- P.call(e, t) && C(n, t, e[t]);
7
+ P.call(e, t) && C(s, t, e[t]);
8
8
  if (R)
9
9
  for (var t of R(e))
10
- L.call(e, t) && C(n, t, e[t]);
11
- return n;
12
- }, v = (n, e) => _(n, k(e));
13
- var i = (n, e, t) => (C(n, typeof e != "symbol" ? e + "" : e, t), t);
14
- var p = (n, e, t) => new Promise((s, r) => {
10
+ L.call(e, t) && C(s, t, e[t]);
11
+ return s;
12
+ }, v = (s, e) => _(s, k(e));
13
+ var n = (s, e, t) => (C(s, typeof e != "symbol" ? e + "" : e, t), t);
14
+ var f = (s, e, t) => new Promise((r, o) => {
15
15
  var d = (c) => {
16
16
  try {
17
- l(t.next(c));
18
- } catch (S) {
19
- r(S);
17
+ u(t.next(c));
18
+ } catch (a) {
19
+ o(a);
20
20
  }
21
- }, f = (c) => {
21
+ }, m = (c) => {
22
22
  try {
23
- l(t.throw(c));
24
- } catch (S) {
25
- r(S);
23
+ u(t.throw(c));
24
+ } catch (a) {
25
+ o(a);
26
26
  }
27
- }, l = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(d, f);
28
- l((t = t.apply(n, e)).next());
27
+ }, u = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(d, m);
28
+ u((t = t.apply(s, e)).next());
29
29
  });
30
30
  import { anyPositionToVector3 as q } from "../../../shared-utils/positionToVector3.js";
31
31
  import B from "./CSS3DRenderer.js";
32
32
  import { Subscribe as A } from "../../../shared-utils/Subscribe.js";
33
33
  import { CSS3DObjectPlus as W } from "./CSS3DObject.js";
34
- import { MinRatio as Ge } from "./CSS3DObject.js";
34
+ import { MinRatio as Nt } from "./CSS3DObject.js";
35
35
  import { CSS3DFrontScene as H, CSS3DBehindScene as T } from "./CSS3DScene.js";
36
36
  import { CSS3DFrontGroup as U, CSS3DBehindGroup as z } from "./CSS3DGroup.js";
37
37
  import { CSS3DObject as j } from "three/examples/jsm/renderers/CSS3DRenderer";
@@ -44,15 +44,80 @@ import "../../../shared-utils/three/centerPoint.js";
44
44
  import "../../../shared-utils/three/getObjectVisible.js";
45
45
  import "hammerjs";
46
46
  import "@realsee/five/line";
47
+ import "../../../Sculpt/utils/Modules/Global.js";
48
+ import "../../../Sculpt/utils/Modules/Cursor.js";
49
+ import "../../../Object3DHelperPlugin/Controller.js";
50
+ import "../../../base/BasePlugin.js";
47
51
  import "../../../shared-utils/three/THREESphere.js";
48
52
  import "animejs";
49
- import "../../../shared-utils/isNil.js";
53
+ import "../../../shared-utils/Utils/FiveUtil.js";
54
+ import "../../../shared-utils/Utils/BaseUtil.js";
55
+ import "../../../shared-utils/Utils/WorkUtil.js";
56
+ import "../../../shared-utils/five/transformPosition.js";
57
+ import "../../../shared-utils/five/getFiveModel.js";
58
+ import "../../../shared-utils/url/absoluteUrl.js";
50
59
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
51
- import "../getAllCSS3DObject.js";
60
+ import "../../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
61
+ import "../../../shared-utils/Object3DHelper/Base/BaseHelper.js";
62
+ import "../../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
63
+ import "../../../shared-utils/three/IObject3D.js";
64
+ import "../../../shared-utils/three/boundingBox.js";
65
+ import "../../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
66
+ import "../../../shared-utils/Object3DHelper/utils/direction.js";
67
+ import "../../../shared-utils/Object3DHelper/Constants/color.js";
68
+ import "../../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
69
+ import "./CSS3DRender.js";
70
+ import "../../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
71
+ import "../../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
72
+ import "../../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
73
+ import "../../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
74
+ import "../../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
75
+ import "../../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
76
+ import "../../../shared-utils/Object3DHelper/Controller/MoveController.js";
77
+ import "../../../shared-utils/Object3DHelper/Base/BaseController.js";
78
+ import "../../../shared-utils/threex/domevents/index.js";
79
+ import "../../../shared-utils/isNil.js";
52
80
  import "../../../shared-utils/util.js";
53
- const J = 3, G = "CSS3DRenderer", b = `${G}@${J}`, u = () => {
54
- console.error(`${b} is disposed`);
55
- }, o = {
81
+ import "../../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
82
+ import "../../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
83
+ import "../../../Sculpt/utils/three/rayOnLine.js";
84
+ import "../../../Object3DHelperPlugin/FiveControllerWrapper.js";
85
+ import "../../../shared-utils/Object3DHelper/index.js";
86
+ import "../../../shared-utils/Object3DHelper/Controller/RotateController.js";
87
+ import "../../../shared-utils/math/rad2Deg.js";
88
+ import "../../../shared-utils/math/deg2Rad.js";
89
+ import "../../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
90
+ import "../../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
91
+ import "../../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
92
+ import "../generateBehindFiveElement.js";
93
+ import "../../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
94
+ import "../../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
95
+ import "../../../shared-utils/Object3DHelper/Controller/ScaleController.js";
96
+ import "../../../shared-utils/five/fiveModelLoad.js";
97
+ import "../../../shared-utils/five/FiveDomEvents.js";
98
+ import "../../../shared-utils/five/calculateThreeMouse.js";
99
+ import "../../../shared-utils/three/THREERaycaster.js";
100
+ import "../../../shared-utils/three/PointSelector/index.js";
101
+ import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
102
+ import "../../../shared-utils/three/Magnifier.js";
103
+ import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
104
+ import "../../../shared-utils/three/Assets/index.js";
105
+ import "../../../shared-utils/three/PointSelector/utils/html.js";
106
+ import "../../../shared-utils/five/initialCSS3DRender.js";
107
+ import "../../../shared-utils/three/PointSelector/utils/PointHelper2.js";
108
+ import "../../../Sculpt/Meshes/Line.js";
109
+ import "../../../Sculpt/typings/style.js";
110
+ import "../../../shared-utils/five/FiveLine.js";
111
+ import "../../../shared-utils/tag.js";
112
+ import "../../../shared-utils/five/vector3ToScreen.js";
113
+ import "./CSS3DSprite.js";
114
+ import "../../../shared-utils/isTouchDevice.js";
115
+ import "../../../shared-utils/five/getPosition.js";
116
+ import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
117
+ import "../getAllCSS3DObject.js";
118
+ const J = 3, G = "CSS3DRenderer", l = `${G}@${J}`, S = () => {
119
+ console.error(`${l} is disposed`);
120
+ }, i = {
56
121
  css3DObjects: [],
57
122
  frontModeStore: {
58
123
  css3DRenderer: new B()
@@ -61,26 +126,26 @@ const J = 3, G = "CSS3DRenderer", b = `${G}@${J}`, u = () => {
61
126
  css3DRenderer: new B()
62
127
  }
63
128
  };
64
- function w(n) {
65
- return o.css3DObjects.find((e) => e.id === n);
129
+ function w(s) {
130
+ return i.css3DObjects.find((e) => e.id === s);
66
131
  }
67
- function K(n) {
68
- o.frontModeStore.css3DRenderer.setWrapper(n);
132
+ function K(s) {
133
+ i.frontModeStore.css3DRenderer.setWrapper(s);
69
134
  }
70
- function Q(n) {
71
- o.behindModeStore.css3DRenderer.setWrapper(n);
135
+ function Q(s) {
136
+ i.behindModeStore.css3DRenderer.setWrapper(s);
72
137
  }
73
138
  class y {
74
139
  // eslint-disable-next-line @typescript-eslint/no-useless-constructor
75
140
  constructor(e) {
76
- i(this, "hooks", new A());
77
- i(this, "state", {
141
+ n(this, "hooks", new A());
142
+ n(this, "state", {
78
143
  enabled: !0,
79
144
  visible: !0,
80
145
  disposed: !1
81
146
  });
82
- i(this, "_scene");
83
- i(this, "store", {
147
+ n(this, "_scene");
148
+ n(this, "store", {
84
149
  frontModeGroup: new U()
85
150
  });
86
151
  /**
@@ -117,11 +182,11 @@ class y {
117
182
  * } | void
118
183
  * ```
119
184
  */
120
- i(this, "create3DElement", (e, t, s) => {
185
+ n(this, "create3DElement", (e, t, r) => {
121
186
  if (this.state.disposed)
122
- return u();
123
- const r = (() => {
124
- const h = {
187
+ return S();
188
+ const o = (() => {
189
+ const p = {
125
190
  ratio: 216e-5,
126
191
  devicePixelRatio: 1,
127
192
  mode: "front",
@@ -130,51 +195,51 @@ class y {
130
195
  pointerEvents: "none",
131
196
  wrapperStyle: {}
132
197
  };
133
- return Object.assign(h, s);
198
+ return Object.assign(p, r);
134
199
  })(), d = t.map(q);
135
200
  if ((d == null ? void 0 : d.length) < 4)
136
- return console.error(`${b}: requires 4 point but params may have fewer`);
137
- const { ratio: f, devicePixelRatio: l, mode: c, autoRender: S, container: O, pointerEvents: F, wrapperStyle: I } = r;
138
- let D = !1;
139
- const a = this.createObject(d, { ratio: f, dpr: l, container: O, mode: c, pointerEvents: F, wrapperStyle: I });
140
- o.css3DObjects.push(a), r.scene && this.setScene(r.scene);
201
+ return console.error(`${l}: requires 4 point but params may have fewer`);
202
+ const { ratio: m, devicePixelRatio: u, mode: c, autoRender: a, container: O, pointerEvents: F, wrapperStyle: I } = o;
203
+ let b = !1;
204
+ const h = this.createObject(d, { ratio: m, dpr: u, container: O, mode: c, pointerEvents: F, wrapperStyle: I });
205
+ i.css3DObjects.push(h), o.scene && this.setScene(o.scene);
141
206
  const N = () => {
142
- if (D)
207
+ if (b)
143
208
  return;
144
- const h = a.mode === "front" ? this.getFrontCSS3DObjectGroup() : this.getBehindCSS3DObjectGroup();
145
- h && h.add(a);
209
+ const p = h.mode === "front" ? this.getFrontCSS3DObjectGroup() : this.getBehindCSS3DObjectGroup();
210
+ p && p.add(h);
146
211
  }, E = () => {
147
- D || (N(), this.render(e), this.hooks.emit("render"));
148
- }, m = (h) => this.setVisibleById(a.id, h), M = (h) => this.setEnabledById(a.id, h), x = () => (D = !0, a.removeFromParent(), !0), V = c === "front" ? o.frontModeStore.css3DRenderer : o.behindModeStore.css3DRenderer;
149
- return S && E(), {
150
- id: a.uuid,
212
+ b || (N(), this.render(e), this.hooks.emit("render"));
213
+ }, D = (p) => this.setVisibleById(h.id, p), M = (p) => this.setEnabledById(h.id, p), x = () => (b = !0, h.removeFromParent(), !0), V = c === "front" ? i.frontModeStore.css3DRenderer : i.behindModeStore.css3DRenderer;
214
+ return a && E(), {
215
+ id: h.uuid,
151
216
  container: O,
152
- css3DObject: a,
153
- render: S ? void 0 : E,
154
- show: () => m(!0),
155
- hide: () => m(!1),
156
- setVisible: m,
217
+ css3DObject: h,
218
+ render: a ? void 0 : E,
219
+ show: () => D(!0),
220
+ hide: () => D(!1),
221
+ setVisible: D,
157
222
  enable: () => M(!0),
158
223
  disable: () => M(!1),
159
224
  setEnabled: M,
160
225
  dispose: x,
161
- appendToElement: (h) => V.setWrapper(h)
226
+ appendToElement: (p) => V.setWrapper(p)
162
227
  };
163
228
  });
164
- i(this, "setVisibleById", (e, t) => {
165
- var s;
166
- (s = w(e)) == null || s.setVisible(t);
229
+ n(this, "setVisibleById", (e, t) => {
230
+ var r;
231
+ (r = w(e)) == null || r.setVisible(t);
167
232
  });
168
- i(this, "setEnabledById", (e, t) => {
169
- const s = w(e);
170
- if (!s)
233
+ n(this, "setEnabledById", (e, t) => {
234
+ const r = w(e);
235
+ if (!r)
171
236
  return;
172
- const r = s.mode === "front" ? this.getFrontCSS3DObjectGroup({ addGroupIfNotExists: !1 }) : this.getBehindCSS3DObjectGroup({ addGroupIfNotExists: !1 });
173
- r && (t ? r.add(s) : r.remove(s));
237
+ const o = r.mode === "front" ? this.getFrontCSS3DObjectGroup({ addGroupIfNotExists: !1 }) : this.getBehindCSS3DObjectGroup({ addGroupIfNotExists: !1 });
238
+ o && (t ? o.add(r) : o.remove(r));
174
239
  });
175
- i(this, "createObject", (e, t) => {
176
- const s = new W(v(g({ cornerPoints: e }, t), { style: t.wrapperStyle }));
177
- return s.element.classList.add(`${G}__container`), s.element.id = `${G}__container--${s.uuid}`, s;
240
+ n(this, "createObject", (e, t) => {
241
+ const r = new W(v(g({ cornerPoints: e }, t), { style: t.wrapperStyle }));
242
+ return r.element.classList.add(`${G}__container`), r.element.id = `${G}__container--${r.uuid}`, r;
178
243
  });
179
244
  e && this.setScene(e);
180
245
  }
@@ -182,16 +247,16 @@ class y {
182
247
  return this._scene || console.error("scene doesn't exist!, please call setScene(scene) first"), this._scene;
183
248
  }
184
249
  static get frontModeCSS3DRenderer() {
185
- return o.frontModeStore.css3DRenderer;
250
+ return i.frontModeStore.css3DRenderer;
186
251
  }
187
252
  static get behindModeCSS3DRenderer() {
188
- return o.behindModeStore.css3DRenderer;
253
+ return i.behindModeStore.css3DRenderer;
189
254
  }
190
255
  get frontModeCSS3DRenderer() {
191
- return o.frontModeStore.css3DRenderer;
256
+ return i.frontModeStore.css3DRenderer;
192
257
  }
193
258
  get behindModeCSS3DRenderer() {
194
- return o.behindModeStore.css3DRenderer;
259
+ return i.behindModeStore.css3DRenderer;
195
260
  }
196
261
  setScene(e) {
197
262
  this._scene = e;
@@ -201,100 +266,100 @@ class y {
201
266
  }
202
267
  setState(e, t = { userAction: !0 }) {
203
268
  if (this.state.disposed)
204
- return u();
205
- const s = g({}, this.state);
206
- this.state = Object.assign(this.state, e), s.visible !== this.state.visible && (e.visible ? this.handleShow() : this.handleHide()), s.enabled !== this.state.enabled && (e.enabled ? this.handleEnable() : this.handleDisable()), s.disposed !== this.state.disposed && this.handleDispose(), this.hooks.emit("stateChange", { state: this.state, prevState: s, userAction: t.userAction });
269
+ return S();
270
+ const r = g({}, this.state);
271
+ this.state = Object.assign(this.state, e), r.visible !== this.state.visible && (e.visible ? this.handleShow() : this.handleHide()), r.enabled !== this.state.enabled && (e.enabled ? this.handleEnable() : this.handleDisable()), r.disposed !== this.state.disposed && this.handleDispose(), this.hooks.emit("stateChange", { state: this.state, prevState: r, userAction: t.userAction });
207
272
  }
208
273
  dispose() {
209
274
  this.setState({ disposed: !0 }), this.hooks.emit("dispose");
210
275
  }
211
276
  show() {
212
- return p(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
277
+ return f(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
213
278
  if (this.state.disposed)
214
- return u();
279
+ return S();
215
280
  this.setState({ visible: !0 }, { userAction: e }), this.hooks.emit("show", { userAction: e });
216
281
  });
217
282
  }
218
283
  hide() {
219
- return p(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
284
+ return f(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
220
285
  if (this.state.disposed)
221
- return u();
286
+ return S();
222
287
  this.setState({ visible: !1 }, { userAction: e }), this.hooks.emit("hide", { userAction: e });
223
288
  });
224
289
  }
225
290
  enable({ userAction: e } = { userAction: !0 }) {
226
291
  if (this.state.disposed)
227
- return u();
292
+ return S();
228
293
  this.setState({ enabled: !0 }, { userAction: e }), this.hooks.emit("enable", { userAction: e });
229
294
  }
230
295
  disable({ userAction: e } = { userAction: !0 }) {
231
296
  if (this.state.disposed)
232
- return u();
297
+ return S();
233
298
  this.setState({ enabled: !1 }, { userAction: e }), this.hooks.emit("disable", { userAction: e });
234
299
  }
235
300
  getFrontCSS3DScene({ createSceneIfNotExists: e = !1 } = {}) {
236
- var s;
237
- const t = (s = o.frontModeStore) == null ? void 0 : s.css3DScene;
301
+ var r;
302
+ const t = (r = i.frontModeStore) == null ? void 0 : r.css3DScene;
238
303
  if (t)
239
304
  return t;
240
305
  if (e) {
241
- const r = new H();
242
- o.frontModeStore.css3DScene = r;
306
+ const o = new H();
307
+ i.frontModeStore.css3DScene = o;
243
308
  }
244
- return o.frontModeStore.css3DScene;
309
+ return i.frontModeStore.css3DScene;
245
310
  }
246
311
  getBehindCSS3DScene({ createSceneIfNotExists: e = !1 } = {}) {
247
- var s, r;
248
- const t = (s = o.behindModeStore) == null ? void 0 : s.css3DScene;
312
+ var r, o;
313
+ const t = (r = i.behindModeStore) == null ? void 0 : r.css3DScene;
249
314
  if (t)
250
315
  return t;
251
316
  if (e) {
252
- const d = (r = o.behindModeStore.scene) != null ? r : this.scene;
317
+ const d = (o = i.behindModeStore.scene) != null ? o : this.scene;
253
318
  if (!d) {
254
- console.error(`${b}: scene is required when mode is behind`);
319
+ console.error(`${l}: scene is required when mode is behind`);
255
320
  return;
256
321
  }
257
- const f = new T(d);
258
- o.behindModeStore.css3DScene = f, o.behindModeStore.scene = d;
322
+ const m = new T(d);
323
+ i.behindModeStore.css3DScene = m, i.behindModeStore.scene = d;
259
324
  }
260
- return o.behindModeStore.css3DScene;
325
+ return i.behindModeStore.css3DScene;
261
326
  }
262
327
  getFrontCSS3DObjectGroup({ addGroupIfNotExists: e = !0 } = {}) {
263
328
  const t = this.getFrontCSS3DScene({ createSceneIfNotExists: e });
264
329
  return e && t && (t.getObjectById(this.store.frontModeGroup.id) || t.add(this.store.frontModeGroup)), this.store.frontModeGroup;
265
330
  }
266
331
  getBehindCSS3DObjectGroup({ addGroupIfNotExists: e = !0 } = {}) {
267
- var s;
332
+ var r;
268
333
  const t = this.getBehindCSS3DScene({ createSceneIfNotExists: e });
269
334
  if (e && t && this.scene) {
270
- const r = (s = this.store.behindModeGroup) != null ? s : new z(this.scene);
271
- this.store.behindModeGroup = r, t.getObjectById(r.id) || t.add(r);
335
+ const o = (r = this.store.behindModeGroup) != null ? r : new z(this.scene);
336
+ this.store.behindModeGroup = o, t.getObjectById(o.id) || t.add(o);
272
337
  }
273
338
  return this.store.behindModeGroup;
274
339
  }
275
340
  render(e) {
276
- var t, s;
341
+ var t, r;
277
342
  if (this.getFrontCSS3DObjectGroup({ addGroupIfNotExists: !1 }).CSS3DObjectLength > 0) {
278
- const r = this.getFrontCSS3DScene({ createSceneIfNotExists: !0 });
279
- if (!r)
280
- return console.error(`${b}: css3DScene is required when mode is front`);
281
- o.frontModeStore.css3DRenderer.renderEveryFrame(r, e);
343
+ const o = this.getFrontCSS3DScene({ createSceneIfNotExists: !0 });
344
+ if (!o)
345
+ return console.error(`${l}: css3DScene is required when mode is front`);
346
+ i.frontModeStore.css3DRenderer.renderEveryFrame(o, e);
282
347
  }
283
- if (((s = (t = this.getBehindCSS3DObjectGroup({ addGroupIfNotExists: !1 })) == null ? void 0 : t.CSS3DObjectLength) != null ? s : 0) > 0) {
284
- const r = this.getBehindCSS3DScene({ createSceneIfNotExists: !0 });
285
- if (!r)
286
- return console.error(`${b}: css3DScene is required when mode is behind`);
287
- o.behindModeStore.css3DRenderer.renderEveryFrame(r, e);
348
+ if (((r = (t = this.getBehindCSS3DObjectGroup({ addGroupIfNotExists: !1 })) == null ? void 0 : t.CSS3DObjectLength) != null ? r : 0) > 0) {
349
+ const o = this.getBehindCSS3DScene({ createSceneIfNotExists: !0 });
350
+ if (!o)
351
+ return console.error(`${l}: css3DScene is required when mode is behind`);
352
+ i.behindModeStore.css3DRenderer.renderEveryFrame(o, e);
288
353
  }
289
354
  }
290
355
  handleShow() {
291
- return p(this, null, function* () {
356
+ return f(this, null, function* () {
292
357
  var e;
293
358
  this.store.frontModeGroup.setVisible(!0), (e = this.store.behindModeGroup) == null || e.setVisible(!0);
294
359
  });
295
360
  }
296
361
  handleHide() {
297
- return p(this, null, function* () {
362
+ return f(this, null, function* () {
298
363
  var e;
299
364
  this.store.frontModeGroup.setVisible(!1), (e = this.store.behindModeGroup) == null || e.setVisible(!1);
300
365
  });
@@ -304,21 +369,21 @@ class y {
304
369
  (e = this.getFrontCSS3DScene()) == null || e.add(this.store.frontModeGroup), this.store.behindModeGroup && ((t = this.getBehindCSS3DScene()) == null || t.add(this.store.behindModeGroup));
305
370
  }
306
371
  handleDisable() {
307
- var e, t, s;
308
- this.store.frontModeGroup.children.forEach((r) => {
309
- r instanceof j && r.element instanceof Element && r.element.parentNode !== null && r.element.remove();
310
- }), (e = this.store.behindModeGroup) == null || e.children.forEach((r) => {
311
- r instanceof j && r.element instanceof Element && r.element.parentNode !== null && r.element.remove();
312
- }), (t = this.getFrontCSS3DScene()) == null || t.remove(this.store.frontModeGroup), this.store.behindModeGroup && ((s = this.getBehindCSS3DScene()) == null || s.remove(this.store.behindModeGroup));
372
+ var e, t, r;
373
+ this.store.frontModeGroup.children.forEach((o) => {
374
+ o instanceof j && o.element instanceof Element && o.element.parentNode !== null && o.element.remove();
375
+ }), (e = this.store.behindModeGroup) == null || e.children.forEach((o) => {
376
+ o instanceof j && o.element instanceof Element && o.element.parentNode !== null && o.element.remove();
377
+ }), (t = this.getFrontCSS3DScene()) == null || t.remove(this.store.frontModeGroup), this.store.behindModeGroup && ((r = this.getBehindCSS3DScene()) == null || r.remove(this.store.behindModeGroup));
313
378
  }
314
379
  handleDispose() {
315
380
  this.handleDisable();
316
381
  }
317
382
  }
318
- i(y, "setFrontModeContainer", K), i(y, "setBehindModeContainer", Q);
383
+ n(y, "setFrontModeContainer", K), n(y, "setBehindModeContainer", Q);
319
384
  export {
320
385
  y as CSS3DRender,
321
- Ge as MinRatio,
322
- b as PLUGIN,
323
- o as globalStore
386
+ Nt as MinRatio,
387
+ l as PLUGIN,
388
+ i as globalStore
324
389
  };