@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.
- package/CHANGELOG.md +8 -0
- package/dist/PanoTagPlugin/utils/requestIdleCallback.d.ts +1 -1
- package/dist/Sculpt/Meshes/Line.d.ts +1 -0
- package/dist/Sculpt/Meshes/Polygon.d.ts +2 -1
- package/dist/index.cjs.js +53 -53
- package/dist/index.js +18650 -18640
- package/dist/index.umd.js +47 -47
- package/libs/AreaMakerPlugin/Controller.js +78 -150
- package/libs/AreaMakerPlugin/index.js +3 -75
- package/libs/AreaMakerPlugin/utils/Item.js +111 -185
- package/libs/CSS3DRenderPlugin/Controller.js +29 -86
- package/libs/CSS3DRenderPlugin/index.js +12 -69
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +58 -127
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +113 -174
- package/libs/CruisePlugin/BaseController.js +50 -122
- package/libs/CruisePlugin/Move.js +21 -74
- package/libs/CruisePlugin/Work.js +46 -99
- package/libs/CruisePlugin/index.js +26 -79
- package/libs/CurrentPanoImagePlugin/Controller.js +104 -176
- package/libs/CurrentPanoImagePlugin/index.js +4 -76
- package/libs/GuideLinePlugin/Controller.js +26 -79
- package/libs/GuideLinePlugin/GuideLineItem.js +24 -77
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +2 -3
- package/libs/GuideLinePlugin/GuideLineModeItem.js +22 -75
- package/libs/GuideLinePlugin/index.js +26 -79
- package/libs/ModelMakerPlugin/Controller.js +83 -139
- package/libs/ModelMakerPlugin/index.js +16 -72
- package/libs/ModelTVVideoPlugin/Plugin.js +48 -105
- package/libs/ModelTVVideoPlugin/index.js +7 -64
- package/libs/Object3DHelperPlugin/Controller.js +32 -56
- package/libs/Object3DHelperPlugin/index.js +12 -35
- package/libs/PanoCompassPlugin/Controller.js +37 -93
- package/libs/PanoCompassPlugin/index.js +11 -67
- package/libs/PanoDoorLabelPlugin/BaseController.js +25 -97
- package/libs/PanoDoorLabelPlugin/Controller.js +115 -187
- package/libs/PanoDoorLabelPlugin/index.js +4 -76
- package/libs/PanoMeasurePlugin/Components/Controller0.js +83 -128
- package/libs/PanoMeasurePlugin/Components/Controller1.js +96 -141
- package/libs/PanoMeasurePlugin/Controller/EditController.js +66 -111
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +51 -121
- package/libs/PanoMeasurePlugin/Controller/index.js +59 -101
- package/libs/PanoMeasurePlugin/Model/area.js +21 -91
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +0 -73
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +27 -72
- package/libs/PanoMeasurePlugin/index.js +25 -67
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +17 -89
- package/libs/PanoSpatialTagPlugin/Plugin.js +106 -163
- package/libs/PanoSpatialTagPlugin/index.js +5 -62
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +67 -141
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +208 -281
- package/libs/PanoTagPlugin/Components/Tag/index.js +180 -251
- package/libs/PanoTagPlugin/Components/TagContainer.js +80 -151
- package/libs/PanoTagPlugin/Components/TagItem.js +67 -138
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +61 -132
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +28 -99
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +30 -101
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +36 -107
- package/libs/PanoTagPlugin/controller/TagRender.js +68 -121
- package/libs/PanoTagPlugin/controller/TagUtil.js +79 -132
- package/libs/PanoTagPlugin/controller/index.js +55 -108
- package/libs/PanoTagPlugin/index.js +31 -84
- package/libs/PanoTagPlugin/utils/requestIdleCallback.d.ts +1 -1
- package/libs/PanoTagPlugin/utils/requestIdleCallback.js +5 -13
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +30 -104
- package/libs/PanoVideoPlugin/Controller.js +64 -136
- package/libs/PanoVideoPlugin/VideoMeshController.js +74 -148
- package/libs/PanoVideoPlugin/index.js +8 -80
- package/libs/PipelinePlugin/Controller.js +128 -199
- package/libs/PipelinePlugin/index.js +5 -76
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +17 -91
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +14 -88
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +56 -130
- package/libs/Sculpt/Meshes/Box.js +5 -6
- package/libs/Sculpt/Meshes/Cylinder.js +2 -3
- package/libs/Sculpt/Meshes/Line.d.ts +1 -0
- package/libs/Sculpt/Meshes/Line.js +50 -41
- package/libs/Sculpt/Meshes/Point.js +9 -10
- package/libs/Sculpt/Meshes/Polygon.d.ts +2 -1
- package/libs/Sculpt/Meshes/Polygon.js +47 -37
- package/libs/Sculpt/Meshes/Polyline.js +18 -16
- package/libs/Sculpt/Meshes/Rectangle.js +3 -4
- package/libs/Sculpt/Objects/Line/Editor.js +2 -3
- package/libs/Sculpt/Objects/Rectangle/index.js +1 -1
- package/libs/Sculpt/utils/removeAllTag.js +4 -4
- package/libs/Sculpt/utils/three/ColoredMesh.js +3 -4
- package/libs/base/BasePlugin.js +3 -4
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +59 -128
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +6 -75
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +59 -129
- package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -75
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +62 -134
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -76
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +81 -151
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -75
- package/libs/floorplan/index.js +0 -1
- package/libs/index.js +62 -62
- package/libs/shared-utils/five/index.js +2 -3
- package/libs/shared-utils/five/lookObject.js +17 -18
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/index.js +0 -1
- 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 = (
|
|
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(
|
|
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(
|
|
11
|
-
return
|
|
12
|
-
}, v = (
|
|
13
|
-
var
|
|
14
|
-
var
|
|
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
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
f(t.next(c));
|
|
18
|
+
} catch (S) {
|
|
19
|
+
r(S);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, p = (c) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
f(t.throw(c));
|
|
24
|
+
} catch (S) {
|
|
25
|
+
r(S);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
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
|
|
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 "../../../
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
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(
|
|
134
|
-
return
|
|
72
|
+
function w(o) {
|
|
73
|
+
return n.css3DObjects.find((e) => e.id === o);
|
|
135
74
|
}
|
|
136
|
-
function K(
|
|
137
|
-
|
|
75
|
+
function K(o) {
|
|
76
|
+
n.frontModeStore.css3DRenderer.setWrapper(o);
|
|
138
77
|
}
|
|
139
|
-
function Q(
|
|
140
|
-
|
|
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
|
-
|
|
146
|
-
|
|
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
|
-
|
|
152
|
-
|
|
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
|
-
|
|
128
|
+
i(this, "create3DElement", (e, t, s) => {
|
|
190
129
|
if (this.state.disposed)
|
|
191
|
-
return
|
|
192
|
-
const
|
|
193
|
-
const
|
|
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(
|
|
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(`${
|
|
206
|
-
const { ratio:
|
|
207
|
-
let
|
|
208
|
-
const
|
|
209
|
-
|
|
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 (
|
|
150
|
+
if (m)
|
|
212
151
|
return;
|
|
213
|
-
const
|
|
214
|
-
|
|
152
|
+
const h = a.mode === "front" ? this.getFrontCSS3DObjectGroup() : this.getBehindCSS3DObjectGroup();
|
|
153
|
+
h && h.add(a);
|
|
215
154
|
}, E = () => {
|
|
216
|
-
|
|
217
|
-
}, D = (
|
|
218
|
-
return
|
|
219
|
-
id:
|
|
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:
|
|
222
|
-
render:
|
|
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: (
|
|
169
|
+
appendToElement: (h) => V.setWrapper(h)
|
|
231
170
|
};
|
|
232
171
|
});
|
|
233
|
-
|
|
234
|
-
var
|
|
235
|
-
(
|
|
172
|
+
i(this, "setVisibleById", (e, t) => {
|
|
173
|
+
var s;
|
|
174
|
+
(s = w(e)) == null || s.setVisible(t);
|
|
236
175
|
});
|
|
237
|
-
|
|
238
|
-
const
|
|
239
|
-
if (!
|
|
176
|
+
i(this, "setEnabledById", (e, t) => {
|
|
177
|
+
const s = w(e);
|
|
178
|
+
if (!s)
|
|
240
179
|
return;
|
|
241
|
-
const
|
|
242
|
-
|
|
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
|
-
|
|
245
|
-
const
|
|
246
|
-
return
|
|
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
|
|
193
|
+
return n.frontModeStore.css3DRenderer;
|
|
255
194
|
}
|
|
256
195
|
static get behindModeCSS3DRenderer() {
|
|
257
|
-
return
|
|
196
|
+
return n.behindModeStore.css3DRenderer;
|
|
258
197
|
}
|
|
259
198
|
get frontModeCSS3DRenderer() {
|
|
260
|
-
return
|
|
199
|
+
return n.frontModeStore.css3DRenderer;
|
|
261
200
|
}
|
|
262
201
|
get behindModeCSS3DRenderer() {
|
|
263
|
-
return
|
|
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
|
|
274
|
-
const
|
|
275
|
-
this.state = Object.assign(this.state, e),
|
|
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
|
|
220
|
+
return l(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
|
|
282
221
|
if (this.state.disposed)
|
|
283
|
-
return
|
|
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
|
|
227
|
+
return l(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
|
|
289
228
|
if (this.state.disposed)
|
|
290
|
-
return
|
|
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
|
|
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
|
|
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
|
|
306
|
-
const t = (
|
|
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
|
|
311
|
-
|
|
249
|
+
const r = new H();
|
|
250
|
+
n.frontModeStore.css3DScene = r;
|
|
312
251
|
}
|
|
313
|
-
return
|
|
252
|
+
return n.frontModeStore.css3DScene;
|
|
314
253
|
}
|
|
315
254
|
getBehindCSS3DScene({ createSceneIfNotExists: e = !1 } = {}) {
|
|
316
|
-
var
|
|
317
|
-
const t = (
|
|
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 = (
|
|
260
|
+
const d = (r = n.behindModeStore.scene) != null ? r : this.scene;
|
|
322
261
|
if (!d) {
|
|
323
|
-
console.error(`${
|
|
262
|
+
console.error(`${b}: scene is required when mode is behind`);
|
|
324
263
|
return;
|
|
325
264
|
}
|
|
326
|
-
const
|
|
327
|
-
|
|
265
|
+
const p = new T(d);
|
|
266
|
+
n.behindModeStore.css3DScene = p, n.behindModeStore.scene = d;
|
|
328
267
|
}
|
|
329
|
-
return
|
|
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
|
|
275
|
+
var s;
|
|
337
276
|
const t = this.getBehindCSS3DScene({ createSceneIfNotExists: e });
|
|
338
277
|
if (e && t && this.scene) {
|
|
339
|
-
const
|
|
340
|
-
this.store.behindModeGroup =
|
|
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,
|
|
284
|
+
var t, s;
|
|
346
285
|
if (this.getFrontCSS3DObjectGroup({ addGroupIfNotExists: !1 }).CSS3DObjectLength > 0) {
|
|
347
|
-
const
|
|
348
|
-
if (!
|
|
349
|
-
return console.error(`${
|
|
350
|
-
|
|
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 (((
|
|
353
|
-
const
|
|
354
|
-
if (!
|
|
355
|
-
return console.error(`${
|
|
356
|
-
|
|
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
|
|
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
|
|
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,
|
|
377
|
-
this.store.frontModeGroup.children.forEach((
|
|
378
|
-
|
|
379
|
-
}), (e = this.store.behindModeGroup) == null || e.children.forEach((
|
|
380
|
-
|
|
381
|
-
}), (t = this.getFrontCSS3DScene()) == null || t.remove(this.store.frontModeGroup), 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
|
-
|
|
326
|
+
i(y, "setFrontModeContainer", K), i(y, "setBehindModeContainer", Q);
|
|
388
327
|
export {
|
|
389
328
|
y as CSS3DRender,
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
329
|
+
ye as MinRatio,
|
|
330
|
+
b as PLUGIN,
|
|
331
|
+
n as globalStore
|
|
393
332
|
};
|