@realsee/dnalogel 3.50.1 → 3.50.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/Sculpt/Meshes/Line.d.ts +1 -0
- package/dist/Sculpt/Meshes/Point.d.ts +1 -0
- package/dist/index.cjs.js +205 -205
- package/dist/index.js +4317 -4309
- package/dist/index.umd.js +195 -195
- package/libs/Sculpt/Meshes/Line.d.ts +1 -0
- package/libs/Sculpt/Meshes/Line.js +64 -58
- package/libs/Sculpt/Meshes/Point.d.ts +1 -0
- package/libs/Sculpt/Meshes/Point.js +33 -27
- package/libs/Sculpt/Objects/Line/index.js +38 -39
- package/libs/Sculpt/Objects/Point/index.js +18 -18
- package/libs/Sculpt/Objects/Polygon/index.js +21 -22
- package/libs/Sculpt/Objects/Polyline/index.js +27 -28
- package/libs/Sculpt/Objects/Rectangle/index.js +48 -49
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +24 -24
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var O = (s, t, e) => t in s ?
|
|
1
|
+
var I = Object.defineProperty, L = Object.defineProperties;
|
|
2
|
+
var N = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var V = Object.getOwnPropertySymbols;
|
|
4
|
+
var z = Object.prototype.hasOwnProperty, q = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var O = (s, t, e) => t in s ? I(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
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
7
|
+
z.call(t, e) && O(s, e, t[e]);
|
|
8
|
+
if (V)
|
|
9
|
+
for (var e of V(t))
|
|
10
10
|
q.call(t, e) && O(s, e, t[e]);
|
|
11
11
|
return s;
|
|
12
|
-
}, j = (s, t) =>
|
|
12
|
+
}, j = (s, t) => L(s, N(t));
|
|
13
13
|
var v = (s, t, e) => (O(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
-
var
|
|
14
|
+
var A = (s, t, e) => new Promise((c, d) => {
|
|
15
15
|
var u = (n) => {
|
|
16
16
|
try {
|
|
17
17
|
f(e.next(n));
|
|
@@ -28,14 +28,13 @@ var V = (s, t, e) => new Promise((c, d) => {
|
|
|
28
28
|
f((e = e.apply(s, t)).next());
|
|
29
29
|
});
|
|
30
30
|
import { BaseObject as G } from "../Base/index.js";
|
|
31
|
-
import * as
|
|
31
|
+
import * as P from "three";
|
|
32
32
|
import { PolylineMesh as k } from "../../Meshes/Polyline.js";
|
|
33
33
|
import { AreaMesh as B } from "../../Meshes/Area.js";
|
|
34
34
|
import { PolygonEditor as J } from "./Editor.js";
|
|
35
35
|
import { vector3ToArray as K } from "../../../shared-utils/three/vector3ToArray.js";
|
|
36
36
|
import { withResolvers as Q } from "../../../shared-utils/promise/withResolvers.js";
|
|
37
|
-
|
|
38
|
-
class oe extends G {
|
|
37
|
+
class se extends G {
|
|
39
38
|
constructor(e, c) {
|
|
40
39
|
super(e, c);
|
|
41
40
|
v(this, "type", "Polygon");
|
|
@@ -78,7 +77,7 @@ class oe extends G {
|
|
|
78
77
|
(e = this.creatingObject) == null || e.redo();
|
|
79
78
|
}
|
|
80
79
|
create(e) {
|
|
81
|
-
return
|
|
80
|
+
return A(this, null, function* () {
|
|
82
81
|
this.children.forEach((d) => {
|
|
83
82
|
d.parent === this && this.remove(d);
|
|
84
83
|
}), this.children.length = 0;
|
|
@@ -100,9 +99,9 @@ function X(s, t, e) {
|
|
|
100
99
|
r == null || r.add(l), t.enable();
|
|
101
100
|
const o = [];
|
|
102
101
|
let i, h, C = !1, E;
|
|
103
|
-
const m = [], x = () => o.length > 0, R = () => m.length > 0,
|
|
102
|
+
const m = [], x = () => o.length > 0, R = () => m.length > 0, D = () => {
|
|
104
103
|
x() && (m.push(o.pop()), y(E), t.pointSelectorHelper.magnifier.render());
|
|
105
|
-
},
|
|
104
|
+
}, F = () => {
|
|
106
105
|
R() && (o.push(m.pop()), y(E), t.pointSelectorHelper.magnifier.render());
|
|
107
106
|
}, U = (a) => {
|
|
108
107
|
m.length = 0;
|
|
@@ -114,11 +113,11 @@ function X(s, t, e) {
|
|
|
114
113
|
};
|
|
115
114
|
if (!a || (E = a, !(o != null && o.length)))
|
|
116
115
|
return w();
|
|
117
|
-
const
|
|
118
|
-
if (o.length < 3 && (f === "none" ? (i = a.point, n.setPoints([
|
|
116
|
+
const g = o.at(-1).clone();
|
|
117
|
+
if (o.length < 3 && (f === "none" ? (i = a.point, n.setPoints([g, i]), l.setPoints([])) : f === "xoz" ? (h = h != null ? h : new P.Plane().setFromNormalAndCoplanarPoint(new P.Vector3(0, 1, 0), o[0]), t.plane = h, i = h.projectPoint(a.point, new P.Vector3()), n.setPoints([g, i]), l.setPoints([i, a.point])) : f === "y" && (o.length === 1 ? (i = a.point, n.setPoints([g, i]), l.setPoints([])) : (h = h != null ? h : new P.Plane().setFromCoplanarPoints(o[0], o[1], new P.Vector3(0, 1, 0).add(o[0])), t.plane = h, i = h.projectPoint(a.point, new P.Vector3()), n.setPoints([g, i]), l.setPoints([i, a.point])))), o.length >= 3) {
|
|
119
118
|
i = s.projectPoint(a.point);
|
|
120
119
|
const b = o[0], T = 0.2;
|
|
121
|
-
b.distanceTo(i) < T || b.distanceTo(a.point) < T ? (i = b, a.point.copy(b), t.pointSelectorHelper.updateWithIntersect(a, { emitEvent: !1 }), C = !0) : C = !1, n.setPoints([
|
|
120
|
+
b.distanceTo(i) < T || b.distanceTo(a.point) < T ? (i = b, a.point.copy(b), t.pointSelectorHelper.updateWithIntersect(a, { emitEvent: !1 }), C = !0) : C = !1, n.setPoints([g, i]), l.setPoints([i, a.point]);
|
|
122
121
|
}
|
|
123
122
|
o.length >= 2 ? (s.setPoints([...o, i], { closed: !1 }), s.line.setPoints(s.points.slice(0, -1)), s.isBlank ? (t.cursorError = !0, n.setStyle({ lineColor: 16734553 }), l.setStyle({ lineColor: 16734553 })) : (t.cursorError = !1, n.setStyle({ lineColor: s.lineColor }), l.setStyle({ lineColor: s.lineColor }))) : s.setPoints([]);
|
|
124
123
|
}, W = () => {
|
|
@@ -130,11 +129,11 @@ function X(s, t, e) {
|
|
|
130
129
|
finished: c,
|
|
131
130
|
canUndo: x,
|
|
132
131
|
canRedo: R,
|
|
133
|
-
undo:
|
|
134
|
-
redo:
|
|
132
|
+
undo: D,
|
|
133
|
+
redo: F
|
|
135
134
|
};
|
|
136
135
|
}
|
|
137
136
|
export {
|
|
138
|
-
|
|
137
|
+
se as Polygon,
|
|
139
138
|
X as createPolygon
|
|
140
139
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var D = Object.defineProperty, F = Object.defineProperties;
|
|
2
|
+
var T = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var E = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var k = Object.prototype.hasOwnProperty, z = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var v = (n, t, e) => t in n ? D(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, p = (n, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
k.call(t, e) && v(n, e, t[e]);
|
|
8
8
|
if (E)
|
|
9
9
|
for (var e of E(t))
|
|
10
|
-
|
|
10
|
+
z.call(t, e) && v(n, e, t[e]);
|
|
11
11
|
return n;
|
|
12
|
-
}, M = (n, t) =>
|
|
13
|
-
var y = (n, t, e) => (
|
|
12
|
+
}, M = (n, t) => F(n, T(t));
|
|
13
|
+
var y = (n, t, e) => (v(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
14
|
var R = (n, t, e) => new Promise((s, P) => {
|
|
15
15
|
var w = (o) => {
|
|
16
16
|
try {
|
|
@@ -27,24 +27,23 @@ var R = (n, t, e) => new Promise((s, P) => {
|
|
|
27
27
|
}, c = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(w, b);
|
|
28
28
|
c((e = e.apply(n, t)).next());
|
|
29
29
|
});
|
|
30
|
-
import { PolylineMesh as U, PolylineWithDotsMesh as
|
|
31
|
-
import { BaseObject as
|
|
30
|
+
import { PolylineMesh as U, PolylineWithDotsMesh as V } from "../../Meshes/Polyline.js";
|
|
31
|
+
import { BaseObject as B } from "../Base/index.js";
|
|
32
32
|
import * as d from "three";
|
|
33
|
-
import { PolylineEditor as
|
|
34
|
-
import { vector3ToArray as
|
|
35
|
-
import { withResolvers as
|
|
36
|
-
|
|
37
|
-
class Z extends H {
|
|
33
|
+
import { PolylineEditor as H } from "./Editor.js";
|
|
34
|
+
import { vector3ToArray as I } from "../../../shared-utils/three/vector3ToArray.js";
|
|
35
|
+
import { withResolvers as N } from "../../../shared-utils/promise/withResolvers.js";
|
|
36
|
+
class Z extends B {
|
|
38
37
|
constructor(e, s) {
|
|
39
38
|
super(e, s);
|
|
40
39
|
y(this, "type", "Polyline");
|
|
41
40
|
y(this, "polyLineMesh");
|
|
42
41
|
y(this, "creatingObject");
|
|
43
|
-
e && (this.polyLineMesh = new
|
|
42
|
+
e && (this.polyLineMesh = new V(p(p({}, e.style), e)), this.add(this.polyLineMesh)), this.editor = new H(this);
|
|
44
43
|
}
|
|
45
44
|
get data() {
|
|
46
45
|
return M(p({}, this.baseData), {
|
|
47
|
-
points:
|
|
46
|
+
points: I(this.applyObjectMatrixWorld(this.polyLineMesh.points)),
|
|
48
47
|
style: {
|
|
49
48
|
lineColor: new d.Color(this.polyLineMesh.lineColor).getHex(),
|
|
50
49
|
lineWidth: this.polyLineMesh.lineWidth,
|
|
@@ -79,7 +78,7 @@ class Z extends H {
|
|
|
79
78
|
create(e) {
|
|
80
79
|
return R(this, null, function* () {
|
|
81
80
|
this.removeChildren();
|
|
82
|
-
const s = new
|
|
81
|
+
const s = new V(e);
|
|
83
82
|
this.polyLineMesh = s, this.add(this.polyLineMesh), this.creatingObject = q(s, this.pointSelector, e), yield this.creatingObject.finished, this.editor.enable();
|
|
84
83
|
});
|
|
85
84
|
}
|
|
@@ -89,16 +88,16 @@ function q(n, t, e) {
|
|
|
89
88
|
const s = n.parent;
|
|
90
89
|
if (!s)
|
|
91
90
|
return;
|
|
92
|
-
const { promise: P, resolve: w, reject: b } =
|
|
91
|
+
const { promise: P, resolve: w, reject: b } = N(), c = (x = e == null ? void 0 : e.limit) != null ? x : "none", o = new U(n.style);
|
|
93
92
|
s.add(o);
|
|
94
93
|
const a = new U(M(p({}, n.style), { dashed: !0, lengthEnable: !1 }));
|
|
95
94
|
s.add(a), t.enable();
|
|
96
95
|
const i = [];
|
|
97
|
-
let r, l,
|
|
98
|
-
const f = [], O = () => i.length > 0, L = () => f.length > 0,
|
|
99
|
-
O() && (f.push(i.pop()), n.setPoints(i), g(
|
|
100
|
-
},
|
|
101
|
-
L() && (i.push(f.pop()), n.setPoints(i), g(
|
|
96
|
+
let r, l, j;
|
|
97
|
+
const f = [], O = () => i.length > 0, L = () => f.length > 0, W = () => {
|
|
98
|
+
O() && (f.push(i.pop()), n.setPoints(i), g(j), t.pointSelectorHelper.magnifier.render());
|
|
99
|
+
}, A = () => {
|
|
100
|
+
L() && (i.push(f.pop()), n.setPoints(i), g(j), t.pointSelectorHelper.magnifier.render());
|
|
102
101
|
}, C = (h) => {
|
|
103
102
|
f.length = 0;
|
|
104
103
|
const m = i.length === 0 ? h.point : r.clone();
|
|
@@ -107,10 +106,10 @@ function q(n, t, e) {
|
|
|
107
106
|
const m = () => {
|
|
108
107
|
o.setPoints([]), a.setPoints([]), r = null;
|
|
109
108
|
};
|
|
110
|
-
if (!h || (
|
|
109
|
+
if (!h || (j = h, !(i != null && i.length)))
|
|
111
110
|
return m();
|
|
112
111
|
const u = i.at(-1).clone();
|
|
113
|
-
c === "none" ? (r = h.point, o.setPoints([u, r])) : c === "xoz" ? (l = l != null ? l : new d.Plane().setFromNormalAndCoplanarPoint(new d.Vector3(0, 1, 0), i[0]), t.plane = l, r = l.projectPoint(h.point,
|
|
112
|
+
c === "none" ? (r = h.point, o.setPoints([u, r])) : c === "xoz" ? (l = l != null ? l : new d.Plane().setFromNormalAndCoplanarPoint(new d.Vector3(0, 1, 0), i[0]), t.plane = l, r = l.projectPoint(h.point, new d.Vector3()), o.setPoints([u, r]), a.setPoints([r, h.point])) : c === "y" && (i.length === 1 ? (r = h.point, o.setPoints([u, r])) : (l = l != null ? l : new d.Plane().setFromCoplanarPoints(i[0], i[1], new d.Vector3(0, 1, 0).add(i[0])), t.plane = l, r = l.projectPoint(h.point, new d.Vector3()), o.setPoints([u, r]), a.setPoints([r, h.point])));
|
|
114
113
|
};
|
|
115
114
|
return t.on("select", C), t.on("intersectionUpdate", g), t.on("disable", () => {
|
|
116
115
|
if (t.off("select", C), t.off("intersectionUpdate", g), t.plane = null, s.remove(o), s.remove(a), i.length < 2)
|
|
@@ -120,8 +119,8 @@ function q(n, t, e) {
|
|
|
120
119
|
finished: P,
|
|
121
120
|
canUndo: O,
|
|
122
121
|
canRedo: L,
|
|
123
|
-
undo:
|
|
124
|
-
redo:
|
|
122
|
+
undo: W,
|
|
123
|
+
redo: A
|
|
125
124
|
};
|
|
126
125
|
}
|
|
127
126
|
export {
|
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var F = Object.defineProperty, U = Object.defineProperties;
|
|
2
|
+
var B = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var z = Object.getOwnPropertySymbols;
|
|
4
|
+
var I = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var b = (s, t, e) => t in s ? F(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, d = (s, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
j.call(t, e) &&
|
|
7
|
+
I.call(t, e) && b(s, e, t[e]);
|
|
8
|
+
if (z)
|
|
9
|
+
for (var e of z(t))
|
|
10
|
+
j.call(t, e) && b(s, e, t[e]);
|
|
11
11
|
return s;
|
|
12
|
-
}, u = (s, t) =>
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
}, u = (s, t) => U(s, B(t));
|
|
13
|
+
var E = (s, t, e) => (b(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var A = (s, t, e) => new Promise((c, p) => {
|
|
15
15
|
var a = (l) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
g(e.next(l));
|
|
18
18
|
} catch (h) {
|
|
19
19
|
p(h);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, w = (l) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
g(e.throw(l));
|
|
24
24
|
} catch (h) {
|
|
25
25
|
p(h);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, g = (l) => l.done ? c(l.value) : Promise.resolve(l.value).then(a, w);
|
|
28
|
+
g((e = e.apply(s, t)).next());
|
|
29
29
|
});
|
|
30
30
|
import { BaseObject as k } from "../Base/index.js";
|
|
31
31
|
import * as o from "three";
|
|
32
|
-
import { PolylineWithDotsMesh as
|
|
32
|
+
import { PolylineWithDotsMesh as L } from "../../Meshes/Polyline.js";
|
|
33
33
|
import { RectangleEditor as q } from "./Editor.js";
|
|
34
|
-
import { RectangleWithEdgeMesh as
|
|
35
|
-
const P = new o.Vector3();
|
|
34
|
+
import { RectangleWithEdgeMesh as D } from "../../Meshes/RectangleWithEdge.js";
|
|
36
35
|
class Z extends k {
|
|
37
36
|
constructor(e, c) {
|
|
38
37
|
super(e, c);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.config.canEdit && (this.editor = new q(this)), e && (this.rectangleMesh = new
|
|
38
|
+
E(this, "type", "Rectangle");
|
|
39
|
+
E(this, "rectangleMesh");
|
|
40
|
+
this.config.canEdit && (this.editor = new q(this)), e && (this.rectangleMesh = new D(d(d({}, e.style), e)), this.add(this.rectangleMesh));
|
|
42
41
|
}
|
|
43
42
|
get data() {
|
|
44
43
|
return u(d({}, this.baseData), {
|
|
@@ -59,61 +58,61 @@ class Z extends k {
|
|
|
59
58
|
(e = this.rectangleMesh) == null || e.unhighlight();
|
|
60
59
|
}
|
|
61
60
|
create(e) {
|
|
62
|
-
return
|
|
61
|
+
return A(this, null, function* () {
|
|
63
62
|
this.removeChildren();
|
|
64
|
-
const c = new
|
|
63
|
+
const c = new D(e);
|
|
65
64
|
this.rectangleMesh = c, this.add(this.rectangleMesh), yield G(this.rectangleMesh, this.pointSelector, e);
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
function G(s, t, e) {
|
|
70
69
|
return new Promise((c, p) => {
|
|
71
|
-
var
|
|
70
|
+
var R, N;
|
|
72
71
|
const a = s.parent;
|
|
73
72
|
if (!a)
|
|
74
73
|
return p(new Error("No container"));
|
|
75
|
-
const
|
|
76
|
-
a.add(l,
|
|
74
|
+
const w = (R = e == null ? void 0 : e.limit) != null ? R : "none", g = (N = e == null ? void 0 : e.drawMethod) != null ? N : "diagonal", l = new L(u(d({}, s.style), { dashed: !0, lengthEnable: !0 })), h = new L(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), P = new L(u(d({}, s.style), { dashed: !1, lengthEnable: !1 }));
|
|
75
|
+
a.add(l, P, h), t.enable();
|
|
77
76
|
const n = [];
|
|
78
|
-
let i = new o.Vector3(),
|
|
79
|
-
const
|
|
80
|
-
n.push(i.clone()), n.length === 1 ? (
|
|
81
|
-
},
|
|
82
|
-
var
|
|
77
|
+
let i = new o.Vector3(), M = new o.Vector3();
|
|
78
|
+
const m = new o.Plane(), v = () => {
|
|
79
|
+
n.push(i.clone()), n.length === 1 ? (w === "xoz" && m.setFromNormalAndCoplanarPoint(new o.Vector3(0, 1, 0), n[0]), w === "none" && m.setFromNormalAndCoplanarPoint(M, n[0])) : n.length === 2 ? w === "y" ? (y(), c()) : P.setPoints([n[0], n[1]]) : n.length === 3 && (y(), c());
|
|
80
|
+
}, x = (r) => {
|
|
81
|
+
var T;
|
|
83
82
|
if (!(r != null && r.raycaster))
|
|
84
83
|
return;
|
|
85
|
-
const
|
|
84
|
+
const H = (T = n.at(-1)) == null ? void 0 : T.clone();
|
|
86
85
|
if (n.length === 0) {
|
|
87
|
-
i = r.point.clone(),
|
|
86
|
+
i = r.point.clone(), M = r.face.normal;
|
|
88
87
|
return;
|
|
89
88
|
}
|
|
90
|
-
if (n.length === 1 &&
|
|
89
|
+
if (n.length === 1 && w === "y") {
|
|
91
90
|
const f = new o.Line3(new o.Vector3(0, 1, 0).add(n[0]), new o.Vector3(0, -1, 0).add(n[0])).closestPointToPoint(r.point, !1, new o.Vector3());
|
|
92
91
|
s.setPoints([n[0], f, r.point]);
|
|
93
92
|
return;
|
|
94
93
|
}
|
|
95
94
|
if (n.length === 1) {
|
|
96
|
-
|
|
95
|
+
m ? (i = r.raycaster.ray.intersectPlane(m, new o.Vector3()), h.setPoints([i, r.point])) : i = r.point.clone(), l.setPoints([H, i]);
|
|
97
96
|
return;
|
|
98
97
|
}
|
|
99
98
|
if (n.length === 2) {
|
|
100
99
|
a.remove(l);
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
103
|
-
const f = n[0].distanceTo(n[1]) / 2,
|
|
104
|
-
i = new o.Vector3().addVectors(
|
|
105
|
-
} else if (
|
|
106
|
-
const f =
|
|
107
|
-
i = new o.Line3(n[1].clone().add(f), n[1].clone().sub(f)).closestPointToPoint(r.point, !1,
|
|
100
|
+
const W = r.raycaster.ray.intersectPlane(m, new o.Vector3());
|
|
101
|
+
if (g === "diagonal") {
|
|
102
|
+
const f = n[0].distanceTo(n[1]) / 2, V = new o.Vector3().lerpVectors(n[0], n[1], 0.5), O = new o.Vector3().subVectors(W, V).normalize();
|
|
103
|
+
i = new o.Vector3().addVectors(V, O.multiplyScalar(f)), s.setPoints([n[0], i, n[1]]);
|
|
104
|
+
} else if (g === "vertex") {
|
|
105
|
+
const f = new o.Vector3().crossVectors(n[0].clone().sub(n[1]), m.normal).normalize();
|
|
106
|
+
i = new o.Line3(n[1].clone().add(f), n[1].clone().sub(f)).closestPointToPoint(r.point, !1, new o.Vector3()), s.setPoints([n[0], n[1], i]);
|
|
108
107
|
}
|
|
109
108
|
return;
|
|
110
109
|
}
|
|
111
|
-
},
|
|
112
|
-
t.off("select",
|
|
113
|
-
},
|
|
114
|
-
|
|
110
|
+
}, y = () => {
|
|
111
|
+
t.off("select", v), t.off("intersectionUpdate", x), t.off("disable", C), t.disable(), a == null || a.remove(l, P, h);
|
|
112
|
+
}, C = () => {
|
|
113
|
+
y(), a == null || a.remove(s), p(new Error("Cancelled"));
|
|
115
114
|
};
|
|
116
|
-
t.on("select",
|
|
115
|
+
t.on("select", v), t.on("intersectionUpdate", x), t.on("disable", C);
|
|
117
116
|
});
|
|
118
117
|
}
|
|
119
118
|
export {
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var n = (
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var h = (e, s, t) => s in e ? c(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
3
|
+
var n = (e, s, t) => (h(e, typeof s != "symbol" ? s + "" : s, t), t);
|
|
4
4
|
import * as l from "three";
|
|
5
5
|
import { Vector3 as a } from "three";
|
|
6
6
|
import { setObjectQuaternion as d } from "../utils/setObjectQuaternion.js";
|
|
7
7
|
import { IObject3D as b } from "../../three/IObject3D.js";
|
|
8
8
|
import { boundingBox as m, boundingSphere as u } from "../../three/boundingBox.js";
|
|
9
9
|
class r extends b {
|
|
10
|
-
constructor(t,
|
|
10
|
+
constructor(t, i) {
|
|
11
11
|
var o, p;
|
|
12
12
|
super();
|
|
13
13
|
n(this, "originObject3D");
|
|
14
14
|
n(this, "onRender");
|
|
15
15
|
n(this, "positionFrom");
|
|
16
|
-
this.originObject3D = t, this.onRender = (o =
|
|
17
|
-
}, this.positionFrom = (p =
|
|
16
|
+
this.originObject3D = t, this.onRender = (o = i == null ? void 0 : i.onRender) != null ? o : () => {
|
|
17
|
+
}, this.positionFrom = (p = i == null ? void 0 : i.positionFrom) != null ? p : "objectPosition";
|
|
18
18
|
}
|
|
19
19
|
get helperObject() {
|
|
20
20
|
return this;
|
|
@@ -34,27 +34,27 @@ class r extends b {
|
|
|
34
34
|
hide() {
|
|
35
35
|
this.visible = !1, this.render();
|
|
36
36
|
}
|
|
37
|
-
raycasterIntersectObject(t,
|
|
38
|
-
return t.intersectObject(this, !0,
|
|
37
|
+
raycasterIntersectObject(t, i = []) {
|
|
38
|
+
return t.intersectObject(this, !0, i);
|
|
39
39
|
}
|
|
40
40
|
initialPosition(t) {
|
|
41
|
-
var
|
|
42
|
-
this.positionFrom === "objectPosition" ? this.position.copy(this.originObject3D.position) : this.positionFrom === "boundingBox" ? this.position.copy((
|
|
41
|
+
var i, o;
|
|
42
|
+
this.positionFrom === "objectPosition" ? this.position.copy(this.originObject3D.position) : this.positionFrom === "boundingBox" ? this.position.copy((i = m(this.originObject3D)) == null ? void 0 : i.getCenter(new l.Vector3()).applyMatrix4(this.originObject3D.matrixWorld)) : this.positionFrom === "boundingSphere" ? this.position.copy((o = u(this.originObject3D)) == null ? void 0 : o.center.clone().applyMatrix4(this.originObject3D.matrixWorld)) : this.positionFrom instanceof a ? this.position.copy(this.positionFrom) : this.positionFrom instanceof Function && this.position.copy(this.positionFrom(this.originObject3D)), t && this.position.add(t);
|
|
43
43
|
}
|
|
44
44
|
setScaleByCamera(t) {
|
|
45
45
|
}
|
|
46
46
|
initQuaternion() {
|
|
47
47
|
this.quaternion.copy(this.originObject3D.quaternion);
|
|
48
48
|
}
|
|
49
|
-
applyHelperScaleMatrix4(t,
|
|
49
|
+
applyHelperScaleMatrix4(t, i) {
|
|
50
50
|
this.scale.applyMatrix4(t);
|
|
51
51
|
}
|
|
52
|
-
setHelperQuaternion(t,
|
|
53
|
-
d(this, t,
|
|
52
|
+
setHelperQuaternion(t, i) {
|
|
53
|
+
d(this, t, i);
|
|
54
54
|
}
|
|
55
|
-
applyHelperQuaternion(t,
|
|
56
|
-
if (
|
|
57
|
-
const o = new a().subVectors(this.position,
|
|
55
|
+
applyHelperQuaternion(t, i) {
|
|
56
|
+
if (i) {
|
|
57
|
+
const o = new a().subVectors(this.position, i).applyQuaternion(t).add(i);
|
|
58
58
|
this.position.copy(o);
|
|
59
59
|
}
|
|
60
60
|
this.applyQuaternion(t);
|
|
@@ -63,20 +63,20 @@ class r extends b {
|
|
|
63
63
|
this.removeFromParent();
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
class D extends r {
|
|
67
|
+
}
|
|
66
68
|
class H extends r {
|
|
67
69
|
}
|
|
68
|
-
class
|
|
70
|
+
class g extends r {
|
|
69
71
|
}
|
|
70
72
|
class R extends r {
|
|
71
73
|
}
|
|
72
74
|
class v extends r {
|
|
73
75
|
}
|
|
74
|
-
class B extends r {
|
|
75
|
-
}
|
|
76
76
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
H as BoundingBoxHelperAbstract,
|
|
78
|
+
D as MoveHelperAbstract,
|
|
79
|
+
v as RectangleScaleHelperAbstract,
|
|
80
|
+
g as RotateHelperAbstract,
|
|
81
|
+
R as ScaleHelperAbstract
|
|
82
82
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.50.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.50.3",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|