@realsee/dnalogel 3.46.0 → 3.47.0

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 (110) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/Sculpt/Meshes/Polygon.d.ts +6 -0
  3. package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +8 -0
  4. package/dist/Sculpt/Meshes/Polyline.d.ts +7 -0
  5. package/dist/Sculpt/utils/removeAllTag.d.ts +2 -0
  6. package/dist/Sculpt/utils/three/ColoredMesh.d.ts +6 -0
  7. package/dist/index.cjs.js +54 -54
  8. package/dist/index.js +3645 -3592
  9. package/dist/index.umd.js +46 -46
  10. package/dist/shared-utils/five/getPosition.d.ts +2 -0
  11. package/dist/shared-utils/three/PointSelector/index.d.ts +14 -10
  12. package/dist/typings/typings.d.ts +2 -0
  13. package/libs/AreaMakerPlugin/Controller.js +3 -2
  14. package/libs/AreaMakerPlugin/index.js +3 -2
  15. package/libs/AreaMakerPlugin/utils/Item.js +3 -2
  16. package/libs/CSS3DRenderPlugin/Controller.js +3 -2
  17. package/libs/CSS3DRenderPlugin/index.js +6 -5
  18. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +3 -2
  19. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +3 -2
  20. package/libs/CruisePlugin/BaseController.js +5 -4
  21. package/libs/CruisePlugin/Move.js +3 -2
  22. package/libs/CruisePlugin/Work.js +3 -2
  23. package/libs/CruisePlugin/index.js +7 -6
  24. package/libs/CurrentPanoImagePlugin/Controller.js +3 -2
  25. package/libs/CurrentPanoImagePlugin/index.js +4 -3
  26. package/libs/GuideLinePlugin/Controller.js +5 -4
  27. package/libs/GuideLinePlugin/GuideLineItem.js +3 -2
  28. package/libs/GuideLinePlugin/GuideLineModeItem.js +3 -2
  29. package/libs/GuideLinePlugin/index.js +7 -6
  30. package/libs/ModelMakerPlugin/Controller.js +3 -2
  31. package/libs/ModelMakerPlugin/index.js +3 -2
  32. package/libs/ModelTVVideoPlugin/Plugin.js +4 -3
  33. package/libs/ModelTVVideoPlugin/index.js +3 -2
  34. package/libs/Object3DHelperPlugin/Controller.js +19 -18
  35. package/libs/Object3DHelperPlugin/index.js +6 -5
  36. package/libs/PanoCompassPlugin/Controller.js +3 -2
  37. package/libs/PanoCompassPlugin/index.js +4 -3
  38. package/libs/PanoDoorLabelPlugin/BaseController.js +3 -2
  39. package/libs/PanoDoorLabelPlugin/Controller.js +21 -20
  40. package/libs/PanoDoorLabelPlugin/index.js +4 -3
  41. package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
  42. package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
  43. package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
  44. package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
  45. package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
  46. package/libs/PanoMeasurePlugin/Model/area.js +3 -2
  47. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -0
  48. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +3 -2
  49. package/libs/PanoMeasurePlugin/index.js +14 -13
  50. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +3 -2
  51. package/libs/PanoSpatialTagPlugin/Plugin.js +4 -3
  52. package/libs/PanoSpatialTagPlugin/index.js +1 -0
  53. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +34 -33
  54. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
  55. package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
  56. package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
  57. package/libs/PanoTagPlugin/Components/TagItem.js +3 -2
  58. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +62 -61
  59. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
  60. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
  61. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
  62. package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
  63. package/libs/PanoTagPlugin/controller/TagUtil.js +3 -2
  64. package/libs/PanoTagPlugin/controller/index.js +6 -5
  65. package/libs/PanoTagPlugin/index.js +12 -11
  66. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -2
  67. package/libs/PanoVideoPlugin/Controller.js +3 -2
  68. package/libs/PanoVideoPlugin/VideoMeshController.js +3 -2
  69. package/libs/PanoVideoPlugin/index.js +6 -5
  70. package/libs/PipelinePlugin/Controller.js +3 -2
  71. package/libs/PipelinePlugin/index.js +4 -3
  72. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +3 -2
  73. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -2
  74. package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -0
  75. package/libs/Sculpt/Meshes/Line.js +17 -14
  76. package/libs/Sculpt/Meshes/Polygon.d.ts +6 -0
  77. package/libs/Sculpt/Meshes/Polygon.js +7 -4
  78. package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +8 -0
  79. package/libs/Sculpt/Meshes/PolygonWithEdge.js +38 -24
  80. package/libs/Sculpt/Meshes/Polyline.d.ts +7 -0
  81. package/libs/Sculpt/Meshes/Polyline.js +32 -23
  82. package/libs/Sculpt/Objects/Base/index.js +20 -17
  83. package/libs/Sculpt/Objects/Line/Editor.js +6 -6
  84. package/libs/Sculpt/Objects/Line/index.js +16 -16
  85. package/libs/Sculpt/Objects/Point/Editor.js +10 -10
  86. package/libs/Sculpt/Objects/Polygon/Editor.js +6 -6
  87. package/libs/Sculpt/Objects/Polygon/index.js +43 -37
  88. package/libs/Sculpt/Objects/Polyline/Editor.js +3 -3
  89. package/libs/Sculpt/Objects/Polyline/index.js +43 -43
  90. package/libs/Sculpt/utils/removeAllTag.d.ts +2 -0
  91. package/libs/Sculpt/utils/removeAllTag.js +10 -0
  92. package/libs/Sculpt/utils/three/ColoredMesh.d.ts +6 -0
  93. package/libs/Sculpt/utils/three/ColoredMesh.js +39 -31
  94. package/libs/base/BasePlugin.js +1 -1
  95. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +3 -2
  96. package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -3
  97. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +3 -2
  98. package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -3
  99. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -2
  100. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -3
  101. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +3 -2
  102. package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -3
  103. package/libs/index.js +126 -125
  104. package/libs/shared-utils/five/getPosition.d.ts +2 -0
  105. package/libs/shared-utils/five/getPosition.js +25 -30
  106. package/libs/shared-utils/logger.js +1 -1
  107. package/libs/shared-utils/three/PointSelector/index.d.ts +14 -10
  108. package/libs/shared-utils/three/PointSelector/index.js +74 -57
  109. package/libs/typings/typings.d.ts +2 -0
  110. package/package.json +1 -1
