@realsee/dnalogel 3.47.7 → 3.47.9

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 (112) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/PanoTagPlugin/controller/Tag/PointTag.d.ts +0 -1
  3. package/dist/Sculpt/Meshes/Rectangle.d.ts +0 -1
  4. package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +9 -0
  5. package/dist/Sculpt/Objects/Line/index.d.ts +3 -3
  6. package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -3
  7. package/dist/Sculpt/Objects/Polyline/index.d.ts +3 -3
  8. package/dist/Sculpt/Objects/Rectangle/index.d.ts +6 -2
  9. package/dist/Sculpt/typings/style.d.ts +8 -1
  10. package/dist/index.cjs.js +32 -32
  11. package/dist/index.js +1455 -1441
  12. package/dist/index.umd.js +33 -33
  13. package/dist/shared-utils/tag.d.ts +5 -0
  14. package/libs/AreaMakerPlugin/Controller.js +1 -1
  15. package/libs/AreaMakerPlugin/index.js +1 -1
  16. package/libs/AreaMakerPlugin/utils/Item.js +1 -1
  17. package/libs/CSS3DRenderPlugin/Controller.js +1 -1
  18. package/libs/CSS3DRenderPlugin/index.js +1 -1
  19. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +1 -1
  20. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +1 -1
  21. package/libs/CruisePlugin/BaseController.js +1 -1
  22. package/libs/CruisePlugin/Move.js +1 -1
  23. package/libs/CruisePlugin/Work.js +1 -1
  24. package/libs/CruisePlugin/index.js +1 -1
  25. package/libs/CurrentPanoImagePlugin/Controller.js +1 -1
  26. package/libs/CurrentPanoImagePlugin/index.js +1 -1
  27. package/libs/GuideLinePlugin/Controller.js +1 -1
  28. package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
  29. package/libs/GuideLinePlugin/GuideLineModeItem.js +1 -1
  30. package/libs/GuideLinePlugin/index.js +1 -1
  31. package/libs/ModelMakerPlugin/Controller.js +1 -1
  32. package/libs/ModelMakerPlugin/index.js +1 -1
  33. package/libs/ModelMakerPlugin/item/baseItem.js +1 -1
  34. package/libs/ModelMakerPlugin/item/boxItem.js +1 -1
  35. package/libs/ModelMakerPlugin/item/polygonItem.js +1 -1
  36. package/libs/ModelMakerPlugin/item/prismItem.js +1 -1
  37. package/libs/ModelTVVideoPlugin/Plugin.js +1 -1
  38. package/libs/ModelTVVideoPlugin/index.js +1 -1
  39. package/libs/Object3DHelperPlugin/Controller.js +1 -1
  40. package/libs/Object3DHelperPlugin/index.js +1 -1
  41. package/libs/PanoCompassPlugin/Controller.js +1 -1
  42. package/libs/PanoCompassPlugin/index.js +1 -1
  43. package/libs/PanoDoorLabelPlugin/BaseController.js +1 -1
  44. package/libs/PanoDoorLabelPlugin/Controller.js +1 -1
  45. package/libs/PanoDoorLabelPlugin/index.js +1 -1
  46. package/libs/PanoMeasurePlugin/Components/Controller0.js +1 -1
  47. package/libs/PanoMeasurePlugin/Components/Controller1.js +1 -1
  48. package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -1
  49. package/libs/PanoMeasurePlugin/Controller/WatchController.js +1 -1
  50. package/libs/PanoMeasurePlugin/Controller/index.js +1 -1
  51. package/libs/PanoMeasurePlugin/Model/area.js +1 -1
  52. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -1
  53. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +1 -1
  54. package/libs/PanoMeasurePlugin/index.js +1 -1
  55. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +1 -1
  56. package/libs/PanoSpatialTagPlugin/Plugin.js +1 -1
  57. package/libs/PanoSpatialTagPlugin/index.js +1 -1
  58. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +1 -1
  59. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +1 -1
  60. package/libs/PanoTagPlugin/Components/Tag/index.js +1 -1
  61. package/libs/PanoTagPlugin/Components/TagContainer.js +1 -1
  62. package/libs/PanoTagPlugin/Components/TagItem.js +1 -1
  63. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +1 -1
  64. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +1 -1
  65. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +1 -1
  66. package/libs/PanoTagPlugin/controller/Tag/PointTag.d.ts +0 -1
  67. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +1 -4
  68. package/libs/PanoTagPlugin/controller/TagRender.js +55 -55
  69. package/libs/PanoTagPlugin/controller/TagUtil.js +1 -1
  70. package/libs/PanoTagPlugin/controller/index.js +1 -1
  71. package/libs/PanoTagPlugin/index.js +1 -1
  72. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +1 -1
  73. package/libs/PanoVideoPlugin/Controller.js +1 -1
  74. package/libs/PanoVideoPlugin/VideoMeshController.js +1 -1
  75. package/libs/PanoVideoPlugin/index.js +1 -1
  76. package/libs/PipelinePlugin/Controller.js +1 -1
  77. package/libs/PipelinePlugin/index.js +1 -1
  78. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +1 -1
  79. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +1 -1
  80. package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -1
  81. package/libs/Sculpt/Meshes/Box.js +10 -10
  82. package/libs/Sculpt/Meshes/Line.js +18 -15
  83. package/libs/Sculpt/Meshes/Rectangle.d.ts +0 -1
  84. package/libs/Sculpt/Meshes/Rectangle.js +14 -17
  85. package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +9 -0
  86. package/libs/Sculpt/Meshes/RectangleWithEdge.js +29 -19
  87. package/libs/Sculpt/Objects/Line/index.d.ts +3 -3
  88. package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -3
  89. package/libs/Sculpt/Objects/Polyline/index.d.ts +3 -3
  90. package/libs/Sculpt/Objects/Rectangle/index.d.ts +6 -2
  91. package/libs/Sculpt/Objects/Rectangle/index.js +77 -67
  92. package/libs/Sculpt/typings/style.d.ts +8 -1
  93. package/libs/Sculpt/utils/Meshes/getLengthHTML.js +2 -2
  94. package/libs/Sculpt/utils/three/RectangleGeometry.js +1 -1
  95. package/libs/base/BasePlugin.js +1 -1
  96. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
  97. package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -1
  98. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
  99. package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
  100. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
  101. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -1
  102. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
  103. package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -1
  104. package/libs/index.js +1 -1
  105. package/libs/shared-utils/five/vector3ToScreen.js +5 -7
  106. package/libs/shared-utils/logger.js +1 -1
  107. package/libs/shared-utils/tag.d.ts +5 -0
  108. package/libs/shared-utils/tag.js +31 -26
  109. package/package.json +1 -1
  110. /package/dist/shared-utils/three/{raycaster.d.ts → temp.d.ts} +0 -0
  111. /package/libs/shared-utils/three/{raycaster.d.ts → temp.d.ts} +0 -0
  112. /package/libs/shared-utils/three/{raycaster.js → temp.js} +0 -0
