@realsee/dnalogel 2.26.0 → 2.26.1
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/Model/point.d.ts +0 -4
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +1 -1
- package/dist/index.cjs.js +52 -52
- package/dist/index.js +2559 -2575
- package/dist/index.umd.js +45 -45
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +30 -30
- package/docs/classes/CruisePluginController.html +25 -25
- package/docs/classes/GuideLineItem.GuideLineItem.html +19 -19
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +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 +11 -48
- package/docs/classes/PanoMeasurePluginPolyline.html +40 -32
- 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 +19 -19
- package/docs/classes/Util.PointDomHelper.html +10 -10
- package/docs/classes/Util.PointHelper.html +10 -10
- package/docs/classes/Util.PointSelectorHelper.html +15 -15
- 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/PipelinePlugin.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 +5 -5
- 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 +5 -5
- 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 +15 -15
- 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/PickTagContentTypeInContentTypeConfigKey.html +4 -4
- package/docs/types/PipelinePluginParameterType.html +4 -4
- package/docs/types/PipelinePluginReturnType.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 +2 -4
- package/libs/PanoMeasurePlugin/Components/Controller1.js +52 -54
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +2 -3
- package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -7
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +14 -16
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +2 -3
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +41 -43
- package/libs/PanoMeasurePlugin/Controller/index.js +26 -30
- package/libs/PanoMeasurePlugin/Model/area.js +2 -3
- package/libs/PanoMeasurePlugin/Model/index.js +2 -3
- package/libs/PanoMeasurePlugin/Model/line.js +20 -20
- package/libs/PanoMeasurePlugin/Model/point.d.ts +0 -4
- package/libs/PanoMeasurePlugin/Model/point.js +12 -20
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Model/polyline.js +59 -51
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +22 -24
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +2 -3
- package/libs/PanoMeasurePlugin/index.js +13 -15
- package/libs/PanoVideoPlugin/VideoMeshController.js +1 -2
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +110 -112
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +0 -2
- package/dist/shared-utils/removeArrayItem.d.ts +0 -7
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +0 -2
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +0 -13
- package/libs/shared-utils/removeArrayItem.d.ts +0 -7
- package/libs/shared-utils/removeArrayItem.js +0 -8
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
var H = Object.defineProperty;
|
|
2
|
+
var k = (l, r, t) => r in l ? H(l, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[r] = t;
|
|
3
|
+
var s = (l, r, t) => (k(l, typeof r != "symbol" ? r + "" : r, t), t);
|
|
4
|
+
import I from "hammerjs";
|
|
5
|
+
import R from "../Modules/DeleteDom/index.js";
|
|
6
6
|
import S from "../utils/isNDCPointInScreen.js";
|
|
7
|
-
import
|
|
8
|
-
import { Raycaster as
|
|
9
|
-
import { closestPointOnLine as
|
|
10
|
-
import { findClosestPoint as
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import j from "../Model/
|
|
14
|
-
import x from "../Model/polygon.js";
|
|
7
|
+
import G from "./BaseController.js";
|
|
8
|
+
import { Raycaster as T, Vector2 as u } from "three";
|
|
9
|
+
import { closestPointOnLine as U } from "../utils/math.js";
|
|
10
|
+
import { findClosestPoint as b } from "../utils/findClosestPoint.js";
|
|
11
|
+
import { getPointFromHammerEvent as w } from "../../shared-utils/getPointFromHammerEvent.js";
|
|
12
|
+
import M from "../Model/area.js";
|
|
13
|
+
import j from "../Model/polygon.js";
|
|
15
14
|
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
16
15
|
import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
17
16
|
import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
|
|
@@ -25,7 +24,6 @@ import "../utils/dom/distanceItem.js";
|
|
|
25
24
|
import "../utils/dom/base.js";
|
|
26
25
|
import "../../shared-utils/three/centerPoint.js";
|
|
27
26
|
import "../Model/point.js";
|
|
28
|
-
import "../../shared-utils/removeArrayItem.js";
|
|
29
27
|
import "../utils/ironbox.js";
|
|
30
28
|
import "../utils/ndc2Screen.js";
|
|
31
29
|
import "../Model/polyline.js";
|
|
@@ -49,8 +47,8 @@ import "../../shared-utils/isNil.js";
|
|
|
49
47
|
import "../../shared-utils/three/IObject3D.js";
|
|
50
48
|
import "../utils/generatePolygonGeometry.js";
|
|
51
49
|
import "earcut";
|
|
52
|
-
const
|
|
53
|
-
class
|
|
50
|
+
const C = () => !1;
|
|
51
|
+
class Gt extends G {
|
|
54
52
|
constructor(t) {
|
|
55
53
|
super(t);
|
|
56
54
|
s(this, "type", "watch");
|
|
@@ -63,43 +61,43 @@ class bt extends T {
|
|
|
63
61
|
s(this, "editPointState");
|
|
64
62
|
s(this, "hammer");
|
|
65
63
|
s(this, "onPanStart", (t) => {
|
|
66
|
-
var
|
|
64
|
+
var d;
|
|
67
65
|
if (this.model.getAllLines().length === 0 || !this.fiveElement)
|
|
68
66
|
return;
|
|
69
|
-
const i =
|
|
67
|
+
const i = w(t).point, e = (d = b(this.five, this.model.getAllPoints(), i, 20)) == null ? void 0 : d.point;
|
|
70
68
|
if (!e) {
|
|
71
69
|
this.editPointState = void 0;
|
|
72
70
|
return;
|
|
73
71
|
}
|
|
74
|
-
const n = {
|
|
72
|
+
const n = this.model.polylines.find((c) => c.includes(e)), a = {
|
|
75
73
|
point: e,
|
|
76
|
-
associatedLines:
|
|
74
|
+
associatedLines: n.lines
|
|
77
75
|
};
|
|
78
76
|
this.hook.emit("wantsDragLine", {
|
|
79
77
|
point: e.id,
|
|
80
|
-
lines:
|
|
81
|
-
}) || (this.editPointState =
|
|
78
|
+
lines: a.associatedLines.map(({ id: c }) => c)
|
|
79
|
+
}) || (this.editPointState = a, this.magnifier.appendTo(this.container), this.magnifier.enable(), this.group.add(this.mouseGroup));
|
|
82
80
|
});
|
|
83
81
|
s(this, "onPanEnd", () => {
|
|
84
|
-
this.editPointState && (this.editPointState.
|
|
82
|
+
this.editPointState && (this.editPointState.associatedLines.forEach((t) => t.mesh.setMaterial({ dashed: !1 })), this.highlightLines(this.editPointState.associatedLines), this.editPointState = void 0, this.magnifier.disable(), this.group.remove(this.mouseGroup));
|
|
85
83
|
});
|
|
86
84
|
s(this, "onPan", (t) => {
|
|
87
85
|
if (!this.editPointState || !this.fiveElement)
|
|
88
86
|
return;
|
|
89
|
-
const i =
|
|
87
|
+
const i = w(t).ndcPoint, e = new T();
|
|
90
88
|
e.setFromCamera(i, this.five.camera);
|
|
91
89
|
const [n] = this.five.model.intersectRaycaster(e);
|
|
92
90
|
n && this.onIntersectionUpdate(n);
|
|
93
91
|
});
|
|
94
92
|
s(this, "onIntersectionUpdate", (t, i) => {
|
|
95
93
|
if (this.editPointState) {
|
|
96
|
-
if (this.clearHighlightLines(), this.editPointState.point.position.copy(t.point), this.editPointState.
|
|
94
|
+
if (this.clearHighlightLines(), this.editPointState.point.position.copy(t.point), this.editPointState.associatedLines.forEach((e) => {
|
|
97
95
|
e.mesh.setPoints(e.points[0].position.clone(), e.points[1].position.clone()), e.lightMesh.setPoints(e.points[0].position.clone(), e.points[1].position.clone()), e.mesh.setMaterial({ dashed: !0 });
|
|
98
96
|
}), this.updateDistanceUI(), this.magnifier.renderWithPoint(t.point), this.mouseGroup.position.copy(t.point), i)
|
|
99
97
|
this.mouseGroup.quaternion.copy(i.quaternion);
|
|
100
98
|
else if (t.face) {
|
|
101
|
-
const n = t.face.normal.clone().multiplyScalar(0.05),
|
|
102
|
-
this.mouseGroup.lookAt(
|
|
99
|
+
const n = t.face.normal.clone().multiplyScalar(0.05), p = t.point.clone().add(n).clone().add(n);
|
|
100
|
+
this.mouseGroup.lookAt(p);
|
|
103
101
|
}
|
|
104
102
|
this.five.needsRender = !0, this.hook.emit(
|
|
105
103
|
"selectedChange",
|
|
@@ -114,27 +112,27 @@ class bt extends T {
|
|
|
114
112
|
s(this, "wantsTapGesture", (t) => {
|
|
115
113
|
var A;
|
|
116
114
|
const i = this.model.areas.map((o) => t.intersectObject(o.polygon, !0)[0]).sort((o, h) => o.distance - h.distance), e = (A = i[0]) == null ? void 0 : A.object.parent;
|
|
117
|
-
if (e instanceof
|
|
115
|
+
if (e instanceof j) {
|
|
118
116
|
const o = this.model.areas.find((h) => h.polygon === e);
|
|
119
117
|
if (o) {
|
|
120
|
-
const { x: h, y: f } = i[0].point.clone().project(this.five.camera),
|
|
121
|
-
return this.chooseArea(o, { left:
|
|
118
|
+
const { x: h, y: f } = i[0].point.clone().project(this.five.camera), m = `${(h + 1) / 2 * 100}%`, g = `${(-f + 1) / 2 * 100}%`;
|
|
119
|
+
return this.chooseArea(o, { left: m, top: g }), !1;
|
|
122
120
|
}
|
|
123
121
|
}
|
|
124
122
|
const [n] = this.five.model.intersectRaycaster(t);
|
|
125
123
|
if (!n)
|
|
126
124
|
return;
|
|
127
|
-
const
|
|
128
|
-
const [h, f] = o.points,
|
|
129
|
-
if (!S(
|
|
125
|
+
const a = this.five.camera, p = n.point.clone().project(a), d = this.container.clientWidth, c = this.container.clientHeight, L = new u(p.x * d, p.y * c), P = this.model.getAllLines().map((o) => {
|
|
126
|
+
const [h, f] = o.points, m = h.position.clone().project(a), g = f.position.clone().project(a);
|
|
127
|
+
if (!S(m) && !S(g))
|
|
130
128
|
return null;
|
|
131
|
-
const
|
|
132
|
-
return { id: o.id, points: [
|
|
129
|
+
const D = new u(m.x * d, m.y * c), E = new u(g.x * d, g.y * c);
|
|
130
|
+
return { id: o.id, points: [D, E] };
|
|
133
131
|
}).filter((o) => !!o);
|
|
134
132
|
if (P.length === 0)
|
|
135
133
|
return;
|
|
136
134
|
const v = P.map((o) => {
|
|
137
|
-
const h =
|
|
135
|
+
const h = U(L, o.points);
|
|
138
136
|
return { id: o.id, distance: h.distanceTo(L) };
|
|
139
137
|
}).sort((o, h) => o.distance - h.distance)[0];
|
|
140
138
|
if (v.distance > 20)
|
|
@@ -145,7 +143,7 @@ class bt extends T {
|
|
|
145
143
|
});
|
|
146
144
|
s(this, "chooseLine", (t) => {
|
|
147
145
|
this.choose = "line";
|
|
148
|
-
const i =
|
|
146
|
+
const i = t.getPolyline().lines;
|
|
149
147
|
this.deleteDom.setLines(i).updatePosition().show(), this.highlightLines(i), this.five.needsRender = !0, this.hook.emit(
|
|
150
148
|
"selectedChange",
|
|
151
149
|
i.map((e) => e)
|
|
@@ -173,10 +171,10 @@ class bt extends T {
|
|
|
173
171
|
s(this, "cancelDeleteClickCallback", () => {
|
|
174
172
|
this.deleteDom.hide(), this.clearHighlightLines(), this.unHighlightArea();
|
|
175
173
|
});
|
|
176
|
-
this.deleteDom = new
|
|
174
|
+
this.deleteDom = new R(this.five, {
|
|
177
175
|
i18n: this.config.i18n,
|
|
178
176
|
onClick: () => {
|
|
179
|
-
this.choose === "line" ? this.deleteLine() : this.choose instanceof
|
|
177
|
+
this.choose === "line" ? this.deleteLine() : this.choose instanceof M && this.deleteArea(this.choose);
|
|
180
178
|
},
|
|
181
179
|
cancel: this.cancelDeleteClickCallback
|
|
182
180
|
}).appendTo(this.container), this.model.getAllLines().forEach((e) => {
|
|
@@ -189,14 +187,14 @@ class bt extends T {
|
|
|
189
187
|
const i = this.five.getElement();
|
|
190
188
|
if (i) {
|
|
191
189
|
this.fiveElement = i;
|
|
192
|
-
const e = new
|
|
190
|
+
const e = new I(i);
|
|
193
191
|
this.hammer = e, e.on("pan", this.onPan), e.on("panstart", this.onPanStart), e.on("panend", this.onPanEnd);
|
|
194
192
|
}
|
|
195
|
-
this.updateDistanceUI(), this.five.needsRender = !0, this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsPanGesture", this.wantsPanGesture), this.five.on("wantsChangeMode",
|
|
193
|
+
this.updateDistanceUI(), this.five.needsRender = !0, this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsPanGesture", this.wantsPanGesture), this.five.on("wantsChangeMode", C), this.model.hook.on("polylineRemoved", this.polylineRemoved);
|
|
196
194
|
}
|
|
197
195
|
dispose() {
|
|
198
196
|
var t;
|
|
199
|
-
super.dispose(), this.deleteDom.dispose(), this.model.hook.off("polylineRemoved", this.polylineRemoved), this.model.getAllLines().forEach((i) => i.hook.off("selected", this.chooseLine)), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.wantsPanGesture), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsChangeMode",
|
|
197
|
+
super.dispose(), this.deleteDom.dispose(), this.model.hook.off("polylineRemoved", this.polylineRemoved), this.model.getAllLines().forEach((i) => i.hook.off("selected", this.chooseLine)), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.wantsPanGesture), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsChangeMode", C), this.five.needsRender = !0, this.hook.emit("selectedChange", []), (t = this.hammer) == null || t.destroy();
|
|
200
198
|
}
|
|
201
199
|
highlightLine(t) {
|
|
202
200
|
t.selected || (t.selected = !0, this.group.add(t.lightMesh), t.distanceItem.highlight(), this.five.needsRender = !0);
|
|
@@ -223,5 +221,5 @@ class bt extends T {
|
|
|
223
221
|
}
|
|
224
222
|
}
|
|
225
223
|
export {
|
|
226
|
-
|
|
224
|
+
Gt as default
|
|
227
225
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
var b = Object.defineProperty;
|
|
2
2
|
var w = Object.getOwnPropertySymbols;
|
|
3
|
-
var T = Object.prototype.hasOwnProperty,
|
|
4
|
-
var
|
|
3
|
+
var T = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var p = (s, e, t) => e in s ? b(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, h = (s, e) => {
|
|
5
5
|
for (var t in e || (e = {}))
|
|
6
|
-
T.call(e, t) &&
|
|
6
|
+
T.call(e, t) && p(s, t, e[t]);
|
|
7
7
|
if (w)
|
|
8
8
|
for (var t of w(e))
|
|
9
|
-
|
|
9
|
+
U.call(e, t) && p(s, t, e[t]);
|
|
10
10
|
return s;
|
|
11
11
|
};
|
|
12
|
-
var i = (s, e, t) => (
|
|
13
|
-
import
|
|
12
|
+
var i = (s, e, t) => (p(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
|
+
import l from "./EditController.js";
|
|
14
14
|
import P from "./ViewController.js";
|
|
15
15
|
import v from "./WatchController.js";
|
|
16
16
|
import a from "./MixedController.js";
|
|
17
|
-
import { omit as
|
|
18
|
-
import { Group as
|
|
19
|
-
import { Model as
|
|
17
|
+
import { omit as k } from "../../shared-utils/filter.js";
|
|
18
|
+
import { Group as D } from "three";
|
|
19
|
+
import { Model as E } from "../Model/index.js";
|
|
20
20
|
import { Subscribe as x } from "@realsee/five";
|
|
21
21
|
import { getMouseGroup as G } from "../utils/mouseGroup.js";
|
|
22
22
|
import { UIController as S } from "../Modules/UIController/index.js";
|
|
@@ -38,7 +38,6 @@ import "../utils/dom/base.js";
|
|
|
38
38
|
import "../utils/isNDCPointInScreen.js";
|
|
39
39
|
import "../../shared-utils/three/centerPoint.js";
|
|
40
40
|
import "../Model/point.js";
|
|
41
|
-
import "../../shared-utils/removeArrayItem.js";
|
|
42
41
|
import "../../shared-utils/throttle.js";
|
|
43
42
|
import "./BaseController.js";
|
|
44
43
|
import "../utils/ironbox.js";
|
|
@@ -83,7 +82,6 @@ import "../Modules/DeleteDom/index.js";
|
|
|
83
82
|
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
84
83
|
import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
85
84
|
import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
|
|
86
|
-
import "../utils/findAssociatedLines.js";
|
|
87
85
|
import "../utils/math.js";
|
|
88
86
|
import "../utils/findClosestPoint.js";
|
|
89
87
|
import "../utils/ndc2Screen.js";
|
|
@@ -109,7 +107,7 @@ import "../../vendor/svelte/transition/index.js";
|
|
|
109
107
|
import "../../vendor/svelte/easing/index.js";
|
|
110
108
|
import "../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
111
109
|
import "../Components/Tip.js";
|
|
112
|
-
class
|
|
110
|
+
class kt {
|
|
113
111
|
constructor(e, t) {
|
|
114
112
|
i(this, "hasOpen", !1);
|
|
115
113
|
i(this, "hook", new x());
|
|
@@ -137,7 +135,7 @@ class Dt {
|
|
|
137
135
|
var e, t, r, o;
|
|
138
136
|
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);
|
|
139
137
|
});
|
|
140
|
-
i(this, "getCurrentMode", () => this.controller instanceof
|
|
138
|
+
i(this, "getCurrentMode", () => this.controller instanceof l ? "Edit" : this.controller instanceof v ? "Watch" : this.controller instanceof a ? "Mixed" : this.controller instanceof P ? "View" : null);
|
|
141
139
|
/** 变更场景
|
|
142
140
|
* @description 如果从编辑场景改变到观看场景,不会自动保存,默认丢弃所有改动
|
|
143
141
|
*/
|
|
@@ -149,7 +147,7 @@ class Dt {
|
|
|
149
147
|
const t = {
|
|
150
148
|
View: P,
|
|
151
149
|
Watch: v,
|
|
152
|
-
Edit:
|
|
150
|
+
Edit: l,
|
|
153
151
|
Mixed: a
|
|
154
152
|
};
|
|
155
153
|
if (!t[e])
|
|
@@ -163,26 +161,26 @@ class Dt {
|
|
|
163
161
|
i(this, "changeMeasureType", (e) => {
|
|
164
162
|
this.currentMeasureType = e, this.hook.emit("measureTypeChange", e);
|
|
165
163
|
});
|
|
166
|
-
var
|
|
167
|
-
this.five = e, this.params = t, this.config =
|
|
168
|
-
const r = (
|
|
164
|
+
var n, c, u, d, f, g, M, y, C;
|
|
165
|
+
this.five = e, this.params = t, this.config = k(t, ["openParams", "magnifierParams"]), this.model = new E(this.config), this.isMobile = (c = (n = t == null ? void 0 : t.openParams) == null ? void 0 : n.isMobile) != null ? c : !1, this.magnifier = new A(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 D(), 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 r = (y = (M = t.editParams) == null ? void 0 : M.pointSelectorMode) != null ? y : B ? "fixed" : "cursor", o = (C = this.params.openParams) != null ? C : {};
|
|
169
167
|
if (this.params.useUIController !== !1) {
|
|
170
|
-
const
|
|
168
|
+
const m = h({
|
|
171
169
|
container: this.container,
|
|
172
170
|
openParams: o,
|
|
173
171
|
i18n: t.i18n,
|
|
174
172
|
pointSelectorMode: r,
|
|
175
173
|
useNewUI: this.allowMeasureType.length > 1
|
|
176
174
|
}, I(this.params.useUIController));
|
|
177
|
-
this.useUIController = new S(this,
|
|
175
|
+
this.useUIController = new S(this, m);
|
|
178
176
|
}
|
|
179
177
|
if (this.params.useGuideController !== !1) {
|
|
180
|
-
const
|
|
178
|
+
const m = h({
|
|
181
179
|
container: this.container,
|
|
182
180
|
pointSelectorMode: r,
|
|
183
181
|
i18n: t.i18n
|
|
184
182
|
}, I(this.params.useGuideController));
|
|
185
|
-
this.useGuideController = new L(this,
|
|
183
|
+
this.useGuideController = new L(this, m);
|
|
186
184
|
}
|
|
187
185
|
}
|
|
188
186
|
appendTo(e) {
|
|
@@ -218,7 +216,7 @@ class Dt {
|
|
|
218
216
|
}
|
|
219
217
|
/** 撤销编辑 */
|
|
220
218
|
revoke() {
|
|
221
|
-
this.controller instanceof
|
|
219
|
+
this.controller instanceof l && this.controller.revoke();
|
|
222
220
|
}
|
|
223
221
|
removePolyline(e) {
|
|
224
222
|
this.model.removePolyline(e);
|
|
@@ -251,13 +249,11 @@ class Dt {
|
|
|
251
249
|
* @description 以下情况可能报错
|
|
252
250
|
*/
|
|
253
251
|
save(e) {
|
|
254
|
-
var
|
|
255
|
-
if (!(this.controller instanceof
|
|
252
|
+
var o;
|
|
253
|
+
if (!(this.controller instanceof l) && !(this.controller instanceof a))
|
|
256
254
|
return this;
|
|
257
|
-
const t = (
|
|
258
|
-
return r.forEach((n) => {
|
|
259
|
-
this.model.addPolyline(n);
|
|
260
|
-
}), this.controller instanceof h ? this.controller.complete() : o.forEach((n) => {
|
|
255
|
+
const t = (o = e == null ? void 0 : e.mode) != null ? o : "View", r = this.controller.model.areas;
|
|
256
|
+
return this.controller instanceof l ? this.controller.complete() : r.forEach((n) => {
|
|
261
257
|
n.showArea(), this.model.addArea(n);
|
|
262
258
|
}), this.changeMode(t), this;
|
|
263
259
|
}
|
|
@@ -307,11 +303,11 @@ class Dt {
|
|
|
307
303
|
editParams: t,
|
|
308
304
|
magnifierParams: this.params.magnifierParams,
|
|
309
305
|
getMeasureType: () => this.currentMeasureType,
|
|
310
|
-
mouseGroup: G(
|
|
306
|
+
mouseGroup: G(h({}, e.crossHairParameter)),
|
|
311
307
|
userDistanceItemCreator: this.params.userDistanceItemCreator
|
|
312
308
|
};
|
|
313
309
|
}
|
|
314
310
|
}
|
|
315
311
|
export {
|
|
316
|
-
|
|
312
|
+
kt as default
|
|
317
313
|
};
|
|
@@ -19,7 +19,6 @@ import "../../shared-utils/three/centerPoint.js";
|
|
|
19
19
|
import "../../shared-utils/three/IObject3D.js";
|
|
20
20
|
import "../utils/generatePolygonGeometry.js";
|
|
21
21
|
import "earcut";
|
|
22
|
-
import "../../shared-utils/removeArrayItem.js";
|
|
23
22
|
import "../utils/geometryUtil.js";
|
|
24
23
|
import "hammerjs";
|
|
25
24
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
@@ -37,7 +36,7 @@ import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
|
37
36
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
38
37
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
39
38
|
import "../../shared-utils/isNil.js";
|
|
40
|
-
class
|
|
39
|
+
class tt {
|
|
41
40
|
constructor(t, e) {
|
|
42
41
|
i(this, "id", f());
|
|
43
42
|
i(this, "selected", !1);
|
|
@@ -129,5 +128,5 @@ class it {
|
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
export {
|
|
132
|
-
|
|
131
|
+
tt as default
|
|
133
132
|
};
|
|
@@ -14,8 +14,7 @@ import "../utils/dom/base.js";
|
|
|
14
14
|
import "../utils/isNDCPointInScreen.js";
|
|
15
15
|
import "../../shared-utils/three/centerPoint.js";
|
|
16
16
|
import "./point.js";
|
|
17
|
-
|
|
18
|
-
class v {
|
|
17
|
+
class I {
|
|
19
18
|
constructor(e) {
|
|
20
19
|
r(this, "config");
|
|
21
20
|
r(this, "polylines", []);
|
|
@@ -96,5 +95,5 @@ class v {
|
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
97
|
export {
|
|
99
|
-
|
|
98
|
+
I as Model
|
|
100
99
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var r = Object.defineProperty;
|
|
2
|
-
var m = (s,
|
|
3
|
-
var e = (s,
|
|
2
|
+
var m = (s, t, i) => t in s ? r(s, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[t] = i;
|
|
3
|
+
var e = (s, t, i) => (m(s, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
4
|
import { uuid as p } from "../../shared-utils/uuid.js";
|
|
5
5
|
import { createLineMesh as n } from "../utils/line.js";
|
|
6
6
|
import { Subscribe as c } from "@realsee/five";
|
|
@@ -12,7 +12,7 @@ import "../utils/dom/base.js";
|
|
|
12
12
|
import "../utils/isNDCPointInScreen.js";
|
|
13
13
|
import "../../shared-utils/three/centerPoint.js";
|
|
14
14
|
class l {
|
|
15
|
-
constructor(
|
|
15
|
+
constructor(t, i, o) {
|
|
16
16
|
e(this, "id");
|
|
17
17
|
e(this, "selected", !1);
|
|
18
18
|
e(this, "text");
|
|
@@ -25,14 +25,14 @@ class l {
|
|
|
25
25
|
e(this, "distanceItem");
|
|
26
26
|
e(this, "polyline");
|
|
27
27
|
e(this, "visible");
|
|
28
|
-
var
|
|
29
|
-
if (this.id = p(), this.model =
|
|
28
|
+
var h;
|
|
29
|
+
if (this.id = p(), this.model = o, t.id === i.id)
|
|
30
30
|
throw new Error("无效的线段, 一个点无法构成线段");
|
|
31
|
-
typeof
|
|
31
|
+
typeof o.config.defaultText == "string" && (this.text = o.config.defaultText), this.hook = new c(), this.points = [t, i], this.mesh = n(this, "normal"), this.lightMesh = n(this, "light"), this.distanceItem = new d({
|
|
32
32
|
line: this,
|
|
33
33
|
clickCallback: () => this.hook.emit("selected", this),
|
|
34
|
-
userDistanceItem: (
|
|
35
|
-
})
|
|
34
|
+
userDistanceItem: (h = this.model.config) != null && h.userDistanceItemCreator ? this.model.config.userDistanceItemCreator() : void 0
|
|
35
|
+
});
|
|
36
36
|
}
|
|
37
37
|
hide() {
|
|
38
38
|
this.visible && (this.visible = !1, this.mesh.visible = !1, this.distanceItem.hide());
|
|
@@ -40,8 +40,8 @@ class l {
|
|
|
40
40
|
show() {
|
|
41
41
|
this.visible || (this.visible = !0, this.mesh.visible = !0, this.distanceItem.show());
|
|
42
42
|
}
|
|
43
|
-
setPoints(
|
|
44
|
-
this.points[0].position.copy(
|
|
43
|
+
setPoints(t, i) {
|
|
44
|
+
this.points[0].position.copy(t), this.points[1].position.copy(i), this.mesh.setPoints(t, i);
|
|
45
45
|
}
|
|
46
46
|
remove() {
|
|
47
47
|
this.mesh.parent && this.mesh.parent.remove(this.mesh), this.distanceItem.remove();
|
|
@@ -55,22 +55,22 @@ class l {
|
|
|
55
55
|
getPolyline() {
|
|
56
56
|
if (this.polyline)
|
|
57
57
|
return this.polyline;
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
return this.polyline =
|
|
58
|
+
const t = this.model.polylines.find((i) => i.lines.includes(this));
|
|
59
|
+
if (t)
|
|
60
|
+
return this.polyline = t, t;
|
|
61
61
|
}
|
|
62
|
-
findAnotherPoint(
|
|
63
|
-
return this.points.find(({ id:
|
|
62
|
+
findAnotherPoint(t) {
|
|
63
|
+
return this.points.find(({ id: i }) => i !== t.id);
|
|
64
64
|
}
|
|
65
|
-
setText(
|
|
66
|
-
this.text =
|
|
65
|
+
setText(t) {
|
|
66
|
+
this.text = t, this.hook.emit("textChanged", t);
|
|
67
67
|
}
|
|
68
68
|
toJson() {
|
|
69
|
-
return { id: this.id, points: this.points.map((
|
|
69
|
+
return { id: this.id, points: this.points.map((t) => t.toJson()), text: this.text };
|
|
70
70
|
}
|
|
71
71
|
clone() {
|
|
72
|
-
const
|
|
73
|
-
return
|
|
72
|
+
const t = new l(this.points[0].clone(), this.points[1].clone(), this.model);
|
|
73
|
+
return t.text = this.text, t;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
export {
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import type Line from './line';
|
|
2
1
|
import type { PointJson } from '../typings/data';
|
|
3
2
|
import { Vector3 } from 'three';
|
|
4
3
|
export default class Point {
|
|
5
4
|
id: string;
|
|
6
|
-
lines: Line[];
|
|
7
5
|
position: Vector3;
|
|
8
6
|
readonly type = "point";
|
|
9
7
|
constructor(position: Vector3 | number[]);
|
|
10
8
|
toJson(): PointJson;
|
|
11
|
-
addLine(line: Line): void;
|
|
12
|
-
removeLine(line: Line): void;
|
|
13
9
|
clone(): Point;
|
|
14
10
|
}
|
|
@@ -1,35 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var n = (t,
|
|
3
|
-
var r = (t,
|
|
1
|
+
var e = Object.defineProperty;
|
|
2
|
+
var n = (t, o, i) => o in t ? e(t, o, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[o] = i;
|
|
3
|
+
var r = (t, o, i) => (n(t, typeof o != "symbol" ? o + "" : o, i), i);
|
|
4
4
|
import { Vector3 as p } from "three";
|
|
5
|
-
import { uuid as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
constructor(i) {
|
|
5
|
+
import { uuid as c } from "../../shared-utils/uuid.js";
|
|
6
|
+
class s {
|
|
7
|
+
constructor(o) {
|
|
9
8
|
r(this, "id");
|
|
10
|
-
r(this, "lines");
|
|
11
9
|
r(this, "position");
|
|
12
10
|
r(this, "type", "point");
|
|
13
|
-
if (this.id =
|
|
14
|
-
this.position.fromArray(
|
|
15
|
-
else if (typeof
|
|
16
|
-
this.position.copy(
|
|
11
|
+
if (this.id = c(), this.position = new p(), Array.isArray(o))
|
|
12
|
+
this.position.fromArray(o);
|
|
13
|
+
else if (typeof o == "object" && o.isVector3)
|
|
14
|
+
this.position.copy(o);
|
|
17
15
|
else
|
|
18
16
|
throw new Error("position must be Vector3 or number[]");
|
|
19
17
|
}
|
|
20
18
|
toJson() {
|
|
21
19
|
return { id: this.id, position: this.position.toArray() };
|
|
22
20
|
}
|
|
23
|
-
addLine(i) {
|
|
24
|
-
this.lines.push(i);
|
|
25
|
-
}
|
|
26
|
-
removeLine(i) {
|
|
27
|
-
m(i, this.lines);
|
|
28
|
-
}
|
|
29
21
|
clone() {
|
|
30
|
-
return new
|
|
22
|
+
return new s(this.position);
|
|
31
23
|
}
|
|
32
24
|
}
|
|
33
25
|
export {
|
|
34
|
-
|
|
26
|
+
s as default
|
|
35
27
|
};
|
|
@@ -16,11 +16,11 @@ export type PolylineEventMap = {
|
|
|
16
16
|
export declare class Polyline {
|
|
17
17
|
id: string;
|
|
18
18
|
lines: Line[];
|
|
19
|
-
points: Point[];
|
|
20
19
|
visiblePanoIndexes?: number[];
|
|
21
20
|
readonly model: Model;
|
|
22
21
|
readonly type = "polyline";
|
|
23
22
|
readonly hook: Subscribe<PolylineEventMap>;
|
|
23
|
+
get points(): Point[];
|
|
24
24
|
constructor(config: {
|
|
25
25
|
model: Model;
|
|
26
26
|
});
|