@realsee/dnalogel 3.47.10 → 3.47.12

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 (108) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/Sculpt/Meshes/Line.d.ts +3 -1
  3. package/dist/Sculpt/Meshes/Polygon.d.ts +16 -7
  4. package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -0
  5. package/dist/Sculpt/Meshes/Polyline.d.ts +1 -0
  6. package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +1 -0
  7. package/dist/index.cjs.js +57 -57
  8. package/dist/index.js +3263 -3227
  9. package/dist/index.umd.js +50 -50
  10. package/libs/AreaMakerPlugin/Controller.js +14 -13
  11. package/libs/AreaMakerPlugin/index.js +15 -14
  12. package/libs/AreaMakerPlugin/utils/Item.js +15 -14
  13. package/libs/CSS3DRenderPlugin/Controller.js +12 -11
  14. package/libs/CSS3DRenderPlugin/index.js +18 -17
  15. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +12 -11
  16. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +26 -25
  17. package/libs/CruisePlugin/BaseController.js +17 -16
  18. package/libs/CruisePlugin/Move.js +20 -19
  19. package/libs/CruisePlugin/Work.js +15 -14
  20. package/libs/CruisePlugin/index.js +19 -18
  21. package/libs/CurrentPanoImagePlugin/Controller.js +14 -13
  22. package/libs/CurrentPanoImagePlugin/index.js +16 -15
  23. package/libs/GuideLinePlugin/Controller.js +17 -16
  24. package/libs/GuideLinePlugin/GuideLineItem.js +15 -14
  25. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +5 -3
  26. package/libs/GuideLinePlugin/GuideLineModeItem.js +15 -14
  27. package/libs/GuideLinePlugin/index.js +19 -18
  28. package/libs/ModelMakerPlugin/Controller.js +13 -12
  29. package/libs/ModelMakerPlugin/index.js +15 -14
  30. package/libs/ModelTVVideoPlugin/Plugin.js +37 -36
  31. package/libs/ModelTVVideoPlugin/index.js +13 -12
  32. package/libs/Object3DHelperPlugin/Controller.js +14 -13
  33. package/libs/Object3DHelperPlugin/index.js +18 -17
  34. package/libs/PanoCompassPlugin/Controller.js +15 -14
  35. package/libs/PanoCompassPlugin/index.js +16 -15
  36. package/libs/PanoDoorLabelPlugin/BaseController.js +15 -14
  37. package/libs/PanoDoorLabelPlugin/Controller.js +15 -14
  38. package/libs/PanoDoorLabelPlugin/index.js +16 -15
  39. package/libs/PanoMeasurePlugin/Components/Controller0.js +12 -11
  40. package/libs/PanoMeasurePlugin/Components/Controller1.js +12 -11
  41. package/libs/PanoMeasurePlugin/Controller/EditController.js +12 -11
  42. package/libs/PanoMeasurePlugin/Controller/WatchController.js +13 -12
  43. package/libs/PanoMeasurePlugin/Controller/index.js +10 -9
  44. package/libs/PanoMeasurePlugin/Model/area.js +12 -11
  45. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +12 -11
  46. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +12 -11
  47. package/libs/PanoMeasurePlugin/index.js +21 -20
  48. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +12 -11
  49. package/libs/PanoSpatialTagPlugin/Plugin.js +14 -13
  50. package/libs/PanoSpatialTagPlugin/index.js +11 -10
  51. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +14 -13
  52. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +13 -12
  53. package/libs/PanoTagPlugin/Components/Tag/index.js +13 -12
  54. package/libs/PanoTagPlugin/Components/TagContainer.js +13 -12
  55. package/libs/PanoTagPlugin/Components/TagItem.js +13 -12
  56. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +34 -33
  57. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +13 -12
  58. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +13 -12
  59. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +15 -14
  60. package/libs/PanoTagPlugin/controller/TagRender.js +12 -11
  61. package/libs/PanoTagPlugin/controller/TagUtil.js +13 -12
  62. package/libs/PanoTagPlugin/controller/index.js +16 -15
  63. package/libs/PanoTagPlugin/index.js +21 -20
  64. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +14 -13
  65. package/libs/PanoVideoPlugin/Controller.js +15 -14
  66. package/libs/PanoVideoPlugin/VideoMeshController.js +30 -29
  67. package/libs/PanoVideoPlugin/index.js +18 -17
  68. package/libs/PipelinePlugin/Controller.js +14 -13
  69. package/libs/PipelinePlugin/index.js +16 -15
  70. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +21 -20
  71. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +15 -14
  72. package/libs/PipelinePlugin/utils/Objects/Pipe.js +13 -12
  73. package/libs/Sculpt/Meshes/Box.js +10 -8
  74. package/libs/Sculpt/Meshes/Cylinder.js +17 -15
  75. package/libs/Sculpt/Meshes/Line.d.ts +3 -1
  76. package/libs/Sculpt/Meshes/Line.js +89 -78
  77. package/libs/Sculpt/Meshes/Point.js +14 -12
  78. package/libs/Sculpt/Meshes/Polygon.d.ts +16 -7
  79. package/libs/Sculpt/Meshes/Polygon.js +71 -33
  80. package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -0
  81. package/libs/Sculpt/Meshes/Polyline.d.ts +1 -0
  82. package/libs/Sculpt/Meshes/Polyline.js +69 -74
  83. package/libs/Sculpt/Meshes/Rectangle.js +7 -5
  84. package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +1 -0
  85. package/libs/Sculpt/Objects/Base/index.js +5 -5
  86. package/libs/Sculpt/Objects/Line/Editor.js +17 -15
  87. package/libs/Sculpt/Objects/Polygon/index.js +22 -22
  88. package/libs/Sculpt/Objects/Rectangle/Editor.js +2 -2
  89. package/libs/Sculpt/Objects/Rectangle/index.js +79 -69
  90. package/libs/Sculpt/index.js +15 -14
  91. package/libs/Sculpt/utils/three/ColoredMesh.js +6 -4
  92. package/libs/base/BasePlugin.js +16 -14
  93. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +13 -12
  94. package/libs/floorplan/MapviewFloorplanPlugin/index.js +16 -15
  95. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +13 -12
  96. package/libs/floorplan/ModelFloorplanPlugin/index.js +16 -15
  97. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +15 -14
  98. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +16 -15
  99. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +13 -12
  100. package/libs/floorplan/TopviewFloorplanPlugin/index.js +16 -15
  101. package/libs/floorplan/index.js +3 -1
  102. package/libs/index.js +12 -12
  103. package/libs/shared-utils/five/index.js +5 -3
  104. package/libs/shared-utils/five/lookObject.js +20 -18
  105. package/libs/shared-utils/logger.js +1 -1
  106. package/libs/shared-utils/three/applyObjectMatrixWorld.js +4 -6
  107. package/libs/shared-utils/three/index.js +3 -1
  108. package/package.json +1 -1
