@realsee/dnalogel 3.50.5 → 3.50.6

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.
@@ -1,38 +1,38 @@
1
1
  var T = Object.defineProperty;
2
2
  var L = Object.getOwnPropertySymbols;
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) => {
3
+ var w = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
4
+ var m = (r, o, e) => o in r ? T(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e, g = (r, o) => {
5
5
  for (var e in o || (o = {}))
6
- k.call(o, e) && y(r, e, o[e]);
6
+ w.call(o, e) && m(r, e, o[e]);
7
7
  if (L)
8
8
  for (var e of L(o))
9
- w.call(o, e) && y(r, e, o[e]);
9
+ k.call(o, e) && m(r, e, o[e]);
10
10
  return r;
11
11
  };
12
- var h = (r, o, e) => (y(r, typeof o != "symbol" ? o + "" : o, e), e);
12
+ var h = (r, o, e) => (m(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 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
- import { LineGeometry as g } from "../../vendor/three/examples/jsm/lines/LineGeometry.js";
17
- import { anyPositionToVector3 as C } from "../../shared-utils/positionToVector3.js";
18
- import { IObject3D as R } from "../../shared-utils/three/IObject3D.js";
14
+ import { DEFAULT_LINE_COLOR as p, DEFAULT_LINE_WIDTH as C, DEFAULT_HIGHLIGHT_OPACITY as S } from "../typings/style.js";
15
+ import { LineMaterial as H, THREE_Line2 as I } from "../../shared-utils/five/FiveLine.js";
16
+ import { LineGeometry as b } from "../../vendor/three/examples/jsm/lines/LineGeometry.js";
17
+ import { anyPositionToVector3 as v } from "../../shared-utils/positionToVector3.js";
18
+ import { IObject3D as x } from "../../shared-utils/three/IObject3D.js";
19
19
  import "hammerjs";
20
20
  import "three/examples/jsm/renderers/CSS3DRenderer";
21
- import { centerPoint as x } from "../../shared-utils/three/centerPoint.js";
21
+ import { centerPoint as R } from "../../shared-utils/three/centerPoint.js";
22
22
  import { LightTag as W } from "../../shared-utils/tag.js";
23
23
  import { removeAllTag as O } from "../utils/removeAllTag.js";
24
24
  import { getLengthHTML as P } from "../utils/Meshes/getLengthHTML.js";
25
25
  import { applyObjectMatrixWorld as _ } from "../../shared-utils/three/applyObjectMatrixWorld.js";
26
26
  import "../../shared-utils/three/core/Sphere.js";
27
27
  import "animejs";
28
- import { notNil as d } from "../../shared-utils/isNil.js";
28
+ import { notNil as c } from "../../shared-utils/isNil.js";
29
29
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
30
30
  class D extends H {
31
31
  constructor(e) {
32
32
  var i, t;
33
33
  super(e);
34
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) => {
35
+ c(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
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
  }
@@ -46,15 +46,15 @@ class D extends H {
46
46
  this.dashed = e, e ? this.defines.USE_DASH = "" : delete this.defines.USE_DASH, this.needsUpdate = !0;
47
47
  }
48
48
  }
49
- class E extends v {
49
+ class E extends I {
50
50
  constructor(e, i) {
51
51
  super(e, i);
52
52
  h(this, "name", "Line3");
53
53
  }
54
54
  }
55
- class ee extends R {
55
+ class ee extends x {
56
56
  constructor(e) {
57
- var l, c, a, u, n;
57
+ var l, d, a, u, n;
58
58
  super();
59
59
  h(this, "name", "LineMesh");
60
60
  h(this, "points");
@@ -67,9 +67,9 @@ class ee extends R {
67
67
  h(this, "lastRenderDomItem");
68
68
  h(this, "_visible", !0);
69
69
  this.paramsStyle = e != null ? e : {};
70
- const i = new g(), t = new D({
70
+ const i = new b(), t = new D({
71
71
  color: new f.Color((l = e == null ? void 0 : e.lineColor) != null ? l : p),
72
- linewidth: (c = e == null ? void 0 : e.lineWidth) != null ? c : I,
72
+ linewidth: (d = e == null ? void 0 : e.lineWidth) != null ? d : C,
73
73
  dashScale: 40,
74
74
  opacity: (a = e == null ? void 0 : e.opacity) != null ? a : 1,
75
75
  transparent: !0,
@@ -87,8 +87,8 @@ class ee extends R {
87
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
88
  O(this);
89
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;
90
+ set: (y) => {
91
+ this.doms && this.doms.forEach((M) => M.container.style.visibility = y ? "visible" : "hidden"), this._visible = y;
92
92
  },
93
93
  get: () => this._visible
94
94
  });
@@ -139,14 +139,14 @@ class ee extends R {
139
139
  }
140
140
  }
141
141
  setPoints(e) {
142
- const i = e.map(C).filter(d);
142
+ const i = e.map(v).filter(c);
143
143
  if (this.points = i, i.length < 2) {
144
- this.line.geometry = new g(), this.backLine.geometry = this.line.geometry, this.updateDomItems();
144
+ this.line.geometry = new b(), this.backLine.geometry = this.line.geometry, this.updateDomItems();
145
145
  return;
146
146
  }
147
147
  this.addIfNotExists(this.line, this.backLine);
148
148
  const t = i.flatMap((s) => [s.x, s.y, s.z]);
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;
149
+ t.length > 2 && (this.line.geometry.dispose(), this.line.geometry = new b(), this.backLine.geometry = this.line.geometry), this.line.geometry.setPositions(t), this.line.computeLineDistances(), this.updateDomItems(), this.needsRender = !0;
150
150
  }
151
151
  setResolution(e, i) {
152
152
  const t = this.line.material.resolution;
@@ -155,9 +155,9 @@ class ee extends R {
155
155
  (s.x !== e || s.y !== i) && (s.set(e, i), this.needsRender = !0);
156
156
  }
157
157
  setStyle(e) {
158
- var s, l, c;
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();
160
- const i = (s = e.occlusionVisibility) != null ? s : this.paramsStyle.occlusionVisibility, t = (c = (l = e.occlusionMode) != null ? l : this.paramsStyle.occlusionMode) != null ? c : "translucence";
158
+ var s, l, d;
159
+ this.paramsStyle = g(g({}, this.paramsStyle), e), c(e.lineColor) && (this.line.material.three_color = new f.Color(e.lineColor), this.backLine.material.three_color = new f.Color(e.lineColor)), c(e.lineWidth) && (this.line.material.linewidth = e.lineWidth), c(e.dashed) && this.line.material.setDashed(e.dashed), c(e.opacity) && (this.line.material.opacity = e.opacity, this.backLine.material.opacity = this.line.material.opacity * 0.7), this.updateDomItems();
160
+ const i = (s = e.occlusionVisibility) != null ? s : this.paramsStyle.occlusionVisibility, t = (d = (l = e.occlusionMode) != null ? l : this.paramsStyle.occlusionMode) != null ? d : "translucence";
161
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;
162
162
  }
163
163
  highlight() {
@@ -177,16 +177,19 @@ class ee extends R {
177
177
  const i = this.points.map((t, s) => {
178
178
  if (s !== 0)
179
179
  return [this.points[s - 1], t];
180
- }).filter(d).map((t) => _(this, t));
180
+ }).filter(c).map((t) => _(this, t));
181
181
  i.forEach(([t, s], l) => {
182
182
  var u;
183
- const c = x(t, s);
183
+ const d = R(t, s);
184
184
  this.doms[l] = (u = this.doms[l]) != null ? u : (() => {
185
185
  const n = new W(this.five);
186
186
  return n.intersectCheck = !1, n.simulate3D = !0, n;
187
- })(), this.doms[l].setPosition(c, [t, s]);
187
+ })(), this.doms[l].setPosition(d, [t, s]);
188
188
  const a = (n) => {
189
- this.doms[l].__text !== n && (this.doms[l].__text = n, n ? this.doms[l].container.innerHTML = P(n) : this.doms[l].container.innerHTML = "");
189
+ var y;
190
+ this.doms[l].__text !== n && (this.doms[l].__text = n, n ? this.doms[l].container.innerHTML = P(n, {
191
+ style: `color: #${c((y = this.style) == null ? void 0 : y.lineColor) ? new f.Color(this.style.lineColor).getHexString() : "ffffff"}`
192
+ }) : this.doms[l].container.innerHTML = "");
190
193
  };
191
194
  if (this.paramsStyle.tip)
192
195
  a(this.paramsStyle.tip);
@@ -12,6 +12,12 @@ export declare class PointMesh extends IObject3D {
12
12
  name: string;
13
13
  get color(): THREE.Color;
14
14
  get size(): number;
15
+ get style(): {
16
+ color: THREE.Color;
17
+ size: number;
18
+ occlusionVisibility: boolean;
19
+ occlusionMode: string;
20
+ };
15
21
  dom: LightTag;
16
22
  private opacityBeforeHighlight;
17
23
  private highlighted;
@@ -1,44 +1,44 @@
1
1
  var N = Object.defineProperty, k = Object.defineProperties;
2
2
  var D = Object.getOwnPropertyDescriptors;
3
- var A = Object.getOwnPropertySymbols;
3
+ var d = Object.getOwnPropertySymbols;
4
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) => {
5
+ var f = (e, i, t) => i in e ? N(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, g = (e, i) => {
6
6
  for (var t in i || (i = {}))
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]);
7
+ v.call(i, t) && f(e, t, i[t]);
8
+ if (d)
9
+ for (var t of d(i))
10
+ V.call(i, t) && f(e, t, i[t]);
11
11
  return e;
12
- }, g = (e, i) => k(e, D(i));
13
- var C = (e, i) => {
12
+ }, a = (e, i) => k(e, D(i));
13
+ var y = (e, i) => {
14
14
  var t = {};
15
15
  for (var o in e)
16
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))
17
+ if (e != null && d)
18
+ for (var o of d(e))
19
19
  i.indexOf(o) < 0 && V.call(e, o) && (t[o] = e[o]);
20
20
  return t;
21
21
  };
22
- var s = (e, i, t) => (u(e, typeof i != "symbol" ? i + "" : i, t), t);
23
- import * as r from "three";
22
+ var s = (e, i, t) => (f(e, typeof i != "symbol" ? i + "" : i, t), t);
23
+ import * as h from "three";
24
24
  import { DEFAULT_HIGHLIGHT_OPACITY as I } from "../typings/style.js";
25
- import { IObject3D as B } from "../../shared-utils/three/IObject3D.js";
26
- import { anyPositionToVector3 as E } from "../../shared-utils/positionToVector3.js";
25
+ import { IObject3D as W } from "../../shared-utils/three/IObject3D.js";
26
+ import { anyPositionToVector3 as x } from "../../shared-utils/positionToVector3.js";
27
27
  import "hammerjs";
28
28
  import "three/examples/jsm/renderers/CSS3DRenderer";
29
29
  import "@realsee/five/line";
30
30
  import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
31
- import { LightTag as W } from "../../shared-utils/tag.js";
32
- import { removeAllTag as x } from "../utils/removeAllTag.js";
31
+ import { LightTag as B } from "../../shared-utils/tag.js";
32
+ import { removeAllTag as E } from "../utils/removeAllTag.js";
33
33
  import { getLengthHTML as S } from "../utils/Meshes/getLengthHTML.js";
34
- import { applyObjectMatrixWorld as F } from "../../shared-utils/three/applyObjectMatrixWorld.js";
34
+ import { applyObjectMatrixWorld as T } from "../../shared-utils/three/applyObjectMatrixWorld.js";
35
35
  import "../../shared-utils/three/core/Sphere.js";
36
36
  import "animejs";
37
- import { notNil as a } from "../../shared-utils/isNil.js";
37
+ import { notNil as c } from "../../shared-utils/isNil.js";
38
38
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
39
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 {
40
+ let C = null;
41
+ class $ extends W {
42
42
  constructor(t) {
43
43
  var w, p;
44
44
  super();
@@ -51,29 +51,29 @@ class $ extends B {
51
51
  s(this, "lastRenderDomItem");
52
52
  s(this, "paramsStyle");
53
53
  s(this, "_visible", !0);
54
- const M = t != null ? t : {}, { point: o } = M, h = C(M, ["point"]);
55
- this.paramsStyle = h != null ? h : {};
56
- const d = new r.BufferGeometry();
57
- d.setAttribute("position", new r.Float32BufferAttribute([0, 0, 0], 3));
54
+ const M = t != null ? t : {}, { point: o } = M, r = y(M, ["point"]);
55
+ this.paramsStyle = r != null ? r : {};
56
+ const l = new h.BufferGeometry();
57
+ l.setAttribute("position", new h.Float32BufferAttribute([0, 0, 0], 3));
58
58
  const m = {
59
59
  transparent: !0,
60
- side: r.DoubleSide,
60
+ side: h.DoubleSide,
61
61
  size: (w = t == null ? void 0 : t.size) != null ? w : 8,
62
- map: P || (P = new r.TextureLoader().load(H)),
62
+ map: C || (C = new h.TextureLoader().load(H)),
63
63
  sizeAttenuation: !1
64
- }, c = new r.PointsMaterial(g(f({}, m), {
64
+ }, u = new h.PointsMaterial(a(g({}, m), {
65
65
  color: (p = t == null ? void 0 : t.color) != null ? p : 16777215,
66
66
  depthTest: !0,
67
67
  opacity: 1
68
- })), y = new r.PointsMaterial(g(f({}, m), {
69
- size: c.size,
70
- color: c.color,
68
+ })), P = new h.PointsMaterial(a(g({}, m), {
69
+ size: u.size,
70
+ color: u.color,
71
71
  depthWrite: !1,
72
72
  depthTest: !1,
73
73
  opacity: 0.5
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", () => {
76
- x(this);
74
+ })), n = new h.Points(l, u), A = new h.Points(l, P);
75
+ this.fontMesh = n, this.backgroundMesh = A, n.name = "FontMesh", A.name = "BackgroundMesh", n.renderOrder = 10, A.renderOrder = 0, this.add(n, A), t != null && t.point && this.position.copy(x(t.point)), t && this.setStyle(t), this.addEventListener("removed", () => {
76
+ E(this);
77
77
  }), Object.defineProperty(this, "visible", {
78
78
  set: (b) => {
79
79
  this.dom && (this.dom.container.style.visibility = b ? "visible" : "hidden"), this._visible = b;
@@ -87,12 +87,20 @@ class $ extends B {
87
87
  get size() {
88
88
  return this.fontMesh.material.size;
89
89
  }
90
+ get style() {
91
+ return {
92
+ color: this.color,
93
+ size: this.size,
94
+ occlusionVisibility: this.fontMesh.material.depthTest,
95
+ occlusionMode: this.backgroundMesh.visible ? "depthWrite" : "depthTest"
96
+ };
97
+ }
90
98
  get five() {
91
99
  var t, o;
92
100
  return (o = (t = window.globalModules) == null ? void 0 : t.five) != null ? o : window.$five;
93
101
  }
94
102
  setStyle(t) {
95
- a(t.color) && (this.fontMesh.material.setValues({ color: t.color }), this.backgroundMesh.material.setValues({ color: t.color })), a(t.size) && (this.fontMesh.material.setValues({ side: t.size }), this.backgroundMesh.material.setValues({ side: t.size })), a(t.occlusionVisibility) && (t.occlusionVisibility ? t.occlusionMode === "depthTest" ? (this.fontMesh.material.depthTest = !1, this.backgroundMesh.visible = !1) : (this.fontMesh.material.depthTest = !0, this.backgroundMesh.visible = !0) : (this.fontMesh.material.depthTest = !0, this.backgroundMesh.visible = !1));
103
+ c(t.color) && (this.fontMesh.material.setValues({ color: t.color }), this.backgroundMesh.material.setValues({ color: t.color })), c(t.size) && (this.fontMesh.material.setValues({ side: t.size }), this.backgroundMesh.material.setValues({ side: t.size })), c(t.occlusionVisibility) && (t.occlusionVisibility ? t.occlusionMode === "depthTest" ? (this.fontMesh.material.depthTest = !1, this.backgroundMesh.visible = !1) : (this.fontMesh.material.depthTest = !0, this.backgroundMesh.visible = !0) : (this.fontMesh.material.depthTest = !0, this.backgroundMesh.visible = !1));
96
104
  }
97
105
  highlight() {
98
106
  this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.fontMesh.material.opacity, this.fontMesh.material.setValues({ opacity: this.opacityBeforeHighlight * I }));
@@ -102,14 +110,17 @@ class $ extends B {
102
110
  }
103
111
  updateMatrixWorld(t) {
104
112
  super.updateMatrixWorld(t);
105
- const o = F(this, this.position).toArray().join(",");
113
+ const o = T(this, this.position).toArray().join(",");
106
114
  o !== this.lastRenderDomItem && (this.updateDom(), this.lastRenderDomItem = o);
107
115
  }
108
116
  updateDom() {
109
117
  const t = this.paramsStyle.tip;
110
- t && !this.dom && (this.dom = new W(this.five), this.dom.intersectCheck = !1, this.dom.simulate3D = !0, this.dom.container.style.visibility = "hidden");
111
- const o = (h) => {
112
- this.dom && this.dom.__text !== h && (this.dom.__text = h, h ? this.dom.container.innerHTML = S(h) : this.dom.container.innerHTML = "");
118
+ t && !this.dom && (this.dom = new B(this.five), this.dom.intersectCheck = !1, this.dom.simulate3D = !0, this.dom.container.style.visibility = "hidden");
119
+ const o = (r) => {
120
+ var l;
121
+ this.dom && this.dom.__text !== r && (this.dom.__text = r, r ? this.dom.container.innerHTML = S(r, {
122
+ style: `color: #${c((l = this.style) == null ? void 0 : l.color) ? new h.Color(this.style.color).getHexString() : "ffffff"}`
123
+ }) : this.dom.container.innerHTML = "");
113
124
  };
114
125
  t ? (o(t), this.dom.setPosition(this.position.clone())) : o(null);
115
126
  }
@@ -1,29 +1,37 @@
1
- var f = Object.defineProperty, d = Object.defineProperties;
2
- var y = Object.getOwnPropertyDescriptors;
3
- var m = Object.getOwnPropertySymbols;
4
- var u = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
5
- var a = (i, t, e) => t in i ? f(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, h = (i, t) => {
1
+ var d = Object.defineProperty, y = Object.defineProperties;
2
+ var u = Object.getOwnPropertyDescriptors;
3
+ var g = Object.getOwnPropertySymbols;
4
+ var c = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
5
+ var a = (i, t, e) => t in i ? d(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, h = (i, t) => {
6
6
  for (var e in t || (t = {}))
7
- u.call(t, e) && a(i, e, t[e]);
8
- if (m)
9
- for (var e of m(t))
10
- c.call(t, e) && a(i, e, t[e]);
7
+ c.call(t, e) && a(i, e, t[e]);
8
+ if (g)
9
+ for (var e of g(t))
10
+ I.call(t, e) && a(i, e, t[e]);
11
11
  return i;
12
- }, g = (i, t) => d(i, y(t));
12
+ }, f = (i, t) => y(i, u(t));
13
13
  var r = (i, t, e) => (a(i, typeof t != "symbol" ? t + "" : t, e), e);
14
14
  import * as l from "three";
15
- import { generatePolygonGeometry as I } from "../../shared-utils/three/generatePolygonGeometry.js";
16
- import { DEFAULT_HIGHLIGHT_OPACITY as H } from "../typings/style.js";
17
- import { anyPositionToVector3 as P } from "../../shared-utils/positionToVector3.js";
18
- import { ColoredMesh as _ } from "../utils/three/ColoredMesh.js";
19
- import { getGeometryInfo as A } from "../../shared-utils/three/geometryUtil.js";
20
- import { LightTag as S } from "../../shared-utils/tag.js";
21
- import { getLengthHTML as D } from "../utils/Meshes/getLengthHTML.js";
22
- import { applyObjectMatrixWorld as M } from "../../shared-utils/three/applyObjectMatrixWorld.js";
15
+ import { generatePolygonGeometry as H } from "../../shared-utils/three/generatePolygonGeometry.js";
16
+ import { DEFAULT_HIGHLIGHT_OPACITY as P } from "../typings/style.js";
17
+ import { anyPositionToVector3 as _ } from "../../shared-utils/positionToVector3.js";
18
+ import { ColoredMesh as A } from "../utils/three/ColoredMesh.js";
19
+ import { getGeometryInfo as S } from "../../shared-utils/three/geometryUtil.js";
20
+ import { LightTag as D } from "../../shared-utils/tag.js";
21
+ import { getLengthHTML as M } from "../utils/Meshes/getLengthHTML.js";
22
+ import { applyObjectMatrixWorld as w } from "../../shared-utils/three/applyObjectMatrixWorld.js";
23
+ import "hammerjs";
24
+ import "three/examples/jsm/renderers/CSS3DRenderer";
25
+ import "@realsee/five/line";
26
+ import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
27
+ import "../../shared-utils/three/core/Sphere.js";
28
+ import "animejs";
29
+ import { notNil as B } from "../../shared-utils/isNil.js";
30
+ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
23
31
  const p = new l.BufferGeometry();
24
32
  p.name = "blankGeometry";
25
33
  p.isBlank = !0;
26
- class G extends _ {
34
+ class $ extends A {
27
35
  constructor(e) {
28
36
  super(e);
29
37
  r(this, "name", "PolygonMesh");
@@ -40,7 +48,7 @@ class G extends _ {
40
48
  e != null && e.points && this.setPoints(e.points), this._paramsStyle = e != null ? e : {}, this.updateAreaItems();
41
49
  }
42
50
  get style() {
43
- return g(h({}, super.style), { lengthEnable: this._paramsStyle.lengthEnable });
51
+ return f(h({}, super.style), { lengthEnable: this._paramsStyle.lengthEnable });
44
52
  }
45
53
  get isBlank() {
46
54
  return !!this.geometry.isBlank;
@@ -50,16 +58,16 @@ class G extends _ {
50
58
  return (e = this.geometryInfo) == null ? void 0 : e.center;
51
59
  }
52
60
  get geometryInfo() {
53
- return this.geometryInfoNeedUpdate && (this.isBlank ? this._geometryInfo = null : this._geometryInfo = A(this.geometry), this.geometryInfoNeedUpdate = !1), this._geometryInfo;
61
+ return this.geometryInfoNeedUpdate && (this.isBlank ? this._geometryInfo = null : this._geometryInfo = S(this.geometry), this.geometryInfoNeedUpdate = !1), this._geometryInfo;
54
62
  }
55
63
  get five() {
56
- var e, s;
57
- return (s = (e = window.globalModules) == null ? void 0 : e.five) != null ? s : window.$five;
64
+ var e, o;
65
+ return (o = (e = window.globalModules) == null ? void 0 : e.five) != null ? o : window.$five;
58
66
  }
59
67
  updateMatrixWorld(e) {
60
68
  if (super.updateMatrixWorld(e), this.center) {
61
- const s = M(this, this.center).toArray().join(",");
62
- s !== this.lastRenderAreaItem && (this.updateAreaItems(), this.lastRenderAreaItem = s);
69
+ const o = w(this, this.center).toArray().join(",");
70
+ o !== this.lastRenderAreaItem && (this.updateAreaItems(), this.lastRenderAreaItem = o);
63
71
  }
64
72
  }
65
73
  setStyle(e) {
@@ -67,8 +75,8 @@ class G extends _ {
67
75
  }
68
76
  setPoints(e) {
69
77
  var n;
70
- const s = e.map(P);
71
- this.points = s, this.geometry = (n = I(this.points, { checkLinesIntersect: !0 })) != null ? n : p, this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0, this.updateAreaItems();
78
+ const o = e.map(_);
79
+ this.points = o, this.geometry = (n = H(this.points, { checkLinesIntersect: !0 })) != null ? n : p, this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0, this.updateAreaItems();
72
80
  }
73
81
  /**
74
82
  * @description: 获取一个点投影在当前平面上的点
@@ -77,7 +85,7 @@ class G extends _ {
77
85
  return e && (this.planeHelperNeedUpdate && this.updatePlaneHelper(), this.planeHelper ? this.planeHelper.projectPoint(e, new l.Vector3()) : e);
78
86
  }
79
87
  highlight() {
80
- this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.opacity, this.setStyle({ opacity: this.opacity * H }), this.needsRender = !0);
88
+ this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.opacity, this.setStyle({ opacity: this.opacity * P }), this.needsRender = !0);
81
89
  }
82
90
  unhighlight() {
83
91
  this.highlighted && (this.highlighted = !1, this.setStyle({ opacity: this.opacityBeforeHighlight }), this.needsRender = !0);
@@ -86,23 +94,25 @@ class G extends _ {
86
94
  this.points.length >= 3 ? this.planeHelper = new l.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.planeHelper = null, this.planeHelperNeedUpdate = !1;
87
95
  }
88
96
  updateAreaItems() {
89
- var n;
97
+ var n, m;
90
98
  const e = () => {
91
- var o;
92
- (o = this.areaDom) == null || o.destroy(), this.areaDom = void 0;
99
+ var s;
100
+ (s = this.areaDom) == null || s.destroy(), this.areaDom = void 0;
93
101
  };
94
102
  if (!this._paramsStyle.lengthEnable || !this.geometryInfo)
95
103
  return e();
96
104
  if (!this.five)
97
105
  return console.error("Five not found");
98
106
  this.areaDom = (n = this.areaDom) != null ? n : (() => {
99
- const o = new S(this.five);
100
- return o.intersectCheck = !1, o.simulate3D = !0, o;
107
+ const s = new D(this.five);
108
+ return s.intersectCheck = !1, s.simulate3D = !0, s;
101
109
  })(), this.areaDom.setPosition(this.center);
102
- const s = this.geometryInfo.area.toFixed(2);
103
- s === "0.00" ? this.areaDom.container.innerHTML = "" : this.areaDom.container.innerHTML = D(s + "m²");
110
+ const o = this.geometryInfo.area.toFixed(2);
111
+ o === "0.00" ? this.areaDom.container.innerHTML = "" : this.areaDom.container.innerHTML = M(o + "m²", {
112
+ style: `color: #${B((m = this.style) == null ? void 0 : m.color) ? new l.Color(this.style.color).getHexString() : "000000"}`
113
+ });
104
114
  }
105
115
  }
106
116
  export {
107
- G as PolygonMesh
117
+ $ as PolygonMesh
108
118
  };
@@ -1 +1,3 @@
1
- export declare function getLengthHTML(text: string): string;
1
+ export declare function getLengthHTML(text: string, params?: {
2
+ style?: string;
3
+ }): string;
@@ -1,4 +1,4 @@
1
- function i(t) {
1
+ function l(t, n) {
2
2
  if (!document.getElementById("LineLengthTagStyle")) {
3
3
  const e = document.createElement("style");
4
4
  e.id = "LineLengthTagStyle", document.head.appendChild(e), e.innerHTML = `
@@ -24,12 +24,12 @@ function i(t) {
24
24
  `;
25
25
  }
26
26
  return `
27
- <div class="LineLengthTag">
27
+ <div class="LineLengthTag" style="${n.style}">
28
28
  <div>${t}</div>
29
29
  <div>${t}</div>
30
30
  </div>
31
31
  `;
32
32
  }
33
33
  export {
34
- i as getLengthHTML
34
+ l as getLengthHTML
35
35
  };
@@ -18,7 +18,7 @@ let P = class {
18
18
  /**
19
19
  * @realsee/dnalogel 版本号
20
20
  */
21
- i(this, "VERSION", "3.50.5");
21
+ i(this, "VERSION", "3.50.6");
22
22
  i(this, "NAME");
23
23
  i(this, "five");
24
24
  i(this, "workUtil");
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.50.5",
3
+ "%c %c@realsee/dnalogel %cv3.50.6",
4
4
  [
5
5
  "background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
6
6
  "background-repeat: no-repeat",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.50.5",
3
+ "version": "3.50.6",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",