@realsee/dnalogel 3.2.0 → 3.2.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/dist/index.cjs.js +3 -3
- package/dist/index.js +25 -10
- package/dist/index.umd.js +23 -23
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +91 -76
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ import dl from "animejs";
|
|
|
39
39
|
import { GLTFLoader as Zf } from "@realsee/five/gltf-loader";
|
|
40
40
|
function qf() {
|
|
41
41
|
console.debug(
|
|
42
|
-
"%c %c@realsee/dnalogel %cv3.2.
|
|
42
|
+
"%c %c@realsee/dnalogel %cv3.2.2",
|
|
43
43
|
[
|
|
44
44
|
"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=')",
|
|
45
45
|
"background-repeat: no-repeat",
|
|
@@ -7085,7 +7085,7 @@ let Vn = class {
|
|
|
7085
7085
|
/**
|
|
7086
7086
|
* @realsee/dnalogel 版本号
|
|
7087
7087
|
*/
|
|
7088
|
-
u(this, "VERSION", "3.2.
|
|
7088
|
+
u(this, "VERSION", "3.2.2");
|
|
7089
7089
|
u(this, "five");
|
|
7090
7090
|
/**
|
|
7091
7091
|
* 插件事件钩子
|
|
@@ -28810,11 +28810,19 @@ class ba {
|
|
|
28810
28810
|
/** 设置模型状态 */
|
|
28811
28811
|
setMeshStyle(t) {
|
|
28812
28812
|
if (t != null && t.translate) {
|
|
28813
|
-
const
|
|
28814
|
-
|
|
28813
|
+
const s = new P.Vector3(), o = new P.Vector3().fromArray(t.translate);
|
|
28814
|
+
o.y += this.heightOffset, s.add(o), this.mesh.position.copy(s), i(this.startTagContainer, o), i(this.endTagContainer, o);
|
|
28815
28815
|
}
|
|
28816
28816
|
const e = R(R({}, this.meshStyle), t);
|
|
28817
28817
|
this.meshStyle = e;
|
|
28818
|
+
function i(s, o) {
|
|
28819
|
+
if (!s.tag)
|
|
28820
|
+
return;
|
|
28821
|
+
const r = new P.Vector3().fromArray(s.tag.position);
|
|
28822
|
+
r.add(o);
|
|
28823
|
+
const a = r.toArray();
|
|
28824
|
+
s.plugin.changeTagById(s.tag.id, { position: a });
|
|
28825
|
+
}
|
|
28818
28826
|
}
|
|
28819
28827
|
/** 设置 Y 轴上的偏移量,为了让多条路线在高度上错开,每个路线都需要有个额外的 offset */
|
|
28820
28828
|
setHeightOffset(t) {
|
|
@@ -28914,7 +28922,7 @@ class ba {
|
|
|
28914
28922
|
}
|
|
28915
28923
|
setTag(t, e) {
|
|
28916
28924
|
const i = this.curvePath, s = t === "start" ? this.startTagContainer : this.endTagContainer;
|
|
28917
|
-
e || s.plugin.clearTags();
|
|
28925
|
+
e != null && e.data || s.plugin.clearTags();
|
|
28918
28926
|
const r = Re({}, {
|
|
28919
28927
|
contentType: "Custom",
|
|
28920
28928
|
stickType: "2DPoint",
|
|
@@ -28922,12 +28930,19 @@ class ba {
|
|
|
28922
28930
|
style: { point: { enabled: !1 } },
|
|
28923
28931
|
data: {}
|
|
28924
28932
|
}, e);
|
|
28925
|
-
s.tag = r, _r(r) && (s.tag.element = (
|
|
28926
|
-
var
|
|
28927
|
-
(
|
|
28928
|
-
const
|
|
28929
|
-
return s.app =
|
|
28933
|
+
s.tag = r, _r(r) && (s.tag.element = (l) => {
|
|
28934
|
+
var h, f;
|
|
28935
|
+
(h = s.app) == null || h.$destroy();
|
|
28936
|
+
const c = t === "start" ? fe(R({}, r.data), { name: this.name, distance: Math.round((f = i.getLength()) != null ? f : 0), i18n: this.plugin.config.i18n }) : r.data, d = new r2({ target: l, intro: !0, props: c });
|
|
28937
|
+
return s.app = d, () => d.$destroy();
|
|
28930
28938
|
}), s.plugin.load({ tagList: [s.tag] });
|
|
28939
|
+
const a = this.meshStyle.translate;
|
|
28940
|
+
if (a && r.position) {
|
|
28941
|
+
const l = new P.Vector3().fromArray(r.position), c = new P.Vector3().fromArray(a);
|
|
28942
|
+
l.add(c), l.y += this.heightOffset;
|
|
28943
|
+
const d = l.toArray();
|
|
28944
|
+
s.plugin.changeTagById(s.tag.id, { position: d });
|
|
28945
|
+
}
|
|
28931
28946
|
}
|
|
28932
28947
|
doShow() {
|
|
28933
28948
|
this.mode === "model" && this.flowAnime.play(), this.five.scene.add(this.mesh), this.startTagContainer.plugin.show(), this.endTagContainer.plugin.show(), this.five.needsRender = !0;
|