@realsee/dnalogel 2.21.0-dev.6 → 2.21.0-dev.8
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/components/index.js +329 -329
- package/dist/CSS3DRenderPlugin/Controller.d.ts +4 -1
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +13 -13
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +3 -0
- package/dist/PanoMeasurePlugin/Model/area.d.ts +9 -1
- package/dist/PanoMeasurePlugin/Model/index.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Model/polygon.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +7 -3
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -8
- package/dist/PanoMeasurePlugin/typings/data.d.ts +2 -1
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +3 -0
- package/dist/PanoMeasurePlugin/utils/dom/base.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/geometryUtil.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +2 -1
- package/dist/base/BasePlugin.d.ts +4 -1
- package/dist/components/PaintBrush/style.d.ts +1 -1
- package/dist/index.cjs.js +62 -62
- package/dist/index.js +6708 -6414
- package/dist/index.umd.js +55 -55
- package/dist/shared-utils/absoluteUrl.d.ts +5 -0
- package/dist/{PanoMeasurePlugin/utils → shared-utils}/getPointFromHammerEvent.d.ts +1 -1
- package/dist/shared-utils/index.d.ts +1 -1
- package/dist/shared-utils/three/PointSelector.d.ts +37 -3
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +32 -31
- package/docs/classes/CruisePluginController.html +46 -43
- package/docs/classes/GuideLineItem.GuideLineItem.html +21 -20
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +36 -35
- package/docs/classes/Magnifier.html +21 -20
- package/docs/classes/ModelRoomLabelController.html +12 -11
- package/docs/classes/Object3DHelperController.html +45 -42
- package/docs/classes/PaintBrush.html +16 -15
- package/docs/classes/PanoMeasurePluginLine.html +46 -25
- package/docs/classes/PanoMeasurePluginModel.html +42 -26
- package/docs/classes/PanoMeasurePluginPoint.html +15 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +28 -27
- package/docs/classes/PanoTagPluginController.html +67 -64
- package/docs/classes/Util.BetterTween.html +10 -9
- package/docs/classes/Util.Interval.html +13 -12
- package/docs/classes/Util.Magnifier.html +19 -18
- package/docs/classes/Util.PointDomHelper.html +12 -11
- package/docs/classes/Util.PointHelper.html +12 -11
- package/docs/classes/Util.PointSelectorHelper.html +18 -17
- package/docs/classes/Util.Rectangle.html +14 -13
- package/docs/enums/CameraMovementEffect.html +8 -7
- package/docs/enums/ContentType.html +21 -20
- package/docs/enums/DIRECTION.html +10 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +10 -9
- package/docs/enums/DimensionType.html +8 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +9 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +10 -9
- package/docs/enums/PaintBrushTypeEnum.html +9 -8
- package/docs/enums/PointType.html +8 -7
- package/docs/enums/Rotation.html +9 -8
- package/docs/functions/CSS3DRenderPlugin.html +5 -4
- package/docs/functions/CameraMovementPlugin.html +5 -4
- package/docs/functions/CruisePlugin.html +5 -4
- package/docs/functions/GuideLinePlugin.html +6 -5
- package/docs/functions/ItemLabelPlugin.html +5 -4
- package/docs/functions/MapviewFloorplanPlugin.html +5 -4
- package/docs/functions/ModelChassisCompassPlugin.html +5 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -4
- package/docs/functions/ModelFloorplanPlugin.html +5 -4
- package/docs/functions/ModelItemLabelPlugin.html +5 -4
- package/docs/functions/ModelRoomLabelPlugin.html +5 -4
- package/docs/functions/ModelTVVideoPlugin.html +5 -4
- package/docs/functions/ModelViewPlugin.html +5 -4
- package/docs/functions/Object3DHelperPlugin.html +5 -4
- package/docs/functions/PanoCompassPlugin.html +5 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +5 -4
- package/docs/functions/PanoDoorLabelPlugin.html +5 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +5 -4
- package/docs/functions/PanoMeasurePlugin.html +5 -4
- package/docs/functions/PanoRulerPlugin.html +5 -4
- package/docs/functions/PanoRulerProPlugin.html +5 -4
- package/docs/functions/PanoSpatialTagPlugin.html +5 -4
- package/docs/functions/PanoTagPlugin.html +5 -4
- package/docs/functions/PanoVideoPlugin.html +5 -4
- package/docs/functions/TopviewFloorplanPlugin.html +5 -4
- package/docs/functions/Util.absoluteUrl.html +370 -0
- package/docs/functions/Util.getCoordsFromClient.html +6 -5
- package/docs/functions/Util.getCoordsFromElement.html +6 -5
- package/docs/functions/Util.getFrameTime.html +6 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +6 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +6 -5
- package/docs/functions/Util.isAbsoluteURL.html +6 -5
- package/docs/functions/Util.isModelLike.html +6 -5
- package/docs/functions/Util.isNil.html +6 -5
- package/docs/functions/Util.isPanoramaLike.html +6 -5
- package/docs/functions/Util.nextFrame.html +6 -5
- package/docs/functions/Util.notNil.html +6 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +6 -5
- package/docs/functions/Util.tweenProgress.html +6 -5
- package/docs/functions/Util.uuid.html +6 -5
- package/docs/functions/pluginFlag.html +6 -5
- package/docs/index.html +6 -5
- package/docs/interfaces/AddTagConfig.html +7 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +12 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +9 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +8 -7
- package/docs/interfaces/CruisePluginTypes.Config.html +9 -8
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +13 -12
- package/docs/interfaces/CruisePluginTypes.EventMap.html +21 -20
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +13 -12
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +15 -14
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +15 -14
- package/docs/interfaces/CruisePluginTypes.PluginData.html +10 -9
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +8 -7
- package/docs/interfaces/CruisePluginTypes.PluginState.html +12 -11
- package/docs/interfaces/EventMap.html +16 -15
- package/docs/interfaces/FloorplanBounding.html +9 -8
- package/docs/interfaces/FloorplanData.html +11 -10
- package/docs/interfaces/FloorplanEntrance.html +12 -11
- package/docs/interfaces/FloorplanExtraObject.html +11 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +9 -8
- package/docs/interfaces/FloorplanFloorData.html +10 -9
- package/docs/interfaces/FloorplanImagePosition.html +8 -7
- package/docs/interfaces/FloorplanObserver.html +10 -9
- package/docs/interfaces/FloorplanOutlineItem.html +10 -9
- package/docs/interfaces/FloorplanPosition.html +8 -7
- package/docs/interfaces/FloorplanRoomItem.html +14 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +8 -7
- package/docs/interfaces/FloorplanServerBounding.html +9 -8
- package/docs/interfaces/FloorplanServerComputedData.html +11 -10
- package/docs/interfaces/FloorplanServerData.html +8 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +11 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +9 -8
- package/docs/interfaces/FloorplanServerEntrance.html +12 -11
- package/docs/interfaces/FloorplanServerFloorData.html +10 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +8 -7
- package/docs/interfaces/FloorplanServerObserver.html +10 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +10 -9
- package/docs/interfaces/FloorplanServerPosition.html +8 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +15 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +8 -7
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +9 -8
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +11 -10
- package/docs/interfaces/GuideLinePluginType.EventMap.html +14 -13
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +9 -8
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +7 -6
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +14 -13
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +9 -8
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +19 -18
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +8 -7
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +19 -18
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +6 -5
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +8 -7
- package/docs/interfaces/GuideLinePluginType.PluginState.html +9 -8
- package/docs/interfaces/GuideLinePluginType.Route.html +12 -11
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +10 -9
- package/docs/interfaces/HelperOffset.html +9 -8
- package/docs/interfaces/ImagePlaneGroup.html +7 -6
- package/docs/interfaces/ItemLabelPluginData.html +7 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +12 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +10 -9
- package/docs/interfaces/MinMax.html +8 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +8 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +9 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +8 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +9 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +9 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +7 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +12 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +8 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +7 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +10 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +9 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +7 -6
- package/docs/interfaces/ModelViewPluginExportType.html +12 -11
- package/docs/interfaces/Object3DHelperState.html +9 -8
- package/docs/interfaces/ObjectHelperControllers.html +10 -9
- package/docs/interfaces/PaintBrushAction.html +13 -12
- package/docs/interfaces/PaintBrushConfigs.html +13 -12
- package/docs/interfaces/PaintBrushState.html +11 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +6 -5
- package/docs/interfaces/PanoMeasureParameterType.html +16 -15
- package/docs/interfaces/PanoMeasurePluginLineJson.html +9 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +8 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +8 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +9 -8
- package/docs/interfaces/PanoRulerPluginExportType.html +11 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +8 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +9 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +10 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +8 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +8 -7
- package/docs/interfaces/PanoRulerProPluginState.html +9 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +6 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +6 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +12 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +11 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +14 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +11 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +14 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +12 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +11 -10
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +7 -6
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +9 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +7 -6
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +10 -9
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +7 -6
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +9 -8
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +11 -10
- package/docs/interfaces/Point.html +9 -8
- package/docs/interfaces/Room.html +10 -9
- package/docs/interfaces/RoomInfo.html +8 -7
- package/docs/interfaces/RoomLabel.html +15 -14
- package/docs/interfaces/RoomRules.html +6 -5
- package/docs/interfaces/Rooms.html +6 -5
- package/docs/interfaces/Scissor.html +10 -9
- package/docs/interfaces/State.html +9 -8
- package/docs/interfaces/TagCacheInterface.html +13 -12
- package/docs/interfaces/TagConfig.html +14 -13
- package/docs/interfaces/TagGLTFObjectGroup.html +7 -6
- package/docs/interfaces/TagIconUrl.html +13 -12
- package/docs/interfaces/TagObjectGroup.html +7 -6
- package/docs/interfaces/TagStyle.html +7 -6
- package/docs/interfaces/Tags.html +10 -9
- package/docs/interfaces/TemporaryState.html +7 -6
- package/docs/interfaces/Util.MagnifierParameter.html +12 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +9 -8
- package/docs/interfaces/Util.PointIntersection.html +9 -8
- package/docs/modules/CruisePluginTypes.html +6 -5
- package/docs/modules/GuideLineItem.html +6 -5
- package/docs/modules/GuideLineModeItem.html +6 -5
- package/docs/modules/GuideLinePluginType.html +6 -5
- package/docs/modules/PanoVideoPluginType.html +6 -5
- package/docs/modules/Util.html +7 -5
- package/docs/modules.html +5 -4
- package/docs/types/ArrayPosition.html +6 -5
- package/docs/types/AudioAppearance.html +6 -5
- package/docs/types/AudioTagTypeConfigKey.html +6 -5
- package/docs/types/CSS3DRenderExportType.html +6 -5
- package/docs/types/CSS3DRenderPluginExportType.html +6 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +6 -5
- package/docs/types/ClassFunctionParameters.html +6 -5
- package/docs/types/Color.html +6 -5
- package/docs/types/ContentTypeConfigKey.html +6 -5
- package/docs/types/ContentTypeConfigKeySplit.html +6 -5
- package/docs/types/ContentTypeMap.html +6 -5
- package/docs/types/Create3DDomContainerReturnType.html +6 -5
- package/docs/types/Create3DElementReturnType.html +6 -5
- package/docs/types/CruisePluginExportType.html +6 -5
- package/docs/types/CruisePluginTypes.CruiseData.html +6 -5
- package/docs/types/CruisePluginTypes.MoveEffect.html +6 -5
- package/docs/types/DeprecatedMediaPlaneProperty.html +6 -5
- package/docs/types/DeprecatedTagProperty.html +6 -5
- package/docs/types/Direction-1.html +6 -5
- package/docs/types/Direction4.html +6 -5
- package/docs/types/ElementRenderer.html +6 -5
- package/docs/types/FloorplanRuleLabels.html +6 -5
- package/docs/types/FloorplanServerRuleLabels.html +6 -5
- package/docs/types/GuideLinePluginExportType.html +6 -5
- package/docs/types/GuideLinePluginType.GuideLineItem.html +6 -5
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +6 -5
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +6 -5
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +6 -5
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +6 -5
- package/docs/types/GuideLinePluginType.PathItem.html +6 -5
- package/docs/types/GuideLinePluginType.PluginData.html +6 -5
- package/docs/types/HelperEventMap.html +6 -5
- package/docs/types/LoadTagConfig.html +6 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +6 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +6 -5
- package/docs/types/MediaData.html +6 -5
- package/docs/types/MediaStore.html +6 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +6 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +6 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +6 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +6 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +6 -5
- package/docs/types/MoveArgs.html +6 -5
- package/docs/types/MoveOpts.html +6 -5
- package/docs/types/Object3DHelperEventMap.html +6 -5
- package/docs/types/ObjectFit.html +6 -5
- package/docs/types/PaintBrushEventMap.html +6 -5
- package/docs/types/PanoCompassPluginData.html +6 -5
- package/docs/types/PanoCompassPluginExportType.html +6 -5
- package/docs/types/PanoCompassPluginParameterType.html +6 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +6 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +6 -5
- package/docs/types/PanoIndex.html +6 -5
- package/docs/types/PanoMeasurePluginEvent.html +6 -5
- package/docs/types/PanoMeasureReturnType.html +6 -5
- package/docs/types/PanoSpatialTagPluginId.html +6 -5
- package/docs/types/PanoTagPluginExportInterface.html +6 -5
- package/docs/types/PanoTagPluginParamsInterface.html +6 -5
- package/docs/types/PanoVideoPluginParameterType.html +6 -5
- package/docs/types/PanoVideoPluginReturnType.html +6 -5
- package/docs/types/PartialObjectDeep.html +6 -5
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +6 -5
- package/docs/types/PlaneTag.html +6 -5
- package/docs/types/Point2DTag.html +6 -5
- package/docs/types/Point3DTag.html +6 -5
- package/docs/types/PointTag.html +6 -5
- package/docs/types/PointTagInstance.html +6 -5
- package/docs/types/Position.html +6 -5
- package/docs/types/RotateArgs.html +6 -5
- package/docs/types/RotateOpts.html +6 -5
- package/docs/types/RuleLabelsKey.html +6 -5
- package/docs/types/RuleLabelsValue.html +6 -5
- package/docs/types/StickType.html +6 -5
- package/docs/types/Tag.html +6 -5
- package/docs/types/Tag2D.html +6 -5
- package/docs/types/Tag3D.html +6 -5
- package/docs/types/TagContentType.html +6 -5
- package/docs/types/TagDimensionType.html +6 -5
- package/docs/types/TagElement.html +6 -5
- package/docs/types/TagEvents.html +6 -5
- package/docs/types/TagGLTFObject.html +6 -5
- package/docs/types/TagHooks.html +6 -5
- package/docs/types/TagId.html +6 -5
- package/docs/types/TagInstance.html +6 -5
- package/docs/types/TagPointType.html +6 -5
- package/docs/types/TagRendererMap.html +6 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +6 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +6 -5
- package/docs/types/WorkCode.html +6 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +6 -5
- package/docs/variables/PLUGIN.html +6 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +6 -5
- package/docs/variables/ROOM_TYPE_MAP.html +6 -5
- package/docs/variables/itemLabelPluginServerParams.html +6 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +6 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +6 -5
- package/libs/CSS3DRenderPlugin/Controller.d.ts +4 -1
- package/libs/CSS3DRenderPlugin/Controller.js +31 -28
- package/libs/CSS3DRenderPlugin/index.js +1 -1
- package/libs/CruisePlugin/Controller.js +1 -1
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/GuideLinePlugin/Components/Tag.js +68 -68
- package/libs/GuideLinePlugin/Controller.js +1 -1
- package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem.js +1 -1
- package/libs/GuideLinePlugin/index.js +1 -1
- package/libs/ItemLabelPlugin/ItemLabelItem.js +82 -82
- package/libs/ModelTVVideoPlugin/Plugin.js +30 -29
- package/libs/ModelTVVideoPlugin/index.js +4 -3
- package/libs/Object3DHelperPlugin/Controller.js +1 -1
- package/libs/Object3DHelperPlugin/index.js +1 -1
- package/libs/PanoCompassPlugin/Controller.js +20 -20
- package/libs/PanoCompassPlugin/index.js +1 -1
- package/libs/PanoDoorLabelPlugin/BaseController.js +1 -1
- package/libs/PanoDoorLabelPlugin/Controller.js +1 -1
- package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +60 -60
- package/libs/PanoDoorLabelPlugin/index.js +1 -1
- package/libs/PanoMeasurePlugin/Components/Controller0.js +131 -64
- package/libs/PanoMeasurePlugin/Components/Controller1.js +228 -153
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +13 -13
- package/libs/PanoMeasurePlugin/Controller/EditController.js +181 -112
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +5 -5
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +13 -12
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +3 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +64 -67
- package/libs/PanoMeasurePlugin/Model/area.d.ts +9 -1
- package/libs/PanoMeasurePlugin/Model/area.js +23 -11
- package/libs/PanoMeasurePlugin/Model/index.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Model/index.js +47 -39
- package/libs/PanoMeasurePlugin/Model/line.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Model/line.js +6 -0
- package/libs/PanoMeasurePlugin/Model/polygon.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Model/polygon.js +18 -13
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +7 -3
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +34 -24
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +23 -15
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -8
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +16 -24
- package/libs/PanoMeasurePlugin/index.js +22 -20
- package/libs/PanoMeasurePlugin/typings/data.d.ts +2 -1
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +3 -0
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +36 -15
- package/libs/PanoMeasurePlugin/utils/dom/base.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/dom/base.js +37 -31
- package/libs/PanoMeasurePlugin/utils/dom/distanceItem.js +38 -23
- package/libs/PanoMeasurePlugin/utils/generatePolygonGeometry.js +3 -3
- package/libs/PanoMeasurePlugin/utils/geometryUtil.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/geometryUtil.js +15 -13
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +2 -1
- package/libs/PanoSpatialTagPlugin/Plugin.js +1 -1
- package/libs/PanoSpatialTagPlugin/index.js +1 -1
- package/libs/PanoTagPlugin/controller/TagCache.js +1 -1
- package/libs/PanoTagPlugin/controller/TagComputer.js +1 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +1 -1
- package/libs/PanoTagPlugin/controller/TagUtil.js +1 -1
- package/libs/PanoTagPlugin/controller/index.js +1 -1
- package/libs/PanoTagPlugin/index.js +1 -1
- package/libs/PanoVideoPlugin/Controller.js +1 -1
- package/libs/PanoVideoPlugin/index.js +1 -1
- package/libs/base/BasePlugin.d.ts +4 -1
- package/libs/base/BasePlugin.js +14 -11
- package/libs/components/PaintBrush/style.d.ts +1 -1
- package/libs/components/PaintBrush/style.js +4 -4
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -1
- package/libs/index.js +7 -7
- package/libs/shared-utils/absoluteUrl.d.ts +5 -0
- package/libs/shared-utils/absoluteUrl.js +10 -0
- package/libs/{PanoMeasurePlugin/utils → shared-utils}/getPointFromHammerEvent.d.ts +1 -1
- package/libs/shared-utils/index.d.ts +1 -1
- package/libs/shared-utils/index.js +17 -16
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/Magnifier.js +6 -5
- package/libs/shared-utils/three/PointSelector.d.ts +37 -3
- package/libs/shared-utils/three/PointSelector.js +84 -36
- package/libs/shared-utils/three/PointSelectorHelper.js +7 -7
- package/libs/vendor/svelte/internal/index.js +392 -345
- package/package.json +1 -1
- package/dist/shared-utils/isAbsoluteURL.d.ts +0 -1
- package/libs/shared-utils/isAbsoluteURL.d.ts +0 -1
- package/libs/shared-utils/isAbsoluteURL.js +0 -6
- /package/dist/{PanoMeasurePlugin/utils → shared-utils}/getIntersectionFromEvent.d.ts +0 -0
- /package/libs/{PanoMeasurePlugin/utils → shared-utils}/getIntersectionFromEvent.d.ts +0 -0
- /package/libs/{PanoMeasurePlugin/utils → shared-utils}/getIntersectionFromEvent.js +0 -0
- /package/libs/{PanoMeasurePlugin/utils → shared-utils}/getPointFromHammerEvent.js +0 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
1
|
+
var U = Object.defineProperty;
|
|
2
|
+
var H = (m, c, e) => c in m ? U(m, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[c] = e;
|
|
3
|
+
var o = (m, c, e) => (H(m, typeof c != "symbol" ? c + "" : c, e), e);
|
|
4
|
+
import b from "../Model/line.js";
|
|
5
|
+
import S from "../Model/point.js";
|
|
6
|
+
import { throttle as j } from "../../shared-utils/throttle.js";
|
|
7
|
+
import x from "./BaseController.js";
|
|
8
|
+
import { Polyline as k } from "../Model/polyline.js";
|
|
9
|
+
import T from "../Model/area.js";
|
|
10
|
+
import w from "../utils/isIntersecting.js";
|
|
11
|
+
import { PointSelector as G } from "../../shared-utils/three/PointSelector.js";
|
|
12
|
+
import B from "../Modules/DeleteDom/index.js";
|
|
13
|
+
import { findAssociatedLines as V } from "../utils/findAssociatedLines.js";
|
|
14
|
+
import { Vector2 as y } from "three";
|
|
15
|
+
import I from "../utils/isNDCPointInScreen.js";
|
|
16
|
+
import { closestPointOnLine as $ } from "../utils/math.js";
|
|
14
17
|
import "../../shared-utils/uuid.js";
|
|
15
18
|
import "../utils/line.js";
|
|
16
19
|
import "@realsee/five/line";
|
|
17
20
|
import "../utils/constants.js";
|
|
18
|
-
import "three";
|
|
19
21
|
import "@realsee/five";
|
|
20
22
|
import "../utils/dom/distanceItem.js";
|
|
21
23
|
import "../utils/dom/base.js";
|
|
22
|
-
import "../utils/isNDCPointInScreen.js";
|
|
23
24
|
import "../../shared-utils/removeArrayItem.js";
|
|
24
25
|
import "../utils/ironbox.js";
|
|
25
|
-
import "../utils/getPointFromHammerEvent.js";
|
|
26
26
|
import "../Model/polygon.js";
|
|
27
27
|
import "../../shared-utils/three/IObject3D.js";
|
|
28
28
|
import "../utils/generatePolygonGeometry.js";
|
|
@@ -32,6 +32,7 @@ import "../utils/geometryUtil.js";
|
|
|
32
32
|
import "../../shared-utils/three/centerPoint.js";
|
|
33
33
|
import "../../shared-utils/three/PointSelectorHelper.js";
|
|
34
34
|
import "../../shared-utils/three/Magnifier.js";
|
|
35
|
+
import "hammerjs";
|
|
35
36
|
import "../../shared-utils/three/getIntersect.js";
|
|
36
37
|
import "../../shared-utils/three/PointHelper.js";
|
|
37
38
|
import "../../shared-utils/three/Assets/index.js";
|
|
@@ -54,31 +55,32 @@ import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
|
54
55
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
55
56
|
import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
56
57
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
57
|
-
import "../../shared-utils/
|
|
58
|
+
import "../../shared-utils/absoluteUrl.js";
|
|
58
59
|
import "../../shared-utils/animationFrame/BetterTween.js";
|
|
59
60
|
import "../../shared-utils/animationFrame/index.js";
|
|
60
61
|
import "../../shared-utils/isTouchDevice.js";
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
import "../../shared-utils/getIntersectionFromEvent.js";
|
|
63
|
+
import "../../shared-utils/getPointFromHammerEvent.js";
|
|
64
|
+
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
65
|
+
import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
66
|
+
import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
|
|
67
|
+
const E = () => !1;
|
|
68
|
+
class Xe extends x {
|
|
69
|
+
constructor(e) {
|
|
70
|
+
var t;
|
|
71
|
+
super(e);
|
|
65
72
|
o(this, "type", "edit");
|
|
66
73
|
o(this, "polyline");
|
|
67
74
|
o(this, "area");
|
|
68
|
-
/** 拖动的控制点 */
|
|
69
|
-
o(this, "pressPoint");
|
|
70
75
|
o(this, "hasAppendDashed", !1);
|
|
76
|
+
// private deleteDom: DeleteDom
|
|
71
77
|
o(this, "fiveElement");
|
|
72
78
|
/** 上一个端点位置 */
|
|
73
79
|
o(this, "lastPoint", null);
|
|
74
|
-
o(this, "hammer");
|
|
75
80
|
o(this, "pointSelector");
|
|
81
|
+
o(this, "deleteDom");
|
|
76
82
|
/** 根据 intersection 更新放大镜和吸附点 */
|
|
77
|
-
o(this, "onIntersectionUpdate",
|
|
78
|
-
var s;
|
|
79
|
-
const e = t.point;
|
|
80
|
-
(s = this.pressPoint) == null || s.position.copy(e), this.updateDashed(), this.five.needsRender = !0;
|
|
81
|
-
}, 20));
|
|
83
|
+
o(this, "onIntersectionUpdate", j(() => this.updateDashed(), 20));
|
|
82
84
|
/** 撤销编辑 */
|
|
83
85
|
o(this, "revoke", () => {
|
|
84
86
|
this.currentMeasureType === "area" ? this.revokeArea() : this.currentMeasureType === "line" && this.revokeLine();
|
|
@@ -87,153 +89,220 @@ class we extends I {
|
|
|
87
89
|
* @description: 测面积的撤销功能
|
|
88
90
|
*/
|
|
89
91
|
o(this, "revokeArea", () => {
|
|
90
|
-
this.area.points.length !== 0
|
|
92
|
+
if (this.area.points.length !== 0) {
|
|
93
|
+
if (this.area.popPoint(), this.area.points.length === 0) {
|
|
94
|
+
this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.five.needsRender = !0, this.hook.emit("revoke", { isEmpty: !0 });
|
|
95
|
+
return;
|
|
96
|
+
} else
|
|
97
|
+
this.lastPoint = new S(this.area.points[this.area.points.length - 1]), this.updateDashed();
|
|
98
|
+
this.five.needsRender = !0;
|
|
99
|
+
}
|
|
91
100
|
});
|
|
92
101
|
/**
|
|
93
102
|
* @description: 测距的撤销功能
|
|
94
103
|
*/
|
|
95
|
-
o(this, "revokeLine", (
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
104
|
+
o(this, "revokeLine", (e) => {
|
|
105
|
+
const t = e || this.polyline;
|
|
106
|
+
if (t.lines.length === 0 && this.lastPoint) {
|
|
98
107
|
this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.needsRender = !0;
|
|
99
108
|
return;
|
|
100
109
|
}
|
|
101
|
-
if (
|
|
110
|
+
if (t.lines.length === 0 && !this.lastPoint || !this.lastPoint)
|
|
102
111
|
return;
|
|
103
|
-
const
|
|
104
|
-
|
|
112
|
+
const i = t.lines[t.lines.length - 1], s = i.findAnotherPoint(this.lastPoint);
|
|
113
|
+
s && (this.lastPoint = s, this.hook.emit("anchorChange", s.position), this.group.remove(i.mesh), t.removeLine(i), i.distanceItem.remove(), this.updateDashed(), this.five.needsRender = !0);
|
|
105
114
|
});
|
|
106
115
|
o(this, "onMouseLeave", () => {
|
|
107
|
-
this.
|
|
116
|
+
this.dashed.hide(), this.perpendicularDashed.hide(), this.area.hideArea();
|
|
108
117
|
});
|
|
109
118
|
/** 编辑线条发生改变时通知外部 */
|
|
110
119
|
o(this, "onLineChanged", () => {
|
|
111
120
|
this.hook.emit("editedPolylineChange", this.polyline);
|
|
112
121
|
});
|
|
113
|
-
o(this, "onPress", (t) => {
|
|
114
|
-
const [e] = f(this.five, t);
|
|
115
|
-
if (!(e != null && e.face))
|
|
116
|
-
return;
|
|
117
|
-
const s = new c(e.point);
|
|
118
|
-
this.pressPoint = s, this.onIntersectionUpdate(e);
|
|
119
|
-
});
|
|
120
|
-
/**
|
|
121
|
-
* 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
|
|
122
|
-
* 2. 如果有长按点,把长按点位置更新为当前位置
|
|
123
|
-
*/
|
|
124
|
-
o(this, "onPan", (t) => {
|
|
125
|
-
if (!this.pressPoint)
|
|
126
|
-
return;
|
|
127
|
-
const [e] = f(this.five, t);
|
|
128
|
-
e != null && e.face && this.onIntersectionUpdate(e);
|
|
129
|
-
});
|
|
130
|
-
o(this, "onPanEnd", () => {
|
|
131
|
-
this.pressPoint && this.onTap();
|
|
132
|
-
});
|
|
133
122
|
/**
|
|
134
123
|
* 1. 如果存在上一个点,需要绘制当前点到上一个点的连线
|
|
135
124
|
* 2. 把上一个点的位置更新为当前点的位置
|
|
136
125
|
* 3. 清除 pointSelector
|
|
137
126
|
*/
|
|
138
|
-
o(this, "
|
|
139
|
-
var
|
|
127
|
+
o(this, "onSelect", () => {
|
|
128
|
+
var s, h, d, p;
|
|
140
129
|
this.hasAppendDashed || (this.dashed.distanceItem.appendTo(this.container), this.group.add(this.dashed.mesh), this.currentMeasureType === "area" && this.group.add(this.perpendicularDashed.mesh)), this.hasAppendDashed = !0;
|
|
141
|
-
const
|
|
130
|
+
const e = (() => {
|
|
131
|
+
var n, a;
|
|
142
132
|
if (this.currentMeasureType === "area")
|
|
143
|
-
return this.area.projectPoint(this.pointSelector.position.point);
|
|
133
|
+
return this.area.projectPoint((n = this.pointSelector.position) == null ? void 0 : n.point);
|
|
144
134
|
if (this.currentMeasureType === "line")
|
|
145
|
-
return this.pointSelector.position.point;
|
|
135
|
+
return (a = this.pointSelector.position) == null ? void 0 : a.point;
|
|
146
136
|
})();
|
|
147
|
-
if (!
|
|
137
|
+
if (!e)
|
|
148
138
|
return;
|
|
149
|
-
const
|
|
150
|
-
if (this.lastPoint =
|
|
151
|
-
if (
|
|
152
|
-
const
|
|
153
|
-
|
|
139
|
+
const t = new S(e), i = this.lastPoint;
|
|
140
|
+
if (this.lastPoint = t, this.currentMeasureType === "line") {
|
|
141
|
+
if (t && i) {
|
|
142
|
+
const a = new b(i, t, this.model);
|
|
143
|
+
a.distanceItem.setCanSelect(!1), a.distanceItem.appendTo(this.container), this.polyline.addLine(a), this.group.add(a.mesh), a.distanceItem.update(this.five);
|
|
154
144
|
}
|
|
155
|
-
const n = (
|
|
156
|
-
typeof n == "number" && (this.polyline.getPointLength() >= n ?
|
|
145
|
+
const n = (h = (s = this.editParams) == null ? void 0 : s.autoEndConfig) == null ? void 0 : h.line;
|
|
146
|
+
typeof n == "number" && (this.polyline.getPointLength() >= n ? this.complete() : this.polyline.getPointLength() === n - 1 && this.hook.emit("readyComplete"));
|
|
157
147
|
} else if (this.currentMeasureType === "area") {
|
|
158
|
-
this.area.addPoints(
|
|
159
|
-
const n = (
|
|
160
|
-
typeof n == "number" && (this.area.points.length >= n ?
|
|
161
|
-
five: this.five,
|
|
162
|
-
model: this.model,
|
|
163
|
-
meshContainer: this.group,
|
|
164
|
-
domContainer: this.container
|
|
165
|
-
}), this.model.addArea(this.area), this.lastPoint = void 0) : this.area.points.length === n - 1 && this.hook.emit("readyComplete"));
|
|
148
|
+
this.area.addPoints(t.position);
|
|
149
|
+
const n = (p = (d = this.editParams) == null ? void 0 : d.autoEndConfig) == null ? void 0 : p.area;
|
|
150
|
+
typeof n == "number" && (this.area.points.length >= n ? this.complete() : this.area.points.length === n - 1 && this.hook.emit("readyComplete"));
|
|
166
151
|
}
|
|
167
|
-
this.
|
|
152
|
+
this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", t.position);
|
|
168
153
|
});
|
|
169
|
-
/** 存在长按点时不能移动全景 */
|
|
170
|
-
o(this, "onWantsPanGesture", () => this.pressPoint ? !1 : void 0);
|
|
171
154
|
/** 移动全景时更新 distanceItem 在屏幕上的位置 */
|
|
172
155
|
o(this, "onCameraUpdate", () => {
|
|
173
156
|
this.updateDistanceUI();
|
|
174
157
|
});
|
|
175
158
|
/** 更新虚线 */
|
|
176
159
|
o(this, "updateDashed", () => {
|
|
160
|
+
var i;
|
|
177
161
|
if (!this.lastPoint)
|
|
178
162
|
return;
|
|
179
|
-
const
|
|
163
|
+
const e = this.lastPoint.position, t = (() => {
|
|
164
|
+
var s, h;
|
|
180
165
|
if (this.currentMeasureType === "area")
|
|
181
|
-
return this.area.projectPoint(this.pointSelector.position.point);
|
|
166
|
+
return this.area.projectPoint((s = this.pointSelector.position) == null ? void 0 : s.point);
|
|
182
167
|
if (this.currentMeasureType === "line")
|
|
183
|
-
return this.pointSelector.position.point;
|
|
168
|
+
return (h = this.pointSelector.position) == null ? void 0 : h.point;
|
|
184
169
|
})();
|
|
185
|
-
if (
|
|
186
|
-
this.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
170
|
+
if (!t) {
|
|
171
|
+
this.dashed.hide();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (this.dashed.setPoints(e, t), this.dashed.distanceItem.update(this.five), this.dashed.show(), this.hook.emit("editedDashedLineChange", this.dashed), this.currentMeasureType === "area")
|
|
175
|
+
if (this.area.areaItem.setCanSelect(!1), this.area.points.length >= 2) {
|
|
176
|
+
const s = this.area.polyline.lines.map((n) => ({ start: n.points[0].position, end: n.points[1].position })), h = w({ start: e, end: t }, s), d = w({ start: t, end: this.area.points[0] }, s);
|
|
177
|
+
if (h || d)
|
|
191
178
|
this.area.hideArea(), this.hook.emit("allowAddPointStateChange", "forbid");
|
|
192
179
|
else {
|
|
193
180
|
this.area.showArea();
|
|
194
|
-
const
|
|
195
|
-
this.area.polygon.updatePoints(
|
|
181
|
+
const n = [...this.area.points, t];
|
|
182
|
+
this.area.polygon.updatePoints(n), this.area.areaItem.updateArea(this.five);
|
|
183
|
+
const a = (i = this.pointSelector.position) == null ? void 0 : i.point;
|
|
184
|
+
if (!a) {
|
|
185
|
+
this.perpendicularDashed.hide();
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const g = a, P = t;
|
|
189
|
+
this.perpendicularDashed.setPoints(g, P), this.perpendicularDashed.show(), this.hook.emit("allowAddPointStateChange", "allow");
|
|
196
190
|
}
|
|
197
191
|
} else
|
|
198
|
-
this.area.hideArea();
|
|
199
|
-
|
|
200
|
-
|
|
192
|
+
this.area.hideArea(), this.perpendicularDashed.hide();
|
|
193
|
+
this.five.needsRender = !0;
|
|
194
|
+
});
|
|
195
|
+
// 下面一堆高亮相关
|
|
196
|
+
o(this, "wantsTapGesture", (e) => {
|
|
197
|
+
var C, D;
|
|
198
|
+
if (this.editParams.pointSelectorMode === "cursor" || this.lastPoint)
|
|
199
|
+
return !1;
|
|
200
|
+
const t = this.model.areas.map((r) => e.intersectObject(r.polygon, !0)[0]).sort((r, l) => r.distance - l.distance), i = (D = (C = t[0]) == null ? void 0 : C.object) == null ? void 0 : D.parent;
|
|
201
|
+
if (i != null && i.isPolygonMesh) {
|
|
202
|
+
const r = this.model.areas.find((l) => l.polygon === i);
|
|
203
|
+
if (r) {
|
|
204
|
+
const { x: l, y: v } = t[0].point.clone().project(this.five.camera), f = `${(l + 1) / 2 * 100}%`, u = `${(-v + 1) / 2 * 100}%`;
|
|
205
|
+
return this.chooseArea(r, { left: f, top: u }), !1;
|
|
206
|
+
}
|
|
201
207
|
}
|
|
208
|
+
const [s] = this.five.model.intersectRaycaster(e);
|
|
209
|
+
if (!s)
|
|
210
|
+
return;
|
|
211
|
+
const h = this.five.camera, d = s.point.clone().project(h), p = this.container.clientWidth, n = this.container.clientHeight, a = new y(d.x * p, d.y * n), g = this.model.getAllLines().map((r) => {
|
|
212
|
+
const [l, v] = r.points, f = l.position.clone().project(h), u = v.position.clone().project(h);
|
|
213
|
+
if (!I(f) && !I(u))
|
|
214
|
+
return null;
|
|
215
|
+
const M = new y(f.x * p, f.y * n), R = new y(u.x * p, u.y * n);
|
|
216
|
+
return { id: r.id, points: [M, R] };
|
|
217
|
+
}).filter((r) => !!r);
|
|
218
|
+
if (g.length === 0)
|
|
219
|
+
return;
|
|
220
|
+
const L = g.map((r) => {
|
|
221
|
+
const l = $(a, r.points);
|
|
222
|
+
return { id: r.id, distance: l.distanceTo(a) };
|
|
223
|
+
}).sort((r, l) => r.distance - l.distance)[0];
|
|
224
|
+
if (L.distance > 20)
|
|
225
|
+
return;
|
|
226
|
+
const A = this.model.getAllLines().find(({ id: r }) => r === L.id);
|
|
227
|
+
if (A)
|
|
228
|
+
return this.chooseLine(A), !1;
|
|
229
|
+
});
|
|
230
|
+
o(this, "chooseLine", (e) => {
|
|
231
|
+
const t = V(e);
|
|
232
|
+
this.deleteDom.setTarget(t).setLines(t).updatePosition().show(), this.highlightLines(t), this.hook.emit("selectedChange", t);
|
|
233
|
+
});
|
|
234
|
+
o(this, "chooseArea", (e, t) => {
|
|
235
|
+
this.deleteDom.setTarget(e).updatePosition(t.left, `calc(${t.top} - 1.5rem)`).show(), this.highlightArea(e);
|
|
202
236
|
});
|
|
203
|
-
this
|
|
237
|
+
o(this, "deleteArea", (e) => {
|
|
238
|
+
this.unHighlightArea(e), e.dispose(), this.deleteDom.hide();
|
|
239
|
+
});
|
|
240
|
+
o(this, "deleteLine", (e) => {
|
|
241
|
+
const t = e[0], i = this.model.getPolylineByLine(t);
|
|
242
|
+
i && (this.model.removePolyline(i), this.deleteDom.setLines([]).hide());
|
|
243
|
+
});
|
|
244
|
+
this.fiveElement = this.five.getElement(), this.deleteDom = new B(this.five, {
|
|
245
|
+
i18n: this.config.i18n,
|
|
246
|
+
onClick: (i, s) => {
|
|
247
|
+
var p;
|
|
248
|
+
const h = s.type === "area", d = Array.isArray(s) && ((p = s[0]) == null ? void 0 : p.type) === "line";
|
|
249
|
+
h && this.deleteArea(s), d && this.deleteLine(s);
|
|
250
|
+
},
|
|
251
|
+
cancel: (i) => {
|
|
252
|
+
var d;
|
|
253
|
+
this.deleteDom.hide();
|
|
254
|
+
const s = i.type === "area", h = Array.isArray(i) && ((d = i[0]) == null ? void 0 : d.type) === "line";
|
|
255
|
+
s && this.unHighlightArea(i), h && this.unHighlightLines(i);
|
|
256
|
+
}
|
|
257
|
+
}).appendTo(this.container), this.pointSelector = new G(this.five, {
|
|
204
258
|
mode: this.editParams.pointSelectorMode,
|
|
205
259
|
pointSelectorHelperParams: { magnifierParams: this.magnifierParams }
|
|
206
|
-
}), this.pointSelector.enable(), this.polyline = new
|
|
260
|
+
}), this.pointSelector.enable(), this.polyline = new k({ model: this.model }), this.area = new T(void 0, {
|
|
207
261
|
five: this.five,
|
|
208
262
|
model: this.model,
|
|
209
263
|
meshContainer: this.group,
|
|
210
264
|
domContainer: this.container
|
|
211
265
|
}), this.model.addPolyline(this.polyline), this.model.addArea(this.area), this.model.getAllLines().forEach((i) => {
|
|
212
|
-
i.distanceItem.appendTo(this.container), i.distanceItem.update(this.five), this.group.add(i.mesh);
|
|
266
|
+
i.distanceItem.appendTo(this.container), i.distanceItem.update(this.five), i.distanceItem.setCanSelect(!0), this.group.add(i.mesh);
|
|
213
267
|
}), this.model.getAllAreas().forEach((i) => {
|
|
214
|
-
i.areaItem.appendTo(this.container), i.areaItem.updateDomPosition(this.five), i.areaItem.setCanSelect(!0), this.group.add(i.polygon), i.polyline.lines.forEach((
|
|
215
|
-
|
|
268
|
+
i.areaItem.appendTo(this.container), i.areaItem.updateDomPosition(this.five), i.areaItem.setCanSelect(!0), this.group.add(i.polygon), i.polyline.lines.forEach((s) => {
|
|
269
|
+
s.distanceItem.appendTo(this.container), s.distanceItem.update(this.five), this.group.add(s.mesh);
|
|
216
270
|
});
|
|
217
|
-
}), this.five.on("cameraUpdate", this.onCameraUpdate), this.pointSelector.hook.on("intersectionUpdate", this.onIntersectionUpdate), this.polyline.hook.on("lineAdded", this.onLineChanged), this.polyline.hook.on("lineRemoved", this.onLineChanged);
|
|
218
|
-
const e = this.five.getElement();
|
|
219
|
-
if (e) {
|
|
220
|
-
this.fiveElement = e;
|
|
221
|
-
const i = new C(e);
|
|
222
|
-
this.hammer = i, i.on("tap", this.onTap), i.on("pan", this.onPan), i.on("press", this.onPress), i.on("panend", this.onPanEnd);
|
|
223
|
-
}
|
|
224
|
-
this.five.helperVisible = !1, (s = this.fiveElement) == null || s.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.refresh();
|
|
271
|
+
}), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsToMoveToPano", E), this.pointSelector.hook.on("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.on("select", this.onSelect), this.polyline.hook.on("lineAdded", this.onLineChanged), this.polyline.hook.on("lineRemoved", this.onLineChanged), this.five.helperVisible = !1, (t = this.fiveElement) == null || t.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.refresh();
|
|
225
272
|
}
|
|
226
273
|
dispose() {
|
|
227
|
-
var
|
|
228
|
-
super.dispose(), this.
|
|
274
|
+
var e;
|
|
275
|
+
super.dispose(), this.model.areas.forEach((t) => {
|
|
276
|
+
(t.points.length < 2 || t.polygon.isBlank) && this.model.removeArea(t);
|
|
277
|
+
}), this.five.helperVisible = !0, this.pointSelector.disable(), this.dashed.remove(), this.perpendicularDashed.remove(), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsToMoveToPano", E), this.pointSelector.hook.off("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.off("select", this.onSelect), this.polyline.hook.off("lineAdded", this.onLineChanged), this.polyline.hook.off("lineRemoved", this.onLineChanged), (e = this.fiveElement) == null || e.removeEventListener("mouseleave", this.onMouseLeave), this.magnifier.dispose(), this.dashed.distanceItem.remove(), this.five.needsRender = !0;
|
|
229
278
|
}
|
|
230
279
|
getEditingLines() {
|
|
231
280
|
return this.polyline.lines;
|
|
232
281
|
}
|
|
233
282
|
selectPoint() {
|
|
234
|
-
this.
|
|
283
|
+
this.onSelect();
|
|
284
|
+
}
|
|
285
|
+
complete() {
|
|
286
|
+
this.hook.emit("complete"), this.currentMeasureType === "area" ? (this.area.complete(), this.area = new T(void 0, { five: this.five, model: this.model, meshContainer: this.group, domContainer: this.container }), this.model.addArea(this.area)) : this.currentMeasureType === "line" && (this.polyline = new k({ model: this.model }), this.model.addPolyline(this.polyline)), this.dashed.hide(), this.perpendicularDashed.hide(), this.lastPoint = void 0;
|
|
287
|
+
}
|
|
288
|
+
highlightArea(e) {
|
|
289
|
+
this.highlightLines(e.polyline.lines), this.five.needsRender = !0;
|
|
290
|
+
}
|
|
291
|
+
unHighlightArea(e) {
|
|
292
|
+
this.unHighlightLines(e.polyline.lines), this.five.needsRender = !0;
|
|
293
|
+
}
|
|
294
|
+
highlightLines(e) {
|
|
295
|
+
e.forEach((t) => this.highlightLine(t));
|
|
296
|
+
}
|
|
297
|
+
unHighlightLines(e) {
|
|
298
|
+
e.forEach((t) => {
|
|
299
|
+
t.selected = !1, t.distanceItem.unHighlight(), this.group.remove(t.lightMesh), this.five.needsRender = !0;
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
highlightLine(e) {
|
|
303
|
+
e.selected || (e.selected = !0, this.group.add(e.lightMesh), e.distanceItem.highlight(), this.five.needsRender = !0);
|
|
235
304
|
}
|
|
236
305
|
}
|
|
237
306
|
export {
|
|
238
|
-
|
|
307
|
+
Xe as default
|
|
239
308
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var b = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var t = (n, s, e) => (
|
|
4
|
-
import { Model as
|
|
2
|
+
var S = (n, s, e) => s in n ? b(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
3
|
+
var t = (n, s, e) => (S(n, typeof s != "symbol" ? s + "" : s, e), e);
|
|
4
|
+
import { Model as D } from "../Model/index.js";
|
|
5
5
|
import y from "../Model/line.js";
|
|
6
6
|
import T from "./BaseController.js";
|
|
7
7
|
import M from "../Modules/DeleteDom/index.js";
|
|
@@ -119,10 +119,10 @@ class le extends T {
|
|
|
119
119
|
t(this, "cancelDeleteClickCallback", () => {
|
|
120
120
|
this.clearHighlightLines();
|
|
121
121
|
});
|
|
122
|
-
this.model = new
|
|
122
|
+
this.model = new D(this.config), this.polyline = new L({ model: this.model }), this.rangePieceController = new E(e), this.deleteDom = new M(this.five, {
|
|
123
123
|
i18n: this.config.i18n,
|
|
124
124
|
onClick: this.deleteDomClickCallback,
|
|
125
|
-
|
|
125
|
+
cancel: this.cancelDeleteClickCallback
|
|
126
126
|
}).appendTo(this.container), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.onWantsTapGesture), this.five.on("wantsToMoveToPano", this.onWantsToMoveToPano), this.five.helperVisible = !1, this.hook.emit("editedDashedLineChange", null), this.hook.on("getStartPoint", this.onGetStartPoint), this.hook.on("getEndPoint", this.onGetEndPoint), this.hook.on("nowPointChange", this.onNowPointChange), this.hook.on("willChangeState", this.onWillChangeState), this.five.refresh();
|
|
127
127
|
}
|
|
128
128
|
dispose() {
|
|
@@ -14,9 +14,9 @@ export default class WatchController extends BaseController {
|
|
|
14
14
|
highlightLine(line: Line): void;
|
|
15
15
|
clearHighlightLines(): void;
|
|
16
16
|
private highlightArea;
|
|
17
|
+
private unHighlightArea;
|
|
17
18
|
private highlightLines;
|
|
18
19
|
private unHighlightLines;
|
|
19
|
-
private unHighlightArea;
|
|
20
20
|
private onPanStart;
|
|
21
21
|
private onPanEnd;
|
|
22
22
|
private onPan;
|
|
@@ -8,8 +8,8 @@ import G from "./BaseController.js";
|
|
|
8
8
|
import { Raycaster as T, Vector2 as u } from "three";
|
|
9
9
|
import { closestPointOnLine as U } from "../utils/math.js";
|
|
10
10
|
import { findClosestPoint as b } from "../utils/findClosestPoint.js";
|
|
11
|
-
import { findAssociatedLines as
|
|
12
|
-
import { getPointFromHammerEvent as
|
|
11
|
+
import { findAssociatedLines as w } from "../utils/findAssociatedLines.js";
|
|
12
|
+
import { getPointFromHammerEvent as D } from "../../shared-utils/getPointFromHammerEvent.js";
|
|
13
13
|
import j from "../Model/area.js";
|
|
14
14
|
import x from "../Model/polygon.js";
|
|
15
15
|
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
@@ -50,14 +50,14 @@ class Pe extends G {
|
|
|
50
50
|
var a;
|
|
51
51
|
if (this.model.getAllLines().length === 0 || !this.fiveElement)
|
|
52
52
|
return;
|
|
53
|
-
const i =
|
|
53
|
+
const i = D(e).point, t = (a = b(this.five, this.model.getAllPoints(), i, 20)) == null ? void 0 : a.point;
|
|
54
54
|
if (!t) {
|
|
55
55
|
this.editPointState = void 0;
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
const n = {
|
|
59
59
|
point: t,
|
|
60
|
-
associatedLines:
|
|
60
|
+
associatedLines: w(t.lines[0])
|
|
61
61
|
};
|
|
62
62
|
this.hook.emit("wantsDragLine", {
|
|
63
63
|
point: t.id,
|
|
@@ -70,7 +70,7 @@ class Pe extends G {
|
|
|
70
70
|
s(this, "onPan", (e) => {
|
|
71
71
|
if (!this.editPointState || !this.fiveElement)
|
|
72
72
|
return;
|
|
73
|
-
const i =
|
|
73
|
+
const i = D(e).ndcPoint, t = new T();
|
|
74
74
|
t.setFromCamera(i, this.five.camera);
|
|
75
75
|
const [n] = this.five.model.intersectRaycaster(t);
|
|
76
76
|
n && this.onIntersectionUpdate(n);
|
|
@@ -129,14 +129,14 @@ class Pe extends G {
|
|
|
129
129
|
});
|
|
130
130
|
s(this, "chooseLine", (e) => {
|
|
131
131
|
this.choose = "line";
|
|
132
|
-
const i =
|
|
132
|
+
const i = w(e);
|
|
133
133
|
this.deleteDom.setLines(i).updatePosition().show(), this.highlightLines(i), this.five.needsRender = !0, this.hook.emit(
|
|
134
134
|
"selectedChange",
|
|
135
135
|
i.map((t) => t)
|
|
136
136
|
);
|
|
137
137
|
});
|
|
138
138
|
s(this, "chooseArea", (e, i) => {
|
|
139
|
-
this.
|
|
139
|
+
this.deleteDom.setTarget(e).updatePosition(i.left, `calc(${i.top} - 20px)`).show(), this.highlightArea(e);
|
|
140
140
|
});
|
|
141
141
|
s(this, "polylineRemoved", (e) => {
|
|
142
142
|
e.lines.forEach((i) => this.removeLine(i)), this.hook.emit(
|
|
@@ -162,7 +162,7 @@ class Pe extends G {
|
|
|
162
162
|
onClick: () => {
|
|
163
163
|
this.choose === "line" ? this.deleteLine() : this.choose instanceof j && this.deleteArea(this.choose);
|
|
164
164
|
},
|
|
165
|
-
|
|
165
|
+
cancel: this.cancelDeleteClickCallback
|
|
166
166
|
}).appendTo(this.container), this.model.getAllLines().forEach((t) => {
|
|
167
167
|
t.distanceItem.appendTo(this.container), t.distanceItem.update(this.five), t.hook.on("selected", this.chooseLine), t.distanceItem.setCanSelect(!0), this.group.add(t.mesh);
|
|
168
168
|
}), this.model.getAllAreas().forEach((t) => {
|
|
@@ -191,19 +191,20 @@ class Pe extends G {
|
|
|
191
191
|
highlightArea(e) {
|
|
192
192
|
this.unHighlightLines(), this.unHighlightArea(), this.highlightLines(e.polyline.lines), this.five.needsRender = !0;
|
|
193
193
|
}
|
|
194
|
+
unHighlightArea(e) {
|
|
195
|
+
const i = e != null ? e : this.highlightedArea;
|
|
196
|
+
i && (this.unHighlightLines(i.polyline.lines), this.five.needsRender = !0);
|
|
197
|
+
}
|
|
194
198
|
highlightLines(e) {
|
|
195
199
|
this.unHighlightLines(), this.highlightedLines = e, e.forEach((i) => this.highlightLine(i));
|
|
196
200
|
}
|
|
197
201
|
unHighlightLines(e) {
|
|
202
|
+
this.unHighlightArea();
|
|
198
203
|
const i = e != null ? e : this.highlightedLines;
|
|
199
204
|
i && i.forEach((t) => {
|
|
200
205
|
t.selected = !1, t.distanceItem.unHighlight(), this.group.remove(t.lightMesh), this.five.needsRender = !0;
|
|
201
206
|
});
|
|
202
207
|
}
|
|
203
|
-
unHighlightArea(e) {
|
|
204
|
-
const i = e != null ? e : this.highlightedArea;
|
|
205
|
-
i && (this.unHighlightLines(i.polyline.lines), this.five.needsRender = !0);
|
|
206
|
-
}
|
|
207
208
|
}
|
|
208
209
|
export {
|
|
209
210
|
Pe as default
|
|
@@ -12,6 +12,7 @@ import { type UIControllerParams } from '../Modules/UIController';
|
|
|
12
12
|
import { type GuideControllerParams } from '../Modules/GuideController';
|
|
13
13
|
import { Magnifier } from '../../shared-utils';
|
|
14
14
|
import type { MagnifierParameter } from '../../shared-utils';
|
|
15
|
+
import type Area from '../Model/area';
|
|
15
16
|
export type Mode = 'Watch' | 'Edit' | 'Mixed' | 'View';
|
|
16
17
|
export interface PanoMeasureParameterType extends Partial<Config> {
|
|
17
18
|
editParams?: EditParameter;
|
|
@@ -75,6 +76,7 @@ export default class MeasureController {
|
|
|
75
76
|
/** 撤销编辑 */
|
|
76
77
|
revoke(): void;
|
|
77
78
|
removePolyline(polyline: Polyline): void;
|
|
79
|
+
removeArea(area: Area): void;
|
|
78
80
|
removePolylineByID(id: string): void;
|
|
79
81
|
getPolylineByID(id: string): Polyline;
|
|
80
82
|
getEditedPolyline(): void;
|
|
@@ -96,6 +98,7 @@ export default class MeasureController {
|
|
|
96
98
|
/** 导出数据 */
|
|
97
99
|
toJson(): PluginData;
|
|
98
100
|
/**
|
|
101
|
+
* @deprecated 暂不支持
|
|
99
102
|
* @description 改变插件的模式(pc端模式或移动端模式)
|
|
100
103
|
* @param isMobile true为移动端模式,false为pc端
|
|
101
104
|
*/
|