@realsee/dnalogel 3.48.4 → 3.48.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/PanoMeasurePlugin/utils/isIntersecting.d.ts +1 -1
  3. package/dist/Sculpt/Meshes/Line.d.ts +1 -0
  4. package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
  5. package/dist/Sculpt/Meshes/Polyline.d.ts +2 -0
  6. package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +1 -1
  7. package/dist/index.cjs.js +51 -51
  8. package/dist/index.js +2607 -2515
  9. package/dist/index.umd.js +44 -44
  10. package/dist/shared-utils/three/PointSelector/index.d.ts +12 -4
  11. package/dist/shared-utils/three/PointSelector/utils/contents.d.ts +1 -0
  12. package/dist/shared-utils/three/generatePolygonGeometry.d.ts +4 -1
  13. package/libs/CruisePlugin/Move.js +1 -1
  14. package/libs/CruisePlugin/index.js +1 -1
  15. package/libs/GuideLinePlugin/Controller.js +1 -1
  16. package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
  17. package/libs/GuideLinePlugin/GuideLineModeItem.js +2 -3
  18. package/libs/ModelMakerPlugin/Controller.js +3 -2
  19. package/libs/ModelMakerPlugin/index.js +3 -2
  20. package/libs/PanoMeasurePlugin/Components/Controller0.js +21 -20
  21. package/libs/PanoMeasurePlugin/Components/Controller1.js +4 -3
  22. package/libs/PanoMeasurePlugin/Controller/EditController.js +4 -3
  23. package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
  24. package/libs/PanoMeasurePlugin/Controller/index.js +4 -3
  25. package/libs/PanoMeasurePlugin/Model/area.js +3 -2
  26. package/libs/PanoMeasurePlugin/Model/polygon.js +8 -7
  27. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +4 -3
  28. package/libs/PanoMeasurePlugin/index.js +15 -14
  29. package/libs/PanoMeasurePlugin/utils/isIntersecting.d.ts +1 -1
  30. package/libs/PanoMeasurePlugin/utils/isIntersecting.js +39 -16
  31. package/libs/PanoTagPlugin/Components/Tag/index.js +2 -3
  32. package/libs/PanoTagPlugin/Components/TagContainer.js +2 -3
  33. package/libs/PanoTagPlugin/Components/TagItem.js +2 -3
  34. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +111 -94
  35. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +2 -3
  36. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +8 -9
  37. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +2 -3
  38. package/libs/PanoTagPlugin/controller/TagRender.js +2 -3
  39. package/libs/PanoTagPlugin/controller/index.js +5 -6
  40. package/libs/PanoTagPlugin/index.js +11 -12
  41. package/libs/Sculpt/Meshes/Line.d.ts +1 -0
  42. package/libs/Sculpt/Meshes/Line.js +64 -56
  43. package/libs/Sculpt/Meshes/Polygon.js +3 -3
  44. package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
  45. package/libs/Sculpt/Meshes/Polyline.d.ts +2 -0
  46. package/libs/Sculpt/Meshes/Polyline.js +67 -66
  47. package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +1 -1
  48. package/libs/Sculpt/Objects/Polygon/index.js +63 -64
  49. package/libs/Sculpt/Objects/Polyline/index.js +8 -9
  50. package/libs/base/BasePlugin.js +1 -1
  51. package/libs/index.js +128 -127
  52. package/libs/shared-utils/logger.js +1 -1
  53. package/libs/shared-utils/three/PointSelector/index.d.ts +12 -4
  54. package/libs/shared-utils/three/PointSelector/index.js +83 -56
  55. package/libs/shared-utils/three/PointSelector/utils/contents.d.ts +1 -0
  56. package/libs/shared-utils/three/PointSelector/utils/contents.js +4 -0
  57. package/libs/shared-utils/three/generatePolygonGeometry.d.ts +4 -1
  58. package/libs/shared-utils/three/generatePolygonGeometry.js +19 -8
  59. package/package.json +2 -2
@@ -43,9 +43,8 @@ import "../../../shared-utils/url/getUrl.js";
43
43
  import "../../../shared-utils/five/getFloorIndex.js";
44
44
  import "../../../shared-utils/safeObj.js";
45
45
  import "../../utils/Cache.js";
46
- import "../../../CruisePlugin/utils/sleep.js";
47
46
  const v = new c.Vector2();
