@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,15 +2,15 @@ var $ = Object.defineProperty, B = Object.defineProperties;
|
|
|
2
2
|
var U = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var C = Object.getOwnPropertySymbols;
|
|
4
4
|
var G = Object.prototype.hasOwnProperty, N = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var T = (
|
|
6
|
-
for (var
|
|
7
|
-
G.call(a,
|
|
5
|
+
var T = (p, a, e) => a in p ? $(p, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[a] = e, H = (p, a) => {
|
|
6
|
+
for (var e in a || (a = {}))
|
|
7
|
+
G.call(a, e) && T(p, e, a[e]);
|
|
8
8
|
if (C)
|
|
9
|
-
for (var
|
|
10
|
-
N.call(a,
|
|
11
|
-
return
|
|
12
|
-
}, W = (
|
|
13
|
-
var
|
|
9
|
+
for (var e of C(a))
|
|
10
|
+
N.call(a, e) && T(p, e, a[e]);
|
|
11
|
+
return p;
|
|
12
|
+
}, W = (p, a) => B(p, U(a));
|
|
13
|
+
var r = (p, a, e) => (T(p, typeof a != "symbol" ? a + "" : a, e), e);
|
|
14
14
|
import { Raycaster as Q, Vector3 as V, Quaternion as j, Euler as z } from "three";
|
|
15
15
|
import { BasePanoPluginController as q } from "./BaseController.js";
|
|
16
16
|
import X from "./DoorLabelItem.js";
|
|
@@ -30,170 +30,98 @@ import "../shared-utils/Utils/BaseUtil.js";
|
|
|
30
30
|
import "../shared-utils/Utils/WorkUtil.js";
|
|
31
31
|
import "../shared-utils/five/transformPosition.js";
|
|
32
32
|
import "../shared-utils/three/temp.js";
|
|
33
|
-
import "../Sculpt/utils/Modules/Global.js";
|
|
34
|
-
import "../Sculpt/utils/Modules/Cursor.js";
|
|
35
|
-
import "../Object3DHelperPlugin/Controller.js";
|
|
36
33
|
import "../shared-utils/three/THREESphere.js";
|
|
37
|
-
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
38
|
-
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
39
|
-
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
40
|
-
import "../shared-utils/three/IObject3D.js";
|
|
41
|
-
import "../shared-utils/three/boundingBox.js";
|
|
42
|
-
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
43
|
-
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
44
|
-
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
45
|
-
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
46
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
47
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
48
|
-
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
49
|
-
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
50
|
-
import "../CSS3DRenderPlugin/utils/even.js";
|
|
51
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
52
|
-
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
53
|
-
import "../shared-utils/three/centerPoint.js";
|
|
54
|
-
import "../shared-utils/three/getObjectVisible.js";
|
|
55
34
|
import "animejs";
|
|
56
|
-
import "../shared-utils/isNil.js";
|
|
57
|
-
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
58
35
|
import "../shared-utils/url/absoluteUrl.js";
|
|
59
|
-
import "../
|
|
60
|
-
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
61
|
-
import "../shared-utils/util.js";
|
|
62
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
63
|
-
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
64
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
65
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
66
|
-
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
67
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
68
|
-
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
69
|
-
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
70
|
-
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
71
|
-
import "../shared-utils/threex/domevents/index.js";
|
|
72
|
-
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
73
|
-
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
74
|
-
import "../Sculpt/utils/three/rayOnLine.js";
|
|
75
|
-
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
76
|
-
import "../shared-utils/Object3DHelper/index.js";
|
|
77
|
-
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
78
|
-
import "../shared-utils/math/rad2Deg.js";
|
|
79
|
-
import "../shared-utils/math/deg2Rad.js";
|
|
80
|
-
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
81
|
-
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
82
|
-
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
83
|
-
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
84
|
-
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
85
|
-
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
86
|
-
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
87
|
-
import "../shared-utils/five/fiveModelLoad.js";
|
|
88
|
-
import "../shared-utils/five/FiveDomEvents.js";
|
|
89
|
-
import "../shared-utils/five/calculateThreeMouse.js";
|
|
90
|
-
import "../shared-utils/three/THREERaycaster.js";
|
|
91
|
-
import "../shared-utils/three/PointSelector/index.js";
|
|
92
|
-
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
93
|
-
import "../shared-utils/three/Magnifier.js";
|
|
94
|
-
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
95
|
-
import "../shared-utils/three/Assets/index.js";
|
|
96
|
-
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
97
|
-
import "../shared-utils/five/initialCSS3DRender.js";
|
|
98
|
-
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
99
|
-
import "../Sculpt/Meshes/Line.js";
|
|
100
|
-
import "../Sculpt/typings/style.js";
|
|
101
|
-
import "../shared-utils/five/FiveLine.js";
|
|
102
|
-
import "../Sculpt/utils/removeAllTag.js";
|
|
103
|
-
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
104
|
-
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
105
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
106
|
-
import "../shared-utils/isTouchDevice.js";
|
|
107
|
-
import "../shared-utils/five/getPosition.js";
|
|
108
|
-
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
36
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
109
37
|
import "../vendor/svelte/internal/index.js";
|
|
110
38
|
import "../vendor/classnames/index.js";
|
|
111
|
-
const
|
|
112
|
-
class
|
|
113
|
-
constructor(
|
|
114
|
-
super(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
39
|
+
const ee = { userAction: !0 };
|
|
40
|
+
class Me extends q {
|
|
41
|
+
constructor(e) {
|
|
42
|
+
super(e);
|
|
43
|
+
r(this, "MinVisibledistance", 1.8);
|
|
44
|
+
r(this, "MaxVisibledistance", 5);
|
|
45
|
+
r(this, "OffsetHeight", -1.3);
|
|
118
46
|
// 标签页面高度偏移值
|
|
119
|
-
|
|
120
|
-
|
|
47
|
+
r(this, "rooms");
|
|
48
|
+
r(this, "floorplanServerData");
|
|
121
49
|
/** 标签项 */
|
|
122
|
-
|
|
50
|
+
r(this, "doorLabelItems");
|
|
123
51
|
/** 每个点位 visible 标签的缓存 */
|
|
124
|
-
|
|
52
|
+
r(this, "visibleLabelMap", /* @__PURE__ */ new Map());
|
|
125
53
|
/** 标签项Prop值 */
|
|
126
|
-
|
|
54
|
+
r(this, "labelItems", []);
|
|
127
55
|
/** 数据 */
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData =
|
|
56
|
+
r(this, "doorLabels");
|
|
57
|
+
r(this, "roomObservers");
|
|
58
|
+
r(this, "loadData", (e, n) => {
|
|
59
|
+
n && (this.MaxVisibledistance = n.MaxVisibledistance, this.MinVisibledistance = n.MinVisibledistance, this.OffsetHeight = n.OffsetHeight), this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((d) => {
|
|
60
|
+
d.$destroy();
|
|
61
|
+
}), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData = e, typeof this.five.ready == "function" ? this.five.ready().then(() => this.initData()) : this.five.once("panoArrived", () => {
|
|
134
62
|
this.initData();
|
|
135
63
|
});
|
|
136
64
|
});
|
|
137
|
-
|
|
138
|
-
var l,
|
|
139
|
-
const
|
|
140
|
-
const s =
|
|
141
|
-
if (
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
return { panoIndex: s, floorIndex:
|
|
65
|
+
r(this, "initRoomObservers", () => {
|
|
66
|
+
var l, h;
|
|
67
|
+
const e = this.floorplanServerData.computed_data.floor_datas || [], d = (((h = (l = this.five) == null ? void 0 : l.work) == null ? void 0 : h.observers) || []).map((o) => {
|
|
68
|
+
const s = o.panoIndex, f = o.floorIndex, i = e == null ? void 0 : e.find((t) => t.floor_index === f);
|
|
69
|
+
if (i) {
|
|
70
|
+
const t = i.rooms.find((c) => c.observer_indexs.includes(s));
|
|
71
|
+
if (t)
|
|
72
|
+
return { panoIndex: s, floorIndex: f, name: t.name };
|
|
145
73
|
}
|
|
146
74
|
}).filter(Boolean);
|
|
147
|
-
this.roomObservers =
|
|
75
|
+
this.roomObservers = d;
|
|
148
76
|
});
|
|
149
|
-
|
|
150
|
-
this.labelItems.forEach((
|
|
151
|
-
|
|
77
|
+
r(this, "hideAllLabels", () => {
|
|
78
|
+
this.labelItems.forEach((e) => {
|
|
79
|
+
e.visible = !1, e.inSight = !1;
|
|
152
80
|
}), this.render();
|
|
153
81
|
});
|
|
154
|
-
|
|
82
|
+
r(this, "fixDoorVisibleAndPosition", () => {
|
|
155
83
|
this.initRoomObservers();
|
|
156
|
-
const { panoIndex:
|
|
157
|
-
if (!this.visible || this.five.model.empty ||
|
|
84
|
+
const { panoIndex: e } = this.five;
|
|
85
|
+
if (!this.visible || this.five.model.empty || e === null || !this.roomObservers.find((o) => o.panoIndex === e))
|
|
158
86
|
return;
|
|
159
|
-
const
|
|
160
|
-
if (this.visibleLabelMap.has(
|
|
161
|
-
return this.visibleLabelMap.get(
|
|
87
|
+
const n = this.roomObservers.find((o) => o.panoIndex === e), l = this.five.work.observers.find((o) => o.panoIndex === e).position.clone(), h = (() => {
|
|
88
|
+
if (this.visibleLabelMap.has(e))
|
|
89
|
+
return this.visibleLabelMap.get(e);
|
|
162
90
|
{
|
|
163
|
-
const
|
|
164
|
-
return this.doorLabels.forEach((s,
|
|
165
|
-
if (s.roomName ===
|
|
91
|
+
const o = [];
|
|
92
|
+
return this.doorLabels.forEach((s, f) => {
|
|
93
|
+
if (s.roomName === n.name)
|
|
166
94
|
return;
|
|
167
|
-
const
|
|
168
|
-
if (
|
|
95
|
+
const i = s.position.clone(), t = i.distanceTo(l);
|
|
96
|
+
if (t < this.MinVisibledistance || t > this.MaxVisibledistance)
|
|
169
97
|
return;
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
const [b] = this.five.model.intersectRaycaster(
|
|
173
|
-
b && b.distance + 0.1 <
|
|
174
|
-
}), this.visibleLabelMap.set(
|
|
98
|
+
const c = new Q(), v = i.clone().sub(l).normalize();
|
|
99
|
+
c.set(l, v);
|
|
100
|
+
const [b] = this.five.model.intersectRaycaster(c);
|
|
101
|
+
b && b.distance + 0.1 < t || o.push(f);
|
|
102
|
+
}), this.visibleLabelMap.set(e, o), o;
|
|
175
103
|
}
|
|
176
104
|
})();
|
|
177
|
-
this.labelItems.forEach((
|
|
178
|
-
|
|
105
|
+
this.labelItems.forEach((o, s) => {
|
|
106
|
+
o.visible = h.includes(s);
|
|
179
107
|
}), this.fixDoorPosition();
|
|
180
108
|
});
|
|
181
|
-
|
|
182
|
-
var
|
|
183
|
-
const { panoIndex:
|
|
184
|
-
if (
|
|
109
|
+
r(this, "fixDoorPosition", () => {
|
|
110
|
+
var i, t, c, v, b, y, g, w, L, E, _, S;
|
|
111
|
+
const { panoIndex: e, camera: n } = this.five;
|
|
112
|
+
if (e === null)
|
|
185
113
|
return;
|
|
186
114
|
if (this.five.currentMode !== "Panorama")
|
|
187
115
|
return this.hideAllLabels();
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
const x =
|
|
192
|
-
|
|
116
|
+
const d = this.five.getElement(), l = d.clientWidth, h = d.clientHeight, o = n.getWorldDirection(new V()), s = [], f = [...this.labelItems];
|
|
117
|
+
if (f.forEach((m, u) => {
|
|
118
|
+
if (m.visible) {
|
|
119
|
+
const x = n.position.distanceTo(m.position), M = m.position.clone().add(new V(0, this.OffsetHeight, 0)), A = M.clone().sub(n.position).normalize().angleTo(o), O = M.clone().project(n), P = (O.x + 1) / 2.2 * 100, I = (-O.y + 1) / 2.2 * 100, D = P >= 0 && P <= 100 && I >= 0 && I <= 100 && x > this.MinVisibledistance && x <= this.MaxVisibledistance;
|
|
120
|
+
m.left = P, m.top = I, m.inSight = D && A < Math.PI / 2, m.cameraToward = Y(this.five), D ? s.push({ disFromCameraToLabel: x, left: P, top: I, index: u }) : m.transform = "translate(-50%, -50%)";
|
|
193
121
|
} else
|
|
194
|
-
|
|
122
|
+
m.inSight = !1;
|
|
195
123
|
}), s.length > 1) {
|
|
196
|
-
let
|
|
124
|
+
let m = 0;
|
|
197
125
|
s.sort((u, x) => x.disFromCameraToLabel - u.disFromCameraToLabel);
|
|
198
126
|
for (let u = 1; u < s.length; u++) {
|
|
199
127
|
const { index: x, left: M, top: k } = s[u - 1], { index: A, left: O, top: P } = s[u], I = this.container.children[x], D = this.container.children[A];
|
|
@@ -201,68 +129,68 @@ class Nt extends q {
|
|
|
201
129
|
return;
|
|
202
130
|
const R = {
|
|
203
131
|
left: l * M / 100,
|
|
204
|
-
top:
|
|
205
|
-
width: (
|
|
132
|
+
top: h * k / 100,
|
|
133
|
+
width: (c = (t = (i = I.children) == null ? void 0 : i[0]) == null ? void 0 : t.clientWidth) != null ? c : 0,
|
|
206
134
|
height: (y = (b = (v = I.children) == null ? void 0 : v[0]) == null ? void 0 : b.clientHeight) != null ? y : 0
|
|
207
135
|
}, F = {
|
|
208
136
|
left: l * O / 100,
|
|
209
|
-
top:
|
|
137
|
+
top: h * P / 100,
|
|
210
138
|
width: (L = (w = (g = D.children) == null ? void 0 : g[0]) == null ? void 0 : w.clientWidth) != null ? L : 0,
|
|
211
139
|
height: (S = (_ = (E = D.children) == null ? void 0 : E[0]) == null ? void 0 : _.clientHeight) != null ? S : 0
|
|
212
140
|
};
|
|
213
|
-
Z(R, F) && (
|
|
141
|
+
Z(R, F) && (m++, f[x].transform = `translate(-50%, ${(m - 1) * 100 - 50}%)`, f[A].transform = `translate(-50%, ${m * 100 - 50}%)`);
|
|
214
142
|
}
|
|
215
143
|
}
|
|
216
|
-
this.labelItems =
|
|
144
|
+
this.labelItems = f, this.render();
|
|
217
145
|
});
|
|
218
|
-
|
|
146
|
+
r(this, "onClick", (e, n) => {
|
|
219
147
|
if (!this.roomObservers)
|
|
220
148
|
return;
|
|
221
|
-
const { work:
|
|
222
|
-
let l,
|
|
223
|
-
for (const s of
|
|
224
|
-
if (this.roomObservers.find((
|
|
225
|
-
const
|
|
226
|
-
|
|
149
|
+
const { work: d } = this.five;
|
|
150
|
+
let l, h, o = 1 / 0;
|
|
151
|
+
for (const s of d.observers)
|
|
152
|
+
if (this.roomObservers.find((i) => i.panoIndex === s.panoIndex && i.name === e)) {
|
|
153
|
+
const i = s.standingPosition, t = n.distanceTo(i);
|
|
154
|
+
t < o && (l = s.panoIndex, h = i.clone().sub(n).normalize(), o = t);
|
|
227
155
|
}
|
|
228
|
-
if (
|
|
156
|
+
if (h !== null && l !== null) {
|
|
229
157
|
const s = {};
|
|
230
|
-
if (
|
|
231
|
-
const
|
|
232
|
-
|
|
158
|
+
if (o > 0) {
|
|
159
|
+
const i = new V(0, 0, -1), t = h.clone(), c = new j();
|
|
160
|
+
c.setFromUnitVectors(i, t);
|
|
233
161
|
const v = new z();
|
|
234
|
-
v.setFromQuaternion(
|
|
162
|
+
v.setFromQuaternion(c, "YXZ"), s.longitude = v.y;
|
|
235
163
|
}
|
|
236
164
|
this.five.emit("wantsToMoveToPano", l, {}, !0) || this.five.moveToPano(l, { longitude: s.longitude });
|
|
237
165
|
}
|
|
238
166
|
});
|
|
239
|
-
|
|
167
|
+
r(this, "initData", () => {
|
|
240
168
|
var l;
|
|
241
169
|
this.doorLabels = [];
|
|
242
|
-
const
|
|
243
|
-
this.rooms =
|
|
244
|
-
var
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
const
|
|
248
|
-
let
|
|
170
|
+
const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index, d = n !== void 0 && ((l = this.floorplanServerData.computed_data.floor_datas[n]) == null ? void 0 : l.rooms);
|
|
171
|
+
this.rooms = d, this.rooms && this.rooms.length > 0 && this.rooms.forEach((h) => {
|
|
172
|
+
var f;
|
|
173
|
+
const o = (f = this.floorplanServerData.computed_data.doors) == null ? void 0 : f.filter((i) => !!(i && i.name === h.name)), s = this.five.work.observers.filter((i, t) => !!h.observer_indexs.find((c) => c === t));
|
|
174
|
+
o && o.forEach((i) => {
|
|
175
|
+
const t = i.position;
|
|
176
|
+
let c = 1 / 0, v;
|
|
249
177
|
s.forEach((y) => {
|
|
250
178
|
const g = y.standingPosition, w = {
|
|
251
179
|
x: g.x,
|
|
252
180
|
y: g.y,
|
|
253
181
|
z: g.z
|
|
254
|
-
}, L = J(
|
|
255
|
-
L <
|
|
256
|
-
}), v && (
|
|
257
|
-
const b = new V(
|
|
258
|
-
b.add(new V(-0.2, 1.8, 0).applyEuler(new z(0,
|
|
259
|
-
roomName:
|
|
260
|
-
name:
|
|
182
|
+
}, L = J(t, w);
|
|
183
|
+
L < c && (c = L, v = w);
|
|
184
|
+
}), v && (t.y = v.y + 0.01);
|
|
185
|
+
const b = new V(t.x, t.y, t.z);
|
|
186
|
+
b.add(new V(-0.2, 1.8, 0).applyEuler(new z(0, i.rad, 0))), this.doorLabels.push({
|
|
187
|
+
roomName: h.name,
|
|
188
|
+
name: i.name,
|
|
261
189
|
position: b,
|
|
262
|
-
toward: K(
|
|
190
|
+
toward: K(i.rad)
|
|
263
191
|
});
|
|
264
192
|
});
|
|
265
|
-
}), this.labelItems = this.doorLabels.map((
|
|
193
|
+
}), this.labelItems = this.doorLabels.map((h) => W(H({}, h), {
|
|
266
194
|
left: 0,
|
|
267
195
|
top: 0,
|
|
268
196
|
visible: !1,
|
|
@@ -272,33 +200,33 @@ class Nt extends q {
|
|
|
272
200
|
})), this.five.on("wantsToMoveToPano", this.hideAllLabels), this.five.on("modelLoaded", this.fixDoorVisibleAndPosition), this.five.on("panoArrived", this.fixDoorVisibleAndPosition), this.five.on("initAnimationEnded", this.fixDoorPosition), this.five.on("cameraUpdate", this.fixDoorPosition), this.five.on("mouseWheel", this.fixDoorPosition), this.five.on("pinchGesture", this.fixDoorPosition), this.fixDoorVisibleAndPosition();
|
|
273
201
|
});
|
|
274
202
|
}
|
|
275
|
-
stateChangedCallback(
|
|
203
|
+
stateChangedCallback(e, n) {
|
|
276
204
|
if (this.hooks.hasListener("stateChange")) {
|
|
277
|
-
const
|
|
205
|
+
const d = {
|
|
278
206
|
state: this.state,
|
|
279
|
-
prevState:
|
|
280
|
-
userAction:
|
|
207
|
+
prevState: e,
|
|
208
|
+
userAction: n ? n.userAction : ee.userAction
|
|
281
209
|
};
|
|
282
|
-
this.hooks.emit("stateChange",
|
|
210
|
+
this.hooks.emit("stateChange", d);
|
|
283
211
|
}
|
|
284
212
|
}
|
|
285
213
|
render() {
|
|
286
214
|
if (!this.enabled) {
|
|
287
|
-
this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((
|
|
288
|
-
|
|
215
|
+
this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((e) => {
|
|
216
|
+
e == null || e.$destroy();
|
|
289
217
|
}), this.doorLabels = void 0;
|
|
290
218
|
return;
|
|
291
219
|
}
|
|
292
|
-
this.doorLabelItems && this.doorLabelItems.forEach((
|
|
293
|
-
|
|
294
|
-
}), this.doorLabelItems = [], this.labelItems.forEach((
|
|
220
|
+
this.doorLabelItems && this.doorLabelItems.forEach((e) => {
|
|
221
|
+
e.$destroy();
|
|
222
|
+
}), this.doorLabelItems = [], this.labelItems.forEach((e) => {
|
|
295
223
|
this.doorLabelItems.push(
|
|
296
224
|
new X({
|
|
297
225
|
target: this.container,
|
|
298
226
|
props: {
|
|
299
|
-
props:
|
|
227
|
+
props: e,
|
|
300
228
|
onClick: () => {
|
|
301
|
-
this.onClick(
|
|
229
|
+
this.onClick(e.name, e.position);
|
|
302
230
|
}
|
|
303
231
|
}
|
|
304
232
|
})
|
|
@@ -313,5 +241,5 @@ class Nt extends q {
|
|
|
313
241
|
}
|
|
314
242
|
}
|
|
315
243
|
export {
|
|
316
|
-
|
|
244
|
+
Me as PanoDoorLabelPluginController
|
|
317
245
|
};
|
|
@@ -16,88 +16,16 @@ import "../shared-utils/Utils/BaseUtil.js";
|
|
|
16
16
|
import "../shared-utils/Utils/WorkUtil.js";
|
|
17
17
|
import "../shared-utils/five/transformPosition.js";
|
|
18
18
|
import "../shared-utils/three/temp.js";
|
|
19
|
-
import "../Sculpt/utils/Modules/Global.js";
|
|
20
|
-
import "../Sculpt/utils/Modules/Cursor.js";
|
|
21
|
-
import "../Object3DHelperPlugin/Controller.js";
|
|
22
19
|
import "../shared-utils/three/THREESphere.js";
|
|
23
|
-
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
24
|
-
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
25
|
-
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
26
|
-
import "../shared-utils/three/IObject3D.js";
|
|
27
|
-
import "../shared-utils/three/boundingBox.js";
|
|
28
|
-
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
29
|
-
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
30
|
-
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
31
|
-
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
32
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
33
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
34
|
-
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
35
|
-
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
36
|
-
import "../CSS3DRenderPlugin/utils/even.js";
|
|
37
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
38
|
-
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
39
|
-
import "../shared-utils/three/centerPoint.js";
|
|
40
|
-
import "../shared-utils/three/getObjectVisible.js";
|
|
41
20
|
import "animejs";
|
|
42
|
-
import "../shared-utils/isNil.js";
|
|
43
|
-
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
44
21
|
import "../shared-utils/url/absoluteUrl.js";
|
|
45
|
-
import "../
|
|
46
|
-
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
47
|
-
import "../shared-utils/util.js";
|
|
48
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
49
|
-
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
50
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
51
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
52
|
-
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
53
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
54
|
-
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
55
|
-
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
56
|
-
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
57
|
-
import "../shared-utils/threex/domevents/index.js";
|
|
58
|
-
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
59
|
-
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
60
|
-
import "../Sculpt/utils/three/rayOnLine.js";
|
|
61
|
-
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
62
|
-
import "../shared-utils/Object3DHelper/index.js";
|
|
63
|
-
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
64
|
-
import "../shared-utils/math/rad2Deg.js";
|
|
65
|
-
import "../shared-utils/math/deg2Rad.js";
|
|
66
|
-
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
67
|
-
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
68
|
-
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
69
|
-
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
70
|
-
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
71
|
-
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
72
|
-
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
73
|
-
import "../shared-utils/five/fiveModelLoad.js";
|
|
74
|
-
import "../shared-utils/five/FiveDomEvents.js";
|
|
75
|
-
import "../shared-utils/five/calculateThreeMouse.js";
|
|
76
|
-
import "../shared-utils/three/THREERaycaster.js";
|
|
77
|
-
import "../shared-utils/three/PointSelector/index.js";
|
|
78
|
-
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
79
|
-
import "../shared-utils/three/Magnifier.js";
|
|
80
|
-
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
81
|
-
import "../shared-utils/three/Assets/index.js";
|
|
82
|
-
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
83
|
-
import "../shared-utils/five/initialCSS3DRender.js";
|
|
84
|
-
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
85
|
-
import "../Sculpt/Meshes/Line.js";
|
|
86
|
-
import "../Sculpt/typings/style.js";
|
|
87
|
-
import "../shared-utils/five/FiveLine.js";
|
|
88
|
-
import "../Sculpt/utils/removeAllTag.js";
|
|
89
|
-
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
90
|
-
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
91
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
92
|
-
import "../shared-utils/isTouchDevice.js";
|
|
93
|
-
import "../shared-utils/five/getPosition.js";
|
|
94
|
-
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
22
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
95
23
|
import "./DoorLabelItem.js";
|
|
96
24
|
import "../vendor/svelte/internal/index.js";
|
|
97
25
|
import "../vendor/classnames/index.js";
|
|
98
26
|
import "./utils.js";
|
|
99
|
-
const
|
|
27
|
+
const y = (o) => new r(o);
|
|
100
28
|
export {
|
|
101
|
-
|
|
102
|
-
|
|
29
|
+
y as PanoDoorLabelPlugin,
|
|
30
|
+
y as default
|
|
103
31
|
};
|