@realsee/dnalogel 2.28.0-dev.1 → 2.28.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaMakerPlugin/Controller.d.ts +94 -0
- package/dist/AreaMakerPlugin/index.d.ts +4 -0
- package/dist/AreaMakerPlugin/typing.d.ts +148 -0
- package/dist/AreaMakerPlugin/utils/Item.d.ts +115 -0
- package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -5
- package/dist/PanoTagPlugin/typings/tag/Tag.d.ts +1 -1
- package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +2 -4
- package/dist/PanoTagPlugin/typings/tag/TagData.d.ts +2 -0
- package/dist/base/BasePluginWithData.d.ts +1 -1
- package/dist/components/AreaLabel/Assets/roomLabelBg.d.ts +1 -0
- package/dist/floorplan/index.d.ts +0 -1
- package/dist/floorplan/utils/correctFiveState.d.ts +2 -0
- package/dist/index.cjs.js +67 -67
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6901 -7187
- package/dist/index.umd.js +60 -60
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/math/planimetry.d.ts +1 -1
- package/dist/shared-utils/three/core/Object3D.d.ts +8 -0
- package/dist/shared-utils/three/index.d.ts +2 -0
- package/dist/shared-utils/three/loadVideoTexture.d.ts +1 -1
- package/dist/shared-utils/three/objects/LineSegments.d.ts +9 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/AreaMakerPluginPluginType.AreaMakerController.html +711 -0
- package/docs/classes/AreaMakerPluginPluginType.AreaMakerItem.html +671 -0
- package/docs/classes/CSS3DRender.html +33 -34
- package/docs/classes/CruisePluginController.html +29 -30
- package/docs/classes/GuideLineItem.GuideLineItem.html +22 -23
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +37 -38
- package/docs/classes/Magnifier.html +22 -23
- package/docs/classes/ModelRoomLabelController.html +13 -14
- package/docs/classes/Object3DHelperController.html +27 -28
- package/docs/classes/PaintBrush.html +17 -18
- package/docs/classes/PanoMeasurePluginLine.html +29 -30
- package/docs/classes/PanoMeasurePluginModel.html +29 -30
- package/docs/classes/PanoMeasurePluginPoint.html +13 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +29 -30
- package/docs/classes/PanoTagPluginController.html +52 -53
- package/docs/classes/Util.BetterTween.html +13 -11
- package/docs/classes/Util.Interval.html +16 -14
- package/docs/classes/Util.LineSegments.html +379 -0
- package/docs/classes/Util.Magnifier.html +24 -22
- package/docs/classes/Util.Object3D.html +401 -0
- package/docs/classes/Util.PointDomHelper.html +15 -13
- package/docs/classes/Util.PointHelper.html +15 -13
- package/docs/classes/Util.PointSelectorHelper.html +20 -18
- package/docs/classes/Util.Rectangle.html +17 -15
- package/docs/enums/CameraMovementEffect.html +9 -10
- package/docs/enums/ContentType.html +22 -23
- package/docs/enums/DIRECTION.html +11 -12
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +11 -12
- package/docs/enums/DimensionType.html +9 -10
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +10 -11
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +11 -12
- package/docs/enums/PaintBrushTypeEnum.html +10 -11
- package/docs/enums/PointType.html +9 -10
- package/docs/enums/Rotation.html +10 -11
- package/docs/functions/{FloorplanRoomsPlugin.html → AreaMakerPluginPlugin.html} +12 -13
- package/docs/functions/CSS3DRenderPlugin.html +6 -7
- package/docs/functions/CameraMovementPlugin.html +6 -7
- package/docs/functions/CruisePlugin.html +7 -8
- package/docs/functions/GuideLinePlugin.html +7 -8
- package/docs/functions/ItemLabelPlugin.html +6 -7
- package/docs/functions/MapviewFloorplanPlugin.html +6 -7
- package/docs/functions/ModelChassisCompassPlugin.html +6 -7
- package/docs/functions/ModelEntryDoorGuidePlugin.html +6 -7
- package/docs/functions/ModelFloorplanPlugin.html +6 -7
- package/docs/functions/ModelItemLabelPlugin.html +6 -7
- package/docs/functions/ModelRoomLabelPlugin.html +6 -7
- package/docs/functions/ModelTVVideoPlugin.html +6 -7
- package/docs/functions/ModelViewPlugin.html +6 -7
- package/docs/functions/Object3DHelperPlugin.html +6 -7
- package/docs/functions/PanoCompassPlugin.html +6 -7
- package/docs/functions/PanoCursorRaycasterPlugin.html +6 -7
- package/docs/functions/PanoDoorLabelPlugin.html +6 -7
- package/docs/functions/PanoFloorplanRadarPlugin.html +6 -7
- package/docs/functions/PanoMeasurePlugin.html +6 -7
- package/docs/functions/PanoRulerPlugin.html +6 -7
- package/docs/functions/PanoRulerProPlugin.html +6 -7
- package/docs/functions/PanoSpatialTagPlugin.html +6 -7
- package/docs/functions/PanoTagPlugin.html +6 -7
- package/docs/functions/PanoVideoPlugin.html +6 -7
- package/docs/functions/PipelinePlugin.html +6 -7
- package/docs/functions/TopviewFloorplanPlugin.html +6 -7
- package/docs/functions/Util.absoluteUrl.html +9 -7
- package/docs/functions/Util.equal.html +333 -0
- package/docs/functions/Util.getCoordsFromClient.html +9 -7
- package/docs/functions/Util.getCoordsFromElement.html +9 -7
- package/docs/functions/Util.getFrameTime.html +9 -7
- package/docs/functions/Util.getIntersectFromRelativePosition.html +9 -7
- package/docs/functions/Util.getRaycasterFromFivePointer.html +9 -7
- package/docs/functions/Util.isAbsoluteURL.html +9 -7
- package/docs/functions/Util.isModelLike.html +9 -7
- package/docs/functions/Util.isNil.html +9 -7
- package/docs/functions/Util.isPanoramaLike.html +9 -7
- package/docs/functions/Util.nextFrame.html +9 -7
- package/docs/functions/Util.notNil.html +9 -7
- package/docs/functions/Util.requestAnimationFrameInterval.html +9 -7
- package/docs/functions/Util.tweenProgress.html +9 -7
- package/docs/functions/Util.uuid.html +9 -7
- package/docs/functions/pluginFlag.html +7 -8
- package/docs/index.html +7 -8
- package/docs/interfaces/AddTagConfig.html +8 -9
- package/docs/interfaces/AreaMakerPluginPluginType.AnimeOptions.html +325 -0
- package/docs/interfaces/AreaMakerPluginPluginType.Config.html +330 -0
- package/docs/interfaces/AreaMakerPluginPluginType.EventMap.html +616 -0
- package/docs/interfaces/AreaMakerPluginPluginType.Params.html +329 -0
- package/docs/interfaces/AreaMakerPluginPluginType.ServerAreaMakerItem.html +379 -0
- package/docs/interfaces/AreaMakerPluginPluginType.ServerAreaMakerItemV1.html +364 -0
- package/docs/interfaces/AreaMakerPluginPluginType.ServerDataV1.html +329 -0
- package/docs/interfaces/AreaMakerPluginPluginType.ServerDataV2.html +322 -0
- package/docs/interfaces/AreaMakerPluginPluginType.ShowHideOptions.html +321 -0
- package/docs/interfaces/AreaMakerPluginPluginType.State.html +350 -0
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +13 -14
- package/docs/interfaces/CSS3DRenderPluginState.html +10 -11
- package/docs/interfaces/CameraMovementPluginExportType.html +9 -10
- package/docs/interfaces/CruisePluginTypes.Config.html +10 -11
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +14 -15
- package/docs/interfaces/CruisePluginTypes.EventMap.html +22 -23
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +14 -15
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +16 -17
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +16 -17
- package/docs/interfaces/CruisePluginTypes.PluginData.html +11 -12
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +8 -9
- package/docs/interfaces/CruisePluginTypes.PluginState.html +13 -14
- package/docs/interfaces/EventMap.html +17 -18
- package/docs/interfaces/FloorplanBounding.html +10 -11
- package/docs/interfaces/FloorplanData.html +12 -13
- package/docs/interfaces/FloorplanEntrance.html +13 -14
- package/docs/interfaces/FloorplanExtraObject.html +12 -13
- package/docs/interfaces/FloorplanExtraObject3D.html +10 -11
- package/docs/interfaces/FloorplanFloorData.html +11 -12
- package/docs/interfaces/FloorplanImagePosition.html +9 -10
- package/docs/interfaces/FloorplanObserver.html +11 -12
- package/docs/interfaces/FloorplanOutlineItem.html +11 -12
- package/docs/interfaces/FloorplanPosition.html +9 -10
- package/docs/interfaces/FloorplanRoomItem.html +15 -16
- package/docs/interfaces/FloorplanRoomLabelItem.html +9 -10
- package/docs/interfaces/FloorplanServerBounding.html +10 -11
- package/docs/interfaces/FloorplanServerComputedData.html +12 -13
- package/docs/interfaces/FloorplanServerData.html +9 -10
- package/docs/interfaces/FloorplanServerDoorItem.html +12 -13
- package/docs/interfaces/FloorplanServerDoorPosition.html +10 -11
- package/docs/interfaces/FloorplanServerEntrance.html +13 -14
- package/docs/interfaces/FloorplanServerFloorData.html +11 -12
- package/docs/interfaces/FloorplanServerImagePosition.html +9 -10
- package/docs/interfaces/FloorplanServerObserver.html +11 -12
- package/docs/interfaces/FloorplanServerOutlineItem.html +11 -12
- package/docs/interfaces/FloorplanServerPosition.html +9 -10
- package/docs/interfaces/FloorplanServerRoomItem.html +16 -17
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +9 -10
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +10 -11
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +12 -13
- package/docs/interfaces/GuideLinePluginType.EventMap.html +15 -16
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +10 -11
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +8 -9
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +15 -16
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +10 -11
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +20 -21
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +9 -10
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +20 -21
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +7 -8
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +8 -9
- package/docs/interfaces/GuideLinePluginType.PluginState.html +10 -11
- package/docs/interfaces/GuideLinePluginType.Route.html +13 -14
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +11 -12
- package/docs/interfaces/HelperOffset.html +10 -11
- package/docs/interfaces/ImagePlaneGroup.html +8 -9
- package/docs/interfaces/ItemLabelPluginData.html +8 -9
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +13 -14
- package/docs/interfaces/ItemLabelPluginParametersType.html +11 -12
- package/docs/interfaces/MinMax.html +9 -10
- package/docs/interfaces/ModelChassisCompassPluginData.html +9 -10
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +10 -11
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +9 -10
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +10 -11
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +10 -11
- package/docs/interfaces/ModelItemLabelPluginData.html +8 -9
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +13 -14
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +9 -10
- package/docs/interfaces/ModelRoomLabelPluginData.html +8 -9
- package/docs/interfaces/ModelTVVideoPluginData.html +11 -12
- package/docs/interfaces/ModelTVVideoPluginExportType.html +10 -11
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +8 -9
- package/docs/interfaces/ModelViewPluginExportType.html +13 -14
- package/docs/interfaces/Object3DHelperState.html +10 -11
- package/docs/interfaces/ObjectHelperControllers.html +11 -12
- package/docs/interfaces/PaintBrushAction.html +14 -15
- package/docs/interfaces/PaintBrushConfigs.html +14 -15
- package/docs/interfaces/PaintBrushState.html +12 -13
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +12 -13
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +7 -8
- package/docs/interfaces/PanoMeasureParameterType.html +18 -19
- package/docs/interfaces/PanoMeasurePluginLineJson.html +10 -11
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +9 -10
- package/docs/interfaces/PanoMeasurePluginPointJson.html +9 -10
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +10 -11
- package/docs/interfaces/PanoRulerPluginExportType.html +12 -13
- package/docs/interfaces/PanoRulerPluginOptions.html +9 -10
- package/docs/interfaces/PanoRulerPluginParameterType.html +10 -11
- package/docs/interfaces/PanoRulerProPluginExportType.html +11 -12
- package/docs/interfaces/PanoRulerProPluginOptions.html +9 -10
- package/docs/interfaces/PanoRulerProPluginParameterType.html +9 -10
- package/docs/interfaces/PanoRulerProPluginState.html +10 -11
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +7 -8
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +7 -8
- package/docs/interfaces/PanoSpatialTagPluginData.html +13 -14
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +12 -13
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +15 -16
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +12 -13
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +15 -16
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +13 -14
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +12 -13
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +8 -9
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +10 -11
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +8 -9
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +11 -12
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +8 -9
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +10 -11
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +12 -13
- package/docs/interfaces/Point.html +10 -11
- package/docs/interfaces/Room.html +11 -12
- package/docs/interfaces/RoomInfo.html +9 -10
- package/docs/interfaces/RoomLabel.html +16 -17
- package/docs/interfaces/RoomRules.html +7 -8
- package/docs/interfaces/Rooms.html +7 -8
- package/docs/interfaces/Scissor.html +11 -12
- package/docs/interfaces/State.html +10 -11
- package/docs/interfaces/TagCacheInterface.html +14 -15
- package/docs/interfaces/TagConfig.html +17 -18
- package/docs/interfaces/TagGLTFObjectGroup.html +8 -9
- package/docs/interfaces/TagIconUrl.html +14 -15
- package/docs/interfaces/TagObjectGroup.html +8 -9
- package/docs/interfaces/TagStyle.html +8 -9
- package/docs/interfaces/Tags.html +11 -12
- package/docs/interfaces/TemporaryState.html +8 -9
- package/docs/interfaces/Util.MagnifierParameter.html +15 -13
- package/docs/interfaces/Util.MouseGroupParameter.html +12 -10
- package/docs/interfaces/Util.PointIntersection.html +12 -10
- package/docs/modules/AreaMakerPluginPluginType.html +319 -0
- package/docs/modules/CruisePluginTypes.html +7 -8
- package/docs/modules/GuideLineItem.html +7 -8
- package/docs/modules/GuideLineModeItem.html +7 -8
- package/docs/modules/GuideLinePluginType.html +7 -8
- package/docs/modules/PanoVideoPluginType.html +7 -8
- package/docs/modules/Util.html +12 -7
- package/docs/modules.html +10 -12
- package/docs/types/AreaMakerPluginPluginType.AreaMakerItemEventMap.html +327 -0
- package/docs/types/{FloorplanRoomsPluginReturnType.html → AreaMakerPluginPluginType.PluginData.html} +35 -14
- package/docs/types/{FloorplanRoomsPluginParameterType.html → AreaMakerPluginPluginType.ServerData.html} +35 -14
- package/docs/types/ArrayPosition.html +7 -8
- package/docs/types/AudioAppearance.html +7 -8
- package/docs/types/AudioTagTypeConfigKey.html +7 -8
- package/docs/types/CSS3DRenderExportType.html +7 -8
- package/docs/types/CSS3DRenderPluginExportType.html +7 -8
- package/docs/types/CSS3DRenderPluginParameterType.html +7 -8
- package/docs/types/ClassFunctionParameters.html +7 -8
- package/docs/types/Color.html +7 -8
- package/docs/types/ContentTypeConfigKey.html +7 -8
- package/docs/types/ContentTypeConfigKeySplit.html +7 -8
- package/docs/types/ContentTypeMap.html +7 -8
- package/docs/types/Create3DDomContainerReturnType.html +7 -8
- package/docs/types/Create3DElementReturnType.html +7 -8
- package/docs/types/CruisePluginExportType.html +7 -8
- package/docs/types/CruisePluginTypes.CruiseData.html +7 -8
- package/docs/types/CruisePluginTypes.MoveEffect.html +7 -8
- package/docs/types/DeprecatedMediaPlaneProperty.html +7 -8
- package/docs/types/DeprecatedTagProperty.html +7 -8
- package/docs/types/Direction-1.html +7 -8
- package/docs/types/Direction4.html +7 -8
- package/docs/types/ElementRenderer.html +7 -8
- package/docs/types/FloorplanRuleLabels.html +7 -8
- package/docs/types/FloorplanServerRuleLabels.html +7 -8
- package/docs/types/GuideLinePluginExportType.html +7 -8
- package/docs/types/GuideLinePluginType.GuideLineItem.html +7 -8
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +7 -8
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +7 -8
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +7 -8
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +7 -8
- package/docs/types/GuideLinePluginType.PathItem.html +7 -8
- package/docs/types/GuideLinePluginType.PluginData.html +7 -8
- package/docs/types/HelperEventMap.html +7 -8
- package/docs/types/LoadTagConfig.html +7 -8
- package/docs/types/MapviewFloorplanPluginParameterType.html +7 -8
- package/docs/types/MapviewFloorplanPluginReturnType.html +7 -8
- package/docs/types/MediaData.html +7 -8
- package/docs/types/MediaStore.html +7 -8
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +7 -8
- package/docs/types/ModelFloorplanPluginParameterType.html +7 -8
- package/docs/types/ModelFloorplanPluginReturnType.html +7 -8
- package/docs/types/ModelRoomLabelPluginParameters.html +7 -8
- package/docs/types/ModelRoomLabelPluginReturnType.html +7 -8
- package/docs/types/MoveArgs.html +7 -8
- package/docs/types/MoveOpts.html +7 -8
- package/docs/types/Object3DHelperEventMap.html +7 -8
- package/docs/types/ObjectFit.html +7 -8
- package/docs/types/PaintBrushEventMap.html +7 -8
- package/docs/types/PanoCompassPluginData.html +7 -8
- package/docs/types/PanoCompassPluginExportType.html +7 -8
- package/docs/types/PanoCompassPluginParameterType.html +7 -8
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +7 -8
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +7 -8
- package/docs/types/PanoIndex.html +7 -8
- package/docs/types/PanoMeasurePluginEvent.html +7 -8
- package/docs/types/PanoMeasureReturnType.html +7 -8
- package/docs/types/PanoSpatialTagPluginId.html +7 -8
- package/docs/types/PanoTagPluginExportInterface.html +7 -8
- package/docs/types/PanoTagPluginParamsInterface.html +7 -8
- package/docs/types/PanoVideoPluginParameterType.html +7 -8
- package/docs/types/PanoVideoPluginReturnType.html +7 -8
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +7 -8
- package/docs/types/PipelinePluginParameterType.html +7 -8
- package/docs/types/PipelinePluginReturnType.html +7 -8
- package/docs/types/PlaneTag.html +7 -8
- package/docs/types/Point2DTag.html +7 -8
- package/docs/types/Point3DTag.html +7 -8
- package/docs/types/PointTag.html +7 -8
- package/docs/types/PointTagInstance.html +7 -8
- package/docs/types/Position.html +7 -8
- package/docs/types/RotateArgs.html +7 -8
- package/docs/types/RotateOpts.html +7 -8
- package/docs/types/RuleLabelsKey.html +7 -8
- package/docs/types/RuleLabelsValue.html +7 -8
- package/docs/types/StickType.html +7 -8
- package/docs/types/Tag.html +9 -10
- package/docs/types/Tag2D.html +7 -8
- package/docs/types/Tag3D.html +7 -8
- package/docs/types/TagConfigByKey.html +7 -8
- package/docs/types/TagContentType.html +7 -8
- package/docs/types/TagDimensionType.html +7 -8
- package/docs/types/TagElement.html +7 -8
- package/docs/types/TagEvents.html +7 -8
- package/docs/types/TagGLTFObject.html +7 -8
- package/docs/types/TagHooks.html +7 -8
- package/docs/types/TagId.html +7 -8
- package/docs/types/TagInstance.html +7 -8
- package/docs/types/TagPointType.html +7 -8
- package/docs/types/TagRendererMap.html +7 -8
- package/docs/types/TopviewFloorplanPluginParameterType.html +7 -8
- package/docs/types/TopviewFloorplanPluginReturnType.html +7 -8
- package/docs/types/WorkCode.html +7 -8
- package/docs/variables/FLOOR_TYPE_MAP.html +7 -8
- package/docs/variables/PLUGIN.html +7 -8
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +7 -8
- package/docs/variables/ROOM_TYPE_MAP.html +7 -8
- package/docs/variables/defaultGlobalConfig.html +8 -9
- package/docs/variables/itemLabelPluginServerParams.html +7 -8
- package/docs/variables/modelItemLabelPluginServerParams.html +7 -8
- package/docs/variables/modelRoomLabelPluginServerParams.html +7 -8
- package/libs/AreaMakerPlugin/Controller.d.ts +94 -0
- package/libs/AreaMakerPlugin/Controller.js +336 -0
- package/libs/AreaMakerPlugin/index.d.ts +4 -0
- package/libs/AreaMakerPlugin/index.js +37 -0
- package/libs/AreaMakerPlugin/typing.d.ts +148 -0
- package/libs/AreaMakerPlugin/utils/Item.d.ts +115 -0
- package/libs/AreaMakerPlugin/utils/Item.js +266 -0
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +42 -39
- package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -5
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +13 -13
- package/libs/PanoTagPlugin/controller/TagRender.js +19 -18
- package/libs/PanoTagPlugin/typings/tag/Tag.d.ts +1 -1
- package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +2 -4
- package/libs/PanoTagPlugin/typings/tag/TagData.d.ts +2 -0
- package/libs/PanoTagPlugin/utils/model/mediaPlane.js +10 -10
- package/libs/base/BasePlugin.js +1 -1
- package/libs/base/BasePluginWithData.d.ts +1 -1
- package/libs/components/AreaLabel/Assets/roomLabelBg.d.ts +1 -0
- package/libs/components/AreaLabel/Assets/roomLabelBg.js +4 -0
- package/libs/components/AreaLabel/LabelItem.js +125 -0
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +49 -48
- package/libs/floorplan/index.d.ts +0 -1
- package/libs/floorplan/utils/correctFiveState.d.ts +2 -0
- package/libs/floorplan/utils/correctFiveState.js +28 -28
- package/libs/index.d.ts +1 -0
- package/libs/index.js +120 -122
- package/libs/shared-utils/device.js +0 -1
- package/libs/shared-utils/five/changeMode.js +32 -29
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +27 -21
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/math/planimetry.d.ts +1 -1
- package/libs/shared-utils/math/planimetry.js +36 -29
- package/libs/shared-utils/three/core/Object3D.d.ts +8 -0
- package/libs/shared-utils/three/core/Object3D.js +22 -0
- package/libs/shared-utils/three/index.d.ts +2 -0
- package/libs/shared-utils/three/loadVideoTexture.d.ts +1 -1
- package/libs/shared-utils/three/loadVideoTexture.js +6 -6
- package/libs/shared-utils/three/objects/LineSegments.d.ts +9 -0
- package/libs/shared-utils/three/objects/LineSegments.js +9 -0
- package/libs/vendor/svelte/internal/index.js +79 -85
- package/package.json +2 -2
- package/dist/floorplan/FloorplanRoomsPlugin/BasePlugin.d.ts +0 -114
- package/dist/floorplan/FloorplanRoomsPlugin/BasePluginWithData.d.ts +0 -23
- package/dist/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/Room.svelte.d.ts +0 -1
- package/dist/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/RoomHighlight.svelte.d.ts +0 -1
- package/dist/floorplan/FloorplanRoomsPlugin/Components/Main.svelte.d.ts +0 -1
- package/dist/floorplan/FloorplanRoomsPlugin/Controller.d.ts +0 -40
- package/dist/floorplan/FloorplanRoomsPlugin/index.d.ts +0 -6
- package/dist/floorplan/FloorplanRoomsPlugin/typing.d.ts +0 -60
- package/libs/floorplan/FloorplanRoomsPlugin/BasePlugin.d.ts +0 -114
- package/libs/floorplan/FloorplanRoomsPlugin/BasePlugin.js +0 -51
- package/libs/floorplan/FloorplanRoomsPlugin/BasePluginWithData.d.ts +0 -23
- package/libs/floorplan/FloorplanRoomsPlugin/BasePluginWithData.js +0 -25
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/CurrentFloor.js +0 -188
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/CurrentFloor.svelte.d.ts +0 -1
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/ExtraObjects.js +0 -94
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/ExtraObjects.svelte.d.ts +0 -1
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/Room.js +0 -111
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/Room.svelte.d.ts +0 -1
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/RoomHighlight.js +0 -191
- package/libs/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/RoomHighlight/RoomHighlight.svelte.d.ts +0 -1
- package/libs/floorplan/FloorplanRoomsPlugin/Components/Main.js +0 -237
- package/libs/floorplan/FloorplanRoomsPlugin/Components/Main.svelte.d.ts +0 -1
- package/libs/floorplan/FloorplanRoomsPlugin/Controller.d.ts +0 -40
- package/libs/floorplan/FloorplanRoomsPlugin/Controller.js +0 -207
- package/libs/floorplan/FloorplanRoomsPlugin/index.d.ts +0 -6
- package/libs/floorplan/FloorplanRoomsPlugin/index.js +0 -43
- package/libs/floorplan/FloorplanRoomsPlugin/typing.d.ts +0 -60
- /package/dist/{floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/CurrentFloor.svelte.d.ts → components/AreaLabel/LabelItem.svelte.d.ts} +0 -0
- /package/libs/{floorplan/FloorplanRoomsPlugin → AreaMakerPlugin}/typing.js +0 -0
- /package/{dist/floorplan/FloorplanRoomsPlugin/Components/CurrentFloor/ExtraObjects.svelte.d.ts → libs/components/AreaLabel/LabelItem.svelte.d.ts} +0 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
var f = Object.defineProperty;
|
|
2
|
+
var d = (n, t, e) => t in n ? f(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var i = (n, t, e) => (d(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import * as a from "three";
|
|
5
|
+
import "hammerjs";
|
|
6
|
+
import "@realsee/five";
|
|
7
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
8
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
9
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
10
|
+
import { Object3D as b } from "../../shared-utils/three/core/Object3D.js";
|
|
11
|
+
import { LineSegments as k } from "../../shared-utils/three/objects/LineSegments.js";
|
|
12
|
+
import { BetterTween as y } from "../../shared-utils/animationFrame/BetterTween.js";
|
|
13
|
+
import { LabelItem as T } from "../../components/AreaLabel/LabelItem.js";
|
|
14
|
+
import { getCenterPointOfPoints as O } from "../../shared-utils/math/planimetry.js";
|
|
15
|
+
import { Subscribe as C } from "../../shared-utils/Subscribe.js";
|
|
16
|
+
import "../../shared-utils/positionToVector3.js";
|
|
17
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
18
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
19
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
20
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
21
|
+
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
22
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
23
|
+
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
24
|
+
import "../../shared-utils/three/centerPoint.js";
|
|
25
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
26
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
27
|
+
import "../../shared-utils/animationFrame/index.js";
|
|
28
|
+
import "../../vendor/svelte/internal/index.js";
|
|
29
|
+
import "../../components/AreaLabel/Assets/roomLabelBg.js";
|
|
30
|
+
class v extends b {
|
|
31
|
+
constructor(e) {
|
|
32
|
+
super();
|
|
33
|
+
i(this, "areaMakerItem");
|
|
34
|
+
this.areaMakerItem = e;
|
|
35
|
+
}
|
|
36
|
+
raycast(e, s) {
|
|
37
|
+
this.areaMakerItem.makerObject.raycast(e, s);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
class q {
|
|
41
|
+
constructor(t, e) {
|
|
42
|
+
i(this, "id");
|
|
43
|
+
/** 标注名称 */
|
|
44
|
+
i(this, "name", "");
|
|
45
|
+
/** 标注几何体 */
|
|
46
|
+
i(this, "makerObject");
|
|
47
|
+
/** 标注几何体的边框 */
|
|
48
|
+
i(this, "outline");
|
|
49
|
+
/** 标注底面 Y 坐标 */
|
|
50
|
+
i(this, "bottomY");
|
|
51
|
+
/** 标注透明度 */
|
|
52
|
+
i(this, "opacity");
|
|
53
|
+
/** 标注高度 */
|
|
54
|
+
i(this, "height");
|
|
55
|
+
/** 标注所在楼层 */
|
|
56
|
+
i(this, "floorIndex");
|
|
57
|
+
/** 标注底面形状 */
|
|
58
|
+
i(this, "shape");
|
|
59
|
+
/** 是否被挂载 */
|
|
60
|
+
i(this, "mounted", !1);
|
|
61
|
+
/** 查询问题使用的调试对象 */
|
|
62
|
+
i(this, "checkMsg", {
|
|
63
|
+
/** 当标注没有展示时,可以通过这个字段查看原因 */
|
|
64
|
+
checkVisibleMsg: "",
|
|
65
|
+
/** 当标注标签没有展示时,可以通过这个字段查看原因 */
|
|
66
|
+
checkTagVisibleMsg: ""
|
|
67
|
+
});
|
|
68
|
+
/** 模型容器 */
|
|
69
|
+
i(this, "modelGroup");
|
|
70
|
+
/** 标注是否可见 */
|
|
71
|
+
i(this, "visible", !1);
|
|
72
|
+
// ==================== 标签相关 ====================
|
|
73
|
+
/** 标注标签实例 */
|
|
74
|
+
i(this, "tagApp");
|
|
75
|
+
/** 标注标签是否可见 */
|
|
76
|
+
i(this, "tagVisible", !1);
|
|
77
|
+
/** 标注标签的世界坐标 */
|
|
78
|
+
i(this, "tagPosition", new a.Vector3());
|
|
79
|
+
/** 标注标签的 NDC 坐标 */
|
|
80
|
+
i(this, "tagNDCPosition", new a.Vector3());
|
|
81
|
+
/** 标注标签的 transform */
|
|
82
|
+
i(this, "tagTransform", { left: 0, top: 0 });
|
|
83
|
+
/** 标注标签的显示层级 */
|
|
84
|
+
i(this, "tagZIndex", 0);
|
|
85
|
+
i(this, "hooks", new C());
|
|
86
|
+
/** Plugin 实例 */
|
|
87
|
+
i(this, "plugin");
|
|
88
|
+
/** 标注透明度动画 */
|
|
89
|
+
i(this, "opacityAnime");
|
|
90
|
+
/** 显示标注 */
|
|
91
|
+
// public show() {
|
|
92
|
+
// return this.doOpacityAnime({
|
|
93
|
+
// duration: 500,
|
|
94
|
+
// makerObjectOpacity: [this.makerObject.material.opacity, this.opacity],
|
|
95
|
+
// outlineOpacity: [this.outline.material.opacity, 1],
|
|
96
|
+
// ...options,
|
|
97
|
+
// })
|
|
98
|
+
// }
|
|
99
|
+
/** 隐藏标注 */
|
|
100
|
+
// public hide() {
|
|
101
|
+
// return this.doOpacityAnime({
|
|
102
|
+
// duration: 500,
|
|
103
|
+
// makerObjectOpacity: [this.makerObject.material.opacity, 0],
|
|
104
|
+
// outlineOpacity: [this.outline.material.opacity, 0],
|
|
105
|
+
// ...options,
|
|
106
|
+
// })
|
|
107
|
+
// }
|
|
108
|
+
/** 透明度动画 */
|
|
109
|
+
i(this, "doOpacityAnime", (t) => {
|
|
110
|
+
var h;
|
|
111
|
+
(h = this.opacityAnime) == null || h.dispose();
|
|
112
|
+
const e = t.duration, [s, o] = t.makerObjectOpacity, [r, l] = t.outlineOpacity;
|
|
113
|
+
if (e === 0) {
|
|
114
|
+
this.makerObject.material.opacity = o, this.outline.material.opacity = l;
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
return new Promise((p) => {
|
|
118
|
+
this.opacityAnime = new y({ makerObjectOpacity: s, outlineOpacity: r }).to({
|
|
119
|
+
makerObjectOpacity: o,
|
|
120
|
+
outlineOpacity: l
|
|
121
|
+
}).onUpdate(({ makerObjectOpacity: c, outlineOpacity: m }) => {
|
|
122
|
+
this.makerObject.material.opacity = c, this.outline.material.opacity = m, this.plugin.five.needsRender = !0;
|
|
123
|
+
}).onComplete(() => p(!0)).onDispose(() => {
|
|
124
|
+
this.makerObject.material.opacity = o, this.outline.material.opacity = l, this.plugin.five.needsRender = !0, p(!1);
|
|
125
|
+
}).play();
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
/** 插件 Config 变化时更新自身 depthTest */
|
|
129
|
+
i(this, "onPluginConfigChange", (t) => {
|
|
130
|
+
this.makerObject.material.depthTest = t.config.modelDepthTest, this.outline.material.depthTest = t.config.modelDepthTest, this.plugin.five.needsRender = !0;
|
|
131
|
+
});
|
|
132
|
+
i(this, "onPluginStateChange", (t) => {
|
|
133
|
+
this.updateVisible(), this.updateTagVisible();
|
|
134
|
+
});
|
|
135
|
+
/** 更新标注可见性 */
|
|
136
|
+
i(this, "updateVisible", () => {
|
|
137
|
+
const { result: t, msg: e } = this.checkVisible();
|
|
138
|
+
this.checkMsg.checkVisibleMsg = e, this.visible !== t && (this.visible = t, this.modelGroup.visible = t, this.plugin.five.needsRender = !0);
|
|
139
|
+
});
|
|
140
|
+
/** 检测标注是否可见 */
|
|
141
|
+
i(this, "checkVisible", () => {
|
|
142
|
+
if (!this.plugin.state.visible)
|
|
143
|
+
return { result: !1, msg: "插件不可见" };
|
|
144
|
+
const e = this.plugin.five.model.shownFloor;
|
|
145
|
+
return e === null || e === this.floorIndex ? { result: !0, msg: "" } : { result: !1, msg: `模型高亮楼层不符合展示条件, 当前高亮楼层为:${e}` };
|
|
146
|
+
});
|
|
147
|
+
/** 更新标注标签 */
|
|
148
|
+
i(this, "updateTag", () => {
|
|
149
|
+
this.tagApp && (this.updateTagNDCPosition(), this.updateTagDomTransform(), this.updateTagVisible());
|
|
150
|
+
});
|
|
151
|
+
/** 更新标注标签的 NDC Position */
|
|
152
|
+
i(this, "updateTagNDCPosition", () => {
|
|
153
|
+
const e = this.tagPosition.clone().project(this.plugin.five.camera);
|
|
154
|
+
this.tagNDCPosition.copy(e);
|
|
155
|
+
});
|
|
156
|
+
/** 更新标注标签的 transform */
|
|
157
|
+
i(this, "updateTagDomTransform", () => {
|
|
158
|
+
var o;
|
|
159
|
+
const t = this.tagNDCPosition, e = Math.round((t.x + 1) / 2 * this.plugin.tagDomContainer.clientWidth), s = Math.round((-t.y + 1) / 2 * this.plugin.tagDomContainer.clientHeight);
|
|
160
|
+
this.tagTransform.left === e && this.tagTransform.top === s || (this.tagTransform = { left: e, top: s }, (o = this.tagApp) == null || o.$set({ transform: `translate(${e}px, ${s}px)` }));
|
|
161
|
+
});
|
|
162
|
+
/** 更新标注标签可见性 */
|
|
163
|
+
i(this, "updateTagVisible", () => {
|
|
164
|
+
var s;
|
|
165
|
+
const { result: t, msg: e } = this.checkTagVisible();
|
|
166
|
+
this.checkMsg.checkTagVisibleMsg = e, this.tagVisible !== t && (this.tagVisible = t, (s = this.tagApp) == null || s.$set({ visible: t }));
|
|
167
|
+
});
|
|
168
|
+
/** 检测标注标签是否可见 */
|
|
169
|
+
i(this, "checkTagVisible", () => {
|
|
170
|
+
if (!this.visible)
|
|
171
|
+
return { result: !1, msg: "标注整体不可见" };
|
|
172
|
+
const e = this.plugin.five, s = new a.Raycaster(), o = e.camera.position.clone();
|
|
173
|
+
s.set(o.clone(), this.tagPosition.clone().sub(o).normalize());
|
|
174
|
+
const [r] = e.model.intersectRaycaster(s), l = this.tagPosition.distanceTo(e.camera.position);
|
|
175
|
+
if (r && r.distance + 0.1 < l)
|
|
176
|
+
return { result: !1, msg: "标注标签被 Five 模型遮挡" };
|
|
177
|
+
const h = this.tagNDCPosition;
|
|
178
|
+
return Math.abs(h.x) > 1.2 || Math.abs(h.y) > 1.2 || Math.abs(h.z) > 1 ? { result: !1, msg: "标注标签不在屏幕内" } : { result: !0, msg: "" };
|
|
179
|
+
});
|
|
180
|
+
/** 相机位姿发生变化时,更新标签 */
|
|
181
|
+
i(this, "onFiveCameraUpdate", () => {
|
|
182
|
+
this.tagApp && this.visible && (this.updateTagNDCPosition(), this.updateTagDomTransform(), this.updateTagVisible());
|
|
183
|
+
});
|
|
184
|
+
var p, c, m;
|
|
185
|
+
const s = e.object_data, o = s.bottom_y, r = s.height, l = new a.Color((p = s.color) != null ? p : "#FFFFFF"), h = (c = s.opacity) != null ? c : 0.4;
|
|
186
|
+
this.id = e.id, this.name = (m = e.name) != null ? m : "", this.plugin = t, this.height = r, this.bottomY = o, this.opacity = h, this.shape = new a.Shape().fromJSON(s.shape), this.floorIndex = e.floor_index, this.makerObject = new a.Mesh(u(this.shape, r), M(l, h)), g(this.makerObject, o), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline = new k(
|
|
187
|
+
new a.EdgesGeometry(this.makerObject.geometry),
|
|
188
|
+
new a.LineBasicMaterial({ color: l, transparent: !0 })
|
|
189
|
+
), g(this.outline, o), this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.setHeight(r), this.modelGroup = new v(this);
|
|
190
|
+
}
|
|
191
|
+
/** 挂载标注 */
|
|
192
|
+
mount() {
|
|
193
|
+
if (this.mounted = !0, this.updateVisible(), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.modelGroup.add(this.makerObject, this.outline), !!this.name) {
|
|
194
|
+
const e = this.plugin.tagDomContainer, s = {
|
|
195
|
+
content: this.name,
|
|
196
|
+
visible: this.tagVisible,
|
|
197
|
+
transform: `translate(${this.tagTransform.left}px, ${this.tagTransform.top}px)`,
|
|
198
|
+
onClick: (o) => this.hooks.emit("tagClick", { target: this, nativeEvent: o })
|
|
199
|
+
};
|
|
200
|
+
this.tagApp = new T({ target: e, props: s }), this.updateTag();
|
|
201
|
+
}
|
|
202
|
+
this.plugin.five.needsRender = !0, this.plugin.hooks.on("stateChange", this.onPluginStateChange), this.plugin.hooks.on("configChange", this.onPluginConfigChange), this.plugin.five.on("modeChange", this.updateVisible), this.plugin.five.on("modelShownFloorChange", this.updateVisible), this.plugin.five.on("cameraUpdate", this.onFiveCameraUpdate);
|
|
203
|
+
}
|
|
204
|
+
/** 卸载标注 */
|
|
205
|
+
unmount() {
|
|
206
|
+
var t;
|
|
207
|
+
this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (t = this.tagApp) == null || t.$destroy(), this.tagApp = null, this.plugin.hooks.off("stateChange", this.onPluginStateChange), this.plugin.hooks.off("configChange", this.onPluginConfigChange), this.plugin.five.off("modeChange", this.updateVisible), this.plugin.five.off("modelShownFloorChange", this.updateVisible), this.plugin.five.off("cameraUpdate", this.onFiveCameraUpdate);
|
|
208
|
+
}
|
|
209
|
+
/** 更改标注透明度
|
|
210
|
+
* @param opacity 标注透明度,范围:0-1
|
|
211
|
+
*/
|
|
212
|
+
setOpacity(t) {
|
|
213
|
+
var e;
|
|
214
|
+
this.opacity = t, (e = this.opacityAnime) == null || e.dispose(), this.makerObject.material.opacity = t, this.plugin.five.needsRender = !0;
|
|
215
|
+
}
|
|
216
|
+
/** 更改标注颜色
|
|
217
|
+
* @param color 标注颜色,支持 hex
|
|
218
|
+
* @example setColor('#FF0000')
|
|
219
|
+
*/
|
|
220
|
+
setColor(t) {
|
|
221
|
+
const e = new a.Color(t);
|
|
222
|
+
this.makerObject.material.color = e, this.outline.material.color = e, this.plugin.five.needsRender = !0;
|
|
223
|
+
}
|
|
224
|
+
/** 更改标注高度
|
|
225
|
+
* @param height 标注高度,单位:米
|
|
226
|
+
*/
|
|
227
|
+
setHeight(t) {
|
|
228
|
+
if (t <= 0)
|
|
229
|
+
throw new Error("高度必须大于 0");
|
|
230
|
+
this.height = t, this.makerObject.geometry = u(this.shape, t), this.outline.geometry = new a.EdgesGeometry(this.makerObject.geometry);
|
|
231
|
+
const e = this.shape.extractPoints(10).shape.slice(0, -1), s = O(e), o = new a.Vector3(s.x, s.y, t);
|
|
232
|
+
g(o, this.bottomY), this.tagPosition.copy(o), this.updateTag(), this.plugin.five.needsRender = !0;
|
|
233
|
+
}
|
|
234
|
+
/** 更改标注标签的显示层级
|
|
235
|
+
* @description 为什么需要这个方法
|
|
236
|
+
* 在相机朝向或位置发生变化时,各个标签所在的坐标与相机的远近关系发生了变化,所以标签的层级也会有变化。
|
|
237
|
+
* 比如:
|
|
238
|
+
* - 相机 -> 标签 A -> 标签 B: 标签 A 在标签 B 的前面
|
|
239
|
+
* - 标签 A <- 标签 B <- 相机: 标签 A 在标签 B 的后面
|
|
240
|
+
* 但是当前元素是无法感知到这种变化的,所以需要通过父元素调用这个方法来更新标签的层级。
|
|
241
|
+
*/
|
|
242
|
+
setTagZIndex(t) {
|
|
243
|
+
var e;
|
|
244
|
+
this.tagZIndex !== t && ((e = this.tagApp) == null || e.$set({ zIndex: t }));
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function u(n, t) {
|
|
248
|
+
return new a.ExtrudeBufferGeometry(n, {
|
|
249
|
+
depth: t,
|
|
250
|
+
bevelEnabled: !1
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
function M(n, t) {
|
|
254
|
+
return new a.MeshBasicMaterial({
|
|
255
|
+
color: n,
|
|
256
|
+
opacity: t,
|
|
257
|
+
transparent: !0
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
function g(n, t) {
|
|
261
|
+
const e = new a.Matrix4(), s = new a.Matrix4().makeRotationX(Math.PI / 2), o = new a.Matrix4().makeTranslation(0, 0, -t), r = new a.Matrix4().makeScale(1, 1, -1);
|
|
262
|
+
e.multiply(s), e.multiply(o), e.multiply(r), n.applyMatrix4(e);
|
|
263
|
+
}
|
|
264
|
+
export {
|
|
265
|
+
q as AreaMakerItem
|
|
266
|
+
};
|
|
@@ -2,14 +2,14 @@ var k = Object.defineProperty, w = Object.defineProperties;
|
|
|
2
2
|
var P = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var C = Object.getOwnPropertySymbols;
|
|
4
4
|
var F = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var v = (n, e, t) => e in n ? k(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t,
|
|
5
|
+
var v = (n, e, t) => e in n ? k(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, p = (n, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
7
|
F.call(e, t) && v(n, t, e[t]);
|
|
8
8
|
if (C)
|
|
9
9
|
for (var t of C(e))
|
|
10
10
|
L.call(e, t) && v(n, t, e[t]);
|
|
11
11
|
return n;
|
|
12
|
-
},
|
|
12
|
+
}, c = (n, e) => w(n, P(e));
|
|
13
13
|
var i = (n, e, t) => (v(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
14
|
import * as l from "three";
|
|
15
15
|
import { logWarning as T, logError as V } from "../../shared-utils/log.js";
|
|
@@ -185,19 +185,19 @@ class R {
|
|
|
185
185
|
this.mesh.material.uniforms.vOffset.value = t, this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0;
|
|
186
186
|
});
|
|
187
187
|
i(this, "onFlickerAnimeUpdate", (e) => {
|
|
188
|
-
var a,
|
|
188
|
+
var r, a, o, d;
|
|
189
189
|
const { progress: t } = e, s = 1 - t;
|
|
190
|
-
this.mesh.material.uniforms.flicker.value = s, this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0, this.startTagContainer.tag && b(this.startTagContainer.tag) && ((
|
|
190
|
+
this.mesh.material.uniforms.flicker.value = s, this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0, this.startTagContainer.tag && b(this.startTagContainer.tag) && ((o = this.startTagContainer.app) == null || o.$set(c(p({}, this.startTagContainer.tag.data), {
|
|
191
191
|
opacity: s,
|
|
192
192
|
name: this.name,
|
|
193
|
-
distance: Math.round(this.curvePath.getLength())
|
|
194
|
-
}))), this.endTagContainer.tag && b(this.endTagContainer.tag) && ((
|
|
193
|
+
distance: Math.round((a = (r = this.curvePath) == null ? void 0 : r.getLength()) != null ? a : 0)
|
|
194
|
+
}))), this.endTagContainer.tag && b(this.endTagContainer.tag) && ((d = this.endTagContainer.app) == null || d.$set(c(p({}, this.endTagContainer.tag.data), { opacity: s })));
|
|
195
195
|
});
|
|
196
196
|
i(this, "logWarning", (e) => T("GuideLineModeItem: ", e));
|
|
197
197
|
i(this, "logError", (e) => V("GuideLineModeItem: ", e));
|
|
198
|
-
var
|
|
198
|
+
var a, o;
|
|
199
199
|
this.five = e, this.mode = t.mode, this.plugin = t.plugin, this.parent = t.parent, this.startTagContainer = { tag: null, plugin: new y(this.five) }, this.endTagContainer = { tag: null, plugin: new y(this.five) };
|
|
200
|
-
const s = new l.BufferGeometry(),
|
|
200
|
+
const s = new l.BufferGeometry(), r = new l.ShaderMaterial({
|
|
201
201
|
vertexShader: B,
|
|
202
202
|
fragmentShader: I,
|
|
203
203
|
transparent: !0,
|
|
@@ -216,7 +216,7 @@ class R {
|
|
|
216
216
|
vOffset: { value: 0 }
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
|
-
this.mesh = new l.Mesh(s,
|
|
219
|
+
this.mesh = new l.Mesh(s, r), this.mesh.name = "GuideLineModeItem", this.mode === "panorama" && (this.parent.hooks.on("walkStart", this.onWalkAnimationStart), this.parent.hooks.on("walkEnded", this.onWalkAnimationEnd)), this.updateVisible(), this.onFiveModeChange(this.five.getCurrentState().mode), this.onFiveModelShownFloorChange((o = (a = this.five.model) == null ? void 0 : a.shownFloor) != null ? o : null), this.flowAnime.onUpdate(this.onFlowAnimeUpdate), this.flickerAnime.onUpdate(this.onFlickerAnimeUpdate), this.parent.hooks.on("show", this.updateVisible), this.parent.hooks.on("hide", this.updateVisible), this.plugin.hooks.on("show", this.updateVisible), this.plugin.hooks.on("hide", this.updateVisible), this.plugin.hooks.on("enable", this.updateVisible), this.plugin.hooks.on("disable", this.updateVisible), this.plugin.hooks.on("dispose", this.dispose), this.five.on("modeChange", this.onFiveModeChange), this.five.on("modelShownFloorChange", this.onFiveModelShownFloorChange);
|
|
220
220
|
}
|
|
221
221
|
get panoGroup() {
|
|
222
222
|
return this._panoGroup;
|
|
@@ -265,26 +265,26 @@ class R {
|
|
|
265
265
|
return this.logError("setPathByPanoGroup: work is not ready");
|
|
266
266
|
const s = S(e);
|
|
267
267
|
if (this._panoGroup = s, (t == null ? void 0 : t.skipPanoGroup) !== void 0) {
|
|
268
|
-
const
|
|
269
|
-
this.skippedPositions =
|
|
268
|
+
const a = t.skipPanoGroup ? s.map((o) => this.five.work.observers[o]).map((o) => o.standingPosition.clone()) : null;
|
|
269
|
+
this.skippedPositions = a;
|
|
270
270
|
}
|
|
271
|
-
const
|
|
272
|
-
this.path =
|
|
271
|
+
const r = this.getPathFromPanoGroup(s, this.five.work, t);
|
|
272
|
+
this.path = r, this.setGeometryByPath(r, t);
|
|
273
273
|
}
|
|
274
274
|
/** 通过路径设置线条形状 */
|
|
275
275
|
setGeometryByPath(e, t) {
|
|
276
|
-
var
|
|
276
|
+
var h, g, f;
|
|
277
277
|
if (this.disposed)
|
|
278
278
|
return this.logError("disposed");
|
|
279
|
-
const s = (
|
|
280
|
-
this.path = e, this.scale = s, this.width =
|
|
281
|
-
const { geometry: o, maxU:
|
|
279
|
+
const s = (h = t == null ? void 0 : t.scale) != null ? h : this.scale, r = (g = t == null ? void 0 : t.width) != null ? g : this.width, a = (f = t == null ? void 0 : t.unit_length) != null ? f : this.unitLength;
|
|
280
|
+
this.path = e, this.scale = s, this.width = r, this.unitLength = a;
|
|
281
|
+
const { geometry: o, maxU: d, curvePath: m, curvePoints: u } = U({
|
|
282
282
|
path: e,
|
|
283
|
-
width:
|
|
284
|
-
unitLength:
|
|
283
|
+
width: r * s,
|
|
284
|
+
unitLength: a * s,
|
|
285
285
|
skipPositions: this.skippedPositions
|
|
286
286
|
});
|
|
287
|
-
this._curvePath =
|
|
287
|
+
this._curvePath = m, this._curvePoints = u, this.mesh.geometry = o, this.mesh.material.needsUpdate = !0, this.mesh.material.uniforms.maxU.value = d, this.five.needsRender = !0;
|
|
288
288
|
}
|
|
289
289
|
/** 设置线条材质 */
|
|
290
290
|
setMartial(e) {
|
|
@@ -371,32 +371,35 @@ class R {
|
|
|
371
371
|
return this.disposed ? this.logError("disposed") : this.cacheLengths.length !== 0 ? this.cacheLengths[e] : (this.cacheLengths = this.getPanoGroupLengths(), this.cacheLengths[e]);
|
|
372
372
|
}
|
|
373
373
|
getPanoGroupLengths() {
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
var u;
|
|
375
|
+
if (!this.curvePoints || !this.curvePath)
|
|
376
|
+
return [];
|
|
377
|
+
const e = this.panoGroup.map((h) => this.five.work.observers[h]), t = this.curvePoints.length, s = this.curvePath.getLength(), r = t - 1, a = s / r, o = (u = this.curvePath.getLengths(r)) != null ? u : [], d = [];
|
|
378
|
+
let m = 0;
|
|
376
379
|
for (let h = 0; h < t; h++) {
|
|
377
|
-
const
|
|
378
|
-
if (!
|
|
380
|
+
const g = this.curvePoints[h], f = e[m];
|
|
381
|
+
if (!f)
|
|
379
382
|
break;
|
|
380
|
-
|
|
383
|
+
f.standingPosition.clone().setY(0).distanceTo(g.clone().setY(0)) < a && (d.push(o[h]), m += 1);
|
|
381
384
|
}
|
|
382
|
-
return
|
|
385
|
+
return d;
|
|
383
386
|
}
|
|
384
387
|
setTag(e, t) {
|
|
385
|
-
const s = e === "start" ? this.startTagContainer : this.endTagContainer;
|
|
386
|
-
t ||
|
|
387
|
-
const
|
|
388
|
+
const s = this.curvePath, r = e === "start" ? this.startTagContainer : this.endTagContainer;
|
|
389
|
+
t || r.plugin.clearTags();
|
|
390
|
+
const o = A({}, {
|
|
388
391
|
contentType: "Custom",
|
|
389
392
|
stickType: "2DPoint",
|
|
390
393
|
config: { visibleConfig: { visibleFiveMode: ["Floorplan", "Mapview"], followModelVisibility: !1 } },
|
|
391
394
|
style: { point: { enabled: !1 } },
|
|
392
395
|
data: {}
|
|
393
396
|
}, t);
|
|
394
|
-
|
|
395
|
-
var h;
|
|
396
|
-
(h =
|
|
397
|
-
const
|
|
398
|
-
return
|
|
399
|
-
}),
|
|
397
|
+
r.tag = o, b(o) && (r.tag.element = (d) => {
|
|
398
|
+
var h, g;
|
|
399
|
+
(h = r.app) == null || h.$destroy();
|
|
400
|
+
const m = e === "start" ? c(p({}, o.data), { name: this.name, distance: Math.round((g = s.getLength()) != null ? g : 0), i18n: this.plugin.config.i18n }) : o.data, u = new O({ target: d, intro: !0, props: m });
|
|
401
|
+
return r.app = u, () => u.$destroy();
|
|
402
|
+
}), r.plugin.load({ tagList: [r.tag] });
|
|
400
403
|
}
|
|
401
404
|
doShow() {
|
|
402
405
|
this.mode === "model" && this.flowAnime.play(), this.five.scene.add(this.mesh), this.startTagContainer.plugin.show(), this.endTagContainer.plugin.show(), this.five.needsRender = !0;
|
|
@@ -408,18 +411,18 @@ class R {
|
|
|
408
411
|
getPathFromPanoGroup(e, t, s) {
|
|
409
412
|
if (e.length < 2)
|
|
410
413
|
return [];
|
|
411
|
-
const
|
|
412
|
-
return [
|
|
414
|
+
const a = e.map((o) => t.observers[o]).map((o) => o.standingPosition.toArray());
|
|
415
|
+
return [p({ type: "CatmullRomCurve3", points: a }, s)];
|
|
413
416
|
}
|
|
414
417
|
}
|
|
415
418
|
function b(n) {
|
|
416
419
|
return n.contentType === "Custom";
|
|
417
420
|
}
|
|
418
|
-
const
|
|
421
|
+
const ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
419
422
|
__proto__: null,
|
|
420
423
|
GuideLineModeItem: R
|
|
421
424
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
422
425
|
export {
|
|
423
426
|
R as GuideLineModeItem,
|
|
424
|
-
|
|
427
|
+
ie as GuideLineModeItem$1
|
|
425
428
|
};
|
|
@@ -17,11 +17,6 @@ interface LineGeometryOption {
|
|
|
17
17
|
* @returns THREE BufferGeometry
|
|
18
18
|
*/
|
|
19
19
|
export declare function createLineGeometry(options: LineGeometryOption): {
|
|
20
|
-
geometry: THREE.BufferGeometry;
|
|
21
|
-
maxU: number;
|
|
22
|
-
curvePath?: undefined;
|
|
23
|
-
curvePoints?: undefined;
|
|
24
|
-
} | {
|
|
25
20
|
geometry: THREE.BufferGeometry;
|
|
26
21
|
maxU: number;
|
|
27
22
|
curvePath: THREE.CurvePath<THREE.Vector3>;
|
|
@@ -11,31 +11,31 @@ const z = 2, M = 3, X = 3, k = 2;
|
|
|
11
11
|
function Q(e) {
|
|
12
12
|
const i = e.width, g = e.unitLength / i, c = i / 2, E = e.path;
|
|
13
13
|
if (E.length === 0)
|
|
14
|
-
return { geometry: new n.BufferGeometry(), maxU: 0 };
|
|
14
|
+
return { geometry: new n.BufferGeometry(), maxU: 0, curvePath: null, curvePoints: null };
|
|
15
15
|
const u = new n.CurvePath();
|
|
16
16
|
E.forEach((t) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
const l = I(t);
|
|
18
|
+
l && u.add(l);
|
|
19
19
|
});
|
|
20
20
|
const w = Math.ceil(u.getLength() * 100);
|
|
21
21
|
u.arcLengthDivisions = w;
|
|
22
22
|
const o = u.getPoints(w), y = o.length, L = G(o.map((t) => [t.x, t.z])), B = (y - 1) * z * M, d = 2 * y, C = d * X, U = d * k, r = new Uint32Array(B), s = new Float32Array(C), a = new Float32Array(U);
|
|
23
|
-
let N = 0,
|
|
23
|
+
let N = 0, P = 0;
|
|
24
24
|
for (let t = 0; t < o.length; t++) {
|
|
25
|
-
const [
|
|
26
|
-
s[t * 6 + 0] =
|
|
27
|
-
const
|
|
28
|
-
s[t * 6 + 3] =
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
const V = new n.Vector3().lerpVectors(
|
|
25
|
+
const [l, R] = L[t][0], T = o[t], { x: A, y: _, z: b } = T, v = new x(A + l * c, _ + 0.05, b + R * c);
|
|
26
|
+
s[t * 6 + 0] = v.x, s[t * 6 + 1] = v.y, s[t * 6 + 2] = v.z;
|
|
27
|
+
const f = new x(A - l * c, _ + 0.05, b - R * c);
|
|
28
|
+
s[t * 6 + 3] = f.x, s[t * 6 + 4] = f.y, s[t * 6 + 5] = f.z, N += t > 0 ? o[t - 1].clone().sub(o[t]).length() : 0;
|
|
29
|
+
const h = N / i / g;
|
|
30
|
+
if (P = h, a[t * 4 + 0] = 0, a[t * 4 + 1] = h, a[t * 4 + 2] = 1, a[t * 4 + 3] = h, e.skipPositions) {
|
|
31
|
+
const V = new n.Vector3().lerpVectors(v, f, 0.5);
|
|
32
32
|
if (e.skipPositions.some((F) => F.distanceTo(V) < 0.26))
|
|
33
33
|
continue;
|
|
34
34
|
}
|
|
35
35
|
t !== o.length - 1 && (r[t * 6 + 0] = t * 2 + 0, r[t * 6 + 1] = t * 2 + 2, r[t * 6 + 2] = t * 2 + 1, r[t * 6 + 3] = t * 2 + 2, r[t * 6 + 4] = t * 2 + 3, r[t * 6 + 5] = t * 2 + 1);
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
return
|
|
37
|
+
const m = new n.BufferGeometry();
|
|
38
|
+
return m.setAttribute("position", new n.BufferAttribute(s, 3)), m.setAttribute("uv", new n.BufferAttribute(a, 2)), m.setIndex(new n.BufferAttribute(r, 1)), { geometry: m, maxU: P, curvePath: u, curvePoints: o };
|
|
39
39
|
}
|
|
40
40
|
function I(e) {
|
|
41
41
|
if (O(e)) {
|
|
@@ -163,15 +163,16 @@ class ri extends w {
|
|
|
163
163
|
if (!e)
|
|
164
164
|
return;
|
|
165
165
|
const o = F(e).then((r) => {
|
|
166
|
-
var l, m, h,
|
|
166
|
+
var l, m, h, p, u;
|
|
167
167
|
const s = Object.assign(r.scene, {
|
|
168
168
|
customID: t.id,
|
|
169
169
|
isTagModel: !0,
|
|
170
|
-
removeEventListener:
|
|
170
|
+
removeEventListener: t.config.clickable === !1 ? () => {
|
|
171
|
+
} : this.addObjectClickHandler(t, r.scene, (c) => {
|
|
171
172
|
this.hooks.emit("click", { target: "TagModel", tag: t, event: c });
|
|
172
173
|
})
|
|
173
174
|
});
|
|
174
|
-
return s.visible = this.getCurrentVisibleState(t), new g().fromArray(t.matrix).decompose(s.position, s.quaternion, s.scale), s.updateWorldMatrix(!0, !0), s.visible = this.getVisibleByFiveMode(t), (h = (m = (l = this.config) == null ? void 0 : l.globalConfig) == null ? void 0 : m.modelConfig) != null && h.autoLookAtEnabled && ((u = (
|
|
175
|
+
return s.visible = this.getCurrentVisibleState(t), new g().fromArray(t.matrix).decompose(s.position, s.quaternion, s.scale), s.updateWorldMatrix(!0, !0), s.visible = this.getVisibleByFiveMode(t), (h = (m = (l = this.config) == null ? void 0 : l.globalConfig) == null ? void 0 : m.modelConfig) != null && h.autoLookAtEnabled && ((u = (p = t.config) == null ? void 0 : p.modelConfig) != null && u.autoLookAtEnabled) && s.lookAt(this.five.camera.position.clone().setY(s.position.y)), s;
|
|
175
176
|
});
|
|
176
177
|
t.model = { promise: o };
|
|
177
178
|
const i = yield o;
|
|
@@ -222,7 +223,7 @@ class ri extends w {
|
|
|
222
223
|
var o, i;
|
|
223
224
|
return ((i = (o = e.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : i.type) === "Video";
|
|
224
225
|
}).forEach((e) => {
|
|
225
|
-
var l, m, h,
|
|
226
|
+
var l, m, h, p, u;
|
|
226
227
|
const o = e.data.mediaData[0];
|
|
227
228
|
if (!o)
|
|
228
229
|
return;
|
|
@@ -230,8 +231,8 @@ class ri extends w {
|
|
|
230
231
|
if (!i)
|
|
231
232
|
return;
|
|
232
233
|
e.mediaPlane && !((m = (l = e.state) == null ? void 0 : l.visible) == null || m) && e.mediaPlane instanceof R && e.mediaPlane.pause();
|
|
233
|
-
const n = e.position.map(C), a = this.getCurrentVisibleState(e), r = (() => !!(e.mediaPlane && !a))(), s = (() => !!(!e.mediaPlane && a))(),
|
|
234
|
-
if ((r ||
|
|
234
|
+
const n = e.position.map(C), a = this.getCurrentVisibleState(e), r = (() => !!(e.mediaPlane && !a))(), s = (() => !!(!e.mediaPlane && a))(), d = (() => !!(e.mediaPlane && e.mediaPlane.src !== i))();
|
|
235
|
+
if ((r || d) && (e.mediaPlane && this.imagePlaneGroup.remove(e.mediaPlane), (h = e.mediaPlane) == null || h.dispose(), (p = e.mediaPlane) == null || p.removeFromParent(), e.mediaPlane = void 0), s || d) {
|
|
235
236
|
const c = new R(i, n, {
|
|
236
237
|
videoCoverSrc: o.videoCoverUrl,
|
|
237
238
|
playButton: e.data.playIcon,
|
|
@@ -257,12 +258,12 @@ class ri extends w {
|
|
|
257
258
|
var o, i;
|
|
258
259
|
return ((i = (o = e.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : i.type) === "Image";
|
|
259
260
|
}).forEach((e) => {
|
|
260
|
-
var
|
|
261
|
+
var d, l;
|
|
261
262
|
const { url: o } = e.data.mediaData[0];
|
|
262
263
|
if (!o)
|
|
263
264
|
return;
|
|
264
265
|
const i = e.position.map(C), n = this.getCurrentVisibleState(e), a = (() => !!(e.mediaPlane && !n))(), r = (() => !!(!e.mediaPlane && n))(), s = (() => !!(e.mediaPlane && e.mediaPlane.src !== o))();
|
|
265
|
-
(a || s) && (e.mediaPlane && this.imagePlaneGroup.remove(e.mediaPlane), (
|
|
266
|
+
(a || s) && (e.mediaPlane && this.imagePlaneGroup.remove(e.mediaPlane), (d = e.mediaPlane) == null || d.dispose(), (l = e.mediaPlane) == null || l.removeFromParent(), e.mediaPlane = void 0), (r || s) && (e.mediaPlane = new j(o, i, { objectFit: e.data.objectFit }), e.config.clickable !== !1 && this.domEvents.addAutoBindEventListener(e.mediaPlane, "click", (m) => {
|
|
266
267
|
this.hooks.emit("click", { tag: e, target: "TagContent", event: m.origDomEvent });
|
|
267
268
|
}), this.imagePlaneGroup.add(e.mediaPlane));
|
|
268
269
|
});
|
|
@@ -274,9 +275,9 @@ class ri extends w {
|
|
|
274
275
|
this.sort([...this.filterCSS3DTag]).forEach((e) => {
|
|
275
276
|
var o, i, n, a;
|
|
276
277
|
if (e.tag3DContentSvelte) {
|
|
277
|
-
const { svelteApp: r, css3DInstance: s, initialNormal:
|
|
278
|
-
if (r.$set({ tag: e, hooks: this.hooks, state: this.state, temporaryState: this.temporaryState }), !
|
|
279
|
-
const m = new O().setFromUnitVectors(
|
|
278
|
+
const { svelteApp: r, css3DInstance: s, initialNormal: d, currentNormal: l } = e.tag3DContentSvelte;
|
|
279
|
+
if (r.$set({ tag: e, hooks: this.hooks, state: this.state, temporaryState: this.temporaryState }), !d.equals(l)) {
|
|
280
|
+
const m = new O().setFromUnitVectors(d, l);
|
|
280
281
|
s.css3DObject.setRotationFromQuaternion(m);
|
|
281
282
|
}
|
|
282
283
|
return;
|
|
@@ -291,13 +292,13 @@ class ri extends w {
|
|
|
291
292
|
const s = this.getTagNormal(e);
|
|
292
293
|
if (!s)
|
|
293
294
|
return;
|
|
294
|
-
const l = (n =
|
|
295
|
+
const d = this.getTagConfig(e), l = (n = d.tag3DConfig) != null ? n : {};
|
|
295
296
|
if (this.getRenderType(e) === "BehindDom") {
|
|
296
297
|
l.mode = "behind", l.container = document.createElement("div");
|
|
297
|
-
const
|
|
298
|
-
l.container.style.backgroundColor =
|
|
298
|
+
const p = "black";
|
|
299
|
+
l.container.style.backgroundColor = p, l.container.style.border = `3px solid ${p}`, this.css3DRenderPlugin.hooks.on("render", () => {
|
|
299
300
|
var u;
|
|
300
|
-
if (m.css3DObject.opacityMesh) {
|
|
301
|
+
if (m.css3DObject.opacityMesh && d.clickable !== !1) {
|
|
301
302
|
const c = this.addObjectClickHandler(e, m.css3DObject.opacityMesh, (v) => {
|
|
302
303
|
this.hooks.emit("click", { event: v, target: "TagContent", tag: e });
|
|
303
304
|
});
|
|
@@ -368,10 +369,10 @@ class ri extends w {
|
|
|
368
369
|
if (!n || n.length !== 4 || !Array.isArray(n[0]) || !Array.isArray(n[2]))
|
|
369
370
|
return;
|
|
370
371
|
e.updateWorldMatrix(!1, !1);
|
|
371
|
-
const a = e.matrixWorld, r = new D().fromArray(n[0]), s = new D().fromArray(n[2]),
|
|
372
|
+
const a = e.matrixWorld, r = new D().fromArray(n[0]), s = new D().fromArray(n[2]), d = x(r, s).add(new D(0, 0, 5e-4)), l = new g().setPosition(d), m = new g().makeScale(o, o, o), h = new g().multiply(a).multiply(l).multiply(m);
|
|
372
373
|
h.decompose(i.position, i.quaternion, i.scale);
|
|
373
|
-
const
|
|
374
|
-
|
|
374
|
+
const p = i.opacityMesh;
|
|
375
|
+
p && h.decompose(p.position, p.quaternion, p.scale);
|
|
375
376
|
}
|
|
376
377
|
/** 添加模型标签 */
|
|
377
378
|
addMediaModelTag(t) {
|
|
@@ -33,7 +33,7 @@ export type Tag<C extends TagContentType = TagContentType, S extends StickType =
|
|
|
33
33
|
/** 标签 wrapper 的 classname */
|
|
34
34
|
className?: string;
|
|
35
35
|
/** 标签数据 */
|
|
36
|
-
data:
|
|
36
|
+
data: ContentTypeMap[C];
|
|
37
37
|
/** 「展开/收起」 「可见/不可见」 的策略配置 */
|
|
38
38
|
config?: TagConfig<C>;
|
|
39
39
|
/** 打标签时的 five state */
|
|
@@ -141,9 +141,7 @@ export interface TagConfig<C extends TagContentType = TagContentType> {
|
|
|
141
141
|
* @description: 标签的默认数据,会将 tag.data 深度合并进来
|
|
142
142
|
* @code `tag.data = ObjectAssignDeep(initialData, tag.data)`
|
|
143
143
|
*/
|
|
144
|
-
initialData?:
|
|
145
|
-
[key: string]: any;
|
|
146
|
-
}) & {
|
|
144
|
+
initialData?: PartialObjectDeep<ContentTypeMap[C]> & {
|
|
147
145
|
/**
|
|
148
146
|
* @description: 类似 css 的 !important,会覆盖掉 tag.data 中对应的数据
|
|
149
147
|
* @code
|
|
@@ -173,5 +171,5 @@ export interface TagConfig<C extends TagContentType = TagContentType> {
|
|
|
173
171
|
clickable?: boolean;
|
|
174
172
|
isMerged?: boolean;
|
|
175
173
|
}
|
|
176
|
-
export declare const defaultGlobalConfig: TagConfig
|
|
174
|
+
export declare const defaultGlobalConfig: TagConfig;
|
|
177
175
|
export {};
|
|
@@ -156,6 +156,8 @@ interface ContentTypeMapInterface {
|
|
|
156
156
|
type ContentTypeMapInterfaceWithExtraData = {
|
|
157
157
|
[key in keyof ContentTypeMapInterface]: ContentTypeMapInterface[key] & {
|
|
158
158
|
extraData?: Object;
|
|
159
|
+
} & {
|
|
160
|
+
[key: string]: any;
|
|
159
161
|
};
|
|
160
162
|
};
|
|
161
163
|
export type ContentTypeMap = Pick<ContentTypeMapInterfaceWithExtraData, TagContentType>;
|