@realsee/dnalogel 2.24.0 → 2.24.2
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/BaseController.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Model/area.d.ts +1 -1
- package/dist/PanoMeasurePlugin/typings/index.d.ts +4 -0
- package/dist/PanoTagPlugin/utils/model/mediaPlane.d.ts +1 -0
- package/dist/index.cjs.js +23 -23
- package/dist/index.js +366 -343
- package/dist/index.umd.js +29 -29
- 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 +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 +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/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 +42 -17
- 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/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 +32 -31
- package/libs/PanoMeasurePlugin/Components/Controller1.js +14 -13
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +14 -7
- package/libs/PanoMeasurePlugin/Controller/EditController.js +12 -11
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +74 -59
- package/libs/PanoMeasurePlugin/Controller/index.js +18 -17
- package/libs/PanoMeasurePlugin/Model/area.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Model/area.js +51 -35
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +14 -13
- package/libs/PanoMeasurePlugin/index.js +25 -24
- package/libs/PanoMeasurePlugin/typings/index.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +47 -29
- package/libs/PanoTagPlugin/utils/model/mediaPlane.d.ts +1 -0
- package/libs/PanoTagPlugin/utils/model/mediaPlane.js +83 -68
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var k = Object.defineProperty;
|
|
2
|
-
var I = (c, r,
|
|
3
|
-
var s = (c, r,
|
|
2
|
+
var I = (c, r, t) => r in c ? k(c, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[r] = t;
|
|
3
|
+
var s = (c, r, t) => (I(c, typeof r != "symbol" ? r + "" : r, t), t);
|
|
4
4
|
import R from "hammerjs";
|
|
5
5
|
import G from "../Modules/DeleteDom/index.js";
|
|
6
6
|
import S from "../utils/isNDCPointInScreen.js";
|
|
@@ -31,13 +31,28 @@ import "../utils/ndc2Screen.js";
|
|
|
31
31
|
import "../Model/polyline.js";
|
|
32
32
|
import "../utils/dom/areaDom.js";
|
|
33
33
|
import "../utils/geometryUtil.js";
|
|
34
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
35
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
36
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
37
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
38
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
39
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
40
|
+
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
41
|
+
import "../../shared-utils/Subscribe.js";
|
|
42
|
+
import "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
43
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
44
|
+
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
45
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
46
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
47
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
48
|
+
import "../../shared-utils/isNil.js";
|
|
34
49
|
import "../../shared-utils/three/IObject3D.js";
|
|
35
50
|
import "../utils/generatePolygonGeometry.js";
|
|
36
51
|
import "earcut";
|
|
37
52
|
const D = () => !1;
|
|
38
|
-
class
|
|
39
|
-
constructor(
|
|
40
|
-
super(
|
|
53
|
+
class bt extends T {
|
|
54
|
+
constructor(t) {
|
|
55
|
+
super(t);
|
|
41
56
|
s(this, "type", "watch");
|
|
42
57
|
s(this, "deleteDom");
|
|
43
58
|
s(this, "choose");
|
|
@@ -47,48 +62,48 @@ class ve extends T {
|
|
|
47
62
|
s(this, "fiveElement");
|
|
48
63
|
s(this, "editPointState");
|
|
49
64
|
s(this, "hammer");
|
|
50
|
-
s(this, "onPanStart", (
|
|
65
|
+
s(this, "onPanStart", (t) => {
|
|
51
66
|
var a;
|
|
52
67
|
if (this.model.getAllLines().length === 0 || !this.fiveElement)
|
|
53
68
|
return;
|
|
54
|
-
const i = C(
|
|
55
|
-
if (!
|
|
69
|
+
const i = C(t).point, e = (a = M(this.five, this.model.getAllPoints(), i, 20)) == null ? void 0 : a.point;
|
|
70
|
+
if (!e) {
|
|
56
71
|
this.editPointState = void 0;
|
|
57
72
|
return;
|
|
58
73
|
}
|
|
59
74
|
const n = {
|
|
60
|
-
point:
|
|
61
|
-
associatedLines: w(
|
|
75
|
+
point: e,
|
|
76
|
+
associatedLines: w(e.lines[0])
|
|
62
77
|
};
|
|
63
78
|
this.hook.emit("wantsDragLine", {
|
|
64
|
-
point:
|
|
79
|
+
point: e.id,
|
|
65
80
|
lines: n.associatedLines.map(({ id: d }) => d)
|
|
66
81
|
}) || (this.editPointState = n, this.magnifier.appendTo(this.container), this.magnifier.enable(), this.group.add(this.mouseGroup));
|
|
67
82
|
});
|
|
68
83
|
s(this, "onPanEnd", () => {
|
|
69
|
-
this.editPointState && (this.editPointState.point.lines.forEach((
|
|
84
|
+
this.editPointState && (this.editPointState.point.lines.forEach((t) => t.mesh.setMaterial({ dashed: !1 })), this.highlightLines(this.editPointState.associatedLines), this.editPointState = void 0, this.magnifier.disable(), this.group.remove(this.mouseGroup));
|
|
70
85
|
});
|
|
71
|
-
s(this, "onPan", (
|
|
86
|
+
s(this, "onPan", (t) => {
|
|
72
87
|
if (!this.editPointState || !this.fiveElement)
|
|
73
88
|
return;
|
|
74
|
-
const i = C(
|
|
75
|
-
|
|
76
|
-
const [n] = this.five.model.intersectRaycaster(
|
|
89
|
+
const i = C(t).ndcPoint, e = new U();
|
|
90
|
+
e.setFromCamera(i, this.five.camera);
|
|
91
|
+
const [n] = this.five.model.intersectRaycaster(e);
|
|
77
92
|
n && this.onIntersectionUpdate(n);
|
|
78
93
|
});
|
|
79
|
-
s(this, "onIntersectionUpdate", (
|
|
94
|
+
s(this, "onIntersectionUpdate", (t, i) => {
|
|
80
95
|
if (this.editPointState) {
|
|
81
|
-
if (this.clearHighlightLines(), this.editPointState.point.position.copy(
|
|
82
|
-
|
|
83
|
-
}), this.updateDistanceUI(), this.magnifier.renderWithPoint(
|
|
96
|
+
if (this.clearHighlightLines(), this.editPointState.point.position.copy(t.point), this.editPointState.point.lines.forEach((e) => {
|
|
97
|
+
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
|
+
}), this.updateDistanceUI(), this.magnifier.renderWithPoint(t.point), this.mouseGroup.position.copy(t.point), i)
|
|
84
99
|
this.mouseGroup.quaternion.copy(i.quaternion);
|
|
85
|
-
else if (
|
|
86
|
-
const n =
|
|
100
|
+
else if (t.face) {
|
|
101
|
+
const n = t.face.normal.clone().multiplyScalar(0.05), a = t.point.clone().add(n).clone().add(n);
|
|
87
102
|
this.mouseGroup.lookAt(a);
|
|
88
103
|
}
|
|
89
104
|
this.five.needsRender = !0, this.hook.emit(
|
|
90
105
|
"selectedChange",
|
|
91
|
-
this.editPointState.associatedLines.map((
|
|
106
|
+
this.editPointState.associatedLines.map((e) => e)
|
|
92
107
|
);
|
|
93
108
|
}
|
|
94
109
|
});
|
|
@@ -96,17 +111,17 @@ class ve extends T {
|
|
|
96
111
|
if (this.editPointState)
|
|
97
112
|
return !1;
|
|
98
113
|
});
|
|
99
|
-
s(this, "wantsTapGesture", (
|
|
114
|
+
s(this, "wantsTapGesture", (t) => {
|
|
100
115
|
var A;
|
|
101
|
-
const i = this.model.areas.map((o) =>
|
|
102
|
-
if (
|
|
103
|
-
const o = this.model.areas.find((h) => h.polygon ===
|
|
116
|
+
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 x) {
|
|
118
|
+
const o = this.model.areas.find((h) => h.polygon === e);
|
|
104
119
|
if (o) {
|
|
105
120
|
const { x: h, y: f } = i[0].point.clone().project(this.five.camera), p = `${(h + 1) / 2 * 100}%`, m = `${(-f + 1) / 2 * 100}%`;
|
|
106
121
|
return this.chooseArea(o, { left: p, top: m }), !1;
|
|
107
122
|
}
|
|
108
123
|
}
|
|
109
|
-
const [n] = this.five.model.intersectRaycaster(
|
|
124
|
+
const [n] = this.five.model.intersectRaycaster(t);
|
|
110
125
|
if (!n)
|
|
111
126
|
return;
|
|
112
127
|
const l = this.five.camera, a = n.point.clone().project(l), d = this.container.clientWidth, g = this.container.clientHeight, L = new u(a.x * d, a.y * g), P = this.model.getAllLines().map((o) => {
|
|
@@ -128,19 +143,19 @@ class ve extends T {
|
|
|
128
143
|
if (y)
|
|
129
144
|
return this.chooseLine(y), !1;
|
|
130
145
|
});
|
|
131
|
-
s(this, "chooseLine", (
|
|
146
|
+
s(this, "chooseLine", (t) => {
|
|
132
147
|
this.choose = "line";
|
|
133
|
-
const i = w(
|
|
148
|
+
const i = w(t);
|
|
134
149
|
this.deleteDom.setLines(i).updatePosition().show(), this.highlightLines(i), this.five.needsRender = !0, this.hook.emit(
|
|
135
150
|
"selectedChange",
|
|
136
|
-
i.map((
|
|
151
|
+
i.map((e) => e)
|
|
137
152
|
);
|
|
138
153
|
});
|
|
139
|
-
s(this, "chooseArea", (
|
|
140
|
-
this.choose =
|
|
154
|
+
s(this, "chooseArea", (t, i) => {
|
|
155
|
+
this.choose = t, this.deleteDom.updatePosition(i.left, `calc(${i.top} - 20px)`).show(), this.highlightArea(t);
|
|
141
156
|
});
|
|
142
|
-
s(this, "polylineRemoved", (
|
|
143
|
-
|
|
157
|
+
s(this, "polylineRemoved", (t) => {
|
|
158
|
+
t.lines.forEach((i) => this.removeLine(i)), this.hook.emit(
|
|
144
159
|
"selectedChange",
|
|
145
160
|
this.model.getAllLines().filter((i) => i.selected).map((i) => i)
|
|
146
161
|
);
|
|
@@ -148,11 +163,11 @@ class ve extends T {
|
|
|
148
163
|
s(this, "onCameraUpdate", () => {
|
|
149
164
|
this.updateDistanceUI(), this.highlightedLines.length > 0 && this.deleteDom.updatePosition();
|
|
150
165
|
});
|
|
151
|
-
s(this, "deleteArea", (
|
|
152
|
-
this.unHighlightArea(
|
|
166
|
+
s(this, "deleteArea", (t) => {
|
|
167
|
+
this.unHighlightArea(t), t.dispose(), this.deleteDom.hide();
|
|
153
168
|
});
|
|
154
169
|
s(this, "deleteLine", () => {
|
|
155
|
-
const
|
|
170
|
+
const t = this.highlightedLines[0], i = this.model.getPolylineByLine(t);
|
|
156
171
|
i && (this.model.removePolyline(i), this.highlightedLines = [], this.deleteDom.setLines([]).hide());
|
|
157
172
|
});
|
|
158
173
|
s(this, "cancelDeleteClickCallback", () => {
|
|
@@ -164,49 +179,49 @@ class ve extends T {
|
|
|
164
179
|
this.choose === "line" ? this.deleteLine() : this.choose instanceof j && this.deleteArea(this.choose);
|
|
165
180
|
},
|
|
166
181
|
cancel: this.cancelDeleteClickCallback
|
|
167
|
-
}).appendTo(this.container), this.model.getAllLines().forEach((
|
|
168
|
-
|
|
169
|
-
}), this.model.getAllAreas().forEach((
|
|
170
|
-
|
|
182
|
+
}).appendTo(this.container), this.model.getAllLines().forEach((e) => {
|
|
183
|
+
e.distanceItem.appendTo(this.container), e.distanceItem.update(this.five), e.hook.on("selected", this.chooseLine), e.distanceItem.setCanSelect(!0), this.group.add(e.mesh);
|
|
184
|
+
}), this.model.getAllAreas().forEach((e) => {
|
|
185
|
+
e.areaItem.appendTo(this.container), e.areaItem.updateArea(this.five), e.hook.on("selected", this.chooseArea), e.areaItem.setCanSelect(!0), this.group.add(e.polygon), e.polyline.lines.forEach((n) => {
|
|
171
186
|
n.distanceItem.appendTo(this.container), n.distanceItem.update(this.five), this.group.add(n.mesh);
|
|
172
187
|
});
|
|
173
188
|
});
|
|
174
189
|
const i = this.five.getElement();
|
|
175
190
|
if (i) {
|
|
176
191
|
this.fiveElement = i;
|
|
177
|
-
const
|
|
178
|
-
this.hammer =
|
|
192
|
+
const e = new R(i);
|
|
193
|
+
this.hammer = e, e.on("pan", this.onPan), e.on("panstart", this.onPanStart), e.on("panend", this.onPanEnd);
|
|
179
194
|
}
|
|
180
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", D), this.model.hook.on("polylineRemoved", this.polylineRemoved);
|
|
181
196
|
}
|
|
182
197
|
dispose() {
|
|
183
|
-
var
|
|
184
|
-
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", D), this.five.needsRender = !0, this.hook.emit("selectedChange", []), (
|
|
198
|
+
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", D), this.five.needsRender = !0, this.hook.emit("selectedChange", []), (t = this.hammer) == null || t.destroy();
|
|
185
200
|
}
|
|
186
|
-
highlightLine(
|
|
187
|
-
|
|
201
|
+
highlightLine(t) {
|
|
202
|
+
t.selected || (t.selected = !0, this.group.add(t.lightMesh), t.distanceItem.highlight(), this.five.needsRender = !0);
|
|
188
203
|
}
|
|
189
204
|
clearHighlightLines() {
|
|
190
205
|
this.group.children.length !== 0 && (this.unHighlightLines(this.highlightedLines), this.highlightedLines = []);
|
|
191
206
|
}
|
|
192
|
-
highlightArea(
|
|
193
|
-
this.unHighlightLines(), this.unHighlightArea(), this.highlightLines(
|
|
207
|
+
highlightArea(t) {
|
|
208
|
+
this.unHighlightLines(), this.unHighlightArea(), this.highlightLines(t.polyline.lines), this.five.needsRender = !0;
|
|
194
209
|
}
|
|
195
|
-
unHighlightArea(
|
|
196
|
-
const i =
|
|
210
|
+
unHighlightArea(t) {
|
|
211
|
+
const i = t != null ? t : this.highlightedArea;
|
|
197
212
|
i && (this.unHighlightLines(i.polyline.lines), this.five.needsRender = !0);
|
|
198
213
|
}
|
|
199
|
-
highlightLines(
|
|
200
|
-
this.unHighlightLines(), this.highlightedLines =
|
|
214
|
+
highlightLines(t) {
|
|
215
|
+
this.unHighlightLines(), this.highlightedLines = t, t.forEach((i) => this.highlightLine(i));
|
|
201
216
|
}
|
|
202
|
-
unHighlightLines(
|
|
217
|
+
unHighlightLines(t) {
|
|
203
218
|
this.unHighlightArea();
|
|
204
|
-
const i =
|
|
205
|
-
i && i.forEach((
|
|
206
|
-
|
|
219
|
+
const i = t != null ? t : this.highlightedLines;
|
|
220
|
+
i && i.forEach((e) => {
|
|
221
|
+
e.selected = !1, e.distanceItem.unHighlight(), this.group.remove(e.lightMesh), this.five.needsRender = !0;
|
|
207
222
|
});
|
|
208
223
|
}
|
|
209
224
|
}
|
|
210
225
|
export {
|
|
211
|
-
|
|
226
|
+
bt as default
|
|
212
227
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
2
|
var w = Object.getOwnPropertySymbols;
|
|
3
3
|
var T = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var c = (s, t, e) => t in s ?
|
|
4
|
+
var c = (s, t, e) => t in s ? b(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, a = (s, t) => {
|
|
5
5
|
for (var e in t || (t = {}))
|
|
6
6
|
T.call(t, e) && c(s, e, t[e]);
|
|
7
7
|
if (w)
|
|
@@ -14,20 +14,20 @@ import m from "./EditController.js";
|
|
|
14
14
|
import P from "./ViewController.js";
|
|
15
15
|
import v from "./WatchController.js";
|
|
16
16
|
import h from "./MixedController.js";
|
|
17
|
-
import { omit as
|
|
18
|
-
import { Group as
|
|
19
|
-
import { Model as
|
|
17
|
+
import { omit as U } from "../../shared-utils/filter.js";
|
|
18
|
+
import { Group as k } from "three";
|
|
19
|
+
import { Model as D } 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";
|
|
23
23
|
import { GuideController as L } from "../Modules/GuideController.js";
|
|
24
24
|
import { ShortcutKeyController as O } from "./ShortcutKeyController.js";
|
|
25
|
-
import { safeObj as
|
|
26
|
-
import { Magnifier as
|
|
25
|
+
import { safeObj as I } from "../../shared-utils/safeObj.js";
|
|
26
|
+
import { Magnifier as A } from "../../shared-utils/three/Magnifier.js";
|
|
27
27
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
28
28
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
29
29
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
30
|
-
import { isTouchDevice as
|
|
30
|
+
import { isTouchDevice as B } from "../../shared-utils/isTouchDevice.js";
|
|
31
31
|
import "../Model/line.js";
|
|
32
32
|
import "../../shared-utils/uuid.js";
|
|
33
33
|
import "../utils/line.js";
|
|
@@ -50,13 +50,14 @@ import "../utils/generatePolygonGeometry.js";
|
|
|
50
50
|
import "earcut";
|
|
51
51
|
import "../utils/dom/areaDom.js";
|
|
52
52
|
import "../utils/geometryUtil.js";
|
|
53
|
+
import "hammerjs";
|
|
54
|
+
import "../../shared-utils/isNil.js";
|
|
53
55
|
import "../utils/isIntersecting.js";
|
|
54
56
|
import "../../shared-utils/three/PointSelector.js";
|
|
55
57
|
import "../../shared-utils/three/PointSelectorHelper.js";
|
|
56
58
|
import "../../shared-utils/three/PointHelper.js";
|
|
57
59
|
import "../../shared-utils/three/Assets/index.js";
|
|
58
60
|
import "../../shared-utils/three/PointDomHelper.js";
|
|
59
|
-
import "hammerjs";
|
|
60
61
|
import "../Modules/rangePiece/html.js";
|
|
61
62
|
import "../../CSS3DRenderPlugin/index.js";
|
|
62
63
|
import "../../CSS3DRenderPlugin/Controller.js";
|
|
@@ -119,7 +120,7 @@ import "../../vendor/svelte/src/runtime/transition/index.js";
|
|
|
119
120
|
import "../../vendor/svelte/src/runtime/easing/index.js";
|
|
120
121
|
import "../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
121
122
|
import "../Components/Tip.js";
|
|
122
|
-
class
|
|
123
|
+
class He {
|
|
123
124
|
constructor(t, e) {
|
|
124
125
|
i(this, "hasOpen", !1);
|
|
125
126
|
i(this, "hook", new x());
|
|
@@ -174,8 +175,8 @@ class Ke {
|
|
|
174
175
|
this.currentMeasureType = t, this.hook.emit("measureTypeChange", t);
|
|
175
176
|
});
|
|
176
177
|
var l, n, u, d, f, g, y, M, C;
|
|
177
|
-
this.five = t, this.params = e, this.config =
|
|
178
|
-
const r = (M = (y = e.editParams) == null ? void 0 : y.pointSelectorMode) != null ? M :
|
|
178
|
+
this.five = t, this.params = e, this.config = U(e, ["openParams", "magnifierParams"]), this.model = new D(this.config), this.isMobile = (n = (l = e == null ? void 0 : e.openParams) == null ? void 0 : l.isMobile) != null ? n : !1, this.magnifier = new A(t, (u = e.magnifierParams) != null ? u : { width: 190, height: 190, scale: 2 }), this.allowMeasureType = Array.from(new Set((f = (d = e.editParams) == null ? void 0 : d.allowMeasureType) != null ? f : ["line"])), this.currentMeasureType = (g = this.allowMeasureType[0]) != null ? g : "line", this.group = new k(), 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";
|
|
179
|
+
const r = (M = (y = e.editParams) == null ? void 0 : y.pointSelectorMode) != null ? M : B ? "fixed" : "cursor", o = (C = this.params.openParams) != null ? C : {};
|
|
179
180
|
if (this.params.useUIController !== !1) {
|
|
180
181
|
const p = a({
|
|
181
182
|
container: this.container,
|
|
@@ -183,7 +184,7 @@ class Ke {
|
|
|
183
184
|
i18n: e.i18n,
|
|
184
185
|
pointSelectorMode: r,
|
|
185
186
|
useNewUI: this.allowMeasureType.length > 1
|
|
186
|
-
},
|
|
187
|
+
}, I(this.params.useUIController));
|
|
187
188
|
this.useUIController = new S(this, p);
|
|
188
189
|
}
|
|
189
190
|
if (this.params.useGuideController !== !1) {
|
|
@@ -191,7 +192,7 @@ class Ke {
|
|
|
191
192
|
container: this.container,
|
|
192
193
|
pointSelectorMode: r,
|
|
193
194
|
i18n: e.i18n
|
|
194
|
-
},
|
|
195
|
+
}, I(this.params.useGuideController));
|
|
195
196
|
this.useGuideController = new L(this, p);
|
|
196
197
|
}
|
|
197
198
|
}
|
|
@@ -291,8 +292,8 @@ class Ke {
|
|
|
291
292
|
changeIsMobile(t) {
|
|
292
293
|
}
|
|
293
294
|
changeConfigs(t) {
|
|
294
|
-
var e;
|
|
295
|
-
Object.assign(this.config, t), (e = this.controller) == null || e.updateDistanceUI();
|
|
295
|
+
var e, r;
|
|
296
|
+
Object.assign(this.config, t), (e = this.controller) == null || e.updateDistanceUI(), (r = this.controller) == null || r.updateAreaUI();
|
|
296
297
|
}
|
|
297
298
|
/** 设置线段的文本 */
|
|
298
299
|
setCustomText(t, e) {
|
|
@@ -323,5 +324,5 @@ class Ke {
|
|
|
323
324
|
}
|
|
324
325
|
}
|
|
325
326
|
export {
|
|
326
|
-
|
|
327
|
+
He as default
|
|
327
328
|
};
|
|
@@ -22,6 +22,7 @@ export default class Area {
|
|
|
22
22
|
readonly lightMesh: FiveLine;
|
|
23
23
|
readonly areaItem: AreaItem;
|
|
24
24
|
readonly hook: Subscribe<AreaHook>;
|
|
25
|
+
model?: Model;
|
|
25
26
|
/**
|
|
26
27
|
* @description: 多边形的端点是否闭合
|
|
27
28
|
*/
|
|
@@ -39,7 +40,6 @@ export default class Area {
|
|
|
39
40
|
/** 多边形dom容器 */
|
|
40
41
|
private domContainer;
|
|
41
42
|
private five;
|
|
42
|
-
private model?;
|
|
43
43
|
constructor(points: THREE.Vector3[] | undefined, config: {
|
|
44
44
|
/** @todo: 这个model整的真的太恶心了 */
|
|
45
45
|
model: Model;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var m = Object.defineProperty;
|
|
2
|
-
var d = (
|
|
3
|
-
var
|
|
4
|
-
import * as
|
|
2
|
+
var d = (o, t, e) => t in o ? m(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
+
var i = (o, t, e) => (d(o, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import * as r from "three";
|
|
5
5
|
import { uuid as f } from "../../shared-utils/uuid.js";
|
|
6
6
|
import { Subscribe as c } from "@realsee/five";
|
|
7
7
|
import u from "./line.js";
|
|
8
8
|
import v from "./polygon.js";
|
|
9
9
|
import { Polyline as y } from "./polyline.js";
|
|
10
|
-
import
|
|
10
|
+
import a from "./point.js";
|
|
11
11
|
import { AreaItem as C } from "../utils/dom/areaDom.js";
|
|
12
12
|
import "../utils/line.js";
|
|
13
13
|
import "@realsee/five/line";
|
|
@@ -21,43 +21,59 @@ import "../utils/generatePolygonGeometry.js";
|
|
|
21
21
|
import "earcut";
|
|
22
22
|
import "../../shared-utils/removeArrayItem.js";
|
|
23
23
|
import "../utils/geometryUtil.js";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
import "hammerjs";
|
|
25
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
26
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
27
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
28
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
29
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
30
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
31
|
+
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
32
|
+
import "../../shared-utils/Subscribe.js";
|
|
33
|
+
import "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
34
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
35
|
+
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
36
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
37
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
38
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
39
|
+
import "../../shared-utils/isNil.js";
|
|
40
|
+
class it {
|
|
41
|
+
constructor(t, e) {
|
|
42
|
+
i(this, "id", f());
|
|
43
|
+
i(this, "selected", !1);
|
|
44
|
+
i(this, "text");
|
|
45
|
+
i(this, "type", "area");
|
|
46
|
+
i(this, "lightMesh");
|
|
47
|
+
i(this, "areaItem");
|
|
48
|
+
i(this, "hook", new c());
|
|
49
|
+
i(this, "model");
|
|
33
50
|
/** 多边形mesh */
|
|
34
|
-
|
|
51
|
+
i(this, "polygon");
|
|
35
52
|
/** 多边形顶点 */
|
|
36
|
-
|
|
53
|
+
i(this, "points", []);
|
|
37
54
|
/** 多边形前三个点组成的平面,用来使得后面加的点也落在这个平面上 */
|
|
38
|
-
|
|
55
|
+
i(this, "planeHelper");
|
|
39
56
|
/** 多边形边框 */
|
|
40
|
-
|
|
57
|
+
i(this, "polyline");
|
|
41
58
|
/** 多边形mesh容器 */
|
|
42
|
-
|
|
59
|
+
i(this, "meshContainer");
|
|
43
60
|
/** 多边形dom容器 */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
e(this, "model");
|
|
61
|
+
i(this, "domContainer");
|
|
62
|
+
i(this, "five");
|
|
47
63
|
/**
|
|
48
64
|
* @description: five camera update 时,更新Dom的位置
|
|
49
65
|
*/
|
|
50
|
-
|
|
66
|
+
i(this, "updateDom", () => {
|
|
51
67
|
this.five && (this.polyline.lines.forEach((t) => t.distanceItem.update(this.five)), this.areaItem.updateDomPosition(this.five));
|
|
52
68
|
});
|
|
53
69
|
var n;
|
|
54
|
-
t && (this.points = t), this.model =
|
|
70
|
+
t && (this.points = t), this.model = e.model, this.polygon = new v(t), this.polyline = new y({ model: e.model }), this.areaItem = new C({
|
|
55
71
|
area: this,
|
|
56
|
-
clickCallback: (
|
|
57
|
-
const
|
|
58
|
-
this.hook.emit("selected", this, { left:
|
|
72
|
+
clickCallback: (p, s) => {
|
|
73
|
+
const h = p.clientX + "px", l = p.clientY + "px";
|
|
74
|
+
this.hook.emit("selected", this, { left: h, top: l });
|
|
59
75
|
}
|
|
60
|
-
}), this.domContainer =
|
|
76
|
+
}), this.domContainer = e.domContainer || null, this.meshContainer = e.meshContainer || null, this.five = e.five || null, this.areaItem.appendTo(this.domContainer), (n = this.five) == null || n.on("cameraUpdate", this.updateDom);
|
|
61
77
|
}
|
|
62
78
|
/**
|
|
63
79
|
* @description: 多边形的端点是否闭合
|
|
@@ -67,14 +83,14 @@ class O {
|
|
|
67
83
|
return this.points.length >= 4 && ((t = this.points.at(0)) == null ? void 0 : t.equals(this.points.at(-1)));
|
|
68
84
|
}
|
|
69
85
|
addPoints(t) {
|
|
70
|
-
var
|
|
86
|
+
var p;
|
|
71
87
|
this.points = this.points.concat(t);
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
74
|
-
const
|
|
75
|
-
this.polyline.addLine(
|
|
88
|
+
const e = this.points.at(-2), n = this.points.at(-1);
|
|
89
|
+
if (e && n) {
|
|
90
|
+
const s = new u(new a(e), new a(n), this.polyline.model);
|
|
91
|
+
this.polyline.addLine(s), this.meshContainer.add(s.mesh), this.five && (s.distanceItem.setCanSelect(!1), s.distanceItem.appendTo(this.domContainer), s.distanceItem.update(this.five));
|
|
76
92
|
}
|
|
77
|
-
(
|
|
93
|
+
(p = this.meshContainer) != null && p.children.includes(this.polygon) || this.meshContainer.add(this.polygon), this.polygon.updatePoints(this.points), this.areaItem.updateArea(this.five), this.points.length === 3 ? this.planeHelper = new r.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.points.length < 3 && (this.planeHelper = null);
|
|
78
94
|
}
|
|
79
95
|
/**
|
|
80
96
|
* @description: 移除最后一个添加的点
|
|
@@ -100,7 +116,7 @@ class O {
|
|
|
100
116
|
* @description: 获取一个点投影在当前平面上的点
|
|
101
117
|
*/
|
|
102
118
|
projectPoint(t) {
|
|
103
|
-
return t && (this.planeHelper ? this.planeHelper.projectPoint(t, new
|
|
119
|
+
return t && (this.planeHelper ? this.planeHelper.projectPoint(t, new r.Vector3()) : t);
|
|
104
120
|
}
|
|
105
121
|
remove() {
|
|
106
122
|
this.polygon.removeFromParent(), this.areaItem.remove(), this.polyline.lines.forEach((t) => t.remove());
|
|
@@ -113,5 +129,5 @@ class O {
|
|
|
113
129
|
}
|
|
114
130
|
}
|
|
115
131
|
export {
|
|
116
|
-
|
|
132
|
+
it as default
|
|
117
133
|
};
|
|
@@ -48,18 +48,8 @@ import "../../utils/generatePolygonGeometry.js";
|
|
|
48
48
|
import "earcut";
|
|
49
49
|
import "../../utils/dom/areaDom.js";
|
|
50
50
|
import "../../utils/geometryUtil.js";
|
|
51
|
-
import "../../utils/isIntersecting.js";
|
|
52
|
-
import "../../../shared-utils/three/PointSelector.js";
|
|
53
|
-
import "../../../shared-utils/three/PointSelectorHelper.js";
|
|
54
|
-
import "../../../shared-utils/three/Magnifier.js";
|
|
55
51
|
import "hammerjs";
|
|
56
|
-
import "../../../shared-utils/three/PointHelper.js";
|
|
57
|
-
import "../../../shared-utils/three/Assets/index.js";
|
|
58
|
-
import "../../../shared-utils/three/PointDomHelper.js";
|
|
59
52
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
60
|
-
import "../rangePiece/html.js";
|
|
61
|
-
import "../../../CSS3DRenderPlugin/index.js";
|
|
62
|
-
import "../../../CSS3DRenderPlugin/Controller.js";
|
|
63
53
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
64
54
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
65
55
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
@@ -72,8 +62,19 @@ import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
|
72
62
|
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
73
63
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
74
64
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
75
|
-
import "../../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
76
65
|
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
66
|
+
import "../../../shared-utils/isNil.js";
|
|
67
|
+
import "../../utils/isIntersecting.js";
|
|
68
|
+
import "../../../shared-utils/three/PointSelector.js";
|
|
69
|
+
import "../../../shared-utils/three/PointSelectorHelper.js";
|
|
70
|
+
import "../../../shared-utils/three/Magnifier.js";
|
|
71
|
+
import "../../../shared-utils/three/PointHelper.js";
|
|
72
|
+
import "../../../shared-utils/three/Assets/index.js";
|
|
73
|
+
import "../../../shared-utils/three/PointDomHelper.js";
|
|
74
|
+
import "../rangePiece/html.js";
|
|
75
|
+
import "../../../CSS3DRenderPlugin/index.js";
|
|
76
|
+
import "../../../CSS3DRenderPlugin/Controller.js";
|
|
77
|
+
import "../../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
|
|
77
78
|
import "../../../shared-utils/absoluteUrl.js";
|
|
78
79
|
import "../../../shared-utils/animationFrame/BetterTween.js";
|
|
79
80
|
import "../../../shared-utils/animationFrame/index.js";
|
|
@@ -92,7 +93,7 @@ import "../../Components/Common/Switcher1.js";
|
|
|
92
93
|
import "../../Components/Common/CircleButton.js";
|
|
93
94
|
import "../../../vendor/svelte/src/runtime/transition/index.js";
|
|
94
95
|
import "../../../vendor/svelte/src/runtime/easing/index.js";
|
|
95
|
-
class
|
|
96
|
+
class ao {
|
|
96
97
|
constructor(o, t) {
|
|
97
98
|
i(this, "revoke");
|
|
98
99
|
i(this, "container");
|
|
@@ -146,5 +147,5 @@ class co {
|
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
+
ao as UIController
|
|
150
151
|
};
|