@realsee/dnalogel 3.44.5 → 3.46.0
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/Area.d.ts +1 -1
- package/dist/Sculpt/Meshes/Box.d.ts +1 -1
- package/dist/Sculpt/Meshes/Circle.d.ts +1 -1
- package/dist/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Line.d.ts +8 -2
- package/dist/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/dist/Sculpt/Meshes/Point.d.ts +1 -1
- package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Prism.d.ts +1 -1
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/dist/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +33 -0
- package/dist/Sculpt/Objects/Point/index.d.ts +1 -1
- package/dist/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/dist/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/dist/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/dist/Sculpt/index.d.ts +5 -0
- package/dist/Sculpt/typings/index.d.ts +11 -6
- package/dist/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/dist/Sculpt/typings/utils.type.d.ts +2 -0
- package/dist/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/dist/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/dist/index.cjs.js +56 -56
- package/dist/index.js +29820 -29686
- package/dist/index.umd.js +49 -49
- package/dist/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/dist/shared-utils/tag.d.ts +6 -3
- package/libs/AreaMakerPlugin/Controller.js +150 -78
- package/libs/AreaMakerPlugin/index.js +76 -4
- package/libs/AreaMakerPlugin/utils/Item.js +190 -111
- package/libs/CSS3DRenderPlugin/Controller.js +89 -29
- package/libs/CSS3DRenderPlugin/index.js +75 -15
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +132 -58
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +181 -116
- package/libs/CruisePlugin/BaseController.js +121 -49
- package/libs/CruisePlugin/Move.js +73 -21
- package/libs/CruisePlugin/Work.js +98 -46
- package/libs/CruisePlugin/index.js +79 -27
- package/libs/CurrentPanoImagePlugin/Controller.js +176 -104
- package/libs/CurrentPanoImagePlugin/index.js +76 -4
- package/libs/GuideLinePlugin/Controller.js +82 -30
- package/libs/GuideLinePlugin/GuideLineItem.js +82 -30
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +81 -29
- package/libs/GuideLinePlugin/index.js +79 -27
- package/libs/ModelMakerPlugin/Controller.js +140 -83
- package/libs/ModelMakerPlugin/index.js +75 -18
- package/libs/ModelTVVideoPlugin/Plugin.js +117 -57
- package/libs/ModelTVVideoPlugin/index.js +68 -8
- package/libs/Object3DHelperPlugin/Controller.js +54 -31
- package/libs/Object3DHelperPlugin/index.js +35 -13
- package/libs/PanoCompassPlugin/Controller.js +97 -42
- package/libs/PanoCompassPlugin/index.js +71 -16
- package/libs/PanoDoorLabelPlugin/BaseController.js +98 -26
- package/libs/PanoDoorLabelPlugin/Controller.js +187 -115
- package/libs/PanoDoorLabelPlugin/index.js +76 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -89
- package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -127
- package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -73
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +167 -92
- package/libs/PanoMeasurePlugin/Controller/index.js +110 -65
- package/libs/PanoMeasurePlugin/Model/area.js +114 -38
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +78 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -46
- package/libs/PanoMeasurePlugin/index.js +77 -32
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +98 -20
- package/libs/PanoSpatialTagPlugin/Plugin.js +210 -150
- package/libs/PanoSpatialTagPlugin/index.js +66 -6
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +133 -53
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +295 -216
- package/libs/PanoTagPlugin/Components/Tag/index.js +257 -187
- package/libs/PanoTagPlugin/Components/TagContainer.js +157 -87
- package/libs/PanoTagPlugin/Components/TagItem.js +144 -74
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +73 -3
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +109 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +105 -35
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +113 -43
- package/libs/PanoTagPlugin/controller/TagRender.js +132 -80
- package/libs/PanoTagPlugin/controller/TagUtil.js +136 -84
- package/libs/PanoTagPlugin/controller/index.js +113 -61
- package/libs/PanoTagPlugin/index.js +89 -37
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +121 -41
- package/libs/PanoVideoPlugin/Controller.js +137 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +149 -69
- package/libs/PanoVideoPlugin/index.js +82 -10
- package/libs/PipelinePlugin/Controller.js +199 -128
- package/libs/PipelinePlugin/index.js +76 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +102 -22
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +95 -15
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +136 -56
- package/libs/Sculpt/Meshes/Area.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.js +16 -15
- package/libs/Sculpt/Meshes/Circle.d.ts +1 -1
- package/libs/Sculpt/Meshes/Circle.js +1 -1
- package/libs/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Cylinder.js +8 -7
- package/libs/Sculpt/Meshes/Line.d.ts +8 -2
- package/libs/Sculpt/Meshes/Line.js +93 -65
- package/libs/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/libs/Sculpt/Meshes/LineWithDots.js +26 -26
- package/libs/Sculpt/Meshes/Point.d.ts +1 -1
- package/libs/Sculpt/Meshes/Point.js +7 -6
- package/libs/Sculpt/Meshes/Polygon.js +1 -1
- package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Polyline.js +5 -4
- package/libs/Sculpt/Meshes/Prism.d.ts +1 -1
- package/libs/Sculpt/Meshes/Rectangle.js +3 -2
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/libs/Sculpt/Objects/Box/index.js +41 -43
- package/libs/Sculpt/Objects/Cylinder/index.js +35 -37
- package/libs/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/libs/Sculpt/Objects/Line/Editor.js +62 -0
- package/libs/Sculpt/Objects/Line/index.d.ts +33 -0
- package/libs/Sculpt/Objects/Line/index.js +107 -0
- package/libs/Sculpt/Objects/Point/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/libs/Sculpt/Objects/Polygon/Editor.js +5 -5
- package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/libs/Sculpt/Objects/Polygon/index.js +80 -80
- package/libs/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/libs/Sculpt/Objects/Polyline/Editor.js +10 -48
- package/libs/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/libs/Sculpt/Objects/Polyline/index.js +63 -58
- package/libs/Sculpt/Objects/Prism/index.js +56 -58
- package/libs/Sculpt/index.d.ts +5 -0
- package/libs/Sculpt/index.js +58 -48
- package/libs/Sculpt/typings/index.d.ts +11 -6
- package/libs/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/libs/Sculpt/typings/utils.type.d.ts +2 -0
- package/libs/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/libs/Sculpt/utils/three/ColoredMesh.js +15 -14
- package/libs/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/libs/Sculpt/utils/three/rayOnLine.js +15 -14
- package/libs/base/BasePlugin.js +14 -13
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +131 -61
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +75 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +129 -59
- package/libs/floorplan/ModelFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +158 -86
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +76 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +151 -81
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +194 -192
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +23 -23
- package/libs/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/libs/shared-utils/Utils/WorkUtil.js +8 -7
- 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/PointSelector/utils/PointSelectorHelper.js +15 -15
- package/libs/shared-utils/three/index.js +1 -0
- package/package.json +1 -1
- package/dist/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- package/libs/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- /package/libs/Sculpt/{utils/color.js → typings/style.js} +0 -0
|
@@ -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,75 @@ 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 "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
156
|
+
import "../../shared-utils/isTouchDevice.js";
|
|
157
|
+
import "../../shared-utils/five/getPosition.js";
|
|
158
|
+
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
89
159
|
function W(d) {
|
|
90
160
|
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
161
|
return e || i;
|
|
@@ -94,9 +164,9 @@ function z(d) {
|
|
|
94
164
|
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
165
|
return e && i;
|
|
96
166
|
}
|
|
97
|
-
class
|
|
167
|
+
class di extends T {
|
|
98
168
|
constructor(t, e) {
|
|
99
|
-
var a,
|
|
169
|
+
var a, p, c;
|
|
100
170
|
super(t);
|
|
101
171
|
// =============== public properties =================
|
|
102
172
|
o(this, "name", "modelFloorplanPlugin");
|
|
@@ -145,22 +215,22 @@ class qt extends T {
|
|
|
145
215
|
* @param opts.isAutoShow 是否是自动展示
|
|
146
216
|
* @param opts.userAction 是否是用户行为
|
|
147
217
|
*/
|
|
148
|
-
o(this, "show", (...e) =>
|
|
218
|
+
o(this, "show", (...e) => f(this, [...e], function* (t = {}) {
|
|
149
219
|
if (!this.state.enabled || !this.showPromise && this.state.visible)
|
|
150
220
|
return;
|
|
151
221
|
const i = t.userAction !== void 0 ? t.userAction : !0;
|
|
152
222
|
this.updateState({ visible: !0 }, i), this._show(t);
|
|
153
223
|
}));
|
|
154
224
|
/** 隐藏户型图 */
|
|
155
|
-
o(this, "hide", (...e) =>
|
|
225
|
+
o(this, "hide", (...e) => f(this, [...e], function* (t = {}) {
|
|
156
226
|
this.state.enabled && (this.isHiddenByHideFunc = !0, this.state.visible !== !1 && (this.updateState({ visible: !1 }, t.userAction || !0), this._hide(t)));
|
|
157
227
|
}));
|
|
158
228
|
/** 更新户型图大小 */
|
|
159
229
|
o(this, "updateSize", () => {
|
|
160
230
|
if (!this.data || !this.container || !this.wrapper)
|
|
161
231
|
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 ===
|
|
232
|
+
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);
|
|
233
|
+
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
234
|
});
|
|
165
235
|
o(this, "highlight", (t) => {
|
|
166
236
|
this.state.config.highlightEnable && (this.highlightData = t, this.render());
|
|
@@ -169,22 +239,22 @@ class qt extends T {
|
|
|
169
239
|
this.highlightData = {}, this.render();
|
|
170
240
|
});
|
|
171
241
|
o(this, "_disable", (t) => {
|
|
172
|
-
var i,
|
|
242
|
+
var i, r, h;
|
|
173
243
|
const { userAction: e } = t;
|
|
174
|
-
this.hooks.emit("disable", { userAction: e }), (i = this.showRejection) == null || i.call(this,
|
|
244
|
+
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
245
|
});
|
|
176
246
|
o(this, "_enable", (t) => {
|
|
177
247
|
const { userAction: e } = t;
|
|
178
248
|
this.addEventListener(), this.wrapper && (this.wrapper.append(this.container), this.hooks.emit("enable", { userAction: e }), this.state.visible && this._show({ userAction: e }));
|
|
179
249
|
});
|
|
180
|
-
o(this, "_show", (t) =>
|
|
250
|
+
o(this, "_show", (t) => f(this, null, function* () {
|
|
181
251
|
var h;
|
|
182
252
|
if (!this.state.enabled)
|
|
183
253
|
return;
|
|
184
254
|
if (!((h = this.five.model) != null && h.loaded))
|
|
185
|
-
throw new Error(
|
|
255
|
+
throw new Error(u.ModelNotLoaded);
|
|
186
256
|
if (!this.data)
|
|
187
|
-
throw new Error(
|
|
257
|
+
throw new Error(u.DataNotLoaded);
|
|
188
258
|
if (this.showPromise)
|
|
189
259
|
return this.showPromise;
|
|
190
260
|
const e = {
|
|
@@ -193,36 +263,36 @@ class qt extends T {
|
|
|
193
263
|
immediately: !1,
|
|
194
264
|
isAutoShow: !1,
|
|
195
265
|
userAction: !0
|
|
196
|
-
}, i = l(l({}, e), t),
|
|
266
|
+
}, i = l(l({}, e), t), r = () => f(this, null, function* () {
|
|
197
267
|
this.hooks.emit("show", { userAction: i.userAction, auto: i.isAutoShow });
|
|
198
|
-
let
|
|
199
|
-
this.showRejection = (
|
|
200
|
-
|
|
268
|
+
let n = !1, a;
|
|
269
|
+
this.showRejection = (m) => {
|
|
270
|
+
n = !0, a = m;
|
|
201
271
|
};
|
|
202
|
-
const [
|
|
203
|
-
if (
|
|
204
|
-
throw
|
|
205
|
-
if (
|
|
206
|
-
throw a ? new Error(a) : new Error(
|
|
272
|
+
const [p] = yield I(k(this.five, this.showState, i.userAction));
|
|
273
|
+
if (p)
|
|
274
|
+
throw p;
|
|
275
|
+
if (n)
|
|
276
|
+
throw a ? new Error(a) : new Error(u.UnknownError);
|
|
207
277
|
if (!this.updateSize())
|
|
208
|
-
throw new Error(
|
|
278
|
+
throw new Error(u.UpdateSizeError);
|
|
209
279
|
this.floorIndex = i.floorIndex, this.five.model.show(this.floorIndex);
|
|
210
280
|
});
|
|
211
|
-
return this.isHiddenByHideFunc = !1, this.showPromise =
|
|
281
|
+
return this.isHiddenByHideFunc = !1, this.showPromise = r().then(() => {
|
|
212
282
|
this.showPromise = void 0, this.showRejection = void 0;
|
|
213
|
-
const
|
|
214
|
-
F(this.five,
|
|
283
|
+
const n = i.modelOpacity, a = i.immediately ? 0 : H;
|
|
284
|
+
F(this.five, n, a), this.render(a), this.hooks.emit("showAnimationEnded", {
|
|
215
285
|
auto: i.isAutoShow,
|
|
216
286
|
userAction: i.userAction
|
|
217
287
|
});
|
|
218
|
-
}).catch((
|
|
219
|
-
if (this.showPromise = void 0, this.showRejection = void 0, this.updateState({ visible: !1 }, i.userAction), !i.isAutoShow &&
|
|
220
|
-
throw
|
|
288
|
+
}).catch((n) => {
|
|
289
|
+
if (this.showPromise = void 0, this.showRejection = void 0, this.updateState({ visible: !1 }, i.userAction), !i.isAutoShow && n instanceof Error)
|
|
290
|
+
throw n;
|
|
221
291
|
}), this.showPromise;
|
|
222
292
|
}));
|
|
223
293
|
o(this, "_hide", (t) => {
|
|
224
|
-
var
|
|
225
|
-
(
|
|
294
|
+
var r;
|
|
295
|
+
(r = this.showRejection) == null || r.call(this, u.BreakOffByHide), this.showPromise = void 0;
|
|
226
296
|
const i = l(l({}, {
|
|
227
297
|
userAction: !0,
|
|
228
298
|
isAutoHide: !1
|
|
@@ -303,7 +373,7 @@ class qt extends T {
|
|
|
303
373
|
imageURL: this.staticPrefix + "/release/web/saas/missing-floorplan.e274c596.png",
|
|
304
374
|
imageWidth: 200,
|
|
305
375
|
imageHeight: 120,
|
|
306
|
-
text: (
|
|
376
|
+
text: (c = (p = e.i18n) == null ? void 0 : p.call(e, "暂无平面图")) != null ? c : "暂无平面图",
|
|
307
377
|
textFontSize: 14
|
|
308
378
|
};
|
|
309
379
|
const i = {
|
|
@@ -324,22 +394,22 @@ class qt extends T {
|
|
|
324
394
|
attachedTo: O.BOUNDING_CENTER,
|
|
325
395
|
getLabelElement: void 0,
|
|
326
396
|
missingFloorConfig: l(l({}, this.defaultMissingFloorConfig), e.missingFloorConfig),
|
|
327
|
-
i18n: (
|
|
328
|
-
getRoomAreaText: (
|
|
329
|
-
getRoomDimensionText: (
|
|
330
|
-
getRuleDistanceText: (
|
|
331
|
-
},
|
|
332
|
-
this.state = { enabled: !0, visible: !1, config:
|
|
397
|
+
i18n: (m) => m,
|
|
398
|
+
getRoomAreaText: (m) => (m / 1e6).toFixed(1) + "㎡",
|
|
399
|
+
getRoomDimensionText: (m, A) => (m / 1e3).toFixed(1) + "m × " + (A / 1e3).toFixed(1) + "m",
|
|
400
|
+
getRuleDistanceText: (m) => m.toString()
|
|
401
|
+
}, r = e ? L(e, ["selector", "scale"]) : {}, h = l(l({}, i.missingFloorConfig), r.missingFloorConfig), n = g(l(l({}, i), r), { missingFloorConfig: h });
|
|
402
|
+
this.state = { enabled: !0, visible: !1, config: n }, this.initContainer(), t.once("dispose", this.dispose), this.addEventListener();
|
|
333
403
|
}
|
|
334
404
|
load(t, e, i = !0) {
|
|
335
|
-
return
|
|
336
|
-
function
|
|
337
|
-
return Object.prototype.hasOwnProperty.apply(
|
|
405
|
+
return f(this, null, function* () {
|
|
406
|
+
function r(c) {
|
|
407
|
+
return Object.prototype.hasOwnProperty.apply(c, ["version"]);
|
|
338
408
|
}
|
|
339
409
|
const h = t;
|
|
340
410
|
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,
|
|
411
|
+
const n = JSON.parse(JSON.stringify(t)), a = r(n) ? n.data : n, p = this.data;
|
|
412
|
+
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
413
|
});
|
|
344
414
|
}
|
|
345
415
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
@@ -363,9 +433,9 @@ class qt extends T {
|
|
|
363
433
|
}
|
|
364
434
|
/** 更改插件 State */
|
|
365
435
|
setState(t, e = {}) {
|
|
366
|
-
const i = this.state,
|
|
367
|
-
if (this.updateState(t,
|
|
368
|
-
const h = { userAction:
|
|
436
|
+
const i = this.state, r = e.userAction !== void 0 ? e.userAction : !0;
|
|
437
|
+
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) {
|
|
438
|
+
const h = { userAction: r };
|
|
369
439
|
t.visible ? this._show(h) : this._hide(h);
|
|
370
440
|
}
|
|
371
441
|
this.render();
|
|
@@ -374,13 +444,13 @@ class qt extends T {
|
|
|
374
444
|
this.updateState({ config: t }, e), this.render();
|
|
375
445
|
}
|
|
376
446
|
formatData(t) {
|
|
377
|
-
return
|
|
447
|
+
return f(this, null, function* () {
|
|
378
448
|
return yield b(t.data);
|
|
379
449
|
});
|
|
380
450
|
}
|
|
381
451
|
updateState(t, e) {
|
|
382
|
-
var
|
|
383
|
-
const i = this.state,
|
|
452
|
+
var n;
|
|
453
|
+
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
454
|
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
455
|
}
|
|
386
456
|
/** 如果用户是通过 selector 设置父容器,需要在 modelLoaded 之后把 container 自动放到父容器里
|
|
@@ -425,5 +495,5 @@ class qt extends T {
|
|
|
425
495
|
}
|
|
426
496
|
}
|
|
427
497
|
export {
|
|
428
|
-
|
|
498
|
+
di as Controller
|
|
429
499
|
};
|
|
@@ -43,23 +43,93 @@ 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 "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
123
|
+
import "../../shared-utils/isTouchDevice.js";
|
|
124
|
+
import "../../shared-utils/five/getPosition.js";
|
|
125
|
+
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
55
126
|
import "../utils/correctFiveState.js";
|
|
56
127
|
import "../utils/constant.js";
|
|
57
128
|
import "../../shared-utils/nearlyEqual.js";
|
|
58
129
|
import "../../shared-utils/five/changeMode.js";
|
|
59
130
|
import "../../shared-utils/changeModelCanvasOpacity.js";
|
|
60
|
-
|
|
61
|
-
const ao = (o, r) => new t(o, r);
|
|
131
|
+
const qr = (o, r) => new t(o, r);
|
|
62
132
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
133
|
+
qr as ModelFloorplanPlugin,
|
|
134
|
+
qr as default
|
|
65
135
|
};
|