@realsee/dnalogel 2.6.7-dev.0 → 2.6.7-dev.2
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/TagComputer.d.ts +3 -2
- package/dist/PanoTagPlugin/controller/index.d.ts +1 -0
- package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +2 -1
- package/dist/index.cjs.js +14 -14
- package/dist/index.js +142 -120
- package/dist/index.umd.js +12 -12
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +2 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +24 -24
- 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 +190 -44
- 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 +18 -18
- 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/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- 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 +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/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 +12 -12
- 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/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/TagCache.html +12 -12
- package/docs/interfaces/TagConfig.html +11 -11
- package/docs/interfaces/TagIconUrl.html +9 -9
- 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/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/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/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/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/CSS3DRenderPlugin/CSS3DRender.js +60 -56
- package/libs/PanoTagPlugin/controller/TagComputer.d.ts +3 -2
- package/libs/PanoTagPlugin/controller/TagComputer.js +88 -80
- package/libs/PanoTagPlugin/controller/index.d.ts +1 -0
- package/libs/PanoTagPlugin/controller/index.js +57 -56
- package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +2 -1
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +38 -38
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +26 -23
- package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +2 -0
- package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js +28 -22
- package/package.json +1 -1
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.d.ts +0 -4
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.js +0 -6
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.d.ts +0 -93
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.js +0 -5622
- package/libs/PanoTagPlugin/mocks/v1/mock-test3-realsee-cn-4zr0A5.js +0 -1325
- package/libs/PanoTagPlugin/mocks/v1/mock1.d.ts +0 -173
- package/libs/PanoTagPlugin/mocks/v1/mock1.js +0 -122
- package/libs/PanoTagPlugin/mocks/v1/mock2.d.ts +0 -233
- package/libs/PanoTagPlugin/mocks/v1/mock2.js +0 -296
- package/libs/PanoTagPlugin/mocks/v1/mock3.d.ts +0 -22
- package/libs/PanoTagPlugin/mocks/v1/mock3.js +0 -32
- package/libs/PanoTagPlugin/mocks/v1/mock4.d.ts +0 -56
- package/libs/PanoTagPlugin/mocks/v1/mock4.js +0 -60
- package/libs/PanoTagPlugin/mocks/v1/mock5.d.ts +0 -13
- package/libs/PanoTagPlugin/mocks/v1/mock5.js +0 -17
- package/libs/PanoTagPlugin/mocks/v1/mock6.d.ts +0 -16
- package/libs/PanoTagPlugin/mocks/v1/mock6.js +0 -27
- package/libs/PanoTagPlugin/mocks/v1/mock7.d.ts +0 -22
- package/libs/PanoTagPlugin/mocks/v1/mock7.js +0 -228
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var j = Object.defineProperty, B = Object.defineProperties;
|
|
2
|
+
var U = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var P = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var T = (g, d, e) => d in g ?
|
|
4
|
+
var V = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var T = (g, d, e) => d in g ? j(g, d, { enumerable: !0, configurable: !0, writable: !0, value: e }) : g[d] = e, C = (g, d) => {
|
|
6
6
|
for (var e in d || (d = {}))
|
|
7
|
-
|
|
7
|
+
V.call(d, e) && T(g, e, d[e]);
|
|
8
8
|
if (P)
|
|
9
9
|
for (var e of P(d))
|
|
10
|
-
|
|
10
|
+
R.call(d, e) && T(g, e, d[e]);
|
|
11
11
|
return g;
|
|
12
|
-
}, I = (g, d) =>
|
|
12
|
+
}, I = (g, d) => B(g, U(d));
|
|
13
13
|
var y = (g, d, e) => (T(g, typeof d != "symbol" ? d + "" : d, e), e);
|
|
14
14
|
import x from "object-assign-deep";
|
|
15
15
|
import * as k from "three";
|
|
16
|
-
import { DefaultConfig as
|
|
17
|
-
import { isMediaModelTag as m, is3DTag as
|
|
16
|
+
import { DefaultConfig as w } from "../tag.config.js";
|
|
17
|
+
import { isMediaModelTag as m, is3DTag as $ } from "../utils/tag/tagCheck.js";
|
|
18
18
|
import { anyPositionToVector3 as E } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
19
|
-
import { planeNormal as
|
|
20
|
-
import { getTagPosition as D, tagPosition as
|
|
19
|
+
import { planeNormal as A } from "../utils/planeNormal.js";
|
|
20
|
+
import { getTagPosition as D, tagPosition as M } from "../utils/tagPosition.js";
|
|
21
21
|
import { checkRange as b } from "../utils/checkRange.js";
|
|
22
22
|
import { TagCacheController as S } from "./TagCacheController.js";
|
|
23
23
|
import "hammerjs";
|
|
@@ -25,7 +25,7 @@ import "@realsee/five";
|
|
|
25
25
|
import "@tweenjs/tween.js";
|
|
26
26
|
import "../../CSS3DRenderPlugin/CSS3DRender.js";
|
|
27
27
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
28
|
-
import { notNil as
|
|
28
|
+
import { notNil as F } from "../../shared-utils/isNil.js";
|
|
29
29
|
import "../../shared-utils/animationFrame/BetterTween.js";
|
|
30
30
|
import "@realsee/five/gltf-loader";
|
|
31
31
|
import "../../CSS3DRenderPlugin/utils/centerPoint.js";
|
|
@@ -41,11 +41,11 @@ import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
|
41
41
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
42
42
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
43
43
|
import "../../shared-utils/animationFrame/index.js";
|
|
44
|
-
class
|
|
44
|
+
class pe extends S {
|
|
45
45
|
constructor(e) {
|
|
46
46
|
super(e);
|
|
47
47
|
y(this, "tags", []);
|
|
48
|
-
y(this, "config",
|
|
48
|
+
y(this, "config", w);
|
|
49
49
|
y(this, "raycaster", new k.Raycaster());
|
|
50
50
|
}
|
|
51
51
|
get isPanorama() {
|
|
@@ -70,7 +70,7 @@ class he extends S {
|
|
|
70
70
|
if (i.visible !== void 0)
|
|
71
71
|
return i.visible;
|
|
72
72
|
{
|
|
73
|
-
const
|
|
73
|
+
const a = (() => {
|
|
74
74
|
var c, u, f;
|
|
75
75
|
const s = (c = this.getTagConfig(e).visibleConfig) != null ? c : {}, l = this.getDistance(e);
|
|
76
76
|
if (typeof s == "function")
|
|
@@ -102,23 +102,35 @@ class he extends S {
|
|
|
102
102
|
value: !1,
|
|
103
103
|
reason: `intersectRaycaster check failed: fivePanoIndex is ${o}`
|
|
104
104
|
};
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
107
|
-
return
|
|
105
|
+
const r = this.getRaycasterFromPanoIndex(e, o), v = this.getTagEnableByIntersect(e, r);
|
|
106
|
+
if (v.value === !1)
|
|
107
|
+
return v;
|
|
108
108
|
}
|
|
109
|
-
if (s.angleRange &&
|
|
110
|
-
const
|
|
111
|
-
if (b(
|
|
112
|
-
return { value: !1, reason: `angle is not in angleRange. angle: ${
|
|
109
|
+
if (s.angleRange && $(e)) {
|
|
110
|
+
const r = this.getAngle(e);
|
|
111
|
+
if (b(r, s.angleRange) === !1)
|
|
112
|
+
return { value: !1, reason: `angle is not in angleRange. angle: ${r}, angleRange: ${s.angleRange}` };
|
|
113
113
|
}
|
|
114
114
|
return {
|
|
115
115
|
value: !0,
|
|
116
116
|
reason: "all check passed"
|
|
117
117
|
};
|
|
118
118
|
})();
|
|
119
|
-
return i.visible =
|
|
119
|
+
return i.visible = a.value, i.__debug_visible_reason__ = a, i.visible;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
+
getVisibleByFiveMode(e, t) {
|
|
123
|
+
var n;
|
|
124
|
+
const i = (n = this.getTagConfig(e).visibleConfig) != null ? n : {};
|
|
125
|
+
if (typeof i == "function")
|
|
126
|
+
return t === "Panorama";
|
|
127
|
+
const o = i == null ? void 0 : i.visibleFiveMode;
|
|
128
|
+
return o ? o.includes(t) : t === "Panorama";
|
|
129
|
+
}
|
|
130
|
+
getVisible(e) {
|
|
131
|
+
const t = this.five.getCurrentState(), i = this.getVisibleByFiveMode(e, t.mode), o = t.mode === "Panorama" ? this.getVisibleByPanoIndex(e, t.panoIndex) : !0;
|
|
132
|
+
return i && o;
|
|
133
|
+
}
|
|
122
134
|
getModelMedialVisibleByPanoIndex(e) {
|
|
123
135
|
const t = this.five.getCurrentState().panoIndex, i = this.getCache({ panoIndex: t, id: e.id });
|
|
124
136
|
if (i.modelMedialVisible !== void 0)
|
|
@@ -136,7 +148,7 @@ class he extends S {
|
|
|
136
148
|
const n = this.getTagConfig(e).unfoldedConfig;
|
|
137
149
|
if (!n)
|
|
138
150
|
return;
|
|
139
|
-
const
|
|
151
|
+
const a = (() => {
|
|
140
152
|
const l = this.getDistance(e);
|
|
141
153
|
if (typeof n == "function")
|
|
142
154
|
return n(this.five, { tag: e, distance: l });
|
|
@@ -147,14 +159,14 @@ class he extends S {
|
|
|
147
159
|
if (n.unfoldDistance && b(l, n.unfoldDistance) === !1)
|
|
148
160
|
return !1;
|
|
149
161
|
})();
|
|
150
|
-
o.unfolded =
|
|
162
|
+
o.unfolded = a;
|
|
151
163
|
const s = this.getUnfoldedByCamera(e);
|
|
152
164
|
return s !== void 0 ? s : o.unfolded;
|
|
153
165
|
}
|
|
154
166
|
}
|
|
155
167
|
getUnfoldedByCamera(e) {
|
|
156
168
|
return this.getVisibleByPanoIndex(e) ? (() => {
|
|
157
|
-
var
|
|
169
|
+
var a;
|
|
158
170
|
const o = this.getDistance(e), n = this.getTagConfig(e).unfoldedConfig;
|
|
159
171
|
if (!!n) {
|
|
160
172
|
if (typeof n == "function")
|
|
@@ -172,19 +184,19 @@ class he extends S {
|
|
|
172
184
|
}
|
|
173
185
|
if (n.autoUnfold.strategy === "MinimumDistance") {
|
|
174
186
|
const c = this.filterPointTag().filter((f) => this.getVisibleByPanoIndex(f)).filter((f) => {
|
|
175
|
-
const
|
|
176
|
-
if (!
|
|
187
|
+
const r = this.getTagProject(f);
|
|
188
|
+
if (!r)
|
|
177
189
|
return !1;
|
|
178
|
-
const { x:
|
|
179
|
-
return !(Math.abs(
|
|
180
|
-
}).map((f) => ({ tag: f, id: f.id, tagConfig: this.getTagConfig(f).unfoldedConfig })).filter(({ tag: f, tagConfig:
|
|
181
|
-
var
|
|
182
|
-
return !(typeof
|
|
183
|
-
}).map((f) => I(C({}, f), { distance: this.getDistance(f.tag) })).filter(({ distance: f, tagConfig:
|
|
184
|
-
var
|
|
185
|
-
return !(f === void 0 || typeof
|
|
186
|
-
}).sort((f,
|
|
187
|
-
if (c === -1 || c <= ((
|
|
190
|
+
const { x: v, y: p, z: h } = r;
|
|
191
|
+
return !(Math.abs(h) > 1 || Math.abs(v) > 1 || Math.abs(p) > 1);
|
|
192
|
+
}).map((f) => ({ tag: f, id: f.id, tagConfig: this.getTagConfig(f).unfoldedConfig })).filter(({ tag: f, tagConfig: r }) => {
|
|
193
|
+
var v, p;
|
|
194
|
+
return !(typeof r != "object" || r.keep || r.autoUnfold === !1 || ((v = r.autoUnfold) == null ? void 0 : v.enable) === !1 || ((p = r.autoUnfold) == null ? void 0 : p.strategy) !== "MinimumDistance");
|
|
195
|
+
}).map((f) => I(C({}, f), { distance: this.getDistance(f.tag) })).filter(({ distance: f, tagConfig: r }) => {
|
|
196
|
+
var v, p;
|
|
197
|
+
return !(f === void 0 || typeof r != "object" || r.autoUnfold === !1 || ((v = r.autoUnfold) == null ? void 0 : v.enable) === !1 || ((p = r.autoUnfold) == null ? void 0 : p.strategy) !== "MinimumDistance" || r.autoUnfold.distance && b(f, r.autoUnfold.distance) === !1);
|
|
198
|
+
}).sort((f, r) => f.distance - r.distance).findIndex((f) => f.id === e.id);
|
|
199
|
+
if (c === -1 || c <= ((a = n.autoUnfold.maxNumber) != null ? a : 1) - 1 === !1)
|
|
188
200
|
return !1;
|
|
189
201
|
}
|
|
190
202
|
return !0;
|
|
@@ -192,7 +204,7 @@ class he extends S {
|
|
|
192
204
|
})() : void 0;
|
|
193
205
|
}
|
|
194
206
|
getDistance(e, t) {
|
|
195
|
-
var n,
|
|
207
|
+
var n, a, s;
|
|
196
208
|
const i = (n = this.five.panoIndex) != null ? n : t;
|
|
197
209
|
if (i === void 0)
|
|
198
210
|
throw new Error(`getDistance(): fivePanoIndex is ${i}`);
|
|
@@ -200,7 +212,7 @@ class he extends S {
|
|
|
200
212
|
if (o.distance !== void 0)
|
|
201
213
|
return o.distance;
|
|
202
214
|
{
|
|
203
|
-
const l = (s = (
|
|
215
|
+
const l = (s = (a = this.five.work) == null ? void 0 : a.observers[i]) == null ? void 0 : s.position;
|
|
204
216
|
if (l === void 0)
|
|
205
217
|
throw new Error(`getDistance(): observerPosition is ${l}`);
|
|
206
218
|
const c = D(e), u = l.distanceTo(c);
|
|
@@ -208,7 +220,7 @@ class he extends S {
|
|
|
208
220
|
}
|
|
209
221
|
}
|
|
210
222
|
getAngle(e, t) {
|
|
211
|
-
var n,
|
|
223
|
+
var n, a, s;
|
|
212
224
|
const i = (n = this.five.panoIndex) != null ? n : t;
|
|
213
225
|
if (i === void 0)
|
|
214
226
|
throw new Error(`getDistance(): fivePanoIndex is ${i}`);
|
|
@@ -216,44 +228,44 @@ class he extends S {
|
|
|
216
228
|
if (o.angle !== void 0)
|
|
217
229
|
return o.angle;
|
|
218
230
|
{
|
|
219
|
-
const l = (s = (
|
|
231
|
+
const l = (s = (a = this.five.work) == null ? void 0 : a.observers[i]) == null ? void 0 : s.position;
|
|
220
232
|
if (l === void 0)
|
|
221
233
|
throw new Error(`getAngleRange(): observerPosition is ${l}`);
|
|
222
|
-
const c = (() => e.stickType === "3DPoint" ? E(e.normal) :
|
|
234
|
+
const c = (() => e.stickType === "3DPoint" ? E(e.normal) : A(e.position))();
|
|
223
235
|
if (!c)
|
|
224
236
|
return;
|
|
225
|
-
const u = new k.Vector3().copy(l).sub(
|
|
237
|
+
const u = new k.Vector3().copy(l).sub(M(e.position)), f = c.angleTo(u) * 180 / Math.PI;
|
|
226
238
|
return o.angle = f, o.angle;
|
|
227
239
|
}
|
|
228
240
|
}
|
|
229
241
|
getTagConfig(e) {
|
|
230
|
-
var o;
|
|
242
|
+
var o, n;
|
|
231
243
|
if (!e)
|
|
232
244
|
return (o = this.config.globalConfig) != null ? o : {};
|
|
233
245
|
const t = {};
|
|
234
|
-
this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((
|
|
235
|
-
const
|
|
236
|
-
if (t[
|
|
246
|
+
this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((a) => {
|
|
247
|
+
const s = a;
|
|
248
|
+
if (t[s])
|
|
237
249
|
return;
|
|
238
|
-
const
|
|
239
|
-
if (
|
|
240
|
-
const [
|
|
241
|
-
e.contentType ===
|
|
250
|
+
const l = s.split("-");
|
|
251
|
+
if (l.length === 1) {
|
|
252
|
+
const [c] = l;
|
|
253
|
+
e.contentType === c && (t[s] = this.config.contentTypeConfig[s]);
|
|
242
254
|
}
|
|
243
|
-
if (
|
|
244
|
-
const [
|
|
245
|
-
(e.stickType ===
|
|
255
|
+
if (l.length === 2) {
|
|
256
|
+
const [c = "Any", u = "Any"] = l;
|
|
257
|
+
(e.stickType === c || c === "Any") && (e.contentType === u || u === "Any") && (t[s] = this.config.contentTypeConfig[s]);
|
|
246
258
|
}
|
|
247
|
-
if (
|
|
248
|
-
const [
|
|
249
|
-
if (
|
|
250
|
-
const
|
|
251
|
-
(
|
|
259
|
+
if (l.length === 3) {
|
|
260
|
+
const [c = "Any", u, f] = l;
|
|
261
|
+
if (u === "Audio" && e.contentType === "Audio") {
|
|
262
|
+
const r = e;
|
|
263
|
+
(r.stickType === c || c === "Any") && r.data.appearance === f && (t[s] = this.config.contentTypeConfig[s]);
|
|
252
264
|
}
|
|
253
265
|
}
|
|
254
266
|
});
|
|
255
267
|
const i = x({}, this.config.globalConfig, ...Object.values(t), e.config);
|
|
256
|
-
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;
|
|
268
|
+
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, visibleFiveMode: (n = i.visibleConfig) == null ? void 0 : n.visibleFiveMode }), i;
|
|
257
269
|
}
|
|
258
270
|
can(e, t) {
|
|
259
271
|
const i = this.getTagConfig(t);
|
|
@@ -321,9 +333,9 @@ class he extends S {
|
|
|
321
333
|
getTagProject(e) {
|
|
322
334
|
if (!this.getVisibleByPanoIndex(e))
|
|
323
335
|
return;
|
|
324
|
-
const i =
|
|
325
|
-
if (!(
|
|
326
|
-
return { x: o, y: n, z:
|
|
336
|
+
const i = M(e.position), { x: o, y: n, z: a } = i.project(this.five.camera);
|
|
337
|
+
if (!(a > 1))
|
|
338
|
+
return { x: o, y: n, z: a };
|
|
327
339
|
}
|
|
328
340
|
filterPointTag() {
|
|
329
341
|
return this.tags.filter((e) => e.stickType === "2DPoint" || e.stickType === "3DPoint");
|
|
@@ -351,19 +363,19 @@ class he extends S {
|
|
|
351
363
|
}
|
|
352
364
|
getTagEnableByIntersect(e, t) {
|
|
353
365
|
var c, u, f;
|
|
354
|
-
const i = (c = this.getTagConfig(e).visibleConfig) != null ? c : {}, o = this.getDistance(e), [n] = this.five.model.intersectRaycaster(t),
|
|
366
|
+
const i = (c = this.getTagConfig(e).visibleConfig) != null ? c : {}, o = this.getDistance(e), [n] = this.five.model.intersectRaycaster(t), a = (() => {
|
|
355
367
|
if (!m(e))
|
|
356
368
|
return;
|
|
357
|
-
const
|
|
358
|
-
var
|
|
359
|
-
return (
|
|
360
|
-
}).filter(
|
|
361
|
-
return t.intersectObjects(
|
|
369
|
+
const r = this.tags.filter(m).map((p) => {
|
|
370
|
+
var h;
|
|
371
|
+
return (h = p.model) == null ? void 0 : h.object;
|
|
372
|
+
}).filter(F);
|
|
373
|
+
return t.intersectObjects(r, !0)[0];
|
|
362
374
|
})(), s = (() => {
|
|
363
|
-
var
|
|
364
|
-
return typeof i == "object" && typeof i.intersectRaycaster == "object" && (
|
|
375
|
+
var r;
|
|
376
|
+
return typeof i == "object" && typeof i.intersectRaycaster == "object" && (r = i.intersectRaycaster.distanceAccuracy) != null ? r : 0.01;
|
|
365
377
|
})();
|
|
366
|
-
return Math.min((u = n == null ? void 0 : n.distance) != null ? u : 1 / 0, (f =
|
|
378
|
+
return Math.min((u = n == null ? void 0 : n.distance) != null ? u : 1 / 0, (f = a == null ? void 0 : a.distance) != null ? f : 1 / 0) + s < o ? {
|
|
367
379
|
value: !1,
|
|
368
380
|
reason: `intersectRaycaster check failed: distance is ${o}, intersection.point is ${n.point.toArray()}, distanceError is ${s}`
|
|
369
381
|
} : { value: !0, reason: "" };
|
|
@@ -377,18 +389,14 @@ class he extends S {
|
|
|
377
389
|
return this.raycaster.set(i, o), this.raycaster;
|
|
378
390
|
}
|
|
379
391
|
checkFloorIndex(e) {
|
|
380
|
-
var
|
|
392
|
+
var a;
|
|
381
393
|
const t = e.fiveState;
|
|
382
394
|
if (!t)
|
|
383
395
|
return !0;
|
|
384
|
-
const i = t.panoIndex, o = (
|
|
396
|
+
const i = t.panoIndex, o = (a = this.five.work.observers[i]) == null ? void 0 : a.floorIndex, n = this.five.model.shownFloor;
|
|
385
397
|
return n === null || n === o;
|
|
386
398
|
}
|
|
387
|
-
changeTagMode(e, t) {
|
|
388
|
-
var i, o, n, r, s;
|
|
389
|
-
(i = e.config) != null && i.tag3DConfig ? e.config.tag3DConfig.mode = t : e.config ? e.config.tag3DConfig = { mode: t } : e.config = { tag3DConfig: { mode: t } }, (n = (o = e.tag3DContentSvelte) == null ? void 0 : o.domContainer) == null || n.dispose(), (s = (r = e.tag3DContentSvelte) == null ? void 0 : r.svelteApp) == null || s.$destroy(), e.tag3DContentSvelte = void 0;
|
|
390
|
-
}
|
|
391
399
|
}
|
|
392
400
|
export {
|
|
393
|
-
|
|
401
|
+
pe as TagComputer
|
|
394
402
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var x = Object.defineProperty, G = Object.defineProperties;
|
|
2
2
|
var V = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var R = Object.getOwnPropertySymbols;
|
|
4
4
|
var N = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var A = (h, a, e) => a in h ? x(h, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[a] = e, p = (h, a) => {
|
|
6
6
|
for (var e in a || (a = {}))
|
|
7
|
-
N.call(a, e) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
W.call(a, e) &&
|
|
7
|
+
N.call(a, e) && A(h, e, a[e]);
|
|
8
|
+
if (R)
|
|
9
|
+
for (var e of R(a))
|
|
10
|
+
W.call(a, e) && A(h, e, a[e]);
|
|
11
11
|
return h;
|
|
12
|
-
},
|
|
13
|
-
var d = (h, a, e) => (
|
|
12
|
+
}, m = (h, a) => G(h, V(a));
|
|
13
|
+
var d = (h, a, e) => (A(h, typeof a != "symbol" ? a + "" : a, e), e);
|
|
14
14
|
var c = (h, a, e) => new Promise((t, i) => {
|
|
15
15
|
var s = (r) => {
|
|
16
16
|
try {
|
|
@@ -28,18 +28,18 @@ var c = (h, a, e) => new Promise((t, i) => {
|
|
|
28
28
|
n((e = e.apply(h, a)).next());
|
|
29
29
|
});
|
|
30
30
|
import { Subscribe as z } from "@realsee/five";
|
|
31
|
-
import { Group as
|
|
32
|
-
import
|
|
31
|
+
import { Group as E, Vector3 as T, Matrix4 as C, Quaternion as _ } from "three";
|
|
32
|
+
import u from "object-assign-deep";
|
|
33
33
|
import { writable as $ } from "../../vendor/svelte/store/index.js";
|
|
34
34
|
import q from "../Components/TagContainer.js";
|
|
35
35
|
import H from "../Components/Tag/index.js";
|
|
36
36
|
import { arrayPositionToVector3 as v } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
37
|
-
import { addDebugPoints as
|
|
37
|
+
import { addDebugPoints as J } from "../utils/addDebugPoints.js";
|
|
38
38
|
import { planeNormal as O } from "../utils/planeNormal.js";
|
|
39
39
|
import "@realsee/five/gltf-loader";
|
|
40
|
-
import { isMediaModelTag as
|
|
41
|
-
import { waitFiveModelLoaded as
|
|
42
|
-
import { normalPositionToPositions as
|
|
40
|
+
import { isMediaModelTag as f } from "../utils/tag/tagCheck.js";
|
|
41
|
+
import { waitFiveModelLoaded as Q } from "../utils/actionAfterFiveModelLoad.js";
|
|
42
|
+
import { normalPositionToPositions as X } from "../utils/normalPositionToPositions.js";
|
|
43
43
|
import { debounce as k } from "../utils/debounce.js";
|
|
44
44
|
import { throttle as K } from "../utils/throttle.js";
|
|
45
45
|
import { resizeObserver as I } from "../utils/resizeObserver.js";
|
|
@@ -48,8 +48,6 @@ import { CSS3DRenderPlugin as Z } from "../../CSS3DRenderPlugin/index.js";
|
|
|
48
48
|
import ee from "../utils/tag/format.js";
|
|
49
49
|
import { generateBlankAudio as L, AudioNamespace as U } from "../../shared-utils/audio.js";
|
|
50
50
|
import { loadGLTF as te } from "../../shared-utils/three/GLTFLoader.js";
|
|
51
|
-
import "../../CSS3DRenderPlugin/CSS3DRender.js";
|
|
52
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
53
51
|
import { getMediaModelPlanPositions as ie } from "../utils/tag/index.js";
|
|
54
52
|
import "../../vendor/svelte/internal/index.js";
|
|
55
53
|
import "../Components/TagItem.js";
|
|
@@ -94,8 +92,7 @@ import "../Components/Common/MediaItem.js";
|
|
|
94
92
|
import "../Components/Tag/MarketingTag.js";
|
|
95
93
|
import "hammerjs";
|
|
96
94
|
import "@tweenjs/tween.js";
|
|
97
|
-
import "../../
|
|
98
|
-
import "../../shared-utils/animationFrame/index.js";
|
|
95
|
+
import "../../CSS3DRenderPlugin/CSS3DRender.js";
|
|
99
96
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
100
97
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
101
98
|
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
@@ -107,6 +104,9 @@ import "../../CSS3DRenderPlugin/utils/centerPoint.js";
|
|
|
107
104
|
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
108
105
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
109
106
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
107
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
108
|
+
import "../../shared-utils/animationFrame/BetterTween.js";
|
|
109
|
+
import "../../shared-utils/animationFrame/index.js";
|
|
110
110
|
import "../Components/Tag/AudioTag/index.js";
|
|
111
111
|
import "../Components/Tag/AudioTag/AudioTag.js";
|
|
112
112
|
import "../Components/Common/Audio.js";
|
|
@@ -124,8 +124,8 @@ import "./TagCacheController.js";
|
|
|
124
124
|
import "../../base/BasePlugin.js";
|
|
125
125
|
import "../../CSS3DRenderPlugin/Controller.js";
|
|
126
126
|
import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
127
|
-
const j = "2.0.10", S = `DnalogelPlugin-PanoTagPlugin@${j}`, se = !1,
|
|
128
|
-
class
|
|
127
|
+
const j = "2.0.10", S = `DnalogelPlugin-PanoTagPlugin@${j}`, se = !1, Jt = (h) => `${S}--${h}`;
|
|
128
|
+
class Qt extends Y {
|
|
129
129
|
constructor(e, t) {
|
|
130
130
|
super(e);
|
|
131
131
|
d(this, "version", j);
|
|
@@ -138,8 +138,8 @@ class Xt extends Y {
|
|
|
138
138
|
d(this, "mediaStore", $({
|
|
139
139
|
currentMediaElement: null
|
|
140
140
|
}));
|
|
141
|
-
d(this, "group", new
|
|
142
|
-
d(this, "gltfObjectGroup", new
|
|
141
|
+
d(this, "group", new E());
|
|
142
|
+
d(this, "gltfObjectGroup", new E());
|
|
143
143
|
d(this, "isIOSWX", navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1 && navigator.userAgent.toLowerCase().indexOf("iphone") !== -1);
|
|
144
144
|
d(this, "store", {
|
|
145
145
|
disposers: [],
|
|
@@ -149,19 +149,20 @@ class Xt extends Y {
|
|
|
149
149
|
});
|
|
150
150
|
d(this, "enabledModelTagSet", /* @__PURE__ */ new Set());
|
|
151
151
|
d(this, "changeTagModel", (e, t) => c(this, null, function* () {
|
|
152
|
-
e.data =
|
|
152
|
+
e.data = u({}, e.data, t), yield this.loadModel(e), this.updateRenderAllTags();
|
|
153
153
|
}));
|
|
154
154
|
d(this, "disposedErrorLog", () => {
|
|
155
155
|
console.error(`${S} is disposed`);
|
|
156
156
|
});
|
|
157
157
|
d(this, "handleFiveInitAnimationEnded", () => {
|
|
158
|
-
this.five.getCurrentState().mode
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
const e = this.five.getCurrentState().mode;
|
|
159
|
+
this.tags.forEach((t) => {
|
|
160
|
+
t.state.visible = this.getVisible(t), f(t) && e === "Panorama" && this.changeTagMode(t, "front");
|
|
161
|
+
}), this.updateRenderAllTags(), this.updateRenderAllTags();
|
|
161
162
|
});
|
|
162
163
|
d(this, "handleFiveModelShownFloorChange", () => {
|
|
163
164
|
this.tags.forEach((e) => {
|
|
164
|
-
!
|
|
165
|
+
!f(e) || (e.state.visible = this.checkFloorIndex(e));
|
|
165
166
|
}), this.updateRenderAllTags();
|
|
166
167
|
});
|
|
167
168
|
d(this, "loadModel", (e) => c(this, null, function* () {
|
|
@@ -183,14 +184,14 @@ class Xt extends Y {
|
|
|
183
184
|
load(e, t) {
|
|
184
185
|
return c(this, null, function* () {
|
|
185
186
|
var s, o;
|
|
186
|
-
this.clearTags(), console.log(S, " load:", { data: e }), this.config =
|
|
187
|
+
this.clearTags(), console.log(S, " load:", { data: JSON.parse(JSON.stringify(e)) }), this.config = u({}, this.config, {
|
|
187
188
|
globalConfig: (s = e.globalConfig) != null ? s : {},
|
|
188
189
|
contentTypeConfig: (o = e.contentTypeConfig) != null ? o : {}
|
|
189
190
|
});
|
|
190
191
|
const i = yield this.addTag(e.tagList, t);
|
|
191
192
|
if (this.debug)
|
|
192
193
|
try {
|
|
193
|
-
|
|
194
|
+
J(this.five, this.tags);
|
|
194
195
|
} catch (n) {
|
|
195
196
|
console.error(n);
|
|
196
197
|
}
|
|
@@ -200,28 +201,28 @@ class Xt extends Y {
|
|
|
200
201
|
addTag(e, t) {
|
|
201
202
|
return c(this, null, function* () {
|
|
202
203
|
const s = (Array.isArray(e) ? e : [e]).map((o) => {
|
|
203
|
-
const n = this.getTagConfig(o), r =
|
|
204
|
+
const n = this.getTagConfig(o), r = m(p({}, o), {
|
|
204
205
|
state: p({ visible: void 0, unfolded: se }, n.initialState),
|
|
205
206
|
hooks: new z(),
|
|
206
207
|
clickable: n.clickable,
|
|
207
208
|
mergedConfig: n
|
|
208
209
|
});
|
|
209
|
-
return
|
|
210
|
+
return f(o) && (r.temporaryState = { visible: !1 }), r;
|
|
210
211
|
}).filter((o) => o.position);
|
|
211
|
-
return s.forEach(ee), this.tags.push(...s),
|
|
212
|
+
return s.forEach(ee), this.tags.push(...s), Q(this.five).then(() => {
|
|
212
213
|
var o, n, r;
|
|
213
214
|
return this.store.eventListenerDisposer && ((n = (o = this.store).eventListenerDisposer) == null || n.call(o)), this.state.enabled && (this.store.eventListenerDisposer = this.addEventListener()), this.addResizeListener(), this.checkPanelTag(), this.setVisibleAndUnfolded({ withAnimation: (r = t == null ? void 0 : t.withAnimation) != null ? r : !0 }).then(() => this.updateRenderAllTags()), this.updateRenderAllTags(), console.log("\u{1F436} ==> waitFiveModelLoaded:"), this.addMediaModelTag(s);
|
|
214
215
|
});
|
|
215
216
|
});
|
|
216
217
|
}
|
|
217
218
|
changeConfig(e, t = !0) {
|
|
218
|
-
t ? this.config =
|
|
219
|
+
t ? this.config = u({}, this.config, e) : this.config = e, this.updateTagConfig({ force: !0 }), this.updateRenderAllTags();
|
|
219
220
|
}
|
|
220
221
|
changeGlobalConfig(e, t = !0) {
|
|
221
|
-
t ? this.config.globalConfig =
|
|
222
|
+
t ? this.config.globalConfig = u({}, this.config.globalConfig, e) : this.config.globalConfig = e, this.updateTagConfig({ force: !0 }), this.updateRenderAllTags();
|
|
222
223
|
}
|
|
223
224
|
clearTags() {
|
|
224
|
-
this.tags = [], this.clearCache(), this.disposeAllCSS3DContainer(), this.updateRenderAllTags();
|
|
225
|
+
this.tags = [], this.enabledModelTagSet.clear(), this.clearCache(), this.disposeAllCSS3DContainer(), this.updateRenderAllTags();
|
|
225
226
|
}
|
|
226
227
|
show(e) {
|
|
227
228
|
return c(this, null, function* () {
|
|
@@ -279,14 +280,14 @@ class Xt extends Y {
|
|
|
279
280
|
}
|
|
280
281
|
changeDataById(e, t, i = !0) {
|
|
281
282
|
const s = this.getTagById(e);
|
|
282
|
-
!s || (i ? s.data =
|
|
283
|
+
!s || (i ? s.data = u({}, s.data, t) : s.data = p(p({}, s.data), t), this.checkPanelTag(), this.updateRenderAllTags());
|
|
283
284
|
}
|
|
284
285
|
changeStickTypeById(e, t, i = !0) {
|
|
285
286
|
this.changeTagById(e, t, i);
|
|
286
287
|
}
|
|
287
288
|
changeTagById(e, t, i = !0) {
|
|
288
289
|
const s = this.getTagById(e);
|
|
289
|
-
!t || (i ?
|
|
290
|
+
!t || (i ? u(s, t) : Object.assign(s, t), (s == null ? void 0 : s.tag3DContentSvelte) && (t == null ? void 0 : t.normal) && (s.tag3DContentSvelte.currentNormal = v(t.normal)), this.updateRenderAllTags(), this.checkPanelTag());
|
|
290
291
|
}
|
|
291
292
|
destroyTagById(e) {
|
|
292
293
|
(Array.isArray(e) ? e : [e]).forEach((i) => {
|
|
@@ -302,9 +303,9 @@ class Xt extends Y {
|
|
|
302
303
|
const i = (w = (M = (P = e.mergedConfig) == null ? void 0 : P.tag3DConfig) == null ? void 0 : M.ratio) != null ? w : 216e-5, s = (F = e.tag3DContentSvelte) == null ? void 0 : F.domContainer.css3DObject;
|
|
303
304
|
if (!s)
|
|
304
305
|
return;
|
|
305
|
-
const o =
|
|
306
|
+
const o = f(e) ? e.data.mediaPosition : e.position;
|
|
306
307
|
t.updateWorldMatrix(!1, !1);
|
|
307
|
-
const n = t.matrixWorld, r = new T().fromArray(o[0]), l = new T().fromArray(o[2]), g = new T().lerpVectors(r, l, 0.5).add(new T(0, 0, 5e-4)),
|
|
308
|
+
const n = t.matrixWorld, r = new T().fromArray(o[0]), l = new T().fromArray(o[2]), g = new T().lerpVectors(r, l, 0.5).add(new T(0, 0, 5e-4)), D = new C().setPosition(g), B = new C().makeScale(i, i, i), y = new C().multiply(n).multiply(D).multiply(B);
|
|
308
309
|
y.decompose(s.position, s.quaternion, s.scale);
|
|
309
310
|
const b = s.opacityMesh;
|
|
310
311
|
!b || y.decompose(b.position, b.quaternion, b.scale);
|
|
@@ -336,8 +337,8 @@ class Xt extends Y {
|
|
|
336
337
|
});
|
|
337
338
|
}
|
|
338
339
|
addEventListener() {
|
|
339
|
-
const { five: e, hooks: t } = this, i = this.handleFiveWantsMoveToPano.bind(this), s = this.handleFiveModeChange.bind(this), o = this.handleFiveCameraUpdate.bind(this), n = this.handleFiveCameraUpdateDebounce(), r = this.handleFivePanoArrived.bind(this), l = this.loadVideoFirstFrame.bind(this), g = this.clickhandler.bind(this),
|
|
340
|
-
return this.handleFiveModeChange(
|
|
340
|
+
const { five: e, hooks: t } = this, i = this.handleFiveWantsMoveToPano.bind(this), s = this.handleFiveModeChange.bind(this), o = this.handleFiveCameraUpdate.bind(this), n = this.handleFiveCameraUpdateDebounce(), r = this.handleFivePanoArrived.bind(this), l = this.loadVideoFirstFrame.bind(this), g = this.clickhandler.bind(this), D = this.five.currentMode;
|
|
341
|
+
return this.handleFiveModeChange(D), this.handleFivePanoArrived(), e.on("wantsMoveToPano", i), e.on("modeChange", s), e.on("initAnimationEnded", this.handleFiveInitAnimationEnded), e.on("modelShownFloorChange", this.handleFiveModelShownFloorChange), e.on("cameraUpdate", o), e.on("cameraUpdate", n), e.on("panoArrived", r), e.on("panoArrived", l), t.on("click", g), () => {
|
|
341
342
|
e.off("wantsMoveToPano", i), e.off("modeChange", s), e.off("initAnimationEnded", this.handleFiveInitAnimationEnded), e.off("modelShownFloorChange", this.handleFiveModelShownFloorChange), e.off("cameraUpdate", o), e.off("cameraUpdate", n), e.off("panoArrived", r), e.off("panoArrived", l), t.off("click", g), this.store.eventListenerDisposer = void 0;
|
|
342
343
|
};
|
|
343
344
|
}
|
|
@@ -374,17 +375,13 @@ class Xt extends Y {
|
|
|
374
375
|
}
|
|
375
376
|
handleFiveModeChange(e) {
|
|
376
377
|
this.tags.forEach((t) => {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
e !== "Panorama" && (t.temporaryState = f(p({}, t.temporaryState), { visible: !1 }));
|
|
382
|
-
}), this.updateRenderAllTags();
|
|
378
|
+
t.state.visible = this.getVisible(t), f(t) && e !== "Panorama" && this.changeTagMode(t, "behind");
|
|
379
|
+
}), this.updateRenderAllTags(), this.updateRenderAllTags();
|
|
383
380
|
}
|
|
384
381
|
handleFiveWantsMoveToPano() {
|
|
385
382
|
this.tags.forEach((e) => {
|
|
386
383
|
const t = this.getTagConfig(e);
|
|
387
|
-
typeof t.visibleConfig == "object" && (t.visibleConfig.keep ? e.temporaryState =
|
|
384
|
+
typeof t.visibleConfig == "object" && (t.visibleConfig.keep ? e.temporaryState = m(p({}, e.temporaryState), { visible: t.visibleConfig.keep === "visible" }) : e.temporaryState = m(p({}, e.temporaryState), { visible: Boolean(t.visibleConfig.alwaysShowWhenMovePano) }));
|
|
388
385
|
}), this.updateTagContainerVisible();
|
|
389
386
|
}
|
|
390
387
|
temporaryShow({ withAnimation: e } = { withAnimation: !1 }) {
|
|
@@ -432,7 +429,7 @@ class Xt extends Y {
|
|
|
432
429
|
handleFivePanoArrived() {
|
|
433
430
|
return c(this, null, function* () {
|
|
434
431
|
yield this.setVisibleAndUnfolded(), this.setModelMedialVisibleByPanoIndex(), this.tags.forEach((e) => {
|
|
435
|
-
e.temporaryState =
|
|
432
|
+
e.temporaryState = m(p({}, e.temporaryState), { visible: !0 });
|
|
436
433
|
}), this.store.visibleWithAnimation = !0, this.updateTagContainerVisible();
|
|
437
434
|
});
|
|
438
435
|
}
|
|
@@ -480,7 +477,7 @@ class Xt extends Y {
|
|
|
480
477
|
return;
|
|
481
478
|
if (this.css3DRenderPlugin || (this.css3DRenderPlugin = Z(this.five)), t.stickType === "3DPoint" && !t.normal)
|
|
482
479
|
return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");
|
|
483
|
-
const s = (() => t.stickType === "Plane" ? t.position : t.stickType === "Model" && t.contentType === "MediaModel" ? ie(t) :
|
|
480
|
+
const s = (() => t.stickType === "Plane" ? t.position : t.stickType === "Model" && t.contentType === "MediaModel" ? ie(t) : X(
|
|
484
481
|
this.five.camera.position,
|
|
485
482
|
v(t.position),
|
|
486
483
|
v(t.normal)
|
|
@@ -506,7 +503,7 @@ class Xt extends Y {
|
|
|
506
503
|
props: {
|
|
507
504
|
tag: t,
|
|
508
505
|
hooks: this.hooks,
|
|
509
|
-
state: t.contentType === "MediaModel" ?
|
|
506
|
+
state: t.contentType === "MediaModel" ? m(p({}, this.state), { visible: !1 }) : this.state,
|
|
510
507
|
mediaStore: this.mediaStore,
|
|
511
508
|
temporaryState: this.temporaryState
|
|
512
509
|
}
|
|
@@ -520,7 +517,7 @@ class Xt extends Y {
|
|
|
520
517
|
}
|
|
521
518
|
updateRenderModelTag() {
|
|
522
519
|
const e = (i) => !this.enabledModelTagSet.has(i.customID);
|
|
523
|
-
this.gltfObjectGroup.remove(...this.gltfObjectGroup.children.filter(e)), this.tags.filter(
|
|
520
|
+
this.gltfObjectGroup.remove(...this.gltfObjectGroup.children.filter(e)), this.tags.filter(f).forEach((i) => {
|
|
524
521
|
var s;
|
|
525
522
|
(s = i.model) == null || s.promise.then((o) => {
|
|
526
523
|
o.visible = i.state.visible;
|
|
@@ -544,13 +541,17 @@ class Xt extends Y {
|
|
|
544
541
|
}
|
|
545
542
|
addMediaModelTag(e) {
|
|
546
543
|
return c(this, null, function* () {
|
|
547
|
-
const t = e.filter(
|
|
544
|
+
const t = e.filter(f).map(this.loadModel);
|
|
548
545
|
yield Promise.all(t), this.five.getCurrentState().mode === "Panorama" && this.setModelMedialVisibleByPanoIndex(), this.updateRenderAllTags();
|
|
549
546
|
});
|
|
550
547
|
}
|
|
548
|
+
changeTagMode(e, t) {
|
|
549
|
+
var i, s, o, n, r;
|
|
550
|
+
((o = (s = (i = e.tag3DContentSvelte) == null ? void 0 : i.domContainer) == null ? void 0 : s.css3DObject) == null ? void 0 : o.mode) !== t && ((n = e.config) != null && n.tag3DConfig ? e.config.tag3DConfig.mode = t : e.config ? e.config.tag3DConfig = { mode: t } : e.config = { tag3DConfig: { mode: t } }, (r = this.store.css3DRenderDisposer.get(e.id)) == null || r(), e.tag3DContentSvelte = void 0);
|
|
551
|
+
}
|
|
551
552
|
}
|
|
552
553
|
export {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
554
|
+
Qt as PanoTagPluginController,
|
|
555
|
+
Qt as default,
|
|
556
|
+
Jt as pluginFlag
|
|
556
557
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Create3DDomContainerParamsType } from '../../../CSS3DRenderPlugin/Controller';
|
|
2
|
-
import type { Five } from '@realsee/five';
|
|
2
|
+
import type { Five, Mode } from '@realsee/five';
|
|
3
3
|
import type { TagContentType } from './TagData';
|
|
4
4
|
import type { Tag } from './Tag';
|
|
5
5
|
import type { MinMax, StickType } from './Utils';
|
|
@@ -8,6 +8,7 @@ export interface TagConfig<C extends TagContentType = TagContentType, S extends
|
|
|
8
8
|
visibleConfig?: {
|
|
9
9
|
/** 保持可见/不可见, 设置后visibleConfig下所有其他配置都不生效 */
|
|
10
10
|
keep?: 'visible' | 'hidden';
|
|
11
|
+
visibleFiveMode?: Mode[];
|
|
11
12
|
/** 走点时不隐藏 */
|
|
12
13
|
alwaysShowWhenMovePano?: true;
|
|
13
14
|
/** min-max米内显示 | 无距离限制 */
|