@realsee/dnalogel 3.77.2-alpha.0 → 3.77.3-alpha.1

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 (136) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/Sculpt/Meshes/Line.d.ts +4 -0
  3. package/dist/Sculpt/Objects/Base/Editor.d.ts +20 -1
  4. package/dist/Sculpt/Objects/Box/index.d.ts +5 -2
  5. package/dist/Sculpt/Objects/Rectangle/index.d.ts +7 -4
  6. package/dist/floorplan/MapviewFloorplanPlugin/Controller.d.ts +21 -0
  7. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +16 -0
  8. package/dist/floorplan/typings/index.d.ts +3 -0
  9. package/dist/index.cjs.js +79 -79
  10. package/dist/index.js +6181 -6031
  11. package/dist/index.umd.js +71 -71
  12. package/dist/shared-utils/Object3DHelper/typings/Hooks.d.ts +4 -3
  13. package/dist/shared-utils/five/getFiveFromParentChain.d.ts +7 -0
  14. package/dist/shared-utils/three/PointSelector/index.d.ts +1 -1
  15. package/libs/AreaMakerPlugin/Controller.js +3 -2
  16. package/libs/AreaMakerPlugin/index.js +3 -2
  17. package/libs/AreaMakerPlugin/utils/Item.js +3 -2
  18. package/libs/CSS3DRenderPlugin/Controller.js +3 -2
  19. package/libs/CSS3DRenderPlugin/index.js +6 -5
  20. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +39 -38
  21. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +10 -9
  22. package/libs/CruisePlugin/BaseController.js +5 -4
  23. package/libs/CruisePlugin/Move.js +3 -2
  24. package/libs/CruisePlugin/Work.js +3 -2
  25. package/libs/CruisePlugin/index.js +7 -6
  26. package/libs/CurrentPanoImagePlugin/Controller.js +15 -14
  27. package/libs/CurrentPanoImagePlugin/index.js +4 -3
  28. package/libs/GuideLinePlugin/Controller.js +5 -4
  29. package/libs/GuideLinePlugin/GuideLineItem.js +3 -2
  30. package/libs/GuideLinePlugin/GuideLineModeItem.js +3 -2
  31. package/libs/GuideLinePlugin/index.js +7 -6
  32. package/libs/MeasurePlugin/Controller.js +11 -10
  33. package/libs/MeasurePlugin/index.js +5 -4
  34. package/libs/MeasurePlugin/utils/MeasureMesh.js +3 -2
  35. package/libs/ModelChassisCompassPlugin/Plugin.js +4 -3
  36. package/libs/ModelChassisCompassPlugin/index.js +1 -0
  37. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +6 -5
  38. package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
  39. package/libs/ModelMakerPlugin/Controller.js +3 -2
  40. package/libs/ModelMakerPlugin/index.js +3 -2
  41. package/libs/ModelMakerPlugin/item/baseItem.js +3 -2
  42. package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
  43. package/libs/ModelMakerPlugin/item/polygonItem.js +3 -2
  44. package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
  45. package/libs/ModelTVVideoPlugin/Plugin.js +4 -3
  46. package/libs/ModelTVVideoPlugin/index.js +3 -2
  47. package/libs/ModelViewPlugin/Plugin.js +20 -19
  48. package/libs/ModelViewPlugin/index.js +1 -0
  49. package/libs/Object3DHelperPlugin/Controller.js +3 -2
  50. package/libs/Object3DHelperPlugin/index.js +6 -5
  51. package/libs/PanoCompassPlugin/Controller.js +3 -2
  52. package/libs/PanoCompassPlugin/index.js +4 -3
  53. package/libs/PanoDoorLabelPlugin/Controller.js +24 -23
  54. package/libs/PanoDoorLabelPlugin/index.js +4 -3
  55. package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
  56. package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
  57. package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
  58. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +7 -10
  59. package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
  60. package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
  61. package/libs/PanoMeasurePlugin/Model/area.js +3 -2
  62. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -0
  63. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +16 -15
  64. package/libs/PanoMeasurePlugin/index.js +14 -13
  65. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +3 -2
  66. package/libs/PanoRulerProPlugin/Controller.js +3 -2
  67. package/libs/PanoRulerProPlugin/RulerItems.js +42 -41
  68. package/libs/PanoRulerProPlugin/index.js +4 -3
  69. package/libs/PanoSpatialTagPlugin/Plugin.js +34 -33
  70. package/libs/PanoSpatialTagPlugin/index.js +1 -0
  71. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +3 -2
  72. package/libs/PanoTagPlugin/Components/Common/TagPopover/PopoverContent.js +3 -2
  73. package/libs/PanoTagPlugin/Components/Common/TagPopover/TagPopoverToolBar.js +3 -2
  74. package/libs/PanoTagPlugin/Components/Common/TagPopover/index.js +3 -2
  75. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
  76. package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
  77. package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
  78. package/libs/PanoTagPlugin/Components/TagItem.js +3 -2
  79. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +3 -2
  80. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
  81. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
  82. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
  83. package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
  84. package/libs/PanoTagPlugin/controller/TagUtil.js +3 -2
  85. package/libs/PanoTagPlugin/controller/index.js +6 -5
  86. package/libs/PanoTagPlugin/index.js +12 -11
  87. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -2
  88. package/libs/PanoTagPlugin/utils/tag/format.js +3 -2
  89. package/libs/PanoVideoPlugin/Controller.js +9 -8
  90. package/libs/PanoVideoPlugin/VideoMeshController.js +3 -2
  91. package/libs/PanoVideoPlugin/index.js +6 -5
  92. package/libs/PipelinePlugin/Controller.js +3 -2
  93. package/libs/PipelinePlugin/index.js +4 -3
  94. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +3 -2
  95. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -2
  96. package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -0
  97. package/libs/Sculpt/Meshes/Line.d.ts +4 -0
  98. package/libs/Sculpt/Meshes/Line.js +85 -76
  99. package/libs/Sculpt/Meshes/Point.js +28 -28
  100. package/libs/Sculpt/Meshes/Polygon.js +43 -43
  101. package/libs/Sculpt/Objects/Base/Editor.d.ts +20 -1
  102. package/libs/Sculpt/Objects/Base/Editor.js +91 -35
  103. package/libs/Sculpt/Objects/Box/index.d.ts +5 -2
  104. package/libs/Sculpt/Objects/Box/index.js +61 -55
  105. package/libs/Sculpt/Objects/Prism/index.js +48 -47
  106. package/libs/Sculpt/Objects/Rectangle/index.d.ts +7 -4
  107. package/libs/Sculpt/Objects/Rectangle/index.js +119 -117
  108. package/libs/Sculpt/index.js +1 -1
  109. package/libs/Sculpt/utils/Modules/Cursor.js +7 -7
  110. package/libs/Sculpt/utils/Modules/Global.js +24 -24
  111. package/libs/base/BasePlugin.js +1 -1
  112. package/libs/floorplan/FloorplanGuidePlugin/Controller.js +3 -2
  113. package/libs/floorplan/FloorplanGuidePlugin/index.js +4 -3
  114. package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +21 -0
  115. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +134 -92
  116. package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -3
  117. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +16 -0
  118. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +133 -104
  119. package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -4
  120. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -2
  121. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -3
  122. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +3 -2
  123. package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -3
  124. package/libs/floorplan/index.js +1 -1
  125. package/libs/floorplan/typings/index.d.ts +3 -0
  126. package/libs/index.js +151 -150
  127. package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
  128. package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +18 -18
  129. package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +1 -1
  130. package/libs/shared-utils/Object3DHelper/typings/Hooks.d.ts +4 -3
  131. package/libs/shared-utils/five/getFiveFromParentChain.d.ts +7 -0
  132. package/libs/shared-utils/five/getFiveFromParentChain.js +15 -0
  133. package/libs/shared-utils/logger.js +1 -1
  134. package/libs/shared-utils/three/PointSelector/index.d.ts +1 -1
  135. package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +1 -0
  136. 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
  };
