@realsee/dnalogel 3.47.4 → 3.47.5
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 +3 -0
- package/dist/Sculpt/Meshes/Polygon.d.ts +1 -1
- package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/dist/Sculpt/utils/Meshes/getLengthHTML.d.ts +1 -0
- package/dist/Sculpt/utils/three/ColoredMesh.d.ts +2 -2
- package/dist/index.cjs.js +79 -57
- package/dist/index.js +5069 -5047
- package/dist/index.umd.js +74 -52
- package/dist/shared-utils/five/vector3ToScreen.d.ts +4 -4
- package/dist/shared-utils/tag.d.ts +1 -3
- package/dist/shared-utils/three/index.d.ts +0 -2
- package/dist/shared-utils/three/raycaster.d.ts +2 -0
- package/libs/AreaMakerPlugin/Controller.js +16 -14
- package/libs/AreaMakerPlugin/index.js +18 -16
- package/libs/AreaMakerPlugin/utils/Item.js +55 -53
- package/libs/CSS3DRenderPlugin/Controller.js +14 -12
- package/libs/CSS3DRenderPlugin/index.js +21 -19
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +15 -13
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +16 -14
- package/libs/CruisePlugin/BaseController.js +29 -27
- package/libs/CruisePlugin/Move.js +21 -19
- package/libs/CruisePlugin/Work.js +16 -14
- package/libs/CruisePlugin/index.js +22 -20
- package/libs/CurrentPanoImagePlugin/Controller.js +25 -23
- package/libs/CurrentPanoImagePlugin/index.js +19 -17
- package/libs/GuideLinePlugin/Controller.js +18 -16
- package/libs/GuideLinePlugin/GuideLineItem.js +18 -16
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -4
- package/libs/GuideLinePlugin/GuideLineModeItem.js +18 -16
- package/libs/GuideLinePlugin/index.js +22 -20
- package/libs/ModelMakerPlugin/Controller.js +22 -20
- package/libs/ModelMakerPlugin/index.js +18 -16
- package/libs/ModelMakerPlugin/item/baseItem.js +14 -13
- package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
- package/libs/ModelMakerPlugin/item/polygonItem.js +6 -5
- package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
- package/libs/ModelTVVideoPlugin/Plugin.js +17 -15
- package/libs/ModelTVVideoPlugin/index.js +16 -14
- package/libs/Object3DHelperPlugin/Controller.js +17 -15
- package/libs/Object3DHelperPlugin/index.js +21 -19
- package/libs/PanoCompassPlugin/Controller.js +18 -16
- package/libs/PanoCompassPlugin/index.js +19 -17
- package/libs/PanoDoorLabelPlugin/BaseController.js +18 -16
- package/libs/PanoDoorLabelPlugin/Controller.js +38 -36
- package/libs/PanoDoorLabelPlugin/index.js +19 -17
- package/libs/PanoMeasurePlugin/Components/Controller0.js +15 -13
- package/libs/PanoMeasurePlugin/Components/Controller1.js +15 -13
- package/libs/PanoMeasurePlugin/Controller/EditController.js +14 -12
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +15 -13
- package/libs/PanoMeasurePlugin/Controller/index.js +13 -11
- package/libs/PanoMeasurePlugin/Model/area.js +15 -13
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +15 -13
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +15 -13
- package/libs/PanoMeasurePlugin/index.js +24 -22
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +15 -13
- package/libs/PanoSpatialTagPlugin/Plugin.js +17 -15
- package/libs/PanoSpatialTagPlugin/index.js +14 -12
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +17 -15
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +16 -14
- package/libs/PanoTagPlugin/Components/Tag/index.js +16 -14
- package/libs/PanoTagPlugin/Components/TagContainer.js +16 -14
- package/libs/PanoTagPlugin/Components/TagItem.js +16 -14
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +60 -60
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +16 -14
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +16 -14
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +18 -16
- package/libs/PanoTagPlugin/controller/TagRender.js +15 -13
- package/libs/PanoTagPlugin/controller/TagUtil.js +16 -14
- package/libs/PanoTagPlugin/controller/index.js +18 -16
- package/libs/PanoTagPlugin/index.js +24 -22
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +17 -15
- package/libs/PanoVideoPlugin/Controller.js +18 -16
- package/libs/PanoVideoPlugin/VideoMeshController.js +18 -16
- package/libs/PanoVideoPlugin/index.js +21 -19
- package/libs/PipelinePlugin/Controller.js +17 -15
- package/libs/PipelinePlugin/index.js +19 -17
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +18 -16
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +18 -16
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +35 -33
- package/libs/Sculpt/Meshes/Box.js +6 -7
- package/libs/Sculpt/Meshes/Cylinder.js +15 -16
- package/libs/Sculpt/Meshes/Line.js +60 -56
- package/libs/Sculpt/Meshes/Point.js +6 -7
- package/libs/Sculpt/Meshes/Polygon.d.ts +1 -1
- package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Polyline.js +5 -6
- package/libs/Sculpt/Meshes/Rectangle.js +3 -4
- package/libs/Sculpt/Objects/Line/Editor.js +15 -16
- package/libs/Sculpt/Objects/Line/index.js +35 -35
- package/libs/Sculpt/Objects/Polygon/index.js +55 -61
- package/libs/Sculpt/Objects/Polyline/index.js +45 -45
- package/libs/Sculpt/index.js +1 -1
- package/libs/Sculpt/utils/Meshes/getLengthHTML.d.ts +1 -0
- package/libs/Sculpt/utils/Meshes/getLengthHTML.js +34 -0
- package/libs/Sculpt/utils/three/ColoredMesh.d.ts +2 -2
- package/libs/Sculpt/utils/three/ColoredMesh.js +3 -4
- package/libs/base/BasePlugin.js +14 -15
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +15 -13
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +19 -17
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +15 -13
- package/libs/floorplan/ModelFloorplanPlugin/index.js +19 -17
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +18 -16
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +19 -17
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +15 -13
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +19 -17
- package/libs/floorplan/index.js +1 -2
- package/libs/index.js +15 -15
- package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.js +7 -7
- package/libs/shared-utils/five/index.js +3 -4
- package/libs/shared-utils/five/lookObject.js +3 -4
- package/libs/shared-utils/five/vector3ToScreen.d.ts +4 -4
- package/libs/shared-utils/five/vector3ToScreen.js +9 -4
- package/libs/shared-utils/index.js +45 -49
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +1 -3
- package/libs/shared-utils/tag.js +37 -29
- package/libs/shared-utils/three/index.d.ts +0 -2
- package/libs/shared-utils/three/index.js +1 -2
- package/libs/shared-utils/three/raycaster.d.ts +2 -0
- package/libs/shared-utils/three/raycaster.js +6 -0
- package/package.json +1 -1
- package/dist/shared-utils/three/getIntersect.d.ts +0 -21
- package/dist/shared-utils/three/getRaycaster.d.ts +0 -6
- package/libs/shared-utils/three/getIntersect.d.ts +0 -21
- package/libs/shared-utils/three/getIntersect.js +0 -24
- package/libs/shared-utils/three/getRaycaster.d.ts +0 -6
- package/libs/shared-utils/three/getRaycaster.js +0 -12
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
var g = Object.defineProperty;
|
|
2
2
|
var d = (s, e, t) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var n = (s, e, t) => (d(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import { BaseEditor as p } from "../Base/Editor.js";
|
|
5
|
-
import { Sculpt as
|
|
5
|
+
import { Sculpt as o } from "../../index.js";
|
|
6
6
|
import { PointMesh as a } from "../../Meshes/Point.js";
|
|
7
7
|
import { getIntersectByRaycaster as h } from "../../../shared-utils/five/getPosition.js";
|
|
8
8
|
import "three";
|
|
9
9
|
import "hammerjs";
|
|
10
10
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
11
|
-
import "
|
|
12
|
-
import "../../utils/Modules/Global.js";
|
|
11
|
+
import "../../Meshes/Line.js";
|
|
13
12
|
import "../../../shared-utils/three/THREESphere.js";
|
|
14
13
|
import "animejs";
|
|
15
|
-
import { notNil as
|
|
14
|
+
import { notNil as l } from "../../../shared-utils/isNil.js";
|
|
16
15
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
17
|
-
class
|
|
16
|
+
class m extends p {
|
|
18
17
|
constructor(t) {
|
|
19
18
|
super(t);
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
n(this, "draggingPoints", []);
|
|
20
|
+
n(this, "onDragstart", (t) => {
|
|
22
21
|
const i = t.target;
|
|
23
22
|
this.draggingPoints = this.pointMeshes.filter((r) => r.position.equals(i.position));
|
|
24
23
|
});
|
|
25
|
-
|
|
24
|
+
n(this, "onDragend", (t) => {
|
|
26
25
|
this.draggingPoints = [];
|
|
27
26
|
});
|
|
28
27
|
}
|
|
@@ -33,22 +32,22 @@ class l extends p {
|
|
|
33
32
|
return this.children;
|
|
34
33
|
}
|
|
35
34
|
enable() {
|
|
36
|
-
super.enable(), this.points.filter(
|
|
35
|
+
super.enable(), this.points.filter(l).forEach((t) => {
|
|
37
36
|
const i = new a();
|
|
38
|
-
i.visible = !1, i.position.copy(t), i.draggable = !0,
|
|
37
|
+
i.visible = !1, i.position.copy(t), i.draggable = !0, o.modules.fiveDomEvents.addEventListener(i, "drag", this.onDrag), o.modules.fiveDomEvents.addEventListener(i, "dragstart", this.onDragstart), o.modules.fiveDomEvents.addEventListener(i, "dragend", this.onDragend), this.add(i);
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
40
|
disable() {
|
|
42
41
|
super.disable(), this.removeChildren();
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
|
-
class
|
|
44
|
+
class B extends m {
|
|
46
45
|
constructor(t) {
|
|
47
46
|
super(t);
|
|
48
|
-
|
|
47
|
+
n(this, "onDrag", (t) => {
|
|
49
48
|
if (!this.draggingPoints || this.draggingPoints.length === 0)
|
|
50
49
|
return;
|
|
51
|
-
const i = h(
|
|
50
|
+
const i = h(o.modules.five, t.raycaster);
|
|
52
51
|
this.draggingPoints.forEach((r) => r.position.copy(i.point)), this.originObject.lineMesh.setPoints(this.pointMeshes.map((r) => r.position));
|
|
53
52
|
});
|
|
54
53
|
}
|
|
@@ -57,6 +56,6 @@ class O extends l {
|
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
B as LineEditor,
|
|
60
|
+
m as LineEditorAbstract
|
|
62
61
|
};
|
|
@@ -2,33 +2,33 @@ var W = Object.defineProperty, j = Object.defineProperties;
|
|
|
2
2
|
var O = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var C = Object.getOwnPropertySymbols;
|
|
4
4
|
var A = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var u = (
|
|
5
|
+
var u = (s, t, e) => t in s ? W(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, P = (s, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
A.call(t, e) && u(
|
|
7
|
+
A.call(t, e) && u(s, e, t[e]);
|
|
8
8
|
if (C)
|
|
9
9
|
for (var e of C(t))
|
|
10
|
-
D.call(t, e) && u(
|
|
11
|
-
return
|
|
12
|
-
}, y = (
|
|
13
|
-
var
|
|
14
|
-
var
|
|
10
|
+
D.call(t, e) && u(s, e, t[e]);
|
|
11
|
+
return s;
|
|
12
|
+
}, y = (s, t) => j(s, O(t));
|
|
13
|
+
var g = (s, t, e) => (u(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var E = (s, t, e) => new Promise((i, c) => {
|
|
15
15
|
var a = (h) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
f(e.next(h));
|
|
18
18
|
} catch (p) {
|
|
19
19
|
c(p);
|
|
20
20
|
}
|
|
21
21
|
}, d = (h) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
f(e.throw(h));
|
|
24
24
|
} catch (p) {
|
|
25
25
|
c(p);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, f = (h) => h.done ? i(h.value) : Promise.resolve(h.value).then(a, d);
|
|
28
|
+
f((e = e.apply(s, t)).next());
|
|
29
29
|
});
|
|
30
30
|
import { hotkeys as U } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
31
|
-
import { LineMesh as
|
|
31
|
+
import { LineMesh as x } from "../../Meshes/Line.js";
|
|
32
32
|
import { BaseObject as k } from "../Base/index.js";
|
|
33
33
|
import * as r from "three";
|
|
34
34
|
import { LineEditor as z } from "./Editor.js";
|
|
@@ -37,10 +37,10 @@ import { LineWithDotsMesh as V } from "../../Meshes/LineWithDots.js";
|
|
|
37
37
|
import { rayOnLine as F } from "../../utils/three/rayOnLine.js";
|
|
38
38
|
const T = new r.Vector3();
|
|
39
39
|
class X extends k {
|
|
40
|
-
constructor(e,
|
|
41
|
-
super(e,
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
constructor(e, i) {
|
|
41
|
+
super(e, i);
|
|
42
|
+
g(this, "type", "Line");
|
|
43
|
+
g(this, "lineMesh");
|
|
44
44
|
e && (this.lineMesh = new V(P(P({}, e.style), e)), this.add(this.lineMesh)), this.editor = new z(this), U("esc", () => {
|
|
45
45
|
this.stopCreating();
|
|
46
46
|
});
|
|
@@ -64,42 +64,42 @@ class X extends k {
|
|
|
64
64
|
(e = this.lineMesh) == null || e.unhighlight();
|
|
65
65
|
}
|
|
66
66
|
create(e) {
|
|
67
|
-
return
|
|
67
|
+
return E(this, null, function* () {
|
|
68
68
|
this.removeChildren();
|
|
69
|
-
const
|
|
70
|
-
this.lineMesh =
|
|
69
|
+
const i = new V(e);
|
|
70
|
+
this.lineMesh = i, this.add(this.lineMesh), yield H(i, this.pointSelector, e), this.editor.enable();
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
function H(
|
|
75
|
-
var
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
74
|
+
function H(s, t, e) {
|
|
75
|
+
var f;
|
|
76
|
+
const i = s.parent;
|
|
77
|
+
if (!i)
|
|
78
78
|
return;
|
|
79
|
-
const c = (
|
|
80
|
-
|
|
81
|
-
const d = new
|
|
82
|
-
return
|
|
79
|
+
const c = (f = e == null ? void 0 : e.limit) != null ? f : "none", a = new x(s.style);
|
|
80
|
+
i.add(a);
|
|
81
|
+
const d = new x(y(P({}, s.style), { dashed: !0, lengthEnable: !1 }));
|
|
82
|
+
return i.add(d), t.enable(), new Promise((h, p) => {
|
|
83
83
|
const n = [];
|
|
84
|
-
let o,
|
|
85
|
-
const
|
|
84
|
+
let o, m;
|
|
85
|
+
const L = (l) => {
|
|
86
86
|
const w = n.length === 0 ? l.point : o.clone();
|
|
87
|
-
n.push(w),
|
|
87
|
+
n.push(w), s.setPoints(n), n.length === 2 && (b(), h());
|
|
88
88
|
}, M = (l) => {
|
|
89
89
|
if (!(n != null && n.length) || !l)
|
|
90
90
|
return;
|
|
91
91
|
const w = n.at(-1).clone();
|
|
92
|
-
c === "none" ? (o = l.point, a.setPoints([w, o])) : c === "xoz" ? (t.plane =
|
|
92
|
+
c === "none" ? (o = l.point, a.setPoints([w, o])) : c === "xoz" ? (t.plane = m, m = m != null ? m : new r.Plane().setFromNormalAndCoplanarPoint(new r.Vector3(0, 1, 0), n[0]), o = m.projectPoint(l.point, T), a.setPoints([w, o]), d.setPoints([o, l.point])) : c === "y" && (l.isVirtual ? (o = F({
|
|
93
93
|
raycaster: l.raycaster,
|
|
94
94
|
line: new r.Line3(n[0].clone(), new r.Vector3(0, 1, 0).add(n[0])),
|
|
95
95
|
clampToLine: !1
|
|
96
96
|
}), d.setPoints([])) : (o = new r.Line3(n[0].clone(), new r.Vector3(0, 1, 0).add(n[0])).closestPointToPoint(l.point, !1, T), d.setPoints([o, l.point])), a.setPoints([w, o]));
|
|
97
|
-
}, v = () => {
|
|
98
|
-
t.off("select", g), t.off("intersectionUpdate", M), t.off("disable", b), t.plane = null, t.disable(), s == null || s.remove(a, d);
|
|
99
97
|
}, b = () => {
|
|
100
|
-
|
|
98
|
+
t.off("select", L), t.off("intersectionUpdate", M), t.off("disable", v), t.plane = null, t.disable(), i == null || i.remove(a, d);
|
|
99
|
+
}, v = () => {
|
|
100
|
+
b(), n.length !== 2 && (i == null || i.remove(s)), p(new Error("Cancelled"));
|
|
101
101
|
};
|
|
102
|
-
t.on("select",
|
|
102
|
+
t.on("select", L), t.on("intersectionUpdate", M), t.on("disable", v);
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
export {
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
var F = Object.defineProperty, L = Object.defineProperties;
|
|
2
2
|
var N = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var T = Object.getOwnPropertySymbols;
|
|
4
4
|
var O = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var u = (s, e, t) => e in s ? F(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, c = (s, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
O.call(e, t) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
U.call(e, t) &&
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
7
|
+
O.call(e, t) && u(s, t, e[t]);
|
|
8
|
+
if (T)
|
|
9
|
+
for (var t of T(e))
|
|
10
|
+
U.call(e, t) && u(s, t, e[t]);
|
|
11
|
+
return s;
|
|
12
|
+
}, y = (s, e) => L(s, N(e));
|
|
13
|
+
var v = (s, e, t) => (u(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
|
+
var W = (s, e, t) => new Promise((f, d) => {
|
|
15
15
|
var n = (l) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
d(
|
|
17
|
+
a(t.next(l));
|
|
18
|
+
} catch (o) {
|
|
19
|
+
d(o);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, P = (l) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
d(
|
|
23
|
+
a(t.throw(l));
|
|
24
|
+
} catch (o) {
|
|
25
|
+
d(o);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, a = (l) => l.done ? f(l.value) : Promise.resolve(l.value).then(n, P);
|
|
28
|
+
a((t = t.apply(s, e)).next());
|
|
29
29
|
});
|
|
30
30
|
import { hotkeys as k } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
31
31
|
import { BaseObject as z } from "../Base/index.js";
|
|
32
|
-
import * as
|
|
33
|
-
import { PolylineMesh as
|
|
34
|
-
import { AreaMesh as
|
|
32
|
+
import * as m from "three";
|
|
33
|
+
import { PolylineMesh as A } from "../../Meshes/Polyline.js";
|
|
34
|
+
import { AreaMesh as V } from "../../Meshes/Area.js";
|
|
35
35
|
import { PolygonEditor as B } from "./Editor.js";
|
|
36
36
|
import { vector3ToArray as H } from "../../../shared-utils/three/vector3ToArray.js";
|
|
37
|
-
const D = new
|
|
37
|
+
const D = new m.Vector3();
|
|
38
38
|
class X extends z {
|
|
39
|
-
constructor(t,
|
|
40
|
-
super(t,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.editor = new B(this), t && (this.areaMesh = new
|
|
39
|
+
constructor(t, f) {
|
|
40
|
+
super(t, f);
|
|
41
|
+
v(this, "type", "Polygon");
|
|
42
|
+
v(this, "areaMesh");
|
|
43
|
+
this.editor = new B(this), t && (this.areaMesh = new V(c(c({}, t.style), t)), this.add(this.areaMesh)), k("esc", () => {
|
|
44
44
|
this.stopCreating();
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
get data() {
|
|
48
|
-
return
|
|
48
|
+
return y(c({}, this.baseData), {
|
|
49
49
|
points: H(this.applyObjectMatrixWorld(this.areaMesh.points)),
|
|
50
50
|
style: {
|
|
51
51
|
color: this.areaMesh.color.getHex(),
|
|
@@ -63,54 +63,48 @@ class X extends z {
|
|
|
63
63
|
(t = this.areaMesh) == null || t.unhighlight();
|
|
64
64
|
}
|
|
65
65
|
create(t) {
|
|
66
|
-
return
|
|
66
|
+
return W(this, null, function* () {
|
|
67
67
|
this.children.forEach((d) => {
|
|
68
68
|
d.parent === this && this.remove(d);
|
|
69
69
|
}), this.children.length = 0;
|
|
70
|
-
const
|
|
71
|
-
this.areaMesh =
|
|
70
|
+
const f = new V(t);
|
|
71
|
+
this.areaMesh = f, this.add(this.areaMesh), yield I(this.areaMesh, this.pointSelector, t), this.editor.enable();
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function I(
|
|
76
|
-
return new Promise((
|
|
77
|
-
var
|
|
78
|
-
const n =
|
|
75
|
+
function I(s, e, t) {
|
|
76
|
+
return new Promise((f, d) => {
|
|
77
|
+
var x;
|
|
78
|
+
const n = s.parent;
|
|
79
79
|
if (!n) {
|
|
80
80
|
d(new Error("No container"));
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
lineWidth: o.lineWidth,
|
|
87
|
-
occlusionMode: o.occlusionMode,
|
|
88
|
-
occlusionVisibility: o.occlusionVisibility
|
|
89
|
-
});
|
|
90
|
-
n == null || n.add(r);
|
|
91
|
-
const l = new T({ dashed: !0, lineColor: o.lineColor, lineWidth: o.lineWidth });
|
|
83
|
+
const P = (x = t == null ? void 0 : t.limit) != null ? x : "none", a = new A(s.style);
|
|
84
|
+
n == null || n.add(a);
|
|
85
|
+
const l = new A(y(c({}, s.style), { dashed: !0, lengthEnable: !1 }));
|
|
92
86
|
n == null || n.add(l), e.enable();
|
|
93
|
-
const
|
|
94
|
-
let i,
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
|
|
87
|
+
const o = [];
|
|
88
|
+
let i, r, w = !1;
|
|
89
|
+
const M = (h) => {
|
|
90
|
+
const p = o.length === 0 ? h.point : i.clone();
|
|
91
|
+
o.push(p), s.setPoints(o, { closed: !1 }), w && (E(), f());
|
|
98
92
|
}, b = (h) => {
|
|
99
|
-
if (!(
|
|
93
|
+
if (!(o != null && o.length) || !h)
|
|
100
94
|
return;
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
103
|
-
i =
|
|
104
|
-
const
|
|
105
|
-
|
|
95
|
+
const p = o.at(-1).clone();
|
|
96
|
+
if (o.length < 3 && (P === "none" ? (i = h.point, a.setPoints([p, i])) : P === "xoz" ? (r = r != null ? r : new m.Plane().setFromNormalAndCoplanarPoint(new m.Vector3(0, 1, 0), o[0]), e.plane = r, i = r.projectPoint(h.point, D), a.setPoints([p, i]), l.setPoints([i, h.point])) : P === "y" && (o.length === 1 ? (i = h.point, a.setPoints([p, i])) : (r = r != null ? r : new m.Plane().setFromCoplanarPoints(o[0], o[1], new m.Vector3(0, 1, 0).add(o[0])), e.plane = r, i = r.projectPoint(h.point, D), a.setPoints([p, i]), l.setPoints([i, h.point])))), o.length >= 3) {
|
|
97
|
+
i = s.projectPoint(h.point);
|
|
98
|
+
const g = o[0], j = 0.2;
|
|
99
|
+
g.distanceTo(i) < j || g.distanceTo(h.point) < j ? (i = g, h.point.copy(g), e.pointSelectorHelper.updateWithIntersect(h, { emitEvent: !1 }), w = !0) : w = !1, a.setPoints([p, i]), l.setPoints([i, h.point]);
|
|
106
100
|
}
|
|
107
|
-
|
|
108
|
-
}, v = () => {
|
|
109
|
-
e.off("select", C), e.off("intersectionUpdate", b), e.off("disable", E), e.plane = null, e.disable(), n == null || n.remove(r, l);
|
|
101
|
+
o.length >= 2 && s.setPoints([...o, i], { closed: !1 });
|
|
110
102
|
}, E = () => {
|
|
111
|
-
|
|
103
|
+
e.off("select", M), e.off("intersectionUpdate", b), e.off("disable", C), e.plane = null, e.disable(), n == null || n.remove(a, l);
|
|
104
|
+
}, C = () => {
|
|
105
|
+
E(), n == null || n.remove(s, l, a), d(new Error("Cancelled"));
|
|
112
106
|
};
|
|
113
|
-
e.on("select",
|
|
107
|
+
e.on("select", M), e.on("intersectionUpdate", b), e.on("disable", C);
|
|
114
108
|
});
|
|
115
109
|
}
|
|
116
110
|
export {
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
var j = Object.defineProperty,
|
|
1
|
+
var j = Object.defineProperty, W = Object.defineProperties;
|
|
2
2
|
var V = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var L = Object.getOwnPropertySymbols;
|
|
4
4
|
var A = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var w = (n, t, e) => t in n ? j(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, f = (n, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
A.call(t, e) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
D.call(t, e) &&
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
7
|
+
A.call(t, e) && w(n, e, t[e]);
|
|
8
|
+
if (L)
|
|
9
|
+
for (var e of L(t))
|
|
10
|
+
D.call(t, e) && w(n, e, t[e]);
|
|
11
|
+
return n;
|
|
12
|
+
}, u = (n, t) => W(n, V(t));
|
|
13
|
+
var g = (n, t, e) => (w(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var C = (n, t, e) => new Promise((i, p) => {
|
|
15
15
|
var a = (h) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
y(e.next(h));
|
|
18
18
|
} catch (m) {
|
|
19
|
-
|
|
19
|
+
p(m);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, d = (h) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
y(e.throw(h));
|
|
24
24
|
} catch (m) {
|
|
25
|
-
|
|
25
|
+
p(m);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, y = (h) => h.done ? i(h.value) : Promise.resolve(h.value).then(a, d);
|
|
28
|
+
y((e = e.apply(n, t)).next());
|
|
29
29
|
});
|
|
30
30
|
import { hotkeys as F } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
31
|
-
import { PolylineWithDotsMesh as b, PolylineMesh as
|
|
31
|
+
import { PolylineWithDotsMesh as b, PolylineMesh as x } from "../../Meshes/Polyline.js";
|
|
32
32
|
import { BaseObject as O } from "../Base/index.js";
|
|
33
33
|
import * as c from "three";
|
|
34
34
|
import { PolylineEditor as T } from "./Editor.js";
|
|
35
35
|
import { vector3ToArray as U } from "../../../shared-utils/three/vector3ToArray.js";
|
|
36
|
-
const
|
|
36
|
+
const E = new c.Vector3();
|
|
37
37
|
class G extends O {
|
|
38
|
-
constructor(e,
|
|
39
|
-
super(e,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
e && (this.polyLineMesh = new b(
|
|
38
|
+
constructor(e, i) {
|
|
39
|
+
super(e, i);
|
|
40
|
+
g(this, "type", "Polyline");
|
|
41
|
+
g(this, "polyLineMesh");
|
|
42
|
+
e && (this.polyLineMesh = new b(f(f({}, e.style), e)), this.add(this.polyLineMesh)), this.editor = new T(this), F("esc", () => {
|
|
43
43
|
this.stopCreating();
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
get data() {
|
|
47
|
-
return
|
|
47
|
+
return u(f({}, this.baseData), {
|
|
48
48
|
points: U(this.applyObjectMatrixWorld(this.polyLineMesh.points)),
|
|
49
49
|
style: {
|
|
50
50
|
lineColor: new c.Color(this.polyLineMesh.lineColor).getHex(),
|
|
@@ -62,36 +62,36 @@ class G extends O {
|
|
|
62
62
|
(e = this.polyLineMesh) == null || e.unhighlight();
|
|
63
63
|
}
|
|
64
64
|
create(e) {
|
|
65
|
-
return
|
|
65
|
+
return C(this, null, function* () {
|
|
66
66
|
this.removeChildren();
|
|
67
|
-
const
|
|
68
|
-
this.polyLineMesh =
|
|
67
|
+
const i = new b(e);
|
|
68
|
+
this.polyLineMesh = i, this.add(this.polyLineMesh), yield k(i, this.pointSelector, e), this.editor.enable();
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function k(
|
|
73
|
-
var
|
|
74
|
-
const
|
|
75
|
-
if (!
|
|
72
|
+
function k(n, t, e) {
|
|
73
|
+
var y;
|
|
74
|
+
const i = n.parent;
|
|
75
|
+
if (!i)
|
|
76
76
|
return;
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
return
|
|
77
|
+
const p = (y = e == null ? void 0 : e.limit) != null ? y : "none", a = new x(n.style);
|
|
78
|
+
i.add(a);
|
|
79
|
+
const d = new x(u(f({}, n.style), { dashed: !0, lengthEnable: !1 }));
|
|
80
|
+
return i.add(d), t.enable(), new Promise((h, m) => {
|
|
81
81
|
const o = [];
|
|
82
82
|
let l, s;
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
o.push(
|
|
83
|
+
const M = (r) => {
|
|
84
|
+
const P = o.length === 0 ? r.point : l.clone();
|
|
85
|
+
o.push(P), n.setPoints(o);
|
|
86
86
|
}, v = (r) => {
|
|
87
87
|
if (!(o != null && o.length) || !r)
|
|
88
88
|
return;
|
|
89
|
-
const
|
|
90
|
-
|
|
89
|
+
const P = o.at(-1).clone();
|
|
90
|
+
p === "none" ? (l = r.point, a.setPoints([P, l])) : p === "xoz" ? (s = s != null ? s : new c.Plane().setFromNormalAndCoplanarPoint(new c.Vector3(0, 1, 0), o[0]), t.plane = s, l = s.projectPoint(r.point, E), a.setPoints([P, l]), d.setPoints([l, r.point])) : p === "y" && (o.length === 1 ? (l = r.point, a.setPoints([P, l])) : (s = s != null ? s : new c.Plane().setFromCoplanarPoints(o[0], o[1], new c.Vector3(0, 1, 0).add(o[0])), t.plane = s, l = s.projectPoint(r.point, E), a.setPoints([P, l]), d.setPoints([l, r.point])));
|
|
91
91
|
};
|
|
92
|
-
t.on("select",
|
|
93
|
-
if (t.off("select",
|
|
94
|
-
return
|
|
92
|
+
t.on("select", M), t.on("intersectionUpdate", v), t.on("disable", () => {
|
|
93
|
+
if (t.off("select", M), t.off("intersectionUpdate", v), t.plane = null, i.remove(a), i.remove(d), o.length < 2)
|
|
94
|
+
return i.remove(n), m(new Error("Cancelled"));
|
|
95
95
|
h();
|
|
96
96
|
});
|
|
97
97
|
});
|
package/libs/Sculpt/index.js
CHANGED
|
@@ -33,7 +33,7 @@ import { IObject3D as U } from "../shared-utils/three/IObject3D.js";
|
|
|
33
33
|
import "three";
|
|
34
34
|
import "hammerjs";
|
|
35
35
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
36
|
-
import "
|
|
36
|
+
import "./Meshes/Line.js";
|
|
37
37
|
import "../shared-utils/three/THREESphere.js";
|
|
38
38
|
import "animejs";
|
|
39
39
|
import { notNil as H } from "../shared-utils/isNil.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getLengthHTML(text: string): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function i(t) {
|
|
2
|
+
if (!document.getElementById("LineLengthTagStyle")) {
|
|
3
|
+
const e = document.createElement("style");
|
|
4
|
+
e.id = "LineLengthTagStyle", document.head.appendChild(e), e.innerHTML = `
|
|
5
|
+
.LineLengthTag {
|
|
6
|
+
position: absolute;
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
font-size: 20px;
|
|
9
|
+
letter-spacing: 1px;
|
|
10
|
+
color: white;
|
|
11
|
+
left: 50%;
|
|
12
|
+
transform: translate(-50%, -100%);
|
|
13
|
+
}
|
|
14
|
+
.LineLengthTag div:first-child {
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
-webkit-text-stroke: 2px black;
|
|
19
|
+
}
|
|
20
|
+
.LineLengthTag div:last-child {
|
|
21
|
+
position: relative;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
}
|
|
25
|
+
return `
|
|
26
|
+
<div class="LineLengthTag">
|
|
27
|
+
<div>${t}</div>
|
|
28
|
+
<div>${t}</div>
|
|
29
|
+
</div>
|
|
30
|
+
`;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
i as getLengthHTML
|
|
34
|
+
};
|
|
@@ -10,12 +10,12 @@ export default class ColoredMesh<TGeometry extends THREE.Geometry | THREE.Buffer
|
|
|
10
10
|
color: THREE.Color;
|
|
11
11
|
opacity: number;
|
|
12
12
|
occlusionVisibility: boolean;
|
|
13
|
-
occlusionMode:
|
|
13
|
+
occlusionMode: "translucence" | "depthTest";
|
|
14
14
|
};
|
|
15
15
|
get color(): THREE.Color;
|
|
16
16
|
get opacity(): number;
|
|
17
17
|
get occlusionVisibility(): boolean;
|
|
18
|
-
get occlusionMode():
|
|
18
|
+
get occlusionMode(): 'depthTest' | 'translucence';
|
|
19
19
|
set geometry(geometry: TGeometry);
|
|
20
20
|
get geometry(): TGeometry;
|
|
21
21
|
private paramsStyle;
|
|
@@ -15,13 +15,12 @@ import { DEFAULT_COLOR as F } from "../../typings/style.js";
|
|
|
15
15
|
import { IObject3D as B } from "../../../shared-utils/three/IObject3D.js";
|
|
16
16
|
import "hammerjs";
|
|
17
17
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
18
|
-
import "
|
|
19
|
-
import "../Modules/Global.js";
|
|
18
|
+
import "../../Meshes/Line.js";
|
|
20
19
|
import "../../../shared-utils/three/THREESphere.js";
|
|
21
20
|
import "animejs";
|
|
22
21
|
import { notNil as y } from "../../../shared-utils/isNil.js";
|
|
23
22
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
24
|
-
class
|
|
23
|
+
class R extends B {
|
|
25
24
|
constructor(t) {
|
|
26
25
|
var h, m;
|
|
27
26
|
super();
|
|
@@ -83,5 +82,5 @@ class _ extends B {
|
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
export {
|
|
86
|
-
|
|
85
|
+
R as ColoredMesh
|
|
87
86
|
};
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
var o = Object.defineProperty;
|
|
2
|
-
var s = (
|
|
3
|
-
var
|
|
2
|
+
var s = (i, t, r) => t in i ? o(i, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[t] = r;
|
|
3
|
+
var e = (i, t, r) => (s(i, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
4
|
import { Subscribe as l } from "../shared-utils/Subscribe.js";
|
|
5
5
|
import "three";
|
|
6
6
|
import "hammerjs";
|
|
7
7
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
8
|
-
import "
|
|
9
|
-
import "../Sculpt/utils/Modules/Global.js";
|
|
8
|
+
import "../Sculpt/Meshes/Line.js";
|
|
10
9
|
import "../shared-utils/three/THREESphere.js";
|
|
11
10
|
import "animejs";
|
|
12
11
|
import { FiveUtil as a } from "../shared-utils/Utils/FiveUtil.js";
|
|
13
|
-
import { absoluteUrl as
|
|
12
|
+
import { absoluteUrl as h } from "../shared-utils/url/absoluteUrl.js";
|
|
14
13
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
15
|
-
let
|
|
14
|
+
let c = class {
|
|
16
15
|
constructor(t, r) {
|
|
17
16
|
/**
|
|
18
17
|
* @realsee/dnalogel 版本号
|
|
19
18
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
e(this, "VERSION", "3.47.5");
|
|
20
|
+
e(this, "NAME");
|
|
21
|
+
e(this, "five");
|
|
22
|
+
e(this, "workUtil");
|
|
23
|
+
e(this, "fiveUtil");
|
|
25
24
|
/**
|
|
26
25
|
* @description: 插件事件钩子
|
|
27
26
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
e(this, "hooks", new l());
|
|
28
|
+
e(this, "staticPrefix", "//vr-image-4.realsee-cdn.cn");
|
|
30
29
|
this.updateFive(t), r != null && r.staticPrefix && (this.staticPrefix = r.staticPrefix);
|
|
31
30
|
}
|
|
32
31
|
set workCode(t) {
|
|
@@ -48,11 +47,11 @@ let x = class {
|
|
|
48
47
|
* @description: 获取静态资源的url
|
|
49
48
|
*/
|
|
50
49
|
absoluteUrl(t) {
|
|
51
|
-
return
|
|
50
|
+
return h(this.staticPrefix, t);
|
|
52
51
|
}
|
|
53
52
|
onWorkCodeChange() {
|
|
54
53
|
}
|
|
55
54
|
};
|
|
56
55
|
export {
|
|
57
|
-
|
|
56
|
+
c as Controller
|
|
58
57
|
};
|