@realsee/dnalogel 3.48.1 → 3.48.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 +6 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +1 -1
- package/dist/Sculpt/Objects/Polygon/index.d.ts +12 -1
- package/dist/Sculpt/Objects/Polyline/index.d.ts +12 -1
- package/dist/Sculpt/index.d.ts +5 -1
- package/dist/index.cjs.js +53 -53
- package/dist/index.js +4141 -4050
- package/dist/index.umd.js +46 -46
- package/libs/PanoTagPlugin/Components/Common/Media.js +299 -269
- package/libs/Sculpt/Meshes/Polygon.js +20 -20
- package/libs/Sculpt/Objects/Line/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Line/index.js +41 -41
- package/libs/Sculpt/Objects/Polygon/index.d.ts +12 -1
- package/libs/Sculpt/Objects/Polygon/index.js +112 -81
- package/libs/Sculpt/Objects/Polyline/index.d.ts +12 -1
- package/libs/Sculpt/Objects/Polyline/index.js +97 -65
- package/libs/Sculpt/Objects/Prism/index.js +8 -8
- package/libs/Sculpt/index.d.ts +5 -1
- package/libs/Sculpt/index.js +2 -2
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/libs/vendor/svelte/transition/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var F = Object.defineProperty, T = Object.defineProperties;
|
|
2
|
+
var k = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var E = Object.getOwnPropertySymbols;
|
|
4
|
+
var z = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var v = (n, t, e) => t in n ? F(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
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
|
|
7
|
+
z.call(t, e) && v(n, e, t[e]);
|
|
8
|
+
if (E)
|
|
9
|
+
for (var e of E(t))
|
|
10
|
+
B.call(t, e) && v(n, e, t[e]);
|
|
11
11
|
return n;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
12
|
+
}, M = (n, t) => T(n, k(t));
|
|
13
|
+
var y = (n, t, e) => (v(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var R = (n, t, e) => new Promise((s, P) => {
|
|
15
|
+
var w = (o) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
c(e.next(o));
|
|
18
|
+
} catch (a) {
|
|
19
|
+
P(a);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, b = (o) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
c(e.throw(o));
|
|
24
|
+
} catch (a) {
|
|
25
|
+
P(a);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, c = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(w, b);
|
|
28
|
+
c((e = e.apply(n, t)).next());
|
|
29
29
|
});
|
|
30
|
-
import { PolylineWithDotsMesh as
|
|
31
|
-
import { BaseObject as
|
|
32
|
-
import * as
|
|
33
|
-
import { PolylineEditor as
|
|
34
|
-
import { vector3ToArray as
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
import { PolylineWithDotsMesh as U, PolylineMesh as W } from "../../Meshes/Polyline.js";
|
|
31
|
+
import { BaseObject as H } from "../Base/index.js";
|
|
32
|
+
import * as d from "three";
|
|
33
|
+
import { PolylineEditor as I } from "./Editor.js";
|
|
34
|
+
import { vector3ToArray as N } from "../../../shared-utils/three/vector3ToArray.js";
|
|
35
|
+
import { withResolvers as _ } from "../../../shared-utils/promise/withResolvers.js";
|
|
36
|
+
const V = new d.Vector3();
|
|
37
|
+
class Z extends H {
|
|
38
|
+
constructor(e, s) {
|
|
39
|
+
super(e, s);
|
|
40
|
+
y(this, "type", "Polyline");
|
|
41
|
+
y(this, "polyLineMesh");
|
|
42
|
+
y(this, "creatingObject");
|
|
43
|
+
e && (this.polyLineMesh = new U(p(p({}, e.style), e)), this.add(this.polyLineMesh)), this.editor = new I(this);
|
|
42
44
|
}
|
|
43
45
|
get data() {
|
|
44
|
-
return
|
|
45
|
-
points:
|
|
46
|
+
return M(p({}, this.baseData), {
|
|
47
|
+
points: N(this.applyObjectMatrixWorld(this.polyLineMesh.points)),
|
|
46
48
|
style: {
|
|
47
|
-
lineColor: new
|
|
49
|
+
lineColor: new d.Color(this.polyLineMesh.lineColor).getHex(),
|
|
48
50
|
lineWidth: this.polyLineMesh.lineWidth,
|
|
49
51
|
dashed: this.polyLineMesh.dashed
|
|
50
52
|
}
|
|
@@ -58,41 +60,71 @@ class k extends F {
|
|
|
58
60
|
var e;
|
|
59
61
|
(e = this.polyLineMesh) == null || e.unhighlight();
|
|
60
62
|
}
|
|
63
|
+
canUndo() {
|
|
64
|
+
var e;
|
|
65
|
+
(e = this.creatingObject) == null || e.canUndo();
|
|
66
|
+
}
|
|
67
|
+
canRedo() {
|
|
68
|
+
var e;
|
|
69
|
+
(e = this.creatingObject) == null || e.canRedo();
|
|
70
|
+
}
|
|
71
|
+
undo() {
|
|
72
|
+
var e;
|
|
73
|
+
(e = this.creatingObject) == null || e.undo();
|
|
74
|
+
}
|
|
75
|
+
redo() {
|
|
76
|
+
var e;
|
|
77
|
+
(e = this.creatingObject) == null || e.redo();
|
|
78
|
+
}
|
|
61
79
|
create(e) {
|
|
62
|
-
return
|
|
80
|
+
return R(this, null, function* () {
|
|
63
81
|
this.removeChildren();
|
|
64
|
-
const
|
|
65
|
-
this.polyLineMesh =
|
|
82
|
+
const s = new U(e);
|
|
83
|
+
this.polyLineMesh = s, this.add(this.polyLineMesh), this.creatingObject = q(s, this.pointSelector, e), yield this.creatingObject.finished, this.editor.enable();
|
|
66
84
|
});
|
|
67
85
|
}
|
|
68
86
|
}
|
|
69
|
-
function
|
|
70
|
-
var
|
|
71
|
-
const
|
|
72
|
-
if (!
|
|
87
|
+
function q(n, t, e) {
|
|
88
|
+
var x;
|
|
89
|
+
const s = n.parent;
|
|
90
|
+
if (!s)
|
|
73
91
|
return;
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
92
|
+
const { promise: P, resolve: w, reject: b } = _(), c = (x = e == null ? void 0 : e.limit) != null ? x : "none", o = new W(n.style);
|
|
93
|
+
s.add(o);
|
|
94
|
+
const a = new W(M(p({}, n.style), { dashed: !0, lengthEnable: !1 }));
|
|
95
|
+
s.add(a), t.enable();
|
|
96
|
+
const i = [];
|
|
97
|
+
let r, l, j;
|
|
98
|
+
const f = [], O = () => i.length > 0, L = () => f.length > 0, A = () => {
|
|
99
|
+
O() && (f.push(i.pop()), n.setPoints(i), g(j), t.pointSelectorHelper.magnifier.render());
|
|
100
|
+
}, D = () => {
|
|
101
|
+
L() && (i.push(f.pop()), n.setPoints(i), g(j), t.pointSelectorHelper.magnifier.render());
|
|
102
|
+
}, C = (h) => {
|
|
103
|
+
f.length = 0;
|
|
104
|
+
const m = i.length === 0 ? h.point : r.clone();
|
|
105
|
+
i.push(m), n.setPoints(i);
|
|
106
|
+
}, g = (h) => {
|
|
107
|
+
const m = () => {
|
|
108
|
+
o.setPoints([]), a.setPoints([]), r = null;
|
|
88
109
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
110
|
+
if (!(i != null && i.length) || !h)
|
|
111
|
+
return m();
|
|
112
|
+
j = h;
|
|
113
|
+
const u = i.at(-1).clone();
|
|
114
|
+
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, V), 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, V), o.setPoints([u, r]), a.setPoints([r, h.point])));
|
|
115
|
+
};
|
|
116
|
+
return t.on("select", C), t.on("intersectionUpdate", g), t.on("disable", () => {
|
|
117
|
+
if (t.off("select", C), t.off("intersectionUpdate", g), t.plane = null, s.remove(o), s.remove(a), i.length < 2)
|
|
118
|
+
return s.remove(n), b(new Error("Cancelled"));
|
|
119
|
+
w();
|
|
120
|
+
}), {
|
|
121
|
+
finished: P,
|
|
122
|
+
canUndo: O,
|
|
123
|
+
canRedo: L,
|
|
124
|
+
undo: A,
|
|
125
|
+
redo: D
|
|
126
|
+
};
|
|
95
127
|
}
|
|
96
128
|
export {
|
|
97
|
-
|
|
129
|
+
Z as Polyline
|
|
98
130
|
};
|
|
@@ -11,7 +11,7 @@ var p = (i, e, t) => e in i ? E(i, e, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return i;
|
|
12
12
|
}, w = (i, e) => L(i, O(e));
|
|
13
13
|
var d = (i, e, t) => (p(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
|
-
var
|
|
14
|
+
var f = (i, e, t) => new Promise((o, n) => {
|
|
15
15
|
var l = (s) => {
|
|
16
16
|
try {
|
|
17
17
|
r(t.next(s));
|
|
@@ -63,22 +63,22 @@ class Q extends j {
|
|
|
63
63
|
(t = this.prismMesh) == null || t.unhighlight();
|
|
64
64
|
}
|
|
65
65
|
create(t) {
|
|
66
|
-
return
|
|
66
|
+
return f(this, null, function* () {
|
|
67
67
|
this.prismMesh = new x(t), this.add(this.prismMesh), yield D(this.prismMesh, this.pointSelector), this.editor.enable();
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
function D(i, e) {
|
|
72
|
-
return
|
|
72
|
+
return f(this, null, function* () {
|
|
73
73
|
const t = i.parent;
|
|
74
|
-
yield T(i.bottomPolygon, e);
|
|
74
|
+
yield T(i.bottomPolygon, e).finished;
|
|
75
75
|
const o = new U();
|
|
76
76
|
o.name = "LineHelper", t.add(o);
|
|
77
77
|
const n = i.bottomPolygon.points.at(-1), l = B(i.bottomPolygon.points).normalize(), m = n.clone().add(l.clone().multiplyScalar(10)), r = n.clone().sub(l.clone().multiplyScalar(10));
|
|
78
78
|
return o.setPoints([m, r]), e.enable(), new Promise((s, h) => {
|
|
79
|
-
const
|
|
79
|
+
const g = (a) => {
|
|
80
80
|
y(), s();
|
|
81
|
-
},
|
|
81
|
+
}, P = (a) => {
|
|
82
82
|
if (!(a != null && a.raycaster))
|
|
83
83
|
return;
|
|
84
84
|
const M = A({
|
|
@@ -87,11 +87,11 @@ function D(i, e) {
|
|
|
87
87
|
});
|
|
88
88
|
M && i.setPoints({ heightPoint: M });
|
|
89
89
|
}, y = () => {
|
|
90
|
-
e.off("select",
|
|
90
|
+
e.off("select", g), e.off("intersectionUpdate", P), e.off("disable", b), t.remove(o), e.disable();
|
|
91
91
|
}, b = () => {
|
|
92
92
|
y(), t.remove(i), h(new Error("Cancelled"));
|
|
93
93
|
};
|
|
94
|
-
e.on("select",
|
|
94
|
+
e.on("select", g), e.on("intersectionUpdate", P), e.on("disable", b);
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
}
|
package/libs/Sculpt/index.d.ts
CHANGED
|
@@ -67,7 +67,11 @@ export declare class Sculpt extends Subscribe<Event> {
|
|
|
67
67
|
id: string;
|
|
68
68
|
type: string;
|
|
69
69
|
} | {
|
|
70
|
-
readonly points: [number, number, number][];
|
|
70
|
+
readonly points: [number, number, number][]; /**
|
|
71
|
+
* @description: 点击事件
|
|
72
|
+
* @param {BuiltInItem} item 点击的物体
|
|
73
|
+
* 返回 false 来禁用 Five 默认行为
|
|
74
|
+
*/
|
|
71
75
|
readonly heightPoint: [number, number, number];
|
|
72
76
|
readonly style: {
|
|
73
77
|
readonly color: number;
|
package/libs/Sculpt/index.js
CHANGED
|
@@ -63,14 +63,14 @@ const a = class extends S {
|
|
|
63
63
|
*/
|
|
64
64
|
h(this, "undo", () => {
|
|
65
65
|
var e;
|
|
66
|
-
(e = this.creatingItem) == null || e.undo(), this.five.needsRender = !0;
|
|
66
|
+
console.log("undo"), (e = this.creatingItem) == null || e.undo(), this.five.needsRender = !0;
|
|
67
67
|
});
|
|
68
68
|
/**
|
|
69
69
|
* @description: 重做
|
|
70
70
|
*/
|
|
71
71
|
h(this, "redo", () => {
|
|
72
72
|
var e;
|
|
73
|
-
(e = this.creatingItem) == null || e.redo(), this.five.needsRender = !0;
|
|
73
|
+
console.log("redo"), (e = this.creatingItem) == null || e.redo(), this.five.needsRender = !0;
|
|
74
74
|
});
|
|
75
75
|
this.five = e, this.theme = t, this.group = new z(), this.group.name = "Sculpt", e.scene.add(this.group), a.modules.init(e), p.unbind("ctrl+z", this.undo), p.unbind("ctrl+shift+z", this.redo), p("ctrl+z", this.undo), p("ctrl+shift+z", this.redo), a.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: n }) => {
|
|
76
76
|
var s;
|
package/libs/base/BasePlugin.js
CHANGED
package/libs/index.js
CHANGED
|
@@ -458,6 +458,7 @@ import "./Sculpt/Objects/Polyline/Editor.js";
|
|
|
458
458
|
import "./Sculpt/Objects/Line/Editor.js";
|
|
459
459
|
import "./Sculpt/Objects/Base/Editor.js";
|
|
460
460
|
import "./shared-utils/three/vector3ToArray.js";
|
|
461
|
+
import "./shared-utils/promise/withResolvers.js";
|
|
461
462
|
import "./Sculpt/Objects/Point/index.js";
|
|
462
463
|
import "./Sculpt/Objects/Point/Editor.js";
|
|
463
464
|
import "./Sculpt/Objects/Polygon/index.js";
|
|
@@ -488,7 +489,6 @@ import "./Sculpt/Objects/Box/Editor.js";
|
|
|
488
489
|
import "./Sculpt/Meshes/Box.js";
|
|
489
490
|
import "./shared-utils/forReverseEach.js";
|
|
490
491
|
import "./Sculpt/Objects/Line/index.js";
|
|
491
|
-
import "./shared-utils/promise/withResolvers.js";
|
|
492
492
|
import "./ModelMakerPlugin/Controller.js";
|
|
493
493
|
import "./ModelMakerPlugin/item/boxItem.js";
|
|
494
494
|
import "./ModelMakerPlugin/item/polygonItem.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.48.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.48.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",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cubicOut as h, cubicInOut as k } from "../easing/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { identity as _, split_css_unit as y } from "../internal/index.js";
|
|
3
3
|
function C(s, { delay: o = 0, duration: n = 400, easing: t = _ } = {}) {
|
|
4
4
|
const c = +getComputedStyle(s).opacity;
|
|
5
5
|
return {
|