@realsee/dnalogel 3.77.2-alpha.0 → 3.77.2
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 +12 -0
- package/dist/CruisePlugin/Work.d.ts +0 -4
- package/dist/CruisePlugin/typing.d.ts +0 -7
- package/dist/CruisePlugin/utils/coordinatesAngle.d.ts +3 -19
- package/dist/Sculpt/Objects/Base/Editor.d.ts +20 -1
- package/dist/Sculpt/Objects/Box/index.d.ts +5 -2
- package/dist/Sculpt/Objects/Rectangle/index.d.ts +7 -4
- package/dist/floorplan/MapviewFloorplanPlugin/Controller.d.ts +21 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +16 -0
- package/dist/floorplan/typings/index.d.ts +3 -0
- package/dist/index.cjs.js +75 -75
- package/dist/index.js +7373 -7319
- package/dist/index.umd.js +73 -73
- package/dist/shared-utils/Object3DHelper/typings/Hooks.d.ts +4 -3
- package/dist/shared-utils/three/PointSelector/index.d.ts +1 -1
- package/libs/CruisePlugin/BaseController.js +1 -8
- package/libs/CruisePlugin/Work.d.ts +0 -4
- package/libs/CruisePlugin/Work.js +213 -297
- package/libs/CruisePlugin/typing.d.ts +0 -7
- package/libs/CruisePlugin/utils/coordinatesAngle.d.ts +3 -19
- package/libs/CruisePlugin/utils/coordinatesAngle.js +5 -10
- package/libs/Sculpt/Objects/Base/Editor.d.ts +20 -1
- package/libs/Sculpt/Objects/Base/Editor.js +91 -35
- package/libs/Sculpt/Objects/Box/index.d.ts +5 -2
- package/libs/Sculpt/Objects/Box/index.js +61 -55
- package/libs/Sculpt/Objects/Prism/index.js +48 -47
- package/libs/Sculpt/Objects/Rectangle/index.d.ts +7 -4
- package/libs/Sculpt/Objects/Rectangle/index.js +119 -117
- package/libs/Sculpt/utils/Modules/Global.js +24 -24
- package/libs/base/BasePlugin.js +5 -5
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +21 -0
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +132 -91
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +16 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +132 -104
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/index.js +1 -1
- package/libs/floorplan/typings/index.d.ts +3 -0
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +18 -18
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +1 -1
- package/libs/shared-utils/Object3DHelper/typings/Hooks.d.ts +4 -3
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/PointSelector/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,34 +2,34 @@ var q = Object.defineProperty, G = Object.defineProperties;
|
|
|
2
2
|
var J = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var W = Object.getOwnPropertySymbols;
|
|
4
4
|
var K = Object.prototype.hasOwnProperty, Q = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var T = (s,
|
|
6
|
-
for (var
|
|
7
|
-
K.call(
|
|
5
|
+
var T = (s, t, e) => t in s ? q(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, f = (s, t) => {
|
|
6
|
+
for (var e in t || (t = {}))
|
|
7
|
+
K.call(t, e) && T(s, e, t[e]);
|
|
8
8
|
if (W)
|
|
9
|
-
for (var
|
|
10
|
-
Q.call(
|
|
9
|
+
for (var e of W(t))
|
|
10
|
+
Q.call(t, e) && T(s, e, t[e]);
|
|
11
11
|
return s;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var D = (s,
|
|
15
|
-
var
|
|
12
|
+
}, u = (s, t) => G(s, J(t));
|
|
13
|
+
var z = (s, t, e) => (T(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var D = (s, t, e) => new Promise((i, m) => {
|
|
15
|
+
var w = (d) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
a(e.next(d));
|
|
18
|
+
} catch (P) {
|
|
19
|
+
m(P);
|
|
20
20
|
}
|
|
21
|
-
}, l = (
|
|
21
|
+
}, l = (d) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
a(e.throw(d));
|
|
24
|
+
} catch (P) {
|
|
25
|
+
m(P);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, a = (d) => d.done ? i(d.value) : Promise.resolve(d.value).then(w, l);
|
|
28
|
+
a((e = e.apply(s, t)).next());
|
|
29
29
|
});
|
|
30
30
|
import { BaseObject as X } from "../Base/index.js";
|
|
31
31
|
import * as r from "three";
|
|
32
|
-
import { PolylineWithDotsMesh as
|
|
32
|
+
import { PolylineWithDotsMesh as M } from "../../Meshes/Polyline.js";
|
|
33
33
|
import { RectangleMeshEditor as Y } from "../../Editors/RectangleMeshEditor.js";
|
|
34
34
|
import { RectangleMesh as Z } from "../../Meshes/Rectangle.js";
|
|
35
35
|
import { RectangleWithEdgeMesh as B } from "../../Meshes/RectangleWithEdge.js";
|
|
@@ -40,19 +40,19 @@ import { anyPositionToVector3 as j } from "../../../shared-utils/positionToVecto
|
|
|
40
40
|
import { withResolvers as U } from "../../../shared-utils/promise/withResolvers.js";
|
|
41
41
|
import { PolygonMesh as S } from "../../Meshes/Polygon.js";
|
|
42
42
|
import { getNormal as ee } from "../../../shared-utils/three/getNormal.js";
|
|
43
|
-
class
|
|
44
|
-
constructor(
|
|
45
|
-
super(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
class ye extends X {
|
|
44
|
+
constructor(e, i) {
|
|
45
|
+
super(e, i);
|
|
46
|
+
z(this, "type", "Rectangle");
|
|
47
|
+
z(this, "rectangleMesh");
|
|
48
|
+
z(this, "_editor");
|
|
49
|
+
e && (this.rectangleMesh = new B(f(f({}, e.style), e)), this.add(this.rectangleMesh));
|
|
50
50
|
}
|
|
51
51
|
get editor() {
|
|
52
52
|
return this._editor || (this._editor = new Y(this.rectangleMesh)), this._editor;
|
|
53
53
|
}
|
|
54
54
|
get data() {
|
|
55
|
-
return
|
|
55
|
+
return u(f({}, this.baseData), {
|
|
56
56
|
points: $(this.applyObjectMatrixWorld(this.rectangleMesh.points, this.rectangleMesh)),
|
|
57
57
|
style: {
|
|
58
58
|
color: this.rectangleMesh.color.getHex(),
|
|
@@ -62,142 +62,144 @@ class ge extends X {
|
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
setData(
|
|
66
|
-
|
|
65
|
+
setData(e) {
|
|
66
|
+
e.points && this.rectangleMesh.setPoints(this.applyObjectReversalMatrixWorld(e.points.map(j), this.rectangleMesh)), this.rectangleMesh.setStyle(e.style), this._editor && this._editor.initialHelperMatrix();
|
|
67
67
|
}
|
|
68
68
|
highlight() {
|
|
69
|
-
var
|
|
70
|
-
(
|
|
69
|
+
var e;
|
|
70
|
+
(e = this.rectangleMesh) == null || e.highlight();
|
|
71
71
|
}
|
|
72
72
|
unhighlight() {
|
|
73
|
-
var
|
|
74
|
-
(
|
|
73
|
+
var e;
|
|
74
|
+
(e = this.rectangleMesh) == null || e.unhighlight();
|
|
75
75
|
}
|
|
76
|
-
create(
|
|
76
|
+
create(e) {
|
|
77
77
|
return D(this, null, function* () {
|
|
78
78
|
this.removeChildren();
|
|
79
|
-
const
|
|
80
|
-
this.rectangleMesh =
|
|
79
|
+
const i = new B(e);
|
|
80
|
+
this.rectangleMesh = i, this.add(this.rectangleMesh), yield te(this.rectangleMesh, this.pointSelector, e), this.config.defaultAction && this.editor.enable();
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
function te(s,
|
|
85
|
-
var
|
|
86
|
-
return ((
|
|
84
|
+
function te(s, t, e) {
|
|
85
|
+
var m;
|
|
86
|
+
return ((m = e == null ? void 0 : e.drawMethod) != null ? m : "diagonal") === "diagonal" ? se(s, t, e) : oe(s, t, e);
|
|
87
87
|
}
|
|
88
|
-
function ne(s,
|
|
89
|
-
const
|
|
90
|
-
return s.scene.traverse((
|
|
91
|
-
var
|
|
92
|
-
if (
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
return
|
|
88
|
+
function ne(s, t) {
|
|
89
|
+
const e = [];
|
|
90
|
+
return s.scene.traverse((i) => {
|
|
91
|
+
var m;
|
|
92
|
+
if (i.visible && !((m = t == null ? void 0 : t.excludes) != null && m.includes(i)) && (i instanceof Z || i instanceof S)) {
|
|
93
|
+
const w = i.points.map((l) => {
|
|
94
|
+
const a = new r.Face3(l.x, l.y, l.z, i.normal);
|
|
95
|
+
return i.style.occlusionVisibility && (a.IsAlwaysVisible = !0), a;
|
|
96
96
|
});
|
|
97
|
-
|
|
97
|
+
e.push(...w);
|
|
98
98
|
}
|
|
99
|
-
}),
|
|
99
|
+
}), e;
|
|
100
100
|
}
|
|
101
|
-
function se(s,
|
|
102
|
-
var
|
|
103
|
-
const { promise:
|
|
101
|
+
function se(s, t, e) {
|
|
102
|
+
var A;
|
|
103
|
+
const { promise: i, reject: m, resolve: w } = U(), l = s.parent;
|
|
104
104
|
if (!l)
|
|
105
|
-
return
|
|
106
|
-
const
|
|
107
|
-
l.add(
|
|
108
|
-
const
|
|
109
|
-
let
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
return m(new Error("No container"));
|
|
106
|
+
const a = (A = e == null ? void 0 : e.limit) != null ? A : "none", d = new M(u(f({}, s.style), { dashed: !0 })), P = new M(u(f({}, s.style), { dashed: !0, lengthEnable: !1 })), y = new M(u(f({}, s.style), { dashed: !1, lengthEnable: !1 }));
|
|
107
|
+
l.add(d, y, P), t.enable();
|
|
108
|
+
const n = [];
|
|
109
|
+
let h = new r.Vector3(), b = new r.Vector3();
|
|
110
|
+
const c = new r.Plane(), x = () => {
|
|
111
|
+
var o;
|
|
112
|
+
n.push(h.clone()), (o = e == null ? void 0 : e.onPointPlaced) == null || o.call(e), n.length === 1 ? (a === "xoz" && c.setFromNormalAndCoplanarPoint(new r.Vector3(0, 1, 0), n[0]), a === "none" && c.setFromNormalAndCoplanarPoint(b, n[0])) : n.length === 2 ? a === "y" || a === "xoz" ? (v(), w()) : y.setPoints([n[0], n[1]]) : n.length === 3 && (v(), w());
|
|
113
|
+
}, E = (o) => {
|
|
114
|
+
var R, N;
|
|
114
115
|
if (!(o != null && o.raycaster))
|
|
115
116
|
return;
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
|
|
117
|
+
const L = (R = n.at(-1)) == null ? void 0 : R.clone();
|
|
118
|
+
if (n.length === 0) {
|
|
119
|
+
h = o.point.clone(), b = (N = o.face) == null ? void 0 : N.normal;
|
|
119
120
|
return;
|
|
120
121
|
}
|
|
121
|
-
if (
|
|
122
|
-
const
|
|
123
|
-
s.setPoints([
|
|
122
|
+
if (n.length === 1 && a === "y") {
|
|
123
|
+
const p = new r.Line3(new r.Vector3(0, 1, 0).add(n[0]), new r.Vector3(0, -1, 0).add(n[0])).closestPointToPoint(o.point, !1, new r.Vector3());
|
|
124
|
+
s.setPoints([n[0], p, o.point]);
|
|
124
125
|
return;
|
|
125
126
|
}
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
128
|
-
s.setPoints([
|
|
127
|
+
if (n.length === 1 && a === "xoz") {
|
|
128
|
+
const V = new r.Line3(new r.Vector3(1, 0, 0).add(n[0]), new r.Vector3(-1, 0, 0).add(n[0])), p = o.raycaster.ray.intersectPlane(c, new r.Vector3()), g = V.closestPointToPoint(p, !1, new r.Vector3());
|
|
129
|
+
s.setPoints([n[0], g, p]);
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
131
|
-
if (
|
|
132
|
-
|
|
132
|
+
if (n.length === 1 && a === "none") {
|
|
133
|
+
c ? (h = o.raycaster.ray.intersectPlane(c, new r.Vector3()), P.setPoints([h, o.point])) : h = o.point.clone(), d.setPoints([L, h]);
|
|
133
134
|
return;
|
|
134
135
|
}
|
|
135
|
-
if (
|
|
136
|
-
l.remove(
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
const F = [
|
|
136
|
+
if (n.length === 2 && a === "none") {
|
|
137
|
+
l.remove(d);
|
|
138
|
+
const V = o.raycaster.ray.intersectPlane(c, new r.Vector3()), p = n[0].distanceTo(n[1]) / 2, g = new r.Vector3().lerpVectors(n[0], n[1], 0.5), _ = new r.Vector3().subVectors(V, g).normalize();
|
|
139
|
+
h = new r.Vector3().addVectors(g, _.multiplyScalar(p));
|
|
140
|
+
const F = [n[0], h, n[1]], O = H(F, I.modules.five.camera.position);
|
|
140
141
|
s.setPoints(O);
|
|
141
142
|
return;
|
|
142
143
|
}
|
|
143
144
|
}, v = () => {
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
v(), l == null || l.remove(s),
|
|
145
|
+
t.off("select", x), t.off("intersectionUpdate", E), t.off("disable", C), t.disable(), l == null || l.remove(d, y, P);
|
|
146
|
+
}, C = () => {
|
|
147
|
+
v(), l == null || l.remove(s), m(new Error("Cancelled"));
|
|
147
148
|
};
|
|
148
|
-
return
|
|
149
|
+
return t.on("select", x), t.on("intersectionUpdate", E), t.on("disable", C), i;
|
|
149
150
|
}
|
|
150
|
-
function oe(s,
|
|
151
|
-
var
|
|
152
|
-
const { promise:
|
|
151
|
+
function oe(s, t, e) {
|
|
152
|
+
var A;
|
|
153
|
+
const { promise: i, reject: m, resolve: w } = U(), l = s.parent;
|
|
153
154
|
if (!l)
|
|
154
|
-
return
|
|
155
|
-
const
|
|
156
|
-
l.add(
|
|
157
|
-
const
|
|
158
|
-
let
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
155
|
+
return m(new Error("No container"));
|
|
156
|
+
const a = (A = e == null ? void 0 : e.limit) != null ? A : "none", d = new M(u(f({}, s.style), { dashed: !0 })), P = new M(u(f({}, s.style), { dashed: !0, lengthEnable: !1 })), y = new M(u(f({}, s.style), { dashed: !1, lengthEnable: !1 }));
|
|
157
|
+
l.add(d, y, P), t.enable(), t.setAdherePoints(ne(t.five, { excludes: [s] }));
|
|
158
|
+
const n = [];
|
|
159
|
+
let h = new r.Vector3(), b = new r.Vector3();
|
|
160
|
+
const c = new r.Plane(), x = () => {
|
|
161
|
+
var o;
|
|
162
|
+
if (n.push(h.clone()), (o = e == null ? void 0 : e.onPointPlaced) == null || o.call(e), n.length === 1)
|
|
163
|
+
t.planeMode = "onlyPlane", a === "y" && (t.adhereLine = [new r.Line3(n[0], new r.Vector3(0, 1, 0).add(n[0]))]), a === "xoz" && (c.setFromNormalAndCoplanarPoint(new r.Vector3(0, 1, 0), n[0]), t.plane = c), a === "none" && (c.setFromNormalAndCoplanarPoint(b, n[0]), t.plane = c);
|
|
164
|
+
else if (n.length === 2) {
|
|
165
|
+
t.planeMode = "vertical", a === "y" && (t.adhereLine = []);
|
|
166
|
+
let L = !1;
|
|
167
|
+
n[0].x === n[1].x && n[0].z === n[1].z && (L = !0), a === "y" && !L && (c.setFromCoplanarPoints(n[0], n[1], new r.Vector3(0, 1, 0).add(n[0])), t.plane = c), y.setPoints([n[0], n[1]]);
|
|
166
168
|
} else
|
|
167
|
-
|
|
168
|
-
},
|
|
169
|
-
var
|
|
169
|
+
n.length === 3 && (v(), w());
|
|
170
|
+
}, E = (o) => {
|
|
171
|
+
var R, N, V, p;
|
|
170
172
|
if (!o || !(o != null && o.raycaster))
|
|
171
173
|
return;
|
|
172
|
-
const
|
|
173
|
-
if (
|
|
174
|
-
|
|
174
|
+
const L = (R = n.at(-1)) == null ? void 0 : R.clone();
|
|
175
|
+
if (n.length === 0) {
|
|
176
|
+
h = o.point.clone(), b = (N = o.face) == null ? void 0 : N.normal;
|
|
175
177
|
return;
|
|
176
178
|
}
|
|
177
|
-
if (
|
|
178
|
-
|
|
179
|
+
if (n.length === 1) {
|
|
180
|
+
h = o.point, P.setPoints([(V = o.originalPoint) != null ? V : o.point, o.point]), d.setPoints([L, h]);
|
|
179
181
|
return;
|
|
180
182
|
}
|
|
181
|
-
if (
|
|
182
|
-
if (!
|
|
183
|
-
const k = ee([
|
|
184
|
-
|
|
183
|
+
if (n.length === 2) {
|
|
184
|
+
if (!t.plane) {
|
|
185
|
+
const k = ee([n[0], n[1], o.point]);
|
|
186
|
+
c.setFromNormalAndCoplanarPoint(k, n[0]);
|
|
185
187
|
}
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
const F = [
|
|
188
|
+
P.setPoints([(p = o.originalPoint) != null ? p : o.point, o.point]);
|
|
189
|
+
const g = new r.Vector3().crossVectors(n[0].clone().sub(n[1]), c.normal).normalize();
|
|
190
|
+
h = new r.Line3(n[1].clone().add(g), n[1].clone().sub(g)).closestPointToPoint(o.point, !1, new r.Vector3());
|
|
191
|
+
const F = [n[0], n[1], h], O = H(F, I.modules.five.camera.position);
|
|
190
192
|
s.setPoints(O);
|
|
191
193
|
return;
|
|
192
194
|
}
|
|
193
195
|
}, v = () => {
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
v(), l == null || l.remove(s),
|
|
196
|
+
t.setAdherePoints([]), t.adhereLine = [], t.adherePlane = [], t.plane = void 0, t.off("select", x), t.off("intersectionUpdate", E), t.off("disable", C), t.disable(), l == null || l.remove(d, y, P);
|
|
197
|
+
}, C = () => {
|
|
198
|
+
v(), l == null || l.remove(s), m(new Error("Cancelled"));
|
|
197
199
|
};
|
|
198
|
-
return
|
|
200
|
+
return t.on("select", x), t.on("intersectionUpdate", E), t.on("disable", C), i;
|
|
199
201
|
}
|
|
200
202
|
export {
|
|
201
|
-
|
|
203
|
+
ye as Rectangle,
|
|
202
204
|
te as createRectangle
|
|
203
205
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var r = (t, e, i) => e in t ?
|
|
1
|
+
var u = Object.defineProperty, v = Object.defineProperties;
|
|
2
|
+
var m = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var h = Object.getOwnPropertySymbols;
|
|
4
|
+
var p = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var r = (t, e, i) => e in t ? u(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, f = (t, e) => {
|
|
6
6
|
for (var i in e || (e = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var i of
|
|
10
|
-
|
|
7
|
+
p.call(e, i) && r(t, i, e[i]);
|
|
8
|
+
if (h)
|
|
9
|
+
for (var i of h(e))
|
|
10
|
+
_.call(e, i) && r(t, i, e[i]);
|
|
11
11
|
return t;
|
|
12
|
-
},
|
|
12
|
+
}, c = (t, e) => v(t, m(e));
|
|
13
13
|
var o = (t, e, i) => (r(t, typeof e != "symbol" ? e + "" : e, i), i);
|
|
14
|
-
import { Cursor as
|
|
15
|
-
import { Object3DHelperController as
|
|
16
|
-
import { FiveDomEvents as
|
|
17
|
-
import { PointSelector as
|
|
18
|
-
class
|
|
14
|
+
import { Cursor as d } from "./Cursor.js";
|
|
15
|
+
import { Object3DHelperController as g } from "../../../Object3DHelperPlugin/Controller.js";
|
|
16
|
+
import { FiveDomEvents as a } from "../../../shared-utils/five/FiveDomEvents.js";
|
|
17
|
+
import { PointSelector as D } from "../../../shared-utils/three/PointSelector/index.js";
|
|
18
|
+
class b {
|
|
19
19
|
constructor() {
|
|
20
20
|
o(this, "five");
|
|
21
21
|
o(this, "config");
|
|
@@ -31,35 +31,35 @@ class D {
|
|
|
31
31
|
get cursor() {
|
|
32
32
|
if (!this.inited)
|
|
33
33
|
throw new Error("Global not inited");
|
|
34
|
-
return this._cursor ? this._cursor : (this._cursor = new
|
|
34
|
+
return this._cursor ? this._cursor : (this._cursor = new d(this.five.getElement()), this._cursor);
|
|
35
35
|
}
|
|
36
36
|
get pointSelector() {
|
|
37
|
-
var n, s;
|
|
37
|
+
var n, s, l;
|
|
38
38
|
if (!this.inited)
|
|
39
39
|
throw new Error("Global not inited");
|
|
40
40
|
if (this._pointSelector)
|
|
41
41
|
return this._pointSelector;
|
|
42
42
|
const e = (n = this.config) == null ? void 0 : n.magnifier;
|
|
43
43
|
let i = e === null || e === !1 ? { magnifier: null } : { magnifierParams: e };
|
|
44
|
-
return (s = this.config) != null && s.hideCursorCircle && (i = f(
|
|
44
|
+
return (s = this.config) != null && s.hideCursorCircle && (i = c(f({}, i), { pointHelper: null })), this._pointSelector = new D(this.five, {
|
|
45
45
|
mode: "cursor",
|
|
46
46
|
helper: i,
|
|
47
|
-
hitFilter: this.config.hitFilter
|
|
47
|
+
hitFilter: (l = this.config) == null ? void 0 : l.hitFilter
|
|
48
48
|
}), this._pointSelector;
|
|
49
49
|
}
|
|
50
50
|
get fiveDomEvents() {
|
|
51
51
|
if (!this.inited)
|
|
52
52
|
throw new Error("Global not inited");
|
|
53
|
-
return this._fiveDomEvents ? this._fiveDomEvents : (this._fiveDomEvents = new
|
|
53
|
+
return this._fiveDomEvents ? this._fiveDomEvents : (this._fiveDomEvents = new a(this.five, { noEmitWhenNotInScene: !0 }), this._fiveDomEvents);
|
|
54
54
|
}
|
|
55
55
|
get object3DHelper() {
|
|
56
56
|
if (!this.inited)
|
|
57
57
|
throw new Error("Global not inited");
|
|
58
|
-
return this._object3DHelper ? this._object3DHelper : (this._object3DHelper = new
|
|
58
|
+
return this._object3DHelper ? this._object3DHelper : (this._object3DHelper = new g(this.five), this._object3DHelper);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
window.globalModules =
|
|
61
|
+
const w = new b();
|
|
62
|
+
window.globalModules = w;
|
|
63
63
|
export {
|
|
64
|
-
|
|
64
|
+
w as globalModules
|
|
65
65
|
};
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var e = Object.defineProperty;
|
|
2
2
|
var s = (o, t, i) => t in o ? e(o, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[t] = i;
|
|
3
3
|
var r = (o, t, i) => (s(o, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
|
-
import { Subscribe as
|
|
4
|
+
import { Subscribe as m } from "../shared-utils/Subscribe.js";
|
|
5
5
|
import "../shared-utils/tag.js";
|
|
6
6
|
import "three";
|
|
7
7
|
import "../vendor/hammerjs/hammer.js";
|
|
@@ -15,7 +15,7 @@ import "../shared-utils/three/blink.js";
|
|
|
15
15
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
16
16
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
17
17
|
import "../vendor/earcut/src/earcut.js";
|
|
18
|
-
import { FiveUtil as
|
|
18
|
+
import { FiveUtil as l } from "../shared-utils/Utils/FiveUtil.js";
|
|
19
19
|
import { DEFAULT_STATIC_PREFIX as p } from "../shared-utils/url/defaultUrls.js";
|
|
20
20
|
import "../shared-utils/five/FivePuppet.js";
|
|
21
21
|
let I = class {
|
|
@@ -23,7 +23,7 @@ let I = class {
|
|
|
23
23
|
/**
|
|
24
24
|
* @realsee/dnalogel 版本号
|
|
25
25
|
*/
|
|
26
|
-
r(this, "VERSION", "3.77.2
|
|
26
|
+
r(this, "VERSION", "3.77.2");
|
|
27
27
|
r(this, "NAME");
|
|
28
28
|
r(this, "five");
|
|
29
29
|
r(this, "workUtil");
|
|
@@ -31,9 +31,9 @@ let I = class {
|
|
|
31
31
|
/**
|
|
32
32
|
* @description: 插件事件钩子
|
|
33
33
|
*/
|
|
34
|
-
r(this, "hooks", new
|
|
34
|
+
r(this, "hooks", new m());
|
|
35
35
|
r(this, "staticPrefix", p);
|
|
36
|
-
this.five = t, this.fiveUtil = new
|
|
36
|
+
this.five = t, this.fiveUtil = new l(t), this.workUtil = this.fiveUtil.workUtil, i != null && i.staticPrefix && (this.staticPrefix = i.staticPrefix);
|
|
37
37
|
}
|
|
38
38
|
set workCode(t) {
|
|
39
39
|
this.workUtil.workCode = t, this.onWorkCodeChange();
|
|
@@ -67,10 +67,26 @@ export declare class Controller extends BasePlugin.Controller<State, EventMap, P
|
|
|
67
67
|
changeConfigs(config: Partial<Config>, userAction?: boolean): void;
|
|
68
68
|
/** 更新户型图大小 */
|
|
69
69
|
updateSize: () => boolean;
|
|
70
|
+
/** 根据旋转角度计算 pxmm
|
|
71
|
+
* @description 当 longitude 大于 45° 或小于 -45°(相对于基准方向)时,使用 Z 轴计算
|
|
72
|
+
*/
|
|
73
|
+
private getPxmmWithRotation;
|
|
74
|
+
/** 使用 Z 轴计算 pxmm
|
|
75
|
+
* @description 当相机旋转导致 X 轴接近垂直于屏幕时,改用 Z 轴计算
|
|
76
|
+
*/
|
|
77
|
+
private getPxmmZAxis;
|
|
70
78
|
/** 更新户型图位置 */
|
|
71
79
|
updatePosition(): void;
|
|
72
80
|
highlight: (highlightData: HighlightData) => void;
|
|
73
81
|
unhighlight: () => void;
|
|
82
|
+
/** 更新展示状态
|
|
83
|
+
* @description 可以更新 longitude、latitude、offset 等参数
|
|
84
|
+
* @param showState 需要更新的状态,会与现有状态合并
|
|
85
|
+
* @example
|
|
86
|
+
* // 更新 longitude
|
|
87
|
+
* plugin.updateShowState({ longitude: Math.PI / 2 })
|
|
88
|
+
*/
|
|
89
|
+
updateShowState: (showState: Partial<ShowState>) => void;
|
|
74
90
|
protected formatData(serverData: PluginServerData): Promise<PluginData>;
|
|
75
91
|
private _disable;
|
|
76
92
|
private _enable;
|
|
@@ -95,6 +111,11 @@ export declare class Controller extends BasePlugin.Controller<State, EventMap, P
|
|
|
95
111
|
private onFivePanoArrived;
|
|
96
112
|
/** cameraUpdate 时判断户型图是否应该自动隐藏 */
|
|
97
113
|
private onFiveCameraUpdate;
|
|
114
|
+
/** 获取相对于 showState 的 pose 偏差
|
|
115
|
+
* @description 将当前相机状态的 longitude 减去 showState.longitude,归一化后返回
|
|
116
|
+
* 这样自动隐藏逻辑会检查相对偏差,而不是绝对值
|
|
117
|
+
*/
|
|
118
|
+
private getRelativePose;
|
|
98
119
|
/** 户型图展示中,转动三维模型,结束时应该自动修复模型状态 */
|
|
99
120
|
private onFiveWantsPanGesture;
|
|
100
121
|
/** 阻止点击分间走点 */
|