@@ -1,25 +1,25 @@
1
1
  var x = Object.defineProperty, B = Object.defineProperties;
2
2
  var T = Object.getOwnPropertyDescriptors;
3
- var h = Object.getOwnPropertySymbols;
4
- var C = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
5
- var d = (s, e, i) => e in s ? x(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i, a = (s, e) => {
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
6
  for (var i in e || (e = {}))
7
- C.call(e, i) && d(s, i, e[i]);
8
- if (h)
9
- for (var i of h(e))
10
- w.call(e, i) && d(s, i, e[i]);
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]);
11
11
  return s;
12
12
  }, c = (s, e) => B(s, T(e));
13
13
  var E = (s, e) => {
14
14
  var i = {};
15
15
  for (var t in s)
16
- C.call(s, t) && e.indexOf(t) < 0 && (i[t] = s[t]);
17
- if (s != null && h)
18
- for (var t of h(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
19
  e.indexOf(t) < 0 && w.call(s, t) && (i[t] = s[t]);
20
20
  return i;
21
21
  };
22
- var l = (s, e, i) => (d(s, typeof e != "symbol" ? e + "" : e, i), i);
22
+ var l = (s, e, i) => (p(s, typeof e != "symbol" ? e + "" : e, i), i);
23
23
  import { anyPositionToVector3 as j } from "../../shared-utils/positionToVector3.js";
24
24
  import { IObject3D as F } from "../../shared-utils/three/IObject3D.js";
25
25
  import * as H from "three";
@@ -40,8 +40,17 @@ class v extends F {
40
40
  l(this, "lines", []);
41
41
  l(this, "withDots");
42
42
  l(this, "paramsStyle");
43
- const n = i, { withDots: t, points: o } = n, r = E(n, ["withDots", "points"]);
44
- this.withDots = t != null ? t : !0, o && this.setPoints(o), r && this.setStyle(r);
43
+ const n = i, { withDots: t, points: o } = n, h = E(n, ["withDots", "points"]);
44
+ this.withDots = t != null ? t : !0, o && this.setPoints(o), h && this.setStyle(h);
45
+ }
46
+ get style() {
47
+ return {
48
+ lineColor: this.lineColor,
49
+ lineWidth: this.lineWidth,
50
+ dashed: this.dashed,
51
+ occlusionVisibility: this.occlusionVisibility,
52
+ occlusionMode: this.occlusionMode
53
+ };
45
54
  }
46
55
  get lineColor() {
47
56
  var i, t, o;
@@ -68,24 +77,24 @@ class v extends F {
68
77
  return this.lines.map((t) => t.points[0]).concat((i = this.lines.at(-1)) == null ? void 0 : i.points[1]).filter(Boolean);
69
78
  }
70
79
  setPoints(i, t = { closed: !1 }) {
71
- var n, u, y, f, S, g, P, M, V, W;
80
+ var n, u, y, f, g, S, M, P, V, W;
72
81
  let o = i.map(j);
73
82
  t.closed && (o = N(o));
74
- const r = {
83
+ const h = {
75
84
  lineWidth: (u = (n = this.paramsStyle) == null ? void 0 : n.lineWidth) != null ? u : this.lineWidth,
76
85
  lineColor: (f = (y = this.paramsStyle) == null ? void 0 : y.lineColor) != null ? f : this.lineColor,
77
- dashed: (g = (S = this.paramsStyle) == null ? void 0 : S.dashed) != null ? g : this.dashed,
78
- occlusionVisibility: (M = (P = this.paramsStyle) == null ? void 0 : P.occlusionVisibility) != null ? M : this.occlusionVisibility,
86
+ dashed: (S = (g = this.paramsStyle) == null ? void 0 : g.dashed) != null ? S : this.dashed,
87
+ occlusionVisibility: (P = (M = this.paramsStyle) == null ? void 0 : M.occlusionVisibility) != null ? P : this.occlusionVisibility,
79
88
  occlusionMode: (W = (V = this.paramsStyle) == null ? void 0 : V.occlusionMode) != null ? W : this.occlusionMode
80
89
  };
81
- this.lines.length && this.lines.forEach((m) => m.removeFromParent()), this.lines = o.map((m, p) => {
82
- const b = o[p + 1];
83
- if (p !== 0 && b === void 0)
90
+ this.lines.length && this.lines.forEach((d) => d.removeFromParent()), this.lines = o.map((d, m) => {
91
+ const b = o[m + 1];
92
+ if (m !== 0 && b === void 0)
84
93
  return null;
85
- const D = new L(c(a({}, r), {
86
- pointVisibility: this.withDots ? { startPoint: p === 0, endPoint: !0 } : !1
94
+ const C = new L(c(a({}, h), {
95
+ pointVisibility: this.withDots ? { startPoint: m === 0, endPoint: !0 } : !1
87
96
  }));
88
- return D.setPoints([m, b]), D;
97
+ return C.setPoints([d, b]), C;
89
98
  }).filter(I), this.add(...this.lines);
90
99
  }
91
100
  setStyle(i) {
@@ -1,22 +1,23 @@
1
- var b = Object.defineProperty;
1
+ var m = Object.defineProperty;
2
2
  var u = Object.getOwnPropertySymbols;
3
- var g = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
4
- var n = (s, t, e) => t in s ? b(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, d = (s, t) => {
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) => {
5
5
  for (var e in t || (t = {}))
6
- g.call(t, e) && n(s, e, t[e]);
6
+ a.call(t, e) && n(s, e, t[e]);
7
7
  if (u)
8
8
  for (var e of u(t))
9
- a.call(t, e) && n(s, e, t[e]);
9
+ g.call(t, e) && n(s, e, t[e]);
10
10
  return s;
11
11
  };
12
12
  var o = (s, t, e) => (n(s, typeof t != "symbol" ? t + "" : t, e), e);
13
13
  import { hotkeys as p } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
14
- import { Sculpt as r } from "../../index.js";
15
- import { IObject3D as m } from "../../../shared-utils/three/IObject3D.js";
14
+ import { Sculpt as l } from "../../index.js";
15
+ import { IObject3D as b } from "../../../shared-utils/three/IObject3D.js";
16
16
  import { applyObjectMatrixWorld as y } from "../../../shared-utils/three/applyObjectMatrixWorld.js";
17
+ import { removeAllTag as v } from "../../utils/removeAllTag.js";
17
18
  const f = /* @__PURE__ */ new Map();
18
- class E extends m {
19
- constructor(e, l) {
19
+ class D extends b {
20
+ constructor(e, r) {
20
21
  super();
21
22
  o(this, "name", "Sculpt");
22
23
  o(this, "isSculptObject", !0);
@@ -30,9 +31,11 @@ class E extends m {
30
31
  */
31
32
  o(this, "config");
32
33
  o(this, "editor");
33
- o(this, "on", (e, l, i) => r.modules.fiveDomEvents.addEventListener(this, e, l, i));
34
- o(this, "off", (...e) => r.modules.fiveDomEvents.removeEventListener(this, ...e));
35
- e != null && e.id && (this.uuid = e.id), this.config = d({ canEdit: !0, occlusionVisibility: !0, occlusionMode: "translucence" }, l), e != null && e.style && (e.style.occlusionVisibility = this.config.occlusionVisibility, e.style.occlusionMode = this.config.occlusionMode), this.config.canEdit && (p("backspace, delete", () => {
34
+ o(this, "on", (e, r, i) => l.modules.fiveDomEvents.addEventListener(this, e, r, i));
35
+ o(this, "off", (...e) => l.modules.fiveDomEvents.removeEventListener(this, ...e));
36
+ e != null && e.id && (this.uuid = e.id), this.config = d({ canEdit: !0, occlusionVisibility: !0, occlusionMode: "translucence" }, r), e != null && e.style && (e.style.occlusionVisibility = this.config.occlusionVisibility, e.style.occlusionMode = this.config.occlusionMode), this.addEventListener("removed", () => {
37
+ v(this);
38
+ }), this.config.canEdit && (p("backspace, delete", () => {
36
39
  this.selected && this.delete();
37
40
  }), this.on("click", () => {
38
41
  var c, h;
@@ -52,13 +55,13 @@ class E extends m {
52
55
  };
53
56
  }
54
57
  get pointSelector() {
55
- return r.modules.pointSelector;
58
+ return l.modules.pointSelector;
56
59
  }
57
60
  /**
58
61
  * @description 停止创建当前物体,等同于`esc`
59
62
  */
60
63
  stopCreating() {
61
- r.modules.pointSelector.disable();
64
+ l.modules.pointSelector.disable();
62
65
  }
63
66
  /**
64
67
  * @description 从场景中删除当前物体,并且移除事件监听
@@ -81,10 +84,10 @@ class E extends m {
81
84
  return y(this, e);
82
85
  }
83
86
  applyObjectQuaternion(e) {
84
- const l = this.quaternion.clone();
85
- return Array.isArray(e) ? e.map((i) => i.clone().applyQuaternion(l)) : e.clone().applyQuaternion(l);
87
+ const r = this.quaternion.clone();
88
+ return Array.isArray(e) ? e.map((i) => i.clone().applyQuaternion(r)) : e.clone().applyQuaternion(r);
86
89
  }
87
90
  }
88
91
  export {
89
- E as BaseObject
92
+ D as BaseObject
90
93
  };
@@ -12,9 +12,9 @@ import "@realsee/five/line";
12
12
  import "../../utils/Modules/Global.js";
13
13
  import "../../../shared-utils/three/THREESphere.js";
14
14
  import "animejs";
15
- import { notNil as l } from "../../../shared-utils/isNil.js";
15
+ import { notNil as m } from "../../../shared-utils/isNil.js";
16
16
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
17
- class m extends p {
17
+ class l extends p {
18
18
  constructor(t) {
19
19
  super(t);
20
20
  o(this, "draggingPoints", []);
@@ -33,7 +33,7 @@ class m extends p {
33
33
  return this.children;
34
34
  }
35
35
  enable() {
36
- super.enable(), this.points.filter(l).forEach((t) => {
36
+ super.enable(), this.points.filter(m).forEach((t) => {
37
37
  const i = new a();
38
38
  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);
39
39
  });
@@ -42,13 +42,13 @@ class m extends p {
42
42
  super.disable(), this.removeChildren();
43
43
  }
44
44
  }
45
- class O extends m {
45
+ class O extends l {
46
46
  constructor(t) {
47
47
  super(t);
48
48
  o(this, "onDrag", (t) => {
49
49
  if (!this.draggingPoints || this.draggingPoints.length === 0)
50
50
  return;
51
- const i = h(n.modules.five, t.raycaster, { virtualPoint: !0 });
51
+ const i = h(n.modules.five, t.raycaster);
52
52
  this.draggingPoints.forEach((r) => r.position.copy(i.point)), this.originObject.lineMesh.setPoints(this.pointMeshes.map((r) => r.position));
53
53
  });
54
54
  }
@@ -58,5 +58,5 @@ class O extends m {
58
58
  }
59
59
  export {
60
60
  O as LineEditor,
61
- m as LineEditorAbstract
61
+ l as LineEditorAbstract
62
62
  };
@@ -15,27 +15,27 @@ var W = (i, t, e) => new Promise((n, a) => {
15
15
  var h = (o) => {
16
16
  try {
17
17
  d(e.next(o));
18
- } catch (f) {
19
- a(f);
18
+ } catch (p) {
19
+ a(p);
20
20
  }
21
- }, m = (o) => {
21
+ }, f = (o) => {
22
22
  try {
23
23
  d(e.throw(o));
24
- } catch (f) {
25
- a(f);
24
+ } catch (p) {
25
+ a(p);
26
26
  }
27
- }, d = (o) => o.done ? n(o.value) : Promise.resolve(o.value).then(h, m);
27
+ }, d = (o) => o.done ? n(o.value) : Promise.resolve(o.value).then(h, f);
28
28
  d((e = e.apply(i, t)).next());
29
29
  });
30
30
  import { hotkeys as D } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
31
31
  import { LineMesh as x } from "../../Meshes/Line.js";
32
32
  import { BaseObject as U } from "../Base/index.js";
33
- import * as c from "three";
33
+ import * as m from "three";
34
34
  import { LineEditor as k } from "./Editor.js";
35
35
  import { vector3ToArray as z } from "../../../shared-utils/three/vector3ToArray.js";
36
36
  import { LineWithDotsMesh as E } from "../../Meshes/LineWithDots.js";
37
37
  import { rayOnLine as B } from "../../utils/three/rayOnLine.js";
38
- const F = new c.Vector3();
38
+ const F = new m.Vector3();
39
39
  class Q extends U {
40
40
  constructor(e, n) {
41
41
  super(e, n);
@@ -49,7 +49,7 @@ class Q extends U {
49
49
  return C(u({}, this.baseData), {
50
50
  points: z(this.applyObjectMatrixWorld(this.lineMesh.points)),
51
51
  style: {
52
- lineColor: new c.Color(this.lineMesh.color).getHex(),
52
+ lineColor: new m.Color(this.lineMesh.color).getHex(),
53
53
  lineWidth: this.lineMesh.lineWidth,
54
54
  dashed: this.lineMesh.dashed
55
55
  }
@@ -78,10 +78,10 @@ function H(i, t, e) {
78
78
  return;
79
79
  const a = (d = e == null ? void 0 : e.limit) != null ? d : "none", h = new x(i.style);
80
80
  n.add(h);
81
- const m = new x({ dashed: !0, lineColor: i.color, lineWidth: i.lineWidth });
82
- return n.add(m), t.enable(), new Promise((o, f) => {
81
+ const f = new x({ dashed: !0, lineColor: i.color, lineWidth: i.lineWidth });
82
+ return n.add(f), t.enable(), new Promise((o, p) => {
83
83
  const s = [];
84
- let r, p;
84
+ let r, c;
85
85
  const g = (l) => {
86
86
  const w = s.length === 0 ? l.point : r.clone();
87
87
  s.push(w), i.setPoints(s), s.length === 2 && (M(), o());
@@ -89,15 +89,15 @@ function H(i, t, e) {
89
89
  if (!(s != null && s.length) || !l)
90
90
  return;
91
91
  const w = s.at(-1).clone();
92
- a === "none" ? (r = l.point, h.setPoints([w, r])) : a === "xoz" ? (p = p != null ? p : new c.Plane().setFromNormalAndCoplanarPoint(new c.Vector3(0, 1, 0), s[0]), r = p.projectPoint(l.point, F), h.setPoints([w, r]), m.setPoints([r, l.point])) : a === "y" && (r = B({
92
+ a === "none" ? (r = l.point, h.setPoints([w, r])) : a === "xoz" ? (t.plane = c, c = c != null ? c : new m.Plane().setFromNormalAndCoplanarPoint(new m.Vector3(0, 1, 0), s[0]), r = c.projectPoint(l.point, F), h.setPoints([w, r]), f.setPoints([r, l.point])) : a === "y" && (r = B({
93
93
  raycaster: l.raycaster,
94
- line: new c.Line3(s[0].clone(), new c.Vector3(0, 1, 0).add(s[0])),
94
+ line: new m.Line3(s[0].clone(), new m.Vector3(0, 1, 0).add(s[0])),
95
95
  clampToLine: !1
96
96
  }), h.setPoints([w, r]));
97
97
  }, M = () => {
98
- t.off("select", g), t.off("intersectionUpdate", L), t.off("disable", v), t.disable(), n == null || n.remove(h, m);
98
+ t.off("select", g), t.off("intersectionUpdate", L), t.off("disable", v), t.plane = null, t.disable(), n == null || n.remove(h, f);
99
99
  }, v = () => {
100
- M(), s.length !== 2 && (n == null || n.remove(i)), f(new Error("Cancelled"));
100
+ M(), s.length !== 2 && (n == null || n.remove(i)), p(new Error("Cancelled"));
101
101
  };
102
102
  t.on("select", g), t.on("intersectionUpdate", L), t.on("disable", v);
103
103
  });
@@ -1,16 +1,16 @@
1
- var s = Object.defineProperty;
2
- var a = (r, i, t) => i in r ? s(r, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[i] = t;
3
- var o = (r, i, t) => (a(r, typeof i != "symbol" ? i + "" : i, t), t);
1
+ var n = Object.defineProperty;
2
+ var a = (r, t, i) => t in r ? n(r, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[t] = i;
3
+ var o = (r, t, i) => (a(r, typeof t != "symbol" ? t + "" : t, i), i);
4
4
  import { BaseEditor as c } from "../Base/Editor.js";
5
5
  import { Sculpt as g } from "../../index.js";
6
6
  import { getIntersectByRaycaster as b } from "../../../shared-utils/five/getPosition.js";
7
- class u extends c {
8
- constructor(t) {
9
- super(t);
10
- o(this, "onDrag", (t) => {
7
+ class l extends c {
8
+ constructor(i) {
9
+ super(i);
10
+ o(this, "onDrag", (i) => {
11
11
  var e;
12
- const n = b(g.modules.five, t.raycaster, { virtualPoint: !0 });
13
- (e = this.originObject.pointMesh) == null || e.position.copy(n.point);
12
+ const s = b(g.modules.five, i.raycaster);
13
+ (e = this.originObject.pointMesh) == null || e.position.copy(s.point);
14
14
  });
15
15
  }
16
16
  enable() {
@@ -21,5 +21,5 @@ class u extends c {
21
21
  }
22
22
  }
23
23
  export {
24
- u as PointEditor
24
+ l as PointEditor
25
25
  };
@@ -1,17 +1,17 @@
1
1
  var a = Object.defineProperty;
2
2
  var c = (o, i, t) => i in o ? a(o, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[i] = t;
3
- var s = (o, i, t) => (c(o, typeof i != "symbol" ? i + "" : i, t), t);
3
+ var r = (o, i, t) => (c(o, typeof i != "symbol" ? i + "" : i, t), t);
4
4
  import { Sculpt as g } from "../../index.js";
5
5
  import { getIntersectByRaycaster as p } from "../../../shared-utils/five/getPosition.js";
6
6
  import { LineEditorAbstract as h } from "../Line/Editor.js";
7
- class f extends h {
7
+ class u extends h {
8
8
  constructor(t) {
9
9
  super(t);
10
- s(this, "onDrag", (t) => {
10
+ r(this, "onDrag", (t) => {
11
11
  if (!this.draggingPoints || this.draggingPoints.length === 0)
12
12
  return;
13
- const e = p(g.modules.five, t.raycaster, { virtualPoint: !0 }), n = this.originObject.areaMesh.projectPoint(e.point);
14
- this.draggingPoints.forEach((r) => r.position.copy(n)), this.originObject.areaMesh.setPoints(this.pointMeshes.map((r) => r.position));
13
+ const e = p(g.modules.five, t.raycaster), n = this.originObject.areaMesh.projectPoint(e.point);
14
+ this.draggingPoints.forEach((s) => s.position.copy(n)), this.originObject.areaMesh.setPoints(this.pointMeshes.map((s) => s.position));
15
15
  });
16
16
  }
17
17
  get points() {
@@ -19,5 +19,5 @@ class f extends h {
19
19
  }
20
20
  }
21
21
  export {
22
- f as PolygonEditor
22
+ u as PolygonEditor
23
23
  };
@@ -2,50 +2,50 @@ var F = Object.defineProperty, L = Object.defineProperties;
2
2
  var N = Object.getOwnPropertyDescriptors;
3
3
  var x = Object.getOwnPropertySymbols;
4
4
  var O = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
5
- var u = (o, e, t) => e in o ? F(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, g = (o, e) => {
5
+ var w = (o, e, t) => e in o ? F(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, u = (o, e) => {
6
6
  for (var t in e || (e = {}))
7
- O.call(e, t) && u(o, t, e[t]);
7
+ O.call(e, t) && w(o, t, e[t]);
8
8
  if (x)
9
9
  for (var t of x(e))
10
- U.call(e, t) && u(o, t, e[t]);
10
+ U.call(e, t) && w(o, t, e[t]);
11
11
  return o;
12
- }, j = (o, e) => L(o, N(e));
13
- var y = (o, e, t) => (u(o, typeof e != "symbol" ? e + "" : e, t), t);
14
- var T = (o, e, t) => new Promise((f, d) => {
12
+ }, V = (o, e) => L(o, N(e));
13
+ var y = (o, e, t) => (w(o, typeof e != "symbol" ? e + "" : e, t), t);
14
+ var j = (o, e, t) => new Promise((c, d) => {
15
15
  var n = (l) => {
16
16
  try {
17
- h(t.next(l));
17
+ r(t.next(l));
18
18
  } catch (s) {
19
19
  d(s);
20
20
  }
21
21
  }, p = (l) => {
22
22
  try {
23
- h(t.throw(l));
23
+ r(t.throw(l));
24
24
  } catch (s) {
25
25
  d(s);
26
26
  }
27
- }, h = (l) => l.done ? f(l.value) : Promise.resolve(l.value).then(n, p);
28
- h((t = t.apply(o, e)).next());
27
+ }, r = (l) => l.done ? c(l.value) : Promise.resolve(l.value).then(n, p);
28
+ r((t = t.apply(o, e)).next());
29
29
  });
30
30
  import { hotkeys as k } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
31
31
  import { BaseObject as z } from "../Base/index.js";
32
32
  import * as P from "three";
33
- import { PolylineMesh as A } from "../../Meshes/Polyline.js";
34
- import { AreaMesh as V } from "../../Meshes/Area.js";
33
+ import { PolylineMesh as T } from "../../Meshes/Polyline.js";
34
+ import { AreaMesh as A } from "../../Meshes/Area.js";
35
35
  import { PolygonEditor as B } from "./Editor.js";
36
36
  import { vector3ToArray as H } from "../../../shared-utils/three/vector3ToArray.js";
37
37
  const D = new P.Vector3();
38
38
  class X extends z {
39
- constructor(t, f) {
40
- super(t, f);
39
+ constructor(t, c) {
40
+ super(t, c);
41
41
  y(this, "type", "Polygon");
42
42
  y(this, "areaMesh");
43
- this.editor = new B(this), t && (this.areaMesh = new V(g(g({}, t.style), t)), this.add(this.areaMesh)), k("esc", () => {
43
+ this.editor = new B(this), t && (this.areaMesh = new A(u(u({}, t.style), t)), this.add(this.areaMesh)), k("esc", () => {
44
44
  this.stopCreating();
45
45
  });
46
46
  }
47
47
  get data() {
48
- return j(g({}, this.baseData), {
48
+ return V(u({}, this.baseData), {
49
49
  points: H(this.applyObjectMatrixWorld(this.areaMesh.points)),
50
50
  style: {
51
51
  color: this.areaMesh.color.getHex(),
@@ -63,48 +63,54 @@ class X extends z {
63
63
  (t = this.areaMesh) == null || t.unhighlight();
64
64
  }
65
65
  create(t) {
66
- return T(this, null, function* () {
66
+ return j(this, null, function* () {
67
67
  this.children.forEach((d) => {
68
68
  d.parent === this && this.remove(d);
69
69
  }), this.children.length = 0;
70
- const f = new V(t);
71
- this.areaMesh = f, this.add(this.areaMesh), yield I(this.areaMesh, this.pointSelector, t), this.editor.enable();
70
+ const c = new A(t);
71
+ this.areaMesh = c, this.add(this.areaMesh), yield I(this.areaMesh, this.pointSelector, t), this.editor.enable();
72
72
  });
73
73
  }
74
74
  }
75
75
  function I(o, e, t) {
76
- return new Promise((f, d) => {
76
+ return new Promise((c, d) => {
77
77
  var M;
78
78
  const n = o.parent;
79
79
  if (!n) {
80
80
  d(new Error("No container"));
81
81
  return;
82
82
  }
83
- const p = (M = t == null ? void 0 : t.limit) != null ? M : "none", h = new A({ dashed: !0, lineColor: o.lineColor, lineWidth: o.lineWidth });
84
- n == null || n.add(h);
85
- const l = new A({ dashed: !0, lineColor: o.lineColor, lineWidth: o.lineWidth });
83
+ const p = (M = t == null ? void 0 : t.limit) != null ? M : "none", r = new T({
84
+ dashed: !1,
85
+ lineColor: o.lineColor,
86
+ lineWidth: o.lineWidth,
87
+ occlusionMode: o.occlusionMode,
88
+ occlusionVisibility: o.occlusionVisibility
89
+ });
90
+ n == null || n.add(r);
91
+ const l = new T({ dashed: !0, lineColor: o.lineColor, lineWidth: o.lineWidth });
86
92
  n == null || n.add(l), e.enable();
87
93
  const s = [];
88
- let i, a, w = !1;
89
- const C = (r) => {
90
- const c = s.length === 0 ? r.point : i.clone();
91
- s.push(c), o.setPoints(s, { closed: !1 }), w && (b(), f());
92
- }, v = (r) => {
93
- if (!(s != null && s.length) || !r)
94
+ let i, a, g = !1;
95
+ const C = (h) => {
96
+ const f = s.length === 0 ? h.point : i.clone();
97
+ s.push(f), o.setPoints(s, { closed: !1 }), g && (v(), c());
98
+ }, b = (h) => {
99
+ if (!(s != null && s.length) || !h)
94
100
  return;
95
- const c = s.at(-1).clone();
96
- if (s.length < 3 && (p === "none" ? (i = r.point, h.setPoints([c, i])) : p === "xoz" ? (a = a != null ? a : new P.Plane().setFromNormalAndCoplanarPoint(new P.Vector3(0, 1, 0), s[0]), i = a.projectPoint(r.point, D), h.setPoints([c, i]), l.setPoints([i, r.point])) : p === "y" && (s.length === 1 ? (i = r.point, h.setPoints([c, i])) : (a = a != null ? a : new P.Plane().setFromCoplanarPoints(s[0], s[1], new P.Vector3(0, 1, 0).add(s[0])), i = a.projectPoint(r.point, D), h.setPoints([c, i]), l.setPoints([i, r.point])))), s.length >= 3) {
97
- i = o.projectPoint(r.point);
101
+ const f = s.at(-1).clone();
102
+ if (s.length < 3 && (p === "none" ? (i = h.point, r.setPoints([f, i])) : p === "xoz" ? (a = a != null ? a : new P.Plane().setFromNormalAndCoplanarPoint(new P.Vector3(0, 1, 0), s[0]), e.plane = a, i = a.projectPoint(h.point, D), r.setPoints([f, i]), l.setPoints([i, h.point])) : p === "y" && (s.length === 1 ? (i = h.point, r.setPoints([f, i])) : (a = a != null ? a : new P.Plane().setFromCoplanarPoints(s[0], s[1], new P.Vector3(0, 1, 0).add(s[0])), e.plane = a, i = a.projectPoint(h.point, D), r.setPoints([f, i]), l.setPoints([i, h.point])))), s.length >= 3) {
103
+ i = o.projectPoint(h.point);
98
104
  const m = s[0], W = 0.2;
99
- m.distanceTo(i) < W || m.distanceTo(r.point) < W ? (i = m, r.point.copy(m), e.pointSelectorHelper.updateWithIntersect(r, { emitEvent: !1 }), w = !0) : w = !1, h.setPoints([c, i]), l.setPoints([i, r.point]);
105
+ m.distanceTo(i) < W || m.distanceTo(h.point) < W ? (i = m, h.point.copy(m), e.pointSelectorHelper.updateWithIntersect(h, { emitEvent: !1 }), g = !0) : g = !1, r.setPoints([f, i]), l.setPoints([i, h.point]);
100
106
  }
101
107
  s.length >= 2 && o.setPoints([...s, i], { closed: !1 });
102
- }, b = () => {
103
- e.off("select", C), e.off("intersectionUpdate", v), e.off("disable", E), e.disable(), n == null || n.remove(h, l);
108
+ }, v = () => {
109
+ e.off("select", C), e.off("intersectionUpdate", b), e.off("disable", E), e.plane = null, e.disable(), n == null || n.remove(r, l);
104
110
  }, E = () => {
105
- b(), n == null || n.remove(o, l, h), d(new Error("Cancelled"));
111
+ v(), n == null || n.remove(o, l, r), d(new Error("Cancelled"));
106
112
  };
107
- e.on("select", C), e.on("intersectionUpdate", v), e.on("disable", E);
113
+ e.on("select", C), e.on("intersectionUpdate", b), e.on("disable", E);
108
114
  });
109
115
  }
110
116
  export {
@@ -4,13 +4,13 @@ var r = (o, i, t) => (p(o, typeof i != "symbol" ? i + "" : i, t), t);
4
4
  import { Sculpt as g } from "../../index.js";
5
5
  import { getIntersectByRaycaster as c } from "../../../shared-utils/five/getPosition.js";
6
6
  import { LineEditorAbstract as a } from "../Line/Editor.js";
7
- class d extends a {
7
+ class y extends a {
8
8
  constructor(t) {
9
9
  super(t);
10
10
  r(this, "onDrag", (t) => {
11
11
  if (!this.draggingPoints || this.draggingPoints.length === 0)
12
12
  return;
13
- const e = c(g.modules.five, t.raycaster, { virtualPoint: !0 });
13
+ const e = c(g.modules.five, t.raycaster);
14
14
  this.draggingPoints.forEach((s) => s.position.copy(e.point)), this.originObject.polyLineMesh.setPoints(this.pointMeshes.map((s) => s.position));
15
15
  });
16
16
  }
@@ -19,5 +19,5 @@ class d extends a {
19
19
  }
20
20
  }
21
21
  export {
22
- d as PolylineEditor
22
+ y as PolylineEditor
23
23
  };