48
- class dt extends g {
47
+ class lt extends g {
49
48
  constructor(t, e) {
50
49
  super(t, e);
51
50
  a(this, "__Object__");
@@ -135,5 +134,5 @@ class dt extends g {
135
134
  }
136
135
  }
137
136
  export {
138
- dt as PointTag
137
+ lt as PointTag
139
138
  };
@@ -151,7 +151,6 @@ import "../../shared-utils/url/getUrl.js";
151
151
  import "../../shared-utils/five/getFloorIndex.js";
152
152
  import "../../shared-utils/safeObj.js";
153
153
  import "../utils/Cache.js";
154
- import "../../CruisePlugin/utils/sleep.js";
155
154
  import "../tag.config.js";
156
155
  import "../utils/normalPositionToPositions.js";
157
156
  import "../../vendor/svelte/store/index.js";
@@ -175,7 +174,7 @@ import "../../shared-utils/five/FiveDomEvents.js";
175
174
  import "../../shared-utils/five/calculateThreeMouse.js";
176
175
  import "../../shared-utils/three/THREERaycaster.js";
177
176
  import "../../base/BasePlugin.js";
178
- class we extends U {
177
+ class je extends U {
179
178
  constructor(t) {
180
179
  super(t);
181
180
  d(this, "rendererMap", /* @__PURE__ */ new Map());
@@ -326,5 +325,5 @@ class we extends U {
326
325
  }
327
326
  }
328
327
  export {
329
- we as TagRender
328
+ je as TagRender
330
329
  };
@@ -162,7 +162,6 @@ import "../utils/checkRange.js";
162
162
  import "../../shared-utils/url/getUrl.js";
163
163
  import "../../shared-utils/five/getFloorIndex.js";
164
164
  import "../utils/Cache.js";
165
- import "../../CruisePlugin/utils/sleep.js";
166
165
  import "./TagUtil.js";
167
166
  import "../tag.config.js";
168
167
  import "../utils/normalPositionToPositions.js";
@@ -190,8 +189,8 @@ import "../utils/addDebugPoints.js";
190
189
  import "../utils/requestIdleCallback.js";
191
190
  import "../Components/TagItem.js";
192
191
  import "../Components/Common/TagPoint.js";
193
- const S = "Dnalogel-PanoTagPlugin", qi = (d) => `${S}--${d}`;
194
- class Hi extends O {
192
+ const S = "Dnalogel-PanoTagPlugin", ji = (d) => `${S}--${d}`;
193
+ class qi extends O {
195
194
  constructor(e, t) {
196
195
  super(e);
197
196
  /** state */
@@ -601,7 +600,7 @@ class Hi extends O {
601
600
  }
602
601
  }
603
602
  export {
604
- Hi as PanoTagPluginController,
605
- Hi as default,
606
- qi as pluginFlag
603
+ qi as PanoTagPluginController,
604
+ qi as default,
605
+ ji as pluginFlag
607
606
  };
@@ -1,7 +1,7 @@
1
1
  import r from "./controller/index.js";
2
- import { pluginFlag as lr } from "./controller/index.js";
3
- import { defaultGlobalConfig as fr } from "./typings/tag/TagConfig.js";
4
- import { ContentType as ur, DimensionType as Pr, PointType as Tr } from "./Archive/deprecated.js";
2
+ import { pluginFlag as er } from "./controller/index.js";
3
+ import { defaultGlobalConfig as ar } from "./typings/tag/TagConfig.js";
4
+ import { ContentType as gr, DimensionType as ur, PointType as Pr } from "./Archive/deprecated.js";
5
5
  import "three";
6
6
  import "../vendor/object-assign-deep/objectAssignDeep.js";
7
7
  import "../shared-utils/positionToVector3.js";
@@ -129,7 +129,6 @@ import "../shared-utils/url/getUrl.js";
129
129
  import "../shared-utils/five/getFloorIndex.js";
130
130
  import "../shared-utils/safeObj.js";
131
131
  import "./utils/Cache.js";
132
- import "../CruisePlugin/utils/sleep.js";
133
132
  import "./controller/TagUtil.js";
134
133
  import "./tag.config.js";
135
134
  import "./utils/normalPositionToPositions.js";
@@ -164,14 +163,14 @@ import "./Components/TagContainer.js";
164
163
  import "./Components/TagItem.js";
165
164
  import "./Components/Common/TagPoint.js";
166
165
  import "../shared-utils/animationFrame/BetterTween.js";
167
- const mr = (o, t) => new r(o, t);
166
+ const ir = (o, t) => new r(o, t);
168
167
  export {
169
- ur as ContentType,
170
- Pr as DimensionType,
171
- mr as PanoTagPlugin,
168
+ gr as ContentType,
169
+ ur as DimensionType,
170
+ ir as PanoTagPlugin,
172
171
  r as PanoTagPluginController,
173
- Tr as PointType,
174
- mr as default,
175
- fr as defaultGlobalConfig,
176
- lr as pluginFlag
172
+ Pr as PointType,
173
+ ir as default,
174
+ ar as defaultGlobalConfig,
175
+ er as pluginFlag
177
176
  };
@@ -33,6 +33,7 @@ export declare class LineMesh extends IObject3D {
33
33
  points: THREE.Vector3[];
34
34
  lengthDoms: LightTag[];
35
35
  get style(): LineMeshStyle;
36
+ get opacity(): number;
36
37
  get lineWidth(): number;
37
38
  get color(): THREE.Color;
38
39
  get dashed(): boolean;
@@ -1,37 +1,37 @@
1
- var _ = Object.defineProperty;
1
+ var E = Object.defineProperty;
2
2
  var m = Object.getOwnPropertySymbols;
3
- var k = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
4
- var f = (o, s, e) => s in o ? _(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e, y = (o, s) => {
5
- for (var e in s || (s = {}))
6
- k.call(s, e) && f(o, e, s[e]);
3
+ var _ = Object.prototype.hasOwnProperty, T = 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
+ _.call(o, e) && f(l, e, o[e]);
7
7
  if (m)
8
- for (var e of m(s))
9
- p.call(s, e) && f(o, e, s[e]);
10
- return o;
8
+ for (var e of m(o))
9
+ T.call(o, e) && f(l, e, o[e]);
10
+ return l;
11
11
  };
12
- var l = (o, s, e) => (f(o, typeof s != "symbol" ? s + "" : s, e), e);
12
+ var h = (l, o, e) => (f(l, typeof o != "symbol" ? o + "" : o, e), e);
13
13
  import * as u from "three";
14
- import { DEFAULT_LINE_COLOR as b, DEFAULT_LINE_WIDTH as S, DEFAULT_HIGHLIGHT_OPACITY as D } from "../typings/style.js";
14
+ import { DEFAULT_LINE_COLOR as b, DEFAULT_LINE_WIDTH as k, DEFAULT_HIGHLIGHT_OPACITY as p } from "../typings/style.js";
15
15
  import { LineGeometry as L, LineMaterial as w, THREE_Line2 as I } from "../../shared-utils/five/FiveLine.js";
16
16
  import { anyPositionToVector3 as H } from "../../shared-utils/positionToVector3.js";
17
- import { IObject3D as R } from "../../shared-utils/three/IObject3D.js";
17
+ import { IObject3D as C } from "../../shared-utils/three/IObject3D.js";
18
18
  import "hammerjs";
19
19
  import "three/examples/jsm/renderers/CSS3DRenderer";
20
- import { centerPoint as C } from "../../shared-utils/three/centerPoint.js";
20
+ import { centerPoint as R } from "../../shared-utils/three/centerPoint.js";
21
21
  import { LightTag as x } from "../../shared-utils/tag.js";
22
- import { removeAllTag as v } from "../utils/removeAllTag.js";
23
- import { getLengthHTML as W } from "../utils/Meshes/getLengthHTML.js";
24
- import { applyObjectMatrixWorld as T } from "../../shared-utils/three/applyObjectMatrixWorld.js";
22
+ import { removeAllTag as W } from "../utils/removeAllTag.js";
23
+ import { getLengthHTML as v } from "../utils/Meshes/getLengthHTML.js";
24
+ import { applyObjectMatrixWorld as D } from "../../shared-utils/three/applyObjectMatrixWorld.js";
25
25
  import "../../shared-utils/three/THREESphere.js";
26
26
  import "animejs";
27
- import { notNil as c } from "../../shared-utils/isNil.js";
27
+ import { notNil as d } from "../../shared-utils/isNil.js";
28
28
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
29
- class E extends w {
29
+ class S extends w {
30
30
  constructor(e) {
31
31
  var i, t;
32
32
  super(e);
33
- l(this, "_three_color");
34
- c(e == null ? void 0 : e.color) && (this.three_color = (i = e == null ? void 0 : e.color) != null ? i : 16777215), Object.keys(e).forEach((n) => {
33
+ h(this, "_three_color");
34
+ d(e == null ? void 0 : e.color) && (this.three_color = (i = e == null ? void 0 : e.color) != null ? i : 16777215), Object.keys(e).forEach((n) => {
35
35
  ["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(n) || n in this && (this[n] = e[n]);
36
36
  }), this.setDashed((t = e == null ? void 0 : e.dashed) != null ? t : !1);
37
37
  }
@@ -48,68 +48,76 @@ class E extends w {
48
48
  class M extends I {
49
49
  constructor(e, i) {
50
50
  super(e, i);
51
- l(this, "name", "Line3");
51
+ h(this, "name", "Line3");
52
52
  }
53
53
  }
54
- class Q extends R {
54
+ class Q extends C {
55
55
  constructor(e) {
56
- var h, r, d, a, g;
56
+ var s, r, c, a, g;
57
57
  super();
58
- l(this, "name", "LineMesh");
59
- l(this, "points");
60
- l(this, "lengthDoms", []);
61
- l(this, "highlighted", !1);
62
- l(this, "line");
63
- l(this, "backLine");
64
- l(this, "opacityBeforeHighlight");
65
- l(this, "paramsStyle", {});
66
- l(this, "lastRenderLengthItem");
58
+ h(this, "name", "LineMesh");
59
+ h(this, "points");
60
+ h(this, "lengthDoms", []);
61
+ h(this, "highlighted", !1);
62
+ h(this, "line");
63
+ h(this, "backLine");
64
+ h(this, "opacityBeforeHighlight");
65
+ h(this, "paramsStyle", {});
66
+ h(this, "lastRenderLengthItem");
67
67
  this.paramsStyle = e != null ? e : {};
68
- const i = new L(), t = new E({
69
- color: new u.Color((h = e == null ? void 0 : e.lineColor) != null ? h : b),
70
- linewidth: (r = e == null ? void 0 : e.lineWidth) != null ? r : S,
68
+ const i = new L(), t = new S({
69
+ color: new u.Color((s = e == null ? void 0 : e.lineColor) != null ? s : b),
70
+ linewidth: (r = e == null ? void 0 : e.lineWidth) != null ? r : k,
71
71
  dashScale: 40,
72
- opacity: (d = e == null ? void 0 : e.opacity) != null ? d : 1,
72
+ opacity: (c = e == null ? void 0 : e.opacity) != null ? c : 1,
73
73
  transparent: !0,
74
74
  dashed: (a = e == null ? void 0 : e.dashed) != null ? a : !1
75
- }), n = new E({
75
+ }), n = new S({
76
76
  color: new u.Color((g = e == null ? void 0 : e.lineColor) != null ? g : b),
77
77
  linewidth: t.linewidth * 0.9,
78
78
  dashScale: t.dashScale,
79
- opacity: t.opacity * 0.8,
79
+ opacity: t.opacity * 0.7,
80
80
  depthTest: !1,
81
81
  depthWrite: !1,
82
82
  transparent: !0,
83
83
  resolution: t.resolution
84
84
  });
85
85
  this.line = new M(i, t), this.backLine = new M(i, 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), this.addEventListener("removed", () => {
86
- v(this);
86
+ W(this);
87
87
  });
88
88
  }
89
89
  get style() {
90
90
  return {
91
91
  lineColor: this.color,
92
92
  lineWidth: this.lineWidth,
93
+ opacity: this.opacity,
93
94
  dashed: this.dashed,
94
95
  occlusionVisibility: this.occlusionVisibility,
95
96
  occlusionMode: this.occlusionMode,
96
97
  lengthEnable: this.paramsStyle.lengthEnable
97
98
  };
98
99
  }
100
+ get opacity() {
101
+ var e;
102
+ return (e = this.line.material.opacity) != null ? e : this.paramsStyle.opacity;
103
+ }
99
104
  get lineWidth() {
100
- return this.line.material.linewidth;
105
+ var e;
106
+ return (e = this.line.material.linewidth) != null ? e : this.paramsStyle.lineWidth;
101
107
  }
102
108
  get color() {
103
- return new u.Color(this.line.material.three_color);
109
+ var e;
110
+ return new u.Color((e = this.line.material.three_color) != null ? e : this.paramsStyle.lineColor);
104
111
  }
105
112
  get dashed() {
106
- return this.line.material.dashed;
113
+ var e;
114
+ return (e = this.line.material.dashed) != null ? e : this.paramsStyle.dashed;
107
115
  }
108
116
  get occlusionVisibility() {
109
- return this.backLine.visible || this.line.material.depthTest === !1;
117
+ return this.paramsStyle.occlusionVisibility;
110
118
  }
111
119
  get occlusionMode() {
112
- return this.line.material.depthTest === !1 ? "depthTest" : "translucence";
120
+ return this.paramsStyle.occlusionMode;
113
121
  }
114
122
  get five() {
115
123
  var e, i;
@@ -118,12 +126,12 @@ class Q extends R {
118
126
  updateMatrixWorld(e) {
119
127
  var i;
120
128
  if (super.updateMatrixWorld(e), this.points) {
121
- const t = (i = T(this, this.points)) == null ? void 0 : i.map((n) => n.toArray().join(",")).join(",");
129
+ const t = (i = D(this, this.points)) == null ? void 0 : i.map((n) => n.toArray().join(",")).join(",");
122
130
  t !== this.lastRenderLengthItem && (this.updateLengthItems(), this.lastRenderLengthItem = t);
123
131
  }
124
132
  }
125
133
  setPoints(e) {
126
- const i = e.map(H).filter(c);
134
+ const i = e.map(H).filter(d);
127
135
  if (this.points = i, i.length < 2) {
128
136
  this.line.geometry = new L(), this.backLine.geometry = this.line.geometry, this.updateLengthItems();
129
137
  return;
@@ -139,13 +147,13 @@ class Q extends R {
139
147
  (n.x !== e || n.y !== i) && (n.set(e, i), this.needsRender = !0);
140
148
  }
141
149
  setStyle(e) {
142
- var n, h, r;
143
- this.paramsStyle = y(y({}, this.paramsStyle), e), c(e.lineColor) && (this.line.material.three_color = new u.Color(e.lineColor), this.backLine.material.three_color = new u.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();
144
- const i = (n = e.occlusionVisibility) != null ? n : this.paramsStyle.occlusionVisibility, t = (r = (h = e.occlusionMode) != null ? h : this.paramsStyle.occlusionMode) != null ? r : "translucence";
150
+ var n, s, r;
151
+ this.paramsStyle = y(y({}, this.paramsStyle), e), d(e.lineColor) && (this.line.material.three_color = new u.Color(e.lineColor), this.backLine.material.three_color = new u.Color(e.lineColor)), d(e.lineWidth) && (this.line.material.linewidth = e.lineWidth), d(e.dashed) && this.line.material.setDashed(e.dashed), d(e.opacity) && (this.line.material.opacity = e.opacity, this.backLine.material.opacity = this.line.material.opacity * 0.7), this.updateLengthItems();
152
+ const i = (n = e.occlusionVisibility) != null ? n : this.paramsStyle.occlusionVisibility, t = (r = (s = e.occlusionMode) != null ? s : this.paramsStyle.occlusionMode) != null ? r : "translucence";
145
153
  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;
146
154
  }
147
155
  highlight() {
148
- 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);
156
+ this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.line.material.opacity, this.line.material.opacity = this.opacityBeforeHighlight * p, this.backLine.material.opacity = this.backLine.material.opacity * p, this.needsRender = !0);
149
157
  }
150
158
  unhighlight() {
151
159
  this.highlighted && (this.highlighted = !1, this.line.material.opacity = this.opacityBeforeHighlight, this.backLine.material.opacity = 0.2, this.needsRender = !0);
@@ -161,16 +169,16 @@ class Q extends R {
161
169
  const i = this.points.map((t, n) => {
162
170
  if (n !== 0)
163
171
  return [this.points[n - 1], t];
164
- }).filter(c).map((t) => T(this, t));
165
- i.forEach(([t, n], h) => {
172
+ }).filter(d).map((t) => D(this, t));
173
+ i.forEach(([t, n], s) => {
166
174
  var a;
167
- const r = C(t, n);
168
- this.lengthDoms[h] = (a = this.lengthDoms[h]) != null ? a : (() => {
175
+ const r = R(t, n);
176
+ this.lengthDoms[s] = (a = this.lengthDoms[s]) != null ? a : (() => {
169
177
  const g = new x(this.five);
170
178
  return g.intersectCheck = !1, g;
171
- })(), this.lengthDoms[h].setPosition(r, [t, n]);
172
- const d = t.distanceTo(n).toFixed(2);
173
- d === "0.00" ? this.lengthDoms[h].container.innerHTML = "" : this.lengthDoms[h].container.innerHTML = W(d + "m");
179
+ })(), this.lengthDoms[s].setPosition(r, [t, n]);
180
+ const c = t.distanceTo(n).toFixed(2);
181
+ this.lengthDoms[s].lengthDom !== c && (this.lengthDoms[s].lengthDom = c, c === "0.00" ? this.lengthDoms[s].container.innerHTML = "" : this.lengthDoms[s].container.innerHTML = v(c + "m"));
174
182
  }), this.lengthDoms.length > i.length && (this.lengthDoms.slice(i.length).forEach((t) => t.destroy()), this.lengthDoms.length = i.length);
175
183
  }
176
184
  }
@@ -23,7 +23,7 @@ import { applyObjectMatrixWorld as B } from "../../shared-utils/three/applyObjec
23
23
  const p = new l.BufferGeometry();
24
24
  p.name = "blankGeometry";
25
25
  p.isBlank = !0;
26
- class L extends _ {
26
+ class G extends _ {
27
27
  constructor(e) {
28
28
  super(e);
29
29
  r(this, "name", "PolygonMesh");
@@ -68,7 +68,7 @@ class L extends _ {
68
68
  setPoints(e) {
69
69
  var o;
70
70
  const s = e.map(P);
71
- this.points = s, this.geometry = (o = I(this.points)) != null ? o : p, this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0, this.updateAreaItems();
71
+ this.points = s, this.geometry = (o = I(this.points, { checkLinesIntersect: !0 })) != null ? o : p, this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0, this.updateAreaItems();
72
72
  }
73
73
  /**
74
74
  * @description: 获取一个点投影在当前平面上的点
@@ -104,5 +104,5 @@ class L extends _ {
104
104
  }
105
105
  }
106
106
  export {
107
- L as PolygonMesh
107
+ G as PolygonMesh
108
108
  };
@@ -20,7 +20,7 @@ export declare class PolygonWithEdgeMesh extends PolygonMesh {
20
20
  };
21
21
  get lineWidth(): number;
22
22
  get lineColor(): THREE.Color;
23
- protected line: PolylineMesh;
23
+ line: PolylineMesh;
24
24
  constructor(params?: Partial<PolygonWithEdgeMeshStyle & PolygonData>);
25
25
  raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): boolean;
26
26
  setPoints(points: AnyPositions, params?: {
@@ -11,11 +11,13 @@ export declare abstract class PolylineBaseMesh extends IObject3D {
11
11
  get style(): {
12
12
  lineColor: THREE.Color;
13
13
  lineWidth: number;
14
+ opacity: number;
14
15
  dashed: boolean;
15
16
  occlusionVisibility: boolean;
16
17
  occlusionMode: "translucence" | "depthTest";
17
18
  lengthEnable: boolean;
18
19
  };
20
+ get opacity(): number;
19
21
  get lineColor(): THREE.Color;
20
22
  get lineWidth(): number;
21
23
  get dashed(): boolean;
@@ -1,49 +1,41 @@
1
- var P = Object.defineProperty, S = Object.defineProperties;
2
- var M = Object.getOwnPropertyDescriptors;
1
+ var M = Object.defineProperty, E = Object.defineProperties;
2
+ var b = Object.getOwnPropertyDescriptors;
3
3
  var a = Object.getOwnPropertySymbols;
4
- var u = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
5
- var m = (s, e, t) => e in s ? P(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, h = (s, e) => {
6
- for (var t in e || (e = {}))
7
- u.call(e, t) && m(s, t, e[t]);
4
+ var g = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
5
+ var p = (e, o, t) => o in e ? M(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, r = (e, o) => {
6
+ for (var t in o || (o = {}))
7
+ g.call(o, t) && p(e, t, o[t]);
8
8
  if (a)
9
- for (var t of a(e))
10
- y.call(e, t) && m(s, t, e[t]);
11
- return s;
12
- }, c = (s, e) => S(s, M(e));
13
- var f = (s, e) => {
9
+ for (var t of a(o))
10
+ f.call(o, t) && p(e, t, o[t]);
11
+ return e;
12
+ }, c = (e, o) => E(e, b(o));
13
+ var S = (e, o) => {
14
14
  var t = {};
15
- for (var i in s)
16
- u.call(s, i) && e.indexOf(i) < 0 && (t[i] = s[i]);
17
- if (s != null && a)
18
- for (var i of a(s))
19
- e.indexOf(i) < 0 && y.call(s, i) && (t[i] = s[i]);
15
+ for (var i in e)
16
+ g.call(e, i) && o.indexOf(i) < 0 && (t[i] = e[i]);
17
+ if (e != null && a)
18
+ for (var i of a(e))
19
+ o.indexOf(i) < 0 && f.call(e, i) && (t[i] = e[i]);
20
20
  return t;
21
21
  };
22
- var l = (s, e, t) => (m(s, typeof e != "symbol" ? e + "" : e, t), t);
23
- import { anyPositionToVector3 as b } from "../../shared-utils/positionToVector3.js";
24
- import { IObject3D as E } from "../../shared-utils/three/IObject3D.js";
25
- import * as D from "three";
26
- import "hammerjs";
27
- import "three/examples/jsm/renderers/CSS3DRenderer";
28
- import "@realsee/five/line";
29
- import "../../shared-utils/tag.js";
30
- import { removeAllTag as V } from "../utils/removeAllTag.js";
31
- import "../../shared-utils/three/THREESphere.js";
32
- import "animejs";
33
- import { notNil as W } from "../../shared-utils/isNil.js";
34
- import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
35
- import { LineWithDotsMesh as v } from "./LineWithDots.js";
22
+ var n = (e, o, t) => (p(e, typeof o != "symbol" ? o + "" : o, t), t);
23
+ import { anyPositionToVector3 as D } from "../../shared-utils/positionToVector3.js";
24
+ import { IObject3D as V } from "../../shared-utils/three/IObject3D.js";
25
+ import { LineWithDotsMesh as W } from "./LineWithDots.js";
26
+ import * as v from "three";
36
27
  import { closeVectors as w } from "../../shared-utils/three/closeVectors.js";
37
- class g extends E {
28
+ import { removeAllTag as C } from "../utils/removeAllTag.js";
29
+ class P extends V {
38
30
  constructor(t) {
39
31
  super();
40
- l(this, "name", "PolylineBaseMesh");
41
- l(this, "lines", []);
42
- l(this, "withDots");
43
- l(this, "paramsStyle");
44
- const r = t, { withDots: i, points: o } = r, n = f(r, ["withDots", "points"]);
45
- this.withDots = i != null ? i : !0, o && this.setPoints(o), n && this.setStyle(n), this.addEventListener("removed", () => {
46
- V(this);
32
+ n(this, "name", "PolylineBaseMesh");
33
+ n(this, "lines", []);
34
+ n(this, "withDots");
35
+ n(this, "paramsStyle");
36
+ const l = t, { withDots: i, points: s } = l, h = S(l, ["withDots", "points"]);
37
+ this.withDots = i != null ? i : !0, s && this.setPoints(s), h && this.setStyle(h), this.addEventListener("removed", () => {
38
+ C(this);
47
39
  });
48
40
  }
49
41
  get style() {
@@ -51,50 +43,59 @@ class g extends E {
51
43
  return {
52
44
  lineColor: this.lineColor,
53
45
  lineWidth: this.lineWidth,
46
+ opacity: this.opacity,
54
47
  dashed: this.dashed,
55
48
  occlusionVisibility: this.occlusionVisibility,
56
49
  occlusionMode: this.occlusionMode,
57
50
  lengthEnable: (t = this.paramsStyle) == null ? void 0 : t.lengthEnable
58
51
  };
59
52
  }
53
+ get opacity() {
54
+ var t, i, s;
55
+ return (s = (t = this.lines[0]) == null ? void 0 : t.opacity) != null ? s : (i = this.paramsStyle) == null ? void 0 : i.opacity;
56
+ }
60
57
  get lineColor() {
61
- var t, i, o;
62
- return (o = (t = this.lines[0]) == null ? void 0 : t.color) != null ? o : (i = this.paramsStyle) != null && i.lineColor ? new D.Color(this.paramsStyle.lineColor) : void 0;
58
+ var t, i, s;
59
+ return (s = (t = this.lines[0]) == null ? void 0 : t.color) != null ? s : (i = this.paramsStyle) != null && i.lineColor ? new v.Color(this.paramsStyle.lineColor) : void 0;
63
60
  }
64
61
  get lineWidth() {
65
- var t, i, o;
66
- return (o = (t = this.lines[0]) == null ? void 0 : t.lineWidth) != null ? o : (i = this.paramsStyle) == null ? void 0 : i.lineWidth;
62
+ var t, i, s;
63
+ return (s = (t = this.lines[0]) == null ? void 0 : t.lineWidth) != null ? s : (i = this.paramsStyle) == null ? void 0 : i.lineWidth;
67
64
  }
68
65
  get dashed() {
69
- var t, i, o;
70
- return (o = (t = this.lines[0]) == null ? void 0 : t.dashed) != null ? o : (i = this.paramsStyle) == null ? void 0 : i.dashed;
66
+ var t, i, s;
67
+ return (s = (t = this.lines[0]) == null ? void 0 : t.dashed) != null ? s : (i = this.paramsStyle) == null ? void 0 : i.dashed;
71
68
  }
72
69
  get occlusionVisibility() {
73
- var t, i, o;
74
- return (o = (t = this.lines[0]) == null ? void 0 : t.occlusionVisibility) != null ? o : (i = this.paramsStyle) == null ? void 0 : i.occlusionVisibility;
70
+ var t, i, s;
71
+ return (s = (t = this.lines[0]) == null ? void 0 : t.occlusionVisibility) != null ? s : (i = this.paramsStyle) == null ? void 0 : i.occlusionVisibility;
75
72
  }
76
73
  get occlusionMode() {
77
- var t, i, o;
78
- return (o = (t = this.lines[0]) == null ? void 0 : t.occlusionMode) != null ? o : (i = this.paramsStyle) == null ? void 0 : i.occlusionMode;
74
+ var t, i, s;
75
+ return (s = (t = this.lines[0]) == null ? void 0 : t.occlusionMode) != null ? s : (i = this.paramsStyle) == null ? void 0 : i.occlusionMode;
79
76
  }
80
77
  get points() {
81
78
  var t;
82
79
  return this.lines.map((i) => i.points[0]).concat((t = this.lines.at(-1)) == null ? void 0 : t.points[1]).filter(Boolean);
83
80
  }
84
81
  setPoints(t, i = { closed: !1 }) {
85
- let o = t.map(b);
86
- i.closed && (o = w(o)), this.lines.length && this.lines.forEach((n) => n.removeFromParent()), this.lines = o.map((n, r) => {
87
- const p = o[r + 1];
88
- if (r !== 0 && p === void 0)
82
+ let s = t.map(D);
83
+ i.closed && (s = w(s)), s.forEach((h, l) => {
84
+ var d;
85
+ const m = s[l + 1];
86
+ if (l !== 0 && m === void 0)
89
87
  return null;
90
- const d = new v(c(h({}, this.style), {
91
- pointVisibility: this.withDots ? { startPoint: r === 0, endPoint: !0 } : !1
92
- }));
93
- return d.setPoints([n, p]), d;
94
- }).filter(W), this.add(...this.lines);
88
+ const u = (d = this.lines[l]) != null ? d : (() => {
89
+ const y = new W(c(r({}, this.style), {
90
+ pointVisibility: this.withDots ? { startPoint: l === 0, endPoint: !0 } : !1
91
+ }));
92
+ return this.lines[l] = y, this.add(y), y;
93
+ })();
94
+ u.setStyle(this.style), u.setPoints([h, m]);
95
+ }), this.lines.length > s.length - 1 && this.lines.splice(s.length - 1).forEach((h) => h.removeFromParent());
95
96
  }
96
97
  setStyle(t) {
97
- this.paramsStyle = h(h({}, this.paramsStyle), t), this.lines.forEach((i) => i.setStyle(this.paramsStyle));
98
+ this.paramsStyle = r(r({}, this.paramsStyle), t), this.lines.forEach((i) => i.setStyle(this.paramsStyle));
98
99
  }
99
100
  highlight() {
100
101
  this.lines.forEach((t) => t.highlight());
@@ -103,19 +104,19 @@ class g extends E {
103
104
  this.lines.forEach((t) => t.unhighlight());
104
105
  }
105
106
  }
106
- class q extends g {
107
+ class F extends P {
107
108
  constructor(...t) {
108
- super(c(h({}, t[0]), { withDots: !1 }));
109
- l(this, "name", "PolylineMesh");
109
+ super(c(r({}, t[0]), { withDots: !1 }));
110
+ n(this, "name", "PolylineMesh");
110
111
  }
111
112
  }
112
- class z extends g {
113
+ class H extends P {
113
114
  constructor(...t) {
114
- super(c(h({}, t[0]), { withDots: !0 }));
115
- l(this, "name", "PolylineWithDotsMesh");
115
+ super(c(r({}, t[0]), { withDots: !0 }));
116
+ n(this, "name", "PolylineWithDotsMesh");
116
117
  }
117
118
  }
118
119
  export {
119
- q as PolylineMesh,
120
- z as PolylineWithDotsMesh
120
+ F as PolylineMesh,
121
+ H as PolylineWithDotsMesh
121
122
  };
@@ -11,12 +11,12 @@ export declare class RectangleWithEdgeMesh extends RectangleMesh {
11
11
  get style(): {
12
12
  lineColor: import("three").Color;
13
13
  lineWidth: number;
14
+ opacity: number;
14
15
  dashed: boolean;
15
16
  occlusionVisibility: boolean;
16
17
  occlusionMode: "translucence" | "depthTest";
17
18
  lengthEnable: boolean;
18
19
  color: import("three").Color;
19
- opacity: number;
20
20
  };
21
21
  get lineWidth(): number;
22
22
  get lineColor(): import("three").Color;