@realsee/dnalogel 3.43.0 → 3.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DObject.d.ts +4 -2
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DRenderer.d.ts +2 -1
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DSprite.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +6 -1
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +2 -0
- package/dist/Sculpt/Meshes/Line.d.ts +19 -1
- package/dist/Sculpt/utils/color.d.ts +1 -1
- package/dist/index.cjs.js +102 -68
- package/dist/index.js +7374 -7116
- package/dist/index.umd.js +106 -72
- package/dist/shared-utils/five/getPosition.d.ts +12 -4
- package/dist/shared-utils/five/initialCSS3DRender.d.ts +2 -0
- package/dist/shared-utils/math/deg2Rad.d.ts +1 -1
- package/dist/shared-utils/math/rad2Deg.d.ts +1 -1
- package/dist/shared-utils/positionToVector3.d.ts +6 -6
- package/{libs/shared-utils/three/PointSelector.d.ts → dist/shared-utils/three/PointSelector/index.d.ts} +23 -7
- package/dist/shared-utils/three/{PointHelper.d.ts → PointSelector/utils/PointHelper.d.ts} +11 -3
- package/dist/shared-utils/three/PointSelector/utils/PointHelper2.d.ts +30 -0
- package/dist/shared-utils/three/{PointSelectorHelper.d.ts → PointSelector/utils/PointSelectorHelper.d.ts} +9 -10
- package/dist/shared-utils/three/PointSelector/utils/typing.d.ts +8 -0
- package/dist/shared-utils/three/index.d.ts +2 -3
- package/libs/AreaMakerPlugin/Controller.js +5 -18
- package/libs/AreaMakerPlugin/index.js +4 -17
- package/libs/AreaMakerPlugin/utils/Item.js +13 -26
- package/libs/CSS3DRenderPlugin/Controller.js +9 -6
- package/libs/CSS3DRenderPlugin/index.js +12 -9
- package/libs/CSS3DRenderPlugin/utils/getAllCSS3DObject.js +6 -6
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.d.ts +4 -2
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +73 -56
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +11 -4
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.d.ts +2 -1
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.js +14 -14
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DSprite.d.ts +4 -0
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DSprite.js +13 -0
- package/libs/CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js +85 -0
- package/libs/CruisePlugin/BaseController.js +20 -33
- package/libs/CruisePlugin/Move.js +25 -23
- package/libs/CruisePlugin/Work.js +10 -8
- package/libs/CruisePlugin/index.js +23 -21
- package/libs/CurrentPanoImagePlugin/Controller.js +30 -43
- package/libs/CurrentPanoImagePlugin/index.js +5 -18
- package/libs/GuideLinePlugin/Controller.js +15 -13
- package/libs/GuideLinePlugin/GuideLineItem.js +19 -17
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +4 -5
- package/libs/GuideLinePlugin/GuideLineModeItem.js +21 -19
- package/libs/GuideLinePlugin/index.js +23 -21
- package/libs/ModelMakerPlugin/Controller.js +19 -30
- package/libs/ModelMakerPlugin/index.js +11 -22
- package/libs/ModelTVVideoPlugin/Plugin.js +13 -10
- package/libs/ModelTVVideoPlugin/index.js +12 -9
- package/libs/Object3DHelperPlugin/Controller.js +7 -5
- package/libs/Object3DHelperPlugin/index.js +23 -21
- package/libs/PanoCompassPlugin/Controller.js +18 -15
- package/libs/PanoCompassPlugin/index.js +21 -18
- package/libs/PanoDoorLabelPlugin/BaseController.js +24 -37
- package/libs/PanoDoorLabelPlugin/Controller.js +56 -69
- package/libs/PanoDoorLabelPlugin/index.js +5 -18
- package/libs/PanoMeasurePlugin/Components/Controller0.js +40 -47
- package/libs/PanoMeasurePlugin/Components/Controller1.js +72 -79
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +6 -1
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +53 -39
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +177 -153
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +60 -74
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +59 -60
- package/libs/PanoMeasurePlugin/Model/area.js +30 -44
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +3 -16
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +42 -49
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +1 -1
- package/libs/PanoMeasurePlugin/index.js +35 -40
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +23 -36
- package/libs/PanoSpatialTagPlugin/Plugin.js +41 -38
- package/libs/PanoSpatialTagPlugin/index.js +10 -7
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +29 -43
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +55 -69
- package/libs/PanoTagPlugin/Components/Tag/index.js +9 -19
- package/libs/PanoTagPlugin/Components/TagContainer.js +42 -52
- package/libs/PanoTagPlugin/Components/TagItem.js +9 -19
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +23 -33
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +29 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +11 -21
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +18 -28
- package/libs/PanoTagPlugin/controller/TagRender.js +18 -16
- package/libs/PanoTagPlugin/controller/TagUtil.js +12 -9
- package/libs/PanoTagPlugin/controller/index.js +27 -25
- package/libs/PanoTagPlugin/index.js +28 -26
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +43 -57
- package/libs/PanoVideoPlugin/Controller.js +52 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +11 -25
- package/libs/PanoVideoPlugin/index.js +8 -21
- package/libs/PipelinePlugin/Controller.js +44 -57
- package/libs/PipelinePlugin/index.js +5 -18
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +20 -34
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +16 -30
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +39 -53
- package/libs/Sculpt/Meshes/Box.js +3 -3
- package/libs/Sculpt/Meshes/Cylinder.js +14 -14
- package/libs/Sculpt/Meshes/Line.d.ts +19 -1
- package/libs/Sculpt/Meshes/Line.js +40 -41
- package/libs/Sculpt/Meshes/LineWithDots.js +5 -6
- package/libs/Sculpt/Meshes/Point.js +3 -3
- package/libs/Sculpt/Meshes/Polyline.js +3 -3
- package/libs/Sculpt/Meshes/Prism.js +11 -12
- package/libs/Sculpt/Meshes/Rectangle.js +3 -3
- package/libs/Sculpt/Objects/Point/Editor.js +10 -10
- package/libs/Sculpt/Objects/Polygon/Editor.js +6 -6
- package/libs/Sculpt/Objects/Polyline/Editor.js +4 -4
- package/libs/Sculpt/index.js +3 -3
- package/libs/Sculpt/utils/Modules/Global.js +1 -1
- package/libs/Sculpt/utils/color.d.ts +1 -1
- package/libs/Sculpt/utils/three/ColoredMesh.js +3 -3
- package/libs/base/BasePlugin.js +4 -4
- package/libs/floorplan/Components/Compass.js +29 -31
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +9 -22
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +6 -19
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +5 -18
- package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -18
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +48 -61
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -18
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +28 -41
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -18
- package/libs/floorplan/index.js +3 -3
- package/libs/index.js +140 -137
- package/libs/shared-utils/five/getPosition.d.ts +12 -4
- package/libs/shared-utils/five/getPosition.js +23 -23
- package/libs/shared-utils/five/index.js +2 -2
- package/libs/shared-utils/five/initialCSS3DRender.d.ts +2 -0
- package/libs/shared-utils/five/initialCSS3DRender.js +17 -0
- package/libs/shared-utils/five/lookObject.js +3 -3
- package/libs/shared-utils/index.js +38 -40
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/math/deg2Rad.d.ts +1 -1
- package/libs/shared-utils/math/rad2Deg.d.ts +1 -1
- package/libs/shared-utils/positionToVector3.d.ts +6 -6
- package/{dist/shared-utils/three/PointSelector.d.ts → libs/shared-utils/three/PointSelector/index.d.ts} +23 -7
- package/libs/shared-utils/three/{PointSelector.js → PointSelector/index.js} +54 -45
- package/libs/shared-utils/three/{PointHelper.d.ts → PointSelector/utils/PointHelper.d.ts} +11 -3
- package/libs/shared-utils/three/PointSelector/utils/PointHelper.js +95 -0
- package/libs/shared-utils/three/PointSelector/utils/PointHelper2.d.ts +30 -0
- package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +153 -0
- package/libs/shared-utils/three/{PointSelectorHelper.d.ts → PointSelector/utils/PointSelectorHelper.d.ts} +9 -10
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +60 -0
- package/libs/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.js +3 -4
- package/libs/shared-utils/three/PointSelector/utils/typing.d.ts +8 -0
- package/libs/shared-utils/three/index.d.ts +2 -3
- package/libs/shared-utils/three/index.js +3 -3
- package/package.json +3 -3
- package/dist/shared-utils/three/PointDomHelper.d.ts +0 -18
- package/libs/shared-utils/three/PointDomHelper.d.ts +0 -18
- package/libs/shared-utils/three/PointDomHelper.js +0 -62
- package/libs/shared-utils/three/PointHelper.js +0 -73
- package/libs/shared-utils/three/PointSelectorHelper.js +0 -52
- /package/dist/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.d.ts +0 -0
- /package/libs/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var I = Object.defineProperty;
|
|
2
|
-
var R = (c, r,
|
|
3
|
-
var s = (c, r,
|
|
2
|
+
var R = (c, r, e) => r in c ? I(c, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[r] = e;
|
|
3
|
+
var s = (c, r, e) => (R(c, typeof r != "symbol" ? r + "" : r, e), e);
|
|
4
4
|
import G from "hammerjs";
|
|
5
5
|
import T from "../Modules/DeleteDom/index.js";
|
|
6
6
|
import w from "../utils/isNDCPointInScreen.js";
|
|
@@ -31,34 +31,20 @@ import "../utils/ndc2Screen.js";
|
|
|
31
31
|
import "../Model/polyline.js";
|
|
32
32
|
import "../utils/dom/areaDom.js";
|
|
33
33
|
import "../../shared-utils/three/geometryUtil.js";
|
|
34
|
-
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
35
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
36
|
-
import "../../shared-utils/positionToVector3.js";
|
|
37
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
38
34
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
39
|
-
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
40
|
-
import "../../shared-utils/util.js";
|
|
41
|
-
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
42
|
-
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
43
|
-
import "../../shared-utils/Subscribe.js";
|
|
44
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
45
|
-
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
46
|
-
import "../../shared-utils/three/getObjectVisible.js";
|
|
47
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
48
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
49
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
50
35
|
import "../../shared-utils/three/THREESphere.js";
|
|
51
36
|
import "animejs";
|
|
52
37
|
import "../../shared-utils/isNil.js";
|
|
38
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
53
39
|
import "../../shared-utils/three/IObject3D.js";
|
|
54
40
|
import "../../shared-utils/three/generatePolygonGeometry.js";
|
|
55
41
|
import "../../shared-utils/three/earcut3D.js";
|
|
56
42
|
import "earcut";
|
|
57
43
|
import "../../shared-utils/three/getNormal.js";
|
|
58
44
|
const E = () => !1;
|
|
59
|
-
class
|
|
60
|
-
constructor(
|
|
61
|
-
super(
|
|
45
|
+
class He extends U {
|
|
46
|
+
constructor(e) {
|
|
47
|
+
super(e);
|
|
62
48
|
s(this, "type", "watch");
|
|
63
49
|
s(this, "deleteDom");
|
|
64
50
|
s(this, "choose");
|
|
@@ -68,48 +54,48 @@ class Vt extends U {
|
|
|
68
54
|
s(this, "fiveElement");
|
|
69
55
|
s(this, "editPointState");
|
|
70
56
|
s(this, "hammer");
|
|
71
|
-
s(this, "onPanStart", (
|
|
57
|
+
s(this, "onPanStart", (e) => {
|
|
72
58
|
var p;
|
|
73
59
|
if (this.model.getAllLines().length === 0 || !this.fiveElement)
|
|
74
60
|
return;
|
|
75
|
-
const i = C(
|
|
76
|
-
if (!
|
|
61
|
+
const i = C(e).point, t = (p = j(this.five, this.model.getAllPoints(), i, 20)) == null ? void 0 : p.point;
|
|
62
|
+
if (!t) {
|
|
77
63
|
this.editPointState = void 0;
|
|
78
64
|
return;
|
|
79
65
|
}
|
|
80
|
-
const n = this.model.polylines.find((a) => a.includes(
|
|
81
|
-
point:
|
|
66
|
+
const n = this.model.polylines.find((a) => a.includes(t)), l = {
|
|
67
|
+
point: t,
|
|
82
68
|
associatedLines: n.lines
|
|
83
69
|
};
|
|
84
70
|
this.hook.emit("wantsDragLine", {
|
|
85
|
-
point:
|
|
71
|
+
point: t.id,
|
|
86
72
|
lines: l.associatedLines.map(({ id: a }) => a)
|
|
87
73
|
}) || (this.editPointState = l, this.magnifier.appendTo(this.container), this.magnifier.enable(), this.group.add(this.mouseGroup));
|
|
88
74
|
});
|
|
89
75
|
s(this, "onPanEnd", () => {
|
|
90
|
-
this.editPointState && (this.editPointState.associatedLines.forEach((
|
|
76
|
+
this.editPointState && (this.editPointState.associatedLines.forEach((e) => e.mesh.setMaterial({ dashed: !1 })), this.highlightLines(this.editPointState.associatedLines), this.editPointState = void 0, this.magnifier.disable(), this.group.remove(this.mouseGroup));
|
|
91
77
|
});
|
|
92
|
-
s(this, "onPan", (
|
|
78
|
+
s(this, "onPan", (e) => {
|
|
93
79
|
if (!this.editPointState || !this.fiveElement)
|
|
94
80
|
return;
|
|
95
|
-
const i = C(
|
|
96
|
-
|
|
97
|
-
const [n] = D(this.five).intersectRaycaster(
|
|
81
|
+
const i = C(e).ndcPoint, t = new M();
|
|
82
|
+
t.setFromCamera(i, this.five.camera);
|
|
83
|
+
const [n] = D(this.five).intersectRaycaster(t);
|
|
98
84
|
n && this.onIntersectionUpdate(n);
|
|
99
85
|
});
|
|
100
|
-
s(this, "onIntersectionUpdate", (
|
|
86
|
+
s(this, "onIntersectionUpdate", (e, i) => {
|
|
101
87
|
if (this.editPointState) {
|
|
102
|
-
if (this.clearHighlightLines(), this.editPointState.point.position.copy(
|
|
103
|
-
|
|
104
|
-
}), this.updateDistanceUI(), this.magnifier.renderWithPoint(
|
|
88
|
+
if (this.clearHighlightLines(), this.editPointState.point.position.copy(e.point), this.editPointState.associatedLines.forEach((t) => {
|
|
89
|
+
t.mesh.setPoints(t.points[0].position.clone(), t.points[1].position.clone()), t.lightMesh.setPoints(t.points[0].position.clone(), t.points[1].position.clone()), t.mesh.setMaterial({ dashed: !0 });
|
|
90
|
+
}), this.updateDistanceUI(), this.magnifier.renderWithPoint(e.point), this.mouseGroup.position.copy(e.point), i)
|
|
105
91
|
this.mouseGroup.quaternion.copy(i.quaternion);
|
|
106
|
-
else if (
|
|
107
|
-
const n =
|
|
92
|
+
else if (e.face) {
|
|
93
|
+
const n = e.face.normal.clone().multiplyScalar(0.05), d = e.point.clone().add(n).clone().add(n);
|
|
108
94
|
this.mouseGroup.lookAt(d);
|
|
109
95
|
}
|
|
110
96
|
this.five.needsRender = !0, this.hook.emit(
|
|
111
97
|
"selectedChange",
|
|
112
|
-
this.editPointState.associatedLines.map((
|
|
98
|
+
this.editPointState.associatedLines.map((t) => t)
|
|
113
99
|
);
|
|
114
100
|
}
|
|
115
101
|
});
|
|
@@ -117,17 +103,17 @@ class Vt extends U {
|
|
|
117
103
|
if (this.editPointState)
|
|
118
104
|
return !1;
|
|
119
105
|
});
|
|
120
|
-
s(this, "wantsTapGesture", (
|
|
106
|
+
s(this, "wantsTapGesture", (e) => {
|
|
121
107
|
var S;
|
|
122
|
-
const i = this.model.areas.map((o) =>
|
|
123
|
-
if (
|
|
124
|
-
const o = this.model.areas.find((h) => h.polygon ===
|
|
108
|
+
const i = this.model.areas.map((o) => e.intersectObject(o.polygon, !0)[0]).sort((o, h) => o.distance - h.distance), t = (S = i[0]) == null ? void 0 : S.object.parent;
|
|
109
|
+
if (t instanceof F) {
|
|
110
|
+
const o = this.model.areas.find((h) => h.polygon === t);
|
|
125
111
|
if (o) {
|
|
126
112
|
const { x: h, y: u } = i[0].point.clone().project(this.five.camera), m = `${(h + 1) / 2 * 100}%`, g = `${(-u + 1) / 2 * 100}%`;
|
|
127
113
|
return this.chooseArea(o, { left: m, top: g }), !1;
|
|
128
114
|
}
|
|
129
115
|
}
|
|
130
|
-
const n = D(this.five), [l] = n.intersectRaycaster(
|
|
116
|
+
const n = D(this.five), [l] = n.intersectRaycaster(e);
|
|
131
117
|
if (!l)
|
|
132
118
|
return;
|
|
133
119
|
const d = this.five.camera, p = l.point.clone().project(d), a = this.container.clientWidth, f = this.container.clientHeight, P = new L(p.x * a, p.y * f), v = this.model.getAllLines().map((o) => {
|
|
@@ -149,19 +135,19 @@ class Vt extends U {
|
|
|
149
135
|
if (A)
|
|
150
136
|
return this.chooseLine(A), !1;
|
|
151
137
|
});
|
|
152
|
-
s(this, "chooseLine", (
|
|
138
|
+
s(this, "chooseLine", (e) => {
|
|
153
139
|
this.choose = "line";
|
|
154
|
-
const i =
|
|
140
|
+
const i = e.getPolyline().lines;
|
|
155
141
|
this.deleteDom.setLines(i).updatePosition().show(), this.highlightLines(i), this.five.needsRender = !0, this.hook.emit(
|
|
156
142
|
"selectedChange",
|
|
157
|
-
i.map((
|
|
143
|
+
i.map((t) => t)
|
|
158
144
|
);
|
|
159
145
|
});
|
|
160
|
-
s(this, "chooseArea", (
|
|
161
|
-
this.choose =
|
|
146
|
+
s(this, "chooseArea", (e, i) => {
|
|
147
|
+
this.choose = e, this.deleteDom.updatePosition(i.left, `calc(${i.top} - 20px)`).show(), this.highlightArea(e);
|
|
162
148
|
});
|
|
163
|
-
s(this, "polylineRemoved", (
|
|
164
|
-
|
|
149
|
+
s(this, "polylineRemoved", (e) => {
|
|
150
|
+
e.lines.forEach((i) => this.removeLine(i)), this.hook.emit(
|
|
165
151
|
"selectedChange",
|
|
166
152
|
this.model.getAllLines().filter((i) => i.selected).map((i) => i)
|
|
167
153
|
);
|
|
@@ -169,11 +155,11 @@ class Vt extends U {
|
|
|
169
155
|
s(this, "onCameraUpdate", () => {
|
|
170
156
|
this.updateDistanceUI(), this.highlightedLines.length > 0 && this.deleteDom.updatePosition();
|
|
171
157
|
});
|
|
172
|
-
s(this, "deleteArea", (
|
|
173
|
-
this.unHighlightArea(
|
|
158
|
+
s(this, "deleteArea", (e) => {
|
|
159
|
+
this.unHighlightArea(e), e.dispose(), this.deleteDom.hide();
|
|
174
160
|
});
|
|
175
161
|
s(this, "deleteLine", () => {
|
|
176
|
-
const
|
|
162
|
+
const e = this.highlightedLines[0], i = this.model.getPolylineByLine(e);
|
|
177
163
|
i && (this.model.removePolyline(i), this.highlightedLines = [], this.deleteDom.setLines([]).hide());
|
|
178
164
|
});
|
|
179
165
|
s(this, "cancelDeleteClickCallback", () => {
|
|
@@ -185,49 +171,49 @@ class Vt extends U {
|
|
|
185
171
|
this.choose === "line" ? this.deleteLine() : this.choose instanceof x && this.deleteArea(this.choose);
|
|
186
172
|
},
|
|
187
173
|
cancel: this.cancelDeleteClickCallback
|
|
188
|
-
}).appendTo(this.container), this.model.getAllLines().forEach((
|
|
189
|
-
|
|
190
|
-
}), this.model.getAllAreas().forEach((
|
|
191
|
-
|
|
174
|
+
}).appendTo(this.container), this.model.getAllLines().forEach((t) => {
|
|
175
|
+
t.distanceItem.appendTo(this.container), t.distanceItem.update(this.five), t.hook.on("selected", this.chooseLine), t.distanceItem.setCanSelect(!0), this.group.add(t.mesh);
|
|
176
|
+
}), this.model.getAllAreas().forEach((t) => {
|
|
177
|
+
t.areaItem.appendTo(this.container), t.areaItem.updateArea(this.five), t.hook.on("selected", this.chooseArea), t.areaItem.setCanSelect(!0), this.group.add(t.polygon), t.polyline.lines.forEach((n) => {
|
|
192
178
|
n.distanceItem.appendTo(this.container), n.distanceItem.update(this.five), this.group.add(n.mesh);
|
|
193
179
|
});
|
|
194
180
|
});
|
|
195
181
|
const i = this.five.getElement();
|
|
196
182
|
if (i) {
|
|
197
183
|
this.fiveElement = i;
|
|
198
|
-
const
|
|
199
|
-
this.hammer =
|
|
184
|
+
const t = new G(i);
|
|
185
|
+
this.hammer = t, t.on("pan", this.onPan), t.on("panstart", this.onPanStart), t.on("panend", this.onPanEnd);
|
|
200
186
|
}
|
|
201
187
|
this.updateDistanceUI(), this.five.needsRender = !0, this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsPanGesture", this.wantsPanGesture), this.five.on("wantsChangeMode", E), this.model.hook.on("polylineRemoved", this.polylineRemoved);
|
|
202
188
|
}
|
|
203
189
|
dispose() {
|
|
204
|
-
var
|
|
205
|
-
super.dispose(), this.deleteDom.dispose(), this.model.hook.off("polylineRemoved", this.polylineRemoved), this.model.getAllLines().forEach((i) => i.hook.off("selected", this.chooseLine)), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.wantsPanGesture), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsChangeMode", E), this.five.needsRender = !0, this.hook.emit("selectedChange", []), (
|
|
190
|
+
var e;
|
|
191
|
+
super.dispose(), this.deleteDom.dispose(), this.model.hook.off("polylineRemoved", this.polylineRemoved), this.model.getAllLines().forEach((i) => i.hook.off("selected", this.chooseLine)), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.wantsPanGesture), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsChangeMode", E), this.five.needsRender = !0, this.hook.emit("selectedChange", []), (e = this.hammer) == null || e.destroy();
|
|
206
192
|
}
|
|
207
|
-
highlightLine(
|
|
208
|
-
|
|
193
|
+
highlightLine(e) {
|
|
194
|
+
e.selected || (e.selected = !0, this.group.add(e.lightMesh), e.distanceItem.highlight(), this.five.needsRender = !0);
|
|
209
195
|
}
|
|
210
196
|
clearHighlightLines() {
|
|
211
197
|
this.group.children.length !== 0 && (this.unHighlightLines(this.highlightedLines), this.highlightedLines = []);
|
|
212
198
|
}
|
|
213
|
-
highlightArea(
|
|
214
|
-
this.unHighlightLines(), this.unHighlightArea(), this.highlightLines(
|
|
199
|
+
highlightArea(e) {
|
|
200
|
+
this.unHighlightLines(), this.unHighlightArea(), this.highlightLines(e.polyline.lines), this.five.needsRender = !0;
|
|
215
201
|
}
|
|
216
|
-
unHighlightArea(
|
|
217
|
-
const i =
|
|
202
|
+
unHighlightArea(e) {
|
|
203
|
+
const i = e != null ? e : this.highlightedArea;
|
|
218
204
|
i && (this.unHighlightLines(i.polyline.lines), this.five.needsRender = !0);
|
|
219
205
|
}
|
|
220
|
-
highlightLines(
|
|
221
|
-
this.unHighlightLines(), this.highlightedLines =
|
|
206
|
+
highlightLines(e) {
|
|
207
|
+
this.unHighlightLines(), this.highlightedLines = e, e.forEach((i) => this.highlightLine(i));
|
|
222
208
|
}
|
|
223
|
-
unHighlightLines(
|
|
209
|
+
unHighlightLines(e) {
|
|
224
210
|
this.unHighlightArea();
|
|
225
|
-
const i =
|
|
226
|
-
i && i.forEach((
|
|
227
|
-
|
|
211
|
+
const i = e != null ? e : this.highlightedLines;
|
|
212
|
+
i && i.forEach((t) => {
|
|
213
|
+
t.selected = !1, t.distanceItem.unHighlight(), this.group.remove(t.lightMesh), this.five.needsRender = !0;
|
|
228
214
|
});
|
|
229
215
|
}
|
|
230
216
|
}
|
|
231
217
|
export {
|
|
232
|
-
|
|
218
|
+
He as default
|
|
233
219
|
};
|
|
@@ -15,10 +15,12 @@ import { Magnifier } from '../../shared-utils';
|
|
|
15
15
|
import type { MagnifierParameter } from '../../shared-utils';
|
|
16
16
|
import type Area from '../Model/area';
|
|
17
17
|
import * as BasePlugin from '../../base/BasePlugin';
|
|
18
|
+
import type { PointSelectorConfig } from '../../shared-utils/three/PointSelector';
|
|
18
19
|
export type Mode = 'Watch' | 'Edit' | 'Mixed' | 'View';
|
|
19
20
|
export interface PanoMeasureParameterType extends Partial<Config> {
|
|
20
21
|
editParams?: EditParameter;
|
|
21
22
|
magnifierParams?: MagnifierParameter;
|
|
23
|
+
pointSelectorConfig?: PointSelectorConfig;
|
|
22
24
|
openParams?: OpenParameter;
|
|
23
25
|
useUIController?: boolean | UIControllerParams;
|
|
24
26
|
useGuideController?: boolean | GuideControllerParams;
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var c = (n, s, t) => s in n ?
|
|
1
|
+
var x = Object.defineProperty;
|
|
2
|
+
var I = Object.getOwnPropertySymbols;
|
|
3
|
+
var D = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var c = (n, s, t) => s in n ? x(n, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[s] = t, m = (n, s) => {
|
|
5
5
|
for (var t in s || (s = {}))
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var t of
|
|
9
|
-
|
|
6
|
+
D.call(s, t) && c(n, t, s[t]);
|
|
7
|
+
if (I)
|
|
8
|
+
for (var t of I(s))
|
|
9
|
+
E.call(s, t) && c(n, t, s[t]);
|
|
10
10
|
return n;
|
|
11
11
|
};
|
|
12
12
|
var r = (n, s, t) => (c(n, typeof s != "symbol" ? s + "" : s, t), t);
|
|
13
13
|
import h from "./EditController.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
14
|
+
import k from "./ViewController.js";
|
|
15
|
+
import T from "./WatchController.js";
|
|
16
16
|
import a from "./MixedController.js";
|
|
17
|
-
import { omit as
|
|
18
|
-
import { Group as
|
|
19
|
-
import { Model as
|
|
20
|
-
import { getMouseGroup as
|
|
21
|
-
import { UIController as
|
|
22
|
-
import { GuideController as
|
|
23
|
-
import { ShortcutKeyController as
|
|
24
|
-
import { safeObj as
|
|
25
|
-
import { Magnifier as
|
|
26
|
-
import "
|
|
27
|
-
import "
|
|
28
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
17
|
+
import { omit as G } from "../../shared-utils/filter.js";
|
|
18
|
+
import { Group as S } from "three";
|
|
19
|
+
import { Model as L } from "../Model/index.js";
|
|
20
|
+
import { getMouseGroup as O } from "../utils/mouseGroup.js";
|
|
21
|
+
import { UIController as W } from "../Modules/UIController/index.js";
|
|
22
|
+
import { GuideController as A } from "../Modules/GuideController.js";
|
|
23
|
+
import { ShortcutKeyController as B } from "./ShortcutKeyController.js";
|
|
24
|
+
import { safeObj as U } from "../../shared-utils/safeObj.js";
|
|
25
|
+
import { Magnifier as V } from "../../shared-utils/three/Magnifier.js";
|
|
26
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
27
|
+
import "@realsee/five/line";
|
|
29
28
|
import "../../shared-utils/three/THREESphere.js";
|
|
30
29
|
import "animejs";
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
30
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
31
|
+
import { isTouchDevice as K } from "../../shared-utils/isTouchDevice.js";
|
|
32
|
+
import { Controller as H } from "../../base/BasePlugin.js";
|
|
33
33
|
import "../Model/line.js";
|
|
34
34
|
import "../../shared-utils/uuid.js";
|
|
35
35
|
import "../utils/line.js";
|
|
36
36
|
import "../../shared-utils/five/FiveLine.js";
|
|
37
|
-
import "@realsee/five/line";
|
|
38
37
|
import "../utils/constants.js";
|
|
39
38
|
import "@realsee/five";
|
|
40
39
|
import "../utils/dom/distanceItem.js";
|
|
@@ -58,34 +57,28 @@ import "../../shared-utils/three/geometryUtil.js";
|
|
|
58
57
|
import "hammerjs";
|
|
59
58
|
import "../../shared-utils/isNil.js";
|
|
60
59
|
import "../utils/isIntersecting.js";
|
|
61
|
-
import "../../shared-utils/three/PointSelector.js";
|
|
62
|
-
import "../../shared-utils/three/PointSelectorHelper.js";
|
|
63
|
-
import "../../shared-utils/three/PointHelper.js";
|
|
60
|
+
import "../../shared-utils/three/PointSelector/index.js";
|
|
61
|
+
import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
62
|
+
import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
64
63
|
import "../../shared-utils/three/Assets/index.js";
|
|
65
|
-
import "../../
|
|
66
|
-
import "../Modules/rangePiece/html.js";
|
|
67
|
-
import "../../CSS3DRenderPlugin/index.js";
|
|
68
|
-
import "../../CSS3DRenderPlugin/Controller.js";
|
|
69
|
-
import "../../shared-utils/url/absoluteUrl.js";
|
|
70
|
-
import "../../shared-utils/five/fiveModelLoad.js";
|
|
71
|
-
import "../../shared-utils/five/getFiveModel.js";
|
|
72
|
-
import "../../shared-utils/positionToVector3.js";
|
|
73
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
74
|
-
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
75
|
-
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
76
|
-
import "../../shared-utils/util.js";
|
|
77
|
-
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
64
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
78
65
|
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
79
66
|
import "../../shared-utils/Subscribe.js";
|
|
80
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
81
67
|
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
82
68
|
import "../../shared-utils/three/getObjectVisible.js";
|
|
83
|
-
import "../../
|
|
84
|
-
import "../../
|
|
85
|
-
import "../../
|
|
86
|
-
import "../../
|
|
69
|
+
import "../../shared-utils/three/PointSelector/utils/html.js";
|
|
70
|
+
import "../../shared-utils/five/initialCSS3DRender.js";
|
|
71
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
72
|
+
import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
73
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
74
|
+
import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
75
|
+
import "../../Sculpt/Meshes/Line.js";
|
|
76
|
+
import "../../Sculpt/utils/color.js";
|
|
77
|
+
import "../../shared-utils/positionToVector3.js";
|
|
78
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
87
79
|
import "../../shared-utils/five/getPosition.js";
|
|
88
80
|
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
81
|
+
import "../../shared-utils/five/getFiveModel.js";
|
|
89
82
|
import "../Modules/DeleteDom/index.js";
|
|
90
83
|
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
91
84
|
import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
@@ -95,6 +88,7 @@ import "../utils/findClosestPoint.js";
|
|
|
95
88
|
import "../utils/ndc2Screen.js";
|
|
96
89
|
import "../../shared-utils/getPointFromHammerEvent.js";
|
|
97
90
|
import "../Modules/rangePiece/index.js";
|
|
91
|
+
import "../../shared-utils/animationFrame/index.js";
|
|
98
92
|
import "../../shared-utils/noop.js";
|
|
99
93
|
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
100
94
|
import "../../shared-utils/tap.js";
|
|
@@ -120,9 +114,10 @@ import "../../shared-utils/Utils/FiveUtil.js";
|
|
|
120
114
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
121
115
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
122
116
|
import "../../shared-utils/five/transformPosition.js";
|
|
123
|
-
|
|
117
|
+
import "../../shared-utils/url/absoluteUrl.js";
|
|
118
|
+
class Ke extends H {
|
|
124
119
|
constructor(t, e) {
|
|
125
|
-
var l, u, d, f, g, y, M,
|
|
120
|
+
var l, u, d, f, g, y, C, M, w, P, b, v;
|
|
126
121
|
super(t);
|
|
127
122
|
r(this, "state", { enabled: !0 });
|
|
128
123
|
r(this, "hasOpen", !1);
|
|
@@ -151,7 +146,7 @@ class je extends B {
|
|
|
151
146
|
var t, e, i, o;
|
|
152
147
|
this.hasOpen = !1, this.state.enabled = !1, this.container.style.visibility = "hidden", this.container.style.opacity = "0", (t = this.controller) == null || t.dispose(), (e = this.useUIController) == null || e.hide(), (i = this.useGuideController) == null || i.hide(), (o = this.shortcutKeyController) == null || o.dispose(), this.controller = null, this.five.helperVisible = !0, this.five.scene.remove(this.group), this.five.needsRender = !0, this.hook.emit("disable", !0);
|
|
153
148
|
});
|
|
154
|
-
r(this, "getCurrentMode", () => this.controller instanceof h ? "Edit" : this.controller instanceof
|
|
149
|
+
r(this, "getCurrentMode", () => this.controller instanceof h ? "Edit" : this.controller instanceof T ? "Watch" : this.controller instanceof a ? "Mixed" : this.controller instanceof k ? "View" : null);
|
|
155
150
|
/** 变更场景
|
|
156
151
|
* @description 如果从编辑场景改变到观看场景,不会自动保存,默认丢弃所有改动
|
|
157
152
|
*/
|
|
@@ -161,8 +156,8 @@ class je extends B {
|
|
|
161
156
|
return;
|
|
162
157
|
(o = this.controller) == null || o.dispose();
|
|
163
158
|
const e = {
|
|
164
|
-
View:
|
|
165
|
-
Watch:
|
|
159
|
+
View: k,
|
|
160
|
+
Watch: T,
|
|
166
161
|
Edit: h,
|
|
167
162
|
Mixed: a
|
|
168
163
|
};
|
|
@@ -177,8 +172,11 @@ class je extends B {
|
|
|
177
172
|
r(this, "changeMeasureType", (t) => {
|
|
178
173
|
this.currentMeasureType = t, this.hook.emit("measureTypeChange", t);
|
|
179
174
|
});
|
|
180
|
-
this.five = t, this.hook = this.hooks, this.params = e, this.config =
|
|
181
|
-
|
|
175
|
+
this.five = t, this.hook = this.hooks, this.params = e, this.config = G(e, ["openParams", "magnifierParams"]), this.model = new L(this.config), this.isMobile = (u = (l = e == null ? void 0 : e.openParams) == null ? void 0 : l.isMobile) != null ? u : !1, this.magnifier = new V(
|
|
176
|
+
t,
|
|
177
|
+
(y = (g = e.magnifierParams) != null ? g : (f = (d = e.pointSelectorConfig) == null ? void 0 : d.helper) == null ? void 0 : f.magnifierParams) != null ? y : { width: 190, height: 190, scale: 2 }
|
|
178
|
+
), this.allowMeasureType = Array.from(new Set((M = (C = e.editParams) == null ? void 0 : C.allowMeasureType) != null ? M : ["line"])), this.currentMeasureType = (w = this.allowMeasureType[0]) != null ? w : "line", this.group = new S(), this.group.name = "plugin-measure-group", this.container.classList.add("five-plugin-measure-container"), this.container.style.position = "absolute", this.container.style.left = "0", this.container.style.top = "0", this.container.style.visibility = "hidden", this.container.style.width = "100%", this.container.style.height = "100%", this.container.style.opacity = "0";
|
|
179
|
+
const i = (b = (P = e.editParams) == null ? void 0 : P.pointSelectorMode) != null ? b : K ? "fixed" : "cursor", o = (v = this.params.openParams) != null ? v : {};
|
|
182
180
|
if (this.params.useUIController !== !1) {
|
|
183
181
|
const p = m({
|
|
184
182
|
container: this.container,
|
|
@@ -186,16 +184,16 @@ class je extends B {
|
|
|
186
184
|
i18n: e.i18n,
|
|
187
185
|
pointSelectorMode: i,
|
|
188
186
|
useNewUI: this.allowMeasureType.length > 1
|
|
189
|
-
},
|
|
190
|
-
this.useUIController = new
|
|
187
|
+
}, U(this.params.useUIController));
|
|
188
|
+
this.useUIController = new W(this, p);
|
|
191
189
|
}
|
|
192
190
|
if (this.params.useGuideController !== !1) {
|
|
193
191
|
const p = m({
|
|
194
192
|
container: this.container,
|
|
195
193
|
pointSelectorMode: i,
|
|
196
194
|
i18n: e.i18n
|
|
197
|
-
},
|
|
198
|
-
this.useGuideController = new
|
|
195
|
+
}, U(this.params.useGuideController));
|
|
196
|
+
this.useGuideController = new A(this, p);
|
|
199
197
|
}
|
|
200
198
|
}
|
|
201
199
|
appendTo(t) {
|
|
@@ -221,7 +219,7 @@ class je extends B {
|
|
|
221
219
|
*/
|
|
222
220
|
enable(t) {
|
|
223
221
|
var e, i;
|
|
224
|
-
this.hasOpen || (this.state.enabled = !0, this.hasOpen = !0, this.group.matrix.copy(this.workUtil.transform), this.group.matrix.decompose(this.group.position, this.group.quaternion, this.group.scale), this.group.updateMatrixWorld(), this.five.scene.add(this.group), this.container.style.visibility = "visible", this.container.style.opacity = "1", t != null && t.mode ? this.changeMode(t.mode) : this.isMobile ? this.changeMode("Mixed") : this.changeMode("Watch"), (e = this.useUIController) == null || e.show(), (i = this.useGuideController) == null || i.show(), this.shortcutKeyController = new
|
|
222
|
+
this.hasOpen || (this.state.enabled = !0, this.hasOpen = !0, this.group.matrix.copy(this.workUtil.transform), this.group.matrix.decompose(this.group.position, this.group.quaternion, this.group.scale), this.group.updateMatrixWorld(), this.five.scene.add(this.group), this.container.style.visibility = "visible", this.container.style.opacity = "1", t != null && t.mode ? this.changeMode(t.mode) : this.isMobile ? this.changeMode("Mixed") : this.changeMode("Watch"), (e = this.useUIController) == null || e.show(), (i = this.useGuideController) == null || i.show(), this.shortcutKeyController = new B(this, this.five), this.hook.emit("enable", !0));
|
|
225
223
|
}
|
|
226
224
|
/** 进入编辑模式 */
|
|
227
225
|
edit(t) {
|
|
@@ -317,13 +315,14 @@ class je extends B {
|
|
|
317
315
|
workUtil: this.workUtil,
|
|
318
316
|
openParams: t,
|
|
319
317
|
editParams: e,
|
|
318
|
+
pointSelectorConfig: this.params.pointSelectorConfig,
|
|
320
319
|
magnifierParams: this.params.magnifierParams,
|
|
321
320
|
getMeasureType: () => this.currentMeasureType,
|
|
322
|
-
mouseGroup:
|
|
321
|
+
mouseGroup: O(m({}, t.crossHairParameter)),
|
|
323
322
|
userDistanceItemCreator: this.params.userDistanceItemCreator
|
|
324
323
|
};
|
|
325
324
|
}
|
|
326
325
|
}
|
|
327
326
|
export {
|
|
328
|
-
|
|
327
|
+
Ke as default
|
|
329
328
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var d = (o, t,
|
|
3
|
-
var
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var d = (o, t, i) => t in o ? m(o, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[t] = i;
|
|
3
|
+
var e = (o, t, i) => (d(o, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
4
|
import * as r from "three";
|
|
5
5
|
import { uuid as f } from "../../shared-utils/uuid.js";
|
|
6
6
|
import { Subscribe as c } from "@realsee/five";
|
|
@@ -24,62 +24,48 @@ import "earcut";
|
|
|
24
24
|
import "../../shared-utils/three/getNormal.js";
|
|
25
25
|
import "../../shared-utils/three/geometryUtil.js";
|
|
26
26
|
import "hammerjs";
|
|
27
|
-
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
28
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
29
|
-
import "../../shared-utils/positionToVector3.js";
|
|
30
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
31
27
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
32
|
-
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
33
|
-
import "../../shared-utils/util.js";
|
|
34
|
-
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
35
|
-
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
36
|
-
import "../../shared-utils/Subscribe.js";
|
|
37
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
38
|
-
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
39
|
-
import "../../shared-utils/three/getObjectVisible.js";
|
|
40
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
41
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
42
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
43
28
|
import "../../shared-utils/three/THREESphere.js";
|
|
44
29
|
import "animejs";
|
|
45
30
|
import "../../shared-utils/isNil.js";
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
31
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
32
|
+
class G {
|
|
33
|
+
constructor(t, i) {
|
|
34
|
+
e(this, "id", f());
|
|
35
|
+
e(this, "selected", !1);
|
|
36
|
+
e(this, "text");
|
|
37
|
+
e(this, "type", "area");
|
|
38
|
+
e(this, "lightMesh");
|
|
39
|
+
e(this, "areaItem");
|
|
40
|
+
e(this, "hook", new c());
|
|
41
|
+
e(this, "model");
|
|
56
42
|
/** 多边形mesh */
|
|
57
|
-
|
|
43
|
+
e(this, "polygon");
|
|
58
44
|
/** 多边形顶点 */
|
|
59
|
-
|
|
45
|
+
e(this, "points", []);
|
|
60
46
|
/** 多边形前三个点组成的平面,用来使得后面加的点也落在这个平面上 */
|
|
61
|
-
|
|
47
|
+
e(this, "planeHelper");
|
|
62
48
|
/** 多边形边框 */
|
|
63
|
-
|
|
49
|
+
e(this, "polyline");
|
|
64
50
|
/** 多边形mesh容器 */
|
|
65
|
-
|
|
51
|
+
e(this, "meshContainer");
|
|
66
52
|
/** 多边形dom容器 */
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
e(this, "domContainer");
|
|
54
|
+
e(this, "five");
|
|
69
55
|
/**
|
|
70
56
|
* @description: five camera update 时,更新Dom的位置
|
|
71
57
|
*/
|
|
72
|
-
|
|
58
|
+
e(this, "updateDom", () => {
|
|
73
59
|
this.five && (this.polyline.lines.forEach((t) => t.distanceItem.update(this.five)), this.areaItem.updateDomPosition(this.five));
|
|
74
60
|
});
|
|
75
61
|
var n;
|
|
76
|
-
t && (this.points = t), this.model =
|
|
62
|
+
t && (this.points = t), this.model = i.model, this.polygon = new v(t), this.polyline = new y({ model: i.model }), this.areaItem = new C({
|
|
77
63
|
area: this,
|
|
78
64
|
clickCallback: (p, s) => {
|
|
79
|
-
const h = p.clientX + "px",
|
|
80
|
-
this.hook.emit("selected", this, { left: h, top:
|
|
65
|
+
const h = p.clientX + "px", l = p.clientY + "px";
|
|
66
|
+
this.hook.emit("selected", this, { left: h, top: l });
|
|
81
67
|
}
|
|
82
|
-
}), this.domContainer =
|
|
68
|
+
}), this.domContainer = i.domContainer || null, this.meshContainer = i.meshContainer || null, this.five = i.five || null, this.areaItem.appendTo(this.domContainer), (n = this.five) == null || n.on("cameraUpdate", this.updateDom);
|
|
83
69
|
}
|
|
84
70
|
/**
|
|
85
71
|
* @description: 多边形的端点是否闭合
|
|
@@ -91,9 +77,9 @@ class rt {
|
|
|
91
77
|
addPoints(t) {
|
|
92
78
|
var p;
|
|
93
79
|
this.points = this.points.concat(t);
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
const s = new u(new a(
|
|
80
|
+
const i = this.points.at(-2), n = this.points.at(-1);
|
|
81
|
+
if (i && n) {
|
|
82
|
+
const s = new u(new a(i), new a(n), this.polyline.model);
|
|
97
83
|
this.polyline.addLine(s), this.meshContainer.add(s.mesh), this.five && (s.distanceItem.setCanSelect(!1), s.distanceItem.appendTo(this.domContainer), s.distanceItem.update(this.five));
|
|
98
84
|
}
|
|
99
85
|
(p = this.meshContainer) != null && p.children.includes(this.polygon) || this.meshContainer.add(this.polygon), this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five), this.points.length === 3 ? this.planeHelper = new r.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.points.length < 3 && (this.planeHelper = null);
|
|
@@ -142,5 +128,5 @@ class rt {
|
|
|
142
128
|
}
|
|
143
129
|
}
|
|
144
130
|
export {
|
|
145
|
-
|
|
131
|
+
G as default
|
|
146
132
|
};
|
|
@@ -1,25 +1,12 @@
|
|
|
1
1
|
import "three";
|
|
2
2
|
import { Magnifier as o } from "../../shared-utils/three/Magnifier.js";
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
3
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
4
|
+
import "@realsee/five/line";
|
|
6
5
|
import "../../shared-utils/three/THREESphere.js";
|
|
7
6
|
import "animejs";
|
|
7
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
8
8
|
import "hammerjs";
|
|
9
9
|
import "../../shared-utils/Subscribe.js";
|
|
10
|
-
import "../../shared-utils/positionToVector3.js";
|
|
11
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
12
|
-
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
13
|
-
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
14
|
-
import "../../shared-utils/util.js";
|
|
15
|
-
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
16
|
-
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
17
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
18
|
-
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
19
|
-
import "../../shared-utils/three/centerPoint.js";
|
|
20
|
-
import "../../shared-utils/three/getObjectVisible.js";
|
|
21
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
22
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
23
10
|
export {
|
|
24
11
|
o as default
|
|
25
12
|
};
|