@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,9 +1,7 @@
|
|
|
1
|
+
import type { Parameters } from './typing';
|
|
1
2
|
import type { FivePlugin } from '@realsee/five';
|
|
2
|
-
import
|
|
3
|
-
export declare const ModelFloorplanPlugin: FivePlugin<
|
|
3
|
+
import { Controller } from './Controller';
|
|
4
|
+
export declare const ModelFloorplanPlugin: FivePlugin<undefined | Parameters, Controller>;
|
|
5
|
+
export declare type ModelFloorplanPluginParameterType = Parameters | undefined;
|
|
6
|
+
export declare type ModelFloorplanPluginReturnType = InstanceType<typeof Controller>;
|
|
4
7
|
export default ModelFloorplanPlugin;
|
|
5
|
-
export declare type ModelFloorplanPluginReturnType = FloorplanPluginController;
|
|
6
|
-
export type { ModelFloorplanViewEvent } from './typings/events.type';
|
|
7
|
-
export type { FloorplanErrorType as ModelFloorplanErrorType } from './utils/constant';
|
|
8
|
-
export type { ModelFloorplanPluginsConfigs, ModelFloorplanParameterType } from './Controller';
|
|
9
|
-
export type { FloorplanEventHandlers as ModelFloorplanEventHandlers } from './typings/events.type';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Controller } from './Controller';
|
|
2
2
|
export const ModelFloorplanPlugin = (five, params) => {
|
|
3
|
-
return new
|
|
3
|
+
return new Controller(five, params);
|
|
4
4
|
};
|
|
5
5
|
export default ModelFloorplanPlugin;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { FLOOR_PLAN_ATTACHED_TO } from '../constant';
|
|
2
|
+
import type * as BasePlugin from '../../base/BasePluginWithData';
|
|
3
|
+
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
4
|
+
import type { FloorplanData, FloorplanRoomItem } from '../typings/floorplanData';
|
|
5
|
+
export interface State extends BasePlugin.State {
|
|
6
|
+
visible: boolean;
|
|
7
|
+
config: Config;
|
|
8
|
+
}
|
|
9
|
+
export interface Config {
|
|
10
|
+
/** 指北针的显示文案,默认为 '北' */
|
|
11
|
+
northDesc: string;
|
|
12
|
+
/** 户型图展示时,模型的透明度,默认为 1 */
|
|
13
|
+
modelOpacity: number;
|
|
14
|
+
/** 鼠标放置在分间上时,是否要自动高亮分间,默认为 true */
|
|
15
|
+
hoverEnable: boolean;
|
|
16
|
+
/** 是否要启用指北针功能,默认为 true */
|
|
17
|
+
compassEnable: boolean;
|
|
18
|
+
/** Five 切换到 Topview Mode 时,是否自动展示户型图,默认为 true */
|
|
19
|
+
autoShowEnable: boolean;
|
|
20
|
+
/** 是否要启用户型图分间标尺功能,默认为 true */
|
|
21
|
+
ruleLabelsEnable: boolean;
|
|
22
|
+
/** 是否要启用户型图分间标签功能,默认为 true */
|
|
23
|
+
roomLabelsEnable: boolean;
|
|
24
|
+
/** 自定义「雷达」图标 */
|
|
25
|
+
cameraImageUrl: string;
|
|
26
|
+
/** 计算户型图大小时,以模型的哪个高度为依据,默认为 BOUNDING_CENTER
|
|
27
|
+
* - FLOOR_PLAN_ATTACHED_TO.FLOOR: 户型图大小与模型的地板进行贴合
|
|
28
|
+
* - FLOOR_PLAN_ATTACHED_TO.CEILING: 户型图大小与模型的天花板进行贴合
|
|
29
|
+
* - FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER: 户型图大小与模型的中心进行贴合
|
|
30
|
+
*/
|
|
31
|
+
attachedTo: FLOOR_PLAN_ATTACHED_TO;
|
|
32
|
+
/** 分间标签的自定义函数,通过返回自定义 DOM 替换对应分间的标签 */
|
|
33
|
+
getLabelElement: undefined | ((room: FloorplanRoomItem) => Element | null);
|
|
34
|
+
/** 是否支持房屋标签自适应展示,默认为 true
|
|
35
|
+
* @description
|
|
36
|
+
* * 标签边框超过房间边框时,自动隐藏;不超过时自动展示。
|
|
37
|
+
* * 鼠标 hover 时,自动展示。
|
|
38
|
+
* */
|
|
39
|
+
adaptiveRoomLabelVisibleEnable: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface Parameters extends Partial<Config> {
|
|
42
|
+
selector?: string | Element;
|
|
43
|
+
scale?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface ViewEvent {
|
|
46
|
+
/** 是否是用户滑动模型导致的户型图自动展示/消失 */
|
|
47
|
+
auto: boolean;
|
|
48
|
+
/** 是否是用户操作 */
|
|
49
|
+
userAction: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface EventMap extends BasePlugin.EventMap<State, FloorplanData> {
|
|
52
|
+
/**
|
|
53
|
+
* 展示结束的回调
|
|
54
|
+
* @param event.auto 是否是自动操作
|
|
55
|
+
* @param event.userAction 是否是用户操作
|
|
56
|
+
*/
|
|
57
|
+
showAnimationEnded: (event: ViewEvent) => void;
|
|
58
|
+
/** visible 从 false 到 true 的回调
|
|
59
|
+
* @param event.userAction 是否是用户操作
|
|
60
|
+
*/
|
|
61
|
+
show: (event: ViewEvent) => void;
|
|
62
|
+
/** visible 从 true 到 false 的回调
|
|
63
|
+
* @param event.auto 是否是自动操作
|
|
64
|
+
* @param event.userAction 是否是用户操作
|
|
65
|
+
*/
|
|
66
|
+
hide: (event: ViewEvent) => void;
|
|
67
|
+
/** enabled 从 false 到 true 的回调
|
|
68
|
+
* @param event.userAction 是否是用户操作
|
|
69
|
+
*/
|
|
70
|
+
enable: (event: {
|
|
71
|
+
userAction: boolean;
|
|
72
|
+
}) => void;
|
|
73
|
+
/** enabled 从 true 到 false 的回调
|
|
74
|
+
* @param event.userAction 是否是用户操作
|
|
75
|
+
*/
|
|
76
|
+
disable: (event: {
|
|
77
|
+
userAction: boolean;
|
|
78
|
+
}) => void;
|
|
79
|
+
/**
|
|
80
|
+
* 点击户型图的回调
|
|
81
|
+
* @return 当返回 false 时,会阻止默认行为
|
|
82
|
+
*/
|
|
83
|
+
click: () => boolean | void;
|
|
84
|
+
}
|
|
85
|
+
export interface PluginServerData extends BasePlugin.ServerData {
|
|
86
|
+
version: number;
|
|
87
|
+
data: FloorplanServerData;
|
|
88
|
+
}
|
|
89
|
+
export interface ShowOptions {
|
|
90
|
+
/** 展示户型图时,希望到达的楼层数 */
|
|
91
|
+
floorIndex: number;
|
|
92
|
+
/** 是否自动展示 */
|
|
93
|
+
isAutoShow: boolean;
|
|
94
|
+
/** 展示户型图时,模型透明度 */
|
|
95
|
+
modelOpacity: number;
|
|
96
|
+
/** 是否需要 opacity 动画 */
|
|
97
|
+
immediately: boolean;
|
|
98
|
+
/** 是否是用户操作 */
|
|
99
|
+
userAction: boolean;
|
|
100
|
+
}
|
|
101
|
+
export interface HideOptions {
|
|
102
|
+
/** 是否自动隐藏 */
|
|
103
|
+
isAutoHide: boolean;
|
|
104
|
+
/** 是否是用户操作 */
|
|
105
|
+
userAction: boolean;
|
|
106
|
+
}
|
|
107
|
+
export { FloorplanData as PluginData };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
set_style
|
|
14
14
|
} from "svelte/internal";
|
|
15
15
|
|
|
16
|
-
import { onMount
|
|
16
|
+
import { onMount } from 'svelte';
|
|
17
17
|
import { CAMERA_IMAGE } from '../../Assets/camera';
|
|
18
18
|
import throttle from '../../../shared-utils/throttle';
|
|
19
19
|
|
|
@@ -64,58 +64,54 @@ function create_fragment(ctx) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
function getCameraRotateTransform(longitude) {
|
|
68
|
+
// 为什么要加 45 ==> 因为 UI 给的图初始角度是 -45
|
|
69
|
+
const rotate = Math.floor(longitude / Math.PI * 180) * -1 + 45;
|
|
70
|
+
|
|
71
|
+
return `rotate(${rotate}deg)`;
|
|
72
|
+
}
|
|
73
|
+
|
|
67
74
|
function instance($$self, $$props, $$invalidate) {
|
|
75
|
+
let positionTransform;
|
|
76
|
+
let rotateTransform;
|
|
68
77
|
let { five } = $$props;
|
|
69
78
|
let { pxmm } = $$props;
|
|
70
79
|
let { floorplanData } = $$props;
|
|
71
80
|
let { cameraImageUrl } = $$props;
|
|
81
|
+
let panoIndex = five.getCurrentState().panoIndex;
|
|
82
|
+
let longitude = five.getCurrentState().longitude;
|
|
72
83
|
|
|
73
84
|
/** 获取相机在当前 Five 状态下的位移 */
|
|
74
|
-
function getCameraPositionTransform(panoIndex) {
|
|
75
|
-
const observer = floorplanData.observers[panoIndex];
|
|
85
|
+
function getCameraPositionTransform(floorplanData, panoIndex) {
|
|
76
86
|
const bounding = floorplanData.bounding;
|
|
87
|
+
const floorplanObserver = floorplanData.observers[panoIndex];
|
|
88
|
+
if (!floorplanObserver) return '';
|
|
77
89
|
const clientWidth = (bounding.max.x - bounding.min.x) * pxmm;
|
|
78
90
|
const clientHeight = (bounding.max.y - bounding.min.y) * pxmm;
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
const top = Math.floor(observer.positionInImage.y * clientHeight);
|
|
91
|
+
const left = Math.floor(floorplanObserver.positionInImage.x * clientWidth);
|
|
92
|
+
const top = Math.floor(floorplanObserver.positionInImage.y * clientHeight);
|
|
82
93
|
return `translate(${left}px, ${top}px)`;
|
|
83
94
|
}
|
|
84
95
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const { longitude } = five.getCurrentState();
|
|
88
|
-
|
|
89
|
-
// 为什么要加 45 ==> 因为 UI 给的图初始角度是 -45
|
|
90
|
-
const rotate = Math.floor(longitude / Math.PI * 180) * -1 + 45;
|
|
91
|
-
|
|
92
|
-
return `rotate(${rotate}deg)`;
|
|
96
|
+
function onFivePanoWillArrive(_panoIndex) {
|
|
97
|
+
$$invalidate(6, panoIndex = _panoIndex);
|
|
93
98
|
}
|
|
94
99
|
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const changeRotate = throttle(
|
|
100
|
-
() => {
|
|
101
|
-
$$invalidate(1, rotateTransform = getCameraRotationTransform());
|
|
100
|
+
const onFiveCameraDirectionUpdate = throttle(
|
|
101
|
+
pose => {
|
|
102
|
+
$$invalidate(7, longitude = pose.longitude);
|
|
102
103
|
},
|
|
103
104
|
1000 / 60
|
|
104
105
|
);
|
|
105
106
|
|
|
106
|
-
// 初始状态,不能等 mount 之后再计算,那样第一次 camera 展示的时候也会有动画
|
|
107
|
-
let rotateTransform = getCameraRotationTransform();
|
|
108
|
-
|
|
109
|
-
let positionTransform = getCameraPositionTransform(five.getCurrentState().panoIndex);
|
|
110
|
-
|
|
111
107
|
onMount(() => {
|
|
112
|
-
five.on('panoWillArrive',
|
|
113
|
-
five.on('cameraDirectionUpdate',
|
|
114
|
-
});
|
|
108
|
+
five.on('panoWillArrive', onFivePanoWillArrive);
|
|
109
|
+
five.on('cameraDirectionUpdate', onFiveCameraDirectionUpdate);
|
|
115
110
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
return function dispose() {
|
|
112
|
+
five.off('panoWillArrive', onFivePanoWillArrive);
|
|
113
|
+
five.off('cameraDirectionUpdate', onFiveCameraDirectionUpdate);
|
|
114
|
+
};
|
|
119
115
|
});
|
|
120
116
|
|
|
121
117
|
$$self.$$set = $$props => {
|
|
@@ -125,7 +121,27 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
125
121
|
if ('cameraImageUrl' in $$props) $$invalidate(0, cameraImageUrl = $$props.cameraImageUrl);
|
|
126
122
|
};
|
|
127
123
|
|
|
128
|
-
|
|
124
|
+
$$self.$$.update = () => {
|
|
125
|
+
if ($$self.$$.dirty & /*floorplanData, panoIndex*/ 96) {
|
|
126
|
+
// 初始状态,不能等 mount 之后再计算,那样第一次 camera 展示的时候也会有动画
|
|
127
|
+
$: $$invalidate(2, positionTransform = getCameraPositionTransform(floorplanData, panoIndex));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if ($$self.$$.dirty & /*longitude*/ 128) {
|
|
131
|
+
$: $$invalidate(1, rotateTransform = getCameraRotateTransform(longitude));
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
return [
|
|
136
|
+
cameraImageUrl,
|
|
137
|
+
rotateTransform,
|
|
138
|
+
positionTransform,
|
|
139
|
+
five,
|
|
140
|
+
pxmm,
|
|
141
|
+
floorplanData,
|
|
142
|
+
panoIndex,
|
|
143
|
+
longitude
|
|
144
|
+
];
|
|
129
145
|
}
|
|
130
146
|
|
|
131
147
|
class Component extends SvelteComponent {
|
|
@@ -214,7 +214,9 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
214
214
|
|
|
215
215
|
$$self.$$.update = () => {
|
|
216
216
|
if ($$self.$$.dirty & /*extraObjects, floorIndex*/ 132) {
|
|
217
|
-
$: $$invalidate(5, currentFloorExtraObjects = extraObjects
|
|
217
|
+
$: $$invalidate(5, currentFloorExtraObjects = extraObjects === null || extraObjects === void 0
|
|
218
|
+
? void 0
|
|
219
|
+
: extraObjects.filter(object => object.floorIndex === floorIndex));
|
|
218
220
|
}
|
|
219
221
|
};
|
|
220
222
|
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
destroy_component,
|
|
13
13
|
detach,
|
|
14
14
|
element,
|
|
15
|
+
empty,
|
|
15
16
|
get_spread_update,
|
|
16
17
|
group_outros,
|
|
17
18
|
init,
|
|
@@ -32,24 +33,85 @@ function add_css(target) {
|
|
|
32
33
|
append_styles(target, "svelte-7d8ub2", ".plugin-floorplan-radar.svelte-7d8ub2{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-7d8ub2{position:relative}");
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
// (41:
|
|
36
|
+
// (41:0) {#if visible}
|
|
36
37
|
function create_if_block(ctx) {
|
|
38
|
+
let div;
|
|
39
|
+
let div_resize_listener;
|
|
40
|
+
let current;
|
|
41
|
+
let if_block = /*clientWidth*/ ctx[6] !== 0 && create_if_block_1(ctx);
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
c() {
|
|
45
|
+
div = element("div");
|
|
46
|
+
if (if_block) if_block.c();
|
|
47
|
+
attr(div, "class", "plugin-floorplan-radar svelte-7d8ub2");
|
|
48
|
+
add_render_callback(() => /*div_elementresize_handler*/ ctx[12].call(div));
|
|
49
|
+
},
|
|
50
|
+
m(target, anchor) {
|
|
51
|
+
insert(target, div, anchor);
|
|
52
|
+
if (if_block) if_block.m(div, null);
|
|
53
|
+
div_resize_listener = add_resize_listener(div, /*div_elementresize_handler*/ ctx[12].bind(div));
|
|
54
|
+
current = true;
|
|
55
|
+
},
|
|
56
|
+
p(ctx, dirty) {
|
|
57
|
+
if (/*clientWidth*/ ctx[6] !== 0) {
|
|
58
|
+
if (if_block) {
|
|
59
|
+
if_block.p(ctx, dirty);
|
|
60
|
+
|
|
61
|
+
if (dirty & /*clientWidth*/ 64) {
|
|
62
|
+
transition_in(if_block, 1);
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
if_block = create_if_block_1(ctx);
|
|
66
|
+
if_block.c();
|
|
67
|
+
transition_in(if_block, 1);
|
|
68
|
+
if_block.m(div, null);
|
|
69
|
+
}
|
|
70
|
+
} else if (if_block) {
|
|
71
|
+
group_outros();
|
|
72
|
+
|
|
73
|
+
transition_out(if_block, 1, 1, () => {
|
|
74
|
+
if_block = null;
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
check_outros();
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
i(local) {
|
|
81
|
+
if (current) return;
|
|
82
|
+
transition_in(if_block);
|
|
83
|
+
current = true;
|
|
84
|
+
},
|
|
85
|
+
o(local) {
|
|
86
|
+
transition_out(if_block);
|
|
87
|
+
current = false;
|
|
88
|
+
},
|
|
89
|
+
d(detaching) {
|
|
90
|
+
if (detaching) detach(div);
|
|
91
|
+
if (if_block) if_block.d();
|
|
92
|
+
div_resize_listener();
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// (43:4) {#if clientWidth !== 0}
|
|
98
|
+
function create_if_block_1(ctx) {
|
|
37
99
|
let div;
|
|
38
100
|
let currentfloor;
|
|
39
101
|
let t;
|
|
40
102
|
let camera;
|
|
41
|
-
let style_width = `${/*contentWidth*/ ctx[
|
|
42
|
-
let style_height = `${/*contentHeight*/ ctx[
|
|
103
|
+
let style_width = `${/*contentWidth*/ ctx[8]}px`;
|
|
104
|
+
let style_height = `${/*contentHeight*/ ctx[11]}px`;
|
|
43
105
|
let current;
|
|
44
106
|
|
|
45
107
|
const currentfloor_spread_levels = [
|
|
46
108
|
{
|
|
47
109
|
five: /*five*/ ctx[0],
|
|
48
|
-
pxmm: /*pxmm*/ ctx[
|
|
49
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
50
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
51
|
-
hoverEnable: /*hoverEnable*/ ctx[
|
|
52
|
-
extraObjects: /*extraObjects*/ ctx[
|
|
110
|
+
pxmm: /*pxmm*/ ctx[9],
|
|
111
|
+
floorIndex: /*floorIndex*/ ctx[10],
|
|
112
|
+
floorplanData: /*floorplanData*/ ctx[3],
|
|
113
|
+
hoverEnable: /*hoverEnable*/ ctx[2],
|
|
114
|
+
extraObjects: /*extraObjects*/ ctx[5]
|
|
53
115
|
}
|
|
54
116
|
];
|
|
55
117
|
|
|
@@ -63,10 +125,10 @@ function create_if_block(ctx) {
|
|
|
63
125
|
|
|
64
126
|
const camera_spread_levels = [
|
|
65
127
|
{
|
|
66
|
-
pxmm: /*pxmm*/ ctx[
|
|
128
|
+
pxmm: /*pxmm*/ ctx[9],
|
|
67
129
|
five: /*five*/ ctx[0],
|
|
68
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
69
|
-
cameraImageUrl: /*cameraImageUrl*/ ctx[
|
|
130
|
+
floorplanData: /*floorplanData*/ ctx[3],
|
|
131
|
+
cameraImageUrl: /*cameraImageUrl*/ ctx[4]
|
|
70
132
|
}
|
|
71
133
|
];
|
|
72
134
|
|
|
@@ -96,39 +158,39 @@ function create_if_block(ctx) {
|
|
|
96
158
|
current = true;
|
|
97
159
|
},
|
|
98
160
|
p(ctx, dirty) {
|
|
99
|
-
const currentfloor_changes = (dirty & /*five, pxmm, floorIndex, floorplanData, hoverEnable, extraObjects*/
|
|
161
|
+
const currentfloor_changes = (dirty & /*five, pxmm, floorIndex, floorplanData, hoverEnable, extraObjects*/ 1581)
|
|
100
162
|
? get_spread_update(currentfloor_spread_levels, [
|
|
101
163
|
{
|
|
102
164
|
five: /*five*/ ctx[0],
|
|
103
|
-
pxmm: /*pxmm*/ ctx[
|
|
104
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
105
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
106
|
-
hoverEnable: /*hoverEnable*/ ctx[
|
|
107
|
-
extraObjects: /*extraObjects*/ ctx[
|
|
165
|
+
pxmm: /*pxmm*/ ctx[9],
|
|
166
|
+
floorIndex: /*floorIndex*/ ctx[10],
|
|
167
|
+
floorplanData: /*floorplanData*/ ctx[3],
|
|
168
|
+
hoverEnable: /*hoverEnable*/ ctx[2],
|
|
169
|
+
extraObjects: /*extraObjects*/ ctx[5]
|
|
108
170
|
}
|
|
109
171
|
])
|
|
110
172
|
: {};
|
|
111
173
|
|
|
112
174
|
currentfloor.$set(currentfloor_changes);
|
|
113
175
|
|
|
114
|
-
const camera_changes = (dirty & /*pxmm, five, floorplanData, cameraImageUrl*/
|
|
176
|
+
const camera_changes = (dirty & /*pxmm, five, floorplanData, cameraImageUrl*/ 537)
|
|
115
177
|
? get_spread_update(camera_spread_levels, [
|
|
116
178
|
{
|
|
117
|
-
pxmm: /*pxmm*/ ctx[
|
|
179
|
+
pxmm: /*pxmm*/ ctx[9],
|
|
118
180
|
five: /*five*/ ctx[0],
|
|
119
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
120
|
-
cameraImageUrl: /*cameraImageUrl*/ ctx[
|
|
181
|
+
floorplanData: /*floorplanData*/ ctx[3],
|
|
182
|
+
cameraImageUrl: /*cameraImageUrl*/ ctx[4]
|
|
121
183
|
}
|
|
122
184
|
])
|
|
123
185
|
: {};
|
|
124
186
|
|
|
125
187
|
camera.$set(camera_changes);
|
|
126
188
|
|
|
127
|
-
if (dirty & /*contentWidth*/
|
|
189
|
+
if (dirty & /*contentWidth*/ 256 && style_width !== (style_width = `${/*contentWidth*/ ctx[8]}px`)) {
|
|
128
190
|
set_style(div, "width", style_width, false);
|
|
129
191
|
}
|
|
130
192
|
|
|
131
|
-
if (dirty & /*contentHeight*/
|
|
193
|
+
if (dirty & /*contentHeight*/ 2048 && style_height !== (style_height = `${/*contentHeight*/ ctx[11]}px`)) {
|
|
132
194
|
set_style(div, "height", style_height, false);
|
|
133
195
|
}
|
|
134
196
|
},
|
|
@@ -152,37 +214,33 @@ function create_if_block(ctx) {
|
|
|
152
214
|
}
|
|
153
215
|
|
|
154
216
|
function create_fragment(ctx) {
|
|
155
|
-
let
|
|
156
|
-
let div_resize_listener;
|
|
217
|
+
let if_block_anchor;
|
|
157
218
|
let current;
|
|
158
|
-
let if_block = /*
|
|
219
|
+
let if_block = /*visible*/ ctx[1] && create_if_block(ctx);
|
|
159
220
|
|
|
160
221
|
return {
|
|
161
222
|
c() {
|
|
162
|
-
div = element("div");
|
|
163
223
|
if (if_block) if_block.c();
|
|
164
|
-
|
|
165
|
-
add_render_callback(() => /*div_elementresize_handler*/ ctx[11].call(div));
|
|
224
|
+
if_block_anchor = empty();
|
|
166
225
|
},
|
|
167
226
|
m(target, anchor) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
div_resize_listener = add_resize_listener(div, /*div_elementresize_handler*/ ctx[11].bind(div));
|
|
227
|
+
if (if_block) if_block.m(target, anchor);
|
|
228
|
+
insert(target, if_block_anchor, anchor);
|
|
171
229
|
current = true;
|
|
172
230
|
},
|
|
173
231
|
p(ctx, [dirty]) {
|
|
174
|
-
if (/*
|
|
232
|
+
if (/*visible*/ ctx[1]) {
|
|
175
233
|
if (if_block) {
|
|
176
234
|
if_block.p(ctx, dirty);
|
|
177
235
|
|
|
178
|
-
if (dirty & /*
|
|
236
|
+
if (dirty & /*visible*/ 2) {
|
|
179
237
|
transition_in(if_block, 1);
|
|
180
238
|
}
|
|
181
239
|
} else {
|
|
182
240
|
if_block = create_if_block(ctx);
|
|
183
241
|
if_block.c();
|
|
184
242
|
transition_in(if_block, 1);
|
|
185
|
-
if_block.m(
|
|
243
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
186
244
|
}
|
|
187
245
|
} else if (if_block) {
|
|
188
246
|
group_outros();
|
|
@@ -204,15 +262,15 @@ function create_fragment(ctx) {
|
|
|
204
262
|
current = false;
|
|
205
263
|
},
|
|
206
264
|
d(detaching) {
|
|
207
|
-
if (
|
|
208
|
-
if (
|
|
209
|
-
div_resize_listener();
|
|
265
|
+
if (if_block) if_block.d(detaching);
|
|
266
|
+
if (detaching) detach(if_block_anchor);
|
|
210
267
|
}
|
|
211
268
|
};
|
|
212
269
|
}
|
|
213
270
|
|
|
214
271
|
function instance($$self, $$props, $$invalidate) {
|
|
215
272
|
let { five } = $$props;
|
|
273
|
+
let { visible } = $$props;
|
|
216
274
|
let { hoverEnable } = $$props;
|
|
217
275
|
let { floorplanData } = $$props;
|
|
218
276
|
let { cameraImageUrl } = $$props;
|
|
@@ -225,7 +283,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
225
283
|
let contentHeight = 0;
|
|
226
284
|
|
|
227
285
|
function handlePanoArrived(panoIndex) {
|
|
228
|
-
$$invalidate(
|
|
286
|
+
$$invalidate(10, floorIndex = five.work.observers[panoIndex].floorIndex);
|
|
229
287
|
}
|
|
230
288
|
|
|
231
289
|
onMount(() => {
|
|
@@ -239,20 +297,21 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
239
297
|
function div_elementresize_handler() {
|
|
240
298
|
clientWidth = this.clientWidth;
|
|
241
299
|
clientHeight = this.clientHeight;
|
|
242
|
-
$$invalidate(
|
|
243
|
-
$$invalidate(
|
|
300
|
+
$$invalidate(6, clientWidth);
|
|
301
|
+
$$invalidate(7, clientHeight);
|
|
244
302
|
}
|
|
245
303
|
|
|
246
304
|
$$self.$$set = $$props => {
|
|
247
305
|
if ('five' in $$props) $$invalidate(0, five = $$props.five);
|
|
248
|
-
if ('
|
|
249
|
-
if ('
|
|
250
|
-
if ('
|
|
251
|
-
if ('
|
|
306
|
+
if ('visible' in $$props) $$invalidate(1, visible = $$props.visible);
|
|
307
|
+
if ('hoverEnable' in $$props) $$invalidate(2, hoverEnable = $$props.hoverEnable);
|
|
308
|
+
if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
|
|
309
|
+
if ('cameraImageUrl' in $$props) $$invalidate(4, cameraImageUrl = $$props.cameraImageUrl);
|
|
310
|
+
if ('extraObjects' in $$props) $$invalidate(5, extraObjects = $$props.extraObjects);
|
|
252
311
|
};
|
|
253
312
|
|
|
254
313
|
$$self.$$.update = () => {
|
|
255
|
-
if ($$self.$$.dirty & /*clientWidth, clientHeight, floorplanData, contentWidth*/
|
|
314
|
+
if ($$self.$$.dirty & /*clientWidth, clientHeight, floorplanData, contentWidth*/ 456) {
|
|
256
315
|
$: {
|
|
257
316
|
const size = Math.min(clientWidth, clientHeight);
|
|
258
317
|
const { max, min } = floorplanData.bounding;
|
|
@@ -264,15 +323,16 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
264
323
|
return [size / boundingHeight * boundingWidth, size];
|
|
265
324
|
})();
|
|
266
325
|
|
|
267
|
-
$$invalidate(
|
|
268
|
-
$$invalidate(
|
|
269
|
-
$$invalidate(
|
|
326
|
+
$$invalidate(8, contentWidth = contentSize[0]);
|
|
327
|
+
$$invalidate(11, contentHeight = contentSize[1]);
|
|
328
|
+
$$invalidate(9, pxmm = contentWidth / boundingWidth);
|
|
270
329
|
}
|
|
271
330
|
}
|
|
272
331
|
};
|
|
273
332
|
|
|
274
333
|
return [
|
|
275
334
|
five,
|
|
335
|
+
visible,
|
|
276
336
|
hoverEnable,
|
|
277
337
|
floorplanData,
|
|
278
338
|
cameraImageUrl,
|
|
@@ -299,10 +359,11 @@ class Component extends SvelteComponent {
|
|
|
299
359
|
safe_not_equal,
|
|
300
360
|
{
|
|
301
361
|
five: 0,
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
362
|
+
visible: 1,
|
|
363
|
+
hoverEnable: 2,
|
|
364
|
+
floorplanData: 3,
|
|
365
|
+
cameraImageUrl: 4,
|
|
366
|
+
extraObjects: 5
|
|
306
367
|
},
|
|
307
368
|
add_css
|
|
308
369
|
);
|
|
@@ -1,28 +1,36 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
|
+
import type { BaseOptions } from '../../base/BasePlugin';
|
|
2
3
|
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
3
4
|
import type { FloorplanExtraObject3D } from '../typings/floorplanData';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export default class PanoFloorplanRadarPluginController {
|
|
5
|
+
import type { State, Config, EventMap, Parameters, PluginData, PluginServerData } from './typing';
|
|
6
|
+
import * as BasePlugin from '../../base/BasePluginWithData';
|
|
7
|
+
export declare class Controller extends BasePlugin.Controller<State, EventMap, PluginServerData, PluginData> {
|
|
8
|
+
name: string;
|
|
9
|
+
state: State;
|
|
10
|
+
protected data?: PluginData;
|
|
12
11
|
private app?;
|
|
13
|
-
private five;
|
|
14
12
|
private wrapperSelector;
|
|
15
|
-
private data?;
|
|
16
13
|
private wrapper;
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
|
|
20
|
-
constructor(five: Five, params?: PanoFloorplanRadarPluginControllerParameter);
|
|
14
|
+
private disposed;
|
|
15
|
+
private extraObjects;
|
|
16
|
+
constructor(five: Five, params?: Parameters);
|
|
21
17
|
dispose: () => void;
|
|
22
|
-
load
|
|
18
|
+
load(serverData: PluginServerData | FloorplanServerData, state?: Partial<State>, userAction?: boolean): Promise<void>;
|
|
19
|
+
show(options?: BaseOptions): Promise<void>;
|
|
20
|
+
hide(options?: BaseOptions): Promise<void>;
|
|
21
|
+
enable(options?: BaseOptions): void;
|
|
22
|
+
disable(options?: BaseOptions): void;
|
|
23
|
+
/** 更改插件 State */
|
|
24
|
+
setState(state: Partial<State>, options?: BaseOptions): void;
|
|
23
25
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
24
26
|
appendTo(wrapper: Element): void;
|
|
25
|
-
changeConfigs(
|
|
27
|
+
changeConfigs(config: Config, userAction?: boolean): void;
|
|
26
28
|
setExtraObjectsWith3DPositions(data: FloorplanExtraObject3D[]): void;
|
|
29
|
+
protected formatData(serverData: PluginServerData): Promise<PluginData>;
|
|
30
|
+
private _enable;
|
|
31
|
+
private _disable;
|
|
32
|
+
private _show;
|
|
33
|
+
private _hide;
|
|
34
|
+
private updateState;
|
|
27
35
|
private render;
|
|
28
36
|
}
|