@realsee/dnalogel 3.44.5 → 3.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/Sculpt/Meshes/Area.d.ts +1 -1
  3. package/dist/Sculpt/Meshes/Box.d.ts +1 -1
  4. package/dist/Sculpt/Meshes/Circle.d.ts +1 -1
  5. package/dist/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
  6. package/dist/Sculpt/Meshes/Line.d.ts +8 -2
  7. package/dist/Sculpt/Meshes/LineWithDots.d.ts +1 -1
  8. package/dist/Sculpt/Meshes/Point.d.ts +1 -1
  9. package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
  10. package/dist/Sculpt/Meshes/Prism.d.ts +1 -1
  11. package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
  12. package/dist/Sculpt/Objects/Line/Editor.d.ts +22 -0
  13. package/dist/Sculpt/Objects/Line/index.d.ts +33 -0
  14. package/dist/Sculpt/Objects/Point/index.d.ts +1 -1
  15. package/dist/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
  16. package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -2
  17. package/dist/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
  18. package/dist/Sculpt/Objects/Polyline/index.d.ts +7 -6
  19. package/dist/Sculpt/index.d.ts +5 -0
  20. package/dist/Sculpt/typings/index.d.ts +11 -6
  21. package/dist/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
  22. package/dist/Sculpt/typings/utils.type.d.ts +2 -0
  23. package/dist/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
  24. package/dist/Sculpt/utils/three/rayOnLine.d.ts +3 -5
  25. package/dist/index.cjs.js +56 -56
  26. package/dist/index.js +29820 -29686
  27. package/dist/index.umd.js +49 -49
  28. package/dist/shared-utils/Utils/WorkUtil.d.ts +6 -6
  29. package/dist/shared-utils/tag.d.ts +6 -3
  30. package/libs/AreaMakerPlugin/Controller.js +150 -78
  31. package/libs/AreaMakerPlugin/index.js +76 -4
  32. package/libs/AreaMakerPlugin/utils/Item.js +190 -111
  33. package/libs/CSS3DRenderPlugin/Controller.js +89 -29
  34. package/libs/CSS3DRenderPlugin/index.js +75 -15
  35. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +132 -58
  36. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +181 -116
  37. package/libs/CruisePlugin/BaseController.js +121 -49
  38. package/libs/CruisePlugin/Move.js +73 -21
  39. package/libs/CruisePlugin/Work.js +98 -46
  40. package/libs/CruisePlugin/index.js +79 -27
  41. package/libs/CurrentPanoImagePlugin/Controller.js +176 -104
  42. package/libs/CurrentPanoImagePlugin/index.js +76 -4
  43. package/libs/GuideLinePlugin/Controller.js +82 -30
  44. package/libs/GuideLinePlugin/GuideLineItem.js +82 -30
  45. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
  46. package/libs/GuideLinePlugin/GuideLineModeItem.js +81 -29
  47. package/libs/GuideLinePlugin/index.js +79 -27
  48. package/libs/ModelMakerPlugin/Controller.js +140 -83
  49. package/libs/ModelMakerPlugin/index.js +75 -18
  50. package/libs/ModelTVVideoPlugin/Plugin.js +117 -57
  51. package/libs/ModelTVVideoPlugin/index.js +68 -8
  52. package/libs/Object3DHelperPlugin/Controller.js +54 -31
  53. package/libs/Object3DHelperPlugin/index.js +35 -13
  54. package/libs/PanoCompassPlugin/Controller.js +97 -42
  55. package/libs/PanoCompassPlugin/index.js +71 -16
  56. package/libs/PanoDoorLabelPlugin/BaseController.js +98 -26
  57. package/libs/PanoDoorLabelPlugin/Controller.js +187 -115
  58. package/libs/PanoDoorLabelPlugin/index.js +76 -4
  59. package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -89
  60. package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -127
  61. package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -73
  62. package/libs/PanoMeasurePlugin/Controller/WatchController.js +167 -92
  63. package/libs/PanoMeasurePlugin/Controller/index.js +110 -65
  64. package/libs/PanoMeasurePlugin/Model/area.js +114 -38
  65. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +78 -0
  66. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -46
  67. package/libs/PanoMeasurePlugin/index.js +77 -32
  68. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +98 -20
  69. package/libs/PanoSpatialTagPlugin/Plugin.js +210 -150
  70. package/libs/PanoSpatialTagPlugin/index.js +66 -6
  71. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +133 -53
  72. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +295 -216
  73. package/libs/PanoTagPlugin/Components/Tag/index.js +257 -187
  74. package/libs/PanoTagPlugin/Components/TagContainer.js +157 -87
  75. package/libs/PanoTagPlugin/Components/TagItem.js +144 -74
  76. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +73 -3
  77. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +109 -39
  78. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +105 -35
  79. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +113 -43
  80. package/libs/PanoTagPlugin/controller/TagRender.js +132 -80
  81. package/libs/PanoTagPlugin/controller/TagUtil.js +136 -84
  82. package/libs/PanoTagPlugin/controller/index.js +113 -61
  83. package/libs/PanoTagPlugin/index.js +89 -37
  84. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +121 -41
  85. package/libs/PanoVideoPlugin/Controller.js +137 -65
  86. package/libs/PanoVideoPlugin/VideoMeshController.js +149 -69
  87. package/libs/PanoVideoPlugin/index.js +82 -10
  88. package/libs/PipelinePlugin/Controller.js +199 -128
  89. package/libs/PipelinePlugin/index.js +76 -5
  90. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +102 -22
  91. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +95 -15
  92. package/libs/PipelinePlugin/utils/Objects/Pipe.js +136 -56
  93. package/libs/Sculpt/Meshes/Area.d.ts +1 -1
  94. package/libs/Sculpt/Meshes/Box.d.ts +1 -1
  95. package/libs/Sculpt/Meshes/Box.js +16 -15
  96. package/libs/Sculpt/Meshes/Circle.d.ts +1 -1
  97. package/libs/Sculpt/Meshes/Circle.js +1 -1
  98. package/libs/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
  99. package/libs/Sculpt/Meshes/Cylinder.js +8 -7
  100. package/libs/Sculpt/Meshes/Line.d.ts +8 -2
  101. package/libs/Sculpt/Meshes/Line.js +93 -65
  102. package/libs/Sculpt/Meshes/LineWithDots.d.ts +1 -1
  103. package/libs/Sculpt/Meshes/LineWithDots.js +26 -26
  104. package/libs/Sculpt/Meshes/Point.d.ts +1 -1
  105. package/libs/Sculpt/Meshes/Point.js +7 -6
  106. package/libs/Sculpt/Meshes/Polygon.js +1 -1
  107. package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
  108. package/libs/Sculpt/Meshes/Polyline.js +5 -4
  109. package/libs/Sculpt/Meshes/Prism.d.ts +1 -1
  110. package/libs/Sculpt/Meshes/Rectangle.js +3 -2
  111. package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
  112. package/libs/Sculpt/Objects/Box/index.js +41 -43
  113. package/libs/Sculpt/Objects/Cylinder/index.js +35 -37
  114. package/libs/Sculpt/Objects/Line/Editor.d.ts +22 -0
  115. package/libs/Sculpt/Objects/Line/Editor.js +62 -0
  116. package/libs/Sculpt/Objects/Line/index.d.ts +33 -0
  117. package/libs/Sculpt/Objects/Line/index.js +107 -0
  118. package/libs/Sculpt/Objects/Point/index.d.ts +1 -1
  119. package/libs/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
  120. package/libs/Sculpt/Objects/Polygon/Editor.js +5 -5
  121. package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -2
  122. package/libs/Sculpt/Objects/Polygon/index.js +80 -80
  123. package/libs/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
  124. package/libs/Sculpt/Objects/Polyline/Editor.js +10 -48
  125. package/libs/Sculpt/Objects/Polyline/index.d.ts +7 -6
  126. package/libs/Sculpt/Objects/Polyline/index.js +63 -58
  127. package/libs/Sculpt/Objects/Prism/index.js +56 -58
  128. package/libs/Sculpt/index.d.ts +5 -0
  129. package/libs/Sculpt/index.js +58 -48
  130. package/libs/Sculpt/typings/index.d.ts +11 -6
  131. package/libs/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
  132. package/libs/Sculpt/typings/utils.type.d.ts +2 -0
  133. package/libs/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
  134. package/libs/Sculpt/utils/three/ColoredMesh.js +15 -14
  135. package/libs/Sculpt/utils/three/rayOnLine.d.ts +3 -5
  136. package/libs/Sculpt/utils/three/rayOnLine.js +15 -14
  137. package/libs/base/BasePlugin.js +14 -13
  138. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +131 -61
  139. package/libs/floorplan/MapviewFloorplanPlugin/index.js +75 -6
  140. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +129 -59
  141. package/libs/floorplan/ModelFloorplanPlugin/index.js +75 -5
  142. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +158 -86
  143. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +76 -4
  144. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +151 -81
  145. package/libs/floorplan/TopviewFloorplanPlugin/index.js +75 -5
  146. package/libs/floorplan/index.js +1 -0
  147. package/libs/index.js +194 -192
  148. package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
  149. package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +23 -23
  150. package/libs/shared-utils/Utils/WorkUtil.d.ts +6 -6
  151. package/libs/shared-utils/Utils/WorkUtil.js +8 -7
  152. package/libs/shared-utils/five/index.js +3 -2
  153. package/libs/shared-utils/five/lookObject.js +3 -2
  154. package/libs/shared-utils/logger.js +1 -1
  155. package/libs/shared-utils/tag.d.ts +6 -3
  156. package/libs/shared-utils/tag.js +38 -24
  157. package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +15 -15
  158. package/libs/shared-utils/three/index.js +1 -0
  159. package/package.json +1 -1
  160. package/dist/Sculpt/typings/SimplifyDeep.d.ts +0 -3
  161. package/libs/Sculpt/typings/SimplifyDeep.d.ts +0 -3
  162. /package/libs/Sculpt/{utils/color.js → typings/style.js} +0 -0