@@ -1,8 +1,8 @@
1
- var d = Object.defineProperty;
2
- var p = (e, i, t) => i in e ? d(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t;
3
- var s = (e, i, t) => (p(e, typeof i != "symbol" ? i + "" : i, t), t);
1
+ var p = Object.defineProperty;
2
+ var d = (e, i, t) => i in e ? p(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t;
3
+ var s = (e, i, t) => (d(e, typeof i != "symbol" ? i + "" : i, t), t);
4
4
  import { IObject3D as a } from "../../shared-utils/three/IObject3D.js";
5
- import { anyPositionToVector3 as c } from "../../shared-utils/positionToVector3.js";
5
+ import { anyPositionToVector3 as P } from "../../shared-utils/positionToVector3.js";
6
6
  import "three";
7
7
  import "hammerjs";
8
8
  import "three/examples/jsm/renderers/CSS3DRenderer";
@@ -11,7 +11,7 @@ import "../../shared-utils/three/THREESphere.js";
11
11
  import "animejs";
12
12
  import { notNil as r } from "../../shared-utils/isNil.js";
13
13
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
14
- import { RectangleWithEdgeMesh as P } from "./RectangleWithEdge.js";
14
+ import { RectangleWithEdgeMesh as c } from "./RectangleWithEdge.js";
15
15
  import { RectangleMesh as m } from "./Rectangle.js";
16
16
  class w extends a {
17
17
  constructor(t) {
@@ -21,7 +21,7 @@ class w extends a {
21
21
  s(this, "topPlane");
22
22
  s(this, "heightPoint");
23
23
  s(this, "edgePlanes", []);
24
- this.bottomPlane = new P(t), this.topPlane = new P(t), this.add(this.bottomPlane), t != null && t.points && this.setPoints(t);
24
+ this.bottomPlane = new c(t), this.topPlane = new c(t), this.add(this.bottomPlane), t != null && t.points && this.setPoints(t);
25
25
  }
26
26
  get planes() {
27
27
  return this.children.filter((t) => t instanceof m);
@@ -50,7 +50,7 @@ class w extends a {
50
50
  r(t.heightPoint) && this.setTopHeightPoint(t.heightPoint), r(t.points) && this.setBottomPoints(t.points);
51
51
  }
52
52
  setBottomPoints(t) {
53
- const o = t.map(c).filter(r);
53
+ const o = t.map(P).filter(r);
54
54
  if (o.length < 3) {
55
55
  console.error("Invalid position");
56
56
  return;
@@ -60,7 +60,7 @@ class w extends a {
60
60
  setTopHeightPoint(t) {
61
61
  if (!this.bottomPlane.points.length)
62
62
  return;
63
- const o = c(t);
63
+ const o = P(t);
64
64
  this.heightPoint = o, this.addIfNotExists(this.topPlane);
65
65
  const h = this.bottomPlane.projectPoint(o), n = o.clone().sub(h), l = this.bottomPlane.points.map((g) => g.clone().add(n));
66
66
  this.topPlane.setPoints(l), this.up.copy(n.clone().normalize()), this.setEdgePlanes();
@@ -68,14 +68,14 @@ class w extends a {
68
68
  setEdgePlanes() {
69
69
  for (let t = 0; t < 4; t++) {
70
70
  let o = this.edgePlanes[t];
71
- o || (this.edgePlanes[t] = new P({
71
+ o || (this.edgePlanes[t] = new c({
72
72
  color: this.color,
73
73
  lineColor: this.lineColor,
74
74
  lineWidth: this.lineWidth,
75
75
  occlusionVisibility: this.occlusionVisibility,
76
76
  occlusionMode: this.occlusionMode
77
77
  }), o = this.edgePlanes[t]);
78
- const h = this.topPlane.sortedPoint, n = this.bottomPlane.sortedPoint, l = t === 3 ? 0 : t + 1;
78
+ const h = this.topPlane.points, n = this.bottomPlane.points, l = t === 3 ? 0 : t + 1;
79
79
  o.setPoints([h[t], n[l], n[t]]), o.line.setPoints([h[t], n[t]]), this.addIfNotExists(o);
80
80
  }
81
81
  }
@@ -1,18 +1,18 @@
1
1
  var _ = Object.defineProperty;
2
2
  var b = Object.getOwnPropertySymbols;
3
- var S = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
4
- var u = (s, o, e) => o in s ? _(s, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[o] = e, f = (s, o) => {
3
+ var k = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
4
+ var f = (s, o, e) => o in s ? _(s, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[o] = e, y = (s, o) => {
5
5
  for (var e in o || (o = {}))
6
- S.call(o, e) && u(s, e, o[e]);
6
+ k.call(o, e) && f(s, e, o[e]);
7
7
  if (b)
8
8
  for (var e of b(o))
9
- k.call(o, e) && u(s, e, o[e]);
9
+ S.call(o, e) && f(s, e, o[e]);
10
10
  return s;
11
11
  };
12
- var h = (s, o, e) => (u(s, typeof o != "symbol" ? o + "" : o, e), e);
12
+ var h = (s, o, e) => (f(s, typeof o != "symbol" ? o + "" : o, e), e);
13
13
  import * as d from "three";
14
14
  import { DEFAULT_LINE_COLOR as m, DEFAULT_LINE_WIDTH as M, DEFAULT_HIGHLIGHT_OPACITY as D } from "../typings/style.js";
15
- import { LineGeometry as y, LineMaterial as w, THREE_Line2 as H } from "../../shared-utils/five/FiveLine.js";
15
+ import { LineGeometry as L, LineMaterial as w, THREE_Line2 as H } from "../../shared-utils/five/FiveLine.js";
16
16
  import { anyPositionToVector3 as C } from "../../shared-utils/positionToVector3.js";
17
17
  import { IObject3D as I } from "../../shared-utils/three/IObject3D.js";
18
18
  import "hammerjs";
@@ -54,7 +54,7 @@ class T extends H {
54
54
  }
55
55
  class X extends I {
56
56
  constructor(e) {
57
- var l, r, g, a, L;
57
+ var l, r, u, a, g;
58
58
  super();
59
59
  h(this, "name", "LineMesh");
60
60
  h(this, "points");
@@ -65,15 +65,15 @@ class X extends I {
65
65
  h(this, "opacityBeforeHighlight");
66
66
  h(this, "paramsStyle", {});
67
67
  this.paramsStyle = e != null ? e : {};
68
- const n = new y(), t = new E({
68
+ const n = new L(), t = new E({
69
69
  color: new d.Color((l = e == null ? void 0 : e.lineColor) != null ? l : m),
70
70
  linewidth: (r = e == null ? void 0 : e.lineWidth) != null ? r : M,
71
71
  dashScale: 40,
72
- opacity: (g = e == null ? void 0 : e.opacity) != null ? g : 1,
72
+ opacity: (u = e == null ? void 0 : e.opacity) != null ? u : 1,
73
73
  transparent: !0,
74
74
  dashed: (a = e == null ? void 0 : e.dashed) != null ? a : !1
75
75
  }), i = new E({
76
- color: new d.Color((L = e == null ? void 0 : e.lineColor) != null ? L : m),
76
+ color: new d.Color((g = e == null ? void 0 : e.lineColor) != null ? g : m),
77
77
  linewidth: t.linewidth * 0.9,
78
78
  dashScale: t.dashScale,
79
79
  opacity: t.opacity * 0.8,
@@ -114,12 +114,12 @@ class X extends I {
114
114
  setPoints(e) {
115
115
  const n = e.map(C).filter(c);
116
116
  if (this.points = n, n.length < 2) {
117
- this.line.geometry = new y(), this.backLine.geometry = this.line.geometry, this.updateLengthItems();
117
+ this.line.geometry = new L(), this.backLine.geometry = this.line.geometry, this.updateLengthItems();
118
118
  return;
119
119
  }
120
120
  this.addIfNotExists(this.line, this.backLine);
121
121
  const t = n.flatMap((i) => [i.x, i.y, i.z]);
122
- t.length > 2 && (this.line.geometry.dispose(), this.line.geometry = new y(), this.backLine.geometry = this.line.geometry), this.line.geometry.setPositions(t), this.line.computeLineDistances(), this.updateLengthItems(), this.needsRender = !0;
122
+ t.length > 2 && (this.line.geometry.dispose(), this.line.geometry = new L(), this.backLine.geometry = this.line.geometry), this.line.geometry.setPositions(t), this.line.computeLineDistances(), this.updateLengthItems(), this.needsRender = !0;
123
123
  }
124
124
  setResolution(e, n) {
125
125
  const t = this.line.material.resolution;
@@ -129,7 +129,7 @@ class X extends I {
129
129
  }
130
130
  setStyle(e) {
131
131
  var i, l, r;
132
- this.paramsStyle = f(f({}, this.paramsStyle), e), c(e.lineColor) && (this.line.material.three_color = new d.Color(e.lineColor), this.backLine.material.three_color = new d.Color(e.lineColor)), c(e.lineWidth) && (this.line.material.linewidth = e.lineWidth), c(e.dashed) && this.line.material.setDashed(e.dashed), c(e.opacity) && (this.line.material.opacity = e.opacity, this.backLine.material.opacity = this.line.material.opacity * 0.2), this.updateLengthItems();
132
+ this.paramsStyle = y(y({}, this.paramsStyle), e), c(e.lineColor) && (this.line.material.three_color = new d.Color(e.lineColor), this.backLine.material.three_color = new d.Color(e.lineColor)), c(e.lineWidth) && (this.line.material.linewidth = e.lineWidth), c(e.dashed) && this.line.material.setDashed(e.dashed), c(e.opacity) && (this.line.material.opacity = e.opacity, this.backLine.material.opacity = this.line.material.opacity * 0.2), this.updateLengthItems();
133
133
  const n = (i = e.occlusionVisibility) != null ? i : this.paramsStyle.occlusionVisibility, t = (r = (l = e.occlusionMode) != null ? l : this.paramsStyle.occlusionMode) != null ? r : "translucence";
134
134
  n ? t === "depthTest" ? (this.line.material.depthTest = !1, this.backLine.visible = !1) : t === "translucence" && (this.line.material.depthTest = !0, this.backLine.visible = !0, this.line.material.opacity === 1 ? this.backLine.material.setDashed(!0) : this.backLine.material.setDashed(this.line.material.dashed)) : (this.line.material.depthTest = !0, this.backLine.visible = !1), this.needsRender = !0;
135
135
  }
@@ -148,8 +148,11 @@ class X extends I {
148
148
  }).filter(c)) != null ? n : [];
149
149
  t.forEach(([i, l], r) => {
150
150
  var a;
151
- const g = R(i, l);
152
- this.lengthDoms[r] = (a = this.lengthDoms[r]) != null ? a : new p(x.five), this.lengthDoms[r].setPosition(g, [i, l]), this.lengthDoms[r].container.innerHTML = V(i.distanceTo(l).toFixed(2) + "m");
151
+ const u = R(i, l);
152
+ this.lengthDoms[r] = (a = this.lengthDoms[r]) != null ? a : (() => {
153
+ const g = new p(x.five);
154
+ return g.intersectCheck = !1, g;
155
+ })(), this.lengthDoms[r].setPosition(u, [i, l]), this.lengthDoms[r].container.innerHTML = V(i.distanceTo(l).toFixed(2) + "m");
153
156
  }), this.lengthDoms.length > t.length && (this.lengthDoms.slice(t.length).forEach((i) => i.destroy()), this.lengthDoms.length = t.length);
154
157
  } else
155
158
  this.lengthDoms.forEach((t) => t.destroy()), this.lengthDoms = [];
@@ -18,7 +18,6 @@ export declare class RectangleMesh extends PolygonMesh {
18
18
  * @description: 构造矩形所需的三个点
19
19
  */
20
20
  get builtPoints(): THREE.Vector3[];
21
- get sortedPoint(): THREE.Vector3[];
22
21
  constructor(params?: Partial<RectangleStyle & RectangleData>);
23
22
  setPoints(points: AnyPositions): void;
24
23
  }
@@ -1,20 +1,20 @@
1
- var c = Object.defineProperty;
2
- var h = (r, e, t) => e in r ? c(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var i = (r, e, t) => (h(r, typeof e != "symbol" ? e + "" : e, t), t);
1
+ var l = Object.defineProperty;
2
+ var c = (r, e, t) => e in r ? l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var i = (r, e, t) => (c(r, typeof e != "symbol" ? e + "" : e, t), t);
4
4
  import { anyPositionToVector3 as a } from "../../shared-utils/positionToVector3.js";
5
- import * as u from "three";
5
+ import "three";
6
6
  import "hammerjs";
7
7
  import "three/examples/jsm/renderers/CSS3DRenderer";
8
8
  import "./Line.js";
9
9
  import "../../shared-utils/three/THREESphere.js";
10
10
  import "animejs";
11
- import { notNil as s } from "../../shared-utils/isNil.js";
11
+ import { notNil as h } from "../../shared-utils/isNil.js";
12
12
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
13
- import { PolygonMesh as f } from "./Polygon.js";
13
+ import { PolygonMesh as u } from "./Polygon.js";
14
14
  import { RectangleGeometry as g } from "../utils/three/RectangleGeometry.js";
15
- import { getBetterNormal as d } from "../utils/getBetterNormal.js";
16
- import { Sculpt as v } from "../index.js";
17
- class B extends f {
15
+ import { getBetterNormal as f } from "../utils/getBetterNormal.js";
16
+ import { Sculpt as d } from "../index.js";
17
+ class S extends u {
18
18
  constructor(t) {
19
19
  super(t);
20
20
  i(this, "name", "RectangleMesh");
@@ -29,22 +29,19 @@ class B extends f {
29
29
  var t, o;
30
30
  return (o = (t = this.meshFont) == null ? void 0 : t.geometry) == null ? void 0 : o.points.slice(0, 3);
31
31
  }
32
- get sortedPoint() {
33
- return [this.points[0], this.points[2], this.points[1], this.points[3]].filter(s);
34
- }
35
32
  setPoints(t) {
36
- const o = t.map(a).filter(s);
33
+ const o = t.map(a).filter(h);
37
34
  if (o.length < 3) {
38
35
  console.error("Invalid position");
39
36
  return;
40
37
  }
41
38
  if (t.length === 3) {
42
- const [n, m, p] = o, l = new u.Vector3().addVectors(n, m).sub(p);
43
- o.push(l);
39
+ const [s, m, n] = o, p = s.clone().add(n).sub(m);
40
+ o.push(p);
44
41
  }
45
- this.up.copy(d(o, v.modules.five.camera.position)), this.points = o, this.geometry = new g(o), this.planeHelperNeedUpdate = !0;
42
+ this.up.copy(f(o, d.modules.five.camera.position)), this.points = o, this.geometry = new g(o), this.planeHelperNeedUpdate = !0;
46
43
  }
47
44
  }
48
45
  export {
49
- B as RectangleMesh
46
+ S as RectangleMesh
50
47
  };
@@ -8,6 +8,15 @@ export type RectangleWithEdgeMeshStyle = RectangleStyle & LineStyle;
8
8
  */
9
9
  export declare class RectangleWithEdgeMesh extends RectangleMesh {
10
10
  name: string;
11
+ get style(): {
12
+ lineColor: import("three").Color;
13
+ lineWidth: number;
14
+ dashed: boolean;
15
+ occlusionVisibility: boolean;
16
+ occlusionMode: "translucence" | "depthTest";
17
+ color: import("three").Color;
18
+ opacity: number;
19
+ };
11
20
  get lineWidth(): number;
12
21
  get lineColor(): import("three").Color;
13
22
  line: PolylineMesh;
@@ -1,26 +1,36 @@
1
- var r = Object.defineProperty;
2
- var o = Object.getOwnPropertySymbols;
1
+ var y = Object.defineProperty;
2
+ var h = Object.getOwnPropertySymbols;
3
3
  var u = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
4
- var d = (e, s, t) => s in e ? r(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
5
- var g = (e, s) => {
4
+ var n = (e, i, t) => i in e ? y(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, l = (e, i) => {
5
+ for (var t in i || (i = {}))
6
+ u.call(i, t) && n(e, t, i[t]);
7
+ if (h)
8
+ for (var t of h(i))
9
+ c.call(i, t) && n(e, t, i[t]);
10
+ return e;
11
+ };
12
+ var p = (e, i) => {
6
13
  var t = {};
7
- for (var i in e)
8
- u.call(e, i) && s.indexOf(i) < 0 && (t[i] = e[i]);
9
- if (e != null && o)
10
- for (var i of o(e))
11
- s.indexOf(i) < 0 && c.call(e, i) && (t[i] = e[i]);
14
+ for (var s in e)
15
+ u.call(e, s) && i.indexOf(s) < 0 && (t[s] = e[s]);
16
+ if (e != null && h)
17
+ for (var s of h(e))
18
+ i.indexOf(s) < 0 && c.call(e, s) && (t[s] = e[s]);
12
19
  return t;
13
20
  };
14
- var h = (e, s, t) => (d(e, typeof s != "symbol" ? s + "" : s, t), t);
15
- import { RectangleMesh as p } from "./Rectangle.js";
21
+ var o = (e, i, t) => (n(e, typeof i != "symbol" ? i + "" : i, t), t);
22
+ import { RectangleMesh as d } from "./Rectangle.js";
16
23
  import { PolylineMesh as f } from "./Polyline.js";
17
- class S extends p {
24
+ class W extends d {
18
25
  constructor(t) {
19
- const l = t != null ? t : {}, { points: i } = l, n = g(l, ["points"]);
26
+ const r = t != null ? t : {}, { points: s } = r, g = p(r, ["points"]);
20
27
  super();
21
- h(this, "name", "RectangleWithEdgeMesh");
22
- h(this, "line", new f());
23
- i && this.setPoints(i), n && this.setStyle(n);
28
+ o(this, "name", "RectangleWithEdgeMesh");
29
+ o(this, "line", new f());
30
+ s && this.setPoints(s), g && this.setStyle(g);
31
+ }
32
+ get style() {
33
+ return l(l({}, super.style), this.line.style);
24
34
  }
25
35
  get lineWidth() {
26
36
  return this.line.lineWidth;
@@ -30,8 +40,8 @@ class S extends p {
30
40
  }
31
41
  setPoints(t) {
32
42
  if (super.setPoints(t), this.points) {
33
- const i = this.points;
34
- this.line.setPoints([i[0], i[2], i[1], i[3], i[0]]), this.addIfNotExists(this.line);
43
+ const s = this.points;
44
+ this.line.setPoints([s[0], s[1], s[2], s[3], s[0]]), this.addIfNotExists(this.line);
35
45
  }
36
46
  }
37
47
  setStyle(t) {
@@ -45,5 +55,5 @@ class S extends p {
45
55
  }
46
56
  }
47
57
  export {
48
- S as RectangleWithEdgeMesh
58
+ W as RectangleWithEdgeMesh
49
59
  };
@@ -2,7 +2,7 @@ import { LineMesh, type LineData, type LineMeshStyle } from '../../Meshes/Line';
2
2
  import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
3
3
  import type { PointSelector } from '../../../shared-utils/three/PointSelector';
4
4
  import type { LiteralString } from '../../../typings/utils.type';
5
- import type { LimitPlaneConfig } from '../../typings/style';
5
+ import type { CreateLimitConfig } from '../../typings/style';
6
6
  import { LineWithDotsMesh } from '../../Meshes/LineWithDots';
7
7
  export interface LineImportData extends BaseImportData, LineData {
8
8
  type: LiteralString<'Line'>;
@@ -24,10 +24,10 @@ export declare class Line extends BaseObject<LineImportData> {
24
24
  constructor(data?: LineImportData, config?: Partial<BaseObjectConfig>);
25
25
  highlight(): void;
26
26
  unhighlight(): void;
27
- create(params?: Partial<LineMeshStyle & LimitPlaneConfig>): Promise<void>;
27
+ create(params?: Partial<LineMeshStyle & CreateLimitConfig>): Promise<void>;
28
28
  }
29
29
  /**
30
30
  * @description 绘制线段
31
31
  * @param config.limit 限制折线绘制的平面; `xoz` 限制在水平面; `y` 限制垂直面; `none` 不限制;默认 `none`
32
32
  */
33
- export declare function createLine(lineMesh: LineMesh, pointSelector: PointSelector, config?: Partial<LimitPlaneConfig>): Promise<void>;
33
+ export declare function createLine(lineMesh: LineMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig>): Promise<void>;
@@ -3,7 +3,7 @@ import { AreaMesh, type AreaStyle } from '../../Meshes/Area';
3
3
  import type { PointSelector } from '../../../shared-utils/three/PointSelector';
4
4
  import type { LiteralString } from '../../../typings/utils.type';
5
5
  import type { PolygonData, PolygonStyle } from '../../Meshes/Polygon';
6
- import type { LimitPlaneConfig } from '../../typings/style';
6
+ import type { CreateLimitConfig } from '../../typings/style';
7
7
  export interface PolygonImportData extends BaseImportData, PolygonData {
8
8
  type: LiteralString<'Polygon'>;
9
9
  style?: Partial<AreaStyle>;
@@ -24,6 +24,6 @@ export declare class Polygon extends BaseObject<PolygonImportData> {
24
24
  constructor(data?: PolygonImportData, config?: Partial<BaseObjectConfig>);
25
25
  highlight(): void;
26
26
  unhighlight(): void;
27
- create(params?: Partial<PolygonStyle & LimitPlaneConfig>): Promise<void>;
27
+ create(params?: Partial<PolygonStyle & CreateLimitConfig>): Promise<void>;
28
28
  }
29
- export declare function createPolygon(areaMesh: AreaMesh, pointSelector: PointSelector, config?: Partial<LimitPlaneConfig>): Promise<void>;
29
+ export declare function createPolygon(areaMesh: AreaMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig>): Promise<void>;
@@ -2,7 +2,7 @@ import { PolylineMesh, PolylineWithDotsMesh, type PolylineData, type PolylineSty
2
2
  import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
3
3
  import type { PointSelector } from '../../../shared-utils/three/PointSelector';
4
4
  import type { LiteralString } from '../../../typings/utils.type';
5
- import type { LimitPlaneConfig } from '../../typings/style';
5
+ import type { CreateLimitConfig } from '../../typings/style';
6
6
  export interface PolylineImportData extends BaseImportData, PolylineData {
7
7
  type: LiteralString<'Polyline'>;
8
8
  style?: Partial<PolylineStyle>;
@@ -23,10 +23,10 @@ export declare class Polyline extends BaseObject<PolylineImportData> {
23
23
  constructor(data?: PolylineImportData, config?: Partial<BaseObjectConfig>);
24
24
  highlight(): void;
25
25
  unhighlight(): void;
26
- create(params?: Partial<PolylineStyle & LimitPlaneConfig>): Promise<void>;
26
+ create(params?: Partial<PolylineStyle & CreateLimitConfig>): Promise<void>;
27
27
  }
28
28
  /**
29
29
  * @description 绘制折线
30
30
  * @param config.limit 限制折线绘制的平面; `xoz` 限制在水平面; `y` 限制垂直面; `none` 不限制;默认 `none`
31
31
  */
32
- export declare function createPolyline(polyLineMesh: PolylineMesh, pointSelector: PointSelector, config?: Partial<LimitPlaneConfig>): Promise<void>;
32
+ export declare function createPolyline(polyLineMesh: PolylineMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig>): Promise<void>;
@@ -4,6 +4,7 @@ import type { ArrayPosition } from '../../../PanoTagPlugin';
4
4
  import type { RectangleData, RectangleMesh } from '../../Meshes/Rectangle';
5
5
  import { RectangleWithEdgeMesh, type RectangleWithEdgeMeshStyle } from '../../Meshes/RectangleWithEdge';
6
6
  import type { LiteralString } from '../../../typings/utils.type';
7
+ import type { DrawMethodConfig, CreateLimitConfig } from '../../typings/style';
7
8
  export interface RectangleImportData extends BaseImportData, RectangleData {
8
9
  type: LiteralString<'Rectangle'>;
9
10
  style?: Partial<RectangleWithEdgeMeshStyle>;
@@ -24,6 +25,9 @@ export declare class Rectangle extends BaseObject<RectangleImportData> {
24
25
  constructor(data?: RectangleImportData, config?: Partial<BaseObjectConfig>);
25
26
  highlight(): void;
26
27
  unhighlight(): void;
27
- create(params?: Partial<RectangleWithEdgeMeshStyle>): Promise<void>;
28
+ create(config?: Partial<RectangleWithEdgeMeshStyle & CreateLimitConfig & DrawMethodConfig>): Promise<void>;
28
29
  }
29
- export declare function createRectangle(rectangleMesh: RectangleMesh, pointSelector: PointSelector): Promise<void>;
30
+ /**
31
+ * @description 创建矩形
32
+ */
33
+ export declare function createRectangle(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig & DrawMethodConfig>): Promise<void>;
@@ -1,49 +1,50 @@
1
- var D = Object.defineProperty, L = Object.defineProperties;
2
- var N = Object.getOwnPropertyDescriptors;
3
- var M = Object.getOwnPropertySymbols;
4
- var O = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable;
5
- var f = (n, t, e) => t in n ? D(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, d = (n, t) => {
1
+ var O = Object.defineProperty, U = Object.defineProperties;
2
+ var k = Object.getOwnPropertyDescriptors;
3
+ var H = Object.getOwnPropertySymbols;
4
+ var B = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
5
+ var b = (s, t, e) => t in s ? O(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, d = (s, t) => {
6
6
  for (var e in t || (t = {}))
7
- O.call(t, e) && f(n, e, t[e]);
8
- if (M)
9
- for (var e of M(t))
10
- T.call(t, e) && f(n, e, t[e]);
11
- return n;
12
- }, E = (n, t) => L(n, N(t));
13
- var m = (n, t, e) => (f(n, typeof t != "symbol" ? t + "" : t, e), e);
14
- var V = (n, t, e) => new Promise((l, r) => {
15
- var h = (o) => {
7
+ B.call(t, e) && b(s, e, t[e]);
8
+ if (H)
9
+ for (var e of H(t))
10
+ I.call(t, e) && b(s, e, t[e]);
11
+ return s;
12
+ }, u = (s, t) => U(s, k(t));
13
+ var M = (s, t, e) => (b(s, typeof t != "symbol" ? t + "" : t, e), e);
14
+ var L = (s, t, e) => new Promise((h, f) => {
15
+ var r = (o) => {
16
16
  try {
17
- s(e.next(o));
18
- } catch (a) {
19
- r(a);
17
+ m(e.next(o));
18
+ } catch (c) {
19
+ f(c);
20
20
  }
21
- }, g = (o) => {
21
+ }, w = (o) => {
22
22
  try {
23
- s(e.throw(o));
24
- } catch (a) {
25
- r(a);
23
+ m(e.throw(o));
24
+ } catch (c) {
25
+ f(c);
26
26
  }
27
- }, s = (o) => o.done ? l(o.value) : Promise.resolve(o.value).then(h, g);
28
- s((e = e.apply(n, t)).next());
27
+ }, m = (o) => o.done ? h(o.value) : Promise.resolve(o.value).then(r, w);
28
+ m((e = e.apply(s, t)).next());
29
29
  });
30
- import { hotkeys as U } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
31
- import { BaseObject as k } from "../Base/index.js";
32
- import * as c from "three";
33
- import { PolylineWithDotsMesh as v } from "../../Meshes/Polyline.js";
34
- import { RectangleEditor as z } from "./Editor.js";
35
- import { RectangleWithEdgeMesh as R } from "../../Meshes/RectangleWithEdge.js";
36
- class K extends k {
37
- constructor(e, l) {
38
- super(e, l);
39
- m(this, "type", "Rectangle");
40
- m(this, "rectangleMesh");
41
- this.config.canEdit && (this.editor = new z(this)), e && (this.rectangleMesh = new R(d(d({}, e.style), e)), this.add(this.rectangleMesh)), U("esc", () => {
30
+ import { hotkeys as _ } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
31
+ import { BaseObject as j } from "../Base/index.js";
32
+ import * as l from "three";
33
+ import { PolylineWithDotsMesh as E } from "../../Meshes/Polyline.js";
34
+ import { RectangleEditor as q } from "./Editor.js";
35
+ import { RectangleWithEdgeMesh as T } from "../../Meshes/RectangleWithEdge.js";
36
+ const G = new l.Vector3();
37
+ class S extends j {
38
+ constructor(e, h) {
39
+ super(e, h);
40
+ M(this, "type", "Rectangle");
41
+ M(this, "rectangleMesh");
42
+ this.config.canEdit && (this.editor = new q(this)), e && (this.rectangleMesh = new T(d(d({}, e.style), e)), this.add(this.rectangleMesh)), _("esc", () => {
42
43
  this.stopCreating();
43
44
  });
44
45
  }
45
46
  get data() {
46
- return E(d({}, this.baseData), {
47
+ return u(d({}, this.baseData), {
47
48
  points: this.rectangleMesh.builtPoints.map((e) => e.toArray()),
48
49
  style: {
49
50
  color: this.rectangleMesh.color.getHex(),
@@ -61,45 +62,54 @@ class K extends k {
61
62
  (e = this.rectangleMesh) == null || e.unhighlight();
62
63
  }
63
64
  create(e) {
64
- return V(this, null, function* () {
65
+ return L(this, null, function* () {
65
66
  this.removeChildren();
66
- const l = new R(e);
67
- this.rectangleMesh = l, this.add(this.rectangleMesh), yield B(this.rectangleMesh, this.pointSelector), this.editor.enable();
67
+ const h = new T(e);
68
+ this.rectangleMesh = h, this.add(this.rectangleMesh), yield J(this.rectangleMesh, this.pointSelector), this.editor.enable();
68
69
  });
69
70
  }
70
71
  }
71
- function B(n, t) {
72
- return new Promise((e, l) => {
73
- var P, C;
74
- const r = n.parent;
75
- if (!r) {
76
- l(new Error("No container"));
77
- return;
78
- }
79
- const h = new v({ dashed: !0, lineColor: (P = n.lineColor) != null ? P : n.color }), g = new v({ dashed: !1, lineColor: (C = n.lineColor) != null ? C : n.color });
80
- r.add(h, g), t.enable();
81
- const s = [], o = new c.Vector3(), a = new c.Plane(), p = (i) => {
82
- s.push(o.clone()), s.length !== 1 && (s.length === 2 ? g.setPoints([s[0], s[1]]) : s.length === 3 && (u(), e()));
83
- }, w = (i) => {
84
- if (i != null && i.raycaster) {
85
- if (s.length === 0)
86
- o.copy(i.point), a.setFromNormalAndCoplanarPoint(i.face.normal, i.point.clone());
87
- else if (s.length === 1)
88
- i.raycaster.ray.intersectPlane(a, o), h.setPoints([s.at(-1), o]);
89
- else if (s.length === 2) {
90
- const x = i.raycaster.ray.intersectPlane(a, new c.Vector3()), W = s[0].distanceTo(s[1]) / 2, b = new c.Vector3().lerpVectors(s[0], s[1], 0.5), A = new c.Vector3().subVectors(x, b).normalize(), H = new c.Vector3().addVectors(b, A.multiplyScalar(W));
91
- o.copy(H), r.remove(h), n.setPoints([...s, o]);
72
+ function J(s, t, e) {
73
+ return new Promise((h, f) => {
74
+ var W, z;
75
+ const r = s.parent;
76
+ if (!r)
77
+ return f(new Error("No container"));
78
+ const w = (W = e == null ? void 0 : e.limit) != null ? W : "none", m = (z = e == null ? void 0 : e.drawMethod) != null ? z : "diagonal", o = new E(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), c = new E(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), y = new E(u(d({}, s.style), { dashed: !1, lengthEnable: !1 }));
79
+ r.add(o, y, c), t.enable();
80
+ const n = [];
81
+ let a = new l.Vector3(), v = new l.Vector3();
82
+ const g = new l.Plane(), C = () => {
83
+ n.push(a.clone()), n.length === 1 ? (w === "xoz" && g.setFromNormalAndCoplanarPoint(new l.Vector3(0, 1, 0), n[0]), w === "none" && g.setFromNormalAndCoplanarPoint(v, n[0])) : n.length === 2 ? (w === "y" && g.setFromCoplanarPoints(n[0], n[1], new l.Vector3(0, 1, 0).add(n[0])), y.setPoints([n[0], n[1]])) : n.length === 3 && (R(), h());
84
+ }, x = (i) => {
85
+ var A;
86
+ if (!(i != null && i.raycaster))
87
+ return;
88
+ const D = (A = n.at(-1)) == null ? void 0 : A.clone();
89
+ if (n.length === 0)
90
+ a = i.point.clone(), v = i.face.normal;
91
+ else if (n.length === 1)
92
+ g ? (a = i.raycaster.ray.intersectPlane(g, G), c.setPoints([a, i.point])) : a = i.point.clone(), o.setPoints([D, a]);
93
+ else if (n.length === 2) {
94
+ const F = i.raycaster.ray.intersectPlane(g, new l.Vector3());
95
+ if (m === "diagonal") {
96
+ const P = n[0].distanceTo(n[1]) / 2, p = new l.Vector3().lerpVectors(n[0], n[1], 0.5), V = new l.Vector3().subVectors(F, p).normalize();
97
+ a = new l.Vector3().addVectors(p, V.multiplyScalar(P));
98
+ } else if (m === "vertex") {
99
+ const P = n[0].distanceTo(n[1]), p = n[0], V = new l.Vector3().subVectors(F, p).normalize();
100
+ a = new l.Vector3().addVectors(p, V.multiplyScalar(P));
92
101
  }
102
+ r.remove(o), s.setPoints([n[0], a, n[1]]);
93
103
  }
94
- }, u = () => {
95
- t.off("select", p), t.off("intersectionUpdate", w), t.off("disable", y), t.disable(), r == null || r.remove(h, g);
96
- }, y = () => {
97
- u(), r == null || r.remove(n), l(new Error("Cancelled"));
104
+ }, R = () => {
105
+ t.off("select", C), t.off("intersectionUpdate", x), t.off("disable", N), t.disable(), r == null || r.remove(o, y, c);
106
+ }, N = () => {
107
+ R(), r == null || r.remove(s), f(new Error("Cancelled"));
98
108
  };
99
- t.on("select", p), t.on("intersectionUpdate", w), t.on("disable", y);
109
+ t.on("select", C), t.on("intersectionUpdate", x), t.on("disable", N);
100
110
  });
101
111
  }
102
112
  export {
103
- K as Rectangle,
104
- B as createRectangle
113
+ S as Rectangle,
114
+ J as createRectangle
105
115
  };
@@ -31,13 +31,20 @@ export type LineWidthStyle = {
31
31
  */
32
32
  lineWidth?: number;
33
33
  };
34
- export type LimitPlaneConfig = {
34
+ export type CreateLimitConfig = {
35
35
  /**
36
36
  * @description 限制折线绘制的平面; `xoz` 限制在水平面; `y` 限制垂直面; `none` 不限制
37
37
  * @default `none`
38
38
  */
39
39
  limit: 'xoz' | 'y' | 'none';
40
40
  };
41
+ export type DrawMethodConfig = {
42
+ /**
43
+ * @description 矩形绘制方式; `vertex` 按顺序绘制三个点; `diagonal` 先绘制对角线;
44
+ * @default `diagonal`
45
+ */
46
+ drawMethod: 'vertex' | 'diagonal';
47
+ };
41
48
  export type OcclusionStyle = {
42
49
  /**
43
50
  * @description 是否以一种半透明的方式显示遮挡的部分
@@ -5,7 +5,7 @@ function i(t) {
5
5
  .LineLengthTag {
6
6
  position: absolute;
7
7
  pointer-events: none;
8
- font-size: 20px;
8
+ font-size: 18px;
9
9
  letter-spacing: 1px;
10
10
  color: white;
11
11
  left: 50%;
@@ -15,7 +15,7 @@ function i(t) {
15
15
  position: absolute;
16
16
  top: 0;
17
17
  left: 0;
18
- -webkit-text-stroke: 2px black;
18
+ -webkit-text-stroke: 2px #1F2E4D;
19
19
  }
20
20
  .LineLengthTag div:last-child {
21
21
  position: relative;
@@ -11,7 +11,7 @@ class l extends o.BufferGeometry {
11
11
  console.error("Invalid number of points, it's not a rectangle");
12
12
  return;
13
13
  }
14
- this.points = e.slice(0, 4), this.setAttribute("position", new o.BufferAttribute(new Float32Array(this.points.flatMap((s) => s.toArray())), 3)), this.setIndex(new o.BufferAttribute(new Uint16Array([0, 1, 2, 0, 1, 3]), 1));
14
+ this.points = e.slice(0, 4), this.setAttribute("position", new o.BufferAttribute(new Float32Array(this.points.flatMap((s) => s.toArray())), 3)), this.setIndex(new o.BufferAttribute(new Uint16Array([0, 1, 2, 0, 2, 3]), 1));
15
15
  }
16
16
  }
17
17
  export {
@@ -16,7 +16,7 @@ let c = class {
16
16
  /**
17
17
  * @realsee/dnalogel 版本号
18
18
  */
19
- e(this, "VERSION", "3.47.7");
19
+ e(this, "VERSION", "3.47.9");
20
20
  e(this, "NAME");
21
21
  e(this, "five");
22
22
  e(this, "workUtil");