@realsee/dnalogel 3.47.13 → 3.47.15

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