@realsee/dnalogel 3.47.3 → 3.47.5

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 (130) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/Sculpt/Meshes/Polygon.d.ts +1 -1
  3. package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
  4. package/dist/Sculpt/utils/Meshes/getLengthHTML.d.ts +1 -0
  5. package/dist/Sculpt/utils/three/ColoredMesh.d.ts +2 -2
  6. package/dist/index.cjs.js +79 -55
  7. package/dist/index.js +5073 -5050
  8. package/dist/index.umd.js +74 -50
  9. package/dist/shared-utils/five/vector3ToScreen.d.ts +4 -4
  10. package/dist/shared-utils/tag.d.ts +1 -3
  11. package/dist/shared-utils/three/Magnifier.d.ts +1 -0
  12. package/dist/shared-utils/three/index.d.ts +0 -2
  13. package/dist/shared-utils/three/raycaster.d.ts +2 -0
  14. package/libs/AreaMakerPlugin/Controller.js +16 -14
  15. package/libs/AreaMakerPlugin/index.js +18 -16
  16. package/libs/AreaMakerPlugin/utils/Item.js +55 -53
  17. package/libs/CSS3DRenderPlugin/Controller.js +14 -12
  18. package/libs/CSS3DRenderPlugin/index.js +21 -19
  19. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +15 -13
  20. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +16 -14
  21. package/libs/CruisePlugin/BaseController.js +29 -27
  22. package/libs/CruisePlugin/Move.js +21 -19
  23. package/libs/CruisePlugin/Work.js +16 -14
  24. package/libs/CruisePlugin/index.js +22 -20
  25. package/libs/CurrentPanoImagePlugin/Controller.js +25 -23
  26. package/libs/CurrentPanoImagePlugin/index.js +19 -17
  27. package/libs/GuideLinePlugin/Controller.js +18 -16
  28. package/libs/GuideLinePlugin/GuideLineItem.js +18 -16
  29. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -4
  30. package/libs/GuideLinePlugin/GuideLineModeItem.js +18 -16
  31. package/libs/GuideLinePlugin/index.js +22 -20
  32. package/libs/ModelMakerPlugin/Controller.js +22 -20
  33. package/libs/ModelMakerPlugin/index.js +18 -16
  34. package/libs/ModelMakerPlugin/item/baseItem.js +14 -13
  35. package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
  36. package/libs/ModelMakerPlugin/item/polygonItem.js +6 -5
  37. package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
  38. package/libs/ModelTVVideoPlugin/Plugin.js +17 -15
  39. package/libs/ModelTVVideoPlugin/index.js +16 -14
  40. package/libs/Object3DHelperPlugin/Controller.js +17 -15
  41. package/libs/Object3DHelperPlugin/index.js +21 -19
  42. package/libs/PanoCompassPlugin/Controller.js +18 -16
  43. package/libs/PanoCompassPlugin/index.js +19 -17
  44. package/libs/PanoDoorLabelPlugin/BaseController.js +18 -16
  45. package/libs/PanoDoorLabelPlugin/Controller.js +38 -36
  46. package/libs/PanoDoorLabelPlugin/index.js +19 -17
  47. package/libs/PanoMeasurePlugin/Components/Controller0.js +15 -13
  48. package/libs/PanoMeasurePlugin/Components/Controller1.js +15 -13
  49. package/libs/PanoMeasurePlugin/Controller/EditController.js +14 -12
  50. package/libs/PanoMeasurePlugin/Controller/WatchController.js +15 -13
  51. package/libs/PanoMeasurePlugin/Controller/index.js +13 -11
  52. package/libs/PanoMeasurePlugin/Model/area.js +15 -13
  53. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +15 -13
  54. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +15 -13
  55. package/libs/PanoMeasurePlugin/index.js +24 -22
  56. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +15 -13
  57. package/libs/PanoSpatialTagPlugin/Plugin.js +17 -15
  58. package/libs/PanoSpatialTagPlugin/index.js +14 -12
  59. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +17 -15
  60. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +16 -14
  61. package/libs/PanoTagPlugin/Components/Tag/index.js +16 -14
  62. package/libs/PanoTagPlugin/Components/TagContainer.js +16 -14
  63. package/libs/PanoTagPlugin/Components/TagItem.js +16 -14
  64. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +60 -60
  65. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +16 -14
  66. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +16 -14
  67. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +18 -16
  68. package/libs/PanoTagPlugin/controller/TagRender.js +15 -13
  69. package/libs/PanoTagPlugin/controller/TagUtil.js +16 -14
  70. package/libs/PanoTagPlugin/controller/index.js +18 -16
  71. package/libs/PanoTagPlugin/index.js +24 -22
  72. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +17 -15
  73. package/libs/PanoVideoPlugin/Controller.js +18 -16
  74. package/libs/PanoVideoPlugin/VideoMeshController.js +18 -16
  75. package/libs/PanoVideoPlugin/index.js +21 -19
  76. package/libs/PipelinePlugin/Controller.js +17 -15
  77. package/libs/PipelinePlugin/index.js +19 -17
  78. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +18 -16
  79. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +18 -16
  80. package/libs/PipelinePlugin/utils/Objects/Pipe.js +35 -33
  81. package/libs/Sculpt/Meshes/Box.js +6 -7
  82. package/libs/Sculpt/Meshes/Cylinder.js +15 -16
  83. package/libs/Sculpt/Meshes/Line.js +61 -55
  84. package/libs/Sculpt/Meshes/Point.js +6 -7
  85. package/libs/Sculpt/Meshes/Polygon.d.ts +1 -1
  86. package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
  87. package/libs/Sculpt/Meshes/Polyline.js +5 -6
  88. package/libs/Sculpt/Meshes/Rectangle.js +3 -4
  89. package/libs/Sculpt/Objects/Line/Editor.js +15 -16
  90. package/libs/Sculpt/Objects/Line/index.js +35 -35
  91. package/libs/Sculpt/Objects/Polygon/index.js +55 -61
  92. package/libs/Sculpt/Objects/Polyline/index.js +45 -45
  93. package/libs/Sculpt/index.js +1 -1
  94. package/libs/Sculpt/utils/Meshes/getLengthHTML.d.ts +1 -0
  95. package/libs/Sculpt/utils/Meshes/getLengthHTML.js +34 -0
  96. package/libs/Sculpt/utils/three/ColoredMesh.d.ts +2 -2
  97. package/libs/Sculpt/utils/three/ColoredMesh.js +3 -4
  98. package/libs/base/BasePlugin.js +14 -15
  99. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +15 -13
  100. package/libs/floorplan/MapviewFloorplanPlugin/index.js +19 -17
  101. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +15 -13
  102. package/libs/floorplan/ModelFloorplanPlugin/index.js +19 -17
  103. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +18 -16
  104. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +19 -17
  105. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +15 -13
  106. package/libs/floorplan/TopviewFloorplanPlugin/index.js +19 -17
  107. package/libs/floorplan/index.js +1 -2
  108. package/libs/index.js +15 -15
  109. package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.js +7 -7
  110. package/libs/shared-utils/five/index.js +3 -4
  111. package/libs/shared-utils/five/lookObject.js +3 -4
  112. package/libs/shared-utils/five/vector3ToScreen.d.ts +4 -4
  113. package/libs/shared-utils/five/vector3ToScreen.js +9 -4
  114. package/libs/shared-utils/index.js +45 -49
  115. package/libs/shared-utils/logger.js +1 -1
  116. package/libs/shared-utils/tag.d.ts +1 -3
  117. package/libs/shared-utils/tag.js +37 -29
  118. package/libs/shared-utils/three/Magnifier.d.ts +1 -0
  119. package/libs/shared-utils/three/Magnifier.js +23 -24
  120. package/libs/shared-utils/three/index.d.ts +0 -2
  121. package/libs/shared-utils/three/index.js +1 -2
  122. package/libs/shared-utils/three/raycaster.d.ts +2 -0
  123. package/libs/shared-utils/three/raycaster.js +6 -0
  124. package/package.json +2 -2
  125. package/dist/shared-utils/three/getIntersect.d.ts +0 -21
  126. package/dist/shared-utils/three/getRaycaster.d.ts +0 -6
  127. package/libs/shared-utils/three/getIntersect.d.ts +0 -21
  128. package/libs/shared-utils/three/getIntersect.js +0 -24
  129. package/libs/shared-utils/three/getRaycaster.d.ts +0 -6
  130. package/libs/shared-utils/three/getRaycaster.js +0 -12
