@realsee/dnalogel 2.1.2-alpha.0 → 2.1.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -12
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +16 -16
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoTagPluginController.html +39 -39
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +12 -12
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/LinkType.html +7 -7
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +6 -11
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/ContentTypeMap.html +12 -12
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/LineJson.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +8 -8
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/OpenParameter.html +7 -7
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +11 -11
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/PointJson.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeyArray.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +1 -331
- package/libs/CSS3DRenderPlugin/Controller.js +1 -84
- package/libs/CSS3DRenderPlugin/index.js +1 -6
- package/libs/CSS3DRenderPlugin/typing.js +1 -0
- 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 -0
- package/libs/CSS3DRenderPlugin/utils/positionToVector3.js +1 -7
- package/libs/CSS3DRenderPlugin/utils/random.js +1 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +1 -88
- package/libs/CameraMovementPlugin/index.js +1 -0
- package/libs/CameraMovementPlugin/typing.js +1 -5
- package/libs/CruisePlugin/Controller.js +1 -484
- package/libs/CruisePlugin/index.js +1 -8
- package/libs/CruisePlugin/utils/coordinatesAngle.js +1 -8
- 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 -28
- package/libs/CruisePlugin/utils/sleep.js +1 -10
- package/libs/CruisePlugin/utils/vectorToCoordinates.js +1 -10
- package/libs/GuideLinePlugin/Controller.js +1 -144
- package/libs/GuideLinePlugin/index.js +1 -6
- package/libs/GuideLinePlugin/utils/getArrowMaterial.js +1 -13
- package/libs/GuideLinePlugin/utils/getLineGeometries.js +1 -64
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +1 -271
- package/libs/ItemLabelPlugin/ItemLabelItem.js +2 -133
- package/libs/ItemLabelPlugin/Plugin.js +2 -76
- package/libs/ItemLabelPlugin/index.js +1 -12
- 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 -21
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +1 -21
- package/libs/ModelChassisCompassPlugin/Plugin.js +1 -71
- package/libs/ModelChassisCompassPlugin/index.js +1 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +1 -78
- package/libs/ModelEntryDoorGuidePlugin/index.js +1 -0
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +1 -212
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +2 -42
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +2 -74
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelItemLabelPlugin/index.js +1 -12
- package/libs/ModelItemLabelPlugin/typings.js +1 -4
- package/libs/ModelItemLabelPlugin/utils/parseData.js +1 -19
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.js +1 -4
- package/libs/ModelRoomLabelPlugin/Controller.js +1 -60
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +1 -45
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +1 -162
- package/libs/ModelRoomLabelPlugin/index.js +1 -10
- package/libs/ModelRoomLabelPlugin/utils/parseData.js +1 -16
- package/libs/ModelTVVideoPlugin/Plugin.js +1 -164
- package/libs/ModelTVVideoPlugin/index.js +1 -0
- package/libs/ModelTVVideoPlugin/typings.js +1 -4
- package/libs/ModelTVVideoPlugin/utils/parseData.js +1 -20
- package/libs/ModelViewPlugin/Plugin.js +1 -107
- package/libs/ModelViewPlugin/index.js +1 -0
- package/libs/Object3DHelperPlugin/Controller.js +1 -145
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +1 -32
- package/libs/Object3DHelperPlugin/index.js +1 -10
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -4
- package/libs/PanoCompassPlugin/Controller.js +1 -224
- package/libs/PanoCompassPlugin/getRoomInfoInstance.js +1 -24
- package/libs/PanoCompassPlugin/index.js +1 -6
- package/libs/PanoCursorRaycasterPlugin/index.js +1 -59
- package/libs/PanoDoorLabelPlugin/BaseController.js +1 -59
- package/libs/PanoDoorLabelPlugin/Controller.js +1 -219
- package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +1 -65
- package/libs/PanoDoorLabelPlugin/index.js +1 -6
- package/libs/PanoDoorLabelPlugin/utils.js +1 -23
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +1 -53
- package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -102
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +1 -125
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +1 -33
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +1 -90
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +1 -154
- package/libs/PanoMeasurePlugin/Controller/index.js +1 -140
- package/libs/PanoMeasurePlugin/Model/index.js +1 -92
- package/libs/PanoMeasurePlugin/Model/line.js +1 -56
- package/libs/PanoMeasurePlugin/Model/point.js +1 -30
- 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 -62
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +2 -7
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +1 -130
- package/libs/PanoMeasurePlugin/index.js +1 -11
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +1 -12
- package/libs/PanoMeasurePlugin/utils/constants.js +1 -36
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +1 -62
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +1 -13
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +1 -15
- 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 +2 -263
- package/libs/PanoRulerPlugin/index.js +1 -0
- package/libs/PanoRulerPlugin/style.js +2 -5
- package/libs/PanoRulerProPlugin/Controller.js +1 -93
- package/libs/PanoRulerProPlugin/RulerItem.js +1 -128
- package/libs/PanoRulerProPlugin/RulerItems.js +1 -180
- package/libs/PanoRulerProPlugin/index.js +1 -6
- package/libs/PanoSpatialTagPlugin/Components/origins.js +1 -81
- package/libs/PanoSpatialTagPlugin/Components/tag.js +1 -124
- package/libs/PanoSpatialTagPlugin/Plugin.js +1 -247
- package/libs/PanoSpatialTagPlugin/index.js +1 -0
- package/libs/PanoSpatialTagPlugin/store.js +1 -5
- package/libs/PanoSpatialTagPlugin/style.js +1 -11
- package/libs/PanoSpatialTagPlugin/typings.js +1 -0
- 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 -166
- package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +1 -93
- package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +1 -90
- package/libs/PanoTagPlugin/Components/Common/Media.js +1 -393
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +1 -139
- package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +1 -170
- package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +1 -51
- package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +1 -51
- package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +1 -166
- package/libs/PanoTagPlugin/Components/Common/Shadow.js +15 -124
- package/libs/PanoTagPlugin/Components/Common/Text.js +1 -131
- package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +1 -134
- package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +1 -73
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +1 -192
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +1 -126
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +1 -258
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +1 -87
- package/libs/PanoTagPlugin/Components/Tag/TextTag.js +1 -122
- package/libs/PanoTagPlugin/Components/Tag/index.js +2 -289
- package/libs/PanoTagPlugin/Components/TagContainer.js +1 -156
- package/libs/PanoTagPlugin/Components/TagWrapper.js +1 -153
- package/libs/PanoTagPlugin/controller/TagCacheController.js +1 -31
- package/libs/PanoTagPlugin/controller/TagComputer.js +1 -264
- package/libs/PanoTagPlugin/controller/index.js +1 -377
- package/libs/PanoTagPlugin/index.js +1 -9
- package/libs/PanoTagPlugin/tag.config.js +1 -44
- package/libs/PanoTagPlugin/typings/controller.js +1 -0
- package/libs/PanoTagPlugin/typings/index.js +1 -0
- 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.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 -0
- 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 -15
- 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 -6
- package/libs/components/PaintBrush/Controller.js +1 -308
- package/libs/components/PaintBrush/Subscribe.js +1 -47
- package/libs/components/PaintBrush/index.js +1 -45
- package/libs/components/PaintBrush/style.js +2 -5
- package/libs/components/PaintBrush/tween.js +1 -11
- package/libs/components/PaintBrush/typings.js +1 -4
- package/libs/components/PaintBrush/utils.js +1 -45
- package/libs/components/index.js +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 -103
- package/libs/floorplan/Components/Camera.js +1 -62
- package/libs/floorplan/Components/Compass.js +1 -60
- package/libs/floorplan/Components/CurrentFloor.js +1 -246
- package/libs/floorplan/Components/Main.js +1 -264
- 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 -121
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +1 -153
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +1 -174
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +1 -196
- 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.js +1 -321
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -316
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -6
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +1 -85
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +1 -129
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +1 -72
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +1 -183
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -164
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -6
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -273
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -6
- package/libs/floorplan/constant.js +1 -4
- package/libs/floorplan/index.js +1 -0
- package/libs/floorplan/typings/floorplanData.js +1 -0
- package/libs/floorplan/typings/floorplanServerData.js +1 -101
- package/libs/floorplan/utils/constant.js +1 -7
- package/libs/floorplan/utils/correctFiveState.js +1 -54
- package/libs/floorplan/utils/formatData.js +1 -104
- package/libs/floorplan/utils/formatPosition.js +1 -35
- package/libs/index.js +1 -92
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +1 -152
- 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 -18
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -66
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +1 -109
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +1 -134
- package/libs/shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js +1 -79
- package/libs/shared-utils/Object3DHelper/Helper/HTML/tipsDom.js +1 -41
- package/libs/shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js +1 -14
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +1 -30
- package/libs/shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js +1 -35
- package/libs/shared-utils/Object3DHelper/Helper/OutlineHelper.js +1 -2
- package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js +1 -137
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +1 -136
- package/libs/shared-utils/Object3DHelper/Helper/index.js +1 -0
- package/libs/shared-utils/Object3DHelper/index.js +1 -169
- package/libs/shared-utils/Object3DHelper/typings/Direction.js +1 -0
- package/libs/shared-utils/Object3DHelper/typings/Hooks.js +1 -0
- package/libs/shared-utils/Object3DHelper/typings/Scissor.js +1 -0
- package/libs/shared-utils/Object3DHelper/typings/index.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/calculateThreeMouse.js +1 -11
- package/libs/shared-utils/Object3DHelper/utils/direction.js +1 -22
- package/libs/shared-utils/Object3DHelper/utils/filterNotColinearPoints.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.js +1 -14
- package/libs/shared-utils/Object3DHelper/utils/getPoint.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/index.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/normalPositionToPositions.js +1 -0
- package/libs/shared-utils/Object3DHelper/utils/object3DBoundingPosition.js +1 -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 -26
- package/libs/shared-utils/animationFrame/calculateProgress.js +1 -6
- package/libs/shared-utils/animationFrame/formatRad.js +1 -11
- package/libs/shared-utils/animationFrame/index.js +1 -31
- 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 -10
- package/libs/shared-utils/five/changeMode.js +1 -39
- package/libs/shared-utils/getPxmm.js +1 -21
- package/libs/shared-utils/index.js +1 -31
- 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 -0
- package/libs/shared-utils/math/planimetry.js +1 -48
- 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.js +1 -8
- package/libs/shared-utils/tap.js +1 -6
- package/libs/shared-utils/three/Assets/index.js +1 -4
- package/libs/shared-utils/three/FivePointSelector.js +1 -49
- package/libs/shared-utils/three/Magnifier.js +1 -104
- package/libs/shared-utils/three/PointDomHelper.js +1 -60
- package/libs/shared-utils/three/PointHelper.js +3 -60
- package/libs/shared-utils/three/getCoords.js +1 -13
- package/libs/shared-utils/three/getIntersect.js +1 -8
- package/libs/shared-utils/three/getRaycaster.js +1 -12
- package/libs/shared-utils/three/index.js +1 -0
- package/libs/shared-utils/three/loadTexture.js +1 -28
- package/libs/shared-utils/three/transformPositionToVector3.js +1 -5
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +1 -24
- package/libs/shared-utils/throttle.js +1 -11
- package/libs/shared-utils/tinyEJSrender.js +14 -138
- package/libs/shared-utils/to.js +1 -29
- 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 +187 -17
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/get-changed-params.js +0 -29
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/get-params.js +0 -23
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/mount-swiper.js +0 -14
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/params-list.js +0 -120
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/update-swiper.js +0 -36
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/utils.js +0 -32
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/svelte/swiper-slide.js +0 -182
- package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/svelte/swiper.js +0 -254
|
@@ -1,183 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { onMount as V } from "svelte";
|
|
3
|
-
import X from "./Camera.js";
|
|
4
|
-
import Y from "./CurrentFloor/CurrentFloor.js";
|
|
5
|
-
function Z(i) {
|
|
6
|
-
J(i, "svelte-1mvqyqq", ".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}");
|
|
7
|
-
}
|
|
8
|
-
function W(i) {
|
|
9
|
-
let t, l, r, e = i[6] !== 0 && A(i);
|
|
10
|
-
return {
|
|
11
|
-
c() {
|
|
12
|
-
t = S("div"), e && e.c(), F(t, "class", "plugin-floorplan-radar svelte-1mvqyqq"), L(() => i[12].call(t));
|
|
13
|
-
},
|
|
14
|
-
m(o, f) {
|
|
15
|
-
I(o, t, f), e && e.m(t, null), l = Q(t, i[12].bind(t)), r = !0;
|
|
16
|
-
},
|
|
17
|
-
p(o, f) {
|
|
18
|
-
o[6] !== 0 ? e ? (e.p(o, f), f & 64 && c(e, 1)) : (e = A(o), e.c(), c(e, 1), e.m(t, null)) : e && (C(), g(e, 1, 1, () => {
|
|
19
|
-
e = null;
|
|
20
|
-
}), M());
|
|
21
|
-
},
|
|
22
|
-
i(o) {
|
|
23
|
-
r || (c(e), r = !0);
|
|
24
|
-
},
|
|
25
|
-
o(o) {
|
|
26
|
-
g(e), r = !1;
|
|
27
|
-
},
|
|
28
|
-
d(o) {
|
|
29
|
-
o && k(t), e && e.d(), l();
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function A(i) {
|
|
34
|
-
let t, l, r, e, o = `${i[8]}px`, f = `${i[11]}px`, u;
|
|
35
|
-
const _ = [
|
|
36
|
-
{
|
|
37
|
-
five: i[0],
|
|
38
|
-
pxmm: i[9],
|
|
39
|
-
floorIndex: i[10],
|
|
40
|
-
floorplanData: i[3],
|
|
41
|
-
hoverEnable: i[2],
|
|
42
|
-
extraObjects: i[5]
|
|
43
|
-
}
|
|
44
|
-
];
|
|
45
|
-
let d = {};
|
|
46
|
-
for (let n = 0; n < _.length; n += 1)
|
|
47
|
-
d = z(d, _[n]);
|
|
48
|
-
l = new Y({ props: d });
|
|
49
|
-
const h = [
|
|
50
|
-
{
|
|
51
|
-
pxmm: i[9],
|
|
52
|
-
five: i[0],
|
|
53
|
-
floorplanData: i[3],
|
|
54
|
-
cameraImageUrl: i[4]
|
|
55
|
-
}
|
|
56
|
-
];
|
|
57
|
-
let m = {};
|
|
58
|
-
for (let n = 0; n < h.length; n += 1)
|
|
59
|
-
m = z(m, h[n]);
|
|
60
|
-
return e = new X({ props: m }), {
|
|
61
|
-
c() {
|
|
62
|
-
t = S("div"), E(l.$$.fragment), r = R(), E(e.$$.fragment), F(t, "class", "plugin-floorplan-radar-container svelte-1mvqyqq"), q(t, "width", o, !1), q(t, "height", f, !1);
|
|
63
|
-
},
|
|
64
|
-
m(n, s) {
|
|
65
|
-
I(n, t, s), O(l, t, null), T(t, r), O(e, t, null), u = !0;
|
|
66
|
-
},
|
|
67
|
-
p(n, s) {
|
|
68
|
-
const p = s & 1581 ? U(_, [
|
|
69
|
-
{
|
|
70
|
-
five: n[0],
|
|
71
|
-
pxmm: n[9],
|
|
72
|
-
floorIndex: n[10],
|
|
73
|
-
floorplanData: n[3],
|
|
74
|
-
hoverEnable: n[2],
|
|
75
|
-
extraObjects: n[5]
|
|
76
|
-
}
|
|
77
|
-
]) : {};
|
|
78
|
-
l.$set(p);
|
|
79
|
-
const v = s & 537 ? U(h, [
|
|
80
|
-
{
|
|
81
|
-
pxmm: n[9],
|
|
82
|
-
five: n[0],
|
|
83
|
-
floorplanData: n[3],
|
|
84
|
-
cameraImageUrl: n[4]
|
|
85
|
-
}
|
|
86
|
-
]) : {};
|
|
87
|
-
e.$set(v), s & 256 && o !== (o = `${n[8]}px`) && q(t, "width", o, !1), s & 2048 && f !== (f = `${n[11]}px`) && q(t, "height", f, !1);
|
|
88
|
-
},
|
|
89
|
-
i(n) {
|
|
90
|
-
u || (c(l.$$.fragment, n), c(e.$$.fragment, n), u = !0);
|
|
91
|
-
},
|
|
92
|
-
o(n) {
|
|
93
|
-
g(l.$$.fragment, n), g(e.$$.fragment, n), u = !1;
|
|
94
|
-
},
|
|
95
|
-
d(n) {
|
|
96
|
-
n && k(t), H(l), H(e);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function x(i) {
|
|
101
|
-
let t, l, r = i[1] && W(i);
|
|
102
|
-
return {
|
|
103
|
-
c() {
|
|
104
|
-
r && r.c(), t = K();
|
|
105
|
-
},
|
|
106
|
-
m(e, o) {
|
|
107
|
-
r && r.m(e, o), I(e, t, o), l = !0;
|
|
108
|
-
},
|
|
109
|
-
p(e, [o]) {
|
|
110
|
-
e[1] ? r ? (r.p(e, o), o & 2 && c(r, 1)) : (r = W(e), r.c(), c(r, 1), r.m(t.parentNode, t)) : r && (C(), g(r, 1, 1, () => {
|
|
111
|
-
r = null;
|
|
112
|
-
}), M());
|
|
113
|
-
},
|
|
114
|
-
i(e) {
|
|
115
|
-
l || (c(r), l = !0);
|
|
116
|
-
},
|
|
117
|
-
o(e) {
|
|
118
|
-
g(r), l = !1;
|
|
119
|
-
},
|
|
120
|
-
d(e) {
|
|
121
|
-
r && r.d(e), e && k(t);
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function $(i, t, l) {
|
|
126
|
-
let { five: r } = t, { visible: e } = t, { hoverEnable: o } = t, { floorplanData: f } = t, { cameraImageUrl: u } = t, { extraObjects: _ = [] } = t, d = 0, h = 0, m = 0, n = 0, s = 0, p = 0;
|
|
127
|
-
function v(a) {
|
|
128
|
-
l(10, h = r.work.observers[a].floorIndex);
|
|
129
|
-
}
|
|
130
|
-
V(() => (r.on("panoArrived", v), () => {
|
|
131
|
-
r.off("panoArrived", v);
|
|
132
|
-
}));
|
|
133
|
-
function N() {
|
|
134
|
-
m = this.clientWidth, n = this.clientHeight, l(6, m), l(7, n);
|
|
135
|
-
}
|
|
136
|
-
return i.$$set = (a) => {
|
|
137
|
-
"five" in a && l(0, r = a.five), "visible" in a && l(1, e = a.visible), "hoverEnable" in a && l(2, o = a.hoverEnable), "floorplanData" in a && l(3, f = a.floorplanData), "cameraImageUrl" in a && l(4, u = a.cameraImageUrl), "extraObjects" in a && l(5, _ = a.extraObjects);
|
|
138
|
-
}, i.$$.update = () => {
|
|
139
|
-
if (i.$$.dirty & 456) {
|
|
140
|
-
const a = Math.min(m, n), { max: D, min: j } = f.bounding, b = D.x - j.x, y = D.y - j.y, w = function() {
|
|
141
|
-
return b > y ? [a, a / b * y] : [a / y * b, a];
|
|
142
|
-
}();
|
|
143
|
-
l(8, s = w[0]), l(11, p = w[1]), l(9, d = s / b);
|
|
144
|
-
}
|
|
145
|
-
}, [
|
|
146
|
-
r,
|
|
147
|
-
e,
|
|
148
|
-
o,
|
|
149
|
-
f,
|
|
150
|
-
u,
|
|
151
|
-
_,
|
|
152
|
-
m,
|
|
153
|
-
n,
|
|
154
|
-
s,
|
|
155
|
-
d,
|
|
156
|
-
h,
|
|
157
|
-
p,
|
|
158
|
-
N
|
|
159
|
-
];
|
|
160
|
-
}
|
|
161
|
-
class ie extends P {
|
|
162
|
-
constructor(t) {
|
|
163
|
-
super(), B(
|
|
164
|
-
this,
|
|
165
|
-
t,
|
|
166
|
-
$,
|
|
167
|
-
x,
|
|
168
|
-
G,
|
|
169
|
-
{
|
|
170
|
-
five: 0,
|
|
171
|
-
visible: 1,
|
|
172
|
-
hoverEnable: 2,
|
|
173
|
-
floorplanData: 3,
|
|
174
|
-
cameraImageUrl: 4,
|
|
175
|
-
extraObjects: 5
|
|
176
|
-
},
|
|
177
|
-
Z
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
export {
|
|
182
|
-
ie as default
|
|
183
|
-
};
|
|
1
|
+
"use strict";const e=require("svelte/internal"),D=require("svelte"),w=require("./Camera.js"),F=require("./CurrentFloor/CurrentFloor.js");function z(i){e.append_styles(i,"svelte-1mvqyqq",".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}")}function I(i){let t,o,l,n=i[6]!==0&&j(i);return{c(){t=e.element("div"),n&&n.c(),e.attr(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),e.add_render_callback(()=>i[12].call(t))},m(a,f){e.insert(a,t,f),n&&n.m(t,null),o=e.add_resize_listener(t,i[12].bind(t)),l=!0},p(a,f){a[6]!==0?n?(n.p(a,f),f&64&&e.transition_in(n,1)):(n=j(a),n.c(),e.transition_in(n,1),n.m(t,null)):n&&(e.group_outros(),e.transition_out(n,1,1,()=>{n=null}),e.check_outros())},i(a){l||(e.transition_in(n),l=!0)},o(a){e.transition_out(n),l=!1},d(a){a&&e.detach(t),n&&n.d(),o()}}}function j(i){let t,o,l,n,a=`${i[8]}px`,f=`${i[11]}px`,_;const m=[{five:i[0],pxmm:i[9],floorIndex:i[10],floorplanData:i[3],hoverEnable:i[2],extraObjects:i[5]}];let d={};for(let r=0;r<m.length;r+=1)d=e.assign(d,m[r]);o=new F.CurrentFloor({props:d});const g=[{pxmm:i[9],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let c={};for(let r=0;r<g.length;r+=1)c=e.assign(c,g[r]);return n=new w.Camera({props:c}),{c(){t=e.element("div"),e.create_component(o.$$.fragment),l=e.space(),e.create_component(n.$$.fragment),e.attr(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),e.set_style(t,"width",a,!1),e.set_style(t,"height",f,!1)},m(r,u){e.insert(r,t,u),e.mount_component(o,t,null),e.append(t,l),e.mount_component(n,t,null),_=!0},p(r,u){const h=u&1581?e.get_spread_update(m,[{five:r[0],pxmm:r[9],floorIndex:r[10],floorplanData:r[3],hoverEnable:r[2],extraObjects:r[5]}]):{};o.$set(h);const p=u&537?e.get_spread_update(g,[{pxmm:r[9],five:r[0],floorplanData:r[3],cameraImageUrl:r[4]}]):{};n.$set(p),u&256&&a!==(a=`${r[8]}px`)&&e.set_style(t,"width",a,!1),u&2048&&f!==(f=`${r[11]}px`)&&e.set_style(t,"height",f,!1)},i(r){_||(e.transition_in(o.$$.fragment,r),e.transition_in(n.$$.fragment,r),_=!0)},o(r){e.transition_out(o.$$.fragment,r),e.transition_out(n.$$.fragment,r),_=!1},d(r){r&&e.detach(t),e.destroy_component(o),e.destroy_component(n)}}}function E(i){let t,o,l=i[1]&&I(i);return{c(){l&&l.c(),t=e.empty()},m(n,a){l&&l.m(n,a),e.insert(n,t,a),o=!0},p(n,[a]){n[1]?l?(l.p(n,a),a&2&&e.transition_in(l,1)):(l=I(n),l.c(),e.transition_in(l,1),l.m(t.parentNode,t)):l&&(e.group_outros(),e.transition_out(l,1,1,()=>{l=null}),e.check_outros())},i(n){o||(e.transition_in(l),o=!0)},o(n){e.transition_out(l),o=!1},d(n){l&&l.d(n),n&&e.detach(t)}}}function O(i,t,o){let{five:l}=t,{visible:n}=t,{hoverEnable:a}=t,{floorplanData:f}=t,{cameraImageUrl:_}=t,{extraObjects:m=[]}=t,d=0,g=0,c=0,r=0,u=0,h=0;function p(s){o(10,g=l.work.observers[s].floorIndex)}D.onMount(()=>(l.on("panoArrived",p),()=>{l.off("panoArrived",p)}));function k(){c=this.clientWidth,r=this.clientHeight,o(6,c),o(7,r)}return i.$$set=s=>{"five"in s&&o(0,l=s.five),"visible"in s&&o(1,n=s.visible),"hoverEnable"in s&&o(2,a=s.hoverEnable),"floorplanData"in s&&o(3,f=s.floorplanData),"cameraImageUrl"in s&&o(4,_=s.cameraImageUrl),"extraObjects"in s&&o(5,m=s.extraObjects)},i.$$.update=()=>{if(i.$$.dirty&456){const s=Math.min(c,r),{max:q,min:y}=f.bounding,v=q.x-y.x,b=q.y-y.y,C=function(){return v>b?[s,s/v*b]:[s/b*v,s]}();o(8,u=C[0]),o(11,h=C[1]),o(9,d=u/v)}},[l,n,a,f,_,m,c,r,u,d,g,h,k]}class U extends e.SvelteComponent{constructor(t){super(),e.init(this,t,O,E,e.safe_not_equal,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},z)}}exports.Main=U;
|
|
@@ -1,164 +1 @@
|
|
|
1
|
-
var v = Object.
|
|
2
|
-
var S = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var f = Object.getOwnPropertySymbols;
|
|
4
|
-
var g = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var l = (r, i, t) => i in r ? v(r, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[i] = t, u = (r, i) => {
|
|
6
|
-
for (var t in i || (i = {}))
|
|
7
|
-
g.call(i, t) && l(r, t, i[t]);
|
|
8
|
-
if (f)
|
|
9
|
-
for (var t of f(i))
|
|
10
|
-
_.call(i, t) && l(r, t, i[t]);
|
|
11
|
-
return r;
|
|
12
|
-
}, b = (r, i) => A(r, S(i));
|
|
13
|
-
var a = (r, i, t) => (l(r, typeof i != "symbol" ? i + "" : i, t), t);
|
|
14
|
-
var p = (r, i, t) => new Promise((e, s) => {
|
|
15
|
-
var n = (h) => {
|
|
16
|
-
try {
|
|
17
|
-
d(t.next(h));
|
|
18
|
-
} catch (c) {
|
|
19
|
-
s(c);
|
|
20
|
-
}
|
|
21
|
-
}, o = (h) => {
|
|
22
|
-
try {
|
|
23
|
-
d(t.throw(h));
|
|
24
|
-
} catch (c) {
|
|
25
|
-
s(c);
|
|
26
|
-
}
|
|
27
|
-
}, d = (h) => h.done ? e(h.value) : Promise.resolve(h.value).then(n, o);
|
|
28
|
-
d((t = t.apply(r, i)).next());
|
|
29
|
-
});
|
|
30
|
-
import y from "./Components/Main.js";
|
|
31
|
-
import D from "../../shared-utils/equal.js";
|
|
32
|
-
import { CAMERA_IMAGE as E } from "../Assets/camera.js";
|
|
33
|
-
import { Controller as C } from "../../base/BasePluginWithData.js";
|
|
34
|
-
import w, { formatExtraObjects as O } from "../utils/formatData.js";
|
|
35
|
-
class P extends C {
|
|
36
|
-
constructor(t, e) {
|
|
37
|
-
super(t);
|
|
38
|
-
a(this, "name", "panoFloorplanRadarPlugin");
|
|
39
|
-
a(this, "state");
|
|
40
|
-
a(this, "data");
|
|
41
|
-
a(this, "app");
|
|
42
|
-
a(this, "wrapperSelector", "");
|
|
43
|
-
a(this, "wrapper", null);
|
|
44
|
-
a(this, "disposed", !1);
|
|
45
|
-
a(this, "extraObjects", []);
|
|
46
|
-
a(this, "dispose", () => {
|
|
47
|
-
var t;
|
|
48
|
-
this.disposed = !0, (t = this.app) == null || t.$destroy(), this.wrapper = null, this.wrapperSelector = "", this.hooks.emit("dispose");
|
|
49
|
-
});
|
|
50
|
-
a(this, "_disable", (t) => {
|
|
51
|
-
var s;
|
|
52
|
-
const { userAction: e } = t;
|
|
53
|
-
(s = this.app) == null || s.$destroy(), this.app = void 0, this.hooks.emit("disable", { userAction: e });
|
|
54
|
-
});
|
|
55
|
-
this.five = t;
|
|
56
|
-
const s = {
|
|
57
|
-
hoverEnable: !1,
|
|
58
|
-
cameraImageUrl: E
|
|
59
|
-
}, n = e != null && e.configs ? e.configs : {}, o = u(u({}, s), n);
|
|
60
|
-
this.state = { enabled: !0, visible: !0, config: o }, e != null && e.wrapper && console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"), typeof (e == null ? void 0 : e.wrapper) == "string" ? this.wrapperSelector = e.wrapper : (e == null ? void 0 : e.wrapper) instanceof Element && (this.wrapper = e.wrapper), t.once("dispose", this.dispose);
|
|
61
|
-
}
|
|
62
|
-
load(t, e, s = !0) {
|
|
63
|
-
return p(this, null, function* () {
|
|
64
|
-
function n(c) {
|
|
65
|
-
return Object.prototype.hasOwnProperty.apply(c, ["version"]);
|
|
66
|
-
}
|
|
67
|
-
const o = JSON.parse(JSON.stringify(t)), d = n(o) ? o.data : o, h = this.data;
|
|
68
|
-
this.data = yield w(d), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, h), e && this.updateState(e, s), this.render();
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
show() {
|
|
72
|
-
return p(this, arguments, function* (t = {}) {
|
|
73
|
-
if (this.state.visible)
|
|
74
|
-
return;
|
|
75
|
-
const e = t.userAction !== void 0 ? t.userAction : !0;
|
|
76
|
-
this.updateState({ visible: !0 }, e), this._show({ userAction: e });
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
hide() {
|
|
80
|
-
return p(this, arguments, function* (t = {}) {
|
|
81
|
-
if (!this.state.visible)
|
|
82
|
-
return;
|
|
83
|
-
const e = t.userAction !== void 0 ? t.userAction : !0;
|
|
84
|
-
this.updateState({ visible: !1 }, e), this._hide({ userAction: e });
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
enable(t = {}) {
|
|
88
|
-
if (this.state.enabled)
|
|
89
|
-
return;
|
|
90
|
-
const e = t.userAction !== void 0 ? t.userAction : !0;
|
|
91
|
-
this.updateState({ enabled: !0 }, t.userAction || e), this._enable({ userAction: e });
|
|
92
|
-
}
|
|
93
|
-
disable(t = {}) {
|
|
94
|
-
if (!this.state.enabled)
|
|
95
|
-
return;
|
|
96
|
-
const e = t.userAction !== void 0 ? t.userAction : !0;
|
|
97
|
-
this.updateState({ enabled: !1 }, t.userAction || e), this._disable({ userAction: e });
|
|
98
|
-
}
|
|
99
|
-
setState(t, e = {}) {
|
|
100
|
-
const s = this.state, n = e.userAction !== void 0 ? e.userAction : !0;
|
|
101
|
-
if (this.updateState(t, n), t.enabled !== void 0 && s.enabled !== t.enabled) {
|
|
102
|
-
const o = { userAction: n };
|
|
103
|
-
t.enabled ? this._enable(o) : this._disable(o);
|
|
104
|
-
}
|
|
105
|
-
if (t.visible !== void 0 && s.visible !== t.visible) {
|
|
106
|
-
const o = { userAction: n };
|
|
107
|
-
t.visible ? this._show(o) : this._hide(o);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
appendTo(t) {
|
|
111
|
-
this.wrapper = t, this.render();
|
|
112
|
-
}
|
|
113
|
-
changeConfigs(t, e = !0) {
|
|
114
|
-
this.setState({ config: t }, { userAction: e }), this.render();
|
|
115
|
-
}
|
|
116
|
-
setExtraObjectsWith3DPositions(t) {
|
|
117
|
-
!this.data || (this.extraObjects = O(t, this.five, this.data), this.render());
|
|
118
|
-
}
|
|
119
|
-
formatData(t) {
|
|
120
|
-
return p(this, null, function* () {
|
|
121
|
-
return yield w(t.data);
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
_enable(t) {
|
|
125
|
-
const { userAction: e } = t;
|
|
126
|
-
this.hooks.emit("enable", { userAction: e }), this.state.visible && this._show({ userAction: e });
|
|
127
|
-
}
|
|
128
|
-
_show(t) {
|
|
129
|
-
if (this.disposed || !this.state.enabled)
|
|
130
|
-
return;
|
|
131
|
-
const { userAction: e } = t;
|
|
132
|
-
this.hooks.emit("show", { userAction: e }), this.render();
|
|
133
|
-
}
|
|
134
|
-
_hide(t) {
|
|
135
|
-
if (this.disposed || !this.state.enabled)
|
|
136
|
-
return;
|
|
137
|
-
const { userAction: e } = t;
|
|
138
|
-
this.hooks.emit("hide", { userAction: e }), this.render();
|
|
139
|
-
}
|
|
140
|
-
updateState(t, e) {
|
|
141
|
-
const s = this.state;
|
|
142
|
-
this.state = u(u({}, this.state), t), !D(this.state, s, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: s, userAction: e });
|
|
143
|
-
}
|
|
144
|
-
render() {
|
|
145
|
-
if (this.disposed || !this.state.enabled)
|
|
146
|
-
return;
|
|
147
|
-
if (!this.wrapper && this.wrapperSelector) {
|
|
148
|
-
const e = document.querySelector(this.wrapperSelector);
|
|
149
|
-
this.wrapper = e;
|
|
150
|
-
}
|
|
151
|
-
if (!this.data || !this.wrapper)
|
|
152
|
-
return;
|
|
153
|
-
const t = b(u({}, this.state.config), {
|
|
154
|
-
five: this.five,
|
|
155
|
-
floorplanData: this.data,
|
|
156
|
-
visible: this.state.visible,
|
|
157
|
-
extraObjects: this.extraObjects
|
|
158
|
-
});
|
|
159
|
-
this.app ? this.app.$set(t) : this.app = new y({ target: this.wrapper, props: t });
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
export {
|
|
163
|
-
P as Controller
|
|
164
|
-
};
|
|
1
|
+
"use strict";var v=Object.defineProperty,A=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var p=(r,s,t)=>s in r?v(r,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[s]=t,u=(r,s)=>{for(var t in s||(s={}))S.call(s,t)&&p(r,t,s[t]);if(b)for(var t of b(s))g.call(s,t)&&p(r,t,s[t]);return r},w=(r,s)=>A(r,_(s));var o=(r,s,t)=>(p(r,typeof s!="symbol"?s+"":s,t),t);var c=(r,s,t)=>new Promise((e,i)=>{var n=h=>{try{l(t.next(h))}catch(d){i(d)}},a=h=>{try{l(t.throw(h))}catch(d){i(d)}},l=h=>h.done?e(h.value):Promise.resolve(h.value).then(n,a);l((t=t.apply(r,s)).next())});const D=require("./Components/Main.js"),y=require("../../shared-utils/equal.js"),C=require("../Assets/camera.js"),j=require("../../base/BasePluginWithData.js"),f=require("../utils/formatData.js");class E extends j.Controller{constructor(t,e){super(t);o(this,"name","panoFloorplanRadarPlugin");o(this,"state");o(this,"data");o(this,"app");o(this,"wrapperSelector","");o(this,"wrapper",null);o(this,"disposed",!1);o(this,"extraObjects",[]);o(this,"dispose",()=>{var t;this.disposed=!0,(t=this.app)==null||t.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});o(this,"_disable",t=>{var i;const{userAction:e}=t;(i=this.app)==null||i.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:e})});this.five=t;const i={hoverEnable:!1,cameraImageUrl:C.CAMERA_IMAGE},n=e!=null&&e.configs?e.configs:{},a=u(u({},i),n);this.state={enabled:!0,visible:!0,config:a},e!=null&&e.wrapper&&console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"),typeof(e==null?void 0:e.wrapper)=="string"?this.wrapperSelector=e.wrapper:(e==null?void 0:e.wrapper)instanceof Element&&(this.wrapper=e.wrapper),t.once("dispose",this.dispose)}load(t,e,i=!0){return c(this,null,function*(){function n(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const a=JSON.parse(JSON.stringify(t)),l=n(a)?a.data:a,h=this.data;this.data=yield f.formatData(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,h),e&&this.updateState(e,i),this.render()})}show(){return c(this,arguments,function*(t={}){if(this.state.visible)return;const e=t.userAction!==void 0?t.userAction:!0;this.updateState({visible:!0},e),this._show({userAction:e})})}hide(){return c(this,arguments,function*(t={}){if(!this.state.visible)return;const e=t.userAction!==void 0?t.userAction:!0;this.updateState({visible:!1},e),this._hide({userAction:e})})}enable(t={}){if(this.state.enabled)return;const e=t.userAction!==void 0?t.userAction:!0;this.updateState({enabled:!0},t.userAction||e),this._enable({userAction:e})}disable(t={}){if(!this.state.enabled)return;const e=t.userAction!==void 0?t.userAction:!0;this.updateState({enabled:!1},t.userAction||e),this._disable({userAction:e})}setState(t,e={}){const i=this.state,n=e.userAction!==void 0?e.userAction:!0;if(this.updateState(t,n),t.enabled!==void 0&&i.enabled!==t.enabled){const a={userAction:n};t.enabled?this._enable(a):this._disable(a)}if(t.visible!==void 0&&i.visible!==t.visible){const a={userAction:n};t.visible?this._show(a):this._hide(a)}}appendTo(t){this.wrapper=t,this.render()}changeConfigs(t,e=!0){this.setState({config:t},{userAction:e}),this.render()}setExtraObjectsWith3DPositions(t){!this.data||(this.extraObjects=f.formatExtraObjects(t,this.five,this.data),this.render())}formatData(t){return c(this,null,function*(){return yield f.formatData(t.data)})}_enable(t){const{userAction:e}=t;this.hooks.emit("enable",{userAction:e}),this.state.visible&&this._show({userAction:e})}_show(t){if(this.disposed||!this.state.enabled)return;const{userAction:e}=t;this.hooks.emit("show",{userAction:e}),this.render()}_hide(t){if(this.disposed||!this.state.enabled)return;const{userAction:e}=t;this.hooks.emit("hide",{userAction:e}),this.render()}updateState(t,e){const i=this.state;this.state=u(u({},this.state),t),!y.equal(this.state,i,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:i,userAction:e})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const e=document.querySelector(this.wrapperSelector);this.wrapper=e}if(!this.data||!this.wrapper)return;const t=w(u({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects});this.app?this.app.$set(t):this.app=new D.Main({target:this.wrapper,props:t})}}exports.Controller=E;
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const l = (o, r) => new n(o, r);
|
|
3
|
-
export {
|
|
4
|
-
l as PanoFloorplanRadarPlugin,
|
|
5
|
-
l as default
|
|
6
|
-
};
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./Controller.js");require("./Components/Main.js");require("svelte/internal");require("svelte");require("./Components/Camera.js");require("../Assets/camera.js");require("../../shared-utils/throttle.js");require("./Components/CurrentFloor/CurrentFloor.js");require("./Components/CurrentFloor/ExtraObjects.js");require("../Components/BaseImage.js");require("../Components/Normalmage.js");require("../Components/SvgImage.js");require("../Components/RoomHighlight/RoomHighlight.js");require("../Components/RoomHighlight/Room.js");require("../utils/formatPosition.js");require("../../shared-utils/equal.js");require("../../shared-utils/isTruelyObject.js");require("../../base/BasePluginWithData.js");require("../../base/BasePlugin.js");require("../../shared-utils/Subscribe.js");require("../utils/formatData.js");require("../Assets/floorplanExtraObject.js");const e=(r,o)=>new s.Controller(r,o);exports.PanoFloorplanRadarPlugin=e;exports.default=e;
|
|
@@ -1,273 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
var F = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var v = Object.getOwnPropertySymbols;
|
|
4
|
-
var A = Object.prototype.hasOwnProperty, C = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var f = (h, n, e) => n in h ? w(h, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[n] = e, l = (h, n) => {
|
|
6
|
-
for (var e in n || (n = {}))
|
|
7
|
-
A.call(n, e) && f(h, e, n[e]);
|
|
8
|
-
if (v)
|
|
9
|
-
for (var e of v(n))
|
|
10
|
-
C.call(n, e) && f(h, e, n[e]);
|
|
11
|
-
return h;
|
|
12
|
-
}, p = (h, n) => E(h, F(n));
|
|
13
|
-
var s = (h, n, e) => (f(h, typeof n != "symbol" ? n + "" : n, e), e);
|
|
14
|
-
var c = (h, n, e) => new Promise((t, i) => {
|
|
15
|
-
var o = (d) => {
|
|
16
|
-
try {
|
|
17
|
-
a(e.next(d));
|
|
18
|
-
} catch (u) {
|
|
19
|
-
i(u);
|
|
20
|
-
}
|
|
21
|
-
}, r = (d) => {
|
|
22
|
-
try {
|
|
23
|
-
a(e.throw(d));
|
|
24
|
-
} catch (u) {
|
|
25
|
-
i(u);
|
|
26
|
-
}
|
|
27
|
-
}, a = (d) => d.done ? t(d.value) : Promise.resolve(d.value).then(o, r);
|
|
28
|
-
a((e = e.apply(h, n)).next());
|
|
29
|
-
});
|
|
30
|
-
import * as x from "three";
|
|
31
|
-
import S from "../../shared-utils/equal.js";
|
|
32
|
-
import y from "../Components/Main.js";
|
|
33
|
-
import m from "../utils/formatData.js";
|
|
34
|
-
import { CAMERA_IMAGE as I } from "../Assets/camera.js";
|
|
35
|
-
import { omit as _ } from "../../shared-utils/filter.js";
|
|
36
|
-
import { FLOOR_PLAN_ATTACHED_TO as D } from "../constant.js";
|
|
37
|
-
import { Controller as L } from "../../base/BasePluginWithData.js";
|
|
38
|
-
import T from "../../shared-utils/five/changeMode.js";
|
|
39
|
-
import M, { getAttachedY as P } from "../../shared-utils/getPxmm.js";
|
|
40
|
-
import b from "../../shared-utils/changeModelCanvasOpacity.js";
|
|
41
|
-
class j extends L {
|
|
42
|
-
constructor(e, t) {
|
|
43
|
-
super(e);
|
|
44
|
-
s(this, "name", "topviewFloorplanPlugin");
|
|
45
|
-
s(this, "state");
|
|
46
|
-
s(this, "data");
|
|
47
|
-
s(this, "app");
|
|
48
|
-
s(this, "selector");
|
|
49
|
-
s(this, "panoIndex", 0);
|
|
50
|
-
s(this, "floorIndex", 0);
|
|
51
|
-
s(this, "wrapper");
|
|
52
|
-
s(this, "container", document.createElement("div"));
|
|
53
|
-
s(this, "lastPanoramaLongitude", 0);
|
|
54
|
-
s(this, "size", { width: 0, height: 0 });
|
|
55
|
-
s(this, "hasAddedEventListener", !1);
|
|
56
|
-
s(this, "isHiddenByHideFunc", !1);
|
|
57
|
-
s(this, "updateSize", () => {
|
|
58
|
-
if (!this.data || !this.container || !this.wrapper || this.five.getCurrentState().mode !== "Topview")
|
|
59
|
-
return;
|
|
60
|
-
const { min: e, max: t } = this.data.bounding, i = t.x - e.x, o = t.y - e.y, r = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a = M(this.five, this.wrapper, this.floorIndex, r), d = Math.ceil(i * a), u = Math.ceil(o * a);
|
|
61
|
-
this.size.width === d && this.size.height === u || (this.container.style.width = d + "px", this.container.style.height = u + "px", this.size = { width: d, height: u });
|
|
62
|
-
});
|
|
63
|
-
s(this, "dispose", () => {
|
|
64
|
-
var e, t;
|
|
65
|
-
this.removeEventListener(), (e = this.app) == null || e.$destroy(), this.app = void 0, (t = this.container) == null || t.remove(), this.data = void 0, this.wrapper = void 0, this.selector = void 0, this.hooks.emit("dispose");
|
|
66
|
-
});
|
|
67
|
-
s(this, "_disable", (e) => {
|
|
68
|
-
var i, o;
|
|
69
|
-
const { userAction: t } = e;
|
|
70
|
-
(i = this.app) == null || i.$destroy(), this.app = void 0, (o = this.container) == null || o.remove(), this.removeEventListener(), this.hooks.emit("disable", { userAction: t });
|
|
71
|
-
});
|
|
72
|
-
s(this, "onFiveModelLoaded", () => {
|
|
73
|
-
if (this.state.enabled === !1 || this.wrapper || !this.selector)
|
|
74
|
-
return;
|
|
75
|
-
const e = this.selector instanceof Element ? this.selector : document.querySelector(this.selector);
|
|
76
|
-
if (!e)
|
|
77
|
-
throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");
|
|
78
|
-
this.wrapper = e, e.append(this.container);
|
|
79
|
-
});
|
|
80
|
-
s(this, "onFiveModeChange", (...[e, , , , t]) => {
|
|
81
|
-
e !== "Topview" && this.state.visible && (this.updateState({ visible: !1 }, t), this._hide({ userAction: t }));
|
|
82
|
-
});
|
|
83
|
-
s(this, "onFivePanoArrived", (e) => {
|
|
84
|
-
var t;
|
|
85
|
-
!((t = this.five) != null && t.work) || (this.panoIndex = e, this.floorIndex = this.five.work.observers[e].floorIndex);
|
|
86
|
-
});
|
|
87
|
-
s(this, "onFiveCameraUpdate", (e, t) => {
|
|
88
|
-
!this.state.visible || (this.updatePosition(), this.updateSize());
|
|
89
|
-
});
|
|
90
|
-
s(this, "onFiveWantsGesture", (e) => {
|
|
91
|
-
if (!(e !== "pan" && e !== "pinch" && e !== "mouseWheel") && this.state.visible && !this.state.config.gestureEnable)
|
|
92
|
-
return !1;
|
|
93
|
-
});
|
|
94
|
-
s(this, "onFiveWantsMoveToPano", () => {
|
|
95
|
-
if (this.state.visible && this.state.config.preventRoomClick)
|
|
96
|
-
return !1;
|
|
97
|
-
});
|
|
98
|
-
s(this, "onFiveInitAnimationEnded", (...[, , e]) => {
|
|
99
|
-
const { mode: t } = this.five.getCurrentState();
|
|
100
|
-
t === "Topview" && !this.isHiddenByHideFunc && !this.state.visible && this.state.config.autoShowEnable && (this.updateState({ visible: !0 }, e), this._show({ userAction: e }));
|
|
101
|
-
});
|
|
102
|
-
s(this, "onModelShownFloorChange", (e) => {
|
|
103
|
-
if (this.floorIndex !== e) {
|
|
104
|
-
if (e === null) {
|
|
105
|
-
const t = this.five.getCurrentState().panoIndex;
|
|
106
|
-
this.floorIndex = this.five.work.observers[t].floorIndex;
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
this.floorIndex = e, this.updateSize(), this.render();
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
t != null && t.selector && (this.selector = t.selector, console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"));
|
|
113
|
-
const i = {
|
|
114
|
-
northDesc: "\u5317",
|
|
115
|
-
modelOpacity: 1,
|
|
116
|
-
hoverEnable: !0,
|
|
117
|
-
compassEnable: !0,
|
|
118
|
-
gestureEnable: !1,
|
|
119
|
-
autoShowEnable: !0,
|
|
120
|
-
ruleLabelsEnable: !0,
|
|
121
|
-
roomLabelsEnable: !0,
|
|
122
|
-
cameraImageUrl: I,
|
|
123
|
-
attachedTo: D.BOUNDING_CENTER,
|
|
124
|
-
getLabelElement: void 0,
|
|
125
|
-
adaptiveRoomLabelVisibleEnable: !0,
|
|
126
|
-
getRoomAreaText: (a) => (a / 1e6).toFixed(1) + "\u33A1",
|
|
127
|
-
getRuleDistanceText: (a) => a.toString()
|
|
128
|
-
}, o = t ? _(t, ["selector", "scale"]) : {}, r = l(l({}, i), o);
|
|
129
|
-
this.state = {
|
|
130
|
-
enabled: !0,
|
|
131
|
-
visible: !1,
|
|
132
|
-
config: r
|
|
133
|
-
}, this.initContainer(), e.model.loaded ? this.onFiveModelLoaded() : e.once("modelLoaded", this.onFiveModelLoaded), e.once("dispose", this.dispose), this.addEventListener();
|
|
134
|
-
}
|
|
135
|
-
load(e, t, i = !0) {
|
|
136
|
-
return c(this, null, function* () {
|
|
137
|
-
function o(g) {
|
|
138
|
-
return Object.prototype.hasOwnProperty.apply(g, ["version"]);
|
|
139
|
-
}
|
|
140
|
-
const r = e;
|
|
141
|
-
r && !r.version && console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");
|
|
142
|
-
const a = JSON.parse(JSON.stringify(e)), d = o(a) ? a.data : a, u = this.data;
|
|
143
|
-
this.data = yield m(d), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, u), t && this.updateState(t, i), this.render();
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
updatePosition() {
|
|
147
|
-
var a;
|
|
148
|
-
const e = P(this.five, this.floorIndex, this.state.config.attachedTo), t = (a = this.five.model) == null ? void 0 : a.bounding.getCenter(new x.Vector3()).setY(e);
|
|
149
|
-
if (!t)
|
|
150
|
-
return;
|
|
151
|
-
const i = t.clone().project(this.five.camera), o = (i.x + 1) / 2, r = -(i.y - 1) / 2;
|
|
152
|
-
this.container.style.left = o * 100 + "%", this.container.style.top = r * 100 + "%";
|
|
153
|
-
}
|
|
154
|
-
appendTo(e) {
|
|
155
|
-
if (this.wrapper = e, !!this.state.enabled)
|
|
156
|
-
return e.appendChild(this.container), this.render(), this;
|
|
157
|
-
}
|
|
158
|
-
show() {
|
|
159
|
-
return c(this, arguments, function* (e = {}) {
|
|
160
|
-
if (this.state.visible)
|
|
161
|
-
return;
|
|
162
|
-
const t = e.userAction !== void 0 ? e.userAction : !0;
|
|
163
|
-
this.updateState({ visible: !0 }, t), this._show({ userAction: t });
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
hide() {
|
|
167
|
-
return c(this, arguments, function* (e = {}) {
|
|
168
|
-
if (this.isHiddenByHideFunc = !0, !this.state.visible)
|
|
169
|
-
return;
|
|
170
|
-
const t = e.userAction !== void 0 ? e.userAction : !0;
|
|
171
|
-
this.updateState({ visible: !1 }, t), this._hide({ userAction: t });
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
enable(e = {}) {
|
|
175
|
-
if (this.state.enabled)
|
|
176
|
-
return;
|
|
177
|
-
const t = e.userAction !== void 0 ? e.userAction : !0;
|
|
178
|
-
this.updateState({ enabled: !0 }, e.userAction || t), this._enable({ userAction: t });
|
|
179
|
-
}
|
|
180
|
-
disable(e = {}) {
|
|
181
|
-
if (!this.state.enabled)
|
|
182
|
-
return;
|
|
183
|
-
const t = e.userAction !== void 0 ? e.userAction : !0;
|
|
184
|
-
this.updateState({ enabled: !1 }, e.userAction || t), this._disable({ userAction: t });
|
|
185
|
-
}
|
|
186
|
-
setState(e, t = {}) {
|
|
187
|
-
const i = this.state, o = t.userAction !== void 0 ? t.userAction : !0;
|
|
188
|
-
if (this.updateState(e, o), e.enabled !== void 0 && i.enabled !== e.enabled) {
|
|
189
|
-
const r = { userAction: o };
|
|
190
|
-
e.enabled ? this._enable(r) : this._disable(r);
|
|
191
|
-
}
|
|
192
|
-
if (e.visible !== void 0 && i.visible !== e.visible) {
|
|
193
|
-
const r = { userAction: o };
|
|
194
|
-
e.visible ? this._show(r) : this._hide(r);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
changeConfigs(e, t = !0) {
|
|
198
|
-
this.updateState({ config: e }, t), this.render();
|
|
199
|
-
}
|
|
200
|
-
formatData(e) {
|
|
201
|
-
return c(this, null, function* () {
|
|
202
|
-
return yield m(e.data);
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
_show(e) {
|
|
206
|
-
return c(this, null, function* () {
|
|
207
|
-
if (!this.state.enabled)
|
|
208
|
-
return;
|
|
209
|
-
this.isHiddenByHideFunc = !1;
|
|
210
|
-
const { userAction: t } = e;
|
|
211
|
-
this.hooks.emit("show", { userAction: t, auto: !1 }), this.five.getCurrentState().mode !== "Topview" && (yield T(this.five, ["Topview", void 0, void 0, t])), this.five.model.show(this.floorIndex), this.updatePosition(), this.updateSize();
|
|
212
|
-
const i = 500, o = this.state.config.modelOpacity;
|
|
213
|
-
b(this.five, o, i), this.hooks.emit("showAnimationEnded", { userAction: t, auto: !1 }), this.render();
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
_hide(e) {
|
|
217
|
-
return c(this, null, function* () {
|
|
218
|
-
if (!this.state.enabled)
|
|
219
|
-
return;
|
|
220
|
-
const { userAction: t } = e;
|
|
221
|
-
this.hooks.emit("hide", { userAction: t, auto: !1 });
|
|
222
|
-
const i = 1, o = 0;
|
|
223
|
-
b(this.five, i, o), this.render();
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
_enable(e) {
|
|
227
|
-
const { userAction: t } = e;
|
|
228
|
-
this.addEventListener(), this.wrapper && this.wrapper.append(this.container), this.hooks.emit("enable", { userAction: t }), this.state.visible && this._show({ userAction: t });
|
|
229
|
-
}
|
|
230
|
-
updateState(e, t) {
|
|
231
|
-
const i = this.state, o = e.config ? l(l({}, i.config), e.config) : i.config;
|
|
232
|
-
this.state = p(l(l({}, this.state), e), { config: o }), !S(this.state, i, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: t });
|
|
233
|
-
}
|
|
234
|
-
addEventListener() {
|
|
235
|
-
if (!this.state.enabled || this.hasAddedEventListener)
|
|
236
|
-
return;
|
|
237
|
-
const e = this.five;
|
|
238
|
-
e.on("modeChange", this.onFiveModeChange), e.on("panoArrived", this.onFivePanoArrived), e.on("cameraUpdate", this.onFiveCameraUpdate), e.on("wantsGesture", this.onFiveWantsGesture), e.on("wantsMoveToPano", this.onFiveWantsMoveToPano), e.on("initAnimationEnded", this.onFiveInitAnimationEnded), e.on("modelShownFloorChange", this.onModelShownFloorChange);
|
|
239
|
-
}
|
|
240
|
-
removeEventListener() {
|
|
241
|
-
const e = this.five;
|
|
242
|
-
this.hasAddedEventListener = !1, e.off("modeChange", this.onFiveModeChange), e.off("panoArrived", this.onFivePanoArrived), e.off("cameraUpdate", this.onFiveCameraUpdate), e.off("wantsGesture", this.onFiveWantsGesture), e.off("wantsMoveToPano", this.onFiveWantsMoveToPano), e.off("initAnimationEnded", this.onFiveInitAnimationEnded), e.off("modelShownFloorChange", this.onModelShownFloorChange);
|
|
243
|
-
}
|
|
244
|
-
initContainer() {
|
|
245
|
-
this.container.classList.add("floorplan-plugin"), Object.assign(this.container.style, {
|
|
246
|
-
position: "absolute",
|
|
247
|
-
left: "50%",
|
|
248
|
-
top: "50%",
|
|
249
|
-
transform: "translate3d(-50%, -50%, 10px)",
|
|
250
|
-
zIndex: 10,
|
|
251
|
-
pointerEvents: "none",
|
|
252
|
-
"will-change": "width, height"
|
|
253
|
-
}), this.five.addExtraElement(this.container);
|
|
254
|
-
}
|
|
255
|
-
render(e) {
|
|
256
|
-
if (!this.state.enabled || !this.container || !this.data || this.size.width === 0)
|
|
257
|
-
return;
|
|
258
|
-
const t = p(l({}, this.state.config), {
|
|
259
|
-
visible: this.state.visible,
|
|
260
|
-
duration: e != null ? e : 0,
|
|
261
|
-
panoIndex: this.panoIndex,
|
|
262
|
-
floorIndex: this.floorIndex,
|
|
263
|
-
floorplanData: this.data,
|
|
264
|
-
lastPanoramaLongitude: this.lastPanoramaLongitude
|
|
265
|
-
});
|
|
266
|
-
if (this.app)
|
|
267
|
-
return this.app.$set(t);
|
|
268
|
-
this.app = new y({ target: this.container, intro: !0, props: t });
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
export {
|
|
272
|
-
j as Controller
|
|
273
|
-
};
|
|
1
|
+
"use strict";var E=Object.defineProperty,F=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var f=(n,o,e)=>o in n?E(n,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[o]=e,l=(n,o)=>{for(var e in o||(o={}))_.call(o,e)&&f(n,e,o[e]);if(v)for(var e of v(o))C.call(o,e)&&f(n,e,o[e]);return n},p=(n,o)=>F(n,A(o));var s=(n,o,e)=>(f(n,typeof o!="symbol"?o+"":o,e),e);var c=(n,o,e)=>new Promise((t,i)=>{var a=d=>{try{r(e.next(d))}catch(u){i(u)}},h=d=>{try{r(e.throw(d))}catch(u){i(u)}},r=d=>d.done?t(d.value):Promise.resolve(d.value).then(a,h);r((e=e.apply(n,o)).next())});const y=require("three"),S=require("../../shared-utils/equal.js"),x=require("../Components/Main.js"),m=require("../utils/formatData.js"),D=require("../Assets/camera.js"),M=require("../../shared-utils/filter.js"),P=require("../constant.js"),T=require("../../base/BasePluginWithData.js"),I=require("../../shared-utils/five/changeMode.js"),g=require("../../shared-utils/getPxmm.js"),b=require("../../shared-utils/changeModelCanvasOpacity.js");function L(n){if(n&&n.__esModule)return n;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return o.default=n,Object.freeze(o)}const O=L(y);class j extends T.Controller{constructor(e,t){super(e);s(this,"name","topviewFloorplanPlugin");s(this,"state");s(this,"data");s(this,"app");s(this,"selector");s(this,"panoIndex",0);s(this,"floorIndex",0);s(this,"wrapper");s(this,"container",document.createElement("div"));s(this,"lastPanoramaLongitude",0);s(this,"size",{width:0,height:0});s(this,"hasAddedEventListener",!1);s(this,"isHiddenByHideFunc",!1);s(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return;const{min:e,max:t}=this.data.bounding,i=t.x-e.x,a=t.y-e.y,h=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,r=g.getPxmm(this.five,this.wrapper,this.floorIndex,h),d=Math.ceil(i*r),u=Math.ceil(a*r);this.size.width===d&&this.size.height===u||(this.container.style.width=d+"px",this.container.style.height=u+"px",this.size={width:d,height:u})});s(this,"dispose",()=>{var e,t;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(t=this.container)==null||t.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});s(this,"_disable",e=>{var i,a;const{userAction:t}=e;(i=this.app)==null||i.$destroy(),this.app=void 0,(a=this.container)==null||a.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:t})});s(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});s(this,"onFiveModeChange",(...[e,,,,t])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},t),this._hide({userAction:t}))});s(this,"onFivePanoArrived",e=>{var t;!((t=this.five)!=null&&t.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});s(this,"onFiveCameraUpdate",(e,t)=>{!this.state.visible||(this.updatePosition(),this.updateSize())});s(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});s(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});s(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:t}=this.five.getCurrentState();t==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});s(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const t=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[t].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});t!=null&&t.selector&&(this.selector=t.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"));const i={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,cameraImageUrl:D.CAMERA_IMAGE,attachedTo:P.FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:r=>(r/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:r=>r.toString()},a=t?M.omit(t,["selector","scale"]):{},h=l(l({},i),a);this.state={enabled:!0,visible:!1,config:h},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,t,i=!0){return c(this,null,function*(){function a(w){return Object.prototype.hasOwnProperty.apply(w,["version"])}const h=e;h&&!h.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const r=JSON.parse(JSON.stringify(e)),d=a(r)?r.data:r,u=this.data;this.data=yield m.formatData(d),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,u),t&&this.updateState(t,i),this.render()})}updatePosition(){var r;const e=g.getAttachedY(this.five,this.floorIndex,this.state.config.attachedTo),t=(r=this.five.model)==null?void 0:r.bounding.getCenter(new O.Vector3).setY(e);if(!t)return;const i=t.clone().project(this.five.camera),a=(i.x+1)/2,h=-(i.y-1)/2;this.container.style.left=a*100+"%",this.container.style.top=h*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return c(this,arguments,function*(e={}){if(this.state.visible)return;const t=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},t),this._show({userAction:t})})}hide(){return c(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const t=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},t),this._hide({userAction:t})})}enable(e={}){if(this.state.enabled)return;const t=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||t),this._enable({userAction:t})}disable(e={}){if(!this.state.enabled)return;const t=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||t),this._disable({userAction:t})}setState(e,t={}){const i=this.state,a=t.userAction!==void 0?t.userAction:!0;if(this.updateState(e,a),e.enabled!==void 0&&i.enabled!==e.enabled){const h={userAction:a};e.enabled?this._enable(h):this._disable(h)}if(e.visible!==void 0&&i.visible!==e.visible){const h={userAction:a};e.visible?this._show(h):this._hide(h)}}changeConfigs(e,t=!0){this.updateState({config:e},t),this.render()}formatData(e){return c(this,null,function*(){return yield m.formatData(e.data)})}_show(e){return c(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:t}=e;this.hooks.emit("show",{userAction:t,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield I.changeMode(this.five,["Topview",void 0,void 0,t])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const i=500,a=this.state.config.modelOpacity;b.changeModelCanvasOpacity(this.five,a,i),this.hooks.emit("showAnimationEnded",{userAction:t,auto:!1}),this.render()})}_hide(e){return c(this,null,function*(){if(!this.state.enabled)return;const{userAction:t}=e;this.hooks.emit("hide",{userAction:t,auto:!1});const i=1,a=0;b.changeModelCanvasOpacity(this.five,i,a),this.render()})}_enable(e){const{userAction:t}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:t}),this.state.visible&&this._show({userAction:t})}updateState(e,t){const i=this.state,a=e.config?l(l({},i.config),e.config):i.config;this.state=p(l(l({},this.state),e),{config:a}),!S.equal(this.state,i,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:i,userAction:t})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const t=p(l({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(t);this.app=new x.Main({target:this.container,intro:!0,props:t})}}exports.Controller=j;
|