@realsee/dnalogel 3.52.0 → 3.52.1
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/Rectangle.d.ts +0 -4
- package/dist/Sculpt/Objects/Base/index.d.ts +1 -2
- package/dist/Sculpt/Objects/Rectangle/index.d.ts +1 -2
- package/dist/Sculpt/index.d.ts +0 -10
- package/dist/index.cjs.js +19 -19
- package/dist/index.js +58 -69
- package/dist/index.umd.js +21 -21
- package/libs/Sculpt/Meshes/Rectangle.d.ts +0 -4
- package/libs/Sculpt/Meshes/Rectangle.js +8 -15
- package/libs/Sculpt/Objects/Base/index.d.ts +1 -2
- package/libs/Sculpt/Objects/Base/index.js +30 -34
- package/libs/Sculpt/Objects/Box/index.js +14 -14
- package/libs/Sculpt/Objects/Circle/index.js +49 -49
- package/libs/Sculpt/Objects/Cylinder/index.js +41 -41
- package/libs/Sculpt/Objects/Prism/index.js +23 -23
- package/libs/Sculpt/Objects/Rectangle/index.d.ts +1 -2
- package/libs/Sculpt/Objects/Rectangle/index.js +61 -60
- package/libs/Sculpt/index.d.ts +0 -10
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,53 +1,54 @@
|
|
|
1
1
|
var _ = Object.defineProperty, H = Object.defineProperties;
|
|
2
2
|
var I = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var T = Object.getOwnPropertySymbols;
|
|
4
|
+
var j = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var O = (o, n, t) => n in o ? _(o, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[n] = t, P = (o, n) => {
|
|
6
6
|
for (var t in n || (n = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
7
|
+
j.call(n, t) && O(o, t, n[t]);
|
|
8
|
+
if (T)
|
|
9
|
+
for (var t of T(n))
|
|
10
|
+
k.call(n, t) && O(o, t, n[t]);
|
|
11
11
|
return o;
|
|
12
|
-
},
|
|
13
|
-
var R = (o, n, t) => (
|
|
14
|
-
var
|
|
12
|
+
}, p = (o, n) => H(o, I(n));
|
|
13
|
+
var R = (o, n, t) => (O(o, typeof n != "symbol" ? n + "" : n, t), t);
|
|
14
|
+
var A = (o, n, t) => new Promise((f, m) => {
|
|
15
15
|
var a = (c) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
h(t.next(c));
|
|
18
18
|
} catch (w) {
|
|
19
19
|
m(w);
|
|
20
20
|
}
|
|
21
21
|
}, i = (c) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
h(t.throw(c));
|
|
24
24
|
} catch (w) {
|
|
25
25
|
m(w);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, h = (c) => c.done ? f(c.value) : Promise.resolve(c.value).then(a, i);
|
|
28
|
+
h((t = t.apply(o, n)).next());
|
|
29
29
|
});
|
|
30
|
-
import { BaseObject as
|
|
30
|
+
import { BaseObject as q } from "../Base/index.js";
|
|
31
31
|
import * as s from "three";
|
|
32
32
|
import { PolylineWithDotsMesh as b } from "../../Meshes/Polyline.js";
|
|
33
|
-
import { RectangleMeshEditor as
|
|
34
|
-
import { RectangleWithEdgeMesh as
|
|
35
|
-
import { sortPositionsByCameraPosition as
|
|
36
|
-
import { Sculpt as
|
|
37
|
-
|
|
33
|
+
import { RectangleMeshEditor as G } from "../../Editors/RectangleMeshEditor.js";
|
|
34
|
+
import { RectangleWithEdgeMesh as F } from "../../Meshes/RectangleWithEdge.js";
|
|
35
|
+
import { sortPositionsByCameraPosition as W } from "../../utils/sortPositionsByCameraPosition.js";
|
|
36
|
+
import { Sculpt as B } from "../../index.js";
|
|
37
|
+
import { vector3ToArray as J } from "../../../shared-utils/three/vector3ToArray.js";
|
|
38
|
+
class se extends q {
|
|
38
39
|
constructor(t, f) {
|
|
39
40
|
super(t, f);
|
|
40
41
|
R(this, "type", "Rectangle");
|
|
41
42
|
R(this, "rectangleMesh");
|
|
42
43
|
R(this, "_editor");
|
|
43
|
-
t && (this.rectangleMesh = new
|
|
44
|
+
t && (this.rectangleMesh = new F(P(P({}, t.style), t)), this.add(this.rectangleMesh));
|
|
44
45
|
}
|
|
45
46
|
get editor() {
|
|
46
|
-
return this._editor || (this._editor = new
|
|
47
|
+
return this._editor || (this._editor = new G(this.rectangleMesh)), this._editor;
|
|
47
48
|
}
|
|
48
49
|
get data() {
|
|
49
|
-
return
|
|
50
|
-
points: this.rectangleMesh.
|
|
50
|
+
return p(P({}, this.baseData), {
|
|
51
|
+
points: J(this.applyObjectMatrixWorld(this.rectangleMesh.points, this.rectangleMesh)),
|
|
51
52
|
style: {
|
|
52
53
|
color: this.rectangleMesh.color.getHex(),
|
|
53
54
|
opacity: this.rectangleMesh.opacity,
|
|
@@ -65,9 +66,9 @@ class ne extends G {
|
|
|
65
66
|
(t = this.rectangleMesh) == null || t.unhighlight();
|
|
66
67
|
}
|
|
67
68
|
create(t) {
|
|
68
|
-
return
|
|
69
|
+
return A(this, null, function* () {
|
|
69
70
|
this.removeChildren();
|
|
70
|
-
const f = new
|
|
71
|
+
const f = new F(t);
|
|
71
72
|
this.rectangleMesh = f, this.add(this.rectangleMesh), yield K(this.rectangleMesh, this.pointSelector, t), this.config.canEdit && this.editor.enable();
|
|
72
73
|
});
|
|
73
74
|
}
|
|
@@ -78,23 +79,23 @@ function K(o, n, t) {
|
|
|
78
79
|
}
|
|
79
80
|
function Q(o, n, t) {
|
|
80
81
|
return new Promise((f, m) => {
|
|
81
|
-
var
|
|
82
|
+
var C;
|
|
82
83
|
const a = o.parent;
|
|
83
84
|
if (!a)
|
|
84
85
|
return m(new Error("No container"));
|
|
85
|
-
const i = (
|
|
86
|
-
a.add(
|
|
86
|
+
const i = (C = t == null ? void 0 : t.limit) != null ? C : "none", h = new b(p(P({}, o.style), { dashed: !0, lengthEnable: !0 })), c = new b(p(P({}, o.style), { dashed: !0, lengthEnable: !1 })), w = new b(p(P({}, o.style), { dashed: !1, lengthEnable: !1 }));
|
|
87
|
+
a.add(h, w, c), n.enable();
|
|
87
88
|
const e = [];
|
|
88
|
-
let l = new s.Vector3(),
|
|
89
|
-
const
|
|
90
|
-
e.push(l.clone()), e.length === 1 ? (i === "xoz" &&
|
|
89
|
+
let l = new s.Vector3(), v = new s.Vector3();
|
|
90
|
+
const d = new s.Plane(), E = () => {
|
|
91
|
+
e.push(l.clone()), e.length === 1 ? (i === "xoz" && d.setFromNormalAndCoplanarPoint(new s.Vector3(0, 1, 0), e[0]), i === "none" && d.setFromNormalAndCoplanarPoint(v, e[0])) : e.length === 2 ? i === "y" || i === "xoz" ? (y(), f()) : w.setPoints([e[0], e[1]]) : e.length === 3 && (y(), f());
|
|
91
92
|
}, L = (r) => {
|
|
92
93
|
var N;
|
|
93
94
|
if (!(r != null && r.raycaster))
|
|
94
95
|
return;
|
|
95
96
|
const M = (N = e.at(-1)) == null ? void 0 : N.clone();
|
|
96
97
|
if (e.length === 0) {
|
|
97
|
-
l = r.point.clone(),
|
|
98
|
+
l = r.point.clone(), v = r.face.normal;
|
|
98
99
|
return;
|
|
99
100
|
}
|
|
100
101
|
if (e.length === 1 && i === "y") {
|
|
@@ -103,80 +104,80 @@ function Q(o, n, t) {
|
|
|
103
104
|
return;
|
|
104
105
|
}
|
|
105
106
|
if (e.length === 1 && i === "xoz") {
|
|
106
|
-
const
|
|
107
|
+
const u = new s.Line3(new s.Vector3(1, 0, 0).add(e[0]), new s.Vector3(-1, 0, 0).add(e[0])), g = r.raycaster.ray.intersectPlane(d, new s.Vector3()), V = u.closestPointToPoint(g, !1, new s.Vector3());
|
|
107
108
|
o.setPoints([e[0], V, g]);
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
110
111
|
if (e.length === 1 && i === "none") {
|
|
111
|
-
|
|
112
|
+
d ? (l = r.raycaster.ray.intersectPlane(d, new s.Vector3()), c.setPoints([l, r.point])) : l = r.point.clone(), h.setPoints([M, l]);
|
|
112
113
|
return;
|
|
113
114
|
}
|
|
114
115
|
if (e.length === 2 && i === "none") {
|
|
115
|
-
a.remove(
|
|
116
|
-
const
|
|
116
|
+
a.remove(h);
|
|
117
|
+
const u = r.raycaster.ray.intersectPlane(d, new s.Vector3()), g = e[0].distanceTo(e[1]) / 2, V = new s.Vector3().lerpVectors(e[0], e[1], 0.5), z = new s.Vector3().subVectors(u, V).normalize();
|
|
117
118
|
l = new s.Vector3().addVectors(V, z.multiplyScalar(g));
|
|
118
|
-
const
|
|
119
|
-
o.setPoints(
|
|
119
|
+
const D = [e[0], l, e[1]], U = W(D, B.modules.five.camera.position);
|
|
120
|
+
o.setPoints(U);
|
|
120
121
|
return;
|
|
121
122
|
}
|
|
122
123
|
}, y = () => {
|
|
123
|
-
n.off("select",
|
|
124
|
-
},
|
|
124
|
+
n.off("select", E), n.off("intersectionUpdate", L), n.off("disable", x), n.disable(), a == null || a.remove(h, w, c);
|
|
125
|
+
}, x = () => {
|
|
125
126
|
y(), a == null || a.remove(o), m(new Error("Cancelled"));
|
|
126
127
|
};
|
|
127
|
-
n.on("select",
|
|
128
|
+
n.on("select", E), n.on("intersectionUpdate", L), n.on("disable", x);
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
131
|
function X(o, n, t) {
|
|
131
132
|
return new Promise((f, m) => {
|
|
132
|
-
var
|
|
133
|
+
var C;
|
|
133
134
|
const a = o.parent;
|
|
134
135
|
if (!a)
|
|
135
136
|
return m(new Error("No container"));
|
|
136
|
-
const i = (
|
|
137
|
-
a.add(
|
|
137
|
+
const i = (C = t == null ? void 0 : t.limit) != null ? C : "none", h = new b(p(P({}, o.style), { dashed: !0, lengthEnable: !0 })), c = new b(p(P({}, o.style), { dashed: !0, lengthEnable: !1 })), w = new b(p(P({}, o.style), { dashed: !1, lengthEnable: !1 }));
|
|
138
|
+
a.add(h, w, c), n.enable();
|
|
138
139
|
const e = [];
|
|
139
|
-
let l = new s.Vector3(),
|
|
140
|
-
const
|
|
141
|
-
e.push(l.clone()), e.length === 1 ? (i === "xoz" &&
|
|
140
|
+
let l = new s.Vector3(), v = new s.Vector3();
|
|
141
|
+
const d = new s.Plane(), E = () => {
|
|
142
|
+
e.push(l.clone()), e.length === 1 ? (i === "xoz" && d.setFromNormalAndCoplanarPoint(new s.Vector3(0, 1, 0), e[0]), i === "none" && d.setFromNormalAndCoplanarPoint(v, e[0])) : e.length === 2 ? (i === "y" && d.setFromCoplanarPoints(e[0], e[1], new s.Vector3(0, 1, 0).add(e[0])), w.setPoints([e[0], e[1]])) : e.length === 3 && (y(), f());
|
|
142
143
|
}, L = (r) => {
|
|
143
144
|
var N;
|
|
144
145
|
if (!(r != null && r.raycaster))
|
|
145
146
|
return;
|
|
146
147
|
const M = (N = e.at(-1)) == null ? void 0 : N.clone();
|
|
147
148
|
if (e.length === 0) {
|
|
148
|
-
l = r.point.clone(),
|
|
149
|
+
l = r.point.clone(), v = r.face.normal;
|
|
149
150
|
return;
|
|
150
151
|
}
|
|
151
152
|
if (e.length === 1 && i === "y") {
|
|
152
|
-
l = r.point, c.setPoints([]),
|
|
153
|
+
l = r.point, c.setPoints([]), h.setPoints([M, l]);
|
|
153
154
|
return;
|
|
154
155
|
}
|
|
155
156
|
if (e.length === 1 && i === "xoz") {
|
|
156
|
-
l = r.raycaster.ray.intersectPlane(
|
|
157
|
+
l = r.raycaster.ray.intersectPlane(d, new s.Vector3()), c.setPoints([l, r.point]), h.setPoints([M, l]);
|
|
157
158
|
return;
|
|
158
159
|
}
|
|
159
160
|
if (e.length === 1 && i === "none") {
|
|
160
|
-
l = r.raycaster.ray.intersectPlane(
|
|
161
|
+
l = r.raycaster.ray.intersectPlane(d, new s.Vector3()), c.setPoints([l, r.point]), h.setPoints([M, l]);
|
|
161
162
|
return;
|
|
162
163
|
}
|
|
163
164
|
if (e.length === 2) {
|
|
164
|
-
a.remove(
|
|
165
|
-
const
|
|
166
|
-
l = new s.Line3(e[1].clone().add(
|
|
167
|
-
const V = [e[0], e[1], l], z =
|
|
165
|
+
a.remove(h);
|
|
166
|
+
const u = new s.Vector3().crossVectors(e[0].clone().sub(e[1]), d.normal).normalize();
|
|
167
|
+
l = new s.Line3(e[1].clone().add(u), e[1].clone().sub(u)).closestPointToPoint(r.point, !1, new s.Vector3());
|
|
168
|
+
const V = [e[0], e[1], l], z = W(V, B.modules.five.camera.position);
|
|
168
169
|
o.setPoints(z);
|
|
169
170
|
return;
|
|
170
171
|
}
|
|
171
172
|
}, y = () => {
|
|
172
|
-
n.off("select",
|
|
173
|
-
},
|
|
173
|
+
n.off("select", E), n.off("intersectionUpdate", L), n.off("disable", x), n.disable(), a == null || a.remove(h, w, c);
|
|
174
|
+
}, x = () => {
|
|
174
175
|
y(), a == null || a.remove(o), m(new Error("Cancelled"));
|
|
175
176
|
};
|
|
176
|
-
n.on("select",
|
|
177
|
+
n.on("select", E), n.on("intersectionUpdate", L), n.on("disable", x);
|
|
177
178
|
});
|
|
178
179
|
}
|
|
179
180
|
export {
|
|
180
|
-
|
|
181
|
+
se as Rectangle,
|
|
181
182
|
K as createRectangle
|
|
182
183
|
};
|
package/libs/Sculpt/index.d.ts
CHANGED
|
@@ -86,16 +86,6 @@ export declare class Sculpt extends Subscribe<Event> {
|
|
|
86
86
|
};
|
|
87
87
|
readonly id: string;
|
|
88
88
|
readonly type: string;
|
|
89
|
-
} | {
|
|
90
|
-
points: [import("..").ArrayPosition, import("..").ArrayPosition, import("..").ArrayPosition];
|
|
91
|
-
style: {
|
|
92
|
-
color: number;
|
|
93
|
-
opacity: number;
|
|
94
|
-
lineWidth: number;
|
|
95
|
-
lineColor: number;
|
|
96
|
-
};
|
|
97
|
-
id: string;
|
|
98
|
-
type: string;
|
|
99
89
|
} | {
|
|
100
90
|
center: [number, number, number];
|
|
101
91
|
normal: [number, number, number];
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.52.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.52.1",
|
|
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",
|