@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,29 +2,29 @@ var C = Object.defineProperty, F = Object.defineProperties;
|
|
|
2
2
|
var E = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var g = Object.getOwnPropertySymbols;
|
|
4
4
|
var A = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var u = (d, n, t) => n in d ? C(d, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[n] = t,
|
|
5
|
+
var u = (d, n, t) => n in d ? C(d, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[n] = t, l = (d, n) => {
|
|
6
6
|
for (var t in n || (n = {}))
|
|
7
7
|
A.call(n, t) && u(d, t, n[t]);
|
|
8
8
|
if (g)
|
|
9
9
|
for (var t of g(n))
|
|
10
10
|
x.call(n, t) && u(d, t, n[t]);
|
|
11
11
|
return d;
|
|
12
|
-
},
|
|
12
|
+
}, m = (d, n) => F(d, E(n));
|
|
13
13
|
var o = (d, n, t) => (u(d, typeof n != "symbol" ? n + "" : n, t), t);
|
|
14
|
-
var
|
|
14
|
+
var f = (d, n, t) => new Promise((e, i) => {
|
|
15
15
|
var s = (h) => {
|
|
16
16
|
try {
|
|
17
17
|
a(t.next(h));
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
18
|
+
} catch (c) {
|
|
19
|
+
i(c);
|
|
20
20
|
}
|
|
21
21
|
}, r = (h) => {
|
|
22
22
|
try {
|
|
23
23
|
a(t.throw(h));
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
24
|
+
} catch (c) {
|
|
25
|
+
i(c);
|
|
26
26
|
}
|
|
27
|
-
}, a = (h) => h.done ?
|
|
27
|
+
}, a = (h) => h.done ? e(h.value) : Promise.resolve(h.value).then(s, r);
|
|
28
28
|
a((t = t.apply(d, n)).next());
|
|
29
29
|
});
|
|
30
30
|
import * as S from "three";
|
|
@@ -42,7 +42,6 @@ import "hammerjs";
|
|
|
42
42
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
43
43
|
import "@realsee/five/line";
|
|
44
44
|
import "../../shared-utils/tag.js";
|
|
45
|
-
import "../../Sculpt/utils/Modules/Global.js";
|
|
46
45
|
import "../../shared-utils/three/THREESphere.js";
|
|
47
46
|
import "animejs";
|
|
48
47
|
import { isNil as k } from "../../shared-utils/isNil.js";
|
|
@@ -89,78 +88,9 @@ import "../../shared-utils/to.js";
|
|
|
89
88
|
import "../../shared-utils/positionToVector3.js";
|
|
90
89
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
91
90
|
import "../../shared-utils/three/temp.js";
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
96
|
-
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
97
|
-
import "../../shared-utils/three/IObject3D.js";
|
|
98
|
-
import "../../shared-utils/three/boundingBox.js";
|
|
99
|
-
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
100
|
-
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
101
|
-
import "../../shared-utils/Object3DHelper/Constants/color.js";
|
|
102
|
-
import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
103
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
104
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
105
|
-
import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
106
|
-
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
107
|
-
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
108
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
109
|
-
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
110
|
-
import "../../shared-utils/three/centerPoint.js";
|
|
111
|
-
import "../../shared-utils/three/getObjectVisible.js";
|
|
112
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
113
|
-
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
114
|
-
import "../../shared-utils/util.js";
|
|
115
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
116
|
-
import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
117
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
118
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
119
|
-
import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
120
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
121
|
-
import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
122
|
-
import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
123
|
-
import "../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
124
|
-
import "../../shared-utils/threex/domevents/index.js";
|
|
125
|
-
import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
126
|
-
import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
127
|
-
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
128
|
-
import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
129
|
-
import "../../shared-utils/Object3DHelper/index.js";
|
|
130
|
-
import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
131
|
-
import "../../shared-utils/math/deg2Rad.js";
|
|
132
|
-
import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
133
|
-
import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
134
|
-
import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
135
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
136
|
-
import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
137
|
-
import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
138
|
-
import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
139
|
-
import "../../shared-utils/five/fiveModelLoad.js";
|
|
140
|
-
import "../../shared-utils/five/FiveDomEvents.js";
|
|
141
|
-
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
142
|
-
import "../../shared-utils/three/THREERaycaster.js";
|
|
143
|
-
import "../../shared-utils/three/PointSelector/index.js";
|
|
144
|
-
import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
145
|
-
import "../../shared-utils/three/Magnifier.js";
|
|
146
|
-
import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
147
|
-
import "../../shared-utils/three/Assets/index.js";
|
|
148
|
-
import "../../shared-utils/three/PointSelector/utils/html.js";
|
|
149
|
-
import "../../shared-utils/five/initialCSS3DRender.js";
|
|
150
|
-
import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
151
|
-
import "../../Sculpt/Meshes/Line.js";
|
|
152
|
-
import "../../Sculpt/typings/style.js";
|
|
153
|
-
import "../../shared-utils/five/FiveLine.js";
|
|
154
|
-
import "../../Sculpt/utils/removeAllTag.js";
|
|
155
|
-
import "../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
156
|
-
import "../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
157
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
158
|
-
import "../../shared-utils/isTouchDevice.js";
|
|
159
|
-
import "../../shared-utils/five/getPosition.js";
|
|
160
|
-
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
161
|
-
class ne extends M {
|
|
162
|
-
constructor(t, i) {
|
|
163
|
-
var h, m;
|
|
91
|
+
class Bt extends M {
|
|
92
|
+
constructor(t, e) {
|
|
93
|
+
var h, c;
|
|
164
94
|
super(t);
|
|
165
95
|
// =============== public properties =================
|
|
166
96
|
o(this, "name", "topviewFloorplanPlugin");
|
|
@@ -190,13 +120,13 @@ class ne extends M {
|
|
|
190
120
|
o(this, "updateSize", () => {
|
|
191
121
|
if (!this.data || !this.container || !this.wrapper || this.five.getCurrentState().mode !== "Topview")
|
|
192
122
|
return !1;
|
|
193
|
-
const { min: t, max:
|
|
194
|
-
return this.size.width === h && this.size.height ===
|
|
123
|
+
const { min: t, max: e } = this.data.bounding, i = e.x - t.x, s = e.y - t.y, r = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a = D(this.five, this.wrapper, this.floorIndex, r), h = Math.ceil(i * a), c = Math.ceil(s * a);
|
|
124
|
+
return this.size.width === h && this.size.height === c || (this.container.style.width = h + "px", this.container.style.height = c + "px", this.size = { width: h, height: c }), !0;
|
|
195
125
|
});
|
|
196
126
|
/** 销毁插件 */
|
|
197
127
|
o(this, "dispose", () => {
|
|
198
|
-
var t,
|
|
199
|
-
this.removeEventListener(), (t = this.app) == null || t.$destroy(), this.app = void 0, (
|
|
128
|
+
var t, e;
|
|
129
|
+
this.removeEventListener(), (t = this.app) == null || t.$destroy(), this.app = void 0, (e = this.container) == null || e.remove(), this.data = void 0, this.wrapper = void 0, this.selector = void 0, this.hooks.emit("dispose");
|
|
200
130
|
});
|
|
201
131
|
o(this, "highlight", (t) => {
|
|
202
132
|
this.state.config.highlightEnable && (this.highlightData = t, this.render());
|
|
@@ -205,9 +135,9 @@ class ne extends M {
|
|
|
205
135
|
this.highlightData = {}, this.render();
|
|
206
136
|
});
|
|
207
137
|
o(this, "_disable", (t) => {
|
|
208
|
-
var
|
|
209
|
-
const { userAction:
|
|
210
|
-
(
|
|
138
|
+
var i, s;
|
|
139
|
+
const { userAction: e } = t;
|
|
140
|
+
(i = this.app) == null || i.$destroy(), this.app = void 0, (s = this.container) == null || s.remove(), this.removeEventListener(), this.hooks.emit("disable", { userAction: e });
|
|
211
141
|
});
|
|
212
142
|
/** modelLoaded 之后自动执行 append container 操作 */
|
|
213
143
|
o(this, "onFiveModelLoaded", () => {
|
|
@@ -219,14 +149,14 @@ class ne extends M {
|
|
|
219
149
|
this.wrapper = t, t.append(this.container);
|
|
220
150
|
});
|
|
221
151
|
/** 非 Topview 态隐藏户型图 */
|
|
222
|
-
o(this, "onFiveModeChange", (...[t, , , ,
|
|
223
|
-
t !== "Topview" && this.state.visible && (this.updateState({ visible: !1 },
|
|
152
|
+
o(this, "onFiveModeChange", (...[t, , , , e]) => {
|
|
153
|
+
t !== "Topview" && this.state.visible && (this.updateState({ visible: !1 }, e), this._hide({ userAction: e }));
|
|
224
154
|
});
|
|
225
155
|
o(this, "onFivePanoArrived", (t) => {
|
|
226
|
-
var
|
|
227
|
-
(
|
|
156
|
+
var e;
|
|
157
|
+
(e = this.five) != null && e.work && (this.panoIndex = t, this.floorIndex = this.five.work.observers[t].floorIndex);
|
|
228
158
|
});
|
|
229
|
-
o(this, "onFiveCameraUpdate", (t,
|
|
159
|
+
o(this, "onFiveCameraUpdate", (t, e) => {
|
|
230
160
|
this.state.visible && (this.updatePosition(), this.updateSize());
|
|
231
161
|
});
|
|
232
162
|
o(this, "onFiveWantsGesture", (t) => {
|
|
@@ -239,27 +169,27 @@ class ne extends M {
|
|
|
239
169
|
});
|
|
240
170
|
/** 动画结束后是 Topview 态就展示户型图 */
|
|
241
171
|
o(this, "onFiveInitAnimationEnded", (...[, , t]) => {
|
|
242
|
-
const { mode:
|
|
243
|
-
|
|
172
|
+
const { mode: e } = this.five.getCurrentState();
|
|
173
|
+
e === "Topview" && !this.isHiddenByHideFunc && !this.state.visible && this.state.config.autoShowEnable && (this.updateState({ visible: !0 }, t), this._show({ userAction: t }));
|
|
244
174
|
});
|
|
245
175
|
o(this, "onModelShownFloorChange", (t) => {
|
|
246
176
|
if (this.floorIndex !== t) {
|
|
247
177
|
if (t === null) {
|
|
248
|
-
const
|
|
249
|
-
this.floorIndex = this.five.work.observers[
|
|
178
|
+
const e = this.five.getCurrentState().panoIndex;
|
|
179
|
+
this.floorIndex = this.five.work.observers[e].floorIndex;
|
|
250
180
|
return;
|
|
251
181
|
}
|
|
252
182
|
this.floorIndex = t, this.updateSize(), this.render();
|
|
253
183
|
}
|
|
254
184
|
});
|
|
255
|
-
|
|
185
|
+
e != null && e.selector && (this.selector = e.selector, console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")), this.defaultMissingFloorConfig = {
|
|
256
186
|
imageURL: this.staticPrefix + "/release/web/saas/missing-floorplan.e274c596.png",
|
|
257
187
|
imageWidth: 200,
|
|
258
188
|
imageHeight: 120,
|
|
259
|
-
text: (
|
|
189
|
+
text: (c = (h = e.i18n) == null ? void 0 : h.call(e, "暂无平面图")) != null ? c : "暂无平面图",
|
|
260
190
|
textFontSize: 14
|
|
261
191
|
};
|
|
262
|
-
const
|
|
192
|
+
const i = {
|
|
263
193
|
northDesc: "北",
|
|
264
194
|
modelOpacity: 1,
|
|
265
195
|
cameraEnable: !0,
|
|
@@ -276,33 +206,33 @@ class ne extends M {
|
|
|
276
206
|
cameraImageUrl: L,
|
|
277
207
|
attachedTo: _.BOUNDING_CENTER,
|
|
278
208
|
getLabelElement: void 0,
|
|
279
|
-
missingFloorConfig:
|
|
280
|
-
i18n: (
|
|
209
|
+
missingFloorConfig: l(l({}, this.defaultMissingFloorConfig), e.missingFloorConfig),
|
|
210
|
+
i18n: (p) => p,
|
|
281
211
|
adaptiveRoomLabelVisibleEnable: !0,
|
|
282
|
-
getRoomAreaText: (
|
|
283
|
-
getRoomDimensionText: (
|
|
284
|
-
getRuleDistanceText: (
|
|
285
|
-
}, s =
|
|
212
|
+
getRoomAreaText: (p) => (p / 1e6).toFixed(1) + "㎡",
|
|
213
|
+
getRoomDimensionText: (p, w) => (p / 1e3).toFixed(1) + "m × " + (w / 1e3).toFixed(1) + "m",
|
|
214
|
+
getRuleDistanceText: (p) => p.toString()
|
|
215
|
+
}, s = e ? T(e, ["selector", "scale"]) : {}, r = l(l({}, i.missingFloorConfig), s.missingFloorConfig), a = m(l(l({}, i), s), { missingFloorConfig: r });
|
|
286
216
|
this.state = { enabled: !0, visible: !1, config: a }, this.initContainer(), t.model.loaded ? this.onFiveModelLoaded() : t.once("modelLoaded", this.onFiveModelLoaded), t.once("dispose", this.dispose), this.addEventListener();
|
|
287
217
|
}
|
|
288
|
-
load(t,
|
|
289
|
-
return
|
|
290
|
-
function s(
|
|
291
|
-
return Object.prototype.hasOwnProperty.apply(
|
|
218
|
+
load(t, e, i = !0) {
|
|
219
|
+
return f(this, null, function* () {
|
|
220
|
+
function s(p) {
|
|
221
|
+
return Object.prototype.hasOwnProperty.apply(p, ["version"]);
|
|
292
222
|
}
|
|
293
223
|
const r = t;
|
|
294
224
|
r && k(r.version) && console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");
|
|
295
|
-
const a = JSON.parse(JSON.stringify(t)), h = s(a) ? a.data : a,
|
|
296
|
-
this.data = yield v(h), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data,
|
|
225
|
+
const a = JSON.parse(JSON.stringify(t)), h = s(a) ? a.data : a, c = this.data;
|
|
226
|
+
this.data = yield v(h), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, c), e && this.updateState(e, i), this.render();
|
|
297
227
|
});
|
|
298
228
|
}
|
|
299
229
|
/** 更新户型图位置 */
|
|
300
230
|
updatePosition() {
|
|
301
231
|
var a;
|
|
302
|
-
const t = O(this.five, this.floorIndex, this.state.config.attachedTo),
|
|
303
|
-
if (!
|
|
232
|
+
const t = O(this.five, this.floorIndex, this.state.config.attachedTo), e = (a = this.five.model) == null ? void 0 : a.bounding.getCenter(new S.Vector3()).setY(t);
|
|
233
|
+
if (!e)
|
|
304
234
|
return;
|
|
305
|
-
const
|
|
235
|
+
const i = e.clone().project(this.five.camera), s = (i.x + 1) / 2, r = -(i.y - 1) / 2;
|
|
306
236
|
this.container.style.left = s * 100 + "%", this.container.style.top = r * 100 + "%";
|
|
307
237
|
}
|
|
308
238
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
@@ -311,82 +241,82 @@ class ne extends M {
|
|
|
311
241
|
return t.appendChild(this.container), this.render(), this;
|
|
312
242
|
}
|
|
313
243
|
show() {
|
|
314
|
-
return
|
|
244
|
+
return f(this, arguments, function* (t = {}) {
|
|
315
245
|
if (this.state.visible)
|
|
316
246
|
return;
|
|
317
|
-
const
|
|
318
|
-
this.updateState({ visible: !0 },
|
|
247
|
+
const e = t.userAction !== void 0 ? t.userAction : !0;
|
|
248
|
+
this.updateState({ visible: !0 }, e), this._show({ userAction: e });
|
|
319
249
|
});
|
|
320
250
|
}
|
|
321
251
|
hide() {
|
|
322
|
-
return
|
|
252
|
+
return f(this, arguments, function* (t = {}) {
|
|
323
253
|
if (this.isHiddenByHideFunc = !0, !this.state.visible)
|
|
324
254
|
return;
|
|
325
|
-
const
|
|
326
|
-
this.updateState({ visible: !1 },
|
|
255
|
+
const e = t.userAction !== void 0 ? t.userAction : !0;
|
|
256
|
+
this.updateState({ visible: !1 }, e), this._hide({ userAction: e });
|
|
327
257
|
});
|
|
328
258
|
}
|
|
329
259
|
enable(t = {}) {
|
|
330
260
|
if (this.state.enabled)
|
|
331
261
|
return;
|
|
332
|
-
const
|
|
333
|
-
this.updateState({ enabled: !0 }, t.userAction ||
|
|
262
|
+
const e = t.userAction !== void 0 ? t.userAction : !0;
|
|
263
|
+
this.updateState({ enabled: !0 }, t.userAction || e), this._enable({ userAction: e });
|
|
334
264
|
}
|
|
335
265
|
disable(t = {}) {
|
|
336
266
|
if (!this.state.enabled)
|
|
337
267
|
return;
|
|
338
|
-
const
|
|
339
|
-
this.updateState({ enabled: !1 }, t.userAction ||
|
|
268
|
+
const e = t.userAction !== void 0 ? t.userAction : !0;
|
|
269
|
+
this.updateState({ enabled: !1 }, t.userAction || e), this._disable({ userAction: e });
|
|
340
270
|
}
|
|
341
271
|
/** 更改插件 State */
|
|
342
|
-
setState(t,
|
|
343
|
-
const
|
|
344
|
-
if (this.updateState(t, s), t.enabled !== void 0 &&
|
|
272
|
+
setState(t, e = {}) {
|
|
273
|
+
const i = this.state, s = e.userAction !== void 0 ? e.userAction : !0;
|
|
274
|
+
if (this.updateState(t, s), t.enabled !== void 0 && i.enabled !== t.enabled) {
|
|
345
275
|
const r = { userAction: s };
|
|
346
276
|
t.enabled ? this._enable(r) : this._disable(r);
|
|
347
277
|
}
|
|
348
|
-
if (t.visible !== void 0 &&
|
|
278
|
+
if (t.visible !== void 0 && i.visible !== t.visible) {
|
|
349
279
|
const r = { userAction: s };
|
|
350
280
|
t.visible ? this._show(r) : this._hide(r);
|
|
351
281
|
}
|
|
352
282
|
}
|
|
353
|
-
changeConfigs(t,
|
|
354
|
-
this.updateState({ config: t },
|
|
283
|
+
changeConfigs(t, e = !0) {
|
|
284
|
+
this.updateState({ config: t }, e), this.render();
|
|
355
285
|
}
|
|
356
286
|
formatData(t) {
|
|
357
|
-
return
|
|
287
|
+
return f(this, null, function* () {
|
|
358
288
|
return yield v(t.data);
|
|
359
289
|
});
|
|
360
290
|
}
|
|
361
291
|
_show(t) {
|
|
362
|
-
return
|
|
292
|
+
return f(this, null, function* () {
|
|
363
293
|
if (!this.state.enabled)
|
|
364
294
|
return;
|
|
365
295
|
this.isHiddenByHideFunc = !1;
|
|
366
|
-
const { userAction:
|
|
367
|
-
this.hooks.emit("show", { userAction:
|
|
368
|
-
const
|
|
369
|
-
b(this.five, s,
|
|
296
|
+
const { userAction: e } = t;
|
|
297
|
+
this.hooks.emit("show", { userAction: e, auto: !1 }), this.five.getCurrentState().mode !== "Topview" && (yield P(this.five, ["Topview", void 0, void 0, e])), this.five.model.show(this.floorIndex), this.updatePosition(), this.updateSize();
|
|
298
|
+
const i = 500, s = this.state.config.modelOpacity;
|
|
299
|
+
b(this.five, s, i), this.hooks.emit("showAnimationEnded", { userAction: e, auto: !1 }), this.render();
|
|
370
300
|
});
|
|
371
301
|
}
|
|
372
302
|
_hide(t) {
|
|
373
|
-
return
|
|
303
|
+
return f(this, null, function* () {
|
|
374
304
|
if (!this.state.enabled)
|
|
375
305
|
return;
|
|
376
|
-
const { userAction:
|
|
377
|
-
this.hooks.emit("hide", { userAction:
|
|
378
|
-
const
|
|
379
|
-
b(this.five,
|
|
306
|
+
const { userAction: e } = t;
|
|
307
|
+
this.hooks.emit("hide", { userAction: e, auto: !1 });
|
|
308
|
+
const i = 1, s = 0;
|
|
309
|
+
b(this.five, i, s), this.render();
|
|
380
310
|
});
|
|
381
311
|
}
|
|
382
312
|
_enable(t) {
|
|
383
|
-
const { userAction:
|
|
384
|
-
this.addEventListener(), this.wrapper && this.wrapper.append(this.container), this.hooks.emit("enable", { userAction:
|
|
313
|
+
const { userAction: e } = t;
|
|
314
|
+
this.addEventListener(), this.wrapper && this.wrapper.append(this.container), this.hooks.emit("enable", { userAction: e }), this.state.visible && this._show({ userAction: e });
|
|
385
315
|
}
|
|
386
|
-
updateState(t,
|
|
316
|
+
updateState(t, e) {
|
|
387
317
|
var a;
|
|
388
|
-
const
|
|
389
|
-
this.state =
|
|
318
|
+
const i = this.state, s = (a = t.config) != null && a.missingFloorConfig ? l(l({}, i.config.missingFloorConfig), t.config.missingFloorConfig) : i.config.missingFloorConfig, r = t.config ? m(l(l({}, i.config), t.config), { missingFloorConfig: s }) : i.config;
|
|
319
|
+
this.state = m(l(l({}, this.state), t), { config: r }), !y(this.state, i, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
|
|
390
320
|
}
|
|
391
321
|
addEventListener() {
|
|
392
322
|
if (!this.state.enabled || this.hasAddedEventListener)
|
|
@@ -416,7 +346,7 @@ class ne extends M {
|
|
|
416
346
|
render(t) {
|
|
417
347
|
if (!this.state.enabled || !this.container || !this.data || this.size.width === 0)
|
|
418
348
|
return;
|
|
419
|
-
const
|
|
349
|
+
const e = m(l({}, this.state.config), {
|
|
420
350
|
visible: this.state.visible,
|
|
421
351
|
duration: t != null ? t : 0,
|
|
422
352
|
panoIndex: this.panoIndex,
|
|
@@ -426,10 +356,10 @@ class ne extends M {
|
|
|
426
356
|
highlightData: this.highlightData
|
|
427
357
|
});
|
|
428
358
|
if (this.app)
|
|
429
|
-
return this.app.$set(
|
|
430
|
-
this.app = new I({ target: this.container, intro: !0, props:
|
|
359
|
+
return this.app.$set(e);
|
|
360
|
+
this.app = new I({ target: this.container, intro: !0, props: e });
|
|
431
361
|
}
|
|
432
362
|
}
|
|
433
363
|
export {
|
|
434
|
-
|
|
364
|
+
Bt as Controller
|
|
435
365
|
};
|
|
@@ -50,88 +50,18 @@ import "../../shared-utils/Utils/BaseUtil.js";
|
|
|
50
50
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
51
51
|
import "../../shared-utils/five/transformPosition.js";
|
|
52
52
|
import "../../shared-utils/three/temp.js";
|
|
53
|
-
import "../../Sculpt/utils/Modules/Global.js";
|
|
54
|
-
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
55
|
-
import "../../Object3DHelperPlugin/Controller.js";
|
|
56
53
|
import "../../shared-utils/three/THREESphere.js";
|
|
57
|
-
import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
58
|
-
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
59
|
-
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
60
|
-
import "../../shared-utils/three/IObject3D.js";
|
|
61
|
-
import "../../shared-utils/three/boundingBox.js";
|
|
62
|
-
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
63
|
-
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
64
|
-
import "../../shared-utils/Object3DHelper/Constants/color.js";
|
|
65
|
-
import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
66
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
67
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
68
|
-
import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
69
|
-
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
70
|
-
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
71
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
72
|
-
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
73
|
-
import "../../shared-utils/three/centerPoint.js";
|
|
74
|
-
import "../../shared-utils/three/getObjectVisible.js";
|
|
75
54
|
import "animejs";
|
|
76
|
-
import "../../shared-utils/isNil.js";
|
|
77
|
-
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
78
55
|
import "../../shared-utils/url/absoluteUrl.js";
|
|
79
|
-
import "../../
|
|
80
|
-
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
81
|
-
import "../../shared-utils/util.js";
|
|
82
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
83
|
-
import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
84
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
85
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
86
|
-
import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
87
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
88
|
-
import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
89
|
-
import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
90
|
-
import "../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
91
|
-
import "../../shared-utils/threex/domevents/index.js";
|
|
92
|
-
import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
93
|
-
import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
94
|
-
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
95
|
-
import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
96
|
-
import "../../shared-utils/Object3DHelper/index.js";
|
|
97
|
-
import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
98
|
-
import "../../shared-utils/math/deg2Rad.js";
|
|
99
|
-
import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
100
|
-
import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
101
|
-
import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
102
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
103
|
-
import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
104
|
-
import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
105
|
-
import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
106
|
-
import "../../shared-utils/five/fiveModelLoad.js";
|
|
107
|
-
import "../../shared-utils/five/FiveDomEvents.js";
|
|
108
|
-
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
109
|
-
import "../../shared-utils/three/THREERaycaster.js";
|
|
110
|
-
import "../../shared-utils/three/PointSelector/index.js";
|
|
111
|
-
import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
112
|
-
import "../../shared-utils/three/Magnifier.js";
|
|
113
|
-
import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
114
|
-
import "../../shared-utils/three/Assets/index.js";
|
|
115
|
-
import "../../shared-utils/three/PointSelector/utils/html.js";
|
|
116
|
-
import "../../shared-utils/five/initialCSS3DRender.js";
|
|
117
|
-
import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
118
|
-
import "../../Sculpt/Meshes/Line.js";
|
|
119
|
-
import "../../Sculpt/typings/style.js";
|
|
120
|
-
import "../../shared-utils/five/FiveLine.js";
|
|
121
|
-
import "../../Sculpt/utils/removeAllTag.js";
|
|
122
|
-
import "../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
123
|
-
import "../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
124
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
125
|
-
import "../../shared-utils/isTouchDevice.js";
|
|
126
|
-
import "../../shared-utils/five/getPosition.js";
|
|
127
|
-
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
56
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
128
57
|
import "../../shared-utils/five/changeMode.js";
|
|
129
58
|
import "../../shared-utils/nearlyEqual.js";
|
|
130
59
|
import "../../shared-utils/to.js";
|
|
131
60
|
import "../../shared-utils/getPxmm.js";
|
|
132
61
|
import "../../shared-utils/changeModelCanvasOpacity.js";
|
|
133
|
-
|
|
62
|
+
import "../../shared-utils/isNil.js";
|
|
63
|
+
const fo = (o, r) => new t(o, r);
|
|
134
64
|
export {
|
|
135
|
-
|
|
136
|
-
|
|
65
|
+
fo as TopviewFloorplanPlugin,
|
|
66
|
+
fo as default
|
|
137
67
|
};
|
package/libs/floorplan/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import "hammerjs";
|
|
|
4
4
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
5
5
|
import "@realsee/five/line";
|
|
6
6
|
import "../shared-utils/tag.js";
|
|
7
|
-
import "../Sculpt/utils/Modules/Global.js";
|
|
8
7
|
import "../shared-utils/three/THREESphere.js";
|
|
9
8
|
import "animejs";
|
|
10
9
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|