@@ -1,28 +1,27 @@
1
1
  var g = Object.defineProperty;
2
2
  var d = (s, e, t) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var o = (s, e, t) => (d(s, typeof e != "symbol" ? e + "" : e, t), t);
3
+ var n = (s, e, t) => (d(s, typeof e != "symbol" ? e + "" : e, t), t);
4
4
  import { BaseEditor as p } from "../Base/Editor.js";
5
- import { Sculpt as n } from "../../index.js";
5
+ import { Sculpt as o } from "../../index.js";
6
6
  import { PointMesh as a } from "../../Meshes/Point.js";
7
7
  import { getIntersectByRaycaster as h } from "../../../shared-utils/five/getPosition.js";
8
8
  import "three";
9
9
  import "hammerjs";
10
10
  import "three/examples/jsm/renderers/CSS3DRenderer";
11
- import "@realsee/five/line";
12
- import "../../utils/Modules/Global.js";
11
+ import "../../Meshes/Line.js";
13
12
  import "../../../shared-utils/three/THREESphere.js";
14
13
  import "animejs";
15
- import { notNil as m } from "../../../shared-utils/isNil.js";
14
+ import { notNil as l } from "../../../shared-utils/isNil.js";
16
15
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
17
- class l extends p {
16
+ class m extends p {
18
17
  constructor(t) {
19
18
  super(t);
20
- o(this, "draggingPoints", []);
21
- o(this, "onDragstart", (t) => {
19
+ n(this, "draggingPoints", []);
20
+ n(this, "onDragstart", (t) => {
22
21
  const i = t.target;
23
22
  this.draggingPoints = this.pointMeshes.filter((r) => r.position.equals(i.position));
24
23
  });
25
- o(this, "onDragend", (t) => {
24
+ n(this, "onDragend", (t) => {
26
25
  this.draggingPoints = [];
27
26
  });
28
27
  }
@@ -33,22 +32,22 @@ class l extends p {
33
32
  return this.children;
34
33
  }
35
34
  enable() {
36
- super.enable(), this.points.filter(m).forEach((t) => {
35
+ super.enable(), this.points.filter(l).forEach((t) => {
37
36
  const i = new a();
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);
37
+ i.visible = !1, i.position.copy(t), i.draggable = !0, o.modules.fiveDomEvents.addEventListener(i, "drag", this.onDrag), o.modules.fiveDomEvents.addEventListener(i, "dragstart", this.onDragstart), o.modules.fiveDomEvents.addEventListener(i, "dragend", this.onDragend), this.add(i);
39
38
  });
40
39
  }
41
40
  disable() {
42
41
  super.disable(), this.removeChildren();
43
42
  }
44
43
  }
45
- class O extends l {
44
+ class B extends m {
46
45
  constructor(t) {
47
46
  super(t);
48
- o(this, "onDrag", (t) => {
47
+ n(this, "onDrag", (t) => {
49
48
  if (!this.draggingPoints || this.draggingPoints.length === 0)
50
49
  return;
51
- const i = h(n.modules.five, t.raycaster);
50
+ const i = h(o.modules.five, t.raycaster);
52
51
  this.draggingPoints.forEach((r) => r.position.copy(i.point)), this.originObject.lineMesh.setPoints(this.pointMeshes.map((r) => r.position));
53
52
  });
54
53
  }
@@ -57,6 +56,6 @@ class O extends l {
57
56
  }
58
57
  }
59
58
  export {
60
- O as LineEditor,
61
- l as LineEditorAbstract
59
+ B as LineEditor,
60
+ m as LineEditorAbstract
62
61
  };
@@ -2,33 +2,33 @@ var W = Object.defineProperty, j = Object.defineProperties;
2
2
  var O = Object.getOwnPropertyDescriptors;
3
3
  var C = Object.getOwnPropertySymbols;
4
4
  var A = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
5
- var u = (i, t, e) => t in i ? W(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, P = (i, t) => {
5
+ var u = (s, t, e) => t in s ? W(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, P = (s, t) => {
6
6
  for (var e in t || (t = {}))
7
- A.call(t, e) && u(i, e, t[e]);
7
+ A.call(t, e) && u(s, e, t[e]);
8
8
  if (C)
9
9
  for (var e of C(t))
10
- D.call(t, e) && u(i, e, t[e]);
11
- return i;
12
- }, y = (i, t) => j(i, O(t));
13
- var L = (i, t, e) => (u(i, typeof t != "symbol" ? t + "" : t, e), e);
14
- var x = (i, t, e) => new Promise((s, c) => {
10
+ D.call(t, e) && u(s, e, t[e]);
11
+ return s;
12
+ }, y = (s, t) => j(s, O(t));
13
+ var g = (s, t, e) => (u(s, typeof t != "symbol" ? t + "" : t, e), e);
14
+ var E = (s, t, e) => new Promise((i, c) => {
15
15
  var a = (h) => {
16
16
  try {
17
- m(e.next(h));
17
+ f(e.next(h));
18
18
  } catch (p) {
19
19
  c(p);
20
20
  }
21
21
  }, d = (h) => {
22
22
  try {
23
- m(e.throw(h));
23
+ f(e.throw(h));
24
24
  } catch (p) {
25
25
  c(p);
26
26
  }
27
- }, m = (h) => h.done ? s(h.value) : Promise.resolve(h.value).then(a, d);
28
- m((e = e.apply(i, t)).next());
27
+ }, f = (h) => h.done ? i(h.value) : Promise.resolve(h.value).then(a, d);
28
+ f((e = e.apply(s, t)).next());
29
29
  });
30
30
  import { hotkeys as U } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
31
- import { LineMesh as E } from "../../Meshes/Line.js";
31
+ import { LineMesh as x } from "../../Meshes/Line.js";
32
32
  import { BaseObject as k } from "../Base/index.js";
33
33
  import * as r from "three";
34
34
  import { LineEditor as z } from "./Editor.js";
@@ -37,10 +37,10 @@ import { LineWithDotsMesh as V } from "../../Meshes/LineWithDots.js";
37
37
  import { rayOnLine as F } from "../../utils/three/rayOnLine.js";
38
38
  const T = new r.Vector3();
39
39
  class X extends k {
40
- constructor(e, s) {
41
- super(e, s);
42
- L(this, "type", "Line");
43
- L(this, "lineMesh");
40
+ constructor(e, i) {
41
+ super(e, i);
42
+ g(this, "type", "Line");
43
+ g(this, "lineMesh");
44
44
  e && (this.lineMesh = new V(P(P({}, e.style), e)), this.add(this.lineMesh)), this.editor = new z(this), U("esc", () => {
45
45
  this.stopCreating();
46
46
  });
@@ -64,42 +64,42 @@ class X extends k {
64
64
  (e = this.lineMesh) == null || e.unhighlight();
65
65
  }
66
66
  create(e) {
67
- return x(this, null, function* () {
67
+ return E(this, null, function* () {
68
68
  this.removeChildren();
69
- const s = new V(e);
70
- this.lineMesh = s, this.add(this.lineMesh), yield H(s, this.pointSelector, e), this.editor.enable();
69
+ const i = new V(e);
70
+ this.lineMesh = i, this.add(this.lineMesh), yield H(i, this.pointSelector, e), this.editor.enable();
71
71
  });
72
72
  }
73
73
  }
74
- function H(i, t, e) {
75
- var m;
76
- const s = i.parent;
77
- if (!s)
74
+ function H(s, t, e) {
75
+ var f;
76
+ const i = s.parent;
77
+ if (!i)
78
78
  return;
79
- const c = (m = e == null ? void 0 : e.limit) != null ? m : "none", a = new E(i.style);
80
- s.add(a);
81
- const d = new E(y(P({}, i.style), { dashed: !0 }));
82
- return s.add(d), t.enable(), new Promise((h, p) => {
79
+ const c = (f = e == null ? void 0 : e.limit) != null ? f : "none", a = new x(s.style);
80
+ i.add(a);
81
+ const d = new x(y(P({}, s.style), { dashed: !0, lengthEnable: !1 }));
82
+ return i.add(d), t.enable(), new Promise((h, p) => {
83
83
  const n = [];
84
- let o, f;
85
- const g = (l) => {
84
+ let o, m;
85
+ const L = (l) => {
86
86
  const w = n.length === 0 ? l.point : o.clone();
87
- n.push(w), i.setPoints(n), n.length === 2 && (v(), h());
87
+ n.push(w), s.setPoints(n), n.length === 2 && (b(), h());
88
88
  }, M = (l) => {
89
89
  if (!(n != null && n.length) || !l)
90
90
  return;
91
91
  const w = n.at(-1).clone();
92
- c === "none" ? (o = l.point, a.setPoints([w, o])) : c === "xoz" ? (t.plane = f, f = f != null ? f : new r.Plane().setFromNormalAndCoplanarPoint(new r.Vector3(0, 1, 0), n[0]), o = f.projectPoint(l.point, T), a.setPoints([w, o]), d.setPoints([o, l.point])) : c === "y" && (l.isVirtual ? (o = F({
92
+ c === "none" ? (o = l.point, a.setPoints([w, o])) : c === "xoz" ? (t.plane = m, m = m != null ? m : new r.Plane().setFromNormalAndCoplanarPoint(new r.Vector3(0, 1, 0), n[0]), o = m.projectPoint(l.point, T), a.setPoints([w, o]), d.setPoints([o, l.point])) : c === "y" && (l.isVirtual ? (o = F({
93
93
  raycaster: l.raycaster,
94
94
  line: new r.Line3(n[0].clone(), new r.Vector3(0, 1, 0).add(n[0])),
95
95
  clampToLine: !1
96
96
  }), d.setPoints([])) : (o = new r.Line3(n[0].clone(), new r.Vector3(0, 1, 0).add(n[0])).closestPointToPoint(l.point, !1, T), d.setPoints([o, l.point])), a.setPoints([w, o]));
97
- }, v = () => {
98
- t.off("select", g), t.off("intersectionUpdate", M), t.off("disable", b), t.plane = null, t.disable(), s == null || s.remove(a, d);
99
97
  }, b = () => {
100
- v(), n.length !== 2 && (s == null || s.remove(i)), p(new Error("Cancelled"));
98
+ t.off("select", L), t.off("intersectionUpdate", M), t.off("disable", v), t.plane = null, t.disable(), i == null || i.remove(a, d);
99
+ }, v = () => {
100
+ b(), n.length !== 2 && (i == null || i.remove(s)), p(new Error("Cancelled"));
101
101
  };
102
- t.on("select", g), t.on("intersectionUpdate", M), t.on("disable", b);
102
+ t.on("select", L), t.on("intersectionUpdate", M), t.on("disable", v);
103
103
  });
104
104
  }
105
105
  export {
@@ -1,51 +1,51 @@
1
1
  var F = Object.defineProperty, L = Object.defineProperties;
2
2
  var N = Object.getOwnPropertyDescriptors;
3
- var x = Object.getOwnPropertySymbols;
3
+ var T = Object.getOwnPropertySymbols;
4
4
  var O = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
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) => {
5
+ var u = (s, e, t) => e in s ? F(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, c = (s, e) => {
6
6
  for (var t in e || (e = {}))
7
- O.call(e, t) && w(o, t, e[t]);
8
- if (x)
9
- for (var t of x(e))
10
- U.call(e, t) && w(o, t, e[t]);
11
- return o;
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) => {
7
+ O.call(e, t) && u(s, t, e[t]);
8
+ if (T)
9
+ for (var t of T(e))
10
+ U.call(e, t) && u(s, t, e[t]);
11
+ return s;
12
+ }, y = (s, e) => L(s, N(e));
13
+ var v = (s, e, t) => (u(s, typeof e != "symbol" ? e + "" : e, t), t);
14
+ var W = (s, e, t) => new Promise((f, d) => {
15
15
  var n = (l) => {
16
16
  try {
17
- r(t.next(l));
18
- } catch (s) {
19
- d(s);
17
+ a(t.next(l));
18
+ } catch (o) {
19
+ d(o);
20
20
  }
21
- }, p = (l) => {
21
+ }, P = (l) => {
22
22
  try {
23
- r(t.throw(l));
24
- } catch (s) {
25
- d(s);
23
+ a(t.throw(l));
24
+ } catch (o) {
25
+ d(o);
26
26
  }
27
- }, r = (l) => l.done ? c(l.value) : Promise.resolve(l.value).then(n, p);
28
- r((t = t.apply(o, e)).next());
27
+ }, a = (l) => l.done ? f(l.value) : Promise.resolve(l.value).then(n, P);
28
+ a((t = t.apply(s, 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
- import * as P from "three";
33
- import { PolylineMesh as T } from "../../Meshes/Polyline.js";
34
- import { AreaMesh as A } from "../../Meshes/Area.js";
32
+ import * as m from "three";
33
+ import { PolylineMesh as A } from "../../Meshes/Polyline.js";
34
+ import { AreaMesh as V } 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
- const D = new P.Vector3();
37
+ const D = new m.Vector3();
38
38
  class X extends z {
39
- constructor(t, c) {
40
- super(t, c);
41
- y(this, "type", "Polygon");
42
- y(this, "areaMesh");
43
- this.editor = new B(this), t && (this.areaMesh = new A(u(u({}, t.style), t)), this.add(this.areaMesh)), k("esc", () => {
39
+ constructor(t, f) {
40
+ super(t, f);
41
+ v(this, "type", "Polygon");
42
+ v(this, "areaMesh");
43
+ this.editor = new B(this), t && (this.areaMesh = new V(c(c({}, t.style), t)), this.add(this.areaMesh)), k("esc", () => {
44
44
  this.stopCreating();
45
45
  });
46
46
  }
47
47
  get data() {
48
- return V(u({}, this.baseData), {
48
+ return y(c({}, this.baseData), {
49
49
  points: H(this.applyObjectMatrixWorld(this.areaMesh.points)),
50
50
  style: {
51
51
  color: this.areaMesh.color.getHex(),
@@ -63,54 +63,48 @@ class X extends z {
63
63
  (t = this.areaMesh) == null || t.unhighlight();
64
64
  }
65
65
  create(t) {
66
- return j(this, null, function* () {
66
+ return W(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 c = new A(t);
71
- this.areaMesh = c, this.add(this.areaMesh), yield I(this.areaMesh, this.pointSelector, t), this.editor.enable();
70
+ const f = new V(t);
71
+ this.areaMesh = f, this.add(this.areaMesh), yield I(this.areaMesh, this.pointSelector, t), this.editor.enable();
72
72
  });
73
73
  }
74
74
  }
75
- function I(o, e, t) {
76
- return new Promise((c, d) => {
77
- var M;
78
- const n = o.parent;
75
+ function I(s, e, t) {
76
+ return new Promise((f, d) => {
77
+ var x;
78
+ const n = s.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", 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 });
83
+ const P = (x = t == null ? void 0 : t.limit) != null ? x : "none", a = new A(s.style);
84
+ n == null || n.add(a);
85
+ const l = new A(y(c({}, s.style), { dashed: !0, lengthEnable: !1 }));
92
86
  n == null || n.add(l), e.enable();
93
- const s = [];
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());
87
+ const o = [];
88
+ let i, r, w = !1;
89
+ const M = (h) => {
90
+ const p = o.length === 0 ? h.point : i.clone();
91
+ o.push(p), s.setPoints(o, { closed: !1 }), w && (E(), f());
98
92
  }, b = (h) => {
99
- if (!(s != null && s.length) || !h)
93
+ if (!(o != null && o.length) || !h)
100
94
  return;
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);
104
- const m = s[0], W = 0.2;
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]);
95
+ const p = o.at(-1).clone();
96
+ if (o.length < 3 && (P === "none" ? (i = h.point, a.setPoints([p, i])) : P === "xoz" ? (r = r != null ? r : new m.Plane().setFromNormalAndCoplanarPoint(new m.Vector3(0, 1, 0), o[0]), e.plane = r, i = r.projectPoint(h.point, D), a.setPoints([p, i]), l.setPoints([i, h.point])) : P === "y" && (o.length === 1 ? (i = h.point, a.setPoints([p, i])) : (r = r != null ? r : new m.Plane().setFromCoplanarPoints(o[0], o[1], new m.Vector3(0, 1, 0).add(o[0])), e.plane = r, i = r.projectPoint(h.point, D), a.setPoints([p, i]), l.setPoints([i, h.point])))), o.length >= 3) {
97
+ i = s.projectPoint(h.point);
98
+ const g = o[0], j = 0.2;
99
+ g.distanceTo(i) < j || g.distanceTo(h.point) < j ? (i = g, h.point.copy(g), e.pointSelectorHelper.updateWithIntersect(h, { emitEvent: !1 }), w = !0) : w = !1, a.setPoints([p, i]), l.setPoints([i, h.point]);
106
100
  }
107
- s.length >= 2 && o.setPoints([...s, i], { closed: !1 });
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);
101
+ o.length >= 2 && s.setPoints([...o, i], { closed: !1 });
110
102
  }, E = () => {
111
- v(), n == null || n.remove(o, l, r), d(new Error("Cancelled"));
103
+ e.off("select", M), e.off("intersectionUpdate", b), e.off("disable", C), e.plane = null, e.disable(), n == null || n.remove(a, l);
104
+ }, C = () => {
105
+ E(), n == null || n.remove(s, l, a), d(new Error("Cancelled"));
112
106
  };
113
- e.on("select", C), e.on("intersectionUpdate", b), e.on("disable", E);
107
+ e.on("select", M), e.on("intersectionUpdate", b), e.on("disable", C);
114
108
  });
115
109
  }
116
110
  export {
@@ -1,50 +1,50 @@
1
- var j = Object.defineProperty, E = Object.defineProperties;
1
+ var j = Object.defineProperty, W = Object.defineProperties;
2
2
  var V = Object.getOwnPropertyDescriptors;
3
- var C = Object.getOwnPropertySymbols;
3
+ var L = Object.getOwnPropertySymbols;
4
4
  var A = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
5
- var f = (i, t, e) => t in i ? j(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, w = (i, t) => {
5
+ var w = (n, t, e) => t in n ? j(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
- A.call(t, e) && f(i, e, t[e]);
8
- if (C)
9
- for (var e of C(t))
10
- D.call(t, e) && f(i, e, t[e]);
11
- return i;
12
- }, M = (i, t) => E(i, V(t));
13
- var u = (i, t, e) => (f(i, typeof t != "symbol" ? t + "" : t, e), e);
14
- var L = (i, t, e) => new Promise((n, d) => {
7
+ A.call(t, e) && w(n, e, t[e]);
8
+ if (L)
9
+ for (var e of L(t))
10
+ D.call(t, e) && w(n, e, t[e]);
11
+ return n;
12
+ }, u = (n, t) => W(n, V(t));
13
+ var g = (n, t, e) => (w(n, typeof t != "symbol" ? t + "" : t, e), e);
14
+ var C = (n, t, e) => new Promise((i, p) => {
15
15
  var a = (h) => {
16
16
  try {
17
- P(e.next(h));
17
+ y(e.next(h));
18
18
  } catch (m) {
19
- d(m);
19
+ p(m);
20
20
  }
21
- }, p = (h) => {
21
+ }, d = (h) => {
22
22
  try {
23
- P(e.throw(h));
23
+ y(e.throw(h));
24
24
  } catch (m) {
25
- d(m);
25
+ p(m);
26
26
  }
27
- }, P = (h) => h.done ? n(h.value) : Promise.resolve(h.value).then(a, p);
28
- P((e = e.apply(i, t)).next());
27
+ }, y = (h) => h.done ? i(h.value) : Promise.resolve(h.value).then(a, d);
28
+ y((e = e.apply(n, t)).next());
29
29
  });
30
30
  import { hotkeys as F } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
31
- import { PolylineWithDotsMesh as b, PolylineMesh as W } from "../../Meshes/Polyline.js";
31
+ import { PolylineWithDotsMesh as b, PolylineMesh as x } from "../../Meshes/Polyline.js";
32
32
  import { BaseObject as O } from "../Base/index.js";
33
33
  import * as c from "three";
34
34
  import { PolylineEditor as T } from "./Editor.js";
35
35
  import { vector3ToArray as U } from "../../../shared-utils/three/vector3ToArray.js";
36
- const x = new c.Vector3();
36
+ const E = new c.Vector3();
37
37
  class G extends O {
38
- constructor(e, n) {
39
- super(e, n);
40
- u(this, "type", "Polyline");
41
- u(this, "polyLineMesh");
42
- e && (this.polyLineMesh = new b(w(w({}, e.style), e)), this.add(this.polyLineMesh)), this.editor = new T(this), F("esc", () => {
38
+ constructor(e, i) {
39
+ super(e, i);
40
+ g(this, "type", "Polyline");
41
+ g(this, "polyLineMesh");
42
+ e && (this.polyLineMesh = new b(f(f({}, e.style), e)), this.add(this.polyLineMesh)), this.editor = new T(this), F("esc", () => {
43
43
  this.stopCreating();
44
44
  });
45
45
  }
46
46
  get data() {
47
- return M(w({}, this.baseData), {
47
+ return u(f({}, this.baseData), {
48
48
  points: U(this.applyObjectMatrixWorld(this.polyLineMesh.points)),
49
49
  style: {
50
50
  lineColor: new c.Color(this.polyLineMesh.lineColor).getHex(),
@@ -62,36 +62,36 @@ class G extends O {
62
62
  (e = this.polyLineMesh) == null || e.unhighlight();
63
63
  }
64
64
  create(e) {
65
- return L(this, null, function* () {
65
+ return C(this, null, function* () {
66
66
  this.removeChildren();
67
- const n = new b(e);
68
- this.polyLineMesh = n, this.add(this.polyLineMesh), yield k(n, this.pointSelector, e), this.editor.enable();
67
+ const i = new b(e);
68
+ this.polyLineMesh = i, this.add(this.polyLineMesh), yield k(i, this.pointSelector, e), this.editor.enable();
69
69
  });
70
70
  }
71
71
  }
72
- function k(i, t, e) {
73
- var P;
74
- const n = i.parent;
75
- if (!n)
72
+ function k(n, t, e) {
73
+ var y;
74
+ const i = n.parent;
75
+ if (!i)
76
76
  return;
77
- const d = (P = e == null ? void 0 : e.limit) != null ? P : "none", a = new W(i.style);
78
- n.add(a);
79
- const p = new W({ dashed: !0, lineColor: i.lineColor, lineWidth: i.lineWidth });
80
- return n.add(p), t.enable(), new Promise((h, m) => {
77
+ const p = (y = e == null ? void 0 : e.limit) != null ? y : "none", a = new x(n.style);
78
+ i.add(a);
79
+ const d = new x(u(f({}, n.style), { dashed: !0, lengthEnable: !1 }));
80
+ return i.add(d), t.enable(), new Promise((h, m) => {
81
81
  const o = [];
82
82
  let l, s;
83
- const g = (r) => {
84
- const y = o.length === 0 ? r.point : l.clone();
85
- o.push(y), i.setPoints(o);
83
+ const M = (r) => {
84
+ const P = o.length === 0 ? r.point : l.clone();
85
+ o.push(P), n.setPoints(o);
86
86
  }, v = (r) => {
87
87
  if (!(o != null && o.length) || !r)
88
88
  return;
89
- const y = o.at(-1).clone();
90
- d === "none" ? (l = r.point, a.setPoints([y, l])) : d === "xoz" ? (s = s != null ? s : new c.Plane().setFromNormalAndCoplanarPoint(new c.Vector3(0, 1, 0), o[0]), t.plane = s, l = s.projectPoint(r.point, x), a.setPoints([y, l]), p.setPoints([l, r.point])) : d === "y" && (o.length === 1 ? (l = r.point, a.setPoints([y, l])) : (s = s != null ? s : new c.Plane().setFromCoplanarPoints(o[0], o[1], new c.Vector3(0, 1, 0).add(o[0])), t.plane = s, l = s.projectPoint(r.point, x), a.setPoints([y, l]), p.setPoints([l, r.point])));
89
+ const P = o.at(-1).clone();
90
+ p === "none" ? (l = r.point, a.setPoints([P, l])) : p === "xoz" ? (s = s != null ? s : new c.Plane().setFromNormalAndCoplanarPoint(new c.Vector3(0, 1, 0), o[0]), t.plane = s, l = s.projectPoint(r.point, E), a.setPoints([P, l]), d.setPoints([l, r.point])) : p === "y" && (o.length === 1 ? (l = r.point, a.setPoints([P, l])) : (s = s != null ? s : new c.Plane().setFromCoplanarPoints(o[0], o[1], new c.Vector3(0, 1, 0).add(o[0])), t.plane = s, l = s.projectPoint(r.point, E), a.setPoints([P, l]), d.setPoints([l, r.point])));
91
91
  };
92
- t.on("select", g), t.on("intersectionUpdate", v), t.on("disable", () => {
93
- if (t.off("select", g), t.off("intersectionUpdate", v), t.plane = null, n.remove(a), n.remove(p), o.length < 2)
94
- return n.remove(i), m(new Error("Cancelled"));
92
+ t.on("select", M), t.on("intersectionUpdate", v), t.on("disable", () => {
93
+ if (t.off("select", M), t.off("intersectionUpdate", v), t.plane = null, i.remove(a), i.remove(d), o.length < 2)
94
+ return i.remove(n), m(new Error("Cancelled"));
95
95
  h();
96
96
  });
97
97
  });
@@ -33,7 +33,7 @@ import { IObject3D as U } from "../shared-utils/three/IObject3D.js";
33
33
  import "three";
34
34
  import "hammerjs";
35
35
  import "three/examples/jsm/renderers/CSS3DRenderer";
36
- import "@realsee/five/line";
36
+ import "./Meshes/Line.js";
37
37
  import "../shared-utils/three/THREESphere.js";
38
38
  import "animejs";
39
39
  import { notNil as H } from "../shared-utils/isNil.js";
@@ -0,0 +1 @@
1
+ export declare function getLengthHTML(text: string): string;
@@ -0,0 +1,34 @@
1
+ function i(t) {
2
+ if (!document.getElementById("LineLengthTagStyle")) {
3
+ const e = document.createElement("style");
4
+ e.id = "LineLengthTagStyle", document.head.appendChild(e), e.innerHTML = `
5
+ .LineLengthTag {
6
+ position: absolute;
7
+ pointer-events: none;
8
+ font-size: 20px;
9
+ letter-spacing: 1px;
10
+ color: white;
11
+ left: 50%;
12
+ transform: translate(-50%, -100%);
13
+ }
14
+ .LineLengthTag div:first-child {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ -webkit-text-stroke: 2px black;
19
+ }
20
+ .LineLengthTag div:last-child {
21
+ position: relative;
22
+ }
23
+ `;
24
+ }
25
+ return `
26
+ <div class="LineLengthTag">
27
+ <div>${t}</div>
28
+ <div>${t}</div>
29
+ </div>
30
+ `;
31
+ }
32
+ export {
33
+ i as getLengthHTML
34
+ };
@@ -10,12 +10,12 @@ export default class ColoredMesh<TGeometry extends THREE.Geometry | THREE.Buffer
10
10
  color: THREE.Color;
11
11
  opacity: number;
12
12
  occlusionVisibility: boolean;
13
- occlusionMode: string;
13
+ occlusionMode: "translucence" | "depthTest";
14
14
  };
15
15
  get color(): THREE.Color;
16
16
  get opacity(): number;
17
17
  get occlusionVisibility(): boolean;
18
- get occlusionMode(): "translucence" | "depthTest";
18
+ get occlusionMode(): 'depthTest' | 'translucence';
19
19
  set geometry(geometry: TGeometry);
20
20
  get geometry(): TGeometry;
21
21
  private paramsStyle;
@@ -15,13 +15,12 @@ import { DEFAULT_COLOR as F } from "../../typings/style.js";
15
15
  import { IObject3D as B } from "../../../shared-utils/three/IObject3D.js";
16
16
  import "hammerjs";
17
17
  import "three/examples/jsm/renderers/CSS3DRenderer";
18
- import "@realsee/five/line";
19
- import "../Modules/Global.js";
18
+ import "../../Meshes/Line.js";
20
19
  import "../../../shared-utils/three/THREESphere.js";
21
20
  import "animejs";
22
21
  import { notNil as y } from "../../../shared-utils/isNil.js";
23
22
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
24
- class _ extends B {
23
+ class R extends B {
25
24
  constructor(t) {
26
25
  var h, m;
27
26
  super();
@@ -83,5 +82,5 @@ class _ extends B {
83
82
  }
84
83
  }
85
84
  export {
86
- _ as ColoredMesh
85
+ R as ColoredMesh
87
86
  };
@@ -1,32 +1,31 @@
1
1
  var o = Object.defineProperty;
2
- var s = (e, t, r) => t in e ? o(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var i = (e, t, r) => (s(e, typeof t != "symbol" ? t + "" : t, r), r);
2
+ var s = (i, t, r) => t in i ? o(i, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[t] = r;
3
+ var e = (i, t, r) => (s(i, typeof t != "symbol" ? t + "" : t, r), r);
4
4
  import { Subscribe as l } from "../shared-utils/Subscribe.js";
5
5
  import "three";
6
6
  import "hammerjs";
7
7
  import "three/examples/jsm/renderers/CSS3DRenderer";
8
- import "@realsee/five/line";
9
- import "../Sculpt/utils/Modules/Global.js";
8
+ import "../Sculpt/Meshes/Line.js";
10
9
  import "../shared-utils/three/THREESphere.js";
11
10
  import "animejs";
12
11
  import { FiveUtil as a } from "../shared-utils/Utils/FiveUtil.js";
13
- import { absoluteUrl as m } from "../shared-utils/url/absoluteUrl.js";
12
+ import { absoluteUrl as h } from "../shared-utils/url/absoluteUrl.js";
14
13
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
15
- let x = class {
14
+ let c = class {
16
15
  constructor(t, r) {
17
16
  /**
18
17
  * @realsee/dnalogel 版本号
19
18
  */
20
- i(this, "VERSION", "3.47.3");
21
- i(this, "NAME");
22
- i(this, "five");
23
- i(this, "workUtil");
24
- i(this, "fiveUtil");
19
+ e(this, "VERSION", "3.47.5");
20
+ e(this, "NAME");
21
+ e(this, "five");
22
+ e(this, "workUtil");
23
+ e(this, "fiveUtil");
25
24
  /**
26
25
  * @description: 插件事件钩子
27
26
  */
28
- i(this, "hooks", new l());
29
- i(this, "staticPrefix", "//vr-image-4.realsee-cdn.cn");
27
+ e(this, "hooks", new l());
28
+ e(this, "staticPrefix", "//vr-image-4.realsee-cdn.cn");
30
29
  this.updateFive(t), r != null && r.staticPrefix && (this.staticPrefix = r.staticPrefix);
31
30
  }
32
31
  set workCode(t) {
@@ -48,11 +47,11 @@ let x = class {
48
47
  * @description: 获取静态资源的url
49
48
  */
50
49
  absoluteUrl(t) {
51
- return m(this.staticPrefix, t);
50
+ return h(this.staticPrefix, t);
52
51
  }
53
52
  onWorkCodeChange() {
54
53
  }
55
54
  };
56
55
  export {
57
- x as Controller
56
+ c as Controller
58
57
  };