@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.
- package/CHANGELOG.md +7 -0
- package/dist/PanoMeasurePlugin/utils/isIntersecting.d.ts +1 -1
- package/dist/Sculpt/Meshes/Line.d.ts +1 -0
- package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Polyline.d.ts +2 -0
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +1 -1
- package/dist/index.cjs.js +51 -51
- package/dist/index.js +2607 -2515
- package/dist/index.umd.js +44 -44
- package/dist/shared-utils/three/PointSelector/index.d.ts +12 -4
- package/dist/shared-utils/three/PointSelector/utils/contents.d.ts +1 -0
- package/dist/shared-utils/three/generatePolygonGeometry.d.ts +4 -1
- package/libs/CruisePlugin/Move.js +1 -1
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/GuideLinePlugin/Controller.js +1 -1
- package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem.js +2 -3
- package/libs/ModelMakerPlugin/Controller.js +3 -2
- package/libs/ModelMakerPlugin/index.js +3 -2
- package/libs/PanoMeasurePlugin/Components/Controller0.js +21 -20
- package/libs/PanoMeasurePlugin/Components/Controller1.js +4 -3
- package/libs/PanoMeasurePlugin/Controller/EditController.js +4 -3
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/index.js +4 -3
- package/libs/PanoMeasurePlugin/Model/area.js +3 -2
- package/libs/PanoMeasurePlugin/Model/polygon.js +8 -7
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +4 -3
- package/libs/PanoMeasurePlugin/index.js +15 -14
- package/libs/PanoMeasurePlugin/utils/isIntersecting.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/isIntersecting.js +39 -16
- package/libs/PanoTagPlugin/Components/Tag/index.js +2 -3
- package/libs/PanoTagPlugin/Components/TagContainer.js +2 -3
- package/libs/PanoTagPlugin/Components/TagItem.js +2 -3
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +111 -94
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +2 -3
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +8 -9
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +2 -3
- package/libs/PanoTagPlugin/controller/TagRender.js +2 -3
- package/libs/PanoTagPlugin/controller/index.js +5 -6
- package/libs/PanoTagPlugin/index.js +11 -12
- package/libs/Sculpt/Meshes/Line.d.ts +1 -0
- package/libs/Sculpt/Meshes/Line.js +64 -56
- package/libs/Sculpt/Meshes/Polygon.js +3 -3
- package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Polyline.d.ts +2 -0
- package/libs/Sculpt/Meshes/Polyline.js +67 -66
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +1 -1
- package/libs/Sculpt/Objects/Polygon/index.js +63 -64
- package/libs/Sculpt/Objects/Polyline/index.js +8 -9
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +128 -127
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/PointSelector/index.d.ts +12 -4
- package/libs/shared-utils/three/PointSelector/index.js +83 -56
- package/libs/shared-utils/three/PointSelector/utils/contents.d.ts +1 -0
- package/libs/shared-utils/three/PointSelector/utils/contents.js +4 -0
- package/libs/shared-utils/three/generatePolygonGeometry.d.ts +4 -1
- package/libs/shared-utils/three/generatePolygonGeometry.js +19 -8
- 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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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",
|
|
194
|
-
class
|
|
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
|
-
|
|
605
|
-
|
|
606
|
-
|
|
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
|
|
3
|
-
import { defaultGlobalConfig as
|
|
4
|
-
import { ContentType as
|
|
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
|
|
166
|
+
const ir = (o, t) => new r(o, t);
|
|
168
167
|
export {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
gr as ContentType,
|
|
169
|
+
ur as DimensionType,
|
|
170
|
+
ir as PanoTagPlugin,
|
|
172
171
|
r as PanoTagPluginController,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
172
|
+
Pr as PointType,
|
|
173
|
+
ir as default,
|
|
174
|
+
ar as defaultGlobalConfig,
|
|
175
|
+
er as pluginFlag
|
|
177
176
|
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
var
|
|
1
|
+
var E = Object.defineProperty;
|
|
2
2
|
var m = Object.getOwnPropertySymbols;
|
|
3
|
-
var
|
|
4
|
-
var f = (
|
|
5
|
-
for (var e in
|
|
6
|
-
|
|
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(
|
|
9
|
-
|
|
10
|
-
return
|
|
8
|
+
for (var e of m(o))
|
|
9
|
+
T.call(o, e) && f(l, e, o[e]);
|
|
10
|
+
return l;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
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
|
|
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
|
|
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
|
|
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
|
|
23
|
-
import { getLengthHTML as
|
|
24
|
-
import { applyObjectMatrixWorld as
|
|
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
|
|
27
|
+
import { notNil as d } from "../../shared-utils/isNil.js";
|
|
28
28
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
29
|
-
class
|
|
29
|
+
class S extends w {
|
|
30
30
|
constructor(e) {
|
|
31
31
|
var i, t;
|
|
32
32
|
super(e);
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
51
|
+
h(this, "name", "Line3");
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
class Q extends
|
|
54
|
+
class Q extends C {
|
|
55
55
|
constructor(e) {
|
|
56
|
-
var
|
|
56
|
+
var s, r, c, a, g;
|
|
57
57
|
super();
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
|
69
|
-
color: new u.Color((
|
|
70
|
-
linewidth: (r = e == null ? void 0 : e.lineWidth) != null ? r :
|
|
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: (
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
105
|
+
var e;
|
|
106
|
+
return (e = this.line.material.linewidth) != null ? e : this.paramsStyle.lineWidth;
|
|
101
107
|
}
|
|
102
108
|
get color() {
|
|
103
|
-
|
|
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
|
-
|
|
113
|
+
var e;
|
|
114
|
+
return (e = this.line.material.dashed) != null ? e : this.paramsStyle.dashed;
|
|
107
115
|
}
|
|
108
116
|
get occlusionVisibility() {
|
|
109
|
-
return this.
|
|
117
|
+
return this.paramsStyle.occlusionVisibility;
|
|
110
118
|
}
|
|
111
119
|
get occlusionMode() {
|
|
112
|
-
return this.
|
|
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 =
|
|
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(
|
|
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,
|
|
143
|
-
this.paramsStyle = y(y({}, this.paramsStyle), e),
|
|
144
|
-
const i = (n = e.occlusionVisibility) != null ? n : this.paramsStyle.occlusionVisibility, t = (r = (
|
|
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 *
|
|
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(
|
|
165
|
-
i.forEach(([t, n],
|
|
172
|
+
}).filter(d).map((t) => D(this, t));
|
|
173
|
+
i.forEach(([t, n], s) => {
|
|
166
174
|
var a;
|
|
167
|
-
const r =
|
|
168
|
-
this.lengthDoms[
|
|
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[
|
|
172
|
-
const
|
|
173
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
var
|
|
1
|
+
var M = Object.defineProperty, E = Object.defineProperties;
|
|
2
|
+
var b = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var a = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var t in
|
|
7
|
-
|
|
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(
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
}, c = (
|
|
13
|
-
var
|
|
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
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var i of a(
|
|
19
|
-
|
|
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
|
|
23
|
-
import { anyPositionToVector3 as
|
|
24
|
-
import { IObject3D as
|
|
25
|
-
import
|
|
26
|
-
import "
|
|
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
|
-
|
|
28
|
+
import { removeAllTag as C } from "../utils/removeAllTag.js";
|
|
29
|
+
class P extends V {
|
|
38
30
|
constructor(t) {
|
|
39
31
|
super();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
this.withDots = i != null ? i : !0,
|
|
46
|
-
|
|
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,
|
|
62
|
-
return (
|
|
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,
|
|
66
|
-
return (
|
|
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,
|
|
70
|
-
return (
|
|
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,
|
|
74
|
-
return (
|
|
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,
|
|
78
|
-
return (
|
|
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
|
|
86
|
-
i.closed && (
|
|
87
|
-
|
|
88
|
-
|
|
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
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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 =
|
|
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
|
|
107
|
+
class F extends P {
|
|
107
108
|
constructor(...t) {
|
|
108
|
-
super(c(
|
|
109
|
-
|
|
109
|
+
super(c(r({}, t[0]), { withDots: !1 }));
|
|
110
|
+
n(this, "name", "PolylineMesh");
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
class
|
|
113
|
+
class H extends P {
|
|
113
114
|
constructor(...t) {
|
|
114
|
-
super(c(
|
|
115
|
-
|
|
115
|
+
super(c(r({}, t[0]), { withDots: !0 }));
|
|
116
|
+
n(this, "name", "PolylineWithDotsMesh");
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
export {
|
|
119
|
-
|
|
120
|
-
|
|
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;
|