@realsee/dnalogel 2.1.0-alpha.28 → 2.1.0-alpha.29
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 +59 -59
- package/dist/index.es.js +7354 -7304
- package/dist/index.js +7354 -7304
- package/dist/index.umd.js +43 -43
- package/docs/classes/CruisePluginController.html +14 -14
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/classes/Object3DHelperController.html +9 -9
- package/docs/classes/PaintBrush.html +3 -3
- package/docs/classes/PanoTagPluginController.html +23 -23
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/ContentType.html +7 -7
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/DimensionType.html +1 -1
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/LinkType.html +1 -1
- package/docs/enums/PaintBrushTypeEnum.html +1 -1
- package/docs/enums/PointType.html +1 -1
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +1 -1
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginState.html +2 -2
- package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/ContentTypeMap.html +3 -3
- package/docs/interfaces/FloorplanBounding.html +4 -4
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +7 -7
- package/docs/interfaces/FloorplanExtraObject.html +3 -3
- package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
- package/docs/interfaces/FloorplanFloorData.html +2 -2
- package/docs/interfaces/FloorplanImagePosition.html +2 -2
- package/docs/interfaces/FloorplanObserver.html +2 -2
- package/docs/interfaces/FloorplanOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanPosition.html +2 -2
- package/docs/interfaces/FloorplanRoomItem.html +6 -6
- package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
- package/docs/interfaces/FloorplanServerBounding.html +4 -4
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
- package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
- package/docs/interfaces/FloorplanServerEntrance.html +7 -7
- package/docs/interfaces/FloorplanServerFloorData.html +2 -2
- package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
- package/docs/interfaces/FloorplanServerObserver.html +2 -2
- package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanServerPosition.html +2 -2
- package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
- package/docs/interfaces/ItemLabelPluginData.html +1 -1
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -1
- package/docs/interfaces/Object3DHelperState.html +1 -1
- package/docs/interfaces/OpenParameter.html +2 -2
- package/docs/interfaces/PaintBrushAction.html +7 -7
- package/docs/interfaces/PaintBrushConfigs.html +1 -1
- package/docs/interfaces/PaintBrushState.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +2 -2
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginState.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
- package/docs/interfaces/Point.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -1
- package/docs/interfaces/RoomInfo.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -1
- package/docs/interfaces/Rooms.html +1 -1
- package/docs/interfaces/Scissor.html +5 -5
- package/docs/interfaces/TagConfig.html +3 -3
- package/docs/interfaces/Tags.html +3 -3
- package/docs/modules.html +21 -21
- package/libs/PanoTagPlugin/Components/Common/Audio.js +39 -41
- package/libs/PanoTagPlugin/Components/Common/Media.js +1060 -1031
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +49 -57
- package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +27 -27
- package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +22 -22
- package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +7 -7
- package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +64 -66
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +100 -99
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +35 -33
- package/libs/PanoTagPlugin/Components/Tag/index.js +60 -63
- package/libs/PanoTagPlugin/Components/TagContainer.js +187 -0
- package/libs/PanoTagPlugin/Components/TagWrapper.js +61 -62
- package/libs/PanoTagPlugin/controller/TagComputer.js +1 -1
- package/libs/PanoTagPlugin/controller/index.d.ts +2 -1
- package/libs/PanoTagPlugin/controller/index.js +52 -42
- package/libs/PanoTagPlugin/index.js +2 -2
- package/libs/PanoTagPlugin/tag.config.js +1 -0
- package/libs/{TagComputer.0920083a.js → TagComputer.92e6d9a9.js} +0 -0
- package/libs/index.js +2 -2
- package/package.json +1 -1
- package/libs/PanoTagPlugin/Components/PointTag.js +0 -162
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { S as M, i as N, s as O, a as Q, e as K, o as R, b as k, I as T, q as _, c as L, p as U, f as d, t as c, d as A, g as B, j as E, m as F, k as G, K as V, W as X, h as C } from "../../index.164f1850.js";
|
|
2
2
|
import "three";
|
|
3
|
-
import { noTypecheck as
|
|
4
|
-
import { DimensionType as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { noTypecheck as q } from "../utils/noTypecheck.js";
|
|
4
|
+
import { DimensionType as I, PointType as W, ContentType as Y } from "../typings/tag.js";
|
|
5
|
+
import Z from "./Tag/index.js";
|
|
6
|
+
import x from "./Common/Point/PointSwitch.js";
|
|
7
7
|
import "./Tag/TextTag.js";
|
|
8
8
|
import "./Common/Line/Straight.js";
|
|
9
9
|
import "../../index.dca207cb.js";
|
|
@@ -30,30 +30,30 @@ import "./Tag/LinkTag.js";
|
|
|
30
30
|
import "./Tag/CustomTag.js";
|
|
31
31
|
import "./Common/Point/CustomPoint.js";
|
|
32
32
|
import "./Common/Point/DefaultPoint.js";
|
|
33
|
-
function
|
|
34
|
-
|
|
33
|
+
function $(e) {
|
|
34
|
+
Q(e, "svelte-1vzhbu2", ".wrapper.svelte-1vzhbu2{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}.point.svelte-1vzhbu2{-webkit-tap-highlight-color:transparent;position:absolute;transform:translate(-50%, -50%);left:50%;top:50%}");
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function j(e) {
|
|
37
37
|
let t, i;
|
|
38
|
-
return t = new
|
|
38
|
+
return t = new Z({
|
|
39
39
|
props: {
|
|
40
40
|
mediaStore: e[4],
|
|
41
41
|
withAnimation: e[0],
|
|
42
|
-
tag:
|
|
42
|
+
tag: q(e[1]),
|
|
43
43
|
hooks: e[2],
|
|
44
44
|
state: e[3],
|
|
45
45
|
temporaryState: e[5]
|
|
46
46
|
}
|
|
47
47
|
}), {
|
|
48
48
|
c() {
|
|
49
|
-
|
|
49
|
+
E(t.$$.fragment);
|
|
50
50
|
},
|
|
51
|
-
m(a,
|
|
52
|
-
|
|
51
|
+
m(a, s) {
|
|
52
|
+
F(t, a, s), i = !0;
|
|
53
53
|
},
|
|
54
|
-
p(a,
|
|
54
|
+
p(a, s) {
|
|
55
55
|
const o = {};
|
|
56
|
-
|
|
56
|
+
s & 16 && (o.mediaStore = a[4]), s & 1 && (o.withAnimation = a[0]), s & 2 && (o.tag = q(a[1])), s & 4 && (o.hooks = a[2]), s & 8 && (o.state = a[3]), s & 32 && (o.temporaryState = a[5]), t.$set(o);
|
|
57
57
|
},
|
|
58
58
|
i(a) {
|
|
59
59
|
i || (d(t.$$.fragment, a), i = !0);
|
|
@@ -62,22 +62,22 @@ function D(e) {
|
|
|
62
62
|
c(t.$$.fragment, a), i = !1;
|
|
63
63
|
},
|
|
64
64
|
d(a) {
|
|
65
|
-
|
|
65
|
+
G(t, a);
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
let t, i, a,
|
|
71
|
-
return i = new
|
|
69
|
+
function D(e) {
|
|
70
|
+
let t, i, a, s, o;
|
|
71
|
+
return i = new x({ props: { tag: e[1] } }), {
|
|
72
72
|
c() {
|
|
73
|
-
t =
|
|
73
|
+
t = K("div"), E(i.$$.fragment), k(t, "class", "point svelte-1vzhbu2");
|
|
74
74
|
},
|
|
75
75
|
m(n, f) {
|
|
76
|
-
|
|
76
|
+
L(n, t, f), F(i, t, null), a = !0, s || (o = V(t, "click", X(e[11])), s = !0);
|
|
77
77
|
},
|
|
78
78
|
p(n, f) {
|
|
79
|
-
const
|
|
80
|
-
f & 2 && (
|
|
79
|
+
const p = {};
|
|
80
|
+
f & 2 && (p.tag = n[1]), i.$set(p);
|
|
81
81
|
},
|
|
82
82
|
i(n) {
|
|
83
83
|
a || (d(i.$$.fragment, n), a = !0);
|
|
@@ -86,87 +86,86 @@ function K(e) {
|
|
|
86
86
|
c(i.$$.fragment, n), a = !1;
|
|
87
87
|
},
|
|
88
88
|
d(n) {
|
|
89
|
-
n &&
|
|
89
|
+
n && B(t), G(i), s = !1, o();
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
var f,
|
|
95
|
-
let t, i, a,
|
|
93
|
+
function tt(e) {
|
|
94
|
+
var f, p;
|
|
95
|
+
let t, i, a, s, o = e[1].dimensionType === I.Two && j(e), n = e[1].pointType === W.PointTag && ((p = (f = e[1].style) == null ? void 0 : f.point) == null ? void 0 : p.style) !== "noPoint" && D(e);
|
|
96
96
|
return {
|
|
97
97
|
c() {
|
|
98
|
-
t =
|
|
98
|
+
t = K("div"), o && o.c(), i = R(), n && n.c(), k(t, "class", "wrapper svelte-1vzhbu2"), k(t, "data-id", a = e[1].id), T(t, "hide", e[10]), T(t, "unfolded", e[6]), _(t, "left", e[9]), _(t, "top", e[8]), _(t, "z-index", e[7]);
|
|
99
99
|
},
|
|
100
|
-
m(r,
|
|
101
|
-
|
|
100
|
+
m(r, l) {
|
|
101
|
+
L(r, t, l), o && o.m(t, null), U(t, i), n && n.m(t, null), s = !0;
|
|
102
102
|
},
|
|
103
|
-
p(r, [
|
|
103
|
+
p(r, [l]) {
|
|
104
104
|
var g, h;
|
|
105
|
-
r[1].dimensionType ===
|
|
105
|
+
r[1].dimensionType === I.Two ? o ? (o.p(r, l), l & 2 && d(o, 1)) : (o = j(r), o.c(), d(o, 1), o.m(t, i)) : o && (C(), c(o, 1, 1, () => {
|
|
106
106
|
o = null;
|
|
107
|
-
}),
|
|
107
|
+
}), A()), r[1].pointType === W.PointTag && ((h = (g = r[1].style) == null ? void 0 : g.point) == null ? void 0 : h.style) !== "noPoint" ? n ? (n.p(r, l), l & 2 && d(n, 1)) : (n = D(r), n.c(), d(n, 1), n.m(t, null)) : n && (C(), c(n, 1, 1, () => {
|
|
108
108
|
n = null;
|
|
109
|
-
}),
|
|
109
|
+
}), A()), (!s || l & 2 && a !== (a = r[1].id)) && k(t, "data-id", a), (!s || l & 1024) && T(t, "hide", r[10]), (!s || l & 64) && T(t, "unfolded", r[6]), l & 512 && _(t, "left", r[9]), l & 256 && _(t, "top", r[8]), l & 128 && _(t, "z-index", r[7]);
|
|
110
110
|
},
|
|
111
111
|
i(r) {
|
|
112
|
-
|
|
112
|
+
s || (d(o), d(n), s = !0);
|
|
113
113
|
},
|
|
114
114
|
o(r) {
|
|
115
|
-
c(o), c(n),
|
|
115
|
+
c(o), c(n), s = !1;
|
|
116
116
|
},
|
|
117
117
|
d(r) {
|
|
118
|
-
r &&
|
|
118
|
+
r && B(t), o && o.d(), n && n.d();
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
let a,
|
|
124
|
-
var r,
|
|
125
|
-
let { withAnimation:
|
|
126
|
-
function
|
|
127
|
-
|
|
122
|
+
function et(e, t, i) {
|
|
123
|
+
let a, s, o, n, f, p;
|
|
124
|
+
var r, l, g, h;
|
|
125
|
+
let { withAnimation: b = !1 } = t, { tag: u } = t, { hooks: w } = t, { state: v } = t, { mediaStore: P } = t, { temporaryState: z } = t, y, S = !1;
|
|
126
|
+
function H(m) {
|
|
127
|
+
y !== void 0 && clearTimeout(y), S = !0, y = setTimeout(
|
|
128
128
|
() => {
|
|
129
|
-
|
|
129
|
+
S = !1;
|
|
130
130
|
},
|
|
131
131
|
800
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
|
-
const
|
|
135
|
-
|
|
134
|
+
const J = (m) => {
|
|
135
|
+
S || w.emit("click", { event: m, target: "TagPoint", tag: u });
|
|
136
136
|
};
|
|
137
137
|
return e.$$set = (m) => {
|
|
138
|
-
"withAnimation" in m && i(0,
|
|
138
|
+
"withAnimation" in m && i(0, b = m.withAnimation), "tag" in m && i(1, u = m.tag), "hooks" in m && i(2, w = m.hooks), "state" in m && i(3, v = m.state), "mediaStore" in m && i(4, P = m.mediaStore), "temporaryState" in m && i(5, z = m.temporaryState);
|
|
139
139
|
}, e.$$.update = () => {
|
|
140
|
-
e.$$.dirty & 4098 && i(
|
|
140
|
+
e.$$.dirty & 4098 && i(16, a = i(12, r = u.state) === null || r === void 0 ? void 0 : r.visible), e.$$.dirty & 65536 && i(10, s = !a), e.$$.dirty & 8194 && i(6, o = i(13, l = u.state) === null || l === void 0 ? void 0 : l.unfolded), e.$$.dirty & 16386 && i(9, n = (i(14, g = u.pointTagStyle) === null || g === void 0 ? void 0 : g.leftPercent) + "%"), e.$$.dirty & 32770 && i(8, f = (i(15, h = u.pointTagStyle) === null || h === void 0 ? void 0 : h.topPercent) + "%"), e.$$.dirty & 2 && i(7, p = u.contentType === Y.Link ? 1 : 0), e.$$.dirty & 64 && H();
|
|
141
141
|
}, [
|
|
142
|
+
b,
|
|
143
|
+
u,
|
|
144
|
+
w,
|
|
142
145
|
v,
|
|
143
|
-
p,
|
|
144
|
-
y,
|
|
145
146
|
P,
|
|
146
147
|
z,
|
|
147
|
-
A,
|
|
148
148
|
o,
|
|
149
|
-
|
|
149
|
+
p,
|
|
150
150
|
f,
|
|
151
151
|
n,
|
|
152
|
-
l,
|
|
153
|
-
M,
|
|
154
|
-
r,
|
|
155
152
|
s,
|
|
153
|
+
J,
|
|
154
|
+
r,
|
|
155
|
+
l,
|
|
156
156
|
g,
|
|
157
157
|
h,
|
|
158
|
-
T,
|
|
159
158
|
a
|
|
160
159
|
];
|
|
161
160
|
}
|
|
162
|
-
class
|
|
161
|
+
class Kt extends M {
|
|
163
162
|
constructor(t) {
|
|
164
|
-
super(),
|
|
163
|
+
super(), N(
|
|
165
164
|
this,
|
|
166
165
|
t,
|
|
167
|
-
it,
|
|
168
166
|
et,
|
|
169
|
-
|
|
167
|
+
tt,
|
|
168
|
+
O,
|
|
170
169
|
{
|
|
171
170
|
withAnimation: 0,
|
|
172
171
|
tag: 1,
|
|
@@ -175,10 +174,10 @@ class Lt extends N {
|
|
|
175
174
|
mediaStore: 4,
|
|
176
175
|
temporaryState: 5
|
|
177
176
|
},
|
|
178
|
-
|
|
177
|
+
$
|
|
179
178
|
);
|
|
180
179
|
}
|
|
181
180
|
}
|
|
182
181
|
export {
|
|
183
|
-
|
|
182
|
+
Kt as default
|
|
184
183
|
};
|
|
@@ -18,7 +18,7 @@ declare class PanoTagPluginController extends TagComputer {
|
|
|
18
18
|
/** css3DRenderPlugin */
|
|
19
19
|
private css3DRenderPlugin?;
|
|
20
20
|
/** 点标签 */
|
|
21
|
-
private
|
|
21
|
+
private TagContainerSvelte?;
|
|
22
22
|
/** 临时状态 */
|
|
23
23
|
private temporaryState;
|
|
24
24
|
private mediaStore;
|
|
@@ -101,6 +101,7 @@ declare class PanoTagPluginController extends TagComputer {
|
|
|
101
101
|
* @description: 添加 cameraUpdate, panoArrived 等事件监听
|
|
102
102
|
*/
|
|
103
103
|
private addEventListener;
|
|
104
|
+
private addResizeListener;
|
|
104
105
|
private addResizeObserver;
|
|
105
106
|
/**
|
|
106
107
|
* @description: 切换模式处理函数
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var T = Object.defineProperty;
|
|
2
|
-
var C = (
|
|
3
|
-
var a = (
|
|
2
|
+
var C = (l, h, e) => h in l ? T(l, h, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[h] = e;
|
|
3
|
+
var a = (l, h, e) => (C(l, typeof h != "symbol" ? h + "" : h, e), e);
|
|
4
4
|
import { Subscribe as D } from "@realsee/five";
|
|
5
5
|
import { Quaternion as y } from "three";
|
|
6
|
-
import { T as S, o as c } from "../../TagComputer.
|
|
7
|
-
import { w as
|
|
8
|
-
import
|
|
6
|
+
import { T as S, o as c } from "../../TagComputer.92e6d9a9.js";
|
|
7
|
+
import { w as A } from "../../index.ad783a2f.js";
|
|
8
|
+
import P from "../Components/TagContainer.js";
|
|
9
9
|
import R from "../Components/Tag/index.js";
|
|
10
10
|
import { arrayPositionToVector3 as p } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
11
11
|
import { addDebugPoints as w } from "../utils/addDebugPoints.js";
|
|
@@ -15,7 +15,7 @@ import { normalPositionToPositions as k } from "../utils/normalPositionToPositio
|
|
|
15
15
|
import { debounce as m } from "../utils/debounce.js";
|
|
16
16
|
import { throttle as F } from "../utils/throttle.js";
|
|
17
17
|
import { resizeObserver as u } from "../utils/resizeObserver.js";
|
|
18
|
-
import { CSS3DRenderPlugin as
|
|
18
|
+
import { CSS3DRenderPlugin as L } from "../../CSS3DRenderPlugin/index.js";
|
|
19
19
|
import { PointType as f, DimensionType as v } from "../typings/tag.js";
|
|
20
20
|
import "../tag.config.js";
|
|
21
21
|
import "../utils/tagPosition.js";
|
|
@@ -59,7 +59,7 @@ import "../../CSS3DRenderPlugin/CSS3DRender.js";
|
|
|
59
59
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
60
60
|
import "../../CSS3DRenderPlugin/utils/evenNumber.js";
|
|
61
61
|
import "../../CSS3DRenderPlugin/utils/CSS3DObjectPlus.js";
|
|
62
|
-
const b = "1.2.
|
|
62
|
+
const b = "1.2.6", g = `DnalogelPlugin-PanoTagPlugin@${b}`, B = !1, $e = (l) => `${g}--${l}`;
|
|
63
63
|
class je extends S {
|
|
64
64
|
constructor(e, t) {
|
|
65
65
|
super(e);
|
|
@@ -68,9 +68,9 @@ class je extends S {
|
|
|
68
68
|
a(this, "params");
|
|
69
69
|
a(this, "debug");
|
|
70
70
|
a(this, "css3DRenderPlugin");
|
|
71
|
-
a(this, "
|
|
71
|
+
a(this, "TagContainerSvelte");
|
|
72
72
|
a(this, "temporaryState", { visible: !0 });
|
|
73
|
-
a(this, "mediaStore",
|
|
73
|
+
a(this, "mediaStore", A({
|
|
74
74
|
currentMediaUrl: ""
|
|
75
75
|
}));
|
|
76
76
|
a(this, "store", {
|
|
@@ -114,20 +114,14 @@ class je extends S {
|
|
|
114
114
|
const n = this.getTagConfig(o);
|
|
115
115
|
return {
|
|
116
116
|
...o,
|
|
117
|
-
state: { visible: void 0, unfolded:
|
|
117
|
+
state: { visible: void 0, unfolded: B, ...n.initialState },
|
|
118
118
|
hooks: new D(),
|
|
119
119
|
clickable: n.clickable
|
|
120
120
|
};
|
|
121
121
|
}).filter((o) => o.position);
|
|
122
122
|
this.tags.push(...s), U(this.five, () => {
|
|
123
123
|
var o, n, r;
|
|
124
|
-
|
|
125
|
-
const l = this.addResizeObserver();
|
|
126
|
-
this.store.resizeObserverDisposerAdding = !0, setTimeout(() => {
|
|
127
|
-
this.store.resizeObserverDisposer = l, this.store.resizeObserverDisposerAdding = !1;
|
|
128
|
-
}, 200);
|
|
129
|
-
}
|
|
130
|
-
this.checkPanelTag(), this.setVisibleAndUnfolded({ withAnimation: (r = t == null ? void 0 : t.withAnimation) != null ? r : !0 }).then(() => this.updateRenderAllTags()), this.updateRenderAllTags();
|
|
124
|
+
this.store.eventListenerDisposer && ((n = (o = this.store).eventListenerDisposer) == null || n.call(o)), this.state.enabled && (this.store.eventListenerDisposer = this.addEventListener()), this.addResizeListener(), this.checkPanelTag(), this.setVisibleAndUnfolded({ withAnimation: (r = t == null ? void 0 : t.withAnimation) != null ? r : !0 }).then(() => this.updateRenderAllTags()), this.updateRenderAllTags();
|
|
131
125
|
});
|
|
132
126
|
}
|
|
133
127
|
clearTags() {
|
|
@@ -159,9 +153,9 @@ class je extends S {
|
|
|
159
153
|
}
|
|
160
154
|
dispose() {
|
|
161
155
|
var e, t, i, s, o, n;
|
|
162
|
-
this.disposeAllCSS3DContainer(), (e = this.
|
|
163
|
-
var
|
|
164
|
-
return (
|
|
156
|
+
this.disposeAllCSS3DContainer(), (e = this.TagContainerSvelte) == null || e.$destroy(), this.filter3DTag().forEach((r) => {
|
|
157
|
+
var d;
|
|
158
|
+
return (d = r.tag3DContentSvelte) == null ? void 0 : d.svelteApp.$destroy();
|
|
165
159
|
}), this.tags = [], (t = this.store.disposers) == null || t.forEach((r) => r == null ? void 0 : r()), this.store.disposers = [], this.store.disposed = !0, (s = (i = this.store).eventListenerDisposer) == null || s.call(i), this.store.eventListenerDisposer = void 0, (n = (o = this.store).resizeObserverDisposer) == null || n.call(o), this.store.resizeObserverDisposer = void 0, this.store.resizeObserverDisposerAdding = !1, this.clearCache(), this.hooks.emit("dispose");
|
|
166
160
|
}
|
|
167
161
|
setState(e, t) {
|
|
@@ -205,35 +199,47 @@ class je extends S {
|
|
|
205
199
|
this.state.visible = !1, this.updateTagContainerVisible();
|
|
206
200
|
}
|
|
207
201
|
handleEnable() {
|
|
208
|
-
this.state.enabled = !0, this.updateRenderAllTags();
|
|
202
|
+
this.state.enabled = !0, this.store.eventListenerDisposer = this.addEventListener(), this.updateRenderAllTags();
|
|
209
203
|
}
|
|
210
204
|
handleDisable() {
|
|
211
|
-
var e;
|
|
212
|
-
this.state.enabled = !1, (e = this.
|
|
213
|
-
var
|
|
214
|
-
(
|
|
205
|
+
var e, t, i;
|
|
206
|
+
this.state.enabled = !1, (t = (e = this.store).eventListenerDisposer) == null || t.call(e), (i = this.TagContainerSvelte) == null || i.$set({ tags: [] }), this.filter3DTag().forEach((s) => {
|
|
207
|
+
var o;
|
|
208
|
+
(o = s.tag3DContentSvelte) == null || o.svelteApp.$destroy(), s.tag3DContentSvelte = void 0;
|
|
215
209
|
});
|
|
216
210
|
}
|
|
217
211
|
addEventListener() {
|
|
218
|
-
const { five: e, hooks: t } = this, i = this.handleFiveWantsMoveToPano.bind(this), s = this.handleFiveModeChange.bind(this), o = this.handleFiveCameraUpdate.bind(this), n = this.handleFiveCameraUpdateDebounce(), r = this.handleFivePanoArrived.bind(this),
|
|
219
|
-
return e.on("wantsMoveToPano", i), e.on("modeChange", s), e.on("cameraUpdate", o), e.on("cameraUpdate", n), e.on("panoArrived", r), t.on("click",
|
|
220
|
-
e.off("wantsMoveToPano", i), e.off("modeChange", s), e.off("cameraUpdate", o), e.off("cameraUpdate", n), e.off("panoArrived", r), t.off("click",
|
|
212
|
+
const { five: e, hooks: t } = this, i = this.handleFiveWantsMoveToPano.bind(this), s = this.handleFiveModeChange.bind(this), o = this.handleFiveCameraUpdate.bind(this), n = this.handleFiveCameraUpdateDebounce(), r = this.handleFivePanoArrived.bind(this), d = this.clickhandler.bind(this);
|
|
213
|
+
return e.on("wantsMoveToPano", i), e.on("modeChange", s), e.on("cameraUpdate", o), e.on("cameraUpdate", n), e.on("panoArrived", r), t.on("click", d), () => {
|
|
214
|
+
e.off("wantsMoveToPano", i), e.off("modeChange", s), e.off("cameraUpdate", o), e.off("cameraUpdate", n), e.off("panoArrived", r), t.off("click", d), this.store.eventListenerDisposer = void 0;
|
|
221
215
|
};
|
|
222
216
|
}
|
|
217
|
+
addResizeListener() {
|
|
218
|
+
if (!this.store.resizeObserverDisposer && !this.store.resizeObserverDisposerAdding) {
|
|
219
|
+
const e = this.addResizeObserver();
|
|
220
|
+
this.store.resizeObserverDisposerAdding = !0, setTimeout(() => {
|
|
221
|
+
this.store.resizeObserverDisposer = e, this.store.resizeObserverDisposerAdding = !1;
|
|
222
|
+
}, 200);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
223
225
|
addResizeObserver() {
|
|
226
|
+
if (!this.store.disposed)
|
|
227
|
+
return;
|
|
224
228
|
const e = this.five.getElement(), t = () => {
|
|
225
|
-
this.show(), this.updateRenderAllTags();
|
|
226
|
-
},
|
|
229
|
+
!this.state.enabled || (this.show(), this.updateRenderAllTags());
|
|
230
|
+
}, i = () => {
|
|
231
|
+
!this.state.enabled || this.hide();
|
|
232
|
+
}, { observe: s, unobserve: o } = u(
|
|
227
233
|
F(() => {
|
|
228
|
-
!this.store.resizeObserverDisposer ||
|
|
234
|
+
!this.store.resizeObserverDisposer || i();
|
|
229
235
|
}, 500),
|
|
230
236
|
e
|
|
231
|
-
), { observe:
|
|
237
|
+
), { observe: n, unobserve: r } = u(
|
|
232
238
|
m(() => t(), 400),
|
|
233
239
|
e
|
|
234
240
|
);
|
|
235
|
-
return
|
|
236
|
-
|
|
241
|
+
return s(), n(), () => {
|
|
242
|
+
o(), r();
|
|
237
243
|
};
|
|
238
244
|
}
|
|
239
245
|
handleFiveModeChange(e) {
|
|
@@ -266,7 +272,11 @@ class je extends S {
|
|
|
266
272
|
}
|
|
267
273
|
updateTagContainerVisible() {
|
|
268
274
|
var e;
|
|
269
|
-
(e = this.
|
|
275
|
+
(e = this.TagContainerSvelte) == null || e.$set({
|
|
276
|
+
state: this.state,
|
|
277
|
+
temporaryState: this.temporaryState,
|
|
278
|
+
withAnimation: this.store.visibleWithAnimation
|
|
279
|
+
}), this.filter3DTag().forEach((t) => {
|
|
270
280
|
var i;
|
|
271
281
|
(i = t.tag3DContentSvelte) == null || i.svelteApp.$set({
|
|
272
282
|
state: this.state,
|
|
@@ -301,13 +311,13 @@ class je extends S {
|
|
|
301
311
|
updateRenderPointTag() {
|
|
302
312
|
var t;
|
|
303
313
|
const e = this.filterPointTag();
|
|
304
|
-
if (this.setPointTagPosition(), this.
|
|
305
|
-
this.
|
|
314
|
+
if (this.setPointTagPosition(), this.TagContainerSvelte)
|
|
315
|
+
this.TagContainerSvelte.$set({ tags: e, state: this.state, temporaryState: this.temporaryState });
|
|
306
316
|
else {
|
|
307
317
|
const i = (t = this.five.getElement()) == null ? void 0 : t.parentElement;
|
|
308
318
|
if (!i)
|
|
309
319
|
return console.error("updateRenderPlaneTag: tag2DContainer not found");
|
|
310
|
-
this.
|
|
320
|
+
this.TagContainerSvelte = new P({
|
|
311
321
|
target: i,
|
|
312
322
|
props: { hooks: this.hooks, tags: e, state: this.state, temporaryState: this.temporaryState, mediaStore: this.mediaStore }
|
|
313
323
|
});
|
|
@@ -324,13 +334,13 @@ class je extends S {
|
|
|
324
334
|
state: this.state,
|
|
325
335
|
temporaryState: this.temporaryState
|
|
326
336
|
}), !n.equals(r)) {
|
|
327
|
-
const
|
|
328
|
-
o.css3DObject.setRotationFromQuaternion(
|
|
337
|
+
const d = new y().setFromUnitVectors(n, r);
|
|
338
|
+
o.css3DObject.setRotationFromQuaternion(d);
|
|
329
339
|
}
|
|
330
340
|
} else {
|
|
331
341
|
if (((i = t.state) == null ? void 0 : i.visible) === !1)
|
|
332
342
|
return;
|
|
333
|
-
if (this.css3DRenderPlugin || (this.css3DRenderPlugin =
|
|
343
|
+
if (this.css3DRenderPlugin || (this.css3DRenderPlugin = L(this.five)), t.pointType === f.PointTag && !t.normal)
|
|
334
344
|
return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");
|
|
335
345
|
const s = t.pointType === f.PlaneTag ? t.position : k(this.five.camera.position, p(t.position), p(t.normal)), o = t.pointType === f.PlaneTag ? E(t.position) : p(t.normal), n = this.getTagConfig(t).tag3DConfig, r = this.css3DRenderPlugin.create3DDomContainer(s, n);
|
|
336
346
|
if (!r)
|
|
@@ -372,5 +382,5 @@ class je extends S {
|
|
|
372
382
|
export {
|
|
373
383
|
je as PanoTagPluginController,
|
|
374
384
|
je as default,
|
|
375
|
-
|
|
385
|
+
$e as pluginFlag
|
|
376
386
|
};
|
|
@@ -3,7 +3,7 @@ import { default as go, pluginFlag as Po } from "./controller/index.js";
|
|
|
3
3
|
import { ContentType as uo, DimensionType as fo, LinkType as so, PointType as yo } from "./typings/tag.js";
|
|
4
4
|
import "@realsee/five";
|
|
5
5
|
import "three";
|
|
6
|
-
import "../TagComputer.
|
|
6
|
+
import "../TagComputer.92e6d9a9.js";
|
|
7
7
|
import "./tag.config.js";
|
|
8
8
|
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
9
9
|
import "./utils/planeNormal.js";
|
|
@@ -15,7 +15,7 @@ import "../base/BasePlugin.js";
|
|
|
15
15
|
import "../shared-utils/Subscribe.js";
|
|
16
16
|
import "../index.ad783a2f.js";
|
|
17
17
|
import "../index.164f1850.js";
|
|
18
|
-
import "./Components/
|
|
18
|
+
import "./Components/TagContainer.js";
|
|
19
19
|
import "./Components/TagWrapper.js";
|
|
20
20
|
import "./utils/noTypecheck.js";
|
|
21
21
|
import "./Components/Tag/index.js";
|
|
File without changes
|
package/libs/index.js
CHANGED
|
@@ -205,13 +205,13 @@ import "./ItemLabelPlugin/utils/getStrokeLength.js";
|
|
|
205
205
|
import "./ItemLabelPlugin/utils/getLabelTransform.js";
|
|
206
206
|
import "./ItemLabelPlugin/utils/transform2RenderData.js";
|
|
207
207
|
import "./ItemLabelPlugin/utils/parseData.js";
|
|
208
|
-
import "./TagComputer.
|
|
208
|
+
import "./TagComputer.92e6d9a9.js";
|
|
209
209
|
import "./PanoTagPlugin/tag.config.js";
|
|
210
210
|
import "./PanoTagPlugin/utils/planeNormal.js";
|
|
211
211
|
import "./PanoTagPlugin/utils/tagPosition.js";
|
|
212
212
|
import "./PanoTagPlugin/utils/checkRange.js";
|
|
213
213
|
import "./PanoTagPlugin/controller/TagCacheController.js";
|
|
214
|
-
import "./PanoTagPlugin/Components/
|
|
214
|
+
import "./PanoTagPlugin/Components/TagContainer.js";
|
|
215
215
|
import "./PanoTagPlugin/Components/TagWrapper.js";
|
|
216
216
|
import "./PanoTagPlugin/utils/noTypecheck.js";
|
|
217
217
|
import "./PanoTagPlugin/Components/Tag/index.js";
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
7
7
|
"description": "如视 VR 看房插件合集",
|
|
8
8
|
"private": false,
|
|
9
|
-
"version": "2.1.0-alpha.
|
|
9
|
+
"version": "2.1.0-alpha.29",
|
|
10
10
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "sh bin/build-production.sh",
|