@realsee/dnalogel 2.0.0-alpha.9 → 2.0.0-beta.36
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 +78 -28
- package/components/index.js +1450 -0
- package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +3 -48
- package/dist/CSS3DRenderPlugin/index.js +27 -26
- package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +4 -6
- package/dist/CameraMovementPlugin/index.js +12 -12
- package/dist/CameraMovementPlugin/typing.d.ts +1 -1
- package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.js +941 -0
- package/dist/ItemLabelPlugin/typings.d.ts +59 -0
- package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/dist/ModelChassisCompassPlugin/index.js +8 -5
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/dist/ModelEntryDoorGuidePlugin/index.js +20 -20
- package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.js +674 -0
- package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelRoomLabelPlugin/index.js +153 -73
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +5 -0
- package/dist/ModelTVVideoPlugin/index.js +301 -0
- package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
- package/dist/ModelViewPlugin/index.d.ts +3 -16
- package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/dist/PanoCompassPlugin/index.d.ts +4 -47
- package/dist/PanoCompassPlugin/index.js +242 -129
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/dist/PanoCursorRaycasterPlugin/index.js +5 -3
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +12 -9
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +18 -9
- package/dist/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/dist/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +5 -2
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +50 -15
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +5 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/dist/PanoMeasurePlugin/index.d.ts +9 -6
- package/dist/PanoMeasurePlugin/index.js +2649 -3442
- package/dist/PanoMeasurePlugin/typings/data.d.ts +4 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +14 -5
- package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -2
- package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.d.ts +4 -30
- package/dist/PanoRulerPlugin/index.js +12 -12
- package/dist/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +5 -0
- package/dist/PanoSpatialTagPlugin/index.js +1307 -0
- package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/dist/base/BasePlugin.d.ts +100 -0
- package/dist/base/BasePluginWithData.d.ts +34 -0
- package/dist/components/PaintBrush/Controller.d.ts +43 -0
- package/dist/components/PaintBrush/Subscribe.d.ts +76 -0
- package/dist/components/PaintBrush/index.d.ts +27 -0
- package/dist/components/PaintBrush/style.d.ts +2 -0
- package/dist/components/PaintBrush/tween.d.ts +62 -0
- package/dist/components/PaintBrush/typings.d.ts +58 -0
- package/dist/components/PaintBrush/utils.d.ts +26 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +70 -77
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
- package/dist/floorplan/ModelFloorplanPlugin/index.js +2319 -1620
- package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +601 -266
- package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +53 -47
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +6 -4
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +2198 -1428
- package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/dist/floorplan/index.d.ts +6 -0
- package/dist/floorplan/utils/constant.d.ts +22 -0
- package/dist/floorplan/utils/correctFiveState.d.ts +15 -0
- package/dist/floorplan/utils/formatPosition.d.ts +1 -1
- package/dist/index.d.ts +15 -24
- package/dist/index.es.js +10694 -7145
- package/dist/index.js +10432 -6869
- package/dist/index.umd.js +10435 -6875
- package/dist/shared-utils/five/changeMode.d.ts +4 -1
- package/dist/shared-utils/getPxmm.d.ts +8 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/math/Interval.d.ts +13 -0
- package/dist/shared-utils/math/Rectangle.d.ts +27 -0
- package/dist/shared-utils/math/index.d.ts +2 -0
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/dist/shared-utils/three/getNormal.d.ts +1 -1
- package/dist/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/dist/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
- package/dist/shared-utils/uuid.d.ts +1 -0
- package/dist/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Magnifier.html +9 -0
- package/docs/classes/ModelRoomLabelController.html +5 -8
- package/docs/enums/CameraMovementEffect.html +3 -0
- package/docs/enums/DIRECTION.html +1 -0
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/Rotation.html +3 -0
- package/docs/index.html +78 -33
- package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
- package/docs/interfaces/FloorplanBounding.html +10 -0
- package/docs/interfaces/FloorplanData.html +3 -0
- package/docs/interfaces/FloorplanEntrance.html +15 -0
- package/docs/interfaces/FloorplanExtraObject.html +7 -0
- package/docs/interfaces/FloorplanExtraObject3D.html +3 -0
- package/docs/interfaces/FloorplanFloorData.html +3 -0
- package/docs/interfaces/FloorplanImagePosition.html +3 -0
- package/docs/interfaces/FloorplanObserver.html +5 -0
- package/docs/interfaces/FloorplanOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanPosition.html +3 -0
- package/docs/interfaces/FloorplanRoomItem.html +17 -0
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -0
- package/docs/interfaces/FloorplanServerBounding.html +10 -0
- package/docs/interfaces/FloorplanServerComputedData.html +1 -0
- package/docs/interfaces/FloorplanServerData.html +3 -0
- package/docs/interfaces/FloorplanServerEntrance.html +15 -0
- package/docs/interfaces/FloorplanServerFloorData.html +3 -0
- package/docs/interfaces/FloorplanServerImagePosition.html +3 -0
- package/docs/interfaces/FloorplanServerObserver.html +5 -0
- package/docs/interfaces/FloorplanServerOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanServerPosition.html +3 -0
- package/docs/interfaces/FloorplanServerRoomItem.html +20 -0
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -0
- package/docs/interfaces/ItemLabelPluginData.html +1 -0
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
- package/docs/interfaces/ModelViewPluginExportType.html +1 -0
- package/docs/interfaces/OpenParameter.html +3 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
- package/docs/interfaces/PanoMeasureParameterType.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
- package/docs/interfaces/Point.html +1 -0
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -0
- package/docs/interfaces/RoomInfo.html +1 -0
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -0
- package/docs/interfaces/Rooms.html +1 -0
- package/docs/modules.html +26 -18
- package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
- package/libs/CSS3DRenderPlugin/index.js +2 -180
- package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
- package/libs/CameraMovementPlugin/index.d.ts +4 -6
- package/libs/CameraMovementPlugin/index.js +3 -158
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +577 -0
- package/libs/ItemLabelPlugin/ItemLabelItem.js +227 -0
- package/libs/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/libs/ItemLabelPlugin/Plugin.js +120 -0
- package/libs/ItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ItemLabelPlugin/events.type.js +1 -0
- package/libs/ItemLabelPlugin/index.d.ts +9 -0
- package/libs/ItemLabelPlugin/index.js +8 -0
- package/libs/ItemLabelPlugin/typings.d.ts +59 -0
- package/libs/ItemLabelPlugin/typings.js +7 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.js +3 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.js +16 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.js +13 -0
- package/libs/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +4 -0
- package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/libs/ModelChassisCompassPlugin/Plugin.js +77 -0
- package/libs/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/libs/ModelChassisCompassPlugin/index.js +2 -74
- package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +140 -0
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/libs/ModelEntryDoorGuidePlugin/index.js +2 -136
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +409 -0
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
- package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/index.js +8 -0
- package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/libs/ModelItemLabelPlugin/typings.js +7 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ModelRoomLabelPlugin/Controller.js +65 -23
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +83 -45
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelSimulationPlugin/index.d.ts +33 -0
- package/libs/ModelSimulationPlugin/index.js +166 -0
- package/libs/ModelSimulationPlugin/shaders/fragment.d.ts +2 -0
- package/libs/ModelSimulationPlugin/shaders/fragment.js +96 -0
- package/libs/ModelSimulationPlugin/shaders/vertex.d.ts +2 -0
- package/libs/ModelSimulationPlugin/shaders/vertex.js +23 -0
- package/libs/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/libs/ModelTVVideoPlugin/Plugin.js +254 -0
- package/libs/ModelTVVideoPlugin/index.d.ts +5 -0
- package/libs/ModelTVVideoPlugin/index.js +4 -0
- package/libs/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/libs/ModelTVVideoPlugin/typings.js +8 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.js +13 -0
- package/libs/ModelViewPlugin/Plugin.d.ts +17 -0
- package/libs/ModelViewPlugin/Plugin.js +160 -0
- package/libs/ModelViewPlugin/index.d.ts +3 -16
- package/libs/ModelViewPlugin/index.js +2 -159
- package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/libs/PanoCompassPlugin/Plugin.js +249 -0
- package/libs/PanoCompassPlugin/index.d.ts +4 -47
- package/libs/PanoCompassPlugin/index.js +3 -167
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +12 -9
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +77 -14
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +268 -155
- package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +337 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +40 -20
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +246 -153
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +18 -9
- package/libs/PanoMeasurePlugin/Controller/index.js +182 -54
- package/libs/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/index.js +30 -5
- package/libs/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/libs/PanoMeasurePlugin/Model/line.js +61 -11
- package/libs/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/point.js +24 -4
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Model/polyline.js +20 -3
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +11 -14
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +5 -2
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +107 -25
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +23 -8
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +61 -26
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +50 -15
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +234 -59
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +84 -38
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.js +98 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +52 -17
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +5 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +84 -34
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +80 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +11 -1
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +64 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +265 -0
- package/libs/PanoMeasurePlugin/index.d.ts +9 -6
- package/libs/PanoMeasurePlugin/index.js +3 -1
- package/libs/PanoMeasurePlugin/typings/data.d.ts +4 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +14 -5
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +15 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/constants.js +7 -7
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +22 -16
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.js +8 -7
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +5 -5
- package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/libs/PanoRulerPlugin/Plugin.js +403 -0
- package/libs/PanoRulerPlugin/index.d.ts +4 -30
- package/libs/PanoRulerPlugin/index.js +2 -397
- package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
- package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
- package/libs/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +426 -0
- package/libs/PanoSpatialTagPlugin/index.d.ts +5 -0
- package/libs/PanoSpatialTagPlugin/index.js +5 -0
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/store.js +2 -0
- package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/style.js +8 -0
- package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/libs/PanoSpatialTagPlugin/typings.js +1 -0
- package/libs/base/BasePlugin.d.ts +100 -0
- package/libs/base/BasePlugin.js +31 -0
- package/libs/base/BasePluginWithData.d.ts +34 -0
- package/libs/base/BasePluginWithData.js +4 -0
- package/libs/components/PaintBrush/Controller.d.ts +43 -0
- package/libs/components/PaintBrush/Controller.js +575 -0
- package/libs/components/PaintBrush/Subscribe.d.ts +76 -0
- package/libs/components/PaintBrush/Subscribe.js +121 -0
- package/libs/components/PaintBrush/index.d.ts +27 -0
- package/libs/components/PaintBrush/index.js +57 -0
- package/libs/components/PaintBrush/style.d.ts +2 -0
- package/libs/components/PaintBrush/style.js +102 -0
- package/libs/components/PaintBrush/tween.d.ts +62 -0
- package/libs/components/PaintBrush/tween.js +15 -0
- package/libs/components/PaintBrush/typings.d.ts +58 -0
- package/libs/components/PaintBrush/typings.js +6 -0
- package/libs/components/PaintBrush/utils.d.ts +26 -0
- package/libs/components/PaintBrush/utils.js +51 -0
- package/libs/components/index.d.ts +2 -0
- package/libs/components/index.js +3 -0
- package/libs/floorplan/Assets/compass.d.ts +1 -0
- package/libs/floorplan/Assets/compass.js +1 -0
- package/libs/floorplan/Components/BaseImage.js +10 -5
- package/libs/floorplan/Components/Camera.js +120 -0
- package/libs/floorplan/Components/Compass.js +120 -0
- package/libs/floorplan/Components/CurrentFloor.js +469 -0
- package/libs/floorplan/Components/Main.js +470 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +45 -8
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +30 -103
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +322 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +309 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +30 -27
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +11 -9
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +70 -77
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +661 -325
- package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
- package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/libs/floorplan/ModelFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +49 -33
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +3 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +114 -53
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +194 -42
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +1 -0
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +53 -47
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +450 -154
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +6 -4
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +2 -2
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/index.d.ts +6 -0
- package/libs/floorplan/index.js +7 -0
- package/libs/floorplan/utils/constant.d.ts +22 -0
- package/libs/floorplan/utils/constant.js +23 -0
- package/libs/floorplan/utils/correctFiveState.d.ts +15 -0
- package/libs/floorplan/utils/correctFiveState.js +46 -0
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +3 -3
- package/libs/index.d.ts +15 -24
- package/libs/index.js +25 -14
- package/libs/shared-utils/Subscribe.js +8 -1
- package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
- package/libs/shared-utils/createCanvasTextTexture.js +6 -5
- package/libs/shared-utils/five/changeMode.d.ts +4 -1
- package/libs/shared-utils/five/changeMode.js +34 -13
- package/libs/shared-utils/getPxmm.d.ts +8 -0
- package/libs/shared-utils/getPxmm.js +25 -20
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +1 -0
- package/libs/shared-utils/math/Interval.d.ts +13 -0
- package/libs/shared-utils/math/Interval.js +40 -0
- package/libs/shared-utils/math/Rectangle.d.ts +27 -0
- package/libs/shared-utils/math/Rectangle.js +50 -0
- package/libs/shared-utils/math/evenNumber.js +1 -1
- package/libs/shared-utils/math/index.d.ts +2 -0
- package/libs/shared-utils/math/index.js +2 -0
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
- package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
- package/libs/shared-utils/tinyEJSrender.js +210 -0
- package/libs/shared-utils/uuid.d.ts +1 -0
- package/libs/shared-utils/uuid.js +1 -0
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +13 -6
- package/CHANGELOG.md +0 -30
- package/dist/shared-utils/five/useFivePlugin.d.ts +0 -1
- package/dist/shared-utils/useDebounce.d.ts +0 -8
- package/dist/shared-utils/useThrottle.d.ts +0 -8
- package/docs/enums/ModelFloorplanErrorType.html +0 -1
- package/docs/interfaces/ModelFloorplanParameterType.html +0 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +0 -5
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +0 -1
|
@@ -1,30 +1,107 @@
|
|
|
1
1
|
import Main from './Components/Main';
|
|
2
|
+
import equal from '../../shared-utils/equal';
|
|
3
|
+
import { CAMERA_IMAGE } from '../Assets/camera';
|
|
4
|
+
import * as BasePlugin from '../../base/BasePluginWithData';
|
|
2
5
|
import formatData, { formatExtraObjects } from '../utils/formatData';
|
|
3
|
-
export
|
|
4
|
-
app;
|
|
5
|
-
five;
|
|
6
|
-
wrapperSelector = '';
|
|
7
|
-
data;
|
|
8
|
-
wrapper = null;
|
|
9
|
-
extraObjects;
|
|
10
|
-
originExtraObjects;
|
|
11
|
-
configs = {};
|
|
6
|
+
export class Controller extends BasePlugin.Controller {
|
|
12
7
|
constructor(five, params) {
|
|
8
|
+
super(five);
|
|
9
|
+
// =============== public properties =================
|
|
10
|
+
Object.defineProperty(this, "name", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: 'panoFloorplanRadarPlugin'
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(this, "state", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: void 0
|
|
21
|
+
});
|
|
22
|
+
// =============== protected properties =================
|
|
23
|
+
Object.defineProperty(this, "data", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: void 0
|
|
28
|
+
});
|
|
29
|
+
// =============== private properties =================
|
|
30
|
+
Object.defineProperty(this, "app", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: void 0
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(this, "wrapperSelector", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: ''
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(this, "wrapper", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
value: null
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(this, "disposed", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: true,
|
|
51
|
+
writable: true,
|
|
52
|
+
value: false
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(this, "extraObjects", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
configurable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
value: []
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(this, "dispose", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
configurable: true,
|
|
63
|
+
writable: true,
|
|
64
|
+
value: () => {
|
|
65
|
+
var _a;
|
|
66
|
+
this.disposed = true;
|
|
67
|
+
(_a = this.app) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
68
|
+
this.wrapper = null;
|
|
69
|
+
this.wrapperSelector = '';
|
|
70
|
+
this.hooks.emit('dispose');
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(this, "_disable", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
configurable: true,
|
|
76
|
+
writable: true,
|
|
77
|
+
value: (options) => {
|
|
78
|
+
var _a;
|
|
79
|
+
const { userAction } = options;
|
|
80
|
+
(_a = this.app) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
81
|
+
this.app = undefined;
|
|
82
|
+
this.hooks.emit('disable', { userAction });
|
|
83
|
+
}
|
|
84
|
+
});
|
|
13
85
|
this.five = five;
|
|
14
|
-
|
|
15
|
-
|
|
86
|
+
// =============== init State ===============
|
|
87
|
+
const baseConfig = {
|
|
88
|
+
hoverEnable: false,
|
|
89
|
+
cameraImageUrl: CAMERA_IMAGE,
|
|
90
|
+
};
|
|
91
|
+
const paramsConfig = (params === null || params === void 0 ? void 0 : params.configs) ? params.configs : {};
|
|
92
|
+
const config = Object.assign(Object.assign({}, baseConfig), paramsConfig);
|
|
93
|
+
this.state = { enabled: true, visible: true, config };
|
|
94
|
+
// =============== init wrapper ===============
|
|
95
|
+
if (params === null || params === void 0 ? void 0 : params.wrapper)
|
|
96
|
+
console.warn('不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法');
|
|
97
|
+
if (typeof (params === null || params === void 0 ? void 0 : params.wrapper) === 'string')
|
|
16
98
|
this.wrapperSelector = params.wrapper;
|
|
17
|
-
else if (params
|
|
99
|
+
else if ((params === null || params === void 0 ? void 0 : params.wrapper) instanceof Element)
|
|
18
100
|
this.wrapper = params.wrapper;
|
|
101
|
+
// =============== init Listener ===============
|
|
19
102
|
five.once('dispose', this.dispose);
|
|
20
103
|
}
|
|
21
|
-
|
|
22
|
-
this.app?.$destroy();
|
|
23
|
-
};
|
|
24
|
-
load = async (data) => {
|
|
25
|
-
const copyData = JSON.parse(JSON.stringify(data));
|
|
26
|
-
const floorplanData = await formatData(copyData);
|
|
27
|
-
this.data = floorplanData;
|
|
104
|
+
async load(serverData, state, userAction = true) {
|
|
28
105
|
// const loadImage = async () => {
|
|
29
106
|
// const floorIndex = this.five.work.observers[this.five.getCurrentState().panoIndex].floorIndex
|
|
30
107
|
// // 当有 svgString 时,没有加载过程
|
|
@@ -40,49 +117,124 @@ export default class PanoFloorplanRadarPluginController {
|
|
|
40
117
|
// })
|
|
41
118
|
// }
|
|
42
119
|
// await loadImage()
|
|
120
|
+
function isPluginServerData(serverData) {
|
|
121
|
+
return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
|
|
122
|
+
}
|
|
123
|
+
const copyData = JSON.parse(JSON.stringify(serverData));
|
|
124
|
+
const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
|
|
125
|
+
const prevData = this.data;
|
|
126
|
+
this.data = await formatData(_serverData);
|
|
127
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
128
|
+
this.hooks.emit('dataChange', this.data, prevData);
|
|
129
|
+
if (state)
|
|
130
|
+
this.updateState(state, userAction);
|
|
43
131
|
this.render();
|
|
44
|
-
}
|
|
132
|
+
}
|
|
133
|
+
async show(options = {}) {
|
|
134
|
+
// 已经展示完成了,不做任何操作
|
|
135
|
+
if (this.state.visible)
|
|
136
|
+
return;
|
|
137
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
138
|
+
this.updateState({ visible: true }, userAction);
|
|
139
|
+
this._show({ userAction });
|
|
140
|
+
}
|
|
141
|
+
async hide(options = {}) {
|
|
142
|
+
if (!this.state.visible)
|
|
143
|
+
return;
|
|
144
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
145
|
+
this.updateState({ visible: false }, userAction);
|
|
146
|
+
this._hide({ userAction });
|
|
147
|
+
}
|
|
148
|
+
enable(options = {}) {
|
|
149
|
+
if (this.state.enabled)
|
|
150
|
+
return;
|
|
151
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
152
|
+
this.updateState({ enabled: true }, options.userAction || userAction);
|
|
153
|
+
this._enable({ userAction });
|
|
154
|
+
}
|
|
155
|
+
disable(options = {}) {
|
|
156
|
+
if (!this.state.enabled)
|
|
157
|
+
return;
|
|
158
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
159
|
+
this.updateState({ enabled: false }, options.userAction || userAction);
|
|
160
|
+
this._disable({ userAction });
|
|
161
|
+
}
|
|
162
|
+
/** 更改插件 State */
|
|
163
|
+
setState(state, options = {}) {
|
|
164
|
+
const prevState = this.state;
|
|
165
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
166
|
+
this.updateState(state, userAction);
|
|
167
|
+
if (state.enabled !== undefined && prevState.enabled !== state.enabled) {
|
|
168
|
+
const options = { userAction };
|
|
169
|
+
state.enabled ? this._enable(options) : this._disable(options);
|
|
170
|
+
}
|
|
171
|
+
if (state.visible !== undefined && prevState.visible !== state.visible) {
|
|
172
|
+
const options = { userAction };
|
|
173
|
+
state.visible ? this._show(options) : this._hide(options);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
45
176
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
46
177
|
appendTo(wrapper) {
|
|
47
178
|
this.wrapper = wrapper;
|
|
48
179
|
this.render();
|
|
49
180
|
}
|
|
50
|
-
changeConfigs(
|
|
51
|
-
|
|
181
|
+
changeConfigs(config, userAction = true) {
|
|
182
|
+
this.setState({ config }, { userAction });
|
|
52
183
|
this.render();
|
|
53
184
|
}
|
|
54
185
|
setExtraObjectsWith3DPositions(data) {
|
|
55
|
-
this.originExtraObjects = data;
|
|
56
186
|
if (!this.data)
|
|
57
187
|
return;
|
|
58
188
|
this.extraObjects = formatExtraObjects(data, this.five, this.data);
|
|
59
189
|
this.render();
|
|
60
190
|
}
|
|
191
|
+
async formatData(serverData) {
|
|
192
|
+
return await formatData(serverData.data);
|
|
193
|
+
}
|
|
194
|
+
_enable(options) {
|
|
195
|
+
const { userAction } = options;
|
|
196
|
+
this.hooks.emit('enable', { userAction });
|
|
197
|
+
if (this.state.visible)
|
|
198
|
+
this._show({ userAction });
|
|
199
|
+
}
|
|
200
|
+
_show(options) {
|
|
201
|
+
if (this.disposed)
|
|
202
|
+
return;
|
|
203
|
+
if (!this.state.enabled)
|
|
204
|
+
return;
|
|
205
|
+
const { userAction } = options;
|
|
206
|
+
this.hooks.emit('show', { userAction });
|
|
207
|
+
this.render();
|
|
208
|
+
}
|
|
209
|
+
_hide(options) {
|
|
210
|
+
if (this.disposed)
|
|
211
|
+
return;
|
|
212
|
+
if (!this.state.enabled)
|
|
213
|
+
return;
|
|
214
|
+
const { userAction } = options;
|
|
215
|
+
this.hooks.emit('hide', { userAction });
|
|
216
|
+
this.render();
|
|
217
|
+
}
|
|
218
|
+
updateState(state, userAction) {
|
|
219
|
+
const prevState = this.state;
|
|
220
|
+
this.state = Object.assign(Object.assign({}, this.state), state);
|
|
221
|
+
if (equal(this.state, prevState, { deep: true }))
|
|
222
|
+
return;
|
|
223
|
+
this.hooks.emit('stateChange', { state: this.state, prevState, userAction });
|
|
224
|
+
}
|
|
61
225
|
render() {
|
|
226
|
+
if (this.disposed)
|
|
227
|
+
return;
|
|
228
|
+
if (!this.state.enabled)
|
|
229
|
+
return;
|
|
62
230
|
// 处理 wrapper
|
|
63
|
-
if (!this.wrapper) {
|
|
231
|
+
if (!this.wrapper && this.wrapperSelector) {
|
|
64
232
|
const _wrapper = document.querySelector(this.wrapperSelector);
|
|
65
233
|
this.wrapper = _wrapper;
|
|
66
234
|
}
|
|
67
235
|
if (!this.data || !this.wrapper)
|
|
68
236
|
return;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
const props = {
|
|
73
|
-
five: this.five,
|
|
74
|
-
floorplanData: this.data,
|
|
75
|
-
extraObjects: this.extraObjects,
|
|
76
|
-
cameraImageUrl: this.configs.cameraImageUrl,
|
|
77
|
-
hoverEnable: this.configs.hoverEnable ?? false,
|
|
78
|
-
};
|
|
79
|
-
if (!this.app) {
|
|
80
|
-
this.app = new Main({
|
|
81
|
-
target: this.wrapper,
|
|
82
|
-
props,
|
|
83
|
-
});
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
this.app.$set(props);
|
|
237
|
+
const props = Object.assign(Object.assign({}, this.state.config), { five: this.five, floorplanData: this.data, visible: this.state.visible, extraObjects: this.extraObjects });
|
|
238
|
+
this.app ? this.app.$set(props) : (this.app = new Main({ target: this.wrapper, props }));
|
|
87
239
|
}
|
|
88
240
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import type { Parameters } from './typing';
|
|
1
2
|
import type { FivePlugin } from '@realsee/five';
|
|
2
|
-
import
|
|
3
|
-
export declare const PanoFloorplanRadarPlugin: FivePlugin<
|
|
3
|
+
import { Controller } from './Controller';
|
|
4
|
+
export declare const PanoFloorplanRadarPlugin: FivePlugin<Parameters | undefined, Controller>;
|
|
5
|
+
export declare type PanoFloorplanRadarPluginParameterType = Parameters | undefined;
|
|
6
|
+
export declare type PanoFloorplanRadarPluginReturnType = InstanceType<typeof Controller>;
|
|
4
7
|
export default PanoFloorplanRadarPlugin;
|
|
5
|
-
export type { PanoFloorplanRadarPluginController };
|
|
6
|
-
export type { PanoFloorplanRadarPluginControllerParameter } from './Controller';
|
|
7
|
-
export declare type PanoFloorplanRadarPluginReturnType = PanoFloorplanRadarPluginController;
|
|
8
|
-
export declare type PanoFloorplanRadarPluginParameterType = ConstructorParameters<typeof PanoFloorplanRadarPluginController>[1];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Controller } from './Controller';
|
|
2
2
|
export const PanoFloorplanRadarPlugin = (five, params) => {
|
|
3
|
-
return new
|
|
3
|
+
return new Controller(five, params);
|
|
4
4
|
};
|
|
5
5
|
export default PanoFloorplanRadarPlugin;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type * as BasePlugin from '../../base/BasePluginWithData';
|
|
2
|
+
import type { FloorplanData } from '../typings/floorplanData';
|
|
3
|
+
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
4
|
+
export interface Config {
|
|
5
|
+
/** 鼠标放置在分间上时,是否要自动高亮分间 */
|
|
6
|
+
hoverEnable: boolean;
|
|
7
|
+
/** 自定义「雷达」图标 */
|
|
8
|
+
cameraImageUrl: string;
|
|
9
|
+
}
|
|
10
|
+
export interface State extends BasePlugin.State {
|
|
11
|
+
visible: boolean;
|
|
12
|
+
config: Config;
|
|
13
|
+
}
|
|
14
|
+
export interface EventMap extends BasePlugin.EventMap<State, FloorplanData> {
|
|
15
|
+
/** visible 从 false 到 true 的回调
|
|
16
|
+
* @param event.userAction 是否是用户操作
|
|
17
|
+
*/
|
|
18
|
+
show: (event: {
|
|
19
|
+
userAction: boolean;
|
|
20
|
+
}) => void;
|
|
21
|
+
/** visible 从 true 到 false 的回调
|
|
22
|
+
* @param event.userAction 是否是用户操作
|
|
23
|
+
*/
|
|
24
|
+
hide: (event: {
|
|
25
|
+
userAction: boolean;
|
|
26
|
+
}) => void;
|
|
27
|
+
/** enabled 从 false 到 true 的回调
|
|
28
|
+
* @param event.userAction 是否是用户操作
|
|
29
|
+
*/
|
|
30
|
+
enable: (event: {
|
|
31
|
+
userAction: boolean;
|
|
32
|
+
}) => void;
|
|
33
|
+
/** enabled 从 true 到 false 的回调
|
|
34
|
+
* @param event.userAction 是否是用户操作
|
|
35
|
+
*/
|
|
36
|
+
disable: (event: {
|
|
37
|
+
userAction: boolean;
|
|
38
|
+
}) => void;
|
|
39
|
+
}
|
|
40
|
+
/** 插件初始化参数 */
|
|
41
|
+
export interface Parameters extends Partial<Config> {
|
|
42
|
+
wrapper?: string | Element;
|
|
43
|
+
configs?: {
|
|
44
|
+
hoverEnable?: boolean;
|
|
45
|
+
cameraImageUrl?: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface PluginServerData extends BasePlugin.ServerData {
|
|
49
|
+
version: number;
|
|
50
|
+
data: FloorplanServerData;
|
|
51
|
+
}
|
|
52
|
+
export { FloorplanData as PluginData };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,61 +1,67 @@
|
|
|
1
|
+
import type { BaseOptions } from '../../base/BasePlugin';
|
|
1
2
|
import type { Five } from '@realsee/five';
|
|
2
3
|
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
3
|
-
import type {
|
|
4
|
-
import
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
cameraImageUrl?: string;
|
|
10
|
-
hoverEnable?: boolean;
|
|
11
|
-
compassEnable?: boolean;
|
|
12
|
-
autoShowEnable?: boolean;
|
|
13
|
-
ruleLabelsEnable?: boolean;
|
|
14
|
-
roomLabelsEnable?: boolean;
|
|
15
|
-
preventRoomClick?: boolean;
|
|
16
|
-
attachedTo?: FLOOR_PLAN_ATTACHED_TO;
|
|
17
|
-
getLabelElement?: (room: FloorplanRoomItem) => Element | null;
|
|
18
|
-
}
|
|
19
|
-
export declare type TopviewFloorplanPluginReturnType = TopviewFloorplanPluginController;
|
|
20
|
-
export declare class TopviewFloorplanPluginController {
|
|
21
|
-
size: {
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
};
|
|
25
|
-
visible: boolean;
|
|
26
|
-
private pxmm;
|
|
4
|
+
import type { State, EventMap, Parameters, PluginData, PluginServerData } from './typing';
|
|
5
|
+
import * as BasePlugin from '../../base/BasePluginWithData';
|
|
6
|
+
export declare class Controller extends BasePlugin.Controller<State, EventMap, PluginServerData, PluginData> {
|
|
7
|
+
name: string;
|
|
8
|
+
state: State;
|
|
9
|
+
protected data?: PluginData;
|
|
27
10
|
private app?;
|
|
28
|
-
private
|
|
11
|
+
private selector?;
|
|
29
12
|
private panoIndex;
|
|
30
13
|
private floorIndex;
|
|
31
|
-
|
|
32
|
-
private lastPanoramaLongitude;
|
|
33
|
-
private selector?;
|
|
34
|
-
private floorplanData?;
|
|
14
|
+
/** 户型图父容器 */
|
|
35
15
|
private wrapper?;
|
|
16
|
+
/** 户型图主容器 */
|
|
36
17
|
private container;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
/** 展示户型图图前,Five 的 Panorama Longitude */
|
|
19
|
+
private lastPanoramaLongitude;
|
|
20
|
+
/** 户型图大小 */
|
|
21
|
+
private size;
|
|
22
|
+
/** 是否已经执行过事件监听 */
|
|
23
|
+
private hasAddedEventListener;
|
|
24
|
+
/** 上一次隐藏是否是用户调用了 hide 导致的 */
|
|
25
|
+
private isHiddenByHideFunc;
|
|
26
|
+
constructor(five: Five, params?: Parameters);
|
|
27
|
+
load(serverData: PluginServerData | FloorplanServerData, state?: Partial<State>, userAction?: boolean): Promise<void>;
|
|
28
|
+
/** 更新户型图大小 */
|
|
29
|
+
updateSize: () => void;
|
|
30
|
+
/** 更新户型图位置 */
|
|
31
|
+
updatePosition(): void;
|
|
40
32
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
41
33
|
appendTo(wrapper: Element): this;
|
|
34
|
+
show(options?: BaseOptions): Promise<void>;
|
|
35
|
+
hide(options?: BaseOptions): Promise<void>;
|
|
36
|
+
enable(options?: BaseOptions): void;
|
|
37
|
+
disable(options?: BaseOptions): void;
|
|
38
|
+
/** 销毁插件 */
|
|
42
39
|
dispose: () => void;
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
private
|
|
47
|
-
|
|
48
|
-
private
|
|
49
|
-
|
|
50
|
-
private
|
|
51
|
-
private
|
|
40
|
+
/** 更改插件 State */
|
|
41
|
+
setState(state: Partial<State>, options?: BaseOptions): void;
|
|
42
|
+
protected formatData(serverData: PluginServerData): Promise<PluginData>;
|
|
43
|
+
private _show;
|
|
44
|
+
private _hide;
|
|
45
|
+
private _enable;
|
|
46
|
+
private _disable;
|
|
47
|
+
private updateState;
|
|
48
|
+
private addEventListener;
|
|
49
|
+
private removeEventListener;
|
|
50
|
+
/** modelLoaded 之后自动执行 append container 操作 */
|
|
51
|
+
private onFiveModelLoaded;
|
|
52
52
|
/** 非 Topview 态隐藏户型图 */
|
|
53
|
-
private
|
|
53
|
+
private onFiveModeChange;
|
|
54
|
+
private onFivePanoArrived;
|
|
55
|
+
private onFiveCameraUpdate;
|
|
56
|
+
private onFiveWantsGesture;
|
|
57
|
+
private onFiveWantsMoveToPano;
|
|
54
58
|
/** 动画结束后是 Topview 态就展示户型图 */
|
|
55
|
-
private
|
|
56
|
-
private
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
private onFiveInitAnimationEnded;
|
|
60
|
+
private onModelShownFloorChange;
|
|
61
|
+
/** 如果用户是通过 selector 设置父容器,需要在 modelLoaded 之后把 container 自动放到父容器里
|
|
62
|
+
*
|
|
63
|
+
* - TODO: 等 selector 功能下掉之后删除这个逻辑
|
|
64
|
+
*/
|
|
65
|
+
private initContainer;
|
|
60
66
|
private render;
|
|
61
67
|
}
|