@realsee/dnalogel 2.20.0-dev.1 → 2.20.0-dev.10
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 +1 -0
- package/dist/PanoTagPlugin/controller/TagRender.d.ts +11 -1
- package/dist/PanoTagPlugin/typings/controller.d.ts +2 -1
- package/dist/PanoTagPlugin/typings/tag/Tag.d.ts +4 -4
- package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +4 -4
- package/dist/PanoTagPlugin/typings/tag/TagInstance.d.ts +4 -2
- package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +12 -10
- package/dist/index.cjs.js +44 -44
- package/dist/index.js +4082 -4019
- package/dist/index.umd.js +32 -32
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +26 -26
- package/docs/classes/GuideLineItem.GuideLineItem.html +20 -20
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +31 -31
- package/docs/classes/Magnifier.html +20 -20
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +25 -25
- 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 +74 -48
- package/docs/classes/Util.BetterTween.html +9 -9
- 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 +20 -20
- 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 +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.isAbsoluteURL.html +5 -5
- package/docs/functions/Util.isModelLike.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.isPanoramaLike.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/Util.uuid.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +5 -5
- 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/CruisePluginTypes.Config.html +8 -8
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +12 -12
- package/docs/interfaces/CruisePluginTypes.EventMap.html +20 -20
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +12 -12
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +14 -14
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +14 -14
- package/docs/interfaces/CruisePluginTypes.PluginData.html +9 -9
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +7 -7
- package/docs/interfaces/CruisePluginTypes.PluginState.html +11 -11
- 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/GuideLineModeItem.GuideLineTagContainer.html +8 -8
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +10 -10
- package/docs/interfaces/GuideLinePluginType.EventMap.html +13 -13
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +8 -8
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +6 -6
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +13 -13
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +8 -8
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +18 -18
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +7 -7
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +18 -18
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +5 -5
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +7 -7
- package/docs/interfaces/GuideLinePluginType.PluginState.html +8 -8
- package/docs/interfaces/GuideLinePluginType.Route.html +11 -11
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +9 -9
- 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 +15 -15
- package/docs/interfaces/TagGLTFObjectGroup.html +6 -6
- package/docs/interfaces/TagIconUrl.html +12 -12
- package/docs/interfaces/TagObjectGroup.html +6 -6
- package/docs/interfaces/TagStyle.html +7 -7
- 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/CruisePluginTypes.html +5 -5
- package/docs/modules/GuideLineItem.html +5 -5
- package/docs/modules/GuideLineModeItem.html +5 -5
- package/docs/modules/GuideLinePluginType.html +5 -5
- package/docs/modules/PanoVideoPluginType.html +5 -5
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +6 -6
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/AudioAppearance.html +5 -5
- package/docs/types/AudioTagTypeConfigKey.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/ClassFunctionParameters.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +6 -6
- package/docs/types/ContentTypeConfigKeySplit.html +6 -6
- 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/CruisePluginTypes.CruiseData.html +5 -5
- package/docs/types/CruisePluginTypes.MoveEffect.html +5 -5
- package/docs/types/DeprecatedMediaPlaneProperty.html +5 -5
- package/docs/types/DeprecatedTagProperty.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/ElementRenderer.html +10 -8
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/GuideLinePluginType.GuideLineItem.html +5 -5
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +5 -5
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +5 -5
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +5 -5
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +5 -5
- package/docs/types/GuideLinePluginType.PathItem.html +5 -5
- package/docs/types/GuideLinePluginType.PluginData.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/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/PartialObjectDeep.html +5 -5
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +6 -6
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagInstance.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 +6 -6
- 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 +29 -11
- package/docs/types/TagGLTFObject.html +5 -5
- package/docs/types/TagHooks.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TagInstance.html +6 -6
- package/docs/types/TagPointType.html +5 -5
- package/docs/types/{TagIconSize.html → TagRendererMap.html} +8 -11
- 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/Components/Common/Media.js +94 -94
- package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +61 -54
- package/libs/PanoTagPlugin/Components/Tag/index.js +279 -266
- package/libs/PanoTagPlugin/Components/TagContainer.js +90 -83
- package/libs/PanoTagPlugin/Components/TagItem.js +177 -169
- package/libs/PanoTagPlugin/controller/TagComputer.d.ts +1 -0
- package/libs/PanoTagPlugin/controller/TagComputer.js +83 -77
- package/libs/PanoTagPlugin/controller/TagRender.d.ts +11 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +41 -22
- package/libs/PanoTagPlugin/controller/TagUtil.js +4 -4
- package/libs/PanoTagPlugin/controller/index.js +22 -19
- package/libs/PanoTagPlugin/typings/controller.d.ts +2 -1
- package/libs/PanoTagPlugin/typings/tag/Tag.d.ts +4 -4
- package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +4 -4
- package/libs/PanoTagPlugin/typings/tag/TagInstance.d.ts +4 -2
- package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +12 -10
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var M = Object.defineProperty, U = Object.defineProperties;
|
|
2
|
-
var
|
|
2
|
+
var D = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var P = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
4
|
+
var R = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var g = (d, l, e) => l in d ? M(d, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[l] = e, x = (d, l) => {
|
|
6
6
|
for (var e in l || (l = {}))
|
|
7
|
-
|
|
7
|
+
R.call(l, e) && g(d, e, l[e]);
|
|
8
8
|
if (P)
|
|
9
9
|
for (var e of P(l))
|
|
10
|
-
|
|
10
|
+
B.call(l, e) && g(d, e, l[e]);
|
|
11
11
|
return d;
|
|
12
|
-
}, I = (d, l) => U(d,
|
|
13
|
-
var
|
|
14
|
-
import * as
|
|
12
|
+
}, I = (d, l) => U(d, D(l));
|
|
13
|
+
var T = (d, l, e) => (g(d, typeof l != "symbol" ? l + "" : l, e), e);
|
|
14
|
+
import * as C from "three";
|
|
15
15
|
import { is3DTag as j, isMediaModelTag as y } from "../utils/tag/tagCheck.js";
|
|
16
|
-
import { tagPosition as
|
|
16
|
+
import { tagPosition as V, getTagPosition as k } from "../utils/tagPosition.js";
|
|
17
17
|
import { checkRange as h } from "../utils/checkRange.js";
|
|
18
18
|
import "hammerjs";
|
|
19
19
|
import "@realsee/five";
|
|
@@ -58,17 +58,17 @@ import "../../shared-utils/threex/domevents/index.js";
|
|
|
58
58
|
class Ue extends S {
|
|
59
59
|
constructor(e) {
|
|
60
60
|
super(e);
|
|
61
|
-
|
|
61
|
+
T(this, "raycaster", new C.Raycaster());
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* @description: 获取是否可见
|
|
65
65
|
*/
|
|
66
66
|
getVisibleByPanoIndex(e, t) {
|
|
67
|
-
const
|
|
67
|
+
const n = this.getCache({ panoIndex: t, id: e.id }), s = t != null ? t : this.five.getCurrentState().panoIndex;
|
|
68
68
|
if (e.stickType === "Model")
|
|
69
69
|
return !0;
|
|
70
|
-
if (
|
|
71
|
-
return
|
|
70
|
+
if (n.visible !== void 0)
|
|
71
|
+
return n.visible;
|
|
72
72
|
{
|
|
73
73
|
const i = (() => {
|
|
74
74
|
var c, u, v;
|
|
@@ -79,16 +79,16 @@ class Ue extends S {
|
|
|
79
79
|
return { value: !1, reason: "config.keep is hidden" };
|
|
80
80
|
if (o.keep === "visible")
|
|
81
81
|
return { value: !0, reason: "config.keep is visible" };
|
|
82
|
-
if (o.visiblePanoIndex !== void 0 && o.visiblePanoIndex !== "all" &&
|
|
83
|
-
if (Array.isArray(o.visiblePanoIndex) && !o.visiblePanoIndex.includes(
|
|
82
|
+
if (o.visiblePanoIndex !== void 0 && o.visiblePanoIndex !== "all" && s !== void 0) {
|
|
83
|
+
if (Array.isArray(o.visiblePanoIndex) && !o.visiblePanoIndex.includes(s))
|
|
84
84
|
return {
|
|
85
85
|
value: !1,
|
|
86
|
-
reason: `current panoIndex is not included in visiblePano. currentPanoIndex: ${
|
|
86
|
+
reason: `current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${o.visiblePanoIndex}`
|
|
87
87
|
};
|
|
88
|
-
if (o.visiblePanoIndex === "current" &&
|
|
88
|
+
if (o.visiblePanoIndex === "current" && s !== ((u = e.fiveState) == null ? void 0 : u.panoIndex))
|
|
89
89
|
return {
|
|
90
90
|
value: !1,
|
|
91
|
-
reason: `current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${
|
|
91
|
+
reason: `current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(v = e.fiveState) == null ? void 0 : v.panoIndex}`
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
if (o.visibleDistance !== void 0 && o.visibleDistance !== "unLimited" && h(f, o.visibleDistance) === !1)
|
|
@@ -97,12 +97,12 @@ class Ue extends S {
|
|
|
97
97
|
reason: `distance is not in visibleDistance. distance: ${f}, visibleDistance: ${o.visibleDistance}`
|
|
98
98
|
};
|
|
99
99
|
if (o.intersectRaycaster !== !1 && (typeof o.intersectRaycaster != "object" || o.intersectRaycaster.enabled !== !1)) {
|
|
100
|
-
if (
|
|
100
|
+
if (s === void 0)
|
|
101
101
|
return {
|
|
102
102
|
value: !1,
|
|
103
|
-
reason: `intersectRaycaster check failed: fivePanoIndex is ${
|
|
103
|
+
reason: `intersectRaycaster check failed: fivePanoIndex is ${s}`
|
|
104
104
|
};
|
|
105
|
-
const r = this.getRaycasterFromPanoIndex(e,
|
|
105
|
+
const r = this.getRaycasterFromPanoIndex(e, s);
|
|
106
106
|
if (!r)
|
|
107
107
|
return { value: !1, reason: `intersectRaycaster check failed: raycaster is ${r}` };
|
|
108
108
|
const a = this.getTagEnableByIntersect(e, r);
|
|
@@ -119,19 +119,19 @@ class Ue extends S {
|
|
|
119
119
|
reason: "all check passed"
|
|
120
120
|
};
|
|
121
121
|
})();
|
|
122
|
-
return
|
|
122
|
+
return n.visible = i.value, n.__debug_visible_reason__ = i, n.visible;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
getVisibleByFiveMode(e, t) {
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
if (typeof
|
|
129
|
-
const i =
|
|
130
|
-
return i ? i != null && i.includes(
|
|
131
|
-
} else if (typeof
|
|
126
|
+
const n = t != null ? t : this.five.getCurrentState().mode, s = this.getTagConfig(e).visibleConfig;
|
|
127
|
+
if (s) {
|
|
128
|
+
if (typeof s == "object") {
|
|
129
|
+
const i = s == null ? void 0 : s.visibleFiveMode;
|
|
130
|
+
return i ? i != null && i.includes(n) ? s.followModelVisibility === !0 && (n === "Floorplan" || n === "Mapview") ? this.getVisibleByFloorIndex(e) : !0 : !1 : n === "Panorama";
|
|
131
|
+
} else if (typeof s == "function")
|
|
132
132
|
return t === "Panorama";
|
|
133
133
|
} else
|
|
134
|
-
return
|
|
134
|
+
return n === "Panorama";
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
137
|
* @description 获取标签当前状态
|
|
@@ -142,21 +142,21 @@ class Ue extends S {
|
|
|
142
142
|
return (t = this.state.visible && e.state.visible) != null ? t : !0;
|
|
143
143
|
}
|
|
144
144
|
getVisible(e) {
|
|
145
|
-
const t = this.five.getCurrentState(),
|
|
146
|
-
return
|
|
145
|
+
const t = this.five.getCurrentState(), n = this.getVisibleByFiveMode(e), s = t.mode === "Panorama" ? this.getVisibleByPanoIndex(e, t.panoIndex) : !0;
|
|
146
|
+
return n && s;
|
|
147
147
|
}
|
|
148
148
|
/** 获取当前点位上模型中的多媒体是否应该展示 */
|
|
149
149
|
getModelMedialVisibleByPanoIndex(e) {
|
|
150
150
|
if (!this.getCurrentVisibleState(e))
|
|
151
151
|
return !1;
|
|
152
|
-
const t = this.five.getCurrentState().panoIndex,
|
|
153
|
-
if (
|
|
154
|
-
return
|
|
155
|
-
const
|
|
156
|
-
if (!
|
|
152
|
+
const t = this.five.getCurrentState().panoIndex, n = this.getCache({ panoIndex: t, id: e.id });
|
|
153
|
+
if (n.modelMedialVisible !== void 0)
|
|
154
|
+
return n.modelMedialVisible;
|
|
155
|
+
const s = this.getRaycasterFromPanoIndex(e, t);
|
|
156
|
+
if (!s)
|
|
157
157
|
return !1;
|
|
158
|
-
const i = this.getTagEnableByIntersect(e,
|
|
159
|
-
return
|
|
158
|
+
const i = this.getTagEnableByIntersect(e, s);
|
|
159
|
+
return n.modelMedialVisible = i.value, n.__debug_visible_reason__ = i, i.value !== !1;
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
162
|
* @description: 获取是否展开
|
|
@@ -164,9 +164,9 @@ class Ue extends S {
|
|
|
164
164
|
getUnfoldedByPanoIndex(e, t) {
|
|
165
165
|
if (!this.getVisibleByPanoIndex(e))
|
|
166
166
|
return;
|
|
167
|
-
const
|
|
168
|
-
if (
|
|
169
|
-
return
|
|
167
|
+
const s = this.getCache({ panoIndex: t, id: e.id });
|
|
168
|
+
if (s.unfolded !== void 0)
|
|
169
|
+
return s.unfolded;
|
|
170
170
|
{
|
|
171
171
|
const i = this.getTagConfig(e).unfoldedConfig;
|
|
172
172
|
if (!i)
|
|
@@ -182,9 +182,9 @@ class Ue extends S {
|
|
|
182
182
|
if (i.unfoldDistance && h(c, i.unfoldDistance) === !1)
|
|
183
183
|
return !1;
|
|
184
184
|
})();
|
|
185
|
-
|
|
185
|
+
s.unfolded = o;
|
|
186
186
|
const f = this.getUnfoldedByCamera(e);
|
|
187
|
-
return f !== void 0 ? f :
|
|
187
|
+
return f !== void 0 ? f : s.unfolded;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
@@ -193,10 +193,10 @@ class Ue extends S {
|
|
|
193
193
|
getUnfoldedByCamera(e) {
|
|
194
194
|
return this.getVisible(e) ? (() => {
|
|
195
195
|
var o;
|
|
196
|
-
const
|
|
196
|
+
const s = this.getDistance(e), i = this.getTagConfig(e).unfoldedConfig;
|
|
197
197
|
if (i) {
|
|
198
198
|
if (typeof i == "function")
|
|
199
|
-
return i(this.five, { tag: e, distance:
|
|
199
|
+
return i(this.five, { tag: e, distance: s });
|
|
200
200
|
if (i.keep === "folded")
|
|
201
201
|
return !1;
|
|
202
202
|
if (i.keep === "unfolded")
|
|
@@ -230,9 +230,15 @@ class Ue extends S {
|
|
|
230
230
|
})() : void 0;
|
|
231
231
|
}
|
|
232
232
|
sort(e) {
|
|
233
|
-
return e.sort((t,
|
|
234
|
-
const
|
|
235
|
-
return
|
|
233
|
+
return e.sort((t, n) => {
|
|
234
|
+
const s = this.getDistance(t), i = this.getDistance(n);
|
|
235
|
+
return s === void 0 || i === void 0 ? 0 : i - s;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
setTagZIndex(e) {
|
|
239
|
+
return e.forEach((t) => {
|
|
240
|
+
const n = this.getDistance(t);
|
|
241
|
+
t.zIndex = Math.round((n != null ? n : 0) * 100);
|
|
236
242
|
});
|
|
237
243
|
}
|
|
238
244
|
/**
|
|
@@ -241,17 +247,17 @@ class Ue extends S {
|
|
|
241
247
|
setPointTagPosition() {
|
|
242
248
|
const e = this.filterPointTag;
|
|
243
249
|
e.length !== 0 && e.forEach((t) => {
|
|
244
|
-
var
|
|
245
|
-
if (!((
|
|
250
|
+
var s;
|
|
251
|
+
if (!((s = t.state) != null && s.visible)) {
|
|
246
252
|
t.screenPosition = null;
|
|
247
253
|
return;
|
|
248
254
|
}
|
|
249
|
-
const
|
|
250
|
-
if (!
|
|
255
|
+
const n = this.getTagProject(t);
|
|
256
|
+
if (!n) {
|
|
251
257
|
t.screenPosition = null;
|
|
252
258
|
return;
|
|
253
259
|
}
|
|
254
|
-
t.screenPosition = { leftPercent: (
|
|
260
|
+
t.screenPosition = { leftPercent: (n.x + 1) / 2 * 100, topPercent: (-n.y + 1) / 2 * 100 };
|
|
255
261
|
});
|
|
256
262
|
}
|
|
257
263
|
setVisible() {
|
|
@@ -269,23 +275,23 @@ class Ue extends S {
|
|
|
269
275
|
setModelMedialVisible() {
|
|
270
276
|
const e = this.five.getCurrentState().mode;
|
|
271
277
|
this.tags.forEach((t) => {
|
|
272
|
-
var
|
|
278
|
+
var s;
|
|
273
279
|
if (!y(t))
|
|
274
280
|
return;
|
|
275
|
-
if (!((
|
|
281
|
+
if (!((s = t.model) != null && s.object)) {
|
|
276
282
|
t.mediaVisible = !1;
|
|
277
283
|
return;
|
|
278
284
|
}
|
|
279
|
-
const
|
|
280
|
-
t.mediaVisible =
|
|
285
|
+
const n = e === "Panorama" ? this.getModelMedialVisibleByPanoIndex(t) : !0;
|
|
286
|
+
t.mediaVisible = n;
|
|
281
287
|
});
|
|
282
288
|
}
|
|
283
289
|
setUnfoldedByPanoIndex() {
|
|
284
290
|
this.tags.forEach((e) => {
|
|
285
291
|
const t = this.getUnfoldedByPanoIndex(e);
|
|
286
292
|
if (e.state && (t !== void 0 && (e.state.unfolded = t), t && !e.state.visible)) {
|
|
287
|
-
const
|
|
288
|
-
typeof
|
|
293
|
+
const n = this.getTagConfig(e);
|
|
294
|
+
typeof n.unfoldedConfig == "object" && n.unfoldedConfig.autoFoldWhenHide !== !1 && (e.state.unfolded = !1);
|
|
289
295
|
}
|
|
290
296
|
});
|
|
291
297
|
}
|
|
@@ -295,17 +301,17 @@ class Ue extends S {
|
|
|
295
301
|
getTagProject(e) {
|
|
296
302
|
if (!this.getVisible(e))
|
|
297
303
|
return;
|
|
298
|
-
const
|
|
299
|
-
if (!
|
|
304
|
+
const n = V(e.position);
|
|
305
|
+
if (!n)
|
|
300
306
|
return;
|
|
301
|
-
const { x:
|
|
307
|
+
const { x: s, y: i, z: o } = n.project(this.five.camera);
|
|
302
308
|
if (!(o > 1))
|
|
303
|
-
return { x:
|
|
309
|
+
return { x: s, y: i, z: o };
|
|
304
310
|
}
|
|
305
311
|
/** 通过射线检测标签可用性 */
|
|
306
312
|
getTagEnableByIntersect(e, t) {
|
|
307
313
|
var u, v, r;
|
|
308
|
-
const
|
|
314
|
+
const n = (u = this.getTagConfig(e).visibleConfig) != null ? u : {}, s = this.getDistance(e), [i] = this.five.model.intersectRaycaster(t), o = (() => {
|
|
309
315
|
if (!y(e))
|
|
310
316
|
return;
|
|
311
317
|
const a = this.tags.filter(y).map((b) => {
|
|
@@ -315,34 +321,34 @@ class Ue extends S {
|
|
|
315
321
|
return t.intersectObjects(a, !0)[0];
|
|
316
322
|
})(), f = (() => {
|
|
317
323
|
var a;
|
|
318
|
-
return typeof
|
|
324
|
+
return typeof n == "object" && typeof n.intersectRaycaster == "object" && (a = n.intersectRaycaster.distanceAccuracy) != null ? a : 0.01;
|
|
319
325
|
})(), c = Math.min((v = i == null ? void 0 : i.distance) != null ? v : 1 / 0, (r = o == null ? void 0 : o.distance) != null ? r : 1 / 0);
|
|
320
|
-
return c + f <
|
|
326
|
+
return c + f < s ? {
|
|
321
327
|
value: !1,
|
|
322
|
-
reason: `intersectRaycaster check failed: distance is ${
|
|
328
|
+
reason: `intersectRaycaster check failed: distance is ${s}, intersection.distance is ${i == null ? void 0 : i.distance}, intersection.point is ${i == null ? void 0 : i.point.toArray()},
|
|
323
329
|
customModelIntersection.point is ${o == null ? void 0 : o.point.toArray()}, minIntersectionDistance is ${c}`
|
|
324
330
|
} : { value: !0, reason: "" };
|
|
325
331
|
}
|
|
326
332
|
/** 获取点位看向标签的射线 */
|
|
327
333
|
getRaycasterFromPanoIndex(e, t) {
|
|
328
334
|
var o;
|
|
329
|
-
const
|
|
330
|
-
if (
|
|
331
|
-
throw new Error(`getVisible(): observerPosition is ${
|
|
332
|
-
const
|
|
333
|
-
if (!
|
|
335
|
+
const n = (o = this.five.work.observers[t]) == null ? void 0 : o.position;
|
|
336
|
+
if (n === void 0)
|
|
337
|
+
throw new Error(`getVisible(): observerPosition is ${n}`);
|
|
338
|
+
const s = V(e.position);
|
|
339
|
+
if (!s)
|
|
334
340
|
return;
|
|
335
|
-
const i =
|
|
336
|
-
return this.raycaster.set(
|
|
341
|
+
const i = s.sub(n).normalize();
|
|
342
|
+
return this.raycaster.set(n, i), this.raycaster;
|
|
337
343
|
}
|
|
338
344
|
/** 检测是否匹配当前楼层 */
|
|
339
345
|
getVisibleByFloorIndex(e) {
|
|
340
346
|
var i, o, f, c, u, v, r;
|
|
341
347
|
let t = 0;
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
const
|
|
345
|
-
return
|
|
348
|
+
const n = (i = e.fiveState) == null ? void 0 : i.panoIndex;
|
|
349
|
+
n !== void 0 ? t = (o = this.five.work.observers[n]) == null ? void 0 : o.floorIndex : t = E(this.five.work.observers, (r = (v = (c = (f = e.model) == null ? void 0 : f.object) == null ? void 0 : c.position) != null ? v : (u = e.mediaPlane) == null ? void 0 : u.position) != null ? r : k(e));
|
|
350
|
+
const s = this.five.model.shownFloor;
|
|
351
|
+
return s === null || s === t;
|
|
346
352
|
}
|
|
347
353
|
}
|
|
348
354
|
export {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { TagComputer } from './TagComputer';
|
|
2
|
-
import type { Tag, TagInstance, TagGLTFObject, TagObjectGroup, TagGLTFObjectGroup, ImagePlaneGroup, TagContentType } from '../typings';
|
|
2
|
+
import type { Tag, TagInstance, TagGLTFObject, TagObjectGroup, TagGLTFObjectGroup, ImagePlaneGroup, TagContentType, ElementRenderer, TagRendererMap } from '../typings';
|
|
3
3
|
import type { TemporaryState } from '../typings';
|
|
4
4
|
import { type Object3D } from 'three';
|
|
5
5
|
import TagContainerSvelte from '../Components/TagContainer.svelte';
|
|
6
6
|
import type { Five } from '@realsee/five';
|
|
7
7
|
export declare abstract class TagRender extends TagComputer {
|
|
8
8
|
protected group: TagObjectGroup;
|
|
9
|
+
protected renderMap: TagRendererMap;
|
|
9
10
|
protected imagePlaneGroup: ImagePlaneGroup;
|
|
10
11
|
protected gltfObjectGroup: TagGLTFObjectGroup;
|
|
11
12
|
/** 维护一个可用模型表,用于快速删除不应该在场景中的模型 */
|
|
@@ -15,6 +16,15 @@ export declare abstract class TagRender extends TagComputer {
|
|
|
15
16
|
/** 点标签 */
|
|
16
17
|
protected TagContainerSvelte?: TagContainerSvelte;
|
|
17
18
|
constructor(five: Five);
|
|
19
|
+
/**
|
|
20
|
+
* @description: 设置 contentType 的渲染器
|
|
21
|
+
* @param {string} contentType
|
|
22
|
+
* 如果是 `TagContentType` 中的类型,将会覆盖掉插件内部默认的渲染器,
|
|
23
|
+
* 如果是其他任意 str
|
|
24
|
+
* ing 如:'Foo',则可以将类似 `{id: 1, contentType: 'Foo', position: [0,0,0]}` 的 tag 交给插件渲染
|
|
25
|
+
* @note 优先级低于 tag.element
|
|
26
|
+
*/
|
|
27
|
+
registerRenderer(contentType: string, renderer: ElementRenderer): void;
|
|
18
28
|
clearTags(): void;
|
|
19
29
|
/**
|
|
20
30
|
* @description: 更新所有标签
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var R = Object.defineProperty;
|
|
2
|
-
var k = (
|
|
3
|
-
var
|
|
4
|
-
var C = (
|
|
2
|
+
var k = (b, h, t) => h in b ? R(b, h, { enumerable: !0, configurable: !0, writable: !0, value: t }) : b[h] = t;
|
|
3
|
+
var f = (b, h, t) => (k(b, typeof h != "symbol" ? h + "" : h, t), t);
|
|
4
|
+
var C = (b, h, t) => new Promise((e, o) => {
|
|
5
5
|
var i = (r) => {
|
|
6
6
|
try {
|
|
7
7
|
a(t.next(r));
|
|
@@ -15,16 +15,16 @@ var C = (f, h, t) => new Promise((e, o) => {
|
|
|
15
15
|
o(s);
|
|
16
16
|
}
|
|
17
17
|
}, a = (r) => r.done ? e(r.value) : Promise.resolve(r.value).then(i, n);
|
|
18
|
-
a((t = t.apply(
|
|
18
|
+
a((t = t.apply(b, h)).next());
|
|
19
19
|
});
|
|
20
|
-
import { TagComputer as
|
|
21
|
-
import { Group as S, Quaternion as
|
|
20
|
+
import { TagComputer as w } from "./TagComputer.js";
|
|
21
|
+
import { Group as S, Quaternion as E, Vector3 as v, Matrix4 as D } from "three";
|
|
22
22
|
import O from "../Components/TagContainer.js";
|
|
23
23
|
import A from "../Components/Tag/index.js";
|
|
24
24
|
import { arrayPositionToVector3 as y } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
25
25
|
import { centerPoint as x } from "../../shared-utils/three/centerPoint.js";
|
|
26
|
-
import { isMediaModelTag as P, isStickModelTag as
|
|
27
|
-
import { CSS3DRenderPlugin as
|
|
26
|
+
import { isMediaModelTag as P, isStickModelTag as I } from "../utils/tag/tagCheck.js";
|
|
27
|
+
import { CSS3DRenderPlugin as G } from "../../CSS3DRenderPlugin/index.js";
|
|
28
28
|
import { loadGLTF as V } from "../../shared-utils/three/GLTFLoader.js";
|
|
29
29
|
import { VideoPlane as M, ImagePlane as j } from "../utils/model/mediaPlane.js";
|
|
30
30
|
import "../utils/tagPosition.js";
|
|
@@ -140,20 +140,21 @@ import "../../CSS3DRenderPlugin/Controller.js";
|
|
|
140
140
|
import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
141
141
|
import "@realsee/five/gltf-loader";
|
|
142
142
|
const F = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map();
|
|
143
|
-
class ei extends
|
|
143
|
+
class ei extends w {
|
|
144
144
|
constructor(t) {
|
|
145
145
|
super(t);
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
f(this, "group", new S());
|
|
147
|
+
f(this, "renderMap", /* @__PURE__ */ new Map());
|
|
148
|
+
f(this, "imagePlaneGroup", new S());
|
|
149
|
+
f(this, "gltfObjectGroup", new S());
|
|
149
150
|
/** 维护一个可用模型表,用于快速删除不应该在场景中的模型 */
|
|
150
|
-
|
|
151
|
+
f(this, "enabledModelTagSet", /* @__PURE__ */ new Set());
|
|
151
152
|
/** 临时状态 */
|
|
152
|
-
|
|
153
|
+
f(this, "temporaryState", { visible: !0 });
|
|
153
154
|
/** 点标签 */
|
|
154
|
-
|
|
155
|
+
f(this, "TagContainerSvelte");
|
|
155
156
|
/** 加载外部模型 */
|
|
156
|
-
|
|
157
|
+
f(this, "loadModel", (t) => C(this, null, function* () {
|
|
157
158
|
var a;
|
|
158
159
|
const e = t.data.modelUrl;
|
|
159
160
|
if (!e)
|
|
@@ -190,6 +191,17 @@ class ei extends E {
|
|
|
190
191
|
}));
|
|
191
192
|
this.group.name = "PanoTagPluginModelGroup", this.gltfObjectGroup.name = "PanoTagPluginGLTFObjectGroup", this.imagePlaneGroup.name = "ImagePlaneGroup", this.group.add(this.gltfObjectGroup), this.group.add(this.imagePlaneGroup);
|
|
192
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* @description: 设置 contentType 的渲染器
|
|
196
|
+
* @param {string} contentType
|
|
197
|
+
* 如果是 `TagContentType` 中的类型,将会覆盖掉插件内部默认的渲染器,
|
|
198
|
+
* 如果是其他任意 str
|
|
199
|
+
* ing 如:'Foo',则可以将类似 `{id: 1, contentType: 'Foo', position: [0,0,0]}` 的 tag 交给插件渲染
|
|
200
|
+
* @note 优先级低于 tag.element
|
|
201
|
+
*/
|
|
202
|
+
registerRenderer(t, e) {
|
|
203
|
+
this.renderMap.set(t, { renderer: e });
|
|
204
|
+
}
|
|
193
205
|
clearTags() {
|
|
194
206
|
this.tags.forEach((t) => {
|
|
195
207
|
var e, o;
|
|
@@ -246,14 +258,14 @@ class ei extends E {
|
|
|
246
258
|
if (e.tag3DContentSvelte) {
|
|
247
259
|
const { svelteApp: r, css3DInstance: s, initialNormal: u, currentNormal: p } = e.tag3DContentSvelte;
|
|
248
260
|
if (r.$set({ tag: e, hooks: this.hooks, state: this.state, temporaryState: this.temporaryState }), !u.equals(p)) {
|
|
249
|
-
const m = new
|
|
261
|
+
const m = new E().setFromUnitVectors(u, p);
|
|
250
262
|
s.css3DObject.setRotationFromQuaternion(m);
|
|
251
263
|
}
|
|
252
264
|
return;
|
|
253
265
|
} else {
|
|
254
266
|
if (P(e) && !((o = e.model) != null && o.object) || ((i = e.state) == null ? void 0 : i.visible) === !1 || !this.state.visible || !this.state.enabled)
|
|
255
267
|
return;
|
|
256
|
-
if (this.css3DRenderPlugin || (this.css3DRenderPlugin =
|
|
268
|
+
if (this.css3DRenderPlugin || (this.css3DRenderPlugin = G(this.five)), e.stickType === "3DPoint" && !e.normal)
|
|
257
269
|
return console.error("updateRenderPlaneTag: 三维点标签缺少法向量!");
|
|
258
270
|
const r = this.getPositions(e);
|
|
259
271
|
if (!r)
|
|
@@ -346,7 +358,7 @@ class ei extends E {
|
|
|
346
358
|
/** 添加模型标签 */
|
|
347
359
|
addMediaModelTag(t) {
|
|
348
360
|
return C(this, null, function* () {
|
|
349
|
-
const e = t.filter(
|
|
361
|
+
const e = t.filter(I).map((o) => this.loadModel(o));
|
|
350
362
|
yield Promise.all(e), this.setModelMedialVisible(), this.updateRenderAllTags();
|
|
351
363
|
});
|
|
352
364
|
}
|
|
@@ -355,8 +367,8 @@ class ei extends E {
|
|
|
355
367
|
*/
|
|
356
368
|
updateRenderPointTag() {
|
|
357
369
|
var e;
|
|
358
|
-
const t = this.
|
|
359
|
-
if (this.setPointTagPosition(), this.TagContainerSvelte)
|
|
370
|
+
const t = this.filterPointTag;
|
|
371
|
+
if (this.setTagZIndex(t), this.setPointTagPosition(), this.TagContainerSvelte)
|
|
360
372
|
this.TagContainerSvelte.$set({ tags: t, state: this.state, temporaryState: this.temporaryState });
|
|
361
373
|
else {
|
|
362
374
|
const o = (e = this.five.getElement()) == null ? void 0 : e.parentElement;
|
|
@@ -364,7 +376,14 @@ class ei extends E {
|
|
|
364
376
|
return console.error("updateRenderPlaneTag: tag2DContainer not found");
|
|
365
377
|
this.TagContainerSvelte = new O({
|
|
366
378
|
target: o,
|
|
367
|
-
props: {
|
|
379
|
+
props: {
|
|
380
|
+
hooks: this.hooks,
|
|
381
|
+
tags: t,
|
|
382
|
+
state: this.state,
|
|
383
|
+
temporaryState: this.temporaryState,
|
|
384
|
+
mediaStore: this.mediaStore,
|
|
385
|
+
renderMap: this.renderMap
|
|
386
|
+
}
|
|
368
387
|
});
|
|
369
388
|
}
|
|
370
389
|
}
|
|
@@ -6,7 +6,7 @@ import * as P from "three";
|
|
|
6
6
|
import { DefaultConfig as C } from "../tag.config.js";
|
|
7
7
|
import { anyPositionToVector3 as w, arrayPositionToVector3 as h } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
8
8
|
import { planeNormal as p } from "../utils/planeNormal.js";
|
|
9
|
-
import { tagPosition as
|
|
9
|
+
import { tagPosition as M, getTagPosition as E } from "../utils/tagPosition.js";
|
|
10
10
|
import { normalPositionToPositions as k } from "../utils/normalPositionToPositions.js";
|
|
11
11
|
import { TagCache as b } from "./TagCache.js";
|
|
12
12
|
import { writable as I } from "../../vendor/svelte/store/index.js";
|
|
@@ -112,7 +112,7 @@ class Pe extends b {
|
|
|
112
112
|
}
|
|
113
113
|
if (f.length === 2) {
|
|
114
114
|
const [s = "Any", n = "Any"] = f;
|
|
115
|
-
(e.stickType === s || s === "Any") && (e.contentType === n || n === "Any") && (i[r] = this.config.contentTypeConfig[r]);
|
|
115
|
+
s === "Mixin" && e.contentType === n && (i[r] = this.config.contentTypeConfig[r]), (e.stickType === s || s === "Any") && (e.contentType === n || n === "Any") && (i[r] = this.config.contentTypeConfig[r]);
|
|
116
116
|
}
|
|
117
117
|
if (f.length === 3) {
|
|
118
118
|
const [s = "Any", n, m] = f;
|
|
@@ -188,7 +188,7 @@ class Pe extends b {
|
|
|
188
188
|
const f = (() => e.stickType === "3DPoint" ? w(e.normal) : p(e.position))();
|
|
189
189
|
if (!f)
|
|
190
190
|
return;
|
|
191
|
-
const s =
|
|
191
|
+
const s = M(e.position);
|
|
192
192
|
if (!s)
|
|
193
193
|
return;
|
|
194
194
|
const n = new P.Vector3().copy(r).sub(s), m = f.angleTo(n) * 180 / Math.PI;
|
|
@@ -210,7 +210,7 @@ class Pe extends b {
|
|
|
210
210
|
const r = (a = (d = this.five.work) == null ? void 0 : d.observers[t]) == null ? void 0 : a.position;
|
|
211
211
|
if (r === void 0)
|
|
212
212
|
throw new Error(`getDistance(): observerPosition is ${r}`);
|
|
213
|
-
const f =
|
|
213
|
+
const f = E(e);
|
|
214
214
|
if (!f)
|
|
215
215
|
return -1;
|
|
216
216
|
const s = r.distanceTo(f);
|
|
@@ -10,7 +10,7 @@ var v = (h, a, e) => a in h ? E(h, a, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
I.call(a, e) && v(h, e, a[e]);
|
|
11
11
|
return h;
|
|
12
12
|
}, u = (h, a) => F(h, w(a));
|
|
13
|
-
var
|
|
13
|
+
var m = (h, a, e) => (v(h, typeof a != "symbol" ? a + "" : a, e), e);
|
|
14
14
|
var p = (h, a, e) => new Promise((t, i) => {
|
|
15
15
|
var s = (r) => {
|
|
16
16
|
try {
|
|
@@ -33,9 +33,9 @@ import { objectAssignDeepExports as c } from "../../vendor/object-assign-deep/ob
|
|
|
33
33
|
import { arrayPositionToVector3 as A } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
34
34
|
import { addDebugPoints as R } from "../utils/addDebugPoints.js";
|
|
35
35
|
import { isMediaModelTag as y, isModelTag as O } from "../utils/tag/tagCheck.js";
|
|
36
|
-
import { waitFiveModelLoaded as
|
|
36
|
+
import { waitFiveModelLoaded as k } from "../utils/actionAfterFiveModelLoad.js";
|
|
37
37
|
import { debounce as D } from "../utils/debounce.js";
|
|
38
|
-
import { throttle as
|
|
38
|
+
import { throttle as _ } from "../utils/throttle.js";
|
|
39
39
|
import { resizeObserver as S } from "../utils/resizeObserver.js";
|
|
40
40
|
import L from "../utils/tag/format.js";
|
|
41
41
|
import { generateBlankAudio as G, AudioNamespace as V } from "../../shared-utils/audio.js";
|
|
@@ -163,23 +163,23 @@ class ci extends N {
|
|
|
163
163
|
constructor(e, t) {
|
|
164
164
|
super(e);
|
|
165
165
|
/** state */
|
|
166
|
-
|
|
166
|
+
m(this, "state", { enabled: !0, visible: !0 });
|
|
167
167
|
/** 插件参数 */
|
|
168
|
-
|
|
168
|
+
m(this, "params");
|
|
169
169
|
/** debug */
|
|
170
|
-
|
|
170
|
+
m(this, "debug");
|
|
171
171
|
/** 更改 tag 模型 */
|
|
172
|
-
|
|
172
|
+
m(this, "changeTagModel", (e, t) => p(this, null, function* () {
|
|
173
173
|
e.data = c({}, e.data, t), yield this.loadModel(e), this.updateRenderAllTags();
|
|
174
174
|
}));
|
|
175
|
-
|
|
175
|
+
m(this, "handleFiveInitAnimationEnded", () => {
|
|
176
176
|
const e = this.five.getCurrentState().mode;
|
|
177
177
|
this.tags.forEach((t) => {
|
|
178
178
|
y(t) && e === "Panorama" && this.changeTagMode(t, "front"), t.state.visible = this.getVisible(t);
|
|
179
179
|
}), this.updateRenderAllTags();
|
|
180
180
|
});
|
|
181
181
|
/** 楼层切换时,需要更新标签可见性 */
|
|
182
|
-
|
|
182
|
+
m(this, "handleFiveModelShownFloorChange", () => {
|
|
183
183
|
this.tags.forEach((e) => {
|
|
184
184
|
var i, s;
|
|
185
185
|
const t = this.getTagConfig(e).visibleConfig;
|
|
@@ -236,10 +236,11 @@ class ci extends N {
|
|
|
236
236
|
fold: () => this.changeUnfoldedById(o.id, !1),
|
|
237
237
|
enable: () => this.changeEnabledById(o.id, !0),
|
|
238
238
|
disable: () => this.changeEnabledById(o.id, !1),
|
|
239
|
-
destroy: () => this.destroyTagById(o.id)
|
|
239
|
+
destroy: () => this.destroyTagById(o.id),
|
|
240
|
+
changeData: (g) => this.changeDataById(o.id, g)
|
|
240
241
|
});
|
|
241
242
|
}).filter((o) => o.position);
|
|
242
|
-
return s.forEach(L), this.tags.push(...s),
|
|
243
|
+
return s.forEach(L), this.tags.push(...s), k(this.five).then(() => p(this, null, function* () {
|
|
243
244
|
var o, n, r;
|
|
244
245
|
this.store.eventListenerDisposer && ((n = (o = this.store).eventListenerDisposer) == null || n.call(o)), this.state.enabled && this.handleEnable(), this.addResizeListener(), this.clearUnusedPanelTag(), this.setVisibleAndUnfolded({ withAnimation: (r = t == null ? void 0 : t.withAnimation) != null ? r : !0 }).then(() => this.updateRenderAllTags()), this.updateRenderAllTags(), yield this.addMediaModelTag(s);
|
|
245
246
|
}));
|
|
@@ -336,7 +337,8 @@ class ci extends N {
|
|
|
336
337
|
*/
|
|
337
338
|
changeDataById(e, t, i = !0) {
|
|
338
339
|
const s = this.getTagById(e);
|
|
339
|
-
|
|
340
|
+
let o = !1;
|
|
341
|
+
s && (s.data && (o = !0), i ? s.data = c({}, s.data, t) : s.data = f(f({}, s.data), t), this.clearUnusedPanelTag(), this.updateRenderAllTags(), o && s.hooks.emit("dataChanged", s.data));
|
|
340
342
|
}
|
|
341
343
|
/**
|
|
342
344
|
* @description: 改变tag的stickType
|
|
@@ -349,7 +351,8 @@ class ci extends N {
|
|
|
349
351
|
*/
|
|
350
352
|
changeTagById(e, t, i = !0) {
|
|
351
353
|
const s = this.getTagById(e);
|
|
352
|
-
|
|
354
|
+
let o = !1;
|
|
355
|
+
t && (t.data && (o = !0), i ? c(s, t) : Object.assign(s, t), s != null && s.tag3DContentSvelte && (t != null && t.normal) && (s.tag3DContentSvelte.currentNormal = A(t.normal)), this.updateRenderAllTags(), this.clearUnusedPanelTag(), o && s.hooks.emit("dataChanged", s.data));
|
|
353
356
|
}
|
|
354
357
|
/**
|
|
355
358
|
* @description: 销毁tag
|
|
@@ -396,8 +399,8 @@ class ci extends N {
|
|
|
396
399
|
* @description: 添加 cameraUpdate, panoArrived 等事件监听
|
|
397
400
|
*/
|
|
398
401
|
addEventListener() {
|
|
399
|
-
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), d = this.loadVideoFirstFrame.bind(this), l = this.clickhandler.bind(this),
|
|
400
|
-
return
|
|
402
|
+
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), d = this.loadVideoFirstFrame.bind(this), l = this.clickhandler.bind(this), g = this.five.currentMode;
|
|
403
|
+
return g && this.handleFiveModeChange(g), 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", d), t.on("click", l), () => {
|
|
401
404
|
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", d), t.off("click", l), this.store.eventListenerDisposer = void 0;
|
|
402
405
|
};
|
|
403
406
|
}
|
|
@@ -417,7 +420,7 @@ class ci extends N {
|
|
|
417
420
|
}, i = () => {
|
|
418
421
|
this.state.enabled && this.hide();
|
|
419
422
|
}, { observe: s, unobserve: o } = S(
|
|
420
|
-
|
|
423
|
+
_(() => {
|
|
421
424
|
this.store.resizeObserverDisposer && i();
|
|
422
425
|
}, 500),
|
|
423
426
|
e
|
|
@@ -493,10 +496,10 @@ class ci extends N {
|
|
|
493
496
|
o.position.copy(n.position), o.quaternion.copy(n.quaternion);
|
|
494
497
|
const r = this.five.camera.position;
|
|
495
498
|
o.lookAt(r.clone().setY(o.position.y));
|
|
496
|
-
const d = n.quaternion.clone(), l = o.quaternion.clone(),
|
|
497
|
-
|
|
499
|
+
const d = n.quaternion.clone(), l = o.quaternion.clone(), g = x();
|
|
500
|
+
g.onUpdate(({ progress: P }) => {
|
|
498
501
|
n.quaternion.copy(d.clone().slerp(l, P));
|
|
499
|
-
}),
|
|
502
|
+
}), g.play();
|
|
500
503
|
}), this.store.visibleWithAnimation = !0, this.updateTagContainerVisible(), this.updateRenderAllTags();
|
|
501
504
|
});
|
|
502
505
|
}
|