@realsee/dnalogel 3.52.0 → 3.52.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,7 @@ export declare class LightTag {
35
35
  extraObjectsForIntersectCheck: THREE.Object3D[];
36
36
  /**
37
37
  * @description 模拟3D
38
- * @default true
38
+ * @default false
39
39
  */
40
40
  simulate3D: boolean;
41
41
  set needsRender(val: true);
@@ -14,10 +14,6 @@ export declare class RectangleMesh extends PolygonMesh {
14
14
  meshFont: THREE.Mesh<RectangleGeometry, THREE.MeshBasicMaterial>;
15
15
  meshBackground: THREE.Mesh<RectangleGeometry, THREE.MeshBasicMaterial>;
16
16
  get color(): THREE.Color;
17
- /**
18
- * @description: 构造矩形所需的三个点
19
- */
20
- get builtPoints(): THREE.Vector3[];
21
17
  constructor(params?: Partial<RectangleStyle & RectangleData>);
22
18
  setPoints(points: AnyPositions): void;
23
19
  }
@@ -1,6 +1,6 @@
1
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);
2
+ var c = (e, o, t) => o in e ? l(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
3
+ var i = (e, o, t) => (c(e, typeof o != "symbol" ? o + "" : o, t), t);
4
4
  import { anyPositionToVector3 as a } from "../../shared-utils/positionToVector3.js";
5
5
  import "../../shared-utils/tag.js";
6
6
  import "three";
@@ -13,7 +13,7 @@ import "../../shared-utils/three/core/Sphere.js";
13
13
  import "animejs";
14
14
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
15
15
  import { PolygonMesh as g } from "./Polygon.js";
16
- import { RectangleGeometry as u } from "../utils/three/RectangleGeometry.js";
16
+ import { RectangleGeometry as d } from "../utils/three/RectangleGeometry.js";
17
17
  class G extends g {
18
18
  constructor(t) {
19
19
  super(t);
@@ -22,24 +22,17 @@ class G extends g {
22
22
  get color() {
23
23
  return this.meshFont.material.color;
24
24
  }
25
- /**
26
- * @description: 构造矩形所需的三个点
27
- */
28
- get builtPoints() {
29
- var t, o;
30
- return (o = (t = this.meshFont) == null ? void 0 : t.geometry) == null ? void 0 : o.points.slice(0, 3);
31
- }
32
25
  setPoints(t) {
33
- const o = t.map(a).filter(h);
34
- if (o.length < 3) {
26
+ const r = t.map(a).filter(h);
27
+ if (r.length < 3) {
35
28
  console.error("Invalid position");
36
29
  return;
37
30
  }
38
31
  if (t.length === 3) {
39
- const [n, s, m] = o, p = n.clone().add(m).sub(s);
40
- o.push(p);
32
+ const [n, s, m] = r, p = n.clone().add(m).sub(s);
33
+ r.push(p);
41
34
  }
42
- this.points = o, this.geometry = new u(o), this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0;
35
+ this.points = r, this.geometry = new d(r), this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0;
43
36
  }
44
37
  }
45
38
  export {
@@ -102,7 +102,6 @@ Config extends BaseObjectConfig = BaseObjectConfig> extends IObject3D {
102
102
  * @description 显示删除按钮
103
103
  */
104
104
  showDeleteButton(clientX: number, clientY: number): void;
105
- protected applyObjectMatrixWorld<P extends THREE.Vector3 | THREE.Vector3[]>(point: P): P;
106
- protected applyObjectQuaternion<P extends THREE.Vector3 | THREE.Vector3[]>(point: P): P;
105
+ protected applyObjectMatrixWorld<P extends THREE.Vector3 | THREE.Vector3[]>(point: P, fromObject?: THREE.Object3D): P;
107
106
  abstract create(...args: any): Promise<void>;
108
107
  }
@@ -1,39 +1,39 @@
1
- var m = Object.defineProperty;
1
+ var p = Object.defineProperty;
2
2
  var d = Object.getOwnPropertySymbols;
3
- var a = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
4
- var l = (o, t, e) => t in o ? m(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e, u = (o, t) => {
3
+ var f = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable;
4
+ var l = (i, t, e) => t in i ? p(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, u = (i, t) => {
5
5
  for (var e in t || (t = {}))
6
- a.call(t, e) && l(o, e, t[e]);
6
+ f.call(t, e) && l(i, e, t[e]);
7
7
  if (d)
8
8
  for (var e of d(t))
9
- f.call(t, e) && l(o, e, t[e]);
10
- return o;
9
+ g.call(t, e) && l(i, e, t[e]);
10
+ return i;
11
11
  };
12
- var s = (o, t, e) => (l(o, typeof t != "symbol" ? t + "" : t, e), e);
12
+ var r = (i, t, e) => (l(i, typeof t != "symbol" ? t + "" : t, e), e);
13
13
  import { hotkeys as c } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
14
14
  import { Sculpt as n } from "../../index.js";
15
- import { IObject3D as g } from "../../../shared-utils/three/IObject3D.js";
15
+ import { IObject3D as a } from "../../../shared-utils/three/IObject3D.js";
16
16
  import { applyObjectMatrixWorld as b } from "../../../shared-utils/three/applyObjectMatrixWorld.js";
17
- import { removeAllTag as y } from "../../utils/removeAllTag.js";
18
- const p = /* @__PURE__ */ new Map();
19
- class O extends g {
20
- constructor(e, r) {
17
+ import { removeAllTag as v } from "../../utils/removeAllTag.js";
18
+ const m = /* @__PURE__ */ new Map();
19
+ class j extends a {
20
+ constructor(e, s) {
21
21
  super();
22
- s(this, "name", "Sculpt");
23
- s(this, "isSculptObject", !0);
24
- s(this, "draggable");
22
+ r(this, "name", "Sculpt");
23
+ r(this, "isSculptObject", !0);
24
+ r(this, "draggable");
25
25
  /**
26
26
  * @description 是否被选中
27
27
  */
28
- s(this, "selected");
28
+ r(this, "selected");
29
29
  /**
30
30
  * @description 配置
31
31
  */
32
- s(this, "config");
33
- s(this, "on", (e, r, i) => n.modules.fiveDomEvents.addEventListener(this, e, r, i));
34
- s(this, "off", (...e) => n.modules.fiveDomEvents.removeEventListener(this, ...e));
35
- e != null && e.id && (this.uuid = e.id), this.config = u({ 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", () => {
36
- y(this);
32
+ r(this, "config");
33
+ r(this, "on", (e, s, o) => n.modules.fiveDomEvents.addEventListener(this, e, s, o));
34
+ r(this, "off", (...e) => n.modules.fiveDomEvents.removeEventListener(this, ...e));
35
+ e != null && e.id && (this.uuid = e.id), this.config = u({ canEdit: !0, occlusionVisibility: !0, occlusionMode: "translucence" }, s), e != null && e.style && (e.style.occlusionVisibility = this.config.occlusionVisibility, e.style.occlusionMode = this.config.occlusionMode), this.addEventListener("removed", () => {
36
+ v(this);
37
37
  }), c("esc", () => {
38
38
  this.stopCreating();
39
39
  }), this.config.canEdit && (c("backspace, delete", () => {
@@ -42,11 +42,11 @@ class O extends g {
42
42
  var h;
43
43
  if (this.pointSelector.enabled)
44
44
  return;
45
- let i = p.get(this.parent.uuid);
46
- i && (i.selected = !1, i.unhighlight(), (h = i._editor) == null || h.disable()), p.set(this.parent.uuid, this), this.selected = !0, this.highlight();
45
+ let o = m.get(this.parent.uuid);
46
+ o && (o.selected = !1, o.unhighlight(), (h = o._editor) == null || h.disable()), m.set(this.parent.uuid, this), this.selected = !0, this.highlight();
47
47
  }), c("esc", () => {
48
- var i;
49
- this.selected = !1, this.unhighlight(), !this.pointSelector.enabled && ((i = this._editor) == null || i.disable());
48
+ var o;
49
+ this.selected = !1, this.unhighlight(), !this.pointSelector.enabled && ((o = this._editor) == null || o.disable());
50
50
  }));
51
51
  }
52
52
  get editing() {
@@ -111,19 +111,15 @@ class O extends g {
111
111
  /**
112
112
  * @description 显示删除按钮
113
113
  */
114
- showDeleteButton(e, r) {
115
- n.modules.cursor.showDeleteButton({ clientX: e, clientY: r, container: document.body, onClick: () => this.delete() }), n.modules.five.once("cameraUpdate", () => {
114
+ showDeleteButton(e, s) {
115
+ n.modules.cursor.showDeleteButton({ clientX: e, clientY: s, container: document.body, onClick: () => this.delete() }), n.modules.five.once("cameraUpdate", () => {
116
116
  n.modules.cursor.removeDeleteButton();
117
117
  });
118
118
  }
119
- applyObjectMatrixWorld(e) {
120
- return this.updateMatrixWorld(), b(this, e);
121
- }
122
- applyObjectQuaternion(e) {
123
- const r = this.quaternion.clone();
124
- return Array.isArray(e) ? e.map((i) => i.clone().applyQuaternion(r)) : e.clone().applyQuaternion(r);
119
+ applyObjectMatrixWorld(e, s) {
120
+ return s.updateMatrixWorld(), b(s, e);
125
121
  }
126
122
  }
127
123
  export {
128
- O as BaseObject
124
+ j as BaseObject
129
125
  };
@@ -51,8 +51,8 @@ class S extends _ {
51
51
  }
52
52
  get data() {
53
53
  return E(m({}, this.baseData), {
54
- points: B(this.applyObjectMatrixWorld(this.boxMesh.bottomPositions)),
55
- heightPoint: B(this.applyObjectMatrixWorld(this.boxMesh.topPosition)),
54
+ points: B(this.applyObjectMatrixWorld(this.boxMesh.bottomPositions, this.boxMesh)),
55
+ heightPoint: B(this.applyObjectMatrixWorld(this.boxMesh.topPosition, this.boxMesh)),
56
56
  style: {
57
57
  color: this.boxMesh.color.getHex(),
58
58
  opacity: this.boxMesh.opacity,
@@ -85,27 +85,27 @@ function z(e, o, t) {
85
85
  }
86
86
  const h = new k(e.style);
87
87
  i.add(h), yield T(h, o, t), i.remove(h), e.setPoints({ points: h.points });
88
- const n = new U(), s = A(e.bottomPositions), r = q(...e.bottomPositions), p = r.clone().add(s.clone().multiplyScalar(10)), g = r.clone().sub(s.clone().multiplyScalar(10));
89
- n.setPoints([p, g]), i.add(n), o.enable();
90
- const x = (c) => {
91
- P(), a();
88
+ const n = new U(), s = A(e.bottomPositions), r = q(...e.bottomPositions), p = r.clone().add(s.clone().multiplyScalar(10)), x = r.clone().sub(s.clone().multiplyScalar(10));
89
+ n.setPoints([p, x]), i.add(n), o.enable();
90
+ const g = (c) => {
91
+ M(), a();
92
92
  }, y = (c) => {
93
93
  if (!(c != null && c.raycaster))
94
94
  return;
95
- const M = D({
95
+ const u = D({
96
96
  raycaster: c.raycaster,
97
- line: new j.Line3(p, g)
97
+ line: new j.Line3(p, x)
98
98
  });
99
- if (M) {
100
- const C = M.clone().sub(r);
99
+ if (u) {
100
+ const C = u.clone().sub(r);
101
101
  e.setPoints({ heightPoint: e.bottomPositions[0].clone().add(C) });
102
102
  }
103
+ }, M = () => {
104
+ o.off("select", g), o.off("intersectionUpdate", y), o.off("disable", P), o.disable(), i == null || i.remove(n);
103
105
  }, P = () => {
104
- o.off("select", x), o.off("intersectionUpdate", y), o.off("disable", u), o.disable(), i == null || i.remove(n);
105
- }, u = () => {
106
- P(), i == null || i.remove(e), l(new Error("Cancelled"));
106
+ M(), i == null || i.remove(e), l(new Error("Cancelled"));
107
107
  };
108
- o.on("select", x), o.on("intersectionUpdate", y), o.on("disable", u);
108
+ o.on("select", g), o.on("intersectionUpdate", y), o.on("disable", P);
109
109
  }));
110
110
  });
111
111
  }
@@ -1,53 +1,53 @@
1
1
  var C = Object.defineProperty, x = Object.defineProperties;
2
2
  var _ = Object.getOwnPropertyDescriptors;
3
3
  var M = Object.getOwnPropertySymbols;
4
- var O = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable;
5
- var m = (t, r, e) => r in t ? C(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e, d = (t, r) => {
6
- for (var e in r || (r = {}))
7
- O.call(r, e) && m(t, e, r[e]);
4
+ var T = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
5
+ var m = (r, i, e) => i in r ? C(r, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[i] = e, d = (r, i) => {
6
+ for (var e in i || (i = {}))
7
+ T.call(i, e) && m(r, e, i[e]);
8
8
  if (M)
9
- for (var e of M(r))
10
- T.call(r, e) && m(t, e, r[e]);
11
- return t;
12
- }, g = (t, r) => x(t, _(r));
13
- var f = (t, r, e) => (m(t, typeof r != "symbol" ? r + "" : r, e), e);
14
- var w = (t, r, e) => new Promise((o, i) => {
9
+ for (var e of M(i))
10
+ A.call(i, e) && m(r, e, i[e]);
11
+ return r;
12
+ }, g = (r, i) => x(r, _(i));
13
+ var f = (r, i, e) => (m(r, typeof i != "symbol" ? i + "" : i, e), e);
14
+ var w = (r, i, e) => new Promise((c, t) => {
15
15
  var a = (n) => {
16
16
  try {
17
- c(e.next(n));
17
+ o(e.next(n));
18
18
  } catch (h) {
19
- i(h);
19
+ t(h);
20
20
  }
21
21
  }, s = (n) => {
22
22
  try {
23
- c(e.throw(n));
23
+ o(e.throw(n));
24
24
  } catch (h) {
25
- i(h);
25
+ t(h);
26
26
  }
27
- }, c = (n) => n.done ? o(n.value) : Promise.resolve(n.value).then(a, s);
28
- c((e = e.apply(t, r)).next());
27
+ }, o = (n) => n.done ? c(n.value) : Promise.resolve(n.value).then(a, s);
28
+ o((e = e.apply(r, i)).next());
29
29
  });
30
- import { BaseObject as j } from "../Base/index.js";
30
+ import { BaseObject as H } from "../Base/index.js";
31
31
  import * as y from "three";
32
- import { PolylineMesh as A } from "../../Meshes/Polyline.js";
33
- import { CircleMeshEditor as H } from "../../Editors/CircleMeshEditor.js";
34
- import { CircleWithEdgeMesh as b } from "../../Meshes/CircleWithEdge.js";
35
- import { vector3ToArray as E } from "../../../shared-utils/three/vector3ToArray.js";
36
- class Q extends j {
37
- constructor(e, o) {
38
- super(e, o);
32
+ import { PolylineMesh as N } from "../../Meshes/Polyline.js";
33
+ import { CircleMeshEditor as O } from "../../Editors/CircleMeshEditor.js";
34
+ import { CircleWithEdgeMesh as E } from "../../Meshes/CircleWithEdge.js";
35
+ import { vector3ToArray as b } from "../../../shared-utils/three/vector3ToArray.js";
36
+ class L extends H {
37
+ constructor(e, c) {
38
+ super(e, c);
39
39
  f(this, "type", "Circle");
40
40
  f(this, "circleMesh");
41
41
  f(this, "_editor");
42
- e && (this.circleMesh = new b(d(d({}, e.style), e)), this.add(this.circleMesh));
42
+ e && (this.circleMesh = new E(d(d({}, e.style), e)), this.add(this.circleMesh));
43
43
  }
44
44
  get editor() {
45
- return this._editor || (this._editor = new H(this.circleMesh)), this._editor;
45
+ return this._editor || (this._editor = new O(this.circleMesh)), this._editor;
46
46
  }
47
47
  get data() {
48
48
  return g(d({}, this.baseData), {
49
- center: E(this.applyObjectMatrixWorld(this.circleMesh.center)),
50
- normal: E(this.applyObjectQuaternion(this.circleMesh.normal)),
49
+ center: b(this.applyObjectMatrixWorld(this.circleMesh.center, this.circleMesh)),
50
+ normal: b(this.circleMesh.normal.clone().applyQuaternion(this.circleMesh.quaternion)),
51
51
  radius: this.circleMesh.radius,
52
52
  style: {
53
53
  color: this.circleMesh.color.getHex()
@@ -64,24 +64,24 @@ class Q extends j {
64
64
  }
65
65
  create(e) {
66
66
  return w(this, null, function* () {
67
- this.children.forEach((i) => {
68
- i.parent === this && this.remove(i);
67
+ this.children.forEach((t) => {
68
+ t.parent === this && this.remove(t);
69
69
  }), this.children.length = 0;
70
- const o = new b(e);
71
- this.circleMesh = o, this.add(this.circleMesh), yield N(this.circleMesh, this.pointSelector), this.config.canEdit && this.editor.enable();
70
+ const c = new E(e);
71
+ this.circleMesh = c, this.add(this.circleMesh), yield U(this.circleMesh, this.pointSelector), this.config.canEdit && this.editor.enable();
72
72
  });
73
73
  }
74
74
  }
75
- function N(t, r) {
76
- return new Promise((e, o) => {
77
- const i = t.parent;
78
- if (!i) {
79
- o(new Error("No container"));
75
+ function U(r, i) {
76
+ return new Promise((e, c) => {
77
+ const t = r.parent;
78
+ if (!t) {
79
+ c(new Error("No container"));
80
80
  return;
81
81
  }
82
- const a = new A({ dashed: !0 });
83
- i.add(a), r.enable();
84
- let s, c;
82
+ const a = new N({ dashed: !0 });
83
+ t.add(a), i.enable();
84
+ let s, o;
85
85
  const n = (l) => {
86
86
  if (l) {
87
87
  if (!s) {
@@ -91,25 +91,25 @@ function N(t, r) {
91
91
  };
92
92
  return;
93
93
  }
94
- s && c && (p(), e());
94
+ s && o && (p(), e());
95
95
  }
96
96
  }, h = (l) => {
97
97
  if (!l || !s)
98
98
  return;
99
99
  const P = new y.Plane().setFromNormalAndCoplanarPoint(s.normal, s.point);
100
- if (c = l.raycaster.ray.intersectPlane(P, new y.Vector3()), c) {
101
- const v = s.point.distanceTo(c);
102
- t.setPoints({ center: s.point, normal: s.normal, radius: v });
100
+ if (o = l.raycaster.ray.intersectPlane(P, new y.Vector3()), o) {
101
+ const v = s.point.distanceTo(o);
102
+ r.setPoints({ center: s.point, normal: s.normal, radius: v });
103
103
  }
104
104
  }, p = () => {
105
- r.off("select", n), r.off("intersectionUpdate", h), r.off("disable", u), r.disable(), i == null || i.remove(a);
105
+ i.off("select", n), i.off("intersectionUpdate", h), i.off("disable", u), i.disable(), t == null || t.remove(a);
106
106
  }, u = () => {
107
- p(), i == null || i.remove(t, a), o(new Error("Cancelled"));
107
+ p(), t == null || t.remove(r, a), c(new Error("Cancelled"));
108
108
  };
109
- r.on("select", n), r.on("intersectionUpdate", h), r.on("disable", u);
109
+ i.on("select", n), i.on("intersectionUpdate", h), i.on("disable", u);
110
110
  });
111
111
  }
112
112
  export {
113
- Q as Circle,
114
- N as createCircle
113
+ L as Circle,
114
+ U as createCircle
115
115
  };
@@ -1,31 +1,31 @@
1
1
  var L = Object.defineProperty, j = Object.defineProperties;
2
2
  var _ = Object.getOwnPropertyDescriptors;
3
- var P = Object.getOwnPropertySymbols;
3
+ var w = Object.getOwnPropertySymbols;
4
4
  var T = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
5
- var y = (n, t, e) => t in n ? L(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, d = (n, t) => {
5
+ var p = (n, t, e) => t in n ? L(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, d = (n, t) => {
6
6
  for (var e in t || (t = {}))
7
- T.call(t, e) && y(n, e, t[e]);
8
- if (P)
9
- for (var e of P(t))
10
- A.call(t, e) && y(n, e, t[e]);
7
+ T.call(t, e) && p(n, e, t[e]);
8
+ if (w)
9
+ for (var e of w(t))
10
+ A.call(t, e) && p(n, e, t[e]);
11
11
  return n;
12
- }, M = (n, t) => j(n, _(t));
13
- var m = (n, t, e) => (y(n, typeof t != "symbol" ? t + "" : t, e), e);
14
- var f = (n, t, e) => new Promise((r, s) => {
15
- var c = (o) => {
12
+ }, P = (n, t) => j(n, _(t));
13
+ var m = (n, t, e) => (p(n, typeof t != "symbol" ? t + "" : t, e), e);
14
+ var f = (n, t, e) => new Promise((i, s) => {
15
+ var c = (r) => {
16
16
  try {
17
- i(e.next(o));
18
- } catch (a) {
19
- s(a);
17
+ o(e.next(r));
18
+ } catch (l) {
19
+ s(l);
20
20
  }
21
- }, h = (o) => {
21
+ }, h = (r) => {
22
22
  try {
23
- i(e.throw(o));
24
- } catch (a) {
25
- s(a);
23
+ o(e.throw(r));
24
+ } catch (l) {
25
+ s(l);
26
26
  }
27
- }, i = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(c, h);
28
- i((e = e.apply(n, t)).next());
27
+ }, o = (r) => r.done ? i(r.value) : Promise.resolve(r.value).then(c, h);
28
+ o((e = e.apply(n, t)).next());
29
29
  });
30
30
  import { CylinderMesh as E } from "../../Meshes/Cylinder.js";
31
31
  import { LineMesh as U } from "../../Meshes/Line.js";
@@ -36,8 +36,8 @@ import * as b from "three";
36
36
  import { vector3ToArray as O } from "../../../shared-utils/three/vector3ToArray.js";
37
37
  import { CylinderMeshEditor as D } from "../../Editors/CylinderMeshEditor.js";
38
38
  class Q extends z {
39
- constructor(e, r) {
40
- super(e, r);
39
+ constructor(e, i) {
40
+ super(e, i);
41
41
  m(this, "type", "Cylinder");
42
42
  m(this, "cylinderMesh");
43
43
  m(this, "_editor");
@@ -47,9 +47,9 @@ class Q extends z {
47
47
  return this._editor || (this._editor = new D(this.cylinderMesh)), this._editor;
48
48
  }
49
49
  get data() {
50
- return M(d({}, this.baseData), {
51
- bottomCenter: O(this.applyObjectMatrixWorld(this.cylinderMesh.bottomCenter)),
52
- topCenter: O(this.applyObjectMatrixWorld(this.cylinderMesh.topCenter)),
50
+ return P(d({}, this.baseData), {
51
+ bottomCenter: O(this.applyObjectMatrixWorld(this.cylinderMesh.bottomCenter, this.cylinderMesh)),
52
+ topCenter: O(this.applyObjectMatrixWorld(this.cylinderMesh.topCenter, this.cylinderMesh)),
53
53
  radius: this.cylinderMesh.radius,
54
54
  style: {
55
55
  color: this.cylinderMesh.color.getHex()
@@ -74,26 +74,26 @@ function F(n, t) {
74
74
  return f(this, null, function* () {
75
75
  const e = n.parent;
76
76
  yield B(n.bottomCircle, t);
77
- const r = new U();
78
- r.name = "LineHelper", e.add(r);
79
- const s = t.position.point, c = n.normal.clone().normalize(), h = s.clone().add(c.clone().multiplyScalar(10)), i = s.clone().sub(c.clone().multiplyScalar(10));
80
- return r.setPoints([h, i]), t.enable(), new Promise((o, a) => {
81
- const C = (l) => {
82
- g(), o();
83
- }, u = (l) => {
84
- if (!(l != null && l.raycaster))
77
+ const i = new U();
78
+ i.name = "LineHelper", e.add(i);
79
+ const s = t.position.point, c = n.normal.clone().normalize(), h = s.clone().add(c.clone().multiplyScalar(10)), o = s.clone().sub(c.clone().multiplyScalar(10));
80
+ return i.setPoints([h, o]), t.enable(), new Promise((r, l) => {
81
+ const C = (a) => {
82
+ M(), r();
83
+ }, u = (a) => {
84
+ if (!(a != null && a.raycaster))
85
85
  return;
86
- const p = W({
87
- raycaster: l.raycaster,
88
- line: new b.Line3(h, i)
89
- }), v = new b.Plane().setFromNormalAndCoplanarPoint(n.normal, n.bottomCenter).projectPoint(p, new b.Vector3()), x = p.clone().sub(v), H = n.bottomCenter.clone().add(x);
90
- p && n.setTopCenter(H);
86
+ const y = W({
87
+ raycaster: a.raycaster,
88
+ line: new b.Line3(h, o)
89
+ }), v = new b.Plane().setFromNormalAndCoplanarPoint(n.normal, n.bottomCenter).projectPoint(y, new b.Vector3()), x = y.clone().sub(v), H = n.bottomCenter.clone().add(x);
90
+ y && n.setTopCenter(H);
91
+ }, M = () => {
92
+ t.off("select", C), t.off("intersectionUpdate", u), t.off("disable", g), e.remove(i), t.disable();
91
93
  }, g = () => {
92
- t.off("select", C), t.off("intersectionUpdate", u), t.off("disable", w), e.remove(r), t.disable();
93
- }, w = () => {
94
- g(), e.remove(n), a(new Error("Cancelled"));
94
+ M(), e.remove(n), l(new Error("Cancelled"));
95
95
  };
96
- t.on("select", C), t.on("intersectionUpdate", u), t.on("disable", w);
96
+ t.on("select", C), t.on("intersectionUpdate", u), t.on("disable", g);
97
97
  });
98
98
  });
99
99
  }
@@ -2,16 +2,16 @@ var v = Object.defineProperty, L = Object.defineProperties;
2
2
  var O = Object.getOwnPropertyDescriptors;
3
3
  var u = Object.getOwnPropertySymbols;
4
4
  var W = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
5
- var d = (e, i, t) => i in e ? v(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, c = (e, i) => {
5
+ var d = (s, i, t) => i in s ? v(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t, c = (s, i) => {
6
6
  for (var t in i || (i = {}))
7
- W.call(i, t) && d(e, t, i[t]);
7
+ W.call(i, t) && d(s, t, i[t]);
8
8
  if (u)
9
9
  for (var t of u(i))
10
- _.call(i, t) && d(e, t, i[t]);
11
- return e;
12
- }, w = (e, i) => L(e, O(i));
13
- var p = (e, i, t) => (d(e, typeof i != "symbol" ? i + "" : i, t), t);
14
- var f = (e, i, t) => new Promise((s, r) => {
10
+ _.call(i, t) && d(s, t, i[t]);
11
+ return s;
12
+ }, w = (s, i) => L(s, O(i));
13
+ var p = (s, i, t) => (d(s, typeof i != "symbol" ? i + "" : i, t), t);
14
+ var f = (s, i, t) => new Promise((e, r) => {
15
15
  var m = (o) => {
16
16
  try {
17
17
  n(t.next(o));
@@ -24,8 +24,8 @@ var f = (e, i, t) => new Promise((s, r) => {
24
24
  } catch (h) {
25
25
  r(h);
26
26
  }
27
- }, n = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(m, l);
28
- n((t = t.apply(e, i)).next());
27
+ }, n = (o) => o.done ? e(o.value) : Promise.resolve(o.value).then(m, l);
28
+ n((t = t.apply(s, i)).next());
29
29
  });
30
30
  import { BaseObject as j } from "../Base/index.js";
31
31
  import * as C from "three";
@@ -38,8 +38,8 @@ import { getNormal as D } from "../../../shared-utils/three/getNormal.js";
38
38
  import { vector3ToArray as E } from "../../../shared-utils/three/vector3ToArray.js";
39
39
  import { AreaMesh as N } from "../../Meshes/Area.js";
40
40
  class X extends j {
41
- constructor(t, s) {
42
- super(t, s);
41
+ constructor(t, e) {
42
+ super(t, e);
43
43
  p(this, "type", "Prism");
44
44
  p(this, "prismMesh");
45
45
  p(this, "_editor");
@@ -50,8 +50,8 @@ class X extends j {
50
50
  }
51
51
  get data() {
52
52
  return w(c({}, this.baseData), {
53
- points: E(this.applyObjectMatrixWorld(this.prismMesh.bottomPositions)),
54
- heightPoint: E(this.applyObjectMatrixWorld(this.prismMesh.topPosition)),
53
+ points: E(this.applyObjectMatrixWorld(this.prismMesh.bottomPositions, this.prismMesh)),
54
+ heightPoint: E(this.applyObjectMatrixWorld(this.prismMesh.topPosition, this.prismMesh)),
55
55
  style: {
56
56
  color: this.prismMesh.color.getHex(),
57
57
  lineWidth: this.prismMesh.lineWidth,
@@ -73,16 +73,16 @@ class X extends j {
73
73
  });
74
74
  }
75
75
  }
76
- function R(e, i) {
76
+ function R(s, i) {
77
77
  return f(this, null, function* () {
78
- const t = e.parent, s = new N(e.style);
79
- t.add(s), yield A(s, i).finished, t.remove(s), e.setPoints({ points: s.points });
78
+ const t = s.parent, e = new N(s.style);
79
+ t.add(e), yield A(e, i).finished, t.remove(e), s.setPoints({ points: e.points });
80
80
  const r = new T();
81
81
  r.name = "LineHelper", t.add(r);
82
- const m = s.points.at(-1), l = D(s.points), n = m.clone().add(l.clone().multiplyScalar(10)), o = m.clone().sub(l.clone().multiplyScalar(10));
82
+ const m = e.points.at(-1), l = D(e.points), n = m.clone().add(l.clone().multiplyScalar(10)), o = m.clone().sub(l.clone().multiplyScalar(10));
83
83
  return r.setPoints([n, o]), i.enable(), new Promise((h, H) => {
84
84
  const P = (a) => {
85
- y(), h();
85
+ M(), h();
86
86
  }, g = (a) => {
87
87
  if (!(a != null && a.raycaster))
88
88
  return;
@@ -90,13 +90,13 @@ function R(e, i) {
90
90
  raycaster: a.raycaster,
91
91
  line: new C.Line3(n, o)
92
92
  });
93
- b && e.setPoints({ heightPoint: b });
94
- }, y = () => {
95
- i.off("select", P), i.off("intersectionUpdate", g), i.off("disable", M), t.remove(r), i.disable();
93
+ b && s.setPoints({ heightPoint: b });
96
94
  }, M = () => {
97
- y(), t.remove(e), H(new Error("Cancelled"));
95
+ i.off("select", P), i.off("intersectionUpdate", g), i.off("disable", y), t.remove(r), i.disable();
96
+ }, y = () => {
97
+ M(), t.remove(s), H(new Error("Cancelled"));
98
98
  };
99
- i.on("select", P), i.on("intersectionUpdate", g), i.on("disable", M);
99
+ i.on("select", P), i.on("intersectionUpdate", g), i.on("disable", y);
100
100
  });
101
101
  });
102
102
  }
@@ -1,7 +1,6 @@
1
1
  import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
2
2
  import type { PointSelector } from '../../../shared-utils/three/PointSelector';
3
3
  import { RectangleMeshEditor } from '../../Editors/RectangleMeshEditor';
4
- import type { ArrayPosition } from '../../../PanoTagPlugin';
5
4
  import type { RectangleData, RectangleMesh } from '../../Meshes/Rectangle';
6
5
  import { RectangleWithEdgeMesh, type RectangleWithEdgeMeshStyle } from '../../Meshes/RectangleWithEdge';
7
6
  import type { LiteralString } from '../../../typings/utils.type';
@@ -16,7 +15,7 @@ export declare class Rectangle extends BaseObject<RectangleImportData> {
16
15
  get editor(): RectangleMeshEditor;
17
16
  _editor: RectangleMeshEditor;
18
17
  get data(): {
19
- points: [ArrayPosition, ArrayPosition, ArrayPosition];
18
+ points: [number, number, number][];
20
19
  style: {
21
20
  color: number;
22
21
  opacity: number;