@realsee/dnalogel 3.50.17-alpha.0 → 3.51.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 (118) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/ModelMakerPlugin/Controller.d.ts +2 -0
  3. package/dist/Sculpt/utils/export.d.ts +18 -0
  4. package/dist/index.cjs.js +207 -207
  5. package/dist/index.js +34866 -34775
  6. package/dist/index.umd.js +211 -211
  7. package/dist/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
  8. package/dist/shared-utils/index.d.ts +1 -0
  9. package/dist/shared-utils/tag.d.ts +40 -1
  10. package/dist/shared-utils/three/temp.d.ts +2 -2
  11. package/libs/AreaMakerPlugin/Controller.js +100 -46
  12. package/libs/AreaMakerPlugin/index.js +64 -10
  13. package/libs/AreaMakerPlugin/utils/Item.js +156 -100
  14. package/libs/CSS3DRenderPlugin/Controller.js +93 -44
  15. package/libs/CSS3DRenderPlugin/index.js +62 -13
  16. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +105 -49
  17. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +130 -77
  18. package/libs/CruisePlugin/BaseController.js +143 -89
  19. package/libs/CruisePlugin/Move.js +83 -39
  20. package/libs/CruisePlugin/Work.js +95 -51
  21. package/libs/CruisePlugin/index.js +66 -22
  22. package/libs/CurrentPanoImagePlugin/Controller.js +139 -85
  23. package/libs/CurrentPanoImagePlugin/index.js +63 -9
  24. package/libs/GuideLinePlugin/Controller.js +57 -13
  25. package/libs/GuideLinePlugin/GuideLineItem.js +63 -19
  26. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +6 -2
  27. package/libs/GuideLinePlugin/GuideLineModeItem.js +58 -14
  28. package/libs/GuideLinePlugin/index.js +66 -22
  29. package/libs/ModelMakerPlugin/Controller.d.ts +2 -0
  30. package/libs/ModelMakerPlugin/Controller.js +190 -129
  31. package/libs/ModelMakerPlugin/index.js +63 -21
  32. package/libs/ModelMakerPlugin/item/baseItem.js +4 -2
  33. package/libs/ModelMakerPlugin/item/boxItem.js +5 -3
  34. package/libs/ModelMakerPlugin/item/polygonItem.js +9 -7
  35. package/libs/ModelMakerPlugin/item/prismItem.js +5 -3
  36. package/libs/ModelTVVideoPlugin/Plugin.js +96 -47
  37. package/libs/ModelTVVideoPlugin/index.js +55 -6
  38. package/libs/Object3DHelperPlugin/Controller.js +42 -25
  39. package/libs/Object3DHelperPlugin/index.js +28 -12
  40. package/libs/PanoCompassPlugin/Controller.js +92 -44
  41. package/libs/PanoCompassPlugin/index.js +63 -15
  42. package/libs/PanoDoorLabelPlugin/BaseController.js +79 -25
  43. package/libs/PanoDoorLabelPlugin/Controller.js +132 -78
  44. package/libs/PanoDoorLabelPlugin/index.js +63 -9
  45. package/libs/PanoMeasurePlugin/Components/Controller0.js +126 -77
  46. package/libs/PanoMeasurePlugin/Components/Controller1.js +139 -90
  47. package/libs/PanoMeasurePlugin/Controller/EditController.js +120 -71
  48. package/libs/PanoMeasurePlugin/Controller/WatchController.js +120 -70
  49. package/libs/PanoMeasurePlugin/Controller/index.js +132 -86
  50. package/libs/PanoMeasurePlugin/Model/area.js +72 -22
  51. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +56 -0
  52. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +64 -15
  53. package/libs/PanoMeasurePlugin/index.js +62 -16
  54. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +57 -2
  55. package/libs/PanoRulerProPlugin/Controller.js +88 -33
  56. package/libs/PanoRulerProPlugin/RulerItems.js +146 -91
  57. package/libs/PanoRulerProPlugin/index.js +64 -9
  58. package/libs/PanoSpatialTagPlugin/Plugin.js +177 -128
  59. package/libs/PanoSpatialTagPlugin/index.js +53 -4
  60. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +116 -60
  61. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +192 -136
  62. package/libs/PanoTagPlugin/Components/Tag/index.js +194 -139
  63. package/libs/PanoTagPlugin/Components/TagContainer.js +112 -57
  64. package/libs/PanoTagPlugin/Components/TagItem.js +204 -149
  65. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +157 -101
  66. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +75 -20
  67. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +86 -31
  68. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +93 -37
  69. package/libs/PanoTagPlugin/controller/TagRender.js +62 -18
  70. package/libs/PanoTagPlugin/controller/TagUtil.js +123 -79
  71. package/libs/PanoTagPlugin/controller/index.js +110 -72
  72. package/libs/PanoTagPlugin/index.js +72 -28
  73. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +77 -21
  74. package/libs/PanoVideoPlugin/Controller.js +95 -41
  75. package/libs/PanoVideoPlugin/VideoMeshController.js +119 -63
  76. package/libs/PanoVideoPlugin/index.js +66 -12
  77. package/libs/PipelinePlugin/Controller.js +173 -119
  78. package/libs/PipelinePlugin/index.js +63 -9
  79. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +70 -14
  80. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +58 -2
  81. package/libs/PipelinePlugin/utils/Objects/Pipe.js +98 -42
  82. package/libs/Sculpt/Meshes/Box.js +3 -2
  83. package/libs/Sculpt/Meshes/Cylinder.js +10 -6
  84. package/libs/Sculpt/Meshes/Line.js +43 -38
  85. package/libs/Sculpt/Meshes/LineWithDots.js +14 -10
  86. package/libs/Sculpt/Meshes/Point.js +24 -20
  87. package/libs/Sculpt/Meshes/Polygon.js +5 -2
  88. package/libs/Sculpt/Meshes/Prism.js +19 -16
  89. package/libs/Sculpt/Objects/Line/Editor.js +6 -5
  90. package/libs/Sculpt/index.js +15 -14
  91. package/libs/Sculpt/utils/export.d.ts +18 -0
  92. package/libs/Sculpt/utils/export.js +21 -0
  93. package/libs/Sculpt/utils/three/ColoredMesh.js +26 -22
  94. package/libs/base/BasePlugin.js +14 -10
  95. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +146 -94
  96. package/libs/floorplan/MapviewFloorplanPlugin/index.js +62 -10
  97. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +109 -56
  98. package/libs/floorplan/ModelFloorplanPlugin/index.js +62 -9
  99. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +116 -63
  100. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +62 -9
  101. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +105 -52
  102. package/libs/floorplan/TopviewFloorplanPlugin/index.js +62 -9
  103. package/libs/floorplan/index.js +4 -0
  104. package/libs/index.js +208 -206
  105. package/libs/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
  106. package/libs/shared-utils/five/fiveEveryReadyListener.js +15 -0
  107. package/libs/shared-utils/five/index.js +6 -2
  108. package/libs/shared-utils/five/lookObject.js +31 -27
  109. package/libs/shared-utils/index.d.ts +1 -0
  110. package/libs/shared-utils/index.js +19 -17
  111. package/libs/shared-utils/logger.js +1 -1
  112. package/libs/shared-utils/tag.d.ts +40 -1
  113. package/libs/shared-utils/tag.js +139 -86
  114. package/libs/shared-utils/three/index.js +4 -0
  115. package/libs/shared-utils/three/temp.d.ts +2 -2
  116. package/libs/shared-utils/three/temp.js +4 -4
  117. package/package.json +1 -1
  118. package/README.md +0 -116
