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