@realsee/dnalogel 3.42.0 → 3.43.0
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 +4 -1
- package/dist/index.cjs.js +26 -26
- package/dist/index.js +1451 -1442
- package/dist/index.umd.js +32 -32
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +79 -78
- package/libs/PanoTagPlugin/Components/Tag/index.js +128 -128
- package/libs/PanoTagPlugin/Components/TagItem.js +67 -67
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +77 -68
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { SvelteComponent as J, init as K, safe_not_equal as O, append_styles as Q, empty as U, insert as I, transition_in as _, transition_out as g, check_outros as z, detach as P, getContext as W, element as Z, space as X, attr as d, toggle_class as T, set_style as C, append as Y, group_outros as L, binding_callbacks as x, noop as v, create_component as
|
|
1
|
+
import { SvelteComponent as J, init as K, safe_not_equal as O, append_styles as Q, empty as U, insert as I, transition_in as _, transition_out as g, check_outros as z, detach as P, getContext as W, element as Z, space as X, attr as d, toggle_class as T, set_style as C, append as Y, group_outros as L, binding_callbacks as x, noop as v, create_component as B, mount_component as E, destroy_component as G } from "../../vendor/svelte/internal/index.js";
|
|
2
2
|
import $ from "./Tag/index.js";
|
|
3
3
|
import "three";
|
|
4
|
-
import { noTypecheck as
|
|
4
|
+
import { noTypecheck as V } from "../utils/noTypecheck.js";
|
|
5
5
|
import tt from "./Common/TagPoint.js";
|
|
6
|
+
import { isModelLike as et } from "../../shared-utils/five/mode.js";
|
|
6
7
|
import "hammerjs";
|
|
7
8
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
8
9
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
@@ -113,7 +114,6 @@ import "../../shared-utils/typescript/entries.js";
|
|
|
113
114
|
import "../utils/tag/adaptConfig.js";
|
|
114
115
|
import "../typings/tag/TagConfig.js";
|
|
115
116
|
import "@realsee/five";
|
|
116
|
-
import "../../shared-utils/five/mode.js";
|
|
117
117
|
import "../utils/tag/format.js";
|
|
118
118
|
import "../../shared-utils/three/blink.js";
|
|
119
119
|
import "../../shared-utils/vectorToCoordinate.js";
|
|
@@ -131,24 +131,24 @@ import "../../shared-utils/five/getFloorIndex.js";
|
|
|
131
131
|
import "../../shared-utils/safeObj.js";
|
|
132
132
|
import "../utils/Cache.js";
|
|
133
133
|
import "../../CruisePlugin/utils/sleep.js";
|
|
134
|
-
function
|
|
134
|
+
function it(o) {
|
|
135
135
|
Q(o, "svelte-2g2g8a", ".tag.svelte-2g2g8a{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto;will-change:opacity;transition:opacity 0.2s linear}.tag.enableZIndex.svelte-2g2g8a{position:absolute}.tag.hide.svelte-2g2g8a{opacity:0;pointer-events:none}.tag.hide.svelte-2g2g8a *{pointer-events:none !important}.tag.unClickable.svelte-2g2g8a{pointer-events:none !important}.tag.unClickable.svelte-2g2g8a *{pointer-events:none !important}");
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function j(o) {
|
|
138
138
|
let t, i, e, r, n, a, b, k, s;
|
|
139
|
-
const
|
|
140
|
-
function
|
|
139
|
+
const M = [rt, ot], u = [];
|
|
140
|
+
function S(p, l) {
|
|
141
141
|
return (
|
|
142
142
|
/*havePoint*/
|
|
143
|
-
p[
|
|
143
|
+
p[8] ? 0 : 1
|
|
144
144
|
);
|
|
145
145
|
}
|
|
146
|
-
i =
|
|
147
|
-
const m = [
|
|
146
|
+
i = S(o), e = u[i] = M[i](o);
|
|
147
|
+
const m = [pt, nt], c = [];
|
|
148
148
|
function y(p, l) {
|
|
149
149
|
return (
|
|
150
150
|
/*haveContent*/
|
|
151
|
-
p[
|
|
151
|
+
p[15] ? 0 : 1
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
154
|
return n = y(o), a = c[n] = m[n](o), {
|
|
@@ -157,7 +157,7 @@ function B(o) {
|
|
|
157
157
|
t,
|
|
158
158
|
"data-tag-id",
|
|
159
159
|
/*id*/
|
|
160
|
-
o[
|
|
160
|
+
o[14]
|
|
161
161
|
), d(
|
|
162
162
|
t,
|
|
163
163
|
"data-tag-unfolded",
|
|
@@ -165,7 +165,7 @@ function B(o) {
|
|
|
165
165
|
o[6]
|
|
166
166
|
), d(t, "data-content-type", b = /*tag*/
|
|
167
167
|
o[0].contentType), d(t, "id", k = `tag-${/*id*/
|
|
168
|
-
o[
|
|
168
|
+
o[14]}`), T(
|
|
169
169
|
t,
|
|
170
170
|
"unClickable",
|
|
171
171
|
/*tag*/
|
|
@@ -174,20 +174,20 @@ function B(o) {
|
|
|
174
174
|
t,
|
|
175
175
|
"hide",
|
|
176
176
|
/*hide*/
|
|
177
|
-
o[
|
|
177
|
+
o[12]
|
|
178
178
|
), T(
|
|
179
179
|
t,
|
|
180
180
|
"enableZIndex",
|
|
181
181
|
/*zIndex*/
|
|
182
|
-
o[
|
|
182
|
+
o[9]
|
|
183
183
|
), C(
|
|
184
184
|
t,
|
|
185
185
|
"z-index",
|
|
186
186
|
/*zIndex*/
|
|
187
|
-
o[
|
|
187
|
+
o[9]
|
|
188
188
|
), C(t, "transform", `translate3d(${/*left*/
|
|
189
|
-
o[
|
|
190
|
-
o[
|
|
189
|
+
o[11]}, ${/*top*/
|
|
190
|
+
o[10]}, 0) scale(${/*screenPosition*/
|
|
191
191
|
o[7].scale})`);
|
|
192
192
|
},
|
|
193
193
|
m(p, l) {
|
|
@@ -195,18 +195,18 @@ function B(o) {
|
|
|
195
195
|
},
|
|
196
196
|
p(p, l) {
|
|
197
197
|
let h = i;
|
|
198
|
-
i =
|
|
198
|
+
i = S(p), i === h ? u[i].p(p, l) : (L(), g(u[h], 1, 1, () => {
|
|
199
199
|
u[h] = null;
|
|
200
|
-
}), z(), e = u[i], e ? e.p(p, l) : (e = u[i] =
|
|
200
|
+
}), z(), e = u[i], e ? e.p(p, l) : (e = u[i] = M[i](p), e.c()), _(e, 1), e.m(t, r));
|
|
201
201
|
let w = n;
|
|
202
202
|
n = y(p), n === w ? c[n].p(p, l) : (L(), g(c[w], 1, 1, () => {
|
|
203
203
|
c[w] = null;
|
|
204
204
|
}), z(), a = c[n], a ? a.p(p, l) : (a = c[n] = m[n](p), a.c()), _(a, 1), a.m(t, null)), (!s || l & /*id*/
|
|
205
|
-
|
|
205
|
+
16384) && d(
|
|
206
206
|
t,
|
|
207
207
|
"data-tag-id",
|
|
208
208
|
/*id*/
|
|
209
|
-
p[
|
|
209
|
+
p[14]
|
|
210
210
|
), (!s || l & /*unfolded*/
|
|
211
211
|
64) && d(
|
|
212
212
|
t,
|
|
@@ -216,35 +216,35 @@ function B(o) {
|
|
|
216
216
|
), (!s || l & /*tag*/
|
|
217
217
|
1 && b !== (b = /*tag*/
|
|
218
218
|
p[0].contentType)) && d(t, "data-content-type", b), (!s || l & /*id*/
|
|
219
|
-
|
|
220
|
-
p[
|
|
219
|
+
16384 && k !== (k = `tag-${/*id*/
|
|
220
|
+
p[14]}`)) && d(t, "id", k), (!s || l & /*tag*/
|
|
221
221
|
1) && T(
|
|
222
222
|
t,
|
|
223
223
|
"unClickable",
|
|
224
224
|
/*tag*/
|
|
225
225
|
p[0].config.clickable === !1
|
|
226
226
|
), (!s || l & /*hide*/
|
|
227
|
-
|
|
227
|
+
4096) && T(
|
|
228
228
|
t,
|
|
229
229
|
"hide",
|
|
230
230
|
/*hide*/
|
|
231
|
-
p[
|
|
231
|
+
p[12]
|
|
232
232
|
), (!s || l & /*zIndex*/
|
|
233
|
-
|
|
233
|
+
512) && T(
|
|
234
234
|
t,
|
|
235
235
|
"enableZIndex",
|
|
236
236
|
/*zIndex*/
|
|
237
|
-
p[
|
|
237
|
+
p[9]
|
|
238
238
|
), l & /*zIndex*/
|
|
239
|
-
|
|
239
|
+
512 && C(
|
|
240
240
|
t,
|
|
241
241
|
"z-index",
|
|
242
242
|
/*zIndex*/
|
|
243
|
-
p[
|
|
243
|
+
p[9]
|
|
244
244
|
), l & /*left, top, screenPosition*/
|
|
245
|
-
|
|
246
|
-
p[
|
|
247
|
-
p[
|
|
245
|
+
3200 && C(t, "transform", `translate3d(${/*left*/
|
|
246
|
+
p[11]}, ${/*top*/
|
|
247
|
+
p[10]}, 0) scale(${/*screenPosition*/
|
|
248
248
|
p[7].scale})`);
|
|
249
249
|
},
|
|
250
250
|
i(p) {
|
|
@@ -258,7 +258,7 @@ function B(o) {
|
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function ot(o) {
|
|
262
262
|
let t;
|
|
263
263
|
return {
|
|
264
264
|
c() {
|
|
@@ -275,17 +275,17 @@ function it(o) {
|
|
|
275
275
|
}
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function rt(o) {
|
|
279
279
|
let t, i;
|
|
280
280
|
return t = new tt({ props: { tag: (
|
|
281
281
|
/*tag*/
|
|
282
282
|
o[0]
|
|
283
283
|
) } }), {
|
|
284
284
|
c() {
|
|
285
|
-
|
|
285
|
+
B(t.$$.fragment);
|
|
286
286
|
},
|
|
287
287
|
m(e, r) {
|
|
288
|
-
|
|
288
|
+
E(t, e, r), i = !0;
|
|
289
289
|
},
|
|
290
290
|
p(e, r) {
|
|
291
291
|
const n = {};
|
|
@@ -304,7 +304,7 @@ function ot(o) {
|
|
|
304
304
|
}
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function nt(o) {
|
|
308
308
|
let t;
|
|
309
309
|
return {
|
|
310
310
|
c() {
|
|
@@ -321,7 +321,7 @@ function rt(o) {
|
|
|
321
321
|
}
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function pt(o) {
|
|
325
325
|
let t, i;
|
|
326
326
|
return t = new $({
|
|
327
327
|
props: {
|
|
@@ -329,7 +329,7 @@ function nt(o) {
|
|
|
329
329
|
/*mediaStore*/
|
|
330
330
|
o[1]
|
|
331
331
|
),
|
|
332
|
-
tag:
|
|
332
|
+
tag: V(
|
|
333
333
|
/*tag*/
|
|
334
334
|
o[0]
|
|
335
335
|
),
|
|
@@ -356,17 +356,17 @@ function nt(o) {
|
|
|
356
356
|
}
|
|
357
357
|
}), {
|
|
358
358
|
c() {
|
|
359
|
-
|
|
359
|
+
B(t.$$.fragment);
|
|
360
360
|
},
|
|
361
361
|
m(e, r) {
|
|
362
|
-
|
|
362
|
+
E(t, e, r), i = !0;
|
|
363
363
|
},
|
|
364
364
|
p(e, r) {
|
|
365
365
|
const n = {};
|
|
366
366
|
r & /*mediaStore*/
|
|
367
367
|
2 && (n.mediaStore = /*mediaStore*/
|
|
368
368
|
e[1]), r & /*tag*/
|
|
369
|
-
1 && (n.tag =
|
|
369
|
+
1 && (n.tag = V(
|
|
370
370
|
/*tag*/
|
|
371
371
|
e[0]
|
|
372
372
|
)), r & /*state*/
|
|
@@ -390,11 +390,11 @@ function nt(o) {
|
|
|
390
390
|
}
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function mt(o) {
|
|
394
394
|
let t, i, e = (
|
|
395
395
|
/*screenPosition*/
|
|
396
396
|
o[7] && !/*disable*/
|
|
397
|
-
o[
|
|
397
|
+
o[13] && j(o)
|
|
398
398
|
);
|
|
399
399
|
return {
|
|
400
400
|
c() {
|
|
@@ -406,8 +406,8 @@ function pt(o) {
|
|
|
406
406
|
p(r, [n]) {
|
|
407
407
|
/*screenPosition*/
|
|
408
408
|
r[7] && !/*disable*/
|
|
409
|
-
r[
|
|
410
|
-
|
|
409
|
+
r[13] ? e ? (e.p(r, n), n & /*screenPosition, disable*/
|
|
410
|
+
8320 && _(e, 1)) : (e = j(r), e.c(), _(e, 1), e.m(t.parentNode, t)) : e && (L(), g(e, 1, 1, () => {
|
|
411
411
|
e = null;
|
|
412
412
|
}), z());
|
|
413
413
|
},
|
|
@@ -422,8 +422,8 @@ function pt(o) {
|
|
|
422
422
|
}
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
let e, r, n, a, b, k, s,
|
|
425
|
+
function at(o, t, i) {
|
|
426
|
+
let e, r, n, a, b, k, s, M, u, S, { tag: m } = t, { mediaStore: c } = t, { rendererMap: y = /* @__PURE__ */ new Map() } = t, { contentTypeMap: p = /* @__PURE__ */ new Map() } = t, { state: l } = t, { temporaryState: h } = t;
|
|
427
427
|
const w = W("hooks");
|
|
428
428
|
function H(f) {
|
|
429
429
|
x[f ? "unshift" : "push"](() => {
|
|
@@ -435,19 +435,19 @@ function mt(o, t, i) {
|
|
|
435
435
|
}, o.$$.update = () => {
|
|
436
436
|
var f, q, A, D;
|
|
437
437
|
o.$$.dirty & /*tag, rendererMap*/
|
|
438
|
-
5 && i(
|
|
439
|
-
var N, R
|
|
440
|
-
return !(((
|
|
441
|
-
})()), o.$$.dirty & /*tag*/
|
|
442
|
-
|
|
443
|
-
1 && i(
|
|
438
|
+
5 && i(8, e = (() => {
|
|
439
|
+
var F, N, R;
|
|
440
|
+
return !(((N = (F = m.style) == null ? void 0 : F.point) == null ? void 0 : N.enabled) === !1 || ((R = y.get(m.contentType)) == null ? void 0 : R.usePoint) === !1 || m.contentType === "Sticker" || m.contentType === "Link" || m.contentType === "VRLink" || m.contentType === "PanoLink" || m.contentType === "Panorama" || m.contentType === "Audio" && m.data.appearance === "plane");
|
|
441
|
+
})()), o.$$.dirty & /*tag, havePoint*/
|
|
442
|
+
257 && i(15, r = (() => !(m.stickType !== "2DPoint" || m.entryFromModel && et(m.five.state.mode) && e))()), o.$$.dirty & /*tag*/
|
|
443
|
+
1 && i(14, n = m.id), o.$$.dirty & /*tag*/
|
|
444
444
|
1 && i(7, a = m.screenPosition), o.$$.dirty & /*tag*/
|
|
445
|
-
1 && i(
|
|
446
|
-
129 && i(
|
|
445
|
+
1 && i(13, b = m.enabled === !1 || !m.state), o.$$.dirty & /*tag, screenPosition*/
|
|
446
|
+
129 && i(12, k = !((f = m.state) != null && f.visible) || ((q = m.temporaryState) == null ? void 0 : q.visible) === !1 || !a), o.$$.dirty & /*tag*/
|
|
447
447
|
1 && i(6, s = (A = m.state) == null ? void 0 : A.unfolded), o.$$.dirty & /*screenPosition*/
|
|
448
|
-
128 && i(
|
|
449
|
-
128 && i(
|
|
450
|
-
65 && i(
|
|
448
|
+
128 && i(11, M = (a == null ? void 0 : a.leftPx) + "px"), o.$$.dirty & /*screenPosition*/
|
|
449
|
+
128 && i(10, u = (a == null ? void 0 : a.topPx) + "px"), o.$$.dirty & /*unfolded, tag*/
|
|
450
|
+
65 && i(9, S = s ? ((D = m.zIndex) != null ? D : 0) + (s ? 1e6 : 0) : void 0);
|
|
451
451
|
}, [
|
|
452
452
|
m,
|
|
453
453
|
c,
|
|
@@ -457,25 +457,25 @@ function mt(o, t, i) {
|
|
|
457
457
|
h,
|
|
458
458
|
s,
|
|
459
459
|
a,
|
|
460
|
-
|
|
461
|
-
u,
|
|
460
|
+
e,
|
|
462
461
|
S,
|
|
462
|
+
u,
|
|
463
|
+
M,
|
|
463
464
|
k,
|
|
464
465
|
b,
|
|
465
466
|
n,
|
|
466
467
|
r,
|
|
467
|
-
e,
|
|
468
468
|
w,
|
|
469
469
|
H
|
|
470
470
|
];
|
|
471
471
|
}
|
|
472
|
-
class
|
|
472
|
+
class Di extends J {
|
|
473
473
|
constructor(t) {
|
|
474
474
|
super(), K(
|
|
475
475
|
this,
|
|
476
476
|
t,
|
|
477
|
+
at,
|
|
477
478
|
mt,
|
|
478
|
-
pt,
|
|
479
479
|
O,
|
|
480
480
|
{
|
|
481
481
|
tag: 0,
|
|
@@ -485,10 +485,10 @@ class Ai extends J {
|
|
|
485
485
|
state: 4,
|
|
486
486
|
temporaryState: 5
|
|
487
487
|
},
|
|
488
|
-
|
|
488
|
+
it
|
|
489
489
|
);
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
export {
|
|
493
|
-
|
|
493
|
+
Di as default
|
|
494
494
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Z = Object.defineProperty, _ = Object.defineProperties;
|
|
2
|
+
var G = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var y = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var x = (
|
|
4
|
+
var D = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var x = (u, i, e) => i in u ? Z(u, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[i] = e, p = (u, i) => {
|
|
6
6
|
for (var e in i || (i = {}))
|
|
7
|
-
|
|
7
|
+
D.call(i, e) && x(u, e, i[e]);
|
|
8
8
|
if (y)
|
|
9
9
|
for (var e of y(i))
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
}, M = (
|
|
13
|
-
var B = (
|
|
10
|
+
j.call(i, e) && x(u, e, i[e]);
|
|
11
|
+
return u;
|
|
12
|
+
}, M = (u, i) => _(u, G(i));
|
|
13
|
+
var B = (u, i) => {
|
|
14
14
|
var e = {};
|
|
15
|
-
for (var t in
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var t of y(
|
|
19
|
-
i.indexOf(t) < 0 &&
|
|
15
|
+
for (var t in u)
|
|
16
|
+
D.call(u, t) && i.indexOf(t) < 0 && (e[t] = u[t]);
|
|
17
|
+
if (u != null && y)
|
|
18
|
+
for (var t of y(u))
|
|
19
|
+
i.indexOf(t) < 0 && j.call(u, t) && (e[t] = u[t]);
|
|
20
20
|
return e;
|
|
21
21
|
};
|
|
22
|
-
var f = (
|
|
23
|
-
var I = (
|
|
22
|
+
var f = (u, i, e) => (x(u, typeof i != "symbol" ? i + "" : i, e), e);
|
|
23
|
+
var I = (u, i, e) => new Promise((t, r) => {
|
|
24
24
|
var n = (s) => {
|
|
25
25
|
try {
|
|
26
26
|
o(e.next(s));
|
|
@@ -34,33 +34,33 @@ var I = (c, i, e) => new Promise((t, r) => {
|
|
|
34
34
|
r(a);
|
|
35
35
|
}
|
|
36
36
|
}, o = (s) => s.done ? t(s.value) : Promise.resolve(s.value).then(n, l);
|
|
37
|
-
o((e = e.apply(
|
|
37
|
+
o((e = e.apply(u, i)).next());
|
|
38
38
|
});
|
|
39
|
-
import { Subscribe as
|
|
39
|
+
import { Subscribe as K } from "../../../shared-utils/Subscribe.js";
|
|
40
40
|
import { calculateTagConfig as U } from "../../utils/tag/calculateTagConfig.js";
|
|
41
|
-
import { getTagStickType as
|
|
42
|
-
import { isPanoramaLike as w, isModelLike as
|
|
43
|
-
import * as
|
|
41
|
+
import { getTagStickType as Y } from "../../utils/tag/format.js";
|
|
42
|
+
import { isPanoramaLike as w, isModelLike as T } from "../../../shared-utils/five/mode.js";
|
|
43
|
+
import * as S from "three";
|
|
44
44
|
import "hammerjs";
|
|
45
45
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
46
46
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
47
47
|
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
48
48
|
import "../../../shared-utils/three/THREESphere.js";
|
|
49
|
-
import { blink as
|
|
50
|
-
import { vectorToCoordinates as
|
|
51
|
-
import { transformPosition as
|
|
52
|
-
import { isNil as
|
|
49
|
+
import { blink as ee, reblink as ie } from "../../../shared-utils/three/blink.js";
|
|
50
|
+
import { vectorToCoordinates as te } from "../../../shared-utils/vectorToCoordinate.js";
|
|
51
|
+
import { transformPosition as A } from "../../../shared-utils/five/transformPosition.js";
|
|
52
|
+
import { isNil as O, notNil as R } from "../../../shared-utils/isNil.js";
|
|
53
53
|
import { lookPoint as ne } from "../../../shared-utils/five/lookPoint.js";
|
|
54
54
|
import { uuid as se } from "../../../shared-utils/uuid.js";
|
|
55
55
|
import { objectAssignDeepExports as b } from "../../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
56
|
-
import { anyPositionToVector3 as
|
|
57
|
-
import { getTagPosition as
|
|
56
|
+
import { anyPositionToVector3 as E } from "../../../shared-utils/positionToVector3.js";
|
|
57
|
+
import { getTagPosition as L, getTagCenterPosition as $ } from "../../utils/tagPosition.js";
|
|
58
58
|
import { checkRange as P } from "../../utils/checkRange.js";
|
|
59
59
|
import { centerPoint as oe } from "../../../shared-utils/three/centerPoint.js";
|
|
60
|
-
import { isMediaPlaneTag as re, isMediaModelTag as
|
|
61
|
-
import { getUrlExt as
|
|
60
|
+
import { isMediaPlaneTag as re, isMediaModelTag as V } from "../../utils/tag/tagCheck.js";
|
|
61
|
+
import { getUrlExt as N } from "../../../shared-utils/url/getUrl.js";
|
|
62
62
|
import { getFloorIndex as le } from "../../../shared-utils/five/getFloorIndex.js";
|
|
63
|
-
import { safeObj as
|
|
63
|
+
import { safeObj as z } from "../../../shared-utils/safeObj.js";
|
|
64
64
|
import { toArray as ae } from "../../../shared-utils/util.js";
|
|
65
65
|
import { Cache as fe } from "../../utils/Cache.js";
|
|
66
66
|
import { sleep as de } from "../../../CruisePlugin/utils/sleep.js";
|
|
@@ -84,7 +84,7 @@ import "../../../shared-utils/Utils/FiveUtil.js";
|
|
|
84
84
|
import "../../../shared-utils/Utils/BaseUtil.js";
|
|
85
85
|
import "../../../shared-utils/Utils/WorkUtil.js";
|
|
86
86
|
import "../../../shared-utils/five/getFiveModel.js";
|
|
87
|
-
const C = new
|
|
87
|
+
const C = new S.Raycaster();
|
|
88
88
|
C.params.Points.threshold = 0.1;
|
|
89
89
|
class ri {
|
|
90
90
|
constructor(i, e) {
|
|
@@ -116,14 +116,14 @@ class ri {
|
|
|
116
116
|
f(this, "computedConfig");
|
|
117
117
|
f(this, "cache");
|
|
118
118
|
f(this, "entryFromModel");
|
|
119
|
-
var s, a,
|
|
119
|
+
var s, a, c, g;
|
|
120
120
|
this.plugin = i;
|
|
121
|
-
const t =
|
|
121
|
+
const t = Y(e);
|
|
122
122
|
e.stickType = t;
|
|
123
123
|
const r = JSON.parse(JSON.stringify(e.data)), n = (s = e.initialConfig) != null ? s : e.config ? JSON.parse(JSON.stringify(e.config)) : {};
|
|
124
124
|
e.initialConfig = n;
|
|
125
125
|
const l = U(e, i.config), o = this.getConfig(e);
|
|
126
|
-
e.config = o, this.id = (a = e.id) != null ? a : se(), this.enabled = (
|
|
126
|
+
e.config = o, this.id = (a = e.id) != null ? a : se(), this.enabled = (c = e.enabled) != null ? c : !0, this.contentType = e.contentType, this.data = (g = o.initialData) != null && g.important ? b(e.data, r, o.initialData) : b(e.data, o.initialData, r), this.state = p({
|
|
127
127
|
visible: void 0,
|
|
128
128
|
unfolded: !this.can("fold")
|
|
129
129
|
}, o.initialState), this.originPosition = e.position, e.originPosition = this.originPosition, this.position = (() => {
|
|
@@ -131,11 +131,11 @@ class ri {
|
|
|
131
131
|
if (!d)
|
|
132
132
|
return;
|
|
133
133
|
const m = i.workUtil.transform;
|
|
134
|
-
return Array.isArray(d) && d.length === 4 ? d.map(
|
|
134
|
+
return Array.isArray(d) && d.length === 4 ? d.map(E).map((h) => A(h, m).toArray()) : A(E(d), m).toArray();
|
|
135
135
|
})(), this.matrix = e.matrix ? (() => {
|
|
136
|
-
const d = new
|
|
136
|
+
const d = new S.Matrix4().fromArray(e.matrix);
|
|
137
137
|
return d.premultiply(i.workUtil.transform), d.elements;
|
|
138
|
-
})() : e.matrix, this.initialConfig = n, this.computedConfig = l, this.stickType = t, this.config = e.config, this.fiveState = e.fiveState, this.normal = e.normal, this.cache = new fe(), this.hooks = new
|
|
138
|
+
})() : e.matrix, this.initialConfig = n, this.computedConfig = l, this.stickType = t, this.config = e.config, this.fiveState = e.fiveState, this.normal = e.normal, this.cache = new fe(), this.hooks = new K(), Object.keys(e).forEach((d) => {
|
|
139
139
|
this[d] === void 0 && e[d] !== void 0 && (this[d] = e[d]);
|
|
140
140
|
});
|
|
141
141
|
}
|
|
@@ -149,7 +149,7 @@ class ri {
|
|
|
149
149
|
return this.plugin.workUtil;
|
|
150
150
|
}
|
|
151
151
|
get centerPosition() {
|
|
152
|
-
const i =
|
|
152
|
+
const i = L(this);
|
|
153
153
|
return oe(...Array.isArray(i) ? i : [i]);
|
|
154
154
|
}
|
|
155
155
|
get currentConfig() {
|
|
@@ -181,14 +181,14 @@ class ri {
|
|
|
181
181
|
const t = (r = i == null ? void 0 : i.targetMode) != null ? r : this.five.state.mode;
|
|
182
182
|
if (t === "Panorama") {
|
|
183
183
|
const n = e == null ? void 0 : e.panoIndex;
|
|
184
|
-
if (
|
|
184
|
+
if (O(n))
|
|
185
185
|
return;
|
|
186
186
|
const l = this.workUtil.getObserverPosition(n), o = this.centerPosition.clone().sub(l).normalize();
|
|
187
187
|
this.five.setState(p({
|
|
188
188
|
mode: "Panorama",
|
|
189
189
|
workCode: this.workUtil.workCode,
|
|
190
190
|
panoIndex: n
|
|
191
|
-
},
|
|
191
|
+
}, te(o))), yield this.five.ready();
|
|
192
192
|
} else
|
|
193
193
|
t === "Mapview" && (yield ne(this.five, this.centerPosition, i == null ? void 0 : i.pointConfig));
|
|
194
194
|
});
|
|
@@ -202,13 +202,13 @@ class ri {
|
|
|
202
202
|
const e = (o = this.enabled) != null ? o : !0, t = (s = this.state) == null ? void 0 : s.visible, r = e && t;
|
|
203
203
|
r === !1 && (this.state.visible = !0, this.enabled = !0, this.applyVisible(), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }), this.plugin.render(), yield de(0), this.dom && (this.dom.style.visibility = "hidden"), this.contentDom && (this.contentDom.style.visibility = "hidden"));
|
|
204
204
|
const n = (() => {
|
|
205
|
-
var
|
|
205
|
+
var c;
|
|
206
206
|
const a = [];
|
|
207
|
-
return a.push(this.dom), this.stickType !== "2DPoint" && a.push(this.contentDom), a.push((
|
|
207
|
+
return a.push(this.dom), this.stickType !== "2DPoint" && a.push(this.contentDom), a.push((c = this.model) == null ? void 0 : c.object), a.push(this.mediaPlane), a.filter(Boolean);
|
|
208
208
|
})();
|
|
209
209
|
if (!n.length)
|
|
210
210
|
return;
|
|
211
|
-
yield (r ?
|
|
211
|
+
yield (r ? ee : ie)(n, p({
|
|
212
212
|
begin: () => {
|
|
213
213
|
r === !1 && (this.dom && (this.dom.style.visibility = ""), this.contentDom && (this.contentDom.style.visibility = ""));
|
|
214
214
|
},
|
|
@@ -309,7 +309,7 @@ class ri {
|
|
|
309
309
|
return !1;
|
|
310
310
|
const e = p(p({}, this.five.getCurrentState()), i);
|
|
311
311
|
let t = this.cache.getVisible(this, e);
|
|
312
|
-
return
|
|
312
|
+
return O(t) && (t = this.computeVisible(e).value, this.cache.setVisible(this, e, t)), t;
|
|
313
313
|
}
|
|
314
314
|
getUnfoldedByPanoIndex(i) {
|
|
315
315
|
if (!this.currentVisible)
|
|
@@ -354,10 +354,10 @@ class ri {
|
|
|
354
354
|
if (t[0].type === "Video")
|
|
355
355
|
return navigator.userAgent.toLowerCase().indexOf("firefox") > -1 && navigator.userAgent.toLowerCase().indexOf("mobile") > -1 ? "Dom" : "Mesh";
|
|
356
356
|
if (t[0].type === "Image")
|
|
357
|
-
return
|
|
357
|
+
return N(t[0].url) === "gif" ? "Dom" : "Mesh";
|
|
358
358
|
}
|
|
359
|
-
} else if (
|
|
360
|
-
return t.length === 1 && t[0].type === "Image" ?
|
|
359
|
+
} else if (V(this))
|
|
360
|
+
return t.length === 1 && t[0].type === "Image" ? N(t[0].url) === "gif" ? "Dom" : "Mesh" : "BehindDom";
|
|
361
361
|
}
|
|
362
362
|
})();
|
|
363
363
|
return i != null ? i : "Dom";
|
|
@@ -382,7 +382,7 @@ class ri {
|
|
|
382
382
|
if ((m == null ? void 0 : m.value) === !1)
|
|
383
383
|
return m;
|
|
384
384
|
if (s.followModelVisibility === !0 && ["poincare", "aerophoto", "sand"].includes(this.workUtil.fromType) && (r === "Floorplan" || r === "Mapview")) {
|
|
385
|
-
const
|
|
385
|
+
const c = this.computeVisibleByFloorIndex(), { value: h } = c, v = B(c, ["value"]);
|
|
386
386
|
if (h === !1)
|
|
387
387
|
return p({ value: !1, checkedList: n, reason: "followModelVisibility check failed" }, v);
|
|
388
388
|
}
|
|
@@ -440,7 +440,7 @@ class ri {
|
|
|
440
440
|
if (n || (n = (o = (l = this.fiveState) == null ? void 0 : l.mode) != null ? o : this.workUtil.observers.length ? "Panorama" : "ModelLike"), Array.isArray(n))
|
|
441
441
|
return n.includes(e);
|
|
442
442
|
if (n === "ModelLike")
|
|
443
|
-
return
|
|
443
|
+
return T(e);
|
|
444
444
|
if (n === "PanoramaLike")
|
|
445
445
|
return !w(e);
|
|
446
446
|
if (n === "all")
|
|
@@ -448,7 +448,16 @@ class ri {
|
|
|
448
448
|
if (typeof n == "string")
|
|
449
449
|
return n === e;
|
|
450
450
|
};
|
|
451
|
-
if ((() =>
|
|
451
|
+
if ((() => {
|
|
452
|
+
var l;
|
|
453
|
+
const n = t();
|
|
454
|
+
if (R((l = this.fiveState) == null ? void 0 : l.panoIndex) && i.entryFromModel) {
|
|
455
|
+
if (T(e) && n ? this.entryFromModel = !1 : this.entryFromModel = !0, T(e))
|
|
456
|
+
return !0;
|
|
457
|
+
} else
|
|
458
|
+
this.entryFromModel = !1;
|
|
459
|
+
return n;
|
|
460
|
+
})() === !1)
|
|
452
461
|
return {
|
|
453
462
|
value: !1,
|
|
454
463
|
reason: "current mode is not included in visibleFiveMode",
|
|
@@ -458,36 +467,36 @@ class ri {
|
|
|
458
467
|
}
|
|
459
468
|
/** 通过射线检测标签可用性 */
|
|
460
469
|
computeVisibleByIntersect(i) {
|
|
461
|
-
var s, a,
|
|
462
|
-
const e =
|
|
470
|
+
var s, a, c, g;
|
|
471
|
+
const e = z(z((s = this.getConfig().visibleConfig) != null ? s : {}).intersectRaycaster), t = i != null ? i : this.five.getCurrentState().panoIndex, r = w(this.five.getCurrentState().mode) ? this.workUtil.getObserverPosition(t) : this.five.camera.position;
|
|
463
472
|
if (r === void 0)
|
|
464
473
|
return { value: !1, reason: { type: "startPosition is undefined", fivePanoIndex: t } };
|
|
465
474
|
const n = ae(
|
|
466
475
|
(() => {
|
|
467
476
|
var m;
|
|
468
477
|
const d = (m = e.checkPoints) != null ? m : "center";
|
|
469
|
-
return d === "center" ?
|
|
478
|
+
return d === "center" ? $(this) : d === "corner" ? L(this) : Array.isArray(d) ? d : [];
|
|
470
479
|
})()
|
|
471
480
|
);
|
|
472
481
|
let l = 0, o = 0;
|
|
473
482
|
for (const d of n) {
|
|
474
|
-
const m = new
|
|
483
|
+
const m = new S.Vector3().subVectors(d, r).normalize();
|
|
475
484
|
let h;
|
|
476
485
|
C.set(r, m);
|
|
477
486
|
const [v] = this.fiveUtil.model.intersectRaycaster(C);
|
|
478
487
|
h = v == null ? void 0 : v.distance;
|
|
479
488
|
const k = (() => {
|
|
480
|
-
if (!
|
|
489
|
+
if (!V(this))
|
|
481
490
|
return;
|
|
482
|
-
const
|
|
483
|
-
var
|
|
484
|
-
return (
|
|
485
|
-
}).filter(
|
|
486
|
-
return
|
|
487
|
-
})(),
|
|
488
|
-
h = Math.min(h != null ? h : 1 / 0, (
|
|
489
|
-
const
|
|
490
|
-
if (l >=
|
|
491
|
+
const q = this.plugin.tags.filter(V).map((X) => {
|
|
492
|
+
var F;
|
|
493
|
+
return (F = X.model) == null ? void 0 : F.object;
|
|
494
|
+
}).filter(R), [Q] = C.intersectObjects(q, !0);
|
|
495
|
+
return Q;
|
|
496
|
+
})(), J = r.distanceTo(d), W = (a = e.distanceAccuracy) != null ? a : 0.01;
|
|
497
|
+
h = Math.min(h != null ? h : 1 / 0, (c = k == null ? void 0 : k.distance) != null ? c : 1 / 0), h + W >= J ? l++ : o++;
|
|
498
|
+
const H = (g = e.needPassed) != null ? g : 1;
|
|
499
|
+
if (l >= H)
|
|
491
500
|
return { value: !0 };
|
|
492
501
|
}
|
|
493
502
|
return o === 0 ? { value: !0 } : {
|
|
@@ -501,12 +510,12 @@ class ri {
|
|
|
501
510
|
};
|
|
502
511
|
}
|
|
503
512
|
computeVisibleByFloorIndex() {
|
|
504
|
-
var r, n, l, o, s, a,
|
|
513
|
+
var r, n, l, o, s, a, c;
|
|
505
514
|
let i = 0;
|
|
506
515
|
const e = (r = this.fiveState) == null ? void 0 : r.panoIndex;
|
|
507
516
|
e !== void 0 ? i = (n = this.workUtil.getObserver(e)) == null ? void 0 : n.floorIndex : i = le(
|
|
508
517
|
this.workUtil.work,
|
|
509
|
-
(
|
|
518
|
+
(c = (a = (o = (l = this.model) == null ? void 0 : l.object) == null ? void 0 : o.position) != null ? a : (s = this.mediaPlane) == null ? void 0 : s.position) != null ? c : $(this)
|
|
510
519
|
);
|
|
511
520
|
const t = this.fiveUtil.model.shownFloor;
|
|
512
521
|
return {
|
|
@@ -553,8 +562,8 @@ class ri {
|
|
|
553
562
|
const s = this.computeTagProject();
|
|
554
563
|
if (!s)
|
|
555
564
|
return !1;
|
|
556
|
-
const { x: a, y:
|
|
557
|
-
return !(Math.abs(g) > 1 || Math.abs(a) > 1 || Math.abs(
|
|
565
|
+
const { x: a, y: c, z: g } = s;
|
|
566
|
+
return !(Math.abs(g) > 1 || Math.abs(a) > 1 || Math.abs(c) > 1);
|
|
558
567
|
}).map((o) => ({ tag: o, id: o.id, tagConfig: o.getConfig().unfoldedConfig })).filter(({ tagConfig: o }) => {
|
|
559
568
|
var s, a;
|
|
560
569
|
return !(typeof o == "function" || o.keep || o.autoUnfold === !1 || ((s = o.autoUnfold) == null ? void 0 : s.enable) === !1 || ((a = o.autoUnfold) == null ? void 0 : a.strategy) !== "MinimumDistance");
|