@realsee/dnalogel 3.8.5 → 3.8.7
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 +4 -4
- package/dist/index.js +21 -14
- package/dist/index.umd.js +4 -4
- package/libs/AreaMakerPlugin/Controller.js +5 -5
- package/libs/AreaMakerPlugin/utils/Item.js +7 -6
- package/libs/CruisePlugin/Move.js +39 -33
- 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 ul from "animejs";
|
|
|
39
39
|
import { GLTFLoader as nm } from "@realsee/five/gltf-loader";
|
|
40
40
|
function sm() {
|
|
41
41
|
console.debug(
|
|
42
|
-
"%c %c@realsee/dnalogel %cv3.8.
|
|
42
|
+
"%c %c@realsee/dnalogel %cv3.8.7",
|
|
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 Fi = class {
|
|
|
7085
7085
|
/**
|
|
7086
7086
|
* @realsee/dnalogel 版本号
|
|
7087
7087
|
*/
|
|
7088
|
-
u(this, "VERSION", "3.8.
|
|
7088
|
+
u(this, "VERSION", "3.8.7");
|
|
7089
7089
|
u(this, "five");
|
|
7090
7090
|
/**
|
|
7091
7091
|
* 插件事件钩子
|
|
@@ -29487,9 +29487,12 @@ let ol = class extends kf {
|
|
|
29487
29487
|
});
|
|
29488
29488
|
u(this, "getDuration", () => this.getSpeededDuration(this.duration));
|
|
29489
29489
|
u(this, "getProgress", () => {
|
|
29490
|
-
var
|
|
29491
|
-
const e = this.getPauseData()
|
|
29492
|
-
|
|
29490
|
+
var l;
|
|
29491
|
+
const e = this.getPauseData();
|
|
29492
|
+
let i = (l = e == null ? void 0 : e.playedProgress) != null ? l : 0;
|
|
29493
|
+
(i < 0 || i >= 1) && (i = 0);
|
|
29494
|
+
const s = 1 - i, o = this.getDuration(), a = (performance.now() - this.playStartedTime) / o;
|
|
29495
|
+
return 1 - s + a;
|
|
29493
29496
|
});
|
|
29494
29497
|
const s = {
|
|
29495
29498
|
config: {
|
|
@@ -29518,7 +29521,10 @@ let ol = class extends kf {
|
|
|
29518
29521
|
return new Promise((e, i) => F(this, null, function* () {
|
|
29519
29522
|
var l;
|
|
29520
29523
|
this.hooks.emit("play", { userAction: !0 });
|
|
29521
|
-
const s = this.getPauseData()
|
|
29524
|
+
const s = this.getPauseData();
|
|
29525
|
+
let o = (l = s == null ? void 0 : s.playedProgress) != null ? l : 0;
|
|
29526
|
+
(o < 0 || o >= 1) && (o = 0);
|
|
29527
|
+
const r = Yr(this.curve, o, this.curveOffset);
|
|
29522
29528
|
if (this.hooks.emit("progressChange", o), this.five.setState(fe(R({}, r), { mode: "Model" })), yield this.five.ready(), this.playStartedTime = performance.now(), this.config.allowBroke) {
|
|
29523
29529
|
const c = this.addInterruptListener(() => {
|
|
29524
29530
|
this.state.playing && (this.hooks.emit("broke"), this.handlePause(), c(), i(new Error("broke")));
|
|
@@ -33215,23 +33221,24 @@ class QE {
|
|
|
33215
33221
|
}
|
|
33216
33222
|
/** 挂载标注 */
|
|
33217
33223
|
mount() {
|
|
33224
|
+
var e;
|
|
33218
33225
|
if (this.mounted = !0, this.updateVisible(), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.modelGroup.add(this.makerObject, this.outline), !!this.name) {
|
|
33219
|
-
const
|
|
33226
|
+
const i = this.plugin.tagDomContainer, s = {
|
|
33220
33227
|
data: this.data,
|
|
33221
33228
|
content: this.name,
|
|
33222
33229
|
visible: this.tagVisible,
|
|
33223
33230
|
renderer: this.itemRenderer,
|
|
33224
33231
|
transform: `translate(${this.tagTransform.left}px, ${this.tagTransform.top}px)`,
|
|
33225
|
-
onClick: (
|
|
33232
|
+
onClick: (o) => this.hooks.emit("tagClick", { target: this, nativeEvent: o })
|
|
33226
33233
|
};
|
|
33227
|
-
this.tagApp = new RE({ target:
|
|
33234
|
+
this.tagApp = new RE({ target: i, props: s }), this.updateTag();
|
|
33228
33235
|
}
|
|
33229
|
-
this.plugin.five.needsRender = !0, this.plugin.hooks.on("stateChange", this.onPluginStateChange), this.plugin.hooks.on("configChange", this.onPluginConfigChange), this.plugin.five.on("modeChange", this.updateVisible), this.plugin.five.on("modelShownFloorChange", this.updateVisible), this.plugin.five.on("cameraUpdate", this.onFiveCameraUpdate), this.plugin.resizeIframe.contentWindow.addEventListener("resize", this.onContainerResize);
|
|
33236
|
+
this.plugin.five.needsRender = !0, this.plugin.hooks.on("stateChange", this.onPluginStateChange), this.plugin.hooks.on("configChange", this.onPluginConfigChange), this.plugin.five.on("modeChange", this.updateVisible), this.plugin.five.on("modelShownFloorChange", this.updateVisible), this.plugin.five.on("cameraUpdate", this.onFiveCameraUpdate), (e = this.plugin.resizeIframe.contentWindow) == null || e.addEventListener("resize", this.onContainerResize);
|
|
33230
33237
|
}
|
|
33231
33238
|
/** 卸载标注 */
|
|
33232
33239
|
unmount() {
|
|
33233
|
-
var t;
|
|
33234
|
-
this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (t = this.tagApp) == null || t.$destroy(), this.tagApp = null, this.plugin.hooks.off("stateChange", this.onPluginStateChange), this.plugin.hooks.off("configChange", this.onPluginConfigChange), this.plugin.five.off("modeChange", this.updateVisible), this.plugin.five.off("modelShownFloorChange", this.updateVisible), this.plugin.five.off("cameraUpdate", this.onFiveCameraUpdate), this.plugin.resizeIframe.contentWindow.removeEventListener("resize", this.onContainerResize);
|
|
33240
|
+
var t, e;
|
|
33241
|
+
this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (t = this.tagApp) == null || t.$destroy(), this.tagApp = null, this.plugin.hooks.off("stateChange", this.onPluginStateChange), this.plugin.hooks.off("configChange", this.onPluginConfigChange), this.plugin.five.off("modeChange", this.updateVisible), this.plugin.five.off("modelShownFloorChange", this.updateVisible), this.plugin.five.off("cameraUpdate", this.onFiveCameraUpdate), (e = this.plugin.resizeIframe.contentWindow) == null || e.removeEventListener("resize", this.onContainerResize);
|
|
33235
33242
|
}
|
|
33236
33243
|
/** 更改标注透明度
|
|
33237
33244
|
* @param opacity 标注透明度,范围:0-1
|
|
@@ -33392,10 +33399,10 @@ class NE extends Ci {
|
|
|
33392
33399
|
load(e) {
|
|
33393
33400
|
return F(this, null, function* () {
|
|
33394
33401
|
const i = this.data;
|
|
33395
|
-
this.data = this.formatData(e), this.hooks.emit("dataChange", this.data, i), this.modelGroup.remove(...this.modelGroup.children), this.itemMap.clear(), this.data.list.forEach((s) => {
|
|
33402
|
+
this.data = this.formatData(e), this.hooks.emit("dataChange", this.data, i), this.modelGroup.remove(...this.modelGroup.children), this.itemMap.clear(), this.childrenMountedState = !1, this.checkMsg.childrenMountedState = "", this.data.list.forEach((s) => {
|
|
33396
33403
|
const o = new QE(this, s);
|
|
33397
33404
|
o.itemRenderer = this.itemRenderer, this.modelGroup.add(o.modelGroup), this.itemMap.set(s.id, o), o.hooks.on("tagClick", this.onMakerTagClick);
|
|
33398
|
-
});
|
|
33405
|
+
}), this.updateChildrenMountedState();
|
|
33399
33406
|
});
|
|
33400
33407
|
}
|
|
33401
33408
|
/** 将插件的 DOM 容器添加到指定的 DOM 元素上 */
|