@realsee/dnalogel 2.1.0-alpha.26 → 2.1.0-alpha.28
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 +556 -0
- package/dist/index.es.js +21392 -0
- package/dist/index.js +5104 -4997
- package/dist/index.umd.js +556 -0
- 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/CSS3DRenderPlugin/CSS3DRender.d.ts +15 -4
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +197 -143
- package/libs/CSS3DRenderPlugin/Controller.d.ts +2 -0
- package/libs/CSS3DRenderPlugin/Controller.js +47 -26
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.d.ts +22 -4
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +56 -37
- package/libs/Object3DHelperPlugin/Controller.js +24 -23
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +81 -81
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +69 -68
- package/libs/PanoTagPlugin/controller/index.js +1 -1
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +63 -53
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +12 -13
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +43 -45
- package/libs/shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js +16 -10
- package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js +43 -43
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +2 -2
- package/libs/shared-utils/Object3DHelper/index.js +12 -12
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as j, i as q, s as Y, a as A, r as R, c as h, f as d, t as c, d as D, g as w, j as y, o as $, e as
|
|
1
|
+
import { S as j, i as q, s as Y, a as A, r as R, c as h, f as d, t as c, d as D, g as w, j as y, o as $, e as N, b as z, m as k, h as C, B as E, C as F, k as v } from "../../../index.164f1850.js";
|
|
2
2
|
import G from "../../../shared-utils/uuid.js";
|
|
3
3
|
import H from "../Common/Text.js";
|
|
4
4
|
import J from "../Common/Line/Polyline.js";
|
|
@@ -13,18 +13,18 @@ import "../../../index.6a0eead1.js";
|
|
|
13
13
|
import "../../utils/noTypecheck.js";
|
|
14
14
|
import "../Common/MediaItem.js";
|
|
15
15
|
import "../../Assets/Icon.js";
|
|
16
|
-
function O(
|
|
17
|
-
A(
|
|
16
|
+
function O(r) {
|
|
17
|
+
A(r, "svelte-1p8f9wy", ".line.svelte-1p8f9wy{position:absolute;width:6.5625rem;height:1.3125rem;transform:translateY(-100%);z-index:10}.text.svelte-1p8f9wy{position:absolute;width:6.25rem;left:1rem;bottom:0.0625rem;z-index:10;font-weight:600}.media-wrapper.svelte-1p8f9wy{position:absolute;left:0.875rem;top:-5.3125rem;width:5.625rem;height:3.75rem;z-index:10;font-weight:600}");
|
|
18
18
|
}
|
|
19
|
-
function T(
|
|
20
|
-
const e =
|
|
19
|
+
function T(r, l, i) {
|
|
20
|
+
const e = r.slice();
|
|
21
21
|
return e[8] = l[i].id, e[1] = l[i].content, e;
|
|
22
22
|
}
|
|
23
|
-
function B(
|
|
24
|
-
let l, i, e, o,
|
|
23
|
+
function B(r) {
|
|
24
|
+
let l, i, e, o, a, s = [], m = /* @__PURE__ */ new Map(), p, u, b;
|
|
25
25
|
l = new L({
|
|
26
26
|
props: {
|
|
27
|
-
visible:
|
|
27
|
+
visible: r[4],
|
|
28
28
|
left: 61,
|
|
29
29
|
bottom: 57,
|
|
30
30
|
width: 2,
|
|
@@ -33,62 +33,62 @@ function B(a) {
|
|
|
33
33
|
}
|
|
34
34
|
}), o = new J({
|
|
35
35
|
props: {
|
|
36
|
-
unfolded:
|
|
36
|
+
unfolded: r[4],
|
|
37
37
|
duration: 1e3,
|
|
38
38
|
outDelay: 400
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
|
-
let g =
|
|
41
|
+
let g = r[2];
|
|
42
42
|
const I = (t) => t[8];
|
|
43
43
|
for (let t = 0; t < g.length; t += 1) {
|
|
44
|
-
let n = T(
|
|
45
|
-
m.set(_,
|
|
44
|
+
let n = T(r, g, t), _ = I(n);
|
|
45
|
+
m.set(_, s[t] = M(_, n));
|
|
46
46
|
}
|
|
47
|
-
let
|
|
47
|
+
let f = r[3] && P(r);
|
|
48
48
|
return {
|
|
49
49
|
c() {
|
|
50
|
-
y(l.$$.fragment), i = $(), e =
|
|
51
|
-
for (let t = 0; t <
|
|
52
|
-
|
|
53
|
-
p = $(),
|
|
50
|
+
y(l.$$.fragment), i = $(), e = N("div"), y(o.$$.fragment), a = $();
|
|
51
|
+
for (let t = 0; t < s.length; t += 1)
|
|
52
|
+
s[t].c();
|
|
53
|
+
p = $(), f && f.c(), u = R(), z(e, "class", "line svelte-1p8f9wy");
|
|
54
54
|
},
|
|
55
55
|
m(t, n) {
|
|
56
|
-
k(l, t, n), h(t, i, n), h(t, e, n), k(o, e, null), h(t,
|
|
57
|
-
for (let _ = 0; _ <
|
|
58
|
-
|
|
59
|
-
h(t, p, n),
|
|
56
|
+
k(l, t, n), h(t, i, n), h(t, e, n), k(o, e, null), h(t, a, n);
|
|
57
|
+
for (let _ = 0; _ < s.length; _ += 1)
|
|
58
|
+
s[_].m(t, n);
|
|
59
|
+
h(t, p, n), f && f.m(t, n), h(t, u, n), b = !0;
|
|
60
60
|
},
|
|
61
61
|
p(t, n) {
|
|
62
62
|
const _ = {};
|
|
63
63
|
n & 16 && (_.visible = t[4]), l.$set(_);
|
|
64
64
|
const S = {};
|
|
65
|
-
n & 16 && (S.unfolded = t[4]), o.$set(S), n & 20 && (g = t[2],
|
|
66
|
-
|
|
65
|
+
n & 16 && (S.unfolded = t[4]), o.$set(S), n & 20 && (g = t[2], C(), s = E(s, n, I, 1, t, g, m, p.parentNode, F, M, p, T), D()), t[3] ? f ? (f.p(t, n), n & 8 && d(f, 1)) : (f = P(t), f.c(), d(f, 1), f.m(u.parentNode, u)) : f && (C(), c(f, 1, 1, () => {
|
|
66
|
+
f = null;
|
|
67
67
|
}), D());
|
|
68
68
|
},
|
|
69
69
|
i(t) {
|
|
70
70
|
if (!b) {
|
|
71
71
|
d(l.$$.fragment, t), d(o.$$.fragment, t);
|
|
72
72
|
for (let n = 0; n < g.length; n += 1)
|
|
73
|
-
d(
|
|
74
|
-
d(
|
|
73
|
+
d(s[n]);
|
|
74
|
+
d(f), b = !0;
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
o(t) {
|
|
78
78
|
c(l.$$.fragment, t), c(o.$$.fragment, t);
|
|
79
|
-
for (let n = 0; n <
|
|
80
|
-
c(
|
|
81
|
-
c(
|
|
79
|
+
for (let n = 0; n < s.length; n += 1)
|
|
80
|
+
c(s[n]);
|
|
81
|
+
c(f), b = !1;
|
|
82
82
|
},
|
|
83
83
|
d(t) {
|
|
84
|
-
v(l, t), t && w(i), t && w(e), v(o), t && w(
|
|
85
|
-
for (let n = 0; n <
|
|
86
|
-
|
|
87
|
-
t && w(p),
|
|
84
|
+
v(l, t), t && w(i), t && w(e), v(o), t && w(a);
|
|
85
|
+
for (let n = 0; n < s.length; n += 1)
|
|
86
|
+
s[n].d(t);
|
|
87
|
+
t && w(p), f && f.d(t), t && w(u);
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
function M(
|
|
91
|
+
function M(r, l) {
|
|
92
92
|
let i, e, o;
|
|
93
93
|
return e = new H({
|
|
94
94
|
props: {
|
|
@@ -97,37 +97,38 @@ function M(a, l) {
|
|
|
97
97
|
inDelay: 500
|
|
98
98
|
}
|
|
99
99
|
}), {
|
|
100
|
-
key:
|
|
100
|
+
key: r,
|
|
101
101
|
first: null,
|
|
102
102
|
c() {
|
|
103
|
-
i =
|
|
103
|
+
i = N("div"), y(e.$$.fragment), z(i, "class", "text svelte-1p8f9wy"), this.first = i;
|
|
104
104
|
},
|
|
105
|
-
m(
|
|
106
|
-
h(
|
|
105
|
+
m(a, s) {
|
|
106
|
+
h(a, i, s), k(e, i, null), o = !0;
|
|
107
107
|
},
|
|
108
|
-
p(
|
|
109
|
-
l =
|
|
108
|
+
p(a, s) {
|
|
109
|
+
l = a;
|
|
110
110
|
const m = {};
|
|
111
|
-
|
|
111
|
+
s & 16 && (m.unfolded = l[4]), s & 4 && (m.content = l[1]), e.$set(m);
|
|
112
112
|
},
|
|
113
|
-
i(
|
|
114
|
-
o || (d(e.$$.fragment,
|
|
113
|
+
i(a) {
|
|
114
|
+
o || (d(e.$$.fragment, a), o = !0);
|
|
115
115
|
},
|
|
116
|
-
o(
|
|
117
|
-
c(e.$$.fragment,
|
|
116
|
+
o(a) {
|
|
117
|
+
c(e.$$.fragment, a), o = !1;
|
|
118
118
|
},
|
|
119
|
-
d(
|
|
120
|
-
|
|
119
|
+
d(a) {
|
|
120
|
+
a && w(i), v(e);
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
function P(
|
|
124
|
+
function P(r) {
|
|
125
125
|
let l, i, e;
|
|
126
126
|
return i = new K({
|
|
127
127
|
props: {
|
|
128
128
|
autoplayConfig: { autoplay: !1 },
|
|
129
|
-
unfolded:
|
|
130
|
-
mediaData:
|
|
129
|
+
unfolded: r[4],
|
|
130
|
+
mediaData: r[3],
|
|
131
|
+
enableCarousel: !1,
|
|
131
132
|
canPlay: !1,
|
|
132
133
|
playButtonIfNeed: "small",
|
|
133
134
|
inDelay: 500,
|
|
@@ -135,14 +136,14 @@ function P(a) {
|
|
|
135
136
|
}
|
|
136
137
|
}), {
|
|
137
138
|
c() {
|
|
138
|
-
l =
|
|
139
|
+
l = N("div"), y(i.$$.fragment), z(l, "class", "media-wrapper svelte-1p8f9wy");
|
|
139
140
|
},
|
|
140
|
-
m(o,
|
|
141
|
-
h(o, l,
|
|
141
|
+
m(o, a) {
|
|
142
|
+
h(o, l, a), k(i, l, null), e = !0;
|
|
142
143
|
},
|
|
143
|
-
p(o,
|
|
144
|
-
const
|
|
145
|
-
|
|
144
|
+
p(o, a) {
|
|
145
|
+
const s = {};
|
|
146
|
+
a & 16 && (s.unfolded = o[4]), a & 8 && (s.mediaData = o[3]), i.$set(s);
|
|
146
147
|
},
|
|
147
148
|
i(o) {
|
|
148
149
|
e || (d(i.$$.fragment, o), e = !0);
|
|
@@ -155,17 +156,17 @@ function P(a) {
|
|
|
155
156
|
}
|
|
156
157
|
};
|
|
157
158
|
}
|
|
158
|
-
function Q(
|
|
159
|
-
let l, i, e =
|
|
159
|
+
function Q(r) {
|
|
160
|
+
let l, i, e = r[0].state && B(r);
|
|
160
161
|
return {
|
|
161
162
|
c() {
|
|
162
163
|
e && e.c(), l = R();
|
|
163
164
|
},
|
|
164
|
-
m(o,
|
|
165
|
-
e && e.m(o,
|
|
165
|
+
m(o, a) {
|
|
166
|
+
e && e.m(o, a), h(o, l, a), i = !0;
|
|
166
167
|
},
|
|
167
|
-
p(o, [
|
|
168
|
-
o[0].state ? e ? (e.p(o,
|
|
168
|
+
p(o, [a]) {
|
|
169
|
+
o[0].state ? e ? (e.p(o, a), a & 1 && d(e, 1)) : (e = B(o), e.c(), d(e, 1), e.m(l.parentNode, l)) : e && (C(), c(e, 1, 1, () => {
|
|
169
170
|
e = null;
|
|
170
171
|
}), D());
|
|
171
172
|
},
|
|
@@ -180,15 +181,15 @@ function Q(a) {
|
|
|
180
181
|
}
|
|
181
182
|
};
|
|
182
183
|
}
|
|
183
|
-
function U(
|
|
184
|
-
let e, o,
|
|
185
|
-
var
|
|
184
|
+
function U(r, l, i) {
|
|
185
|
+
let e, o, a;
|
|
186
|
+
var s, m, p;
|
|
186
187
|
let { tag: u } = l, b;
|
|
187
|
-
return
|
|
188
|
+
return r.$$set = (g) => {
|
|
188
189
|
"tag" in g && i(0, u = g.tag);
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
}, [u, o, b,
|
|
190
|
+
}, r.$$.update = () => {
|
|
191
|
+
r.$$.dirty & 1 && i(4, e = u.state ? u.state.unfolded : !1), r.$$.dirty & 225 && i(1, o = (i(6, m = i(5, s = u.data.text) === null || s === void 0 ? void 0 : s.length) !== null && m !== void 0 ? m : 0) > 7 ? (i(7, p = u.data.text) === null || p === void 0 ? void 0 : p.substring(0, 6)) + "..." : u.data.text), r.$$.dirty & 1 && i(3, a = u.data.mediaData), r.$$.dirty & 2 && i(2, b = o ? [{ id: G(), content: o }] : []);
|
|
192
|
+
}, [u, o, b, a, e, s, m, p];
|
|
192
193
|
}
|
|
193
194
|
class ue extends j {
|
|
194
195
|
constructor(l) {
|
|
@@ -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.2", g = `DnalogelPlugin-PanoTagPlugin@${b}`, O = !1, ze = (h) => `${g}--${h}`;
|
|
63
63
|
class je extends S {
|
|
64
64
|
constructor(e, t) {
|
|
65
65
|
super(e);
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var O = (p, e, t) => e in p ? m(p, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[e] = t;
|
|
3
|
+
var s = (p, e, t) => (O(p, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import * as l from "three";
|
|
5
|
-
import { Subscribe as
|
|
6
|
-
import
|
|
7
|
-
import { notNil as
|
|
8
|
-
import { CSS3DObjectPlus as
|
|
5
|
+
import { Subscribe as y } from "../../Subscribe.js";
|
|
6
|
+
import j from "../utils/threex/domevents/index.js";
|
|
7
|
+
import { notNil as g } from "../../isNil.js";
|
|
8
|
+
import { CSS3DObjectPlus as D } from "../../../CSS3DRenderPlugin/utils/CSS3DObjectPlus.js";
|
|
9
9
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
10
10
|
import "../../../CSS3DRenderPlugin/utils/evenNumber.js";
|
|
11
11
|
import "../../../CSS3DRenderPlugin/utils/centerPoint.js";
|
|
12
|
-
let
|
|
13
|
-
class
|
|
14
|
-
constructor(e, t,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
let h = null;
|
|
13
|
+
class k {
|
|
14
|
+
constructor(e, t, o, n, a, r, c) {
|
|
15
|
+
s(this, "hooks", new y());
|
|
16
|
+
s(this, "helperObject3D");
|
|
17
|
+
s(this, "originObject3D");
|
|
18
|
+
s(this, "camera");
|
|
19
|
+
s(this, "model");
|
|
20
|
+
s(this, "scene");
|
|
21
|
+
s(this, "container");
|
|
22
|
+
s(this, "domEvents");
|
|
23
|
+
s(this, "isDragging", !1);
|
|
24
|
+
s(this, "onRender");
|
|
25
|
+
s(this, "enabled", !1);
|
|
26
|
+
s(this, "onWantsTapGesture", (e) => {
|
|
27
27
|
if (this.getIntersectObject(e))
|
|
28
28
|
return !1;
|
|
29
29
|
});
|
|
30
|
-
this.camera = e, this.model = t, this.originObject3D =
|
|
30
|
+
this.camera = e, this.model = t, this.originObject3D = o, this.helperObject3D = n, this.container = a, this.scene = r, this.domEvents = new j(e, a), this.onRender = c != null ? c : () => {
|
|
31
31
|
}, this.initialHelperPosition(), this.initialHelperQuaternion(), this.enable();
|
|
32
32
|
}
|
|
33
33
|
initialHelperPosition() {
|
|
@@ -54,22 +54,32 @@ class S {
|
|
|
54
54
|
setOpacity(e) {
|
|
55
55
|
this.setOriginOpacityProperty();
|
|
56
56
|
const t = this.originObject3D;
|
|
57
|
-
t instanceof l.Mesh && (t.material.opacity = e), t
|
|
57
|
+
if (t instanceof l.Mesh && (t.material.opacity = e), t.isCSS3DObjectPlus) {
|
|
58
|
+
const o = t;
|
|
59
|
+
o.container.style.opacity = e.toString();
|
|
60
|
+
}
|
|
61
|
+
this.render();
|
|
58
62
|
}
|
|
59
63
|
restoreOpacity() {
|
|
60
|
-
if (
|
|
64
|
+
if (h === null)
|
|
61
65
|
return;
|
|
62
66
|
const e = this.originObject3D;
|
|
63
|
-
e instanceof l.Mesh && (e.material.opacity =
|
|
67
|
+
if (e instanceof l.Mesh && (e.material.opacity = h.opacity), e.isCSS3DObjectPlus) {
|
|
68
|
+
const t = e;
|
|
69
|
+
t.container.style.opacity = h.opacity.toString();
|
|
70
|
+
}
|
|
71
|
+
this.render();
|
|
64
72
|
}
|
|
65
73
|
setOriginOpacityProperty() {
|
|
66
|
-
var e;
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
opacity:
|
|
71
|
-
}),
|
|
72
|
-
opacity: (e =
|
|
74
|
+
var e, t;
|
|
75
|
+
if (h === null) {
|
|
76
|
+
const o = this.originObject3D;
|
|
77
|
+
o instanceof l.Mesh && (h = {
|
|
78
|
+
opacity: o.material.opacity
|
|
79
|
+
}), o instanceof D && (h = {
|
|
80
|
+
opacity: (e = o.container.style.opacity) != null ? e : 1
|
|
81
|
+
}), o.isCSS3DObjectPlus && (h = {
|
|
82
|
+
opacity: Number((t = o.container.style.opacity) != null ? t : 1)
|
|
73
83
|
});
|
|
74
84
|
}
|
|
75
85
|
}
|
|
@@ -88,51 +98,51 @@ class S {
|
|
|
88
98
|
applyHelperScaleMatrix4(e, t) {
|
|
89
99
|
this.helperObject3D.applyHelperScaleMatrix4(e, t);
|
|
90
100
|
}
|
|
91
|
-
onWantsGesture(e, t,
|
|
101
|
+
onWantsGesture(e, t, o) {
|
|
92
102
|
if (this.isDragging)
|
|
93
103
|
return !1;
|
|
94
104
|
}
|
|
95
105
|
render() {
|
|
96
106
|
this.onRender();
|
|
97
107
|
}
|
|
98
|
-
hoverListener(e, t = 16777215,
|
|
99
|
-
const n = (Array.isArray(e) ? e : [e]).filter(
|
|
100
|
-
for (const
|
|
101
|
-
if (
|
|
102
|
-
const c =
|
|
108
|
+
hoverListener(e, t = 16777215, o = 1) {
|
|
109
|
+
const n = (Array.isArray(e) ? e : [e]).filter(g), a = [];
|
|
110
|
+
for (const r of n)
|
|
111
|
+
if (r instanceof l.Mesh || r instanceof l.Group) {
|
|
112
|
+
const c = r instanceof l.Group ? r.children.filter((i) => i instanceof l.Mesh) : [r];
|
|
103
113
|
c.forEach((i) => {
|
|
104
114
|
i.__originalColor__ = i.material.color.clone(), i.__originalOpacity__ = i.material.opacity;
|
|
105
115
|
});
|
|
106
116
|
const d = () => {
|
|
107
117
|
c.forEach((i) => {
|
|
108
|
-
i.material.color.set(t), i.material.opacity =
|
|
118
|
+
i.material.color.set(t), i.material.opacity = o;
|
|
109
119
|
}), this.render();
|
|
110
120
|
}, f = () => {
|
|
111
121
|
c.forEach((i) => {
|
|
112
122
|
i.material.color.copy(i.__originalColor__), i.material.opacity = i.__originalOpacity__;
|
|
113
123
|
}), this.render();
|
|
114
|
-
},
|
|
124
|
+
}, u = () => {
|
|
115
125
|
this.isDragging || d();
|
|
116
|
-
},
|
|
126
|
+
}, b = () => {
|
|
117
127
|
this.isDragging || f();
|
|
118
128
|
};
|
|
119
129
|
for (const i of c)
|
|
120
|
-
this.domEvents.addEventListener(i, "mouseover",
|
|
121
|
-
this.domEvents.removeEventListener(i, "mouseover",
|
|
130
|
+
this.domEvents.addEventListener(i, "mouseover", u), this.domEvents.addEventListener(i, "mouseout", b), this.hooks.on("moveStart", d), this.hooks.on("moveEnd", f), this.hooks.on("rotateEnd", f), a.push(() => {
|
|
131
|
+
this.domEvents.removeEventListener(i, "mouseover", u), this.domEvents.removeEventListener(i, "mouseout", b), this.hooks.off("moveStart", d), this.hooks.off("moveEnd", f), this.hooks.off("rotateEnd", f);
|
|
122
132
|
});
|
|
123
133
|
}
|
|
124
|
-
return () => a.forEach((
|
|
134
|
+
return () => a.forEach((r) => r == null ? void 0 : r());
|
|
125
135
|
}
|
|
126
136
|
getIntersectObject(e) {
|
|
127
|
-
const t = this.camera.position,
|
|
128
|
-
if (!
|
|
137
|
+
const t = this.camera.position, o = this.helperObject3D;
|
|
138
|
+
if (!o)
|
|
129
139
|
return;
|
|
130
140
|
let n;
|
|
131
|
-
const a = e.intersectObject(
|
|
132
|
-
if (!!a && (n = a, n.object =
|
|
141
|
+
const a = e.intersectObject(o, !0)[0];
|
|
142
|
+
if (!!a && (n = a, n.object = o, !!n)) {
|
|
133
143
|
if (this.model.intersectRaycaster) {
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
144
|
+
const r = this.model.intersectRaycaster(e)[0];
|
|
145
|
+
if (r && r.point.distanceTo(t) < n.point.distanceTo(t))
|
|
136
146
|
return;
|
|
137
147
|
}
|
|
138
148
|
return n.object;
|
|
@@ -140,6 +150,6 @@ class S {
|
|
|
140
150
|
}
|
|
141
151
|
}
|
|
142
152
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
153
|
+
k as BaseController,
|
|
154
|
+
h as originOpacity
|
|
145
155
|
};
|
|
@@ -2,7 +2,7 @@ var u = Object.defineProperty;
|
|
|
2
2
|
var m = (s, e, t) => e in s ? u(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
3
|
var p = (s, e, t) => (m(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import { BaseController as f } from "../Base/BaseController.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as c from "three";
|
|
6
6
|
import { getMouseRaycaster as b } from "../utils/getMouseRaycaster.js";
|
|
7
7
|
import "../../Subscribe.js";
|
|
8
8
|
import "../utils/threex/domevents/index.js";
|
|
@@ -18,8 +18,8 @@ class P extends f {
|
|
|
18
18
|
p(this, "startInfo");
|
|
19
19
|
const r = this.helperObject3D;
|
|
20
20
|
this.hoverListener([r.xArrow, r.yArrow, r.zArrow]);
|
|
21
|
-
const o = this.dragStart.bind(this), n = this.dragging.bind(this),
|
|
22
|
-
this.domEvents.addEventListener(this.helperObject3D, "mousedown", o), document.addEventListener("mousemove", n), document.addEventListener("mouseup",
|
|
21
|
+
const o = this.dragStart.bind(this), n = this.dragging.bind(this), a = this.dragEnd.bind(this);
|
|
22
|
+
this.domEvents.addEventListener(this.helperObject3D, "mousedown", o), document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
|
|
23
23
|
}
|
|
24
24
|
dragStart(t) {
|
|
25
25
|
if (this.isDragging)
|
|
@@ -30,25 +30,24 @@ class P extends f {
|
|
|
30
30
|
const o = (r == null ? void 0 : r.object).direction;
|
|
31
31
|
if (!o)
|
|
32
32
|
return this.dragEnd();
|
|
33
|
-
const n = new
|
|
33
|
+
const n = new c.Vector3(1, 0, 0).applyQuaternion(this.helperObject3D.quaternion), a = new c.Vector3(0, 1, 0).applyQuaternion(this.helperObject3D.quaternion), h = new c.Vector3(0, 0, 1).applyQuaternion(this.helperObject3D.quaternion), d = (() => {
|
|
34
34
|
switch (o) {
|
|
35
35
|
case "x":
|
|
36
36
|
return n;
|
|
37
37
|
case "y":
|
|
38
|
-
return
|
|
38
|
+
return a;
|
|
39
39
|
case "z":
|
|
40
|
-
return
|
|
40
|
+
return h;
|
|
41
41
|
}
|
|
42
42
|
})(), g = (() => {
|
|
43
43
|
switch (o) {
|
|
44
44
|
case "x":
|
|
45
|
-
return c;
|
|
46
45
|
case "y":
|
|
47
|
-
return
|
|
46
|
+
return h;
|
|
48
47
|
case "z":
|
|
49
48
|
return n;
|
|
50
49
|
}
|
|
51
|
-
})(), i = r.point.clone(), l = new
|
|
50
|
+
})(), i = r.point.clone(), l = new c.Plane();
|
|
52
51
|
l.setFromNormalAndCoplanarPoint(g, i), this.startInfo = { startVectorProject: i.clone().projectOnVector(d), directionVector: d, plane: l }, this.helperObject3D.showDraggingHelper([o]), this.hooks.emit("moveStart"), this.isDragging = !0, console.log("%c MoveController dragStart", "color: #e5af2e");
|
|
53
52
|
}
|
|
54
53
|
dragging(t) {
|
|
@@ -60,11 +59,11 @@ class P extends f {
|
|
|
60
59
|
move(t) {
|
|
61
60
|
if (!this.startInfo)
|
|
62
61
|
return this.dragEnd();
|
|
63
|
-
const { plane: r, directionVector: o, startVectorProject: n } = this.startInfo,
|
|
64
|
-
if (!
|
|
62
|
+
const { plane: r, directionVector: o, startVectorProject: n } = this.startInfo, a = this.originObject3D, h = t.ray.intersectPlane(r, new c.Vector3());
|
|
63
|
+
if (!h)
|
|
65
64
|
return;
|
|
66
|
-
const d =
|
|
67
|
-
i.setPosition(g),
|
|
65
|
+
const d = h.clone().projectOnVector(o), g = d.clone().sub(n), i = new c.Matrix4();
|
|
66
|
+
i.setPosition(g), a.applyMatrix4(i), this.helperObject3D.applyMatrix4(i), n.copy(d), this.hooks.emit("positionUpdate", { matrix4: i });
|
|
68
67
|
}
|
|
69
68
|
dragEnd() {
|
|
70
69
|
!this.isDragging || (console.log("%c MoveController dragEnd", "color: #e94e4e"), this.startInfo = void 0, this.isDragging = !1, this.helperObject3D.show(), this.hooks.emit("moveEnd"));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var X = Object.defineProperty;
|
|
2
|
-
var Y = (h, a,
|
|
3
|
-
var
|
|
2
|
+
var Y = (h, a, s) => a in h ? X(h, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : h[a] = s;
|
|
3
|
+
var N = (h, a, s) => (Y(h, typeof a != "symbol" ? a + "" : a, s), s);
|
|
4
4
|
import { BaseController as A } from "../Base/BaseController.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as D from "three";
|
|
6
6
|
import { Vector3 as n } from "three";
|
|
7
7
|
import { getMouseRaycaster as H } from "../utils/getMouseRaycaster.js";
|
|
8
8
|
import { vectorIsEqual as T } from "../utils/vectorIsEqual.js";
|
|
@@ -15,9 +15,9 @@ import "../../../CSS3DRenderPlugin/utils/evenNumber.js";
|
|
|
15
15
|
import "../../../CSS3DRenderPlugin/utils/centerPoint.js";
|
|
16
16
|
import "../utils/calculateThreeMouse.js";
|
|
17
17
|
class it extends A {
|
|
18
|
-
constructor(...
|
|
19
|
-
super(...
|
|
20
|
-
|
|
18
|
+
constructor(...s) {
|
|
19
|
+
super(...s);
|
|
20
|
+
N(this, "startInfo");
|
|
21
21
|
}
|
|
22
22
|
enable() {
|
|
23
23
|
this.helperObject3D.enable(), super.enable();
|
|
@@ -32,83 +32,81 @@ class it extends A {
|
|
|
32
32
|
this.helperObject3D.hide(), super.hide();
|
|
33
33
|
}
|
|
34
34
|
getDragPlane() {
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
return
|
|
35
|
+
const s = new D.Plane(), e = this.helperObject3D.cornerPositions;
|
|
36
|
+
if (e.length !== 0)
|
|
37
|
+
return e.length < 3 ? s.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new n()), e[0]) : s.setFromCoplanarPoints(e[0], e[1], e[2]), s;
|
|
38
38
|
}
|
|
39
|
-
dragStart(
|
|
40
|
-
var p,
|
|
41
|
-
(
|
|
39
|
+
dragStart(s, e) {
|
|
40
|
+
var p, o;
|
|
41
|
+
(o = (p = this.helperObject3D).updatePoints) == null || o.call(p);
|
|
42
42
|
const f = this.getDragPlane();
|
|
43
43
|
if (!f)
|
|
44
44
|
return this.dragEnd();
|
|
45
|
-
this.startInfo = { startPoint: { position:
|
|
45
|
+
this.startInfo = { startPoint: { position: e.position.clone(), direction: e.direction }, plane: f }, this.hooks.emit("scaleStart"), this.render(), this.isDragging = !0, console.log("%c RectangleScaleController dragStart", "color: #e5af2e");
|
|
46
46
|
}
|
|
47
|
-
dragging(
|
|
47
|
+
dragging(s) {
|
|
48
48
|
if (!this.isDragging)
|
|
49
49
|
return;
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
50
|
+
const e = H(this.camera, s, this.container);
|
|
51
|
+
if (!e)
|
|
52
52
|
return this.dragEnd();
|
|
53
|
-
this.scale(
|
|
53
|
+
this.scale(e), console.log("%c RectangleScaleController dragging", "color: #49de1b");
|
|
54
54
|
}
|
|
55
|
-
scale(
|
|
56
|
-
var
|
|
55
|
+
scale(s) {
|
|
56
|
+
var S, x;
|
|
57
57
|
if (!this.startInfo)
|
|
58
58
|
return;
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
59
|
+
const e = this.originObject3D, { startPoint: f, plane: p } = this.startInfo, o = this.helperObject3D.cornerPositions;
|
|
60
|
+
if (o.length < 4)
|
|
61
61
|
return this.dragEnd();
|
|
62
|
-
const g =
|
|
62
|
+
const g = s.ray.intersectPlane(p, new n());
|
|
63
63
|
if (!g || T(g, this.camera.position))
|
|
64
64
|
return;
|
|
65
|
-
const
|
|
65
|
+
const u = new n().addVectors(o[0], o[2]).divideScalar(2), { position: k, direction: z } = f, j = new n().subVectors(o[1], o[0]), O = new n().subVectors(o[3], o[0]), V = (r) => {
|
|
66
66
|
const i = new n(0, 0, 0);
|
|
67
67
|
if (!this.startInfo)
|
|
68
68
|
return i;
|
|
69
|
-
const t = (r === "ew" ?
|
|
70
|
-
if (
|
|
69
|
+
const t = (r === "ew" ? j : O).clone(), c = k.clone().projectOnVector(t), b = g.clone().projectOnVector(t), E = u.clone().projectOnVector(t);
|
|
70
|
+
if (b.equals(c))
|
|
71
71
|
return i;
|
|
72
72
|
if (r === "ns" && typeof this.startInfo.dragPointInCenterBottom != "boolean") {
|
|
73
|
-
const l = new n().subVectors(
|
|
74
|
-
this.startInfo.dragPointInCenterBottom =
|
|
73
|
+
const l = new n().subVectors(b, E), w = l.x < 0 && t.x >= 0, P = l.y < 0 && t.y >= 0, I = l.z < 0 && t.z >= 0;
|
|
74
|
+
this.startInfo.dragPointInCenterBottom = w || P || I;
|
|
75
75
|
}
|
|
76
76
|
if (r === "ew" && typeof this.startInfo.dragPointInCenterLeft != "boolean") {
|
|
77
|
-
const l = new n().subVectors(
|
|
78
|
-
this.startInfo.dragPointInCenterLeft =
|
|
77
|
+
const l = new n().subVectors(b, E), w = l.x < 0 && t.x >= 0, P = l.y < 0 && t.y >= 0, I = l.z < 0 && t.z >= 0;
|
|
78
|
+
this.startInfo.dragPointInCenterLeft = w || P || I;
|
|
79
79
|
}
|
|
80
|
-
const
|
|
81
|
-
return
|
|
82
|
-
},
|
|
83
|
-
const r =
|
|
80
|
+
const v = new n().subVectors(b, c), M = v.length();
|
|
81
|
+
return M > 0.3 ? (console.warn("offset.length() > 0.3, skipped", M), i) : v;
|
|
82
|
+
}, R = V("ew"), B = V("ns"), y = () => {
|
|
83
|
+
const r = R;
|
|
84
84
|
this.helperObject3D.cornerPositions.forEach((i, t) => {
|
|
85
85
|
var c;
|
|
86
86
|
(c = this.startInfo) != null && c.dragPointInCenterLeft ? (t === 0 || t === 3) && i.add(r) : (t === 1 || t === 2) && i.add(r);
|
|
87
87
|
});
|
|
88
|
-
},
|
|
89
|
-
const r =
|
|
88
|
+
}, C = () => {
|
|
89
|
+
const r = B;
|
|
90
90
|
this.helperObject3D.cornerPositions.forEach((i, t) => {
|
|
91
91
|
var c;
|
|
92
92
|
(c = this.startInfo) != null && c.dragPointInCenterBottom ? (t === 0 || t === 1) && i.add(r) : (t === 2 || t === 3) && i.add(r);
|
|
93
93
|
});
|
|
94
94
|
};
|
|
95
|
-
switch (
|
|
95
|
+
switch (z) {
|
|
96
96
|
case "ew":
|
|
97
|
-
|
|
97
|
+
y();
|
|
98
98
|
break;
|
|
99
99
|
case "ns":
|
|
100
|
-
|
|
100
|
+
C();
|
|
101
101
|
break;
|
|
102
102
|
case "nesw":
|
|
103
103
|
case "nwse":
|
|
104
|
-
|
|
104
|
+
y(), C();
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
const U = new n().addVectors(s[0], s[2]).divideScalar(2), W = new n().subVectors(U, b), d = new I.Matrix4().setPosition(W);
|
|
111
|
-
o.applyMatrix4(d), (E = this.helperObject3D.css3DInstance) == null || E.css3DObject.applyMatrix4(d), (S = this.helperObject3D.plane) == null || S.applyMatrix4(d), this.hooks.emit("scaleUpdate", { matrix4: x, helperOrigin: b }), this.hooks.emit("positionUpdate", { matrix4: d }), this.render();
|
|
106
|
+
const L = new n().subVectors(o[1], o[0]).length() / j.length(), q = new n().subVectors(o[3], o[0]).length() / O.length(), F = new n(L, q, 1), m = new D.Matrix4().scale(F);
|
|
107
|
+
e.isCSS3DObjectPlus ? e.applyScaleMatrix4(m) : e.scale.applyMatrix4(m), f.position.copy(g);
|
|
108
|
+
const U = new n().addVectors(o[0], o[2]).divideScalar(2), W = new n().subVectors(U, u), d = new D.Matrix4().setPosition(W);
|
|
109
|
+
e.applyMatrix4(d), (S = this.helperObject3D.css3DInstance) == null || S.css3DObject.applyMatrix4(d), (x = this.helperObject3D.plane) == null || x.applyMatrix4(d), this.hooks.emit("scaleUpdate", { matrix4: m, helperOrigin: u }), this.hooks.emit("positionUpdate", { matrix4: d }), this.render();
|
|
112
110
|
}
|
|
113
111
|
dragEnd() {
|
|
114
112
|
!this.isDragging || (this.startInfo = void 0, this.isDragging = !1, this.hooks.emit("scaleEnd"), this.render(), console.log("%c RectangleScaleController dragEnd", "color: #e94e4e"));
|