@realsee/dnalogel 2.28.2 → 2.28.4
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/AreaMakerPlugin/Controller.d.ts +2 -0
- package/dist/AreaMakerPlugin/utils/Item.d.ts +7 -0
- package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +3 -0
- package/dist/PipelinePlugin/typing/index.d.ts +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.js +22 -5
- package/dist/index.umd.js +24 -24
- package/libs/AreaMakerPlugin/Controller.d.ts +2 -0
- package/libs/AreaMakerPlugin/Controller.js +38 -36
- package/libs/AreaMakerPlugin/utils/Item.d.ts +7 -0
- package/libs/AreaMakerPlugin/utils/Item.js +44 -29
- package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +3 -0
- package/libs/PipelinePlugin/typing/index.d.ts +1 -1
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ import cl from "animejs";
|
|
|
39
39
|
import { GLTFLoader as Ff } from "@realsee/five/gltf-loader";
|
|
40
40
|
function _f() {
|
|
41
41
|
console.debug(
|
|
42
|
-
"%c %c@realsee/dnalogel %cv2.28.
|
|
42
|
+
"%c %c@realsee/dnalogel %cv2.28.4",
|
|
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",
|
|
@@ -6849,7 +6849,7 @@ let ps = class {
|
|
|
6849
6849
|
/**
|
|
6850
6850
|
* @realsee/dnalogel 版本号
|
|
6851
6851
|
*/
|
|
6852
|
-
f(this, "VERSION", "2.28.
|
|
6852
|
+
f(this, "VERSION", "2.28.4");
|
|
6853
6853
|
f(this, "five");
|
|
6854
6854
|
/**
|
|
6855
6855
|
* 插件事件钩子
|
|
@@ -32196,11 +32196,16 @@ class lE {
|
|
|
32196
32196
|
f(this, "tagTransform", { left: 0, top: 0 });
|
|
32197
32197
|
/** 标注标签的显示层级 */
|
|
32198
32198
|
f(this, "tagZIndex", 0);
|
|
32199
|
+
/** 标注实例的事件处理器 */
|
|
32199
32200
|
f(this, "hooks", new Ri());
|
|
32200
32201
|
/** Plugin 实例 */
|
|
32201
32202
|
f(this, "plugin");
|
|
32202
32203
|
/** 标注透明度动画 */
|
|
32203
32204
|
f(this, "opacityAnime");
|
|
32205
|
+
/** 是否在容器 resize 动画中 */
|
|
32206
|
+
f(this, "isInContainerResizeAnimation", !1);
|
|
32207
|
+
/** 监听容器 resize 的计时器 id,用于判断 resize 过程是否结束 */
|
|
32208
|
+
f(this, "containerResizeTimeoutID", null);
|
|
32204
32209
|
/** 显示标注 */
|
|
32205
32210
|
// public show() {
|
|
32206
32211
|
// return this.doOpacityAnime({
|
|
@@ -32284,6 +32289,8 @@ class lE {
|
|
|
32284
32289
|
f(this, "checkTagVisible", () => {
|
|
32285
32290
|
if (!this.visible)
|
|
32286
32291
|
return { result: !1, msg: "标注整体不可见" };
|
|
32292
|
+
if (this.isInContainerResizeAnimation)
|
|
32293
|
+
return { result: !1, msg: "处于容器 resize 动画中" };
|
|
32287
32294
|
const e = this.plugin.five, i = new P.Raycaster(), s = e.camera.position.clone();
|
|
32288
32295
|
i.set(s.clone(), this.tagPosition.clone().sub(s).normalize());
|
|
32289
32296
|
const [o] = e.model.intersectRaycaster(i), r = this.tagPosition.distanceTo(e.camera.position);
|
|
@@ -32296,6 +32303,14 @@ class lE {
|
|
|
32296
32303
|
f(this, "onFiveCameraUpdate", () => {
|
|
32297
32304
|
this.tagApp && this.visible && (this.updateTagNDCPosition(), this.updateTagDomTransform(), this.updateTagVisible());
|
|
32298
32305
|
});
|
|
32306
|
+
/** tag container DOM 发生 resize */
|
|
32307
|
+
f(this, "onContainerResize", () => {
|
|
32308
|
+
this.isInContainerResizeAnimation === !1 && (this.isInContainerResizeAnimation = !0, this.updateTag());
|
|
32309
|
+
const e = () => {
|
|
32310
|
+
this.isInContainerResizeAnimation = !1, this.containerResizeTimeoutID = null, this.updateTag();
|
|
32311
|
+
};
|
|
32312
|
+
this.containerResizeTimeoutID && clearTimeout(this.containerResizeTimeoutID), this.containerResizeTimeoutID = setTimeout(e, 100);
|
|
32313
|
+
});
|
|
32299
32314
|
var l, c, d;
|
|
32300
32315
|
const i = e.object_data, s = i.bottom_y, o = i.height, r = new P.Color((l = i.color) != null ? l : "#FFFFFF"), a = (c = i.opacity) != null ? c : 0.4;
|
|
32301
32316
|
this.id = e.id, this.name = (d = e.name) != null ? d : "", this.plugin = t, this.height = o, this.bottomY = s, this.opacity = a, this.shape = new P.Shape().fromJSON(i.shape), this.floorIndex = e.floor_index, this.makerObject = new P.Mesh(wh(this.shape, o), cE(r, a)), Jr(this.makerObject, s), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline = new Fh(
|
|
@@ -32314,12 +32329,12 @@ class lE {
|
|
|
32314
32329
|
};
|
|
32315
32330
|
this.tagApp = new rE({ target: e, props: i }), this.updateTag();
|
|
32316
32331
|
}
|
|
32317
|
-
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);
|
|
32332
|
+
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);
|
|
32318
32333
|
}
|
|
32319
32334
|
/** 卸载标注 */
|
|
32320
32335
|
unmount() {
|
|
32321
32336
|
var t;
|
|
32322
|
-
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);
|
|
32337
|
+
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);
|
|
32323
32338
|
}
|
|
32324
32339
|
/** 更改标注透明度
|
|
32325
32340
|
* @param opacity 标注透明度,范围:0-1
|
|
@@ -32395,6 +32410,8 @@ class dE extends si {
|
|
|
32395
32410
|
f(this, "data");
|
|
32396
32411
|
/** tag 容器 */
|
|
32397
32412
|
f(this, "tagDomContainer");
|
|
32413
|
+
/** 用于监听容器尺寸变化的 iframe */
|
|
32414
|
+
f(this, "resizeIframe");
|
|
32398
32415
|
/** 查询问题使用的调试对象 */
|
|
32399
32416
|
f(this, "checkMsg", {
|
|
32400
32417
|
childrenMountedState: ""
|
|
@@ -32453,7 +32470,7 @@ class dE extends si {
|
|
|
32453
32470
|
}))
|
|
32454
32471
|
return !1;
|
|
32455
32472
|
});
|
|
32456
|
-
this.five = e, this.tagDomContainer = document.createElement("div"), this.tagDomContainer.style.position = "absolute", this.tagDomContainer.style.top = "0", this.tagDomContainer.style.left = "0", this.tagDomContainer.style.width = "100%", this.tagDomContainer.style.height = "100%", this.tagDomContainer.style.pointerEvents = "none";
|
|
32473
|
+
this.five = e, this.tagDomContainer = document.createElement("div"), this.tagDomContainer.style.position = "absolute", this.tagDomContainer.style.top = "0", this.tagDomContainer.style.left = "0", this.tagDomContainer.style.width = "100%", this.tagDomContainer.style.height = "100%", this.tagDomContainer.style.pointerEvents = "none", this.resizeIframe = document.createElement("iframe"), this.resizeIframe.style.position = "absolute", this.resizeIframe.style.top = "0", this.resizeIframe.style.left = "0", this.resizeIframe.style.width = "100%", this.resizeIframe.style.height = "100%", this.resizeIframe.style.border = "none", this.resizeIframe.style.pointerEvents = "none", this.resizeIframe.style.zIndex = "-1", this.tagDomContainer.appendChild(this.resizeIframe);
|
|
32457
32474
|
const s = {
|
|
32458
32475
|
enabled: !0,
|
|
32459
32476
|
visible: !0
|