@realsee/dnalogel 3.44.5 → 3.46.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 +6 -0
- package/dist/Sculpt/Meshes/Area.d.ts +1 -1
- package/dist/Sculpt/Meshes/Box.d.ts +1 -1
- package/dist/Sculpt/Meshes/Circle.d.ts +1 -1
- package/dist/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Line.d.ts +8 -2
- package/dist/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/dist/Sculpt/Meshes/Point.d.ts +1 -1
- package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Prism.d.ts +1 -1
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/dist/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +33 -0
- package/dist/Sculpt/Objects/Point/index.d.ts +1 -1
- package/dist/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/dist/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/dist/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/dist/Sculpt/index.d.ts +5 -0
- package/dist/Sculpt/typings/index.d.ts +11 -6
- package/dist/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/dist/Sculpt/typings/utils.type.d.ts +2 -0
- package/dist/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/dist/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/dist/index.cjs.js +56 -56
- package/dist/index.js +29820 -29686
- package/dist/index.umd.js +49 -49
- package/dist/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/dist/shared-utils/tag.d.ts +6 -3
- package/libs/AreaMakerPlugin/Controller.js +150 -78
- package/libs/AreaMakerPlugin/index.js +76 -4
- package/libs/AreaMakerPlugin/utils/Item.js +190 -111
- package/libs/CSS3DRenderPlugin/Controller.js +89 -29
- package/libs/CSS3DRenderPlugin/index.js +75 -15
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +132 -58
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +181 -116
- package/libs/CruisePlugin/BaseController.js +121 -49
- package/libs/CruisePlugin/Move.js +73 -21
- package/libs/CruisePlugin/Work.js +98 -46
- package/libs/CruisePlugin/index.js +79 -27
- package/libs/CurrentPanoImagePlugin/Controller.js +176 -104
- package/libs/CurrentPanoImagePlugin/index.js +76 -4
- package/libs/GuideLinePlugin/Controller.js +82 -30
- package/libs/GuideLinePlugin/GuideLineItem.js +82 -30
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +81 -29
- package/libs/GuideLinePlugin/index.js +79 -27
- package/libs/ModelMakerPlugin/Controller.js +140 -83
- package/libs/ModelMakerPlugin/index.js +75 -18
- package/libs/ModelTVVideoPlugin/Plugin.js +117 -57
- package/libs/ModelTVVideoPlugin/index.js +68 -8
- package/libs/Object3DHelperPlugin/Controller.js +54 -31
- package/libs/Object3DHelperPlugin/index.js +35 -13
- package/libs/PanoCompassPlugin/Controller.js +97 -42
- package/libs/PanoCompassPlugin/index.js +71 -16
- package/libs/PanoDoorLabelPlugin/BaseController.js +98 -26
- package/libs/PanoDoorLabelPlugin/Controller.js +187 -115
- package/libs/PanoDoorLabelPlugin/index.js +76 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -89
- package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -127
- package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -73
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +167 -92
- package/libs/PanoMeasurePlugin/Controller/index.js +110 -65
- package/libs/PanoMeasurePlugin/Model/area.js +114 -38
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +78 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -46
- package/libs/PanoMeasurePlugin/index.js +77 -32
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +98 -20
- package/libs/PanoSpatialTagPlugin/Plugin.js +210 -150
- package/libs/PanoSpatialTagPlugin/index.js +66 -6
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +133 -53
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +295 -216
- package/libs/PanoTagPlugin/Components/Tag/index.js +257 -187
- package/libs/PanoTagPlugin/Components/TagContainer.js +157 -87
- package/libs/PanoTagPlugin/Components/TagItem.js +144 -74
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +73 -3
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +109 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +105 -35
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +113 -43
- package/libs/PanoTagPlugin/controller/TagRender.js +132 -80
- package/libs/PanoTagPlugin/controller/TagUtil.js +136 -84
- package/libs/PanoTagPlugin/controller/index.js +113 -61
- package/libs/PanoTagPlugin/index.js +89 -37
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +121 -41
- package/libs/PanoVideoPlugin/Controller.js +137 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +149 -69
- package/libs/PanoVideoPlugin/index.js +82 -10
- package/libs/PipelinePlugin/Controller.js +199 -128
- package/libs/PipelinePlugin/index.js +76 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +102 -22
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +95 -15
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +136 -56
- package/libs/Sculpt/Meshes/Area.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.js +16 -15
- package/libs/Sculpt/Meshes/Circle.d.ts +1 -1
- package/libs/Sculpt/Meshes/Circle.js +1 -1
- package/libs/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Cylinder.js +8 -7
- package/libs/Sculpt/Meshes/Line.d.ts +8 -2
- package/libs/Sculpt/Meshes/Line.js +93 -65
- package/libs/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/libs/Sculpt/Meshes/LineWithDots.js +26 -26
- package/libs/Sculpt/Meshes/Point.d.ts +1 -1
- package/libs/Sculpt/Meshes/Point.js +7 -6
- package/libs/Sculpt/Meshes/Polygon.js +1 -1
- package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Polyline.js +5 -4
- package/libs/Sculpt/Meshes/Prism.d.ts +1 -1
- package/libs/Sculpt/Meshes/Rectangle.js +3 -2
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/libs/Sculpt/Objects/Box/index.js +41 -43
- package/libs/Sculpt/Objects/Cylinder/index.js +35 -37
- package/libs/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/libs/Sculpt/Objects/Line/Editor.js +62 -0
- package/libs/Sculpt/Objects/Line/index.d.ts +33 -0
- package/libs/Sculpt/Objects/Line/index.js +107 -0
- package/libs/Sculpt/Objects/Point/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/libs/Sculpt/Objects/Polygon/Editor.js +5 -5
- package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/libs/Sculpt/Objects/Polygon/index.js +80 -80
- package/libs/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/libs/Sculpt/Objects/Polyline/Editor.js +10 -48
- package/libs/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/libs/Sculpt/Objects/Polyline/index.js +63 -58
- package/libs/Sculpt/Objects/Prism/index.js +56 -58
- package/libs/Sculpt/index.d.ts +5 -0
- package/libs/Sculpt/index.js +58 -48
- package/libs/Sculpt/typings/index.d.ts +11 -6
- package/libs/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/libs/Sculpt/typings/utils.type.d.ts +2 -0
- package/libs/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/libs/Sculpt/utils/three/ColoredMesh.js +15 -14
- package/libs/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/libs/Sculpt/utils/three/rayOnLine.js +15 -14
- package/libs/base/BasePlugin.js +14 -13
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +131 -61
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +75 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +129 -59
- package/libs/floorplan/ModelFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +158 -86
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +76 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +151 -81
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +194 -192
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +23 -23
- package/libs/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/libs/shared-utils/Utils/WorkUtil.js +8 -7
- package/libs/shared-utils/five/index.js +3 -2
- package/libs/shared-utils/five/lookObject.js +3 -2
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +6 -3
- package/libs/shared-utils/tag.js +38 -24
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +15 -15
- package/libs/shared-utils/three/index.js +1 -0
- package/package.json +1 -1
- package/dist/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- package/libs/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- /package/libs/Sculpt/{utils/color.js → typings/style.js} +0 -0
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
var E = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
for (var e in
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var e of
|
|
9
|
-
|
|
10
|
-
return
|
|
2
|
+
var L = Object.getOwnPropertySymbols;
|
|
3
|
+
var S = Object.prototype.hasOwnProperty, k = 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
|
+
S.call(o, e) && f(l, e, o[e]);
|
|
7
|
+
if (L)
|
|
8
|
+
for (var e of L(o))
|
|
9
|
+
k.call(o, e) && f(l, e, o[e]);
|
|
10
|
+
return l;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
import * as
|
|
14
|
-
import { DEFAULT_LINE_COLOR as b, DEFAULT_LINE_WIDTH as
|
|
15
|
-
import { LineGeometry as
|
|
16
|
-
import { anyPositionToVector3 as
|
|
17
|
-
import { IObject3D as
|
|
12
|
+
var h = (l, o, e) => (f(l, typeof o != "symbol" ? o + "" : o, e), e);
|
|
13
|
+
import * as a from "three";
|
|
14
|
+
import { DEFAULT_LINE_COLOR as b, DEFAULT_LINE_WIDTH as M, DEFAULT_HIGHLIGHT_OPACITY as D } from "../typings/style.js";
|
|
15
|
+
import { LineGeometry as T, LineMaterial as w, THREE_Line2 as H } from "../../shared-utils/five/FiveLine.js";
|
|
16
|
+
import { anyPositionToVector3 as C } from "../../shared-utils/positionToVector3.js";
|
|
17
|
+
import { IObject3D as I } from "../../shared-utils/three/IObject3D.js";
|
|
18
18
|
import "hammerjs";
|
|
19
19
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
20
|
+
import { centerPoint as R } from "../../shared-utils/three/centerPoint.js";
|
|
21
|
+
import { LightTag as x } from "../../shared-utils/tag.js";
|
|
22
|
+
import { globalModules as p } from "../utils/Modules/Global.js";
|
|
20
23
|
import "../../shared-utils/three/THREESphere.js";
|
|
21
24
|
import "animejs";
|
|
22
|
-
import { notNil as
|
|
25
|
+
import { notNil as c } from "../../shared-utils/isNil.js";
|
|
23
26
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
24
|
-
class
|
|
27
|
+
class _ extends w {
|
|
25
28
|
constructor(e) {
|
|
26
|
-
var
|
|
29
|
+
var n, t;
|
|
27
30
|
super(e);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(
|
|
31
|
-
}), this.setDashed((
|
|
31
|
+
h(this, "_three_color");
|
|
32
|
+
c(e == null ? void 0 : e.color) && (this.three_color = (n = e == null ? void 0 : e.color) != null ? n : 16777215), Object.keys(e).forEach((i) => {
|
|
33
|
+
["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(i) || i in this && (this[i] = e[i]);
|
|
34
|
+
}), this.setDashed((t = e == null ? void 0 : e.dashed) != null ? t : !1);
|
|
32
35
|
}
|
|
33
36
|
get three_color() {
|
|
34
37
|
return this._three_color;
|
|
@@ -37,52 +40,62 @@ class S extends D {
|
|
|
37
40
|
this._three_color = e, this.color = e;
|
|
38
41
|
}
|
|
39
42
|
setDashed(e) {
|
|
40
|
-
e ? this.defines.USE_DASH = "" : delete this.defines.USE_DASH, this.needsUpdate = !0;
|
|
43
|
+
this.dashed = e, e ? this.defines.USE_DASH = "" : delete this.defines.USE_DASH, this.needsUpdate = !0;
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
|
-
class
|
|
44
|
-
constructor(e,
|
|
45
|
-
super(e,
|
|
46
|
-
|
|
46
|
+
class m extends H {
|
|
47
|
+
constructor(e, n) {
|
|
48
|
+
super(e, n);
|
|
49
|
+
h(this, "name", "Line3");
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
|
-
class
|
|
52
|
+
class $ extends I {
|
|
50
53
|
constructor(e) {
|
|
51
|
-
var
|
|
54
|
+
var s, r, u, g, d;
|
|
52
55
|
super();
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
h(this, "name", "LineMesh");
|
|
57
|
+
h(this, "points");
|
|
58
|
+
h(this, "lengthDoms", []);
|
|
59
|
+
h(this, "highlighted", !1);
|
|
60
|
+
h(this, "line");
|
|
61
|
+
h(this, "backLine");
|
|
62
|
+
h(this, "opacityBeforeHighlight");
|
|
63
|
+
h(this, "paramsStyle", {});
|
|
60
64
|
this.paramsStyle = e != null ? e : {};
|
|
61
|
-
const
|
|
62
|
-
color: new
|
|
63
|
-
linewidth: (r = e == null ? void 0 : e.lineWidth) != null ? r :
|
|
65
|
+
const n = new T(), t = new _({
|
|
66
|
+
color: new a.Color((s = e == null ? void 0 : e.lineColor) != null ? s : b),
|
|
67
|
+
linewidth: (r = e == null ? void 0 : e.lineWidth) != null ? r : M,
|
|
64
68
|
dashScale: 40,
|
|
65
|
-
opacity: (
|
|
69
|
+
opacity: (u = e == null ? void 0 : e.opacity) != null ? u : 1,
|
|
66
70
|
transparent: !0,
|
|
67
|
-
dashed: (
|
|
68
|
-
}),
|
|
69
|
-
color: new
|
|
70
|
-
linewidth:
|
|
71
|
-
dashScale:
|
|
71
|
+
dashed: (g = e == null ? void 0 : e.dashed) != null ? g : !1
|
|
72
|
+
}), i = new _({
|
|
73
|
+
color: new a.Color((d = e == null ? void 0 : e.lineColor) != null ? d : b),
|
|
74
|
+
linewidth: t.linewidth * 0.9,
|
|
75
|
+
dashScale: t.dashScale,
|
|
76
|
+
opacity: t.opacity * 0.8,
|
|
72
77
|
depthTest: !1,
|
|
73
78
|
depthWrite: !1,
|
|
74
79
|
transparent: !0,
|
|
75
|
-
|
|
76
|
-
dashed: i.dashed,
|
|
77
|
-
resolution: i.resolution
|
|
80
|
+
resolution: t.resolution
|
|
78
81
|
});
|
|
79
|
-
this.line = new
|
|
82
|
+
this.line = new m(n, t), this.backLine = new m(n, i), 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);
|
|
83
|
+
}
|
|
84
|
+
get style() {
|
|
85
|
+
return {
|
|
86
|
+
lineColor: this.color,
|
|
87
|
+
lineWidth: this.lineWidth,
|
|
88
|
+
dashed: this.dashed,
|
|
89
|
+
occlusionVisibility: this.occlusionVisibility,
|
|
90
|
+
occlusionMode: this.occlusionMode,
|
|
91
|
+
lengthEnable: this.paramsStyle.lengthEnable
|
|
92
|
+
};
|
|
80
93
|
}
|
|
81
94
|
get lineWidth() {
|
|
82
95
|
return this.line.material.linewidth;
|
|
83
96
|
}
|
|
84
97
|
get color() {
|
|
85
|
-
return new
|
|
98
|
+
return new a.Color(this.line.material.three_color);
|
|
86
99
|
}
|
|
87
100
|
get dashed() {
|
|
88
101
|
return this.line.material.dashed;
|
|
@@ -94,32 +107,47 @@ class F extends x {
|
|
|
94
107
|
return this.line.material.depthTest === !1 ? "depthTest" : "translucence";
|
|
95
108
|
}
|
|
96
109
|
setPoints(e) {
|
|
97
|
-
const
|
|
98
|
-
if (this.points =
|
|
110
|
+
const n = e.map(C).filter(c);
|
|
111
|
+
if (this.points = n, n.length < 2)
|
|
99
112
|
return;
|
|
100
113
|
this.addIfNotExists(this.line, this.backLine);
|
|
101
|
-
const
|
|
102
|
-
|
|
114
|
+
const t = n.flatMap((i) => [i.x, i.y, i.z]);
|
|
115
|
+
t.length > 2 && (this.line.geometry.dispose(), this.line.geometry = new T(), this.backLine.geometry = this.line.geometry), this.line.geometry.setPositions(t), this.line.computeLineDistances(), this.updateLengthItems(), this.needsRender = !0;
|
|
103
116
|
}
|
|
104
|
-
setResolution(e,
|
|
105
|
-
const
|
|
106
|
-
(
|
|
107
|
-
const
|
|
108
|
-
(
|
|
117
|
+
setResolution(e, n) {
|
|
118
|
+
const t = this.line.material.resolution;
|
|
119
|
+
(t.x !== e || t.y !== n) && (t.set(e, n), this.needsRender = !0);
|
|
120
|
+
const i = this.backLine.material.resolution;
|
|
121
|
+
(i.x !== e || i.y !== n) && (i.set(e, n), this.needsRender = !0);
|
|
109
122
|
}
|
|
110
123
|
setStyle(e) {
|
|
111
|
-
var
|
|
112
|
-
this.paramsStyle =
|
|
113
|
-
const
|
|
114
|
-
|
|
124
|
+
var i, s, r;
|
|
125
|
+
this.paramsStyle = y(y({}, this.paramsStyle), e), c(e.lineColor) && (this.line.material.three_color = new a.Color(e.lineColor), this.backLine.material.three_color = new a.Color(e.lineColor)), c(e.lineWidth) && (this.line.material.linewidth = e.lineWidth), c(e.dashed) && this.line.material.setDashed(e.dashed), c(e.opacity) && (this.line.material.opacity = e.opacity, this.backLine.material.opacity = this.line.material.opacity * 0.2), this.updateLengthItems();
|
|
126
|
+
const n = (i = e.occlusionVisibility) != null ? i : this.paramsStyle.occlusionVisibility, t = (r = (s = e.occlusionMode) != null ? s : this.paramsStyle.occlusionMode) != null ? r : "translucence";
|
|
127
|
+
n ? 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;
|
|
115
128
|
}
|
|
116
129
|
highlight() {
|
|
117
|
-
this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.line.material.opacity, this.line.material.opacity = this.opacityBeforeHighlight *
|
|
130
|
+
this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.line.material.opacity, this.line.material.opacity = this.opacityBeforeHighlight * D, this.backLine.material.opacity = this.backLine.material.opacity * D, this.needsRender = !0);
|
|
118
131
|
}
|
|
119
132
|
unhighlight() {
|
|
120
133
|
this.highlighted && (this.highlighted = !1, this.line.material.opacity = this.opacityBeforeHighlight, this.backLine.material.opacity = 0.2, this.needsRender = !0);
|
|
121
134
|
}
|
|
135
|
+
updateLengthItems() {
|
|
136
|
+
var e, n;
|
|
137
|
+
if (this.paramsStyle.lengthEnable) {
|
|
138
|
+
const t = (n = (e = this.points) == null ? void 0 : e.map((i, s) => {
|
|
139
|
+
if (s !== 0)
|
|
140
|
+
return [this.points[s - 1], i];
|
|
141
|
+
}).filter(c)) != null ? n : [];
|
|
142
|
+
t.forEach(([i, s], r) => {
|
|
143
|
+
var d;
|
|
144
|
+
const u = R(i, s), g = i.distanceTo(s).toFixed(2) + "m";
|
|
145
|
+
this.lengthDoms[r] = (d = this.lengthDoms[r]) != null ? d : new x(p.five), this.lengthDoms[r].setPosition(u), this.lengthDoms[r].container.innerHTML = `<div style="pointer-events:none;">${g}</div>`;
|
|
146
|
+
}), this.lengthDoms.length > t.length && (this.lengthDoms.slice(t.length).forEach((i) => i.destroy()), this.lengthDoms.length = t.length);
|
|
147
|
+
} else
|
|
148
|
+
this.lengthDoms.forEach((t) => t.destroy()), this.lengthDoms = [];
|
|
149
|
+
}
|
|
122
150
|
}
|
|
123
151
|
export {
|
|
124
|
-
|
|
152
|
+
$ as LineMesh
|
|
125
153
|
};
|
|
@@ -15,7 +15,7 @@ type Style = LineMeshStyle & {
|
|
|
15
15
|
export declare class LineWithDotsMesh extends LineMesh {
|
|
16
16
|
name: string;
|
|
17
17
|
pointGroup: IObject3D;
|
|
18
|
-
|
|
18
|
+
private _paramsStyle;
|
|
19
19
|
get startPoint(): PointMesh;
|
|
20
20
|
get endPoint(): PointMesh;
|
|
21
21
|
get visiblePointMeshes(): PointMesh[];
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var n = (s, i, t) => i in s ?
|
|
1
|
+
var m = Object.defineProperty, d = Object.defineProperties;
|
|
2
|
+
var f = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var a = Object.getOwnPropertySymbols;
|
|
4
|
+
var g = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var n = (s, i, t) => i in s ? m(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t, o = (s, i) => {
|
|
6
6
|
for (var t in i || (i = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
7
|
+
g.call(i, t) && n(s, t, i[t]);
|
|
8
|
+
if (a)
|
|
9
|
+
for (var t of a(i))
|
|
10
|
+
c.call(i, t) && n(s, t, i[t]);
|
|
11
11
|
return s;
|
|
12
|
-
}, r = (s, i) =>
|
|
12
|
+
}, r = (s, i) => d(s, f(i));
|
|
13
13
|
var e = (s, i, t) => (n(s, typeof i != "symbol" ? i + "" : i, t), t);
|
|
14
|
-
import { anyPositionToVector3 as
|
|
15
|
-
import { PointMesh as
|
|
14
|
+
import { anyPositionToVector3 as b } from "../../shared-utils/positionToVector3.js";
|
|
15
|
+
import { PointMesh as P } from "./Point.js";
|
|
16
16
|
import "three";
|
|
17
17
|
import "hammerjs";
|
|
18
18
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
19
|
-
import { LineMesh as
|
|
19
|
+
import { LineMesh as S } from "./Line.js";
|
|
20
20
|
import "../../shared-utils/three/THREESphere.js";
|
|
21
21
|
import "animejs";
|
|
22
|
-
import { notNil as
|
|
22
|
+
import { notNil as y } from "../../shared-utils/isNil.js";
|
|
23
23
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
24
|
-
import { IObject3D as
|
|
25
|
-
class
|
|
24
|
+
import { IObject3D as M } from "../../shared-utils/three/IObject3D.js";
|
|
25
|
+
class N extends S {
|
|
26
26
|
constructor(t) {
|
|
27
27
|
super();
|
|
28
28
|
e(this, "name", "LineWithDotsMesh");
|
|
29
|
-
e(this, "pointGroup", new
|
|
30
|
-
e(this, "
|
|
29
|
+
e(this, "pointGroup", new M());
|
|
30
|
+
e(this, "_paramsStyle");
|
|
31
31
|
e(this, "setStyle", (t) => {
|
|
32
|
-
super.setStyle(t), this.
|
|
32
|
+
super.setStyle(t), this._paramsStyle = o(o({}, this._paramsStyle), t), this.pointMeshes.forEach((h) => h.setStyle(r(o({}, this._paramsStyle), { color: t.lineColor }))), this.updateEdgePointsVisibility(), this.needsRender = !0;
|
|
33
33
|
});
|
|
34
34
|
e(this, "highlight", () => {
|
|
35
35
|
super.highlight(), this.pointMeshes.forEach((t) => t.highlight());
|
|
@@ -39,7 +39,7 @@ class R extends V {
|
|
|
39
39
|
});
|
|
40
40
|
e(this, "updateEdgePointsVisibility", () => {
|
|
41
41
|
var t;
|
|
42
|
-
|
|
42
|
+
y((t = this._paramsStyle) == null ? void 0 : t.pointVisibility) && (this.startPoint && (this.startPoint.visible = typeof this._paramsStyle.pointVisibility == "object" ? this._paramsStyle.pointVisibility.startPoint : this._paramsStyle.pointVisibility), this.endPoint && (this.endPoint.visible = typeof this._paramsStyle.pointVisibility == "object" ? this._paramsStyle.pointVisibility.endPoint : this._paramsStyle.pointVisibility));
|
|
43
43
|
});
|
|
44
44
|
this.add(this.pointGroup), t && this.setStyle(t), t != null && t.points && this.setPoints(t.points);
|
|
45
45
|
}
|
|
@@ -57,14 +57,14 @@ class R extends V {
|
|
|
57
57
|
}
|
|
58
58
|
setPoints(t) {
|
|
59
59
|
super.setPoints(t);
|
|
60
|
-
const h = t.map(
|
|
61
|
-
this.pointGroup.removeChildren(), this.addIfNotExists(this.pointGroup), h.forEach((
|
|
62
|
-
var
|
|
63
|
-
const
|
|
64
|
-
|
|
60
|
+
const h = t.map(b).filter(y);
|
|
61
|
+
this.pointGroup.removeChildren(), this.addIfNotExists(this.pointGroup), h.forEach((u) => {
|
|
62
|
+
var l;
|
|
63
|
+
const p = new P(r(o({}, this.style), { color: (l = this._paramsStyle) == null ? void 0 : l.lineColor }));
|
|
64
|
+
p.position.copy(u), this.pointGroup.add(p);
|
|
65
65
|
}), this.updateEdgePointsVisibility(), this.needsRender = !0;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
N as LineWithDotsMesh
|
|
70
70
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { type ColorStyle, type OcclusionStyle } from '../
|
|
2
|
+
import { type ColorStyle, type OcclusionStyle } from '../typings/style';
|
|
3
3
|
import { IObject3D } from '../../shared-utils/three/IObject3D';
|
|
4
4
|
import type { PointData } from '../utils/data';
|
|
5
5
|
export type { PointData } from '../utils/data';
|
|
@@ -12,19 +12,20 @@ var n = (i, e, t) => e in i ? C(i, e, { enumerable: !0, configurable: !0, writab
|
|
|
12
12
|
}, g = (i, e) => N(i, P(e));
|
|
13
13
|
var A = (i, e, t) => (n(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
14
|
import * as o from "three";
|
|
15
|
-
import { DEFAULT_HIGHLIGHT_OPACITY as b } from "../
|
|
16
|
-
import { IObject3D as
|
|
17
|
-
import { anyPositionToVector3 as
|
|
15
|
+
import { DEFAULT_HIGHLIGHT_OPACITY as b } from "../typings/style.js";
|
|
16
|
+
import { IObject3D as m } from "../../shared-utils/three/IObject3D.js";
|
|
17
|
+
import { anyPositionToVector3 as E } from "../../shared-utils/positionToVector3.js";
|
|
18
18
|
import "hammerjs";
|
|
19
19
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
20
20
|
import "@realsee/five/line";
|
|
21
|
+
import "../utils/Modules/Global.js";
|
|
21
22
|
import "../../shared-utils/three/THREESphere.js";
|
|
22
23
|
import "animejs";
|
|
23
24
|
import { notNil as u } from "../../shared-utils/isNil.js";
|
|
24
25
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
25
26
|
const F = "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==";
|
|
26
27
|
let w = null;
|
|
27
|
-
class
|
|
28
|
+
class T extends m {
|
|
28
29
|
constructor(t) {
|
|
29
30
|
var f, a;
|
|
30
31
|
super();
|
|
@@ -52,7 +53,7 @@ class O extends E {
|
|
|
52
53
|
depthTest: !1,
|
|
53
54
|
opacity: 0.5
|
|
54
55
|
})), s = new o.Points(l, r), h = new o.Points(l, V);
|
|
55
|
-
this.fontMesh = s, this.backgroundMesh = h, s.name = "FontMesh", h.name = "BackgroundMesh", s.renderOrder = 10, h.renderOrder = 0, this.add(s, h), t != null && t.point && this.position.copy(
|
|
56
|
+
this.fontMesh = s, this.backgroundMesh = h, s.name = "FontMesh", h.name = "BackgroundMesh", s.renderOrder = 10, h.renderOrder = 0, this.add(s, h), t != null && t.point && this.position.copy(E(t.point)), t && this.setStyle(t);
|
|
56
57
|
}
|
|
57
58
|
get color() {
|
|
58
59
|
return this.fontMesh.material.color;
|
|
@@ -71,5 +72,5 @@ class O extends E {
|
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
export {
|
|
74
|
-
|
|
75
|
+
T as PointMesh
|
|
75
76
|
};
|
|
@@ -3,7 +3,7 @@ var p = (o, i, e) => i in o ? l(o, i, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var t = (o, i, e) => (p(o, typeof i != "symbol" ? i + "" : i, e), e);
|
|
4
4
|
import * as r from "three";
|
|
5
5
|
import { generatePolygonGeometry as g } from "../../shared-utils/three/generatePolygonGeometry.js";
|
|
6
|
-
import { DEFAULT_HIGHLIGHT_OPACITY as a } from "../
|
|
6
|
+
import { DEFAULT_HIGHLIGHT_OPACITY as a } from "../typings/style.js";
|
|
7
7
|
import { anyPositionToVector3 as f } from "../../shared-utils/positionToVector3.js";
|
|
8
8
|
import { ColoredMesh as y } from "../utils/three/ColoredMesh.js";
|
|
9
9
|
import { getGeometryInfo as d } from "../../shared-utils/three/geometryUtil.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnyPositions } from '../../shared-utils/positionToVector3';
|
|
2
2
|
import { PolylineMesh } from './Polyline';
|
|
3
|
-
import type { LineStyle } from '../
|
|
3
|
+
import type { LineStyle } from '../typings/style';
|
|
4
4
|
import PolygonMesh, { type PolygonData, type PolygonStyle } from './Polygon';
|
|
5
5
|
import * as THREE from 'three';
|
|
6
6
|
export type PolygonWithEdgeMeshStyle = PolygonStyle & LineStyle;
|
|
@@ -26,6 +26,7 @@ import * as H from "three";
|
|
|
26
26
|
import "hammerjs";
|
|
27
27
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
28
28
|
import "@realsee/five/line";
|
|
29
|
+
import "../utils/Modules/Global.js";
|
|
29
30
|
import "../../shared-utils/three/THREESphere.js";
|
|
30
31
|
import "animejs";
|
|
31
32
|
import { notNil as I } from "../../shared-utils/isNil.js";
|
|
@@ -97,19 +98,19 @@ class v extends F {
|
|
|
97
98
|
this.lines.forEach((i) => i.unhighlight());
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
|
-
class
|
|
101
|
+
class Z extends v {
|
|
101
102
|
constructor(...i) {
|
|
102
103
|
super(c(a({}, i[0]), { withDots: !1 }));
|
|
103
104
|
l(this, "name", "PolylineMesh");
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
|
-
class
|
|
107
|
+
class _ extends v {
|
|
107
108
|
constructor(...i) {
|
|
108
109
|
super(c(a({}, i[0]), { withDots: !0 }));
|
|
109
110
|
l(this, "name", "PolylineWithDotsMesh");
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
Z as PolylineMesh,
|
|
115
|
+
_ as PolylineWithDotsMesh
|
|
115
116
|
};
|
|
@@ -2,7 +2,7 @@ import { IObject3D } from '../../shared-utils/three/IObject3D';
|
|
|
2
2
|
import { type AnyPosition, type AnyPositions } from '../../shared-utils/positionToVector3';
|
|
3
3
|
import type { AreaData } from './Area';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
|
-
import type { LineStyle } from '../
|
|
5
|
+
import type { LineStyle } from '../typings/style';
|
|
6
6
|
import type { ColoredMeshStyle } from '../utils/three/ColoredMesh';
|
|
7
7
|
import { PolygonWithEdgeMesh } from './PolygonWithEdge';
|
|
8
8
|
export type PrismStyle = ColoredMeshStyle & LineStyle;
|
|
@@ -6,6 +6,7 @@ import * as u from "three";
|
|
|
6
6
|
import "hammerjs";
|
|
7
7
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
8
8
|
import "@realsee/five/line";
|
|
9
|
+
import "../utils/Modules/Global.js";
|
|
9
10
|
import "../../shared-utils/three/THREESphere.js";
|
|
10
11
|
import "animejs";
|
|
11
12
|
import { notNil as s } from "../../shared-utils/isNil.js";
|
|
@@ -14,7 +15,7 @@ import { PolygonMesh as f } from "./Polygon.js";
|
|
|
14
15
|
import { RectangleGeometry as g } from "../utils/three/RectangleGeometry.js";
|
|
15
16
|
import { getBetterNormal as d } from "../utils/getBetterNormal.js";
|
|
16
17
|
import { Sculpt as v } from "../index.js";
|
|
17
|
-
class
|
|
18
|
+
class G extends f {
|
|
18
19
|
constructor(t) {
|
|
19
20
|
super(t);
|
|
20
21
|
i(this, "name", "RectangleMesh");
|
|
@@ -46,5 +47,5 @@ class B extends f {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
G as RectangleMesh
|
|
50
51
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { AnyPositions } from '../../shared-utils/positionToVector3';
|
|
2
2
|
import { RectangleMesh, type RectangleData, type RectangleStyle } from './Rectangle';
|
|
3
3
|
import { PolylineMesh } from './Polyline';
|
|
4
|
-
import type { LineStyle } from '../
|
|
5
|
-
import * as THREE from 'three';
|
|
4
|
+
import type { LineStyle } from '../typings/style';
|
|
6
5
|
export type RectangleWithEdgeMeshStyle = RectangleStyle & LineStyle;
|
|
7
6
|
/**
|
|
8
7
|
* @description: 带边线的矩形
|
|
@@ -10,8 +9,8 @@ export type RectangleWithEdgeMeshStyle = RectangleStyle & LineStyle;
|
|
|
10
9
|
export declare class RectangleWithEdgeMesh extends RectangleMesh {
|
|
11
10
|
name: string;
|
|
12
11
|
get lineWidth(): number;
|
|
13
|
-
get lineColor():
|
|
14
|
-
|
|
12
|
+
get lineColor(): import("three").Color;
|
|
13
|
+
line: PolylineMesh;
|
|
15
14
|
constructor(params?: Partial<RectangleWithEdgeMeshStyle & RectangleData>);
|
|
16
15
|
setPoints(points: AnyPositions): void;
|
|
17
16
|
setStyle(style: Partial<RectangleWithEdgeMeshStyle>): void;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
var
|
|
1
|
+
var E = Object.defineProperty, v = Object.defineProperties;
|
|
2
2
|
var C = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var u = Object.getOwnPropertySymbols;
|
|
4
4
|
var H = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var b = (o, e, t) => e in o ? E(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, c = (o, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
H.call(e, t) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
O.call(e, t) &&
|
|
7
|
+
H.call(e, t) && b(o, t, e[t]);
|
|
8
|
+
if (u)
|
|
9
|
+
for (var t of u(e))
|
|
10
|
+
O.call(e, t) && b(o, t, e[t]);
|
|
11
11
|
return o;
|
|
12
|
-
}, M = (o, e) =>
|
|
13
|
-
var d = (o, e, t) => (
|
|
14
|
-
var
|
|
15
|
-
var
|
|
12
|
+
}, M = (o, e) => v(o, C(e));
|
|
13
|
+
var d = (o, e, t) => (b(o, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
|
+
var p = (o, e, t) => new Promise((n, i) => {
|
|
15
|
+
var a = (s) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
i(
|
|
17
|
+
r(t.next(s));
|
|
18
|
+
} catch (h) {
|
|
19
|
+
i(h);
|
|
20
20
|
}
|
|
21
21
|
}, m = (s) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
i(
|
|
23
|
+
r(t.throw(s));
|
|
24
|
+
} catch (h) {
|
|
25
|
+
i(h);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, r = (s) => s.done ? n(s.value) : Promise.resolve(s.value).then(a, m);
|
|
28
|
+
r((t = t.apply(o, e)).next());
|
|
29
29
|
});
|
|
30
30
|
import { hotkeys as L } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
31
31
|
import { BaseObject as W } from "../Base/index.js";
|
|
@@ -36,11 +36,10 @@ import { createRectangle as R } from "../Rectangle/index.js";
|
|
|
36
36
|
import { LineMesh as T } from "../../Meshes/Line.js";
|
|
37
37
|
import { getNormal as U } from "../../../shared-utils/three/getNormal.js";
|
|
38
38
|
import { rayOnLine as k } from "../../utils/three/rayOnLine.js";
|
|
39
|
-
import {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
super(t, r);
|
|
39
|
+
import { vector3ToArray as B } from "../../../shared-utils/three/vector3ToArray.js";
|
|
40
|
+
class X extends W {
|
|
41
|
+
constructor(t, n) {
|
|
42
|
+
super(t, n);
|
|
44
43
|
d(this, "type", "Box");
|
|
45
44
|
d(this, "boxMesh");
|
|
46
45
|
this.editor = new N(this), t && (this.boxMesh = new w(c(c({}, t.style), t)), this.add(this.boxMesh)), L("esc", () => {
|
|
@@ -49,8 +48,8 @@ class Z extends W {
|
|
|
49
48
|
}
|
|
50
49
|
get data() {
|
|
51
50
|
return M(c({}, this.baseData), {
|
|
52
|
-
points:
|
|
53
|
-
heightPoint:
|
|
51
|
+
points: B(this.applyObjectMatrixWorld(this.boxMesh.bottomPlane.points)),
|
|
52
|
+
heightPoint: B(this.applyObjectMatrixWorld(this.boxMesh.heightPoint)),
|
|
54
53
|
style: {
|
|
55
54
|
color: this.boxMesh.color.getHex(),
|
|
56
55
|
lineWidth: this.boxMesh.lineWidth,
|
|
@@ -67,41 +66,40 @@ class Z extends W {
|
|
|
67
66
|
(t = this.boxMesh) == null || t.unhighlight();
|
|
68
67
|
}
|
|
69
68
|
create(t) {
|
|
70
|
-
return
|
|
71
|
-
this.removeChildren(), this.boxMesh = new w(t), this.add(this.boxMesh), yield
|
|
69
|
+
return p(this, null, function* () {
|
|
70
|
+
this.removeChildren(), this.boxMesh = new w(t), this.add(this.boxMesh), yield z(this.boxMesh, this.pointSelector), this.editor.enable();
|
|
72
71
|
});
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
|
-
function
|
|
76
|
-
return
|
|
77
|
-
return yield R(o.bottomPlane, e), new Promise((t,
|
|
74
|
+
function z(o, e) {
|
|
75
|
+
return p(this, null, function* () {
|
|
76
|
+
return yield R(o.bottomPlane, e), new Promise((t, n) => {
|
|
78
77
|
const i = o.parent;
|
|
79
78
|
if (!i) {
|
|
80
|
-
|
|
79
|
+
n(new Error("No container"));
|
|
81
80
|
return;
|
|
82
81
|
}
|
|
83
|
-
const
|
|
84
|
-
|
|
82
|
+
const a = new T(), m = U(o.bottomPlane.points).normalize(), r = o.bottomPlane.builtPoints.at(-1), s = r.clone().add(m.clone().multiplyScalar(10)), h = r.clone().sub(m.clone().multiplyScalar(10));
|
|
83
|
+
a.setPoints([s, h]), i.add(a), e.enable();
|
|
85
84
|
const f = (l) => {
|
|
86
85
|
g(), t();
|
|
87
86
|
}, x = (l) => {
|
|
88
87
|
if (!(l != null && l.raycaster))
|
|
89
88
|
return;
|
|
90
|
-
const
|
|
91
|
-
cameraPosition: z.modules.five.camera.position,
|
|
89
|
+
const P = k({
|
|
92
90
|
raycaster: l.raycaster,
|
|
93
|
-
line: new j.Line3(s,
|
|
91
|
+
line: new j.Line3(s, h)
|
|
94
92
|
});
|
|
95
|
-
|
|
93
|
+
P && o.setPoints({ heightPoint: P });
|
|
96
94
|
}, g = () => {
|
|
97
|
-
e.off("select", f), e.off("intersectionUpdate", x), e.off("disable",
|
|
98
|
-
},
|
|
99
|
-
g(), i == null || i.remove(o),
|
|
95
|
+
e.off("select", f), e.off("intersectionUpdate", x), e.off("disable", y), e.disable(), i == null || i.remove(a);
|
|
96
|
+
}, y = () => {
|
|
97
|
+
g(), i == null || i.remove(o), n(new Error("Cancelled"));
|
|
100
98
|
};
|
|
101
|
-
e.on("select", f), e.on("intersectionUpdate", x), e.on("disable",
|
|
99
|
+
e.on("select", f), e.on("intersectionUpdate", x), e.on("disable", y);
|
|
102
100
|
});
|
|
103
101
|
});
|
|
104
102
|
}
|
|
105
103
|
export {
|
|
106
|
-
|
|
104
|
+
X as Box
|
|
107
105
|
};
|