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