@realsee/dnalogel 3.47.5 → 3.47.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 +6 -0
- package/dist/index.cjs.js +47 -47
- package/dist/index.js +3909 -3904
- package/dist/index.umd.js +38 -38
- package/dist/shared-utils/tag.d.ts +4 -1
- package/libs/AreaMakerPlugin/index.js +4 -4
- package/libs/AreaMakerPlugin/utils/Item.js +4 -4
- package/libs/CSS3DRenderPlugin/Controller.js +4 -4
- package/libs/CSS3DRenderPlugin/index.js +5 -5
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +4 -4
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +4 -4
- package/libs/CruisePlugin/BaseController.js +4 -4
- package/libs/CruisePlugin/index.js +4 -4
- package/libs/CurrentPanoImagePlugin/index.js +4 -4
- package/libs/GuideLinePlugin/GuideLineItem.js +4 -4
- package/libs/GuideLinePlugin/GuideLineModeItem.js +5 -5
- package/libs/GuideLinePlugin/index.js +4 -4
- package/libs/ModelMakerPlugin/index.js +4 -4
- package/libs/ModelMakerPlugin/item/baseItem.js +10 -6
- package/libs/ModelMakerPlugin/item/boxItem.js +6 -2
- package/libs/ModelMakerPlugin/item/polygonItem.js +6 -2
- package/libs/ModelMakerPlugin/item/prismItem.js +13 -9
- package/libs/ModelTVVideoPlugin/Plugin.js +4 -4
- package/libs/ModelTVVideoPlugin/index.js +4 -4
- package/libs/Object3DHelperPlugin/Controller.js +4 -4
- package/libs/Object3DHelperPlugin/index.js +4 -4
- package/libs/PanoCompassPlugin/Controller.js +4 -4
- package/libs/PanoCompassPlugin/index.js +4 -4
- package/libs/PanoDoorLabelPlugin/BaseController.js +4 -4
- package/libs/PanoDoorLabelPlugin/Controller.js +4 -4
- package/libs/PanoDoorLabelPlugin/index.js +4 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +5 -5
- package/libs/PanoMeasurePlugin/Components/Controller1.js +5 -5
- package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -5
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +5 -5
- package/libs/PanoMeasurePlugin/Controller/index.js +4 -4
- package/libs/PanoMeasurePlugin/Model/area.js +5 -5
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +4 -4
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +5 -5
- package/libs/PanoMeasurePlugin/index.js +5 -5
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +5 -5
- package/libs/PanoSpatialTagPlugin/Plugin.js +4 -4
- package/libs/PanoSpatialTagPlugin/index.js +4 -4
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +5 -5
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +5 -5
- package/libs/PanoTagPlugin/Components/Tag/index.js +5 -5
- package/libs/PanoTagPlugin/Components/TagContainer.js +5 -5
- package/libs/PanoTagPlugin/Components/TagItem.js +5 -5
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +3 -3
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +4 -4
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +4 -4
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +4 -4
- package/libs/PanoTagPlugin/controller/TagRender.js +5 -5
- package/libs/PanoTagPlugin/controller/TagUtil.js +4 -4
- package/libs/PanoTagPlugin/controller/index.js +5 -5
- package/libs/PanoTagPlugin/index.js +5 -5
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +5 -5
- package/libs/PanoVideoPlugin/Controller.js +5 -5
- package/libs/PanoVideoPlugin/VideoMeshController.js +5 -5
- package/libs/PanoVideoPlugin/index.js +5 -5
- package/libs/PipelinePlugin/Controller.js +4 -4
- package/libs/PipelinePlugin/index.js +4 -4
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +5 -5
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +5 -5
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +5 -5
- package/libs/Sculpt/Meshes/Line.js +53 -57
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -4
- package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -4
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +4 -4
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -4
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -4
- package/libs/index.js +5 -5
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +4 -1
- package/libs/shared-utils/tag.js +54 -45
- package/package.json +1 -1
package/libs/shared-utils/tag.js
CHANGED
|
@@ -1,39 +1,43 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { anyPositionToVector3 as
|
|
5
|
-
import * as
|
|
6
|
-
import { vector3ToScreen as
|
|
7
|
-
import { getFiveModel as
|
|
8
|
-
import { _raycaster as
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
|
+
var g = (h, t, e) => t in h ? u(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
|
|
3
|
+
var o = (h, t, e) => (g(h, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import { anyPositionToVector3 as d } from "./positionToVector3.js";
|
|
5
|
+
import * as b from "three";
|
|
6
|
+
import { vector3ToScreen as l } from "./five/vector3ToScreen.js";
|
|
7
|
+
import { getFiveModel as x } from "./five/getFiveModel.js";
|
|
8
|
+
import { _raycaster as m } from "./three/raycaster.js";
|
|
9
|
+
import { FiveUtil as U } from "./Utils/FiveUtil.js";
|
|
10
|
+
const v = "LightTagContainer_shgjakdhwakjdhsja", w = new b.Vector2();
|
|
11
|
+
class E {
|
|
11
12
|
constructor(t, e, s) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
o(this, "container");
|
|
14
|
+
o(this, "visible", !1);
|
|
15
|
+
o(this, "enabled", !1);
|
|
16
|
+
o(this, "wrapper");
|
|
17
|
+
o(this, "positionsForRotate");
|
|
18
|
+
o(this, "tagWrapper");
|
|
19
|
+
o(this, "five");
|
|
20
|
+
o(this, "originPosition");
|
|
21
|
+
o(this, "transformedPosition");
|
|
22
|
+
o(this, "disposer");
|
|
23
|
+
o(this, "config");
|
|
24
|
+
o(this, "fiveUtil");
|
|
25
|
+
o(this, "onCameraUpdate", () => {
|
|
23
26
|
this.visible !== !1 && this.updateScreenPosition();
|
|
24
27
|
});
|
|
25
|
-
|
|
28
|
+
o(this, "onFiveEveryReady", () => {
|
|
26
29
|
var t;
|
|
27
30
|
if (this.visible && this.five.state.mode !== "Panorama") {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
let e = 0.01;
|
|
32
|
+
this.fiveUtil.workUtil.fromType === "poincare" && (e = 0.05), m.set(this.five.camera.position, this.transformedPosition.clone().sub(this.five.camera.position));
|
|
33
|
+
const s = (t = x(this.five).intersectRaycaster(m)) == null ? void 0 : t[0];
|
|
34
|
+
(s == null ? void 0 : s.distance) + e > this.transformedPosition.distanceTo(this.five.camera.position) ? (this.container.style.opacity = "1", this.container.style.pointerEvents = "auto") : (this.container.style.opacity = "0", this.container.style.pointerEvents = "none");
|
|
31
35
|
}
|
|
32
36
|
});
|
|
33
|
-
var
|
|
34
|
-
this.five = t, this.originPosition = e ?
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
+
var n, r, a;
|
|
38
|
+
this.five = t, this.fiveUtil = (n = t.__fiveUtil__) != null ? n : t.__fiveUtil__ = new U(t), this.originPosition = e ? d(e).clone() : void 0, this.transformedPosition = (r = this.originPosition) == null ? void 0 : r.clone(), this.positionsForRotate = (a = s == null ? void 0 : s.positionsForRotate) == null ? void 0 : a.map((i) => d(i).clone()), this.container = (() => {
|
|
39
|
+
const i = document.createElement("div");
|
|
40
|
+
return i.style.width = "0", i.style.height = "0", i.style.position = "absolute", i.style.transition = "opacity 0.2s linear", i;
|
|
37
41
|
})(), this.config = s != null ? s : {}, this.enable(), this.show();
|
|
38
42
|
}
|
|
39
43
|
show() {
|
|
@@ -43,12 +47,12 @@ class g {
|
|
|
43
47
|
this.visible = !1, this.container.style.opacity = "0", this.container.style.pointerEvents = "none";
|
|
44
48
|
}
|
|
45
49
|
enable() {
|
|
46
|
-
var s,
|
|
50
|
+
var s, n, r, a;
|
|
47
51
|
if (this.enabled)
|
|
48
52
|
return;
|
|
49
|
-
this.enabled = !0, this.wrapper = (r = (
|
|
50
|
-
const
|
|
51
|
-
return
|
|
53
|
+
this.enabled = !0, this.wrapper = (r = (n = this.config.wrapper) != null ? n : (s = this.five.getElement()) == null ? void 0 : s.parentElement) != null ? r : document.body, this.tagWrapper || (this.tagWrapper = (a = document.getElementById(v)) != null ? a : (() => {
|
|
54
|
+
const i = document.createElement("div");
|
|
55
|
+
return i.id = v, i.style.position = "absolute", i.style.top = "0", i.style.left = "0", i.style.width = "100%", i.style.height = "100%", i.style.pointerEvents = "none", i;
|
|
52
56
|
})(), this.wrapper.contains(this.tagWrapper) || this.wrapper.appendChild(this.tagWrapper)), this.tagWrapper.appendChild(this.container);
|
|
53
57
|
let t = !1;
|
|
54
58
|
const e = () => {
|
|
@@ -71,30 +75,35 @@ class g {
|
|
|
71
75
|
var e;
|
|
72
76
|
this.transformedPosition = (e = this.originPosition) == null ? void 0 : e.clone().applyMatrix4(t), this.onCameraUpdate();
|
|
73
77
|
}
|
|
74
|
-
setPosition(t) {
|
|
75
|
-
this.transformedPosition = t, this.onCameraUpdate();
|
|
78
|
+
setPosition(t, e) {
|
|
79
|
+
this.transformedPosition = t, this.positionsForRotate = e, this.onCameraUpdate();
|
|
76
80
|
}
|
|
77
81
|
updateScreenPosition() {
|
|
78
82
|
if (!this.transformedPosition) {
|
|
79
83
|
this.container.style.left = "-100%", this.container.style.top = "-100%";
|
|
80
84
|
return;
|
|
81
85
|
}
|
|
82
|
-
const t =
|
|
83
|
-
if (!
|
|
86
|
+
const t = this.five.renderer.getSize(w), e = l(this.five.camera, this.transformedPosition, t);
|
|
87
|
+
if (!e) {
|
|
84
88
|
this.container.style.left = "-100%", this.container.style.top = "-100%";
|
|
85
89
|
return;
|
|
86
90
|
}
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
return Math.max(Math.min(1 -
|
|
91
|
+
const s = (() => {
|
|
92
|
+
const r = 2 * Math.tan(0.5 * this.five.camera.fov / 180 * Math.PI), a = this.transformedPosition.distanceTo(this.five.camera.position);
|
|
93
|
+
return Math.max(Math.min(1 - r * a / 40, 1), 0.5);
|
|
94
|
+
})(), n = (() => {
|
|
95
|
+
if (this.positionsForRotate === void 0 || this.positionsForRotate.length !== 2)
|
|
96
|
+
return 0;
|
|
97
|
+
const [r, a] = this.positionsForRotate, i = l(this.five.camera, r, t), c = l(this.five.camera, a, t), p = i.leftPx > c.leftPx ? c : i, f = i.leftPx > c.leftPx ? i : c, y = f.leftPx - p.leftPx, P = f.topPx - p.topPx;
|
|
98
|
+
return Math.atan2(P, y) * (180 / Math.PI);
|
|
90
99
|
})();
|
|
91
|
-
this.container.style.left =
|
|
100
|
+
this.container.style.left = e.leftPx + "px", this.container.style.top = e.topPx + "px", this.container.style.transformOrigin = "center", this.container.style.transform = `scale(${s})`, n && (this.container.style.transform += ` rotate(${n}deg)`);
|
|
92
101
|
}
|
|
93
102
|
}
|
|
94
|
-
function
|
|
95
|
-
return new
|
|
103
|
+
function S(h, t, e) {
|
|
104
|
+
return new E(h, t, e);
|
|
96
105
|
}
|
|
97
106
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
107
|
+
E as LightTag,
|
|
108
|
+
S as tag
|
|
100
109
|
};
|