@realsee/dnalogel 2.21.0-dev.5 → 2.21.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.js +329 -329
- package/dist/CSS3DRenderPlugin/Controller.d.ts +4 -1
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +2 -13
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +3 -0
- package/dist/PanoMeasurePlugin/Model/area.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Model/polygon.d.ts +3 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -8
- package/dist/PanoMeasurePlugin/typings/data.d.ts +2 -1
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +3 -0
- package/dist/PanoMeasurePlugin/utils/dom/base.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/geometryUtil.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +2 -1
- package/dist/base/BasePlugin.d.ts +4 -1
- package/dist/components/PaintBrush/style.d.ts +1 -1
- package/dist/index.cjs.js +62 -62
- package/dist/index.js +6431 -6190
- package/dist/index.umd.js +55 -55
- package/dist/shared-utils/absoluteUrl.d.ts +5 -0
- package/dist/{PanoMeasurePlugin/utils → shared-utils}/getPointFromHammerEvent.d.ts +1 -1
- package/dist/shared-utils/index.d.ts +1 -1
- package/dist/shared-utils/three/PointSelector.d.ts +37 -3
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +32 -31
- package/docs/classes/CruisePluginController.html +46 -43
- package/docs/classes/GuideLineItem.GuideLineItem.html +21 -20
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +36 -35
- package/docs/classes/Magnifier.html +21 -20
- package/docs/classes/ModelRoomLabelController.html +12 -11
- package/docs/classes/Object3DHelperController.html +45 -42
- package/docs/classes/PaintBrush.html +16 -15
- package/docs/classes/PanoMeasurePluginLine.html +46 -25
- package/docs/classes/PanoMeasurePluginModel.html +42 -26
- package/docs/classes/PanoMeasurePluginPoint.html +15 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +28 -27
- package/docs/classes/PanoTagPluginController.html +67 -64
- package/docs/classes/Util.BetterTween.html +10 -9
- package/docs/classes/Util.Interval.html +13 -12
- package/docs/classes/Util.Magnifier.html +19 -18
- package/docs/classes/Util.PointDomHelper.html +12 -11
- package/docs/classes/Util.PointHelper.html +12 -11
- package/docs/classes/Util.PointSelectorHelper.html +18 -17
- package/docs/classes/Util.Rectangle.html +14 -13
- package/docs/enums/CameraMovementEffect.html +8 -7
- package/docs/enums/ContentType.html +21 -20
- package/docs/enums/DIRECTION.html +10 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +10 -9
- package/docs/enums/DimensionType.html +8 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +9 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +10 -9
- package/docs/enums/PaintBrushTypeEnum.html +9 -8
- package/docs/enums/PointType.html +8 -7
- package/docs/enums/Rotation.html +9 -8
- package/docs/functions/CSS3DRenderPlugin.html +5 -4
- package/docs/functions/CameraMovementPlugin.html +5 -4
- package/docs/functions/CruisePlugin.html +5 -4
- package/docs/functions/GuideLinePlugin.html +6 -5
- package/docs/functions/ItemLabelPlugin.html +5 -4
- package/docs/functions/MapviewFloorplanPlugin.html +5 -4
- package/docs/functions/ModelChassisCompassPlugin.html +5 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -4
- package/docs/functions/ModelFloorplanPlugin.html +5 -4
- package/docs/functions/ModelItemLabelPlugin.html +5 -4
- package/docs/functions/ModelRoomLabelPlugin.html +5 -4
- package/docs/functions/ModelTVVideoPlugin.html +5 -4
- package/docs/functions/ModelViewPlugin.html +5 -4
- package/docs/functions/Object3DHelperPlugin.html +5 -4
- package/docs/functions/PanoCompassPlugin.html +5 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +5 -4
- package/docs/functions/PanoDoorLabelPlugin.html +5 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +5 -4
- package/docs/functions/PanoMeasurePlugin.html +5 -4
- package/docs/functions/PanoRulerPlugin.html +5 -4
- package/docs/functions/PanoRulerProPlugin.html +5 -4
- package/docs/functions/PanoSpatialTagPlugin.html +5 -4
- package/docs/functions/PanoTagPlugin.html +5 -4
- package/docs/functions/PanoVideoPlugin.html +5 -4
- package/docs/functions/TopviewFloorplanPlugin.html +5 -4
- package/docs/functions/Util.absoluteUrl.html +370 -0
- package/docs/functions/Util.getCoordsFromClient.html +6 -5
- package/docs/functions/Util.getCoordsFromElement.html +6 -5
- package/docs/functions/Util.getFrameTime.html +6 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +6 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +6 -5
- package/docs/functions/Util.isAbsoluteURL.html +6 -5
- package/docs/functions/Util.isModelLike.html +6 -5
- package/docs/functions/Util.isNil.html +6 -5
- package/docs/functions/Util.isPanoramaLike.html +6 -5
- package/docs/functions/Util.nextFrame.html +6 -5
- package/docs/functions/Util.notNil.html +6 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +6 -5
- package/docs/functions/Util.tweenProgress.html +6 -5
- package/docs/functions/Util.uuid.html +6 -5
- package/docs/functions/pluginFlag.html +6 -5
- package/docs/index.html +6 -5
- package/docs/interfaces/AddTagConfig.html +7 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +12 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +9 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +8 -7
- package/docs/interfaces/CruisePluginTypes.Config.html +9 -8
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +13 -12
- package/docs/interfaces/CruisePluginTypes.EventMap.html +21 -20
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +13 -12
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +15 -14
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +15 -14
- package/docs/interfaces/CruisePluginTypes.PluginData.html +10 -9
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +8 -7
- package/docs/interfaces/CruisePluginTypes.PluginState.html +12 -11
- package/docs/interfaces/EventMap.html +16 -15
- package/docs/interfaces/FloorplanBounding.html +9 -8
- package/docs/interfaces/FloorplanData.html +11 -10
- package/docs/interfaces/FloorplanEntrance.html +12 -11
- package/docs/interfaces/FloorplanExtraObject.html +11 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +9 -8
- package/docs/interfaces/FloorplanFloorData.html +10 -9
- package/docs/interfaces/FloorplanImagePosition.html +8 -7
- package/docs/interfaces/FloorplanObserver.html +10 -9
- package/docs/interfaces/FloorplanOutlineItem.html +10 -9
- package/docs/interfaces/FloorplanPosition.html +8 -7
- package/docs/interfaces/FloorplanRoomItem.html +14 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +8 -7
- package/docs/interfaces/FloorplanServerBounding.html +9 -8
- package/docs/interfaces/FloorplanServerComputedData.html +11 -10
- package/docs/interfaces/FloorplanServerData.html +8 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +11 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +9 -8
- package/docs/interfaces/FloorplanServerEntrance.html +12 -11
- package/docs/interfaces/FloorplanServerFloorData.html +10 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +8 -7
- package/docs/interfaces/FloorplanServerObserver.html +10 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +10 -9
- package/docs/interfaces/FloorplanServerPosition.html +8 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +15 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +8 -7
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +9 -8
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +11 -10
- package/docs/interfaces/GuideLinePluginType.EventMap.html +14 -13
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +9 -8
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +7 -6
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +14 -13
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +9 -8
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +19 -18
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +8 -7
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +19 -18
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +6 -5
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +8 -7
- package/docs/interfaces/GuideLinePluginType.PluginState.html +9 -8
- package/docs/interfaces/GuideLinePluginType.Route.html +12 -11
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +10 -9
- package/docs/interfaces/HelperOffset.html +9 -8
- package/docs/interfaces/ImagePlaneGroup.html +7 -6
- package/docs/interfaces/ItemLabelPluginData.html +7 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +12 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +10 -9
- package/docs/interfaces/MinMax.html +8 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +8 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +9 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +8 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +9 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +9 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +7 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +12 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +8 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +7 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +10 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +9 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +7 -6
- package/docs/interfaces/ModelViewPluginExportType.html +12 -11
- package/docs/interfaces/Object3DHelperState.html +9 -8
- package/docs/interfaces/ObjectHelperControllers.html +10 -9
- package/docs/interfaces/PaintBrushAction.html +13 -12
- package/docs/interfaces/PaintBrushConfigs.html +13 -12
- package/docs/interfaces/PaintBrushState.html +11 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +6 -5
- package/docs/interfaces/PanoMeasureParameterType.html +16 -15
- package/docs/interfaces/PanoMeasurePluginLineJson.html +9 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +8 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +8 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +9 -8
- package/docs/interfaces/PanoRulerPluginExportType.html +11 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +8 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +9 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +10 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +8 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +8 -7
- package/docs/interfaces/PanoRulerProPluginState.html +9 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +6 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +6 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +12 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +11 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +14 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +11 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +14 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +12 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +11 -10
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +7 -6
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +9 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +7 -6
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +10 -9
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +7 -6
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +9 -8
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +11 -10
- package/docs/interfaces/Point.html +9 -8
- package/docs/interfaces/Room.html +10 -9
- package/docs/interfaces/RoomInfo.html +8 -7
- package/docs/interfaces/RoomLabel.html +15 -14
- package/docs/interfaces/RoomRules.html +6 -5
- package/docs/interfaces/Rooms.html +6 -5
- package/docs/interfaces/Scissor.html +10 -9
- package/docs/interfaces/State.html +9 -8
- package/docs/interfaces/TagCacheInterface.html +13 -12
- package/docs/interfaces/TagConfig.html +14 -13
- package/docs/interfaces/TagGLTFObjectGroup.html +7 -6
- package/docs/interfaces/TagIconUrl.html +13 -12
- package/docs/interfaces/TagObjectGroup.html +7 -6
- package/docs/interfaces/TagStyle.html +7 -6
- package/docs/interfaces/Tags.html +10 -9
- package/docs/interfaces/TemporaryState.html +7 -6
- package/docs/interfaces/Util.MagnifierParameter.html +12 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +9 -8
- package/docs/interfaces/Util.PointIntersection.html +9 -8
- package/docs/modules/CruisePluginTypes.html +6 -5
- package/docs/modules/GuideLineItem.html +6 -5
- package/docs/modules/GuideLineModeItem.html +6 -5
- package/docs/modules/GuideLinePluginType.html +6 -5
- package/docs/modules/PanoVideoPluginType.html +6 -5
- package/docs/modules/Util.html +7 -5
- package/docs/modules.html +5 -4
- package/docs/types/ArrayPosition.html +6 -5
- package/docs/types/AudioAppearance.html +6 -5
- package/docs/types/AudioTagTypeConfigKey.html +6 -5
- package/docs/types/CSS3DRenderExportType.html +6 -5
- package/docs/types/CSS3DRenderPluginExportType.html +6 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +6 -5
- package/docs/types/ClassFunctionParameters.html +6 -5
- package/docs/types/Color.html +6 -5
- package/docs/types/ContentTypeConfigKey.html +6 -5
- package/docs/types/ContentTypeConfigKeySplit.html +6 -5
- package/docs/types/ContentTypeMap.html +6 -5
- package/docs/types/Create3DDomContainerReturnType.html +6 -5
- package/docs/types/Create3DElementReturnType.html +6 -5
- package/docs/types/CruisePluginExportType.html +6 -5
- package/docs/types/CruisePluginTypes.CruiseData.html +6 -5
- package/docs/types/CruisePluginTypes.MoveEffect.html +6 -5
- package/docs/types/DeprecatedMediaPlaneProperty.html +6 -5
- package/docs/types/DeprecatedTagProperty.html +6 -5
- package/docs/types/Direction-1.html +6 -5
- package/docs/types/Direction4.html +6 -5
- package/docs/types/ElementRenderer.html +6 -5
- package/docs/types/FloorplanRuleLabels.html +6 -5
- package/docs/types/FloorplanServerRuleLabels.html +6 -5
- package/docs/types/GuideLinePluginExportType.html +6 -5
- package/docs/types/GuideLinePluginType.GuideLineItem.html +6 -5
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +6 -5
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +6 -5
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +6 -5
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +6 -5
- package/docs/types/GuideLinePluginType.PathItem.html +6 -5
- package/docs/types/GuideLinePluginType.PluginData.html +6 -5
- package/docs/types/HelperEventMap.html +6 -5
- package/docs/types/LoadTagConfig.html +6 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +6 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +6 -5
- package/docs/types/MediaData.html +6 -5
- package/docs/types/MediaStore.html +6 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +6 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +6 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +6 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +6 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +6 -5
- package/docs/types/MoveArgs.html +6 -5
- package/docs/types/MoveOpts.html +6 -5
- package/docs/types/Object3DHelperEventMap.html +6 -5
- package/docs/types/ObjectFit.html +6 -5
- package/docs/types/PaintBrushEventMap.html +6 -5
- package/docs/types/PanoCompassPluginData.html +6 -5
- package/docs/types/PanoCompassPluginExportType.html +6 -5
- package/docs/types/PanoCompassPluginParameterType.html +6 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +6 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +6 -5
- package/docs/types/PanoIndex.html +6 -5
- package/docs/types/PanoMeasurePluginEvent.html +6 -5
- package/docs/types/PanoMeasureReturnType.html +6 -5
- package/docs/types/PanoSpatialTagPluginId.html +6 -5
- package/docs/types/PanoTagPluginExportInterface.html +6 -5
- package/docs/types/PanoTagPluginParamsInterface.html +6 -5
- package/docs/types/PanoVideoPluginParameterType.html +6 -5
- package/docs/types/PanoVideoPluginReturnType.html +6 -5
- package/docs/types/PartialObjectDeep.html +6 -5
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +6 -5
- package/docs/types/PlaneTag.html +6 -5
- package/docs/types/Point2DTag.html +6 -5
- package/docs/types/Point3DTag.html +6 -5
- package/docs/types/PointTag.html +6 -5
- package/docs/types/PointTagInstance.html +6 -5
- package/docs/types/Position.html +6 -5
- package/docs/types/RotateArgs.html +6 -5
- package/docs/types/RotateOpts.html +6 -5
- package/docs/types/RuleLabelsKey.html +6 -5
- package/docs/types/RuleLabelsValue.html +6 -5
- package/docs/types/StickType.html +6 -5
- package/docs/types/Tag.html +6 -5
- package/docs/types/Tag2D.html +6 -5
- package/docs/types/Tag3D.html +6 -5
- package/docs/types/TagContentType.html +6 -5
- package/docs/types/TagDimensionType.html +6 -5
- package/docs/types/TagElement.html +6 -5
- package/docs/types/TagEvents.html +6 -5
- package/docs/types/TagGLTFObject.html +6 -5
- package/docs/types/TagHooks.html +6 -5
- package/docs/types/TagId.html +6 -5
- package/docs/types/TagInstance.html +6 -5
- package/docs/types/TagPointType.html +6 -5
- package/docs/types/TagRendererMap.html +6 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +6 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +6 -5
- package/docs/types/WorkCode.html +6 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +6 -5
- package/docs/variables/PLUGIN.html +6 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +6 -5
- package/docs/variables/ROOM_TYPE_MAP.html +6 -5
- package/docs/variables/itemLabelPluginServerParams.html +6 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +6 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +6 -5
- package/libs/CSS3DRenderPlugin/Controller.d.ts +4 -1
- package/libs/CSS3DRenderPlugin/Controller.js +31 -28
- package/libs/CSS3DRenderPlugin/index.js +1 -1
- package/libs/CruisePlugin/Controller.js +1 -1
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/GuideLinePlugin/Components/Tag.js +68 -68
- package/libs/GuideLinePlugin/Controller.js +1 -1
- package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +2 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +1 -1
- package/libs/GuideLinePlugin/index.js +1 -1
- package/libs/ItemLabelPlugin/ItemLabelItem.js +82 -82
- package/libs/ModelTVVideoPlugin/Plugin.js +30 -29
- package/libs/ModelTVVideoPlugin/index.js +4 -3
- package/libs/Object3DHelperPlugin/Controller.js +1 -1
- package/libs/Object3DHelperPlugin/index.js +1 -1
- package/libs/PanoCompassPlugin/Controller.js +20 -20
- package/libs/PanoCompassPlugin/index.js +1 -1
- package/libs/PanoDoorLabelPlugin/BaseController.js +1 -1
- package/libs/PanoDoorLabelPlugin/Controller.js +1 -1
- package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +60 -60
- package/libs/PanoDoorLabelPlugin/index.js +1 -1
- package/libs/PanoMeasurePlugin/Components/Controller1.js +225 -155
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +2 -13
- package/libs/PanoMeasurePlugin/Controller/EditController.js +142 -110
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +3 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +63 -66
- package/libs/PanoMeasurePlugin/Model/area.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Model/area.js +10 -5
- package/libs/PanoMeasurePlugin/Model/index.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Model/index.js +47 -39
- package/libs/PanoMeasurePlugin/Model/line.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Model/line.js +6 -0
- package/libs/PanoMeasurePlugin/Model/polygon.d.ts +3 -0
- package/libs/PanoMeasurePlugin/Model/polygon.js +17 -14
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +16 -14
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -8
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +16 -24
- package/libs/PanoMeasurePlugin/index.js +19 -17
- package/libs/PanoMeasurePlugin/typings/data.d.ts +2 -1
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +3 -0
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +36 -15
- package/libs/PanoMeasurePlugin/utils/dom/base.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/dom/base.js +37 -31
- package/libs/PanoMeasurePlugin/utils/dom/distanceItem.js +38 -23
- package/libs/PanoMeasurePlugin/utils/geometryUtil.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/geometryUtil.js +15 -13
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +2 -1
- package/libs/PanoSpatialTagPlugin/Plugin.js +1 -1
- package/libs/PanoSpatialTagPlugin/index.js +1 -1
- package/libs/PanoTagPlugin/controller/TagCache.js +1 -1
- package/libs/PanoTagPlugin/controller/TagComputer.js +1 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +1 -1
- package/libs/PanoTagPlugin/controller/TagUtil.js +1 -1
- package/libs/PanoTagPlugin/controller/index.js +1 -1
- package/libs/PanoTagPlugin/index.js +1 -1
- package/libs/PanoVideoPlugin/Controller.js +1 -1
- package/libs/PanoVideoPlugin/index.js +1 -1
- package/libs/base/BasePlugin.d.ts +4 -1
- package/libs/base/BasePlugin.js +14 -11
- package/libs/components/PaintBrush/style.d.ts +1 -1
- package/libs/components/PaintBrush/style.js +4 -4
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -1
- package/libs/index.js +4 -4
- package/libs/shared-utils/absoluteUrl.d.ts +5 -0
- package/libs/shared-utils/absoluteUrl.js +10 -0
- package/libs/{PanoMeasurePlugin/utils → shared-utils}/getPointFromHammerEvent.d.ts +1 -1
- package/libs/shared-utils/index.d.ts +1 -1
- package/libs/shared-utils/index.js +17 -16
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/Magnifier.js +6 -5
- package/libs/shared-utils/three/PointSelector.d.ts +37 -3
- package/libs/shared-utils/three/PointSelector.js +84 -36
- package/libs/vendor/svelte/internal/index.js +392 -345
- package/package.json +1 -1
- package/dist/shared-utils/isAbsoluteURL.d.ts +0 -1
- package/libs/shared-utils/isAbsoluteURL.d.ts +0 -1
- package/libs/shared-utils/isAbsoluteURL.js +0 -6
- /package/dist/{PanoMeasurePlugin/utils → shared-utils}/getIntersectionFromEvent.d.ts +0 -0
- /package/libs/{PanoMeasurePlugin/utils → shared-utils}/getIntersectionFromEvent.d.ts +0 -0
- /package/libs/{PanoMeasurePlugin/utils → shared-utils}/getIntersectionFromEvent.js +0 -0
- /package/libs/{PanoMeasurePlugin/utils → shared-utils}/getPointFromHammerEvent.js +0 -0
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var c = (s, e, t) => e in s ?
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var P = Object.getOwnPropertySymbols;
|
|
3
|
+
var T = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var c = (s, e, t) => e in s ? I(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
|
+
T.call(e, t) && c(s, t, e[t]);
|
|
7
|
+
if (P)
|
|
8
|
+
for (var t of P(e))
|
|
9
|
+
E.call(e, t) && c(s, t, e[t]);
|
|
10
10
|
return s;
|
|
11
11
|
};
|
|
12
12
|
var i = (s, e, t) => (c(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
|
-
import
|
|
13
|
+
import k from "../Modules/FiveHelper.js";
|
|
14
14
|
import m from "./EditController.js";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
15
|
+
import w from "./ViewController.js";
|
|
16
|
+
import v from "./WatchController.js";
|
|
17
17
|
import a from "./MixedController.js";
|
|
18
|
-
import { omit as
|
|
19
|
-
import { Group as
|
|
20
|
-
import { Model as
|
|
21
|
-
import { Subscribe as
|
|
22
|
-
import { getMouseGroup as
|
|
23
|
-
import { UIController as
|
|
24
|
-
import { GuideController as
|
|
25
|
-
import { ShortcutKeyController as
|
|
26
|
-
import { safeObj as
|
|
27
|
-
import { Magnifier as
|
|
18
|
+
import { omit as D } from "../../shared-utils/filter.js";
|
|
19
|
+
import { Group as U } from "three";
|
|
20
|
+
import { Model as x } from "../Model/index.js";
|
|
21
|
+
import { Subscribe as G } from "@realsee/five";
|
|
22
|
+
import { getMouseGroup as H } from "../utils/mouseGroup.js";
|
|
23
|
+
import { UIController as S } from "../Modules/UIController/index.js";
|
|
24
|
+
import { GuideController as L } from "../Modules/GuideController.js";
|
|
25
|
+
import { ShortcutKeyController as O } from "./ShortcutKeyController.js";
|
|
26
|
+
import { safeObj as b } from "../../shared-utils/safeObj.js";
|
|
27
|
+
import { Magnifier as B } from "../../shared-utils/three/Magnifier.js";
|
|
28
28
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
29
29
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
30
30
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
31
|
-
import "
|
|
31
|
+
import { isTouchDevice as W } from "../../shared-utils/isTouchDevice.js";
|
|
32
32
|
import "../Model/line.js";
|
|
33
33
|
import "../../shared-utils/uuid.js";
|
|
34
34
|
import "../utils/line.js";
|
|
@@ -42,8 +42,6 @@ import "../../shared-utils/removeArrayItem.js";
|
|
|
42
42
|
import "../../shared-utils/throttle.js";
|
|
43
43
|
import "./BaseController.js";
|
|
44
44
|
import "../utils/ironbox.js";
|
|
45
|
-
import "../utils/getIntersectionFromEvent.js";
|
|
46
|
-
import "../utils/getPointFromHammerEvent.js";
|
|
47
45
|
import "../Model/polyline.js";
|
|
48
46
|
import "../Model/area.js";
|
|
49
47
|
import "../Model/polygon.js";
|
|
@@ -60,11 +58,12 @@ import "../../shared-utils/three/getIntersect.js";
|
|
|
60
58
|
import "../../shared-utils/three/PointHelper.js";
|
|
61
59
|
import "../../shared-utils/three/Assets/index.js";
|
|
62
60
|
import "../../shared-utils/three/PointDomHelper.js";
|
|
61
|
+
import "hammerjs";
|
|
63
62
|
import "../Modules/rangePiece/html.js";
|
|
64
63
|
import "../../CSS3DRenderPlugin/index.js";
|
|
65
64
|
import "../../CSS3DRenderPlugin/Controller.js";
|
|
66
65
|
import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
67
|
-
import "../../shared-utils/
|
|
66
|
+
import "../../shared-utils/absoluteUrl.js";
|
|
68
67
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
69
68
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
70
69
|
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
@@ -78,7 +77,8 @@ import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
|
78
77
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
79
78
|
import "../../shared-utils/animationFrame/BetterTween.js";
|
|
80
79
|
import "../../shared-utils/animationFrame/index.js";
|
|
81
|
-
import "../../shared-utils/
|
|
80
|
+
import "../../shared-utils/getIntersectionFromEvent.js";
|
|
81
|
+
import "../../shared-utils/getPointFromHammerEvent.js";
|
|
82
82
|
import "../Modules/DeleteDom/index.js";
|
|
83
83
|
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
84
84
|
import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
@@ -104,10 +104,12 @@ import "../Components/Common/Exit.js";
|
|
|
104
104
|
import "../Components/Controller1.js";
|
|
105
105
|
import "../Components/Common/Switcher1.js";
|
|
106
106
|
import "../Components/Common/CircleButton.js";
|
|
107
|
-
|
|
107
|
+
import "../../vendor/svelte/transition/index.js";
|
|
108
|
+
import "../../vendor/svelte/easing/index.js";
|
|
109
|
+
class kt {
|
|
108
110
|
constructor(e, t) {
|
|
109
111
|
i(this, "hasOpen", !1);
|
|
110
|
-
i(this, "hook", new
|
|
112
|
+
i(this, "hook", new G());
|
|
111
113
|
i(this, "magnifier");
|
|
112
114
|
i(this, "controller", null);
|
|
113
115
|
/** 允许的测量类型 */
|
|
@@ -130,28 +132,28 @@ class wt {
|
|
|
130
132
|
* @description 还原点位展示和默认鼠标 UI
|
|
131
133
|
*/
|
|
132
134
|
i(this, "disable", () => {
|
|
133
|
-
var e, t,
|
|
134
|
-
this.hasOpen = !1, this.container.style.opacity = "0", (e = this.controller) == null || e.dispose(), (t = this.useUIController) == null || t.hide(), (
|
|
135
|
+
var e, t, o, r;
|
|
136
|
+
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);
|
|
135
137
|
});
|
|
136
|
-
i(this, "getCurrentMode", () => this.controller instanceof m ? "Edit" : this.controller instanceof
|
|
138
|
+
i(this, "getCurrentMode", () => this.controller instanceof m ? "Edit" : this.controller instanceof v ? "Watch" : this.controller instanceof a ? "Mixed" : this.controller instanceof w ? "View" : null);
|
|
137
139
|
/** 变更场景
|
|
138
140
|
* @description 如果从编辑场景改变到观看场景,不会自动保存,默认丢弃所有改动
|
|
139
141
|
*/
|
|
140
142
|
i(this, "changeMode", (e) => {
|
|
141
|
-
var
|
|
143
|
+
var r;
|
|
142
144
|
if (!this.hasOpen || this.getCurrentMode() === e)
|
|
143
145
|
return;
|
|
144
|
-
(
|
|
146
|
+
(r = this.controller) == null || r.dispose();
|
|
145
147
|
const t = {
|
|
146
|
-
View:
|
|
147
|
-
Watch:
|
|
148
|
+
View: w,
|
|
149
|
+
Watch: v,
|
|
148
150
|
Edit: m,
|
|
149
151
|
Mixed: a
|
|
150
152
|
};
|
|
151
153
|
if (!t[e])
|
|
152
154
|
throw new Error("不存在的 Mode");
|
|
153
|
-
const
|
|
154
|
-
this.controller = new t[e](
|
|
155
|
+
const o = this.createControllerParams();
|
|
156
|
+
this.controller = new t[e](o), this.hook.emit("modeChange", e);
|
|
155
157
|
});
|
|
156
158
|
/**
|
|
157
159
|
* @description: 切换测量的类型
|
|
@@ -159,16 +161,16 @@ class wt {
|
|
|
159
161
|
i(this, "changeMeasureType", (e) => {
|
|
160
162
|
this.currentMeasureType = e, this.hook.emit("measureTypeChange", e);
|
|
161
163
|
});
|
|
162
|
-
var
|
|
163
|
-
this.five = e, this.params = t, this.config =
|
|
164
|
-
const r = (
|
|
164
|
+
var l, n, u, d, f, g, y, M, C;
|
|
165
|
+
this.five = e, this.params = t, this.config = D(t, ["openParams", "magnifierParams"]), this.model = new x(this.config), this.fiveHelper = new k(e), this.isMobile = (n = (l = t == null ? void 0 : t.openParams) == null ? void 0 : l.isMobile) != null ? n : !1, this.magnifier = new B(e, (u = t.magnifierParams) != null ? u : { width: 190, height: 190, scale: 2 }), this.allowMeasureType = Array.from(new Set((f = (d = t.editParams) == null ? void 0 : d.allowMeasureType) != null ? f : ["line"])), this.currentMeasureType = (g = this.allowMeasureType[0]) != null ? g : "line", this.group = new U(), 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";
|
|
166
|
+
const o = ((M = (y = t.editParams) == null ? void 0 : y.pointSelectorMode) != null ? M : W) ? "fixed" : "cursor", r = (C = this.params.openParams) != null ? C : {};
|
|
165
167
|
if (this.params.useUIController !== !1) {
|
|
166
|
-
const p = h({ container: this.container, openParams: r },
|
|
167
|
-
this.useUIController = new
|
|
168
|
+
const p = h({ container: this.container, openParams: r, pointSelectorMode: o }, b(this.params.useUIController));
|
|
169
|
+
this.useUIController = new S(this, p);
|
|
168
170
|
}
|
|
169
171
|
if (this.params.useGuideController !== !1) {
|
|
170
|
-
const p = h({ container: this.container },
|
|
171
|
-
this.useGuideController = new
|
|
172
|
+
const p = h({ container: this.container }, b(this.params.useGuideController));
|
|
173
|
+
this.useGuideController = new L(this, p);
|
|
172
174
|
}
|
|
173
175
|
}
|
|
174
176
|
appendTo(e) {
|
|
@@ -191,7 +193,7 @@ class wt {
|
|
|
191
193
|
*/
|
|
192
194
|
enable(e) {
|
|
193
195
|
var t;
|
|
194
|
-
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
|
|
196
|
+
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 O(this, this.five), this.hook.emit("enable", !0));
|
|
195
197
|
}
|
|
196
198
|
/** 进入编辑模式 */
|
|
197
199
|
edit(e) {
|
|
@@ -206,6 +208,9 @@ class wt {
|
|
|
206
208
|
removePolyline(e) {
|
|
207
209
|
this.model.removePolyline(e);
|
|
208
210
|
}
|
|
211
|
+
removeArea(e) {
|
|
212
|
+
this.model.removeArea(e);
|
|
213
|
+
}
|
|
209
214
|
removePolylineByID(e) {
|
|
210
215
|
const t = this.model.getPolylineByID(e);
|
|
211
216
|
t && this.model.removePolyline(t);
|
|
@@ -234,11 +239,11 @@ class wt {
|
|
|
234
239
|
var l;
|
|
235
240
|
if (!(this.controller instanceof m) && !(this.controller instanceof a))
|
|
236
241
|
return this;
|
|
237
|
-
const t = (l = e == null ? void 0 : e.mode) != null ? l : "View",
|
|
238
|
-
return
|
|
242
|
+
const t = (l = e == null ? void 0 : e.mode) != null ? l : "View", o = this.controller.model.polylines, r = this.controller.model.areas;
|
|
243
|
+
return o.forEach((n) => {
|
|
239
244
|
this.model.addPolyline(n);
|
|
240
|
-
}),
|
|
241
|
-
n.
|
|
245
|
+
}), r.forEach((n) => {
|
|
246
|
+
n.showArea(), this.model.addArea(n);
|
|
242
247
|
}), this.changeMode(t), this;
|
|
243
248
|
}
|
|
244
249
|
/** Mixed 模式才有用,添加起点 */
|
|
@@ -254,19 +259,11 @@ class wt {
|
|
|
254
259
|
return this.model.toJson();
|
|
255
260
|
}
|
|
256
261
|
/**
|
|
262
|
+
* @deprecated 暂不支持
|
|
257
263
|
* @description 改变插件的模式(pc端模式或移动端模式)
|
|
258
264
|
* @param isMobile true为移动端模式,false为pc端
|
|
259
265
|
*/
|
|
260
266
|
changeIsMobile(e) {
|
|
261
|
-
var t;
|
|
262
|
-
if (this.isMobile = e, this.params.useUIController !== !1) {
|
|
263
|
-
(t = this.useUIController) == null || t.dispose();
|
|
264
|
-
const r = h({
|
|
265
|
-
container: this.container,
|
|
266
|
-
mode: this.isMobile ? "mobile" : "pc"
|
|
267
|
-
}, typeof this.params.useUIController == "object" ? this.params.useUIController : {});
|
|
268
|
-
this.useUIController = new P(this, r);
|
|
269
|
-
}
|
|
270
267
|
}
|
|
271
268
|
changeConfigs(e) {
|
|
272
269
|
var t;
|
|
@@ -274,15 +271,15 @@ class wt {
|
|
|
274
271
|
}
|
|
275
272
|
/** 设置线段的文本 */
|
|
276
273
|
setCustomText(e, t) {
|
|
277
|
-
var
|
|
278
|
-
const
|
|
279
|
-
if (!
|
|
274
|
+
var r;
|
|
275
|
+
const o = this.model.getLineByID(e);
|
|
276
|
+
if (!o)
|
|
280
277
|
throw new Error("不存在的线段");
|
|
281
|
-
|
|
278
|
+
o.setText(t), (r = this.controller) == null || r.updateDistanceUI();
|
|
282
279
|
}
|
|
283
280
|
createControllerParams() {
|
|
284
|
-
var
|
|
285
|
-
const e = (
|
|
281
|
+
var o, r;
|
|
282
|
+
const e = (o = this.params.openParams) != null ? o : {}, t = (r = this.params.editParams) != null ? r : {};
|
|
286
283
|
return e.isMobile = this.isMobile, {
|
|
287
284
|
five: this.five,
|
|
288
285
|
hook: this.hook,
|
|
@@ -296,11 +293,11 @@ class wt {
|
|
|
296
293
|
editParams: t,
|
|
297
294
|
magnifierParams: this.params.magnifierParams,
|
|
298
295
|
getMeasureType: () => this.currentMeasureType,
|
|
299
|
-
mouseGroup:
|
|
296
|
+
mouseGroup: H(h({}, e.crossHairParameter)),
|
|
300
297
|
userDistanceItemCreator: this.params.userDistanceItemCreator
|
|
301
298
|
};
|
|
302
299
|
}
|
|
303
300
|
}
|
|
304
301
|
export {
|
|
305
|
-
|
|
302
|
+
kt as default
|
|
306
303
|
};
|
|
@@ -8,7 +8,7 @@ import u from "./line.js";
|
|
|
8
8
|
import v from "./polygon.js";
|
|
9
9
|
import { Polyline as y } from "./polyline.js";
|
|
10
10
|
import h from "./point.js";
|
|
11
|
-
import { AreaItem as
|
|
11
|
+
import { AreaItem as I } from "../utils/dom/areaDom.js";
|
|
12
12
|
import "../utils/line.js";
|
|
13
13
|
import "@realsee/five/line";
|
|
14
14
|
import "../utils/constants.js";
|
|
@@ -50,11 +50,11 @@ class V {
|
|
|
50
50
|
this.five && (this.polyline.lines.forEach((e) => e.distanceItem.update(this.five)), this.areaItem.updateDomPosition(this.five));
|
|
51
51
|
});
|
|
52
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
|
|
53
|
+
e && (this.points = e), this.model = i.model, this.polygon = new v(e), this.polyline = new y({ model: i.model }), this.areaItem = new I({
|
|
54
54
|
area: this,
|
|
55
55
|
clickCallback: (a, s) => {
|
|
56
|
-
const
|
|
57
|
-
this.hook.emit("selected", this, { left:
|
|
56
|
+
const p = a.clientX + "px", l = a.clientY + "px";
|
|
57
|
+
this.hook.emit("selected", this, { left: p, top: l });
|
|
58
58
|
}
|
|
59
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
60
|
}
|
|
@@ -68,6 +68,11 @@ class V {
|
|
|
68
68
|
}
|
|
69
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
70
|
}
|
|
71
|
+
popPoint() {
|
|
72
|
+
this.points.pop();
|
|
73
|
+
const e = this.polyline.lines.pop();
|
|
74
|
+
e && e.remove(), this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five), this.points.length < 3 && (this.planeHelper = null);
|
|
75
|
+
}
|
|
71
76
|
refresh() {
|
|
72
77
|
this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five);
|
|
73
78
|
}
|
|
@@ -81,7 +86,7 @@ class V {
|
|
|
81
86
|
* @description: 获取一个点投影在当前平面上的点
|
|
82
87
|
*/
|
|
83
88
|
projectPoint(e) {
|
|
84
|
-
return this.planeHelper ? this.planeHelper.projectPoint(e, new r.Vector3()) : e;
|
|
89
|
+
return e && (this.planeHelper ? this.planeHelper.projectPoint(e, new r.Vector3()) : e);
|
|
85
90
|
}
|
|
86
91
|
remove() {
|
|
87
92
|
this.polygon.removeFromParent(), this.areaItem.remove(), this.polyline.lines.forEach((e) => e.remove());
|
|
@@ -28,6 +28,7 @@ export declare class Model {
|
|
|
28
28
|
addArea(area: Area): void;
|
|
29
29
|
replacePolylineByID(id: string, polyline: Polyline): void;
|
|
30
30
|
removePolyline(polyline: Polyline): void;
|
|
31
|
+
removeArea(area: Area): void;
|
|
31
32
|
getPolylineByID(id: string): Polyline;
|
|
32
33
|
getPolylineByLine(line: Line): Polyline;
|
|
33
34
|
getLineByID(id: string): Line;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var t = Object.defineProperty;
|
|
2
|
+
var l = (s, e, i) => e in s ? t(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
|
|
3
|
+
var r = (s, e, i) => (l(s, typeof e != "symbol" ? e + "" : e, i), i);
|
|
4
4
|
import { Polyline as n } from "./polyline.js";
|
|
5
5
|
import { Subscribe as p } from "@realsee/five";
|
|
6
6
|
import "./line.js";
|
|
@@ -14,78 +14,86 @@ import "../utils/dom/base.js";
|
|
|
14
14
|
import "../utils/isNDCPointInScreen.js";
|
|
15
15
|
import "./point.js";
|
|
16
16
|
import "../../shared-utils/removeArrayItem.js";
|
|
17
|
-
class
|
|
18
|
-
constructor(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.config =
|
|
24
|
-
}
|
|
25
|
-
addPolyline(
|
|
26
|
-
if (this.includes(
|
|
17
|
+
class I {
|
|
18
|
+
constructor(e) {
|
|
19
|
+
r(this, "config");
|
|
20
|
+
r(this, "polylines", []);
|
|
21
|
+
r(this, "areas", []);
|
|
22
|
+
r(this, "hook", new p());
|
|
23
|
+
this.config = e;
|
|
24
|
+
}
|
|
25
|
+
addPolyline(e) {
|
|
26
|
+
if (this.includes(e)) {
|
|
27
27
|
console.error(new Error("不能重复添加 polyline"));
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
this.polylines.push(
|
|
30
|
+
this.polylines.push(e), this.hook.emit("polylineAdded", e);
|
|
31
31
|
}
|
|
32
|
-
addArea(
|
|
33
|
-
if (this.areas.find(({ id:
|
|
32
|
+
addArea(e) {
|
|
33
|
+
if (this.areas.find(({ id: i }) => i === e.id) !== void 0) {
|
|
34
34
|
console.error(new Error("不能重复添加 area"));
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
this.areas.push(
|
|
37
|
+
this.areas.push(e), this.hook.emit("areaAdded", e);
|
|
38
38
|
}
|
|
39
|
-
replacePolylineByID(
|
|
40
|
-
const
|
|
41
|
-
|
|
39
|
+
replacePolylineByID(e, i) {
|
|
40
|
+
const o = this.getPolylineByID(e);
|
|
41
|
+
o == null || o.replace(i);
|
|
42
42
|
}
|
|
43
|
-
removePolyline(
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
43
|
+
removePolyline(e) {
|
|
44
|
+
const i = this.polylines.findIndex(({ id: o }) => o === e.id);
|
|
45
|
+
if (i === -1) {
|
|
46
46
|
console.error(new Error("polyline 不存在"));
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
this.polylines.splice(
|
|
49
|
+
this.polylines.splice(i, 1), this.hook.emit("polylineRemoved", e);
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
removeArea(e) {
|
|
52
|
+
const i = this.areas.findIndex(({ id: o }) => o === e.id);
|
|
53
|
+
if (i === -1) {
|
|
54
|
+
console.error(new Error("area 不存在"));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
this.areas.splice(i, 1);
|
|
58
|
+
}
|
|
59
|
+
getPolylineByID(e) {
|
|
60
|
+
return this.polylines.find((i) => i.id === e);
|
|
53
61
|
}
|
|
54
|
-
getPolylineByLine(
|
|
55
|
-
return this.polylines.find((
|
|
62
|
+
getPolylineByLine(e) {
|
|
63
|
+
return this.polylines.find((i) => i.includes(e));
|
|
56
64
|
}
|
|
57
|
-
getLineByID(
|
|
58
|
-
return this.getAllLines().find((
|
|
65
|
+
getLineByID(e) {
|
|
66
|
+
return this.getAllLines().find((i) => i.id === e);
|
|
59
67
|
}
|
|
60
68
|
getAllLines() {
|
|
61
|
-
return this.polylines.map((
|
|
69
|
+
return this.polylines.map((e) => e.lines).flat(1);
|
|
62
70
|
}
|
|
63
71
|
getAllAreas() {
|
|
64
72
|
return this.areas;
|
|
65
73
|
}
|
|
66
74
|
getAllPoints() {
|
|
67
|
-
return this.polylines.map((
|
|
75
|
+
return this.polylines.map((e) => e.points).flat(1);
|
|
68
76
|
}
|
|
69
|
-
includes(
|
|
70
|
-
return this.polylines.find(({ id:
|
|
77
|
+
includes(e) {
|
|
78
|
+
return this.polylines.find(({ id: i }) => i === e.id) !== void 0;
|
|
71
79
|
}
|
|
72
80
|
clear() {
|
|
73
|
-
this.polylines.forEach((
|
|
81
|
+
this.polylines.forEach((e) => this.hook.emit("polylineRemoved", e)), this.areas.forEach((e) => e.dispose()), this.polylines.splice(0, this.polylines.length), this.areas.splice(0, this.areas.length);
|
|
74
82
|
}
|
|
75
83
|
dispose() {
|
|
76
84
|
this.clear();
|
|
77
85
|
}
|
|
78
86
|
getClosestPoint() {
|
|
79
87
|
}
|
|
80
|
-
parse(
|
|
81
|
-
this.clear(), this.polylines.push(...
|
|
88
|
+
parse(e) {
|
|
89
|
+
this.clear(), this.polylines.push(...e.polylines.map((i) => new n({ model: this }).fromJson(i))), this.polylines.forEach((i) => this.hook.emit("polylineAdded", i));
|
|
82
90
|
}
|
|
83
91
|
toJson() {
|
|
84
92
|
return {
|
|
85
|
-
polylines: this.polylines.map((
|
|
93
|
+
polylines: this.polylines.map((e) => e.toJson()).filter((e) => e.lines.length > 0)
|
|
86
94
|
};
|
|
87
95
|
}
|
|
88
96
|
}
|
|
89
97
|
export {
|
|
90
|
-
|
|
98
|
+
I as Model
|
|
91
99
|
};
|
|
@@ -23,6 +23,8 @@ export default class Line {
|
|
|
23
23
|
readonly distanceItem: DistanceItem;
|
|
24
24
|
private polyline?;
|
|
25
25
|
constructor(point: Point, anotherPoint: Point, model: Model);
|
|
26
|
+
hide(): void;
|
|
27
|
+
show(): void;
|
|
26
28
|
setPoints(startPoint: THREE.Vector3, endPoint: THREE.Vector3): void;
|
|
27
29
|
remove(): void;
|
|
28
30
|
clear(): void;
|
|
@@ -32,6 +32,12 @@ class l {
|
|
|
32
32
|
userDistanceItem: (h = this.model.config) != null && h.userDistanceItemCreator ? this.model.config.userDistanceItemCreator() : void 0
|
|
33
33
|
}), t.lines.push(this), i.lines.push(this);
|
|
34
34
|
}
|
|
35
|
+
hide() {
|
|
36
|
+
this.mesh.visible = !1, this.distanceItem.hide();
|
|
37
|
+
}
|
|
38
|
+
show() {
|
|
39
|
+
this.mesh.visible = !0, this.distanceItem.show();
|
|
40
|
+
}
|
|
35
41
|
setPoints(t, i) {
|
|
36
42
|
this.points[0].position.copy(t), this.points[1].position.copy(i), this.mesh.setPoints(t, i);
|
|
37
43
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { IObject3D } from '../../shared-utils/three/IObject3D';
|
|
3
|
+
export declare const blankGeometry: THREE.BufferGeometry;
|
|
3
4
|
export default class PolygonMesh extends IObject3D {
|
|
5
|
+
readonly isPolygonMesh = true;
|
|
4
6
|
geometry: THREE.BufferGeometry;
|
|
7
|
+
isBlank: boolean;
|
|
5
8
|
constructor(points?: THREE.Vector3[]);
|
|
6
9
|
/**
|
|
7
10
|
* @description: 按照新的端点来更新多边形的geometry
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var c = (o, t, e) => t in o ? m(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
+
var n = (o, t, e) => (c(o, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
4
|
import * as r from "three";
|
|
5
|
-
import { IObject3D as
|
|
6
|
-
import
|
|
5
|
+
import { IObject3D as d } from "../../shared-utils/three/IObject3D.js";
|
|
6
|
+
import h from "../utils/generatePolygonGeometry.js";
|
|
7
7
|
import "earcut";
|
|
8
|
-
const
|
|
9
|
-
class
|
|
8
|
+
const u = new r.BufferGeometry();
|
|
9
|
+
class B extends d {
|
|
10
10
|
constructor(e) {
|
|
11
11
|
super();
|
|
12
|
-
|
|
12
|
+
n(this, "isPolygonMesh", !0);
|
|
13
|
+
n(this, "geometry", new r.BufferGeometry());
|
|
14
|
+
n(this, "isBlank", !0);
|
|
13
15
|
const s = new r.MeshBasicMaterial({
|
|
14
16
|
color: 6522623,
|
|
15
17
|
transparent: !0,
|
|
16
18
|
side: r.DoubleSide,
|
|
17
19
|
depthTest: !0,
|
|
18
20
|
opacity: 0.5
|
|
19
|
-
}),
|
|
21
|
+
}), l = new r.MeshBasicMaterial({
|
|
20
22
|
color: 16777215,
|
|
21
23
|
transparent: !0,
|
|
22
24
|
side: r.DoubleSide,
|
|
23
25
|
depthTest: !1,
|
|
24
26
|
depthWrite: !1,
|
|
25
27
|
opacity: 0.2
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
|
+
}), a = new r.Mesh(this.geometry, s), i = new r.Mesh(this.geometry, l);
|
|
29
|
+
a.renderOrder = 10, i.renderOrder = 0, e && this.updatePoints(e), this.add(a, i);
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
32
|
* @description: 按照新的端点来更新多边形的geometry
|
|
31
33
|
*/
|
|
32
34
|
updatePoints(e) {
|
|
33
|
-
const s =
|
|
34
|
-
s ? this.geometry.copy(s) : this.geometry.copy(
|
|
35
|
+
const s = h(e);
|
|
36
|
+
s ? (this.geometry.copy(s), this.isBlank = !1) : (this.geometry.copy(u), this.isBlank = !0);
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
export {
|
|
38
|
-
|
|
40
|
+
u as blankGeometry,
|
|
41
|
+
B as default
|
|
39
42
|
};
|