@realsee/dnalogel 2.21.0-dev.10 → 2.21.0-dev.11
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/PanoMeasurePlugin/Components/Tip.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Model/area.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +15 -11
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +5 -1
- package/dist/PanoTagPlugin/controller/index.d.ts +2 -1
- package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +1 -1
- package/dist/PanoTagPlugin/typings/tag/TagInstance.d.ts +2 -1
- package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +0 -4
- package/dist/index.cjs.js +53 -53
- package/dist/index.js +3020 -2869
- package/dist/index.umd.js +41 -41
- package/dist/shared-utils/three/PointSelector.d.ts +17 -1
- package/dist/shared-utils/three/PointSelectorHelper.d.ts +2 -11
- package/dist/typings/typings.d.ts +4 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +30 -31
- package/docs/classes/CruisePluginController.html +25 -26
- package/docs/classes/GuideLineItem.GuideLineItem.html +19 -20
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +34 -35
- package/docs/classes/Magnifier.html +19 -20
- package/docs/classes/ModelRoomLabelController.html +10 -11
- package/docs/classes/Object3DHelperController.html +24 -25
- package/docs/classes/PaintBrush.html +14 -15
- package/docs/classes/PanoMeasurePluginLine.html +26 -27
- package/docs/classes/PanoMeasurePluginModel.html +26 -27
- package/docs/classes/PanoMeasurePluginPoint.html +13 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -27
- package/docs/classes/PanoTagPluginController.html +50 -51
- package/docs/classes/Util.BetterTween.html +8 -9
- package/docs/classes/Util.Interval.html +11 -12
- package/docs/classes/Util.Magnifier.html +19 -20
- package/docs/classes/Util.PointDomHelper.html +10 -11
- package/docs/classes/Util.PointHelper.html +10 -11
- package/docs/classes/Util.PointSelectorHelper.html +21 -59
- package/docs/classes/Util.Rectangle.html +12 -13
- package/docs/enums/CameraMovementEffect.html +6 -7
- package/docs/enums/ContentType.html +19 -20
- package/docs/enums/DIRECTION.html +8 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +8 -9
- package/docs/enums/DimensionType.html +6 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +7 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +8 -9
- package/docs/enums/PaintBrushTypeEnum.html +7 -8
- package/docs/enums/PointType.html +6 -7
- package/docs/enums/Rotation.html +7 -8
- package/docs/functions/CSS3DRenderPlugin.html +3 -4
- package/docs/functions/CameraMovementPlugin.html +3 -4
- package/docs/functions/CruisePlugin.html +3 -4
- package/docs/functions/GuideLinePlugin.html +4 -5
- package/docs/functions/ItemLabelPlugin.html +3 -4
- package/docs/functions/MapviewFloorplanPlugin.html +3 -4
- package/docs/functions/ModelChassisCompassPlugin.html +3 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +3 -4
- package/docs/functions/ModelFloorplanPlugin.html +3 -4
- package/docs/functions/ModelItemLabelPlugin.html +3 -4
- package/docs/functions/ModelRoomLabelPlugin.html +3 -4
- package/docs/functions/ModelTVVideoPlugin.html +3 -4
- package/docs/functions/ModelViewPlugin.html +3 -4
- package/docs/functions/Object3DHelperPlugin.html +3 -4
- package/docs/functions/PanoCompassPlugin.html +3 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +3 -4
- package/docs/functions/PanoDoorLabelPlugin.html +3 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +3 -4
- package/docs/functions/PanoMeasurePlugin.html +3 -4
- package/docs/functions/PanoRulerPlugin.html +3 -4
- package/docs/functions/PanoRulerProPlugin.html +3 -4
- package/docs/functions/PanoSpatialTagPlugin.html +3 -4
- package/docs/functions/PanoTagPlugin.html +3 -4
- package/docs/functions/PanoVideoPlugin.html +3 -4
- package/docs/functions/TopviewFloorplanPlugin.html +3 -4
- package/docs/functions/Util.absoluteUrl.html +4 -5
- package/docs/functions/Util.getCoordsFromClient.html +4 -5
- package/docs/functions/Util.getCoordsFromElement.html +4 -5
- package/docs/functions/Util.getFrameTime.html +4 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -5
- package/docs/functions/Util.isAbsoluteURL.html +4 -5
- package/docs/functions/Util.isModelLike.html +4 -5
- package/docs/functions/Util.isNil.html +4 -5
- package/docs/functions/Util.isPanoramaLike.html +4 -5
- package/docs/functions/Util.nextFrame.html +4 -5
- package/docs/functions/Util.notNil.html +4 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +4 -5
- package/docs/functions/Util.tweenProgress.html +4 -5
- package/docs/functions/Util.uuid.html +4 -5
- package/docs/functions/pluginFlag.html +4 -5
- package/docs/index.html +4 -5
- package/docs/interfaces/AddTagConfig.html +5 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +10 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +7 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +6 -7
- package/docs/interfaces/CruisePluginTypes.Config.html +7 -8
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +11 -12
- package/docs/interfaces/CruisePluginTypes.EventMap.html +19 -20
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +11 -12
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +13 -14
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +13 -14
- package/docs/interfaces/CruisePluginTypes.PluginData.html +8 -9
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +6 -7
- package/docs/interfaces/CruisePluginTypes.PluginState.html +10 -11
- package/docs/interfaces/EventMap.html +14 -15
- package/docs/interfaces/FloorplanBounding.html +7 -8
- package/docs/interfaces/FloorplanData.html +9 -10
- package/docs/interfaces/FloorplanEntrance.html +10 -11
- package/docs/interfaces/FloorplanExtraObject.html +9 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +7 -8
- package/docs/interfaces/FloorplanFloorData.html +8 -9
- package/docs/interfaces/FloorplanImagePosition.html +6 -7
- package/docs/interfaces/FloorplanObserver.html +8 -9
- package/docs/interfaces/FloorplanOutlineItem.html +8 -9
- package/docs/interfaces/FloorplanPosition.html +6 -7
- package/docs/interfaces/FloorplanRoomItem.html +12 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +6 -7
- package/docs/interfaces/FloorplanServerBounding.html +7 -8
- package/docs/interfaces/FloorplanServerComputedData.html +9 -10
- package/docs/interfaces/FloorplanServerData.html +6 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +9 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +7 -8
- package/docs/interfaces/FloorplanServerEntrance.html +10 -11
- package/docs/interfaces/FloorplanServerFloorData.html +8 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +6 -7
- package/docs/interfaces/FloorplanServerObserver.html +8 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +8 -9
- package/docs/interfaces/FloorplanServerPosition.html +6 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +13 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +6 -7
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +7 -8
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +9 -10
- package/docs/interfaces/GuideLinePluginType.EventMap.html +12 -13
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +7 -8
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +5 -6
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +12 -13
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +7 -8
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +17 -18
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +6 -7
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +17 -18
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +4 -5
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +6 -7
- package/docs/interfaces/GuideLinePluginType.PluginState.html +7 -8
- package/docs/interfaces/GuideLinePluginType.Route.html +10 -11
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +8 -9
- package/docs/interfaces/HelperOffset.html +7 -8
- package/docs/interfaces/ImagePlaneGroup.html +5 -6
- package/docs/interfaces/ItemLabelPluginData.html +5 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +10 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +8 -9
- package/docs/interfaces/MinMax.html +6 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +6 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +7 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +6 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +7 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +7 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +5 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +10 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +6 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +5 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +8 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +7 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +5 -6
- package/docs/interfaces/ModelViewPluginExportType.html +10 -11
- package/docs/interfaces/Object3DHelperState.html +7 -8
- package/docs/interfaces/ObjectHelperControllers.html +8 -9
- package/docs/interfaces/PaintBrushAction.html +11 -12
- package/docs/interfaces/PaintBrushConfigs.html +11 -12
- package/docs/interfaces/PaintBrushState.html +9 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +9 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +4 -5
- package/docs/interfaces/PanoMeasureParameterType.html +14 -15
- package/docs/interfaces/PanoMeasurePluginLineJson.html +7 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +6 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +6 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +7 -8
- package/docs/interfaces/PanoRulerPluginExportType.html +9 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +6 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +7 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +8 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +6 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +6 -7
- package/docs/interfaces/PanoRulerProPluginState.html +7 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +4 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +4 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +10 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +9 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +12 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +9 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +12 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +10 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +9 -10
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +5 -6
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +7 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +5 -6
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +8 -9
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +5 -6
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +7 -8
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +9 -10
- package/docs/interfaces/Point.html +7 -8
- package/docs/interfaces/Room.html +8 -9
- package/docs/interfaces/RoomInfo.html +6 -7
- package/docs/interfaces/RoomLabel.html +13 -14
- package/docs/interfaces/RoomRules.html +4 -5
- package/docs/interfaces/Rooms.html +4 -5
- package/docs/interfaces/Scissor.html +8 -9
- package/docs/interfaces/State.html +7 -8
- package/docs/interfaces/TagCacheInterface.html +11 -12
- package/docs/interfaces/TagConfig.html +13 -14
- package/docs/interfaces/TagGLTFObjectGroup.html +5 -6
- package/docs/interfaces/TagIconUrl.html +11 -12
- package/docs/interfaces/TagObjectGroup.html +5 -6
- package/docs/interfaces/TagStyle.html +5 -6
- package/docs/interfaces/Tags.html +8 -9
- package/docs/interfaces/TemporaryState.html +5 -6
- package/docs/interfaces/Util.MagnifierParameter.html +10 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +7 -8
- package/docs/interfaces/Util.PointIntersection.html +7 -8
- package/docs/modules/CruisePluginTypes.html +4 -5
- package/docs/modules/GuideLineItem.html +4 -5
- package/docs/modules/GuideLineModeItem.html +4 -5
- package/docs/modules/GuideLinePluginType.html +4 -5
- package/docs/modules/PanoVideoPluginType.html +4 -5
- package/docs/modules/Util.html +4 -5
- package/docs/modules.html +4 -6
- package/docs/types/ArrayPosition.html +4 -5
- package/docs/types/AudioAppearance.html +4 -5
- package/docs/types/AudioTagTypeConfigKey.html +4 -5
- package/docs/types/CSS3DRenderExportType.html +4 -5
- package/docs/types/CSS3DRenderPluginExportType.html +4 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +4 -5
- package/docs/types/ClassFunctionParameters.html +4 -5
- package/docs/types/Color.html +4 -5
- package/docs/types/ContentTypeConfigKey.html +4 -5
- package/docs/types/ContentTypeConfigKeySplit.html +4 -5
- package/docs/types/ContentTypeMap.html +4 -5
- package/docs/types/Create3DDomContainerReturnType.html +4 -5
- package/docs/types/Create3DElementReturnType.html +4 -5
- package/docs/types/CruisePluginExportType.html +4 -5
- package/docs/types/CruisePluginTypes.CruiseData.html +4 -5
- package/docs/types/CruisePluginTypes.MoveEffect.html +4 -5
- package/docs/types/DeprecatedMediaPlaneProperty.html +4 -5
- package/docs/types/DeprecatedTagProperty.html +4 -5
- package/docs/types/Direction-1.html +4 -5
- package/docs/types/Direction4.html +4 -5
- package/docs/types/ElementRenderer.html +4 -5
- package/docs/types/FloorplanRuleLabels.html +4 -5
- package/docs/types/FloorplanServerRuleLabels.html +4 -5
- package/docs/types/GuideLinePluginExportType.html +4 -5
- package/docs/types/GuideLinePluginType.GuideLineItem.html +4 -5
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +4 -5
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +4 -5
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +4 -5
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +4 -5
- package/docs/types/GuideLinePluginType.PathItem.html +4 -5
- package/docs/types/GuideLinePluginType.PluginData.html +4 -5
- package/docs/types/HelperEventMap.html +4 -5
- package/docs/types/LoadTagConfig.html +4 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +4 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +4 -5
- package/docs/types/MediaData.html +4 -5
- package/docs/types/MediaStore.html +4 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +4 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +4 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +4 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +4 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +4 -5
- package/docs/types/MoveArgs.html +4 -5
- package/docs/types/MoveOpts.html +4 -5
- package/docs/types/Object3DHelperEventMap.html +4 -5
- package/docs/types/ObjectFit.html +4 -5
- package/docs/types/PaintBrushEventMap.html +4 -5
- package/docs/types/PanoCompassPluginData.html +4 -5
- package/docs/types/PanoCompassPluginExportType.html +4 -5
- package/docs/types/PanoCompassPluginParameterType.html +4 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +4 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +4 -5
- package/docs/types/PanoIndex.html +4 -5
- package/docs/types/PanoMeasurePluginEvent.html +4 -5
- package/docs/types/PanoMeasureReturnType.html +4 -5
- package/docs/types/PanoSpatialTagPluginId.html +4 -5
- package/docs/types/PanoTagPluginExportInterface.html +4 -5
- package/docs/types/PanoTagPluginParamsInterface.html +4 -5
- package/docs/types/PanoVideoPluginParameterType.html +4 -5
- package/docs/types/PanoVideoPluginReturnType.html +4 -5
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +4 -5
- package/docs/types/PlaneTag.html +4 -5
- package/docs/types/Point2DTag.html +4 -5
- package/docs/types/Point3DTag.html +4 -5
- package/docs/types/PointTag.html +4 -5
- package/docs/types/PointTagInstance.html +4 -5
- package/docs/types/Position.html +4 -5
- package/docs/types/RotateArgs.html +4 -5
- package/docs/types/RotateOpts.html +4 -5
- package/docs/types/RuleLabelsKey.html +4 -5
- package/docs/types/RuleLabelsValue.html +4 -5
- package/docs/types/StickType.html +4 -5
- package/docs/types/Tag.html +4 -5
- package/docs/types/Tag2D.html +4 -5
- package/docs/types/Tag3D.html +4 -5
- package/docs/types/TagContentType.html +4 -5
- package/docs/types/TagDimensionType.html +4 -5
- package/docs/types/TagElement.html +4 -5
- package/docs/types/TagEvents.html +4 -5
- package/docs/types/TagGLTFObject.html +4 -5
- package/docs/types/TagHooks.html +4 -5
- package/docs/types/TagId.html +4 -5
- package/docs/types/TagInstance.html +4 -5
- package/docs/types/TagPointType.html +4 -5
- package/docs/types/TagRendererMap.html +4 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +4 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +4 -5
- package/docs/types/WorkCode.html +4 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +4 -5
- package/docs/variables/PLUGIN.html +4 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +4 -5
- package/docs/variables/ROOM_TYPE_MAP.html +4 -5
- package/docs/variables/itemLabelPluginServerParams.html +4 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +4 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +4 -5
- package/libs/PanoMeasurePlugin/Components/Common/CircleButton.js +43 -43
- package/libs/PanoMeasurePlugin/Components/Controller0.js +1 -1
- package/libs/PanoMeasurePlugin/Components/Controller1.js +141 -139
- package/libs/PanoMeasurePlugin/Components/Tip.js +154 -0
- package/libs/PanoMeasurePlugin/Components/Tip.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.js +82 -76
- package/libs/PanoMeasurePlugin/Controller/index.js +23 -21
- package/libs/PanoMeasurePlugin/Model/area.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Model/area.js +38 -31
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +15 -11
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +67 -40
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +1 -1
- package/libs/PanoMeasurePlugin/index.js +16 -14
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +5 -1
- package/libs/PanoTagPlugin/controller/index.d.ts +2 -1
- package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +1 -1
- package/libs/PanoTagPlugin/typings/tag/TagInstance.d.ts +2 -1
- package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +0 -4
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +111 -110
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/PointSelector.d.ts +17 -1
- package/libs/shared-utils/three/PointSelector.js +90 -35
- package/libs/shared-utils/three/PointSelectorHelper.d.ts +2 -11
- package/libs/shared-utils/three/PointSelectorHelper.js +32 -82
- package/libs/typings/typings.d.ts +4 -0
- package/package.json +1 -1
- package/docs/types/PartialObjectDeep.html +0 -361
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var b = (m, c, e) => c in m ?
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var b = (m, c, e) => c in m ? R(m, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[c] = e;
|
|
3
3
|
var o = (m, c, e) => (b(m, typeof c != "symbol" ? c + "" : c, e), e);
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { throttle as
|
|
7
|
-
import
|
|
4
|
+
import U from "../Model/line.js";
|
|
5
|
+
import C from "../Model/point.js";
|
|
6
|
+
import { throttle as H } from "../../shared-utils/throttle.js";
|
|
7
|
+
import j from "./BaseController.js";
|
|
8
8
|
import { Polyline as k } from "../Model/polyline.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { PointSelector as
|
|
12
|
-
import
|
|
13
|
-
import { findAssociatedLines as
|
|
9
|
+
import D from "../Model/area.js";
|
|
10
|
+
import T from "../utils/isIntersecting.js";
|
|
11
|
+
import { PointSelector as x } from "../../shared-utils/three/PointSelector.js";
|
|
12
|
+
import G from "../Modules/DeleteDom/index.js";
|
|
13
|
+
import { findAssociatedLines as B } from "../utils/findAssociatedLines.js";
|
|
14
14
|
import { Vector2 as y } from "three";
|
|
15
|
-
import
|
|
16
|
-
import { closestPointOnLine as
|
|
15
|
+
import w from "../utils/isNDCPointInScreen.js";
|
|
16
|
+
import { closestPointOnLine as W } from "../utils/math.js";
|
|
17
17
|
import "../../shared-utils/uuid.js";
|
|
18
18
|
import "../utils/line.js";
|
|
19
19
|
import "@realsee/five/line";
|
|
@@ -33,7 +33,6 @@ import "../../shared-utils/three/centerPoint.js";
|
|
|
33
33
|
import "../../shared-utils/three/PointSelectorHelper.js";
|
|
34
34
|
import "../../shared-utils/three/Magnifier.js";
|
|
35
35
|
import "hammerjs";
|
|
36
|
-
import "../../shared-utils/three/getIntersect.js";
|
|
37
36
|
import "../../shared-utils/three/PointHelper.js";
|
|
38
37
|
import "../../shared-utils/three/Assets/index.js";
|
|
39
38
|
import "../../shared-utils/three/PointDomHelper.js";
|
|
@@ -61,11 +60,12 @@ import "../../shared-utils/animationFrame/index.js";
|
|
|
61
60
|
import "../../shared-utils/isTouchDevice.js";
|
|
62
61
|
import "../../shared-utils/getIntersectionFromEvent.js";
|
|
63
62
|
import "../../shared-utils/getPointFromHammerEvent.js";
|
|
63
|
+
import "../../shared-utils/three/getIntersect.js";
|
|
64
64
|
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
65
65
|
import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
66
66
|
import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
|
|
67
|
-
const
|
|
68
|
-
class Xe extends
|
|
67
|
+
const I = () => !1;
|
|
68
|
+
class Xe extends j {
|
|
69
69
|
constructor(e) {
|
|
70
70
|
var t;
|
|
71
71
|
super(e);
|
|
@@ -80,7 +80,9 @@ class Xe extends x {
|
|
|
80
80
|
o(this, "pointSelector");
|
|
81
81
|
o(this, "deleteDom");
|
|
82
82
|
/** 根据 intersection 更新放大镜和吸附点 */
|
|
83
|
-
o(this, "onIntersectionUpdate",
|
|
83
|
+
o(this, "onIntersectionUpdate", H((e, t) => {
|
|
84
|
+
typeof t == "boolean" && (t ? this.hook.emit("readyComplete") : this.hook.emit("notReadyComplete")), this.updateDashed();
|
|
85
|
+
}, 20));
|
|
84
86
|
/** 撤销编辑 */
|
|
85
87
|
o(this, "revoke", () => {
|
|
86
88
|
this.currentMeasureType === "area" ? this.revokeArea() : this.currentMeasureType === "line" && this.revokeLine();
|
|
@@ -90,11 +92,11 @@ class Xe extends x {
|
|
|
90
92
|
*/
|
|
91
93
|
o(this, "revokeArea", () => {
|
|
92
94
|
if (this.area.points.length !== 0) {
|
|
93
|
-
if (this.area.popPoint(), this.area.points.length === 0) {
|
|
95
|
+
if (this.area.popPoint(), this.hook.emit("pointsChange", this.area.points), this.area.points.length === 0) {
|
|
94
96
|
this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.five.needsRender = !0, this.hook.emit("revoke", { isEmpty: !0 });
|
|
95
97
|
return;
|
|
96
98
|
} else
|
|
97
|
-
this.lastPoint = new
|
|
99
|
+
this.lastPoint = new C(this.area.points[this.area.points.length - 1]), this.updateDashed();
|
|
98
100
|
this.five.needsRender = !0;
|
|
99
101
|
}
|
|
100
102
|
});
|
|
@@ -132,29 +134,33 @@ class Xe extends x {
|
|
|
132
134
|
* 3. 清除 pointSelector
|
|
133
135
|
*/
|
|
134
136
|
o(this, "onSelect", () => {
|
|
135
|
-
var s,
|
|
137
|
+
var s, r, l, d;
|
|
136
138
|
this.hasAppendDashed || (this.dashed.distanceItem.appendTo(this.container), this.group.add(this.dashed.mesh), this.currentMeasureType === "area" && this.group.add(this.perpendicularDashed.mesh)), this.hasAppendDashed = !0;
|
|
137
139
|
const e = (() => {
|
|
138
|
-
var
|
|
140
|
+
var a, n;
|
|
139
141
|
if (this.currentMeasureType === "area")
|
|
140
|
-
return this.area.projectPoint((
|
|
142
|
+
return this.area.projectPoint((a = this.pointSelector.position) == null ? void 0 : a.point);
|
|
141
143
|
if (this.currentMeasureType === "line")
|
|
142
|
-
return (
|
|
144
|
+
return (n = this.pointSelector.position) == null ? void 0 : n.point;
|
|
143
145
|
})();
|
|
144
146
|
if (!e)
|
|
145
147
|
return;
|
|
146
|
-
const t = new
|
|
148
|
+
const t = new C(e), i = this.lastPoint;
|
|
147
149
|
if (this.lastPoint = t, this.currentMeasureType === "line") {
|
|
148
150
|
if (t && i) {
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
+
const n = new U(i, t, this.model);
|
|
152
|
+
n.distanceItem.setCanSelect(!1), n.distanceItem.appendTo(this.container), this.polyline.addLine(n), this.group.add(n.mesh), n.distanceItem.update(this.five);
|
|
151
153
|
}
|
|
152
|
-
const
|
|
153
|
-
typeof
|
|
154
|
+
const a = (r = (s = this.editParams) == null ? void 0 : s.autoEndConfig) == null ? void 0 : r.line;
|
|
155
|
+
typeof a == "number" && (this.polyline.getPointLength() >= a ? this.complete() : this.polyline.getPointLength() === a - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.polyline.points);
|
|
154
156
|
} else if (this.currentMeasureType === "area") {
|
|
155
|
-
this.area.addPoints(t.position)
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
if (this.area.addPoints(t.position), this.area.isClosed) {
|
|
158
|
+
this.complete();
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
this.area.points.length >= 3 ? this.pointSelector.setAdherePoints(this.area.points[0]) : this.pointSelector.setAdherePoints(null);
|
|
162
|
+
const a = (d = (l = this.editParams) == null ? void 0 : l.autoEndConfig) == null ? void 0 : d.area;
|
|
163
|
+
typeof a == "number" && (this.area.points.length >= a ? this.complete() : this.area.points.length === a - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.area.points);
|
|
158
164
|
}
|
|
159
165
|
this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", t.position);
|
|
160
166
|
});
|
|
@@ -168,11 +174,11 @@ class Xe extends x {
|
|
|
168
174
|
if (!this.lastPoint)
|
|
169
175
|
return;
|
|
170
176
|
const e = this.lastPoint.position, t = (() => {
|
|
171
|
-
var s,
|
|
177
|
+
var s, r;
|
|
172
178
|
if (this.currentMeasureType === "area")
|
|
173
179
|
return this.area.projectPoint((s = this.pointSelector.position) == null ? void 0 : s.point);
|
|
174
180
|
if (this.currentMeasureType === "line")
|
|
175
|
-
return (
|
|
181
|
+
return (r = this.pointSelector.position) == null ? void 0 : r.point;
|
|
176
182
|
})();
|
|
177
183
|
if (!t) {
|
|
178
184
|
this.dashed.hide();
|
|
@@ -180,62 +186,62 @@ class Xe extends x {
|
|
|
180
186
|
}
|
|
181
187
|
if (this.dashed.show(), this.dashed.setPoints(e, t), this.dashed.distanceItem.update(this.five), this.hook.emit("editedDashedLineChange", this.dashed), this.currentMeasureType === "area")
|
|
182
188
|
if (this.area.areaItem.setCanSelect(!1), this.area.points.length >= 2) {
|
|
183
|
-
const s =
|
|
184
|
-
if (
|
|
189
|
+
const s = (i = this.pointSelector.position) == null ? void 0 : i.point;
|
|
190
|
+
if (s) {
|
|
191
|
+
const n = s, g = t;
|
|
192
|
+
this.perpendicularDashed.setPoints(n, g), this.perpendicularDashed.show();
|
|
193
|
+
} else
|
|
194
|
+
this.perpendicularDashed.hide();
|
|
195
|
+
const r = this.area.polyline.lines.map((n) => ({ start: n.points[0].position, end: n.points[1].position })), l = T({ start: e, end: t }, r), d = T({ start: t, end: this.area.points[0] }, r);
|
|
196
|
+
if (l || d)
|
|
185
197
|
this.area.hideArea(), this.hook.emit("allowAddPointStateChange", "forbid");
|
|
186
198
|
else {
|
|
187
199
|
this.area.showArea();
|
|
188
200
|
const n = [...this.area.points, t];
|
|
189
|
-
this.area.polygon.updatePoints(n), this.area.areaItem.updateArea(this.five);
|
|
190
|
-
const a = (i = this.pointSelector.position) == null ? void 0 : i.point;
|
|
191
|
-
if (!a) {
|
|
192
|
-
this.perpendicularDashed.hide();
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
const g = a, P = t;
|
|
196
|
-
this.perpendicularDashed.setPoints(g, P), this.perpendicularDashed.show(), this.hook.emit("allowAddPointStateChange", "allow");
|
|
201
|
+
this.area.polygon.updatePoints(n), this.area.areaItem.updateArea(this.five), this.hook.emit("allowAddPointStateChange", "allow");
|
|
197
202
|
}
|
|
198
203
|
} else
|
|
199
204
|
this.area.hideArea(), this.perpendicularDashed.hide();
|
|
200
205
|
this.five.needsRender = !0;
|
|
201
206
|
});
|
|
207
|
+
// ====================================================================================================================================
|
|
202
208
|
// 下面一堆高亮相关
|
|
203
209
|
o(this, "wantsTapGesture", (e) => {
|
|
204
|
-
var
|
|
210
|
+
var A, S;
|
|
205
211
|
if (this.editParams.pointSelectorMode === "cursor" || this.lastPoint)
|
|
206
212
|
return !1;
|
|
207
|
-
const t = this.model.areas.map((
|
|
213
|
+
const t = this.model.areas.map((h) => e.intersectObject(h.polygon, !0)[0]).sort((h, p) => h.distance - p.distance), i = (S = (A = t[0]) == null ? void 0 : A.object) == null ? void 0 : S.parent;
|
|
208
214
|
if (i != null && i.isPolygonMesh) {
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
211
|
-
const { x:
|
|
212
|
-
return this.chooseArea(
|
|
215
|
+
const h = this.model.areas.find((p) => p.polygon === i);
|
|
216
|
+
if (h) {
|
|
217
|
+
const { x: p, y: v } = t[0].point.clone().project(this.five.camera), f = `${(p + 1) / 2 * 100}%`, u = `${(-v + 1) / 2 * 100}%`;
|
|
218
|
+
return this.chooseArea(h, { left: f, top: u }), !1;
|
|
213
219
|
}
|
|
214
220
|
}
|
|
215
221
|
const [s] = this.five.model.intersectRaycaster(e);
|
|
216
222
|
if (!s)
|
|
217
223
|
return;
|
|
218
|
-
const
|
|
219
|
-
const [
|
|
220
|
-
if (!
|
|
224
|
+
const r = this.five.camera, l = s.point.clone().project(r), d = this.container.clientWidth, a = this.container.clientHeight, n = new y(l.x * d, l.y * a), g = this.model.getAllLines().map((h) => {
|
|
225
|
+
const [p, v] = h.points, f = p.position.clone().project(r), u = v.position.clone().project(r);
|
|
226
|
+
if (!w(f) && !w(u))
|
|
221
227
|
return null;
|
|
222
|
-
const
|
|
223
|
-
return { id:
|
|
224
|
-
}).filter((
|
|
228
|
+
const E = new y(f.x * d, f.y * a), M = new y(u.x * d, u.y * a);
|
|
229
|
+
return { id: h.id, points: [E, M] };
|
|
230
|
+
}).filter((h) => !!h);
|
|
225
231
|
if (g.length === 0)
|
|
226
232
|
return;
|
|
227
|
-
const
|
|
228
|
-
const
|
|
229
|
-
return { id:
|
|
230
|
-
}).sort((
|
|
231
|
-
if (
|
|
233
|
+
const P = g.map((h) => {
|
|
234
|
+
const p = W(n, h.points);
|
|
235
|
+
return { id: h.id, distance: p.distanceTo(n) };
|
|
236
|
+
}).sort((h, p) => h.distance - p.distance)[0];
|
|
237
|
+
if (P.distance > 20)
|
|
232
238
|
return;
|
|
233
|
-
const
|
|
234
|
-
if (
|
|
235
|
-
return this.chooseLine(
|
|
239
|
+
const L = this.model.getAllLines().find(({ id: h }) => h === P.id);
|
|
240
|
+
if (L)
|
|
241
|
+
return this.chooseLine(L), !1;
|
|
236
242
|
});
|
|
237
243
|
o(this, "chooseLine", (e) => {
|
|
238
|
-
const t =
|
|
244
|
+
const t = B(e);
|
|
239
245
|
this.deleteDom.setTarget(t).setLines(t).updatePosition().show(), this.highlightLines(t), this.hook.emit("selectedChange", t);
|
|
240
246
|
});
|
|
241
247
|
o(this, "chooseArea", (e, t) => {
|
|
@@ -248,23 +254,23 @@ class Xe extends x {
|
|
|
248
254
|
const t = e[0], i = this.model.getPolylineByLine(t);
|
|
249
255
|
i && (this.model.removePolyline(i), this.deleteDom.setLines([]).hide());
|
|
250
256
|
});
|
|
251
|
-
this.fiveElement = this.five.getElement(), this.deleteDom = new
|
|
257
|
+
this.fiveElement = this.five.getElement(), this.deleteDom = new G(this.five, {
|
|
252
258
|
i18n: this.config.i18n,
|
|
253
259
|
onClick: (i, s) => {
|
|
254
|
-
var
|
|
255
|
-
const
|
|
256
|
-
|
|
260
|
+
var d;
|
|
261
|
+
const r = s.type === "area", l = Array.isArray(s) && ((d = s[0]) == null ? void 0 : d.type) === "line";
|
|
262
|
+
r && this.deleteArea(s), l && this.deleteLine(s);
|
|
257
263
|
},
|
|
258
264
|
cancel: (i) => {
|
|
259
|
-
var
|
|
265
|
+
var l;
|
|
260
266
|
this.deleteDom.hide();
|
|
261
|
-
const s = i.type === "area",
|
|
262
|
-
s && this.unHighlightArea(i),
|
|
267
|
+
const s = i.type === "area", r = Array.isArray(i) && ((l = i[0]) == null ? void 0 : l.type) === "line";
|
|
268
|
+
s && this.unHighlightArea(i), r && this.unHighlightLines(i);
|
|
263
269
|
}
|
|
264
|
-
}).appendTo(this.container), this.pointSelector = new
|
|
270
|
+
}).appendTo(this.container), this.pointSelector = new x(this.five, {
|
|
265
271
|
mode: this.editParams.pointSelectorMode,
|
|
266
272
|
pointSelectorHelperParams: { magnifierParams: this.magnifierParams }
|
|
267
|
-
}), this.pointSelector.enable(), this.polyline = new k({ model: this.model }), this.area = new
|
|
273
|
+
}), this.pointSelector.enable(), this.polyline = new k({ model: this.model }), this.area = new D(void 0, {
|
|
268
274
|
five: this.five,
|
|
269
275
|
model: this.model,
|
|
270
276
|
meshContainer: this.group,
|
|
@@ -275,13 +281,13 @@ class Xe extends x {
|
|
|
275
281
|
i.areaItem.appendTo(this.container), i.areaItem.updateDomPosition(this.five), i.areaItem.setCanSelect(!0), this.group.add(i.polygon), i.polyline.lines.forEach((s) => {
|
|
276
282
|
s.distanceItem.appendTo(this.container), s.distanceItem.update(this.five), this.group.add(s.mesh);
|
|
277
283
|
});
|
|
278
|
-
}), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsToMoveToPano",
|
|
284
|
+
}), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsToMoveToPano", I), this.pointSelector.hook.on("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.on("select", this.onSelect), this.pointSelector.hook.on("wantsSelect", this.onWantsSelect), this.polyline.hook.on("lineAdded", this.onLineChanged), this.polyline.hook.on("lineRemoved", this.onLineChanged), this.five.helperVisible = !1, (t = this.fiveElement) == null || t.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.refresh();
|
|
279
285
|
}
|
|
280
286
|
dispose() {
|
|
281
287
|
var e;
|
|
282
288
|
super.dispose(), this.model.areas.forEach((t) => {
|
|
283
289
|
(t.points.length < 2 || t.polygon.isBlank) && this.model.removeArea(t);
|
|
284
|
-
}), this.five.helperVisible = !0, this.pointSelector.disable(), this.dashed.remove(), this.perpendicularDashed.remove(), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsToMoveToPano",
|
|
290
|
+
}), this.five.helperVisible = !0, this.pointSelector.disable(), this.dashed.remove(), this.perpendicularDashed.remove(), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsToMoveToPano", I), this.pointSelector.hook.off("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.off("select", this.onSelect), this.polyline.hook.off("lineAdded", this.onLineChanged), this.polyline.hook.off("lineRemoved", this.onLineChanged), (e = this.fiveElement) == null || e.removeEventListener("mouseleave", this.onMouseLeave), this.magnifier.dispose(), this.dashed.distanceItem.remove(), this.five.needsRender = !0;
|
|
285
291
|
}
|
|
286
292
|
getEditingLines() {
|
|
287
293
|
return this.polyline.lines;
|
|
@@ -290,7 +296,7 @@ class Xe extends x {
|
|
|
290
296
|
this.onSelect();
|
|
291
297
|
}
|
|
292
298
|
complete() {
|
|
293
|
-
this.hook.emit("complete"), this.currentMeasureType === "area" ? (this.area.points.length < 3 ? this.deleteArea(this.area) : this.area.complete(), this.area = new
|
|
299
|
+
this.hook.emit("complete"), this.currentMeasureType === "area" ? (this.area.points.length < 3 ? this.deleteArea(this.area) : (this.area.showArea(), this.area.complete()), this.area = new D(void 0, { five: this.five, model: this.model, meshContainer: this.group, domContainer: this.container }), this.model.addArea(this.area)) : this.currentMeasureType === "line" && (this.polyline = new k({ model: this.model }), this.model.addPolyline(this.polyline)), this.pointSelector.setAdherePoints(null), this.dashed.hide(), this.perpendicularDashed.hide(), this.lastPoint = void 0;
|
|
294
300
|
}
|
|
295
301
|
highlightArea(e) {
|
|
296
302
|
this.highlightLines(e.polyline.lines), this.five.needsRender = !0;
|
|
@@ -54,7 +54,6 @@ import "../../shared-utils/three/centerPoint.js";
|
|
|
54
54
|
import "../utils/isIntersecting.js";
|
|
55
55
|
import "../../shared-utils/three/PointSelector.js";
|
|
56
56
|
import "../../shared-utils/three/PointSelectorHelper.js";
|
|
57
|
-
import "../../shared-utils/three/getIntersect.js";
|
|
58
57
|
import "../../shared-utils/three/PointHelper.js";
|
|
59
58
|
import "../../shared-utils/three/Assets/index.js";
|
|
60
59
|
import "../../shared-utils/three/PointDomHelper.js";
|
|
@@ -79,6 +78,7 @@ import "../../shared-utils/animationFrame/BetterTween.js";
|
|
|
79
78
|
import "../../shared-utils/animationFrame/index.js";
|
|
80
79
|
import "../../shared-utils/getIntersectionFromEvent.js";
|
|
81
80
|
import "../../shared-utils/getPointFromHammerEvent.js";
|
|
81
|
+
import "../../shared-utils/three/getIntersect.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";
|
|
@@ -107,7 +107,9 @@ import "../Components/Common/Switcher1.js";
|
|
|
107
107
|
import "../Components/Common/CircleButton.js";
|
|
108
108
|
import "../../vendor/svelte/transition/index.js";
|
|
109
109
|
import "../../vendor/svelte/easing/index.js";
|
|
110
|
-
|
|
110
|
+
import "../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
111
|
+
import "../Components/Tip.js";
|
|
112
|
+
class xt {
|
|
111
113
|
constructor(e, t) {
|
|
112
114
|
i(this, "hasOpen", !1);
|
|
113
115
|
i(this, "hook", new G());
|
|
@@ -133,18 +135,18 @@ class Dt {
|
|
|
133
135
|
* @description 还原点位展示和默认鼠标 UI
|
|
134
136
|
*/
|
|
135
137
|
i(this, "disable", () => {
|
|
136
|
-
var e, t,
|
|
137
|
-
this.hasOpen = !1, this.container.style.opacity = "0", (e = this.controller) == null || e.dispose(), (t = this.useUIController) == null || t.hide(), (
|
|
138
|
+
var e, t, r, o;
|
|
139
|
+
this.hasOpen = !1, this.container.style.opacity = "0", (e = this.controller) == null || e.dispose(), (t = this.useUIController) == null || t.hide(), (r = this.useGuideController) == null || r.hide(), (o = this.shortcutKeyController) == null || o.dispose(), this.controller = null, this.five.helperVisible = !0, this.five.scene.remove(this.group), this.five.needsRender = !0, this.hook.emit("disable", !0);
|
|
138
140
|
});
|
|
139
141
|
i(this, "getCurrentMode", () => this.controller instanceof h ? "Edit" : this.controller instanceof v ? "Watch" : this.controller instanceof a ? "Mixed" : this.controller instanceof w ? "View" : null);
|
|
140
142
|
/** 变更场景
|
|
141
143
|
* @description 如果从编辑场景改变到观看场景,不会自动保存,默认丢弃所有改动
|
|
142
144
|
*/
|
|
143
145
|
i(this, "changeMode", (e) => {
|
|
144
|
-
var
|
|
146
|
+
var o;
|
|
145
147
|
if (!this.hasOpen || this.getCurrentMode() === e)
|
|
146
148
|
return;
|
|
147
|
-
(
|
|
149
|
+
(o = this.controller) == null || o.dispose();
|
|
148
150
|
const t = {
|
|
149
151
|
View: w,
|
|
150
152
|
Watch: v,
|
|
@@ -153,8 +155,8 @@ class Dt {
|
|
|
153
155
|
};
|
|
154
156
|
if (!t[e])
|
|
155
157
|
throw new Error("不存在的 Mode");
|
|
156
|
-
const
|
|
157
|
-
this.controller = new t[e](
|
|
158
|
+
const r = this.createControllerParams();
|
|
159
|
+
this.controller = new t[e](r), this.hook.emit("modeChange", e);
|
|
158
160
|
});
|
|
159
161
|
/**
|
|
160
162
|
* @description: 切换测量的类型
|
|
@@ -164,13 +166,13 @@ class Dt {
|
|
|
164
166
|
});
|
|
165
167
|
var l, n, u, d, f, g, y, M, C;
|
|
166
168
|
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";
|
|
167
|
-
const
|
|
169
|
+
const r = (M = (y = t.editParams) == null ? void 0 : y.pointSelectorMode) != null ? M : W ? "fixed" : "cursor", o = (C = this.params.openParams) != null ? C : {};
|
|
168
170
|
if (this.params.useUIController !== !1) {
|
|
169
|
-
const p = m({ container: this.container, openParams:
|
|
171
|
+
const p = m({ container: this.container, openParams: o, pointSelectorMode: r }, b(this.params.useUIController));
|
|
170
172
|
this.useUIController = new S(this, p);
|
|
171
173
|
}
|
|
172
174
|
if (this.params.useGuideController !== !1) {
|
|
173
|
-
const p = m({ container: this.container }, b(this.params.useGuideController));
|
|
175
|
+
const p = m({ container: this.container, pointSelectorMode: r }, b(this.params.useGuideController));
|
|
174
176
|
this.useGuideController = new L(this, p);
|
|
175
177
|
}
|
|
176
178
|
}
|
|
@@ -240,10 +242,10 @@ class Dt {
|
|
|
240
242
|
var l;
|
|
241
243
|
if (!(this.controller instanceof h) && !(this.controller instanceof a))
|
|
242
244
|
return this;
|
|
243
|
-
const t = (l = e == null ? void 0 : e.mode) != null ? l : "View",
|
|
244
|
-
return
|
|
245
|
+
const t = (l = e == null ? void 0 : e.mode) != null ? l : "View", r = this.controller.model.polylines, o = this.controller.model.areas;
|
|
246
|
+
return r.forEach((n) => {
|
|
245
247
|
this.model.addPolyline(n);
|
|
246
|
-
}), this.controller instanceof h ? this.controller.complete() :
|
|
248
|
+
}), this.controller instanceof h ? this.controller.complete() : o.forEach((n) => {
|
|
247
249
|
n.showArea(), this.model.addArea(n);
|
|
248
250
|
}), this.changeMode(t), this;
|
|
249
251
|
}
|
|
@@ -272,15 +274,15 @@ class Dt {
|
|
|
272
274
|
}
|
|
273
275
|
/** 设置线段的文本 */
|
|
274
276
|
setCustomText(e, t) {
|
|
275
|
-
var
|
|
276
|
-
const
|
|
277
|
-
if (!
|
|
277
|
+
var o;
|
|
278
|
+
const r = this.model.getLineByID(e);
|
|
279
|
+
if (!r)
|
|
278
280
|
throw new Error("不存在的线段");
|
|
279
|
-
|
|
281
|
+
r.setText(t), (o = this.controller) == null || o.updateDistanceUI();
|
|
280
282
|
}
|
|
281
283
|
createControllerParams() {
|
|
282
|
-
var
|
|
283
|
-
const e = (
|
|
284
|
+
var r, o;
|
|
285
|
+
const e = (r = this.params.openParams) != null ? r : {}, t = (o = this.params.editParams) != null ? o : {};
|
|
284
286
|
return e.isMobile = this.isMobile, {
|
|
285
287
|
five: this.five,
|
|
286
288
|
hook: this.hook,
|
|
@@ -300,5 +302,5 @@ class Dt {
|
|
|
300
302
|
}
|
|
301
303
|
}
|
|
302
304
|
export {
|
|
303
|
-
|
|
305
|
+
xt as default
|
|
304
306
|
};
|
|
@@ -22,6 +22,10 @@ export default class Area {
|
|
|
22
22
|
readonly lightMesh: FiveLine;
|
|
23
23
|
readonly areaItem: AreaItem;
|
|
24
24
|
readonly hook: Subscribe<AreaHook>;
|
|
25
|
+
/**
|
|
26
|
+
* @description: 多边形的端点是否闭合
|
|
27
|
+
*/
|
|
28
|
+
get isClosed(): boolean;
|
|
25
29
|
/** 多边形mesh */
|
|
26
30
|
polygon: PolygonMesh;
|
|
27
31
|
/** 多边形顶点 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var m = Object.defineProperty;
|
|
2
|
-
var d = (
|
|
3
|
-
var
|
|
2
|
+
var d = (s, t, i) => t in s ? m(s, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[t] = i;
|
|
3
|
+
var e = (s, t, i) => (d(s, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
4
|
import * as h from "three";
|
|
5
5
|
import { uuid as f } from "../../shared-utils/uuid.js";
|
|
6
6
|
import { Subscribe as c } from "@realsee/five";
|
|
@@ -22,50 +22,57 @@ import "../../shared-utils/removeArrayItem.js";
|
|
|
22
22
|
import "../utils/geometryUtil.js";
|
|
23
23
|
import "../../shared-utils/three/centerPoint.js";
|
|
24
24
|
class O {
|
|
25
|
-
constructor(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
constructor(t, i) {
|
|
26
|
+
e(this, "id", f());
|
|
27
|
+
e(this, "selected", !1);
|
|
28
|
+
e(this, "text");
|
|
29
|
+
e(this, "type", "area");
|
|
30
|
+
e(this, "lightMesh");
|
|
31
|
+
e(this, "areaItem");
|
|
32
|
+
e(this, "hook", new c());
|
|
33
33
|
/** 多边形mesh */
|
|
34
|
-
|
|
34
|
+
e(this, "polygon");
|
|
35
35
|
/** 多边形顶点 */
|
|
36
|
-
|
|
36
|
+
e(this, "points", []);
|
|
37
37
|
/** 多边形前三个点组成的平面,用来使得后面加的点也落在这个平面上 */
|
|
38
|
-
|
|
38
|
+
e(this, "planeHelper");
|
|
39
39
|
/** 多边形边框 */
|
|
40
|
-
|
|
40
|
+
e(this, "polyline");
|
|
41
41
|
/** 多边形mesh容器 */
|
|
42
|
-
|
|
42
|
+
e(this, "meshContainer");
|
|
43
43
|
/** 多边形dom容器 */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
e(this, "domContainer");
|
|
45
|
+
e(this, "five");
|
|
46
|
+
e(this, "model");
|
|
47
47
|
/**
|
|
48
48
|
* @description: five camera update 时,更新Dom的位置
|
|
49
49
|
*/
|
|
50
|
-
|
|
51
|
-
this.five && (this.polyline.lines.forEach((
|
|
50
|
+
e(this, "updateDom", () => {
|
|
51
|
+
this.five && (this.polyline.lines.forEach((t) => t.distanceItem.update(this.five)), this.areaItem.updateDomPosition(this.five));
|
|
52
52
|
});
|
|
53
53
|
var n;
|
|
54
|
-
|
|
54
|
+
t && (this.points = t), this.model = i.model, this.polygon = new v(t), this.polyline = new y({ model: i.model }), this.areaItem = new C({
|
|
55
55
|
area: this,
|
|
56
|
-
clickCallback: (a,
|
|
56
|
+
clickCallback: (a, o) => {
|
|
57
57
|
const r = a.clientX + "px", l = a.clientY + "px";
|
|
58
58
|
this.hook.emit("selected", this, { left: r, top: l });
|
|
59
59
|
}
|
|
60
60
|
}), 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);
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
/**
|
|
63
|
+
* @description: 多边形的端点是否闭合
|
|
64
|
+
*/
|
|
65
|
+
get isClosed() {
|
|
66
|
+
var t;
|
|
67
|
+
return this.points.length >= 4 && ((t = this.points.at(0)) == null ? void 0 : t.equals(this.points.at(-1)));
|
|
68
|
+
}
|
|
69
|
+
addPoints(t) {
|
|
63
70
|
var a;
|
|
64
|
-
this.points = this.points.concat(
|
|
71
|
+
this.points = this.points.concat(t);
|
|
65
72
|
const i = this.points.at(-2), n = this.points.at(-1);
|
|
66
73
|
if (i && n) {
|
|
67
|
-
const
|
|
68
|
-
this.polyline.addLine(
|
|
74
|
+
const o = new u(new p(i), new p(n), this.polyline.model);
|
|
75
|
+
this.polyline.addLine(o), this.meshContainer.add(o.mesh), this.five && (o.distanceItem.setCanSelect(!1), o.distanceItem.appendTo(this.domContainer), o.distanceItem.update(this.five));
|
|
69
76
|
}
|
|
70
77
|
(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 h.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.points.length < 3 && (this.planeHelper = null);
|
|
71
78
|
}
|
|
@@ -74,8 +81,8 @@ class O {
|
|
|
74
81
|
*/
|
|
75
82
|
popPoint() {
|
|
76
83
|
this.points.pop();
|
|
77
|
-
const
|
|
78
|
-
|
|
84
|
+
const t = this.polyline.lines.pop();
|
|
85
|
+
t == null || t.remove(), this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five), this.points.length < 3 && (this.planeHelper = null);
|
|
79
86
|
}
|
|
80
87
|
/**
|
|
81
88
|
* @description: 自动补全多边形的各个边
|
|
@@ -92,11 +99,11 @@ class O {
|
|
|
92
99
|
/**
|
|
93
100
|
* @description: 获取一个点投影在当前平面上的点
|
|
94
101
|
*/
|
|
95
|
-
projectPoint(
|
|
96
|
-
return
|
|
102
|
+
projectPoint(t) {
|
|
103
|
+
return t && (this.planeHelper ? this.planeHelper.projectPoint(t, new h.Vector3()) : t);
|
|
97
104
|
}
|
|
98
105
|
remove() {
|
|
99
|
-
this.polygon.removeFromParent(), this.areaItem.remove(), this.polyline.lines.forEach((
|
|
106
|
+
this.polygon.removeFromParent(), this.areaItem.remove(), this.polyline.lines.forEach((t) => t.remove());
|
|
100
107
|
}
|
|
101
108
|
/**
|
|
102
109
|
* @todo: 没写完
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
import type MeasureController from '../Controller';
|
|
2
|
+
import type { PartialObjectDeep } from '../../typings/typings';
|
|
3
|
+
import type { PointSelectorMode } from '../typings/data';
|
|
4
|
+
export interface MeasureTip {
|
|
5
|
+
select?: string;
|
|
6
|
+
line: {
|
|
7
|
+
start: string;
|
|
8
|
+
};
|
|
9
|
+
area: {
|
|
10
|
+
start: string;
|
|
11
|
+
close: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
2
14
|
export interface GuideControllerParams {
|
|
3
15
|
container?: Element;
|
|
16
|
+
tips?: PartialObjectDeep<MeasureTip>;
|
|
4
17
|
startTip?: string;
|
|
5
18
|
endTip?: string;
|
|
6
19
|
firstPointTip?: string;
|
|
7
20
|
nextPointTip?: string;
|
|
21
|
+
pointSelectorMode?: PointSelectorMode;
|
|
8
22
|
}
|
|
9
23
|
export declare class GuideController {
|
|
10
|
-
private
|
|
11
|
-
private textDom;
|
|
12
|
-
private container;
|
|
13
|
-
private hasAnchor;
|
|
14
|
-
/** 是否曾经切换到 Watch 模式过 */
|
|
15
|
-
private hasChangedToWatch;
|
|
16
|
-
private _params;
|
|
24
|
+
private tipSvelteDom?;
|
|
17
25
|
constructor(measureController: MeasureController, params: GuideControllerParams);
|
|
18
26
|
dispose(): void;
|
|
19
27
|
show(): this;
|
|
20
28
|
hide(): this;
|
|
21
|
-
private initDom;
|
|
22
|
-
private onModelChange;
|
|
23
|
-
private anchorChange;
|
|
24
|
-
private onEditedLineChange;
|
|
25
29
|
}
|