@realsee/dnalogel 2.17.0-aplha.2 → 2.17.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/typings/tag/TagConfig.d.ts +1 -1
- package/dist/index.cjs.js +13 -13
- package/dist/index.js +296 -291
- package/dist/index.umd.js +13 -13
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +25 -25
- package/docs/classes/Magnifier.html +20 -20
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoMeasurePluginLine.html +23 -23
- package/docs/classes/PanoMeasurePluginModel.html +22 -22
- package/docs/classes/PanoMeasurePluginPoint.html +14 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
- package/docs/classes/PanoTagPluginController.html +45 -45
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +19 -19
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/PanoVideoPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +6 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/EventMap.html +15 -15
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/HelperOffset.html +8 -8
- package/docs/interfaces/ImagePlaneGroup.html +6 -6
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/MinMax.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +11 -11
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/ObjectHelperControllers.html +9 -9
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +14 -14
- package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +9 -9
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/State.html +8 -8
- package/docs/interfaces/TagCacheInterface.html +12 -12
- package/docs/interfaces/TagConfig.html +12 -12
- package/docs/interfaces/TagGLTFObjectGroup.html +6 -6
- package/docs/interfaces/TagIconUrl.html +11 -11
- package/docs/interfaces/TagObjectGroup.html +6 -6
- package/docs/interfaces/TagStyle.html +6 -6
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/TemporaryState.html +6 -6
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/PanoVideoPluginType.html +5 -5
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- 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/ClassFunctionParameters.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 +5 -5
- 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/ElementRenderer.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 +5 -5
- package/docs/types/ModelElement.html +5 -5
- 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/PanoVideoPluginParameterType.html +5 -5
- package/docs/types/PanoVideoPluginReturnType.html +5 -5
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PlaneTagElement.html +5 -5
- package/docs/types/Point2DElement.html +5 -5
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DElement.html +5 -5
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagElement.html +5 -5
- 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 +5 -5
- package/docs/types/TagDimensionType.html +5 -5
- package/docs/types/TagElement.html +5 -5
- package/docs/types/TagEvents.html +5 -5
- package/docs/types/TagGLTFObject.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/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/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/PanoTagPlugin/controller/TagCache.js +18 -18
- package/libs/PanoTagPlugin/controller/TagComputer.js +4 -4
- package/libs/PanoTagPlugin/controller/TagRender.js +114 -113
- package/libs/PanoTagPlugin/controller/TagUtil.js +91 -91
- package/libs/PanoTagPlugin/controller/index.js +9 -7
- package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +1 -1
- package/libs/base/BasePlugin.js +3 -3
- package/libs/shared-utils/five/getFloorIndex.js +12 -10
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var l = (m, u, e) => (
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import { DefaultConfig as
|
|
7
|
-
import { anyPositionToVector3 as w, arrayPositionToVector3 as
|
|
8
|
-
import { planeNormal as
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var D = (m, u, e) => u in m ? y(m, u, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[u] = e;
|
|
3
|
+
var l = (m, u, e) => (D(m, typeof u != "symbol" ? u + "" : u, e), e);
|
|
4
|
+
import T from "object-assign-deep";
|
|
5
|
+
import * as C from "three";
|
|
6
|
+
import { DefaultConfig as P } from "../tag.config.js";
|
|
7
|
+
import { anyPositionToVector3 as w, arrayPositionToVector3 as p } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
8
|
+
import { planeNormal as h } from "../utils/planeNormal.js";
|
|
9
9
|
import { tagPosition as E, getTagPosition as k } from "../utils/tagPosition.js";
|
|
10
10
|
import { normalPositionToPositions as M } from "../utils/normalPositionToPositions.js";
|
|
11
11
|
import { TagCache as b } from "./TagCache.js";
|
|
@@ -14,7 +14,7 @@ import { isIOSWX as A } from "../utils/device.js";
|
|
|
14
14
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
15
15
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
16
16
|
import "@realsee/five";
|
|
17
|
-
import { isMediaPlaneTag as
|
|
17
|
+
import { isMediaPlaneTag as S, isMediaModelTag as g, isPlaneTag as V } from "../utils/tag/tagCheck.js";
|
|
18
18
|
import "../../shared-utils/threex/domevents/index.js";
|
|
19
19
|
import { VideoPlane as F } from "../utils/model/mediaPlane.js";
|
|
20
20
|
import { FiveDomEvents as L } from "../../shared-utils/five/FiveDomEvents.js";
|
|
@@ -51,11 +51,11 @@ import "../../shared-utils/three/loadVideoTexture.js";
|
|
|
51
51
|
import "../Assets/Icon.js";
|
|
52
52
|
import "../../shared-utils/three/getPositionsByObjectFit.js";
|
|
53
53
|
import "../../shared-utils/three/FragmentTransparencyMaterial.js";
|
|
54
|
-
class
|
|
54
|
+
class Se extends b {
|
|
55
55
|
constructor(e) {
|
|
56
56
|
super(e);
|
|
57
57
|
l(this, "tags", []);
|
|
58
|
-
l(this, "config",
|
|
58
|
+
l(this, "config", P);
|
|
59
59
|
l(this, "mediaStore", I({
|
|
60
60
|
currentMediaElement: null
|
|
61
61
|
}));
|
|
@@ -74,12 +74,12 @@ class xe extends b {
|
|
|
74
74
|
return !1;
|
|
75
75
|
});
|
|
76
76
|
this.five.on("wantsMoveToPano", this.preventWhenMouseDown), this.five.on("wantsTapGesture", this.preventWhenMouseDown), this.mediaStore.subscribe(({ currentMediaElement: i }) => {
|
|
77
|
-
this.tags.forEach((
|
|
78
|
-
var
|
|
79
|
-
if (
|
|
80
|
-
if (!((
|
|
77
|
+
this.tags.forEach((t) => {
|
|
78
|
+
var o;
|
|
79
|
+
if (t.mediaPlane instanceof F && i !== t.mediaPlane.videoInstance) {
|
|
80
|
+
if (!((o = t.mediaPlane.videoInstance) != null && o.src) || i === t.mediaPlane.videoInstance)
|
|
81
81
|
return;
|
|
82
|
-
|
|
82
|
+
t.mediaPlane.pause();
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
}), this.store.disposers.push(() => {
|
|
@@ -90,7 +90,7 @@ class xe extends b {
|
|
|
90
90
|
return this.five.currentMode === "Panorama";
|
|
91
91
|
}
|
|
92
92
|
getTagById(e) {
|
|
93
|
-
const i = this.tags.find((
|
|
93
|
+
const i = this.tags.find((t) => t.id === e);
|
|
94
94
|
if (!i) {
|
|
95
95
|
console.warn(`error: can not find tag id ${e} by getTagById()`);
|
|
96
96
|
return;
|
|
@@ -101,12 +101,12 @@ class xe extends b {
|
|
|
101
101
|
this.mediaStore.set({ currentMediaElement: null });
|
|
102
102
|
}
|
|
103
103
|
getTagConfig(e) {
|
|
104
|
-
var
|
|
104
|
+
var o, a;
|
|
105
105
|
if (!e)
|
|
106
|
-
return (
|
|
106
|
+
return (o = this.config.globalConfig) != null ? o : {};
|
|
107
107
|
const i = {};
|
|
108
|
-
this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((
|
|
109
|
-
const r =
|
|
108
|
+
this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((d) => {
|
|
109
|
+
const r = d;
|
|
110
110
|
if (i[r])
|
|
111
111
|
return;
|
|
112
112
|
const f = r.split("-");
|
|
@@ -121,37 +121,37 @@ class xe extends b {
|
|
|
121
121
|
if (f.length === 3) {
|
|
122
122
|
const [s = "Any", n, c] = f;
|
|
123
123
|
if (n === "Audio" && e.contentType === "Audio") {
|
|
124
|
-
const
|
|
125
|
-
(
|
|
124
|
+
const v = e;
|
|
125
|
+
(v.stickType === s || s === "Any") && v.data.appearance === c && (i[r] = this.config.contentTypeConfig[r]);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
|
-
const
|
|
130
|
-
return typeof
|
|
129
|
+
const t = T({}, this.config.globalConfig, ...Object.values(i), e.config);
|
|
130
|
+
return typeof t.unfoldedConfig == "object" && (t.unfoldedConfig.disableFold && (t.unfoldedConfig = { keep: "unfolded" }), t.unfoldedConfig.disableUnfold && (t.unfoldedConfig = { keep: "folded" }), t.unfoldedConfig.keep && (t.unfoldedConfig = { keep: t.unfoldedConfig.keep })), typeof t.visibleConfig == "object" && t.visibleConfig.keep && (t.visibleConfig = { keep: t.visibleConfig.keep, visibleFiveMode: (a = t.visibleConfig) == null ? void 0 : a.visibleFiveMode }), t;
|
|
131
131
|
}
|
|
132
132
|
loadVideoFirstFrame() {
|
|
133
133
|
A && this.hooks.emit("loadVideoFirstFrame");
|
|
134
134
|
}
|
|
135
135
|
updateTagConfig(e) {
|
|
136
136
|
e != null && e.force && this.clearCache(), this.tags.forEach((i) => {
|
|
137
|
-
const
|
|
138
|
-
i.mergedConfig =
|
|
137
|
+
const t = this.getTagConfig(i);
|
|
138
|
+
i.mergedConfig = t, i.data = T({}, i.data, t.initialData);
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
can(e, i) {
|
|
142
|
-
const
|
|
143
|
-
if (!
|
|
142
|
+
const t = i, o = this.getTagConfig(t);
|
|
143
|
+
if (!o || typeof o != "object")
|
|
144
144
|
return !0;
|
|
145
145
|
if (e === "show" || e === "hide") {
|
|
146
|
-
if (!
|
|
146
|
+
if (!o.visibleConfig || typeof o.visibleConfig != "object")
|
|
147
147
|
return !0;
|
|
148
|
-
if (e === "show" &&
|
|
148
|
+
if (e === "show" && o.visibleConfig.keep === "hidden" || e === "hide" && (o.visibleConfig.keep === "visible" || o.visibleConfig.alwaysShowWhenMovePano))
|
|
149
149
|
return !1;
|
|
150
150
|
}
|
|
151
151
|
if (e === "fold" || e === "unfold") {
|
|
152
|
-
if (!
|
|
152
|
+
if (!o.unfoldedConfig || typeof o.unfoldedConfig != "object")
|
|
153
153
|
return !0;
|
|
154
|
-
if (e === "fold" &&
|
|
154
|
+
if (e === "fold" && o.unfoldedConfig.keep === "unfolded" || e === "unfold" && o.unfoldedConfig.keep === "folded")
|
|
155
155
|
return !1;
|
|
156
156
|
}
|
|
157
157
|
return !0;
|
|
@@ -160,79 +160,79 @@ class xe extends b {
|
|
|
160
160
|
const i = (() => {
|
|
161
161
|
if (e.stickType === "3DPoint")
|
|
162
162
|
return "Dom";
|
|
163
|
-
const
|
|
164
|
-
if (!
|
|
163
|
+
const t = this.getTagConfig(e);
|
|
164
|
+
if (!t || typeof t != "object" || !t.renderType)
|
|
165
165
|
return;
|
|
166
|
-
const
|
|
167
|
-
if (!(!
|
|
168
|
-
if (
|
|
169
|
-
if (
|
|
166
|
+
const o = e.data.mediaData;
|
|
167
|
+
if (!(!o || o.length === 0) && t.renderType === "Mesh") {
|
|
168
|
+
if (S(e)) {
|
|
169
|
+
if (o.length === 1 && (o[0].type === "Image" || o[0].type === "Video"))
|
|
170
170
|
return "Mesh";
|
|
171
|
-
} else if (
|
|
172
|
-
return
|
|
171
|
+
} else if (g(e))
|
|
172
|
+
return o.length === 1 && o[0].type === "Image" ? "Mesh" : "BehindDom";
|
|
173
173
|
}
|
|
174
174
|
})();
|
|
175
175
|
return i != null ? i : "Dom";
|
|
176
176
|
}
|
|
177
177
|
getAngle(e, i) {
|
|
178
|
-
var
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
181
|
-
throw new Error(`getDistance(): fivePanoIndex is ${
|
|
182
|
-
const
|
|
183
|
-
if (
|
|
184
|
-
return
|
|
178
|
+
var a, d;
|
|
179
|
+
const t = i != null ? i : this.five.getCurrentState().panoIndex;
|
|
180
|
+
if (t === void 0)
|
|
181
|
+
throw new Error(`getDistance(): fivePanoIndex is ${t}`);
|
|
182
|
+
const o = this.getCache({ panoIndex: i, id: e.id });
|
|
183
|
+
if (o.angle !== void 0)
|
|
184
|
+
return o.angle;
|
|
185
185
|
{
|
|
186
|
-
const
|
|
187
|
-
if (
|
|
188
|
-
throw new Error(`getAngleRange(): observerPosition is ${
|
|
189
|
-
const
|
|
190
|
-
if (!
|
|
186
|
+
const r = (d = (a = this.five.work) == null ? void 0 : a.observers[t]) == null ? void 0 : d.position;
|
|
187
|
+
if (r === void 0)
|
|
188
|
+
throw new Error(`getAngleRange(): observerPosition is ${r}`);
|
|
189
|
+
const f = (() => e.stickType === "3DPoint" ? w(e.normal) : h(e.position))();
|
|
190
|
+
if (!f)
|
|
191
191
|
return;
|
|
192
|
-
const
|
|
193
|
-
if (!
|
|
192
|
+
const s = E(e.position);
|
|
193
|
+
if (!s)
|
|
194
194
|
return;
|
|
195
|
-
const
|
|
196
|
-
return
|
|
195
|
+
const n = new C.Vector3().copy(r).sub(s), c = f.angleTo(n) * 180 / Math.PI;
|
|
196
|
+
return o.angle = c, o.angle;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
getDistance(e, i) {
|
|
200
|
-
var
|
|
201
|
-
const
|
|
202
|
-
if (
|
|
203
|
-
throw new Error(`getDistance(): fivePanoIndex is ${
|
|
204
|
-
const
|
|
205
|
-
if (
|
|
206
|
-
return
|
|
200
|
+
var a, d;
|
|
201
|
+
const t = i != null ? i : this.five.getCurrentState().panoIndex;
|
|
202
|
+
if (t === void 0)
|
|
203
|
+
throw new Error(`getDistance(): fivePanoIndex is ${t}`);
|
|
204
|
+
const o = this.getCache({ panoIndex: i, id: e.id });
|
|
205
|
+
if (o.distance !== void 0)
|
|
206
|
+
return o.distance;
|
|
207
207
|
{
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
throw new Error(`getDistance(): observerPosition is ${
|
|
211
|
-
const
|
|
212
|
-
if (!
|
|
208
|
+
const r = (d = (a = this.five.work) == null ? void 0 : a.observers[t]) == null ? void 0 : d.position;
|
|
209
|
+
if (r === void 0)
|
|
210
|
+
throw new Error(`getDistance(): observerPosition is ${r}`);
|
|
211
|
+
const f = k(e);
|
|
212
|
+
if (!f)
|
|
213
213
|
return -1;
|
|
214
|
-
const
|
|
215
|
-
return
|
|
214
|
+
const s = r.distanceTo(f);
|
|
215
|
+
return o.distance = s, s;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
getPositions(e) {
|
|
219
219
|
if (V(e))
|
|
220
220
|
return e.position;
|
|
221
|
-
if (
|
|
221
|
+
if (g(e))
|
|
222
222
|
return e.data.mediaPosition;
|
|
223
223
|
const i = e;
|
|
224
224
|
return M(
|
|
225
225
|
this.five.camera.position,
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
p(i.position),
|
|
227
|
+
p(i.normal)
|
|
228
228
|
);
|
|
229
229
|
}
|
|
230
|
-
addObjectClickHandler(e, i,
|
|
230
|
+
addObjectClickHandler(e, i, t) {
|
|
231
231
|
if (!i || !this.domEvents)
|
|
232
232
|
return () => {
|
|
233
233
|
};
|
|
234
|
-
const
|
|
235
|
-
if (!
|
|
234
|
+
const o = () => !(!e.state.visible || !this.state.visible || g(e) && !e.mediaVisible), a = (s) => {
|
|
235
|
+
if (!o()) {
|
|
236
236
|
this.mouseInfo = void 0;
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
@@ -243,15 +243,15 @@ class xe extends b {
|
|
|
243
243
|
isDown: !0,
|
|
244
244
|
mouseDownTimestamp: Date.now()
|
|
245
245
|
};
|
|
246
|
-
},
|
|
247
|
-
if (!
|
|
246
|
+
}, d = (s) => {
|
|
247
|
+
if (!o()) {
|
|
248
248
|
this.mouseInfo = void 0;
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
251
251
|
const n = s.origDomEvent;
|
|
252
|
-
!this.mouseInfo || (this.mouseInfo.isDown && this.mouseInfo.x === n.clientX && this.mouseInfo.y === n.clientY && Date.now() - this.mouseInfo.mouseDownTimestamp < 400 &&
|
|
252
|
+
!this.mouseInfo || (this.mouseInfo.isDown && this.mouseInfo.x === n.clientX && this.mouseInfo.y === n.clientY && Date.now() - this.mouseInfo.mouseDownTimestamp < 400 && t(n), this.mouseInfo = void 0);
|
|
253
253
|
}, r = (s) => {
|
|
254
|
-
if (!
|
|
254
|
+
if (!o()) {
|
|
255
255
|
this.mouseInfo = void 0;
|
|
256
256
|
return;
|
|
257
257
|
}
|
|
@@ -263,24 +263,24 @@ class xe extends b {
|
|
|
263
263
|
mouseDownTimestamp: Date.now()
|
|
264
264
|
};
|
|
265
265
|
}, f = (s) => {
|
|
266
|
-
if (!
|
|
266
|
+
if (!o()) {
|
|
267
267
|
this.mouseInfo = void 0;
|
|
268
268
|
return;
|
|
269
269
|
}
|
|
270
270
|
const n = s.origDomEvent;
|
|
271
|
-
!this.mouseInfo || (this.mouseInfo.isDown && this.mouseInfo.x === Math.floor(n.changedTouches[n.changedTouches.length - 1].clientX) && this.mouseInfo.y === Math.floor(n.changedTouches[n.changedTouches.length - 1].clientY) && Date.now() - this.mouseInfo.mouseDownTimestamp < 400 &&
|
|
271
|
+
!this.mouseInfo || (this.mouseInfo.isDown && this.mouseInfo.x === Math.floor(n.changedTouches[n.changedTouches.length - 1].clientX) && this.mouseInfo.y === Math.floor(n.changedTouches[n.changedTouches.length - 1].clientY) && Date.now() - this.mouseInfo.mouseDownTimestamp < 400 && t(n), this.mouseInfo = void 0);
|
|
272
272
|
};
|
|
273
|
-
return this.domEvents.addEventListener(i, "mousedown",
|
|
274
|
-
!this.domEvents || (this.mouseInfo = void 0, this.domEvents.removeEventListener(i, "mousedown",
|
|
273
|
+
return this.domEvents.addEventListener(i, "mousedown", a, !1), this.domEvents.addEventListener(i, "mouseup", d, !1), this.domEvents.addEventListener(i, "touchstart", r, !1), this.domEvents.addEventListener(i, "touchend", f, !1), () => {
|
|
274
|
+
!this.domEvents || (this.mouseInfo = void 0, this.domEvents.removeEventListener(i, "mousedown", a), this.domEvents.removeEventListener(i, "mouseup", d), this.domEvents.removeEventListener(i, "touchstart", r), this.domEvents.removeEventListener(i, "touchend", f));
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
getTagNormal(e) {
|
|
278
278
|
if (e.normal)
|
|
279
|
-
return
|
|
279
|
+
return p(e.normal);
|
|
280
280
|
if (e.stickType === "Plane")
|
|
281
|
-
return
|
|
281
|
+
return h(e.position);
|
|
282
282
|
if (e.stickType === "Model")
|
|
283
|
-
return
|
|
283
|
+
return h(this.getPositions(e));
|
|
284
284
|
}
|
|
285
285
|
get filterPointTag() {
|
|
286
286
|
return this.tags.filter((e) => e.stickType === "2DPoint" || e.stickType === "3DPoint").filter((e) => e.position);
|
|
@@ -304,8 +304,8 @@ class xe extends b {
|
|
|
304
304
|
}
|
|
305
305
|
get filterCSS3DTag() {
|
|
306
306
|
return this.tags.filter((i) => i.stickType === "3DPoint" || i.stickType === "Plane" || i.stickType === "Model").filter((i) => {
|
|
307
|
-
const
|
|
308
|
-
return
|
|
307
|
+
const t = this.getRenderType(i);
|
|
308
|
+
return t === "BehindDom" || t === "Dom";
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
checkDisposed() {
|
|
@@ -313,5 +313,5 @@ class xe extends b {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
export {
|
|
316
|
-
|
|
316
|
+
Se as TagUtil
|
|
317
317
|
};
|
|
@@ -43,6 +43,7 @@ import { resizeObserver as y } from "../utils/resizeObserver.js";
|
|
|
43
43
|
import R from "../utils/tag/format.js";
|
|
44
44
|
import { generateBlankAudio as O, AudioNamespace as _ } from "../../shared-utils/audio.js";
|
|
45
45
|
import { TagRender as k } from "./TagRender.js";
|
|
46
|
+
import { uuid as L } from "../../shared-utils/uuid.js";
|
|
46
47
|
import "hammerjs";
|
|
47
48
|
import "@tweenjs/tween.js";
|
|
48
49
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
@@ -98,7 +99,6 @@ import "../Components/Tag/TextTag/TextTag.js";
|
|
|
98
99
|
import "../Components/Common/Line/Straight.js";
|
|
99
100
|
import "../../vendor/svelte/transition/index.js";
|
|
100
101
|
import "../../vendor/svelte/easing/index.js";
|
|
101
|
-
import "../../shared-utils/uuid.js";
|
|
102
102
|
import "../Components/Common/Shadow.js";
|
|
103
103
|
import "../Components/Common/Text/FlyMText.js";
|
|
104
104
|
import "../Components/Common/Text/FlyText.js";
|
|
@@ -156,8 +156,8 @@ import "../Components/Common/TagPoint.js";
|
|
|
156
156
|
import "../../CSS3DRenderPlugin/index.js";
|
|
157
157
|
import "../../CSS3DRenderPlugin/Controller.js";
|
|
158
158
|
import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
159
|
-
const D = "Dnalogel-PanoTagPlugin",
|
|
160
|
-
class
|
|
159
|
+
const D = "Dnalogel-PanoTagPlugin", ri = (d) => `${D}--${d}`;
|
|
160
|
+
class ai extends k {
|
|
161
161
|
constructor(e, t) {
|
|
162
162
|
super(e);
|
|
163
163
|
c(this, "state", { enabled: !0, visible: !0 });
|
|
@@ -206,8 +206,10 @@ class ri extends k {
|
|
|
206
206
|
addTag(e, t) {
|
|
207
207
|
return f(this, null, function* () {
|
|
208
208
|
const s = (Array.isArray(e) ? e : [e]).map((o) => {
|
|
209
|
+
var h;
|
|
209
210
|
const r = this.getTagConfig(o);
|
|
210
211
|
return m(l({}, o), {
|
|
212
|
+
id: (h = o.id) != null ? h : L(),
|
|
211
213
|
data: p({}, r.initialData, o.data),
|
|
212
214
|
state: l({
|
|
213
215
|
visible: void 0,
|
|
@@ -235,7 +237,7 @@ class ri extends k {
|
|
|
235
237
|
t ? this.config.globalConfig = p({}, this.config.globalConfig, e) : this.config.globalConfig = e, this.updateTagConfig({ force: !0 }), this.updateRenderAllTags();
|
|
236
238
|
}
|
|
237
239
|
changeContentTypeConfig(e, t, i = !0) {
|
|
238
|
-
this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), i ? this.config.contentTypeConfig[e] = p({}, this.config.contentTypeConfig[e], t) : this.config.contentTypeConfig[e] = t, this.
|
|
240
|
+
this.config.contentTypeConfig || (this.config.contentTypeConfig = {}), i ? this.config.contentTypeConfig[e] = p({}, this.config.contentTypeConfig[e], t) : this.config.contentTypeConfig[e] = t, this.updateTagConfig({ force: !0 }), this.updateRenderAllTags();
|
|
239
241
|
}
|
|
240
242
|
show(e) {
|
|
241
243
|
return f(this, null, function* () {
|
|
@@ -431,7 +433,7 @@ class ri extends k {
|
|
|
431
433
|
}
|
|
432
434
|
}
|
|
433
435
|
export {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
436
|
+
ai as PanoTagPluginController,
|
|
437
|
+
ai as default,
|
|
438
|
+
ri as pluginFlag
|
|
437
439
|
};
|
|
@@ -9,7 +9,7 @@ export interface TagConfig<C extends TagContentType = TagContentType, S extends
|
|
|
9
9
|
visibleConfig?: {
|
|
10
10
|
/** 保持可见/不可见, 设置后visibleConfig下所有其他配置都不生效 */
|
|
11
11
|
keep?: 'visible' | 'hidden';
|
|
12
|
-
/** 在哪些 five mode 下可见,默认为 [
|
|
12
|
+
/** 在哪些 five mode 下可见,默认为 ['Panorama'] */
|
|
13
13
|
visibleFiveMode?: Mode[];
|
|
14
14
|
/** 当 visibleFiveMode 包含 'Floorplan' 或者 'MapView' 时,是否仅在当前楼层模型下可见,默认为true */
|
|
15
15
|
followModelVisibility?: boolean;
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -2,9 +2,9 @@ var i = Object.defineProperty;
|
|
|
2
2
|
var a = (e, r, t) => r in e ? i(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
|
|
3
3
|
var s = (e, r, t) => (a(e, typeof r != "symbol" ? r + "" : r, t), t);
|
|
4
4
|
import { Subscribe as c } from "../shared-utils/Subscribe.js";
|
|
5
|
-
class
|
|
5
|
+
class x {
|
|
6
6
|
constructor(r, t) {
|
|
7
|
-
s(this, "VERSION", "2.17.0
|
|
7
|
+
s(this, "VERSION", "2.17.0");
|
|
8
8
|
s(this, "five");
|
|
9
9
|
s(this, "hooks", new c());
|
|
10
10
|
s(this, "staticPrefix", "//vrlab-static.ljcdn.com");
|
|
@@ -15,5 +15,5 @@ class o {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
x as Controller
|
|
19
19
|
};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
function
|
|
2
|
-
if (!
|
|
3
|
-
return console.error("getFloorIndex: invalid arguments: ", { point:
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
function c(t, l) {
|
|
2
|
+
if (!l || !t)
|
|
3
|
+
return console.error("getFloorIndex: invalid arguments: ", { point: l, observer: t }), 0;
|
|
4
|
+
const e = [];
|
|
5
|
+
t.forEach((o) => {
|
|
6
|
+
var n, i;
|
|
7
|
+
const r = (i = (n = o.floorIndex) != null ? n : o.floor_index) != null ? i : 0;
|
|
8
|
+
e[r] || (e[r] = []), e[r].push(o.position.y);
|
|
7
9
|
});
|
|
8
|
-
const
|
|
9
|
-
for (let o =
|
|
10
|
-
if (
|
|
10
|
+
const f = e.map((o) => o.reduce((r, n) => r + n, 0) / o.length);
|
|
11
|
+
for (let o = f.length - 1; o > 0; o--)
|
|
12
|
+
if (l.y >= f[o])
|
|
11
13
|
return o;
|
|
12
14
|
return 0;
|
|
13
15
|
}
|
|
14
16
|
export {
|
|
15
|
-
|
|
17
|
+
c as getFloorIndex
|
|
16
18
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.info(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv2.17.0
|
|
3
|
+
"%c %c@realsee/dnalogel %cv2.17.0",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|
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.17.0
|
|
10
|
+
"version": "2.17.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*",
|