@@ -90,7 +90,7 @@ const d = class extends E {
90
90
  });
91
91
  this.five = e, this.theme = t, this.config = g({
92
92
  magnifier: { width: 190, height: 190, scale: 2, dragEnabled: !0 }
93
- }, i), this.group = new z(), this.group.name = "Sculpt", this.group.__sculpt__ = this, e.scene.add(this.group), d.modules.init(e, this.config), x("ctrl+z, command+z", this.undo), x("ctrl+shift+z, command+shift+z", this.redo), d.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: c, origDomEvent: s }) => {
93
+ }, i), this.group = new z(), this.group.name = "Sculpt", this.group.__sculpt__ = this, this.group.__five__ = this.five, e.scene.add(this.group), d.modules.init(e, this.config), x("ctrl+z, command+z", this.undo), x("ctrl+shift+z, command+shift+z", this.redo), d.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: c, origDomEvent: s }) => {
94
94
  var o;
95
95
  const r = F((o = c == null ? void 0 : c[0]) == null ? void 0 : o.object, (h) => h.isSculptObject);
96
96
  return r && !r.editing ? this.emit("click", s, r) : !1;
@@ -2,8 +2,8 @@ var l = Object.defineProperty;
2
2
  var u = (n, e, o) => e in n ? l(n, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[e] = o;
3
3
  var r = (n, e, o) => (u(n, typeof e != "symbol" ? e + "" : e, o), o);
4
4
  import { DeleteButtonBgBorder as a } from "./DeleteButtonBgBorder.js";
5
- import { DeleteIconSVG as p } from "./DeleteIconSVG.js";
6
- const d = {
5
+ import { DeleteIconSVG as d } from "./DeleteIconSVG.js";
6
+ const p = {
7
7
  auto: "",
8
8
  pen: "",
9
9
  "pen-forbidden": "",
@@ -13,7 +13,7 @@ const d = {
13
13
  "crosshair-rectangle": "",
14
14
  "crosshair-circle": ""
15
15
  }, h = {
16
- position: "absolute",
16
+ position: "fixed",
17
17
  width: "34px",
18
18
  height: "34px",
19
19
  transform: "translate(-50%, -40px)",
@@ -30,10 +30,10 @@ const d = {
30
30
  backgroundRepeat: "no-repeat"
31
31
  }, m = `
32
32
  <div style="width: 32px; height: 32px; background-color: rgba(0, 0, 0, 0.5); border-radius: 50%; display: flex; align-items: center; justify-content: center;">
33
- ${p}
33
+ ${d}
34
34
  </div>
35
35
  `;
36
- class B {
36
+ class f {
37
37
  constructor(e) {
38
38
  r(this, "container");
39
39
  r(this, "deleteButton");
@@ -43,7 +43,7 @@ class B {
43
43
  * @param type - The type of the cursor.
44
44
  */
45
45
  setType(e) {
46
- const o = d[e];
46
+ const o = p[e];
47
47
  o ? this.container.style.cursor = `url(${o}), auto` : this.container.style.cursor = e;
48
48
  }
49
49
  showDeleteButton(e) {
@@ -66,5 +66,5 @@ class B {
66
66
  }
67
67
  }
68
68
  export {
69
- B as Cursor
69
+ f as Cursor
70
70
  };
@@ -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
  };
@@ -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.3-alpha.1");
27
27
  r(this, "NAME");
28
28
  r(this, "five");
29
29
  r(this, "workUtil");
@@ -102,6 +102,7 @@ import "../../shared-utils/three/IObject3D.js";
102
102
  import "../../Sculpt/utils/Meshes/getLengthHTML.js";
103
103
  import "../../shared-utils/three/applyObjectMatrixWorld.js";
104
104
  import "../../shared-utils/util.js";
105
+ import "../../shared-utils/five/getFiveFromParentChain.js";
105
106
  import "../../shared-utils/three/core/LineGeometry.js";
106
107
  import "../../shared-utils/three/core/LineMaterial.js";
107
108
  import "../../shared-utils/three/core/Line2.js";
@@ -123,7 +124,7 @@ import "../../shared-utils/url/absoluteUrl.js";
123
124
  import "../../shared-utils/isTruelyObject.js";
124
125
  import "../../base/BasePlugin.js";
125
126
  import "../Assets/floorplanExtraObject.js";
126
- class Si extends k {
127
+ class Fi extends k {
127
128
  constructor(t, i) {
128
129
  var o, s;
129
130
  super(t);
@@ -345,5 +346,5 @@ class Si extends k {
345
346
  }
346
347
  }
347
348
  export {
348
- Si as Controller
349
+ Fi as Controller
349
350
  };
@@ -71,6 +71,7 @@ import "../../Sculpt/typings/style.js";
71
71
  import "../../shared-utils/three/IObject3D.js";
72
72
  import "../../Sculpt/utils/Meshes/getLengthHTML.js";
73
73
  import "../../shared-utils/three/applyObjectMatrixWorld.js";
74
+ import "../../shared-utils/five/getFiveFromParentChain.js";
74
75
  import "../../shared-utils/three/core/LineGeometry.js";
75
76
  import "../../shared-utils/three/core/LineMaterial.js";
76
77
  import "../../shared-utils/three/core/Line2.js";
@@ -95,8 +96,8 @@ import "../../base/BasePluginWithData.js";
95
96
  import "../../base/BasePlugin.js";
96
97
  import "../utils/formatData.js";
97
98
  import "../Assets/floorplanExtraObject.js";
98
- const Vo = (o, r) => new t(o, r);
99
+ const Wo = (o, r) => new t(o, r);
99
100
  export {
100
- Vo as FloorplanGuidePlugin,
101
- Vo as default
101
+ Wo as FloorplanGuidePlugin,
102
+ Wo as default
102
103
  };
@@ -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
  /** 阻止点击分间走点 */