@realsee/dnalogel 3.49.8 → 3.49.9
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 +3 -0
- package/dist/index.cjs.js +36 -36
- package/dist/index.js +730 -722
- package/dist/index.umd.js +46 -46
- package/dist/shared-utils/tag.d.ts +2 -0
- package/libs/AreaMakerPlugin/Controller.js +1 -1
- package/libs/AreaMakerPlugin/index.js +1 -1
- package/libs/CSS3DRenderPlugin/Controller.js +20 -19
- package/libs/CSS3DRenderPlugin/index.js +6 -5
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +3 -2
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +16 -15
- package/libs/CruisePlugin/BaseController.js +5 -4
- package/libs/CruisePlugin/Move.js +1 -1
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/CurrentPanoImagePlugin/Controller.js +3 -2
- package/libs/CurrentPanoImagePlugin/index.js +4 -3
- package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem.js +1 -1
- package/libs/GuideLinePlugin/index.js +1 -1
- package/libs/ModelMakerPlugin/Controller.js +3 -2
- package/libs/ModelMakerPlugin/index.js +3 -2
- package/libs/ModelMakerPlugin/item/baseItem.js +3 -2
- package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
- package/libs/ModelMakerPlugin/item/polygonItem.js +8 -7
- package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
- package/libs/ModelTVVideoPlugin/Plugin.js +4 -3
- package/libs/ModelTVVideoPlugin/index.js +3 -2
- package/libs/Object3DHelperPlugin/Controller.js +3 -2
- package/libs/Object3DHelperPlugin/index.js +6 -5
- package/libs/PanoCompassPlugin/Controller.js +3 -2
- package/libs/PanoCompassPlugin/index.js +4 -3
- package/libs/PanoDoorLabelPlugin/BaseController.js +8 -7
- package/libs/PanoDoorLabelPlugin/Controller.js +3 -2
- package/libs/PanoDoorLabelPlugin/index.js +4 -3
- package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
- package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
- package/libs/PanoMeasurePlugin/Model/area.js +3 -2
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +12 -11
- package/libs/PanoMeasurePlugin/index.js +14 -13
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +3 -2
- package/libs/PanoSpatialTagPlugin/Plugin.js +4 -3
- package/libs/PanoSpatialTagPlugin/index.js +1 -0
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
- package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
- package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
- package/libs/PanoTagPlugin/Components/TagItem.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
- package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
- package/libs/PanoTagPlugin/controller/TagUtil.js +3 -2
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +10 -9
- package/libs/PanoVideoPlugin/Controller.js +3 -2
- package/libs/PanoVideoPlugin/VideoMeshController.js +3 -2
- package/libs/PanoVideoPlugin/index.js +6 -5
- package/libs/PipelinePlugin/Controller.js +3 -2
- package/libs/PipelinePlugin/index.js +4 -3
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +3 -2
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -2
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -0
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +3 -2
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -3
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +3 -2
- package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +9 -8
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -3
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +19 -18
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -3
- package/libs/index.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +2 -0
- package/libs/shared-utils/tag.js +20 -11
- package/package.json +1 -1
|
@@ -15,14 +15,14 @@ var f = (d, n, t) => new Promise((e, i) => {
|
|
|
15
15
|
var s = (h) => {
|
|
16
16
|
try {
|
|
17
17
|
a(t.next(h));
|
|
18
|
-
} catch (
|
|
19
|
-
i(
|
|
18
|
+
} catch (p) {
|
|
19
|
+
i(p);
|
|
20
20
|
}
|
|
21
21
|
}, r = (h) => {
|
|
22
22
|
try {
|
|
23
23
|
a(t.throw(h));
|
|
24
|
-
} catch (
|
|
25
|
-
i(
|
|
24
|
+
} catch (p) {
|
|
25
|
+
i(p);
|
|
26
26
|
}
|
|
27
27
|
}, a = (h) => h.done ? e(h.value) : Promise.resolve(h.value).then(s, r);
|
|
28
28
|
a((t = t.apply(d, n)).next());
|
|
@@ -91,9 +91,10 @@ import "../../vendor/three/build/three.module.js";
|
|
|
91
91
|
import "../../shared-utils/positionToVector3.js";
|
|
92
92
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
93
93
|
import "../../shared-utils/three/temp.js";
|
|
94
|
-
|
|
94
|
+
import "../../shared-utils/dom/resizeObserver.js";
|
|
95
|
+
class Jt extends M {
|
|
95
96
|
constructor(t, e) {
|
|
96
|
-
var h,
|
|
97
|
+
var h, p;
|
|
97
98
|
super(t);
|
|
98
99
|
// =============== public properties =================
|
|
99
100
|
o(this, "name", "topviewFloorplanPlugin");
|
|
@@ -123,8 +124,8 @@ class qt extends M {
|
|
|
123
124
|
o(this, "updateSize", () => {
|
|
124
125
|
if (!this.data || !this.container || !this.wrapper || this.five.getCurrentState().mode !== "Topview")
|
|
125
126
|
return !1;
|
|
126
|
-
const { min: t, max: e } = this.data.bounding, i = e.x - t.x, s = e.y - t.y, r = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a = D(this.five, this.wrapper, this.floorIndex, r), h = Math.ceil(i * a),
|
|
127
|
-
return this.size.width === h && this.size.height ===
|
|
127
|
+
const { min: t, max: e } = this.data.bounding, i = e.x - t.x, s = e.y - t.y, r = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a = D(this.five, this.wrapper, this.floorIndex, r), h = Math.ceil(i * a), p = Math.ceil(s * a);
|
|
128
|
+
return this.size.width === h && this.size.height === p || (this.container.style.width = h + "px", this.container.style.height = p + "px", this.size = { width: h, height: p }), !0;
|
|
128
129
|
});
|
|
129
130
|
/** 销毁插件 */
|
|
130
131
|
o(this, "dispose", () => {
|
|
@@ -189,7 +190,7 @@ class qt extends M {
|
|
|
189
190
|
imageURL: this.staticPrefix + "/release/web/saas/missing-floorplan.e274c596.png",
|
|
190
191
|
imageWidth: 200,
|
|
191
192
|
imageHeight: 120,
|
|
192
|
-
text: (
|
|
193
|
+
text: (p = (h = e.i18n) == null ? void 0 : h.call(e, "暂无平面图")) != null ? p : "暂无平面图",
|
|
193
194
|
textFontSize: 14
|
|
194
195
|
};
|
|
195
196
|
const i = {
|
|
@@ -210,23 +211,23 @@ class qt extends M {
|
|
|
210
211
|
attachedTo: _.BOUNDING_CENTER,
|
|
211
212
|
getLabelElement: void 0,
|
|
212
213
|
missingFloorConfig: l(l({}, this.defaultMissingFloorConfig), e.missingFloorConfig),
|
|
213
|
-
i18n: (
|
|
214
|
+
i18n: (c) => c,
|
|
214
215
|
adaptiveRoomLabelVisibleEnable: !0,
|
|
215
|
-
getRoomAreaText: (
|
|
216
|
-
getRoomDimensionText: (
|
|
217
|
-
getRuleDistanceText: (
|
|
216
|
+
getRoomAreaText: (c) => (c / 1e6).toFixed(1) + "㎡",
|
|
217
|
+
getRoomDimensionText: (c, w) => (c / 1e3).toFixed(1) + "m × " + (w / 1e3).toFixed(1) + "m",
|
|
218
|
+
getRuleDistanceText: (c) => c.toString()
|
|
218
219
|
}, s = e ? T(e, ["selector", "scale"]) : {}, r = l(l({}, i.missingFloorConfig), s.missingFloorConfig), a = m(l(l({}, i), s), { missingFloorConfig: r });
|
|
219
220
|
this.state = { enabled: !0, visible: !1, config: a }, this.initContainer(), t.model.loaded ? this.onFiveModelLoaded() : t.once("modelLoaded", this.onFiveModelLoaded), t.once("dispose", this.dispose), this.addEventListener();
|
|
220
221
|
}
|
|
221
222
|
load(t, e, i = !0) {
|
|
222
223
|
return f(this, null, function* () {
|
|
223
|
-
function s(
|
|
224
|
-
return Object.prototype.hasOwnProperty.apply(
|
|
224
|
+
function s(c) {
|
|
225
|
+
return Object.prototype.hasOwnProperty.apply(c, ["version"]);
|
|
225
226
|
}
|
|
226
227
|
const r = t;
|
|
227
228
|
r && k(r.version) && console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");
|
|
228
|
-
const a = JSON.parse(JSON.stringify(t)), h = s(a) ? a.data : a,
|
|
229
|
-
this.data = yield v(h), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data,
|
|
229
|
+
const a = JSON.parse(JSON.stringify(t)), h = s(a) ? a.data : a, p = this.data;
|
|
230
|
+
this.data = yield v(h), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, p), e && this.updateState(e, i), this.render();
|
|
230
231
|
});
|
|
231
232
|
}
|
|
232
233
|
/** 更新户型图位置 */
|
|
@@ -364,5 +365,5 @@ class qt extends M {
|
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
367
|
export {
|
|
367
|
-
|
|
368
|
+
Jt as Controller
|
|
368
369
|
};
|
|
@@ -53,6 +53,7 @@ import "../../shared-utils/Utils/BaseUtil.js";
|
|
|
53
53
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
54
54
|
import "../../shared-utils/five/transformPosition.js";
|
|
55
55
|
import "../../shared-utils/three/temp.js";
|
|
56
|
+
import "../../shared-utils/dom/resizeObserver.js";
|
|
56
57
|
import "../../shared-utils/three/core/Sphere.js";
|
|
57
58
|
import "animejs";
|
|
58
59
|
import "../../shared-utils/url/absoluteUrl.js";
|
|
@@ -63,8 +64,8 @@ import "../../shared-utils/to.js";
|
|
|
63
64
|
import "../../shared-utils/getPxmm.js";
|
|
64
65
|
import "../../shared-utils/changeModelCanvasOpacity.js";
|
|
65
66
|
import "../../shared-utils/isNil.js";
|
|
66
|
-
const
|
|
67
|
+
const go = (o, r) => new t(o, r);
|
|
67
68
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
go as TopviewFloorplanPlugin,
|
|
70
|
+
go as default
|
|
70
71
|
};
|
package/libs/index.js
CHANGED
|
@@ -93,6 +93,7 @@ import "./shared-utils/Subscribe.js";
|
|
|
93
93
|
import "./shared-utils/Utils/WorkUtil.js";
|
|
94
94
|
import "./shared-utils/five/transformPosition.js";
|
|
95
95
|
import "./shared-utils/three/temp.js";
|
|
96
|
+
import "./shared-utils/dom/resizeObserver.js";
|
|
96
97
|
import "./shared-utils/three/core/Sphere.js";
|
|
97
98
|
import "animejs";
|
|
98
99
|
import "./shared-utils/url/absoluteUrl.js";
|
|
@@ -300,7 +301,6 @@ import "./PanoTagPlugin/utils/debounce.js";
|
|
|
300
301
|
import "./PanoTagPlugin/utils/throttle.js";
|
|
301
302
|
import "./PanoTagPlugin/utils/tag/format.js";
|
|
302
303
|
import "./shared-utils/audio.js";
|
|
303
|
-
import "./shared-utils/dom/resizeObserver.js";
|
|
304
304
|
import "./PanoTagPlugin/controller/TagRender.js";
|
|
305
305
|
import "./PanoTagPlugin/Components/Tag/index.js";
|
|
306
306
|
import "./PanoTagPlugin/Components/Tag/TextTag/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.49.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.49.9",
|
|
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",
|
|
@@ -24,6 +24,7 @@ export declare class LightTag {
|
|
|
24
24
|
private disposer;
|
|
25
25
|
private config;
|
|
26
26
|
private fiveUtil;
|
|
27
|
+
private disposers;
|
|
27
28
|
constructor(five: Five, position?: AnyPosition, config?: {
|
|
28
29
|
wrapper?: HTMLElement;
|
|
29
30
|
positionsForRotate?: AnyPosition[];
|
|
@@ -38,6 +39,7 @@ export declare class LightTag {
|
|
|
38
39
|
updateScreenPosition(): void;
|
|
39
40
|
private onCameraUpdate;
|
|
40
41
|
private onFiveEveryReady;
|
|
42
|
+
private addResizeListener;
|
|
41
43
|
}
|
|
42
44
|
export declare function tag(five: Five, position: AnyPosition, config?: {
|
|
43
45
|
wrapper?: HTMLElement;
|
package/libs/shared-utils/tag.js
CHANGED
|
@@ -4,11 +4,12 @@ var s = (h, t, e) => (g(h, typeof t != "symbol" ? t + "" : t, e), e);
|
|
|
4
4
|
import { anyPositionToVector3 as d } from "./positionToVector3.js";
|
|
5
5
|
import * as b from "three";
|
|
6
6
|
import { vector3ToScreen as l } from "./five/vector3ToScreen.js";
|
|
7
|
-
import { getFiveModel as
|
|
8
|
-
import { FiveUtil as
|
|
7
|
+
import { getFiveModel as U } from "./five/getFiveModel.js";
|
|
8
|
+
import { FiveUtil as x } from "./Utils/FiveUtil.js";
|
|
9
9
|
import { _raycaster as m } from "./three/temp.js";
|
|
10
|
+
import { resizeObserver as E } from "./dom/resizeObserver.js";
|
|
10
11
|
const v = "LightTagContainer_shgjakdhwakjdhsja", w = new b.Vector2();
|
|
11
|
-
class
|
|
12
|
+
class R {
|
|
12
13
|
constructor(t, e, o) {
|
|
13
14
|
s(this, "container");
|
|
14
15
|
s(this, "visible", !1);
|
|
@@ -32,6 +33,7 @@ class E {
|
|
|
32
33
|
s(this, "disposer");
|
|
33
34
|
s(this, "config");
|
|
34
35
|
s(this, "fiveUtil");
|
|
36
|
+
s(this, "disposers", []);
|
|
35
37
|
s(this, "onCameraUpdate", () => {
|
|
36
38
|
this.visible !== !1 && this.updateScreenPosition();
|
|
37
39
|
});
|
|
@@ -40,15 +42,15 @@ class E {
|
|
|
40
42
|
if (this.intersectCheck && this.visible && this.five.state.mode !== "Panorama") {
|
|
41
43
|
let e = 0.01;
|
|
42
44
|
this.fiveUtil.workUtil.fromType === "poincare" && (e = 0.05), m.set(this.five.camera.position, this.transformedPosition.clone().sub(this.five.camera.position));
|
|
43
|
-
const o = (t =
|
|
45
|
+
const o = (t = U(this.five).intersectRaycaster(m)) == null ? void 0 : t[0];
|
|
44
46
|
(o == null ? void 0 : o.distance) + e > this.transformedPosition.distanceTo(this.five.camera.position) ? (this.container.style.opacity = "1", this.container.style.pointerEvents = "auto") : (this.container.style.opacity = "0", this.container.style.pointerEvents = "none");
|
|
45
47
|
}
|
|
46
48
|
});
|
|
47
49
|
var n, r, a;
|
|
48
|
-
this.five = t, this.fiveUtil = (n = t.__fiveUtil__) != null ? n : t.__fiveUtil__ = new
|
|
50
|
+
this.five = t, this.fiveUtil = (n = t.__fiveUtil__) != null ? n : t.__fiveUtil__ = new x(t), this.originPosition = e ? d(e).clone() : void 0, this.transformedPosition = (r = this.originPosition) == null ? void 0 : r.clone(), this.positionsForRotate = (a = o == null ? void 0 : o.positionsForRotate) == null ? void 0 : a.map((i) => d(i).clone()), this.container = (() => {
|
|
49
51
|
const i = document.createElement("div");
|
|
50
52
|
return i.style.width = "0", i.style.height = "0", i.style.position = "absolute", i.style.transition = "opacity 0.2s linear", i;
|
|
51
|
-
})(), this.config = o != null ? o : {}, this.enable(), this.show();
|
|
53
|
+
})(), this.config = o != null ? o : {}, this.enable(), this.show(), this.addResizeListener();
|
|
52
54
|
}
|
|
53
55
|
show() {
|
|
54
56
|
this.visible = !0, this.container.style.opacity = "1", this.container.style.pointerEvents = "auto", this.onCameraUpdate();
|
|
@@ -79,7 +81,7 @@ class E {
|
|
|
79
81
|
this.enabled && (this.enabled = !1, this.tagWrapper.removeChild(this.container), (t = this.disposer) == null || t.call(this));
|
|
80
82
|
}
|
|
81
83
|
destroy() {
|
|
82
|
-
this.disable(), this.container.remove();
|
|
84
|
+
this.disable(), this.container.remove(), this.disposers.forEach((t) => t());
|
|
83
85
|
}
|
|
84
86
|
setTransformMatrix(t) {
|
|
85
87
|
var e;
|
|
@@ -114,11 +116,18 @@ class E {
|
|
|
114
116
|
})();
|
|
115
117
|
this.container.style.left = e.leftPx + "px", this.container.style.top = e.topPx + "px", this.container.style.transformOrigin = "center", this.container.style.transform = `scale(${o})`, n && (this.container.style.transform += ` rotate(${n}deg)`);
|
|
116
118
|
}
|
|
119
|
+
addResizeListener() {
|
|
120
|
+
const t = this.five.getElement();
|
|
121
|
+
if (t) {
|
|
122
|
+
const { observe: e, unobserve: o } = E(this.onCameraUpdate, t);
|
|
123
|
+
e(), this.disposers.push(o);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
117
126
|
}
|
|
118
|
-
function
|
|
119
|
-
return new
|
|
127
|
+
function z(h, t, e) {
|
|
128
|
+
return new R(h, t, e);
|
|
120
129
|
}
|
|
121
130
|
export {
|
|
122
|
-
|
|
123
|
-
|
|
131
|
+
R as LightTag,
|
|
132
|
+
z as tag
|
|
124
133
|
};
|