@realsee/dnalogel 2.14.0-alpha.0 → 2.14.0-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/TagUtil.d.ts +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.js +43 -25
- package/dist/index.umd.js +3 -3
- 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 +4 -4
- 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 +4 -4
- 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/Rotation.html +4 -4
- 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 +4 -4
- 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 +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 +4 -4
- package/docs/index.html +4 -4
- 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/HelperOffset.html +4 -4
- package/docs/interfaces/ImagePlaneGroup.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/ObjectHelperControllers.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 +4 -4
- 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 +4 -4
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +4 -4
- 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/PanoVideoPluginType.LoadParams.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.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 +4 -4
- package/docs/interfaces/Rooms.html +4 -4
- package/docs/interfaces/Scissor.html +4 -4
- package/docs/interfaces/State.html +4 -4
- package/docs/interfaces/TagCacheInterface.html +4 -4
- package/docs/interfaces/TagConfig.html +4 -4
- package/docs/interfaces/TagGLTFObjectGroup.html +4 -4
- package/docs/interfaces/TagIconUrl.html +4 -4
- package/docs/interfaces/TagObjectGroup.html +4 -4
- package/docs/interfaces/TagStyle.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/PanoVideoPluginType.html +4 -4
- package/docs/modules/Util.html +4 -4
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +4 -4
- package/docs/types/AudioAppearance.html +4 -4
- package/docs/types/AudioTagTypeConfigKey.html +4 -4
- package/docs/types/CSS3DRenderExportType.html +4 -4
- package/docs/types/CSS3DRenderPluginExportType.html +4 -4
- package/docs/types/CSS3DRenderPluginParameterType.html +4 -4
- package/docs/types/ClassFunctionParameters.html +4 -4
- package/docs/types/Color.html +4 -4
- package/docs/types/ContentTypeConfigKey.html +4 -4
- package/docs/types/ContentTypeConfigKeySplit.html +4 -4
- package/docs/types/ContentTypeMap.html +4 -4
- package/docs/types/Create3DDomContainerReturnType.html +4 -4
- package/docs/types/Create3DElementReturnType.html +4 -4
- package/docs/types/CruisePluginExportType.html +4 -4
- package/docs/types/Direction-1.html +4 -4
- package/docs/types/Direction4.html +4 -4
- package/docs/types/FloorplanRuleLabels.html +4 -4
- package/docs/types/FloorplanServerRuleLabels.html +4 -4
- package/docs/types/GuideLinePluginExportType.html +4 -4
- package/docs/types/HelperEventMap.html +4 -4
- package/docs/types/LoadTagConfig.html +4 -4
- package/docs/types/MapviewFloorplanPluginParameterType.html +4 -4
- package/docs/types/MapviewFloorplanPluginReturnType.html +4 -4
- package/docs/types/MediaData.html +4 -4
- package/docs/types/MediaStore.html +4 -4
- package/docs/types/ModelElement.html +4 -4
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +4 -4
- package/docs/types/ModelFloorplanPluginParameterType.html +4 -4
- package/docs/types/ModelFloorplanPluginReturnType.html +4 -4
- package/docs/types/ModelRoomLabelPluginParameters.html +4 -4
- package/docs/types/ModelRoomLabelPluginReturnType.html +4 -4
- package/docs/types/MoveArgs.html +4 -4
- package/docs/types/MoveOpts.html +4 -4
- package/docs/types/Object3DHelperEventMap.html +4 -4
- package/docs/types/ObjectFit.html +4 -4
- package/docs/types/PaintBrushEventMap.html +4 -4
- package/docs/types/PanoCompassPluginData.html +4 -4
- package/docs/types/PanoCompassPluginExportType.html +4 -4
- package/docs/types/PanoCompassPluginParameterType.html +4 -4
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +4 -4
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +4 -4
- package/docs/types/PanoIndex.html +4 -4
- package/docs/types/PanoMeasurePluginEvent.html +4 -4
- package/docs/types/PanoMeasureReturnType.html +4 -4
- package/docs/types/PanoSpatialTagPluginId.html +4 -4
- package/docs/types/PanoTagPluginExportInterface.html +4 -4
- package/docs/types/PanoTagPluginParamsInterface.html +4 -4
- package/docs/types/PanoVideoPluginParameterType.html +4 -4
- package/docs/types/PanoVideoPluginReturnType.html +4 -4
- package/docs/types/PlaneTag.html +4 -4
- package/docs/types/PlaneTagElement.html +4 -4
- package/docs/types/Point2DElement.html +4 -4
- package/docs/types/Point2DTag.html +4 -4
- package/docs/types/Point3DElement.html +4 -4
- package/docs/types/Point3DTag.html +4 -4
- package/docs/types/PointTag.html +4 -4
- package/docs/types/PointTagElement.html +4 -4
- package/docs/types/Position.html +4 -4
- package/docs/types/RotateArgs.html +4 -4
- package/docs/types/RotateOpts.html +4 -4
- package/docs/types/RuleLabelsKey.html +4 -4
- package/docs/types/RuleLabelsValue.html +4 -4
- package/docs/types/StickType.html +4 -4
- package/docs/types/Tag.html +4 -4
- package/docs/types/Tag2D.html +4 -4
- package/docs/types/Tag3D.html +4 -4
- package/docs/types/TagContentType.html +4 -4
- package/docs/types/TagDimensionType.html +4 -4
- package/docs/types/TagElement.html +4 -4
- package/docs/types/TagEvents.html +4 -4
- package/docs/types/TagGLTFObject.html +4 -4
- package/docs/types/TagHooks.html +4 -4
- package/docs/types/TagIconSize.html +4 -4
- package/docs/types/TagId.html +4 -4
- package/docs/types/TopviewFloorplanPluginParameterType.html +4 -4
- package/docs/types/TopviewFloorplanPluginReturnType.html +4 -4
- package/docs/types/WorkCode.html +4 -4
- package/docs/variables/FLOOR_TYPE_MAP.html +4 -4
- package/docs/variables/PLUGIN.html +4 -4
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +4 -4
- package/docs/variables/ROOM_TYPE_MAP.html +4 -4
- package/docs/variables/itemLabelPluginServerParams.html +4 -4
- package/docs/variables/modelItemLabelPluginServerParams.html +4 -4
- package/docs/variables/modelRoomLabelPluginServerParams.html +4 -4
- package/libs/PanoTagPlugin/Components/Common/Media.js +1 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +13 -11
- package/libs/PanoTagPlugin/controller/TagUtil.d.ts +1 -1
- package/libs/PanoTagPlugin/controller/TagUtil.js +108 -92
- package/libs/base/BasePlugin.js +3 -3
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ var l = (u, c, e) => (y(u, typeof c != "symbol" ? c + "" : c, e), e);
|
|
|
4
4
|
import C from "object-assign-deep";
|
|
5
5
|
import * as P from "three";
|
|
6
6
|
import { DefaultConfig as D } from "../tag.config.js";
|
|
7
|
-
import { anyPositionToVector3 as E, arrayPositionToVector3 as
|
|
7
|
+
import { anyPositionToVector3 as E, arrayPositionToVector3 as g } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
8
8
|
import { planeNormal as p } from "../utils/planeNormal.js";
|
|
9
9
|
import { tagPosition as k, getTagPosition as w } from "../utils/tagPosition.js";
|
|
10
10
|
import { normalPositionToPositions as M } from "../utils/normalPositionToPositions.js";
|
|
@@ -31,7 +31,7 @@ import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
|
31
31
|
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
32
32
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
33
33
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
34
|
-
class
|
|
34
|
+
class ae extends b {
|
|
35
35
|
constructor(e) {
|
|
36
36
|
super(e);
|
|
37
37
|
l(this, "tags", []);
|
|
@@ -53,8 +53,8 @@ class de extends b {
|
|
|
53
53
|
if ((e = this.mouseInfo) != null && e.isDown)
|
|
54
54
|
return !1;
|
|
55
55
|
});
|
|
56
|
-
const
|
|
57
|
-
|
|
56
|
+
const i = this.five.getElement();
|
|
57
|
+
i && (this.domEvents = new L(this.five.camera, i)), this.five.on("wantsMoveToPano", this.fiveWantMovePanoHandler), this.store.disposers.push(() => {
|
|
58
58
|
this.five.off("wantsMoveToPano", this.fiveWantMovePanoHandler);
|
|
59
59
|
});
|
|
60
60
|
}
|
|
@@ -62,117 +62,117 @@ class de extends b {
|
|
|
62
62
|
return this.five.currentMode === "Panorama";
|
|
63
63
|
}
|
|
64
64
|
getTagById(e) {
|
|
65
|
-
const
|
|
66
|
-
if (!
|
|
65
|
+
const i = this.tags.find((o) => o.id === e);
|
|
66
|
+
if (!i) {
|
|
67
67
|
console.warn(`error: can not find tag id ${e} by getTagById()`);
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
return
|
|
70
|
+
return i;
|
|
71
71
|
}
|
|
72
72
|
pauseCurrentMedia() {
|
|
73
73
|
this.mediaStore.set({ currentMediaElement: null });
|
|
74
74
|
}
|
|
75
75
|
getTagConfig(e) {
|
|
76
|
-
var
|
|
76
|
+
var t, d;
|
|
77
77
|
if (!e)
|
|
78
|
-
return (
|
|
79
|
-
const
|
|
78
|
+
return (t = this.config.globalConfig) != null ? t : {};
|
|
79
|
+
const i = {};
|
|
80
80
|
this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((a) => {
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
81
|
+
const r = a;
|
|
82
|
+
if (i[r])
|
|
83
83
|
return;
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
const [
|
|
87
|
-
e.contentType ===
|
|
84
|
+
const f = r.split("-");
|
|
85
|
+
if (f.length === 1) {
|
|
86
|
+
const [s] = f;
|
|
87
|
+
e.contentType === s && (i[r] = this.config.contentTypeConfig[r]);
|
|
88
88
|
}
|
|
89
|
-
if (
|
|
90
|
-
const [
|
|
91
|
-
(e.stickType ===
|
|
89
|
+
if (f.length === 2) {
|
|
90
|
+
const [s = "Any", n = "Any"] = f;
|
|
91
|
+
(e.stickType === s || s === "Any") && (e.contentType === n || n === "Any") && (i[r] = this.config.contentTypeConfig[r]);
|
|
92
92
|
}
|
|
93
|
-
if (
|
|
94
|
-
const [
|
|
95
|
-
if (
|
|
93
|
+
if (f.length === 3) {
|
|
94
|
+
const [s = "Any", n, h] = f;
|
|
95
|
+
if (n === "Audio" && e.contentType === "Audio") {
|
|
96
96
|
const m = e;
|
|
97
|
-
(m.stickType ===
|
|
97
|
+
(m.stickType === s || s === "Any") && m.data.appearance === h && (i[r] = this.config.contentTypeConfig[r]);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
|
-
const
|
|
102
|
-
return typeof
|
|
101
|
+
const o = C({}, this.config.globalConfig, ...Object.values(i), e.config);
|
|
102
|
+
return typeof o.unfoldedConfig == "object" && (o.unfoldedConfig.disableFold && (o.unfoldedConfig = { keep: "unfolded" }), o.unfoldedConfig.disableUnfold && (o.unfoldedConfig = { keep: "folded" }), o.unfoldedConfig.keep && (o.unfoldedConfig = { keep: o.unfoldedConfig.keep })), typeof o.visibleConfig == "object" && o.visibleConfig.keep && (o.visibleConfig = { keep: o.visibleConfig.keep, visibleFiveMode: (d = o.visibleConfig) == null ? void 0 : d.visibleFiveMode }), o;
|
|
103
103
|
}
|
|
104
104
|
loadVideoFirstFrame() {
|
|
105
105
|
A && this.hooks.emit("loadVideoFirstFrame");
|
|
106
106
|
}
|
|
107
107
|
updateTagConfig(e) {
|
|
108
|
-
e != null && e.force && this.clearCache(), this.tags.forEach((
|
|
109
|
-
const
|
|
110
|
-
|
|
108
|
+
e != null && e.force && this.clearCache(), this.tags.forEach((i) => {
|
|
109
|
+
const o = this.getTagConfig(i);
|
|
110
|
+
i.mergedConfig = o;
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
can(e,
|
|
114
|
-
const
|
|
115
|
-
if (!
|
|
113
|
+
can(e, i) {
|
|
114
|
+
const o = i, t = this.getTagConfig(o);
|
|
115
|
+
if (!t || typeof t != "object")
|
|
116
116
|
return !0;
|
|
117
117
|
if (e === "show" || e === "hide") {
|
|
118
|
-
if (!
|
|
118
|
+
if (!t.visibleConfig || typeof t.visibleConfig != "object")
|
|
119
119
|
return !0;
|
|
120
|
-
if (e === "show" &&
|
|
120
|
+
if (e === "show" && t.visibleConfig.keep === "hidden" || e === "hide" && (t.visibleConfig.keep === "visible" || t.visibleConfig.alwaysShowWhenMovePano))
|
|
121
121
|
return !1;
|
|
122
122
|
}
|
|
123
123
|
if (e === "fold" || e === "unfold") {
|
|
124
|
-
if (!
|
|
124
|
+
if (!t.unfoldedConfig || typeof t.unfoldedConfig != "object")
|
|
125
125
|
return !0;
|
|
126
|
-
if (e === "fold" &&
|
|
126
|
+
if (e === "fold" && t.unfoldedConfig.keep === "unfolded" || e === "unfold" && t.unfoldedConfig.keep === "folded")
|
|
127
127
|
return !1;
|
|
128
128
|
}
|
|
129
129
|
if (e === "renderByMesh")
|
|
130
|
-
if (x(
|
|
131
|
-
const
|
|
132
|
-
return
|
|
130
|
+
if (x(o) || v(o)) {
|
|
131
|
+
const d = o.data.mediaData;
|
|
132
|
+
return d.length === 1 && d[0].type === "Image" && t.renderType === "Mesh";
|
|
133
133
|
} else
|
|
134
134
|
return !1;
|
|
135
135
|
return !0;
|
|
136
136
|
}
|
|
137
|
-
getAngle(e,
|
|
138
|
-
var
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
throw new Error(`getDistance(): fivePanoIndex is ${
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
return
|
|
137
|
+
getAngle(e, i) {
|
|
138
|
+
var d, a, r;
|
|
139
|
+
const o = (d = this.five.panoIndex) != null ? d : i;
|
|
140
|
+
if (o === void 0)
|
|
141
|
+
throw new Error(`getDistance(): fivePanoIndex is ${o}`);
|
|
142
|
+
const t = this.getCache({ panoIndex: i, id: e.id });
|
|
143
|
+
if (t.angle !== void 0)
|
|
144
|
+
return t.angle;
|
|
145
145
|
{
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
throw new Error(`getAngleRange(): observerPosition is ${
|
|
149
|
-
const
|
|
150
|
-
if (!
|
|
146
|
+
const f = (r = (a = this.five.work) == null ? void 0 : a.observers[o]) == null ? void 0 : r.position;
|
|
147
|
+
if (f === void 0)
|
|
148
|
+
throw new Error(`getAngleRange(): observerPosition is ${f}`);
|
|
149
|
+
const s = (() => e.stickType === "3DPoint" ? E(e.normal) : p(e.position))();
|
|
150
|
+
if (!s)
|
|
151
151
|
return;
|
|
152
|
-
const
|
|
153
|
-
if (!
|
|
152
|
+
const n = k(e.position);
|
|
153
|
+
if (!n)
|
|
154
154
|
return;
|
|
155
|
-
const
|
|
156
|
-
return
|
|
155
|
+
const h = new P.Vector3().copy(f).sub(n), m = s.angleTo(h) * 180 / Math.PI;
|
|
156
|
+
return t.angle = m, t.angle;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
getDistance(e,
|
|
160
|
-
var
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
163
|
-
throw new Error(`getDistance(): fivePanoIndex is ${
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
166
|
-
return
|
|
159
|
+
getDistance(e, i) {
|
|
160
|
+
var d, a, r;
|
|
161
|
+
const o = (d = this.five.panoIndex) != null ? d : i;
|
|
162
|
+
if (o === void 0)
|
|
163
|
+
throw new Error(`getDistance(): fivePanoIndex is ${o}`);
|
|
164
|
+
const t = this.getCache({ panoIndex: i, id: e.id });
|
|
165
|
+
if (t.distance !== void 0)
|
|
166
|
+
return t.distance;
|
|
167
167
|
{
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
170
|
-
throw new Error(`getDistance(): observerPosition is ${
|
|
171
|
-
const
|
|
172
|
-
if (!
|
|
168
|
+
const f = (r = (a = this.five.work) == null ? void 0 : a.observers[o]) == null ? void 0 : r.position;
|
|
169
|
+
if (f === void 0)
|
|
170
|
+
throw new Error(`getDistance(): observerPosition is ${f}`);
|
|
171
|
+
const s = w(e);
|
|
172
|
+
if (!s)
|
|
173
173
|
return -1;
|
|
174
|
-
const
|
|
175
|
-
return
|
|
174
|
+
const n = f.distanceTo(s);
|
|
175
|
+
return t.distance = n, n;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
getPositions(e) {
|
|
@@ -180,47 +180,63 @@ class de extends b {
|
|
|
180
180
|
return e.position;
|
|
181
181
|
if (v(e))
|
|
182
182
|
return e.data.mediaPosition;
|
|
183
|
-
const
|
|
183
|
+
const i = e;
|
|
184
184
|
return M(
|
|
185
185
|
this.five.camera.position,
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
g(i.position),
|
|
187
|
+
g(i.normal)
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
|
-
addObjectClickHandler(e,
|
|
191
|
-
if (!
|
|
190
|
+
addObjectClickHandler(e, i, o) {
|
|
191
|
+
if (!i || !this.domEvents)
|
|
192
192
|
return () => {
|
|
193
193
|
};
|
|
194
|
-
const
|
|
195
|
-
|
|
194
|
+
const t = !e.mediaVisible || !e.state.visible || !this.state.visible, d = (s) => {
|
|
195
|
+
if (t) {
|
|
196
|
+
this.mouseInfo = void 0;
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
const n = s.origDomEvent;
|
|
196
200
|
this.mouseInfo = {
|
|
197
|
-
x:
|
|
198
|
-
y:
|
|
201
|
+
x: n.clientX,
|
|
202
|
+
y: n.clientY,
|
|
199
203
|
isDown: !0,
|
|
200
204
|
mouseDownTimestamp: Date.now()
|
|
201
205
|
};
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
|
|
206
|
+
}, a = (s) => {
|
|
207
|
+
if (t) {
|
|
208
|
+
this.mouseInfo = void 0;
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const n = s.origDomEvent;
|
|
212
|
+
!this.mouseInfo || (this.mouseInfo.isDown && this.mouseInfo.x === n.clientX && this.mouseInfo.y === n.clientY && Date.now() - this.mouseInfo.mouseDownTimestamp < 400 && o(n), this.mouseInfo = void 0);
|
|
205
213
|
}, r = (s) => {
|
|
206
|
-
|
|
214
|
+
if (t) {
|
|
215
|
+
this.mouseInfo = void 0;
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const n = s.origDomEvent;
|
|
207
219
|
this.mouseInfo = {
|
|
208
|
-
x: Math.floor(
|
|
209
|
-
y: Math.floor(
|
|
220
|
+
x: Math.floor(n.touches[0].clientX),
|
|
221
|
+
y: Math.floor(n.touches[0].clientY),
|
|
210
222
|
isDown: !0,
|
|
211
223
|
mouseDownTimestamp: Date.now()
|
|
212
224
|
};
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
|
|
225
|
+
}, f = (s) => {
|
|
226
|
+
if (t) {
|
|
227
|
+
this.mouseInfo = void 0;
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
const n = s.origDomEvent;
|
|
231
|
+
!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 && o(n), this.mouseInfo = void 0);
|
|
216
232
|
};
|
|
217
|
-
return this.domEvents.addEventListener(
|
|
218
|
-
!this.domEvents || (this.mouseInfo = void 0, this.domEvents.removeEventListener(
|
|
233
|
+
return this.domEvents.addEventListener(i, "mousedown", d, !1), this.domEvents.addEventListener(i, "mouseup", a, !1), this.domEvents.addEventListener(i, "touchstart", r, !1), this.domEvents.addEventListener(i, "touchend", f, !1), () => {
|
|
234
|
+
!this.domEvents || (this.mouseInfo = void 0, this.domEvents.removeEventListener(i, "mousedown", d), this.domEvents.removeEventListener(i, "mouseup", a), this.domEvents.removeEventListener(i, "touchstart", r), this.domEvents.removeEventListener(i, "touchend", f));
|
|
219
235
|
};
|
|
220
236
|
}
|
|
221
237
|
getTagNormal(e) {
|
|
222
238
|
if (e.normal)
|
|
223
|
-
return
|
|
239
|
+
return g(e.normal);
|
|
224
240
|
if (e.stickType === "Plane")
|
|
225
241
|
return p(e.position);
|
|
226
242
|
if (e.stickType === "Model")
|
|
@@ -254,5 +270,5 @@ class de extends b {
|
|
|
254
270
|
}
|
|
255
271
|
}
|
|
256
272
|
export {
|
|
257
|
-
|
|
273
|
+
ae as TagUtil
|
|
258
274
|
};
|
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.14.0-
|
|
7
|
+
s(this, "VERSION", "2.14.0-dev.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
|
};
|
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.14.0-
|
|
10
|
+
"version": "2.14.0-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*",
|