@realsee/dnalogel 3.41.1 → 3.41.3
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/CruisePlugin/BaseController.d.ts +0 -2
- package/dist/CurrentPanoImagePlugin/Controller.d.ts +1 -0
- package/dist/base/BasePlugin.d.ts +2 -0
- package/dist/index.cjs.js +53 -53
- package/dist/index.js +3923 -3905
- package/dist/index.umd.js +48 -48
- package/dist/shared-utils/Utils/FiveUtil.d.ts +1 -0
- package/dist/shared-utils/five/FiveDomEvents.d.ts +1 -0
- package/dist/shared-utils/five/getFiveModel.d.ts +2 -0
- package/libs/AreaMakerPlugin/Controller.js +6 -4
- package/libs/AreaMakerPlugin/index.js +5 -3
- package/libs/AreaMakerPlugin/utils/Item.js +2 -2
- package/libs/CSS3DRenderPlugin/Controller.js +3 -2
- package/libs/CSS3DRenderPlugin/index.js +6 -5
- package/libs/CruisePlugin/BaseController.d.ts +0 -2
- package/libs/CruisePlugin/BaseController.js +36 -36
- package/libs/CruisePlugin/Move.js +5 -4
- package/libs/CruisePlugin/Work.js +5 -4
- package/libs/CruisePlugin/index.js +9 -8
- package/libs/CurrentPanoImagePlugin/Controller.d.ts +1 -0
- package/libs/CurrentPanoImagePlugin/Controller.js +13 -11
- package/libs/CurrentPanoImagePlugin/index.js +6 -4
- package/libs/GuideLinePlugin/Controller.js +7 -6
- package/libs/GuideLinePlugin/GuideLineItem.js +5 -4
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +2 -1
- package/libs/GuideLinePlugin/GuideLineModeItem.js +5 -3
- package/libs/GuideLinePlugin/index.js +9 -8
- package/libs/ModelMakerPlugin/Controller.js +5 -3
- package/libs/ModelMakerPlugin/index.js +5 -3
- package/libs/ModelMakerPlugin/item/baseItem.js +3 -2
- package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
- package/libs/ModelMakerPlugin/item/polygonItem.js +3 -2
- package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
- package/libs/ModelMakerPlugin/utils/getFiveDomEvent.js +7 -6
- package/libs/ModelTVVideoPlugin/Plugin.js +4 -3
- package/libs/ModelTVVideoPlugin/index.js +3 -2
- package/libs/Object3DHelperPlugin/Controller.js +16 -14
- package/libs/Object3DHelperPlugin/index.js +8 -6
- package/libs/PanoCompassPlugin/Controller.js +5 -3
- package/libs/PanoCompassPlugin/index.js +6 -4
- package/libs/PanoDoorLabelPlugin/BaseController.js +9 -7
- package/libs/PanoDoorLabelPlugin/Controller.js +5 -3
- package/libs/PanoDoorLabelPlugin/index.js +6 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
- package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/EditController.js +4 -3
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +35 -34
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +50 -49
- package/libs/PanoMeasurePlugin/Controller/index.js +5 -3
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +3 -2
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +4 -3
- package/libs/PanoMeasurePlugin/index.js +16 -14
- package/libs/PanoSpatialTagPlugin/Plugin.js +4 -3
- package/libs/PanoSpatialTagPlugin/index.js +1 -0
- package/libs/PanoTagPlugin/controller/TagCache.js +11 -9
- package/libs/PanoTagPlugin/controller/TagComputer.js +12 -10
- package/libs/PanoTagPlugin/controller/TagRender.js +5 -3
- package/libs/PanoTagPlugin/controller/TagUtil.js +5 -3
- package/libs/PanoTagPlugin/controller/index.js +8 -6
- package/libs/PanoTagPlugin/index.js +14 -12
- package/libs/PanoVideoPlugin/Controller.js +5 -3
- package/libs/PanoVideoPlugin/index.js +8 -6
- package/libs/PipelinePlugin/Controller.js +25 -23
- package/libs/PipelinePlugin/index.js +6 -4
- package/libs/base/BasePlugin.d.ts +2 -0
- package/libs/base/BasePlugin.js +14 -13
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +14 -11
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +7 -4
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +5 -3
- package/libs/floorplan/ModelFloorplanPlugin/index.js +6 -4
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +5 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +6 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +5 -3
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +6 -4
- package/libs/index.js +128 -127
- package/libs/shared-utils/Utils/FiveUtil.d.ts +1 -0
- package/libs/shared-utils/Utils/FiveUtil.js +11 -7
- package/libs/shared-utils/five/FiveDomEvents.d.ts +1 -0
- package/libs/shared-utils/five/FiveDomEvents.js +46 -42
- package/libs/shared-utils/five/fiveModelLoad.js +26 -17
- package/libs/shared-utils/five/getFiveModel.d.ts +2 -0
- package/libs/shared-utils/five/getFiveModel.js +7 -0
- package/libs/shared-utils/five/getPosition.js +24 -23
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.js +10 -9
- package/libs/shared-utils/three/blink.js +10 -10
- package/libs/shared-utils/three/getIntersect.js +19 -18
- package/package.json +1 -1
- package/libs/CSS3DRenderPlugin/utils/waitFiveModelLoaded.d.ts +0 -2
- package/libs/CSS3DRenderPlugin/utils/waitFiveModelLoaded.js +0 -31
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var t = (n, s, e) => (
|
|
4
|
-
import { Model as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Vector2 as
|
|
9
|
-
import
|
|
10
|
-
import { closestPointOnLine as
|
|
11
|
-
import { Polyline as
|
|
12
|
-
import
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var D = (n, s, e) => s in n ? y(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
3
|
+
var t = (n, s, e) => (D(n, typeof s != "symbol" ? s + "" : s, e), e);
|
|
4
|
+
import { Model as S } from "../Model/index.js";
|
|
5
|
+
import T from "../Model/line.js";
|
|
6
|
+
import M from "./BaseController.js";
|
|
7
|
+
import G from "../Modules/DeleteDom/index.js";
|
|
8
|
+
import { Vector2 as p } from "three";
|
|
9
|
+
import L from "../utils/isNDCPointInScreen.js";
|
|
10
|
+
import { closestPointOnLine as W } from "../utils/math.js";
|
|
11
|
+
import { Polyline as C } from "../Model/polyline.js";
|
|
12
|
+
import E from "../Modules/rangePiece/index.js";
|
|
13
|
+
import { getFiveModel as N } from "../../shared-utils/five/getFiveModel.js";
|
|
13
14
|
import "../../shared-utils/Subscribe.js";
|
|
14
15
|
import "../../shared-utils/uuid.js";
|
|
15
16
|
import "../utils/line.js";
|
|
@@ -31,7 +32,7 @@ import "../../shared-utils/animationFrame/index.js";
|
|
|
31
32
|
import "../../shared-utils/noop.js";
|
|
32
33
|
import "../utils/mouseGroup.js";
|
|
33
34
|
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
34
|
-
class
|
|
35
|
+
class me extends M {
|
|
35
36
|
constructor(e) {
|
|
36
37
|
super(e);
|
|
37
38
|
t(this, "state", "watching");
|
|
@@ -46,27 +47,27 @@ class le extends T {
|
|
|
46
47
|
t(this, "onWantsTapGesture", (e) => {
|
|
47
48
|
if (this.state === "editing")
|
|
48
49
|
return !1;
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
50
|
+
const i = N(this.five), [r] = i.intersectRaycaster(e);
|
|
51
|
+
if (!r)
|
|
51
52
|
return;
|
|
52
|
-
const
|
|
53
|
-
const [
|
|
54
|
-
if (!
|
|
53
|
+
const a = this.five.camera, g = r.point.clone().project(a), l = this.container.clientWidth, d = this.container.clientHeight, f = new p(g.x * l, g.y * d), u = this.model.getAllLines().map((o) => {
|
|
54
|
+
const [h, w] = o.points, c = h.position.clone().project(a), m = w.position.clone().project(a);
|
|
55
|
+
if (!L(c) && !L(m))
|
|
55
56
|
return null;
|
|
56
|
-
const
|
|
57
|
-
return { id: o.id, points: [
|
|
57
|
+
const k = new p(c.x * l, c.y * d), b = new p(m.x * l, m.y * d);
|
|
58
|
+
return { id: o.id, points: [k, b] };
|
|
58
59
|
}).filter((o) => !!o);
|
|
59
|
-
if (
|
|
60
|
+
if (u.length === 0)
|
|
60
61
|
return;
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
return { id: o.id, distance:
|
|
64
|
-
}).sort((o,
|
|
65
|
-
if (
|
|
62
|
+
const P = u.map((o) => {
|
|
63
|
+
const h = W(f, o.points);
|
|
64
|
+
return { id: o.id, distance: h.distanceTo(f) };
|
|
65
|
+
}).sort((o, h) => o.distance - h.distance)[0];
|
|
66
|
+
if (P.distance > 20)
|
|
66
67
|
return;
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
return this.chooseLine(
|
|
68
|
+
const v = this.model.getAllLines().find(({ id: o }) => o === P.id);
|
|
69
|
+
if (v)
|
|
70
|
+
return this.chooseLine(v), !1;
|
|
70
71
|
});
|
|
71
72
|
/** 编辑时取消走点,watch时可以走 */
|
|
72
73
|
t(this, "onWantsToMoveToPano", () => this.state === "watching");
|
|
@@ -83,12 +84,12 @@ class le extends T {
|
|
|
83
84
|
this.magnifier.containerDom !== this.container && this.magnifier.appendTo(this.container), this.magnifier.state.enabled || this.magnifier.enable(), requestAnimationFrame(() => this.magnifier.renderWithPoint(e.position)), this.five.needsRender = !0;
|
|
84
85
|
});
|
|
85
86
|
t(this, "onGetStartPoint", (e) => {
|
|
86
|
-
this.mobileStartPoint = e, this.polyline = new
|
|
87
|
+
this.mobileStartPoint = e, this.polyline = new C({ model: this.model }), this.polyline.hook.on("lineAdded", () => this.hook.emit("editedPolylineChange", this.polyline)), this.polyline.hook.on("lineRemoved", () => this.hook.emit("editedPolylineChange", this.polyline));
|
|
87
88
|
});
|
|
88
89
|
t(this, "onGetEndPoint", () => {
|
|
89
90
|
const e = this.mobileNowPoint;
|
|
90
91
|
if (this.removeLine(this.dashed), this.hasAppendDashed = !1, this.mobileStartPoint && e) {
|
|
91
|
-
const i = new
|
|
92
|
+
const i = new T(this.mobileStartPoint, e, this.model);
|
|
92
93
|
this.polyline.addLine(i), i.distanceItem.appendTo(this.container), i.distanceItem.update(this.five), i.hook.on("selected", this.chooseLine), this.disposers.push(() => i.hook.off("selected", this.chooseLine)), this.group.add(i.mesh), this.model.addPolyline(this.polyline);
|
|
93
94
|
}
|
|
94
95
|
this.mobileStartPoint = null, this.mobileNowPoint = null, this.five.needsRender = !0;
|
|
@@ -107,7 +108,7 @@ class le extends T {
|
|
|
107
108
|
const i = e.getPolyline().lines;
|
|
108
109
|
this.highlightLines(i), this.five.needsRender = !0, this.hook.emit(
|
|
109
110
|
"selectedChange",
|
|
110
|
-
i.map((
|
|
111
|
+
i.map((r) => r)
|
|
111
112
|
);
|
|
112
113
|
});
|
|
113
114
|
t(this, "deleteDomClickCallback", () => {
|
|
@@ -120,7 +121,7 @@ class le extends T {
|
|
|
120
121
|
t(this, "cancelDeleteClickCallback", () => {
|
|
121
122
|
this.clearHighlightLines();
|
|
122
123
|
});
|
|
123
|
-
this.model = new
|
|
124
|
+
this.model = new S(this.config), this.polyline = new C({ model: this.model }), this.rangePieceController = new E(e), this.deleteDom = new G(this.five, {
|
|
124
125
|
i18n: this.config.i18n,
|
|
125
126
|
onClick: this.deleteDomClickCallback,
|
|
126
127
|
cancel: this.cancelDeleteClickCallback
|
|
@@ -145,5 +146,5 @@ class le extends T {
|
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
148
|
export {
|
|
148
|
-
|
|
149
|
+
me as default
|
|
149
150
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Raycaster as
|
|
9
|
-
import { closestPointOnLine as
|
|
10
|
-
import { findClosestPoint as
|
|
11
|
-
import { getPointFromHammerEvent as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var R = (c, r, t) => r in c ? I(c, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[r] = t;
|
|
3
|
+
var s = (c, r, t) => (R(c, typeof r != "symbol" ? r + "" : r, t), t);
|
|
4
|
+
import G from "hammerjs";
|
|
5
|
+
import T from "../Modules/DeleteDom/index.js";
|
|
6
|
+
import w from "../utils/isNDCPointInScreen.js";
|
|
7
|
+
import U from "./BaseController.js";
|
|
8
|
+
import { Raycaster as M, Vector2 as L } from "three";
|
|
9
|
+
import { closestPointOnLine as b } from "../utils/math.js";
|
|
10
|
+
import { findClosestPoint as j } from "../utils/findClosestPoint.js";
|
|
11
|
+
import { getPointFromHammerEvent as C } from "../../shared-utils/getPointFromHammerEvent.js";
|
|
12
|
+
import x from "../Model/area.js";
|
|
13
|
+
import F from "../Model/polygon.js";
|
|
14
|
+
import { getFiveModel as D } from "../../shared-utils/five/getFiveModel.js";
|
|
14
15
|
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
15
16
|
import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
16
17
|
import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
|
|
@@ -53,8 +54,8 @@ import "../../shared-utils/three/generatePolygonGeometry.js";
|
|
|
53
54
|
import "../../shared-utils/three/earcut3D.js";
|
|
54
55
|
import "earcut";
|
|
55
56
|
import "../../shared-utils/three/getNormal.js";
|
|
56
|
-
const
|
|
57
|
-
class
|
|
57
|
+
const E = () => !1;
|
|
58
|
+
class Ot extends U {
|
|
58
59
|
constructor(t) {
|
|
59
60
|
super(t);
|
|
60
61
|
s(this, "type", "watch");
|
|
@@ -67,22 +68,22 @@ class xt extends G {
|
|
|
67
68
|
s(this, "editPointState");
|
|
68
69
|
s(this, "hammer");
|
|
69
70
|
s(this, "onPanStart", (t) => {
|
|
70
|
-
var
|
|
71
|
+
var p;
|
|
71
72
|
if (this.model.getAllLines().length === 0 || !this.fiveElement)
|
|
72
73
|
return;
|
|
73
|
-
const i =
|
|
74
|
+
const i = C(t).point, e = (p = j(this.five, this.model.getAllPoints(), i, 20)) == null ? void 0 : p.point;
|
|
74
75
|
if (!e) {
|
|
75
76
|
this.editPointState = void 0;
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
|
-
const n = this.model.polylines.find((
|
|
79
|
+
const n = this.model.polylines.find((a) => a.includes(e)), l = {
|
|
79
80
|
point: e,
|
|
80
81
|
associatedLines: n.lines
|
|
81
82
|
};
|
|
82
83
|
this.hook.emit("wantsDragLine", {
|
|
83
84
|
point: e.id,
|
|
84
|
-
lines:
|
|
85
|
-
}) || (this.editPointState =
|
|
85
|
+
lines: l.associatedLines.map(({ id: a }) => a)
|
|
86
|
+
}) || (this.editPointState = l, this.magnifier.appendTo(this.container), this.magnifier.enable(), this.group.add(this.mouseGroup));
|
|
86
87
|
});
|
|
87
88
|
s(this, "onPanEnd", () => {
|
|
88
89
|
this.editPointState && (this.editPointState.associatedLines.forEach((t) => t.mesh.setMaterial({ dashed: !1 })), this.highlightLines(this.editPointState.associatedLines), this.editPointState = void 0, this.magnifier.disable(), this.group.remove(this.mouseGroup));
|
|
@@ -90,9 +91,9 @@ class xt extends G {
|
|
|
90
91
|
s(this, "onPan", (t) => {
|
|
91
92
|
if (!this.editPointState || !this.fiveElement)
|
|
92
93
|
return;
|
|
93
|
-
const i =
|
|
94
|
+
const i = C(t).ndcPoint, e = new M();
|
|
94
95
|
e.setFromCamera(i, this.five.camera);
|
|
95
|
-
const [n] = this.five.
|
|
96
|
+
const [n] = D(this.five).intersectRaycaster(e);
|
|
96
97
|
n && this.onIntersectionUpdate(n);
|
|
97
98
|
});
|
|
98
99
|
s(this, "onIntersectionUpdate", (t, i) => {
|
|
@@ -102,8 +103,8 @@ class xt extends G {
|
|
|
102
103
|
}), this.updateDistanceUI(), this.magnifier.renderWithPoint(t.point), this.mouseGroup.position.copy(t.point), i)
|
|
103
104
|
this.mouseGroup.quaternion.copy(i.quaternion);
|
|
104
105
|
else if (t.face) {
|
|
105
|
-
const n = t.face.normal.clone().multiplyScalar(0.05),
|
|
106
|
-
this.mouseGroup.lookAt(
|
|
106
|
+
const n = t.face.normal.clone().multiplyScalar(0.05), d = t.point.clone().add(n).clone().add(n);
|
|
107
|
+
this.mouseGroup.lookAt(d);
|
|
107
108
|
}
|
|
108
109
|
this.five.needsRender = !0, this.hook.emit(
|
|
109
110
|
"selectedChange",
|
|
@@ -116,36 +117,36 @@ class xt extends G {
|
|
|
116
117
|
return !1;
|
|
117
118
|
});
|
|
118
119
|
s(this, "wantsTapGesture", (t) => {
|
|
119
|
-
var
|
|
120
|
-
const i = this.model.areas.map((o) => t.intersectObject(o.polygon, !0)[0]).sort((o, h) => o.distance - h.distance), e = (
|
|
121
|
-
if (e instanceof
|
|
120
|
+
var S;
|
|
121
|
+
const i = this.model.areas.map((o) => t.intersectObject(o.polygon, !0)[0]).sort((o, h) => o.distance - h.distance), e = (S = i[0]) == null ? void 0 : S.object.parent;
|
|
122
|
+
if (e instanceof F) {
|
|
122
123
|
const o = this.model.areas.find((h) => h.polygon === e);
|
|
123
124
|
if (o) {
|
|
124
|
-
const { x: h, y:
|
|
125
|
+
const { x: h, y: u } = i[0].point.clone().project(this.five.camera), m = `${(h + 1) / 2 * 100}%`, g = `${(-u + 1) / 2 * 100}%`;
|
|
125
126
|
return this.chooseArea(o, { left: m, top: g }), !1;
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
|
-
const
|
|
129
|
-
if (!
|
|
129
|
+
const n = D(this.five), [l] = n.intersectRaycaster(t);
|
|
130
|
+
if (!l)
|
|
130
131
|
return;
|
|
131
|
-
const
|
|
132
|
-
const [h,
|
|
133
|
-
if (!
|
|
132
|
+
const d = this.five.camera, p = l.point.clone().project(d), a = this.container.clientWidth, f = this.container.clientHeight, P = new L(p.x * a, p.y * f), v = this.model.getAllLines().map((o) => {
|
|
133
|
+
const [h, u] = o.points, m = h.position.clone().project(d), g = u.position.clone().project(d);
|
|
134
|
+
if (!w(m) && !w(g))
|
|
134
135
|
return null;
|
|
135
|
-
const
|
|
136
|
-
return { id: o.id, points: [
|
|
136
|
+
const H = new L(m.x * a, m.y * f), k = new L(g.x * a, g.y * f);
|
|
137
|
+
return { id: o.id, points: [H, k] };
|
|
137
138
|
}).filter((o) => !!o);
|
|
138
|
-
if (
|
|
139
|
+
if (v.length === 0)
|
|
139
140
|
return;
|
|
140
|
-
const
|
|
141
|
-
const h =
|
|
142
|
-
return { id: o.id, distance: h.distanceTo(
|
|
141
|
+
const y = v.map((o) => {
|
|
142
|
+
const h = b(P, o.points);
|
|
143
|
+
return { id: o.id, distance: h.distanceTo(P) };
|
|
143
144
|
}).sort((o, h) => o.distance - h.distance)[0];
|
|
144
|
-
if (
|
|
145
|
+
if (y.distance > 20)
|
|
145
146
|
return;
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
return this.chooseLine(
|
|
147
|
+
const A = this.model.getAllLines().find(({ id: o }) => o === y.id);
|
|
148
|
+
if (A)
|
|
149
|
+
return this.chooseLine(A), !1;
|
|
149
150
|
});
|
|
150
151
|
s(this, "chooseLine", (t) => {
|
|
151
152
|
this.choose = "line";
|
|
@@ -177,10 +178,10 @@ class xt extends G {
|
|
|
177
178
|
s(this, "cancelDeleteClickCallback", () => {
|
|
178
179
|
this.deleteDom.hide(), this.clearHighlightLines(), this.unHighlightArea();
|
|
179
180
|
});
|
|
180
|
-
this.deleteDom = new
|
|
181
|
+
this.deleteDom = new T(this.five, {
|
|
181
182
|
i18n: this.config.i18n,
|
|
182
183
|
onClick: () => {
|
|
183
|
-
this.choose === "line" ? this.deleteLine() : this.choose instanceof
|
|
184
|
+
this.choose === "line" ? this.deleteLine() : this.choose instanceof x && this.deleteArea(this.choose);
|
|
184
185
|
},
|
|
185
186
|
cancel: this.cancelDeleteClickCallback
|
|
186
187
|
}).appendTo(this.container), this.model.getAllLines().forEach((e) => {
|
|
@@ -193,14 +194,14 @@ class xt extends G {
|
|
|
193
194
|
const i = this.five.getElement();
|
|
194
195
|
if (i) {
|
|
195
196
|
this.fiveElement = i;
|
|
196
|
-
const e = new
|
|
197
|
+
const e = new G(i);
|
|
197
198
|
this.hammer = e, e.on("pan", this.onPan), e.on("panstart", this.onPanStart), e.on("panend", this.onPanEnd);
|
|
198
199
|
}
|
|
199
|
-
this.updateDistanceUI(), this.five.needsRender = !0, this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsPanGesture", this.wantsPanGesture), this.five.on("wantsChangeMode",
|
|
200
|
+
this.updateDistanceUI(), this.five.needsRender = !0, this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsPanGesture", this.wantsPanGesture), this.five.on("wantsChangeMode", E), this.model.hook.on("polylineRemoved", this.polylineRemoved);
|
|
200
201
|
}
|
|
201
202
|
dispose() {
|
|
202
203
|
var t;
|
|
203
|
-
super.dispose(), this.deleteDom.dispose(), this.model.hook.off("polylineRemoved", this.polylineRemoved), this.model.getAllLines().forEach((i) => i.hook.off("selected", this.chooseLine)), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.wantsPanGesture), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsChangeMode",
|
|
204
|
+
super.dispose(), this.deleteDom.dispose(), this.model.hook.off("polylineRemoved", this.polylineRemoved), this.model.getAllLines().forEach((i) => i.hook.off("selected", this.chooseLine)), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.wantsPanGesture), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsChangeMode", E), this.five.needsRender = !0, this.hook.emit("selectedChange", []), (t = this.hammer) == null || t.destroy();
|
|
204
205
|
}
|
|
205
206
|
highlightLine(t) {
|
|
206
207
|
t.selected || (t.selected = !0, this.group.add(t.lightMesh), t.distanceItem.highlight(), this.five.needsRender = !0);
|
|
@@ -227,5 +228,5 @@ class xt extends G {
|
|
|
227
228
|
}
|
|
228
229
|
}
|
|
229
230
|
export {
|
|
230
|
-
|
|
231
|
+
Ot as default
|
|
231
232
|
};
|
|
@@ -67,6 +67,7 @@ import "../../CSS3DRenderPlugin/index.js";
|
|
|
67
67
|
import "../../CSS3DRenderPlugin/Controller.js";
|
|
68
68
|
import "../../shared-utils/url/absoluteUrl.js";
|
|
69
69
|
import "../../shared-utils/five/fiveModelLoad.js";
|
|
70
|
+
import "../../shared-utils/five/getFiveModel.js";
|
|
70
71
|
import "../../shared-utils/positionToVector3.js";
|
|
71
72
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
72
73
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
@@ -114,10 +115,11 @@ import "../../vendor/svelte/transition/index.js";
|
|
|
114
115
|
import "../../vendor/svelte/easing/index.js";
|
|
115
116
|
import "../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
116
117
|
import "../Components/Tip.js";
|
|
117
|
-
import "../../shared-utils/Utils/
|
|
118
|
+
import "../../shared-utils/Utils/FiveUtil.js";
|
|
118
119
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
120
|
+
import "../../shared-utils/Utils/WorkUtil.js";
|
|
119
121
|
import "../../shared-utils/five/transformPosition.js";
|
|
120
|
-
class
|
|
122
|
+
class He extends B {
|
|
121
123
|
constructor(t, e) {
|
|
122
124
|
var l, u, d, f, g, y, M, C, w;
|
|
123
125
|
super(t);
|
|
@@ -322,5 +324,5 @@ class Ve extends B {
|
|
|
322
324
|
}
|
|
323
325
|
}
|
|
324
326
|
export {
|
|
325
|
-
|
|
327
|
+
He as default
|
|
326
328
|
};
|
|
@@ -70,6 +70,7 @@ import "../../../CSS3DRenderPlugin/index.js";
|
|
|
70
70
|
import "../../../CSS3DRenderPlugin/Controller.js";
|
|
71
71
|
import "../../../shared-utils/url/absoluteUrl.js";
|
|
72
72
|
import "../../../shared-utils/five/fiveModelLoad.js";
|
|
73
|
+
import "../../../shared-utils/five/getFiveModel.js";
|
|
73
74
|
import "../../../shared-utils/animationFrame/BetterTween.js";
|
|
74
75
|
import "../../../shared-utils/animationFrame/index.js";
|
|
75
76
|
import "../../../shared-utils/isTouchDevice.js";
|
|
@@ -85,7 +86,7 @@ import "../../Components/Common/Switcher1.js";
|
|
|
85
86
|
import "../../Components/Common/CircleButton.js";
|
|
86
87
|
import "../../../vendor/svelte/transition/index.js";
|
|
87
88
|
import "../../../vendor/svelte/easing/index.js";
|
|
88
|
-
class
|
|
89
|
+
class ro {
|
|
89
90
|
constructor(o, t) {
|
|
90
91
|
e(this, "revoke");
|
|
91
92
|
e(this, "container");
|
|
@@ -139,5 +140,5 @@ class io {
|
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
export {
|
|
142
|
-
|
|
143
|
+
ro as UIController
|
|
143
144
|
};
|
|
@@ -18,8 +18,9 @@ import { requestAnimationFrameInterval as k } from "../../../shared-utils/animat
|
|
|
18
18
|
import { noop as x } from "../../../shared-utils/noop.js";
|
|
19
19
|
import { getMouseGroup as A } from "../../utils/mouseGroup.js";
|
|
20
20
|
import { calculateThreeMouse as X } from "../../../shared-utils/five/calculateThreeMouse.js";
|
|
21
|
+
import { getFiveModel as Y } from "../../../shared-utils/five/getFiveModel.js";
|
|
21
22
|
import "../../../shared-utils/uuid.js";
|
|
22
|
-
class
|
|
23
|
+
class F {
|
|
23
24
|
// eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
|
|
24
25
|
constructor(t) {
|
|
25
26
|
i(this, "container", document.createElement("div"));
|
|
@@ -64,7 +65,7 @@ class V {
|
|
|
64
65
|
if (!this.centerMouseXY)
|
|
65
66
|
return null;
|
|
66
67
|
this.raycaster.setFromCamera(this.centerMouseXY, this.five.camera);
|
|
67
|
-
const t = this.five.
|
|
68
|
+
const t = Y(this.five).intersectRaycaster(this.raycaster)[0];
|
|
68
69
|
return t || null;
|
|
69
70
|
});
|
|
70
71
|
this.five = t.five, this.hook = t.hook, this.group = t.group, this.mouseGroup = A(d({ isMobile: !0 }, t.openParams.crossHairParameter)), this.container.innerHTML = P, this.container.classList.add("range-piece-controller"), this.content = this.container.querySelector(".range-piece__content"), this.content && (this.content.style.transform = `matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`, this.content.style.opacity = `${this.pieceStyl.opacity}`), t.container.append(this.container), this.intersectMesh = new v(
|
|
@@ -130,5 +131,5 @@ class V {
|
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
export {
|
|
133
|
-
|
|
134
|
+
F as default
|
|
134
135
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import t from "./Controller/index.js";
|
|
2
|
-
import { Magnifier as
|
|
2
|
+
import { Magnifier as pr } from "../shared-utils/three/Magnifier.js";
|
|
3
3
|
import "three";
|
|
4
4
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
5
5
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
6
6
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
7
7
|
import "animejs";
|
|
8
|
-
import { Model as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { Polyline as
|
|
8
|
+
import { Model as nr } from "./Model/index.js";
|
|
9
|
+
import { default as ur } from "./Model/point.js";
|
|
10
|
+
import { default as Pr } from "./Model/line.js";
|
|
11
|
+
import { Polyline as fr } from "./Model/polyline.js";
|
|
12
12
|
import "./Controller/EditController.js";
|
|
13
13
|
import "../shared-utils/throttle.js";
|
|
14
14
|
import "./Controller/BaseController.js";
|
|
@@ -58,6 +58,7 @@ import "../CSS3DRenderPlugin/index.js";
|
|
|
58
58
|
import "../CSS3DRenderPlugin/Controller.js";
|
|
59
59
|
import "../shared-utils/url/absoluteUrl.js";
|
|
60
60
|
import "../shared-utils/five/fiveModelLoad.js";
|
|
61
|
+
import "../shared-utils/five/getFiveModel.js";
|
|
61
62
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
62
63
|
import "../shared-utils/animationFrame/index.js";
|
|
63
64
|
import "../shared-utils/isTouchDevice.js";
|
|
@@ -103,18 +104,19 @@ import "./Components/Tip.js";
|
|
|
103
104
|
import "./Controller/ShortcutKeyController.js";
|
|
104
105
|
import "../shared-utils/safeObj.js";
|
|
105
106
|
import "../base/BasePlugin.js";
|
|
106
|
-
import "../shared-utils/Utils/
|
|
107
|
+
import "../shared-utils/Utils/FiveUtil.js";
|
|
107
108
|
import "../shared-utils/Utils/BaseUtil.js";
|
|
109
|
+
import "../shared-utils/Utils/WorkUtil.js";
|
|
108
110
|
import "../shared-utils/five/transformPosition.js";
|
|
109
|
-
const
|
|
111
|
+
const tr = function(o, r) {
|
|
110
112
|
return new t(o, r);
|
|
111
113
|
};
|
|
112
114
|
export {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
pr as Magnifier,
|
|
116
|
+
tr as PanoMeasurePlugin,
|
|
117
|
+
Pr as PanoMeasurePluginLine,
|
|
118
|
+
nr as PanoMeasurePluginModel,
|
|
119
|
+
ur as PanoMeasurePluginPoint,
|
|
120
|
+
fr as PanoMeasurePluginPolyline,
|
|
121
|
+
tr as default
|
|
120
122
|
};
|
|
@@ -27,10 +27,11 @@ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
27
27
|
import "animejs";
|
|
28
28
|
import "../shared-utils/url/absoluteUrl.js";
|
|
29
29
|
import "../shared-utils/five/fiveModelLoad.js";
|
|
30
|
+
import "../shared-utils/five/getFiveModel.js";
|
|
30
31
|
import "../vendor/svelte/internal/index.js";
|
|
31
32
|
import "./store.js";
|
|
32
33
|
import "../vendor/svelte/store/index.js";
|
|
33
|
-
const D = 1e-3, v = 0.01, je = "https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",
|
|
34
|
+
const D = 1e-3, v = 0.01, je = "https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png", io = (n, s) => {
|
|
34
35
|
var k, z, q, B, G, J, K, Q;
|
|
35
36
|
let j = s == null ? void 0 : s.container, y = 1.4;
|
|
36
37
|
const ee = (k = s == null ? void 0 : s.wait) != null ? k : 200, oe = (z = s == null ? void 0 : s.maxNumberOnScreen) != null ? z : 3, I = (q = s == null ? void 0 : s.minRad) != null ? q : Math.PI / 4, L = (B = s == null ? void 0 : s.nearTolerance) != null ? B : 100, te = (G = s == null ? void 0 : s.upsideHeight) != null ? G : 1.6, A = (J = s == null ? void 0 : s.minDistance) != null ? J : 1.2, f = (K = s == null ? void 0 : s.maxDistance) != null ? K : 3.5, C = Te(n), S = document.createElement("div");
|
|
@@ -255,6 +256,6 @@ const D = 1e-3, v = 0.01, je = "https://vrlab-image4.ljcdn.com/release/web/PanoS
|
|
|
255
256
|
};
|
|
256
257
|
};
|
|
257
258
|
export {
|
|
258
|
-
|
|
259
|
-
|
|
259
|
+
io as PanoSpatialTagPlugin,
|
|
260
|
+
io as default
|
|
260
261
|
};
|
|
@@ -24,6 +24,7 @@ import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
24
24
|
import "animejs";
|
|
25
25
|
import "../shared-utils/url/absoluteUrl.js";
|
|
26
26
|
import "../shared-utils/five/fiveModelLoad.js";
|
|
27
|
+
import "../shared-utils/five/getFiveModel.js";
|
|
27
28
|
import "./Components/origins.js";
|
|
28
29
|
import "../vendor/svelte/internal/index.js";
|
|
29
30
|
import "./store.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (r, e, t) => (
|
|
4
|
-
import { Controller as
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var g = (r, e, t) => e in r ? l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var s = (r, e, t) => (g(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { Controller as f } from "../../base/BasePlugin.js";
|
|
5
5
|
import "../../shared-utils/Subscribe.js";
|
|
6
6
|
import "hammerjs";
|
|
7
7
|
import "three";
|
|
@@ -23,10 +23,12 @@ import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
|
23
23
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
24
24
|
import "animejs";
|
|
25
25
|
import "../../shared-utils/url/absoluteUrl.js";
|
|
26
|
-
import "../../shared-utils/Utils/
|
|
26
|
+
import "../../shared-utils/Utils/FiveUtil.js";
|
|
27
27
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
28
|
+
import "../../shared-utils/Utils/WorkUtil.js";
|
|
28
29
|
import "../../shared-utils/five/transformPosition.js";
|
|
29
|
-
|
|
30
|
+
import "../../shared-utils/five/getFiveModel.js";
|
|
31
|
+
class L extends f {
|
|
30
32
|
constructor(t) {
|
|
31
33
|
super(t);
|
|
32
34
|
s(this, "tagCacheByPanoIndex", {});
|
|
@@ -38,10 +40,10 @@ class H extends g {
|
|
|
38
40
|
}
|
|
39
41
|
getPanoIndexCache(t) {
|
|
40
42
|
var h;
|
|
41
|
-
const { five: n } = this, { panoIndex: a, id: i, key: m } = t != null ? t : {}, c = a != null ? a : n.getCurrentState().panoIndex;
|
|
43
|
+
const { five: n, fiveUtil: C } = this, { panoIndex: a, id: i, key: m } = t != null ? t : {}, c = a != null ? a : n.getCurrentState().panoIndex;
|
|
42
44
|
if (c === void 0)
|
|
43
45
|
throw new Error(`TagCacheController getPanoIndexCache(): fivePanoIndex is ${c}`);
|
|
44
|
-
const p = `${
|
|
46
|
+
const p = `${C.model.uuid}__${c}`;
|
|
45
47
|
let o = this.tagCacheByPanoIndex[p];
|
|
46
48
|
if (o || (o = /* @__PURE__ */ new Map(), this.tagCacheByPanoIndex[p] = o), i === void 0)
|
|
47
49
|
return o;
|
|
@@ -61,5 +63,5 @@ class H extends g {
|
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
export {
|
|
64
|
-
|
|
66
|
+
L as TagCache
|
|
65
67
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var L = Object.defineProperty, O = Object.defineProperties;
|
|
2
2
|
var z = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var C = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var D = Object.prototype.hasOwnProperty, F = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var U = (d, e, i) => e in d ? L(d, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : d[e] = i, h = (d, e) => {
|
|
6
6
|
for (var i in e || (e = {}))
|
|
7
|
-
|
|
7
|
+
D.call(e, i) && U(d, i, e[i]);
|
|
8
8
|
if (C)
|
|
9
9
|
for (var i of C(e))
|
|
10
|
-
F.call(e, i) &&
|
|
10
|
+
F.call(e, i) && U(d, i, e[i]);
|
|
11
11
|
return d;
|
|
12
12
|
}, R = (d, e) => O(d, z(e));
|
|
13
13
|
var S = (d, e) => {
|
|
14
14
|
var i = {};
|
|
15
15
|
for (var s in d)
|
|
16
|
-
|
|
16
|
+
D.call(d, s) && e.indexOf(s) < 0 && (i[s] = d[s]);
|
|
17
17
|
if (d != null && C)
|
|
18
18
|
for (var s of C(d))
|
|
19
19
|
e.indexOf(s) < 0 && F.call(d, s) && (i[s] = d[s]);
|
|
@@ -55,9 +55,11 @@ import "../utils/normalPositionToPositions.js";
|
|
|
55
55
|
import "./TagCache.js";
|
|
56
56
|
import "../../base/BasePlugin.js";
|
|
57
57
|
import "../../shared-utils/url/absoluteUrl.js";
|
|
58
|
-
import "../../shared-utils/Utils/
|
|
58
|
+
import "../../shared-utils/Utils/FiveUtil.js";
|
|
59
59
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
60
|
+
import "../../shared-utils/Utils/WorkUtil.js";
|
|
60
61
|
import "../../shared-utils/five/transformPosition.js";
|
|
62
|
+
import "../../shared-utils/five/getFiveModel.js";
|
|
61
63
|
import "../../vendor/svelte/store/index.js";
|
|
62
64
|
import "../../vendor/svelte/internal/index.js";
|
|
63
65
|
import "../../shared-utils/device.js";
|
|
@@ -81,7 +83,7 @@ import "../../shared-utils/typescript/entries.js";
|
|
|
81
83
|
import "../../shared-utils/url/getUrl.js";
|
|
82
84
|
const T = new w.Raycaster();
|
|
83
85
|
T.params.Points.threshold = 0.1;
|
|
84
|
-
class
|
|
86
|
+
class si extends W {
|
|
85
87
|
constructor(e) {
|
|
86
88
|
super(e);
|
|
87
89
|
}
|
|
@@ -311,7 +313,7 @@ class ni extends W {
|
|
|
311
313
|
for (const v of n) {
|
|
312
314
|
const b = new w.Vector3().subVectors(v, r).normalize();
|
|
313
315
|
T.set(r, b);
|
|
314
|
-
const I = r.distanceTo(v), [y] = this.
|
|
316
|
+
const I = r.distanceTo(v), [y] = this.fiveUtil.model.intersectRaycaster(T), l = (() => {
|
|
315
317
|
if (!j(e))
|
|
316
318
|
return;
|
|
317
319
|
const $ = this.tags.filter(j).map((_) => {
|
|
@@ -340,7 +342,7 @@ class ni extends W {
|
|
|
340
342
|
let i = 0;
|
|
341
343
|
const s = (r = e.fiveState) == null ? void 0 : r.panoIndex;
|
|
342
344
|
s !== void 0 ? i = (n = this.workUtil.getObserver(s)) == null ? void 0 : n.floorIndex : i = X(this.workUtil.work, (f = (a = (g = (c = e.model) == null ? void 0 : c.object) == null ? void 0 : g.position) != null ? a : (o = e.mediaPlane) == null ? void 0 : o.position) != null ? f : k(e));
|
|
343
|
-
const t = this.
|
|
345
|
+
const t = this.fiveUtil.model.shownFloor;
|
|
344
346
|
return {
|
|
345
347
|
value: t === null || t === i,
|
|
346
348
|
currentFiveFloorIndex: t,
|
|
@@ -349,5 +351,5 @@ class ni extends W {
|
|
|
349
351
|
}
|
|
350
352
|
}
|
|
351
353
|
export {
|
|
352
|
-
|
|
354
|
+
si as TagComputer
|
|
353
355
|
};
|
|
@@ -66,9 +66,11 @@ import "../utils/normalPositionToPositions.js";
|
|
|
66
66
|
import "./TagCache.js";
|
|
67
67
|
import "../../base/BasePlugin.js";
|
|
68
68
|
import "../../shared-utils/url/absoluteUrl.js";
|
|
69
|
-
import "../../shared-utils/Utils/
|
|
69
|
+
import "../../shared-utils/Utils/FiveUtil.js";
|
|
70
70
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
71
|
+
import "../../shared-utils/Utils/WorkUtil.js";
|
|
71
72
|
import "../../shared-utils/five/transformPosition.js";
|
|
73
|
+
import "../../shared-utils/five/getFiveModel.js";
|
|
72
74
|
import "../../vendor/svelte/store/index.js";
|
|
73
75
|
import "../../vendor/svelte/internal/index.js";
|
|
74
76
|
import "../../shared-utils/device.js";
|
|
@@ -163,7 +165,7 @@ import "../Components/Tag/PanoramaTag.js";
|
|
|
163
165
|
import "../Components/Tag/CustomTag.js";
|
|
164
166
|
import "@realsee/five/gltf-loader";
|
|
165
167
|
const N = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map();
|
|
166
|
-
class
|
|
168
|
+
class Si extends E {
|
|
167
169
|
constructor(e) {
|
|
168
170
|
super(e);
|
|
169
171
|
h(this, "rendererMap", /* @__PURE__ */ new Map());
|
|
@@ -509,5 +511,5 @@ class gi extends E {
|
|
|
509
511
|
}
|
|
510
512
|
}
|
|
511
513
|
export {
|
|
512
|
-
|
|
514
|
+
Si as TagRender
|
|
513
515
|
};
|