@realsee/dnalogel 2.20.5 → 2.21.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GuideLinePlugin/Controller.d.ts +3 -5
- package/dist/GuideLinePlugin/GuideLineItem.d.ts +1 -1
- package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +0 -17
- package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -7
- package/dist/PanoMeasurePlugin/Components/Common/CircleButton.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Components/Common/Switcher1.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Components/Controller1.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +10 -4
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +10 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +9 -2
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +21 -8
- package/dist/PanoMeasurePlugin/Model/area.d.ts +62 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +9 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +4 -1
- package/dist/PanoMeasurePlugin/Model/polygon.d.ts +10 -0
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/typings/data.d.ts +18 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +10 -3
- package/dist/PanoMeasurePlugin/typings/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/dom/areaDom.d.ts +22 -0
- package/dist/PanoMeasurePlugin/utils/dom/base.d.ts +25 -0
- package/dist/PanoMeasurePlugin/utils/dom/distanceItem.d.ts +27 -0
- package/dist/PanoMeasurePlugin/utils/generatePolygonGeometry.d.ts +6 -0
- package/dist/PanoMeasurePlugin/utils/geometryUtil.d.ts +7 -0
- package/dist/PanoMeasurePlugin/utils/isIntersecting.d.ts +15 -0
- package/dist/PanoMeasurePlugin/utils/line.d.ts +2 -1
- package/dist/index.cjs.js +64 -64
- package/dist/index.js +7976 -7345
- package/dist/index.umd.js +57 -57
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +3 -7
- package/dist/shared-utils/safeObj.d.ts +1 -0
- package/dist/shared-utils/three/IObject3D.d.ts +7 -0
- package/dist/shared-utils/three/Magnifier.d.ts +3 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +30 -30
- package/docs/classes/CruisePluginController.html +25 -25
- package/docs/classes/GuideLineItem.GuideLineItem.html +19 -19
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +31 -86
- package/docs/classes/Magnifier.html +19 -19
- package/docs/classes/ModelRoomLabelController.html +10 -10
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +14 -14
- package/docs/classes/PanoMeasurePluginLine.html +50 -105
- package/docs/classes/PanoMeasurePluginModel.html +65 -23
- package/docs/classes/PanoMeasurePluginPoint.html +13 -13
- package/docs/classes/PanoMeasurePluginPolyline.html +37 -25
- package/docs/classes/PanoTagPluginController.html +46 -46
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +11 -11
- package/docs/classes/Util.Interval.html +11 -11
- package/docs/classes/Util.Magnifier.html +29 -16
- package/docs/classes/Util.PointDomHelper.html +10 -10
- package/docs/classes/Util.PointHelper.html +10 -10
- package/docs/classes/Util.Rectangle.html +12 -12
- package/docs/enums/CameraMovementEffect.html +6 -6
- package/docs/enums/ContentType.html +19 -19
- package/docs/enums/DIRECTION.html +8 -8
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +8 -8
- package/docs/enums/DimensionType.html +6 -6
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +7 -7
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +8 -8
- package/docs/enums/PaintBrushTypeEnum.html +7 -7
- package/docs/enums/PointType.html +6 -6
- package/docs/enums/Rotation.html +7 -7
- package/docs/functions/CSS3DRenderPlugin.html +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +4 -4
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/PanoVideoPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +4 -4
- package/docs/functions/Util.getCoordsFromElement.html +4 -4
- package/docs/functions/Util.getFrameTime.html +4 -4
- package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -4
- package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -4
- package/docs/functions/Util.isAbsoluteURL.html +4 -4
- package/docs/functions/Util.isModelLike.html +4 -4
- package/docs/functions/Util.isNil.html +4 -4
- package/docs/functions/Util.isPanoramaLike.html +4 -4
- package/docs/functions/Util.nextFrame.html +4 -4
- package/docs/functions/Util.notNil.html +4 -4
- package/docs/functions/Util.requestAnimationFrameInterval.html +4 -4
- package/docs/functions/Util.tweenProgress.html +4 -4
- package/docs/functions/Util.uuid.html +4 -4
- package/docs/functions/pluginFlag.html +4 -4
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +5 -5
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +10 -10
- package/docs/interfaces/CSS3DRenderPluginState.html +7 -7
- package/docs/interfaces/CameraMovementPluginExportType.html +6 -6
- package/docs/interfaces/CruisePluginTypes.Config.html +7 -7
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +11 -11
- package/docs/interfaces/CruisePluginTypes.EventMap.html +19 -19
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +11 -11
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +13 -13
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +13 -13
- package/docs/interfaces/CruisePluginTypes.PluginData.html +8 -8
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +6 -6
- package/docs/interfaces/CruisePluginTypes.PluginState.html +10 -10
- package/docs/interfaces/EventMap.html +14 -14
- package/docs/interfaces/FloorplanBounding.html +7 -7
- package/docs/interfaces/FloorplanData.html +9 -9
- package/docs/interfaces/FloorplanEntrance.html +10 -10
- package/docs/interfaces/FloorplanExtraObject.html +9 -9
- package/docs/interfaces/FloorplanExtraObject3D.html +7 -7
- package/docs/interfaces/FloorplanFloorData.html +8 -8
- package/docs/interfaces/FloorplanImagePosition.html +6 -6
- package/docs/interfaces/FloorplanObserver.html +8 -8
- package/docs/interfaces/FloorplanOutlineItem.html +8 -8
- package/docs/interfaces/FloorplanPosition.html +6 -6
- package/docs/interfaces/FloorplanRoomItem.html +12 -12
- package/docs/interfaces/FloorplanRoomLabelItem.html +6 -6
- package/docs/interfaces/FloorplanServerBounding.html +7 -7
- package/docs/interfaces/FloorplanServerComputedData.html +9 -9
- package/docs/interfaces/FloorplanServerData.html +6 -6
- package/docs/interfaces/FloorplanServerDoorItem.html +9 -9
- package/docs/interfaces/FloorplanServerDoorPosition.html +7 -7
- package/docs/interfaces/FloorplanServerEntrance.html +10 -10
- package/docs/interfaces/FloorplanServerFloorData.html +8 -8
- package/docs/interfaces/FloorplanServerImagePosition.html +6 -6
- package/docs/interfaces/FloorplanServerObserver.html +8 -8
- package/docs/interfaces/FloorplanServerOutlineItem.html +8 -8
- package/docs/interfaces/FloorplanServerPosition.html +6 -6
- package/docs/interfaces/FloorplanServerRoomItem.html +13 -13
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +6 -6
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +7 -7
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +9 -9
- package/docs/interfaces/GuideLinePluginType.EventMap.html +12 -12
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +7 -7
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +5 -5
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +12 -12
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +7 -7
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +17 -17
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +6 -6
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +17 -17
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +4 -4
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +6 -6
- package/docs/interfaces/GuideLinePluginType.PluginState.html +7 -7
- package/docs/interfaces/GuideLinePluginType.Route.html +10 -10
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +8 -8
- package/docs/interfaces/HelperOffset.html +7 -7
- package/docs/interfaces/ImagePlaneGroup.html +5 -5
- package/docs/interfaces/ItemLabelPluginData.html +5 -5
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +10 -10
- package/docs/interfaces/ItemLabelPluginParametersType.html +8 -8
- package/docs/interfaces/MinMax.html +6 -6
- package/docs/interfaces/ModelChassisCompassPluginData.html +6 -6
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +6 -6
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +7 -7
- package/docs/interfaces/ModelItemLabelPluginData.html +5 -5
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +10 -10
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +6 -6
- package/docs/interfaces/ModelRoomLabelPluginData.html +5 -5
- package/docs/interfaces/ModelTVVideoPluginData.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginExportType.html +7 -7
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +5 -5
- package/docs/interfaces/ModelViewPluginExportType.html +10 -10
- package/docs/interfaces/Object3DHelperState.html +7 -7
- package/docs/interfaces/ObjectHelperControllers.html +8 -8
- package/docs/interfaces/PaintBrushAction.html +11 -11
- package/docs/interfaces/PaintBrushConfigs.html +11 -11
- package/docs/interfaces/PaintBrushState.html +9 -9
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +9 -9
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +4 -4
- package/docs/interfaces/PanoMeasureParameterType.html +21 -14
- package/docs/interfaces/PanoMeasurePluginLineJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +6 -6
- package/docs/interfaces/PanoMeasurePluginPointJson.html +6 -6
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +7 -7
- package/docs/interfaces/PanoRulerPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerPluginOptions.html +6 -6
- package/docs/interfaces/PanoRulerPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginExportType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginOptions.html +6 -6
- package/docs/interfaces/PanoRulerProPluginParameterType.html +6 -6
- package/docs/interfaces/PanoRulerProPluginState.html +7 -7
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginData.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +9 -9
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +12 -12
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +9 -9
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +12 -12
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +9 -9
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +5 -5
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +7 -7
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +5 -5
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +5 -5
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +7 -7
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +9 -9
- package/docs/interfaces/Point.html +7 -7
- package/docs/interfaces/Room.html +8 -8
- package/docs/interfaces/RoomInfo.html +6 -6
- package/docs/interfaces/RoomLabel.html +13 -13
- package/docs/interfaces/RoomRules.html +4 -4
- package/docs/interfaces/Rooms.html +4 -4
- package/docs/interfaces/Scissor.html +8 -8
- package/docs/interfaces/State.html +7 -7
- package/docs/interfaces/TagCacheInterface.html +11 -11
- package/docs/interfaces/TagConfig.html +12 -12
- package/docs/interfaces/TagGLTFObjectGroup.html +5 -5
- package/docs/interfaces/TagIconUrl.html +11 -11
- package/docs/interfaces/TagObjectGroup.html +5 -5
- package/docs/interfaces/TagStyle.html +5 -5
- package/docs/interfaces/Tags.html +8 -8
- package/docs/interfaces/TemporaryState.html +5 -5
- package/docs/interfaces/Util.MagnifierParameter.html +10 -10
- package/docs/interfaces/Util.MouseGroupParameter.html +7 -7
- package/docs/modules/CruisePluginTypes.html +4 -4
- package/docs/modules/GuideLineItem.html +4 -4
- package/docs/modules/GuideLineModeItem.html +4 -4
- package/docs/modules/GuideLinePluginType.html +4 -4
- package/docs/modules/PanoVideoPluginType.html +4 -4
- package/docs/modules/Util.html +4 -4
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +4 -4
- package/docs/types/AudioAppearance.html +4 -4
- package/docs/types/AudioTagTypeConfigKey.html +4 -4
- package/docs/types/CSS3DRenderExportType.html +4 -4
- package/docs/types/CSS3DRenderPluginExportType.html +4 -4
- package/docs/types/CSS3DRenderPluginParameterType.html +4 -4
- package/docs/types/ClassFunctionParameters.html +4 -4
- package/docs/types/Color.html +4 -4
- package/docs/types/ContentTypeConfigKey.html +4 -4
- package/docs/types/ContentTypeConfigKeySplit.html +4 -4
- package/docs/types/ContentTypeMap.html +4 -4
- package/docs/types/Create3DDomContainerReturnType.html +4 -4
- package/docs/types/Create3DElementReturnType.html +4 -4
- package/docs/types/CruisePluginExportType.html +4 -4
- package/docs/types/CruisePluginTypes.CruiseData.html +4 -4
- package/docs/types/CruisePluginTypes.MoveEffect.html +4 -4
- package/docs/types/DeprecatedMediaPlaneProperty.html +4 -4
- package/docs/types/DeprecatedTagProperty.html +4 -4
- package/docs/types/Direction-1.html +4 -4
- package/docs/types/Direction4.html +4 -4
- package/docs/types/ElementRenderer.html +4 -4
- package/docs/types/FloorplanRuleLabels.html +4 -4
- package/docs/types/FloorplanServerRuleLabels.html +4 -4
- package/docs/types/GuideLinePluginExportType.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineItem.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +4 -4
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +4 -4
- package/docs/types/GuideLinePluginType.PathItem.html +4 -4
- package/docs/types/GuideLinePluginType.PluginData.html +4 -4
- package/docs/types/HelperEventMap.html +4 -4
- package/docs/types/LoadTagConfig.html +4 -4
- package/docs/types/MapviewFloorplanPluginParameterType.html +4 -4
- package/docs/types/MapviewFloorplanPluginReturnType.html +4 -4
- package/docs/types/MediaData.html +4 -4
- package/docs/types/MediaStore.html +4 -4
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +4 -4
- package/docs/types/ModelFloorplanPluginParameterType.html +4 -4
- package/docs/types/ModelFloorplanPluginReturnType.html +4 -4
- package/docs/types/ModelRoomLabelPluginParameters.html +4 -4
- package/docs/types/ModelRoomLabelPluginReturnType.html +4 -4
- package/docs/types/MoveArgs.html +4 -4
- package/docs/types/MoveOpts.html +4 -4
- package/docs/types/Object3DHelperEventMap.html +4 -4
- package/docs/types/ObjectFit.html +4 -4
- package/docs/types/PaintBrushEventMap.html +4 -4
- package/docs/types/PanoCompassPluginData.html +4 -4
- package/docs/types/PanoCompassPluginExportType.html +4 -4
- package/docs/types/PanoCompassPluginParameterType.html +4 -4
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +4 -4
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +4 -4
- package/docs/types/PanoIndex.html +4 -4
- package/docs/types/PanoMeasurePluginEvent.html +4 -4
- package/docs/types/PanoMeasureReturnType.html +4 -4
- package/docs/types/PanoSpatialTagPluginId.html +4 -4
- package/docs/types/PanoTagPluginExportInterface.html +4 -4
- package/docs/types/PanoTagPluginParamsInterface.html +4 -4
- package/docs/types/PanoVideoPluginParameterType.html +4 -4
- package/docs/types/PanoVideoPluginReturnType.html +4 -4
- package/docs/types/PartialObjectDeep.html +4 -4
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +4 -4
- package/docs/types/PlaneTag.html +4 -4
- package/docs/types/Point2DTag.html +4 -4
- package/docs/types/Point3DTag.html +4 -4
- package/docs/types/PointTag.html +4 -4
- package/docs/types/PointTagInstance.html +4 -4
- package/docs/types/Position.html +4 -4
- package/docs/types/RotateArgs.html +4 -4
- package/docs/types/RotateOpts.html +4 -4
- package/docs/types/RuleLabelsKey.html +4 -4
- package/docs/types/RuleLabelsValue.html +4 -4
- package/docs/types/StickType.html +4 -4
- package/docs/types/Tag.html +4 -4
- package/docs/types/Tag2D.html +4 -4
- package/docs/types/Tag3D.html +4 -4
- package/docs/types/TagContentType.html +4 -4
- package/docs/types/TagDimensionType.html +4 -4
- package/docs/types/TagElement.html +4 -4
- package/docs/types/TagEvents.html +4 -4
- package/docs/types/TagGLTFObject.html +4 -4
- package/docs/types/TagHooks.html +4 -4
- package/docs/types/TagId.html +4 -4
- package/docs/types/TagInstance.html +4 -4
- package/docs/types/TagPointType.html +4 -4
- package/docs/types/TagRendererMap.html +4 -4
- package/docs/types/TopviewFloorplanPluginParameterType.html +4 -4
- package/docs/types/TopviewFloorplanPluginReturnType.html +4 -4
- package/docs/types/WorkCode.html +4 -4
- package/docs/variables/FLOOR_TYPE_MAP.html +4 -4
- package/docs/variables/PLUGIN.html +4 -4
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +4 -4
- package/docs/variables/ROOM_TYPE_MAP.html +4 -4
- package/docs/variables/itemLabelPluginServerParams.html +4 -4
- package/docs/variables/modelItemLabelPluginServerParams.html +4 -4
- package/docs/variables/modelRoomLabelPluginServerParams.html +4 -4
- package/libs/GuideLinePlugin/Components/Tag.js +41 -134
- package/libs/GuideLinePlugin/Controller.d.ts +3 -5
- package/libs/GuideLinePlugin/Controller.js +44 -48
- package/libs/GuideLinePlugin/GuideLineItem/index.js +1 -1
- package/libs/GuideLinePlugin/GuideLineItem.d.ts +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +113 -150
- package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +0 -17
- package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -7
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +17 -19
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +77 -77
- package/libs/Object3DHelperPlugin/Controller.js +3 -2
- package/libs/Object3DHelperPlugin/index.js +6 -5
- package/libs/PanoMeasurePlugin/Components/Common/CircleButton.js +57 -0
- package/libs/PanoMeasurePlugin/Components/Common/CircleButton.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Components/Common/Switcher0.js +250 -0
- package/libs/PanoMeasurePlugin/Components/Common/Switcher0.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Components/Common/Switcher1.js +211 -0
- package/libs/PanoMeasurePlugin/Components/Common/Switcher1.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Components/Controller0.js +117 -0
- package/libs/PanoMeasurePlugin/Components/Controller0.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Components/Controller1.js +157 -0
- package/libs/PanoMeasurePlugin/Components/Controller1.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +10 -4
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +27 -21
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +10 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.js +154 -74
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +26 -25
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +5 -4
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +9 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +99 -53
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +21 -8
- package/libs/PanoMeasurePlugin/Controller/index.js +111 -73
- package/libs/PanoMeasurePlugin/Model/area.d.ts +62 -0
- package/libs/PanoMeasurePlugin/Model/area.js +98 -0
- package/libs/PanoMeasurePlugin/Model/index.d.ts +9 -0
- package/libs/PanoMeasurePlugin/Model/index.js +27 -12
- package/libs/PanoMeasurePlugin/Model/line.d.ts +4 -1
- package/libs/PanoMeasurePlugin/Model/line.js +15 -8
- package/libs/PanoMeasurePlugin/Model/polygon.d.ts +10 -0
- package/libs/PanoMeasurePlugin/Model/polygon.js +38 -0
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Model/polyline.js +15 -8
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +27 -25
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +3 -3
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +34 -25
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/index.js +43 -14
- package/libs/PanoMeasurePlugin/typings/data.d.ts +18 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +10 -3
- package/libs/PanoMeasurePlugin/typings/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.d.ts +22 -0
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +29 -0
- package/libs/PanoMeasurePlugin/utils/dom/base.d.ts +25 -0
- package/libs/PanoMeasurePlugin/utils/dom/base.js +72 -0
- package/libs/PanoMeasurePlugin/utils/dom/distanceItem.d.ts +27 -0
- package/libs/PanoMeasurePlugin/utils/dom/distanceItem.js +47 -0
- package/libs/PanoMeasurePlugin/utils/generatePolygonGeometry.d.ts +6 -0
- package/libs/PanoMeasurePlugin/utils/generatePolygonGeometry.js +13 -0
- package/libs/PanoMeasurePlugin/utils/geometryUtil.d.ts +7 -0
- package/libs/PanoMeasurePlugin/utils/geometryUtil.js +37 -0
- package/libs/PanoMeasurePlugin/utils/isIntersecting.d.ts +15 -0
- package/libs/PanoMeasurePlugin/utils/isIntersecting.js +25 -0
- package/libs/PanoMeasurePlugin/utils/line.d.ts +2 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +1 -1
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/Components/RoomHighlight/Room.js +54 -54
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +8 -8
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +28 -30
- package/libs/index.js +123 -110
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +3 -7
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +29 -49
- package/libs/shared-utils/logger.js +2 -2
- package/libs/shared-utils/safeObj.d.ts +1 -0
- package/libs/shared-utils/safeObj.js +6 -0
- package/libs/shared-utils/three/IObject3D.d.ts +7 -0
- package/libs/shared-utils/three/IObject3D.js +25 -0
- package/libs/shared-utils/three/Magnifier.d.ts +3 -0
- package/libs/shared-utils/three/Magnifier.js +11 -9
- package/libs/shared-utils/three/centerPoint.js +1 -3
- package/package.json +4 -2
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +0 -30
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +0 -30
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +0 -83
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { SvelteComponent as $, init as j, safe_not_equal as q, append_styles as B, element as p, create_component as y, space as w, attr as v, toggle_class as S, insert as D, append as i, mount_component as A, listen as P, transition_in as T, transition_out as E, detach as W, destroy_component as K, run_all as F, onMount as G, onDestroy as H } from "../../vendor/svelte/internal/index.js";
|
|
2
|
+
import I from "./Common/Switcher1.js";
|
|
3
|
+
import J from "./Common/CircleButton.js";
|
|
4
|
+
import "../Modules/UIController/mobileHTML.js";
|
|
5
|
+
function L(o) {
|
|
6
|
+
B(o, "svelte-12klgza", ".Measure-Controller.svelte-12klgza.svelte-12klgza{pointer-events:none;color:white}.Measure-Controller.svelte-12klgza .mode-switcher.svelte-12klgza{margin-top:2.25rem}.Measure-Controller.svelte-12klgza .bottom.svelte-12klgza{position:absolute;width:100%;bottom:2.5rem}.Measure-Controller.svelte-12klgza .bottom .center.svelte-12klgza{display:flex;flex-direction:column;align-items:center}.Measure-Controller.svelte-12klgza .controller.svelte-12klgza{pointer-events:all;display:flex;align-items:center}.Measure-Controller.svelte-12klgza .controller .button.svelte-12klgza{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;padding-left:1rem;padding-right:1rem;border-radius:624.9375rem;font-size:0.875rem;background-color:rgba(0, 0, 0, 0.2)}.Measure-Controller.svelte-12klgza .controller .main-button.svelte-12klgza{margin-left:1.75rem;margin-right:1.75rem}.Measure-Controller.svelte-12klgza .controller .main-button.forbid.svelte-12klgza{pointer-events:none;opacity:0.5}");
|
|
7
|
+
}
|
|
8
|
+
function N(o) {
|
|
9
|
+
let d, n, e, k, u, z, r, a, h, c, g, M, m, f, C, _;
|
|
10
|
+
return u = new I({
|
|
11
|
+
props: {
|
|
12
|
+
options: [{ key: "line", value: "测距离" }, { key: "area", value: "测面积" }],
|
|
13
|
+
defaultKey: (
|
|
14
|
+
/*measureController*/
|
|
15
|
+
o[0].currentMeasureType
|
|
16
|
+
),
|
|
17
|
+
onChange: (
|
|
18
|
+
/*func*/
|
|
19
|
+
o[10]
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
}), g = new J({
|
|
23
|
+
props: {
|
|
24
|
+
onClick: (
|
|
25
|
+
/*func_1*/
|
|
26
|
+
o[12]
|
|
27
|
+
),
|
|
28
|
+
text: (
|
|
29
|
+
/*buttonTextMap*/
|
|
30
|
+
o[3][
|
|
31
|
+
/*buttonState*/
|
|
32
|
+
o[2]
|
|
33
|
+
]
|
|
34
|
+
),
|
|
35
|
+
color: (
|
|
36
|
+
/*buttonColorMap*/
|
|
37
|
+
o[4][
|
|
38
|
+
/*buttonState*/
|
|
39
|
+
o[2]
|
|
40
|
+
]
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
}), {
|
|
44
|
+
c() {
|
|
45
|
+
d = p("div"), n = p("div"), e = p("div"), k = p("div"), y(u.$$.fragment), z = w(), r = p("div"), a = p("div"), a.textContent = "撤销", h = w(), c = p("div"), y(g.$$.fragment), M = w(), m = p("div"), m.textContent = "结束", v(k, "class", "mode-switcher svelte-12klgza"), v(a, "class", "button svelte-12klgza"), v(c, "class", "main-button svelte-12klgza"), S(c, "forbid", !/*allowAddPoint*/
|
|
46
|
+
o[1]), v(m, "class", "button svelte-12klgza"), v(r, "class", "controller svelte-12klgza"), v(e, "class", "center svelte-12klgza"), v(n, "class", "bottom svelte-12klgza"), v(d, "class", "Measure-Controller svelte-12klgza");
|
|
47
|
+
},
|
|
48
|
+
m(t, s) {
|
|
49
|
+
D(t, d, s), i(d, n), i(n, e), i(e, k), A(u, k, null), i(e, z), i(e, r), i(r, a), i(r, h), i(r, c), A(g, c, null), i(r, M), i(r, m), f = !0, C || (_ = [
|
|
50
|
+
P(
|
|
51
|
+
a,
|
|
52
|
+
"click",
|
|
53
|
+
/*click_handler*/
|
|
54
|
+
o[11]
|
|
55
|
+
),
|
|
56
|
+
P(
|
|
57
|
+
m,
|
|
58
|
+
"click",
|
|
59
|
+
/*click_handler_1*/
|
|
60
|
+
o[13]
|
|
61
|
+
)
|
|
62
|
+
], C = !0);
|
|
63
|
+
},
|
|
64
|
+
p(t, [s]) {
|
|
65
|
+
const b = {};
|
|
66
|
+
s & /*measureController*/
|
|
67
|
+
1 && (b.defaultKey = /*measureController*/
|
|
68
|
+
t[0].currentMeasureType), s & /*measureController*/
|
|
69
|
+
1 && (b.onChange = /*func*/
|
|
70
|
+
t[10]), u.$set(b);
|
|
71
|
+
const l = {};
|
|
72
|
+
s & /*buttonState*/
|
|
73
|
+
4 && (l.onClick = /*func_1*/
|
|
74
|
+
t[12]), s & /*buttonState*/
|
|
75
|
+
4 && (l.text = /*buttonTextMap*/
|
|
76
|
+
t[3][
|
|
77
|
+
/*buttonState*/
|
|
78
|
+
t[2]
|
|
79
|
+
]), s & /*buttonState*/
|
|
80
|
+
4 && (l.color = /*buttonColorMap*/
|
|
81
|
+
t[4][
|
|
82
|
+
/*buttonState*/
|
|
83
|
+
t[2]
|
|
84
|
+
]), g.$set(l), (!f || s & /*allowAddPoint*/
|
|
85
|
+
2) && S(c, "forbid", !/*allowAddPoint*/
|
|
86
|
+
t[1]);
|
|
87
|
+
},
|
|
88
|
+
i(t) {
|
|
89
|
+
f || (T(u.$$.fragment, t), T(g.$$.fragment, t), f = !0);
|
|
90
|
+
},
|
|
91
|
+
o(t) {
|
|
92
|
+
E(u.$$.fragment, t), E(g.$$.fragment, t), f = !1;
|
|
93
|
+
},
|
|
94
|
+
d(t) {
|
|
95
|
+
t && W(d), K(u), K(g), C = !1, F(_);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function O(o, d, n) {
|
|
100
|
+
let { measureController: e } = d;
|
|
101
|
+
const k = { start: "开始", add: "添加", end: "结束" }, u = {
|
|
102
|
+
start: "white",
|
|
103
|
+
add: "white",
|
|
104
|
+
end: "blue"
|
|
105
|
+
};
|
|
106
|
+
let z = !0, r = !1, a = "editing", h = "start";
|
|
107
|
+
const c = () => {
|
|
108
|
+
n(8, r = !0), e.getCurrentMode() !== "Edit" && e.changeMode("Edit");
|
|
109
|
+
}, g = () => {
|
|
110
|
+
}, M = () => {
|
|
111
|
+
}, m = (l) => {
|
|
112
|
+
l === "Edit" ? n(9, a = "editing") : n(9, a = null);
|
|
113
|
+
}, f = () => {
|
|
114
|
+
n(9, a = "readyComplete");
|
|
115
|
+
}, C = (l) => {
|
|
116
|
+
n(1, z = l === "allow");
|
|
117
|
+
};
|
|
118
|
+
G(() => {
|
|
119
|
+
e.hook.on("modeChange", m), e.hook.on("allowAddPointStateChange", C), e.hook.on("readyComplete", f);
|
|
120
|
+
}), H(() => {
|
|
121
|
+
e.hook.off("modeChange", m), e.hook.off("allowAddPointStateChange", C), e.hook.off("readyComplete", f);
|
|
122
|
+
});
|
|
123
|
+
const _ = (l) => {
|
|
124
|
+
e.changeMeasureType(l);
|
|
125
|
+
}, t = () => e.revoke(), s = () => {
|
|
126
|
+
h === "start" && c();
|
|
127
|
+
}, b = () => e.save({ mode: "Watch" });
|
|
128
|
+
return o.$$set = (l) => {
|
|
129
|
+
"measureController" in l && n(0, e = l.measureController);
|
|
130
|
+
}, o.$$.update = () => {
|
|
131
|
+
o.$$.dirty & /*started, state*/
|
|
132
|
+
768 && n(2, h = (() => r ? a === "editing" ? "add" : a === "readyComplete" ? "end" : "start" : "start")());
|
|
133
|
+
}, [
|
|
134
|
+
e,
|
|
135
|
+
z,
|
|
136
|
+
h,
|
|
137
|
+
k,
|
|
138
|
+
u,
|
|
139
|
+
c,
|
|
140
|
+
g,
|
|
141
|
+
M,
|
|
142
|
+
r,
|
|
143
|
+
a,
|
|
144
|
+
_,
|
|
145
|
+
t,
|
|
146
|
+
s,
|
|
147
|
+
b
|
|
148
|
+
];
|
|
149
|
+
}
|
|
150
|
+
class X extends $ {
|
|
151
|
+
constructor(d) {
|
|
152
|
+
super(), j(this, d, O, N, q, { measureController: 0 }, L);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
export {
|
|
156
|
+
X as default
|
|
157
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SvelteComponentTyped as default } from 'svelte/internal';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type Magnifier from '../Modules/Magnifier';
|
|
2
1
|
import type FiveHelper from '../Modules/FiveHelper';
|
|
3
|
-
import type
|
|
2
|
+
import { type Group } from 'three';
|
|
4
3
|
import type { Model } from '../Model';
|
|
5
4
|
import type { Config } from '../typings';
|
|
6
5
|
import type { PanoMeasurePluginEvent } from '../typings/event.type';
|
|
7
|
-
import type { UserDistanceItem } from '../utils/
|
|
6
|
+
import type { UserDistanceItem } from '../utils/dom/distanceItem';
|
|
8
7
|
import type { Five, Intersection, IntersectMeshInterface, Subscribe } from '@realsee/five';
|
|
9
|
-
import type { OpenParameter } from '../typings/data';
|
|
8
|
+
import type { OpenParameter, EditParameter, MeasureType } from '../typings/data';
|
|
10
9
|
import Line from '../Model/line';
|
|
10
|
+
import type { Magnifier } from '../../shared-utils';
|
|
11
11
|
export interface ControllerParams {
|
|
12
12
|
five: Five;
|
|
13
13
|
group: Group;
|
|
@@ -18,6 +18,8 @@ export interface ControllerParams {
|
|
|
18
18
|
magnifier: Magnifier;
|
|
19
19
|
fiveHelper: FiveHelper;
|
|
20
20
|
openParams: OpenParameter;
|
|
21
|
+
editParams: EditParameter;
|
|
22
|
+
getMeasureType: () => MeasureType;
|
|
21
23
|
hook: Subscribe<PanoMeasurePluginEvent>;
|
|
22
24
|
userDistanceItemCreator?: () => UserDistanceItem;
|
|
23
25
|
}
|
|
@@ -27,14 +29,18 @@ export default class BaseController {
|
|
|
27
29
|
protected group: Group;
|
|
28
30
|
protected config: Config;
|
|
29
31
|
protected dashed: Line;
|
|
32
|
+
protected perpendicularDashed: Line;
|
|
30
33
|
protected disposed: boolean;
|
|
31
34
|
protected isMobile: boolean;
|
|
32
35
|
protected mouseGroup: Group;
|
|
33
36
|
protected container: Element;
|
|
34
37
|
protected fiveHelper: FiveHelper;
|
|
38
|
+
protected editParams: EditParameter;
|
|
35
39
|
protected hook: ControllerParams['hook'];
|
|
36
40
|
protected magnifier: ControllerParams['magnifier'];
|
|
37
41
|
protected userDistanceItemCreator: ControllerParams['userDistanceItemCreator'];
|
|
42
|
+
protected get currentMeasureType(): MeasureType;
|
|
43
|
+
private getMeasureType;
|
|
38
44
|
constructor(params: ControllerParams);
|
|
39
45
|
updateDistanceUI: () => void;
|
|
40
46
|
protected removeLine(line: Line): void;
|
|
@@ -1,62 +1,68 @@
|
|
|
1
|
-
var
|
|
2
|
-
var l = (
|
|
3
|
-
var t = (
|
|
4
|
-
import u from "
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var l = (s, e, i) => e in s ? m(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
|
|
3
|
+
var t = (s, e, i) => (l(s, typeof e != "symbol" ? e + "" : e, i), i);
|
|
4
|
+
import { Color as u } from "three";
|
|
5
|
+
import h from "../Model/line.js";
|
|
6
|
+
import r from "../Model/point.js";
|
|
7
|
+
import { preventDefault as n } from "../utils/ironbox.js";
|
|
7
8
|
import "../../shared-utils/uuid.js";
|
|
8
9
|
import "../utils/line.js";
|
|
9
10
|
import "@realsee/five/line";
|
|
10
11
|
import "../utils/constants.js";
|
|
11
|
-
import "three";
|
|
12
12
|
import "@realsee/five";
|
|
13
|
-
import "../utils/
|
|
13
|
+
import "../utils/dom/distanceItem.js";
|
|
14
|
+
import "../utils/dom/base.js";
|
|
14
15
|
import "../utils/isNDCPointInScreen.js";
|
|
15
16
|
import "../../shared-utils/removeArrayItem.js";
|
|
16
|
-
class
|
|
17
|
+
class P {
|
|
17
18
|
constructor(e) {
|
|
18
19
|
t(this, "model");
|
|
19
20
|
t(this, "five");
|
|
20
21
|
t(this, "group");
|
|
21
22
|
t(this, "config");
|
|
22
23
|
t(this, "dashed");
|
|
24
|
+
t(this, "perpendicularDashed");
|
|
23
25
|
t(this, "disposed", !1);
|
|
24
26
|
t(this, "isMobile");
|
|
25
27
|
t(this, "mouseGroup");
|
|
26
28
|
t(this, "container");
|
|
27
29
|
t(this, "fiveHelper");
|
|
30
|
+
t(this, "editParams");
|
|
28
31
|
t(this, "hook");
|
|
29
32
|
t(this, "magnifier");
|
|
30
33
|
t(this, "userDistanceItemCreator");
|
|
34
|
+
t(this, "getMeasureType");
|
|
31
35
|
t(this, "updateDistanceUI", () => {
|
|
32
36
|
this.dashed.distanceItem.update(this.five), this.model.getAllLines().forEach((e) => e.distanceItem.update(this.five));
|
|
33
37
|
});
|
|
34
|
-
var
|
|
35
|
-
this.five = e.five, this.hook = e.hook, this.model = e.model, this.config = e.config, this.magnifier = e.magnifier, this.container = e.container, this.fiveHelper = e.fiveHelper, this.isMobile = (
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
+
var a, o;
|
|
39
|
+
this.five = e.five, this.hook = e.hook, this.model = e.model, this.getMeasureType = e.getMeasureType, this.config = e.config, this.magnifier = e.magnifier, this.container = e.container, this.fiveHelper = e.fiveHelper, this.editParams = e.editParams, this.isMobile = (o = (a = e.openParams) == null ? void 0 : a.isMobile) != null ? o : !1, this.userDistanceItemCreator = e.userDistanceItemCreator, this.group = e.group, this.mouseGroup = e.mouseGroup, this.dashed = new h(new r([0, 0, 0]), new r([0, 0, 0]), this.model), this.dashed.distanceItem.setCanSelect(!1), this.dashed.mesh.setMaterial({ dashed: !0, dashScale: 100 }), this.dashed.mesh.name = "dashLine", console.log(this.dashed), this.perpendicularDashed = new h(new r([0, 0, 0]), new r([0, 0, 0]), this.model), this.perpendicularDashed.distanceItem.setCanSelect(!1), this.perpendicularDashed.mesh.setMaterial({ dashed: !0, dashScale: 40, color: new u(10218089) }), this.perpendicularDashed.mesh.name = "perpendicularDashLine";
|
|
40
|
+
const i = this.five.getElement();
|
|
41
|
+
i && (i.addEventListener("touchstart", n), i.addEventListener("contextmenu", n));
|
|
42
|
+
}
|
|
43
|
+
get currentMeasureType() {
|
|
44
|
+
return this.getMeasureType();
|
|
38
45
|
}
|
|
39
46
|
removeLine(e) {
|
|
40
47
|
this.group.remove(e.mesh, e.lightMesh), e.distanceItem.remove(), this.five.needsRender = !0;
|
|
41
48
|
}
|
|
42
|
-
updateMouseGroup(e,
|
|
49
|
+
updateMouseGroup(e, i) {
|
|
43
50
|
if (!e)
|
|
44
51
|
return this.mouseGroup;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.mouseGroup.quaternion.copy(o.quaternion);
|
|
52
|
+
if (this.mouseGroup.position.copy(e.point), i)
|
|
53
|
+
this.mouseGroup.quaternion.copy(i.quaternion);
|
|
48
54
|
else if (e.face) {
|
|
49
|
-
const
|
|
55
|
+
const o = e.face.normal.clone().multiplyScalar(0.05), d = e.point.clone().add(o).clone().add(o);
|
|
50
56
|
this.mouseGroup.lookAt(d);
|
|
51
57
|
}
|
|
52
58
|
return this.mouseGroup;
|
|
53
59
|
}
|
|
54
60
|
dispose() {
|
|
55
|
-
this.disposed = !0, this.magnifier.disable(), this.model.getAllLines().forEach((
|
|
61
|
+
this.disposed = !0, this.magnifier.disable(), this.model.getAllLines().forEach((i) => this.removeLine(i)), this.model.areas.forEach((i) => i.remove());
|
|
56
62
|
const e = this.five.getElement();
|
|
57
|
-
e && (e.removeEventListener("touchstart",
|
|
63
|
+
e && (e.removeEventListener("touchstart", n), e.removeEventListener("contextmenu", n));
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
export {
|
|
61
|
-
|
|
67
|
+
P as default
|
|
62
68
|
};
|
|
@@ -2,9 +2,11 @@ import Line from '../Model/line';
|
|
|
2
2
|
import BaseController from './BaseController';
|
|
3
3
|
import type { ControllerParams } from './BaseController';
|
|
4
4
|
import { Polyline } from '../Model/polyline';
|
|
5
|
+
import Area from '../Model/area';
|
|
5
6
|
export default class EditController extends BaseController {
|
|
6
7
|
type: string;
|
|
7
8
|
polyline: Polyline;
|
|
9
|
+
area: Area;
|
|
8
10
|
/** 拖动的控制点 */
|
|
9
11
|
private pressPoint?;
|
|
10
12
|
private hasAppendDashed;
|
|
@@ -20,6 +22,14 @@ export default class EditController extends BaseController {
|
|
|
20
22
|
getEditingLines(): Line[];
|
|
21
23
|
/** 撤销编辑 */
|
|
22
24
|
revoke: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* @description: 测面积的撤销功能
|
|
27
|
+
*/
|
|
28
|
+
revokeArea: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* @description: 测距的撤销功能
|
|
31
|
+
*/
|
|
32
|
+
revokeLine: (_polyline?: Polyline) => void;
|
|
23
33
|
private onMouseLeave;
|
|
24
34
|
/** 编辑线条发生改变时通知外部 */
|
|
25
35
|
private onLineChanged;
|
|
@@ -1,130 +1,210 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import "
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var T = (r, a, i) => a in r ? y(r, a, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[a] = i;
|
|
3
|
+
var s = (r, a, i) => (T(r, typeof a != "symbol" ? a + "" : a, i), i);
|
|
4
|
+
import C from "hammerjs";
|
|
5
|
+
import G from "../Model/line.js";
|
|
6
|
+
import c from "../Model/point.js";
|
|
7
|
+
import { throttle as A } from "../../shared-utils/throttle.js";
|
|
8
|
+
import M from "./BaseController.js";
|
|
9
|
+
import { getIntersectionFromEvent as f } from "../utils/getIntersectionFromEvent.js";
|
|
10
|
+
import { Polyline as v } from "../Model/polyline.js";
|
|
11
|
+
import P from "../Model/area.js";
|
|
12
|
+
import g from "../utils/isIntersecting.js";
|
|
13
13
|
import "../../shared-utils/uuid.js";
|
|
14
14
|
import "../utils/line.js";
|
|
15
15
|
import "@realsee/five/line";
|
|
16
16
|
import "../utils/constants.js";
|
|
17
17
|
import "three";
|
|
18
|
-
import "
|
|
18
|
+
import "@realsee/five";
|
|
19
|
+
import "../utils/dom/distanceItem.js";
|
|
20
|
+
import "../utils/dom/base.js";
|
|
19
21
|
import "../utils/isNDCPointInScreen.js";
|
|
20
22
|
import "../../shared-utils/removeArrayItem.js";
|
|
21
23
|
import "../utils/ironbox.js";
|
|
22
24
|
import "../utils/getPointFromHammerEvent.js";
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
import "../Model/polygon.js";
|
|
26
|
+
import "../../shared-utils/three/IObject3D.js";
|
|
27
|
+
import "../utils/generatePolygonGeometry.js";
|
|
28
|
+
import "earcut";
|
|
29
|
+
import "../utils/dom/areaDom.js";
|
|
30
|
+
import "../utils/geometryUtil.js";
|
|
31
|
+
import "../../shared-utils/three/centerPoint.js";
|
|
32
|
+
class ee extends M {
|
|
33
|
+
constructor(i) {
|
|
34
|
+
var o;
|
|
35
|
+
super(i);
|
|
36
|
+
s(this, "type", "edit");
|
|
37
|
+
s(this, "polyline");
|
|
38
|
+
s(this, "area");
|
|
29
39
|
/** 拖动的控制点 */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
s(this, "pressPoint");
|
|
41
|
+
s(this, "hasAppendDashed", !1);
|
|
42
|
+
s(this, "hasAppendMouseGroup", !1);
|
|
43
|
+
s(this, "fiveElement");
|
|
34
44
|
/** 上一个端点位置 */
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
s(this, "lastPoint", null);
|
|
46
|
+
s(this, "hammer");
|
|
37
47
|
/** 根据 intersection 更新放大镜和吸附点 */
|
|
38
|
-
|
|
39
|
-
var
|
|
48
|
+
s(this, "onIntersectionUpdate", A((i, e) => {
|
|
49
|
+
var t;
|
|
40
50
|
this.hasAppendMouseGroup === !1 && (this.group.add(this.mouseGroup), this.magnifier.appendTo(this.container), this.magnifier.enable(), this.hasAppendMouseGroup = !0);
|
|
41
|
-
const
|
|
42
|
-
(
|
|
51
|
+
const o = this.updateMouseGroup(i, e).position;
|
|
52
|
+
(t = this.pressPoint) == null || t.position.copy(o), this.updateDashed(), requestAnimationFrame(() => this.magnifier.renderWithPoint(this.mouseGroup.position)), this.five.needsRender = !0;
|
|
43
53
|
}, 20));
|
|
44
54
|
/** 撤销编辑 */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
s(this, "revoke", () => {
|
|
56
|
+
this.currentMeasureType === "area" ? this.revokeArea() : this.currentMeasureType === "line" && this.revokeLine();
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* @description: 测面积的撤销功能
|
|
60
|
+
*/
|
|
61
|
+
s(this, "revokeArea", () => {
|
|
62
|
+
this.area.points.length !== 0 && (this.revokeLine(this.area.polyline), this.area.points.pop(), this.area.refresh());
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* @description: 测距的撤销功能
|
|
66
|
+
*/
|
|
67
|
+
s(this, "revokeLine", (i) => {
|
|
68
|
+
const e = i || this.polyline;
|
|
69
|
+
if (e.lines.length === 0 && this.lastPoint) {
|
|
70
|
+
this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.needsRender = !0;
|
|
48
71
|
return;
|
|
49
72
|
}
|
|
50
|
-
if (
|
|
73
|
+
if (e.lines.length === 0 && !this.lastPoint || !this.lastPoint)
|
|
51
74
|
return;
|
|
52
|
-
const
|
|
53
|
-
t && (this.lastPoint = t, this.hook.emit("anchorChange", t.position), this.group.remove(
|
|
75
|
+
const o = e.lines[e.lines.length - 1], t = o.findAnotherPoint(this.lastPoint);
|
|
76
|
+
t && (this.lastPoint = t, this.hook.emit("anchorChange", t.position), this.group.remove(o.mesh), e.removeLine(o), this.hasAppendMouseGroup = !1, this.mouseGroup.position.copy(this.lastPoint.position), this.group.remove(this.mouseGroup), o.distanceItem.remove(), this.updateDashed(), this.magnifier.disable(), this.five.needsRender = !0);
|
|
54
77
|
});
|
|
55
|
-
|
|
56
|
-
this.magnifier.disable(), this.group.remove(this.mouseGroup), this.hasAppendMouseGroup = !1, this.lastPoint && (this.mouseGroup.position.copy(this.lastPoint.position), this.updateDashed());
|
|
78
|
+
s(this, "onMouseLeave", () => {
|
|
79
|
+
this.magnifier.disable(), this.group.remove(this.mouseGroup), this.hasAppendMouseGroup = !1, this.lastPoint && (this.mouseGroup.position.copy(this.lastPoint.position), this.updateDashed()), this.area.hideArea();
|
|
57
80
|
});
|
|
58
81
|
/** 编辑线条发生改变时通知外部 */
|
|
59
|
-
|
|
82
|
+
s(this, "onLineChanged", () => {
|
|
60
83
|
this.hook.emit("editedPolylineChange", this.polyline);
|
|
61
84
|
});
|
|
62
|
-
|
|
63
|
-
const [
|
|
64
|
-
if (!(
|
|
85
|
+
s(this, "onPress", (i) => {
|
|
86
|
+
const [e] = f(this.five, i);
|
|
87
|
+
if (!(e != null && e.face))
|
|
65
88
|
return;
|
|
66
|
-
const
|
|
67
|
-
this.pressPoint =
|
|
89
|
+
const o = new c(e.point);
|
|
90
|
+
this.pressPoint = o, this.onIntersectionUpdate(e);
|
|
68
91
|
});
|
|
69
92
|
/**
|
|
70
93
|
* 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
|
|
71
94
|
* 2. 如果有长按点,把长按点位置更新为当前位置
|
|
72
95
|
*/
|
|
73
|
-
|
|
96
|
+
s(this, "onPan", (i) => {
|
|
74
97
|
if (!this.pressPoint)
|
|
75
98
|
return;
|
|
76
|
-
const [
|
|
77
|
-
|
|
99
|
+
const [e] = f(this.five, i);
|
|
100
|
+
e != null && e.face && this.onIntersectionUpdate(e);
|
|
78
101
|
});
|
|
79
|
-
|
|
80
|
-
this.pressPoint && this.onTap(
|
|
102
|
+
s(this, "onPanEnd", (i) => {
|
|
103
|
+
this.pressPoint && this.onTap(i);
|
|
81
104
|
});
|
|
82
105
|
/**
|
|
83
106
|
* 1. 如果存在上一个点,需要绘制当前点到上一个点的连线
|
|
84
107
|
* 2. 把上一个点的位置更新为当前点的位置
|
|
85
108
|
* 3. 清除 mouseGroup 和 magnifier
|
|
86
109
|
*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
this.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
110
|
+
s(this, "onTap", (i) => {
|
|
111
|
+
var p, l, m, u;
|
|
112
|
+
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;
|
|
113
|
+
const [e] = f(this.five, i);
|
|
114
|
+
this.updateMouseGroup(e);
|
|
115
|
+
const o = (() => {
|
|
116
|
+
if (this.currentMeasureType === "area")
|
|
117
|
+
return this.area.projectPoint(this.mouseGroup.position);
|
|
118
|
+
if (this.currentMeasureType === "line")
|
|
119
|
+
return this.mouseGroup.position;
|
|
120
|
+
})();
|
|
121
|
+
if (!o)
|
|
122
|
+
return;
|
|
123
|
+
const t = new c(o), h = this.lastPoint;
|
|
124
|
+
if (this.lastPoint = t, this.currentMeasureType === "line") {
|
|
125
|
+
if (t && h) {
|
|
126
|
+
const d = new G(h, t, this.model);
|
|
127
|
+
d.distanceItem.setCanSelect(!1), d.distanceItem.appendTo(this.container), this.polyline.addLine(d), this.group.add(d.mesh), d.distanceItem.update(this.five);
|
|
128
|
+
}
|
|
129
|
+
const n = (l = (p = this.editParams) == null ? void 0 : p.autoEndConfig) == null ? void 0 : l.line;
|
|
130
|
+
typeof n == "number" && (this.polyline.getPointLength() >= n ? (this.hook.emit("complete"), this.polyline = new v({ model: this.model }), this.model.addPolyline(this.polyline), this.lastPoint = void 0) : this.polyline.getPointLength() === n - 1 && this.hook.emit("readyComplete"));
|
|
131
|
+
} else if (this.currentMeasureType === "area") {
|
|
132
|
+
this.area.addPoints(t.position);
|
|
133
|
+
const n = (u = (m = this.editParams) == null ? void 0 : m.autoEndConfig) == null ? void 0 : u.area;
|
|
134
|
+
typeof n == "number" && (this.area.points.length >= n ? (this.hook.emit("complete"), this.area = new P(void 0, {
|
|
135
|
+
five: this.five,
|
|
136
|
+
model: this.model,
|
|
137
|
+
meshContainer: this.group,
|
|
138
|
+
domContainer: this.container
|
|
139
|
+
}), this.model.addArea(this.area), this.lastPoint = void 0) : this.area.points.length === n - 1 && this.hook.emit("readyComplete"));
|
|
95
140
|
}
|
|
96
|
-
this.pressPoint = void 0, this.hasAppendMouseGroup = !1, this.magnifier.disable(), this.group.remove(this.mouseGroup), this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange",
|
|
141
|
+
this.pressPoint = void 0, this.hasAppendMouseGroup = !1, this.magnifier.disable(), this.group.remove(this.mouseGroup), this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", t.position);
|
|
97
142
|
});
|
|
98
|
-
|
|
143
|
+
s(this, "onWantsTapGesture", () => !1);
|
|
99
144
|
/** 编辑时取消走点 */
|
|
100
|
-
|
|
145
|
+
s(this, "onWantsToMoveToPano", () => !1);
|
|
101
146
|
/** 存在长按点时不能移动全景 */
|
|
102
|
-
|
|
147
|
+
s(this, "onWantsPanGesture", () => this.pressPoint ? !1 : void 0);
|
|
103
148
|
/** 移动全景时更新 distanceItem 在屏幕上的位置 */
|
|
104
|
-
|
|
105
|
-
this.updateDistanceUI()
|
|
149
|
+
s(this, "onCameraUpdate", () => {
|
|
150
|
+
this.updateDistanceUI();
|
|
106
151
|
});
|
|
107
152
|
/** 更新虚线 */
|
|
108
|
-
|
|
109
|
-
|
|
153
|
+
s(this, "updateDashed", () => {
|
|
154
|
+
if (!this.lastPoint)
|
|
155
|
+
return;
|
|
156
|
+
const i = this.lastPoint.position, e = (() => {
|
|
157
|
+
if (this.currentMeasureType === "area")
|
|
158
|
+
return this.area.projectPoint(this.mouseGroup.position);
|
|
159
|
+
if (this.currentMeasureType === "line")
|
|
160
|
+
return this.mouseGroup.position;
|
|
161
|
+
})();
|
|
162
|
+
if (this.dashed.setPoints(i, e), this.dashed.distanceItem.update(this.five), this.hook.emit("editedDashedLineChange", this.dashed), this.currentMeasureType === "area") {
|
|
163
|
+
this.area.areaItem.setCanSelect(!1);
|
|
164
|
+
const o = this.mouseGroup.position;
|
|
165
|
+
if (this.area.points.length >= 2) {
|
|
166
|
+
const p = this.area.polyline.lines.map((n) => ({ start: n.points[0].position, end: n.points[1].position })), l = g({ start: i, end: e }, p), m = g({ start: e, end: this.area.points[0] }, p);
|
|
167
|
+
if (l || m)
|
|
168
|
+
this.area.hideArea(), this.hook.emit("allowAddPointStateChange", "forbid");
|
|
169
|
+
else {
|
|
170
|
+
this.area.showArea();
|
|
171
|
+
const n = [...this.area.points, e];
|
|
172
|
+
this.area.polygon.updatePoints(n), this.area.areaItem.updateArea(this.five), this.hook.emit("allowAddPointStateChange", "allow");
|
|
173
|
+
}
|
|
174
|
+
} else
|
|
175
|
+
this.area.hideArea();
|
|
176
|
+
const t = o, h = e;
|
|
177
|
+
this.perpendicularDashed.setPoints(t, h), this.perpendicularDashed.distanceItem.update(this.five);
|
|
178
|
+
}
|
|
110
179
|
});
|
|
111
|
-
this.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
this.
|
|
115
|
-
|
|
116
|
-
|
|
180
|
+
this.polyline = new v({ model: this.model }), this.area = new P(void 0, {
|
|
181
|
+
five: this.five,
|
|
182
|
+
model: this.model,
|
|
183
|
+
meshContainer: this.group,
|
|
184
|
+
domContainer: this.container
|
|
185
|
+
}), this.model.addPolyline(this.polyline), this.model.addArea(this.area), this.model.getAllLines().forEach((t) => {
|
|
186
|
+
t.distanceItem.appendTo(this.container), t.distanceItem.update(this.five), this.group.add(t.mesh);
|
|
187
|
+
}), this.model.getAllAreas().forEach((t) => {
|
|
188
|
+
t.areaItem.appendTo(this.container), t.areaItem.updateDomPosition(this.five), t.areaItem.setCanSelect(!0), this.group.add(t.polygon), t.polyline.lines.forEach((h) => {
|
|
189
|
+
h.distanceItem.appendTo(this.container), h.distanceItem.update(this.five), this.group.add(h.mesh);
|
|
190
|
+
});
|
|
191
|
+
}), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsPanGesture", this.onWantsPanGesture), this.five.on("wantsTapGesture", this.onWantsTapGesture), this.five.on("wantsToMoveToPano", this.onWantsToMoveToPano), this.five.on("intersectionOnModelUpdate", this.onIntersectionUpdate), this.polyline.hook.on("lineAdded", this.onLineChanged), this.polyline.hook.on("lineRemoved", this.onLineChanged);
|
|
192
|
+
const e = this.five.getElement();
|
|
193
|
+
if (e) {
|
|
194
|
+
this.fiveElement = e;
|
|
195
|
+
const t = new C(e);
|
|
196
|
+
this.hammer = t, t.on("tap", this.onTap), t.on("pan", this.onPan), t.on("press", this.onPress), t.on("panend", this.onPanEnd);
|
|
117
197
|
}
|
|
118
|
-
this.five.helperVisible = !1, (
|
|
198
|
+
this.five.helperVisible = !1, (o = this.fiveElement) == null || o.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.refresh();
|
|
119
199
|
}
|
|
120
200
|
dispose() {
|
|
121
|
-
var
|
|
122
|
-
super.dispose(), this.five.helperVisible = !0, this.group.remove(this.mouseGroup, this.dashed.
|
|
201
|
+
var i, e;
|
|
202
|
+
super.dispose(), this.five.helperVisible = !0, this.group.remove(this.mouseGroup), this.dashed.remove(), this.perpendicularDashed.remove(), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.onWantsPanGesture), this.five.off("wantsTapGesture", this.onWantsTapGesture), this.five.off("wantsToMoveToPano", this.onWantsToMoveToPano), this.five.off("intersectionOnModelUpdate", this.onIntersectionUpdate), this.polyline.hook.off("lineAdded", this.onLineChanged), this.polyline.hook.off("lineRemoved", this.onLineChanged), (i = this.hammer) == null || i.destroy(), (e = this.fiveElement) == null || e.removeEventListener("mouseleave", this.onMouseLeave), this.magnifier.dispose(), this.dashed.distanceItem.remove(), this.five.needsRender = !0;
|
|
123
203
|
}
|
|
124
204
|
getEditingLines() {
|
|
125
205
|
return this.polyline.lines;
|
|
126
206
|
}
|
|
127
207
|
}
|
|
128
208
|
export {
|
|
129
|
-
|
|
209
|
+
ee as default
|
|
130
210
|
};
|