@realsee/dnalogel 3.77.6 → 3.77.8
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 +5 -0
- package/dist/Sculpt/Meshes/Line.d.ts +4 -0
- package/dist/index.cjs.js +71 -71
- package/dist/index.js +3390 -3366
- package/dist/index.umd.js +64 -64
- package/dist/shared-utils/five/getFiveFromParentChain.d.ts +8 -0
- package/libs/AreaMakerPlugin/Controller.js +3 -2
- package/libs/AreaMakerPlugin/index.js +3 -2
- package/libs/AreaMakerPlugin/utils/Item.js +3 -2
- package/libs/CSS3DRenderPlugin/Controller.js +3 -2
- package/libs/CSS3DRenderPlugin/index.js +6 -5
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +39 -38
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +10 -9
- package/libs/CruisePlugin/BaseController.js +5 -4
- package/libs/CruisePlugin/Move.js +3 -2
- package/libs/CruisePlugin/Work.js +3 -2
- package/libs/CruisePlugin/index.js +7 -6
- package/libs/CurrentPanoImagePlugin/Controller.js +15 -14
- package/libs/CurrentPanoImagePlugin/index.js +4 -3
- package/libs/GuideLinePlugin/Controller.js +5 -4
- package/libs/GuideLinePlugin/GuideLineItem.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +3 -2
- package/libs/GuideLinePlugin/index.js +7 -6
- package/libs/MeasurePlugin/Controller.js +11 -10
- package/libs/MeasurePlugin/index.js +5 -4
- package/libs/MeasurePlugin/utils/MeasureMesh.js +3 -2
- package/libs/ModelChassisCompassPlugin/Plugin.js +4 -3
- package/libs/ModelChassisCompassPlugin/index.js +1 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +6 -5
- package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
- package/libs/ModelMakerPlugin/Controller.js +3 -2
- package/libs/ModelMakerPlugin/index.js +3 -2
- package/libs/ModelMakerPlugin/item/baseItem.js +3 -2
- package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
- package/libs/ModelMakerPlugin/item/polygonItem.js +3 -2
- package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
- package/libs/ModelTVVideoPlugin/Plugin.js +4 -3
- package/libs/ModelTVVideoPlugin/index.js +3 -2
- package/libs/ModelViewPlugin/Plugin.js +20 -19
- package/libs/ModelViewPlugin/index.js +1 -0
- package/libs/Object3DHelperPlugin/Controller.js +3 -2
- package/libs/Object3DHelperPlugin/index.js +6 -5
- package/libs/PanoCompassPlugin/Controller.js +3 -2
- package/libs/PanoCompassPlugin/index.js +4 -3
- package/libs/PanoDoorLabelPlugin/Controller.js +24 -23
- package/libs/PanoDoorLabelPlugin/index.js +4 -3
- package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
- package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
- package/libs/PanoMeasurePlugin/Model/area.js +3 -2
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +16 -15
- package/libs/PanoMeasurePlugin/index.js +14 -13
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +3 -2
- package/libs/PanoRulerProPlugin/Controller.js +3 -2
- package/libs/PanoRulerProPlugin/RulerItems.js +42 -41
- package/libs/PanoRulerProPlugin/index.js +4 -3
- package/libs/PanoSpatialTagPlugin/Plugin.js +34 -33
- package/libs/PanoSpatialTagPlugin/index.js +1 -0
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/TagPopover/PopoverContent.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/TagPopover/TagPopoverToolBar.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/TagPopover/index.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
- package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
- package/libs/PanoTagPlugin/Components/TagItem.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/BoxTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/MaskTag.js +1 -0
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/PolygonTag.js +3 -2
- package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
- package/libs/PanoTagPlugin/controller/TagUtil.js +3 -2
- package/libs/PanoTagPlugin/controller/index.js +30 -29
- package/libs/PanoTagPlugin/index.js +12 -11
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -2
- package/libs/PanoTagPlugin/utils/tag/format.js +3 -2
- package/libs/PanoVideoPlugin/Controller.js +9 -8
- package/libs/PanoVideoPlugin/VideoMeshController.js +3 -2
- package/libs/PanoVideoPlugin/index.js +6 -5
- package/libs/PipelinePlugin/Controller.js +3 -2
- package/libs/PipelinePlugin/index.js +4 -3
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +3 -2
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -2
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -0
- package/libs/Sculpt/Meshes/Line.d.ts +4 -0
- package/libs/Sculpt/Meshes/Line.js +85 -76
- package/libs/Sculpt/Meshes/Point.js +28 -28
- package/libs/Sculpt/Meshes/Polygon.js +43 -43
- package/libs/Sculpt/index.js +1 -1
- package/libs/Sculpt/utils/Modules/Cursor.js +7 -7
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/FloorplanGuidePlugin/Controller.js +3 -2
- package/libs/floorplan/FloorplanGuidePlugin/index.js +4 -3
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +3 -2
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -3
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +3 -2
- package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -3
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +3 -2
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -3
- package/libs/index.js +159 -158
- package/libs/shared-utils/five/getFiveFromParentChain.d.ts +8 -0
- package/libs/shared-utils/five/getFiveFromParentChain.js +20 -0
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +1 -0
- package/package.json +1 -1
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
var $ = Object.defineProperty, Y = Object.defineProperties;
|
|
2
2
|
var q = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var P = Object.getOwnPropertySymbols;
|
|
4
4
|
var J = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var T = (a, n, e) => n in a ? $(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e, p = (a, n) => {
|
|
6
6
|
for (var e in n || (n = {}))
|
|
7
|
-
J.call(n, e) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
K.call(n, e) &&
|
|
7
|
+
J.call(n, e) && T(a, e, n[e]);
|
|
8
|
+
if (P)
|
|
9
|
+
for (var e of P(n))
|
|
10
|
+
K.call(n, e) && T(a, e, n[e]);
|
|
11
11
|
return a;
|
|
12
|
-
},
|
|
13
|
-
var o = (a, n, e) => (
|
|
14
|
-
import * as
|
|
12
|
+
}, M = (a, n) => Y(a, q(n));
|
|
13
|
+
var o = (a, n, e) => (T(a, typeof n != "symbol" ? n + "" : n, e), e);
|
|
14
|
+
import * as u from "three";
|
|
15
15
|
import { DEFAULT_LINE_COLOR as Q, DEFAULT_LINE_WIDTH as X, DEFAULT_HIGHLIGHT_OPACITY as Z } from "../typings/style.js";
|
|
16
16
|
import { anyPositionToVector3 as ee } from "../../shared-utils/positionToVector3.js";
|
|
17
17
|
import { IObject3D as te } from "../../shared-utils/three/IObject3D.js";
|
|
18
18
|
import { LightTag as ie } from "../../shared-utils/tag.js";
|
|
19
19
|
import "../../vendor/hammerjs/hammer.js";
|
|
20
20
|
import "../../shared-utils/three/PointSelector/index.js";
|
|
21
|
-
import { centerPoint as
|
|
21
|
+
import { centerPoint as B } from "../../shared-utils/three/centerPoint.js";
|
|
22
22
|
import "../../shared-utils/three/CSS3DRenderer/index.js";
|
|
23
23
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
24
24
|
import { getLengthHTML as se } from "../utils/Meshes/getLengthHTML.js";
|
|
25
|
-
import { localToWorld as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
25
|
+
import { localToWorld as U } from "../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
26
|
+
import { getFiveFromParentChain as oe } from "../../shared-utils/five/getFiveFromParentChain.js";
|
|
27
|
+
import { LineGeometry as E } from "../../shared-utils/three/core/LineGeometry.js";
|
|
28
|
+
import { LineMaterial as ne } from "../../shared-utils/three/core/LineMaterial.js";
|
|
29
|
+
import { THREE_Line2 as V } from "../../shared-utils/three/core/Line2.js";
|
|
30
|
+
import { LineMaterial2 as he } from "../../shared-utils/three/core/LineMaterial2.js";
|
|
31
|
+
import { transformUnit as re } from "../utils/unit.js";
|
|
32
|
+
import { RenderDom as L } from "../utils/renderDom.js";
|
|
32
33
|
import "../../shared-utils/three/core/Sphere.js";
|
|
33
34
|
import "../../shared-utils/three/blink.js";
|
|
34
35
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
@@ -38,7 +39,7 @@ import { notNil as m } from "../../shared-utils/isNil.js";
|
|
|
38
39
|
import "../../shared-utils/five/FivePuppet.js";
|
|
39
40
|
class We extends te {
|
|
40
41
|
constructor(e) {
|
|
41
|
-
var
|
|
42
|
+
var r, h, f;
|
|
42
43
|
super();
|
|
43
44
|
o(this, "name", "LineMesh");
|
|
44
45
|
o(this, "type", "Line2");
|
|
@@ -54,6 +55,8 @@ class We extends te {
|
|
|
54
55
|
o(this, "paramsStyle", {});
|
|
55
56
|
o(this, "lastRenderDomItem");
|
|
56
57
|
o(this, "lastFOV");
|
|
58
|
+
o(this, "fiveListenersInited", !1);
|
|
59
|
+
o(this, "fiveRef");
|
|
57
60
|
o(this, "_onAdded", () => {
|
|
58
61
|
this.doms.length === 0 && this.paramsStyle.lengthEnable && this.updateDomItems();
|
|
59
62
|
});
|
|
@@ -75,26 +78,22 @@ class We extends te {
|
|
|
75
78
|
o(this, "onPanoArrived", () => {
|
|
76
79
|
setTimeout(() => this.updateDomItems({ force: !0 }), 100);
|
|
77
80
|
});
|
|
78
|
-
this.paramsStyle =
|
|
81
|
+
this.paramsStyle = p({ dashed: !1, lineOpacity: 1 }, e), this.geometry = new E();
|
|
79
82
|
const i = {
|
|
80
|
-
color: new
|
|
81
|
-
linewidth: (
|
|
83
|
+
color: new u.Color((r = e == null ? void 0 : e.lineColor) != null ? r : Q),
|
|
84
|
+
linewidth: (h = e == null ? void 0 : e.lineWidth) != null ? h : X,
|
|
82
85
|
dashScale: 1,
|
|
83
86
|
dashSize: 0.02,
|
|
84
87
|
gapSize: 0.02,
|
|
85
88
|
opacity: (f = e == null ? void 0 : e.lineOpacity) != null ? f : 1,
|
|
86
89
|
depthWrite: !1,
|
|
87
90
|
transparent: !0
|
|
88
|
-
}, s = new
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
y && this.setResolution(y.width, y.height), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("cameraFovUpdate", this.onCameraUpdate), this.five.on("panoArrived", this.onPanoArrived);
|
|
92
|
-
}
|
|
93
|
-
e && this.setStyle(e), e != null && e.points && this.setPoints(e.points), this.addEventListener("removed", () => {
|
|
94
|
-
this.five && (this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("cameraFovUpdate", this.onCameraUpdate), this.five.off("panoArrived", this.onPanoArrived)), T.cacheObject.delete(this), T.checkDom(this);
|
|
91
|
+
}, s = new ne(M(p({}, i), { dashed: !1, depthTest: !0 })), t = new he(M(p({}, i), { dashed: !0, depthTest: !1 }));
|
|
92
|
+
this.line1 = new V(this.geometry, s), this.line2 = new V(this.geometry, t), this.line1.renderOrder = 2, this.line2.renderOrder = 2, this.line1.name = "line1", this.line2.name = "line2", this.add(this.line1), this.initFiveListeners(), e && this.setStyle(e), e != null && e.points && this.setPoints(e.points), this.addEventListener("removed", () => {
|
|
93
|
+
this.removeFiveListeners(), L.cacheObject.delete(this), L.checkDom(this);
|
|
95
94
|
}), this.addEventListener("added", () => {
|
|
96
|
-
|
|
97
|
-
}),
|
|
95
|
+
this.initFiveListeners(), L.cacheObject.add(this);
|
|
96
|
+
}), L.checkDomEveryFrame();
|
|
98
97
|
}
|
|
99
98
|
get style() {
|
|
100
99
|
return {
|
|
@@ -118,7 +117,7 @@ class We extends te {
|
|
|
118
117
|
}
|
|
119
118
|
get color() {
|
|
120
119
|
var e;
|
|
121
|
-
return new
|
|
120
|
+
return new u.Color((e = this.line1.material.three_color) != null ? e : this.paramsStyle.lineColor);
|
|
122
121
|
}
|
|
123
122
|
get dashed() {
|
|
124
123
|
return this.paramsStyle.dashed;
|
|
@@ -130,9 +129,7 @@ class We extends te {
|
|
|
130
129
|
return this.paramsStyle.occlusionMode;
|
|
131
130
|
}
|
|
132
131
|
get five() {
|
|
133
|
-
|
|
134
|
-
const e = (s = (i = window.globalModules) == null ? void 0 : i.five) != null ? s : window.$five;
|
|
135
|
-
return e || console.error("请先调用 Sculpt.modules.init(five) "), e;
|
|
132
|
+
return oe(this);
|
|
136
133
|
}
|
|
137
134
|
set geometry(e) {
|
|
138
135
|
var i;
|
|
@@ -141,10 +138,22 @@ class We extends te {
|
|
|
141
138
|
get geometry() {
|
|
142
139
|
return this._geometry;
|
|
143
140
|
}
|
|
141
|
+
initFiveListeners() {
|
|
142
|
+
var s;
|
|
143
|
+
const e = this.five;
|
|
144
|
+
if (!e || this.fiveListenersInited)
|
|
145
|
+
return;
|
|
146
|
+
this.fiveListenersInited = !0, this.fiveRef = e;
|
|
147
|
+
const i = (s = e.renderer) == null ? void 0 : s.getSize(new u.Vector2());
|
|
148
|
+
i && this.setResolution(i.width, i.height), e.on("cameraUpdate", this.onCameraUpdate), e.on("cameraFovUpdate", this.onCameraUpdate), e.on("panoArrived", this.onPanoArrived);
|
|
149
|
+
}
|
|
150
|
+
removeFiveListeners() {
|
|
151
|
+
this.fiveRef && (this.fiveRef.off("cameraUpdate", this.onCameraUpdate), this.fiveRef.off("cameraFovUpdate", this.onCameraUpdate), this.fiveRef.off("panoArrived", this.onPanoArrived), this.fiveRef = void 0), this.fiveListenersInited = !1;
|
|
152
|
+
}
|
|
144
153
|
updateMatrixWorld(e) {
|
|
145
154
|
var i;
|
|
146
155
|
if (super.updateMatrixWorld(e), this.points) {
|
|
147
|
-
const s = (i =
|
|
156
|
+
const s = (i = U(this, this.points)) == null ? void 0 : i.map((t) => t.toArray().join(",")).join(",");
|
|
148
157
|
s !== this.lastRenderDomItem && (this.updateDomItems(), this.lastRenderDomItem = s);
|
|
149
158
|
}
|
|
150
159
|
}
|
|
@@ -153,14 +162,14 @@ class We extends te {
|
|
|
153
162
|
return;
|
|
154
163
|
const i = e.map(ee).filter(m);
|
|
155
164
|
if (this.points = i, i.length < 2) {
|
|
156
|
-
const t = new
|
|
165
|
+
const t = new E();
|
|
157
166
|
this.line1.geometry = t, this.line2.geometry = t, this.updateDomItems();
|
|
158
167
|
return;
|
|
159
168
|
}
|
|
160
169
|
const s = i.flatMap((t) => [t.x, t.y, t.z]);
|
|
161
170
|
if (s.length > 2) {
|
|
162
171
|
this.line1.geometry.dispose();
|
|
163
|
-
const t = new
|
|
172
|
+
const t = new E();
|
|
164
173
|
this.line1.geometry = t, this.line2.geometry = t;
|
|
165
174
|
}
|
|
166
175
|
this.line1.geometry.setPositions(s), this.line1.computeLineDistances(), this.updateDomItems(), this.needsRender = !0;
|
|
@@ -172,19 +181,19 @@ class We extends te {
|
|
|
172
181
|
(t.x !== e || t.y !== i) && (t.set(e, i), this.needsRender = !0);
|
|
173
182
|
}
|
|
174
183
|
setStyle(e) {
|
|
175
|
-
var t,
|
|
176
|
-
if (this.paramsStyle =
|
|
177
|
-
const d = new
|
|
184
|
+
var t, r, h, f;
|
|
185
|
+
if (this.paramsStyle = p(p({}, this.paramsStyle), e), m(e.lineColor)) {
|
|
186
|
+
const d = new u.Color(e.lineColor);
|
|
178
187
|
this.line1.material.three_color = d, this.line2.material.three_color = d;
|
|
179
188
|
}
|
|
180
189
|
m(e.lineWidth) && (this.line1.material.linewidth = e.lineWidth, this.line2.material.linewidth = e.lineWidth), m(e.dashed) && (this.line1.material.dashed = e.dashed), m(e.lineOpacity) && (this.line1.material.opacity = e.lineOpacity, this.line2.material.opacity = e.lineOpacity), this.updateDomItems({ force: !0 });
|
|
181
|
-
const i = (
|
|
190
|
+
const i = (r = (t = e.occlusionVisibility) != null ? t : this.paramsStyle.occlusionVisibility) != null ? r : !0, s = (f = (h = e.occlusionMode) != null ? h : this.paramsStyle.occlusionMode) != null ? f : "translucence";
|
|
182
191
|
i ? this.dashed ? (this.remove(this.line2), this.line1.material.dashed = !0, this.line1.material.depthTest = !1) : s === "depthTest" ? (this.remove(this.line2), this.line1.material.dashed = !1, this.line1.material.depthTest = !1) : s === "translucence" && (this.line1.material.depthTest = !0, this.line2.material.depthTest = !1, this.line1.material.dashed = !0, this.line2.material.dashed = !0, this.addIfNotExists(this.line2)) : (this.remove(this.line2), this.line1.material.depthTest = !0, this.line1.material.dashed = this.paramsStyle.dashed), this.doms.forEach((d) => d.intersectCheck = !i), this.needsRender = !0;
|
|
183
192
|
}
|
|
184
193
|
highlight(e) {
|
|
185
194
|
var i, s;
|
|
186
195
|
if (this.highlighted = !0, e != null && e.color) {
|
|
187
|
-
const t = new
|
|
196
|
+
const t = new u.Color(e.color);
|
|
188
197
|
this.colorBeforeHighlight = (i = this.colorBeforeHighlight) != null ? i : this.line1.material.three_color, this.line1.material.three_color = t, this.line2.material.three_color = t;
|
|
189
198
|
} else {
|
|
190
199
|
this.opacityBeforeHighlight = (s = this.opacityBeforeHighlight) != null ? s : this.line1.material.opacity;
|
|
@@ -204,56 +213,56 @@ class We extends te {
|
|
|
204
213
|
return i();
|
|
205
214
|
if (!this.five)
|
|
206
215
|
return console.error("Five not found");
|
|
207
|
-
const s = this.points.map((t,
|
|
208
|
-
s.forEach(([t,
|
|
209
|
-
var
|
|
210
|
-
const f =
|
|
211
|
-
this.doms[
|
|
212
|
-
var
|
|
213
|
-
const
|
|
214
|
-
return
|
|
215
|
-
})(), this.doms[
|
|
216
|
-
const d = (
|
|
217
|
-
var _,
|
|
218
|
-
const
|
|
219
|
-
if (!(this.doms[
|
|
220
|
-
if (this.doms[
|
|
221
|
-
this.doms[
|
|
222
|
-
else if (
|
|
223
|
-
const
|
|
216
|
+
const s = this.points.map((t, r) => r !== 0 ? [this.points[r - 1], t] : null).filter(m).map((t) => U(this, t));
|
|
217
|
+
s.forEach(([t, r], h) => {
|
|
218
|
+
var H;
|
|
219
|
+
const f = B(t, r);
|
|
220
|
+
this.doms[h] = (H = this.doms[h]) != null ? H : (() => {
|
|
221
|
+
var v;
|
|
222
|
+
const l = new ie(this.five), g = (v = this.paramsStyle.occlusionVisibility) != null ? v : !0;
|
|
223
|
+
return l.intersectCheck = !g, l.simulate3D = !0, l;
|
|
224
|
+
})(), this.doms[h].setPosition(f, [t, r]);
|
|
225
|
+
const d = (l, g) => {
|
|
226
|
+
var _, I, D;
|
|
227
|
+
const v = (_ = g == null ? void 0 : g.force) != null ? _ : !1;
|
|
228
|
+
if (!(this.doms[h].__text === l && !v))
|
|
229
|
+
if (this.doms[h].__text = l, l instanceof HTMLElement)
|
|
230
|
+
this.doms[h].container.innerHTML = "", this.doms[h].container.appendChild(l);
|
|
231
|
+
else if (l) {
|
|
232
|
+
const R = (() => {
|
|
224
233
|
if (!this.five || !this.five.camera)
|
|
225
234
|
return 0;
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
235
|
+
const y = this.five.getElement();
|
|
236
|
+
if (!y)
|
|
228
237
|
return 0;
|
|
229
|
-
const c =
|
|
238
|
+
const c = y.clientWidth, S = y.clientHeight, C = c / 2, b = S / 2, O = t.clone().project(this.five.camera), F = r.clone().project(this.five.camera), w = {
|
|
230
239
|
x: O.x * C,
|
|
231
|
-
y: O.y *
|
|
232
|
-
},
|
|
233
|
-
x:
|
|
234
|
-
y:
|
|
240
|
+
y: O.y * b
|
|
241
|
+
}, W = {
|
|
242
|
+
x: F.x * C,
|
|
243
|
+
y: F.y * b
|
|
235
244
|
};
|
|
236
|
-
return Math.sqrt(Math.pow(
|
|
237
|
-
})(), A = (() => !this.five || !this.five.camera ? 20 :
|
|
245
|
+
return Math.sqrt(Math.pow(W.x - w.x, 2) + Math.pow(W.y - w.y, 2));
|
|
246
|
+
})(), A = (() => !this.five || !this.five.camera ? 20 : B(t, r).distanceTo(this.five.camera.position))(), j = ((D = (I = this.five) == null ? void 0 : I.camera) == null ? void 0 : D.fov) || 60, z = 2 * Math.tan(0.5 * j / 180 * Math.PI), k = `--distance-scale: ${Math.max(Math.min(1 - z * A / 40, 1), 0)};`, G = (y) => {
|
|
238
247
|
const c = document.createElement("div");
|
|
239
|
-
c.classList.add("LineLengthTag"), c.style.visibility = "hidden", c.style.position = "absolute", c.style.padding = "2px 8px", c.style.fontFamily = "Arial-BoldMT", c.style.fontSize = "14px", c.innerText =
|
|
240
|
-
const
|
|
241
|
-
return document.body.removeChild(c),
|
|
248
|
+
c.classList.add("LineLengthTag"), c.style.visibility = "hidden", c.style.position = "absolute", c.style.padding = "2px 8px", c.style.fontFamily = "Arial-BoldMT", c.style.fontSize = "14px", c.innerText = y, document.body.appendChild(c);
|
|
249
|
+
const S = c.offsetWidth;
|
|
250
|
+
return document.body.removeChild(c), S;
|
|
242
251
|
};
|
|
243
252
|
let x = 0;
|
|
244
|
-
const N = G(
|
|
245
|
-
|
|
253
|
+
const N = G(l);
|
|
254
|
+
R > 0 && N > R && (x = -20), this.doms[h].container.innerHTML = se(l, {
|
|
246
255
|
style: `${k} ${this.paramsStyle.cssStyle || ""}`,
|
|
247
256
|
offsetY: x
|
|
248
257
|
});
|
|
249
258
|
} else
|
|
250
|
-
this.doms[
|
|
259
|
+
this.doms[h].container.innerHTML = "";
|
|
251
260
|
};
|
|
252
261
|
if (this.paramsStyle.tip)
|
|
253
262
|
d(this.paramsStyle.tip, e);
|
|
254
263
|
else {
|
|
255
|
-
const
|
|
256
|
-
d(
|
|
264
|
+
const l = re(t.distanceTo(r), this.paramsStyle.lengthUnit, this.paramsStyle.precision);
|
|
265
|
+
d(l || null, e);
|
|
257
266
|
}
|
|
258
267
|
}), this.doms.length > s.length && (this.doms.slice(s.length).forEach((t) => t.destroy()), this.doms.length = s.length);
|
|
259
268
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var P = Object.defineProperty, E = Object.defineProperties;
|
|
2
|
+
var N = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var A = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var f = (e, i, t) => i in e ?
|
|
4
|
+
var v = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var f = (e, i, t) => i in e ? P(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, m = (e, i) => {
|
|
6
6
|
for (var t in i || (i = {}))
|
|
7
|
-
|
|
7
|
+
v.call(i, t) && f(e, t, i[t]);
|
|
8
8
|
if (A)
|
|
9
9
|
for (var t of A(i))
|
|
10
|
-
|
|
10
|
+
b.call(i, t) && f(e, t, i[t]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
12
|
+
}, a = (e, i) => E(e, N(i));
|
|
13
13
|
var k = (e, i) => {
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var o in e)
|
|
16
|
-
|
|
16
|
+
v.call(e, o) && i.indexOf(o) < 0 && (t[o] = e[o]);
|
|
17
17
|
if (e != null && A)
|
|
18
18
|
for (var o of A(e))
|
|
19
|
-
i.indexOf(o) < 0 &&
|
|
19
|
+
i.indexOf(o) < 0 && b.call(e, o) && (t[o] = e[o]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
var s = (e, i, t) => (f(e, typeof i != "symbol" ? i + "" : i, t), t);
|
|
@@ -29,8 +29,9 @@ import "../../vendor/hammerjs/hammer.js";
|
|
|
29
29
|
import "../../shared-utils/three/PointSelector/index.js";
|
|
30
30
|
import "../../shared-utils/three/CSS3DRenderer/index.js";
|
|
31
31
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
32
|
-
import { getLengthHTML as
|
|
33
|
-
import { localToWorld as
|
|
32
|
+
import { getLengthHTML as F } from "../utils/Meshes/getLengthHTML.js";
|
|
33
|
+
import { localToWorld as H } from "../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
34
|
+
import { getFiveFromParentChain as S } from "../../shared-utils/five/getFiveFromParentChain.js";
|
|
34
35
|
import "@realsee/five/line";
|
|
35
36
|
import { notNil as g } from "../../shared-utils/isNil.js";
|
|
36
37
|
import "../../shared-utils/three/core/Five_LineMaterial2.js";
|
|
@@ -43,9 +44,9 @@ import "../../vendor/earcut/src/earcut.js";
|
|
|
43
44
|
import "../../shared-utils/five/FivePuppet.js";
|
|
44
45
|
const x = "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==";
|
|
45
46
|
let C = null;
|
|
46
|
-
class
|
|
47
|
+
class nt extends T {
|
|
47
48
|
constructor(t) {
|
|
48
|
-
var
|
|
49
|
+
var y, w, V;
|
|
49
50
|
super();
|
|
50
51
|
s(this, "name", "PointMesh");
|
|
51
52
|
s(this, "dom");
|
|
@@ -76,21 +77,21 @@ class st extends T {
|
|
|
76
77
|
const M = {
|
|
77
78
|
transparent: !0,
|
|
78
79
|
side: n.DoubleSide,
|
|
79
|
-
size: (
|
|
80
|
+
size: (y = t == null ? void 0 : t.size) != null ? y : 8,
|
|
80
81
|
map: C || (C = new n.TextureLoader().load(x)),
|
|
81
82
|
sizeAttenuation: !1
|
|
82
|
-
},
|
|
83
|
-
color: (
|
|
83
|
+
}, r = new n.PointsMaterial(a(m({}, M), {
|
|
84
|
+
color: (w = t == null ? void 0 : t.color) != null ? w : 16777215,
|
|
84
85
|
depthTest: !0,
|
|
85
86
|
opacity: (V = t == null ? void 0 : t.opacity) != null ? V : 1
|
|
86
|
-
})), D = new n.PointsMaterial(m(
|
|
87
|
-
size:
|
|
88
|
-
color:
|
|
87
|
+
})), D = new n.PointsMaterial(a(m({}, M), {
|
|
88
|
+
size: r.size,
|
|
89
|
+
color: r.color,
|
|
89
90
|
depthWrite: !1,
|
|
90
91
|
depthTest: !1,
|
|
91
|
-
opacity:
|
|
92
|
-
})),
|
|
93
|
-
this.fontMesh =
|
|
92
|
+
opacity: r.opacity * 0.5
|
|
93
|
+
})), l = new n.Points(u, r), d = new n.Points(u, D);
|
|
94
|
+
this.fontMesh = l, this.backgroundMesh = d, l.name = "FontMesh", d.name = "BackgroundMesh", l.renderOrder = 10, d.renderOrder = 0, this.add(l, d), t != null && t.point && this.position.copy(W(t.point)), t && this.setStyle(t), this.addEventListener("removed", () => {
|
|
94
95
|
c.cacheObject.delete(this), c.checkDom(this);
|
|
95
96
|
}), this.addEventListener("added", () => {
|
|
96
97
|
c.cacheObject.add(this);
|
|
@@ -112,8 +113,7 @@ class st extends T {
|
|
|
112
113
|
};
|
|
113
114
|
}
|
|
114
115
|
get five() {
|
|
115
|
-
|
|
116
|
-
return (o = (t = window.globalModules) == null ? void 0 : t.five) != null ? o : window.$five;
|
|
116
|
+
return S(this);
|
|
117
117
|
}
|
|
118
118
|
setStyle(t) {
|
|
119
119
|
g(t.color) && (this.fontMesh.material.setValues({ color: t.color }), this.backgroundMesh.material.setValues({ color: t.color })), g(t.size) && (this.fontMesh.material.setValues({ side: t.size }), this.backgroundMesh.material.setValues({ side: t.size })), g(t.occlusionVisibility) && (t.occlusionVisibility ? t.occlusionMode === "depthTest" ? (this.fontMesh.material.depthTest = !1, this.backgroundMesh.visible = !1) : (this.fontMesh.material.depthTest = !0, this.backgroundMesh.visible = !0) : (this.fontMesh.material.depthTest = !0, this.backgroundMesh.visible = !1));
|
|
@@ -126,14 +126,14 @@ class st extends T {
|
|
|
126
126
|
}
|
|
127
127
|
updateMatrixWorld(t) {
|
|
128
128
|
super.updateMatrixWorld(t);
|
|
129
|
-
const o =
|
|
129
|
+
const o = H(this, this.position).toArray().join(",");
|
|
130
130
|
o !== this.lastRenderDomItem && (this.updateDom(), this.lastRenderDomItem = o);
|
|
131
131
|
}
|
|
132
132
|
updateDom() {
|
|
133
133
|
const t = this.paramsStyle.tip;
|
|
134
|
-
t && !this.dom && (this.dom = new B(this.five), this.dom.intersectCheck = !1, this.dom.simulate3D = !0, this.dom.container.style.display = this.visible ? "block" : "none");
|
|
134
|
+
t && !this.dom && this.five && (this.dom = new B(this.five), this.dom.intersectCheck = !1, this.dom.simulate3D = !0, this.dom.container.style.display = this.visible ? "block" : "none");
|
|
135
135
|
const o = (h) => {
|
|
136
|
-
this.dom && this.dom.__text !== h && (this.dom.__text = h, h instanceof HTMLElement ? (this.dom.container.innerHTML = "", this.dom.container.appendChild(h)) : h ? this.dom.container.innerHTML =
|
|
136
|
+
this.dom && this.dom.__text !== h && (this.dom.__text = h, h instanceof HTMLElement ? (this.dom.container.innerHTML = "", this.dom.container.appendChild(h)) : h ? this.dom.container.innerHTML = F(h, {
|
|
137
137
|
style: "",
|
|
138
138
|
offsetY: -20
|
|
139
139
|
// 移动label到点的上方,否则会遮挡鼠标选点
|
|
@@ -143,5 +143,5 @@ class st extends T {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
export {
|
|
146
|
-
|
|
146
|
+
nt as PointMesh
|
|
147
147
|
};
|
|
@@ -2,51 +2,52 @@ var f = Object.defineProperty, g = Object.defineProperties;
|
|
|
2
2
|
var I = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var u = Object.getOwnPropertySymbols;
|
|
4
4
|
var D = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var p = (
|
|
5
|
+
var p = (i, t, e) => t in i ? f(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, h = (i, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
D.call(t, e) && p(
|
|
7
|
+
D.call(t, e) && p(i, e, t[e]);
|
|
8
8
|
if (u)
|
|
9
9
|
for (var e of u(t))
|
|
10
|
-
_.call(t, e) && p(
|
|
11
|
-
return
|
|
12
|
-
}, y = (
|
|
13
|
-
var
|
|
10
|
+
_.call(t, e) && p(i, e, t[e]);
|
|
11
|
+
return i;
|
|
12
|
+
}, y = (i, t) => g(i, I(t));
|
|
13
|
+
var r = (i, t, e) => (p(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
14
|
import * as a from "three";
|
|
15
|
-
import { generatePolygonGeometry as
|
|
16
|
-
import { anyPositionToVector3 as
|
|
15
|
+
import { generatePolygonGeometry as H } from "../../shared-utils/three/generatePolygonGeometry.js";
|
|
16
|
+
import { anyPositionToVector3 as b } from "../../shared-utils/positionToVector3.js";
|
|
17
17
|
import { ColoredMesh as S } from "../utils/three/ColoredMesh.js";
|
|
18
18
|
import { getGeometryInfo as k } from "../../shared-utils/three/geometryUtil.js";
|
|
19
|
-
import { LightTag as
|
|
20
|
-
import { getLengthHTML as
|
|
21
|
-
import { localToWorld as
|
|
22
|
-
import {
|
|
19
|
+
import { LightTag as P } from "../../shared-utils/tag.js";
|
|
20
|
+
import { getLengthHTML as v } from "../utils/Meshes/getLengthHTML.js";
|
|
21
|
+
import { localToWorld as F } from "../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
22
|
+
import { getFiveFromParentChain as A } from "../../shared-utils/five/getFiveFromParentChain.js";
|
|
23
|
+
import { transformUnitSquare as U } from "../utils/unit.js";
|
|
23
24
|
import { RenderDom as m } from "../utils/renderDom.js";
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class
|
|
25
|
+
const c = new a.BufferGeometry();
|
|
26
|
+
c.name = "blankGeometry";
|
|
27
|
+
c.isBlank = !0;
|
|
28
|
+
class G extends S {
|
|
28
29
|
constructor(e) {
|
|
29
30
|
super(e);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
r(this, "name", "PolygonMesh");
|
|
32
|
+
r(this, "points", []);
|
|
33
|
+
r(this, "planeHelperNeedUpdate", !0);
|
|
34
|
+
r(this, "geometryInfoNeedUpdate", !0);
|
|
35
|
+
r(this, "_paramsStyle");
|
|
36
|
+
r(this, "areaDom");
|
|
37
|
+
r(this, "planeHelper", null);
|
|
38
|
+
r(this, "_geometryInfo", null);
|
|
39
|
+
r(this, "lastRenderAreaItem");
|
|
40
|
+
r(this, "_onAdded", () => {
|
|
40
41
|
this.areaDom || this.updateAreaItems();
|
|
41
42
|
});
|
|
42
|
-
|
|
43
|
+
r(this, "_onRemoved", () => {
|
|
43
44
|
var e;
|
|
44
45
|
(e = this.areaDom) == null || e.destroy(), this.areaDom = void 0;
|
|
45
46
|
});
|
|
46
|
-
|
|
47
|
+
r(this, "_onShowed", () => {
|
|
47
48
|
this.areaDom && (this.areaDom.container.style.display = "block");
|
|
48
49
|
});
|
|
49
|
-
|
|
50
|
+
r(this, "_onHidden", () => {
|
|
50
51
|
this.areaDom && (this.areaDom.container.style.display = "none");
|
|
51
52
|
});
|
|
52
53
|
e != null && e.points && this.setPoints(e.points), this._paramsStyle = e != null ? e : {}, this.updateAreaItems(), this.addEventListener("removed", () => {
|
|
@@ -72,25 +73,24 @@ class j extends S {
|
|
|
72
73
|
return this.geometryInfoNeedUpdate && (this.isBlank ? this._geometryInfo = null : this._geometryInfo = k(this.geometry), this.geometryInfoNeedUpdate = !1), this._geometryInfo;
|
|
73
74
|
}
|
|
74
75
|
get five() {
|
|
75
|
-
|
|
76
|
-
return (r = (e = window.globalModules) == null ? void 0 : e.five) != null ? r : window.$five;
|
|
76
|
+
return A(this);
|
|
77
77
|
}
|
|
78
78
|
updateMatrixWorld(e) {
|
|
79
79
|
if (super.updateMatrixWorld(e), this.center) {
|
|
80
|
-
const
|
|
81
|
-
|
|
80
|
+
const s = F(this, this.center).toArray().join(",");
|
|
81
|
+
s !== this.lastRenderAreaItem && (this.updateAreaItems(), this.lastRenderAreaItem = s);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
setStyle(e) {
|
|
85
85
|
var n;
|
|
86
86
|
this._paramsStyle = h(h({}, this._paramsStyle), e), super.setStyle(this._paramsStyle);
|
|
87
|
-
const
|
|
88
|
-
this.areaDom && (this.areaDom.intersectCheck = !
|
|
87
|
+
const s = (n = this._paramsStyle.occlusionVisibility) != null ? n : !0;
|
|
88
|
+
this.areaDom && (this.areaDom.intersectCheck = !s), this.updateAreaItems();
|
|
89
89
|
}
|
|
90
|
-
setPoints(e,
|
|
90
|
+
setPoints(e, s) {
|
|
91
91
|
var o, l;
|
|
92
|
-
const n = e.map(
|
|
93
|
-
this.points = n, this.geometry = (l =
|
|
92
|
+
const n = e.map(b);
|
|
93
|
+
this.points = n, this.geometry = (l = H(this.points, { checkLinesIntersect: (o = s == null ? void 0 : s.checkLinesIntersect) != null ? o : !0 })) != null ? l : c, this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0, this.updateAreaItems();
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* @description: 获取一个点投影在当前平面上的点
|
|
@@ -112,16 +112,16 @@ class j extends S {
|
|
|
112
112
|
if (!this.five)
|
|
113
113
|
return console.error("Five not found");
|
|
114
114
|
this.areaDom = (n = this.areaDom) != null ? n : (() => {
|
|
115
|
-
var
|
|
116
|
-
const o = new
|
|
115
|
+
var d;
|
|
116
|
+
const o = new P(this.five), l = (d = this._paramsStyle.occlusionVisibility) != null ? d : !0;
|
|
117
117
|
return o.intersectCheck = !l, o.simulate3D = !0, o;
|
|
118
118
|
})(), this.areaDom.setPosition(this.center);
|
|
119
|
-
const
|
|
120
|
-
|
|
119
|
+
const s = U(this.geometryInfo.area, this._paramsStyle.lengthUnit);
|
|
120
|
+
s ? this.areaDom.container.innerHTML = v(s, {
|
|
121
121
|
style: "color: #FFFFFF; background: #3366FF"
|
|
122
122
|
}) : this.areaDom.container.innerHTML = "";
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
export {
|
|
126
|
-
|
|
126
|
+
G as PolygonMesh
|
|
127
127
|
};
|
package/libs/Sculpt/index.js
CHANGED
|
@@ -90,7 +90,7 @@ const d = class extends E {
|
|
|
90
90
|
});
|
|
91
91
|
this.five = e, this.theme = t, this.config = g({
|
|
92
92
|
magnifier: { width: 190, height: 190, scale: 2, dragEnabled: !0 }
|
|
93
|
-
}, i), this.group = new z(), this.group.name = "Sculpt", this.group.__sculpt__ = this, e.scene.add(this.group), d.modules.init(e, this.config), x("ctrl+z, command+z", this.undo), x("ctrl+shift+z, command+shift+z", this.redo), d.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: c, origDomEvent: s }) => {
|
|
93
|
+
}, i), this.group = new z(), this.group.name = "Sculpt", this.group.__sculpt__ = this, this.group.__five__ = this.five, e.scene.add(this.group), d.modules.init(e, this.config), x("ctrl+z, command+z", this.undo), x("ctrl+shift+z, command+shift+z", this.redo), d.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: c, origDomEvent: s }) => {
|
|
94
94
|
var o;
|
|
95
95
|
const r = F((o = c == null ? void 0 : c[0]) == null ? void 0 : o.object, (h) => h.isSculptObject);
|
|
96
96
|
return r && !r.editing ? this.emit("click", s, r) : !1;
|
|
@@ -2,8 +2,8 @@ var l = Object.defineProperty;
|
|
|
2
2
|
var u = (n, e, o) => e in n ? l(n, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[e] = o;
|
|
3
3
|
var r = (n, e, o) => (u(n, typeof e != "symbol" ? e + "" : e, o), o);
|
|
4
4
|
import { DeleteButtonBgBorder as a } from "./DeleteButtonBgBorder.js";
|
|
5
|
-
import { DeleteIconSVG as
|
|
6
|
-
const
|
|
5
|
+
import { DeleteIconSVG as d } from "./DeleteIconSVG.js";
|
|
6
|
+
const p = {
|
|
7
7
|
auto: "",
|
|
8
8
|
pen: "",
|
|
9
9
|
"pen-forbidden": "",
|
|
@@ -13,7 +13,7 @@ const d = {
|
|
|
13
13
|
"crosshair-rectangle": "",
|
|
14
14
|
"crosshair-circle": ""
|
|
15
15
|
}, h = {
|
|
16
|
-
position: "
|
|
16
|
+
position: "fixed",
|
|
17
17
|
width: "34px",
|
|
18
18
|
height: "34px",
|
|
19
19
|
transform: "translate(-50%, -40px)",
|
|
@@ -30,10 +30,10 @@ const d = {
|
|
|
30
30
|
backgroundRepeat: "no-repeat"
|
|
31
31
|
}, m = `
|
|
32
32
|
<div style="width: 32px; height: 32px; background-color: rgba(0, 0, 0, 0.5); border-radius: 50%; display: flex; align-items: center; justify-content: center;">
|
|
33
|
-
${
|
|
33
|
+
${d}
|
|
34
34
|
</div>
|
|
35
35
|
`;
|
|
36
|
-
class
|
|
36
|
+
class f {
|
|
37
37
|
constructor(e) {
|
|
38
38
|
r(this, "container");
|
|
39
39
|
r(this, "deleteButton");
|
|
@@ -43,7 +43,7 @@ class B {
|
|
|
43
43
|
* @param type - The type of the cursor.
|
|
44
44
|
*/
|
|
45
45
|
setType(e) {
|
|
46
|
-
const o =
|
|
46
|
+
const o = p[e];
|
|
47
47
|
o ? this.container.style.cursor = `url(${o}), auto` : this.container.style.cursor = e;
|
|
48
48
|
}
|
|
49
49
|
showDeleteButton(e) {
|
|
@@ -66,5 +66,5 @@ class B {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
f as Cursor
|
|
70
70
|
};
|