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