@realsee/dnalogel 2.1.0 → 2.1.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.js +242 -569
- package/dist/index.cjs.js +58 -73
- package/dist/index.es.js +7846 -12962
- package/dist/index.js +7846 -12962
- package/dist/index.umd.js +46 -61
- package/docs/assets/highlight.css +3 -3
- package/docs/assets/main.js +4 -2
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +462 -619
- package/docs/classes/CruisePluginController.html +397 -23
- package/docs/classes/Magnifier.html +187 -9
- package/docs/classes/ModelRoomLabelController.html +149 -11
- package/docs/classes/Object3DHelperController.html +356 -0
- package/docs/classes/PaintBrush.html +260 -0
- package/docs/classes/PanoTagPluginController.html +940 -0
- package/docs/classes/Util.BetterTween.html +134 -0
- package/docs/classes/Util.FivePointSelector.html +144 -0
- package/docs/classes/Util.Interval.html +158 -0
- package/docs/classes/Util.Magnifier.html +196 -0
- package/docs/classes/Util.PointDomHelper.html +135 -0
- package/docs/classes/Util.PointHelper.html +127 -0
- package/docs/classes/Util.Rectangle.html +181 -0
- package/docs/enums/CameraMovementEffect.html +70 -3
- package/docs/enums/ContentType.html +116 -0
- package/docs/enums/DIRECTION.html +81 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +81 -1
- package/docs/enums/DimensionType.html +67 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +74 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +81 -1
- package/docs/enums/LinkType.html +67 -0
- package/docs/enums/PaintBrushTypeEnum.html +74 -0
- package/docs/enums/PointType.html +67 -0
- package/docs/enums/Rotation.html +77 -3
- package/docs/functions/CSS3DRenderPlugin.html +233 -0
- package/docs/functions/CameraMovementPlugin.html +237 -0
- package/docs/functions/CruisePlugin.html +233 -0
- package/docs/functions/GuideLinePlugin.html +235 -0
- package/docs/functions/ItemLabelPlugin.html +235 -0
- package/docs/functions/MapviewFloorplanPlugin.html +235 -0
- package/docs/functions/ModelChassisCompassPlugin.html +237 -0
- package/docs/functions/ModelEntryDoorGuidePlugin.html +237 -0
- package/docs/functions/ModelFloorplanPlugin.html +235 -0
- package/docs/functions/ModelItemLabelPlugin.html +235 -0
- package/docs/functions/ModelRoomLabelPlugin.html +233 -0
- package/docs/functions/ModelTVVideoPlugin.html +235 -0
- package/docs/functions/ModelViewPlugin.html +237 -0
- package/docs/functions/Object3DHelperPlugin.html +233 -0
- package/docs/functions/PanoCompassPlugin.html +235 -0
- package/docs/functions/PanoCursorRaycasterPlugin.html +238 -0
- package/docs/functions/PanoDoorLabelPlugin.html +235 -0
- package/docs/functions/PanoFloorplanRadarPlugin.html +235 -0
- package/docs/functions/PanoMeasurePlugin.html +235 -0
- package/docs/functions/PanoRulerPlugin.html +237 -0
- package/docs/functions/PanoRulerProPlugin.html +237 -0
- package/docs/functions/PanoSpatialTagPlugin.html +237 -0
- package/docs/functions/PanoTagPlugin.html +249 -0
- package/docs/functions/TopviewFloorplanPlugin.html +235 -0
- package/docs/functions/Util.getCoordsFromClient.html +78 -0
- package/docs/functions/Util.getCoordsFromElement.html +78 -0
- package/docs/functions/Util.getFrameTime.html +70 -0
- package/docs/functions/Util.getIntersectFromRelativePosition.html +78 -0
- package/docs/functions/Util.getRaycasterFromFivePointer.html +78 -0
- package/docs/functions/Util.isNil.html +79 -0
- package/docs/functions/Util.nextFrame.html +73 -0
- package/docs/functions/Util.notNil.html +78 -0
- package/docs/functions/Util.requestAnimationFrameInterval.html +98 -0
- package/docs/functions/Util.tweenProgress.html +84 -0
- package/docs/functions/pluginFlag.html +233 -0
- package/docs/index.html +220 -2
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +205 -0
- package/docs/interfaces/CSS3DRenderPluginState.html +85 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +111 -17
- package/docs/interfaces/ContentTypeMap.html +212 -0
- package/docs/interfaces/FloorplanBounding.html +89 -10
- package/docs/interfaces/FloorplanData.html +95 -3
- package/docs/interfaces/FloorplanEntrance.html +114 -15
- package/docs/interfaces/FloorplanExtraObject.html +108 -7
- package/docs/interfaces/FloorplanExtraObject3D.html +99 -3
- package/docs/interfaces/FloorplanFloorData.html +88 -3
- package/docs/interfaces/FloorplanImagePosition.html +74 -3
- package/docs/interfaces/FloorplanObserver.html +92 -5
- package/docs/interfaces/FloorplanOutlineItem.html +88 -3
- package/docs/interfaces/FloorplanPosition.html +74 -3
- package/docs/interfaces/FloorplanRoomItem.html +134 -17
- package/docs/interfaces/FloorplanRoomLabelItem.html +78 -7
- package/docs/interfaces/FloorplanServerBounding.html +89 -10
- package/docs/interfaces/FloorplanServerComputedData.html +92 -1
- package/docs/interfaces/FloorplanServerData.html +74 -3
- package/docs/interfaces/FloorplanServerDoorItem.html +92 -1
- package/docs/interfaces/FloorplanServerDoorPosition.html +78 -1
- package/docs/interfaces/FloorplanServerEntrance.html +114 -15
- package/docs/interfaces/FloorplanServerFloorData.html +88 -3
- package/docs/interfaces/FloorplanServerImagePosition.html +74 -3
- package/docs/interfaces/FloorplanServerObserver.html +92 -5
- package/docs/interfaces/FloorplanServerOutlineItem.html +88 -3
- package/docs/interfaces/FloorplanServerPosition.html +74 -3
- package/docs/interfaces/FloorplanServerRoomItem.html +145 -20
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +78 -7
- package/docs/interfaces/ItemLabelPluginData.html +64 -1
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +149 -1
- package/docs/interfaces/ItemLabelPluginParametersType.html +85 -1
- package/docs/interfaces/LineJson.html +71 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +71 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +107 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +71 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +78 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +115 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +64 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +149 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +71 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +64 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +85 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +109 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +64 -1
- package/docs/interfaces/ModelViewPluginExportType.html +129 -1
- package/docs/interfaces/Object3DHelperState.html +78 -0
- package/docs/interfaces/OpenParameter.html +74 -3
- package/docs/interfaces/PaintBrushAction.html +118 -0
- package/docs/interfaces/PaintBrushConfigs.html +122 -0
- package/docs/interfaces/PaintBrushState.html +99 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +186 -11
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +227 -1
- package/docs/interfaces/PanoMeasureParameterType.html +128 -5
- package/docs/interfaces/PanoRulerPluginExportType.html +138 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +87 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +78 -1
- package/docs/interfaces/PanoRulerProPluginExportType.html +114 -1
- package/docs/interfaces/PanoRulerProPluginOptions.html +84 -1
- package/docs/interfaces/PanoRulerProPluginParameterType.html +71 -1
- package/docs/interfaces/PanoRulerProPluginState.html +78 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +241 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +230 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +114 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +96 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +192 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +92 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +113 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +99 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +92 -1
- package/docs/interfaces/Point.html +78 -1
- package/docs/interfaces/PointJson.html +78 -1
- package/docs/interfaces/Room.html +85 -1
- package/docs/interfaces/RoomInfo.html +71 -1
- package/docs/interfaces/RoomLabel.html +141 -13
- package/docs/interfaces/RoomRules.html +230 -1
- package/docs/interfaces/Rooms.html +230 -1
- package/docs/interfaces/Scissor.html +100 -0
- package/docs/interfaces/TagConfig.html +120 -0
- package/docs/interfaces/Tags.html +89 -0
- package/docs/interfaces/Util.MagnifierParameter.html +116 -0
- package/docs/interfaces/Util.MouseGroupParameter.html +79 -0
- package/docs/modules/Util.html +91 -0
- package/docs/modules.html +425 -36
- package/docs/types/ArrayPosition.html +224 -0
- package/docs/types/CSS3DRenderExportType.html +224 -0
- package/docs/types/CSS3DRenderPluginExportType.html +224 -0
- package/docs/types/CSS3DRenderPluginParameterType.html +224 -0
- package/docs/types/Color.html +224 -0
- package/docs/types/ContentTypeConfigKey.html +224 -0
- package/docs/types/ContentTypeConfigKeyArray.html +224 -0
- package/docs/types/Create3DDomContainerReturnType.html +224 -0
- package/docs/types/Create3DElementReturnType.html +224 -0
- package/docs/types/CruisePluginExportType.html +224 -0
- package/docs/types/Direction-1.html +224 -0
- package/docs/types/Direction4.html +224 -0
- package/docs/types/FloorplanRuleLabels.html +226 -0
- package/docs/types/FloorplanServerRuleLabels.html +224 -0
- package/docs/types/GuideLinePluginExportType.html +224 -0
- package/docs/types/HelperEventMap.html +314 -0
- package/docs/types/MapviewFloorplanPluginParameterType.html +224 -0
- package/docs/types/MapviewFloorplanPluginReturnType.html +224 -0
- package/docs/types/MediaData.html +224 -0
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +224 -0
- package/docs/types/ModelFloorplanPluginParameterType.html +224 -0
- package/docs/types/ModelFloorplanPluginReturnType.html +224 -0
- package/docs/types/ModelRoomLabelPluginParameters.html +224 -0
- package/docs/types/ModelRoomLabelPluginReturnType.html +224 -0
- package/docs/types/MoveArgs.html +226 -0
- package/docs/types/MoveOpts.html +226 -0
- package/docs/types/Object3DHelperEventMap.html +317 -0
- package/docs/types/ObjectFit.html +224 -0
- package/docs/types/PaintBrushEventMap.html +255 -0
- package/docs/types/PanoCompassPluginData.html +224 -0
- package/docs/types/PanoCompassPluginExportType.html +224 -0
- package/docs/types/PanoCompassPluginParameterType.html +224 -0
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +224 -0
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +224 -0
- package/docs/types/PanoMeasurePluginEvent.html +224 -0
- package/docs/types/PanoMeasureReturnType.html +224 -0
- package/docs/types/PanoSpatialTagPluginId.html +224 -0
- package/docs/types/PanoTagPluginExportInterface.html +224 -0
- package/docs/types/PanoTagPluginParamsInterface.html +224 -0
- package/docs/types/PlaneTag.html +233 -0
- package/docs/types/PointTag.html +235 -0
- package/docs/types/Position.html +224 -0
- package/docs/types/RotateArgs.html +226 -0
- package/docs/types/RotateOpts.html +226 -0
- package/docs/types/RuleLabelsKey.html +224 -0
- package/docs/types/RuleLabelsValue.html +224 -0
- package/docs/types/Tag.html +235 -0
- package/docs/types/Tag2D.html +233 -0
- package/docs/types/Tag3D.html +233 -0
- package/docs/types/TagId.html +224 -0
- package/docs/types/TopviewFloorplanPluginParameterType.html +224 -0
- package/docs/types/TopviewFloorplanPluginReturnType.html +224 -0
- package/docs/variables/FLOOR_TYPE_MAP.html +226 -0
- package/docs/variables/PLUGIN.html +224 -0
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +226 -0
- package/docs/variables/ROOM_TYPE_MAP.html +226 -0
- package/docs/variables/VERSION.html +224 -0
- package/docs/variables/itemLabelPluginServerParams.html +231 -0
- package/docs/variables/modelItemLabelPluginServerParams.html +231 -0
- package/docs/variables/modelRoomLabelPluginServerParams.html +231 -0
- package/libs/CSS3DRenderPlugin/CSS3DRender.d.ts +2 -2
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +150 -119
- package/libs/CSS3DRenderPlugin/Controller.d.ts +3 -3
- package/libs/CSS3DRenderPlugin/Controller.js +45 -42
- package/libs/CSS3DRenderPlugin/index.js +4 -12
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +71 -54
- package/libs/CruisePlugin/Controller.js +331 -287
- package/libs/CruisePlugin/index.js +6 -25
- package/libs/CruisePlugin/utils/coordinatesAngle.js +2 -3
- package/libs/CruisePlugin/utils/safeCall.js +21 -5
- package/libs/GuideLinePlugin/Controller.js +94 -62
- package/libs/GuideLinePlugin/index.js +4 -13
- package/libs/GuideLinePlugin/utils/getLineGeometries.js +49 -103
- package/libs/GuideLinePlugin/utils/polyline-normals.d.ts +3 -0
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +200 -183
- package/libs/ItemLabelPlugin/ItemLabelItem.js +27 -27
- package/libs/ItemLabelPlugin/Plugin.js +20 -29
- package/libs/ItemLabelPlugin/index.js +5 -18
- package/libs/ItemLabelPlugin/utils/parseData.js +15 -4
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +16 -6
- package/libs/ModelChassisCompassPlugin/Plugin.js +54 -38
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +58 -46
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +145 -129
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +18 -18
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +19 -24
- package/libs/ModelItemLabelPlugin/index.js +5 -14
- package/libs/ModelItemLabelPlugin/utils/parseData.js +16 -6
- package/libs/ModelRoomLabelPlugin/Controller.js +2 -6
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +22 -22
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +105 -94
- package/libs/ModelRoomLabelPlugin/index.js +4 -10
- package/libs/ModelTVVideoPlugin/Plugin.js +101 -94
- package/libs/ModelViewPlugin/Plugin.js +71 -60
- package/libs/Object3DHelperPlugin/Controller.d.ts +1 -1
- package/libs/Object3DHelperPlugin/Controller.js +79 -71
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.d.ts +1 -1
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +8 -11
- package/libs/Object3DHelperPlugin/index.js +8 -40
- package/libs/PanoCompassPlugin/Controller.js +91 -72
- package/libs/PanoCompassPlugin/index.js +4 -22
- package/libs/PanoCursorRaycasterPlugin/index.js +8 -9
- package/libs/PanoDoorLabelPlugin/BaseController.js +42 -33
- package/libs/PanoDoorLabelPlugin/Controller.js +84 -80
- package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +16 -16
- package/libs/PanoDoorLabelPlugin/index.d.ts +1 -1
- package/libs/PanoDoorLabelPlugin/index.js +3 -12
- package/libs/PanoDoorLabelPlugin/utils.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +14 -24
- package/libs/PanoMeasurePlugin/Controller/EditController.js +8 -20
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +15 -28
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +15 -26
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +28 -43
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.js +43 -70
- package/libs/PanoMeasurePlugin/Model/index.d.ts +4 -4
- package/libs/PanoMeasurePlugin/Model/index.js +38 -45
- package/libs/PanoMeasurePlugin/Model/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Model/line.js +10 -14
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +3 -3
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +16 -24
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +35 -28
- package/libs/PanoMeasurePlugin/index.js +6 -55
- package/libs/PanoMeasurePlugin/utils/constants.js +29 -16
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +4 -5
- package/libs/PanoRulerPlugin/Plugin.js +180 -157
- package/libs/PanoRulerProPlugin/Controller.js +70 -51
- package/libs/PanoRulerProPlugin/RulerItem.js +55 -45
- package/libs/PanoRulerProPlugin/RulerItems.js +124 -125
- package/libs/PanoRulerProPlugin/index.js +4 -15
- package/libs/PanoSpatialTagPlugin/Components/origins.js +24 -25
- package/libs/PanoSpatialTagPlugin/Components/tag.js +23 -23
- package/libs/PanoSpatialTagPlugin/Plugin.js +61 -72
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -1
- package/libs/PanoSpatialTagPlugin/store.js +1 -2
- package/libs/PanoTagPlugin/Components/Common/Arrow.js +47 -47
- package/libs/PanoTagPlugin/Components/Common/Audio.js +95 -92
- package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +48 -48
- package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +40 -41
- package/libs/PanoTagPlugin/Components/Common/Media.js +258 -3303
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +60 -60
- package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +96 -107
- package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +15 -16
- package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +22 -23
- package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +78 -82
- package/libs/PanoTagPlugin/Components/Common/Shadow.js +51 -52
- package/libs/PanoTagPlugin/Components/Common/Text.js +84 -937
- package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +58 -64
- package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +35 -34
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +101 -111
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +43 -45
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +123 -96
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +36 -44
- package/libs/PanoTagPlugin/Components/Tag/TextTag.js +71 -83
- package/libs/PanoTagPlugin/Components/Tag/index.js +130 -149
- package/libs/PanoTagPlugin/Components/TagContainer.js +69 -100
- package/libs/PanoTagPlugin/Components/TagWrapper.js +86 -116
- package/libs/PanoTagPlugin/controller/TagCacheController.js +2 -3
- package/libs/PanoTagPlugin/controller/TagComputer.d.ts +5 -5
- package/libs/PanoTagPlugin/controller/TagComputer.js +262 -13
- package/libs/PanoTagPlugin/controller/index.js +177 -186
- package/libs/PanoTagPlugin/index.js +7 -69
- package/libs/PanoTagPlugin/utils/checkRange.d.ts +1 -1
- package/libs/PanoTagPlugin/utils/resizeObserver.js +1 -1
- package/libs/PanoTagPlugin/utils/search.js +9 -27
- package/libs/base/BasePluginWithData.js +0 -1
- package/libs/components/PaintBrush/Controller.d.ts +2 -2
- package/libs/components/PaintBrush/Controller.js +3 -4
- package/libs/components/PaintBrush/index.js +2 -9
- package/libs/components/PaintBrush/tween.js +7 -11
- package/libs/components/PaintBrush/utils.d.ts +1 -1
- package/libs/env.d.ts +1 -0
- package/libs/floorplan/Components/BaseImage.js +29 -30
- package/libs/floorplan/Components/Camera.js +24 -24
- package/libs/floorplan/Components/Compass.js +36 -36
- package/libs/floorplan/Components/CurrentFloor.js +65 -74
- package/libs/floorplan/Components/Main.js +94 -112
- package/libs/floorplan/Components/Normalmage.js +21 -21
- package/libs/floorplan/Components/RoomHighlight/Room.js +20 -20
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +43 -44
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +60 -59
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +61 -61
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +136 -124
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +21 -21
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +20 -20
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +22 -22
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +68 -68
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +40 -40
- package/libs/floorplan/Components/SvgImage.js +19 -19
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +145 -146
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -47
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +187 -189
- package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -47
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +32 -31
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +56 -60
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +29 -29
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +75 -83
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +92 -74
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -24
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +181 -173
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -44
- package/libs/floorplan/utils/constant.js +1 -2
- package/libs/floorplan/utils/correctFiveState.js +48 -30
- package/libs/floorplan/utils/formatData.js +58 -36
- package/libs/index.js +90 -328
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/get-changed-params.js +29 -0
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/get-params.js +23 -0
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/mount-swiper.js +14 -0
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/params-list.js +120 -0
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/update-swiper.js +36 -0
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/utils.js +32 -0
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/svelte/swiper-slide.js +182 -0
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/svelte/swiper.js +254 -0
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +2 -5
- package/libs/shared-utils/Object3DHelper/Controller/CSS3DScaleController.js +5 -16
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +16 -24
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +15 -23
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +2 -10
- package/libs/shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js +27 -29
- package/libs/shared-utils/Object3DHelper/Helper/HTML/tipsDom.js +19 -9
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +4 -5
- package/libs/shared-utils/Object3DHelper/Helper/OutlineHelper.js +1 -102
- package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js +8 -14
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +2 -3
- package/libs/shared-utils/Object3DHelper/index.js +72 -43
- package/libs/shared-utils/Object3DHelper/utils/direction.js +14 -22
- package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.d.ts +34 -0
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.js +1 -1
- package/libs/shared-utils/Subscribe.js +1 -1
- package/libs/shared-utils/animationFrame/BetterTween.js +24 -4
- package/libs/shared-utils/animationFrame/calculateProgress.js +3 -9
- package/libs/shared-utils/animationFrame/formatRad.js +1 -3
- package/libs/shared-utils/animationFrame/index.js +19 -39
- package/libs/shared-utils/animationFrame/tween.js +17 -17
- package/libs/shared-utils/filter.js +6 -26
- package/libs/shared-utils/five/changeMode.js +34 -16
- package/libs/shared-utils/index.js +29 -43
- package/libs/shared-utils/math/planimetry.d.ts +5 -5
- package/libs/shared-utils/math/planimetry.js +34 -121
- package/libs/shared-utils/removeArrayItem.d.ts +1 -1
- package/libs/shared-utils/three/Assets/index.js +1 -2
- package/libs/shared-utils/three/FivePointSelector.d.ts +1 -1
- package/libs/shared-utils/three/FivePointSelector.js +12 -26
- package/libs/shared-utils/three/Magnifier.d.ts +2 -2
- package/libs/shared-utils/three/Magnifier.js +3 -3
- package/libs/shared-utils/three/PointDomHelper.js +27 -35
- package/libs/shared-utils/three/PointHelper.js +1 -1
- package/libs/shared-utils/three/getIntersect.d.ts +1 -1
- package/libs/shared-utils/three/getRaycaster.d.ts +1 -1
- package/libs/shared-utils/three/loadTexture.js +25 -7
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +18 -7
- package/libs/shared-utils/to.js +26 -8
- package/package.json +45 -28
- package/dist/style.css +0 -1
- package/docs/assets/icons.css +0 -1043
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/interfaces/CSS3DRenderPluginExportType.html +0 -4
- package/libs/CSS3DRenderPlugin/typing.js +0 -1
- package/libs/CSS3DRenderPlugin/utils/index.js +0 -13
- package/libs/CSS3DRenderPlugin/utils/random.js +0 -6
- package/libs/CameraMovementPlugin/index.js +0 -15
- package/libs/CruisePlugin/typing.js +0 -1
- package/libs/GuideLinePlugin/typing.js +0 -1
- package/libs/GuideLinePlugin/utils/getPoint.d.ts +0 -3
- package/libs/GuideLinePlugin/utils/getPoint.js +0 -18
- package/libs/GuideLinePlugin/utils/polyline-normals.d.js +0 -1
- package/libs/ItemLabelPlugin/events.type.js +0 -1
- package/libs/ModelChassisCompassPlugin/index.js +0 -10
- package/libs/ModelEntryDoorGuidePlugin/index.js +0 -11
- package/libs/ModelItemLabelPlugin/events.type.js +0 -1
- package/libs/ModelRoomLabelPlugin/typings.js +0 -1
- package/libs/ModelTVVideoPlugin/index.js +0 -19
- package/libs/ModelViewPlugin/index.js +0 -8
- package/libs/Object3DHelperPlugin/mocks/addObject3D.d.ts +0 -2
- package/libs/Object3DHelperPlugin/mocks/addObject3D.js +0 -1377
- package/libs/Object3DHelperPlugin/mocks/objects.d.ts +0 -7
- package/libs/Object3DHelperPlugin/mocks/objects.js +0 -47
- package/libs/Object3DHelperPlugin/typings.js +0 -1
- package/libs/PanoCompassPlugin/typings.js +0 -1
- package/libs/PanoDoorLabelPlugin/typings.js +0 -1
- package/libs/PanoMeasurePlugin/typings/data.js +0 -1
- package/libs/PanoMeasurePlugin/typings/event.type.js +0 -1
- package/libs/PanoMeasurePlugin/typings/index.js +0 -1
- package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +0 -1
- package/libs/PanoMeasurePlugin/typings/utils.type.js +0 -1
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +0 -2
- package/libs/PanoMeasurePlugin/utils/clearGroup.js +0 -6
- package/libs/PanoRulerPlugin/index.js +0 -11
- package/libs/PanoRulerPlugin/typings.js +0 -1
- package/libs/PanoRulerProPlugin/typings.js +0 -1
- package/libs/PanoSpatialTagPlugin/index.js +0 -24
- package/libs/PanoSpatialTagPlugin/typings.js +0 -1
- package/libs/PanoTagPlugin/Components/Common/TextItem.js +0 -106
- package/libs/PanoTagPlugin/typings/controller.js +0 -1
- package/libs/PanoTagPlugin/typings/index.js +0 -7
- package/libs/PanoTagPlugin/utils/index.js +0 -36
- package/libs/TagComputer.2bc444dc.js +0 -315
- package/libs/components/index.js +0 -13
- package/libs/floorplan/MapviewFloorplanPlugin/typing.js +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/typing.js +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +0 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +0 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -11
- package/libs/floorplan/TopviewFloorplanPlugin/typing.js +0 -1
- package/libs/floorplan/index.js +0 -67
- package/libs/floorplan/typings/floorplanData.js +0 -1
- package/libs/floorplan/typings/index.js +0 -1
- package/libs/floorplan/typings/utility.js +0 -1
- package/libs/hammer.b5b6115e.js +0 -882
- package/libs/index.164f1850.js +0 -641
- package/libs/index.6a0eead1.js +0 -12
- package/libs/index.ad783a2f.js +0 -31
- package/libs/index.dca207cb.js +0 -37
- package/libs/index.f2f85d71.js +0 -40
- package/libs/index.fd12d787.js +0 -34
- package/libs/shared-utils/Object3DHelper/Helper/index.js +0 -30
- package/libs/shared-utils/Object3DHelper/typings/Direction.js +0 -1
- package/libs/shared-utils/Object3DHelper/typings/Hooks.js +0 -1
- package/libs/shared-utils/Object3DHelper/typings/Scissor.js +0 -1
- package/libs/shared-utils/Object3DHelper/typings/index.js +0 -1
- package/libs/shared-utils/Object3DHelper/utils/filterNotColinearPoints.js +0 -18
- package/libs/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +0 -1
- package/libs/shared-utils/Object3DHelper/utils/finiteNumber.js +0 -6
- package/libs/shared-utils/Object3DHelper/utils/getPoint.js +0 -18
- package/libs/shared-utils/Object3DHelper/utils/index.js +0 -29
- package/libs/shared-utils/Object3DHelper/utils/negateScale.d.ts +0 -2
- package/libs/shared-utils/Object3DHelper/utils/negateScale.js +0 -7
- package/libs/shared-utils/Object3DHelper/utils/normalPositionToPositions.js +0 -13
- package/libs/shared-utils/Object3DHelper/utils/object3DBoundingPosition.js +0 -5
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.d.js +0 -4
- package/libs/shared-utils/Preloader.d.ts +0 -6
- package/libs/shared-utils/Preloader.js +0 -18
- package/libs/shared-utils/formatRad.d.ts +0 -7
- package/libs/shared-utils/formatRad.js +0 -7
- package/libs/shared-utils/getRandomColor.d.ts +0 -1
- package/libs/shared-utils/getRandomColor.js +0 -6
- package/libs/shared-utils/logger.d.ts +0 -16
- package/libs/shared-utils/logger.js +0 -27
- package/libs/shared-utils/math/evenNumber.d.ts +0 -3
- package/libs/shared-utils/math/evenNumber.js +0 -7
- package/libs/shared-utils/math/index.js +0 -6
- package/libs/shared-utils/px2rem.d.ts +0 -1
- package/libs/shared-utils/px2rem.js +0 -6
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +0 -6
- package/libs/shared-utils/three/getExtraModelLoader.js +0 -18
- package/libs/shared-utils/three/getNormal.d.ts +0 -2
- package/libs/shared-utils/three/getNormal.js +0 -7
- package/libs/shared-utils/three/getTextureLoader.d.ts +0 -6
- package/libs/shared-utils/three/getTextureLoader.js +0 -16
- package/libs/shared-utils/three/index.js +0 -33
- package/libs/shared-utils/three/loadFbxObj.d.ts +0 -2
- package/libs/shared-utils/three/loadFbxObj.js +0 -16
- package/libs/shared-utils/vectorTocoordinates.d.ts +0 -7
- package/libs/shared-utils/vectorTocoordinates.js +0 -10
- package/libs/style.css +0 -1
- package/libs/tween.esm.bad2b2b4.js +0 -340
- package/libs/typings/math.type.js +0 -1
- package/libs/typings/utils.type.d.ts +0 -2
- package/libs/typings/utils.type.js +0 -1
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
var y = Object.defineProperty, E = Object.defineProperties;
|
|
2
|
+
var O = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
|
+
var _ = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var D = (b, l, e) => l in b ? y(b, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : b[l] = e, L = (b, l) => {
|
|
6
|
+
for (var e in l || (l = {}))
|
|
7
|
+
_.call(l, e) && D(b, e, l[e]);
|
|
8
|
+
if (w)
|
|
9
|
+
for (var e of w(l))
|
|
10
|
+
S.call(l, e) && D(b, e, l[e]);
|
|
11
|
+
return b;
|
|
12
|
+
}, V = (b, l) => E(b, O(l));
|
|
13
|
+
var a = (b, l, e) => (D(b, typeof l != "symbol" ? l + "" : l, e), e);
|
|
14
|
+
import { Raycaster as k, Vector3 as P, Quaternion as C, Euler as A } from "three";
|
|
15
|
+
import { BasePanoPluginController as H } from "./BaseController.js";
|
|
16
|
+
import W from "./DoorLabelItem.js";
|
|
17
|
+
import { getCameraToward as z, isTwoRectOverlaped as R, getDistance as F, getToward as $ } from "./utils.js";
|
|
18
|
+
const B = { userAction: !0 };
|
|
19
|
+
class q extends H {
|
|
15
20
|
constructor(e) {
|
|
16
21
|
super(e);
|
|
17
22
|
a(this, "MinVisibledistance", 1.8);
|
|
@@ -25,23 +30,23 @@ class Q extends y {
|
|
|
25
30
|
a(this, "doorLabels");
|
|
26
31
|
a(this, "roomObservers");
|
|
27
32
|
a(this, "loadData", (e, n) => {
|
|
28
|
-
n && (this.MaxVisibledistance = n.MaxVisibledistance, this.MinVisibledistance = n.MinVisibledistance, this.OffsetHeight = n.OffsetHeight), this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((
|
|
29
|
-
|
|
33
|
+
n && (this.MaxVisibledistance = n.MaxVisibledistance, this.MinVisibledistance = n.MinVisibledistance, this.OffsetHeight = n.OffsetHeight), this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((f) => {
|
|
34
|
+
f.$destroy();
|
|
30
35
|
}), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData = e, this.five.once("panoArrived", () => {
|
|
31
36
|
console.log("doorplugin", "panoArrived"), this.initData();
|
|
32
37
|
});
|
|
33
38
|
});
|
|
34
39
|
a(this, "initRoomObservers", () => {
|
|
35
|
-
var
|
|
36
|
-
const e = this.floorplanServerData.computed_data.floor_datas || [],
|
|
37
|
-
const o = s.panoIndex,
|
|
40
|
+
var h, c;
|
|
41
|
+
const e = this.floorplanServerData.computed_data.floor_datas || [], f = (((c = (h = this.five) == null ? void 0 : h.work) == null ? void 0 : c.observers) || []).map((s) => {
|
|
42
|
+
const o = s.panoIndex, d = s.floorIndex, i = e == null ? void 0 : e.find((t) => t.floor_index === d);
|
|
38
43
|
if (i) {
|
|
39
44
|
const t = i.rooms.find((r) => r.observer_indexs.includes(o));
|
|
40
45
|
if (t)
|
|
41
|
-
return { panoIndex: o, floorIndex:
|
|
46
|
+
return { panoIndex: o, floorIndex: d, name: t.name };
|
|
42
47
|
}
|
|
43
48
|
}).filter(Boolean);
|
|
44
|
-
this.roomObservers =
|
|
49
|
+
this.roomObservers = f;
|
|
45
50
|
});
|
|
46
51
|
a(this, "hideAllLabels", () => {
|
|
47
52
|
this.labelItems.forEach((e) => {
|
|
@@ -53,26 +58,26 @@ class Q extends y {
|
|
|
53
58
|
const { panoIndex: e } = this.five;
|
|
54
59
|
if (!this.visible || this.five.model.empty || e === null || !this.roomObservers.find((s) => s.panoIndex === e))
|
|
55
60
|
return;
|
|
56
|
-
const n = this.roomObservers.find((s) => s.panoIndex === e),
|
|
61
|
+
const n = this.roomObservers.find((s) => s.panoIndex === e), h = this.five.work.observers.find((s) => s.panoIndex === e).position.clone(), c = (() => {
|
|
57
62
|
if (this.visibleLabelMap.has(e))
|
|
58
63
|
return this.visibleLabelMap.get(e);
|
|
59
64
|
{
|
|
60
65
|
const s = [];
|
|
61
|
-
return this.doorLabels.forEach((o,
|
|
66
|
+
return this.doorLabels.forEach((o, d) => {
|
|
62
67
|
if (o.roomName === n.name)
|
|
63
68
|
return;
|
|
64
|
-
const i = o.position.clone(), t = i.distanceTo(
|
|
69
|
+
const i = o.position.clone(), t = i.distanceTo(h);
|
|
65
70
|
if (t < this.MinVisibledistance || t > this.MaxVisibledistance)
|
|
66
71
|
return;
|
|
67
|
-
const r = new
|
|
68
|
-
r.set(
|
|
69
|
-
const [
|
|
70
|
-
|
|
72
|
+
const r = new k(), m = i.clone().sub(h).normalize();
|
|
73
|
+
r.set(h, m);
|
|
74
|
+
const [u] = this.five.model.intersectRaycaster(r);
|
|
75
|
+
u && u.distance + 0.1 < t || s.push(d);
|
|
71
76
|
}), this.visibleLabelMap.set(e, s), s;
|
|
72
77
|
}
|
|
73
78
|
})();
|
|
74
79
|
this.labelItems.forEach((s, o) => {
|
|
75
|
-
s.visible =
|
|
80
|
+
s.visible = c.includes(o);
|
|
76
81
|
}), this.fixDoorPosition();
|
|
77
82
|
});
|
|
78
83
|
a(this, "fixDoorPosition", () => {
|
|
@@ -81,86 +86,85 @@ class Q extends y {
|
|
|
81
86
|
return;
|
|
82
87
|
if (this.five.currentMode !== "Panorama")
|
|
83
88
|
return this.hideAllLabels();
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
89
|
+
const f = this.five.getElement(), h = f.clientWidth, c = f.clientHeight, s = n.getWorldDirection(new P()), o = [], d = [...this.labelItems];
|
|
90
|
+
if (d.forEach((i, t) => {
|
|
86
91
|
if (i.visible) {
|
|
87
|
-
const r = n.position.distanceTo(i.position),
|
|
88
|
-
i.left =
|
|
92
|
+
const r = n.position.distanceTo(i.position), m = i.position.clone().add(new P(0, this.OffsetHeight, 0)), g = m.clone().sub(n.position).normalize().angleTo(s), x = m.clone().project(n), p = (x.x + 1) / 2.2 * 100, v = (-x.y + 1) / 2.2 * 100, I = p >= 0 && p <= 100 && v >= 0 && v <= 100 && r > this.MinVisibledistance && r <= this.MaxVisibledistance;
|
|
93
|
+
i.left = p, i.top = v, i.inSight = I && g < Math.PI / 2, i.cameraToward = z(this.five), I ? o.push({ disFromCameraToLabel: r, left: p, top: v, index: t }) : i.transform = "translate(-50%, -50%)";
|
|
89
94
|
} else
|
|
90
95
|
i.inSight = !1;
|
|
91
96
|
}), o.length > 1) {
|
|
92
97
|
let i = 0;
|
|
93
98
|
o.sort((t, r) => r.disFromCameraToLabel - t.disFromCameraToLabel);
|
|
94
99
|
for (let t = 1; t < o.length; t++) {
|
|
95
|
-
const { index: r, left:
|
|
96
|
-
if (!
|
|
100
|
+
const { index: r, left: m, top: u } = o[t - 1], { index: g, left: x, top: p } = o[t], v = this.container.children[r], I = this.container.children[g];
|
|
101
|
+
if (!v || !I)
|
|
97
102
|
return;
|
|
98
|
-
const
|
|
99
|
-
left:
|
|
100
|
-
top:
|
|
101
|
-
width:
|
|
102
|
-
height:
|
|
103
|
-
},
|
|
104
|
-
left:
|
|
105
|
-
top:
|
|
103
|
+
const M = {
|
|
104
|
+
left: h * m / 100,
|
|
105
|
+
top: c * u / 100,
|
|
106
|
+
width: v.children[0].clientWidth,
|
|
107
|
+
height: v.children[0].clientHeight
|
|
108
|
+
}, T = {
|
|
109
|
+
left: h * x / 100,
|
|
110
|
+
top: c * p / 100,
|
|
106
111
|
width: I.children[0].clientWidth,
|
|
107
112
|
height: I.children[0].clientHeight
|
|
108
113
|
};
|
|
109
|
-
|
|
114
|
+
R(M, T) && (i++, d[r].transform = `translate(-50%, ${(i - 1) * 100 - 50}%)`, d[g].transform = `translate(-50%, ${i * 100 - 50}%)`);
|
|
110
115
|
}
|
|
111
116
|
}
|
|
112
|
-
this.labelItems =
|
|
117
|
+
this.labelItems = d, this.render();
|
|
113
118
|
});
|
|
114
119
|
a(this, "onClick", (e, n) => {
|
|
115
120
|
if (!this.roomObservers)
|
|
116
121
|
return;
|
|
117
|
-
const { work:
|
|
118
|
-
let
|
|
119
|
-
for (let o = 0; o <
|
|
122
|
+
const { work: f } = this.five;
|
|
123
|
+
let h, c, s = 1 / 0;
|
|
124
|
+
for (let o = 0; o < f.observers.length; o++) {
|
|
120
125
|
if (this.roomObservers[o].name !== e)
|
|
121
126
|
continue;
|
|
122
|
-
const i =
|
|
123
|
-
t < s && (
|
|
127
|
+
const i = f.observers[o].standingPosition, t = n.distanceTo(i);
|
|
128
|
+
t < s && (h = o, c = i.clone().sub(n).normalize(), s = t);
|
|
124
129
|
}
|
|
125
|
-
if (
|
|
130
|
+
if (c !== null && h !== null) {
|
|
126
131
|
const o = {};
|
|
127
132
|
if (s > 0) {
|
|
128
|
-
const i = new P(0, 0, -1), t =
|
|
133
|
+
const i = new P(0, 0, -1), t = c.clone(), r = new C();
|
|
129
134
|
r.setFromUnitVectors(i, t);
|
|
130
|
-
const
|
|
131
|
-
|
|
135
|
+
const m = new A();
|
|
136
|
+
m.setFromQuaternion(r, "YXZ"), o.longitude = m.y;
|
|
132
137
|
}
|
|
133
|
-
this.five.emit("wantsToMoveToPano",
|
|
138
|
+
this.five.emit("wantsToMoveToPano", h, {}, !0) || this.five.moveToPano(h, { longitude: o.longitude });
|
|
134
139
|
}
|
|
135
140
|
});
|
|
136
141
|
a(this, "initData", () => {
|
|
137
|
-
var
|
|
142
|
+
var h;
|
|
138
143
|
this.doorLabels = [];
|
|
139
|
-
const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index,
|
|
140
|
-
this.rooms =
|
|
141
|
-
var
|
|
142
|
-
const s = (
|
|
144
|
+
const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index, f = n !== void 0 && ((h = this.floorplanServerData.computed_data.floor_datas[n]) == null ? void 0 : h.rooms);
|
|
145
|
+
this.rooms = f, this.rooms && this.rooms.length > 0 && this.rooms.forEach((c) => {
|
|
146
|
+
var d;
|
|
147
|
+
const s = (d = this.floorplanServerData.computed_data.doors) == null ? void 0 : d.filter((i) => !!(i && i.name === c.name)), o = this.five.work.observers.filter((i, t) => !!c.observer_indexs.find((r) => r === t));
|
|
143
148
|
s && s.forEach((i) => {
|
|
144
149
|
const t = i.position;
|
|
145
|
-
let r = 1 / 0,
|
|
150
|
+
let r = 1 / 0, m;
|
|
146
151
|
o.forEach((g) => {
|
|
147
|
-
const
|
|
148
|
-
x:
|
|
149
|
-
y:
|
|
150
|
-
z:
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
}),
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
roomName:
|
|
152
|
+
const x = g.standingPosition, p = {
|
|
153
|
+
x: x.x,
|
|
154
|
+
y: x.y,
|
|
155
|
+
z: x.z
|
|
156
|
+
}, v = F(t, p);
|
|
157
|
+
v < r && (r = v, m = p);
|
|
158
|
+
}), m && (t.y = m.y + 0.01);
|
|
159
|
+
const u = new P(t.x, t.y, t.z);
|
|
160
|
+
u.add(new P(-0.2, 1.8, 0).applyEuler(new A(0, i.rad, 0))), this.doorLabels.push({
|
|
161
|
+
roomName: c.name,
|
|
157
162
|
name: i.name,
|
|
158
|
-
position:
|
|
159
|
-
toward:
|
|
163
|
+
position: u,
|
|
164
|
+
toward: $(i.rad)
|
|
160
165
|
});
|
|
161
166
|
});
|
|
162
|
-
}), this.labelItems = this.doorLabels.map((
|
|
163
|
-
...h,
|
|
167
|
+
}), this.labelItems = this.doorLabels.map((c) => V(L({}, c), {
|
|
164
168
|
left: 0,
|
|
165
169
|
top: 0,
|
|
166
170
|
visible: !1,
|
|
@@ -172,12 +176,12 @@ class Q extends y {
|
|
|
172
176
|
}
|
|
173
177
|
stateChangedCallback(e, n) {
|
|
174
178
|
if (this.hooks.hasListener("stateChange")) {
|
|
175
|
-
const
|
|
179
|
+
const f = {
|
|
176
180
|
state: this.state,
|
|
177
181
|
prevState: e,
|
|
178
|
-
userAction: n ? n.userAction :
|
|
182
|
+
userAction: n ? n.userAction : B.userAction
|
|
179
183
|
};
|
|
180
|
-
this.hooks.emit("stateChange",
|
|
184
|
+
this.hooks.emit("stateChange", f);
|
|
181
185
|
}
|
|
182
186
|
}
|
|
183
187
|
render() {
|
|
@@ -191,7 +195,7 @@ class Q extends y {
|
|
|
191
195
|
e.$destroy();
|
|
192
196
|
}), this.doorLabelItems = [], this.labelItems.forEach((e) => {
|
|
193
197
|
this.doorLabelItems.push(
|
|
194
|
-
new
|
|
198
|
+
new W({
|
|
195
199
|
target: this.container,
|
|
196
200
|
props: {
|
|
197
201
|
props: e,
|
|
@@ -211,5 +215,5 @@ class Q extends y {
|
|
|
211
215
|
}
|
|
212
216
|
}
|
|
213
217
|
export {
|
|
214
|
-
|
|
218
|
+
q as PanoDoorLabelPluginController
|
|
215
219
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { SvelteComponent as k, init as _, safe_not_equal as C, append_styles as I, element as d, space as j, attr as p, null_to_empty as v, insert as B, append as b, listen as x, noop as f, detach as H, binding_callbacks as S } from "svelte/internal";
|
|
2
|
+
import y from "classnames";
|
|
3
3
|
function W(e) {
|
|
4
4
|
I(e, "svelte-wpy7pz", '.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}');
|
|
5
5
|
}
|
|
6
6
|
function q(e) {
|
|
7
|
-
let l, t,
|
|
7
|
+
let l, t, a, s, o, n, i, c;
|
|
8
8
|
return {
|
|
9
9
|
c() {
|
|
10
|
-
l = d("div"), t = d("div"),
|
|
10
|
+
l = d("div"), t = d("div"), a = d("span"), a.textContent = `${e[8]}`, s = j(), o = d("i"), p(a, "class", "plugin-DoorLabelPlugin-txt svelte-wpy7pz"), p(o, "class", "plugin-DoorLabelPlugin-icon svelte-wpy7pz"), p(t, "class", n = v(y("plugin-DoorLabelPlugin-cnt", e[0].toward)) + " svelte-wpy7pz"), p(t, "style", `transform: ${e[6] || "initial"};pointer-events: ${e[5] ? "auto" : "none"};opacity: ${e[5] ? 1 : 0}`), p(t, "data-camera-toward", e[7]), p(l, "style", `left: ${e[3] || 0}%;top: ${e[4] || 0}%;opacity: ${e[5] ? 1 : 0}`), p(l, "class", "plugin-DoorLabelPlugin-item svelte-wpy7pz");
|
|
11
11
|
},
|
|
12
12
|
m(g, u) {
|
|
13
|
-
|
|
13
|
+
B(g, l, u), b(l, t), b(t, a), b(t, s), b(t, o), e[10](l), i || (c = x(t, "click", e[9]), i = !0);
|
|
14
14
|
},
|
|
15
15
|
p(g, [u]) {
|
|
16
16
|
u & 1 && n !== (n = v(y("plugin-DoorLabelPlugin-cnt", g[0].toward)) + " svelte-wpy7pz") && p(t, "class", n);
|
|
@@ -18,16 +18,16 @@ function q(e) {
|
|
|
18
18
|
i: f,
|
|
19
19
|
o: f,
|
|
20
20
|
d(g) {
|
|
21
|
-
g &&
|
|
21
|
+
g && H(l), e[10](null), i = !1, c();
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
function E(e, l, t) {
|
|
26
|
-
let { props:
|
|
26
|
+
let { props: a } = l, { onClick: s } = l, o, { left: n, top: i, inSight: c, transform: g, panoIndex: u, cameraToward: z, name: P } = a, m = 0;
|
|
27
27
|
const D = () => {
|
|
28
|
-
if (!n || !i || !c || !
|
|
28
|
+
if (!n || !i || !c || !o)
|
|
29
29
|
return;
|
|
30
|
-
const r =
|
|
30
|
+
const r = o.current.clientWidth / window.innerWidth * 100, w = o.current.clientHeight / window.innerHeight * 100;
|
|
31
31
|
if (n <= r / 2 || n >= 100 - r / 2 || i <= w / 2 || i >= 100 - w / 2)
|
|
32
32
|
return;
|
|
33
33
|
u !== m && (console.log("panoDoorLabelPlugin", u, "\u89E6\u53D1\u57CB\u70B9"), m = u);
|
|
@@ -35,16 +35,16 @@ function E(e, l, t) {
|
|
|
35
35
|
s && s();
|
|
36
36
|
};
|
|
37
37
|
function h(r) {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
S[r ? "unshift" : "push"](() => {
|
|
39
|
+
o = r, t(2, o);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
return e.$$set = (r) => {
|
|
43
|
-
"props" in r && t(0,
|
|
43
|
+
"props" in r && t(0, a = r.props), "onClick" in r && t(1, s = r.onClick);
|
|
44
44
|
}, D(), [
|
|
45
|
-
o,
|
|
46
|
-
s,
|
|
47
45
|
a,
|
|
46
|
+
s,
|
|
47
|
+
o,
|
|
48
48
|
n,
|
|
49
49
|
i,
|
|
50
50
|
c,
|
|
@@ -55,11 +55,11 @@ function E(e, l, t) {
|
|
|
55
55
|
h
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
|
-
class
|
|
58
|
+
class A extends k {
|
|
59
59
|
constructor(l) {
|
|
60
60
|
super(), _(this, l, E, q, C, { props: 0, onClick: 1 }, W);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
export {
|
|
64
|
-
|
|
64
|
+
A as default
|
|
65
65
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FivePlugin } from '@realsee/five';
|
|
2
2
|
import type { FloorplanServerData } from '../floorplan';
|
|
3
3
|
import type { PanoDoorLabelPluginController } from './Controller';
|
|
4
|
-
export type { FloorplanServerData, FloorplanServerRoomItem, } from '
|
|
4
|
+
export type { FloorplanServerData, FloorplanServerRoomItem, } from '../floorplan/typings/floorplanServerData';
|
|
5
5
|
declare const PanoDoorLabelPlugin: FivePlugin<FloorplanServerData, PanoDoorLabelPluginController>;
|
|
6
6
|
export { PanoDoorLabelPlugin };
|
|
7
7
|
export default PanoDoorLabelPlugin;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { PanoDoorLabelPluginController as r } from "./Controller.js";
|
|
2
|
-
|
|
3
|
-
import "./BaseController.js";
|
|
4
|
-
import "@realsee/five";
|
|
5
|
-
import "../base/BasePlugin.js";
|
|
6
|
-
import "../shared-utils/Subscribe.js";
|
|
7
|
-
import "./DoorLabelItem.js";
|
|
8
|
-
import "../index.164f1850.js";
|
|
9
|
-
import "../index.f2f85d71.js";
|
|
10
|
-
import "./utils.js";
|
|
11
|
-
const b = (o) => new r(o);
|
|
2
|
+
const e = (o) => new r(o);
|
|
12
3
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
e as PanoDoorLabelPlugin,
|
|
5
|
+
e as default
|
|
15
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
2
|
export declare function isTwoRectOverlaped(rect1: any, rect2: any): boolean;
|
|
3
|
-
export declare function getCameraToward(five: Five): "" | "
|
|
3
|
+
export declare function getCameraToward(five: Five): "" | "left" | "right" | "back" | "forward";
|
|
4
4
|
export declare function getDistance(p1: any, p2: any): number;
|
|
5
|
-
export declare function getToward(rad: number): "" | "
|
|
5
|
+
export declare function getToward(rad: number): "" | "left" | "right" | "back" | "forward";
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var a = (i, e, o) => e in i ?
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var a = (i, e, o) => e in i ? m(i, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : i[e] = o;
|
|
3
3
|
var t = (i, e, o) => (a(i, typeof e != "symbol" ? e + "" : e, o), o);
|
|
4
4
|
import l from "../Model/line.js";
|
|
5
|
-
import
|
|
6
|
-
import { preventDefault as
|
|
7
|
-
|
|
8
|
-
import "../Model/polyline.js";
|
|
9
|
-
import "../utils/line.js";
|
|
10
|
-
import "@realsee/five/line";
|
|
11
|
-
import "../utils/constants.js";
|
|
12
|
-
import "three";
|
|
13
|
-
import "@realsee/five";
|
|
14
|
-
import "../utils/distanceDom.js";
|
|
15
|
-
import "../utils/isNDCPointInScreen.js";
|
|
16
|
-
import "../../shared-utils/removeArrayItem.js";
|
|
17
|
-
class H {
|
|
5
|
+
import d from "../Model/point.js";
|
|
6
|
+
import { preventDefault as r } from "../utils/ironbox.js";
|
|
7
|
+
class G {
|
|
18
8
|
constructor(e) {
|
|
19
9
|
t(this, "model");
|
|
20
10
|
t(this, "five");
|
|
@@ -32,10 +22,10 @@ class H {
|
|
|
32
22
|
t(this, "updateDistanceUI", () => {
|
|
33
23
|
this.dashed.distanceItem.update(this.five), this.model.lines.forEach((e) => e.distanceItem.update(this.five));
|
|
34
24
|
});
|
|
35
|
-
var s,
|
|
36
|
-
this.five = e.five, this.hook = e.hook, this.model = e.model, this.config = e.config, this.magnifier = e.magnifier, this.container = e.container, this.fiveHelper = e.fiveHelper, this.isMobile = (
|
|
25
|
+
var s, n;
|
|
26
|
+
this.five = e.five, this.hook = e.hook, this.model = e.model, this.config = e.config, this.magnifier = e.magnifier, this.container = e.container, this.fiveHelper = e.fiveHelper, this.isMobile = (n = (s = e.openParams) == null ? void 0 : s.isMobile) != null ? n : !1, this.userDistanceItemCreator = e.userDistanceItemCreator, this.group = e.group, this.mouseGroup = e.mouseGroup, this.dashed = new l(new d([0, 0, 0]), new d([0, 0, 0]), this.model), this.dashed.mesh.setMaterial({ dashed: !0, dashScale: 100 }), this.dashed.mesh.name = "dashLine";
|
|
37
27
|
const o = this.five.getElement();
|
|
38
|
-
o && (o.addEventListener("touchstart",
|
|
28
|
+
o && (o.addEventListener("touchstart", r), o.addEventListener("contextmenu", r));
|
|
39
29
|
}
|
|
40
30
|
removeLine(e) {
|
|
41
31
|
this.group.remove(e.mesh, e.lightMesh), e.distanceItem.remove(), this.five.needsRender = !0;
|
|
@@ -43,21 +33,21 @@ class H {
|
|
|
43
33
|
updateMouseGroup(e, o) {
|
|
44
34
|
if (!e)
|
|
45
35
|
return this.mouseGroup;
|
|
46
|
-
const s = this.fiveHelper.getAdsorbentPoint(e),
|
|
47
|
-
if (this.mouseGroup.position.copy(
|
|
36
|
+
const s = this.fiveHelper.getAdsorbentPoint(e), n = s || e.point;
|
|
37
|
+
if (this.mouseGroup.position.copy(n), o)
|
|
48
38
|
this.mouseGroup.quaternion.copy(o.quaternion);
|
|
49
39
|
else if (e.face) {
|
|
50
|
-
const h = e.face.normal.clone().multiplyScalar(0.05),
|
|
51
|
-
this.mouseGroup.lookAt(
|
|
40
|
+
const h = e.face.normal.clone().multiplyScalar(0.05), u = e.point.clone().add(h).clone().add(h);
|
|
41
|
+
this.mouseGroup.lookAt(u);
|
|
52
42
|
}
|
|
53
43
|
return this.mouseGroup;
|
|
54
44
|
}
|
|
55
45
|
dispose() {
|
|
56
46
|
this.disposed = !0, this.magnifier.remove(), this.model.lines.forEach((o) => this.removeLine(o));
|
|
57
47
|
const e = this.five.getElement();
|
|
58
|
-
e && (e.removeEventListener("touchstart",
|
|
48
|
+
e && (e.removeEventListener("touchstart", r), e.removeEventListener("contextmenu", r));
|
|
59
49
|
}
|
|
60
50
|
}
|
|
61
51
|
export {
|
|
62
|
-
|
|
52
|
+
G as default
|
|
63
53
|
};
|
|
@@ -1,26 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var m = (h, n, e) => n in h ?
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var m = (h, n, e) => n in h ? p(h, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[n] = e;
|
|
3
3
|
var s = (h, n, e) => (m(h, typeof n != "symbol" ? n + "" : n, e), e);
|
|
4
|
-
import
|
|
4
|
+
import u from "hammerjs";
|
|
5
5
|
import { Model as f } from "../Model/index.js";
|
|
6
6
|
import l from "../Model/line.js";
|
|
7
|
-
import
|
|
7
|
+
import d from "../Model/point.js";
|
|
8
8
|
import v from "../../shared-utils/throttle.js";
|
|
9
9
|
import c from "./BaseController.js";
|
|
10
10
|
import { getIntersectionFromEvent as r } from "../utils/getIntersectionFromEvent.js";
|
|
11
|
-
|
|
12
|
-
import "../../shared-utils/removeArrayItem.js";
|
|
13
|
-
import "../Model/polyline.js";
|
|
14
|
-
import "../../shared-utils/uuid.js";
|
|
15
|
-
import "../utils/line.js";
|
|
16
|
-
import "@realsee/five/line";
|
|
17
|
-
import "../utils/constants.js";
|
|
18
|
-
import "three";
|
|
19
|
-
import "../utils/distanceDom.js";
|
|
20
|
-
import "../utils/isNDCPointInScreen.js";
|
|
21
|
-
import "../utils/ironbox.js";
|
|
22
|
-
import "../utils/getPointFromHammerEvent.js";
|
|
23
|
-
class O extends c {
|
|
11
|
+
class A extends c {
|
|
24
12
|
constructor(e) {
|
|
25
13
|
var i;
|
|
26
14
|
super(e);
|
|
@@ -60,7 +48,7 @@ class O extends c {
|
|
|
60
48
|
const [t] = r(this.five, e);
|
|
61
49
|
if (!t || !t.face)
|
|
62
50
|
return;
|
|
63
|
-
const i = new
|
|
51
|
+
const i = new d(t.point);
|
|
64
52
|
this.pressPoint = i, this.onIntersectionUpdate(t);
|
|
65
53
|
});
|
|
66
54
|
s(this, "onPan", (e) => {
|
|
@@ -76,7 +64,7 @@ class O extends c {
|
|
|
76
64
|
this.hasAppendDashed || (this.dashed.distanceItem.appendTo(this.container), this.group.add(this.dashed.mesh)), this.hasAppendDashed = !0;
|
|
77
65
|
const [t] = r(this.five, e);
|
|
78
66
|
this.updateMouseGroup(t);
|
|
79
|
-
const i = new
|
|
67
|
+
const i = new d(this.mouseGroup.position), o = this.lastPoint;
|
|
80
68
|
if (i && (this.lastPoint = i), i && o) {
|
|
81
69
|
const a = new l(o, i, this.model);
|
|
82
70
|
a.distanceItem.appendTo(this.container), this.model.addLine(a), this.group.add(a.mesh), a.distanceItem.update(this.five);
|
|
@@ -110,5 +98,5 @@ class O extends c {
|
|
|
110
98
|
}
|
|
111
99
|
}
|
|
112
100
|
export {
|
|
113
|
-
|
|
101
|
+
A as default
|
|
114
102
|
};
|
|
@@ -9,20 +9,7 @@ import { findAssociatedLines as G } from "../utils/findAssociatedLines.js";
|
|
|
9
9
|
import { Vector2 as m } from "three";
|
|
10
10
|
import v from "../utils/isNDCPointInScreen.js";
|
|
11
11
|
import { closestPointOnLine as N } from "../utils/math.js";
|
|
12
|
-
|
|
13
|
-
import "../../shared-utils/uuid.js";
|
|
14
|
-
import "../../shared-utils/removeArrayItem.js";
|
|
15
|
-
import "@realsee/five";
|
|
16
|
-
import "../Model/polyline.js";
|
|
17
|
-
import "../utils/line.js";
|
|
18
|
-
import "@realsee/five/line";
|
|
19
|
-
import "../utils/constants.js";
|
|
20
|
-
import "../utils/distanceDom.js";
|
|
21
|
-
import "../utils/ironbox.js";
|
|
22
|
-
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
23
|
-
import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
24
|
-
import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
|
|
25
|
-
class $ extends D {
|
|
12
|
+
class V extends D {
|
|
26
13
|
constructor(e) {
|
|
27
14
|
super(e);
|
|
28
15
|
t(this, "state", "watching");
|
|
@@ -45,22 +32,22 @@ class $ extends D {
|
|
|
45
32
|
const [i] = this.five.model.intersectRaycaster(e);
|
|
46
33
|
if (!i)
|
|
47
34
|
return;
|
|
48
|
-
const
|
|
49
|
-
const [a, L] =
|
|
35
|
+
const s = this.five.camera, f = i.point.clone().project(s), d = this.container.clientWidth, r = this.container.clientHeight, p = new m(f.x * d, f.y * r), g = this.model.lines.map((o) => {
|
|
36
|
+
const [a, L] = o.points, l = a.position.clone().project(s), c = L.position.clone().project(s);
|
|
50
37
|
if (!v(l) && !v(c))
|
|
51
38
|
return null;
|
|
52
|
-
const C = new m(l.x *
|
|
53
|
-
return { id:
|
|
54
|
-
}).filter((
|
|
39
|
+
const C = new m(l.x * d, l.y * r), w = new m(c.x * d, c.y * r);
|
|
40
|
+
return { id: o.id, points: [C, w] };
|
|
41
|
+
}).filter((o) => !!o);
|
|
55
42
|
if (g.length === 0)
|
|
56
43
|
return;
|
|
57
|
-
const u = g.map((
|
|
58
|
-
const a = N(
|
|
59
|
-
return { id:
|
|
60
|
-
}).sort((
|
|
44
|
+
const u = g.map((o) => {
|
|
45
|
+
const a = N(p, o.points);
|
|
46
|
+
return { id: o.id, distance: a.distanceTo(p) };
|
|
47
|
+
}).sort((o, a) => o.distance - a.distance)[0];
|
|
61
48
|
if (u.distance > 20)
|
|
62
49
|
return;
|
|
63
|
-
const P = this.model.lines.find(({ id:
|
|
50
|
+
const P = this.model.lines.find(({ id: o }) => o === u.id);
|
|
64
51
|
if (!!P)
|
|
65
52
|
return this.chooseLine(P), !1;
|
|
66
53
|
});
|
|
@@ -80,8 +67,8 @@ class $ extends D {
|
|
|
80
67
|
t(this, "onGetEndPoint", (e) => {
|
|
81
68
|
const i = this.mobileNowPoint;
|
|
82
69
|
if (this.removeLine(this.dashed), this.hasAppendDashed = !1, this.mobileStartPoint && i) {
|
|
83
|
-
const
|
|
84
|
-
|
|
70
|
+
const s = new T(this.mobileStartPoint, i, this.model);
|
|
71
|
+
s.distanceItem.appendTo(this.container), s.distanceItem.update(this.five), s.hook.on("selected", this.chooseLine), this.group.add(s.mesh), this.model.addLine(s);
|
|
85
72
|
}
|
|
86
73
|
this.mobileStartPoint = null, this.mobileNowPoint = null, this.five.needsRender = !0;
|
|
87
74
|
});
|
|
@@ -99,7 +86,7 @@ class $ extends D {
|
|
|
99
86
|
const i = G(e);
|
|
100
87
|
this.highlightLines(i), this.five.needsRender = !0, this.hook.emit(
|
|
101
88
|
"selectedChange",
|
|
102
|
-
i.map((
|
|
89
|
+
i.map((s) => s.toCompletelyJson())
|
|
103
90
|
);
|
|
104
91
|
});
|
|
105
92
|
t(this, "deleteDomClickCallback", () => {
|
|
@@ -134,5 +121,5 @@ class $ extends D {
|
|
|
134
121
|
}
|
|
135
122
|
}
|
|
136
123
|
export {
|
|
137
|
-
|
|
124
|
+
V as default
|
|
138
125
|
};
|