@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.
Files changed (44) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/CruisePlugin/Work.d.ts +0 -4
  3. package/dist/CruisePlugin/typing.d.ts +0 -7
  4. package/dist/CruisePlugin/utils/coordinatesAngle.d.ts +3 -19
  5. package/dist/Sculpt/Objects/Base/Editor.d.ts +20 -1
  6. package/dist/Sculpt/Objects/Box/index.d.ts +5 -2
  7. package/dist/Sculpt/Objects/Rectangle/index.d.ts +7 -4
  8. package/dist/floorplan/MapviewFloorplanPlugin/Controller.d.ts +21 -0
  9. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +16 -0
  10. package/dist/floorplan/typings/index.d.ts +3 -0
  11. package/dist/index.cjs.js +75 -75
  12. package/dist/index.js +7373 -7319
  13. package/dist/index.umd.js +73 -73
  14. package/dist/shared-utils/Object3DHelper/typings/Hooks.d.ts +4 -3
  15. package/dist/shared-utils/three/PointSelector/index.d.ts +1 -1
  16. package/libs/CruisePlugin/BaseController.js +1 -8
  17. package/libs/CruisePlugin/Work.d.ts +0 -4
  18. package/libs/CruisePlugin/Work.js +213 -297
  19. package/libs/CruisePlugin/typing.d.ts +0 -7
  20. package/libs/CruisePlugin/utils/coordinatesAngle.d.ts +3 -19
  21. package/libs/CruisePlugin/utils/coordinatesAngle.js +5 -10
  22. package/libs/Sculpt/Objects/Base/Editor.d.ts +20 -1
  23. package/libs/Sculpt/Objects/Base/Editor.js +91 -35
  24. package/libs/Sculpt/Objects/Box/index.d.ts +5 -2
  25. package/libs/Sculpt/Objects/Box/index.js +61 -55
  26. package/libs/Sculpt/Objects/Prism/index.js +48 -47
  27. package/libs/Sculpt/Objects/Rectangle/index.d.ts +7 -4
  28. package/libs/Sculpt/Objects/Rectangle/index.js +119 -117
  29. package/libs/Sculpt/utils/Modules/Global.js +24 -24
  30. package/libs/base/BasePlugin.js +5 -5
  31. package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +21 -0
  32. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +132 -91
  33. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +16 -0
  34. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +132 -104
  35. package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
  36. package/libs/floorplan/index.js +1 -1
  37. package/libs/floorplan/typings/index.d.ts +3 -0
  38. package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
  39. package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +18 -18
  40. package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +1 -1
  41. package/libs/shared-utils/Object3DHelper/typings/Hooks.d.ts +4 -3
  42. package/libs/shared-utils/logger.js +1 -1
  43. package/libs/shared-utils/three/PointSelector/index.d.ts +1 -1
  44. 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, e, n) => e in s ? q(s, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[e] = n, p = (s, e) => {
6
- for (var n in e || (e = {}))
7
- K.call(e, n) && T(s, n, e[n]);
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 n of W(e))
10
- Q.call(e, n) && T(s, n, e[n]);
9
+ for (var e of W(t))
10
+ Q.call(t, e) && T(s, e, t[e]);
11
11
  return s;
12
- }, P = (s, e) => G(s, J(e));
13
- var N = (s, e, n) => (T(s, typeof e != "symbol" ? e + "" : e, n), n);
14
- var D = (s, e, n) => new Promise((a, f) => {
15
- var u = (c) => {
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
- i(n.next(c));
18
- } catch (m) {
19
- f(m);
17
+ a(e.next(d));
18
+ } catch (P) {
19
+ m(P);
20
20
  }
21
- }, l = (c) => {
21
+ }, l = (d) => {
22
22
  try {
23
- i(n.throw(c));
24
- } catch (m) {
25
- f(m);
23
+ a(e.throw(d));
24
+ } catch (P) {
25
+ m(P);
26
26
  }
27
- }, i = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(u, l);
28
- i((n = n.apply(s, e)).next());
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 L } from "../../Meshes/Polyline.js";
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 ge extends X {
44
- constructor(n, a) {
45
- super(n, a);
46
- N(this, "type", "Rectangle");
47
- N(this, "rectangleMesh");
48
- N(this, "_editor");
49
- n && (this.rectangleMesh = new B(p(p({}, n.style), n)), this.add(this.rectangleMesh));
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 P(p({}, this.baseData), {
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(n) {
66
- n.points && this.rectangleMesh.setPoints(this.applyObjectReversalMatrixWorld(n.points.map(j), this.rectangleMesh)), this.rectangleMesh.setStyle(n.style), this._editor && this._editor.initialHelperMatrix();
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 n;
70
- (n = this.rectangleMesh) == null || n.highlight();
69
+ var e;
70
+ (e = this.rectangleMesh) == null || e.highlight();
71
71
  }
72
72
  unhighlight() {
73
- var n;
74
- (n = this.rectangleMesh) == null || n.unhighlight();
73
+ var e;
74
+ (e = this.rectangleMesh) == null || e.unhighlight();
75
75
  }
76
- create(n) {
76
+ create(e) {
77
77
  return D(this, null, function* () {
78
78
  this.removeChildren();
79
- const a = new B(n);
80
- this.rectangleMesh = a, this.add(this.rectangleMesh), yield te(this.rectangleMesh, this.pointSelector, n), this.config.defaultAction && this.editor.enable();
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, e, n) {
85
- var f;
86
- return ((f = n == null ? void 0 : n.drawMethod) != null ? f : "diagonal") === "diagonal" ? se(s, e, n) : oe(s, e, n);
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, e) {
89
- const n = [];
90
- return s.scene.traverse((a) => {
91
- var f;
92
- if (a.visible && !((f = e == null ? void 0 : e.excludes) != null && f.includes(a)) && (a instanceof Z || a instanceof S)) {
93
- const u = a.points.map((l) => {
94
- const i = new r.Face3(l.x, l.y, l.z, a.normal);
95
- return a.style.occlusionVisibility && (i.IsAlwaysVisible = !0), i;
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
- n.push(...u);
97
+ e.push(...w);
98
98
  }
99
- }), n;
99
+ }), e;
100
100
  }
101
- function se(s, e, n) {
102
- var C;
103
- const { promise: a, reject: f, resolve: u } = U(), l = s.parent;
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 f(new Error("No container"));
106
- const i = (C = n == null ? void 0 : n.limit) != null ? C : "none", c = new L(P(p({}, s.style), { dashed: !0 })), m = new L(P(p({}, s.style), { dashed: !0, lengthEnable: !1 })), g = new L(P(p({}, s.style), { dashed: !1, lengthEnable: !1 }));
107
- l.add(c, g, m), e.enable();
108
- const t = [];
109
- let d = new r.Vector3(), M = new r.Vector3();
110
- const h = new r.Plane(), b = () => {
111
- t.push(d.clone()), t.length === 1 ? (i === "xoz" && h.setFromNormalAndCoplanarPoint(new r.Vector3(0, 1, 0), t[0]), i === "none" && h.setFromNormalAndCoplanarPoint(M, t[0])) : t.length === 2 ? i === "y" || i === "xoz" ? (v(), u()) : g.setPoints([t[0], t[1]]) : t.length === 3 && (v(), u());
112
- }, x = (o) => {
113
- var A, R;
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 z = (A = t.at(-1)) == null ? void 0 : A.clone();
117
- if (t.length === 0) {
118
- d = o.point.clone(), M = (R = o.face) == null ? void 0 : R.normal;
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 (t.length === 1 && i === "y") {
122
- const w = new r.Line3(new r.Vector3(0, 1, 0).add(t[0]), new r.Vector3(0, -1, 0).add(t[0])).closestPointToPoint(o.point, !1, new r.Vector3());
123
- s.setPoints([t[0], w, o.point]);
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 (t.length === 1 && i === "xoz") {
127
- const y = new r.Line3(new r.Vector3(1, 0, 0).add(t[0]), new r.Vector3(-1, 0, 0).add(t[0])), w = o.raycaster.ray.intersectPlane(h, new r.Vector3()), V = y.closestPointToPoint(w, !1, new r.Vector3());
128
- s.setPoints([t[0], V, w]);
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 (t.length === 1 && i === "none") {
132
- h ? (d = o.raycaster.ray.intersectPlane(h, new r.Vector3()), m.setPoints([d, o.point])) : d = o.point.clone(), c.setPoints([z, d]);
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 (t.length === 2 && i === "none") {
136
- l.remove(c);
137
- const y = o.raycaster.ray.intersectPlane(h, new r.Vector3()), w = t[0].distanceTo(t[1]) / 2, V = new r.Vector3().lerpVectors(t[0], t[1], 0.5), _ = new r.Vector3().subVectors(y, V).normalize();
138
- d = new r.Vector3().addVectors(V, _.multiplyScalar(w));
139
- const F = [t[0], d, t[1]], O = H(F, I.modules.five.camera.position);
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
- e.off("select", b), e.off("intersectionUpdate", x), e.off("disable", E), e.disable(), l == null || l.remove(c, g, m);
145
- }, E = () => {
146
- v(), l == null || l.remove(s), f(new Error("Cancelled"));
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 e.on("select", b), e.on("intersectionUpdate", x), e.on("disable", E), a;
149
+ return t.on("select", x), t.on("intersectionUpdate", E), t.on("disable", C), i;
149
150
  }
150
- function oe(s, e, n) {
151
- var C;
152
- const { promise: a, reject: f, resolve: u } = U(), l = s.parent;
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 f(new Error("No container"));
155
- const i = (C = n == null ? void 0 : n.limit) != null ? C : "none", c = new L(P(p({}, s.style), { dashed: !0 })), m = new L(P(p({}, s.style), { dashed: !0, lengthEnable: !1 })), g = new L(P(p({}, s.style), { dashed: !1, lengthEnable: !1 }));
156
- l.add(c, g, m), e.enable(), e.setAdherePoints(ne(e.five, { excludes: [s] }));
157
- const t = [];
158
- let d = new r.Vector3(), M = new r.Vector3();
159
- const h = new r.Plane(), b = () => {
160
- if (t.push(d.clone()), t.length === 1)
161
- e.planeMode = "onlyPlane", i === "y" && (e.adhereLine = [new r.Line3(t[0], new r.Vector3(0, 1, 0).add(t[0]))]), i === "xoz" && (h.setFromNormalAndCoplanarPoint(new r.Vector3(0, 1, 0), t[0]), e.plane = h), i === "none" && (h.setFromNormalAndCoplanarPoint(M, t[0]), e.plane = h);
162
- else if (t.length === 2) {
163
- e.planeMode = "vertical", i === "y" && (e.adhereLine = []);
164
- let o = !1;
165
- t[0].x === t[1].x && t[0].z === t[1].z && (o = !0), i === "y" && !o && (h.setFromCoplanarPoints(t[0], t[1], new r.Vector3(0, 1, 0).add(t[0])), e.plane = h), g.setPoints([t[0], t[1]]);
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
- t.length === 3 && (v(), u());
168
- }, x = (o) => {
169
- var A, R, y, w;
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 z = (A = t.at(-1)) == null ? void 0 : A.clone();
173
- if (t.length === 0) {
174
- d = o.point.clone(), M = (R = o.face) == null ? void 0 : R.normal;
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 (t.length === 1) {
178
- d = o.point, m.setPoints([(y = o.originalPoint) != null ? y : o.point, o.point]), c.setPoints([z, d]);
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 (t.length === 2) {
182
- if (!e.plane) {
183
- const k = ee([t[0], t[1], o.point]);
184
- h.setFromNormalAndCoplanarPoint(k, t[0]);
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
- m.setPoints([(w = o.originalPoint) != null ? w : o.point, o.point]);
187
- const V = new r.Vector3().crossVectors(t[0].clone().sub(t[1]), h.normal).normalize();
188
- d = new r.Line3(t[1].clone().add(V), t[1].clone().sub(V)).closestPointToPoint(o.point, !1, new r.Vector3());
189
- const F = [t[0], t[1], d], O = H(F, I.modules.five.camera.position);
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
- e.setAdherePoints([]), e.adhereLine = [], e.adherePlane = [], e.plane = void 0, e.off("select", b), e.off("intersectionUpdate", x), e.off("disable", E), e.disable(), l == null || l.remove(c, g, m);
195
- }, E = () => {
196
- v(), l == null || l.remove(s), f(new Error("Cancelled"));
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 e.on("select", b), e.on("intersectionUpdate", x), e.on("disable", E), a;
200
+ return t.on("select", x), t.on("intersectionUpdate", E), t.on("disable", C), i;
199
201
  }
200
202
  export {
201
- ge as Rectangle,
203
+ ye as Rectangle,
202
204
  te as createRectangle
203
205
  };
@@ -1,21 +1,21 @@
1
- var c = Object.defineProperty, u = Object.defineProperties;
2
- var v = Object.getOwnPropertyDescriptors;
3
- var l = Object.getOwnPropertySymbols;
4
- var m = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
5
- var r = (t, e, i) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, h = (t, e) => {
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
- m.call(e, i) && r(t, i, e[i]);
8
- if (l)
9
- for (var i of l(e))
10
- p.call(e, i) && r(t, i, e[i]);
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
- }, f = (t, e) => u(t, v(e));
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 _ } from "./Cursor.js";
15
- import { Object3DHelperController as d } from "../../../Object3DHelperPlugin/Controller.js";
16
- import { FiveDomEvents as g } from "../../../shared-utils/five/FiveDomEvents.js";
17
- import { PointSelector as a } from "../../../shared-utils/three/PointSelector/index.js";
18
- class D {
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 _(this.five.getElement()), this._cursor);
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(h({}, i), { pointHelper: null })), this._pointSelector = new a(this.five, {
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 g(this.five, { noEmitWhenNotInScene: !0 }), this._fiveDomEvents);
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 d(this.five), this._object3DHelper);
58
+ return this._object3DHelper ? this._object3DHelper : (this._object3DHelper = new g(this.five), this._object3DHelper);
59
59
  }
60
60
  }
61
- const b = new D();
62
- window.globalModules = b;
61
+ const w = new b();
62
+ window.globalModules = w;
63
63
  export {
64
- b as globalModules
64
+ w as globalModules
65
65
  };
@@ -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 l } from "../shared-utils/Subscribe.js";
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 m } from "../shared-utils/Utils/FiveUtil.js";
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-alpha.0");
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 l());
34
+ r(this, "hooks", new m());
35
35
  r(this, "staticPrefix", p);
36
- this.five = t, this.fiveUtil = new m(t), this.workUtil = this.fiveUtil.workUtil, i != null && i.staticPrefix && (this.staticPrefix = i.staticPrefix);
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
  /** 阻止点击分间走点 */