@@ -1,34 +1,37 @@
1
1
  var E = Object.defineProperty;
2
- var a = Object.getOwnPropertySymbols;
3
- var w = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable;
4
- var u = (o, l, e) => l in o ? E(o, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[l] = e, f = (o, l) => {
5
- for (var e in l || (l = {}))
6
- w.call(l, e) && u(o, e, l[e]);
7
- if (a)
8
- for (var e of a(l))
9
- H.call(l, e) && u(o, e, l[e]);
10
- return o;
2
+ var L = Object.getOwnPropertySymbols;
3
+ var S = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
4
+ var f = (l, o, e) => o in l ? E(l, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[o] = e, y = (l, o) => {
5
+ for (var e in o || (o = {}))
6
+ S.call(o, e) && f(l, e, o[e]);
7
+ if (L)
8
+ for (var e of L(o))
9
+ k.call(o, e) && f(l, e, o[e]);
10
+ return l;
11
11
  };
12
- var s = (o, l, e) => (u(o, typeof l != "symbol" ? l + "" : l, e), e);
13
- import * as d from "three";
14
- import { DEFAULT_LINE_COLOR as b, DEFAULT_LINE_WIDTH as C, DEFAULT_HIGHLIGHT_OPACITY as _ } from "../utils/color.js";
15
- import { LineGeometry as k, LineMaterial as D, THREE_Line2 as M } from "../../shared-utils/five/FiveLine.js";
16
- import { anyPositionToVector3 as R } from "../../shared-utils/positionToVector3.js";
17
- import { IObject3D as x } from "../../shared-utils/three/IObject3D.js";
12
+ var h = (l, o, e) => (f(l, typeof o != "symbol" ? o + "" : o, e), e);
13
+ import * as a from "three";
14
+ import { DEFAULT_LINE_COLOR as b, DEFAULT_LINE_WIDTH as M, DEFAULT_HIGHLIGHT_OPACITY as D } from "../typings/style.js";
15
+ import { LineGeometry as T, LineMaterial as w, THREE_Line2 as H } from "../../shared-utils/five/FiveLine.js";
16
+ import { anyPositionToVector3 as C } from "../../shared-utils/positionToVector3.js";
17
+ import { IObject3D as I } from "../../shared-utils/three/IObject3D.js";
18
18
  import "hammerjs";
19
19
  import "three/examples/jsm/renderers/CSS3DRenderer";
20
+ import { centerPoint as R } from "../../shared-utils/three/centerPoint.js";
21
+ import { LightTag as x } from "../../shared-utils/tag.js";
22
+ import { globalModules as p } from "../utils/Modules/Global.js";
20
23
  import "../../shared-utils/three/THREESphere.js";
21
24
  import "animejs";
22
- import { notNil as h } from "../../shared-utils/isNil.js";
25
+ import { notNil as c } from "../../shared-utils/isNil.js";
23
26
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
24
- class S extends D {
27
+ class _ extends w {
25
28
  constructor(e) {
26
- var t, i;
29
+ var n, t;
27
30
  super(e);
28
- s(this, "_three_color");
29
- h(e == null ? void 0 : e.color) && (this.three_color = (t = e == null ? void 0 : e.color) != null ? t : 16777215), Object.keys(e).forEach((n) => {
30
- ["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(n) || n in this && (this[n] = e[n]);
31
- }), this.setDashed((i = e == null ? void 0 : e.dashed) != null ? i : !1);
31
+ h(this, "_three_color");
32
+ c(e == null ? void 0 : e.color) && (this.three_color = (n = e == null ? void 0 : e.color) != null ? n : 16777215), Object.keys(e).forEach((i) => {
33
+ ["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(i) || i in this && (this[i] = e[i]);
34
+ }), this.setDashed((t = e == null ? void 0 : e.dashed) != null ? t : !1);
32
35
  }
33
36
  get three_color() {
34
37
  return this._three_color;
@@ -37,52 +40,62 @@ class S extends D {
37
40
  this._three_color = e, this.color = e;
38
41
  }
39
42
  setDashed(e) {
40
- e ? this.defines.USE_DASH = "" : delete this.defines.USE_DASH, this.needsUpdate = !0;
43
+ this.dashed = e, e ? this.defines.USE_DASH = "" : delete this.defines.USE_DASH, this.needsUpdate = !0;
41
44
  }
42
45
  }
43
- class T extends M {
44
- constructor(e, t) {
45
- super(e, t);
46
- s(this, "name", "Line3");
46
+ class m extends H {
47
+ constructor(e, n) {
48
+ super(e, n);
49
+ h(this, "name", "Line3");
47
50
  }
48
51
  }
49
- class F extends x {
52
+ class $ extends I {
50
53
  constructor(e) {
51
- var c, r, y, L, g;
54
+ var s, r, u, g, d;
52
55
  super();
53
- s(this, "name", "LineMesh");
54
- s(this, "points");
55
- s(this, "highlighted", !1);
56
- s(this, "line");
57
- s(this, "backLine");
58
- s(this, "opacityBeforeHighlight");
59
- s(this, "paramsStyle", {});
56
+ h(this, "name", "LineMesh");
57
+ h(this, "points");
58
+ h(this, "lengthDoms", []);
59
+ h(this, "highlighted", !1);
60
+ h(this, "line");
61
+ h(this, "backLine");
62
+ h(this, "opacityBeforeHighlight");
63
+ h(this, "paramsStyle", {});
60
64
  this.paramsStyle = e != null ? e : {};
61
- const t = new k(), i = new S({
62
- color: new d.Color((c = e == null ? void 0 : e.lineColor) != null ? c : b),
63
- linewidth: (r = e == null ? void 0 : e.lineWidth) != null ? r : C,
65
+ const n = new T(), t = new _({
66
+ color: new a.Color((s = e == null ? void 0 : e.lineColor) != null ? s : b),
67
+ linewidth: (r = e == null ? void 0 : e.lineWidth) != null ? r : M,
64
68
  dashScale: 40,
65
- opacity: (y = e == null ? void 0 : e.opacity) != null ? y : 1,
69
+ opacity: (u = e == null ? void 0 : e.opacity) != null ? u : 1,
66
70
  transparent: !0,
67
- dashed: (L = e == null ? void 0 : e.dashed) != null ? L : !1
68
- }), n = new S({
69
- color: new d.Color((g = e == null ? void 0 : e.lineColor) != null ? g : b),
70
- linewidth: i == null ? void 0 : i.linewidth,
71
- dashScale: i.dashScale,
71
+ dashed: (g = e == null ? void 0 : e.dashed) != null ? g : !1
72
+ }), i = new _({
73
+ color: new a.Color((d = e == null ? void 0 : e.lineColor) != null ? d : b),
74
+ linewidth: t.linewidth * 0.9,
75
+ dashScale: t.dashScale,
76
+ opacity: t.opacity * 0.8,
72
77
  depthTest: !1,
73
78
  depthWrite: !1,
74
79
  transparent: !0,
75
- opacity: i.opacity * 0.2,
76
- dashed: i.dashed,
77
- resolution: i.resolution
80
+ resolution: t.resolution
78
81
  });
79
- this.line = new T(t, i), this.backLine = new T(t, n), 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);
82
+ this.line = new m(n, t), this.backLine = new m(n, i), 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);
83
+ }
84
+ get style() {
85
+ return {
86
+ lineColor: this.color,
87
+ lineWidth: this.lineWidth,
88
+ dashed: this.dashed,
89
+ occlusionVisibility: this.occlusionVisibility,
90
+ occlusionMode: this.occlusionMode,
91
+ lengthEnable: this.paramsStyle.lengthEnable
92
+ };
80
93
  }
81
94
  get lineWidth() {
82
95
  return this.line.material.linewidth;
83
96
  }
84
97
  get color() {
85
- return new d.Color(this.line.material.three_color);
98
+ return new a.Color(this.line.material.three_color);
86
99
  }
87
100
  get dashed() {
88
101
  return this.line.material.dashed;
@@ -94,32 +107,47 @@ class F extends x {
94
107
  return this.line.material.depthTest === !1 ? "depthTest" : "translucence";
95
108
  }
96
109
  setPoints(e) {
97
- const t = e.map(R).filter(h);
98
- if (this.points = t, t.length < 2)
110
+ const n = e.map(C).filter(c);
111
+ if (this.points = n, n.length < 2)
99
112
  return;
100
113
  this.addIfNotExists(this.line, this.backLine);
101
- const i = t.flatMap((n) => [n.x, n.y, n.z]);
102
- i.length > 2 && (this.line.geometry.dispose(), this.line.geometry = new k(), this.backLine.geometry = this.line.geometry), this.line.geometry.setPositions(i), this.line.computeLineDistances(), this.needsRender = !0;
114
+ const t = n.flatMap((i) => [i.x, i.y, i.z]);
115
+ t.length > 2 && (this.line.geometry.dispose(), this.line.geometry = new T(), this.backLine.geometry = this.line.geometry), this.line.geometry.setPositions(t), this.line.computeLineDistances(), this.updateLengthItems(), this.needsRender = !0;
103
116
  }
104
- setResolution(e, t) {
105
- const i = this.line.material.resolution;
106
- (i.x !== e || i.y !== t) && (i.set(e, t), this.needsRender = !0);
107
- const n = this.backLine.material.resolution;
108
- (n.x !== e || n.y !== t) && (n.set(e, t), this.needsRender = !0);
117
+ setResolution(e, n) {
118
+ const t = this.line.material.resolution;
119
+ (t.x !== e || t.y !== n) && (t.set(e, n), this.needsRender = !0);
120
+ const i = this.backLine.material.resolution;
121
+ (i.x !== e || i.y !== n) && (i.set(e, n), this.needsRender = !0);
109
122
  }
110
123
  setStyle(e) {
111
- var n, c, r;
112
- this.paramsStyle = f(f({}, this.paramsStyle), e), h(e.lineColor) && (this.line.material.three_color = new d.Color(e.lineColor), this.backLine.material.three_color = new d.Color(e.lineColor)), h(e.lineWidth) && (this.line.material.linewidth = e.lineWidth, this.backLine.material.linewidth = e.lineWidth), h(e.dashed) && (this.line.material.setDashed(e.dashed), this.backLine.material.setDashed(e.dashed)), h(e.opacity) && (this.line.material.opacity = e.opacity, this.backLine.material.opacity = e.opacity * 0.2);
113
- const t = (n = e.occlusionVisibility) != null ? n : this.paramsStyle.occlusionVisibility, i = (r = (c = e.occlusionMode) != null ? c : this.paramsStyle.occlusionMode) != null ? r : "translucence";
114
- h(t) && (t ? i === "depthTest" ? (this.line.material.depthTest = !1, this.backLine.visible = !1) : i === "translucence" && (this.line.material.depthTest = !0, this.backLine.visible = !0) : (this.line.material.depthTest = !0, this.backLine.visible = !1)), this.needsRender = !0;
124
+ var i, s, r;
125
+ this.paramsStyle = y(y({}, this.paramsStyle), e), c(e.lineColor) && (this.line.material.three_color = new a.Color(e.lineColor), this.backLine.material.three_color = new a.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.2), this.updateLengthItems();
126
+ const n = (i = e.occlusionVisibility) != null ? i : this.paramsStyle.occlusionVisibility, t = (r = (s = e.occlusionMode) != null ? s : this.paramsStyle.occlusionMode) != null ? r : "translucence";
127
+ n ? 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;
115
128
  }
116
129
  highlight() {
117
- this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.line.material.opacity, this.line.material.opacity = this.opacityBeforeHighlight * _, this.backLine.material.opacity = this.backLine.material.opacity * _, this.needsRender = !0);
130
+ this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.line.material.opacity, this.line.material.opacity = this.opacityBeforeHighlight * D, this.backLine.material.opacity = this.backLine.material.opacity * D, this.needsRender = !0);
118
131
  }
119
132
  unhighlight() {
120
133
  this.highlighted && (this.highlighted = !1, this.line.material.opacity = this.opacityBeforeHighlight, this.backLine.material.opacity = 0.2, this.needsRender = !0);
121
134
  }
135
+ updateLengthItems() {
136
+ var e, n;
137
+ if (this.paramsStyle.lengthEnable) {
138
+ const t = (n = (e = this.points) == null ? void 0 : e.map((i, s) => {
139
+ if (s !== 0)
140
+ return [this.points[s - 1], i];
141
+ }).filter(c)) != null ? n : [];
142
+ t.forEach(([i, s], r) => {
143
+ var d;
144
+ const u = R(i, s), g = i.distanceTo(s).toFixed(2) + "m";
145
+ this.lengthDoms[r] = (d = this.lengthDoms[r]) != null ? d : new x(p.five), this.lengthDoms[r].setPosition(u), this.lengthDoms[r].container.innerHTML = `<div style="pointer-events:none;">${g}</div>`;
146
+ }), this.lengthDoms.length > t.length && (this.lengthDoms.slice(t.length).forEach((i) => i.destroy()), this.lengthDoms.length = t.length);
147
+ } else
148
+ this.lengthDoms.forEach((t) => t.destroy()), this.lengthDoms = [];
149
+ }
122
150
  }
123
151
  export {
124
- F as LineMesh
152
+ $ as LineMesh
125
153
  };
@@ -15,7 +15,7 @@ type Style = LineMeshStyle & {
15
15
  export declare class LineWithDotsMesh extends LineMesh {
16
16
  name: string;
17
17
  pointGroup: IObject3D;
18
- style: Style;
18
+ private _paramsStyle;
19
19
  get startPoint(): PointMesh;
20
20
  get endPoint(): PointMesh;
21
21
  get visiblePointMeshes(): PointMesh[];
@@ -1,35 +1,35 @@
1
- var f = Object.defineProperty, g = Object.defineProperties;
2
- var c = Object.getOwnPropertyDescriptors;
3
- var y = Object.getOwnPropertySymbols;
4
- var b = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
5
- var n = (s, i, t) => i in s ? f(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t, o = (s, i) => {
1
+ var m = Object.defineProperty, d = Object.defineProperties;
2
+ var f = Object.getOwnPropertyDescriptors;
3
+ var a = Object.getOwnPropertySymbols;
4
+ var g = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
5
+ var n = (s, i, t) => i in s ? m(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t, o = (s, i) => {
6
6
  for (var t in i || (i = {}))
7
- b.call(i, t) && n(s, t, i[t]);
8
- if (y)
9
- for (var t of y(i))
10
- P.call(i, t) && n(s, t, i[t]);
7
+ g.call(i, t) && n(s, t, i[t]);
8
+ if (a)
9
+ for (var t of a(i))
10
+ c.call(i, t) && n(s, t, i[t]);
11
11
  return s;
12
- }, r = (s, i) => g(s, c(i));
12
+ }, r = (s, i) => d(s, f(i));
13
13
  var e = (s, i, t) => (n(s, typeof i != "symbol" ? i + "" : i, t), t);
14
- import { anyPositionToVector3 as M } from "../../shared-utils/positionToVector3.js";
15
- import { PointMesh as m } from "./Point.js";
14
+ import { anyPositionToVector3 as b } from "../../shared-utils/positionToVector3.js";
15
+ import { PointMesh as P } from "./Point.js";
16
16
  import "three";
17
17
  import "hammerjs";
18
18
  import "three/examples/jsm/renderers/CSS3DRenderer";
19
- import { LineMesh as V } from "./Line.js";
19
+ import { LineMesh as S } from "./Line.js";
20
20
  import "../../shared-utils/three/THREESphere.js";
21
21
  import "animejs";
22
- import { notNil as u } from "../../shared-utils/isNil.js";
22
+ import { notNil as y } from "../../shared-utils/isNil.js";
23
23
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
24
- import { IObject3D as E } from "../../shared-utils/three/IObject3D.js";
25
- class R extends V {
24
+ import { IObject3D as M } from "../../shared-utils/three/IObject3D.js";
25
+ class N extends S {
26
26
  constructor(t) {
27
27
  super();
28
28
  e(this, "name", "LineWithDotsMesh");
29
- e(this, "pointGroup", new E());
30
- e(this, "style");
29
+ e(this, "pointGroup", new M());
30
+ e(this, "_paramsStyle");
31
31
  e(this, "setStyle", (t) => {
32
- super.setStyle(t), this.style = o(o({}, this.style), t), this.pointMeshes.forEach((h) => h.setStyle(r(o({}, this.style), { color: t.lineColor }))), this.updateEdgePointsVisibility(), this.needsRender = !0;
32
+ super.setStyle(t), this._paramsStyle = o(o({}, this._paramsStyle), t), this.pointMeshes.forEach((h) => h.setStyle(r(o({}, this._paramsStyle), { color: t.lineColor }))), this.updateEdgePointsVisibility(), this.needsRender = !0;
33
33
  });
34
34
  e(this, "highlight", () => {
35
35
  super.highlight(), this.pointMeshes.forEach((t) => t.highlight());
@@ -39,7 +39,7 @@ class R extends V {
39
39
  });
40
40
  e(this, "updateEdgePointsVisibility", () => {
41
41
  var t;
42
- u((t = this.style) == null ? void 0 : t.pointVisibility) && (this.startPoint && (this.startPoint.visible = typeof this.style.pointVisibility == "object" ? this.style.pointVisibility.startPoint : this.style.pointVisibility), this.endPoint && (this.endPoint.visible = typeof this.style.pointVisibility == "object" ? this.style.pointVisibility.endPoint : this.style.pointVisibility));
42
+ y((t = this._paramsStyle) == null ? void 0 : t.pointVisibility) && (this.startPoint && (this.startPoint.visible = typeof this._paramsStyle.pointVisibility == "object" ? this._paramsStyle.pointVisibility.startPoint : this._paramsStyle.pointVisibility), this.endPoint && (this.endPoint.visible = typeof this._paramsStyle.pointVisibility == "object" ? this._paramsStyle.pointVisibility.endPoint : this._paramsStyle.pointVisibility));
43
43
  });
44
44
  this.add(this.pointGroup), t && this.setStyle(t), t != null && t.points && this.setPoints(t.points);
45
45
  }
@@ -57,14 +57,14 @@ class R extends V {
57
57
  }
58
58
  setPoints(t) {
59
59
  super.setPoints(t);
60
- const h = t.map(M).filter(u);
61
- this.pointGroup.removeChildren(), this.addIfNotExists(this.pointGroup), h.forEach((d) => {
62
- var p;
63
- const l = new m(r(o({}, this.style), { color: (p = this.style) == null ? void 0 : p.lineColor }));
64
- l.position.copy(d), this.pointGroup.add(l);
60
+ const h = t.map(b).filter(y);
61
+ this.pointGroup.removeChildren(), this.addIfNotExists(this.pointGroup), h.forEach((u) => {
62
+ var l;
63
+ const p = new P(r(o({}, this.style), { color: (l = this._paramsStyle) == null ? void 0 : l.lineColor }));
64
+ p.position.copy(u), this.pointGroup.add(p);
65
65
  }), this.updateEdgePointsVisibility(), this.needsRender = !0;
66
66
  }
67
67
  }
68
68
  export {
69
- R as LineWithDotsMesh
69
+ N as LineWithDotsMesh
70
70
  };
@@ -1,5 +1,5 @@
1
1
  import * as THREE from 'three';
2
- import { type ColorStyle, type OcclusionStyle } from '../utils/color';
2
+ import { type ColorStyle, type OcclusionStyle } from '../typings/style';
3
3
  import { IObject3D } from '../../shared-utils/three/IObject3D';
4
4
  import type { PointData } from '../utils/data';
5
5
  export type { PointData } from '../utils/data';
@@ -12,19 +12,20 @@ var n = (i, e, t) => e in i ? C(i, e, { enumerable: !0, configurable: !0, writab
12
12
  }, g = (i, e) => N(i, P(e));
13
13
  var A = (i, e, t) => (n(i, typeof e != "symbol" ? e + "" : e, t), t);
14
14
  import * as o from "three";
15
- import { DEFAULT_HIGHLIGHT_OPACITY as b } from "../utils/color.js";
16
- import { IObject3D as E } from "../../shared-utils/three/IObject3D.js";
17
- import { anyPositionToVector3 as m } from "../../shared-utils/positionToVector3.js";
15
+ import { DEFAULT_HIGHLIGHT_OPACITY as b } from "../typings/style.js";
16
+ import { IObject3D as m } from "../../shared-utils/three/IObject3D.js";
17
+ import { anyPositionToVector3 as E } from "../../shared-utils/positionToVector3.js";
18
18
  import "hammerjs";
19
19
  import "three/examples/jsm/renderers/CSS3DRenderer";
20
20
  import "@realsee/five/line";
21
+ import "../utils/Modules/Global.js";
21
22
  import "../../shared-utils/three/THREESphere.js";
22
23
  import "animejs";
23
24
  import { notNil as u } from "../../shared-utils/isNil.js";
24
25
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
25
26
  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==";
26
27
  let w = null;
27
- class O extends E {
28
+ class T extends m {
28
29
  constructor(t) {
29
30
  var f, a;
30
31
  super();
@@ -52,7 +53,7 @@ class O extends E {
52
53
  depthTest: !1,
53
54
  opacity: 0.5
54
55
  })), s = new o.Points(l, r), h = new o.Points(l, V);
55
- this.fontMesh = s, this.backgroundMesh = h, s.name = "FontMesh", h.name = "BackgroundMesh", s.renderOrder = 10, h.renderOrder = 0, this.add(s, h), t != null && t.point && this.position.copy(m(t.point)), t && this.setStyle(t);
56
+ this.fontMesh = s, this.backgroundMesh = h, s.name = "FontMesh", h.name = "BackgroundMesh", s.renderOrder = 10, h.renderOrder = 0, this.add(s, h), t != null && t.point && this.position.copy(E(t.point)), t && this.setStyle(t);
56
57
  }
57
58
  get color() {
58
59
  return this.fontMesh.material.color;
@@ -71,5 +72,5 @@ class O extends E {
71
72
  }
72
73
  }
73
74
  export {
74
- O as PointMesh
75
+ T as PointMesh
75
76
  };
@@ -3,7 +3,7 @@ var p = (o, i, e) => i in o ? l(o, i, { enumerable: !0, configurable: !0, writab
3
3
  var t = (o, i, e) => (p(o, typeof i != "symbol" ? i + "" : i, e), e);
4
4
  import * as r from "three";
5
5
  import { generatePolygonGeometry as g } from "../../shared-utils/three/generatePolygonGeometry.js";
6
- import { DEFAULT_HIGHLIGHT_OPACITY as a } from "../utils/color.js";
6
+ import { DEFAULT_HIGHLIGHT_OPACITY as a } from "../typings/style.js";
7
7
  import { anyPositionToVector3 as f } from "../../shared-utils/positionToVector3.js";
8
8
  import { ColoredMesh as y } from "../utils/three/ColoredMesh.js";
9
9
  import { getGeometryInfo as d } from "../../shared-utils/three/geometryUtil.js";
@@ -1,6 +1,6 @@
1
1
  import type { AnyPositions } from '../../shared-utils/positionToVector3';
2
2
  import { PolylineMesh } from './Polyline';
3
- import type { LineStyle } from '../utils/color';
3
+ import type { LineStyle } from '../typings/style';
4
4
  import PolygonMesh, { type PolygonData, type PolygonStyle } from './Polygon';
5
5
  import * as THREE from 'three';
6
6
  export type PolygonWithEdgeMeshStyle = PolygonStyle & LineStyle;
@@ -26,6 +26,7 @@ import * as H from "three";
26
26
  import "hammerjs";
27
27
  import "three/examples/jsm/renderers/CSS3DRenderer";
28
28
  import "@realsee/five/line";
29
+ import "../utils/Modules/Global.js";
29
30
  import "../../shared-utils/three/THREESphere.js";
30
31
  import "animejs";
31
32
  import { notNil as I } from "../../shared-utils/isNil.js";
@@ -97,19 +98,19 @@ class v extends F {
97
98
  this.lines.forEach((i) => i.unhighlight());
98
99
  }
99
100
  }
100
- class Y extends v {
101
+ class Z extends v {
101
102
  constructor(...i) {
102
103
  super(c(a({}, i[0]), { withDots: !1 }));
103
104
  l(this, "name", "PolylineMesh");
104
105
  }
105
106
  }
106
- class Z extends v {
107
+ class _ extends v {
107
108
  constructor(...i) {
108
109
  super(c(a({}, i[0]), { withDots: !0 }));
109
110
  l(this, "name", "PolylineWithDotsMesh");
110
111
  }
111
112
  }
112
113
  export {
113
- Y as PolylineMesh,
114
- Z as PolylineWithDotsMesh
114
+ Z as PolylineMesh,
115
+ _ as PolylineWithDotsMesh
115
116
  };
@@ -2,7 +2,7 @@ import { IObject3D } from '../../shared-utils/three/IObject3D';
2
2
  import { type AnyPosition, type AnyPositions } from '../../shared-utils/positionToVector3';
3
3
  import type { AreaData } from './Area';
4
4
  import * as THREE from 'three';
5
- import type { LineStyle } from '../utils/color';
5
+ import type { LineStyle } from '../typings/style';
6
6
  import type { ColoredMeshStyle } from '../utils/three/ColoredMesh';
7
7
  import { PolygonWithEdgeMesh } from './PolygonWithEdge';
8
8
  export type PrismStyle = ColoredMeshStyle & LineStyle;
@@ -6,6 +6,7 @@ import * as u from "three";
6
6
  import "hammerjs";
7
7
  import "three/examples/jsm/renderers/CSS3DRenderer";
8
8
  import "@realsee/five/line";
9
+ import "../utils/Modules/Global.js";
9
10
  import "../../shared-utils/three/THREESphere.js";
10
11
  import "animejs";
11
12
  import { notNil as s } from "../../shared-utils/isNil.js";
@@ -14,7 +15,7 @@ import { PolygonMesh as f } from "./Polygon.js";
14
15
  import { RectangleGeometry as g } from "../utils/three/RectangleGeometry.js";
15
16
  import { getBetterNormal as d } from "../utils/getBetterNormal.js";
16
17
  import { Sculpt as v } from "../index.js";
17
- class B extends f {
18
+ class G extends f {
18
19
  constructor(t) {
19
20
  super(t);
20
21
  i(this, "name", "RectangleMesh");
@@ -46,5 +47,5 @@ class B extends f {
46
47
  }
47
48
  }
48
49
  export {
49
- B as RectangleMesh
50
+ G as RectangleMesh
50
51
  };
@@ -1,8 +1,7 @@
1
1
  import type { AnyPositions } from '../../shared-utils/positionToVector3';
2
2
  import { RectangleMesh, type RectangleData, type RectangleStyle } from './Rectangle';
3
3
  import { PolylineMesh } from './Polyline';
4
- import type { LineStyle } from '../utils/color';
5
- import * as THREE from 'three';
4
+ import type { LineStyle } from '../typings/style';
6
5
  export type RectangleWithEdgeMeshStyle = RectangleStyle & LineStyle;
7
6
  /**
8
7
  * @description: 带边线的矩形
@@ -10,8 +9,8 @@ export type RectangleWithEdgeMeshStyle = RectangleStyle & LineStyle;
10
9
  export declare class RectangleWithEdgeMesh extends RectangleMesh {
11
10
  name: string;
12
11
  get lineWidth(): number;
13
- get lineColor(): THREE.Color;
14
- protected line: PolylineMesh;
12
+ get lineColor(): import("three").Color;
13
+ line: PolylineMesh;
15
14
  constructor(params?: Partial<RectangleWithEdgeMeshStyle & RectangleData>);
16
15
  setPoints(points: AnyPositions): void;
17
16
  setStyle(style: Partial<RectangleWithEdgeMeshStyle>): void;
@@ -1,31 +1,31 @@
1
- var B = Object.defineProperty, E = Object.defineProperties;
1
+ var E = Object.defineProperty, v = Object.defineProperties;
2
2
  var C = Object.getOwnPropertyDescriptors;
3
- var y = Object.getOwnPropertySymbols;
3
+ var u = Object.getOwnPropertySymbols;
4
4
  var H = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
5
- var p = (o, e, t) => e in o ? B(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, c = (o, e) => {
5
+ var b = (o, e, t) => e in o ? E(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, c = (o, e) => {
6
6
  for (var t in e || (e = {}))
7
- H.call(e, t) && p(o, t, e[t]);
8
- if (y)
9
- for (var t of y(e))
10
- O.call(e, t) && p(o, t, e[t]);
7
+ H.call(e, t) && b(o, t, e[t]);
8
+ if (u)
9
+ for (var t of u(e))
10
+ O.call(e, t) && b(o, t, e[t]);
11
11
  return o;
12
- }, M = (o, e) => E(o, C(e));
13
- var d = (o, e, t) => (p(o, typeof e != "symbol" ? e + "" : e, t), t);
14
- var b = (o, e, t) => new Promise((r, i) => {
15
- var h = (s) => {
12
+ }, M = (o, e) => v(o, C(e));
13
+ var d = (o, e, t) => (b(o, typeof e != "symbol" ? e + "" : e, t), t);
14
+ var p = (o, e, t) => new Promise((n, i) => {
15
+ var a = (s) => {
16
16
  try {
17
- n(t.next(s));
18
- } catch (a) {
19
- i(a);
17
+ r(t.next(s));
18
+ } catch (h) {
19
+ i(h);
20
20
  }
21
21
  }, m = (s) => {
22
22
  try {
23
- n(t.throw(s));
24
- } catch (a) {
25
- i(a);
23
+ r(t.throw(s));
24
+ } catch (h) {
25
+ i(h);
26
26
  }
27
- }, n = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(h, m);
28
- n((t = t.apply(o, e)).next());
27
+ }, r = (s) => s.done ? n(s.value) : Promise.resolve(s.value).then(a, m);
28
+ r((t = t.apply(o, e)).next());
29
29
  });
30
30
  import { hotkeys as L } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
31
31
  import { BaseObject as W } from "../Base/index.js";
@@ -36,11 +36,10 @@ import { createRectangle as R } from "../Rectangle/index.js";
36
36
  import { LineMesh as T } from "../../Meshes/Line.js";
37
37
  import { getNormal as U } from "../../../shared-utils/three/getNormal.js";
38
38
  import { rayOnLine as k } from "../../utils/three/rayOnLine.js";
39
- import { Sculpt as z } from "../../index.js";
40
- import { vector3ToArray as v } from "../../../shared-utils/three/vector3ToArray.js";
41
- class Z extends W {
42
- constructor(t, r) {
43
- super(t, r);
39
+ import { vector3ToArray as B } from "../../../shared-utils/three/vector3ToArray.js";
40
+ class X extends W {
41
+ constructor(t, n) {
42
+ super(t, n);
44
43
  d(this, "type", "Box");
45
44
  d(this, "boxMesh");
46
45
  this.editor = new N(this), t && (this.boxMesh = new w(c(c({}, t.style), t)), this.add(this.boxMesh)), L("esc", () => {
@@ -49,8 +48,8 @@ class Z extends W {
49
48
  }
50
49
  get data() {
51
50
  return M(c({}, this.baseData), {
52
- points: v(this.applyObjectMatrixWorld(this.boxMesh.bottomPlane.points)),
53
- heightPoint: v(this.applyObjectMatrixWorld(this.boxMesh.heightPoint)),
51
+ points: B(this.applyObjectMatrixWorld(this.boxMesh.bottomPlane.points)),
52
+ heightPoint: B(this.applyObjectMatrixWorld(this.boxMesh.heightPoint)),
54
53
  style: {
55
54
  color: this.boxMesh.color.getHex(),
56
55
  lineWidth: this.boxMesh.lineWidth,
@@ -67,41 +66,40 @@ class Z extends W {
67
66
  (t = this.boxMesh) == null || t.unhighlight();
68
67
  }
69
68
  create(t) {
70
- return b(this, null, function* () {
71
- this.removeChildren(), this.boxMesh = new w(t), this.add(this.boxMesh), yield A(this.boxMesh, this.pointSelector), this.editor.enable();
69
+ return p(this, null, function* () {
70
+ this.removeChildren(), this.boxMesh = new w(t), this.add(this.boxMesh), yield z(this.boxMesh, this.pointSelector), this.editor.enable();
72
71
  });
73
72
  }
74
73
  }
75
- function A(o, e) {
76
- return b(this, null, function* () {
77
- return yield R(o.bottomPlane, e), new Promise((t, r) => {
74
+ function z(o, e) {
75
+ return p(this, null, function* () {
76
+ return yield R(o.bottomPlane, e), new Promise((t, n) => {
78
77
  const i = o.parent;
79
78
  if (!i) {
80
- r(new Error("No container"));
79
+ n(new Error("No container"));
81
80
  return;
82
81
  }
83
- const h = new T(), m = U(o.bottomPlane.points).normalize(), n = o.bottomPlane.builtPoints.at(-1), s = n.clone().add(m.clone().multiplyScalar(10)), a = n.clone().sub(m.clone().multiplyScalar(10));
84
- h.setPoints([s, a]), i.add(h), e.enable();
82
+ const a = new T(), m = U(o.bottomPlane.points).normalize(), r = o.bottomPlane.builtPoints.at(-1), s = r.clone().add(m.clone().multiplyScalar(10)), h = r.clone().sub(m.clone().multiplyScalar(10));
83
+ a.setPoints([s, h]), i.add(a), e.enable();
85
84
  const f = (l) => {
86
85
  g(), t();
87
86
  }, x = (l) => {
88
87
  if (!(l != null && l.raycaster))
89
88
  return;
90
- const u = k({
91
- cameraPosition: z.modules.five.camera.position,
89
+ const P = k({
92
90
  raycaster: l.raycaster,
93
- line: new j.Line3(s, a)
91
+ line: new j.Line3(s, h)
94
92
  });
95
- u && o.setPoints({ heightPoint: u });
93
+ P && o.setPoints({ heightPoint: P });
96
94
  }, g = () => {
97
- e.off("select", f), e.off("intersectionUpdate", x), e.off("disable", P), e.disable(), i == null || i.remove(h);
98
- }, P = () => {
99
- g(), i == null || i.remove(o), r(new Error("Cancelled"));
95
+ e.off("select", f), e.off("intersectionUpdate", x), e.off("disable", y), e.disable(), i == null || i.remove(a);
96
+ }, y = () => {
97
+ g(), i == null || i.remove(o), n(new Error("Cancelled"));
100
98
  };
101
- e.on("select", f), e.on("intersectionUpdate", x), e.on("disable", P);
99
+ e.on("select", f), e.on("intersectionUpdate", x), e.on("disable", y);
102
100
  });
103
101
  });
104
102
  }
105
103
  export {
106
- Z as Box
104
+ X as Box
107
105
  };