@realsee/dnalogel 3.50.0 → 3.50.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.
@@ -45,6 +45,7 @@ export declare class LineMesh extends IObject3D {
45
45
  private opacityBeforeHighlight;
46
46
  private paramsStyle;
47
47
  private lastRenderDomItem;
48
+ private _visible;
48
49
  constructor(params?: Partial<LineMeshStyle & LineData>);
49
50
  updateMatrixWorld(force?: boolean): void;
50
51
  setPoints(points: AnyPositions): void;
@@ -1,39 +1,39 @@
1
- var M = Object.defineProperty;
1
+ var T = Object.defineProperty;
2
2
  var L = Object.getOwnPropertySymbols;
3
- var E = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable;
4
- var y = (h, s, e) => s in h ? M(h, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[s] = e, m = (h, s) => {
5
- for (var e in s || (s = {}))
6
- E.call(s, e) && y(h, e, s[e]);
3
+ var k = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
4
+ var y = (r, o, e) => o in r ? T(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e, m = (r, o) => {
5
+ for (var e in o || (o = {}))
6
+ k.call(o, e) && y(r, e, o[e]);
7
7
  if (L)
8
- for (var e of L(s))
9
- T.call(s, e) && y(h, e, s[e]);
10
- return h;
8
+ for (var e of L(o))
9
+ w.call(o, e) && y(r, e, o[e]);
10
+ return r;
11
11
  };
12
- var r = (h, s, e) => (y(h, typeof s != "symbol" ? s + "" : s, e), e);
12
+ var h = (r, o, e) => (y(r, typeof o != "symbol" ? o + "" : o, e), e);
13
13
  import * as f from "three";
14
- import { DEFAULT_LINE_COLOR as p, DEFAULT_LINE_WIDTH as k, DEFAULT_HIGHLIGHT_OPACITY as b } from "../typings/style.js";
15
- import { LineMaterial as w, THREE_Line2 as I } from "../../shared-utils/five/FiveLine.js";
14
+ import { DEFAULT_LINE_COLOR as p, DEFAULT_LINE_WIDTH as I, DEFAULT_HIGHLIGHT_OPACITY as S } from "../typings/style.js";
15
+ import { LineMaterial as H, THREE_Line2 as v } from "../../shared-utils/five/FiveLine.js";
16
16
  import { LineGeometry as g } from "../../vendor/three/examples/jsm/lines/LineGeometry.js";
17
- import { anyPositionToVector3 as H } from "../../shared-utils/positionToVector3.js";
18
- import { IObject3D as C } from "../../shared-utils/three/IObject3D.js";
17
+ import { anyPositionToVector3 as C } from "../../shared-utils/positionToVector3.js";
18
+ import { IObject3D as R } from "../../shared-utils/three/IObject3D.js";
19
19
  import "hammerjs";
20
20
  import "three/examples/jsm/renderers/CSS3DRenderer";
21
- import { centerPoint as R } from "../../shared-utils/three/centerPoint.js";
22
- import { LightTag as x } from "../../shared-utils/tag.js";
23
- import { removeAllTag as W } from "../utils/removeAllTag.js";
24
- import { getLengthHTML as v } from "../utils/Meshes/getLengthHTML.js";
25
- import { applyObjectMatrixWorld as S } from "../../shared-utils/three/applyObjectMatrixWorld.js";
21
+ import { centerPoint as x } from "../../shared-utils/three/centerPoint.js";
22
+ import { LightTag as W } from "../../shared-utils/tag.js";
23
+ import { removeAllTag as O } from "../utils/removeAllTag.js";
24
+ import { getLengthHTML as P } from "../utils/Meshes/getLengthHTML.js";
25
+ import { applyObjectMatrixWorld as _ } from "../../shared-utils/three/applyObjectMatrixWorld.js";
26
26
  import "../../shared-utils/three/core/Sphere.js";
27
27
  import "animejs";
28
28
  import { notNil as d } from "../../shared-utils/isNil.js";
29
29
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
30
- class _ extends w {
30
+ class D extends H {
31
31
  constructor(e) {
32
32
  var i, t;
33
33
  super(e);
34
- r(this, "_three_color");
35
- d(e == null ? void 0 : e.color) && (this.three_color = (i = e == null ? void 0 : e.color) != null ? i : 16777215), Object.keys(e).forEach((o) => {
36
- ["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(o) || o in this && (this[o] = e[o]);
34
+ h(this, "_three_color");
35
+ d(e == null ? void 0 : e.color) && (this.three_color = (i = e == null ? void 0 : e.color) != null ? i : 16777215), Object.keys(e).forEach((s) => {
36
+ ["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(s) || s in this && (this[s] = e[s]);
37
37
  }), this.setDashed((t = e == null ? void 0 : e.dashed) != null ? t : !1);
38
38
  }
39
39
  get three_color() {
@@ -46,34 +46,35 @@ class _ extends w {
46
46
  this.dashed = e, e ? this.defines.USE_DASH = "" : delete this.defines.USE_DASH, this.needsUpdate = !0;
47
47
  }
48
48
  }
49
- class D extends I {
49
+ class E extends v {
50
50
  constructor(e, i) {
51
51
  super(e, i);
52
- r(this, "name", "Line3");
52
+ h(this, "name", "Line3");
53
53
  }
54
54
  }
55
- class X extends C {
55
+ class ee extends R {
56
56
  constructor(e) {
57
57
  var l, c, a, u, n;
58
58
  super();
59
- r(this, "name", "LineMesh");
60
- r(this, "points");
61
- r(this, "doms", []);
62
- r(this, "highlighted", !1);
63
- r(this, "line");
64
- r(this, "backLine");
65
- r(this, "opacityBeforeHighlight");
66
- r(this, "paramsStyle", {});
67
- r(this, "lastRenderDomItem");
59
+ h(this, "name", "LineMesh");
60
+ h(this, "points");
61
+ h(this, "doms", []);
62
+ h(this, "highlighted", !1);
63
+ h(this, "line");
64
+ h(this, "backLine");
65
+ h(this, "opacityBeforeHighlight");
66
+ h(this, "paramsStyle", {});
67
+ h(this, "lastRenderDomItem");
68
+ h(this, "_visible", !0);
68
69
  this.paramsStyle = e != null ? e : {};
69
- const i = new g(), t = new _({
70
+ const i = new g(), t = new D({
70
71
  color: new f.Color((l = e == null ? void 0 : e.lineColor) != null ? l : p),
71
- linewidth: (c = e == null ? void 0 : e.lineWidth) != null ? c : k,
72
+ linewidth: (c = e == null ? void 0 : e.lineWidth) != null ? c : I,
72
73
  dashScale: 40,
73
74
  opacity: (a = e == null ? void 0 : e.opacity) != null ? a : 1,
74
75
  transparent: !0,
75
76
  dashed: (u = e == null ? void 0 : e.dashed) != null ? u : !1
76
- }), o = new _({
77
+ }), s = new D({
77
78
  color: new f.Color((n = e == null ? void 0 : e.lineColor) != null ? n : p),
78
79
  linewidth: t.linewidth * 0.9,
79
80
  dashScale: t.dashScale,
@@ -83,8 +84,13 @@ class X extends C {
83
84
  transparent: !0,
84
85
  resolution: t.resolution
85
86
  });
86
- this.line = new D(i, t), this.backLine = new D(i, o), this.line.renderOrder = 1, this.backLine.renderOrder = 0, this.line.name = "lineFrontMaterial", this.backLine.name = "lineBackMaterial", e && this.setStyle(e), e != null && e.points && this.setPoints(e.points), this.addEventListener("removed", () => {
87
- W(this);
87
+ this.line = new E(i, t), this.backLine = new E(i, s), this.line.renderOrder = 1, this.backLine.renderOrder = 0, this.line.name = "lineFrontMaterial", this.backLine.name = "lineBackMaterial", e && this.setStyle(e), e != null && e.points && this.setPoints(e.points), this.addEventListener("removed", () => {
88
+ O(this);
89
+ }), Object.defineProperty(this, "visible", {
90
+ set: (b) => {
91
+ this.doms && this.doms.forEach((M) => M.container.style.visibility = b ? "visible" : "hidden"), this._visible = b;
92
+ },
93
+ get: () => this._visible
88
94
  });
89
95
  }
90
96
  get style() {
@@ -128,34 +134,34 @@ class X extends C {
128
134
  updateMatrixWorld(e) {
129
135
  var i;
130
136
  if (super.updateMatrixWorld(e), this.points) {
131
- const t = (i = S(this, this.points)) == null ? void 0 : i.map((o) => o.toArray().join(",")).join(",");
137
+ const t = (i = _(this, this.points)) == null ? void 0 : i.map((s) => s.toArray().join(",")).join(",");
132
138
  t !== this.lastRenderDomItem && (this.updateDomItems(), this.lastRenderDomItem = t);
133
139
  }
134
140
  }
135
141
  setPoints(e) {
136
- const i = e.map(H).filter(d);
142
+ const i = e.map(C).filter(d);
137
143
  if (this.points = i, i.length < 2) {
138
144
  this.line.geometry = new g(), this.backLine.geometry = this.line.geometry, this.updateDomItems();
139
145
  return;
140
146
  }
141
147
  this.addIfNotExists(this.line, this.backLine);
142
- const t = i.flatMap((o) => [o.x, o.y, o.z]);
148
+ const t = i.flatMap((s) => [s.x, s.y, s.z]);
143
149
  t.length > 2 && (this.line.geometry.dispose(), this.line.geometry = new g(), this.backLine.geometry = this.line.geometry), this.line.geometry.setPositions(t), this.line.computeLineDistances(), this.updateDomItems(), this.needsRender = !0;
144
150
  }
145
151
  setResolution(e, i) {
146
152
  const t = this.line.material.resolution;
147
153
  (t.x !== e || t.y !== i) && (t.set(e, i), this.needsRender = !0);
148
- const o = this.backLine.material.resolution;
149
- (o.x !== e || o.y !== i) && (o.set(e, i), this.needsRender = !0);
154
+ const s = this.backLine.material.resolution;
155
+ (s.x !== e || s.y !== i) && (s.set(e, i), this.needsRender = !0);
150
156
  }
151
157
  setStyle(e) {
152
- var o, l, c;
158
+ var s, l, c;
153
159
  this.paramsStyle = m(m({}, this.paramsStyle), e), d(e.lineColor) && (this.line.material.three_color = new f.Color(e.lineColor), this.backLine.material.three_color = new f.Color(e.lineColor)), d(e.lineWidth) && (this.line.material.linewidth = e.lineWidth), d(e.dashed) && this.line.material.setDashed(e.dashed), d(e.opacity) && (this.line.material.opacity = e.opacity, this.backLine.material.opacity = this.line.material.opacity * 0.7), this.updateDomItems();
154
- const i = (o = e.occlusionVisibility) != null ? o : this.paramsStyle.occlusionVisibility, t = (c = (l = e.occlusionMode) != null ? l : this.paramsStyle.occlusionMode) != null ? c : "translucence";
160
+ const i = (s = e.occlusionVisibility) != null ? s : this.paramsStyle.occlusionVisibility, t = (c = (l = e.occlusionMode) != null ? l : this.paramsStyle.occlusionMode) != null ? c : "translucence";
155
161
  i ? t === "depthTest" ? (this.line.material.depthTest = !1, this.backLine.visible = !1) : t === "translucence" && (this.line.material.depthTest = !0, this.backLine.visible = !0, this.line.material.opacity === 1 ? this.backLine.material.setDashed(!0) : this.backLine.material.setDashed(this.line.material.dashed)) : (this.line.material.depthTest = !0, this.backLine.visible = !1), this.needsRender = !0;
156
162
  }
157
163
  highlight() {
158
- this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.line.material.opacity, this.line.material.opacity = this.opacityBeforeHighlight * b, this.backLine.material.opacity = this.backLine.material.opacity * b, this.needsRender = !0);
164
+ this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.line.material.opacity, this.line.material.opacity = this.opacityBeforeHighlight * S, this.backLine.material.opacity = this.backLine.material.opacity * S, this.needsRender = !0);
159
165
  }
160
166
  unhighlight() {
161
167
  this.highlighted && (this.highlighted = !1, this.line.material.opacity = this.opacityBeforeHighlight, this.backLine.material.opacity = 0.2, this.needsRender = !0);
@@ -168,29 +174,29 @@ class X extends C {
168
174
  return e();
169
175
  if (!this.five)
170
176
  return console.error("Five not found");
171
- const i = this.points.map((t, o) => {
172
- if (o !== 0)
173
- return [this.points[o - 1], t];
174
- }).filter(d).map((t) => S(this, t));
175
- i.forEach(([t, o], l) => {
177
+ const i = this.points.map((t, s) => {
178
+ if (s !== 0)
179
+ return [this.points[s - 1], t];
180
+ }).filter(d).map((t) => _(this, t));
181
+ i.forEach(([t, s], l) => {
176
182
  var u;
177
- const c = R(t, o);
183
+ const c = x(t, s);
178
184
  this.doms[l] = (u = this.doms[l]) != null ? u : (() => {
179
- const n = new x(this.five);
185
+ const n = new W(this.five);
180
186
  return n.intersectCheck = !1, n.simulate3D = !0, n;
181
- })(), this.doms[l].setPosition(c, [t, o]);
187
+ })(), this.doms[l].setPosition(c, [t, s]);
182
188
  const a = (n) => {
183
- this.doms[l].__text !== n && (this.doms[l].__text = n, n ? this.doms[l].container.innerHTML = v(n) : this.doms[l].container.innerHTML = "");
189
+ this.doms[l].__text !== n && (this.doms[l].__text = n, n ? this.doms[l].container.innerHTML = P(n) : this.doms[l].container.innerHTML = "");
184
190
  };
185
191
  if (this.paramsStyle.tip)
186
192
  a(this.paramsStyle.tip);
187
193
  else {
188
- const n = t.distanceTo(o).toFixed(2);
194
+ const n = t.distanceTo(s).toFixed(2);
189
195
  a(n === "0.00" ? null : n + "m");
190
196
  }
191
197
  }), this.doms.length > i.length && (this.doms.slice(i.length).forEach((t) => t.destroy()), this.doms.length = i.length);
192
198
  }
193
199
  }
194
200
  export {
195
- X as LineMesh
201
+ ee as LineMesh
196
202
  };
@@ -19,6 +19,7 @@ export declare class PointMesh extends IObject3D {
19
19
  private backgroundMesh;
20
20
  private lastRenderDomItem;
21
21
  private paramsStyle;
22
+ private _visible;
22
23
  private get five();
23
24
  constructor(params?: Partial<PointStyle & PointData>);
24
25
  setStyle(params: Partial<PointStyle>): void;
@@ -1,22 +1,22 @@
1
- var b = Object.defineProperty, k = Object.defineProperties;
1
+ var N = Object.defineProperty, k = Object.defineProperties;
2
2
  var D = Object.getOwnPropertyDescriptors;
3
- var l = Object.getOwnPropertySymbols;
4
- var V = Object.prototype.hasOwnProperty, C = Object.prototype.propertyIsEnumerable;
5
- var u = (e, i, t) => i in e ? b(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, f = (e, i) => {
3
+ var A = Object.getOwnPropertySymbols;
4
+ var v = Object.prototype.hasOwnProperty, V = Object.prototype.propertyIsEnumerable;
5
+ var u = (e, i, t) => i in e ? N(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, f = (e, i) => {
6
6
  for (var t in i || (i = {}))
7
- V.call(i, t) && u(e, t, i[t]);
8
- if (l)
9
- for (var t of l(i))
10
- C.call(i, t) && u(e, t, i[t]);
7
+ v.call(i, t) && u(e, t, i[t]);
8
+ if (A)
9
+ for (var t of A(i))
10
+ V.call(i, t) && u(e, t, i[t]);
11
11
  return e;
12
12
  }, g = (e, i) => k(e, D(i));
13
- var v = (e, i) => {
13
+ var C = (e, i) => {
14
14
  var t = {};
15
15
  for (var o in e)
16
- V.call(e, o) && i.indexOf(o) < 0 && (t[o] = e[o]);
17
- if (e != null && l)
18
- for (var o of l(e))
19
- i.indexOf(o) < 0 && C.call(e, o) && (t[o] = e[o]);
16
+ v.call(e, o) && i.indexOf(o) < 0 && (t[o] = e[o]);
17
+ if (e != null && A)
18
+ for (var o of A(e))
19
+ i.indexOf(o) < 0 && V.call(e, o) && (t[o] = e[o]);
20
20
  return t;
21
21
  };
22
22
  var s = (e, i, t) => (u(e, typeof i != "symbol" ? i + "" : i, t), t);
@@ -30,15 +30,15 @@ import "@realsee/five/line";
30
30
  import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
31
31
  import { LightTag as W } from "../../shared-utils/tag.js";
32
32
  import { removeAllTag as x } from "../utils/removeAllTag.js";
33
- import { getLengthHTML as y } from "../utils/Meshes/getLengthHTML.js";
34
- import { applyObjectMatrixWorld as S } from "../../shared-utils/three/applyObjectMatrixWorld.js";
33
+ import { getLengthHTML as S } from "../utils/Meshes/getLengthHTML.js";
34
+ import { applyObjectMatrixWorld as F } from "../../shared-utils/three/applyObjectMatrixWorld.js";
35
35
  import "../../shared-utils/three/core/Sphere.js";
36
36
  import "animejs";
37
37
  import { notNil as a } from "../../shared-utils/isNil.js";
38
38
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
39
- const F = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==";
40
- let N = null;
41
- class _ extends B {
39
+ const H = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==";
40
+ let P = null;
41
+ class $ extends B {
42
42
  constructor(t) {
43
43
  var w, p;
44
44
  super();
@@ -50,7 +50,8 @@ class _ extends B {
50
50
  s(this, "backgroundMesh");
51
51
  s(this, "lastRenderDomItem");
52
52
  s(this, "paramsStyle");
53
- const M = t != null ? t : {}, { point: o } = M, h = v(M, ["point"]);
53
+ s(this, "_visible", !0);
54
+ const M = t != null ? t : {}, { point: o } = M, h = C(M, ["point"]);
54
55
  this.paramsStyle = h != null ? h : {};
55
56
  const d = new r.BufferGeometry();
56
57
  d.setAttribute("position", new r.Float32BufferAttribute([0, 0, 0], 3));
@@ -58,21 +59,26 @@ class _ extends B {
58
59
  transparent: !0,
59
60
  side: r.DoubleSide,
60
61
  size: (w = t == null ? void 0 : t.size) != null ? w : 8,
61
- map: N || (N = new r.TextureLoader().load(F)),
62
+ map: P || (P = new r.TextureLoader().load(H)),
62
63
  sizeAttenuation: !1
63
64
  }, c = new r.PointsMaterial(g(f({}, m), {
64
65
  color: (p = t == null ? void 0 : t.color) != null ? p : 16777215,
65
66
  depthTest: !0,
66
67
  opacity: 1
67
- })), P = new r.PointsMaterial(g(f({}, m), {
68
+ })), y = new r.PointsMaterial(g(f({}, m), {
68
69
  size: c.size,
69
70
  color: c.color,
70
71
  depthWrite: !1,
71
72
  depthTest: !1,
72
73
  opacity: 0.5
73
- })), A = new r.Points(d, c), n = new r.Points(d, P);
74
- this.fontMesh = A, this.backgroundMesh = n, A.name = "FontMesh", n.name = "BackgroundMesh", A.renderOrder = 10, n.renderOrder = 0, this.add(A, n), t != null && t.point && this.position.copy(E(t.point)), t && this.setStyle(t), this.addEventListener("removed", () => {
74
+ })), n = new r.Points(d, c), l = new r.Points(d, y);
75
+ this.fontMesh = n, this.backgroundMesh = l, n.name = "FontMesh", l.name = "BackgroundMesh", n.renderOrder = 10, l.renderOrder = 0, this.add(n, l), t != null && t.point && this.position.copy(E(t.point)), t && this.setStyle(t), this.addEventListener("removed", () => {
75
76
  x(this);
77
+ }), Object.defineProperty(this, "visible", {
78
+ set: (b) => {
79
+ this.dom && (this.dom.container.style.visibility = b ? "visible" : "hidden"), this._visible = b;
80
+ },
81
+ get: () => this._visible
76
82
  });
77
83
  }
78
84
  get color() {
@@ -96,18 +102,18 @@ class _ extends B {
96
102
  }
97
103
  updateMatrixWorld(t) {
98
104
  super.updateMatrixWorld(t);
99
- const o = S(this, this.position).toArray().join(",");
105
+ const o = F(this, this.position).toArray().join(",");
100
106
  o !== this.lastRenderDomItem && (this.updateDom(), this.lastRenderDomItem = o);
101
107
  }
102
108
  updateDom() {
103
109
  const t = this.paramsStyle.tip;
104
- t && !this.dom && (this.dom = new W(this.five), this.dom.intersectCheck = !1, this.dom.simulate3D = !0);
110
+ t && !this.dom && (this.dom = new W(this.five), this.dom.intersectCheck = !1, this.dom.simulate3D = !0, this.dom.container.style.visibility = "hidden");
105
111
  const o = (h) => {
106
- this.dom && this.dom.__text !== h && (this.dom.__text = h, h ? this.dom.container.innerHTML = y(h) : this.dom.container.innerHTML = "");
112
+ this.dom && this.dom.__text !== h && (this.dom.__text = h, h ? this.dom.container.innerHTML = S(h) : this.dom.container.innerHTML = "");
107
113
  };
108
114
  t ? (o(t), this.dom.setPosition(this.position.clone())) : o(null);
109
115
  }
110
116
  }
111
117
  export {
112
- _ as PointMesh
118
+ $ as PointMesh
113
119
  };
@@ -1,17 +1,17 @@
1
- var k = Object.defineProperty, z = Object.defineProperties;
2
- var B = Object.getOwnPropertyDescriptors;
3
- var U = Object.getOwnPropertySymbols;
4
- var F = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
5
- var L = (n, t, e) => t in n ? k(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, f = (n, t) => {
1
+ var D = Object.defineProperty, k = Object.defineProperties;
2
+ var z = Object.getOwnPropertyDescriptors;
3
+ var R = Object.getOwnPropertySymbols;
4
+ var B = Object.prototype.hasOwnProperty, F = Object.prototype.propertyIsEnumerable;
5
+ var j = (n, t, e) => t in n ? D(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, f = (n, t) => {
6
6
  for (var e in t || (t = {}))
7
- F.call(t, e) && L(n, e, t[e]);
8
- if (U)
9
- for (var e of U(t))
10
- I.call(t, e) && L(n, e, t[e]);
7
+ B.call(t, e) && j(n, e, t[e]);
8
+ if (R)
9
+ for (var e of R(t))
10
+ F.call(t, e) && j(n, e, t[e]);
11
11
  return n;
12
- }, j = (n, t) => z(n, B(t));
13
- var w = (n, t, e) => (L(n, typeof t != "symbol" ? t + "" : t, e), e);
14
- var V = (n, t, e) => new Promise((s, p) => {
12
+ }, v = (n, t) => k(n, z(t));
13
+ var w = (n, t, e) => (j(n, typeof t != "symbol" ? t + "" : t, e), e);
14
+ var U = (n, t, e) => new Promise((s, p) => {
15
15
  var P = (o) => {
16
16
  try {
17
17
  c(e.next(o));
@@ -28,24 +28,23 @@ var V = (n, t, e) => new Promise((s, p) => {
28
28
  c((e = e.apply(n, t)).next());
29
29
  });
30
30
  import { LineMesh as H } from "../../Meshes/Line.js";
31
- import { BaseObject as N } from "../Base/index.js";
31
+ import { BaseObject as I } from "../Base/index.js";
32
32
  import * as a from "three";
33
- import { LineEditor as _ } from "./Editor.js";
33
+ import { LineEditor as N } from "./Editor.js";
34
34
  import { vector3ToArray as q } from "../../../shared-utils/three/vector3ToArray.js";
35
35
  import { LineWithDotsMesh as T } from "../../Meshes/LineWithDots.js";
36
36
  import { rayOnLine as G } from "../../utils/three/rayOnLine.js";
37
37
  import { withResolvers as J } from "../../../shared-utils/promise/withResolvers.js";
38
- const W = new a.Vector3();
39
- class ie extends N {
38
+ class ne extends I {
40
39
  constructor(e, s) {
41
40
  super(e, s);
42
41
  w(this, "type", "Line");
43
42
  w(this, "lineMesh");
44
43
  w(this, "creatingObject");
45
- e && (this.lineMesh = new T(f(f({}, e.style), e)), this.add(this.lineMesh)), this.editor = new _(this);
44
+ e && (this.lineMesh = new T(f(f({}, e.style), e)), this.add(this.lineMesh)), this.editor = new N(this);
46
45
  }
47
46
  get data() {
48
- return j(f({}, this.baseData), {
47
+ return v(f({}, this.baseData), {
49
48
  points: q(this.applyObjectMatrixWorld(this.lineMesh.points)),
50
49
  style: {
51
50
  lineColor: new a.Color(this.lineMesh.color).getHex(),
@@ -79,7 +78,7 @@ class ie extends N {
79
78
  (e = this.creatingObject) == null || e.redo();
80
79
  }
81
80
  create(e) {
82
- return V(this, null, function* () {
81
+ return U(this, null, function* () {
83
82
  this.removeChildren();
84
83
  const s = new T(e);
85
84
  this.lineMesh = s, this.add(this.lineMesh), this.creatingObject = K(s, this.pointSelector, e), yield this.creatingObject.finished, this.editor.enable();
@@ -87,53 +86,53 @@ class ie extends N {
87
86
  }
88
87
  }
89
88
  function K(n, t, e) {
90
- var R;
89
+ var C;
91
90
  const s = n.parent;
92
91
  if (!s)
93
92
  return;
94
- const { promise: p, resolve: P, reject: b } = J(), c = (R = e == null ? void 0 : e.limit) != null ? R : "none", o = new H(n.style);
93
+ const { promise: p, resolve: P, reject: b } = J(), c = (C = e == null ? void 0 : e.limit) != null ? C : "none", o = new H(n.style);
95
94
  s.add(o);
96
- const l = new H(j(f({}, n.style), { dashed: !0, lengthEnable: !1 }));
95
+ const l = new H(v(f({}, n.style), { dashed: !0, lengthEnable: !1 }));
97
96
  s.add(l), t.enable();
98
97
  const i = [];
99
- let h, d, v;
100
- const m = [], O = () => i.length > 0, M = () => m.length > 0, A = () => {
101
- O() && (m.push(i.pop()), n.setPoints(i), g(v), t.pointSelectorHelper.magnifier.render());
102
- }, D = () => {
103
- M() && (i.push(m.pop()), n.setPoints(i), g(v), t.pointSelectorHelper.magnifier.render());
98
+ let h, d, y;
99
+ const m = [], O = () => i.length > 0, M = () => m.length > 0, W = () => {
100
+ O() && (m.push(i.pop()), n.setPoints(i), g(y), t.pointSelectorHelper.magnifier.render());
101
+ }, A = () => {
102
+ M() && (i.push(m.pop()), n.setPoints(i), g(y), t.pointSelectorHelper.magnifier.render());
104
103
  }, E = (r) => {
105
104
  if (!r)
106
105
  return;
107
106
  m.length = 0;
108
107
  const u = i.length === 0 ? r.point : h.clone();
109
- i.push(u), n.setPoints(i), i.length === 2 && (x(), P());
108
+ i.push(u), n.setPoints(i), i.length === 2 && (V(), P());
110
109
  }, g = (r) => {
111
110
  const u = () => {
112
111
  o.setPoints([]), l.setPoints([]), t.pointSelectorHelper.magnifier.render();
113
112
  };
114
113
  if (!(i != null && i.length) || !r)
115
114
  return u();
116
- v = r;
117
- const y = i.at(-1).clone();
118
- c === "none" ? (h = r.point, o.setPoints([y, h])) : c === "xoz" ? (t.plane = d, d = d != null ? d : new a.Plane().setFromNormalAndCoplanarPoint(new a.Vector3(0, 1, 0), i[0]), h = d.projectPoint(r.point, W), o.setPoints([y, h]), l.setPoints([h, r.point])) : c === "y" && (r.isVirtual ? (h = G({
115
+ y = r;
116
+ const L = i.at(-1).clone();
117
+ c === "none" ? (h = r.point, o.setPoints([L, h])) : c === "xoz" ? (t.plane = d, d = d != null ? d : new a.Plane().setFromNormalAndCoplanarPoint(new a.Vector3(0, 1, 0), i[0]), h = d.projectPoint(r.point, new a.Vector3()), o.setPoints([L, h]), l.setPoints([h, r.point])) : c === "y" && (r.isVirtual ? (h = G({
119
118
  raycaster: r.raycaster,
120
119
  line: new a.Line3(i[0].clone(), new a.Vector3(0, 1, 0).add(i[0])),
121
120
  clampToLine: !1
122
- }), l.setPoints([])) : (h = new a.Line3(i[0].clone(), new a.Vector3(0, 1, 0).add(i[0])).closestPointToPoint(r.point, !1, W), l.setPoints([h, r.point])), o.setPoints([y, h]));
121
+ }), l.setPoints([])) : (h = new a.Line3(i[0].clone(), new a.Vector3(0, 1, 0).add(i[0])).closestPointToPoint(r.point, !1, new a.Vector3()), l.setPoints([h, r.point])), o.setPoints([L, h]));
122
+ }, V = () => {
123
+ t.off("select", E), t.off("intersectionUpdate", g), t.off("disable", x), t.plane = null, t.disable(), s == null || s.remove(o, l);
123
124
  }, x = () => {
124
- t.off("select", E), t.off("intersectionUpdate", g), t.off("disable", C), t.plane = null, t.disable(), s == null || s.remove(o, l);
125
- }, C = () => {
126
- x(), i.length !== 2 && (s == null || s.remove(n)), b(new Error("Cancelled"));
125
+ V(), i.length !== 2 && (s == null || s.remove(n)), b(new Error("Cancelled"));
127
126
  };
128
- return t.on("select", E), t.on("intersectionUpdate", g), t.on("disable", C), {
127
+ return t.on("select", E), t.on("intersectionUpdate", g), t.on("disable", x), {
129
128
  finished: p,
130
129
  canUndo: O,
131
130
  canRedo: M,
132
- undo: A,
133
- redo: D
131
+ undo: W,
132
+ redo: A
134
133
  };
135
134
  }
136
135
  export {
137
- ie as Line,
136
+ ne as Line,
138
137
  K as createLine
139
138
  };
@@ -1,17 +1,17 @@
1
- var g = Object.defineProperty, u = Object.defineProperties;
2
- var y = Object.getOwnPropertyDescriptors;
1
+ var g = Object.defineProperty, y = Object.defineProperties;
2
+ var M = Object.getOwnPropertyDescriptors;
3
3
  var d = Object.getOwnPropertySymbols;
4
- var P = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
5
- var p = (e, i, t) => i in e ? g(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, a = (e, i) => {
4
+ var P = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable;
5
+ var c = (e, i, t) => i in e ? g(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, a = (e, i) => {
6
6
  for (var t in i || (i = {}))
7
- P.call(i, t) && p(e, t, i[t]);
7
+ P.call(i, t) && c(e, t, i[t]);
8
8
  if (d)
9
9
  for (var t of d(i))
10
- w.call(i, t) && p(e, t, i[t]);
10
+ v.call(i, t) && c(e, t, i[t]);
11
11
  return e;
12
- }, m = (e, i) => u(e, y(i));
13
- var c = (e, i, t) => (p(e, typeof i != "symbol" ? i + "" : i, t), t);
14
- var M = (e, i, t) => new Promise((h, n) => {
12
+ }, m = (e, i) => y(e, M(i));
13
+ var p = (e, i, t) => (c(e, typeof i != "symbol" ? i + "" : i, t), t);
14
+ var b = (e, i, t) => new Promise((h, n) => {
15
15
  var r = (s) => {
16
16
  try {
17
17
  o(t.next(s));
@@ -27,16 +27,16 @@ var M = (e, i, t) => new Promise((h, n) => {
27
27
  }, o = (s) => s.done ? h(s.value) : Promise.resolve(s.value).then(r, f);
28
28
  o((t = t.apply(e, i)).next());
29
29
  });
30
- import { PointMesh as b } from "../../Meshes/Point.js";
31
- import { BaseObject as v } from "../Base/index.js";
30
+ import { PointMesh as u } from "../../Meshes/Point.js";
31
+ import { BaseObject as w } from "../Base/index.js";
32
32
  import { PointEditor as x } from "./Editor.js";
33
33
  import { vector3ToArray as E } from "../../../shared-utils/three/vector3ToArray.js";
34
- class C extends v {
34
+ class C extends w {
35
35
  constructor(t, h) {
36
36
  super(t, h);
37
- c(this, "type", "Point");
38
- c(this, "pointMesh");
39
- this.editor = new x(this), t && (this.pointMesh = new b(a(a({}, t.style), t)), this.add(this.pointMesh));
37
+ p(this, "type", "Point");
38
+ p(this, "pointMesh");
39
+ this.editor = new x(this), t && (this.pointMesh = new u(a(a({}, t.style), t)), this.add(this.pointMesh));
40
40
  }
41
41
  get data() {
42
42
  return m(a({}, this.baseData), {
@@ -67,8 +67,8 @@ class C extends v {
67
67
  * @description: 创建点
68
68
  */
69
69
  create(t) {
70
- return M(this, null, function* () {
71
- this.pointMesh && this.remove(this.pointMesh), this.add(this.pointMesh = new b(t)), yield U(this.pointMesh, this.pointSelector);
70
+ return b(this, null, function* () {
71
+ this.pointMesh && this.remove(this.pointMesh), this.add(this.pointMesh = new u(t)), yield U(this.pointMesh, this.pointSelector);
72
72
  });
73
73
  }
74
74
  }
@@ -78,7 +78,7 @@ function U(e, i) {
78
78
  const n = (s) => {
79
79
  s && (e.visible = !0, e.position.copy(s.point));
80
80
  }, r = (s) => {
81
- s && (e.position.copy(s.point), f());
81
+ s && (e.visible = !0, e.position.copy(s.point), f());
82
82
  }, f = () => {
83
83
  i.off("select", r), i.off("disable", o), i.off("intersectionUpdate", n), i.disable(), t();
84
84
  }, o = () => {