@realsee/dnalogel 2.1.1 → 2.1.2-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -12
- package/components/index.js +242 -569
- package/dist/index.cjs.js +58 -73
- package/dist/index.es.js +7842 -12958
- package/dist/index.js +7842 -12958
- 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 +222 -9
- 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 +1 -300
- package/libs/CSS3DRenderPlugin/Controller.d.ts +3 -3
- package/libs/CSS3DRenderPlugin/Controller.js +1 -81
- package/libs/CSS3DRenderPlugin/index.js +1 -14
- package/libs/CSS3DRenderPlugin/typing.js +1 -1
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +1 -67
- package/libs/CSS3DRenderPlugin/utils/centerPoint.js +1 -10
- package/libs/CSS3DRenderPlugin/utils/evenNumber.js +1 -7
- package/libs/CSS3DRenderPlugin/utils/index.js +1 -13
- package/libs/CSS3DRenderPlugin/utils/positionToVector3.js +1 -7
- package/libs/CSS3DRenderPlugin/utils/random.js +1 -6
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +1 -71
- package/libs/CameraMovementPlugin/index.js +1 -15
- package/libs/CameraMovementPlugin/typing.js +1 -5
- package/libs/CruisePlugin/Controller.js +1 -440
- package/libs/CruisePlugin/index.js +1 -27
- package/libs/CruisePlugin/utils/coordinatesAngle.js +1 -9
- package/libs/CruisePlugin/utils/coordinatesToVector.js +1 -12
- package/libs/CruisePlugin/utils/formatRad.js +1 -7
- package/libs/CruisePlugin/utils/linerValue.js +1 -7
- package/libs/CruisePlugin/utils/safeCall.js +1 -12
- package/libs/CruisePlugin/utils/sleep.js +1 -10
- package/libs/CruisePlugin/utils/vectorToCoordinates.js +1 -10
- package/libs/GuideLinePlugin/Controller.js +1 -112
- package/libs/GuideLinePlugin/index.js +1 -15
- package/libs/GuideLinePlugin/utils/getArrowMaterial.js +1 -13
- package/libs/GuideLinePlugin/utils/getLineGeometries.js +1 -118
- package/libs/GuideLinePlugin/utils/polyline-normals.d.ts +3 -0
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +1 -254
- package/libs/ItemLabelPlugin/ItemLabelItem.js +2 -133
- package/libs/ItemLabelPlugin/Plugin.js +2 -85
- package/libs/ItemLabelPlugin/index.js +1 -25
- package/libs/ItemLabelPlugin/typings.js +1 -4
- package/libs/ItemLabelPlugin/utils/getLabelTransform.js +1 -4
- package/libs/ItemLabelPlugin/utils/getStrokeLength.js +1 -16
- package/libs/ItemLabelPlugin/utils/isImpacted.js +1 -10
- package/libs/ItemLabelPlugin/utils/parseData.js +1 -10
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +1 -11
- package/libs/ModelChassisCompassPlugin/Plugin.js +1 -55
- package/libs/ModelChassisCompassPlugin/index.js +1 -10
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +1 -66
- package/libs/ModelEntryDoorGuidePlugin/index.js +1 -11
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +1 -196
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +2 -42
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +2 -79
- package/libs/ModelItemLabelPlugin/events.type.js +1 -1
- package/libs/ModelItemLabelPlugin/index.js +1 -21
- package/libs/ModelItemLabelPlugin/typings.js +1 -4
- package/libs/ModelItemLabelPlugin/utils/parseData.js +1 -9
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.js +1 -4
- package/libs/ModelRoomLabelPlugin/Controller.js +1 -64
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +1 -45
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +1 -151
- package/libs/ModelRoomLabelPlugin/index.js +1 -16
- package/libs/ModelRoomLabelPlugin/utils/parseData.js +1 -16
- package/libs/ModelTVVideoPlugin/Plugin.js +1 -157
- package/libs/ModelTVVideoPlugin/index.js +1 -19
- package/libs/ModelTVVideoPlugin/typings.js +1 -4
- package/libs/ModelTVVideoPlugin/utils/parseData.js +1 -20
- package/libs/ModelViewPlugin/Plugin.js +1 -96
- package/libs/ModelViewPlugin/index.js +1 -8
- package/libs/Object3DHelperPlugin/Controller.d.ts +1 -1
- package/libs/Object3DHelperPlugin/Controller.js +1 -137
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.d.ts +1 -1
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +1 -35
- package/libs/Object3DHelperPlugin/index.js +1 -42
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -4
- package/libs/PanoCompassPlugin/Controller.js +1 -205
- package/libs/PanoCompassPlugin/getRoomInfoInstance.js +1 -24
- package/libs/PanoCompassPlugin/index.js +1 -24
- package/libs/PanoCursorRaycasterPlugin/index.js +1 -60
- package/libs/PanoDoorLabelPlugin/BaseController.js +1 -50
- package/libs/PanoDoorLabelPlugin/Controller.js +1 -215
- package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +1 -65
- package/libs/PanoDoorLabelPlugin/index.d.ts +1 -1
- package/libs/PanoDoorLabelPlugin/index.js +1 -15
- package/libs/PanoDoorLabelPlugin/utils.d.ts +2 -2
- package/libs/PanoDoorLabelPlugin/utils.js +1 -23
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +1 -63
- package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -114
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +1 -138
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +1 -33
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +1 -101
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +1 -169
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.js +1 -167
- package/libs/PanoMeasurePlugin/Model/index.d.ts +4 -4
- package/libs/PanoMeasurePlugin/Model/index.js +1 -99
- package/libs/PanoMeasurePlugin/Model/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Model/line.js +1 -60
- package/libs/PanoMeasurePlugin/Model/point.js +1 -30
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/polyline.js +1 -47
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +2 -5
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -4
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +1 -4
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +3 -67
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +1 -28
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +1 -41
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -103
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +8 -12
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +1 -50
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +1 -36
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +1 -48
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +3 -8
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +1 -39
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +1 -70
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +2 -7
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +1 -123
- package/libs/PanoMeasurePlugin/index.js +1 -60
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +1 -12
- package/libs/PanoMeasurePlugin/utils/constants.js +1 -23
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +1 -62
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +1 -13
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +1 -16
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +1 -9
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +1 -8
- package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -4
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +1 -7
- package/libs/PanoMeasurePlugin/utils/line.js +1 -18
- package/libs/PanoMeasurePlugin/utils/math.js +1 -13
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +3 -33
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +1 -8
- package/libs/PanoRulerPlugin/Plugin.js +3 -241
- package/libs/PanoRulerPlugin/index.js +1 -11
- package/libs/PanoRulerPlugin/style.js +2 -5
- package/libs/PanoRulerProPlugin/Controller.js +1 -74
- package/libs/PanoRulerProPlugin/RulerItem.js +1 -118
- package/libs/PanoRulerProPlugin/RulerItems.js +1 -181
- package/libs/PanoRulerProPlugin/index.js +1 -17
- package/libs/PanoSpatialTagPlugin/Components/origins.js +1 -82
- package/libs/PanoSpatialTagPlugin/Components/tag.js +1 -124
- package/libs/PanoSpatialTagPlugin/Plugin.js +1 -258
- package/libs/PanoSpatialTagPlugin/index.js +1 -24
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -1
- package/libs/PanoSpatialTagPlugin/store.js +1 -6
- package/libs/PanoSpatialTagPlugin/style.js +1 -11
- package/libs/PanoSpatialTagPlugin/typings.js +1 -1
- package/libs/PanoTagPlugin/Assets/Icon.js +1 -6
- package/libs/PanoTagPlugin/Components/Common/Arrow.js +1 -103
- package/libs/PanoTagPlugin/Components/Common/Audio.js +1 -163
- package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +1 -93
- package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +1 -91
- package/libs/PanoTagPlugin/Components/Common/Media.js +1 -3438
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +1 -139
- package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +1 -181
- package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +1 -52
- package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +1 -52
- package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +1 -170
- package/libs/PanoTagPlugin/Components/Common/Shadow.js +15 -125
- package/libs/PanoTagPlugin/Components/Common/Text.js +1 -984
- package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +1 -140
- package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +1 -72
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +1 -202
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +1 -128
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +1 -231
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +1 -95
- package/libs/PanoTagPlugin/Components/Tag/TextTag.js +1 -134
- package/libs/PanoTagPlugin/Components/Tag/index.js +2 -308
- package/libs/PanoTagPlugin/Components/TagContainer.js +1 -187
- package/libs/PanoTagPlugin/Components/TagWrapper.js +1 -183
- package/libs/PanoTagPlugin/controller/TagCacheController.js +1 -32
- package/libs/PanoTagPlugin/controller/TagComputer.d.ts +5 -5
- package/libs/PanoTagPlugin/controller/TagComputer.js +1 -15
- package/libs/PanoTagPlugin/controller/index.js +1 -386
- package/libs/PanoTagPlugin/index.js +1 -71
- package/libs/PanoTagPlugin/tag.config.js +1 -44
- package/libs/PanoTagPlugin/typings/controller.js +1 -1
- package/libs/PanoTagPlugin/typings/index.js +1 -7
- package/libs/PanoTagPlugin/typings/tag.js +1 -7
- package/libs/PanoTagPlugin/utils/actionAfterFiveModelLoad.js +1 -6
- package/libs/PanoTagPlugin/utils/addDebugPoints.js +1 -27
- package/libs/PanoTagPlugin/utils/checkRange.d.ts +1 -1
- package/libs/PanoTagPlugin/utils/checkRange.js +1 -10
- package/libs/PanoTagPlugin/utils/constants.js +1 -8
- package/libs/PanoTagPlugin/utils/debounce.js +1 -12
- package/libs/PanoTagPlugin/utils/doUtil.js +1 -12
- package/libs/PanoTagPlugin/utils/index.js +1 -36
- package/libs/PanoTagPlugin/utils/noTypecheck.js +1 -4
- package/libs/PanoTagPlugin/utils/normalPositionToPositions.js +1 -13
- package/libs/PanoTagPlugin/utils/planeNormal.js +1 -11
- package/libs/PanoTagPlugin/utils/resizeObserver.js +1 -17
- package/libs/PanoTagPlugin/utils/search.js +1 -33
- package/libs/PanoTagPlugin/utils/tagPosition.js +1 -13
- package/libs/PanoTagPlugin/utils/throttle.js +1 -11
- package/libs/base/BasePlugin.js +1 -18
- package/libs/base/BasePluginWithData.js +1 -7
- package/libs/components/PaintBrush/Controller.d.ts +2 -2
- package/libs/components/PaintBrush/Controller.js +1 -309
- package/libs/components/PaintBrush/Subscribe.js +1 -47
- package/libs/components/PaintBrush/index.js +1 -52
- package/libs/components/PaintBrush/style.js +2 -5
- package/libs/components/PaintBrush/tween.js +1 -15
- package/libs/components/PaintBrush/typings.js +1 -4
- package/libs/components/PaintBrush/utils.d.ts +1 -1
- package/libs/components/PaintBrush/utils.js +1 -45
- package/libs/components/index.js +1 -13
- package/libs/env.d.ts +1 -0
- package/libs/floorplan/Assets/camera.js +1 -4
- package/libs/floorplan/Assets/compass.js +1 -4
- package/libs/floorplan/Assets/floorplanExtraObject.js +1 -4
- package/libs/floorplan/Components/BaseImage.js +1 -104
- package/libs/floorplan/Components/Camera.js +1 -62
- package/libs/floorplan/Components/Compass.js +1 -60
- package/libs/floorplan/Components/CurrentFloor.js +1 -255
- package/libs/floorplan/Components/Main.js +1 -282
- package/libs/floorplan/Components/Normalmage.js +1 -37
- package/libs/floorplan/Components/RoomHighlight/Room.js +1 -61
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +1 -122
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +1 -152
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +1 -174
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +1 -184
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +1 -37
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +1 -39
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +1 -37
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +1 -134
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +1 -139
- package/libs/floorplan/Components/SvgImage.js +2 -39
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -322
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -49
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -318
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -49
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +1 -84
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +1 -133
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +1 -72
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +1 -191
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -146
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -26
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -265
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -46
- package/libs/floorplan/constant.js +1 -4
- package/libs/floorplan/index.js +1 -67
- package/libs/floorplan/typings/floorplanData.js +1 -1
- package/libs/floorplan/typings/floorplanServerData.js +1 -101
- package/libs/floorplan/utils/constant.js +1 -8
- package/libs/floorplan/utils/correctFiveState.js +1 -36
- package/libs/floorplan/utils/formatData.js +1 -82
- package/libs/floorplan/utils/formatPosition.js +1 -35
- package/libs/index.js +1 -330
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +1 -155
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +1 -53
- package/libs/shared-utils/Object3DHelper/Constants/color.js +1 -21
- package/libs/shared-utils/Object3DHelper/Controller/CSS3DScaleController.js +1 -29
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -74
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +1 -117
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +1 -142
- package/libs/shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js +1 -81
- package/libs/shared-utils/Object3DHelper/Helper/HTML/tipsDom.js +1 -31
- package/libs/shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js +1 -14
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +1 -31
- package/libs/shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js +1 -35
- package/libs/shared-utils/Object3DHelper/Helper/OutlineHelper.js +1 -103
- package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js +1 -143
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +1 -137
- package/libs/shared-utils/Object3DHelper/Helper/index.js +1 -30
- package/libs/shared-utils/Object3DHelper/index.js +1 -140
- package/libs/shared-utils/Object3DHelper/typings/Direction.js +1 -1
- package/libs/shared-utils/Object3DHelper/typings/Hooks.js +1 -1
- package/libs/shared-utils/Object3DHelper/typings/Scissor.js +1 -1
- package/libs/shared-utils/Object3DHelper/typings/index.js +1 -1
- package/libs/shared-utils/Object3DHelper/utils/calculateThreeMouse.js +1 -11
- package/libs/shared-utils/Object3DHelper/utils/direction.js +1 -30
- package/libs/shared-utils/Object3DHelper/utils/filterNotColinearPoints.js +1 -18
- package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.js +1 -14
- package/libs/shared-utils/Object3DHelper/utils/getPoint.js +1 -18
- package/libs/shared-utils/Object3DHelper/utils/index.js +1 -29
- package/libs/shared-utils/Object3DHelper/utils/normalPositionToPositions.js +1 -13
- package/libs/shared-utils/Object3DHelper/utils/object3DBoundingPosition.js +1 -5
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.d.ts +34 -0
- package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.js +1 -191
- package/libs/shared-utils/Object3DHelper/utils/vectorIsEqual.js +1 -6
- package/libs/shared-utils/Subscribe.js +1 -50
- package/libs/shared-utils/animationFrame/BetterTween.js +1 -6
- package/libs/shared-utils/animationFrame/calculateProgress.js +1 -12
- package/libs/shared-utils/animationFrame/formatRad.js +1 -13
- package/libs/shared-utils/animationFrame/index.js +1 -51
- package/libs/shared-utils/animationFrame/tween.js +1 -30
- package/libs/shared-utils/changeModelCanvasOpacity.js +1 -12
- package/libs/shared-utils/createCanvasTextTexture.js +1 -11
- package/libs/shared-utils/createLine/index.js +1 -9
- package/libs/shared-utils/debounce.js +1 -11
- package/libs/shared-utils/equal.js +1 -54
- package/libs/shared-utils/filter.js +1 -30
- package/libs/shared-utils/five/changeMode.js +1 -21
- package/libs/shared-utils/getPxmm.js +1 -21
- package/libs/shared-utils/index.js +1 -45
- package/libs/shared-utils/isNil.js +1 -10
- package/libs/shared-utils/isTruelyObject.js +1 -6
- package/libs/shared-utils/math/Interval.js +1 -23
- package/libs/shared-utils/math/Rectangle.js +1 -23
- package/libs/shared-utils/math/index.js +1 -6
- package/libs/shared-utils/math/planimetry.d.ts +5 -5
- package/libs/shared-utils/math/planimetry.js +1 -135
- package/libs/shared-utils/math/rad2Deg.js +1 -6
- package/libs/shared-utils/nearlyEqual.js +1 -6
- package/libs/shared-utils/nextFrame.js +1 -6
- package/libs/shared-utils/noop.js +1 -5
- package/libs/shared-utils/object3d2LocalMatrix.js +1 -19
- package/libs/shared-utils/removeArrayItem.d.ts +1 -1
- package/libs/shared-utils/removeArrayItem.js +1 -8
- package/libs/shared-utils/tap.js +1 -6
- package/libs/shared-utils/three/Assets/index.js +1 -5
- package/libs/shared-utils/three/FivePointSelector.d.ts +1 -1
- package/libs/shared-utils/three/FivePointSelector.js +1 -63
- package/libs/shared-utils/three/Magnifier.d.ts +2 -2
- package/libs/shared-utils/three/Magnifier.js +1 -104
- package/libs/shared-utils/three/PointDomHelper.js +1 -68
- package/libs/shared-utils/three/PointHelper.js +3 -60
- package/libs/shared-utils/three/getCoords.js +1 -13
- package/libs/shared-utils/three/getIntersect.d.ts +1 -1
- package/libs/shared-utils/three/getIntersect.js +1 -8
- package/libs/shared-utils/three/getRaycaster.d.ts +1 -1
- package/libs/shared-utils/three/getRaycaster.js +1 -12
- package/libs/shared-utils/three/index.js +1 -33
- package/libs/shared-utils/three/loadTexture.js +1 -10
- package/libs/shared-utils/three/transformPositionToVector3.js +1 -5
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +1 -13
- package/libs/shared-utils/throttle.js +1 -11
- package/libs/shared-utils/tinyEJSrender.js +14 -138
- package/libs/shared-utils/to.js +1 -11
- package/libs/shared-utils/uuid.js +1 -10
- package/libs/vendor/swiper/components-shared/get-changed-params.js +1 -0
- package/libs/vendor/swiper/components-shared/get-params.js +1 -0
- package/libs/vendor/swiper/components-shared/mount-swiper.js +1 -0
- package/libs/vendor/swiper/components-shared/params-list.js +1 -0
- package/libs/vendor/swiper/components-shared/update-swiper.js +1 -0
- package/libs/vendor/swiper/components-shared/utils.js +1 -0
- package/libs/vendor/swiper/svelte/swiper-slide.js +1 -0
- package/libs/vendor/swiper/svelte/swiper-svelte.js +1 -0
- package/libs/vendor/swiper/svelte/swiper.js +1 -0
- package/package.json +218 -31
- 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/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/ModelRoomLabelPlugin/typings.js +0 -1
- 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/typings.js +0 -1
- package/libs/PanoRulerProPlugin/typings.js +0 -1
- package/libs/PanoTagPlugin/Components/Common/TextItem.js +0 -106
- package/libs/TagComputer.2bc444dc.js +0 -315
- 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/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.5d5d1089.js +0 -34
- 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/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/negateScale.d.ts +0 -2
- package/libs/shared-utils/Object3DHelper/utils/negateScale.js +0 -7
- 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/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/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,50 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
var h = (s, e, t) => e in s ? n(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
-
var i = (s, e, t) => (h(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
import { Five as o } from "@realsee/five";
|
|
5
|
-
import { Controller as l } from "../base/BasePlugin.js";
|
|
6
|
-
import "../shared-utils/Subscribe.js";
|
|
7
|
-
class v extends l {
|
|
8
|
-
constructor(t) {
|
|
9
|
-
super(t);
|
|
10
|
-
i(this, "state");
|
|
11
|
-
i(this, "container");
|
|
12
|
-
i(this, "enabled");
|
|
13
|
-
this.five = t, this.five.once("dispose", this.dispose), this.enabled = !0, this.state = this.initState();
|
|
14
|
-
}
|
|
15
|
-
enable(t) {
|
|
16
|
-
this.enabled = !0, this.updateState({ ...t, userAction: !0 });
|
|
17
|
-
}
|
|
18
|
-
disable(t) {
|
|
19
|
-
this.enabled = !1, this.updateState({ ...t, userAction: !0 });
|
|
20
|
-
}
|
|
21
|
-
show(t) {
|
|
22
|
-
if (!!this.state.enabled)
|
|
23
|
-
return this.setState({ ...this.state, visible: !0 }, t), Promise.resolve();
|
|
24
|
-
}
|
|
25
|
-
hide(t) {
|
|
26
|
-
if (!!this.state.enabled)
|
|
27
|
-
return this.setState({ ...this.state, visible: !1 }, t), Promise.resolve();
|
|
28
|
-
}
|
|
29
|
-
dispose() {
|
|
30
|
-
this.container.remove();
|
|
31
|
-
}
|
|
32
|
-
setState(t, a) {
|
|
33
|
-
if (!this.enabled)
|
|
34
|
-
return;
|
|
35
|
-
const r = { ...this.state };
|
|
36
|
-
this.state = { ...this.state, ...t, ...a }, this.stateChangedCallback(r, a);
|
|
37
|
-
}
|
|
38
|
-
get visible() {
|
|
39
|
-
return this.five.state.mode === o.Mode.Panorama;
|
|
40
|
-
}
|
|
41
|
-
appendTo(t) {
|
|
42
|
-
!this.enabled || (this.container = t, this.render());
|
|
43
|
-
}
|
|
44
|
-
updateState(t) {
|
|
45
|
-
this.setState({ ...this.state, enabled: this.enabled, visible: this.visible }, t);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
export {
|
|
49
|
-
v as BasePanoPluginController
|
|
50
|
-
};
|
|
1
|
+
"use strict";var u=Object.defineProperty,d=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var c=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var n=(s,t,e)=>t in s?u(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,i=(s,t)=>{for(var e in t||(t={}))c.call(t,e)&&n(s,e,t[e]);if(h)for(var e of h(t))v.call(t,e)&&n(s,e,t[e]);return s},a=(s,t)=>d(s,b(t));var r=(s,t,e)=>(n(s,typeof t!="symbol"?t+"":t,e),e);const f=require("@realsee/five"),p=require("../base/BasePlugin.js");class P extends p.Controller{constructor(e){super(e);r(this,"state");r(this,"container");r(this,"enabled");this.five=e,this.five.once("dispose",this.dispose),this.enabled=!0,this.state=this.initState()}enable(e){this.enabled=!0,this.updateState(a(i({},e),{userAction:!0}))}disable(e){this.enabled=!1,this.updateState(a(i({},e),{userAction:!0}))}show(e){if(!!this.state.enabled)return this.setState(a(i({},this.state),{visible:!0}),e),Promise.resolve()}hide(e){if(!!this.state.enabled)return this.setState(a(i({},this.state),{visible:!1}),e),Promise.resolve()}dispose(){this.container.remove()}setState(e,l){if(!this.enabled)return;const o=i({},this.state);this.state=i(i(i({},this.state),e),l),this.stateChangedCallback(o,l)}get visible(){return this.five.state.mode===f.Five.Mode.Panorama}appendTo(e){!this.enabled||(this.container=e,this.render())}updateState(e){this.setState(a(i({},this.state),{enabled:this.enabled,visible:this.visible}),e)}}exports.BasePanoPluginController=P;
|
|
@@ -1,215 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
var A = (x, v, e) => v in x ? V(x, v, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[v] = e;
|
|
3
|
-
var a = (x, v, e) => (A(x, typeof v != "symbol" ? v + "" : v, e), e);
|
|
4
|
-
import { Raycaster as M, Vector3 as P, Quaternion as T, Euler as D } from "three";
|
|
5
|
-
import { BasePanoPluginController as y } from "./BaseController.js";
|
|
6
|
-
import E from "./DoorLabelItem.js";
|
|
7
|
-
import { getCameraToward as O, isTwoRectOverlaped as _, getDistance as S, getToward as k } from "./utils.js";
|
|
8
|
-
import "@realsee/five";
|
|
9
|
-
import "../base/BasePlugin.js";
|
|
10
|
-
import "../shared-utils/Subscribe.js";
|
|
11
|
-
import "../index.164f1850.js";
|
|
12
|
-
import "../index.f2f85d71.js";
|
|
13
|
-
const C = { userAction: !0 };
|
|
14
|
-
class Q extends y {
|
|
15
|
-
constructor(e) {
|
|
16
|
-
super(e);
|
|
17
|
-
a(this, "MinVisibledistance", 1.8);
|
|
18
|
-
a(this, "MaxVisibledistance", 5);
|
|
19
|
-
a(this, "OffsetHeight", -1.3);
|
|
20
|
-
a(this, "rooms");
|
|
21
|
-
a(this, "floorplanServerData");
|
|
22
|
-
a(this, "doorLabelItems");
|
|
23
|
-
a(this, "visibleLabelMap", /* @__PURE__ */ new Map());
|
|
24
|
-
a(this, "labelItems", []);
|
|
25
|
-
a(this, "doorLabels");
|
|
26
|
-
a(this, "roomObservers");
|
|
27
|
-
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((c) => {
|
|
29
|
-
c.$destroy();
|
|
30
|
-
}), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData = e, this.five.once("panoArrived", () => {
|
|
31
|
-
console.log("doorplugin", "panoArrived"), this.initData();
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
a(this, "initRoomObservers", () => {
|
|
35
|
-
var l, h;
|
|
36
|
-
const e = this.floorplanServerData.computed_data.floor_datas || [], c = (((h = (l = this.five) == null ? void 0 : l.work) == null ? void 0 : h.observers) || []).map((s) => {
|
|
37
|
-
const o = s.panoIndex, f = s.floorIndex, i = e == null ? void 0 : e.find((t) => t.floor_index === f);
|
|
38
|
-
if (i) {
|
|
39
|
-
const t = i.rooms.find((r) => r.observer_indexs.includes(o));
|
|
40
|
-
if (t)
|
|
41
|
-
return { panoIndex: o, floorIndex: f, name: t.name };
|
|
42
|
-
}
|
|
43
|
-
}).filter(Boolean);
|
|
44
|
-
this.roomObservers = c;
|
|
45
|
-
});
|
|
46
|
-
a(this, "hideAllLabels", () => {
|
|
47
|
-
this.labelItems.forEach((e) => {
|
|
48
|
-
e.visible = !1, e.inSight = !1;
|
|
49
|
-
}), this.render();
|
|
50
|
-
});
|
|
51
|
-
a(this, "fixDoorVisibleAndPosition", () => {
|
|
52
|
-
this.initRoomObservers();
|
|
53
|
-
const { panoIndex: e } = this.five;
|
|
54
|
-
if (!this.visible || this.five.model.empty || e === null || !this.roomObservers.find((s) => s.panoIndex === e))
|
|
55
|
-
return;
|
|
56
|
-
const n = this.roomObservers.find((s) => s.panoIndex === e), l = this.five.work.observers.find((s) => s.panoIndex === e).position.clone(), h = (() => {
|
|
57
|
-
if (this.visibleLabelMap.has(e))
|
|
58
|
-
return this.visibleLabelMap.get(e);
|
|
59
|
-
{
|
|
60
|
-
const s = [];
|
|
61
|
-
return this.doorLabels.forEach((o, f) => {
|
|
62
|
-
if (o.roomName === n.name)
|
|
63
|
-
return;
|
|
64
|
-
const i = o.position.clone(), t = i.distanceTo(l);
|
|
65
|
-
if (t < this.MinVisibledistance || t > this.MaxVisibledistance)
|
|
66
|
-
return;
|
|
67
|
-
const r = new M(), d = i.clone().sub(l).normalize();
|
|
68
|
-
r.set(l, d);
|
|
69
|
-
const [p] = this.five.model.intersectRaycaster(r);
|
|
70
|
-
p && p.distance + 0.1 < t || s.push(f);
|
|
71
|
-
}), this.visibleLabelMap.set(e, s), s;
|
|
72
|
-
}
|
|
73
|
-
})();
|
|
74
|
-
this.labelItems.forEach((s, o) => {
|
|
75
|
-
s.visible = h.includes(o);
|
|
76
|
-
}), this.fixDoorPosition();
|
|
77
|
-
});
|
|
78
|
-
a(this, "fixDoorPosition", () => {
|
|
79
|
-
const { panoIndex: e, camera: n } = this.five;
|
|
80
|
-
if (e === null)
|
|
81
|
-
return;
|
|
82
|
-
if (this.five.currentMode !== "Panorama")
|
|
83
|
-
return this.hideAllLabels();
|
|
84
|
-
const c = this.five.getElement(), l = c.clientWidth, h = c.clientHeight, s = n.getWorldDirection(new P()), o = [], f = [...this.labelItems];
|
|
85
|
-
if (f.forEach((i, t) => {
|
|
86
|
-
if (i.visible) {
|
|
87
|
-
const r = n.position.distanceTo(i.position), d = i.position.clone().add(new P(0, this.OffsetHeight, 0)), g = d.clone().sub(n.position).normalize().angleTo(s), u = d.clone().project(n), b = (u.x + 1) / 2.2 * 100, m = (-u.y + 1) / 2.2 * 100, I = b >= 0 && b <= 100 && m >= 0 && m <= 100 && r > this.MinVisibledistance && r <= this.MaxVisibledistance;
|
|
88
|
-
i.left = b, i.top = m, i.inSight = I && g < Math.PI / 2, i.cameraToward = O(this.five), I ? o.push({ disFromCameraToLabel: r, left: b, top: m, index: t }) : i.transform = "translate(-50%, -50%)";
|
|
89
|
-
} else
|
|
90
|
-
i.inSight = !1;
|
|
91
|
-
}), o.length > 1) {
|
|
92
|
-
let i = 0;
|
|
93
|
-
o.sort((t, r) => r.disFromCameraToLabel - t.disFromCameraToLabel);
|
|
94
|
-
for (let t = 1; t < o.length; t++) {
|
|
95
|
-
const { index: r, left: d, top: p } = o[t - 1], { index: g, left: u, top: b } = o[t], m = this.container.children[r], I = this.container.children[g];
|
|
96
|
-
if (!m || !I)
|
|
97
|
-
return;
|
|
98
|
-
const w = {
|
|
99
|
-
left: l * d / 100,
|
|
100
|
-
top: h * p / 100,
|
|
101
|
-
width: m.children[0].clientWidth,
|
|
102
|
-
height: m.children[0].clientHeight
|
|
103
|
-
}, L = {
|
|
104
|
-
left: l * u / 100,
|
|
105
|
-
top: h * b / 100,
|
|
106
|
-
width: I.children[0].clientWidth,
|
|
107
|
-
height: I.children[0].clientHeight
|
|
108
|
-
};
|
|
109
|
-
_(w, L) && (i++, f[r].transform = `translate(-50%, ${(i - 1) * 100 - 50}%)`, f[g].transform = `translate(-50%, ${i * 100 - 50}%)`);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
this.labelItems = f, this.render();
|
|
113
|
-
});
|
|
114
|
-
a(this, "onClick", (e, n) => {
|
|
115
|
-
if (!this.roomObservers)
|
|
116
|
-
return;
|
|
117
|
-
const { work: c } = this.five;
|
|
118
|
-
let l, h, s = 1 / 0;
|
|
119
|
-
for (let o = 0; o < c.observers.length; o++) {
|
|
120
|
-
if (this.roomObservers[o].name !== e)
|
|
121
|
-
continue;
|
|
122
|
-
const i = c.observers[o].standingPosition, t = n.distanceTo(i);
|
|
123
|
-
t < s && (l = o, h = i.clone().sub(n).normalize(), s = t);
|
|
124
|
-
}
|
|
125
|
-
if (h !== null && l !== null) {
|
|
126
|
-
const o = {};
|
|
127
|
-
if (s > 0) {
|
|
128
|
-
const i = new P(0, 0, -1), t = h.clone(), r = new T();
|
|
129
|
-
r.setFromUnitVectors(i, t);
|
|
130
|
-
const d = new D();
|
|
131
|
-
d.setFromQuaternion(r, "YXZ"), o.longitude = d.y;
|
|
132
|
-
}
|
|
133
|
-
this.five.emit("wantsToMoveToPano", l, {}, !0) || this.five.moveToPano(l, { longitude: o.longitude });
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
a(this, "initData", () => {
|
|
137
|
-
var l;
|
|
138
|
-
this.doorLabels = [];
|
|
139
|
-
const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index, c = n !== void 0 && ((l = this.floorplanServerData.computed_data.floor_datas[n]) == null ? void 0 : l.rooms);
|
|
140
|
-
this.rooms = c, this.rooms && this.rooms.length > 0 && this.rooms.forEach((h) => {
|
|
141
|
-
var f;
|
|
142
|
-
const s = (f = this.floorplanServerData.computed_data.doors) == null ? void 0 : f.filter((i) => !!(i && i.name === h.name)), o = this.five.work.observers.filter((i, t) => !!h.observer_indexs.find((r) => r === t));
|
|
143
|
-
s && s.forEach((i) => {
|
|
144
|
-
const t = i.position;
|
|
145
|
-
let r = 1 / 0, d;
|
|
146
|
-
o.forEach((g) => {
|
|
147
|
-
const u = g.standingPosition, b = {
|
|
148
|
-
x: u.x,
|
|
149
|
-
y: u.y,
|
|
150
|
-
z: u.z
|
|
151
|
-
}, m = S(t, b);
|
|
152
|
-
m < r && (r = m, d = b);
|
|
153
|
-
}), d && (t.y = d.y + 0.01);
|
|
154
|
-
const p = new P(t.x, t.y, t.z);
|
|
155
|
-
p.add(new P(-0.2, 1.8, 0).applyEuler(new D(0, i.rad, 0))), this.doorLabels.push({
|
|
156
|
-
roomName: h.name,
|
|
157
|
-
name: i.name,
|
|
158
|
-
position: p,
|
|
159
|
-
toward: k(i.rad)
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
}), this.labelItems = this.doorLabels.map((h) => ({
|
|
163
|
-
...h,
|
|
164
|
-
left: 0,
|
|
165
|
-
top: 0,
|
|
166
|
-
visible: !1,
|
|
167
|
-
inSight: !1,
|
|
168
|
-
transform: "",
|
|
169
|
-
cameraToward: ""
|
|
170
|
-
})), console.log("doorplugin", "labelItems", this.labelItems), this.five.on("wantsToMoveToPano", this.hideAllLabels), this.five.on("modelLoaded", this.fixDoorVisibleAndPosition), this.five.on("panoArrived", this.fixDoorVisibleAndPosition), this.five.on("initAnimationEnded", this.fixDoorPosition), this.five.on("cameraUpdate", this.fixDoorPosition), this.five.on("mouseWheel", this.fixDoorPosition), this.five.on("pinchGesture", this.fixDoorPosition), this.fixDoorVisibleAndPosition();
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
stateChangedCallback(e, n) {
|
|
174
|
-
if (this.hooks.hasListener("stateChange")) {
|
|
175
|
-
const c = {
|
|
176
|
-
state: this.state,
|
|
177
|
-
prevState: e,
|
|
178
|
-
userAction: n ? n.userAction : C.userAction
|
|
179
|
-
};
|
|
180
|
-
this.hooks.emit("stateChange", c);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
render() {
|
|
184
|
-
if (!this.enabled) {
|
|
185
|
-
this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((e) => {
|
|
186
|
-
e == null || e.$destroy();
|
|
187
|
-
}), this.doorLabels = void 0;
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
this.doorLabelItems && this.doorLabelItems.forEach((e) => {
|
|
191
|
-
e.$destroy();
|
|
192
|
-
}), this.doorLabelItems = [], this.labelItems.forEach((e) => {
|
|
193
|
-
this.doorLabelItems.push(
|
|
194
|
-
new E({
|
|
195
|
-
target: this.container,
|
|
196
|
-
props: {
|
|
197
|
-
props: e,
|
|
198
|
-
onClick: () => {
|
|
199
|
-
this.onClick(e.name, e.position);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
})
|
|
203
|
-
);
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
initState() {
|
|
207
|
-
return { enabled: !0, visible: !0 };
|
|
208
|
-
}
|
|
209
|
-
dispose() {
|
|
210
|
-
this.five && (this.five.off("wantsToMoveToPano", this.hideAllLabels), this.five.off("modelLoaded", this.fixDoorVisibleAndPosition), this.five.off("panoArrived", this.fixDoorVisibleAndPosition), this.five.off("initAnimationEnded", this.fixDoorPosition), this.five.off("cameraUpdate", this.fixDoorPosition), this.five.off("mouseWheel", this.fixDoorPosition), this.five.off("pinchGesture", this.fixDoorPosition), super.dispose());
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
export {
|
|
214
|
-
Q as PanoDoorLabelPluginController
|
|
215
|
-
};
|
|
1
|
+
"use strict";var T=Object.defineProperty,y=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var L=(m,l,e)=>l in m?T(m,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):m[l]=e,V=(m,l)=>{for(var e in l||(l={}))_.call(l,e)&&L(m,e,l[e]);if(w)for(var e of w(l))C.call(l,e)&&L(m,e,l[e]);return m},A=(m,l)=>y(m,O(l));var a=(m,l,e)=>(L(m,typeof l!="symbol"?l+"":l,e),e);const p=require("three"),S=require("./BaseController.js"),k=require("./DoorLabelItem.js"),D=require("./utils.js"),H={userAction:!0};class R extends S.BasePanoPluginController{constructor(e){super(e);a(this,"MinVisibledistance",1.8);a(this,"MaxVisibledistance",5);a(this,"OffsetHeight",-1.3);a(this,"rooms");a(this,"floorplanServerData");a(this,"doorLabelItems");a(this,"visibleLabelMap",new Map);a(this,"labelItems",[]);a(this,"doorLabels");a(this,"roomObservers");a(this,"loadData",(e,n)=>{n&&(this.MaxVisibledistance=n.MaxVisibledistance,this.MinVisibledistance=n.MinVisibledistance,this.OffsetHeight=n.OffsetHeight),this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(f=>{f.$destroy()}),this.labelItems=[],this.doorLabels=[],this.doorLabelItems=[],this.floorplanServerData=e,this.five.once("panoArrived",()=>{console.log("doorplugin","panoArrived"),this.initData()})});a(this,"initRoomObservers",()=>{var c,h;const e=this.floorplanServerData.computed_data.floor_datas||[],f=(((h=(c=this.five)==null?void 0:c.work)==null?void 0:h.observers)||[]).map(s=>{const o=s.panoIndex,d=s.floorIndex,i=e==null?void 0:e.find(t=>t.floor_index===d);if(i){const t=i.rooms.find(r=>r.observer_indexs.includes(o));if(t)return{panoIndex:o,floorIndex:d,name:t.name}}}).filter(Boolean);this.roomObservers=f});a(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1}),this.render()});a(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.visible||this.five.model.empty||e===null||!this.roomObservers.find(s=>s.panoIndex===e))return;const n=this.roomObservers.find(s=>s.panoIndex===e),c=this.five.work.observers.find(s=>s.panoIndex===e).position.clone(),h=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const s=[];return this.doorLabels.forEach((o,d)=>{if(o.roomName===n.name)return;const i=o.position.clone(),t=i.distanceTo(c);if(t<this.MinVisibledistance||t>this.MaxVisibledistance)return;const r=new p.Raycaster,b=i.clone().sub(c).normalize();r.set(c,b);const[x]=this.five.model.intersectRaycaster(r);x&&x.distance+.1<t||s.push(d)}),this.visibleLabelMap.set(e,s),s}})();this.labelItems.forEach((s,o)=>{s.visible=h.includes(o)}),this.fixDoorPosition()});a(this,"fixDoorPosition",()=>{const{panoIndex:e,camera:n}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const f=this.five.getElement(),c=f.clientWidth,h=f.clientHeight,s=n.getWorldDirection(new p.Vector3),o=[],d=[...this.labelItems];if(d.forEach((i,t)=>{if(i.visible){const r=n.position.distanceTo(i.position),b=i.position.clone().add(new p.Vector3(0,this.OffsetHeight,0)),P=b.clone().sub(n.position).normalize().angleTo(s),g=b.clone().project(n),u=(g.x+1)/2.2*100,v=(-g.y+1)/2.2*100,I=u>=0&&u<=100&&v>=0&&v<=100&&r>this.MinVisibledistance&&r<=this.MaxVisibledistance;i.left=u,i.top=v,i.inSight=I&&P<Math.PI/2,i.cameraToward=D.getCameraToward(this.five),I?o.push({disFromCameraToLabel:r,left:u,top:v,index:t}):i.transform="translate(-50%, -50%)"}else i.inSight=!1}),o.length>1){let i=0;o.sort((t,r)=>r.disFromCameraToLabel-t.disFromCameraToLabel);for(let t=1;t<o.length;t++){const{index:r,left:b,top:x}=o[t-1],{index:P,left:g,top:u}=o[t],v=this.container.children[r],I=this.container.children[P];if(!v||!I)return;const E={left:c*b/100,top:h*x/100,width:v.children[0].clientWidth,height:v.children[0].clientHeight},M={left:c*g/100,top:h*u/100,width:I.children[0].clientWidth,height:I.children[0].clientHeight};D.isTwoRectOverlaped(E,M)&&(i++,d[r].transform=`translate(-50%, ${(i-1)*100-50}%)`,d[P].transform=`translate(-50%, ${i*100-50}%)`)}}this.labelItems=d,this.render()});a(this,"onClick",(e,n)=>{if(!this.roomObservers)return;const{work:f}=this.five;let c,h,s=1/0;for(let o=0;o<f.observers.length;o++){if(this.roomObservers[o].name!==e)continue;const i=f.observers[o].standingPosition,t=n.distanceTo(i);t<s&&(c=o,h=i.clone().sub(n).normalize(),s=t)}if(h!==null&&c!==null){const o={};if(s>0){const i=new p.Vector3(0,0,-1),t=h.clone(),r=new p.Quaternion;r.setFromUnitVectors(i,t);const b=new p.Euler;b.setFromQuaternion(r,"YXZ"),o.longitude=b.y}this.five.emit("wantsToMoveToPano",c,{},!0)||this.five.moveToPano(c,{longitude:o.longitude})}});a(this,"initData",()=>{var c;this.doorLabels=[];const e=this.five.panoIndex,n=this.floorplanServerData.computed_data.observers[e].floor_index,f=n!==void 0&&((c=this.floorplanServerData.computed_data.floor_datas[n])==null?void 0:c.rooms);this.rooms=f,this.rooms&&this.rooms.length>0&&this.rooms.forEach(h=>{var d;const s=(d=this.floorplanServerData.computed_data.doors)==null?void 0:d.filter(i=>!!(i&&i.name===h.name)),o=this.five.work.observers.filter((i,t)=>!!h.observer_indexs.find(r=>r===t));s&&s.forEach(i=>{const t=i.position;let r=1/0,b;o.forEach(P=>{const g=P.standingPosition,u={x:g.x,y:g.y,z:g.z},v=D.getDistance(t,u);v<r&&(r=v,b=u)}),b&&(t.y=b.y+.01);const x=new p.Vector3(t.x,t.y,t.z);x.add(new p.Vector3(-.2,1.8,0).applyEuler(new p.Euler(0,i.rad,0))),this.doorLabels.push({roomName:h.name,name:i.name,position:x,toward:D.getToward(i.rad)})})}),this.labelItems=this.doorLabels.map(h=>A(V({},h),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),console.log("doorplugin","labelItems",this.labelItems),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("modelLoaded",this.fixDoorVisibleAndPosition),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}stateChangedCallback(e,n){if(this.hooks.hasListener("stateChange")){const f={state:this.state,prevState:e,userAction:n?n.userAction:H.userAction};this.hooks.emit("stateChange",f)}}render(){if(!this.enabled){this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(e=>{e==null||e.$destroy()}),this.doorLabels=void 0;return}this.doorLabelItems&&this.doorLabelItems.forEach(e=>{e.$destroy()}),this.doorLabelItems=[],this.labelItems.forEach(e=>{this.doorLabelItems.push(new k.DoorLabelItem({target:this.container,props:{props:e,onClick:()=>{this.onClick(e.name,e.position)}}}))})}initState(){return{enabled:!0,visible:!0}}dispose(){this.five&&(this.five.off("wantsToMoveToPano",this.hideAllLabels),this.five.off("modelLoaded",this.fixDoorVisibleAndPosition),this.five.off("panoArrived",this.fixDoorVisibleAndPosition),this.five.off("initAnimationEnded",this.fixDoorPosition),this.five.off("cameraUpdate",this.fixDoorPosition),this.five.off("mouseWheel",this.fixDoorPosition),this.five.off("pinchGesture",this.fixDoorPosition),super.dispose())}}exports.PanoDoorLabelPluginController=R;
|
|
@@ -1,65 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { c as y } from "../index.f2f85d71.js";
|
|
3
|
-
function W(e) {
|
|
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
|
-
}
|
|
6
|
-
function q(e) {
|
|
7
|
-
let l, t, o, s, a, n, i, c;
|
|
8
|
-
return {
|
|
9
|
-
c() {
|
|
10
|
-
l = d("div"), t = d("div"), o = d("span"), o.textContent = `${e[8]}`, s = j(), a = d("i"), p(o, "class", "plugin-DoorLabelPlugin-txt svelte-wpy7pz"), p(a, "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
|
-
},
|
|
12
|
-
m(g, u) {
|
|
13
|
-
x(g, l, u), b(l, t), b(t, o), b(t, s), b(t, a), e[10](l), i || (c = B(t, "click", e[9]), i = !0);
|
|
14
|
-
},
|
|
15
|
-
p(g, [u]) {
|
|
16
|
-
u & 1 && n !== (n = v(y("plugin-DoorLabelPlugin-cnt", g[0].toward)) + " svelte-wpy7pz") && p(t, "class", n);
|
|
17
|
-
},
|
|
18
|
-
i: f,
|
|
19
|
-
o: f,
|
|
20
|
-
d(g) {
|
|
21
|
-
g && S(l), e[10](null), i = !1, c();
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
function E(e, l, t) {
|
|
26
|
-
let { props: o } = l, { onClick: s } = l, a, { left: n, top: i, inSight: c, transform: g, panoIndex: u, cameraToward: z, name: P } = o, m = 0;
|
|
27
|
-
const D = () => {
|
|
28
|
-
if (!n || !i || !c || !a)
|
|
29
|
-
return;
|
|
30
|
-
const r = a.current.clientWidth / window.innerWidth * 100, w = a.current.clientHeight / window.innerHeight * 100;
|
|
31
|
-
if (n <= r / 2 || n >= 100 - r / 2 || i <= w / 2 || i >= 100 - w / 2)
|
|
32
|
-
return;
|
|
33
|
-
u !== m && (console.log("panoDoorLabelPlugin", u, "\u89E6\u53D1\u57CB\u70B9"), m = u);
|
|
34
|
-
}, L = (r) => {
|
|
35
|
-
s && s();
|
|
36
|
-
};
|
|
37
|
-
function h(r) {
|
|
38
|
-
H[r ? "unshift" : "push"](() => {
|
|
39
|
-
a = r, t(2, a);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return e.$$set = (r) => {
|
|
43
|
-
"props" in r && t(0, o = r.props), "onClick" in r && t(1, s = r.onClick);
|
|
44
|
-
}, D(), [
|
|
45
|
-
o,
|
|
46
|
-
s,
|
|
47
|
-
a,
|
|
48
|
-
n,
|
|
49
|
-
i,
|
|
50
|
-
c,
|
|
51
|
-
g,
|
|
52
|
-
z,
|
|
53
|
-
P,
|
|
54
|
-
L,
|
|
55
|
-
h
|
|
56
|
-
];
|
|
57
|
-
}
|
|
58
|
-
class T extends k {
|
|
59
|
-
constructor(l) {
|
|
60
|
-
super(), _(this, l, E, q, C, { props: 0, onClick: 1 }, W);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
export {
|
|
64
|
-
T as default
|
|
65
|
-
};
|
|
1
|
+
"use strict";const e=require("svelte/internal"),D=require("classnames"),L=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},m=L(D);function P(t){e.append_styles(t,"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)}')}function h(t){let n,l,i,s,a,o,p,c;return{c(){n=e.element("div"),l=e.element("div"),i=e.element("span"),i.textContent=`${t[8]}`,s=e.space(),a=e.element("i"),e.attr(i,"class","plugin-DoorLabelPlugin-txt svelte-wpy7pz"),e.attr(a,"class","plugin-DoorLabelPlugin-icon svelte-wpy7pz"),e.attr(l,"class",o=e.null_to_empty(m.default("plugin-DoorLabelPlugin-cnt",t[0].toward))+" svelte-wpy7pz"),e.attr(l,"style",`transform: ${t[6]||"initial"};pointer-events: ${t[5]?"auto":"none"};opacity: ${t[5]?1:0}`),e.attr(l,"data-camera-toward",t[7]),e.attr(n,"style",`left: ${t[3]||0}%;top: ${t[4]||0}%;opacity: ${t[5]?1:0}`),e.attr(n,"class","plugin-DoorLabelPlugin-item svelte-wpy7pz")},m(g,u){e.insert(g,n,u),e.append(n,l),e.append(l,i),e.append(l,s),e.append(l,a),t[10](n),p||(c=e.listen(l,"click",t[9]),p=!0)},p(g,[u]){u&1&&o!==(o=e.null_to_empty(m.default("plugin-DoorLabelPlugin-cnt",g[0].toward))+" svelte-wpy7pz")&&e.attr(l,"class",o)},i:e.noop,o:e.noop,d(g){g&&e.detach(n),t[10](null),p=!1,c()}}}function k(t,n,l){let{props:i}=n,{onClick:s}=n,a,{left:o,top:p,inSight:c,transform:g,panoIndex:u,cameraToward:w,name:v}=i,d=0;const f=()=>{if(!o||!p||!c||!a)return;const r=a.current.clientWidth/window.innerWidth*100,b=a.current.clientHeight/window.innerHeight*100;if(o<=r/2||o>=100-r/2||p<=b/2||p>=100-b/2)return;u!==d&&(console.log("panoDoorLabelPlugin",u,"\u89E6\u53D1\u57CB\u70B9"),d=u)},y=r=>{s&&s()};function z(r){e.binding_callbacks[r?"unshift":"push"](()=>{a=r,l(2,a)})}return t.$$set=r=>{"props"in r&&l(0,i=r.props),"onClick"in r&&l(1,s=r.onClick)},f(),[i,s,a,o,p,c,g,w,v,y,z]}class _ extends e.SvelteComponent{constructor(n){super(),e.init(this,n,k,h,e.safe_not_equal,{props:0,onClick:1},P)}}exports.DoorLabelItem=_;
|
|
@@ -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 @@
|
|
|
1
|
-
|
|
2
|
-
import "three";
|
|
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);
|
|
12
|
-
export {
|
|
13
|
-
b as PanoDoorLabelPlugin,
|
|
14
|
-
b as default
|
|
15
|
-
};
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./Controller.js");require("three");require("./BaseController.js");require("@realsee/five");require("../base/BasePlugin.js");require("../shared-utils/Subscribe.js");require("./DoorLabelItem.js");require("svelte/internal");require("classnames");require("./utils.js");const e=r=>new l.PanoDoorLabelPluginController(r);exports.PanoDoorLabelPlugin=e;exports.default=e;
|
|
@@ -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,23 +1 @@
|
|
|
1
|
-
|
|
2
|
-
function f(t, e) {
|
|
3
|
-
const n = Math.abs(t.top + t.height / 2 - e.top - e.height / 2), i = Math.abs(t.left + t.width / 2 - e.left - e.width / 2), o = (t.height + e.height) / 2, r = (t.width + e.width) / 2;
|
|
4
|
-
return !(n > o && i > r);
|
|
5
|
-
}
|
|
6
|
-
function s(t) {
|
|
7
|
-
const { camera: e } = t, n = e.getWorldDirection(new a());
|
|
8
|
-
let i = Math.atan(n.z / n.x) * 180 / Math.PI, o = "";
|
|
9
|
-
return n.x < 0 && (i += 180), i < 0 && (i += 360), i > 315 || i <= 45 ? o = "right" : i > 45 && i <= 135 ? o = "back" : i > 135 && i <= 225 ? o = "left" : i > 225 && i <= 315 && (o = "forward"), o;
|
|
10
|
-
}
|
|
11
|
-
function l(t, e) {
|
|
12
|
-
return Math.sqrt(Math.pow(t.z - e.z, 2) + Math.pow(t.x - e.x, 2));
|
|
13
|
-
}
|
|
14
|
-
function c(t) {
|
|
15
|
-
const e = Math.PI / 4;
|
|
16
|
-
return t > -e && t <= e ? "left" : t > e * 3 || t <= -e * 3 ? "right" : t > -e * 3 && t <= -e ? "forward" : t > e && t <= e * 3 ? "back" : "";
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
s as getCameraToward,
|
|
20
|
-
l as getDistance,
|
|
21
|
-
c as getToward,
|
|
22
|
-
f as isTwoRectOverlaped
|
|
23
|
-
};
|
|
1
|
+
"use strict";const r=require("three");function h(t,e){const o=Math.abs(t.top+t.height/2-e.top-e.height/2),i=Math.abs(t.left+t.width/2-e.left-e.width/2),n=(t.height+e.height)/2,a=(t.width+e.width)/2;return!(o>n&&i>a)}function s(t){const{camera:e}=t,o=e.getWorldDirection(new r.Vector3);let i=Math.atan(o.z/o.x)*180/Math.PI,n="";return o.x<0&&(i+=180),i<0&&(i+=360),i>315||i<=45?n="right":i>45&&i<=135?n="back":i>135&&i<=225?n="left":i>225&&i<=315&&(n="forward"),n}function l(t,e){return Math.sqrt(Math.pow(t.z-e.z,2)+Math.pow(t.x-e.x,2))}function f(t){const e=Math.PI/4;return t>-e&&t<=e?"left":t>e*3||t<=-e*3?"right":t>-e*3&&t<=-e?"forward":t>e&&t<=e*3?"back":""}exports.getCameraToward=s;exports.getDistance=l;exports.getToward=f;exports.isTwoRectOverlaped=h;
|
|
@@ -1,63 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
var a = (i, e, o) => e in i ? u(i, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : i[e] = o;
|
|
3
|
-
var t = (i, e, o) => (a(i, typeof e != "symbol" ? e + "" : e, o), o);
|
|
4
|
-
import l from "../Model/line.js";
|
|
5
|
-
import m from "../Model/point.js";
|
|
6
|
-
import { preventDefault as n } from "../utils/ironbox.js";
|
|
7
|
-
import "../../shared-utils/uuid.js";
|
|
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 {
|
|
18
|
-
constructor(e) {
|
|
19
|
-
t(this, "model");
|
|
20
|
-
t(this, "five");
|
|
21
|
-
t(this, "group");
|
|
22
|
-
t(this, "config");
|
|
23
|
-
t(this, "dashed");
|
|
24
|
-
t(this, "disposed", !1);
|
|
25
|
-
t(this, "isMobile");
|
|
26
|
-
t(this, "mouseGroup");
|
|
27
|
-
t(this, "container");
|
|
28
|
-
t(this, "fiveHelper");
|
|
29
|
-
t(this, "hook");
|
|
30
|
-
t(this, "magnifier");
|
|
31
|
-
t(this, "userDistanceItemCreator");
|
|
32
|
-
t(this, "updateDistanceUI", () => {
|
|
33
|
-
this.dashed.distanceItem.update(this.five), this.model.lines.forEach((e) => e.distanceItem.update(this.five));
|
|
34
|
-
});
|
|
35
|
-
var s, r;
|
|
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 = (r = (s = e.openParams) == null ? void 0 : s.isMobile) != null ? r : !1, this.userDistanceItemCreator = e.userDistanceItemCreator, this.group = e.group, this.mouseGroup = e.mouseGroup, this.dashed = new l(new m([0, 0, 0]), new m([0, 0, 0]), this.model), this.dashed.mesh.setMaterial({ dashed: !0, dashScale: 100 }), this.dashed.mesh.name = "dashLine";
|
|
37
|
-
const o = this.five.getElement();
|
|
38
|
-
o && (o.addEventListener("touchstart", n), o.addEventListener("contextmenu", n));
|
|
39
|
-
}
|
|
40
|
-
removeLine(e) {
|
|
41
|
-
this.group.remove(e.mesh, e.lightMesh), e.distanceItem.remove(), this.five.needsRender = !0;
|
|
42
|
-
}
|
|
43
|
-
updateMouseGroup(e, o) {
|
|
44
|
-
if (!e)
|
|
45
|
-
return this.mouseGroup;
|
|
46
|
-
const s = this.fiveHelper.getAdsorbentPoint(e), r = s || e.point;
|
|
47
|
-
if (this.mouseGroup.position.copy(r), o)
|
|
48
|
-
this.mouseGroup.quaternion.copy(o.quaternion);
|
|
49
|
-
else if (e.face) {
|
|
50
|
-
const h = e.face.normal.clone().multiplyScalar(0.05), d = e.point.clone().add(h).clone().add(h);
|
|
51
|
-
this.mouseGroup.lookAt(d);
|
|
52
|
-
}
|
|
53
|
-
return this.mouseGroup;
|
|
54
|
-
}
|
|
55
|
-
dispose() {
|
|
56
|
-
this.disposed = !0, this.magnifier.remove(), this.model.lines.forEach((o) => this.removeLine(o));
|
|
57
|
-
const e = this.five.getElement();
|
|
58
|
-
e && (e.removeEventListener("touchstart", n), e.removeEventListener("contextmenu", n));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
export {
|
|
62
|
-
H as default
|
|
63
|
-
};
|
|
1
|
+
"use strict";var a=Object.defineProperty;var d=(i,e,o)=>e in i?a(i,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[e]=o;var t=(i,e,o)=>(d(i,typeof e!="symbol"?e+"":e,o),o);const c=require("../Model/line.js"),l=require("../Model/point.js"),r=require("../utils/ironbox.js");class f{constructor(e){t(this,"model");t(this,"five");t(this,"group");t(this,"config");t(this,"dashed");t(this,"disposed",!1);t(this,"isMobile");t(this,"mouseGroup");t(this,"container");t(this,"fiveHelper");t(this,"hook");t(this,"magnifier");t(this,"userDistanceItemCreator");t(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.lines.forEach(e=>e.distanceItem.update(this.five))});var s,n;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 c.Line(new l.Point([0,0,0]),new l.Point([0,0,0]),this.model),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine";const o=this.five.getElement();o&&(o.addEventListener("touchstart",r.preventDefault),o.addEventListener("contextmenu",r.preventDefault))}removeLine(e){this.group.remove(e.mesh,e.lightMesh),e.distanceItem.remove(),this.five.needsRender=!0}updateMouseGroup(e,o){if(!e)return this.mouseGroup;const s=this.fiveHelper.getAdsorbentPoint(e),n=s||e.point;if(this.mouseGroup.position.copy(n),o)this.mouseGroup.quaternion.copy(o.quaternion);else if(e.face){const u=e.face.normal.clone().multiplyScalar(.05),h=e.point.clone().add(u).clone().add(u);this.mouseGroup.lookAt(h)}return this.mouseGroup}dispose(){this.disposed=!0,this.magnifier.remove(),this.model.lines.forEach(o=>this.removeLine(o));const e=this.five.getElement();e&&(e.removeEventListener("touchstart",r.preventDefault),e.removeEventListener("contextmenu",r.preventDefault))}}exports.BaseController=f;
|
|
@@ -1,114 +1 @@
|
|
|
1
|
-
var d =
|
|
2
|
-
var m = (h, n, e) => n in h ? d(h, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[n] = e;
|
|
3
|
-
var s = (h, n, e) => (m(h, typeof n != "symbol" ? n + "" : n, e), e);
|
|
4
|
-
import { H as u } from "../../hammer.b5b6115e.js";
|
|
5
|
-
import { Model as f } from "../Model/index.js";
|
|
6
|
-
import l from "../Model/line.js";
|
|
7
|
-
import p from "../Model/point.js";
|
|
8
|
-
import v from "../../shared-utils/throttle.js";
|
|
9
|
-
import c from "./BaseController.js";
|
|
10
|
-
import { getIntersectionFromEvent as r } from "../utils/getIntersectionFromEvent.js";
|
|
11
|
-
import "@realsee/five";
|
|
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 {
|
|
24
|
-
constructor(e) {
|
|
25
|
-
var i;
|
|
26
|
-
super(e);
|
|
27
|
-
s(this, "type", "edit");
|
|
28
|
-
s(this, "pressPoint");
|
|
29
|
-
s(this, "hasAppendDashed", !1);
|
|
30
|
-
s(this, "hasAppendMouseGroup", !1);
|
|
31
|
-
s(this, "fiveElement");
|
|
32
|
-
s(this, "lastPoint", null);
|
|
33
|
-
s(this, "hammer");
|
|
34
|
-
s(this, "onIntersectionUpdate", v((e, t) => {
|
|
35
|
-
var o;
|
|
36
|
-
this.hasAppendMouseGroup === !1 && (this.group.add(this.mouseGroup), this.magnifier.appendTo(this.container), this.hasAppendMouseGroup = !0);
|
|
37
|
-
const i = this.updateMouseGroup(e, t).position;
|
|
38
|
-
(o = this.pressPoint) == null || o.position.copy(i), this.updateDashed(), requestAnimationFrame(() => this.magnifier.renderWithPoint(this.mouseGroup.position)), this.five.needsRender = !0;
|
|
39
|
-
}, 20));
|
|
40
|
-
s(this, "revoke", () => {
|
|
41
|
-
if (this.model.lines.length === 0 && this.lastPoint) {
|
|
42
|
-
this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.distanceItem.remove(), this.group.remove(this.dashed.mesh), this.hook.emit("anchorChange", null), this.five.needsRender = !0;
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (this.model.lines.length === 0 && !this.lastPoint || !this.lastPoint)
|
|
46
|
-
return;
|
|
47
|
-
const e = this.model.lines[this.model.lines.length - 1], t = e.findAnotherPoint(this.lastPoint);
|
|
48
|
-
!t || (this.lastPoint = t, this.hook.emit("anchorChange", t.position), this.group.remove(e.mesh), this.model.removeLine(e), this.hasAppendMouseGroup = !1, this.mouseGroup.position.copy(this.lastPoint.position), this.group.remove(this.mouseGroup), e.distanceItem.remove(), this.updateDashed(), this.magnifier.remove(), this.five.needsRender = !0);
|
|
49
|
-
});
|
|
50
|
-
s(this, "onMouseLeave", () => {
|
|
51
|
-
this.magnifier.remove(), this.group.remove(this.mouseGroup), this.hasAppendMouseGroup = !1, this.lastPoint && (this.mouseGroup.position.copy(this.lastPoint.position), this.updateDashed());
|
|
52
|
-
});
|
|
53
|
-
s(this, "onLineChanged", () => {
|
|
54
|
-
this.hook.emit(
|
|
55
|
-
"editedLineChange",
|
|
56
|
-
this.model.lines.map((e) => e.toCompletelyJson())
|
|
57
|
-
);
|
|
58
|
-
});
|
|
59
|
-
s(this, "onPress", (e) => {
|
|
60
|
-
const [t] = r(this.five, e);
|
|
61
|
-
if (!t || !t.face)
|
|
62
|
-
return;
|
|
63
|
-
const i = new p(t.point);
|
|
64
|
-
this.pressPoint = i, this.onIntersectionUpdate(t);
|
|
65
|
-
});
|
|
66
|
-
s(this, "onPan", (e) => {
|
|
67
|
-
if (!this.pressPoint)
|
|
68
|
-
return;
|
|
69
|
-
const [t] = r(this.five, e);
|
|
70
|
-
!t || !t.face || this.onIntersectionUpdate(t);
|
|
71
|
-
});
|
|
72
|
-
s(this, "onPanEnd", (e) => {
|
|
73
|
-
!this.pressPoint || this.onTap(e);
|
|
74
|
-
});
|
|
75
|
-
s(this, "onTap", (e) => {
|
|
76
|
-
this.hasAppendDashed || (this.dashed.distanceItem.appendTo(this.container), this.group.add(this.dashed.mesh)), this.hasAppendDashed = !0;
|
|
77
|
-
const [t] = r(this.five, e);
|
|
78
|
-
this.updateMouseGroup(t);
|
|
79
|
-
const i = new p(this.mouseGroup.position), o = this.lastPoint;
|
|
80
|
-
if (i && (this.lastPoint = i), i && o) {
|
|
81
|
-
const a = new l(o, i, this.model);
|
|
82
|
-
a.distanceItem.appendTo(this.container), this.model.addLine(a), this.group.add(a.mesh), a.distanceItem.update(this.five);
|
|
83
|
-
}
|
|
84
|
-
this.pressPoint = void 0, this.hasAppendMouseGroup = !1, this.magnifier.remove(), this.group.remove(this.mouseGroup), this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", i.position);
|
|
85
|
-
});
|
|
86
|
-
s(this, "onWantsTapGesture", () => !1);
|
|
87
|
-
s(this, "onWantsToMoveToPano", () => !1);
|
|
88
|
-
s(this, "onWantsPanGesture", () => this.pressPoint ? !1 : void 0);
|
|
89
|
-
s(this, "onCameraUpdate", () => {
|
|
90
|
-
this.updateDistanceUI(), this.dashed.distanceItem.update(this.five);
|
|
91
|
-
});
|
|
92
|
-
s(this, "updateDashed", () => {
|
|
93
|
-
!this.lastPoint || (this.dashed.points[0].position.copy(this.lastPoint.position), this.dashed.points[1].position.copy(this.mouseGroup.position), this.dashed.mesh.setPoints(this.lastPoint.position, this.mouseGroup.position), this.dashed.distanceItem.update(this.five));
|
|
94
|
-
});
|
|
95
|
-
this.model = new f(this.config), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsPanGesture", this.onWantsPanGesture), this.five.on("wantsTapGesture", this.onWantsTapGesture), this.five.on("wantsToMoveToPano", this.onWantsToMoveToPano), this.five.on("intersectionOnModelUpdate", this.onIntersectionUpdate), this.model.hook.on("lineAdded", this.onLineChanged), this.model.hook.on("lineRemoved", this.onLineChanged);
|
|
96
|
-
const t = this.five.getElement();
|
|
97
|
-
if (t) {
|
|
98
|
-
this.fiveElement = t;
|
|
99
|
-
const o = new u(t);
|
|
100
|
-
this.hammer = o, o.on("tap", this.onTap), o.on("pan", this.onPan), o.on("press", this.onPress), o.on("panend", this.onPanEnd);
|
|
101
|
-
}
|
|
102
|
-
(i = this.fiveElement) == null || i.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.five.refresh();
|
|
103
|
-
}
|
|
104
|
-
dispose() {
|
|
105
|
-
var e, t;
|
|
106
|
-
super.dispose(), this.group.remove(this.mouseGroup, this.dashed.mesh), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsPanGesture", this.onWantsPanGesture), this.five.off("wantsTapGesture", this.onWantsTapGesture), this.five.off("wantsToMoveToPano", this.onWantsToMoveToPano), this.five.off("intersectionOnModelUpdate", this.onIntersectionUpdate), this.model.hook.off("lineAdded", this.onLineChanged), this.model.hook.off("lineRemoved", this.onLineChanged), (e = this.hammer) == null || e.destroy(), (t = this.fiveElement) == null || t.removeEventListener("mouseleave", this.onMouseLeave), this.magnifier.dispose(), this.dashed.distanceItem.remove(), this.five.needsRender = !0;
|
|
107
|
-
}
|
|
108
|
-
getEditingLines() {
|
|
109
|
-
return this.model.lines;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
export {
|
|
113
|
-
O as default
|
|
114
|
-
};
|
|
1
|
+
"use strict";var p=Object.defineProperty;var u=(i,h,e)=>h in i?p(i,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[h]=e;var s=(i,h,e)=>(u(i,typeof h!="symbol"?h+"":h,e),e);const l=require("hammerjs"),m=require("../Model/index.js"),f=require("../Model/line.js"),d=require("../Model/point.js"),c=require("../../shared-utils/throttle.js"),v=require("./BaseController.js"),r=require("../utils/getIntersectionFromEvent.js"),P=i=>i&&typeof i=="object"&&"default"in i?i:{default:i},g=P(l);class M extends v.BaseController{constructor(e){var o;super(e);s(this,"type","edit");s(this,"pressPoint");s(this,"hasAppendDashed",!1);s(this,"hasAppendMouseGroup",!1);s(this,"fiveElement");s(this,"lastPoint",null);s(this,"hammer");s(this,"onIntersectionUpdate",c.throttle((e,t)=>{var n;this.hasAppendMouseGroup===!1&&(this.group.add(this.mouseGroup),this.magnifier.appendTo(this.container),this.hasAppendMouseGroup=!0);const o=this.updateMouseGroup(e,t).position;(n=this.pressPoint)==null||n.position.copy(o),this.updateDashed(),requestAnimationFrame(()=>this.magnifier.renderWithPoint(this.mouseGroup.position)),this.five.needsRender=!0},20));s(this,"revoke",()=>{if(this.model.lines.length===0&&this.lastPoint){this.lastPoint=null,this.hasAppendDashed=!1,this.dashed.distanceItem.remove(),this.group.remove(this.dashed.mesh),this.hook.emit("anchorChange",null),this.five.needsRender=!0;return}if(this.model.lines.length===0&&!this.lastPoint||!this.lastPoint)return;const e=this.model.lines[this.model.lines.length-1],t=e.findAnotherPoint(this.lastPoint);!t||(this.lastPoint=t,this.hook.emit("anchorChange",t.position),this.group.remove(e.mesh),this.model.removeLine(e),this.hasAppendMouseGroup=!1,this.mouseGroup.position.copy(this.lastPoint.position),this.group.remove(this.mouseGroup),e.distanceItem.remove(),this.updateDashed(),this.magnifier.remove(),this.five.needsRender=!0)});s(this,"onMouseLeave",()=>{this.magnifier.remove(),this.group.remove(this.mouseGroup),this.hasAppendMouseGroup=!1,this.lastPoint&&(this.mouseGroup.position.copy(this.lastPoint.position),this.updateDashed())});s(this,"onLineChanged",()=>{this.hook.emit("editedLineChange",this.model.lines.map(e=>e.toCompletelyJson()))});s(this,"onPress",e=>{const[t]=r.getIntersectionFromEvent(this.five,e);if(!t||!t.face)return;const o=new d.Point(t.point);this.pressPoint=o,this.onIntersectionUpdate(t)});s(this,"onPan",e=>{if(!this.pressPoint)return;const[t]=r.getIntersectionFromEvent(this.five,e);!t||!t.face||this.onIntersectionUpdate(t)});s(this,"onPanEnd",e=>{!this.pressPoint||this.onTap(e)});s(this,"onTap",e=>{this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh)),this.hasAppendDashed=!0;const[t]=r.getIntersectionFromEvent(this.five,e);this.updateMouseGroup(t);const o=new d.Point(this.mouseGroup.position),n=this.lastPoint;if(o&&(this.lastPoint=o),o&&n){const a=new f.Line(n,o,this.model);a.distanceItem.appendTo(this.container),this.model.addLine(a),this.group.add(a.mesh),a.distanceItem.update(this.five)}this.pressPoint=void 0,this.hasAppendMouseGroup=!1,this.magnifier.remove(),this.group.remove(this.mouseGroup),this.updateDashed(),this.five.needsRender=!0,this.hook.emit("anchorChange",o.position)});s(this,"onWantsTapGesture",()=>!1);s(this,"onWantsToMoveToPano",()=>!1);s(this,"onWantsPanGesture",()=>this.pressPoint?!1:void 0);s(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});s(this,"updateDashed",()=>{!this.lastPoint||(this.dashed.points[0].position.copy(this.lastPoint.position),this.dashed.points[1].position.copy(this.mouseGroup.position),this.dashed.mesh.setPoints(this.lastPoint.position,this.mouseGroup.position),this.dashed.distanceItem.update(this.five))});this.model=new m.Model(this.config),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsPanGesture",this.onWantsPanGesture),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.on("intersectionOnModelUpdate",this.onIntersectionUpdate),this.model.hook.on("lineAdded",this.onLineChanged),this.model.hook.on("lineRemoved",this.onLineChanged);const t=this.five.getElement();if(t){this.fiveElement=t;const n=new g.default(t);this.hammer=n,n.on("tap",this.onTap),n.on("pan",this.onPan),n.on("press",this.onPress),n.on("panend",this.onPanEnd)}(o=this.fiveElement)==null||o.addEventListener("mouseleave",this.onMouseLeave),this.hook.emit("anchorChange",null),this.five.refresh()}dispose(){var e,t;super.dispose(),this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.onWantsPanGesture),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.off("intersectionOnModelUpdate",this.onIntersectionUpdate),this.model.hook.off("lineAdded",this.onLineChanged),this.model.hook.off("lineRemoved",this.onLineChanged),(e=this.hammer)==null||e.destroy(),(t=this.fiveElement)==null||t.removeEventListener("mouseleave",this.onMouseLeave),this.magnifier.dispose(),this.dashed.distanceItem.remove(),this.five.needsRender=!0}getEditingLines(){return this.model.lines}}exports.EditController=M;
|