@realsee/dnalogel 3.49.6 → 3.49.7
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 +4 -0
- package/dist/index.cjs.js +13 -13
- package/dist/index.js +360 -351
- package/dist/index.umd.js +13 -13
- package/dist/shared-utils/tag.d.ts +5 -0
- package/libs/CruisePlugin/Move.js +2 -3
- package/libs/CruisePlugin/Work.js +2 -3
- package/libs/CruisePlugin/index.js +6 -7
- package/libs/GuideLinePlugin/Controller.js +4 -5
- package/libs/GuideLinePlugin/GuideLineItem.js +2 -3
- package/libs/GuideLinePlugin/GuideLineModeItem.js +2 -3
- package/libs/GuideLinePlugin/index.js +6 -7
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +34 -23
- package/libs/PanoTagPlugin/controller/index.js +5 -6
- package/libs/PanoTagPlugin/index.js +11 -12
- package/libs/Sculpt/Meshes/Line.js +7 -7
- package/libs/Sculpt/Meshes/Polygon.js +12 -12
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +125 -126
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +5 -0
- package/libs/shared-utils/tag.js +7 -0
- package/package.json +1 -1
- package/dist/PanoTagPlugin/utils/requestIdleCallback.d.ts +0 -2
|
@@ -208,7 +208,6 @@ import "../shared-utils/isTouchDevice.js";
|
|
|
208
208
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
209
209
|
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
210
210
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
211
|
-
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
212
211
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
213
212
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
214
213
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
@@ -225,7 +224,7 @@ import "./utils/coordinatesToVector.js";
|
|
|
225
224
|
import "./utils/safeCall.js";
|
|
226
225
|
import "./utils/sleep.js";
|
|
227
226
|
import "../shared-utils/five/fiveLoaded.js";
|
|
228
|
-
class
|
|
227
|
+
class yo extends z {
|
|
229
228
|
constructor(t, r) {
|
|
230
229
|
var h;
|
|
231
230
|
super(t, r);
|
|
@@ -333,5 +332,5 @@ class So extends z {
|
|
|
333
332
|
}
|
|
334
333
|
}
|
|
335
334
|
export {
|
|
336
|
-
|
|
335
|
+
yo as default
|
|
337
336
|
};
|
|
@@ -210,7 +210,6 @@ import "../shared-utils/isTouchDevice.js";
|
|
|
210
210
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
211
211
|
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
212
212
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
213
|
-
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
214
213
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
215
214
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
216
215
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
@@ -225,7 +224,7 @@ import "./utils/getFiveStateOnCurve.js";
|
|
|
225
224
|
import "../shared-utils/formatRad.js";
|
|
226
225
|
import "./Work.js";
|
|
227
226
|
import "./utils/coordinatesToVector.js";
|
|
228
|
-
class
|
|
227
|
+
class Sr extends G {
|
|
229
228
|
constructor(t, e) {
|
|
230
229
|
super(t, e);
|
|
231
230
|
k(this, "state", {
|
|
@@ -613,5 +612,5 @@ class Ir extends G {
|
|
|
613
612
|
}
|
|
614
613
|
}
|
|
615
614
|
export {
|
|
616
|
-
|
|
615
|
+
Sr as default
|
|
617
616
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { typing as
|
|
1
|
+
import { typing as Qt } from "./typing/index.js";
|
|
2
2
|
import t from "./Work.js";
|
|
3
3
|
import i from "./Move.js";
|
|
4
4
|
import "../GuideLinePlugin/index.js";
|
|
@@ -180,7 +180,6 @@ import "../shared-utils/isTouchDevice.js";
|
|
|
180
180
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
181
181
|
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
182
182
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
183
|
-
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
184
183
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
185
184
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
186
185
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
@@ -197,13 +196,13 @@ import "./utils/sleep.js";
|
|
|
197
196
|
import "../shared-utils/five/fiveLoaded.js";
|
|
198
197
|
import "./BaseController.js";
|
|
199
198
|
import "./utils/getFiveStateOnCurve.js";
|
|
200
|
-
const
|
|
199
|
+
const Kt = (o, r) => new t(o, r), Lt = (o, r) => new i(o, r);
|
|
201
200
|
export {
|
|
202
|
-
|
|
201
|
+
Kt as CruisePlugin,
|
|
203
202
|
t as CruisePluginController,
|
|
204
|
-
|
|
203
|
+
Qt as CruisePluginTypes,
|
|
205
204
|
i as MoveController,
|
|
206
|
-
|
|
205
|
+
Lt as MovePlugin,
|
|
207
206
|
t as WalkController,
|
|
208
|
-
|
|
207
|
+
Kt as default
|
|
209
208
|
};
|
|
@@ -204,7 +204,6 @@ import "../shared-utils/isTouchDevice.js";
|
|
|
204
204
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
205
205
|
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
206
206
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
207
|
-
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
208
207
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
209
208
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
210
209
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
@@ -224,8 +223,8 @@ import "../CruisePlugin/utils/coordinatesToVector.js";
|
|
|
224
223
|
import "../CruisePlugin/utils/safeCall.js";
|
|
225
224
|
import "../CruisePlugin/utils/sleep.js";
|
|
226
225
|
import "../shared-utils/five/fiveLoaded.js";
|
|
227
|
-
const b = "GuideLinePlugin", g = `${b}`,
|
|
228
|
-
class
|
|
226
|
+
const b = "GuideLinePlugin", g = `${b}`, we = (s) => `${g}--${s}`;
|
|
227
|
+
class De extends N {
|
|
229
228
|
constructor(t, i) {
|
|
230
229
|
super(t, i);
|
|
231
230
|
h(this, "name", b);
|
|
@@ -367,6 +366,6 @@ class ye extends N {
|
|
|
367
366
|
}
|
|
368
367
|
}
|
|
369
368
|
export {
|
|
370
|
-
|
|
371
|
-
|
|
369
|
+
De as default,
|
|
370
|
+
we as pluginFlag
|
|
372
371
|
};
|
|
@@ -5,7 +5,7 @@ import "../shared-utils/five/changeMode.js";
|
|
|
5
5
|
import "../CruisePlugin/Move.js";
|
|
6
6
|
import "../CruisePlugin/Work.js";
|
|
7
7
|
import "../shared-utils/Subscribe.js";
|
|
8
|
-
import { GuideLineItem as
|
|
8
|
+
import { GuideLineItem as Ko } from "./GuideLineItem/index.js";
|
|
9
9
|
import "three";
|
|
10
10
|
import "./utils/createLineGeometry.js";
|
|
11
11
|
import "../vendor/polyline-normals/index.js";
|
|
@@ -176,7 +176,6 @@ import "../base/BasePlugin.js";
|
|
|
176
176
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
177
177
|
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
178
178
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
179
|
-
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
180
179
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
181
180
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
182
181
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
@@ -197,5 +196,5 @@ import "../CruisePlugin/utils/safeCall.js";
|
|
|
197
196
|
import "../CruisePlugin/utils/sleep.js";
|
|
198
197
|
import "../shared-utils/five/fiveLoaded.js";
|
|
199
198
|
export {
|
|
200
|
-
|
|
199
|
+
Ko as GuideLineItem
|
|
201
200
|
};
|
|
@@ -16,7 +16,7 @@ import "../PanoTagPlugin/controller/index.js";
|
|
|
16
16
|
import "./Components/Tag.js";
|
|
17
17
|
import "./utils/index.js";
|
|
18
18
|
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
19
|
-
import { GuideLineModeItem as
|
|
19
|
+
import { GuideLineModeItem as gm } from "./GuideLineModeItem/index.js";
|
|
20
20
|
import "../vendor/polyline-normals/index.js";
|
|
21
21
|
import "../vendor/polyline-miter-util/index.js";
|
|
22
22
|
import "../vendor/gl-vec2/add.js";
|
|
@@ -173,11 +173,10 @@ import "../base/BasePlugin.js";
|
|
|
173
173
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
174
174
|
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
175
175
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
176
|
-
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
177
176
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
178
177
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
179
178
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
180
179
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
181
180
|
export {
|
|
182
|
-
|
|
181
|
+
gm as GuideLineModeItem
|
|
183
182
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import t from "./Controller.js";
|
|
2
|
-
import { GuideLineItem$1 as
|
|
3
|
-
import { GuideLineModeItem$1 as
|
|
2
|
+
import { GuideLineItem$1 as Nt } from "./GuideLineItem/index.js";
|
|
3
|
+
import { GuideLineModeItem$1 as Qt } from "./GuideLineModeItem/index.js";
|
|
4
4
|
import "../base/BasePluginWithData.js";
|
|
5
5
|
import "../base/BasePlugin.js";
|
|
6
6
|
import "../shared-utils/Subscribe.js";
|
|
@@ -184,7 +184,6 @@ import "../shared-utils/isTouchDevice.js";
|
|
|
184
184
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
185
185
|
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
186
186
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
187
|
-
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
188
187
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
189
188
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
190
189
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
@@ -196,10 +195,10 @@ import "../shared-utils/five/changeMode.js";
|
|
|
196
195
|
import "../shared-utils/nearlyEqual.js";
|
|
197
196
|
import "../CruisePlugin/Move.js";
|
|
198
197
|
import "../CruisePlugin/utils/getFiveStateOnCurve.js";
|
|
199
|
-
const r = (i, o) => new t(i, o),
|
|
198
|
+
const r = (i, o) => new t(i, o), Ht = r;
|
|
200
199
|
export {
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
Nt as GuideLineItem,
|
|
201
|
+
Qt as GuideLineModeItem,
|
|
203
202
|
r as GuideLinePlugin,
|
|
204
|
-
|
|
203
|
+
Ht as default
|
|
205
204
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
var h = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
2
|
+
var m = (n, o, t) => o in n ? h(n, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[o] = t;
|
|
3
|
+
var l = (n, o, t) => (m(n, typeof o != "symbol" ? o + "" : o, t), t);
|
|
4
4
|
import { BaseTag as g } from "./BaseTag.js";
|
|
5
5
|
import * as c from "three";
|
|
6
|
-
import { cancelIdleCallback as b, requestIdleCallback as y } from "../../utils/requestIdleCallback.js";
|
|
7
6
|
import "../../../shared-utils/Subscribe.js";
|
|
8
7
|
import "../../utils/tag/calculateTagConfig.js";
|
|
9
8
|
import "../../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
@@ -46,33 +45,45 @@ import "../../../shared-utils/url/getUrl.js";
|
|
|
46
45
|
import "../../../shared-utils/five/getFloorIndex.js";
|
|
47
46
|
import "../../../shared-utils/safeObj.js";
|
|
48
47
|
import "../../utils/Cache.js";
|
|
49
|
-
const
|
|
50
|
-
class
|
|
48
|
+
const b = new c.Vector2();
|
|
49
|
+
class at extends g {
|
|
51
50
|
constructor(t, e) {
|
|
52
51
|
super(t, e);
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
l(this, "__Object__");
|
|
53
|
+
l(this, "requestIdleCallbackId");
|
|
55
54
|
}
|
|
56
55
|
/**
|
|
57
56
|
* @description 展开自己,收起其他标签
|
|
58
57
|
*/
|
|
59
58
|
unfoldAndFoldOthers() {
|
|
60
59
|
const t = this.can("fold"), e = this.can("unfold");
|
|
61
|
-
t && e && (this.state.unfolded = !this.state.unfolded, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }), this.state.unfolded && this.plugin.tags.forEach((
|
|
62
|
-
|
|
60
|
+
t && e && (this.state.unfolded = !this.state.unfolded, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }), this.state.unfolded && this.plugin.tags.forEach((s) => {
|
|
61
|
+
s.id !== this.id && s.fold();
|
|
63
62
|
}));
|
|
64
63
|
}
|
|
65
64
|
onClick(t) {
|
|
66
65
|
t.target === "TagPoint" && this.unfoldAndFoldOthers();
|
|
67
66
|
}
|
|
68
67
|
updateVisible() {
|
|
69
|
-
|
|
68
|
+
if (typeof window.requestIdleCallback == "undefined") {
|
|
70
69
|
super.updateVisible();
|
|
71
|
-
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const t = () => {
|
|
73
|
+
this.requestIdleCallbackId && cancelIdleCallback(this.requestIdleCallbackId), this.requestIdleCallbackId = requestIdleCallback(() => {
|
|
74
|
+
super.updateVisible();
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
let e = !1;
|
|
78
|
+
requestIdleCallback(() => {
|
|
79
|
+
e = !0;
|
|
80
|
+
}), t(), setTimeout(() => {
|
|
81
|
+
e || (this.requestIdleCallbackId && cancelIdleCallback(this.requestIdleCallbackId), super.updateVisible());
|
|
82
|
+
}, 200);
|
|
72
83
|
}
|
|
73
84
|
applyVisible() {
|
|
74
|
-
var t, e,
|
|
75
|
-
this.currentVisible && this.updateScreenPosition(), (
|
|
85
|
+
var t, e, s, i;
|
|
86
|
+
this.currentVisible && this.updateScreenPosition(), (s = (e = (t = this.tag3DContentSvelte) == null ? void 0 : t.css3DInstance) == null ? void 0 : e.css3DObject) == null || s.setVisible(this.currentVisible), (i = this.tag3DContentSvelte) == null || i.svelteApp.$set({
|
|
76
87
|
state: this.plugin.state,
|
|
77
88
|
temporaryState: this.temporaryState
|
|
78
89
|
}), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
|
|
@@ -88,34 +99,34 @@ class ct extends g {
|
|
|
88
99
|
* @param {boolean} unfolded
|
|
89
100
|
*/
|
|
90
101
|
setUnfold(t) {
|
|
91
|
-
const e = this.can("fold"),
|
|
92
|
-
e &&
|
|
102
|
+
const e = this.can("fold"), s = this.can("unfold");
|
|
103
|
+
e && s && (this.state.unfolded = t, this.hooks.emit(t ? "unfolded" : "folded"), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }));
|
|
93
104
|
}
|
|
94
105
|
setPosition(t) {
|
|
95
106
|
this.originPosition = t, this.position = t, this.cache.clear(), this.updateVisible(), this.updateScreenPosition(), this.updateZIndex(), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
|
|
96
107
|
}
|
|
97
108
|
updateScreenPosition(t) {
|
|
98
|
-
var
|
|
109
|
+
var a;
|
|
99
110
|
if (this.stickType !== "2DPoint" && this.stickType !== "3DPoint")
|
|
100
111
|
return;
|
|
101
|
-
const { force: e = !1 } = t != null ? t : {},
|
|
112
|
+
const { force: e = !1 } = t != null ? t : {}, s = e ? this.state.visible : this.currentVisible, i = (a = this.__Object__) != null ? a : {
|
|
102
113
|
timeoutId: void 0,
|
|
103
114
|
inAnimation: !1
|
|
104
115
|
};
|
|
105
|
-
if (this.__Object__ = i, !
|
|
116
|
+
if (this.__Object__ = i, !s && this.screenPosition ? (i.inAnimation = !0, i.timeoutId = setTimeout(() => {
|
|
106
117
|
requestAnimationFrame(() => {
|
|
107
118
|
this.currentVisible || (i.inAnimation = !1, this.screenPosition = null, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }));
|
|
108
119
|
});
|
|
109
|
-
}, 1e3)) : i.timeoutId && (clearTimeout(i.timeoutId), i.inAnimation = !1, i.timeoutId = void 0), !
|
|
120
|
+
}, 1e3)) : i.timeoutId && (clearTimeout(i.timeoutId), i.inAnimation = !1, i.timeoutId = void 0), !s && !i.inAnimation)
|
|
110
121
|
return;
|
|
111
122
|
const r = this.computeTagProject();
|
|
112
123
|
if (r) {
|
|
113
124
|
const d = (() => {
|
|
114
125
|
if (!this.currentConfig.simulate3D)
|
|
115
126
|
return 1;
|
|
116
|
-
const p = 2 * Math.tan(0.5 * this.five.camera.fov / 180 * Math.PI),
|
|
117
|
-
return Math.max(Math.min(1 - p *
|
|
118
|
-
})(), u = this.five.renderer.getSize(
|
|
127
|
+
const p = 2 * Math.tan(0.5 * this.five.camera.fov / 180 * Math.PI), f = this.getDistance(void 0, 1);
|
|
128
|
+
return Math.max(Math.min(1 - p * f / 40, 1), 0.5);
|
|
129
|
+
})(), u = this.five.renderer.getSize(b);
|
|
119
130
|
this.screenPosition = {
|
|
120
131
|
leftPx: (r.x + 1) / 2 * u.x,
|
|
121
132
|
topPx: (-r.y + 1) / 2 * u.y,
|
|
@@ -137,5 +148,5 @@ class ct extends g {
|
|
|
137
148
|
}
|
|
138
149
|
}
|
|
139
150
|
export {
|
|
140
|
-
|
|
151
|
+
at as PointTag
|
|
141
152
|
};
|
|
@@ -190,11 +190,10 @@ import "../../shared-utils/three/core/Raycaster.js";
|
|
|
190
190
|
import "../../shared-utils/isTouchDevice.js";
|
|
191
191
|
import "../../base/BasePlugin.js";
|
|
192
192
|
import "../utils/addDebugPoints.js";
|
|
193
|
-
import "../utils/requestIdleCallback.js";
|
|
194
193
|
import "../Components/TagItem.js";
|
|
195
194
|
import "../Components/Common/TagPoint.js";
|
|
196
|
-
const S = "Dnalogel-PanoTagPlugin",
|
|
197
|
-
class
|
|
195
|
+
const S = "Dnalogel-PanoTagPlugin", Ji = (d) => `${S}--${d}`;
|
|
196
|
+
class Zi extends O {
|
|
198
197
|
constructor(e, t) {
|
|
199
198
|
super(e);
|
|
200
199
|
/** state */
|
|
@@ -604,7 +603,7 @@ class Yi extends O {
|
|
|
604
603
|
}
|
|
605
604
|
}
|
|
606
605
|
export {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
606
|
+
Zi as PanoTagPluginController,
|
|
607
|
+
Zi as default,
|
|
608
|
+
Ji as pluginFlag
|
|
610
609
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "./controller/index.js";
|
|
2
|
-
import { pluginFlag as
|
|
3
|
-
import { defaultGlobalConfig as
|
|
4
|
-
import { ContentType as
|
|
2
|
+
import { pluginFlag as fr } from "./controller/index.js";
|
|
3
|
+
import { defaultGlobalConfig as ur } from "./typings/tag/TagConfig.js";
|
|
4
|
+
import { ContentType as Tr, DimensionType as xr, PointType as sr } from "./Archive/deprecated.js";
|
|
5
5
|
import "three";
|
|
6
6
|
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
7
7
|
import "../shared-utils/positionToVector3.js";
|
|
@@ -161,20 +161,19 @@ import "../shared-utils/animationFrame/index.js";
|
|
|
161
161
|
import "./utils/DebugUtil.js";
|
|
162
162
|
import "./utils/addDebugPoints.js";
|
|
163
163
|
import "./controller/Tag/PointTag.js";
|
|
164
|
-
import "./utils/requestIdleCallback.js";
|
|
165
164
|
import "./controller/Tag/PlaneTag.js";
|
|
166
165
|
import "./Components/TagContainer.js";
|
|
167
166
|
import "./Components/TagItem.js";
|
|
168
167
|
import "./Components/Common/TagPoint.js";
|
|
169
168
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
170
|
-
const
|
|
169
|
+
const er = (o, t) => new r(o, t);
|
|
171
170
|
export {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
Tr as ContentType,
|
|
172
|
+
xr as DimensionType,
|
|
173
|
+
er as PanoTagPlugin,
|
|
175
174
|
r as PanoTagPluginController,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
175
|
+
sr as PointType,
|
|
176
|
+
er as default,
|
|
177
|
+
ur as defaultGlobalConfig,
|
|
178
|
+
fr as pluginFlag
|
|
180
179
|
};
|
|
@@ -54,7 +54,7 @@ class M extends I {
|
|
|
54
54
|
}
|
|
55
55
|
class X extends C {
|
|
56
56
|
constructor(e) {
|
|
57
|
-
var s, r, c,
|
|
57
|
+
var s, r, c, g, a;
|
|
58
58
|
super();
|
|
59
59
|
h(this, "name", "LineMesh");
|
|
60
60
|
h(this, "points");
|
|
@@ -72,9 +72,9 @@ class X extends C {
|
|
|
72
72
|
dashScale: 40,
|
|
73
73
|
opacity: (c = e == null ? void 0 : e.opacity) != null ? c : 1,
|
|
74
74
|
transparent: !0,
|
|
75
|
-
dashed: (
|
|
75
|
+
dashed: (g = e == null ? void 0 : e.dashed) != null ? g : !1
|
|
76
76
|
}), n = new S({
|
|
77
|
-
color: new u.Color((
|
|
77
|
+
color: new u.Color((a = e == null ? void 0 : e.lineColor) != null ? a : b),
|
|
78
78
|
linewidth: t.linewidth * 0.9,
|
|
79
79
|
dashScale: t.dashScale,
|
|
80
80
|
opacity: t.opacity * 0.7,
|
|
@@ -172,11 +172,11 @@ class X extends C {
|
|
|
172
172
|
return [this.points[n - 1], t];
|
|
173
173
|
}).filter(d).map((t) => D(this, t));
|
|
174
174
|
i.forEach(([t, n], s) => {
|
|
175
|
-
var
|
|
175
|
+
var g;
|
|
176
176
|
const r = R(t, n);
|
|
177
|
-
this.lengthDoms[s] = (
|
|
178
|
-
const
|
|
179
|
-
return
|
|
177
|
+
this.lengthDoms[s] = (g = this.lengthDoms[s]) != null ? g : (() => {
|
|
178
|
+
const a = new x(this.five);
|
|
179
|
+
return a.intersectCheck = !1, a.simulate3D = !0, a;
|
|
180
180
|
})(), this.lengthDoms[s].setPosition(r, [t, n]);
|
|
181
181
|
const c = t.distanceTo(n).toFixed(2);
|
|
182
182
|
this.lengthDoms[s].lengthDom !== c && (this.lengthDoms[s].lengthDom = c, c === "0.00" ? this.lengthDoms[s].container.innerHTML = "" : this.lengthDoms[s].container.innerHTML = v(c + "m"));
|
|
@@ -18,8 +18,8 @@ import { anyPositionToVector3 as P } from "../../shared-utils/positionToVector3.
|
|
|
18
18
|
import { ColoredMesh as _ } from "../utils/three/ColoredMesh.js";
|
|
19
19
|
import { getGeometryInfo as A } from "../../shared-utils/three/geometryUtil.js";
|
|
20
20
|
import { LightTag as S } from "../../shared-utils/tag.js";
|
|
21
|
-
import { getLengthHTML as
|
|
22
|
-
import { applyObjectMatrixWorld as
|
|
21
|
+
import { getLengthHTML as D } from "../utils/Meshes/getLengthHTML.js";
|
|
22
|
+
import { applyObjectMatrixWorld as M } from "../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
23
23
|
const p = new l.BufferGeometry();
|
|
24
24
|
p.name = "blankGeometry";
|
|
25
25
|
p.isBlank = !0;
|
|
@@ -58,7 +58,7 @@ class G extends _ {
|
|
|
58
58
|
}
|
|
59
59
|
updateMatrixWorld(e) {
|
|
60
60
|
if (super.updateMatrixWorld(e), this.center) {
|
|
61
|
-
const s =
|
|
61
|
+
const s = M(this, this.center).toArray().join(",");
|
|
62
62
|
s !== this.lastRenderAreaItem && (this.updateAreaItems(), this.lastRenderAreaItem = s);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -66,9 +66,9 @@ class G extends _ {
|
|
|
66
66
|
this._paramsStyle = h(h({}, this._paramsStyle), e), super.setStyle(this._paramsStyle), this.updateAreaItems();
|
|
67
67
|
}
|
|
68
68
|
setPoints(e) {
|
|
69
|
-
var
|
|
69
|
+
var n;
|
|
70
70
|
const s = e.map(P);
|
|
71
|
-
this.points = s, this.geometry = (
|
|
71
|
+
this.points = s, this.geometry = (n = I(this.points, { checkLinesIntersect: !0 })) != null ? n : p, this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0, this.updateAreaItems();
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* @description: 获取一个点投影在当前平面上的点
|
|
@@ -86,21 +86,21 @@ class G extends _ {
|
|
|
86
86
|
this.points.length >= 3 ? this.planeHelper = new l.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.planeHelper = null, this.planeHelperNeedUpdate = !1;
|
|
87
87
|
}
|
|
88
88
|
updateAreaItems() {
|
|
89
|
-
var
|
|
89
|
+
var n;
|
|
90
90
|
const e = () => {
|
|
91
|
-
var
|
|
92
|
-
(
|
|
91
|
+
var o;
|
|
92
|
+
(o = this.areaDom) == null || o.destroy(), this.areaDom = void 0;
|
|
93
93
|
};
|
|
94
94
|
if (!this._paramsStyle.lengthEnable || !this.geometryInfo)
|
|
95
95
|
return e();
|
|
96
96
|
if (!this.five)
|
|
97
97
|
return console.error("Five not found");
|
|
98
|
-
this.areaDom = (
|
|
99
|
-
const
|
|
100
|
-
return
|
|
98
|
+
this.areaDom = (n = this.areaDom) != null ? n : (() => {
|
|
99
|
+
const o = new S(this.five);
|
|
100
|
+
return o.intersectCheck = !1, o.simulate3D = !0, o;
|
|
101
101
|
})(), this.areaDom.setPosition(this.center);
|
|
102
102
|
const s = this.geometryInfo.area.toFixed(2);
|
|
103
|
-
s === "0.00" ? this.areaDom.container.innerHTML = "" : this.areaDom.container.innerHTML =
|
|
103
|
+
s === "0.00" ? this.areaDom.container.innerHTML = "" : this.areaDom.container.innerHTML = D(s + "m²");
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
export {
|