@realsee/dnalogel 3.80.1-alpha.0 → 3.80.2
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 +4 -0
- package/README.md +0 -4
- package/dist/index.cjs.js +52 -52
- package/dist/index.js +3383 -3383
- package/dist/index.umd.js +51 -51
- package/libs/Sculpt/Objects/Base/index.js +38 -38
- package/libs/base/BasePlugin.js +5 -5
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
var w = Object.defineProperty, v = Object.defineProperties;
|
|
2
|
-
var
|
|
2
|
+
var b = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var g = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var c = (s, i,
|
|
6
|
-
for (var
|
|
7
|
-
|
|
4
|
+
var E = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var c = (s, i, t) => i in s ? w(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t, l = (s, i) => {
|
|
6
|
+
for (var t in i || (i = {}))
|
|
7
|
+
E.call(i, t) && c(s, t, i[t]);
|
|
8
8
|
if (g)
|
|
9
|
-
for (var
|
|
10
|
-
D.call(i,
|
|
9
|
+
for (var t of g(i))
|
|
10
|
+
D.call(i, t) && c(s, t, i[t]);
|
|
11
11
|
return s;
|
|
12
|
-
}, d = (s, i) => v(s,
|
|
13
|
-
var r = (s, i,
|
|
12
|
+
}, d = (s, i) => v(s, b(i));
|
|
13
|
+
var r = (s, i, t) => (c(s, typeof i != "symbol" ? i + "" : i, t), t);
|
|
14
14
|
import { hotkeys as u } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
15
|
-
import {
|
|
16
|
-
import { IObject3D as
|
|
17
|
-
import { localToWorld as
|
|
15
|
+
import { globalModules as n } from "../../utils/Modules/Global.js";
|
|
16
|
+
import { IObject3D as x } from "../../../shared-utils/three/IObject3D.js";
|
|
17
|
+
import { localToWorld as S, worldToLocal as W } from "../../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
18
18
|
import "../../../shared-utils/tag.js";
|
|
19
19
|
import "three";
|
|
20
20
|
import "../../../vendor/hammerjs/hammer.js";
|
|
@@ -31,9 +31,9 @@ import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
|
31
31
|
import "../../../vendor/earcut/src/earcut.js";
|
|
32
32
|
import "../../../shared-utils/five/FivePuppet.js";
|
|
33
33
|
const p = /* @__PURE__ */ new Map();
|
|
34
|
-
class M extends
|
|
35
|
-
constructor(
|
|
36
|
-
var o,
|
|
34
|
+
class M extends x {
|
|
35
|
+
constructor(t, e) {
|
|
36
|
+
var o, a;
|
|
37
37
|
super();
|
|
38
38
|
r(this, "name", "Sculpt");
|
|
39
39
|
r(this, "isSculptObject", !0);
|
|
@@ -46,25 +46,25 @@ class M extends S {
|
|
|
46
46
|
* @description 配置
|
|
47
47
|
*/
|
|
48
48
|
r(this, "config");
|
|
49
|
-
r(this, "on", (
|
|
50
|
-
r(this, "off", (...
|
|
51
|
-
r(this, "applyObjectMatrixWorld", (
|
|
52
|
-
const o =
|
|
53
|
-
return o.updateMatrixWorld(),
|
|
49
|
+
r(this, "on", (t, e, o) => n.fiveDomEvents.addEventListener(this, t, e, o));
|
|
50
|
+
r(this, "off", (...t) => n.fiveDomEvents.removeEventListener(this, ...t));
|
|
51
|
+
r(this, "applyObjectMatrixWorld", (t, e) => {
|
|
52
|
+
const o = e != null ? e : this;
|
|
53
|
+
return o.updateMatrixWorld(), S(o, t);
|
|
54
54
|
});
|
|
55
|
-
r(this, "applyObjectReversalMatrixWorld", (
|
|
56
|
-
const o =
|
|
57
|
-
return o.updateMatrixWorld(), W(o,
|
|
55
|
+
r(this, "applyObjectReversalMatrixWorld", (t, e) => {
|
|
56
|
+
const o = e != null ? e : this;
|
|
57
|
+
return o.updateMatrixWorld(), W(o, t);
|
|
58
58
|
});
|
|
59
|
-
|
|
59
|
+
t != null && t.id && (this.uuid = t.id), this.config = l({ defaultAction: !0, occlusionVisibility: !0, occlusionMode: "translucence" }, e), t && (y((o = this.config) == null ? void 0 : o.occlusionMode) && (t.style = d(l({}, t.style), { occlusionMode: this.config.occlusionMode })), y((a = this.config) == null ? void 0 : a.occlusionVisibility) && (t.style = d(l({}, t.style), { occlusionVisibility: this.config.occlusionVisibility }))), u("esc", () => {
|
|
60
60
|
this.stopCreating();
|
|
61
61
|
}), this.config.defaultAction && (u("backspace, delete", () => {
|
|
62
62
|
this.selected && this.delete();
|
|
63
63
|
}), this.on("click", () => {
|
|
64
64
|
var f;
|
|
65
65
|
this.editing || (this.select({ only: !0 }), this.editor.enable(), (f = this.parent) == null || f.children.forEach((h) => {
|
|
66
|
-
var
|
|
67
|
-
h instanceof M && h !== this && ((
|
|
66
|
+
var m;
|
|
67
|
+
h instanceof M && h !== this && ((m = h._editor) == null || m.disable());
|
|
68
68
|
}));
|
|
69
69
|
}), u("esc", () => {
|
|
70
70
|
this.selected && this.unselect();
|
|
@@ -80,7 +80,7 @@ class M extends S {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
get pointSelector() {
|
|
83
|
-
return n.
|
|
83
|
+
return n.pointSelector;
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
86
|
* @description 撤销
|
|
@@ -110,26 +110,26 @@ class M extends S {
|
|
|
110
110
|
* @description 停止创建当前物体,等同于`esc`
|
|
111
111
|
*/
|
|
112
112
|
stopCreating() {
|
|
113
|
-
n.
|
|
113
|
+
n.pointSelector.disable();
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
116
|
* @description 从场景中删除当前物体,并且移除事件监听
|
|
117
117
|
*/
|
|
118
118
|
delete() {
|
|
119
|
-
var
|
|
120
|
-
this.stopCreating(), this.removeFromParent(), this.off(), (
|
|
119
|
+
var t;
|
|
120
|
+
this.stopCreating(), this.removeFromParent(), this.off(), (t = this.editor) == null || t.disable();
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
123
|
* @description 选择当前物体
|
|
124
124
|
* @param params.only 只选择当前物体,自动取消选择其他物体;默认 `false`
|
|
125
125
|
*
|
|
126
126
|
*/
|
|
127
|
-
select(
|
|
127
|
+
select(t = { only: !1 }) {
|
|
128
128
|
if (this.selected)
|
|
129
129
|
return;
|
|
130
130
|
this.selected = !0, this.highlight(), p.has(this.parent.uuid) || p.set(this.parent.uuid, []);
|
|
131
|
-
const
|
|
132
|
-
|
|
131
|
+
const e = p.get(this.parent.uuid);
|
|
132
|
+
e.push(this), t.only && (e == null || e.forEach((o) => {
|
|
133
133
|
o !== this && o.unselect();
|
|
134
134
|
}));
|
|
135
135
|
}
|
|
@@ -137,8 +137,8 @@ class M extends S {
|
|
|
137
137
|
* @description 取消选择当前物体
|
|
138
138
|
*/
|
|
139
139
|
unselect() {
|
|
140
|
-
var
|
|
141
|
-
this.selected && (this.selected = !1, this.unhighlight(), (
|
|
140
|
+
var t;
|
|
141
|
+
this.selected && (this.selected = !1, this.unhighlight(), (t = this._editor) == null || t.disable());
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
144
|
* @description 高亮当前物体
|
|
@@ -153,9 +153,9 @@ class M extends S {
|
|
|
153
153
|
/**
|
|
154
154
|
* @description 显示删除按钮
|
|
155
155
|
*/
|
|
156
|
-
showDeleteButton(
|
|
157
|
-
n.
|
|
158
|
-
n.
|
|
156
|
+
showDeleteButton(t, e) {
|
|
157
|
+
n.cursor.showDeleteButton({ clientX: t, clientY: e, container: document.body, onClick: () => this.delete() }), n.five.once("cameraUpdate", () => {
|
|
158
|
+
n.cursor.removeDeleteButton();
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
}
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var e = Object.defineProperty;
|
|
2
2
|
var s = (o, t, i) => t in o ? e(o, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[t] = i;
|
|
3
3
|
var r = (o, t, i) => (s(o, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
|
-
import { Subscribe as
|
|
4
|
+
import { Subscribe as m } from "../shared-utils/Subscribe.js";
|
|
5
5
|
import "../shared-utils/tag.js";
|
|
6
6
|
import "three";
|
|
7
7
|
import "../vendor/hammerjs/hammer.js";
|
|
@@ -15,7 +15,7 @@ import "../shared-utils/three/blink.js";
|
|
|
15
15
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
16
16
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
17
17
|
import "../vendor/earcut/src/earcut.js";
|
|
18
|
-
import { FiveUtil as
|
|
18
|
+
import { FiveUtil as l } from "../shared-utils/Utils/FiveUtil.js";
|
|
19
19
|
import { DEFAULT_STATIC_PREFIX as p } from "../shared-utils/url/defaultUrls.js";
|
|
20
20
|
import "../shared-utils/five/FivePuppet.js";
|
|
21
21
|
let I = class {
|
|
@@ -23,7 +23,7 @@ let I = class {
|
|
|
23
23
|
/**
|
|
24
24
|
* @realsee/dnalogel 版本号
|
|
25
25
|
*/
|
|
26
|
-
r(this, "VERSION", "3.80.
|
|
26
|
+
r(this, "VERSION", "3.80.2");
|
|
27
27
|
r(this, "NAME");
|
|
28
28
|
r(this, "five");
|
|
29
29
|
r(this, "workUtil");
|
|
@@ -31,9 +31,9 @@ let I = class {
|
|
|
31
31
|
/**
|
|
32
32
|
* @description: 插件事件钩子
|
|
33
33
|
*/
|
|
34
|
-
r(this, "hooks", new
|
|
34
|
+
r(this, "hooks", new m());
|
|
35
35
|
r(this, "staticPrefix", p);
|
|
36
|
-
this.five = t, this.fiveUtil = new
|
|
36
|
+
this.five = t, this.fiveUtil = new l(t), this.workUtil = this.fiveUtil.workUtil, i != null && i.staticPrefix && (this.staticPrefix = i.staticPrefix);
|
|
37
37
|
}
|
|
38
38
|
set workCode(t) {
|
|
39
39
|
this.workUtil.workCode = t, this.onWorkCodeChange();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.80.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.80.2",
|
|
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",
|