@realsee/dnalogel 3.42.0-alpha-tag.19 → 3.42.0-alpha-tag.21
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/PanoTagPlugin/controller/Tag/ModelTag.d.ts +0 -2
- package/dist/PanoTagPlugin/controller/Tag/PlaneTag.d.ts +0 -2
- package/dist/index.cjs.js +51 -51
- package/dist/index.js +2710 -2695
- package/dist/index.umd.js +42 -42
- package/libs/CruisePlugin/Move.js +3 -2
- package/libs/CruisePlugin/Work.js +3 -2
- package/libs/CruisePlugin/index.js +7 -6
- package/libs/GuideLinePlugin/Controller.js +5 -4
- package/libs/GuideLinePlugin/GuideLineItem.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +3 -2
- package/libs/GuideLinePlugin/index.js +7 -6
- package/libs/ModelMakerPlugin/index.js +1 -1
- package/libs/ModelMakerPlugin/item/baseItem.js +7 -6
- package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
- package/libs/ModelMakerPlugin/item/polygonItem.js +7 -6
- package/libs/ModelMakerPlugin/item/prismItem.js +7 -6
- package/libs/ModelMakerPlugin/utils/getFiveDomEvent.js +4 -3
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +93 -95
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.d.ts +0 -2
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +1 -5
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.d.ts +0 -2
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +1 -5
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +2 -2
- package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
- package/libs/PanoTagPlugin/controller/TagUtil.js +3 -2
- package/libs/PanoTagPlugin/controller/index.js +47 -46
- package/libs/PanoTagPlugin/index.js +14 -13
- package/libs/PanoTagPlugin/typings/index.js +1 -1
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +1 -1
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +1 -1
- package/libs/shared-utils/five/FiveDomEvents.js +92 -88
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/THREERaycaster.js +30 -8
- package/package.json +1 -1
|
@@ -1,65 +1,66 @@
|
|
|
1
1
|
var Q = Object.defineProperty, q = Object.defineProperties;
|
|
2
2
|
var X = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var k = Object.getOwnPropertySymbols;
|
|
4
4
|
var D = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var M = (u, i, e) => i in u ? Q(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
|
-
D.call(i, e) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
j.call(i, e) &&
|
|
7
|
+
D.call(i, e) && M(u, e, i[e]);
|
|
8
|
+
if (k)
|
|
9
|
+
for (var e of k(i))
|
|
10
|
+
j.call(i, e) && M(u, e, i[e]);
|
|
11
11
|
return u;
|
|
12
12
|
}, S = (u, i) => q(u, X(i));
|
|
13
13
|
var R = (u, i) => {
|
|
14
14
|
var e = {};
|
|
15
15
|
for (var t in u)
|
|
16
16
|
D.call(u, t) && i.indexOf(t) < 0 && (e[t] = u[t]);
|
|
17
|
-
if (u != null &&
|
|
18
|
-
for (var t of
|
|
17
|
+
if (u != null && k)
|
|
18
|
+
for (var t of k(u))
|
|
19
19
|
i.indexOf(t) < 0 && j.call(u, t) && (e[t] = u[t]);
|
|
20
20
|
return e;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
22
|
+
var a = (u, i, e) => (M(u, typeof i != "symbol" ? i + "" : i, e), e);
|
|
23
23
|
var A = (u, i, e) => new Promise((t, s) => {
|
|
24
24
|
var r = (n) => {
|
|
25
25
|
try {
|
|
26
26
|
o(e.next(n));
|
|
27
|
-
} catch (
|
|
28
|
-
s(
|
|
27
|
+
} catch (l) {
|
|
28
|
+
s(l);
|
|
29
29
|
}
|
|
30
30
|
}, f = (n) => {
|
|
31
31
|
try {
|
|
32
32
|
o(e.throw(n));
|
|
33
|
-
} catch (
|
|
34
|
-
s(
|
|
33
|
+
} catch (l) {
|
|
34
|
+
s(l);
|
|
35
35
|
}
|
|
36
36
|
}, o = (n) => n.done ? t(n.value) : Promise.resolve(n.value).then(r, f);
|
|
37
37
|
o((e = e.apply(u, i)).next());
|
|
38
38
|
});
|
|
39
|
+
import { Subscribe as Z } from "../../../shared-utils/Subscribe.js";
|
|
39
40
|
import { calculateTagConfig as T } from "../../utils/tag/calculateTagConfig.js";
|
|
40
|
-
import { getTagStickType as
|
|
41
|
-
import { isModelLike as
|
|
41
|
+
import { getTagStickType as _ } from "../../utils/tag/format.js";
|
|
42
|
+
import { isModelLike as G, isPanoramaLike as U } from "../../../shared-utils/five/mode.js";
|
|
42
43
|
import * as V from "three";
|
|
43
44
|
import "hammerjs";
|
|
44
45
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
45
46
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
46
47
|
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
47
48
|
import "../../../shared-utils/three/THREESphere.js";
|
|
48
|
-
import { blink as
|
|
49
|
+
import { blink as K, reblink as Y } from "../../../shared-utils/three/blink.js";
|
|
49
50
|
import { transformPosition as O } from "../../../shared-utils/five/transformPosition.js";
|
|
50
|
-
import { isNil as
|
|
51
|
-
import { uuid as
|
|
51
|
+
import { isNil as ee, notNil as ie } from "../../../shared-utils/isNil.js";
|
|
52
|
+
import { uuid as te } from "../../../shared-utils/uuid.js";
|
|
52
53
|
import { objectAssignDeepExports as P } from "../../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
53
54
|
import { anyPositionToVector3 as B } from "../../../shared-utils/positionToVector3.js";
|
|
54
55
|
import { getTagPosition as E, getTagCenterPosition as $ } from "../../utils/tagPosition.js";
|
|
55
|
-
import { checkRange as
|
|
56
|
-
import { centerPoint as
|
|
57
|
-
import { isMediaPlaneTag as
|
|
56
|
+
import { checkRange as x } from "../../utils/checkRange.js";
|
|
57
|
+
import { centerPoint as ne } from "../../../shared-utils/three/centerPoint.js";
|
|
58
|
+
import { isMediaPlaneTag as se, isMediaModelTag as w } from "../../utils/tag/tagCheck.js";
|
|
58
59
|
import { getUrlExt as L } from "../../../shared-utils/url/getUrl.js";
|
|
59
|
-
import { getFloorIndex as
|
|
60
|
+
import { getFloorIndex as oe } from "../../../shared-utils/five/getFloorIndex.js";
|
|
60
61
|
import { safeObj as N } from "../../../shared-utils/safeObj.js";
|
|
61
|
-
import { toArray as
|
|
62
|
-
import { Cache as
|
|
62
|
+
import { toArray as re } from "../../../shared-utils/util.js";
|
|
63
|
+
import { Cache as ae } from "../../utils/Cache.js";
|
|
63
64
|
import { sleep as le } from "../../../CruisePlugin/utils/sleep.js";
|
|
64
65
|
import "../../../shared-utils/typescript/entries.js";
|
|
65
66
|
import "../../utils/tag/adaptConfig.js";
|
|
@@ -72,54 +73,53 @@ import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
|
72
73
|
import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
73
74
|
import "../../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
74
75
|
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
75
|
-
import "../../../shared-utils/Subscribe.js";
|
|
76
76
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
77
77
|
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
78
78
|
import "../../../shared-utils/three/getObjectVisible.js";
|
|
79
79
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
80
80
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
class
|
|
81
|
+
const I = new V.Raycaster();
|
|
82
|
+
I.params.Points.threshold = 0.1;
|
|
83
|
+
class Ke {
|
|
84
84
|
constructor(i, e) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
var n,
|
|
85
|
+
a(this, "id");
|
|
86
|
+
a(this, "contentType");
|
|
87
|
+
a(this, "stickType");
|
|
88
|
+
a(this, "enabled");
|
|
89
|
+
a(this, "config");
|
|
90
|
+
a(this, "data");
|
|
91
|
+
a(this, "state");
|
|
92
|
+
a(this, "temporaryState", { visible: !0 });
|
|
93
|
+
a(this, "originPosition");
|
|
94
|
+
a(this, "position");
|
|
95
|
+
a(this, "fiveState");
|
|
96
|
+
a(this, "model");
|
|
97
|
+
a(this, "matrix");
|
|
98
|
+
a(this, "screenPosition");
|
|
99
|
+
a(this, "normal");
|
|
100
|
+
a(this, "mediaPlane");
|
|
101
|
+
a(this, "hooks");
|
|
102
|
+
a(this, "zIndex");
|
|
103
|
+
a(this, "element");
|
|
104
|
+
a(this, "style");
|
|
105
|
+
a(this, "className");
|
|
106
|
+
a(this, "play");
|
|
107
|
+
a(this, "pause");
|
|
108
|
+
a(this, "tag3DContentSvelte");
|
|
109
|
+
a(this, "dom");
|
|
110
|
+
a(this, "contentDom");
|
|
111
|
+
a(this, "initialConfig");
|
|
112
|
+
a(this, "computedConfig");
|
|
113
|
+
a(this, "cache");
|
|
114
|
+
a(this, "plugin");
|
|
115
|
+
var n, l, c, v;
|
|
116
116
|
this.plugin = i;
|
|
117
|
-
const t =
|
|
117
|
+
const t = _(e);
|
|
118
118
|
e.stickType = t;
|
|
119
119
|
const s = JSON.parse(JSON.stringify(e.data)), r = (n = e.initialConfig) != null ? n : e.config ? JSON.parse(JSON.stringify(e.config)) : {};
|
|
120
120
|
e.initialConfig = r;
|
|
121
121
|
const f = T(e, i.config), o = this.getConfig(e);
|
|
122
|
-
e.config = o, this.id = (
|
|
122
|
+
e.config = o, this.id = (l = e.id) != null ? l : te(), this.enabled = (c = e.enabled) != null ? c : !0, this.contentType = e.contentType, this.data = (v = o.initialData) != null && v.important ? P(e.data, s, o.initialData) : P(e.data, o.initialData, s), this.state = p({
|
|
123
123
|
visible: void 0,
|
|
124
124
|
unfolded: !this.can("fold")
|
|
125
125
|
}, o.initialState), this.originPosition = e.position, e.originPosition = this.originPosition, this.position = (() => {
|
|
@@ -131,7 +131,7 @@ class Ge {
|
|
|
131
131
|
})(), this.matrix = e.matrix ? (() => {
|
|
132
132
|
const d = new V.Matrix4().fromArray(e.matrix);
|
|
133
133
|
return d.premultiply(i.workUtil.transform), d.elements;
|
|
134
|
-
})() : e.matrix, this.initialConfig = r, this.computedConfig = f, this.stickType = t, this.config = e.config, this.fiveState = e.fiveState, this.normal = e.normal, this.cache = new
|
|
134
|
+
})() : e.matrix, this.initialConfig = r, this.computedConfig = f, this.stickType = t, this.config = e.config, this.fiveState = e.fiveState, this.normal = e.normal, this.cache = new ae(), this.hooks = new Z(), Object.keys(e).forEach((d) => {
|
|
135
135
|
this[d] === void 0 && e[d] !== void 0 && (this[d] = e[d]);
|
|
136
136
|
});
|
|
137
137
|
}
|
|
@@ -146,7 +146,7 @@ class Ge {
|
|
|
146
146
|
}
|
|
147
147
|
get centerPosition() {
|
|
148
148
|
const i = E(this);
|
|
149
|
-
return
|
|
149
|
+
return ne(...Array.isArray(i) ? i : [i]);
|
|
150
150
|
}
|
|
151
151
|
get currentConfig() {
|
|
152
152
|
var s, r;
|
|
@@ -169,12 +169,12 @@ class Ge {
|
|
|
169
169
|
s === !1 && (this.state.visible = !0, this.enabled = !0, this.applyVisible(), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }), this.plugin.render(), yield le(0), this.dom && (this.dom.style.visibility = "hidden"), this.contentDom && (this.contentDom.style.visibility = "hidden"));
|
|
170
170
|
const r = (() => {
|
|
171
171
|
var c;
|
|
172
|
-
const
|
|
173
|
-
return
|
|
172
|
+
const l = [];
|
|
173
|
+
return l.push(this.dom), this.stickType !== "2DPoint" && l.push(this.contentDom), l.push((c = this.model) == null ? void 0 : c.object), l.push(this.mediaPlane), l.filter(Boolean);
|
|
174
174
|
})();
|
|
175
175
|
if (!r.length)
|
|
176
176
|
return;
|
|
177
|
-
yield (s ?
|
|
177
|
+
yield (s ? K : Y)(r, p({
|
|
178
178
|
begin: () => {
|
|
179
179
|
s === !1 && (this.dom && (this.dom.style.visibility = ""), this.contentDom && (this.contentDom.style.visibility = ""));
|
|
180
180
|
},
|
|
@@ -185,16 +185,14 @@ class Ge {
|
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
unfold() {
|
|
188
|
-
throw new Error("Method not implemented.");
|
|
189
188
|
}
|
|
190
189
|
fold() {
|
|
191
|
-
throw new Error("Method not implemented.");
|
|
192
190
|
}
|
|
193
191
|
enable() {
|
|
194
|
-
this.enabled = !0, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
|
|
192
|
+
this.enabled = !0, this.hooks.emit("enable"), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
|
|
195
193
|
}
|
|
196
194
|
disable() {
|
|
197
|
-
this.enabled = !1, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
|
|
195
|
+
this.enabled = !1, this.hooks.emit("disable"), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
|
|
198
196
|
}
|
|
199
197
|
changeData(i, e = !0) {
|
|
200
198
|
return this.setData(i, e);
|
|
@@ -203,7 +201,7 @@ class Ge {
|
|
|
203
201
|
return this.setPosition(i);
|
|
204
202
|
}
|
|
205
203
|
setData(i, e = !0) {
|
|
206
|
-
e ? this.data = P(this.data, i) : this.data = p(p({}, this.data), i);
|
|
204
|
+
e ? this.data = P(this.data, i) : this.data = p(p({}, this.data), i), this.hooks.emit("dataChanged", this.data);
|
|
207
205
|
}
|
|
208
206
|
setPosition(i) {
|
|
209
207
|
throw new Error("Method not implemented.");
|
|
@@ -246,7 +244,7 @@ class Ge {
|
|
|
246
244
|
return !1;
|
|
247
245
|
const e = p(p({}, this.five.getCurrentState()), i);
|
|
248
246
|
let t = this.cache.getVisible(this, e);
|
|
249
|
-
return
|
|
247
|
+
return ee(t) && (t = this.computeVisible(e).value, this.cache.setVisible(this, e, t)), t;
|
|
250
248
|
}
|
|
251
249
|
getUnfoldedByPanoIndex(i) {
|
|
252
250
|
if (!this.currentVisible)
|
|
@@ -284,7 +282,7 @@ class Ge {
|
|
|
284
282
|
return;
|
|
285
283
|
const t = this.data.mediaData;
|
|
286
284
|
if (!(!t || t.length === 0) && e.renderType === "Mesh") {
|
|
287
|
-
if (
|
|
285
|
+
if (se(this)) {
|
|
288
286
|
if (t.length === 1) {
|
|
289
287
|
if (t[0].type === "Video")
|
|
290
288
|
return navigator.userAgent.toLowerCase().indexOf("firefox") > -1 && navigator.userAgent.toLowerCase().indexOf("mobile") > -1 ? "Dom" : "Mesh";
|
|
@@ -300,8 +298,8 @@ class Ge {
|
|
|
300
298
|
computeVisible(i) {
|
|
301
299
|
const e = p(p({}, this.five.getCurrentState()), i), { panoIndex: t, mode: s } = e, r = [];
|
|
302
300
|
return (() => {
|
|
303
|
-
var
|
|
304
|
-
const n = (
|
|
301
|
+
var l, c, v, d, b, y, C;
|
|
302
|
+
const n = (l = this.getConfig().visibleConfig) != null ? l : {};
|
|
305
303
|
if (typeof n == "function")
|
|
306
304
|
return {
|
|
307
305
|
value: n(this.five, { tag: this, distance: this.getDistance(e, void 0) }),
|
|
@@ -315,7 +313,7 @@ class Ge {
|
|
|
315
313
|
if (n.visibleFiveMode !== void 0) {
|
|
316
314
|
const h = typeof n.visibleFiveMode == "function" ? n.visibleFiveMode(this) : n.visibleFiveMode;
|
|
317
315
|
let g = !1;
|
|
318
|
-
if (Array.isArray(h) ? g = h.includes(s) : h === "ModelLike" ? g =
|
|
316
|
+
if (Array.isArray(h) ? g = h.includes(s) : h === "ModelLike" ? g = G(s) : h === "PanoramaLike" ? g = !U(s) : h === "all" ? g = !0 : typeof h == "string" && (g = h === s), g === !1)
|
|
319
317
|
return {
|
|
320
318
|
value: !1,
|
|
321
319
|
checkedList: r,
|
|
@@ -352,7 +350,7 @@ class Ge {
|
|
|
352
350
|
}
|
|
353
351
|
if (n.visibleDistance !== void 0 && (r.push("visibleDistance"), n.visibleDistance !== "unLimited")) {
|
|
354
352
|
const h = this.getDistance(e, 1);
|
|
355
|
-
if (
|
|
353
|
+
if (x(h, n.visibleDistance) === !1)
|
|
356
354
|
return {
|
|
357
355
|
value: !1,
|
|
358
356
|
checkedList: r,
|
|
@@ -381,11 +379,11 @@ class Ge {
|
|
|
381
379
|
}
|
|
382
380
|
/** 通过射线检测标签可用性 */
|
|
383
381
|
computeVisibleByIntersect(i) {
|
|
384
|
-
var n,
|
|
382
|
+
var n, l, c, v;
|
|
385
383
|
const e = N(N((n = this.getConfig().visibleConfig) != null ? n : {}).intersectRaycaster), t = i != null ? i : this.five.getCurrentState().panoIndex, s = U(this.five.getCurrentState().mode) ? this.workUtil.getObserverPosition(t) : this.five.camera.position;
|
|
386
384
|
if (s === void 0)
|
|
387
385
|
return { value: !1, reason: { type: "startPosition is undefined", fivePanoIndex: t } };
|
|
388
|
-
const r =
|
|
386
|
+
const r = re(
|
|
389
387
|
(() => {
|
|
390
388
|
var b;
|
|
391
389
|
const d = (b = e.checkPoints) != null ? b : "center";
|
|
@@ -396,8 +394,8 @@ class Ge {
|
|
|
396
394
|
for (const d of r) {
|
|
397
395
|
const b = new V.Vector3().subVectors(d, s).normalize();
|
|
398
396
|
let m;
|
|
399
|
-
|
|
400
|
-
const [y] = this.fiveUtil.model.intersectRaycaster(
|
|
397
|
+
I.set(s, b);
|
|
398
|
+
const [y] = this.fiveUtil.model.intersectRaycaster(I);
|
|
401
399
|
m = y == null ? void 0 : y.distance;
|
|
402
400
|
const C = (() => {
|
|
403
401
|
if (!w(this))
|
|
@@ -405,9 +403,9 @@ class Ge {
|
|
|
405
403
|
const J = this.plugin.tags.filter(w).map((H) => {
|
|
406
404
|
var F;
|
|
407
405
|
return (F = H.model) == null ? void 0 : F.object;
|
|
408
|
-
}).filter(
|
|
406
|
+
}).filter(ie), [W] = I.intersectObjects(J, !0);
|
|
409
407
|
return W;
|
|
410
|
-
})(), h = s.distanceTo(d), g = (
|
|
408
|
+
})(), h = s.distanceTo(d), g = (l = e.distanceAccuracy) != null ? l : 0.01;
|
|
411
409
|
m = Math.min(m != null ? m : 1 / 0, (c = C == null ? void 0 : C.distance) != null ? c : 1 / 0), m + g >= h ? f++ : o++;
|
|
412
410
|
const z = (v = e.needPassed) != null ? v : 1;
|
|
413
411
|
if (f >= z)
|
|
@@ -423,12 +421,12 @@ class Ge {
|
|
|
423
421
|
};
|
|
424
422
|
}
|
|
425
423
|
computeVisibleByFloorIndex() {
|
|
426
|
-
var s, r, f, o, n,
|
|
424
|
+
var s, r, f, o, n, l, c;
|
|
427
425
|
let i = 0;
|
|
428
426
|
const e = (s = this.fiveState) == null ? void 0 : s.panoIndex;
|
|
429
|
-
e !== void 0 ? i = (r = this.workUtil.getObserver(e)) == null ? void 0 : r.floorIndex : i =
|
|
427
|
+
e !== void 0 ? i = (r = this.workUtil.getObserver(e)) == null ? void 0 : r.floorIndex : i = oe(
|
|
430
428
|
this.workUtil.work,
|
|
431
|
-
(c = (
|
|
429
|
+
(c = (l = (o = (f = this.model) == null ? void 0 : f.object) == null ? void 0 : o.position) != null ? l : (n = this.mediaPlane) == null ? void 0 : n.position) != null ? c : $(this)
|
|
432
430
|
);
|
|
433
431
|
const t = this.fiveUtil.model.shownFloor;
|
|
434
432
|
return {
|
|
@@ -449,7 +447,7 @@ class Ge {
|
|
|
449
447
|
return !1;
|
|
450
448
|
if (e.keep === "unfolded")
|
|
451
449
|
return !0;
|
|
452
|
-
if (e.unfoldDistance &&
|
|
450
|
+
if (e.unfoldDistance && x(this.getDistance({ panoIndex: i }), e.unfoldDistance) === !1)
|
|
453
451
|
return !1;
|
|
454
452
|
}
|
|
455
453
|
}
|
|
@@ -467,7 +465,7 @@ class Ge {
|
|
|
467
465
|
return;
|
|
468
466
|
if (i.autoUnfold.strategy === "ScreenPostion") {
|
|
469
467
|
const t = this.computeTagProject();
|
|
470
|
-
if (t &&
|
|
468
|
+
if (t && x(t.x, i.autoUnfold.autoUnfoldProjectX) === !1)
|
|
471
469
|
return !1;
|
|
472
470
|
}
|
|
473
471
|
if (i.autoUnfold.strategy === "MinimumDistance") {
|
|
@@ -475,14 +473,14 @@ class Ge {
|
|
|
475
473
|
const n = this.computeTagProject();
|
|
476
474
|
if (!n)
|
|
477
475
|
return !1;
|
|
478
|
-
const { x:
|
|
479
|
-
return !(Math.abs(v) > 1 || Math.abs(
|
|
476
|
+
const { x: l, y: c, z: v } = n;
|
|
477
|
+
return !(Math.abs(v) > 1 || Math.abs(l) > 1 || Math.abs(c) > 1);
|
|
480
478
|
}).map((o) => ({ tag: o, id: o.id, tagConfig: o.getConfig().unfoldedConfig })).filter(({ tagConfig: o }) => {
|
|
481
|
-
var n,
|
|
482
|
-
return !(typeof o == "function" || o.keep || o.autoUnfold === !1 || ((n = o.autoUnfold) == null ? void 0 : n.enable) === !1 || ((
|
|
479
|
+
var n, l;
|
|
480
|
+
return !(typeof o == "function" || o.keep || o.autoUnfold === !1 || ((n = o.autoUnfold) == null ? void 0 : n.enable) === !1 || ((l = o.autoUnfold) == null ? void 0 : l.strategy) !== "MinimumDistance");
|
|
483
481
|
}).map((o) => S(p({}, o), { distance: o.tag.getDistance() })).filter(({ distance: o, tagConfig: n }) => {
|
|
484
|
-
const
|
|
485
|
-
return !(
|
|
482
|
+
const l = n.autoUnfold.distance;
|
|
483
|
+
return !(l && x(o, l) === !1);
|
|
486
484
|
}).sort((o, n) => o.distance - n.distance).findIndex((o) => o.id === this.id);
|
|
487
485
|
if (r === -1 || r <= ((e = i.autoUnfold.maxNumber) != null ? e : 1) - 1 === !1)
|
|
488
486
|
return !1;
|
|
@@ -529,5 +527,5 @@ class Ge {
|
|
|
529
527
|
}
|
|
530
528
|
}
|
|
531
529
|
export {
|
|
532
|
-
|
|
530
|
+
Ke as BaseTag
|
|
533
531
|
};
|
|
@@ -5,8 +5,6 @@ import * as THREE from 'three';
|
|
|
5
5
|
export declare class ModelTag<C extends TagContentType = TagContentType> extends BaseTag<C, 'Model'> {
|
|
6
6
|
loading: boolean;
|
|
7
7
|
constructor(plugin: PanoTagPluginController, tagData: TagData);
|
|
8
|
-
unfold(): void;
|
|
9
|
-
fold(): void;
|
|
10
8
|
applyVisible(): void;
|
|
11
9
|
/** 加载外部模型 */
|
|
12
10
|
loadModel: () => Promise<TagGLTFObject>;
|
|
@@ -35,6 +35,7 @@ import "../../Assets/Icon.js";
|
|
|
35
35
|
import "../../../shared-utils/three/getPositionsByObjectFit.js";
|
|
36
36
|
import "../../../shared-utils/three/FragmentTransparencyMaterial.js";
|
|
37
37
|
import "../../../shared-utils/three/getNormal.js";
|
|
38
|
+
import "../../../shared-utils/Subscribe.js";
|
|
38
39
|
import "../../utils/tag/calculateTagConfig.js";
|
|
39
40
|
import "../../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
40
41
|
import "../../../shared-utils/typescript/entries.js";
|
|
@@ -51,7 +52,6 @@ import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
|
51
52
|
import "../../../shared-utils/util.js";
|
|
52
53
|
import "../../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
53
54
|
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
54
|
-
import "../../../shared-utils/Subscribe.js";
|
|
55
55
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
56
56
|
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
57
57
|
import "../../../shared-utils/three/getObjectVisible.js";
|
|
@@ -116,10 +116,6 @@ class Pt extends D {
|
|
|
116
116
|
}));
|
|
117
117
|
this.state.unfolded = !0;
|
|
118
118
|
}
|
|
119
|
-
unfold() {
|
|
120
|
-
}
|
|
121
|
-
fold() {
|
|
122
|
-
}
|
|
123
119
|
applyVisible() {
|
|
124
120
|
var i, s, o;
|
|
125
121
|
(i = this.model) != null && i.object && (this.model.object.visible = this.currentVisible), (s = this.tag3DContentSvelte) == null || s.svelteApp.$set({ tag: this, state: this.plugin.state }), (o = this.tag3DContentSvelte) == null || o.css3DInstance.setVisible(this.currentVisible);
|
|
@@ -3,8 +3,6 @@ import type { TagContentType, Tag as TagData } from '../..';
|
|
|
3
3
|
import { BaseTag } from './BaseTag';
|
|
4
4
|
export declare class PlaneTag<C extends TagContentType = TagContentType> extends BaseTag<C, 'Plane'> {
|
|
5
5
|
constructor(plugin: PanoTagPluginController, tagData: TagData);
|
|
6
|
-
unfold(): void;
|
|
7
|
-
fold(): void;
|
|
8
6
|
applyVisible(): void;
|
|
9
7
|
private renderVideoPlane;
|
|
10
8
|
private renderImagePlane;
|
|
@@ -13,6 +13,7 @@ import "../../Assets/Icon.js";
|
|
|
13
13
|
import "../../../shared-utils/three/getPositionsByObjectFit.js";
|
|
14
14
|
import "../../../shared-utils/three/FragmentTransparencyMaterial.js";
|
|
15
15
|
import "../../../shared-utils/three/getNormal.js";
|
|
16
|
+
import "../../../shared-utils/Subscribe.js";
|
|
16
17
|
import "../../utils/tag/calculateTagConfig.js";
|
|
17
18
|
import "../../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
18
19
|
import "../../../shared-utils/typescript/entries.js";
|
|
@@ -29,7 +30,6 @@ import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
|
29
30
|
import "../../../shared-utils/util.js";
|
|
30
31
|
import "../../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
31
32
|
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
32
|
-
import "../../../shared-utils/Subscribe.js";
|
|
33
33
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
34
34
|
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
35
35
|
import "../../../shared-utils/three/getObjectVisible.js";
|
|
@@ -56,10 +56,6 @@ class ge extends f {
|
|
|
56
56
|
constructor(t, e) {
|
|
57
57
|
super(t, e), this.state.unfolded = !0;
|
|
58
58
|
}
|
|
59
|
-
unfold() {
|
|
60
|
-
}
|
|
61
|
-
fold() {
|
|
62
|
-
}
|
|
63
59
|
applyVisible() {
|
|
64
60
|
var e, r, a, n, o, i;
|
|
65
61
|
this.computeRenderType() === "Mesh" ? ((r = (e = this.data.mediaData) == null ? void 0 : e[0]) == null ? void 0 : r.type) === "Video" ? this.renderVideoPlane() : ((n = (a = this.data.mediaData) == null ? void 0 : a[0]) == null ? void 0 : n.type) === "Image" && this.renderImagePlane() : ((o = this.tag3DContentSvelte) == null || o.svelteApp.$set({ tag: this, state: this.plugin.state }), (i = this.tag3DContentSvelte) == null || i.css3DInstance.setVisible(this.currentVisible));
|
|
@@ -4,6 +4,7 @@ var a = (n, o, t) => (u(n, typeof o != "symbol" ? o + "" : o, t), t);
|
|
|
4
4
|
import { BaseTag as h } from "./BaseTag.js";
|
|
5
5
|
import * as l from "three";
|
|
6
6
|
import { cancelIdleCallback as f, requestIdleCallback as g } from "../../utils/requestIdleCallback.js";
|
|
7
|
+
import "../../../shared-utils/Subscribe.js";
|
|
7
8
|
import "../../utils/tag/calculateTagConfig.js";
|
|
8
9
|
import "../../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
9
10
|
import "../../../shared-utils/typescript/entries.js";
|
|
@@ -21,7 +22,6 @@ import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
|
21
22
|
import "../../../shared-utils/util.js";
|
|
22
23
|
import "../../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
23
24
|
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
24
|
-
import "../../../shared-utils/Subscribe.js";
|
|
25
25
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
26
26
|
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
27
27
|
import "../../../shared-utils/three/centerPoint.js";
|
|
@@ -74,7 +74,7 @@ class rt extends h {
|
|
|
74
74
|
*/
|
|
75
75
|
setUnfold(t) {
|
|
76
76
|
const i = this.can("fold"), s = this.can("unfold");
|
|
77
|
-
i && s ? (this.state.unfolded = t, this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] })) : console.warn(`tag ${this.id} cannot be ${t ? "unfolded" : "folded"}`);
|
|
77
|
+
i && s ? (this.state.unfolded = t, this.hooks.emit(t ? "unfolded" : "folded"), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] })) : console.warn(`tag ${this.id} cannot be ${t ? "unfolded" : "folded"}`);
|
|
78
78
|
}
|
|
79
79
|
setPosition(t) {
|
|
80
80
|
this.originPosition = t, this.position = t, this.cache.clear(), this.updateVisible(), this.updateScreenPosition(), this.updateZIndex(), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
|
|
@@ -162,11 +162,12 @@ import "../../shared-utils/five/fiveModelLoad.js";
|
|
|
162
162
|
import "../../shared-utils/five/getFiveModel.js";
|
|
163
163
|
import "../../shared-utils/five/FiveDomEvents.js";
|
|
164
164
|
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
165
|
+
import "../../shared-utils/three/THREERaycaster.js";
|
|
165
166
|
import "../../base/BasePlugin.js";
|
|
166
167
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
167
168
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
168
169
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
169
|
-
class
|
|
170
|
+
class ye extends $ {
|
|
170
171
|
constructor(t) {
|
|
171
172
|
super(t);
|
|
172
173
|
c(this, "rendererMap", /* @__PURE__ */ new Map());
|
|
@@ -317,5 +318,5 @@ class Te extends $ {
|
|
|
317
318
|
}
|
|
318
319
|
}
|
|
319
320
|
export {
|
|
320
|
-
|
|
321
|
+
ye as TagRender
|
|
321
322
|
};
|
|
@@ -45,11 +45,12 @@ import "../../shared-utils/three/getPositionsByObjectFit.js";
|
|
|
45
45
|
import "../../shared-utils/three/FragmentTransparencyMaterial.js";
|
|
46
46
|
import "../../shared-utils/three/getNormal.js";
|
|
47
47
|
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
48
|
+
import "../../shared-utils/three/THREERaycaster.js";
|
|
48
49
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
49
50
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
50
51
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
51
52
|
import "../../shared-utils/five/transformPosition.js";
|
|
52
|
-
class
|
|
53
|
+
class De extends v {
|
|
53
54
|
constructor(e) {
|
|
54
55
|
super(e);
|
|
55
56
|
r(this, "tags", []);
|
|
@@ -174,5 +175,5 @@ class Te extends v {
|
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
177
|
export {
|
|
177
|
-
|
|
178
|
+
De as TagUtil
|
|
178
179
|
};
|