@realsee/dnalogel 2.6.2 → 2.6.3-dev.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/dist/PanoTagPlugin/controller/TagCacheController.d.ts +3 -3
- package/dist/PanoTagPlugin/controller/index.d.ts +1 -1
- package/dist/PanoTagPlugin/typings/controller.d.ts +4 -0
- package/dist/PanoTagPlugin/typings/tag/TagData.d.ts +0 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +55 -26
- package/dist/index.umd.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +4 -4
- package/docs/classes/CruisePluginController.html +4 -4
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/classes/Object3DHelperController.html +4 -4
- package/docs/classes/PaintBrush.html +4 -4
- package/docs/classes/PanoMeasurePluginLine.html +4 -4
- package/docs/classes/PanoMeasurePluginModel.html +4 -4
- package/docs/classes/PanoMeasurePluginPoint.html +4 -4
- package/docs/classes/PanoMeasurePluginPolyline.html +4 -4
- package/docs/classes/PanoTagPluginController.html +11 -11
- package/docs/classes/Util.BetterTween.html +4 -4
- package/docs/classes/Util.FivePointSelector.html +4 -4
- package/docs/classes/Util.Interval.html +4 -4
- package/docs/classes/Util.Magnifier.html +4 -4
- package/docs/classes/Util.PointDomHelper.html +4 -4
- package/docs/classes/Util.PointHelper.html +4 -4
- package/docs/classes/Util.Rectangle.html +4 -4
- package/docs/enums/CameraMovementEffect.html +4 -4
- package/docs/enums/ContentType.html +52 -56
- package/docs/enums/DIRECTION.html +4 -4
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +4 -4
- package/docs/enums/DimensionType.html +4 -4
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +4 -4
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +4 -4
- package/docs/enums/PaintBrushTypeEnum.html +4 -4
- package/docs/enums/PointType.html +4 -4
- package/docs/enums/Rotation.html +4 -4
- package/docs/functions/CSS3DRenderPlugin.html +5 -5
- package/docs/functions/CameraMovementPlugin.html +5 -5
- package/docs/functions/CruisePlugin.html +5 -5
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +5 -5
- package/docs/functions/MapviewFloorplanPlugin.html +5 -5
- package/docs/functions/ModelChassisCompassPlugin.html +5 -5
- package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -5
- package/docs/functions/ModelFloorplanPlugin.html +5 -5
- package/docs/functions/ModelItemLabelPlugin.html +5 -5
- package/docs/functions/ModelRoomLabelPlugin.html +5 -5
- package/docs/functions/ModelTVVideoPlugin.html +5 -5
- package/docs/functions/ModelViewPlugin.html +5 -5
- package/docs/functions/Object3DHelperPlugin.html +5 -5
- package/docs/functions/PanoCompassPlugin.html +5 -5
- package/docs/functions/PanoCursorRaycasterPlugin.html +5 -5
- package/docs/functions/PanoDoorLabelPlugin.html +5 -5
- package/docs/functions/PanoFloorplanRadarPlugin.html +5 -5
- package/docs/functions/PanoMeasurePlugin.html +5 -5
- package/docs/functions/PanoRulerPlugin.html +5 -5
- package/docs/functions/PanoRulerProPlugin.html +5 -5
- package/docs/functions/PanoSpatialTagPlugin.html +5 -5
- package/docs/functions/PanoTagPlugin.html +5 -5
- package/docs/functions/TopviewFloorplanPlugin.html +5 -5
- package/docs/functions/Util.getCoordsFromClient.html +4 -4
- package/docs/functions/Util.getCoordsFromElement.html +4 -4
- package/docs/functions/Util.getFrameTime.html +4 -4
- package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -4
- package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -4
- package/docs/functions/Util.isNil.html +4 -4
- package/docs/functions/Util.nextFrame.html +4 -4
- package/docs/functions/Util.notNil.html +4 -4
- package/docs/functions/Util.requestAnimationFrameInterval.html +4 -4
- package/docs/functions/Util.tweenProgress.html +4 -4
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +5 -5
- package/docs/interfaces/AddTagConfig.html +4 -4
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +4 -4
- package/docs/interfaces/CSS3DRenderPluginState.html +4 -4
- package/docs/interfaces/CameraMovementPluginExportType.html +4 -4
- package/docs/interfaces/EventMap.html +4 -4
- package/docs/interfaces/FloorplanBounding.html +4 -4
- package/docs/interfaces/FloorplanData.html +4 -4
- package/docs/interfaces/FloorplanEntrance.html +4 -4
- package/docs/interfaces/FloorplanExtraObject.html +4 -4
- package/docs/interfaces/FloorplanExtraObject3D.html +4 -4
- package/docs/interfaces/FloorplanFloorData.html +4 -4
- package/docs/interfaces/FloorplanImagePosition.html +4 -4
- package/docs/interfaces/FloorplanObserver.html +4 -4
- package/docs/interfaces/FloorplanOutlineItem.html +4 -4
- package/docs/interfaces/FloorplanPosition.html +4 -4
- package/docs/interfaces/FloorplanRoomItem.html +4 -4
- package/docs/interfaces/FloorplanRoomLabelItem.html +4 -4
- package/docs/interfaces/FloorplanServerBounding.html +4 -4
- package/docs/interfaces/FloorplanServerComputedData.html +4 -4
- package/docs/interfaces/FloorplanServerData.html +4 -4
- package/docs/interfaces/FloorplanServerDoorItem.html +4 -4
- package/docs/interfaces/FloorplanServerDoorPosition.html +4 -4
- package/docs/interfaces/FloorplanServerEntrance.html +4 -4
- package/docs/interfaces/FloorplanServerFloorData.html +4 -4
- package/docs/interfaces/FloorplanServerImagePosition.html +4 -4
- package/docs/interfaces/FloorplanServerObserver.html +4 -4
- package/docs/interfaces/FloorplanServerOutlineItem.html +4 -4
- package/docs/interfaces/FloorplanServerPosition.html +4 -4
- package/docs/interfaces/FloorplanServerRoomItem.html +4 -4
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +4 -4
- package/docs/interfaces/ItemLabelPluginData.html +4 -4
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +4 -4
- package/docs/interfaces/ItemLabelPluginParametersType.html +4 -4
- package/docs/interfaces/MinMax.html +4 -4
- package/docs/interfaces/ModelChassisCompassPluginData.html +4 -4
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +4 -4
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +4 -4
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +4 -4
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +4 -4
- package/docs/interfaces/ModelItemLabelPluginData.html +4 -4
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +4 -4
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +4 -4
- package/docs/interfaces/ModelRoomLabelPluginData.html +4 -4
- package/docs/interfaces/ModelTVVideoPluginData.html +4 -4
- package/docs/interfaces/ModelTVVideoPluginExportType.html +4 -4
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +4 -4
- package/docs/interfaces/ModelViewPluginExportType.html +4 -4
- package/docs/interfaces/Object3DHelperState.html +4 -4
- package/docs/interfaces/PaintBrushAction.html +4 -4
- package/docs/interfaces/PaintBrushConfigs.html +4 -4
- package/docs/interfaces/PaintBrushState.html +4 -4
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +4 -4
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +4 -4
- package/docs/interfaces/PanoMeasurePluginLineJson.html +4 -4
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +4 -4
- package/docs/interfaces/PanoMeasurePluginPointJson.html +4 -4
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +4 -4
- package/docs/interfaces/PanoRulerPluginExportType.html +4 -4
- package/docs/interfaces/PanoRulerPluginOptions.html +4 -4
- package/docs/interfaces/PanoRulerPluginParameterType.html +4 -4
- package/docs/interfaces/PanoRulerProPluginExportType.html +4 -4
- package/docs/interfaces/PanoRulerProPluginOptions.html +4 -4
- package/docs/interfaces/PanoRulerProPluginParameterType.html +4 -4
- package/docs/interfaces/PanoRulerProPluginState.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +4 -4
- package/docs/interfaces/Point.html +4 -4
- package/docs/interfaces/Room.html +4 -4
- package/docs/interfaces/RoomInfo.html +4 -4
- package/docs/interfaces/RoomLabel.html +4 -4
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +4 -4
- package/docs/interfaces/State.html +4 -4
- package/docs/interfaces/TagCache.html +20 -6
- package/docs/interfaces/TagConfig.html +4 -4
- package/docs/interfaces/TagIconUrl.html +4 -4
- package/docs/interfaces/Tags.html +4 -4
- package/docs/interfaces/TemporaryState.html +4 -4
- package/docs/interfaces/Util.MagnifierParameter.html +4 -4
- package/docs/interfaces/Util.MouseGroupParameter.html +4 -4
- package/docs/modules/Util.html +4 -4
- package/docs/modules.html +6 -6
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/AudioAppearance.html +5 -5
- package/docs/types/AudioTagTypeConfigKey.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeySplit.html +5 -5
- package/docs/types/ContentTypeMap.html +6 -6
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/LoadTagConfig.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/MediaStore.html +6 -6
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoIndex.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PlaneTagElement.html +6 -6
- package/docs/types/Point2DElement.html +6 -6
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DElement.html +6 -6
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagElement.html +6 -6
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/StickType.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagContentType.html +6 -6
- package/docs/types/TagDimensionType.html +5 -5
- package/docs/types/TagElement.html +6 -6
- package/docs/types/TagEvents.html +5 -5
- package/docs/types/TagHooks.html +5 -5
- package/docs/types/TagIconSize.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TagPointType.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/WorkCode.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/PanoTagPlugin/controller/TagCacheController.d.ts +3 -3
- package/libs/PanoTagPlugin/controller/TagCacheController.js +6 -6
- package/libs/PanoTagPlugin/controller/TagComputer.js +159 -130
- package/libs/PanoTagPlugin/controller/index.d.ts +1 -1
- package/libs/PanoTagPlugin/typings/controller.d.ts +4 -0
- package/libs/PanoTagPlugin/typings/tag/TagData.d.ts +0 -1
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var P = (
|
|
1
|
+
var j = Object.defineProperty, w = Object.defineProperties;
|
|
2
|
+
var $ = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var k = Object.getOwnPropertySymbols;
|
|
4
|
+
var R = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var P = (g, c, e) => c in g ? j(g, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : g[c] = e, x = (g, c) => {
|
|
6
6
|
for (var e in c || (c = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var b = (
|
|
7
|
+
R.call(c, e) && P(g, e, c[e]);
|
|
8
|
+
if (k)
|
|
9
|
+
for (var e of k(c))
|
|
10
|
+
A.call(c, e) && P(g, e, c[e]);
|
|
11
|
+
return g;
|
|
12
|
+
}, I = (g, c) => w(g, $(c));
|
|
13
|
+
var b = (g, c, e) => (P(g, typeof c != "symbol" ? c + "" : c, e), e);
|
|
14
14
|
import D from "object-assign-deep";
|
|
15
|
-
import * as
|
|
16
|
-
import { DefaultConfig as
|
|
17
|
-
import { is3DTag as
|
|
15
|
+
import * as U from "three";
|
|
16
|
+
import { DefaultConfig as B } from "../tag.config.js";
|
|
17
|
+
import { is3DTag as E, isPointTag as V } from "../utils/tag/tagCheck.js";
|
|
18
18
|
import { arrayPositionToVector3 as M, anyPositionToVector3 as S } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
19
|
-
import { planeNormal as
|
|
19
|
+
import { planeNormal as _ } from "../utils/planeNormal.js";
|
|
20
20
|
import { tagPosition as T } from "../utils/tagPosition.js";
|
|
21
21
|
import { checkRange as y } from "../utils/checkRange.js";
|
|
22
22
|
import { TagCacheController as z } from "./TagCacheController.js";
|
|
@@ -27,89 +27,118 @@ class Y extends z {
|
|
|
27
27
|
constructor(e) {
|
|
28
28
|
super(e);
|
|
29
29
|
b(this, "tags", []);
|
|
30
|
-
b(this, "config",
|
|
31
|
-
b(this, "raycaster", new
|
|
30
|
+
b(this, "config", B);
|
|
31
|
+
b(this, "raycaster", new U.Raycaster());
|
|
32
32
|
}
|
|
33
33
|
get isPanorama() {
|
|
34
34
|
return this.five.currentMode === "Panorama";
|
|
35
35
|
}
|
|
36
36
|
getTagById(e) {
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
console.error(`getTagById(): tag is ${
|
|
37
|
+
const n = this.tags.find((i) => i.id === e);
|
|
38
|
+
if (!n) {
|
|
39
|
+
console.error(`getTagById(): tag is ${n}, id is ${e}`);
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
return
|
|
42
|
+
return n;
|
|
43
43
|
}
|
|
44
|
-
changeContentTypeConfig(e,
|
|
45
|
-
this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), i ? this.config.contentTypeConfig[e] = D({}, this.config.contentTypeConfig[e],
|
|
44
|
+
changeContentTypeConfig(e, n, i = !0) {
|
|
45
|
+
this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), i ? this.config.contentTypeConfig[e] = D({}, this.config.contentTypeConfig[e], n) : this.config.contentTypeConfig[e] = n, this.clearCache();
|
|
46
46
|
}
|
|
47
|
-
getVisibleByPanoIndex(e,
|
|
47
|
+
getVisibleByPanoIndex(e, n) {
|
|
48
48
|
var o;
|
|
49
|
-
const i = this.
|
|
49
|
+
const i = this.getCache({ panoIndex: n, id: e.id }), s = (o = this.five.panoIndex) != null ? o : n;
|
|
50
50
|
if (i.visible !== void 0)
|
|
51
51
|
return i.visible;
|
|
52
52
|
{
|
|
53
|
-
const
|
|
54
|
-
var d,
|
|
55
|
-
const
|
|
56
|
-
if (typeof
|
|
57
|
-
return
|
|
58
|
-
if (
|
|
59
|
-
return !1;
|
|
60
|
-
if (
|
|
61
|
-
return !0;
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
|
|
53
|
+
const a = (() => {
|
|
54
|
+
var d, h, f, l;
|
|
55
|
+
const t = (d = this.getTagConfig(e).visibleConfig) != null ? d : {}, r = this.getDistance(e);
|
|
56
|
+
if (typeof t == "function")
|
|
57
|
+
return { value: t(this.five, { tag: e, distance: r }), reason: "config function result" };
|
|
58
|
+
if (t.keep === "hidden")
|
|
59
|
+
return { value: !1, reason: "config.keep is hidden" };
|
|
60
|
+
if (t.keep === "visible")
|
|
61
|
+
return { value: !0, reason: "config.keep is visible" };
|
|
62
|
+
if (t.visiblePanoIndex !== void 0 && t.visiblePanoIndex !== "all" && s !== void 0) {
|
|
63
|
+
if (Array.isArray(t.visiblePanoIndex) && !t.visiblePanoIndex.includes(s))
|
|
64
|
+
return {
|
|
65
|
+
value: !1,
|
|
66
|
+
reason: `current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${t.visiblePanoIndex}`
|
|
67
|
+
};
|
|
68
|
+
if (t.visiblePanoIndex === "current" && s !== ((h = e.fiveState) == null ? void 0 : h.panoIndex))
|
|
69
|
+
return {
|
|
70
|
+
value: !1,
|
|
71
|
+
reason: `current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(f = e.fiveState) == null ? void 0 : f.panoIndex}`
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (t.visibleDistance !== void 0 && t.visibleDistance !== "unLimited" && y(r, t.visibleDistance) === !1)
|
|
75
|
+
return {
|
|
76
|
+
value: !1,
|
|
77
|
+
reason: `distance is not in visibleDistance. distance: ${r}, visibleDistance: ${t.visibleDistance}`
|
|
78
|
+
};
|
|
79
|
+
if (t.intersectRaycaster !== !1 && (typeof t.intersectRaycaster != "object" || t.intersectRaycaster.enabled !== !1)) {
|
|
65
80
|
if (s === void 0)
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
81
|
+
return {
|
|
82
|
+
value: !1,
|
|
83
|
+
reason: `intersectRaycaster check failed: fivePanoIndex is ${s}`
|
|
84
|
+
};
|
|
85
|
+
const u = (l = this.five.work.observers[s]) == null ? void 0 : l.position;
|
|
86
|
+
if (u === void 0)
|
|
87
|
+
throw new Error(`getVisible(): observerPosition is ${u}`);
|
|
88
|
+
const p = T(e.position).sub(u).normalize();
|
|
89
|
+
this.raycaster.set(u, p);
|
|
90
|
+
const [v] = this.five.model.intersectRaycaster(this.raycaster), C = (() => {
|
|
91
|
+
var m;
|
|
92
|
+
return typeof t.intersectRaycaster == "object" && (m = t.intersectRaycaster.distanceAccuracy) != null ? m : 0.01;
|
|
75
93
|
})();
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
94
|
+
if (v && v.distance + C < r)
|
|
95
|
+
return {
|
|
96
|
+
value: !1,
|
|
97
|
+
reason: `intersectRaycaster check failed: distance is ${r}, intersection.distance is ${v.distance}, distanceError is ${C}`
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
if (t.angleRange && E(e)) {
|
|
101
|
+
const u = this.getAngle(e);
|
|
102
|
+
if (y(u, t.angleRange) === !1)
|
|
103
|
+
return { value: !1, reason: `angle is not in angleRange. angle: ${u}, angleRange: ${t.angleRange}` };
|
|
78
104
|
}
|
|
79
|
-
return
|
|
105
|
+
return {
|
|
106
|
+
value: !0,
|
|
107
|
+
reason: "all check passed"
|
|
108
|
+
};
|
|
80
109
|
})();
|
|
81
|
-
return i.visible =
|
|
110
|
+
return i.visible = a.value, i.__debug_visiblereason__ = a, i.visible;
|
|
82
111
|
}
|
|
83
112
|
}
|
|
84
|
-
getUnfoldedByPanoIndex(e,
|
|
113
|
+
getUnfoldedByPanoIndex(e, n) {
|
|
85
114
|
if (!this.getVisibleByPanoIndex(e))
|
|
86
115
|
return;
|
|
87
|
-
const s = this.
|
|
116
|
+
const s = this.getCache({ panoIndex: n, id: e.id });
|
|
88
117
|
if (s.unfolded !== void 0)
|
|
89
118
|
return s.unfolded;
|
|
90
119
|
{
|
|
91
120
|
const o = this.getTagConfig(e).unfoldedConfig;
|
|
92
121
|
if (!o)
|
|
93
122
|
return;
|
|
94
|
-
const
|
|
95
|
-
const
|
|
123
|
+
const a = (() => {
|
|
124
|
+
const r = this.getDistance(e);
|
|
96
125
|
if (typeof o == "function")
|
|
97
|
-
return o(this.five, { tag: e, distance:
|
|
126
|
+
return o(this.five, { tag: e, distance: r });
|
|
98
127
|
if (o.keep === "folded")
|
|
99
128
|
return !1;
|
|
100
129
|
if (o.keep === "unfolded")
|
|
101
130
|
return !0;
|
|
102
|
-
if (o.unfoldDistance && y(
|
|
131
|
+
if (o.unfoldDistance && y(r, o.unfoldDistance) === !1)
|
|
103
132
|
return !1;
|
|
104
133
|
})();
|
|
105
|
-
s.unfolded =
|
|
106
|
-
const
|
|
107
|
-
return
|
|
134
|
+
s.unfolded = a;
|
|
135
|
+
const t = this.getUnfoldedByCamera(e);
|
|
136
|
+
return t !== void 0 ? t : s.unfolded;
|
|
108
137
|
}
|
|
109
138
|
}
|
|
110
139
|
getUnfoldedByCamera(e) {
|
|
111
140
|
return this.getVisibleByPanoIndex(e) ? (() => {
|
|
112
|
-
var
|
|
141
|
+
var a;
|
|
113
142
|
const s = this.getDistance(e), o = this.getTagConfig(e).unfoldedConfig;
|
|
114
143
|
if (!!o) {
|
|
115
144
|
if (typeof o == "function")
|
|
@@ -121,97 +150,97 @@ class Y extends z {
|
|
|
121
150
|
if (o.autoUnfold === void 0 || o.autoUnfold === !1 || o.autoUnfold.enable === !1)
|
|
122
151
|
return;
|
|
123
152
|
if (o.autoUnfold.strategy === "ScreenPostion") {
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
153
|
+
const t = this.getTagProject(e);
|
|
154
|
+
if (t && y(t.x, o.autoUnfold.autoUnfoldProjectX) === !1)
|
|
126
155
|
return !1;
|
|
127
156
|
}
|
|
128
157
|
if (o.autoUnfold.strategy === "MinimumDistance") {
|
|
129
|
-
const d = this.filterPointTag().filter((
|
|
130
|
-
const
|
|
131
|
-
if (!
|
|
158
|
+
const d = this.filterPointTag().filter((f) => this.getVisibleByPanoIndex(f)).filter((f) => {
|
|
159
|
+
const l = this.getTagProject(f);
|
|
160
|
+
if (!l)
|
|
132
161
|
return !1;
|
|
133
|
-
const { x:
|
|
134
|
-
return !(Math.abs(v) > 1 || Math.abs(
|
|
135
|
-
}).map((
|
|
136
|
-
var
|
|
137
|
-
return !(typeof
|
|
138
|
-
}).map((
|
|
139
|
-
var
|
|
140
|
-
return !(
|
|
141
|
-
}).sort((
|
|
142
|
-
if (d === -1 || d <= ((
|
|
162
|
+
const { x: u, y: p, z: v } = l;
|
|
163
|
+
return !(Math.abs(v) > 1 || Math.abs(u) > 1 || Math.abs(p) > 1);
|
|
164
|
+
}).map((f) => ({ tag: f, id: f.id, tagConfig: this.getTagConfig(f).unfoldedConfig })).filter(({ tag: f, tagConfig: l }) => {
|
|
165
|
+
var u, p;
|
|
166
|
+
return !(typeof l != "object" || l.keep || l.autoUnfold === !1 || ((u = l.autoUnfold) == null ? void 0 : u.enable) === !1 || ((p = l.autoUnfold) == null ? void 0 : p.strategy) !== "MinimumDistance");
|
|
167
|
+
}).map((f) => I(x({}, f), { distance: this.getDistance(f.tag) })).filter(({ distance: f, tagConfig: l }) => {
|
|
168
|
+
var u, p;
|
|
169
|
+
return !(f === void 0 || typeof l != "object" || l.autoUnfold === !1 || ((u = l.autoUnfold) == null ? void 0 : u.enable) === !1 || ((p = l.autoUnfold) == null ? void 0 : p.strategy) !== "MinimumDistance" || l.autoUnfold.distance && y(f, l.autoUnfold.distance) === !1);
|
|
170
|
+
}).sort((f, l) => f.distance - l.distance).findIndex((f) => f.id === e.id);
|
|
171
|
+
if (d === -1 || d <= ((a = o.autoUnfold.maxNumber) != null ? a : 1) - 1 === !1)
|
|
143
172
|
return !1;
|
|
144
173
|
}
|
|
145
174
|
return !0;
|
|
146
175
|
}
|
|
147
176
|
})() : void 0;
|
|
148
177
|
}
|
|
149
|
-
getDistance(e,
|
|
150
|
-
var o,
|
|
151
|
-
const i = (o = this.five.panoIndex) != null ? o :
|
|
178
|
+
getDistance(e, n) {
|
|
179
|
+
var o, a, t;
|
|
180
|
+
const i = (o = this.five.panoIndex) != null ? o : n;
|
|
152
181
|
if (i === void 0)
|
|
153
182
|
throw new Error(`getDistance(): fivePanoIndex is ${i}`);
|
|
154
|
-
const s = this.
|
|
183
|
+
const s = this.getCache({ panoIndex: n, id: e.id });
|
|
155
184
|
if (s.distance !== void 0)
|
|
156
185
|
return s.distance;
|
|
157
186
|
{
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
throw new Error(`getDistance(): observerPosition is ${
|
|
161
|
-
const d = (() => V(e) ? M(e == null ? void 0 : e.position) : T(e.position))(),
|
|
162
|
-
return s.distance =
|
|
187
|
+
const r = (t = (a = this.five.work) == null ? void 0 : a.observers[i]) == null ? void 0 : t.position;
|
|
188
|
+
if (r === void 0)
|
|
189
|
+
throw new Error(`getDistance(): observerPosition is ${r}`);
|
|
190
|
+
const d = (() => V(e) ? M(e == null ? void 0 : e.position) : T(e.position))(), h = r.distanceTo(d);
|
|
191
|
+
return s.distance = h, h;
|
|
163
192
|
}
|
|
164
193
|
}
|
|
165
|
-
getAngle(e,
|
|
166
|
-
var o,
|
|
167
|
-
const i = (o = this.five.panoIndex) != null ? o :
|
|
194
|
+
getAngle(e, n) {
|
|
195
|
+
var o, a, t;
|
|
196
|
+
const i = (o = this.five.panoIndex) != null ? o : n;
|
|
168
197
|
if (i === void 0)
|
|
169
198
|
throw new Error(`getDistance(): fivePanoIndex is ${i}`);
|
|
170
|
-
const s = this.
|
|
199
|
+
const s = this.getCache({ panoIndex: n, id: e.id });
|
|
171
200
|
if (s.angle !== void 0)
|
|
172
201
|
return s.angle;
|
|
173
202
|
{
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
176
|
-
throw new Error(`getAngleRange(): observerPosition is ${
|
|
177
|
-
const d = (() => e.stickType === "3DPoint" ? S(e.normal) :
|
|
203
|
+
const r = (t = (a = this.five.work) == null ? void 0 : a.observers[i]) == null ? void 0 : t.position;
|
|
204
|
+
if (r === void 0)
|
|
205
|
+
throw new Error(`getAngleRange(): observerPosition is ${r}`);
|
|
206
|
+
const d = (() => e.stickType === "3DPoint" ? S(e.normal) : _(e.position))();
|
|
178
207
|
if (!d)
|
|
179
208
|
return;
|
|
180
|
-
const
|
|
181
|
-
return s.angle =
|
|
209
|
+
const h = new U.Vector3().copy(r).sub(T(e.position)), f = d.angleTo(h) * 180 / Math.PI;
|
|
210
|
+
return s.angle = f, s.angle;
|
|
182
211
|
}
|
|
183
212
|
}
|
|
184
213
|
getTagConfig(e) {
|
|
185
214
|
var s;
|
|
186
215
|
if (!e)
|
|
187
216
|
return (s = this.config.globalConfig) != null ? s : {};
|
|
188
|
-
const
|
|
217
|
+
const n = {};
|
|
189
218
|
this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((o) => {
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
219
|
+
const a = o;
|
|
220
|
+
if (n[a])
|
|
192
221
|
return;
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
const [
|
|
196
|
-
e.contentType ===
|
|
222
|
+
const t = a.split("-");
|
|
223
|
+
if (t.length === 1) {
|
|
224
|
+
const [r] = t;
|
|
225
|
+
e.contentType === r && (n[a] = this.config.contentTypeConfig[a]);
|
|
197
226
|
}
|
|
198
|
-
if (
|
|
199
|
-
const [
|
|
200
|
-
(e.stickType ===
|
|
227
|
+
if (t.length === 2) {
|
|
228
|
+
const [r = "Any", d = "Any"] = t;
|
|
229
|
+
(e.stickType === r || r === "Any") && (e.contentType === d || d === "Any") && (n[a] = this.config.contentTypeConfig[a]);
|
|
201
230
|
}
|
|
202
|
-
if (
|
|
203
|
-
const [
|
|
231
|
+
if (t.length === 3) {
|
|
232
|
+
const [r = "Any", d, h] = t;
|
|
204
233
|
if (d === "Audio" && e.contentType === "Audio") {
|
|
205
|
-
const
|
|
206
|
-
(
|
|
234
|
+
const f = e;
|
|
235
|
+
(f.stickType === r || r === "Any") && f.data.appearance === h && (n[a] = this.config.contentTypeConfig[a]);
|
|
207
236
|
}
|
|
208
237
|
}
|
|
209
238
|
});
|
|
210
|
-
const i = D({}, this.config.globalConfig, ...Object.values(
|
|
239
|
+
const i = D({}, this.config.globalConfig, ...Object.values(n), e.config);
|
|
211
240
|
return typeof i.unfoldedConfig == "object" && (i.unfoldedConfig.disableFold && (i.unfoldedConfig = { keep: "unfolded" }), i.unfoldedConfig.disableUnfold && (i.unfoldedConfig = { keep: "folded" }), i.unfoldedConfig.keep && (i.unfoldedConfig = { keep: i.unfoldedConfig.keep })), typeof i.visibleConfig == "object" && i.visibleConfig.keep && (i.visibleConfig = { keep: i.visibleConfig.keep }), i;
|
|
212
241
|
}
|
|
213
|
-
can(e,
|
|
214
|
-
const i = this.getTagConfig(
|
|
242
|
+
can(e, n) {
|
|
243
|
+
const i = this.getTagConfig(n);
|
|
215
244
|
if (!i || typeof i != "object")
|
|
216
245
|
return !0;
|
|
217
246
|
if (e === "show" || e === "hide") {
|
|
@@ -229,37 +258,37 @@ class Y extends z {
|
|
|
229
258
|
return !0;
|
|
230
259
|
}
|
|
231
260
|
sort(e) {
|
|
232
|
-
return e.sort((
|
|
233
|
-
const s = this.getDistance(
|
|
261
|
+
return e.sort((n, i) => {
|
|
262
|
+
const s = this.getDistance(n), o = this.getDistance(i);
|
|
234
263
|
return s === void 0 || o === void 0 ? 0 : o - s;
|
|
235
264
|
});
|
|
236
265
|
}
|
|
237
266
|
setPointTagPosition() {
|
|
238
267
|
const e = this.filterPointTag();
|
|
239
|
-
e.length !== 0 && e.forEach((
|
|
268
|
+
e.length !== 0 && e.forEach((n) => {
|
|
240
269
|
var s;
|
|
241
|
-
if (!((s =
|
|
242
|
-
|
|
270
|
+
if (!((s = n.state) != null && s.visible)) {
|
|
271
|
+
n.pointTagStyle = null;
|
|
243
272
|
return;
|
|
244
273
|
}
|
|
245
|
-
const i = this.getTagProject(
|
|
274
|
+
const i = this.getTagProject(n);
|
|
246
275
|
if (!i) {
|
|
247
|
-
|
|
276
|
+
n.pointTagStyle = null;
|
|
248
277
|
return;
|
|
249
278
|
}
|
|
250
|
-
|
|
279
|
+
n.pointTagStyle = { leftPercent: (i.x + 1) / 2 * 100, topPercent: (-i.y + 1) / 2 * 100 };
|
|
251
280
|
});
|
|
252
281
|
}
|
|
253
282
|
setVisibleByPanoIndex() {
|
|
254
283
|
this.tags.forEach((e) => {
|
|
255
|
-
const
|
|
256
|
-
e.state && (e.state.visible =
|
|
284
|
+
const n = this.getVisibleByPanoIndex(e);
|
|
285
|
+
e.state && (e.state.visible = n);
|
|
257
286
|
});
|
|
258
287
|
}
|
|
259
288
|
setUnfoldedByPanoIndex() {
|
|
260
289
|
this.tags.forEach((e) => {
|
|
261
|
-
const
|
|
262
|
-
if (!!e.state && (
|
|
290
|
+
const n = this.getUnfoldedByPanoIndex(e);
|
|
291
|
+
if (!!e.state && (n !== void 0 && (e.state.unfolded = n), n && !e.state.visible)) {
|
|
263
292
|
const i = this.getTagConfig(e);
|
|
264
293
|
typeof i.unfoldedConfig == "object" && i.unfoldedConfig.autoUnfoldWhenHide !== !1 && (e.state.unfolded = !1);
|
|
265
294
|
}
|
|
@@ -268,9 +297,9 @@ class Y extends z {
|
|
|
268
297
|
getTagProject(e) {
|
|
269
298
|
if (!this.getVisibleByPanoIndex(e))
|
|
270
299
|
return;
|
|
271
|
-
const i = T(e.position), { x: s, y: o, z:
|
|
272
|
-
if (!(
|
|
273
|
-
return { x: s, y: o, z:
|
|
300
|
+
const i = T(e.position), { x: s, y: o, z: a } = i.project(this.five.camera);
|
|
301
|
+
if (!(a > 1))
|
|
302
|
+
return { x: s, y: o, z: a };
|
|
274
303
|
}
|
|
275
304
|
filterPointTag() {
|
|
276
305
|
return this.tags.filter((e) => e.stickType === "2DPoint" || e.stickType === "3DPoint");
|
|
@@ -288,9 +317,9 @@ class Y extends z {
|
|
|
288
317
|
return this.tags.filter((e) => e.stickType === "Plane");
|
|
289
318
|
}
|
|
290
319
|
updateTagConfig(e) {
|
|
291
|
-
e != null && e.force && this.clearCache(), this.tags.forEach((
|
|
292
|
-
const i = this.getTagConfig(
|
|
293
|
-
|
|
320
|
+
e != null && e.force && this.clearCache(), this.tags.forEach((n) => {
|
|
321
|
+
const i = this.getTagConfig(n);
|
|
322
|
+
n.mergedConfig = i;
|
|
294
323
|
});
|
|
295
324
|
}
|
|
296
325
|
}
|
|
@@ -90,7 +90,7 @@ declare class PanoTagPluginController extends TagComputer {
|
|
|
90
90
|
* @description: 改变tag任意属性
|
|
91
91
|
*/
|
|
92
92
|
changeTagById<C extends TagContentType = any>(id: TagId, tag: PartialDeep<{
|
|
93
|
-
[P in keyof Pick<Tag<C>, 'enabled' | 'style' | 'stickType' | 'contentType' | 'data' | 'normal'>]: Tag[P];
|
|
93
|
+
[P in keyof Pick<Tag<C>, 'enabled' | 'style' | 'stickType' | 'contentType' | 'data' | 'normal' | 'config'>]: Tag[P];
|
|
94
94
|
}>, deepMerge?: boolean): void;
|
|
95
95
|
/**
|
|
96
96
|
* @description: 销毁tag
|
|
@@ -73,6 +73,10 @@ export interface TagCache {
|
|
|
73
73
|
minimumDistanceResult?: boolean;
|
|
74
74
|
distance?: number;
|
|
75
75
|
angle?: number;
|
|
76
|
+
__debug_visiblereason__?: {
|
|
77
|
+
value: boolean;
|
|
78
|
+
reason?: string;
|
|
79
|
+
};
|
|
76
80
|
}
|
|
77
81
|
export declare type TagElement<C extends TagContentType = TagContentType, S extends StickType = StickType> = Tag<C, S> & Partial<{
|
|
78
82
|
pointTagStyle: {
|
|
@@ -9,7 +9,6 @@ export declare type MediaData = {
|
|
|
9
9
|
};
|
|
10
10
|
declare type Object = Record<string | number | symbol, any>;
|
|
11
11
|
export declare type ObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
12
|
-
/** @deprecated 改用具体的string */
|
|
13
12
|
export declare enum ContentType {
|
|
14
13
|
/** 音频标签 */
|
|
15
14
|
Audio = "Audio",
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
8
8
|
"description": "如视 VR 看房插件合集",
|
|
9
9
|
"private": false,
|
|
10
|
-
"version": "2.6.
|
|
10
|
+
"version": "2.6.3-dev.0",
|
|
11
11
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",
|