@realsee/dnalogel 2.1.0-alpha.21 → 2.1.0-alpha.23
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.es.js +12944 -17266
- package/dist/index.js +6027 -5946
- package/docs/assets/search.js +1 -1
- 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 +2 -2
- 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 +23 -0
- 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/Assets/Icon.d.ts +2 -1
- package/libs/PanoTagPlugin/Assets/Icon.js +3 -2
- package/libs/PanoTagPlugin/Components/Common/Media.js +558 -548
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +107 -57
- package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +85 -79
- package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +65 -69
- package/libs/PanoTagPlugin/Components/PointTag.js +1 -1
- package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +42 -42
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +91 -93
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +54 -58
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +43 -40
- package/libs/PanoTagPlugin/Components/Tag/TextTag.js +56 -56
- package/libs/PanoTagPlugin/Components/Tag/index.js +1 -1
- package/libs/PanoTagPlugin/Components/TagWrapper.js +1 -1
- package/libs/PanoTagPlugin/controller/TagComputer.d.ts +1 -0
- package/libs/PanoTagPlugin/controller/TagComputer.js +1 -1
- package/libs/PanoTagPlugin/controller/index.js +24 -30
- package/libs/PanoTagPlugin/index.js +2 -2
- package/libs/PanoTagPlugin/tag.config.js +1 -2
- package/libs/PanoTagPlugin/typings/tag.d.ts +1 -1
- package/libs/PanoTagPlugin/utils/doUtil.d.ts +1 -0
- package/libs/PanoTagPlugin/utils/doUtil.js +12 -0
- package/libs/{TagComputer.5bd7014b.js → TagComputer.0920083a.js} +108 -90
- package/libs/index.js +2 -2
- package/package.json +1 -2
- package/dist/index.cjs.js +0 -556
- package/dist/index.umd.js +0 -556
- package/libs/PanoTagPlugin/utils/nullishCoalescing.d.ts +0 -2
- package/libs/PanoTagPlugin/utils/nullishCoalescing.js +0 -7
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var T = (r, d, e) => (
|
|
1
|
+
var U = Object.defineProperty;
|
|
2
|
+
var V = (r, d, e) => d in r ? U(r, d, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[d] = e;
|
|
3
|
+
var T = (r, d, e) => (V(r, typeof d != "symbol" ? d + "" : d, e), e);
|
|
4
4
|
import * as w from "three";
|
|
5
5
|
import { DefaultConfig as E } from "./PanoTagPlugin/tag.config.js";
|
|
6
6
|
import { DimensionType as b, PointType as v } from "./PanoTagPlugin/typings/tag.js";
|
|
7
|
-
import { arrayPositionToVector3 as
|
|
7
|
+
import { arrayPositionToVector3 as M, anyPositionToVector3 as R } from "./CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
8
8
|
import { planeNormal as O } from "./PanoTagPlugin/utils/planeNormal.js";
|
|
9
|
-
import { tagPosition as
|
|
9
|
+
import { tagPosition as C } from "./PanoTagPlugin/utils/tagPosition.js";
|
|
10
10
|
import { checkRange as P } from "./PanoTagPlugin/utils/checkRange.js";
|
|
11
|
-
import { TagCacheController as
|
|
11
|
+
import { TagCacheController as S } from "./PanoTagPlugin/controller/TagCacheController.js";
|
|
12
12
|
var y = { exports: {} };
|
|
13
|
-
function
|
|
13
|
+
function m(r) {
|
|
14
14
|
return r === null ? "null" : typeof r > "u" ? "undefined" : typeof r == "object" ? Array.isArray(r) ? "array" : "object" : typeof r;
|
|
15
15
|
}
|
|
16
16
|
function B(r) {
|
|
17
|
-
return
|
|
17
|
+
return m(r) === "object" ? D(r) : m(r) === "array" ? I(r) : r;
|
|
18
18
|
}
|
|
19
19
|
function I(r) {
|
|
20
20
|
return r.map(B);
|
|
@@ -28,28 +28,28 @@ function D(r) {
|
|
|
28
28
|
function x(r, d = [], e = {}) {
|
|
29
29
|
const i = {
|
|
30
30
|
arrayBehaviour: e.arrayBehaviour || "replace"
|
|
31
|
-
},
|
|
32
|
-
for (let t = 0; t <
|
|
33
|
-
const c =
|
|
34
|
-
for (let
|
|
35
|
-
const f = s[
|
|
36
|
-
if (
|
|
31
|
+
}, n = d.map((t) => t || {}), o = r || {};
|
|
32
|
+
for (let t = 0; t < n.length; t++) {
|
|
33
|
+
const c = n[t], s = Object.keys(c);
|
|
34
|
+
for (let l = 0; l < s.length; l++) {
|
|
35
|
+
const f = s[l], u = c[f], a = m(u), g = m(o[f]);
|
|
36
|
+
if (a === "object")
|
|
37
37
|
if (g !== "undefined") {
|
|
38
|
-
const h = g === "object" ?
|
|
39
|
-
|
|
38
|
+
const h = g === "object" ? o[f] : {};
|
|
39
|
+
o[f] = x({}, [h, D(u)], i);
|
|
40
40
|
} else
|
|
41
|
-
|
|
42
|
-
else if (
|
|
41
|
+
o[f] = D(u);
|
|
42
|
+
else if (a === "array")
|
|
43
43
|
if (g === "array") {
|
|
44
44
|
const h = I(u);
|
|
45
|
-
|
|
45
|
+
o[f] = i.arrayBehaviour === "merge" ? o[f].concat(h) : h;
|
|
46
46
|
} else
|
|
47
|
-
|
|
47
|
+
o[f] = I(u);
|
|
48
48
|
else
|
|
49
|
-
|
|
49
|
+
o[f] = u;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
return
|
|
52
|
+
return o;
|
|
53
53
|
}
|
|
54
54
|
y.exports = function(d, ...e) {
|
|
55
55
|
return x(d, e);
|
|
@@ -60,7 +60,7 @@ y.exports.noMutate = function(...d) {
|
|
|
60
60
|
y.exports.withOptions = function(d, e, i) {
|
|
61
61
|
return x(d, e, i);
|
|
62
62
|
};
|
|
63
|
-
class
|
|
63
|
+
class K extends S {
|
|
64
64
|
constructor(e) {
|
|
65
65
|
super(e);
|
|
66
66
|
T(this, "tags", []);
|
|
@@ -68,7 +68,7 @@ class L extends $ {
|
|
|
68
68
|
T(this, "raycaster", new w.Raycaster());
|
|
69
69
|
}
|
|
70
70
|
getTagById(e) {
|
|
71
|
-
const i = this.tags.find((
|
|
71
|
+
const i = this.tags.find((n) => n.id === e);
|
|
72
72
|
if (!i) {
|
|
73
73
|
console.error(`getTagById(): tag is ${i}, id is ${e}`);
|
|
74
74
|
return;
|
|
@@ -81,57 +81,57 @@ class L extends $ {
|
|
|
81
81
|
changeGlobalConfig(e, i = !0) {
|
|
82
82
|
i ? this.config.globalConfig = y.exports({}, this.config.globalConfig, e) : this.config.globalConfig = e, this.clearCache();
|
|
83
83
|
}
|
|
84
|
-
changeContentTypeConfig(e, i,
|
|
85
|
-
this.config.contentTypeConfig || (this.config.contentTypeConfig = {}),
|
|
84
|
+
changeContentTypeConfig(e, i, n = !0) {
|
|
85
|
+
this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), n ? this.config.contentTypeConfig[e] = y.exports({}, this.config.contentTypeConfig[e], i) : this.config.contentTypeConfig[e] = i, this.clearCache();
|
|
86
86
|
}
|
|
87
87
|
getVisibleByPanoIndex(e, i) {
|
|
88
88
|
var t;
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
91
|
-
return
|
|
89
|
+
const n = this.getCaches({ panoIndex: i, id: e.id }), o = (t = this.five.panoIndex) != null ? t : i;
|
|
90
|
+
if (n.visible !== void 0)
|
|
91
|
+
return n.visible;
|
|
92
92
|
{
|
|
93
93
|
const c = (() => {
|
|
94
|
-
var f, u,
|
|
95
|
-
const s = (f = this.getTagConfig(e).visibleConfig) != null ? f : {},
|
|
94
|
+
var f, u, a, g, h;
|
|
95
|
+
const s = (f = this.getTagConfig(e).visibleConfig) != null ? f : {}, l = this.getDistance(e);
|
|
96
96
|
if (typeof s == "function")
|
|
97
|
-
return s(this.five, { tag: e, distance:
|
|
97
|
+
return s(this.five, { tag: e, distance: l });
|
|
98
98
|
if (s.keep === "hidden")
|
|
99
99
|
return !1;
|
|
100
100
|
if (s.keep === "visible")
|
|
101
101
|
return !0;
|
|
102
|
-
if (s.visiblePanoIndex !== void 0 && (
|
|
102
|
+
if (s.visiblePanoIndex !== void 0 && (o === void 0 || !s.visiblePanoIndex.includes(o)) || s.visibleDistance !== void 0 && s.visibleDistance !== "unLimited" && P(l, s.visibleDistance) === !1)
|
|
103
103
|
return !1;
|
|
104
104
|
if (((u = s.intersectRaycaster) == null ? void 0 : u.enabled) !== !1) {
|
|
105
|
-
if (
|
|
105
|
+
if (o === void 0)
|
|
106
106
|
return !1;
|
|
107
|
-
const p = (
|
|
107
|
+
const p = (a = this.five.work.observers[o]) == null ? void 0 : a.position;
|
|
108
108
|
if (p === void 0)
|
|
109
109
|
throw new Error(`getVisible(): observerPosition is ${p}`);
|
|
110
|
-
const j =
|
|
110
|
+
const j = C(e.position).sub(p).normalize();
|
|
111
111
|
this.raycaster.set(p, j);
|
|
112
112
|
const [k] = this.five.model.intersectRaycaster(this.raycaster), A = (h = (g = s.intersectRaycaster) == null ? void 0 : g.distanceAccuracy) != null ? h : 0.01;
|
|
113
|
-
if (k && k.distance + A <
|
|
113
|
+
if (k && k.distance + A < l)
|
|
114
114
|
return !1;
|
|
115
115
|
}
|
|
116
116
|
return !(s.angleRange && e.dimensionType === b.Three && P(this.getAngle(e), s.angleRange) === !1);
|
|
117
117
|
})();
|
|
118
|
-
return
|
|
118
|
+
return n.visible = c, n.visible;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
getUnfoldedByPanoIndex(e, i) {
|
|
122
122
|
if (!this.getVisibleByPanoIndex(e))
|
|
123
123
|
return;
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
return
|
|
124
|
+
const o = this.getCaches({ panoIndex: i, id: e.id });
|
|
125
|
+
if (o.unfolded !== void 0)
|
|
126
|
+
return o.unfolded;
|
|
127
127
|
{
|
|
128
128
|
const t = this.getTagConfig(e).unfoldedConfig;
|
|
129
129
|
if (!t)
|
|
130
130
|
return;
|
|
131
131
|
const c = (() => {
|
|
132
|
-
const
|
|
132
|
+
const l = this.getDistance(e);
|
|
133
133
|
if (typeof t == "function")
|
|
134
|
-
return t(this.five, { tag: e, distance:
|
|
134
|
+
return t(this.five, { tag: e, distance: l });
|
|
135
135
|
if (t.keep === "folded")
|
|
136
136
|
return !1;
|
|
137
137
|
if (t.keep === "unfolded")
|
|
@@ -140,21 +140,21 @@ class L extends $ {
|
|
|
140
140
|
return !1;
|
|
141
141
|
if (t.disableFold === !0)
|
|
142
142
|
return !0;
|
|
143
|
-
if (t.unfoldDistance && P(
|
|
143
|
+
if (t.unfoldDistance && P(l, t.unfoldDistance) === !1)
|
|
144
144
|
return !1;
|
|
145
145
|
})();
|
|
146
|
-
|
|
146
|
+
o.unfolded = c;
|
|
147
147
|
const s = this.getUnfoldedByCamera(e);
|
|
148
|
-
return s !== void 0 ? s :
|
|
148
|
+
return s !== void 0 ? s : o.unfolded;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
getUnfoldedByCamera(e) {
|
|
152
152
|
return this.getVisibleByPanoIndex(e) ? (() => {
|
|
153
153
|
var c;
|
|
154
|
-
const
|
|
154
|
+
const o = this.getDistance(e), t = this.getTagConfig(e).unfoldedConfig;
|
|
155
155
|
if (!!t) {
|
|
156
156
|
if (typeof t == "function")
|
|
157
|
-
return t(this.five, { tag: e, distance:
|
|
157
|
+
return t(this.five, { tag: e, distance: o });
|
|
158
158
|
if (t.keep === "folded")
|
|
159
159
|
return !1;
|
|
160
160
|
if (t.keep === "unfolded")
|
|
@@ -171,17 +171,17 @@ class L extends $ {
|
|
|
171
171
|
return !1;
|
|
172
172
|
}
|
|
173
173
|
if (t.autoUnfold.strategy === "MinimumDistance") {
|
|
174
|
-
const f = this.filterPointTag().filter((
|
|
175
|
-
const g = this.getTagProject(
|
|
174
|
+
const f = this.filterPointTag().filter((a) => this.getVisibleByPanoIndex(a)).filter((a) => {
|
|
175
|
+
const g = this.getTagProject(a);
|
|
176
176
|
if (!g)
|
|
177
177
|
return !1;
|
|
178
178
|
const { x: h, y: p, z: j } = g;
|
|
179
179
|
return !(Math.abs(j) > 1 || Math.abs(h) > 1 || Math.abs(p) > 1);
|
|
180
|
-
}).filter((
|
|
180
|
+
}).filter((a) => {
|
|
181
181
|
var h;
|
|
182
|
-
const g = this.getTagConfig(
|
|
182
|
+
const g = this.getTagConfig(a).unfoldedConfig;
|
|
183
183
|
return typeof g == "object" && ((h = g.autoUnfold) == null ? void 0 : h.strategy) === "MinimumDistance";
|
|
184
|
-
}).map((
|
|
184
|
+
}).map((a) => ({ id: a.id, distance: this.getDistance(a) })).filter((a) => a.distance !== void 0).sort((a, g) => a.distance - g.distance).findIndex((a) => a.id === e.id);
|
|
185
185
|
if (f === -1 || f <= ((c = t.autoUnfold.maxNumber) != null ? c : 1) - 1 === !1)
|
|
186
186
|
return !1;
|
|
187
187
|
}
|
|
@@ -191,66 +191,84 @@ class L extends $ {
|
|
|
191
191
|
}
|
|
192
192
|
getDistance(e, i) {
|
|
193
193
|
var t, c, s;
|
|
194
|
-
const
|
|
195
|
-
if (
|
|
196
|
-
throw new Error(`getDistance(): fivePanoIndex is ${
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
199
|
-
return
|
|
194
|
+
const n = (t = this.five.panoIndex) != null ? t : i;
|
|
195
|
+
if (n === void 0)
|
|
196
|
+
throw new Error(`getDistance(): fivePanoIndex is ${n}`);
|
|
197
|
+
const o = this.getCaches({ panoIndex: i, id: e.id });
|
|
198
|
+
if (o.distance !== void 0)
|
|
199
|
+
return o.distance;
|
|
200
200
|
{
|
|
201
|
-
const
|
|
202
|
-
if (
|
|
203
|
-
throw new Error(`getDistance(): observerPosition is ${
|
|
204
|
-
const f = (() => e.pointType === v.PointTag ?
|
|
205
|
-
return
|
|
201
|
+
const l = (s = (c = this.five.work) == null ? void 0 : c.observers[n]) == null ? void 0 : s.position;
|
|
202
|
+
if (l === void 0)
|
|
203
|
+
throw new Error(`getDistance(): observerPosition is ${l}`);
|
|
204
|
+
const f = (() => e.pointType === v.PointTag ? M(e == null ? void 0 : e.position) : C(e.position))(), u = l.distanceTo(f);
|
|
205
|
+
return o.distance = u, u;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
getAngle(e, i) {
|
|
209
209
|
var t, c, s;
|
|
210
|
-
const
|
|
211
|
-
if (
|
|
212
|
-
throw new Error(`getDistance(): fivePanoIndex is ${
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
215
|
-
return
|
|
210
|
+
const n = (t = this.five.panoIndex) != null ? t : i;
|
|
211
|
+
if (n === void 0)
|
|
212
|
+
throw new Error(`getDistance(): fivePanoIndex is ${n}`);
|
|
213
|
+
const o = this.getCaches({ panoIndex: i, id: e.id });
|
|
214
|
+
if (o.angle !== void 0)
|
|
215
|
+
return o.angle;
|
|
216
216
|
{
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
throw new Error(`getAngleRange(): observerPosition is ${
|
|
220
|
-
const f = (() => e.pointType === v.PointTag ?
|
|
217
|
+
const l = (s = (c = this.five.work) == null ? void 0 : c.observers[n]) == null ? void 0 : s.position;
|
|
218
|
+
if (l === void 0)
|
|
219
|
+
throw new Error(`getAngleRange(): observerPosition is ${l}`);
|
|
220
|
+
const f = (() => e.pointType === v.PointTag ? R(e.normal) : O(e.position))();
|
|
221
221
|
if (!f)
|
|
222
222
|
return;
|
|
223
|
-
const u = new w.Vector3().copy(
|
|
224
|
-
return
|
|
223
|
+
const u = new w.Vector3().copy(l).sub(C(e.position)), a = f.angleTo(u) * 180 / Math.PI;
|
|
224
|
+
return o.angle = a, o.angle;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
getTagConfig(e) {
|
|
228
|
-
var
|
|
228
|
+
var o;
|
|
229
229
|
if (!e)
|
|
230
|
-
return (
|
|
230
|
+
return (o = this.config.globalConfig) != null ? o : {};
|
|
231
231
|
const i = {};
|
|
232
232
|
return this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((t) => {
|
|
233
233
|
const c = t;
|
|
234
234
|
if (i[c])
|
|
235
235
|
return;
|
|
236
|
-
const s = c.split("-"), [
|
|
237
|
-
(e.dimensionType ===
|
|
236
|
+
const s = c.split("-"), [l = "Any", f = "Any", u = "Any"] = s || [];
|
|
237
|
+
(e.dimensionType === l || l === "Any") && (e.contentType === f || f === "Any") && (e.pointType === u || u === "Any") && (i[c] = this.config.contentTypeConfig[c]);
|
|
238
238
|
}), y.exports({}, this.config.globalConfig, ...Object.values(i), e.config);
|
|
239
239
|
}
|
|
240
|
+
canBe(e, i) {
|
|
241
|
+
const n = this.getTagConfig(i);
|
|
242
|
+
if (!n || typeof n != "object")
|
|
243
|
+
return !0;
|
|
244
|
+
if (e === "show" || e === "hide") {
|
|
245
|
+
if (!n.visibleConfig || typeof n.visibleConfig != "object")
|
|
246
|
+
return !0;
|
|
247
|
+
if (e === "show" && n.visibleConfig.keep === "hidden" || e === "hide" && (n.visibleConfig.keep === "visible" || n.visibleConfig.alwaysShowWhenMovePano))
|
|
248
|
+
return !1;
|
|
249
|
+
}
|
|
250
|
+
if (e === "fold" || e === "unfold") {
|
|
251
|
+
if (!n.unfoldedConfig || typeof n.unfoldedConfig != "object")
|
|
252
|
+
return !0;
|
|
253
|
+
if (e === "fold" && (n.unfoldedConfig.disableFold || n.unfoldedConfig.keep === "unfolded") || e === "unfold" && (n.unfoldedConfig.disableUnfold || n.unfoldedConfig.keep === "folded"))
|
|
254
|
+
return !1;
|
|
255
|
+
}
|
|
256
|
+
return !0;
|
|
257
|
+
}
|
|
240
258
|
setPointTagPosition() {
|
|
241
259
|
const e = this.filterPointTag();
|
|
242
260
|
e.length !== 0 && e.forEach((i) => {
|
|
243
|
-
var
|
|
244
|
-
if (!((
|
|
261
|
+
var o;
|
|
262
|
+
if (!((o = i.state) != null && o.visible)) {
|
|
245
263
|
i.pointTagStyle = void 0;
|
|
246
264
|
return;
|
|
247
265
|
}
|
|
248
|
-
const
|
|
249
|
-
if (!
|
|
266
|
+
const n = this.getTagProject(i);
|
|
267
|
+
if (!n) {
|
|
250
268
|
i.pointTagStyle = void 0;
|
|
251
269
|
return;
|
|
252
270
|
}
|
|
253
|
-
i.pointTagStyle = { leftPercent: (
|
|
271
|
+
i.pointTagStyle = { leftPercent: (n.x + 1) / 2 * 100, topPercent: (-n.y + 1) / 2 * 100 };
|
|
254
272
|
});
|
|
255
273
|
}
|
|
256
274
|
setVisibleByPanoIndex() {
|
|
@@ -263,17 +281,17 @@ class L extends $ {
|
|
|
263
281
|
this.tags.forEach((e) => {
|
|
264
282
|
const i = this.getUnfoldedByPanoIndex(e);
|
|
265
283
|
if (!!e.state && (i !== void 0 && (e.state.unfolded = i), i && !e.state.visible)) {
|
|
266
|
-
const
|
|
267
|
-
typeof
|
|
284
|
+
const n = this.getTagConfig(e);
|
|
285
|
+
typeof n.unfoldedConfig == "object" && n.unfoldedConfig.autoUnfoldWhenHide !== !1 && (e.state.unfolded = !1);
|
|
268
286
|
}
|
|
269
287
|
});
|
|
270
288
|
}
|
|
271
289
|
getTagProject(e) {
|
|
272
290
|
if (!this.getVisibleByPanoIndex(e))
|
|
273
291
|
return;
|
|
274
|
-
const
|
|
292
|
+
const n = C(e.position), { x: o, y: t, z: c } = n.project(this.five.camera);
|
|
275
293
|
if (!(c > 1))
|
|
276
|
-
return { x:
|
|
294
|
+
return { x: o, y: t, z: c };
|
|
277
295
|
}
|
|
278
296
|
filterPointTag() {
|
|
279
297
|
return this.tags.filter((e) => e.pointType === v.PointTag);
|
|
@@ -292,6 +310,6 @@ class L extends $ {
|
|
|
292
310
|
}
|
|
293
311
|
}
|
|
294
312
|
export {
|
|
295
|
-
|
|
313
|
+
K as T,
|
|
296
314
|
y as o
|
|
297
315
|
};
|
package/libs/index.js
CHANGED
|
@@ -205,7 +205,7 @@ 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.0920083a.js";
|
|
209
209
|
import "./PanoTagPlugin/tag.config.js";
|
|
210
210
|
import "./PanoTagPlugin/utils/planeNormal.js";
|
|
211
211
|
import "./PanoTagPlugin/utils/tagPosition.js";
|
|
@@ -224,7 +224,7 @@ import "./PanoTagPlugin/utils/search.js";
|
|
|
224
224
|
import "./PanoTagPlugin/utils/constants.js";
|
|
225
225
|
import "./PanoTagPlugin/Components/Common/Arrow.js";
|
|
226
226
|
import "./PanoTagPlugin/Assets/Icon.js";
|
|
227
|
-
import "./PanoTagPlugin/utils/
|
|
227
|
+
import "./PanoTagPlugin/utils/doUtil.js";
|
|
228
228
|
import "./PanoTagPlugin/Components/Tag/ImageTextTag.js";
|
|
229
229
|
import "./PanoTagPlugin/Components/Common/Line/Polyline.js";
|
|
230
230
|
import "./PanoTagPlugin/Components/Common/Media.js";
|
package/package.json
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
"name": "@realsee/dnalogel",
|
|
3
3
|
"main": "dist/index.es.js",
|
|
4
4
|
"module": "dist/index.es.js",
|
|
5
|
-
"browser": "dist/index.es.js",
|
|
6
5
|
"type": "module",
|
|
7
6
|
"types": "libs/index.d.ts",
|
|
8
7
|
"author": "REALSEE-DEVELOPER",
|
|
9
8
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
10
9
|
"description": "如视 VR 看房插件合集",
|
|
11
10
|
"private": false,
|
|
12
|
-
"version": "2.1.0-alpha.
|
|
11
|
+
"version": "2.1.0-alpha.23",
|
|
13
12
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
14
13
|
"scripts": {
|
|
15
14
|
"build": "sh bin/build-production.sh",
|