@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
|
@@ -11,21 +11,21 @@ var v = (d, s, t) => s in d ? C(d, s, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return d;
|
|
12
12
|
}, g = (d, s) => S(d, E(s));
|
|
13
13
|
var o = (d, s, t) => (v(d, typeof s != "symbol" ? s + "" : s, t), t);
|
|
14
|
-
var
|
|
15
|
-
var
|
|
14
|
+
var f = (d, s, t) => new Promise((e, i) => {
|
|
15
|
+
var r = (a) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
i(
|
|
17
|
+
n(t.next(a));
|
|
18
|
+
} catch (p) {
|
|
19
|
+
i(p);
|
|
20
20
|
}
|
|
21
21
|
}, h = (a) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
i(
|
|
23
|
+
n(t.throw(a));
|
|
24
|
+
} catch (p) {
|
|
25
|
+
i(p);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, n = (a) => a.done ? e(a.value) : Promise.resolve(a.value).then(r, h);
|
|
28
|
+
n((t = t.apply(d, s)).next());
|
|
29
29
|
});
|
|
30
30
|
import { to as I } from "../../shared-utils/to.js";
|
|
31
31
|
import { equal as M } from "../../shared-utils/equal.js";
|
|
@@ -38,11 +38,12 @@ import { FLOOR_PLAN_ATTACHED_TO as O } from "../constant.js";
|
|
|
38
38
|
import { Controller as T } from "../../base/BasePluginWithData.js";
|
|
39
39
|
import { correctFiveState as k } from "../utils/correctFiveState.js";
|
|
40
40
|
import { changeModelCanvasOpacity as F } from "../../shared-utils/changeModelCanvasOpacity.js";
|
|
41
|
-
import { FIVE_CAMERA_DEFAULT_FOV as R, FloorplanErrorType as
|
|
41
|
+
import { FIVE_CAMERA_DEFAULT_FOV as R, FloorplanErrorType as u, SHOW_ANIME_DURATION as H } from "../utils/constant.js";
|
|
42
42
|
import "three";
|
|
43
43
|
import "hammerjs";
|
|
44
44
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
45
45
|
import "@realsee/five/line";
|
|
46
|
+
import "../../Sculpt/utils/Modules/Global.js";
|
|
46
47
|
import "../../shared-utils/three/THREESphere.js";
|
|
47
48
|
import "animejs";
|
|
48
49
|
import { isNil as G } from "../../shared-utils/isNil.js";
|
|
@@ -86,6 +87,76 @@ import "../../shared-utils/five/getFiveModel.js";
|
|
|
86
87
|
import "../../shared-utils/url/absoluteUrl.js";
|
|
87
88
|
import "../../shared-utils/nearlyEqual.js";
|
|
88
89
|
import "../../shared-utils/five/changeMode.js";
|
|
90
|
+
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
91
|
+
import "../../Object3DHelperPlugin/Controller.js";
|
|
92
|
+
import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
93
|
+
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
94
|
+
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
95
|
+
import "../../shared-utils/three/IObject3D.js";
|
|
96
|
+
import "../../shared-utils/three/boundingBox.js";
|
|
97
|
+
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
98
|
+
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
99
|
+
import "../../shared-utils/Object3DHelper/Constants/color.js";
|
|
100
|
+
import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
101
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
102
|
+
import "../../shared-utils/positionToVector3.js";
|
|
103
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
104
|
+
import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
105
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
106
|
+
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
107
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
108
|
+
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
109
|
+
import "../../shared-utils/three/centerPoint.js";
|
|
110
|
+
import "../../shared-utils/three/getObjectVisible.js";
|
|
111
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
112
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
113
|
+
import "../../shared-utils/util.js";
|
|
114
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
115
|
+
import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
116
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
117
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
118
|
+
import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
119
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
120
|
+
import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
121
|
+
import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
122
|
+
import "../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
123
|
+
import "../../shared-utils/threex/domevents/index.js";
|
|
124
|
+
import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
125
|
+
import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
126
|
+
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
127
|
+
import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
128
|
+
import "../../shared-utils/Object3DHelper/index.js";
|
|
129
|
+
import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
130
|
+
import "../../shared-utils/math/deg2Rad.js";
|
|
131
|
+
import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
132
|
+
import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
133
|
+
import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
134
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
135
|
+
import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
136
|
+
import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
137
|
+
import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
138
|
+
import "../../shared-utils/five/fiveModelLoad.js";
|
|
139
|
+
import "../../shared-utils/five/FiveDomEvents.js";
|
|
140
|
+
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
141
|
+
import "../../shared-utils/three/THREERaycaster.js";
|
|
142
|
+
import "../../shared-utils/three/PointSelector/index.js";
|
|
143
|
+
import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
144
|
+
import "../../shared-utils/three/Magnifier.js";
|
|
145
|
+
import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
146
|
+
import "../../shared-utils/three/Assets/index.js";
|
|
147
|
+
import "../../shared-utils/three/PointSelector/utils/html.js";
|
|
148
|
+
import "../../shared-utils/five/initialCSS3DRender.js";
|
|
149
|
+
import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
150
|
+
import "../../Sculpt/Meshes/Line.js";
|
|
151
|
+
import "../../Sculpt/typings/style.js";
|
|
152
|
+
import "../../shared-utils/five/FiveLine.js";
|
|
153
|
+
import "../../shared-utils/tag.js";
|
|
154
|
+
import "../../shared-utils/five/vector3ToScreen.js";
|
|
155
|
+
import "../../Sculpt/utils/removeAllTag.js";
|
|
156
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
157
|
+
import "../../shared-utils/isTouchDevice.js";
|
|
158
|
+
import "../../shared-utils/five/getPosition.js";
|
|
159
|
+
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
89
160
|
function W(d) {
|
|
90
161
|
const { latitude: s, longitude: t } = d, e = Math.abs(s - Math.PI / 2) > 5 * Math.PI / 180, i = t > 5 * (Math.PI / 180) && t < 355 * (Math.PI / 180);
|
|
91
162
|
return e || i;
|
|
@@ -94,9 +165,9 @@ function z(d) {
|
|
|
94
165
|
const { latitude: s, longitude: t } = d, e = Math.abs(s - Math.PI / 2) < 10 * Math.PI / 180, i = t < 30 * (Math.PI / 180) || t > 330 * (Math.PI / 180);
|
|
95
166
|
return e && i;
|
|
96
167
|
}
|
|
97
|
-
class
|
|
168
|
+
class li extends T {
|
|
98
169
|
constructor(t, e) {
|
|
99
|
-
var a,
|
|
170
|
+
var a, p, c;
|
|
100
171
|
super(t);
|
|
101
172
|
// =============== public properties =================
|
|
102
173
|
o(this, "name", "modelFloorplanPlugin");
|
|
@@ -145,22 +216,22 @@ class qt extends T {
|
|
|
145
216
|
* @param opts.isAutoShow 是否是自动展示
|
|
146
217
|
* @param opts.userAction 是否是用户行为
|
|
147
218
|
*/
|
|
148
|
-
o(this, "show", (...e) =>
|
|
219
|
+
o(this, "show", (...e) => f(this, [...e], function* (t = {}) {
|
|
149
220
|
if (!this.state.enabled || !this.showPromise && this.state.visible)
|
|
150
221
|
return;
|
|
151
222
|
const i = t.userAction !== void 0 ? t.userAction : !0;
|
|
152
223
|
this.updateState({ visible: !0 }, i), this._show(t);
|
|
153
224
|
}));
|
|
154
225
|
/** 隐藏户型图 */
|
|
155
|
-
o(this, "hide", (...e) =>
|
|
226
|
+
o(this, "hide", (...e) => f(this, [...e], function* (t = {}) {
|
|
156
227
|
this.state.enabled && (this.isHiddenByHideFunc = !0, this.state.visible !== !1 && (this.updateState({ visible: !1 }, t.userAction || !0), this._hide(t)));
|
|
157
228
|
}));
|
|
158
229
|
/** 更新户型图大小 */
|
|
159
230
|
o(this, "updateSize", () => {
|
|
160
231
|
if (!this.data || !this.container || !this.wrapper)
|
|
161
232
|
return !1;
|
|
162
|
-
const { min: t, max: e } = this.data.bounding, i = e.x - t.x,
|
|
163
|
-
return this.size.width === a && this.size.height ===
|
|
233
|
+
const { min: t, max: e } = this.data.bounding, i = e.x - t.x, r = e.y - t.y, h = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, n = D(this.five, this.wrapper, this.floorIndex, h), a = Math.ceil(i * n), p = Math.ceil(r * n);
|
|
234
|
+
return this.size.width === a && this.size.height === p || (this.container.style.width = a + "px", this.container.style.height = p + "px", this.size = { width: a, height: p }), !0;
|
|
164
235
|
});
|
|
165
236
|
o(this, "highlight", (t) => {
|
|
166
237
|
this.state.config.highlightEnable && (this.highlightData = t, this.render());
|
|
@@ -169,22 +240,22 @@ class qt extends T {
|
|
|
169
240
|
this.highlightData = {}, this.render();
|
|
170
241
|
});
|
|
171
242
|
o(this, "_disable", (t) => {
|
|
172
|
-
var i,
|
|
243
|
+
var i, r, h;
|
|
173
244
|
const { userAction: e } = t;
|
|
174
|
-
this.hooks.emit("disable", { userAction: e }), (i = this.showRejection) == null || i.call(this,
|
|
245
|
+
this.hooks.emit("disable", { userAction: e }), (i = this.showRejection) == null || i.call(this, u.BreakOffByDisable), this.showPromise = void 0, (r = this.app) == null || r.$destroy(), this.app = void 0, (h = this.container) == null || h.remove(), this.removeEventListener();
|
|
175
246
|
});
|
|
176
247
|
o(this, "_enable", (t) => {
|
|
177
248
|
const { userAction: e } = t;
|
|
178
249
|
this.addEventListener(), this.wrapper && (this.wrapper.append(this.container), this.hooks.emit("enable", { userAction: e }), this.state.visible && this._show({ userAction: e }));
|
|
179
250
|
});
|
|
180
|
-
o(this, "_show", (t) =>
|
|
251
|
+
o(this, "_show", (t) => f(this, null, function* () {
|
|
181
252
|
var h;
|
|
182
253
|
if (!this.state.enabled)
|
|
183
254
|
return;
|
|
184
255
|
if (!((h = this.five.model) != null && h.loaded))
|
|
185
|
-
throw new Error(
|
|
256
|
+
throw new Error(u.ModelNotLoaded);
|
|
186
257
|
if (!this.data)
|
|
187
|
-
throw new Error(
|
|
258
|
+
throw new Error(u.DataNotLoaded);
|
|
188
259
|
if (this.showPromise)
|
|
189
260
|
return this.showPromise;
|
|
190
261
|
const e = {
|
|
@@ -193,36 +264,36 @@ class qt extends T {
|
|
|
193
264
|
immediately: !1,
|
|
194
265
|
isAutoShow: !1,
|
|
195
266
|
userAction: !0
|
|
196
|
-
}, i = l(l({}, e), t),
|
|
267
|
+
}, i = l(l({}, e), t), r = () => f(this, null, function* () {
|
|
197
268
|
this.hooks.emit("show", { userAction: i.userAction, auto: i.isAutoShow });
|
|
198
|
-
let
|
|
199
|
-
this.showRejection = (
|
|
200
|
-
|
|
269
|
+
let n = !1, a;
|
|
270
|
+
this.showRejection = (m) => {
|
|
271
|
+
n = !0, a = m;
|
|
201
272
|
};
|
|
202
|
-
const [
|
|
203
|
-
if (
|
|
204
|
-
throw
|
|
205
|
-
if (
|
|
206
|
-
throw a ? new Error(a) : new Error(
|
|
273
|
+
const [p] = yield I(k(this.five, this.showState, i.userAction));
|
|
274
|
+
if (p)
|
|
275
|
+
throw p;
|
|
276
|
+
if (n)
|
|
277
|
+
throw a ? new Error(a) : new Error(u.UnknownError);
|
|
207
278
|
if (!this.updateSize())
|
|
208
|
-
throw new Error(
|
|
279
|
+
throw new Error(u.UpdateSizeError);
|
|
209
280
|
this.floorIndex = i.floorIndex, this.five.model.show(this.floorIndex);
|
|
210
281
|
});
|
|
211
|
-
return this.isHiddenByHideFunc = !1, this.showPromise =
|
|
282
|
+
return this.isHiddenByHideFunc = !1, this.showPromise = r().then(() => {
|
|
212
283
|
this.showPromise = void 0, this.showRejection = void 0;
|
|
213
|
-
const
|
|
214
|
-
F(this.five,
|
|
284
|
+
const n = i.modelOpacity, a = i.immediately ? 0 : H;
|
|
285
|
+
F(this.five, n, a), this.render(a), this.hooks.emit("showAnimationEnded", {
|
|
215
286
|
auto: i.isAutoShow,
|
|
216
287
|
userAction: i.userAction
|
|
217
288
|
});
|
|
218
|
-
}).catch((
|
|
219
|
-
if (this.showPromise = void 0, this.showRejection = void 0, this.updateState({ visible: !1 }, i.userAction), !i.isAutoShow &&
|
|
220
|
-
throw
|
|
289
|
+
}).catch((n) => {
|
|
290
|
+
if (this.showPromise = void 0, this.showRejection = void 0, this.updateState({ visible: !1 }, i.userAction), !i.isAutoShow && n instanceof Error)
|
|
291
|
+
throw n;
|
|
221
292
|
}), this.showPromise;
|
|
222
293
|
}));
|
|
223
294
|
o(this, "_hide", (t) => {
|
|
224
|
-
var
|
|
225
|
-
(
|
|
295
|
+
var r;
|
|
296
|
+
(r = this.showRejection) == null || r.call(this, u.BreakOffByHide), this.showPromise = void 0;
|
|
226
297
|
const i = l(l({}, {
|
|
227
298
|
userAction: !0,
|
|
228
299
|
isAutoHide: !1
|
|
@@ -303,7 +374,7 @@ class qt extends T {
|
|
|
303
374
|
imageURL: this.staticPrefix + "/release/web/saas/missing-floorplan.e274c596.png",
|
|
304
375
|
imageWidth: 200,
|
|
305
376
|
imageHeight: 120,
|
|
306
|
-
text: (
|
|
377
|
+
text: (c = (p = e.i18n) == null ? void 0 : p.call(e, "暂无平面图")) != null ? c : "暂无平面图",
|
|
307
378
|
textFontSize: 14
|
|
308
379
|
};
|
|
309
380
|
const i = {
|
|
@@ -324,22 +395,22 @@ class qt extends T {
|
|
|
324
395
|
attachedTo: O.BOUNDING_CENTER,
|
|
325
396
|
getLabelElement: void 0,
|
|
326
397
|
missingFloorConfig: l(l({}, this.defaultMissingFloorConfig), e.missingFloorConfig),
|
|
327
|
-
i18n: (
|
|
328
|
-
getRoomAreaText: (
|
|
329
|
-
getRoomDimensionText: (
|
|
330
|
-
getRuleDistanceText: (
|
|
331
|
-
},
|
|
332
|
-
this.state = { enabled: !0, visible: !1, config:
|
|
398
|
+
i18n: (m) => m,
|
|
399
|
+
getRoomAreaText: (m) => (m / 1e6).toFixed(1) + "㎡",
|
|
400
|
+
getRoomDimensionText: (m, A) => (m / 1e3).toFixed(1) + "m × " + (A / 1e3).toFixed(1) + "m",
|
|
401
|
+
getRuleDistanceText: (m) => m.toString()
|
|
402
|
+
}, r = e ? L(e, ["selector", "scale"]) : {}, h = l(l({}, i.missingFloorConfig), r.missingFloorConfig), n = g(l(l({}, i), r), { missingFloorConfig: h });
|
|
403
|
+
this.state = { enabled: !0, visible: !1, config: n }, this.initContainer(), t.once("dispose", this.dispose), this.addEventListener();
|
|
333
404
|
}
|
|
334
405
|
load(t, e, i = !0) {
|
|
335
|
-
return
|
|
336
|
-
function
|
|
337
|
-
return Object.prototype.hasOwnProperty.apply(
|
|
406
|
+
return f(this, null, function* () {
|
|
407
|
+
function r(c) {
|
|
408
|
+
return Object.prototype.hasOwnProperty.apply(c, ["version"]);
|
|
338
409
|
}
|
|
339
410
|
const h = t;
|
|
340
411
|
h && G(h.version) && console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");
|
|
341
|
-
const
|
|
342
|
-
this.data = yield b(a), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data,
|
|
412
|
+
const n = JSON.parse(JSON.stringify(t)), a = r(n) ? n.data : n, p = this.data;
|
|
413
|
+
this.data = yield b(a), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, p), e && this.updateState(e, i), this.render();
|
|
343
414
|
});
|
|
344
415
|
}
|
|
345
416
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
@@ -363,9 +434,9 @@ class qt extends T {
|
|
|
363
434
|
}
|
|
364
435
|
/** 更改插件 State */
|
|
365
436
|
setState(t, e = {}) {
|
|
366
|
-
const i = this.state,
|
|
367
|
-
if (this.updateState(t,
|
|
368
|
-
const h = { userAction:
|
|
437
|
+
const i = this.state, r = e.userAction !== void 0 ? e.userAction : !0;
|
|
438
|
+
if (this.updateState(t, r), t.enabled !== void 0 && i.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: r }) : this._disable({ userAction: r })), t.visible !== void 0 && i.visible !== t.visible) {
|
|
439
|
+
const h = { userAction: r };
|
|
369
440
|
t.visible ? this._show(h) : this._hide(h);
|
|
370
441
|
}
|
|
371
442
|
this.render();
|
|
@@ -374,13 +445,13 @@ class qt extends T {
|
|
|
374
445
|
this.updateState({ config: t }, e), this.render();
|
|
375
446
|
}
|
|
376
447
|
formatData(t) {
|
|
377
|
-
return
|
|
448
|
+
return f(this, null, function* () {
|
|
378
449
|
return yield b(t.data);
|
|
379
450
|
});
|
|
380
451
|
}
|
|
381
452
|
updateState(t, e) {
|
|
382
|
-
var
|
|
383
|
-
const i = this.state,
|
|
453
|
+
var n;
|
|
454
|
+
const i = this.state, r = (n = t.config) != null && n.missingFloorConfig ? l(l({}, i.config.missingFloorConfig), t.config.missingFloorConfig) : i.config.missingFloorConfig, h = t.config ? g(l(l({}, i.config), t.config), { missingFloorConfig: r }) : i.config;
|
|
384
455
|
this.state = g(l(l({}, this.state), t), { config: h }), !M(this.state, i, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
|
|
385
456
|
}
|
|
386
457
|
/** 如果用户是通过 selector 设置父容器,需要在 modelLoaded 之后把 container 自动放到父容器里
|
|
@@ -425,5 +496,5 @@ class qt extends T {
|
|
|
425
496
|
}
|
|
426
497
|
}
|
|
427
498
|
export {
|
|
428
|
-
|
|
499
|
+
li as Controller
|
|
429
500
|
};
|
|
@@ -43,23 +43,94 @@ import "../../shared-utils/Subscribe.js";
|
|
|
43
43
|
import "hammerjs";
|
|
44
44
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
45
45
|
import "@realsee/five/line";
|
|
46
|
+
import "../../Sculpt/utils/Modules/Global.js";
|
|
47
|
+
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
48
|
+
import "../../Object3DHelperPlugin/Controller.js";
|
|
46
49
|
import "../../shared-utils/three/THREESphere.js";
|
|
50
|
+
import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
51
|
+
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
52
|
+
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
53
|
+
import "../../shared-utils/three/IObject3D.js";
|
|
54
|
+
import "../../shared-utils/three/boundingBox.js";
|
|
55
|
+
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
56
|
+
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
57
|
+
import "../../shared-utils/Object3DHelper/Constants/color.js";
|
|
58
|
+
import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
59
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
60
|
+
import "../../shared-utils/positionToVector3.js";
|
|
61
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
62
|
+
import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
63
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
64
|
+
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
65
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
66
|
+
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
67
|
+
import "../../shared-utils/three/centerPoint.js";
|
|
68
|
+
import "../../shared-utils/three/getObjectVisible.js";
|
|
47
69
|
import "animejs";
|
|
70
|
+
import "../../shared-utils/isNil.js";
|
|
71
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
48
72
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
49
73
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
50
74
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
51
75
|
import "../../shared-utils/five/transformPosition.js";
|
|
52
76
|
import "../../shared-utils/five/getFiveModel.js";
|
|
53
77
|
import "../../shared-utils/url/absoluteUrl.js";
|
|
54
|
-
import "../../
|
|
78
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
79
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
80
|
+
import "../../shared-utils/util.js";
|
|
81
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
82
|
+
import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
83
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
84
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
85
|
+
import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
86
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
87
|
+
import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
88
|
+
import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
89
|
+
import "../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
90
|
+
import "../../shared-utils/threex/domevents/index.js";
|
|
91
|
+
import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
92
|
+
import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
93
|
+
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
94
|
+
import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
95
|
+
import "../../shared-utils/Object3DHelper/index.js";
|
|
96
|
+
import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
97
|
+
import "../../shared-utils/math/deg2Rad.js";
|
|
98
|
+
import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
99
|
+
import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
100
|
+
import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
101
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
102
|
+
import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
103
|
+
import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
104
|
+
import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
105
|
+
import "../../shared-utils/five/fiveModelLoad.js";
|
|
106
|
+
import "../../shared-utils/five/FiveDomEvents.js";
|
|
107
|
+
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
108
|
+
import "../../shared-utils/three/THREERaycaster.js";
|
|
109
|
+
import "../../shared-utils/three/PointSelector/index.js";
|
|
110
|
+
import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
111
|
+
import "../../shared-utils/three/Magnifier.js";
|
|
112
|
+
import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
113
|
+
import "../../shared-utils/three/Assets/index.js";
|
|
114
|
+
import "../../shared-utils/three/PointSelector/utils/html.js";
|
|
115
|
+
import "../../shared-utils/five/initialCSS3DRender.js";
|
|
116
|
+
import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
117
|
+
import "../../Sculpt/Meshes/Line.js";
|
|
118
|
+
import "../../Sculpt/typings/style.js";
|
|
119
|
+
import "../../shared-utils/five/FiveLine.js";
|
|
120
|
+
import "../../shared-utils/tag.js";
|
|
121
|
+
import "../../shared-utils/five/vector3ToScreen.js";
|
|
122
|
+
import "../../Sculpt/utils/removeAllTag.js";
|
|
123
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
124
|
+
import "../../shared-utils/isTouchDevice.js";
|
|
125
|
+
import "../../shared-utils/five/getPosition.js";
|
|
126
|
+
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
55
127
|
import "../utils/correctFiveState.js";
|
|
56
128
|
import "../utils/constant.js";
|
|
57
129
|
import "../../shared-utils/nearlyEqual.js";
|
|
58
130
|
import "../../shared-utils/five/changeMode.js";
|
|
59
131
|
import "../../shared-utils/changeModelCanvasOpacity.js";
|
|
60
|
-
|
|
61
|
-
const ao = (o, r) => new t(o, r);
|
|
132
|
+
const vr = (o, r) => new t(o, r);
|
|
62
133
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
134
|
+
vr as ModelFloorplanPlugin,
|
|
135
|
+
vr as default
|
|
65
136
|
};
|