@@ -1,124 +1,119 @@
1
- var x = Object.defineProperty, B = Object.defineProperties;
2
- var T = Object.getOwnPropertyDescriptors;
3
- var r = Object.getOwnPropertySymbols;
4
- var D = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
5
- var p = (s, e, i) => e in s ? x(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i, a = (s, e) => {
6
- for (var i in e || (e = {}))
7
- D.call(e, i) && p(s, i, e[i]);
8
- if (r)
9
- for (var i of r(e))
10
- w.call(e, i) && p(s, i, e[i]);
1
+ var P = Object.defineProperty, S = Object.defineProperties;
2
+ var M = Object.getOwnPropertyDescriptors;
3
+ var a = Object.getOwnPropertySymbols;
4
+ var y = Object.prototype.hasOwnProperty, d = Object.prototype.propertyIsEnumerable;
5
+ var m = (s, e, t) => e in s ? P(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, h = (s, e) => {
6
+ for (var t in e || (e = {}))
7
+ y.call(e, t) && m(s, t, e[t]);
8
+ if (a)
9
+ for (var t of a(e))
10
+ d.call(e, t) && m(s, t, e[t]);
11
11
  return s;
12
- }, c = (s, e) => B(s, T(e));
13
- var E = (s, e) => {
14
- var i = {};
15
- for (var t in s)
16
- D.call(s, t) && e.indexOf(t) < 0 && (i[t] = s[t]);
17
- if (s != null && r)
18
- for (var t of r(s))
19
- e.indexOf(t) < 0 && w.call(s, t) && (i[t] = s[t]);
20
- return i;
12
+ }, c = (s, e) => S(s, M(e));
13
+ var f = (s, e) => {
14
+ var t = {};
15
+ for (var i in s)
16
+ y.call(s, i) && e.indexOf(i) < 0 && (t[i] = s[i]);
17
+ if (s != null && a)
18
+ for (var i of a(s))
19
+ e.indexOf(i) < 0 && d.call(s, i) && (t[i] = s[i]);
20
+ return t;
21
21
  };
22
- var l = (s, e, i) => (p(s, typeof e != "symbol" ? e + "" : e, i), i);
23
- import { anyPositionToVector3 as j } from "../../shared-utils/positionToVector3.js";
24
- import { IObject3D as F } from "../../shared-utils/three/IObject3D.js";
25
- import * as H from "three";
22
+ var l = (s, e, t) => (m(s, typeof e != "symbol" ? e + "" : e, t), t);
23
+ import { anyPositionToVector3 as b } from "../../shared-utils/positionToVector3.js";
24
+ import { IObject3D as D } from "../../shared-utils/three/IObject3D.js";
25
+ import * as E from "three";
26
26
  import "hammerjs";
27
27
  import "three/examples/jsm/renderers/CSS3DRenderer";
28
- import "./Line.js";
28
+ import "@realsee/five/line";
29
+ import "../../shared-utils/tag.js";
30
+ import "../utils/Modules/Global.js";
29
31
  import "../../shared-utils/three/THREESphere.js";
30
32
  import "animejs";
31
- import { notNil as I } from "../../shared-utils/isNil.js";
33
+ import { notNil as V } from "../../shared-utils/isNil.js";
32
34
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
33
- import { LineWithDotsMesh as L } from "./LineWithDots.js";
34
- import { closeVectors as N } from "../../shared-utils/three/closeVectors.js";
35
- class v extends F {
36
- constructor(i) {
35
+ import { LineWithDotsMesh as W } from "./LineWithDots.js";
36
+ import { closeVectors as w } from "../../shared-utils/three/closeVectors.js";
37
+ class g extends D {
38
+ constructor(t) {
37
39
  super();
38
40
  l(this, "name", "PolylineBaseMesh");
39
41
  l(this, "lines", []);
40
42
  l(this, "withDots");
41
43
  l(this, "paramsStyle");
42
- const n = i, { withDots: t, points: o } = n, h = E(n, ["withDots", "points"]);
43
- this.withDots = t != null ? t : !0, o && this.setPoints(o), h && this.setStyle(h);
44
+ const r = t, { withDots: i, points: o } = r, n = f(r, ["withDots", "points"]);
45
+ this.withDots = i != null ? i : !0, o && this.setPoints(o), n && this.setStyle(n);
44
46
  }
45
47
  get style() {
48
+ var t;
46
49
  return {
47
50
  lineColor: this.lineColor,
48
51
  lineWidth: this.lineWidth,
49
52
  dashed: this.dashed,
50
53
  occlusionVisibility: this.occlusionVisibility,
51
- occlusionMode: this.occlusionMode
54
+ occlusionMode: this.occlusionMode,
55
+ lengthEnable: (t = this.paramsStyle) == null ? void 0 : t.lengthEnable
52
56
  };
53
57
  }
54
58
  get lineColor() {
55
- var i, t, o;
56
- return (o = (i = this.lines[0]) == null ? void 0 : i.color) != null ? o : (t = this.paramsStyle) != null && t.lineColor ? new H.Color(this.paramsStyle.lineColor) : void 0;
59
+ var t, i, o;
60
+ return (o = (t = this.lines[0]) == null ? void 0 : t.color) != null ? o : (i = this.paramsStyle) != null && i.lineColor ? new E.Color(this.paramsStyle.lineColor) : void 0;
57
61
  }
58
62
  get lineWidth() {
59
- var i, t, o;
60
- return (o = (i = this.lines[0]) == null ? void 0 : i.lineWidth) != null ? o : (t = this.paramsStyle) == null ? void 0 : t.lineWidth;
63
+ var t, i, o;
64
+ return (o = (t = this.lines[0]) == null ? void 0 : t.lineWidth) != null ? o : (i = this.paramsStyle) == null ? void 0 : i.lineWidth;
61
65
  }
62
66
  get dashed() {
63
- var i, t, o;
64
- return (o = (i = this.lines[0]) == null ? void 0 : i.dashed) != null ? o : (t = this.paramsStyle) == null ? void 0 : t.dashed;
67
+ var t, i, o;
68
+ return (o = (t = this.lines[0]) == null ? void 0 : t.dashed) != null ? o : (i = this.paramsStyle) == null ? void 0 : i.dashed;
65
69
  }
66
70
  get occlusionVisibility() {
67
- var i, t, o;
68
- return (o = (i = this.lines[0]) == null ? void 0 : i.occlusionVisibility) != null ? o : (t = this.paramsStyle) == null ? void 0 : t.occlusionVisibility;
71
+ var t, i, o;
72
+ return (o = (t = this.lines[0]) == null ? void 0 : t.occlusionVisibility) != null ? o : (i = this.paramsStyle) == null ? void 0 : i.occlusionVisibility;
69
73
  }
70
74
  get occlusionMode() {
71
- var i, t, o;
72
- return (o = (i = this.lines[0]) == null ? void 0 : i.occlusionMode) != null ? o : (t = this.paramsStyle) == null ? void 0 : t.occlusionMode;
75
+ var t, i, o;
76
+ return (o = (t = this.lines[0]) == null ? void 0 : t.occlusionMode) != null ? o : (i = this.paramsStyle) == null ? void 0 : i.occlusionMode;
73
77
  }
74
78
  get points() {
75
- var i;
76
- return this.lines.map((t) => t.points[0]).concat((i = this.lines.at(-1)) == null ? void 0 : i.points[1]).filter(Boolean);
79
+ var t;
80
+ return this.lines.map((i) => i.points[0]).concat((t = this.lines.at(-1)) == null ? void 0 : t.points[1]).filter(Boolean);
77
81
  }
78
- setPoints(i, t = { closed: !1 }) {
79
- var n, u, y, f, g, S, M, P, V, W;
80
- let o = i.map(j);
81
- t.closed && (o = N(o));
82
- const h = {
83
- lineWidth: (u = (n = this.paramsStyle) == null ? void 0 : n.lineWidth) != null ? u : this.lineWidth,
84
- lineColor: (f = (y = this.paramsStyle) == null ? void 0 : y.lineColor) != null ? f : this.lineColor,
85
- dashed: (S = (g = this.paramsStyle) == null ? void 0 : g.dashed) != null ? S : this.dashed,
86
- occlusionVisibility: (P = (M = this.paramsStyle) == null ? void 0 : M.occlusionVisibility) != null ? P : this.occlusionVisibility,
87
- occlusionMode: (W = (V = this.paramsStyle) == null ? void 0 : V.occlusionMode) != null ? W : this.occlusionMode
88
- };
89
- this.lines.length && this.lines.forEach((d) => d.removeFromParent()), this.lines = o.map((d, m) => {
90
- const b = o[m + 1];
91
- if (m !== 0 && b === void 0)
82
+ setPoints(t, i = { closed: !1 }) {
83
+ let o = t.map(b);
84
+ i.closed && (o = w(o)), this.lines.length && this.lines.forEach((n) => n.removeFromParent()), this.lines = o.map((n, r) => {
85
+ const p = o[r + 1];
86
+ if (r !== 0 && p === void 0)
92
87
  return null;
93
- const C = new L(c(a({}, h), {
94
- pointVisibility: this.withDots ? { startPoint: m === 0, endPoint: !0 } : !1
88
+ const u = new W(c(h({}, this.style), {
89
+ pointVisibility: this.withDots ? { startPoint: r === 0, endPoint: !0 } : !1
95
90
  }));
96
- return C.setPoints([d, b]), C;
97
- }).filter(I), this.add(...this.lines);
91
+ return u.setPoints([n, p]), u;
92
+ }).filter(V), this.add(...this.lines);
98
93
  }
99
- setStyle(i) {
100
- this.paramsStyle = i, this.lines.forEach((t) => t.setStyle(i));
94
+ setStyle(t) {
95
+ this.paramsStyle = h(h({}, this.paramsStyle), t), this.lines.forEach((i) => i.setStyle(this.paramsStyle));
101
96
  }
102
97
  highlight() {
103
- this.lines.forEach((i) => i.highlight());
98
+ this.lines.forEach((t) => t.highlight());
104
99
  }
105
100
  unhighlight() {
106
- this.lines.forEach((i) => i.unhighlight());
101
+ this.lines.forEach((t) => t.unhighlight());
107
102
  }
108
103
  }
109
- class Y extends v {
110
- constructor(...i) {
111
- super(c(a({}, i[0]), { withDots: !1 }));
104
+ class q extends g {
105
+ constructor(...t) {
106
+ super(c(h({}, t[0]), { withDots: !1 }));
112
107
  l(this, "name", "PolylineMesh");
113
108
  }
114
109
  }
115
- class Z extends v {
116
- constructor(...i) {
117
- super(c(a({}, i[0]), { withDots: !0 }));
110
+ class z extends g {
111
+ constructor(...t) {
112
+ super(c(h({}, t[0]), { withDots: !0 }));
118
113
  l(this, "name", "PolylineWithDotsMesh");
119
114
  }
120
115
  }
121
116
  export {
122
- Y as PolylineMesh,
123
- Z as PolylineWithDotsMesh
117
+ q as PolylineMesh,
118
+ z as PolylineWithDotsMesh
124
119
  };
@@ -5,7 +5,9 @@ import { anyPositionToVector3 as a } from "../../shared-utils/positionToVector3.
5
5
  import "three";
6
6
  import "hammerjs";
7
7
  import "three/examples/jsm/renderers/CSS3DRenderer";
8
- import "./Line.js";
8
+ import "@realsee/five/line";
9
+ import "../../shared-utils/tag.js";
10
+ import "../utils/Modules/Global.js";
9
11
  import "../../shared-utils/three/THREESphere.js";
10
12
  import "animejs";
11
13
  import { notNil as h } from "../../shared-utils/isNil.js";
@@ -14,7 +16,7 @@ import { PolygonMesh as u } from "./Polygon.js";
14
16
  import { RectangleGeometry as g } from "../utils/three/RectangleGeometry.js";
15
17
  import { getBetterNormal as f } from "../utils/getBetterNormal.js";
16
18
  import { Sculpt as d } from "../index.js";
17
- class S extends u {
19
+ class T extends u {
18
20
  constructor(t) {
19
21
  super(t);
20
22
  i(this, "name", "RectangleMesh");
@@ -36,12 +38,12 @@ class S extends u {
36
38
  return;
37
39
  }
38
40
  if (t.length === 3) {
39
- const [s, m, n] = o, p = s.clone().add(n).sub(m);
41
+ const [m, s, n] = o, p = m.clone().add(n).sub(s);
40
42
  o.push(p);
41
43
  }
42
- this.up.copy(f(o, d.modules.five.camera.position)), this.points = o, this.geometry = new g(o), this.planeHelperNeedUpdate = !0;
44
+ this.up.copy(f(o, d.modules.five.camera.position)), this.points = o, this.geometry = new g(o), this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0;
43
45
  }
44
46
  }
45
47
  export {
46
- S as RectangleMesh
48
+ T as RectangleMesh
47
49
  };
@@ -14,6 +14,7 @@ export declare class RectangleWithEdgeMesh extends RectangleMesh {
14
14
  dashed: boolean;
15
15
  occlusionVisibility: boolean;
16
16
  occlusionMode: "translucence" | "depthTest";
17
+ lengthEnable: boolean;
17
18
  color: import("three").Color;
18
19
  opacity: number;
19
20
  };
@@ -1,9 +1,9 @@
1
- var m = Object.defineProperty;
1
+ var a = Object.defineProperty;
2
2
  var u = Object.getOwnPropertySymbols;
3
- var a = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable;
4
- var n = (s, t, e) => t in s ? m(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, d = (s, t) => {
3
+ var m = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable;
4
+ var n = (s, t, e) => t in s ? a(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, d = (s, t) => {
5
5
  for (var e in t || (t = {}))
6
- a.call(t, e) && n(s, e, t[e]);
6
+ m.call(t, e) && n(s, e, t[e]);
7
7
  if (u)
8
8
  for (var e of u(t))
9
9
  g.call(t, e) && n(s, e, t[e]);
@@ -81,7 +81,7 @@ class D extends b {
81
81
  unhighlight() {
82
82
  }
83
83
  applyObjectMatrixWorld(e) {
84
- return y(this, e);
84
+ return this.updateMatrixWorld(), y(this, e);
85
85
  }
86
86
  applyObjectQuaternion(e) {
87
87
  const r = this.quaternion.clone();
@@ -1,27 +1,29 @@
1
1
  var g = Object.defineProperty;
2
2
  var d = (s, e, t) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var n = (s, e, t) => (d(s, typeof e != "symbol" ? e + "" : e, t), t);
3
+ var o = (s, e, t) => (d(s, typeof e != "symbol" ? e + "" : e, t), t);
4
4
  import { BaseEditor as p } from "../Base/Editor.js";
5
- import { Sculpt as o } from "../../index.js";
5
+ import { Sculpt as n } from "../../index.js";
6
6
  import { PointMesh as a } from "../../Meshes/Point.js";
7
7
  import { getIntersectByRaycaster as h } from "../../../shared-utils/five/getPosition.js";
8
8
  import "three";
9
9
  import "hammerjs";
10
10
  import "three/examples/jsm/renderers/CSS3DRenderer";
11
- import "../../Meshes/Line.js";
11
+ import "@realsee/five/line";
12
+ import "../../../shared-utils/tag.js";
13
+ import "../../utils/Modules/Global.js";
12
14
  import "../../../shared-utils/three/THREESphere.js";
13
15
  import "animejs";
14
- import { notNil as l } from "../../../shared-utils/isNil.js";
16
+ import { notNil as m } from "../../../shared-utils/isNil.js";
15
17
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
16
- class m extends p {
18
+ class l extends p {
17
19
  constructor(t) {
18
20
  super(t);
19
- n(this, "draggingPoints", []);
20
- n(this, "onDragstart", (t) => {
21
+ o(this, "draggingPoints", []);
22
+ o(this, "onDragstart", (t) => {
21
23
  const i = t.target;
22
24
  this.draggingPoints = this.pointMeshes.filter((r) => r.position.equals(i.position));
23
25
  });
24
- n(this, "onDragend", (t) => {
26
+ o(this, "onDragend", (t) => {
25
27
  this.draggingPoints = [];
26
28
  });
27
29
  }
@@ -32,22 +34,22 @@ class m extends p {
32
34
  return this.children;
33
35
  }
34
36
  enable() {
35
- super.enable(), this.points.filter(l).forEach((t) => {
37
+ super.enable(), this.points.filter(m).forEach((t) => {
36
38
  const i = new a();
37
- i.visible = !1, i.position.copy(t), i.draggable = !0, o.modules.fiveDomEvents.addEventListener(i, "drag", this.onDrag), o.modules.fiveDomEvents.addEventListener(i, "dragstart", this.onDragstart), o.modules.fiveDomEvents.addEventListener(i, "dragend", this.onDragend), this.add(i);
39
+ i.visible = !1, i.position.copy(t), i.draggable = !0, n.modules.fiveDomEvents.addEventListener(i, "drag", this.onDrag), n.modules.fiveDomEvents.addEventListener(i, "dragstart", this.onDragstart), n.modules.fiveDomEvents.addEventListener(i, "dragend", this.onDragend), this.add(i);
38
40
  });
39
41
  }
40
42
  disable() {
41
43
  super.disable(), this.removeChildren();
42
44
  }
43
45
  }
44
- class B extends m {
46
+ class q extends l {
45
47
  constructor(t) {
46
48
  super(t);
47
- n(this, "onDrag", (t) => {
49
+ o(this, "onDrag", (t) => {
48
50
  if (!this.draggingPoints || this.draggingPoints.length === 0)
49
51
  return;
50
- const i = h(o.modules.five, t.raycaster);
52
+ const i = h(n.modules.five, t.raycaster);
51
53
  this.draggingPoints.forEach((r) => r.position.copy(i.point)), this.originObject.lineMesh.setPoints(this.pointMeshes.map((r) => r.position));
52
54
  });
53
55
  }
@@ -56,6 +58,6 @@ class B extends m {
56
58
  }
57
59
  }
58
60
  export {
59
- B as LineEditor,
60
- m as LineEditorAbstract
61
+ q as LineEditor,
62
+ l as LineEditorAbstract
61
63
  };
@@ -1,17 +1,17 @@
1
1
  var F = Object.defineProperty, L = Object.defineProperties;
2
2
  var N = Object.getOwnPropertyDescriptors;
3
- var T = Object.getOwnPropertySymbols;
3
+ var j = Object.getOwnPropertySymbols;
4
4
  var O = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
5
- var u = (s, e, t) => e in s ? F(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, c = (s, e) => {
5
+ var w = (s, e, t) => e in s ? F(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, c = (s, e) => {
6
6
  for (var t in e || (e = {}))
7
- O.call(e, t) && u(s, t, e[t]);
8
- if (T)
9
- for (var t of T(e))
10
- U.call(e, t) && u(s, t, e[t]);
7
+ O.call(e, t) && w(s, t, e[t]);
8
+ if (j)
9
+ for (var t of j(e))
10
+ U.call(e, t) && w(s, t, e[t]);
11
11
  return s;
12
12
  }, y = (s, e) => L(s, N(e));
13
- var v = (s, e, t) => (u(s, typeof e != "symbol" ? e + "" : e, t), t);
14
- var W = (s, e, t) => new Promise((f, d) => {
13
+ var M = (s, e, t) => (w(s, typeof e != "symbol" ? e + "" : e, t), t);
14
+ var T = (s, e, t) => new Promise((f, d) => {
15
15
  var n = (l) => {
16
16
  try {
17
17
  a(t.next(l));
@@ -38,14 +38,14 @@ const D = new m.Vector3();
38
38
  class X extends z {
39
39
  constructor(t, f) {
40
40
  super(t, f);
41
- v(this, "type", "Polygon");
42
- v(this, "areaMesh");
41
+ M(this, "type", "Polygon");
42
+ M(this, "areaMesh");
43
43
  this.editor = new B(this), t && (this.areaMesh = new V(c(c({}, t.style), t)), this.add(this.areaMesh)), k("esc", () => {
44
44
  this.stopCreating();
45
45
  });
46
46
  }
47
47
  get data() {
48
- return y(c({}, this.baseData), {
48
+ return this.updateMatrixWorld(), y(c({}, this.baseData), {
49
49
  points: H(this.applyObjectMatrixWorld(this.areaMesh.points)),
50
50
  style: {
51
51
  color: this.areaMesh.color.getHex(),
@@ -63,7 +63,7 @@ class X extends z {
63
63
  (t = this.areaMesh) == null || t.unhighlight();
64
64
  }
65
65
  create(t) {
66
- return W(this, null, function* () {
66
+ return T(this, null, function* () {
67
67
  this.children.forEach((d) => {
68
68
  d.parent === this && this.remove(d);
69
69
  }), this.children.length = 0;
@@ -74,37 +74,37 @@ class X extends z {
74
74
  }
75
75
  function I(s, e, t) {
76
76
  return new Promise((f, d) => {
77
- var x;
77
+ var C;
78
78
  const n = s.parent;
79
79
  if (!n) {
80
80
  d(new Error("No container"));
81
81
  return;
82
82
  }
83
- const P = (x = t == null ? void 0 : t.limit) != null ? x : "none", a = new A(s.style);
83
+ const P = (C = t == null ? void 0 : t.limit) != null ? C : "none", a = new A(s.style);
84
84
  n == null || n.add(a);
85
85
  const l = new A(y(c({}, s.style), { dashed: !0, lengthEnable: !1 }));
86
86
  n == null || n.add(l), e.enable();
87
87
  const o = [];
88
- let i, r, w = !1;
89
- const M = (h) => {
88
+ let i, r, u = !1;
89
+ const v = (h) => {
90
90
  const p = o.length === 0 ? h.point : i.clone();
91
- o.push(p), s.setPoints(o, { closed: !1 }), w && (E(), f());
91
+ o.push(p), s.setPoints(o, { closed: !1 }), u && (E(), f());
92
92
  }, b = (h) => {
93
93
  if (!(o != null && o.length) || !h)
94
94
  return;
95
95
  const p = o.at(-1).clone();
96
96
  if (o.length < 3 && (P === "none" ? (i = h.point, a.setPoints([p, i])) : P === "xoz" ? (r = r != null ? r : new m.Plane().setFromNormalAndCoplanarPoint(new m.Vector3(0, 1, 0), o[0]), e.plane = r, i = r.projectPoint(h.point, D), a.setPoints([p, i]), l.setPoints([i, h.point])) : P === "y" && (o.length === 1 ? (i = h.point, a.setPoints([p, i])) : (r = r != null ? r : new m.Plane().setFromCoplanarPoints(o[0], o[1], new m.Vector3(0, 1, 0).add(o[0])), e.plane = r, i = r.projectPoint(h.point, D), a.setPoints([p, i]), l.setPoints([i, h.point])))), o.length >= 3) {
97
97
  i = s.projectPoint(h.point);
98
- const g = o[0], j = 0.2;
99
- g.distanceTo(i) < j || g.distanceTo(h.point) < j ? (i = g, h.point.copy(g), e.pointSelectorHelper.updateWithIntersect(h, { emitEvent: !1 }), w = !0) : w = !1, a.setPoints([p, i]), l.setPoints([i, h.point]);
98
+ const g = o[0], W = 0.2;
99
+ g.distanceTo(i) < W || g.distanceTo(h.point) < W ? (i = g, h.point.copy(g), e.pointSelectorHelper.updateWithIntersect(h, { emitEvent: !1 }), u = !0) : u = !1, a.setPoints([p, i]), l.setPoints([i, h.point]);
100
100
  }
101
101
  o.length >= 2 && s.setPoints([...o, i], { closed: !1 });
102
102
  }, E = () => {
103
- e.off("select", M), e.off("intersectionUpdate", b), e.off("disable", C), e.plane = null, e.disable(), n == null || n.remove(a, l);
104
- }, C = () => {
103
+ e.off("select", v), e.off("intersectionUpdate", b), e.off("disable", x), e.plane = null, e.disable(), n == null || n.remove(a, l);
104
+ }, x = () => {
105
105
  E(), n == null || n.remove(s, l, a), d(new Error("Cancelled"));
106
106
  };
107
- e.on("select", M), e.on("intersectionUpdate", b), e.on("disable", C);
107
+ e.on("select", v), e.on("intersectionUpdate", b), e.on("disable", x);
108
108
  });
109
109
  }
110
110
  export {
@@ -1,5 +1,5 @@
1
- import { BaseEditorWithObjectHelper as t } from "../Base/Editor.js";
2
- class o extends t {
1
+ import { BaseEditorWithObjectHelper as r } from "../Base/Editor.js";
2
+ class o extends r {
3
3
  constructor(e) {
4
4
  super(e, () => ({ yAxis: e.rectangleMesh.up }));
5
5
  }
@@ -1,45 +1,45 @@
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) => {
1
+ var U = Object.defineProperty, k = Object.defineProperties;
2
+ var B = Object.getOwnPropertyDescriptors;
3
+ var A = Object.getOwnPropertySymbols;
4
+ var I = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
5
+ var E = (s, t, e) => t in s ? U(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
- 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]);
7
+ I.call(t, e) && E(s, e, t[e]);
8
+ if (A)
9
+ for (var e of A(t))
10
+ _.call(t, e) && E(s, e, t[e]);
11
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) => {
12
+ }, u = (s, t) => k(s, B(t));
13
+ var L = (s, t, e) => (E(s, typeof t != "symbol" ? t + "" : t, e), e);
14
+ var D = (s, t, e) => new Promise((c, w) => {
15
+ var a = (o) => {
16
16
  try {
17
- m(e.next(o));
18
- } catch (c) {
19
- f(c);
17
+ g(e.next(o));
18
+ } catch (h) {
19
+ w(h);
20
20
  }
21
- }, w = (o) => {
21
+ }, m = (o) => {
22
22
  try {
23
- m(e.throw(o));
24
- } catch (c) {
25
- f(c);
23
+ g(e.throw(o));
24
+ } catch (h) {
25
+ w(h);
26
26
  }
27
- }, m = (o) => o.done ? h(o.value) : Promise.resolve(o.value).then(r, w);
28
- m((e = e.apply(s, t)).next());
27
+ }, g = (o) => o.done ? c(o.value) : Promise.resolve(o.value).then(a, m);
28
+ g((e = e.apply(s, t)).next());
29
29
  });
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", () => {
30
+ import { hotkeys as j } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
31
+ import { BaseObject as q } from "../Base/index.js";
32
+ import * as r from "three";
33
+ import { PolylineWithDotsMesh as M } from "../../Meshes/Polyline.js";
34
+ import { RectangleEditor as G } from "./Editor.js";
35
+ import { RectangleWithEdgeMesh as H } from "../../Meshes/RectangleWithEdge.js";
36
+ const P = new r.Vector3();
37
+ class S extends q {
38
+ constructor(e, c) {
39
+ super(e, c);
40
+ L(this, "type", "Rectangle");
41
+ L(this, "rectangleMesh");
42
+ this.config.canEdit && (this.editor = new G(this)), e && (this.rectangleMesh = new H(d(d({}, e.style), e)), this.add(this.rectangleMesh)), j("esc", () => {
43
43
  this.stopCreating();
44
44
  });
45
45
  }
@@ -62,51 +62,61 @@ class S extends j {
62
62
  (e = this.rectangleMesh) == null || e.unhighlight();
63
63
  }
64
64
  create(e) {
65
- return L(this, null, function* () {
65
+ return D(this, null, function* () {
66
66
  this.removeChildren();
67
- const h = new T(e);
68
- this.rectangleMesh = h, this.add(this.rectangleMesh), yield J(this.rectangleMesh, this.pointSelector), this.editor.enable();
67
+ const c = new H(e);
68
+ this.rectangleMesh = c, this.add(this.rectangleMesh), yield J(this.rectangleMesh, this.pointSelector, e);
69
69
  });
70
70
  }
71
71
  }
72
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();
73
+ return new Promise((c, w) => {
74
+ var N, T;
75
+ const a = s.parent;
76
+ if (!a)
77
+ return w(new Error("No container"));
78
+ const m = (N = e == null ? void 0 : e.limit) != null ? N : "none", g = (T = e == null ? void 0 : e.drawMethod) != null ? T : "diagonal", o = new M(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), h = new M(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), y = new M(u(d({}, s.style), { dashed: !1, lengthEnable: !1 }));
79
+ a.add(o, y, h), t.enable();
80
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))
81
+ let i = new r.Vector3(), v = new r.Vector3();
82
+ const f = new r.Plane(), C = () => {
83
+ n.push(i.clone()), n.length === 1 ? (m === "xoz" && f.setFromNormalAndCoplanarPoint(new r.Vector3(0, 1, 0), n[0]), m === "none" && f.setFromNormalAndCoplanarPoint(v, n[0])) : n.length === 2 ? m === "y" ? (b(), c()) : y.setPoints([n[0], n[1]]) : n.length === 3 && (b(), c());
84
+ }, x = (l) => {
85
+ var W;
86
+ if (!(l != null && l.raycaster))
87
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));
88
+ const O = (W = n.at(-1)) == null ? void 0 : W.clone();
89
+ if (n.length === 0) {
90
+ i = l.point.clone(), v = l.face.normal;
91
+ return;
92
+ }
93
+ if (n.length === 1 && m === "y") {
94
+ const p = new r.Line3(new r.Vector3(0, 1, 0).add(n[0]), new r.Vector3(0, -1, 0).add(n[0])).closestPointToPoint(l.point, !1, P);
95
+ s.setPoints([n[0], p, l.point]);
96
+ return;
97
+ }
98
+ if (n.length === 1) {
99
+ f ? (i = l.raycaster.ray.intersectPlane(f, P), h.setPoints([i, l.point])) : i = l.point.clone(), o.setPoints([O, i]);
100
+ return;
101
+ }
102
+ if (n.length === 2) {
103
+ a.remove(o);
104
+ const z = l.raycaster.ray.intersectPlane(f, P);
105
+ if (g === "diagonal") {
106
+ const p = n[0].distanceTo(n[1]) / 2, V = new r.Vector3().lerpVectors(n[0], n[1], 0.5), F = new r.Vector3().subVectors(z, V).normalize();
107
+ i = new r.Vector3().addVectors(V, F.multiplyScalar(p)), s.setPoints([n[0], i, n[1]]);
108
+ } else if (g === "vertex") {
109
+ const p = P.crossVectors(n[0].clone().sub(n[1]), f.normal).normalize();
110
+ i = new r.Line3(n[1].clone().add(p), n[1].clone().sub(p)).closestPointToPoint(l.point, !1, P), s.setPoints([n[0], n[1], i]);
101
111
  }
102
- r.remove(o), s.setPoints([n[0], a, n[1]]);
112
+ return;
103
113
  }
114
+ }, b = () => {
115
+ t.off("select", C), t.off("intersectionUpdate", x), t.off("disable", R), t.disable(), a == null || a.remove(o, y, h);
104
116
  }, 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"));
117
+ b(), a == null || a.remove(s), w(new Error("Cancelled"));
108
118
  };
109
- t.on("select", C), t.on("intersectionUpdate", x), t.on("disable", N);
119
+ t.on("select", C), t.on("intersectionUpdate", x), t.on("disable", R);
110
120
  });
111
121
  }
112
122
  export {