@@ -1,20 +1,20 @@
1
1
  var T = Object.defineProperty;
2
- var p = Object.getOwnPropertySymbols;
2
+ var b = Object.getOwnPropertySymbols;
3
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
- for (var e in o || (o = {}))
6
- w.call(o, e) && m(r, e, o[e]);
7
- if (p)
8
- for (var e of p(o))
9
- k.call(o, e) && m(r, e, o[e]);
4
+ var m = (r, s, e) => s in r ? T(r, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[s] = e, g = (r, s) => {
5
+ for (var e in s || (s = {}))
6
+ w.call(s, e) && m(r, e, s[e]);
7
+ if (b)
8
+ for (var e of b(s))
9
+ k.call(s, e) && m(r, e, s[e]);
10
10
  return r;
11
11
  };
12
- var h = (r, o, e) => (m(r, typeof o != "symbol" ? o + "" : o, e), e);
12
+ var h = (r, s, e) => (m(r, typeof s != "symbol" ? s + "" : s, e), e);
13
13
  import * as f from "three";
14
14
  import { DEFAULT_LINE_COLOR as L, 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";
15
+ import { LineMaterial as v, THREE_Line2 as H } from "../../shared-utils/five/FiveLine.js";
16
+ import { LineGeometry as p } from "../../vendor/three/examples/jsm/lines/LineGeometry.js";
17
+ import { anyPositionToVector3 as I } from "../../shared-utils/positionToVector3.js";
18
18
  import { IObject3D as x } from "../../shared-utils/three/IObject3D.js";
19
19
  import { LightTag as R } from "../../shared-utils/tag.js";
20
20
  import "hammerjs";
@@ -28,13 +28,17 @@ import "../../shared-utils/three/core/Sphere.js";
28
28
  import "animejs";
29
29
  import { notNil as c } from "../../shared-utils/isNil.js";
30
30
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
31
- class D extends H {
31
+ import "./Polygon.js";
32
+ import "../utils/Modules/Global.js";
33
+ import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
34
+ import "../utils/three/rayOnLine.js";
35
+ class D extends v {
32
36
  constructor(e) {
33
37
  var i, t;
34
38
  super(e);
35
39
  h(this, "_three_color");
36
- 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) => {
37
- ["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(s) || s in this && (this[s] = e[s]);
40
+ c(e == null ? void 0 : e.color) && (this.three_color = (i = e == null ? void 0 : e.color) != null ? i : 16777215), Object.keys(e).forEach((o) => {
41
+ ["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(o) || o in this && (this[o] = e[o]);
38
42
  }), this.setDashed((t = e == null ? void 0 : e.dashed) != null ? t : !1);
39
43
  }
40
44
  get three_color() {
@@ -47,13 +51,13 @@ class D extends H {
47
51
  this.dashed = e, e ? this.defines.USE_DASH = "" : delete this.defines.USE_DASH, this.needsUpdate = !0;
48
52
  }
49
53
  }
50
- class E extends I {
54
+ class E extends H {
51
55
  constructor(e, i) {
52
56
  super(e, i);
53
57
  h(this, "name", "Line3");
54
58
  }
55
59
  }
56
- class te extends x {
60
+ class ne extends x {
57
61
  constructor(e) {
58
62
  var l, d, a, u, n;
59
63
  super();
@@ -68,14 +72,14 @@ class te extends x {
68
72
  h(this, "lastRenderDomItem");
69
73
  h(this, "_visible", !0);
70
74
  this.paramsStyle = e != null ? e : {};
71
- const i = new b(), t = new D({
75
+ const i = new p(), t = new D({
72
76
  color: new f.Color((l = e == null ? void 0 : e.lineColor) != null ? l : L),
73
77
  linewidth: (d = e == null ? void 0 : e.lineWidth) != null ? d : C,
74
78
  dashScale: 40,
75
79
  opacity: (a = e == null ? void 0 : e.opacity) != null ? a : 1,
76
80
  transparent: !0,
77
81
  dashed: (u = e == null ? void 0 : e.dashed) != null ? u : !1
78
- }), s = new D({
82
+ }), o = new D({
79
83
  color: new f.Color((n = e == null ? void 0 : e.lineColor) != null ? n : L),
80
84
  linewidth: t.linewidth * 0.9,
81
85
  dashScale: t.dashScale,
@@ -85,7 +89,7 @@ class te extends x {
85
89
  transparent: !0,
86
90
  resolution: t.resolution
87
91
  });
88
- 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", () => {
92
+ this.line = new E(i, t), this.backLine = new E(i, o), this.line.renderOrder = 1, this.backLine.renderOrder = 0, this.line.name = "lineFrontMaterial", this.backLine.name = "lineBackMaterial", e && this.setStyle(e), e != null && e.points && this.setPoints(e.points), this.addEventListener("removed", () => {
89
93
  O(this);
90
94
  }), Object.defineProperty(this, "visible", {
91
95
  set: (y) => {
@@ -129,36 +133,37 @@ class te extends x {
129
133
  return this.paramsStyle.occlusionMode;
130
134
  }
131
135
  get five() {
132
- var e, i;
133
- return (i = (e = window.globalModules) == null ? void 0 : e.five) != null ? i : window.$five;
136
+ var i, t;
137
+ const e = (t = (i = window.globalModules) == null ? void 0 : i.five) != null ? t : window.$five;
138
+ return e || console.error("请先调用 Sculpt.modules.init(five) "), e;
134
139
  }
135
140
  updateMatrixWorld(e) {
136
141
  var i;
137
142
  if (super.updateMatrixWorld(e), this.points) {
138
- const t = (i = _(this, this.points)) == null ? void 0 : i.map((s) => s.toArray().join(",")).join(",");
143
+ const t = (i = _(this, this.points)) == null ? void 0 : i.map((o) => o.toArray().join(",")).join(",");
139
144
  t !== this.lastRenderDomItem && (this.updateDomItems(), this.lastRenderDomItem = t);
140
145
  }
141
146
  }
142
147
  setPoints(e) {
143
- const i = e.map(v).filter(c);
148
+ const i = e.map(I).filter(c);
144
149
  if (this.points = i, i.length < 2) {
145
- this.line.geometry = new b(), this.backLine.geometry = this.line.geometry, this.updateDomItems();
150
+ this.line.geometry = new p(), this.backLine.geometry = this.line.geometry, this.updateDomItems();
146
151
  return;
147
152
  }
148
153
  this.addIfNotExists(this.line, this.backLine);
149
- const t = i.flatMap((s) => [s.x, s.y, s.z]);
150
- 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;
154
+ const t = i.flatMap((o) => [o.x, o.y, o.z]);
155
+ t.length > 2 && (this.line.geometry.dispose(), this.line.geometry = new p(), this.backLine.geometry = this.line.geometry), this.line.geometry.setPositions(t), this.line.computeLineDistances(), this.updateDomItems(), this.needsRender = !0;
151
156
  }
152
157
  setResolution(e, i) {
153
158
  const t = this.line.material.resolution;
154
159
  (t.x !== e || t.y !== i) && (t.set(e, i), this.needsRender = !0);
155
- const s = this.backLine.material.resolution;
156
- (s.x !== e || s.y !== i) && (s.set(e, i), this.needsRender = !0);
160
+ const o = this.backLine.material.resolution;
161
+ (o.x !== e || o.y !== i) && (o.set(e, i), this.needsRender = !0);
157
162
  }
158
163
  setStyle(e) {
159
- var s, l, d;
164
+ var o, l, d;
160
165
  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();
161
- const i = (s = e.occlusionVisibility) != null ? s : this.paramsStyle.occlusionVisibility, t = (d = (l = e.occlusionMode) != null ? l : this.paramsStyle.occlusionMode) != null ? d : "translucence";
166
+ const i = (o = e.occlusionVisibility) != null ? o : this.paramsStyle.occlusionVisibility, t = (d = (l = e.occlusionMode) != null ? l : this.paramsStyle.occlusionMode) != null ? d : "translucence";
162
167
  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;
163
168
  }
164
169
  highlight() {
@@ -175,17 +180,17 @@ class te extends x {
175
180
  return e();
176
181
  if (!this.five)
177
182
  return console.error("Five not found");
178
- const i = this.points.map((t, s) => {
179
- if (s !== 0)
180
- return [this.points[s - 1], t];
183
+ const i = this.points.map((t, o) => {
184
+ if (o !== 0)
185
+ return [this.points[o - 1], t];
181
186
  }).filter(c).map((t) => _(this, t));
182
- i.forEach(([t, s], l) => {
187
+ i.forEach(([t, o], l) => {
183
188
  var u;
184
- const d = W(t, s);
189
+ const d = W(t, o);
185
190
  this.doms[l] = (u = this.doms[l]) != null ? u : (() => {
186
191
  const n = new R(this.five);
187
192
  return n.intersectCheck = !1, n.simulate3D = !0, n;
188
- })(), this.doms[l].setPosition(d, [t, s]);
193
+ })(), this.doms[l].setPosition(d, [t, o]);
189
194
  const a = (n) => {
190
195
  var y;
191
196
  this.doms[l].__text !== n && (this.doms[l].__text = n, n ? this.doms[l].container.innerHTML = P(n, {
@@ -195,12 +200,12 @@ class te extends x {
195
200
  if (this.paramsStyle.tip)
196
201
  a(this.paramsStyle.tip);
197
202
  else {
198
- const n = t.distanceTo(s).toFixed(2);
203
+ const n = t.distanceTo(o).toFixed(2);
199
204
  a(n === "0.00" ? null : n + "m");
200
205
  }
201
206
  }), this.doms.length > i.length && (this.doms.slice(i.length).forEach((t) => t.destroy()), this.doms.length = i.length);
202
207
  }
203
208
  }
204
209
  export {
205
- te as LineMesh
210
+ ne as LineMesh
206
211
  };
@@ -1,12 +1,12 @@
1
1
  var u = Object.defineProperty, d = Object.defineProperties;
2
2
  var f = Object.getOwnPropertyDescriptors;
3
- var a = Object.getOwnPropertySymbols;
3
+ var m = Object.getOwnPropertySymbols;
4
4
  var g = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
5
5
  var n = (s, i, t) => i in s ? u(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
7
  g.call(i, t) && n(s, t, i[t]);
8
- if (a)
9
- for (var t of a(i))
8
+ if (m)
9
+ for (var t of m(i))
10
10
  c.call(i, t) && n(s, t, i[t]);
11
11
  return s;
12
12
  }, r = (s, i) => d(s, f(i));
@@ -21,10 +21,14 @@ import "three/examples/jsm/renderers/CSS3DRenderer";
21
21
  import { LineMesh as S } from "./Line.js";
22
22
  import "../../shared-utils/three/core/Sphere.js";
23
23
  import "animejs";
24
- import { notNil as y } from "../../shared-utils/isNil.js";
24
+ import { notNil as a } from "../../shared-utils/isNil.js";
25
25
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
26
26
  import { IObject3D as M } from "../../shared-utils/three/IObject3D.js";
27
- class W extends S {
27
+ import "./Polygon.js";
28
+ import "../utils/Modules/Global.js";
29
+ import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
30
+ import "../utils/three/rayOnLine.js";
31
+ class q extends S {
28
32
  constructor(t) {
29
33
  super();
30
34
  e(this, "name", "LineWithDotsMesh");
@@ -41,7 +45,7 @@ class W extends S {
41
45
  });
42
46
  e(this, "updateEdgePointsVisibility", () => {
43
47
  var t;
44
- 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));
48
+ a((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));
45
49
  });
46
50
  this.add(this.pointGroup), t && this.setStyle(t), t != null && t.points && this.setPoints(t.points);
47
51
  }
@@ -59,14 +63,14 @@ class W extends S {
59
63
  }
60
64
  setPoints(t) {
61
65
  super.setPoints(t);
62
- const h = t.map(b).filter(y);
63
- this.pointGroup.removeChildren(), this.addIfNotExists(this.pointGroup), h.forEach((m) => {
66
+ const h = t.map(b).filter(a);
67
+ this.pointGroup.removeChildren(), this.addIfNotExists(this.pointGroup), h.forEach((y) => {
64
68
  var l;
65
69
  const p = new P(r(o({}, this.style), { color: (l = this._paramsStyle) == null ? void 0 : l.lineColor, tip: void 0 }));
66
- p.position.copy(m), this.pointGroup.add(p);
70
+ p.position.copy(y), this.pointGroup.add(p);
67
71
  }), this.updateEdgePointsVisibility(), this.needsRender = !0;
68
72
  }
69
73
  }
70
74
  export {
71
- W as LineWithDotsMesh
75
+ q as LineWithDotsMesh
72
76
  };
@@ -9,7 +9,7 @@ var f = (e, i, t) => i in e ? N(e, i, { enumerable: !0, configurable: !0, writab
9
9
  for (var t of d(i))
10
10
  V.call(i, t) && f(e, t, i[t]);
11
11
  return e;
12
- }, a = (e, i) => k(e, D(i));
12
+ }, m = (e, i) => k(e, D(i));
13
13
  var y = (e, i) => {
14
14
  var t = {};
15
15
  for (var o in e)
@@ -20,7 +20,7 @@ var y = (e, i) => {
20
20
  return t;
21
21
  };
22
22
  var s = (e, i, t) => (f(e, typeof i != "symbol" ? i + "" : i, t), t);
23
- import * as h from "three";
23
+ import * as r from "three";
24
24
  import { DEFAULT_HIGHLIGHT_OPACITY as I } from "../typings/style.js";
25
25
  import { IObject3D as W } from "../../shared-utils/three/IObject3D.js";
26
26
  import { anyPositionToVector3 as x } from "../../shared-utils/positionToVector3.js";
@@ -37,11 +37,15 @@ import "../../shared-utils/three/core/Sphere.js";
37
37
  import "animejs";
38
38
  import { notNil as c } from "../../shared-utils/isNil.js";
39
39
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
40
+ import "./Polygon.js";
41
+ import "../utils/Modules/Global.js";
42
+ import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
43
+ import "../utils/three/rayOnLine.js";
40
44
  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==";
41
45
  let C = null;
42
- class tt extends W {
46
+ class st extends W {
43
47
  constructor(t) {
44
- var w, p;
48
+ var p, w;
45
49
  super();
46
50
  s(this, "name", "PointMesh");
47
51
  s(this, "dom");
@@ -52,27 +56,27 @@ class tt extends W {
52
56
  s(this, "lastRenderDomItem");
53
57
  s(this, "paramsStyle");
54
58
  s(this, "_visible", !0);
55
- const M = t != null ? t : {}, { point: o } = M, r = y(M, ["point"]);
56
- this.paramsStyle = r != null ? r : {};
57
- const l = new h.BufferGeometry();
58
- l.setAttribute("position", new h.Float32BufferAttribute([0, 0, 0], 3));
59
- const m = {
59
+ const M = t != null ? t : {}, { point: o } = M, h = y(M, ["point"]);
60
+ this.paramsStyle = h != null ? h : {};
61
+ const l = new r.BufferGeometry();
62
+ l.setAttribute("position", new r.Float32BufferAttribute([0, 0, 0], 3));
63
+ const a = {
60
64
  transparent: !0,
61
- side: h.DoubleSide,
62
- size: (w = t == null ? void 0 : t.size) != null ? w : 8,
63
- map: C || (C = new h.TextureLoader().load(H)),
65
+ side: r.DoubleSide,
66
+ size: (p = t == null ? void 0 : t.size) != null ? p : 8,
67
+ map: C || (C = new r.TextureLoader().load(H)),
64
68
  sizeAttenuation: !1
65
- }, u = new h.PointsMaterial(a(g({}, m), {
66
- color: (p = t == null ? void 0 : t.color) != null ? p : 16777215,
69
+ }, u = new r.PointsMaterial(m(g({}, a), {
70
+ color: (w = t == null ? void 0 : t.color) != null ? w : 16777215,
67
71
  depthTest: !0,
68
72
  opacity: 1
69
- })), P = new h.PointsMaterial(a(g({}, m), {
73
+ })), P = new r.PointsMaterial(m(g({}, a), {
70
74
  size: u.size,
71
75
  color: u.color,
72
76
  depthWrite: !1,
73
77
  depthTest: !1,
74
78
  opacity: 0.5
75
- })), n = new h.Points(l, u), A = new h.Points(l, P);
79
+ })), n = new r.Points(l, u), A = new r.Points(l, P);
76
80
  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", () => {
77
81
  E(this);
78
82
  }), Object.defineProperty(this, "visible", {
@@ -117,15 +121,15 @@ class tt extends W {
117
121
  updateDom() {
118
122
  const t = this.paramsStyle.tip;
119
123
  t && !this.dom && (this.dom = new B(this.five), this.dom.intersectCheck = !1, this.dom.simulate3D = !0, this.dom.container.style.visibility = "hidden");
120
- const o = (r) => {
124
+ const o = (h) => {
121
125
  var l;
122
- this.dom && this.dom.__text !== r && (this.dom.__text = r, r ? this.dom.container.innerHTML = S(r, {
123
- style: `color: #${c((l = this.style) == null ? void 0 : l.color) ? new h.Color(this.style.color).getHexString() : "ffffff"}`
126
+ this.dom && this.dom.__text !== h && (this.dom.__text = h, h ? this.dom.container.innerHTML = S(h, {
127
+ style: `color: #${c((l = this.style) == null ? void 0 : l.color) ? new r.Color(this.style.color).getHexString() : "ffffff"}`
124
128
  }) : this.dom.container.innerHTML = "");
125
129
  };
126
130
  t ? (o(t), this.dom.setPosition(this.position.clone())) : o(null);
127
131
  }
128
132
  }
129
133
  export {
130
- tt as PointMesh
134
+ st as PointMesh
131
135
  };
@@ -29,10 +29,13 @@ import "../../shared-utils/three/core/Sphere.js";
29
29
  import "animejs";
30
30
  import { notNil as B } from "../../shared-utils/isNil.js";
31
31
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
32
+ import "../utils/Modules/Global.js";
33
+ import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
34
+ import "../utils/three/rayOnLine.js";
32
35
  const p = new l.BufferGeometry();
33
36
  p.name = "blankGeometry";
34
37
  p.isBlank = !0;
35
- class Y extends A {
38
+ class J extends A {
36
39
  constructor(e) {
37
40
  super(e);
38
41
  r(this, "name", "PolygonMesh");
@@ -115,5 +118,5 @@ class Y extends A {
115
118
  }
116
119
  }
117
120
  export {
118
- Y as PolygonMesh
121
+ J as PolygonMesh
119
122
  };
@@ -24,8 +24,11 @@ import { notNil as f } from "../../shared-utils/isNil.js";
24
24
  import { intersectWithoutLine as S } from "../../shared-utils/three/core/Raycaster.js";
25
25
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
26
26
  import { PolygonMesh as d } from "./Polygon.js";
27
+ import "../utils/Modules/Global.js";
28
+ import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
27
29
  import { PolygonWithEdgeMesh as u } from "./PolygonWithEdge.js";
28
- class R extends p {
30
+ import "../utils/three/rayOnLine.js";
31
+ class q extends p {
29
32
  constructor(t) {
30
33
  super();
31
34
  h(this, "name", "PrismMesh");
@@ -43,10 +46,10 @@ class R extends p {
43
46
  return this.localCenter;
44
47
  }
45
48
  get localCenter() {
46
- var s, i;
47
- const t = (s = this.topPolygon) == null ? void 0 : s.center, e = (i = this.bottomPolygon) == null ? void 0 : i.center;
48
- if (t && e)
49
- return new a.Vector3().lerpVectors(t, e, 0.5);
49
+ var s, e;
50
+ const t = (s = this.topPolygon) == null ? void 0 : s.center, i = (e = this.bottomPolygon) == null ? void 0 : e.center;
51
+ if (t && i)
52
+ return new a.Vector3().lerpVectors(t, i, 0.5);
50
53
  }
51
54
  get worldCenter() {
52
55
  return this.updateMatrixWorld(), this.localToWorld(this.localCenter);
@@ -61,8 +64,8 @@ class R extends p {
61
64
  return this.bottomPolygon.lineColor;
62
65
  }
63
66
  setStyle(t) {
64
- this.paramStyle = P(P({}, this.paramStyle), t), this.bottomPolygon.setStyle(this.paramStyle), this.topPolygon.setStyle(this.paramStyle), this.edgePlanes.children.forEach((e) => {
65
- (e instanceof y || e instanceof d) && e.setStyle(this.paramStyle);
67
+ this.paramStyle = P(P({}, this.paramStyle), t), this.bottomPolygon.setStyle(this.paramStyle), this.topPolygon.setStyle(this.paramStyle), this.edgePlanes.children.forEach((i) => {
68
+ (i instanceof y || i instanceof d) && i.setStyle(this.paramStyle);
66
69
  });
67
70
  }
68
71
  setPoints(t) {
@@ -83,28 +86,28 @@ class R extends p {
83
86
  }
84
87
  setTopHeightPoint(t) {
85
88
  this.heightPoint = t, this.addIfNotExists(this.topPolygon);
86
- const e = this.bottomPolygon.projectPoint(t), s = new a.Vector3().subVectors(t, e);
89
+ const i = this.bottomPolygon.projectPoint(t), s = new a.Vector3().subVectors(t, i);
87
90
  this.up.copy(s.clone().normalize());
88
91
  const r = this.bottomPolygon.points.map((l) => l.clone().add(s));
89
92
  this.topPolygon.setPoints(r), this.setEdgePlanes();
90
93
  }
91
- raycast(t, e) {
94
+ raycast(t, i) {
92
95
  return this.children.forEach((s) => {
93
- S(s, t, e, !0);
96
+ S(s, t, i, !0);
94
97
  }), !1;
95
98
  }
96
99
  setEdgePlanes() {
97
- const t = this.bottomPolygon.points, e = this.topPolygon.points;
98
- this.addIfNotExists(this.edgePlanes), this.edgePlanes.removeChildren(), t.forEach((s, i) => {
99
- if (i === 0)
100
+ const t = this.bottomPolygon.points, i = this.topPolygon.points;
101
+ this.addIfNotExists(this.edgePlanes), this.edgePlanes.removeChildren(), t.forEach((s, e) => {
102
+ if (e === 0)
100
103
  return;
101
104
  const r = new d({ color: this.color });
102
- r.setPoints([t[i - 1], t[i], e[i], e[i - 1]]);
105
+ r.setPoints([t[e - 1], t[e], i[e], i[e - 1]]);
103
106
  const l = new y({ lineColor: this.lineColor, lineWidth: this.lineWidth });
104
- l.name = "EdgeLine", l.setPoints([t[i - 1], e[i - 1]]), this.edgePlanes.add(r, l);
107
+ l.name = "EdgeLine", l.setPoints([t[e - 1], i[e - 1]]), this.edgePlanes.add(r, l);
105
108
  });
106
109
  }
107
110
  }
108
111
  export {
109
- R as PrismMesh
112
+ q as PrismMesh
110
113
  };
@@ -1,6 +1,6 @@
1
- var g = Object.defineProperty;
2
- var p = (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) => (p(s, typeof e != "symbol" ? e + "" : e, t), t);
1
+ var p = Object.defineProperty;
2
+ var g = (s, e, t) => e in s ? p(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var o = (s, e, t) => (g(s, typeof e != "symbol" ? e + "" : e, t), t);
4
4
  import { BaseEditor as d } from "../Base/Editor.js";
5
5
  import { Sculpt as n } from "../../index.js";
6
6
  import { PointMesh as a } from "../../Meshes/Point.js";
@@ -16,6 +16,7 @@ import "../../../shared-utils/three/core/Sphere.js";
16
16
  import "animejs";
17
17
  import { notNil as m } from "../../../shared-utils/isNil.js";
18
18
  import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
19
+ import "../../Meshes/Polygon.js";
19
20
  class l extends d {
20
21
  constructor(t) {
21
22
  super(t);
@@ -44,7 +45,7 @@ class l extends d {
44
45
  super.disable(), this.removeChildren();
45
46
  }
46
47
  }
47
- class w extends l {
48
+ class A extends l {
48
49
  constructor(t) {
49
50
  super(t);
50
51
  o(this, "onDrag", (t) => {
@@ -59,6 +60,6 @@ class w extends l {
59
60
  }
60
61
  }
61
62
  export {
62
- w as LineEditor,
63
+ A as LineEditor,
63
64
  l as LineEditorAbstract
64
65
  };
@@ -14,18 +14,18 @@ var u = (m, i, e) => (y(m, typeof i != "symbol" ? i + "" : i, e), e);
14
14
  var a = (m, i, e) => new Promise((t, n) => {
15
15
  var c = (l) => {
16
16
  try {
17
- o(e.next(l));
17
+ s(e.next(l));
18
18
  } catch (d) {
19
19
  n(d);
20
20
  }
21
- }, s = (l) => {
21
+ }, o = (l) => {
22
22
  try {
23
- o(e.throw(l));
23
+ s(e.throw(l));
24
24
  } catch (d) {
25
25
  n(d);
26
26
  }
27
- }, o = (l) => l.done ? t(l.value) : Promise.resolve(l.value).then(c, s);
28
- o((e = e.apply(m, i)).next());
27
+ }, s = (l) => l.done ? t(l.value) : Promise.resolve(l.value).then(c, o);
28
+ s((e = e.apply(m, i)).next());
29
29
  });
30
30
  import { globalModules as O } from "./utils/Modules/Global.js";
31
31
  import { Subscribe as S } from "../shared-utils/Subscribe.js";
@@ -41,6 +41,7 @@ import "../shared-utils/three/core/Sphere.js";
41
41
  import "animejs";
42
42
  import { notNil as H } from "../shared-utils/isNil.js";
43
43
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
44
+ import "./Meshes/Polygon.js";
44
45
  import { recurveFindObject as M } from "../shared-utils/three/recurveFindObject.js";
45
46
  import { Polyline as I } from "./Objects/Polyline/index.js";
46
47
  import { Point as w } from "./Objects/Point/index.js";
@@ -75,9 +76,9 @@ const h = class extends S {
75
76
  console.log("redo"), (e = this.creatingItem) == null || e.redo(), this.five.needsRender = !0;
76
77
  });
77
78
  this.five = e, this.theme = t, this.group = new k(), this.group.name = "Sculpt", e.scene.add(this.group), h.modules.init(e), j("ctrl+z", this.undo), j("ctrl+shift+z", this.redo), h.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: n, origDomEvent: c }) => {
78
- var o;
79
- const s = M((o = n == null ? void 0 : n[0]) == null ? void 0 : o.object, (l) => l.isSculptObject);
80
- return s && !s.editing ? this.emit("click", c, s) : !1;
79
+ var s;
80
+ const o = M((s = n == null ? void 0 : n[0]) == null ? void 0 : s.object, (l) => l.isSculptObject);
81
+ return o && !o.editing ? this.emit("click", c, o) : !1;
81
82
  }), window.__SCULPT_DEBUG__ = this, window.__SCULPT_MODULES_DEBUG__ = h.modules;
82
83
  }
83
84
  get data() {
@@ -100,12 +101,12 @@ const h = class extends S {
100
101
  load(e, t) {
101
102
  var c;
102
103
  this.clear();
103
- const n = (c = e == null ? void 0 : e.items) == null ? void 0 : c.map((s) => {
104
+ const n = (c = e == null ? void 0 : e.items) == null ? void 0 : c.map((o) => {
104
105
  var l;
105
- const o = g(r({}, s), {
106
- style: r(r({}, (l = this.theme) == null ? void 0 : l[s.type.toLowerCase()]), s.style)
106
+ const s = g(r({}, o), {
107
+ style: r(r({}, (l = this.theme) == null ? void 0 : l[o.type.toLowerCase()]), o.style)
107
108
  });
108
- return s.type === "Point" ? new w(o, t) : s.type === "line" ? new L(o, t) : s.type === "Polyline" ? new I(o, t) : s.type === "Polygon" ? new P(o, t) : s.type === "Prism" ? new v(o, t) : s.type === "Rectangle" ? new b(o, t) : s.type === "Circle" ? new C(o, t) : s.type === "Cylinder" ? new R(o, t) : s.type === "Box" ? new D(o, t) : null;
109
+ return o.type === "Point" ? new w(s, t) : o.type === "line" ? new L(s, t) : o.type === "Polyline" ? new I(s, t) : o.type === "Polygon" ? new P(s, t) : o.type === "Prism" ? new v(s, t) : o.type === "Rectangle" ? new b(s, t) : o.type === "Circle" ? new C(s, t) : o.type === "Cylinder" ? new R(s, t) : o.type === "Box" ? new D(s, t) : null;
109
110
  });
110
111
  this.group.add(...n), this.five.needsRender = !0;
111
112
  }
@@ -239,8 +240,8 @@ const h = class extends S {
239
240
  };
240
241
  let p = h;
241
242
  u(p, "modules", O);
242
- const he = (m) => new p(m);
243
+ const pe = (m) => new p(m);
243
244
  export {
244
245
  p as Sculpt,
245
- he as SculptPlugin
246
+ pe as SculptPlugin
246
247
  };
@@ -0,0 +1,18 @@
1
+ import { BoxMesh } from '../Meshes/Box';
2
+ import { CircleMesh } from '../Meshes/Circle';
3
+ import { CircleWithEdgeMesh } from '../Meshes/CircleWithEdge';
4
+ import { CylinderMesh } from '../Meshes/Cylinder';
5
+ import { LineMesh } from '../Meshes/Line';
6
+ import { PointMesh } from '../Meshes/Point';
7
+ import PolygonMesh from '../Meshes/Polygon';
8
+ import { PrismMesh } from '../Meshes/Prism';
9
+ export declare const sculpt: {
10
+ LineMesh: typeof LineMesh;
11
+ BoxMesh: typeof BoxMesh;
12
+ CircleMesh: typeof CircleMesh;
13
+ CircleWithEdgeMesh: typeof CircleWithEdgeMesh;
14
+ CylinderMesh: typeof CylinderMesh;
15
+ PointMesh: typeof PointMesh;
16
+ PolygonMesh: typeof PolygonMesh;
17
+ PrismMesh: typeof PrismMesh;
18
+ };
@@ -0,0 +1,21 @@
1
+ import { BoxMesh as o } from "../Meshes/Box.js";
2
+ import { CircleMesh as r } from "../Meshes/Circle.js";
3
+ import { CircleWithEdgeMesh as m } from "../Meshes/CircleWithEdge.js";
4
+ import { CylinderMesh as i } from "../Meshes/Cylinder.js";
5
+ import { LineMesh as e } from "../Meshes/Line.js";
6
+ import { PointMesh as t } from "../Meshes/Point.js";
7
+ import { PolygonMesh as s } from "../Meshes/Polygon.js";
8
+ import { PrismMesh as p } from "../Meshes/Prism.js";
9
+ const d = {
10
+ LineMesh: e,
11
+ BoxMesh: o,
12
+ CircleMesh: r,
13
+ CircleWithEdgeMesh: m,
14
+ CylinderMesh: i,
15
+ PointMesh: t,
16
+ PolygonMesh: s,
17
+ PrismMesh: p
18
+ };
19
+ export {
20
+ d as sculpt
21
+ };