@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
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var y = Object.getOwnPropertySymbols;
|
|
3
|
+
var I = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var c = (s, e, t) => e in s ? v(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, h = (s, e) => {
|
|
5
5
|
for (var t in e || (e = {}))
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var t of
|
|
9
|
-
|
|
6
|
+
I.call(e, t) && c(s, t, e[t]);
|
|
7
|
+
if (y)
|
|
8
|
+
for (var t of y(e))
|
|
9
|
+
b.call(e, t) && c(s, t, e[t]);
|
|
10
10
|
return s;
|
|
11
11
|
};
|
|
12
|
-
var i = (s, e, t) => (
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
12
|
+
var i = (s, e, t) => (c(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
|
+
import U from "../Modules/FiveHelper.js";
|
|
14
|
+
import m from "./EditController.js";
|
|
15
|
+
import C from "./ViewController.js";
|
|
16
|
+
import M from "./WatchController.js";
|
|
17
|
+
import a from "./MixedController.js";
|
|
18
|
+
import { omit as T } from "../../shared-utils/filter.js";
|
|
19
|
+
import { Group as E } from "three";
|
|
20
|
+
import { Model as k } from "../Model/index.js";
|
|
21
|
+
import { Subscribe as D } from "@realsee/five";
|
|
22
|
+
import { getMouseGroup as G } from "../utils/mouseGroup.js";
|
|
23
|
+
import { UIController as w } from "../Modules/UIController/index.js";
|
|
24
|
+
import { GuideController as x } from "../Modules/GuideController.js";
|
|
25
|
+
import { ShortcutKeyController as H } from "./ShortcutKeyController.js";
|
|
26
|
+
import { safeObj as P } from "../../shared-utils/safeObj.js";
|
|
27
|
+
import { Magnifier as L } from "../../shared-utils/three/Magnifier.js";
|
|
28
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
29
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
30
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
27
31
|
import "hammerjs";
|
|
28
32
|
import "../Model/line.js";
|
|
29
33
|
import "../../shared-utils/uuid.js";
|
|
30
34
|
import "../utils/line.js";
|
|
31
35
|
import "@realsee/five/line";
|
|
32
36
|
import "../utils/constants.js";
|
|
33
|
-
import "../utils/
|
|
37
|
+
import "../utils/dom/distanceItem.js";
|
|
38
|
+
import "../utils/dom/base.js";
|
|
34
39
|
import "../utils/isNDCPointInScreen.js";
|
|
35
40
|
import "../Model/point.js";
|
|
36
41
|
import "../../shared-utils/removeArrayItem.js";
|
|
@@ -40,6 +45,15 @@ import "../utils/ironbox.js";
|
|
|
40
45
|
import "../utils/getIntersectionFromEvent.js";
|
|
41
46
|
import "../utils/getPointFromHammerEvent.js";
|
|
42
47
|
import "../Model/polyline.js";
|
|
48
|
+
import "../Model/area.js";
|
|
49
|
+
import "../Model/polygon.js";
|
|
50
|
+
import "../../shared-utils/three/IObject3D.js";
|
|
51
|
+
import "../utils/generatePolygonGeometry.js";
|
|
52
|
+
import "earcut";
|
|
53
|
+
import "../utils/dom/areaDom.js";
|
|
54
|
+
import "../utils/geometryUtil.js";
|
|
55
|
+
import "../../shared-utils/three/centerPoint.js";
|
|
56
|
+
import "../utils/isIntersecting.js";
|
|
43
57
|
import "../Modules/DeleteDom/index.js";
|
|
44
58
|
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
45
59
|
import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
@@ -49,7 +63,6 @@ import "../utils/findClosestPoint.js";
|
|
|
49
63
|
import "../utils/ndc2Screen.js";
|
|
50
64
|
import "../utils/findAssociatedLines.js";
|
|
51
65
|
import "../Modules/rangePiece/index.js";
|
|
52
|
-
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
53
66
|
import "../Modules/rangePiece/html.js";
|
|
54
67
|
import "../../shared-utils/animationFrame/index.js";
|
|
55
68
|
import "../../shared-utils/noop.js";
|
|
@@ -61,15 +74,35 @@ import "../Modules/UIController/style.js";
|
|
|
61
74
|
import "../Modules/UIController/MainBtnController.js";
|
|
62
75
|
import "../Modules/UIController/mobileMainBtnController.js";
|
|
63
76
|
import "../Modules/UIController/Revoke/index.js";
|
|
64
|
-
|
|
77
|
+
import "../Components/Controller1.js";
|
|
78
|
+
import "../../vendor/svelte/internal/index.js";
|
|
79
|
+
import "../Components/Common/Switcher1.js";
|
|
80
|
+
import "../Components/Common/CircleButton.js";
|
|
81
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
82
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
83
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
84
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
85
|
+
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
86
|
+
import "../../shared-utils/Subscribe.js";
|
|
87
|
+
import "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
88
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
89
|
+
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
90
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
91
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
92
|
+
class nt {
|
|
65
93
|
constructor(e, t) {
|
|
66
94
|
i(this, "hasOpen", !1);
|
|
67
|
-
i(this, "hook", new
|
|
95
|
+
i(this, "hook", new D());
|
|
68
96
|
i(this, "magnifier");
|
|
97
|
+
i(this, "controller", null);
|
|
98
|
+
/** 当前的测量类型 */
|
|
99
|
+
i(this, "currentMeasureType");
|
|
69
100
|
i(this, "five");
|
|
70
101
|
i(this, "model");
|
|
71
102
|
i(this, "group");
|
|
72
103
|
i(this, "config");
|
|
104
|
+
/** 允许的测量类型 */
|
|
105
|
+
i(this, "allowMeasureType");
|
|
73
106
|
i(this, "isMobile");
|
|
74
107
|
i(this, "fiveHelper");
|
|
75
108
|
i(this, "useUIController");
|
|
@@ -77,42 +110,42 @@ class De {
|
|
|
77
110
|
i(this, "useGuideController");
|
|
78
111
|
i(this, "container", document.createElement("div"));
|
|
79
112
|
i(this, "shortcutKeyController");
|
|
80
|
-
i(this, "
|
|
81
|
-
i(this, "getCurrentMode", () => this.controller instanceof a ? "Edit" : this.controller instanceof g ? "Watch" : this.controller instanceof l ? "Mixed" : this.controller instanceof f ? "View" : null);
|
|
113
|
+
i(this, "getCurrentMode", () => this.controller instanceof m ? "Edit" : this.controller instanceof M ? "Watch" : this.controller instanceof a ? "Mixed" : this.controller instanceof C ? "View" : null);
|
|
82
114
|
/** 变更场景
|
|
83
115
|
* @description 如果从编辑场景改变到观看场景,不会自动保存,默认丢弃所有改动
|
|
84
116
|
*/
|
|
85
117
|
i(this, "changeMode", (e) => {
|
|
86
|
-
var
|
|
118
|
+
var r;
|
|
87
119
|
if (!this.hasOpen || this.getCurrentMode() === e)
|
|
88
120
|
return;
|
|
89
|
-
(
|
|
121
|
+
(r = this.controller) == null || r.dispose();
|
|
90
122
|
const t = {
|
|
91
|
-
View:
|
|
92
|
-
Watch:
|
|
93
|
-
Edit:
|
|
94
|
-
Mixed:
|
|
123
|
+
View: C,
|
|
124
|
+
Watch: M,
|
|
125
|
+
Edit: m,
|
|
126
|
+
Mixed: a
|
|
95
127
|
};
|
|
96
128
|
if (!t[e])
|
|
97
129
|
throw new Error("不存在的 Mode");
|
|
98
|
-
const
|
|
99
|
-
this.controller = new t[e](
|
|
130
|
+
const o = this.createControllerParams();
|
|
131
|
+
this.controller = new t[e](o), this.hook.emit("modeChange", e);
|
|
100
132
|
});
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
133
|
+
/**
|
|
134
|
+
* @description: 切换测量的类型
|
|
135
|
+
*/
|
|
136
|
+
i(this, "changeMeasureType", (e) => {
|
|
137
|
+
this.currentMeasureType = e, this.hook.emit("measureTypeChange", e);
|
|
138
|
+
});
|
|
139
|
+
var r, l, n, u, d, f, g;
|
|
140
|
+
this.five = e, this.params = t, this.config = T(t, ["openParams", "magnifierParams"]), this.model = new k(this.config), this.fiveHelper = new U(e), this.isMobile = (l = (r = t == null ? void 0 : t.openParams) == null ? void 0 : r.isMobile) != null ? l : !1, this.magnifier = new L(e, (n = t.magnifierParams) != null ? n : { width: 190, height: 190, scale: 2 }), this.allowMeasureType = Array.from(new Set((d = (u = t.editParams) == null ? void 0 : u.allowMeasureType) != null ? d : ["line"])), this.currentMeasureType = (f = this.allowMeasureType[0]) != null ? f : "line", this.group = new E(), this.group.name = "plugin-measure-group", this.container.classList.add("five-plugin-measure-container"), this.container.style.position = "absolute", this.container.style.left = "0", this.container.style.top = "0", this.container.style.pointerEvents = "none", this.container.style.width = "100%", this.container.style.height = "100%", this.container.style.opacity = "0";
|
|
141
|
+
const o = (g = this.params.openParams) != null ? g : {};
|
|
104
142
|
if (this.params.useUIController !== !1) {
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
openParams: r
|
|
108
|
-
}, typeof this.params.useUIController == "object" ? this.params.useUIController : {});
|
|
109
|
-
this.useUIController = new C(this, m);
|
|
143
|
+
const p = h({ container: this.container, openParams: o }, P(this.params.useUIController));
|
|
144
|
+
this.useUIController = new w(this, p);
|
|
110
145
|
}
|
|
111
146
|
if (this.params.useGuideController !== !1) {
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
}, typeof this.params.useGuideController == "object" ? this.params.useGuideController : {});
|
|
115
|
-
this.useGuideController = new D(this, m);
|
|
147
|
+
const p = h({ container: this.container }, P(this.params.useGuideController));
|
|
148
|
+
this.useGuideController = new x(this, p);
|
|
116
149
|
}
|
|
117
150
|
}
|
|
118
151
|
appendTo(e) {
|
|
@@ -135,24 +168,25 @@ class De {
|
|
|
135
168
|
*/
|
|
136
169
|
enable(e) {
|
|
137
170
|
var t;
|
|
138
|
-
this.hasOpen || (this.hasOpen = !0, this.five.scene.add(this.group), this.container.style.opacity = "1", e != null && e.mode ? this.changeMode(e.mode) : this.isMobile ? this.changeMode("Mixed") : this.changeMode("Watch"), (t = this.useUIController) == null || t.show(), this.shortcutKeyController = new
|
|
171
|
+
this.hasOpen || (this.hasOpen = !0, this.five.scene.add(this.group), this.container.style.opacity = "1", e != null && e.mode ? this.changeMode(e.mode) : this.isMobile ? this.changeMode("Mixed") : this.changeMode("Watch"), (t = this.useUIController) == null || t.show(), this.shortcutKeyController = new H(this, this.five), this.hook.emit("enable", !0));
|
|
139
172
|
}
|
|
140
173
|
/** 关闭插件功能
|
|
141
174
|
* @description 清除标尺线条
|
|
142
175
|
* @description 还原点位展示和默认鼠标 UI
|
|
143
176
|
*/
|
|
144
177
|
disable() {
|
|
145
|
-
var e, t,
|
|
146
|
-
this.hasOpen = !1, this.container.style.opacity = "0", (e = this.controller) == null || e.dispose(), (t = this.useUIController) == null || t.hide(), (
|
|
178
|
+
var e, t, o, r;
|
|
179
|
+
this.hasOpen = !1, this.container.style.opacity = "0", (e = this.controller) == null || e.dispose(), (t = this.useUIController) == null || t.hide(), (o = this.useGuideController) == null || o.hide(), (r = this.shortcutKeyController) == null || r.dispose(), this.controller = null, this.five.helperVisible = !0, this.five.scene.remove(this.group), this.five.needsRender = !0, this.hook.emit("disable", !0);
|
|
147
180
|
}
|
|
148
181
|
/** 进入编辑模式 */
|
|
149
|
-
edit() {
|
|
150
|
-
|
|
151
|
-
this.
|
|
182
|
+
edit(e) {
|
|
183
|
+
e && this.changeMeasureType(e);
|
|
184
|
+
const t = this.isMobile ? "Mixed" : "Edit";
|
|
185
|
+
this.changeMode(t);
|
|
152
186
|
}
|
|
153
187
|
/** 撤销编辑 */
|
|
154
188
|
revoke() {
|
|
155
|
-
this.controller instanceof
|
|
189
|
+
this.controller instanceof m && this.controller.revoke();
|
|
156
190
|
}
|
|
157
191
|
removePolyline(e) {
|
|
158
192
|
this.model.removePolyline(e);
|
|
@@ -182,21 +216,23 @@ class De {
|
|
|
182
216
|
* @description 以下情况可能报错
|
|
183
217
|
*/
|
|
184
218
|
save(e) {
|
|
185
|
-
var
|
|
186
|
-
if (!(this.controller instanceof
|
|
219
|
+
var l;
|
|
220
|
+
if (!(this.controller instanceof m) && !(this.controller instanceof a))
|
|
187
221
|
return this;
|
|
188
|
-
const t = (
|
|
189
|
-
return
|
|
190
|
-
this.model.addPolyline(
|
|
222
|
+
const t = (l = e == null ? void 0 : e.mode) != null ? l : "View", o = this.controller.model.polylines, r = this.controller.model.areas;
|
|
223
|
+
return o.forEach((n) => {
|
|
224
|
+
this.model.addPolyline(n);
|
|
225
|
+
}), r.forEach((n) => {
|
|
226
|
+
n.polygon.updatePoints(n.points), n.showArea(), this.model.addArea(n);
|
|
191
227
|
}), this.changeMode(t), this;
|
|
192
228
|
}
|
|
193
229
|
/** Mixed 模式才有用,添加起点 */
|
|
194
230
|
addStartPoint() {
|
|
195
|
-
this.controller instanceof
|
|
231
|
+
this.controller instanceof a && this.hook.emit("willChangeState", "watching", "editing");
|
|
196
232
|
}
|
|
197
233
|
/** Mixed 模式才有用,添加终点 */
|
|
198
234
|
addEndPoint() {
|
|
199
|
-
this.controller instanceof
|
|
235
|
+
this.controller instanceof a && this.hook.emit("willChangeState", "editing", "watching");
|
|
200
236
|
}
|
|
201
237
|
/** 导出数据 */
|
|
202
238
|
toJson() {
|
|
@@ -210,11 +246,11 @@ class De {
|
|
|
210
246
|
var t;
|
|
211
247
|
if (this.isMobile = e, this.params.useUIController !== !1) {
|
|
212
248
|
(t = this.useUIController) == null || t.dispose();
|
|
213
|
-
const
|
|
249
|
+
const o = h({
|
|
214
250
|
container: this.container,
|
|
215
251
|
mode: this.isMobile ? "mobile" : "pc"
|
|
216
252
|
}, typeof this.params.useUIController == "object" ? this.params.useUIController : {});
|
|
217
|
-
this.useUIController = new
|
|
253
|
+
this.useUIController = new w(this, o);
|
|
218
254
|
}
|
|
219
255
|
}
|
|
220
256
|
changeConfigs(e) {
|
|
@@ -223,15 +259,15 @@ class De {
|
|
|
223
259
|
}
|
|
224
260
|
/** 设置线段的文本 */
|
|
225
261
|
setCustomText(e, t) {
|
|
226
|
-
var
|
|
227
|
-
const
|
|
228
|
-
if (!
|
|
262
|
+
var r;
|
|
263
|
+
const o = this.model.getLineByID(e);
|
|
264
|
+
if (!o)
|
|
229
265
|
throw new Error("不存在的线段");
|
|
230
|
-
|
|
266
|
+
o.setText(t), (r = this.controller) == null || r.updateDistanceUI();
|
|
231
267
|
}
|
|
232
268
|
createControllerParams() {
|
|
233
|
-
var
|
|
234
|
-
const e = (
|
|
269
|
+
var o, r;
|
|
270
|
+
const e = (o = this.params.openParams) != null ? o : {}, t = (r = this.params.editParams) != null ? r : {};
|
|
235
271
|
return e.isMobile = this.isMobile, {
|
|
236
272
|
five: this.five,
|
|
237
273
|
hook: this.hook,
|
|
@@ -242,11 +278,13 @@ class De {
|
|
|
242
278
|
container: this.container,
|
|
243
279
|
fiveHelper: this.fiveHelper,
|
|
244
280
|
openParams: e,
|
|
245
|
-
|
|
281
|
+
editParams: t,
|
|
282
|
+
getMeasureType: () => this.currentMeasureType,
|
|
283
|
+
mouseGroup: G(h({}, e.crossHairParameter)),
|
|
246
284
|
userDistanceItemCreator: this.params.userDistanceItemCreator
|
|
247
285
|
};
|
|
248
286
|
}
|
|
249
287
|
}
|
|
250
288
|
export {
|
|
251
|
-
|
|
289
|
+
nt as default
|
|
252
290
|
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { Line as FiveLine } from '@realsee/five/line';
|
|
3
|
+
import { Subscribe, type Five, type SubscribeEventMap } from '@realsee/five';
|
|
4
|
+
import PolygonMesh from './polygon';
|
|
5
|
+
import { Polyline } from './polyline';
|
|
6
|
+
import type { Model } from '.';
|
|
7
|
+
import { AreaItem } from '../utils/dom/areaDom';
|
|
8
|
+
export interface AreaHook extends SubscribeEventMap {
|
|
9
|
+
selected: (area: Area, position: {
|
|
10
|
+
left: string;
|
|
11
|
+
top: string;
|
|
12
|
+
}) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @description: 多边形类
|
|
16
|
+
*/
|
|
17
|
+
export default class Area {
|
|
18
|
+
id: string;
|
|
19
|
+
selected: boolean;
|
|
20
|
+
text?: string;
|
|
21
|
+
readonly lightMesh: FiveLine;
|
|
22
|
+
readonly areaItem: AreaItem;
|
|
23
|
+
readonly hook: Subscribe<AreaHook>;
|
|
24
|
+
/** 多边形mesh */
|
|
25
|
+
polygon: PolygonMesh;
|
|
26
|
+
/** 多边形顶点 */
|
|
27
|
+
points: THREE.Vector3[];
|
|
28
|
+
/** 多边形前三个点组成的平面,用来使得后面加的点也落在这个平面上 */
|
|
29
|
+
planeHelper: THREE.Plane | null;
|
|
30
|
+
/** 多边形边框 */
|
|
31
|
+
polyline: Polyline;
|
|
32
|
+
/** 多边形mesh容器 */
|
|
33
|
+
private meshContainer;
|
|
34
|
+
/** 多边形dom容器 */
|
|
35
|
+
private domContainer;
|
|
36
|
+
private five;
|
|
37
|
+
private model?;
|
|
38
|
+
constructor(points: THREE.Vector3[] | undefined, config: {
|
|
39
|
+
/** @todo: 这个model整的真的太恶心了 */
|
|
40
|
+
model: Model;
|
|
41
|
+
meshContainer?: THREE.Object3D;
|
|
42
|
+
domContainer?: Element;
|
|
43
|
+
five?: Five;
|
|
44
|
+
});
|
|
45
|
+
addPoints(point: THREE.Vector3): void;
|
|
46
|
+
refresh(): void;
|
|
47
|
+
hideArea(): void;
|
|
48
|
+
showArea(): void;
|
|
49
|
+
/**
|
|
50
|
+
* @description: five camera update 时,更新Dom的位置
|
|
51
|
+
*/
|
|
52
|
+
updateDom: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* @description: 获取一个点投影在当前平面上的点
|
|
55
|
+
*/
|
|
56
|
+
projectPoint(point: THREE.Vector3): THREE.Vector3;
|
|
57
|
+
remove(): void;
|
|
58
|
+
/**
|
|
59
|
+
* @todo: 没写完
|
|
60
|
+
*/
|
|
61
|
+
dispose(): void;
|
|
62
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var d = (o, e, i) => e in o ? m(o, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[e] = i;
|
|
3
|
+
var t = (o, e, i) => (d(o, typeof e != "symbol" ? e + "" : e, i), i);
|
|
4
|
+
import * as r from "three";
|
|
5
|
+
import { uuid as f } from "../../shared-utils/uuid.js";
|
|
6
|
+
import { Subscribe as c } from "@realsee/five";
|
|
7
|
+
import u from "./line.js";
|
|
8
|
+
import v from "./polygon.js";
|
|
9
|
+
import { Polyline as y } from "./polyline.js";
|
|
10
|
+
import h from "./point.js";
|
|
11
|
+
import { AreaItem as C } from "../utils/dom/areaDom.js";
|
|
12
|
+
import "../utils/line.js";
|
|
13
|
+
import "@realsee/five/line";
|
|
14
|
+
import "../utils/constants.js";
|
|
15
|
+
import "../utils/dom/distanceItem.js";
|
|
16
|
+
import "../utils/dom/base.js";
|
|
17
|
+
import "../utils/isNDCPointInScreen.js";
|
|
18
|
+
import "../../shared-utils/three/IObject3D.js";
|
|
19
|
+
import "../utils/generatePolygonGeometry.js";
|
|
20
|
+
import "earcut";
|
|
21
|
+
import "../../shared-utils/removeArrayItem.js";
|
|
22
|
+
import "../utils/geometryUtil.js";
|
|
23
|
+
import "../../shared-utils/three/centerPoint.js";
|
|
24
|
+
class V {
|
|
25
|
+
constructor(e, i) {
|
|
26
|
+
t(this, "id", f());
|
|
27
|
+
t(this, "selected", !1);
|
|
28
|
+
t(this, "text");
|
|
29
|
+
t(this, "lightMesh");
|
|
30
|
+
t(this, "areaItem");
|
|
31
|
+
t(this, "hook", new c());
|
|
32
|
+
/** 多边形mesh */
|
|
33
|
+
t(this, "polygon");
|
|
34
|
+
/** 多边形顶点 */
|
|
35
|
+
t(this, "points", []);
|
|
36
|
+
/** 多边形前三个点组成的平面,用来使得后面加的点也落在这个平面上 */
|
|
37
|
+
t(this, "planeHelper");
|
|
38
|
+
/** 多边形边框 */
|
|
39
|
+
t(this, "polyline");
|
|
40
|
+
/** 多边形mesh容器 */
|
|
41
|
+
t(this, "meshContainer");
|
|
42
|
+
/** 多边形dom容器 */
|
|
43
|
+
t(this, "domContainer");
|
|
44
|
+
t(this, "five");
|
|
45
|
+
t(this, "model");
|
|
46
|
+
/**
|
|
47
|
+
* @description: five camera update 时,更新Dom的位置
|
|
48
|
+
*/
|
|
49
|
+
t(this, "updateDom", () => {
|
|
50
|
+
this.five && (this.polyline.lines.forEach((e) => e.distanceItem.update(this.five)), this.areaItem.updateDomPosition(this.five));
|
|
51
|
+
});
|
|
52
|
+
var n;
|
|
53
|
+
e && (this.points = e), this.model = i.model, this.polygon = new v(e), this.polyline = new y({ model: i.model }), this.areaItem = new C({
|
|
54
|
+
area: this,
|
|
55
|
+
clickCallback: (a, s) => {
|
|
56
|
+
const l = a.clientX + "px", p = a.clientY + "px";
|
|
57
|
+
this.hook.emit("selected", this, { left: l, top: p });
|
|
58
|
+
}
|
|
59
|
+
}), this.domContainer = i.domContainer || null, this.meshContainer = i.meshContainer || null, this.five = i.five || null, this.areaItem.appendTo(this.domContainer), (n = this.five) == null || n.on("cameraUpdate", this.updateDom);
|
|
60
|
+
}
|
|
61
|
+
addPoints(e) {
|
|
62
|
+
var a;
|
|
63
|
+
this.points = this.points.concat(e);
|
|
64
|
+
const i = this.points.at(-2), n = this.points.at(-1);
|
|
65
|
+
if (i && n) {
|
|
66
|
+
const s = new u(new h(i), new h(n), this.polyline.model);
|
|
67
|
+
this.polyline.addLine(s), this.meshContainer.add(s.mesh), this.five && (s.distanceItem.setCanSelect(!1), s.distanceItem.appendTo(this.domContainer), s.distanceItem.update(this.five));
|
|
68
|
+
}
|
|
69
|
+
(a = this.meshContainer) != null && a.children.includes(this.polygon) || this.meshContainer.add(this.polygon), this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five), this.points.length === 3 ? this.planeHelper = new r.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.points.length < 3 && (this.planeHelper = null);
|
|
70
|
+
}
|
|
71
|
+
refresh() {
|
|
72
|
+
this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five);
|
|
73
|
+
}
|
|
74
|
+
hideArea() {
|
|
75
|
+
this.polygon.visible = !1, this.areaItem.hide();
|
|
76
|
+
}
|
|
77
|
+
showArea() {
|
|
78
|
+
this.polygon.visible = !0, this.areaItem.show();
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @description: 获取一个点投影在当前平面上的点
|
|
82
|
+
*/
|
|
83
|
+
projectPoint(e) {
|
|
84
|
+
return this.planeHelper ? this.planeHelper.projectPoint(e, new r.Vector3()) : e;
|
|
85
|
+
}
|
|
86
|
+
remove() {
|
|
87
|
+
this.polygon.removeFromParent(), this.areaItem.remove(), this.polyline.lines.forEach((e) => e.remove());
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @todo: 没写完
|
|
91
|
+
*/
|
|
92
|
+
dispose() {
|
|
93
|
+
this.remove(), this.model.areas.splice(this.model.areas.indexOf(this), 1), this.planeHelper = null, this.five.off("cameraUpdate", this.updateDom), this.five.needsRender = !0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
V as default
|
|
98
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Config } from '../typings';
|
|
2
2
|
import type { PluginData } from '../typings/data';
|
|
3
|
+
import type Area from './area';
|
|
3
4
|
import type Line from './line';
|
|
4
5
|
import { Polyline } from './polyline';
|
|
5
6
|
import { Subscribe } from '@realsee/five';
|
|
@@ -8,6 +9,10 @@ type IModelEvent = {
|
|
|
8
9
|
* @param line 被创建的线条
|
|
9
10
|
*/
|
|
10
11
|
polylineAdded: (line: Polyline) => void;
|
|
12
|
+
/** 新增面积
|
|
13
|
+
* @param area 被创建的面积
|
|
14
|
+
*/
|
|
15
|
+
areaAdded: (area: Area) => void;
|
|
11
16
|
/** 删除线条
|
|
12
17
|
* @param lines 被删除的线条数组
|
|
13
18
|
*/
|
|
@@ -16,18 +21,22 @@ type IModelEvent = {
|
|
|
16
21
|
export declare class Model {
|
|
17
22
|
readonly config?: Config;
|
|
18
23
|
readonly polylines: Polyline[];
|
|
24
|
+
readonly areas: Area[];
|
|
19
25
|
readonly hook: Subscribe<IModelEvent>;
|
|
20
26
|
constructor(config?: Config);
|
|
21
27
|
addPolyline(polyline: Polyline): void;
|
|
28
|
+
addArea(area: Area): void;
|
|
22
29
|
replacePolylineByID(id: string, polyline: Polyline): void;
|
|
23
30
|
removePolyline(polyline: Polyline): void;
|
|
24
31
|
getPolylineByID(id: string): Polyline;
|
|
25
32
|
getPolylineByLine(line: Line): Polyline;
|
|
26
33
|
getLineByID(id: string): Line;
|
|
27
34
|
getAllLines(): Line[];
|
|
35
|
+
getAllAreas(): Area[];
|
|
28
36
|
getAllPoints(): import("./point").default[];
|
|
29
37
|
includes(item: Polyline): boolean;
|
|
30
38
|
clear(): void;
|
|
39
|
+
dispose(): void;
|
|
31
40
|
getClosestPoint(): void;
|
|
32
41
|
parse(data: PluginData): void;
|
|
33
42
|
toJson(): PluginData;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var t = (o, i, e) => (
|
|
4
|
-
import { Polyline as
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var r = (o, i, e) => i in o ? l(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e;
|
|
3
|
+
var t = (o, i, e) => (r(o, typeof i != "symbol" ? i + "" : i, e), e);
|
|
4
|
+
import { Polyline as n } from "./polyline.js";
|
|
5
5
|
import { Subscribe as p } from "@realsee/five";
|
|
6
6
|
import "./line.js";
|
|
7
7
|
import "../../shared-utils/uuid.js";
|
|
@@ -9,14 +9,16 @@ import "../utils/line.js";
|
|
|
9
9
|
import "@realsee/five/line";
|
|
10
10
|
import "../utils/constants.js";
|
|
11
11
|
import "three";
|
|
12
|
-
import "../utils/
|
|
12
|
+
import "../utils/dom/distanceItem.js";
|
|
13
|
+
import "../utils/dom/base.js";
|
|
13
14
|
import "../utils/isNDCPointInScreen.js";
|
|
14
15
|
import "./point.js";
|
|
15
16
|
import "../../shared-utils/removeArrayItem.js";
|
|
16
|
-
class
|
|
17
|
+
class B {
|
|
17
18
|
constructor(i) {
|
|
18
19
|
t(this, "config");
|
|
19
20
|
t(this, "polylines", []);
|
|
21
|
+
t(this, "areas", []);
|
|
20
22
|
t(this, "hook", new p());
|
|
21
23
|
this.config = i;
|
|
22
24
|
}
|
|
@@ -27,12 +29,19 @@ class I {
|
|
|
27
29
|
}
|
|
28
30
|
this.polylines.push(i), this.hook.emit("polylineAdded", i);
|
|
29
31
|
}
|
|
32
|
+
addArea(i) {
|
|
33
|
+
if (this.areas.find(({ id: e }) => e === i.id) !== void 0) {
|
|
34
|
+
console.error(new Error("不能重复添加 area"));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
this.areas.push(i), this.hook.emit("areaAdded", i);
|
|
38
|
+
}
|
|
30
39
|
replacePolylineByID(i, e) {
|
|
31
|
-
const
|
|
32
|
-
|
|
40
|
+
const s = this.getPolylineByID(i);
|
|
41
|
+
s == null || s.replace(e);
|
|
33
42
|
}
|
|
34
43
|
removePolyline(i) {
|
|
35
|
-
const e = this.polylines.findIndex(({ id:
|
|
44
|
+
const e = this.polylines.findIndex(({ id: s }) => s === i.id);
|
|
36
45
|
if (e === -1) {
|
|
37
46
|
console.error(new Error("polyline 不存在"));
|
|
38
47
|
return;
|
|
@@ -51,6 +60,9 @@ class I {
|
|
|
51
60
|
getAllLines() {
|
|
52
61
|
return this.polylines.map((i) => i.lines).flat(1);
|
|
53
62
|
}
|
|
63
|
+
getAllAreas() {
|
|
64
|
+
return this.areas;
|
|
65
|
+
}
|
|
54
66
|
getAllPoints() {
|
|
55
67
|
return this.polylines.map((i) => i.points).flat(1);
|
|
56
68
|
}
|
|
@@ -58,12 +70,15 @@ class I {
|
|
|
58
70
|
return this.polylines.find(({ id: e }) => e === i.id) !== void 0;
|
|
59
71
|
}
|
|
60
72
|
clear() {
|
|
61
|
-
this.polylines.forEach((i) => this.hook.emit("polylineRemoved", i)), this.polylines.splice(0, this.polylines.length);
|
|
73
|
+
this.polylines.forEach((i) => this.hook.emit("polylineRemoved", i)), this.areas.forEach((i) => i.dispose()), this.polylines.splice(0, this.polylines.length), this.areas.splice(0, this.areas.length);
|
|
74
|
+
}
|
|
75
|
+
dispose() {
|
|
76
|
+
this.clear();
|
|
62
77
|
}
|
|
63
78
|
getClosestPoint() {
|
|
64
79
|
}
|
|
65
80
|
parse(i) {
|
|
66
|
-
this.clear(), this.polylines.push(...i.polylines.map((e) => new
|
|
81
|
+
this.clear(), this.polylines.push(...i.polylines.map((e) => new n({ model: this }).fromJson(e))), this.polylines.forEach((e) => this.hook.emit("polylineAdded", e));
|
|
67
82
|
}
|
|
68
83
|
toJson() {
|
|
69
84
|
return {
|
|
@@ -72,5 +87,5 @@ class I {
|
|
|
72
87
|
}
|
|
73
88
|
}
|
|
74
89
|
export {
|
|
75
|
-
|
|
90
|
+
B as Model
|
|
76
91
|
};
|
|
@@ -4,7 +4,8 @@ import type { LineJson } from '../typings/data';
|
|
|
4
4
|
import type { Line as FiveLine } from '@realsee/five/line';
|
|
5
5
|
import type { Polyline } from './polyline';
|
|
6
6
|
import { Subscribe, type SubscribeEventMap } from '@realsee/five';
|
|
7
|
-
import {
|
|
7
|
+
import { DistanceItem } from '../utils/dom/distanceItem';
|
|
8
|
+
import type * as THREE from 'three';
|
|
8
9
|
export interface ILineHook extends SubscribeEventMap {
|
|
9
10
|
selected: (line: Line) => void;
|
|
10
11
|
textChanged: (text: string | undefined) => void;
|
|
@@ -22,6 +23,8 @@ export default class Line {
|
|
|
22
23
|
readonly distanceItem: DistanceItem;
|
|
23
24
|
private polyline?;
|
|
24
25
|
constructor(point: Point, anotherPoint: Point, model: Model);
|
|
26
|
+
setPoints(startPoint: THREE.Vector3, endPoint: THREE.Vector3): void;
|
|
27
|
+
remove(): void;
|
|
25
28
|
clear(): void;
|
|
26
29
|
isEmpty(): boolean;
|
|
27
30
|
getPolyline(): Polyline;
|