@realsee/dnalogel 3.45.0 → 3.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/Sculpt/Meshes/Line.d.ts +6 -1
- package/dist/Sculpt/utils/removeAllTag.d.ts +2 -0
- package/dist/index.cjs.js +53 -53
- package/dist/index.js +29600 -29557
- package/dist/index.umd.js +49 -49
- package/dist/shared-utils/tag.d.ts +6 -3
- package/libs/AreaMakerPlugin/Controller.js +151 -78
- package/libs/AreaMakerPlugin/index.js +77 -4
- package/libs/AreaMakerPlugin/utils/Item.js +191 -111
- package/libs/CSS3DRenderPlugin/Controller.js +90 -29
- package/libs/CSS3DRenderPlugin/index.js +76 -15
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +133 -58
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +182 -116
- package/libs/CruisePlugin/BaseController.js +122 -49
- package/libs/CruisePlugin/Move.js +74 -21
- package/libs/CruisePlugin/Work.js +99 -46
- package/libs/CruisePlugin/index.js +80 -27
- package/libs/CurrentPanoImagePlugin/Controller.js +177 -104
- package/libs/CurrentPanoImagePlugin/index.js +77 -4
- package/libs/GuideLinePlugin/Controller.js +79 -26
- package/libs/GuideLinePlugin/GuideLineItem.js +83 -30
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +82 -29
- package/libs/GuideLinePlugin/index.js +80 -27
- package/libs/ModelMakerPlugin/Controller.js +140 -82
- package/libs/ModelMakerPlugin/index.js +76 -18
- package/libs/ModelTVVideoPlugin/Plugin.js +118 -57
- package/libs/ModelTVVideoPlugin/index.js +69 -8
- package/libs/Object3DHelperPlugin/Controller.js +67 -43
- package/libs/Object3DHelperPlugin/index.js +36 -13
- package/libs/PanoCompassPlugin/Controller.js +98 -42
- package/libs/PanoCompassPlugin/index.js +72 -16
- package/libs/PanoDoorLabelPlugin/BaseController.js +99 -26
- package/libs/PanoDoorLabelPlugin/Controller.js +188 -115
- package/libs/PanoDoorLabelPlugin/index.js +77 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -88
- package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -126
- package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -72
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +168 -92
- package/libs/PanoMeasurePlugin/Controller/index.js +110 -64
- package/libs/PanoMeasurePlugin/Model/area.js +115 -38
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +79 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -45
- package/libs/PanoMeasurePlugin/index.js +77 -31
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +99 -20
- package/libs/PanoSpatialTagPlugin/Plugin.js +211 -150
- package/libs/PanoSpatialTagPlugin/index.js +67 -6
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +149 -68
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +296 -216
- package/libs/PanoTagPlugin/Components/Tag/index.js +258 -187
- package/libs/PanoTagPlugin/Components/TagContainer.js +158 -87
- package/libs/PanoTagPlugin/Components/TagItem.js +145 -74
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +133 -62
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +110 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +106 -35
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +114 -43
- package/libs/PanoTagPlugin/controller/TagRender.js +133 -80
- package/libs/PanoTagPlugin/controller/TagUtil.js +137 -84
- package/libs/PanoTagPlugin/controller/index.js +114 -61
- package/libs/PanoTagPlugin/index.js +90 -37
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +122 -41
- package/libs/PanoVideoPlugin/Controller.js +138 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +150 -69
- package/libs/PanoVideoPlugin/index.js +83 -10
- package/libs/PipelinePlugin/Controller.js +200 -128
- package/libs/PipelinePlugin/index.js +77 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +103 -22
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +96 -15
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +137 -56
- package/libs/Sculpt/Meshes/Box.js +6 -5
- package/libs/Sculpt/Meshes/Cylinder.js +7 -6
- package/libs/Sculpt/Meshes/Line.d.ts +6 -1
- package/libs/Sculpt/Meshes/Line.js +80 -57
- package/libs/Sculpt/Meshes/Point.js +6 -5
- package/libs/Sculpt/Meshes/Polyline.js +5 -4
- package/libs/Sculpt/Meshes/Rectangle.js +3 -2
- package/libs/Sculpt/Objects/Base/index.js +20 -17
- package/libs/Sculpt/Objects/Line/Editor.js +11 -10
- package/libs/Sculpt/utils/removeAllTag.d.ts +2 -0
- package/libs/Sculpt/utils/removeAllTag.js +10 -0
- package/libs/Sculpt/utils/three/ColoredMesh.js +14 -13
- package/libs/base/BasePlugin.js +14 -13
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +129 -59
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +76 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +130 -59
- package/libs/floorplan/ModelFloorplanPlugin/index.js +76 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +159 -86
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +77 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +152 -81
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +76 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +193 -192
- package/libs/shared-utils/five/index.js +3 -2
- package/libs/shared-utils/five/lookObject.js +3 -2
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +6 -3
- package/libs/shared-utils/tag.js +38 -24
- package/libs/shared-utils/three/index.js +1 -0
- 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 = (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(
|
|
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(
|
|
11
|
-
return
|
|
12
|
-
}, v = (
|
|
13
|
-
var
|
|
14
|
-
var
|
|
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
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
u(t.next(c));
|
|
18
|
+
} catch (a) {
|
|
19
|
+
o(a);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, m = (c) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
u(t.throw(c));
|
|
24
|
+
} catch (a) {
|
|
25
|
+
o(a);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
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
|
|
34
|
+
import { MinRatio as xt } 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,81 @@ 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/
|
|
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 "
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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 "../../../Sculpt/utils/removeAllTag.js";
|
|
114
|
+
import "./CSS3DSprite.js";
|
|
115
|
+
import "../../../shared-utils/isTouchDevice.js";
|
|
116
|
+
import "../../../shared-utils/five/getPosition.js";
|
|
117
|
+
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
118
|
+
import "../getAllCSS3DObject.js";
|
|
119
|
+
const J = 3, G = "CSS3DRenderer", l = `${G}@${J}`, S = () => {
|
|
120
|
+
console.error(`${l} is disposed`);
|
|
121
|
+
}, i = {
|
|
56
122
|
css3DObjects: [],
|
|
57
123
|
frontModeStore: {
|
|
58
124
|
css3DRenderer: new B()
|
|
@@ -61,26 +127,26 @@ const J = 3, G = "CSS3DRenderer", b = `${G}@${J}`, u = () => {
|
|
|
61
127
|
css3DRenderer: new B()
|
|
62
128
|
}
|
|
63
129
|
};
|
|
64
|
-
function w(
|
|
65
|
-
return
|
|
130
|
+
function w(s) {
|
|
131
|
+
return i.css3DObjects.find((e) => e.id === s);
|
|
66
132
|
}
|
|
67
|
-
function K(
|
|
68
|
-
|
|
133
|
+
function K(s) {
|
|
134
|
+
i.frontModeStore.css3DRenderer.setWrapper(s);
|
|
69
135
|
}
|
|
70
|
-
function Q(
|
|
71
|
-
|
|
136
|
+
function Q(s) {
|
|
137
|
+
i.behindModeStore.css3DRenderer.setWrapper(s);
|
|
72
138
|
}
|
|
73
139
|
class y {
|
|
74
140
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
75
141
|
constructor(e) {
|
|
76
|
-
|
|
77
|
-
|
|
142
|
+
n(this, "hooks", new A());
|
|
143
|
+
n(this, "state", {
|
|
78
144
|
enabled: !0,
|
|
79
145
|
visible: !0,
|
|
80
146
|
disposed: !1
|
|
81
147
|
});
|
|
82
|
-
|
|
83
|
-
|
|
148
|
+
n(this, "_scene");
|
|
149
|
+
n(this, "store", {
|
|
84
150
|
frontModeGroup: new U()
|
|
85
151
|
});
|
|
86
152
|
/**
|
|
@@ -117,11 +183,11 @@ class y {
|
|
|
117
183
|
* } | void
|
|
118
184
|
* ```
|
|
119
185
|
*/
|
|
120
|
-
|
|
186
|
+
n(this, "create3DElement", (e, t, r) => {
|
|
121
187
|
if (this.state.disposed)
|
|
122
|
-
return
|
|
123
|
-
const
|
|
124
|
-
const
|
|
188
|
+
return S();
|
|
189
|
+
const o = (() => {
|
|
190
|
+
const p = {
|
|
125
191
|
ratio: 216e-5,
|
|
126
192
|
devicePixelRatio: 1,
|
|
127
193
|
mode: "front",
|
|
@@ -130,51 +196,51 @@ class y {
|
|
|
130
196
|
pointerEvents: "none",
|
|
131
197
|
wrapperStyle: {}
|
|
132
198
|
};
|
|
133
|
-
return Object.assign(
|
|
199
|
+
return Object.assign(p, r);
|
|
134
200
|
})(), d = t.map(q);
|
|
135
201
|
if ((d == null ? void 0 : d.length) < 4)
|
|
136
|
-
return console.error(`${
|
|
137
|
-
const { ratio:
|
|
138
|
-
let
|
|
139
|
-
const
|
|
140
|
-
|
|
202
|
+
return console.error(`${l}: requires 4 point but params may have fewer`);
|
|
203
|
+
const { ratio: m, devicePixelRatio: u, mode: c, autoRender: a, container: O, pointerEvents: F, wrapperStyle: I } = o;
|
|
204
|
+
let b = !1;
|
|
205
|
+
const h = this.createObject(d, { ratio: m, dpr: u, container: O, mode: c, pointerEvents: F, wrapperStyle: I });
|
|
206
|
+
i.css3DObjects.push(h), o.scene && this.setScene(o.scene);
|
|
141
207
|
const N = () => {
|
|
142
|
-
if (
|
|
208
|
+
if (b)
|
|
143
209
|
return;
|
|
144
|
-
const
|
|
145
|
-
|
|
210
|
+
const p = h.mode === "front" ? this.getFrontCSS3DObjectGroup() : this.getBehindCSS3DObjectGroup();
|
|
211
|
+
p && p.add(h);
|
|
146
212
|
}, E = () => {
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
return
|
|
150
|
-
id:
|
|
213
|
+
b || (N(), this.render(e), this.hooks.emit("render"));
|
|
214
|
+
}, 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;
|
|
215
|
+
return a && E(), {
|
|
216
|
+
id: h.uuid,
|
|
151
217
|
container: O,
|
|
152
|
-
css3DObject:
|
|
153
|
-
render:
|
|
154
|
-
show: () =>
|
|
155
|
-
hide: () =>
|
|
156
|
-
setVisible:
|
|
218
|
+
css3DObject: h,
|
|
219
|
+
render: a ? void 0 : E,
|
|
220
|
+
show: () => D(!0),
|
|
221
|
+
hide: () => D(!1),
|
|
222
|
+
setVisible: D,
|
|
157
223
|
enable: () => M(!0),
|
|
158
224
|
disable: () => M(!1),
|
|
159
225
|
setEnabled: M,
|
|
160
226
|
dispose: x,
|
|
161
|
-
appendToElement: (
|
|
227
|
+
appendToElement: (p) => V.setWrapper(p)
|
|
162
228
|
};
|
|
163
229
|
});
|
|
164
|
-
|
|
165
|
-
var
|
|
166
|
-
(
|
|
230
|
+
n(this, "setVisibleById", (e, t) => {
|
|
231
|
+
var r;
|
|
232
|
+
(r = w(e)) == null || r.setVisible(t);
|
|
167
233
|
});
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
if (!
|
|
234
|
+
n(this, "setEnabledById", (e, t) => {
|
|
235
|
+
const r = w(e);
|
|
236
|
+
if (!r)
|
|
171
237
|
return;
|
|
172
|
-
const
|
|
173
|
-
|
|
238
|
+
const o = r.mode === "front" ? this.getFrontCSS3DObjectGroup({ addGroupIfNotExists: !1 }) : this.getBehindCSS3DObjectGroup({ addGroupIfNotExists: !1 });
|
|
239
|
+
o && (t ? o.add(r) : o.remove(r));
|
|
174
240
|
});
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
return
|
|
241
|
+
n(this, "createObject", (e, t) => {
|
|
242
|
+
const r = new W(v(g({ cornerPoints: e }, t), { style: t.wrapperStyle }));
|
|
243
|
+
return r.element.classList.add(`${G}__container`), r.element.id = `${G}__container--${r.uuid}`, r;
|
|
178
244
|
});
|
|
179
245
|
e && this.setScene(e);
|
|
180
246
|
}
|
|
@@ -182,16 +248,16 @@ class y {
|
|
|
182
248
|
return this._scene || console.error("scene doesn't exist!, please call setScene(scene) first"), this._scene;
|
|
183
249
|
}
|
|
184
250
|
static get frontModeCSS3DRenderer() {
|
|
185
|
-
return
|
|
251
|
+
return i.frontModeStore.css3DRenderer;
|
|
186
252
|
}
|
|
187
253
|
static get behindModeCSS3DRenderer() {
|
|
188
|
-
return
|
|
254
|
+
return i.behindModeStore.css3DRenderer;
|
|
189
255
|
}
|
|
190
256
|
get frontModeCSS3DRenderer() {
|
|
191
|
-
return
|
|
257
|
+
return i.frontModeStore.css3DRenderer;
|
|
192
258
|
}
|
|
193
259
|
get behindModeCSS3DRenderer() {
|
|
194
|
-
return
|
|
260
|
+
return i.behindModeStore.css3DRenderer;
|
|
195
261
|
}
|
|
196
262
|
setScene(e) {
|
|
197
263
|
this._scene = e;
|
|
@@ -201,100 +267,100 @@ class y {
|
|
|
201
267
|
}
|
|
202
268
|
setState(e, t = { userAction: !0 }) {
|
|
203
269
|
if (this.state.disposed)
|
|
204
|
-
return
|
|
205
|
-
const
|
|
206
|
-
this.state = Object.assign(this.state, e),
|
|
270
|
+
return S();
|
|
271
|
+
const r = g({}, this.state);
|
|
272
|
+
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
273
|
}
|
|
208
274
|
dispose() {
|
|
209
275
|
this.setState({ disposed: !0 }), this.hooks.emit("dispose");
|
|
210
276
|
}
|
|
211
277
|
show() {
|
|
212
|
-
return
|
|
278
|
+
return f(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
|
|
213
279
|
if (this.state.disposed)
|
|
214
|
-
return
|
|
280
|
+
return S();
|
|
215
281
|
this.setState({ visible: !0 }, { userAction: e }), this.hooks.emit("show", { userAction: e });
|
|
216
282
|
});
|
|
217
283
|
}
|
|
218
284
|
hide() {
|
|
219
|
-
return
|
|
285
|
+
return f(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
|
|
220
286
|
if (this.state.disposed)
|
|
221
|
-
return
|
|
287
|
+
return S();
|
|
222
288
|
this.setState({ visible: !1 }, { userAction: e }), this.hooks.emit("hide", { userAction: e });
|
|
223
289
|
});
|
|
224
290
|
}
|
|
225
291
|
enable({ userAction: e } = { userAction: !0 }) {
|
|
226
292
|
if (this.state.disposed)
|
|
227
|
-
return
|
|
293
|
+
return S();
|
|
228
294
|
this.setState({ enabled: !0 }, { userAction: e }), this.hooks.emit("enable", { userAction: e });
|
|
229
295
|
}
|
|
230
296
|
disable({ userAction: e } = { userAction: !0 }) {
|
|
231
297
|
if (this.state.disposed)
|
|
232
|
-
return
|
|
298
|
+
return S();
|
|
233
299
|
this.setState({ enabled: !1 }, { userAction: e }), this.hooks.emit("disable", { userAction: e });
|
|
234
300
|
}
|
|
235
301
|
getFrontCSS3DScene({ createSceneIfNotExists: e = !1 } = {}) {
|
|
236
|
-
var
|
|
237
|
-
const t = (
|
|
302
|
+
var r;
|
|
303
|
+
const t = (r = i.frontModeStore) == null ? void 0 : r.css3DScene;
|
|
238
304
|
if (t)
|
|
239
305
|
return t;
|
|
240
306
|
if (e) {
|
|
241
|
-
const
|
|
242
|
-
|
|
307
|
+
const o = new H();
|
|
308
|
+
i.frontModeStore.css3DScene = o;
|
|
243
309
|
}
|
|
244
|
-
return
|
|
310
|
+
return i.frontModeStore.css3DScene;
|
|
245
311
|
}
|
|
246
312
|
getBehindCSS3DScene({ createSceneIfNotExists: e = !1 } = {}) {
|
|
247
|
-
var
|
|
248
|
-
const t = (
|
|
313
|
+
var r, o;
|
|
314
|
+
const t = (r = i.behindModeStore) == null ? void 0 : r.css3DScene;
|
|
249
315
|
if (t)
|
|
250
316
|
return t;
|
|
251
317
|
if (e) {
|
|
252
|
-
const d = (
|
|
318
|
+
const d = (o = i.behindModeStore.scene) != null ? o : this.scene;
|
|
253
319
|
if (!d) {
|
|
254
|
-
console.error(`${
|
|
320
|
+
console.error(`${l}: scene is required when mode is behind`);
|
|
255
321
|
return;
|
|
256
322
|
}
|
|
257
|
-
const
|
|
258
|
-
|
|
323
|
+
const m = new T(d);
|
|
324
|
+
i.behindModeStore.css3DScene = m, i.behindModeStore.scene = d;
|
|
259
325
|
}
|
|
260
|
-
return
|
|
326
|
+
return i.behindModeStore.css3DScene;
|
|
261
327
|
}
|
|
262
328
|
getFrontCSS3DObjectGroup({ addGroupIfNotExists: e = !0 } = {}) {
|
|
263
329
|
const t = this.getFrontCSS3DScene({ createSceneIfNotExists: e });
|
|
264
330
|
return e && t && (t.getObjectById(this.store.frontModeGroup.id) || t.add(this.store.frontModeGroup)), this.store.frontModeGroup;
|
|
265
331
|
}
|
|
266
332
|
getBehindCSS3DObjectGroup({ addGroupIfNotExists: e = !0 } = {}) {
|
|
267
|
-
var
|
|
333
|
+
var r;
|
|
268
334
|
const t = this.getBehindCSS3DScene({ createSceneIfNotExists: e });
|
|
269
335
|
if (e && t && this.scene) {
|
|
270
|
-
const
|
|
271
|
-
this.store.behindModeGroup =
|
|
336
|
+
const o = (r = this.store.behindModeGroup) != null ? r : new z(this.scene);
|
|
337
|
+
this.store.behindModeGroup = o, t.getObjectById(o.id) || t.add(o);
|
|
272
338
|
}
|
|
273
339
|
return this.store.behindModeGroup;
|
|
274
340
|
}
|
|
275
341
|
render(e) {
|
|
276
|
-
var t,
|
|
342
|
+
var t, r;
|
|
277
343
|
if (this.getFrontCSS3DObjectGroup({ addGroupIfNotExists: !1 }).CSS3DObjectLength > 0) {
|
|
278
|
-
const
|
|
279
|
-
if (!
|
|
280
|
-
return console.error(`${
|
|
281
|
-
|
|
344
|
+
const o = this.getFrontCSS3DScene({ createSceneIfNotExists: !0 });
|
|
345
|
+
if (!o)
|
|
346
|
+
return console.error(`${l}: css3DScene is required when mode is front`);
|
|
347
|
+
i.frontModeStore.css3DRenderer.renderEveryFrame(o, e);
|
|
282
348
|
}
|
|
283
|
-
if (((
|
|
284
|
-
const
|
|
285
|
-
if (!
|
|
286
|
-
return console.error(`${
|
|
287
|
-
|
|
349
|
+
if (((r = (t = this.getBehindCSS3DObjectGroup({ addGroupIfNotExists: !1 })) == null ? void 0 : t.CSS3DObjectLength) != null ? r : 0) > 0) {
|
|
350
|
+
const o = this.getBehindCSS3DScene({ createSceneIfNotExists: !0 });
|
|
351
|
+
if (!o)
|
|
352
|
+
return console.error(`${l}: css3DScene is required when mode is behind`);
|
|
353
|
+
i.behindModeStore.css3DRenderer.renderEveryFrame(o, e);
|
|
288
354
|
}
|
|
289
355
|
}
|
|
290
356
|
handleShow() {
|
|
291
|
-
return
|
|
357
|
+
return f(this, null, function* () {
|
|
292
358
|
var e;
|
|
293
359
|
this.store.frontModeGroup.setVisible(!0), (e = this.store.behindModeGroup) == null || e.setVisible(!0);
|
|
294
360
|
});
|
|
295
361
|
}
|
|
296
362
|
handleHide() {
|
|
297
|
-
return
|
|
363
|
+
return f(this, null, function* () {
|
|
298
364
|
var e;
|
|
299
365
|
this.store.frontModeGroup.setVisible(!1), (e = this.store.behindModeGroup) == null || e.setVisible(!1);
|
|
300
366
|
});
|
|
@@ -304,21 +370,21 @@ class y {
|
|
|
304
370
|
(e = this.getFrontCSS3DScene()) == null || e.add(this.store.frontModeGroup), this.store.behindModeGroup && ((t = this.getBehindCSS3DScene()) == null || t.add(this.store.behindModeGroup));
|
|
305
371
|
}
|
|
306
372
|
handleDisable() {
|
|
307
|
-
var e, t,
|
|
308
|
-
this.store.frontModeGroup.children.forEach((
|
|
309
|
-
|
|
310
|
-
}), (e = this.store.behindModeGroup) == null || e.children.forEach((
|
|
311
|
-
|
|
312
|
-
}), (t = this.getFrontCSS3DScene()) == null || t.remove(this.store.frontModeGroup), this.store.behindModeGroup && ((
|
|
373
|
+
var e, t, r;
|
|
374
|
+
this.store.frontModeGroup.children.forEach((o) => {
|
|
375
|
+
o instanceof j && o.element instanceof Element && o.element.parentNode !== null && o.element.remove();
|
|
376
|
+
}), (e = this.store.behindModeGroup) == null || e.children.forEach((o) => {
|
|
377
|
+
o instanceof j && o.element instanceof Element && o.element.parentNode !== null && o.element.remove();
|
|
378
|
+
}), (t = this.getFrontCSS3DScene()) == null || t.remove(this.store.frontModeGroup), this.store.behindModeGroup && ((r = this.getBehindCSS3DScene()) == null || r.remove(this.store.behindModeGroup));
|
|
313
379
|
}
|
|
314
380
|
handleDispose() {
|
|
315
381
|
this.handleDisable();
|
|
316
382
|
}
|
|
317
383
|
}
|
|
318
|
-
|
|
384
|
+
n(y, "setFrontModeContainer", K), n(y, "setBehindModeContainer", Q);
|
|
319
385
|
export {
|
|
320
386
|
y as CSS3DRender,
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
387
|
+
xt as MinRatio,
|
|
388
|
+
l as PLUGIN,
|
|
389
|
+
i as globalStore
|
|
324
390
|
};
|