@realsee/dnalogel 2.0.0-alpha.42 → 2.0.0-alpha.45
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/dist/CSS3DRenderPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/CSS3DRenderPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/CSS3DRenderPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/CSS3DRenderPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/CSS3DRenderPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/CSS3DRenderPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/CSS3DRenderPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/CSS3DRenderPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/CameraMovementPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/CameraMovementPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/CameraMovementPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/CameraMovementPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/CameraMovementPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/CameraMovementPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/CameraMovementPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/CameraMovementPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/CameraMovementPlugin/index.js +15 -40
- package/dist/ItemLabelPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/ItemLabelPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ItemLabelPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/ItemLabelPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/ItemLabelPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/ItemLabelPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/ItemLabelPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/ItemLabelPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/ItemLabelPlugin/index.js +183 -76
- package/dist/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/ModelChassisCompassPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/ModelChassisCompassPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelChassisCompassPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/ModelChassisCompassPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelChassisCompassPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/ModelChassisCompassPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/ModelChassisCompassPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/ModelChassisCompassPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/ModelChassisCompassPlugin/index.js +5 -30
- package/dist/ModelEntryDoorGuidePlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/ModelEntryDoorGuidePlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelEntryDoorGuidePlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/ModelEntryDoorGuidePlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelEntryDoorGuidePlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/ModelEntryDoorGuidePlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/ModelEntryDoorGuidePlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/ModelEntryDoorGuidePlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/ModelEntryDoorGuidePlugin/index.js +8 -33
- package/dist/ModelItemLabelPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/ModelItemLabelPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelItemLabelPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/ModelItemLabelPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelItemLabelPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/ModelItemLabelPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/ModelItemLabelPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/ModelItemLabelPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/ModelRoomLabelPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/ModelRoomLabelPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelRoomLabelPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/ModelRoomLabelPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelRoomLabelPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/ModelRoomLabelPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/ModelRoomLabelPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/ModelRoomLabelPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/ModelTVVideoPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/ModelTVVideoPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/ModelTVVideoPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelTVVideoPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/ModelTVVideoPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/ModelTVVideoPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/ModelTVVideoPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/ModelTVVideoPlugin/index.js +3 -28
- package/dist/ModelViewPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/ModelViewPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/ModelViewPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/ModelViewPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelViewPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/ModelViewPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/ModelViewPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/ModelViewPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/PanoCompassPlugin/{controller.d.ts → Controller.d.ts} +0 -0
- package/dist/PanoCompassPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/PanoCompassPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoCompassPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/PanoCompassPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/PanoCompassPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/PanoCompassPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/PanoCompassPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/PanoCompassPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoCompassPlugin/index.js +64 -99
- package/dist/PanoCursorRaycasterPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/PanoCursorRaycasterPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoCursorRaycasterPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/PanoCursorRaycasterPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/PanoCursorRaycasterPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/PanoCursorRaycasterPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/PanoCursorRaycasterPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/PanoCursorRaycasterPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/CSS3DRenderPlugin/Plugin.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/CSS3DRenderPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/CameraMovementPlugin/CameraMovementPlugin.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/CameraMovementPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/CameraMovementPlugin/typing.d.ts +0 -0
- package/dist/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ItemLabelPlugin/Plugin.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ItemLabelPlugin/events.type.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ItemLabelPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ItemLabelPlugin/typings.d.ts +7 -1
- package/{libs/src → dist/PanoDoorLabelPlugin}/ItemLabelPlugin/utils/getLabelTransform.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ItemLabelPlugin/utils/getStrokeLength.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ItemLabelPlugin/utils/isImpacted.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ItemLabelPlugin/utils/parseData.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ItemLabelPlugin/utils/transform2RenderData.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelChassisCompassPlugin/Plugin.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelChassisCompassPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelEntryDoorGuidePlugin/Plugin.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelEntryDoorGuidePlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelItemLabelPlugin/events.type.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelItemLabelPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelItemLabelPlugin/typings.d.ts +1 -1
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelItemLabelPlugin/utils/parseData.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelRoomLabelPlugin/Controller.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelRoomLabelPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelRoomLabelPlugin/typings.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelRoomLabelPlugin/utils/parseData.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelTVVideoPlugin/Plugin.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelTVVideoPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelTVVideoPlugin/typings.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelTVVideoPlugin/utils/parseData.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelViewPlugin/Plugin.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/ModelViewPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +0 -0
- package/{libs/PanoCompassPlugin/controller.d.ts → dist/PanoDoorLabelPlugin/PanoCompassPlugin/Controller.d.ts} +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoCompassPlugin/getRoomInfoInstance.d.ts +0 -0
- package/dist/PanoDoorLabelPlugin/PanoCompassPlugin/index.d.ts +7 -0
- package/dist/PanoDoorLabelPlugin/PanoCompassPlugin/typings.d.ts +57 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoCursorRaycasterPlugin/index.d.ts +0 -0
- package/dist/PanoDoorLabelPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/PanoDoorLabelPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/PanoDoorLabelPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/PanoDoorLabelPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/PanoDoorLabelPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Controller/BaseController.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Controller/EditController.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Controller/MixedController.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +0 -0
- package/dist/PanoDoorLabelPlugin/PanoMeasurePlugin/Controller/ViewController.d.ts +16 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Controller/WatchController.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Controller/index.d.ts +1 -1
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Model/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Model/line.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Model/point.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Model/polyline.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/FiveHelper.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/GuideController.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/Magnifier.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/UIController/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/typings/data.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/typings/event.type.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/typings/utils.type.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/clearGroup.d.ts +0 -0
- package/dist/PanoDoorLabelPlugin/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/distanceDom.d.ts +2 -2
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/findClosestPoint.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/ironbox.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/line.d.ts +3 -3
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/math.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/mouseGroup.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoMeasurePlugin/utils/ndc2Screen.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoRulerPlugin/Plugin.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoRulerPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoRulerPlugin/style.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoRulerPlugin/typings.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoRulerProPlugin/Controller.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoRulerProPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoRulerProPlugin/typings.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoSpatialTagPlugin/Plugin.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoSpatialTagPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoSpatialTagPlugin/store.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoSpatialTagPlugin/style.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/PanoSpatialTagPlugin/typings.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/base/BasePlugin.d.ts +0 -4
- package/{libs/src → dist/PanoDoorLabelPlugin}/base/BasePluginWithData.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/components/PaintBrush/Controller.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/components/PaintBrush/Subscribe.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/components/PaintBrush/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/components/PaintBrush/style.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/components/PaintBrush/tween.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/components/PaintBrush/typings.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/components/PaintBrush/utils.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/components/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/Assets/camera.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/Assets/compass.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/Assets/floorplanExtraObject.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/ModelFloorplanPlugin/Controller.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/ModelFloorplanPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/ModelFloorplanPlugin/typing.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/PanoFloorplanRadarPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/TopviewFloorplanPlugin/Controller.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/TopviewFloorplanPlugin/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/TopviewFloorplanPlugin/style.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/TopviewFloorplanPlugin/typing.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/constant.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/typings/floorplanData.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/typings/utility.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/utils/constant.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/utils/correctFiveState.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/utils/formatData.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/floorplan/utils/formatPosition.d.ts +0 -0
- package/dist/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/PanoDoorLabelPlugin/index.js +775 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/Preloader.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/Subscribe.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/animationFrame/BetterTween.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/animationFrame/calculateProgress.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/animationFrame/formatRad.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/animationFrame/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/animationFrame/tween.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/changeModelCanvasOpacity.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/createCanvasTextTexture.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/createLine/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/debounce.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/equal.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/filter.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/five/changeMode.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/formatRad.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/getPxmm.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/getRandomColor.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/isNil.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/isTruelyObject.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/logger.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/math/Interval.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/math/Rectangle.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/math/evenNumber.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/math/index.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/math/planimetry.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/math/rad2Deg.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/nearlyEqual.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/nextFrame.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/noop.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/object3d2LocalMatrix.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/px2rem.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/removeArrayItem.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/tap.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/three/centerPoint.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/three/getExtraModelLoader.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/three/getNormal.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/three/getTextureLoader.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/three/loadFbxObj.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/three/loadTexture.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/three/transformPositionToVector3.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/three/transfromToMeshBasicMaterial.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/throttle.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/tinyEJSrender.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/to.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/uuid.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/shared-utils/vectorTocoordinates.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/typings/math.type.d.ts +0 -0
- package/{libs/src → dist/PanoDoorLabelPlugin}/typings/utils.type.d.ts +0 -0
- package/dist/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/PanoMeasurePlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/PanoMeasurePlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/PanoMeasurePlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/PanoMeasurePlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/PanoMeasurePlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/PanoMeasurePlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/PanoMeasurePlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/PanoRulerPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/PanoRulerPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoRulerPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/PanoRulerPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/PanoRulerPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/PanoRulerPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/PanoRulerPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/PanoRulerPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/PanoRulerPlugin/index.js +3 -28
- package/dist/PanoRulerProPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/PanoRulerProPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoRulerProPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/PanoRulerProPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/PanoRulerProPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/PanoRulerProPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/PanoRulerProPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/PanoRulerProPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/PanoRulerProPlugin/index.js +29 -58
- package/dist/PanoSpatialTagPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/PanoSpatialTagPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/PanoSpatialTagPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/PanoSpatialTagPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/PanoSpatialTagPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/PanoSpatialTagPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/PanoSpatialTagPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/PanoSpatialTagPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/floorplan/ModelFloorplanPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/floorplan/ModelFloorplanPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/floorplan/ModelFloorplanPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/floorplan/ModelFloorplanPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/floorplan/ModelFloorplanPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/floorplan/ModelFloorplanPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/floorplan/ModelFloorplanPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/floorplan/ModelFloorplanPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.js +115 -156
- package/dist/floorplan/PanoFloorplanRadarPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/floorplan/PanoFloorplanRadarPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +71 -110
- package/dist/floorplan/TopviewFloorplanPlugin/ItemLabelPlugin/typings.d.ts +2 -0
- package/dist/floorplan/TopviewFloorplanPlugin/PanoCompassPlugin/index.d.ts +1 -1
- package/dist/floorplan/TopviewFloorplanPlugin/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/dist/floorplan/TopviewFloorplanPlugin/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/dist/floorplan/TopviewFloorplanPlugin/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/dist/floorplan/TopviewFloorplanPlugin/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/dist/floorplan/TopviewFloorplanPlugin/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/dist/floorplan/TopviewFloorplanPlugin/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +114 -159
- package/dist/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +1430 -668
- package/dist/index.js +1429 -666
- package/dist/index.umd.js +1426 -663
- package/docs/assets/search.js +1 -1
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginExportType.html +2 -2
- package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/FloorplanBounding.html +4 -4
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +7 -7
- package/docs/interfaces/FloorplanExtraObject.html +3 -3
- package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
- package/docs/interfaces/FloorplanFloorData.html +2 -2
- package/docs/interfaces/FloorplanImagePosition.html +2 -2
- package/docs/interfaces/FloorplanObserver.html +2 -2
- package/docs/interfaces/FloorplanOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanPosition.html +2 -2
- package/docs/interfaces/FloorplanRoomItem.html +6 -6
- package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
- package/docs/interfaces/FloorplanServerBounding.html +4 -4
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerDoorItem.html +1 -0
- package/docs/interfaces/FloorplanServerDoorPosition.html +1 -0
- package/docs/interfaces/FloorplanServerEntrance.html +7 -7
- package/docs/interfaces/FloorplanServerFloorData.html +2 -2
- package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
- package/docs/interfaces/FloorplanServerObserver.html +2 -2
- package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanServerPosition.html +2 -2
- package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
- package/docs/interfaces/ItemLabelPluginData.html +1 -1
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
- 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 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -1
- package/docs/interfaces/OpenParameter.html +2 -2
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +1 -1
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginState.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
- package/docs/interfaces/Point.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -1
- package/docs/interfaces/RoomInfo.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -1
- package/docs/interfaces/Rooms.html +1 -1
- package/docs/modules.html +18 -18
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +15 -24
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +2 -2
- package/libs/ItemLabelPlugin/ItemLabelItem.js +183 -76
- package/libs/ItemLabelPlugin/typings.d.ts +2 -0
- package/libs/ModelChassisCompassPlugin/Plugin.js +5 -14
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +8 -17
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +2 -2
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +6 -6
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +4 -4
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +2 -2
- package/libs/ModelTVVideoPlugin/Plugin.js +3 -12
- package/libs/PanoCompassPlugin/Controller.d.ts +84 -0
- package/libs/PanoCompassPlugin/{controller.js → Controller.js} +56 -73
- package/libs/PanoCompassPlugin/index.d.ts +1 -1
- package/libs/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
- package/libs/PanoDoorLabelPlugin/BaseController.js +103 -0
- package/libs/PanoDoorLabelPlugin/Controller.d.ts +36 -0
- package/libs/PanoDoorLabelPlugin/Controller.js +434 -0
- package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +159 -0
- package/libs/PanoDoorLabelPlugin/index.d.ts +7 -0
- package/libs/PanoDoorLabelPlugin/index.js +6 -0
- package/libs/PanoDoorLabelPlugin/typings.d.ts +33 -0
- package/libs/{src/ModelRoomLabelPlugin → PanoDoorLabelPlugin}/typings.js +0 -0
- package/libs/PanoDoorLabelPlugin/utils.d.ts +5 -0
- package/libs/PanoDoorLabelPlugin/utils.js +55 -0
- package/libs/PanoRulerPlugin/Plugin.js +3 -12
- package/libs/PanoRulerProPlugin/Controller.js +29 -42
- package/libs/PanoRulerProPlugin/RulerItem.js +9 -9
- package/libs/PanoSpatialTagPlugin/Components/origins.js +2 -2
- package/libs/PanoSpatialTagPlugin/Components/tag.js +9 -9
- package/libs/floorplan/Components/BaseImage.js +2 -2
- package/libs/floorplan/Components/Camera.js +3 -3
- package/libs/floorplan/Components/Compass.js +4 -4
- package/libs/floorplan/Components/CurrentFloor.js +3 -3
- package/libs/floorplan/Components/Main.js +2 -2
- package/libs/floorplan/Components/Normalmage.js +2 -2
- package/libs/floorplan/Components/RoomHighlight/Room.js +2 -2
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +3 -3
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +3 -3
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +2 -2
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +3 -3
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +9 -9
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +2 -2
- package/libs/floorplan/Components/SvgImage.js +3 -4
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +29 -42
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +4 -4
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +4 -4
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +3 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +43 -60
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +58 -79
- package/libs/floorplan/typings/floorplanServerData.d.ts +13 -0
- package/libs/floorplan/utils/correctFiveState.js +20 -31
- package/libs/floorplan/utils/formatData.js +28 -43
- package/libs/index.d.ts +2 -1
- package/libs/index.js +3 -1
- package/libs/shared-utils/five/changeMode.js +28 -39
- package/libs/shared-utils/three/loadFbxObj.js +9 -20
- package/libs/shared-utils/three/loadTexture.js +6 -17
- package/libs/shared-utils/to.js +10 -21
- package/package.json +15 -14
- package/dist/PanoCompassPlugin/Plugin.d.ts +0 -47
- package/libs/PanoCompassPlugin/Plugin.d.ts +0 -47
- package/libs/PanoCompassPlugin/Plugin.js +0 -267
- package/libs/PanoCompassPlugin/typeings.d.ts +0 -0
- package/libs/PanoCompassPlugin/typeings.js +0 -0
- package/libs/package.json +0 -68
- package/libs/src/CSS3DRenderPlugin/Plugin.js +0 -182
- package/libs/src/CSS3DRenderPlugin/index.js +0 -3
- package/libs/src/CSS3DRenderPlugin/utils/createResizeObserver.js +0 -18
- package/libs/src/CameraMovementPlugin/CameraMovementPlugin.js +0 -159
- package/libs/src/CameraMovementPlugin/index.js +0 -4
- package/libs/src/CameraMovementPlugin/typing.js +0 -17
- package/libs/src/ItemLabelPlugin/Plugin.js +0 -120
- package/libs/src/ItemLabelPlugin/events.type.js +0 -1
- package/libs/src/ItemLabelPlugin/index.js +0 -8
- package/libs/src/ItemLabelPlugin/typings.js +0 -7
- package/libs/src/ItemLabelPlugin/utils/getLabelTransform.js +0 -3
- package/libs/src/ItemLabelPlugin/utils/getStrokeLength.js +0 -16
- package/libs/src/ItemLabelPlugin/utils/isImpacted.js +0 -13
- package/libs/src/ItemLabelPlugin/utils/parseData.js +0 -4
- package/libs/src/ItemLabelPlugin/utils/transform2RenderData.js +0 -4
- package/libs/src/ModelChassisCompassPlugin/Plugin.js +0 -77
- package/libs/src/ModelChassisCompassPlugin/index.js +0 -3
- package/libs/src/ModelEntryDoorGuidePlugin/Plugin.js +0 -140
- package/libs/src/ModelEntryDoorGuidePlugin/index.js +0 -3
- package/libs/src/ModelItemLabelPlugin/ModelItemLabelPlugin.js +0 -120
- package/libs/src/ModelItemLabelPlugin/events.type.js +0 -1
- package/libs/src/ModelItemLabelPlugin/index.js +0 -8
- package/libs/src/ModelItemLabelPlugin/typings.js +0 -7
- package/libs/src/ModelItemLabelPlugin/utils/parseData.js +0 -4
- package/libs/src/ModelRoomLabelPlugin/Assets/roomLabelBg.js +0 -1
- package/libs/src/ModelRoomLabelPlugin/Controller.js +0 -142
- package/libs/src/ModelRoomLabelPlugin/index.js +0 -9
- package/libs/src/ModelRoomLabelPlugin/utils/parseData.js +0 -14
- package/libs/src/ModelTVVideoPlugin/Plugin.js +0 -254
- package/libs/src/ModelTVVideoPlugin/index.js +0 -4
- package/libs/src/ModelTVVideoPlugin/typings.js +0 -8
- package/libs/src/ModelTVVideoPlugin/utils/parseData.js +0 -13
- package/libs/src/ModelViewPlugin/Plugin.js +0 -159
- package/libs/src/ModelViewPlugin/index.js +0 -3
- package/libs/src/PanoCompassPlugin/Assets/roomInfoIcon.js +0 -1
- package/libs/src/PanoCompassPlugin/Plugin.d.ts +0 -47
- package/libs/src/PanoCompassPlugin/Plugin.js +0 -249
- package/libs/src/PanoCompassPlugin/getRoomInfoInstance.js +0 -48
- package/libs/src/PanoCompassPlugin/index.d.ts +0 -8
- package/libs/src/PanoCompassPlugin/index.js +0 -7
- package/libs/src/PanoCursorRaycasterPlugin/index.js +0 -76
- package/libs/src/PanoMeasurePlugin/Controller/BaseController.js +0 -132
- package/libs/src/PanoMeasurePlugin/Controller/EditController.js +0 -329
- package/libs/src/PanoMeasurePlugin/Controller/MixedController.js +0 -337
- package/libs/src/PanoMeasurePlugin/Controller/ShortcutKeyController.js +0 -64
- package/libs/src/PanoMeasurePlugin/Controller/WatchController.js +0 -316
- package/libs/src/PanoMeasurePlugin/Controller/index.js +0 -306
- package/libs/src/PanoMeasurePlugin/Model/index.js +0 -139
- package/libs/src/PanoMeasurePlugin/Model/line.js +0 -114
- package/libs/src/PanoMeasurePlugin/Model/point.js +0 -48
- package/libs/src/PanoMeasurePlugin/Model/polyline.js +0 -65
- package/libs/src/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +0 -12
- package/libs/src/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +0 -2
- package/libs/src/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +0 -2
- package/libs/src/PanoMeasurePlugin/Modules/DeleteDom/index.js +0 -190
- package/libs/src/PanoMeasurePlugin/Modules/FiveHelper.js +0 -48
- package/libs/src/PanoMeasurePlugin/Modules/GuideController.js +0 -110
- package/libs/src/PanoMeasurePlugin/Modules/Magnifier.js +0 -278
- package/libs/src/PanoMeasurePlugin/Modules/UIController/HTML.js +0 -128
- package/libs/src/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +0 -126
- package/libs/src/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +0 -73
- package/libs/src/PanoMeasurePlugin/Modules/UIController/index.js +0 -117
- package/libs/src/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +0 -80
- package/libs/src/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +0 -98
- package/libs/src/PanoMeasurePlugin/Modules/UIController/style.js +0 -71
- package/libs/src/PanoMeasurePlugin/Modules/rangePiece/html.js +0 -64
- package/libs/src/PanoMeasurePlugin/Modules/rangePiece/index.js +0 -264
- package/libs/src/PanoMeasurePlugin/index.js +0 -7
- package/libs/src/PanoMeasurePlugin/typings/data.js +0 -1
- package/libs/src/PanoMeasurePlugin/typings/event.type.js +0 -1
- package/libs/src/PanoMeasurePlugin/typings/utils.type.js +0 -1
- package/libs/src/PanoMeasurePlugin/utils/calculateThreeMouse.js +0 -15
- package/libs/src/PanoMeasurePlugin/utils/clearGroup.js +0 -3
- package/libs/src/PanoMeasurePlugin/utils/constants.d.ts +0 -4
- package/libs/src/PanoMeasurePlugin/utils/constants.js +0 -31
- package/libs/src/PanoMeasurePlugin/utils/distanceDom.js +0 -120
- package/libs/src/PanoMeasurePlugin/utils/findAssociatedLines.js +0 -21
- package/libs/src/PanoMeasurePlugin/utils/findClosestPoint.js +0 -27
- package/libs/src/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +0 -9
- package/libs/src/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +0 -14
- package/libs/src/PanoMeasurePlugin/utils/ironbox.js +0 -1
- package/libs/src/PanoMeasurePlugin/utils/isNDCPointInScreen.js +0 -6
- package/libs/src/PanoMeasurePlugin/utils/line.js +0 -33
- package/libs/src/PanoMeasurePlugin/utils/math.js +0 -44
- package/libs/src/PanoMeasurePlugin/utils/mouseGroup.js +0 -69
- package/libs/src/PanoMeasurePlugin/utils/ndc2Screen.js +0 -6
- package/libs/src/PanoRulerPlugin/Plugin.js +0 -403
- package/libs/src/PanoRulerPlugin/index.js +0 -3
- package/libs/src/PanoRulerPlugin/style.js +0 -88
- package/libs/src/PanoRulerPlugin/typings.js +0 -1
- package/libs/src/PanoRulerProPlugin/Controller.js +0 -110
- package/libs/src/PanoRulerProPlugin/index.js +0 -8
- package/libs/src/PanoRulerProPlugin/typings.js +0 -1
- package/libs/src/PanoSpatialTagPlugin/Plugin.js +0 -426
- package/libs/src/PanoSpatialTagPlugin/index.js +0 -5
- package/libs/src/PanoSpatialTagPlugin/store.js +0 -2
- package/libs/src/PanoSpatialTagPlugin/style.js +0 -8
- package/libs/src/PanoSpatialTagPlugin/typings.js +0 -1
- package/libs/src/base/BasePlugin.js +0 -41
- package/libs/src/base/BasePluginWithData.js +0 -4
- package/libs/src/components/PaintBrush/Controller.js +0 -575
- package/libs/src/components/PaintBrush/Subscribe.js +0 -121
- package/libs/src/components/PaintBrush/index.js +0 -57
- package/libs/src/components/PaintBrush/style.js +0 -102
- package/libs/src/components/PaintBrush/tween.js +0 -15
- package/libs/src/components/PaintBrush/typings.js +0 -6
- package/libs/src/components/PaintBrush/utils.js +0 -51
- package/libs/src/components/index.js +0 -3
- package/libs/src/floorplan/Assets/camera.js +0 -1
- package/libs/src/floorplan/Assets/compass.js +0 -1
- package/libs/src/floorplan/Assets/floorplanExtraObject.js +0 -1
- package/libs/src/floorplan/ModelFloorplanPlugin/Controller.js +0 -701
- package/libs/src/floorplan/ModelFloorplanPlugin/index.js +0 -5
- package/libs/src/floorplan/ModelFloorplanPlugin/typing.js +0 -1
- package/libs/src/floorplan/PanoFloorplanRadarPlugin/Controller.js +0 -240
- package/libs/src/floorplan/PanoFloorplanRadarPlugin/index.js +0 -5
- package/libs/src/floorplan/PanoFloorplanRadarPlugin/typing.js +0 -1
- package/libs/src/floorplan/TopviewFloorplanPlugin/Controller.js +0 -486
- package/libs/src/floorplan/TopviewFloorplanPlugin/index.js +0 -5
- package/libs/src/floorplan/TopviewFloorplanPlugin/style.js +0 -8
- package/libs/src/floorplan/TopviewFloorplanPlugin/typing.js +0 -1
- package/libs/src/floorplan/constant.js +0 -6
- package/libs/src/floorplan/index.js +0 -7
- package/libs/src/floorplan/typings/floorplanData.js +0 -6
- package/libs/src/floorplan/typings/floorplanServerData.js +0 -101
- package/libs/src/floorplan/typings/utility.js +0 -1
- package/libs/src/floorplan/utils/constant.js +0 -23
- package/libs/src/floorplan/utils/correctFiveState.js +0 -46
- package/libs/src/floorplan/utils/formatData.js +0 -94
- package/libs/src/floorplan/utils/formatPosition.js +0 -50
- package/libs/src/index.d.ts +0 -16
- package/libs/src/index.js +0 -28
- package/libs/src/shared-utils/Preloader.js +0 -38
- package/libs/src/shared-utils/Subscribe.js +0 -108
- package/libs/src/shared-utils/animationFrame/BetterTween.js +0 -59
- package/libs/src/shared-utils/animationFrame/calculateProgress.js +0 -23
- package/libs/src/shared-utils/animationFrame/formatRad.js +0 -20
- package/libs/src/shared-utils/animationFrame/index.js +0 -48
- package/libs/src/shared-utils/animationFrame/tween.js +0 -44
- package/libs/src/shared-utils/changeModelCanvasOpacity.js +0 -15
- package/libs/src/shared-utils/createCanvasTextTexture.js +0 -20
- package/libs/src/shared-utils/createLine/index.js +0 -8
- package/libs/src/shared-utils/debounce.js +0 -14
- package/libs/src/shared-utils/equal.js +0 -84
- package/libs/src/shared-utils/filter.js +0 -53
- package/libs/src/shared-utils/five/changeMode.js +0 -36
- package/libs/src/shared-utils/formatRad.js +0 -10
- package/libs/src/shared-utils/getPxmm.js +0 -39
- package/libs/src/shared-utils/getRandomColor.js +0 -10
- package/libs/src/shared-utils/index.js +0 -1
- package/libs/src/shared-utils/isNil.js +0 -14
- package/libs/src/shared-utils/isTruelyObject.js +0 -20
- package/libs/src/shared-utils/logger.js +0 -47
- package/libs/src/shared-utils/math/Interval.js +0 -40
- package/libs/src/shared-utils/math/Rectangle.js +0 -50
- package/libs/src/shared-utils/math/evenNumber.js +0 -4
- package/libs/src/shared-utils/math/index.js +0 -2
- package/libs/src/shared-utils/math/planimetry.js +0 -288
- package/libs/src/shared-utils/math/rad2Deg.js +0 -3
- package/libs/src/shared-utils/nearlyEqual.js +0 -9
- package/libs/src/shared-utils/nextFrame.js +0 -6
- package/libs/src/shared-utils/noop.js +0 -7
- package/libs/src/shared-utils/object3d2LocalMatrix.js +0 -29
- package/libs/src/shared-utils/px2rem.js +0 -4
- package/libs/src/shared-utils/removeArrayItem.js +0 -12
- package/libs/src/shared-utils/tap.js +0 -12
- package/libs/src/shared-utils/three/centerPoint.js +0 -4
- package/libs/src/shared-utils/three/getExtraModelLoader.js +0 -18
- package/libs/src/shared-utils/three/getNormal.js +0 -6
- package/libs/src/shared-utils/three/getTextureLoader.js +0 -17
- package/libs/src/shared-utils/three/loadFbxObj.js +0 -13
- package/libs/src/shared-utils/three/loadTexture.js +0 -10
- package/libs/src/shared-utils/three/transformPositionToVector3.js +0 -3
- package/libs/src/shared-utils/three/transfromToMeshBasicMaterial.js +0 -15
- package/libs/src/shared-utils/throttle.js +0 -18
- package/libs/src/shared-utils/tinyEJSrender.js +0 -210
- package/libs/src/shared-utils/to.js +0 -18
- package/libs/src/shared-utils/uuid.js +0 -12
- package/libs/src/shared-utils/vectorTocoordinates.js +0 -9
- package/libs/src/typings/math.type.js +0 -1
- package/libs/src/typings/utils.type.js +0 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { Vector3 as Vector3$1, Scene, Group, Raycaster as Raycaster$1, MeshBasicMaterial, CanvasTexture, AnimationMixer, Color, TextureLoader, Vector2 as Vector2$1, PlaneGeometry, sRGBEncoding, Mesh, CurvePath, LineCurve3, TubeGeometry, ShaderMaterial, SphereGeometry, DoubleSide, RingGeometry } from 'three';
|
|
2
|
+
import { Vector3 as Vector3$1, Scene, Group, Raycaster as Raycaster$1, MeshBasicMaterial, CanvasTexture, AnimationMixer, Color, TextureLoader, Vector2 as Vector2$1, PlaneGeometry, sRGBEncoding, Mesh, CurvePath, LineCurve3, TubeGeometry, ShaderMaterial, SphereGeometry, DoubleSide, RingGeometry, Quaternion, Euler } from 'three';
|
|
3
3
|
import { CSS3DRenderer, CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
|
|
4
4
|
import { Line as Line$1 } from '@realsee/five/line';
|
|
5
5
|
import { SvelteComponent, init, safe_not_equal, append_styles, element, text, space, attr, set_style, toggle_class, insert, append, listen, set_data, noop as noop$1, detach, add_render_callback, add_resize_listener, group_outros, update_keyed_each, outro_and_destroy_block, check_outros, transition_in, transition_out, globals, empty, create_component, mount_component, destroy_component, src_url_equal, HtmlTag, binding_callbacks, assign, get_spread_update, destroy_block, destroy_each, svg_element, run_all, null_to_empty, create_in_transition } from 'svelte/internal';
|
|
@@ -462,11 +462,11 @@ const ROOM_LABEL_BG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAY
|
|
|
462
462
|
|
|
463
463
|
/* src/ModelRoomLabelPlugin/RoomLabelItem.svelte generated by Svelte v3.49.0 */
|
|
464
464
|
|
|
465
|
-
function add_css$
|
|
465
|
+
function add_css$q(target) {
|
|
466
466
|
append_styles(target, "svelte-877671", ".room-label-item.svelte-877671{position:absolute;font-size:0.41667rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.room-label-item__text.svelte-877671{position:absolute;left:0;top:-3.33333rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.04167rem;min-width:1.66667rem;padding:0 0.3125rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-877671{position:absolute;top:-2.29167rem;height:2.5rem;width:1px;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-877671{font-size:0.52083rem}");
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
function create_fragment$
|
|
469
|
+
function create_fragment$v(ctx) {
|
|
470
470
|
let div1;
|
|
471
471
|
let span;
|
|
472
472
|
let t0_value = /*roomLabel*/ ctx[0].name + "";
|
|
@@ -533,7 +533,7 @@ function create_fragment$u(ctx) {
|
|
|
533
533
|
};
|
|
534
534
|
}
|
|
535
535
|
|
|
536
|
-
function instance$
|
|
536
|
+
function instance$v($$self, $$props, $$invalidate) {
|
|
537
537
|
let { five } = $$props;
|
|
538
538
|
let { roomLabel } = $$props;
|
|
539
539
|
|
|
@@ -556,7 +556,7 @@ function instance$u($$self, $$props, $$invalidate) {
|
|
|
556
556
|
class RoomLabelItem extends SvelteComponent {
|
|
557
557
|
constructor(options) {
|
|
558
558
|
super();
|
|
559
|
-
init(this, options, instance$
|
|
559
|
+
init(this, options, instance$v, create_fragment$v, safe_not_equal, { five: 2, roomLabel: 0 }, add_css$q);
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
|
|
@@ -564,7 +564,7 @@ class RoomLabelItem extends SvelteComponent {
|
|
|
564
564
|
|
|
565
565
|
const { Map: Map_1 } = globals;
|
|
566
566
|
|
|
567
|
-
function add_css$
|
|
567
|
+
function add_css$p(target) {
|
|
568
568
|
append_styles(target, "svelte-9eg4zi", ".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}");
|
|
569
569
|
}
|
|
570
570
|
|
|
@@ -623,7 +623,7 @@ function create_each_block$c(key_1, ctx) {
|
|
|
623
623
|
};
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
-
function create_fragment$
|
|
626
|
+
function create_fragment$u(ctx) {
|
|
627
627
|
let div;
|
|
628
628
|
let each_blocks = [];
|
|
629
629
|
let each_1_lookup = new Map_1();
|
|
@@ -695,7 +695,7 @@ function create_fragment$t(ctx) {
|
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
697
|
|
|
698
|
-
function instance$
|
|
698
|
+
function instance$u($$self, $$props, $$invalidate) {
|
|
699
699
|
let rendererSize;
|
|
700
700
|
let { five } = $$props;
|
|
701
701
|
let { roomLabels } = $$props;
|
|
@@ -820,7 +820,7 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
820
820
|
class RoomLabelItems extends SvelteComponent {
|
|
821
821
|
constructor(options) {
|
|
822
822
|
super();
|
|
823
|
-
init(this, options, instance$
|
|
823
|
+
init(this, options, instance$u, create_fragment$u, safe_not_equal, { five: 1, roomLabels: 0 }, add_css$p);
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
826
|
|
|
@@ -995,31 +995,6 @@ var FLOOR_PLAN_ATTACHED_TO;
|
|
|
995
995
|
FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["BOUNDING_CENTER"] = 3] = "BOUNDING_CENTER";
|
|
996
996
|
})(FLOOR_PLAN_ATTACHED_TO || (FLOOR_PLAN_ATTACHED_TO = {}));
|
|
997
997
|
|
|
998
|
-
/******************************************************************************
|
|
999
|
-
Copyright (c) Microsoft Corporation.
|
|
1000
|
-
|
|
1001
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1002
|
-
purpose with or without fee is hereby granted.
|
|
1003
|
-
|
|
1004
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1005
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1006
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1007
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1008
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1009
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1010
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1011
|
-
***************************************************************************** */
|
|
1012
|
-
|
|
1013
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1014
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1015
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1016
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1017
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1018
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1019
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1020
|
-
});
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
998
|
/**
|
|
1024
999
|
* 检查一个值是否是狭义上的对象
|
|
1025
1000
|
* @param {any} value 要检查的值
|
|
@@ -1133,11 +1108,11 @@ function rad2Deg$1(rad) {
|
|
|
1133
1108
|
|
|
1134
1109
|
/* src/floorplan/Components/Camera.svelte generated by Svelte v3.49.0 */
|
|
1135
1110
|
|
|
1136
|
-
function add_css$
|
|
1111
|
+
function add_css$o(target) {
|
|
1137
1112
|
append_styles(target, "svelte-17cl35n", ".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}");
|
|
1138
1113
|
}
|
|
1139
1114
|
|
|
1140
|
-
function create_fragment$
|
|
1115
|
+
function create_fragment$t(ctx) {
|
|
1141
1116
|
let div1;
|
|
1142
1117
|
let div0;
|
|
1143
1118
|
|
|
@@ -1174,7 +1149,7 @@ function create_fragment$s(ctx) {
|
|
|
1174
1149
|
};
|
|
1175
1150
|
}
|
|
1176
1151
|
|
|
1177
|
-
function instance$
|
|
1152
|
+
function instance$t($$self, $$props, $$invalidate) {
|
|
1178
1153
|
let { panoIndex } = $$props;
|
|
1179
1154
|
let { floorplanData } = $$props;
|
|
1180
1155
|
let { lastPanoramaLongitude } = $$props;
|
|
@@ -1220,8 +1195,8 @@ class Camera$1 extends SvelteComponent {
|
|
|
1220
1195
|
init(
|
|
1221
1196
|
this,
|
|
1222
1197
|
options,
|
|
1223
|
-
instance$
|
|
1224
|
-
create_fragment$
|
|
1198
|
+
instance$t,
|
|
1199
|
+
create_fragment$t,
|
|
1225
1200
|
safe_not_equal,
|
|
1226
1201
|
{
|
|
1227
1202
|
panoIndex: 5,
|
|
@@ -1229,7 +1204,7 @@ class Camera$1 extends SvelteComponent {
|
|
|
1229
1204
|
lastPanoramaLongitude: 7,
|
|
1230
1205
|
cameraImageUrl: 0
|
|
1231
1206
|
},
|
|
1232
|
-
add_css$
|
|
1207
|
+
add_css$o
|
|
1233
1208
|
);
|
|
1234
1209
|
}
|
|
1235
1210
|
}
|
|
@@ -1238,7 +1213,7 @@ const COMPASS_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAM
|
|
|
1238
1213
|
|
|
1239
1214
|
/* src/floorplan/Components/Compass.svelte generated by Svelte v3.49.0 */
|
|
1240
1215
|
|
|
1241
|
-
function add_css$
|
|
1216
|
+
function add_css$n(target) {
|
|
1242
1217
|
append_styles(target, "svelte-z9kwkx", ".floorplan-plugin__compass.svelte-z9kwkx{position:absolute;left:50%;top:-2.39583rem;width:12.03125rem;height:2.13542rem;will-change:opacity;transform-origin:center 9.58333rem}.floorplan-plugin__compass-image.svelte-z9kwkx{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-z9kwkx{position:absolute;left:50%;top:0.78125rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.52083rem;color:#fff}");
|
|
1243
1218
|
}
|
|
1244
1219
|
|
|
@@ -1279,7 +1254,7 @@ function create_if_block$b(ctx) {
|
|
|
1279
1254
|
};
|
|
1280
1255
|
}
|
|
1281
1256
|
|
|
1282
|
-
function create_fragment$
|
|
1257
|
+
function create_fragment$s(ctx) {
|
|
1283
1258
|
let if_block_anchor;
|
|
1284
1259
|
let if_block = /*canCompassShow*/ ctx[1] && create_if_block$b(ctx);
|
|
1285
1260
|
|
|
@@ -1308,7 +1283,7 @@ function rad2Deg(rad) {
|
|
|
1308
1283
|
return rad / Math.PI * 180;
|
|
1309
1284
|
}
|
|
1310
1285
|
|
|
1311
|
-
function instance$
|
|
1286
|
+
function instance$s($$self, $$props, $$invalidate) {
|
|
1312
1287
|
var _a;
|
|
1313
1288
|
let { floorplanData } = $$props;
|
|
1314
1289
|
let { northDesc } = $$props;
|
|
@@ -1332,17 +1307,17 @@ function instance$r($$self, $$props, $$invalidate) {
|
|
|
1332
1307
|
class Compass extends SvelteComponent {
|
|
1333
1308
|
constructor(options) {
|
|
1334
1309
|
super();
|
|
1335
|
-
init(this, options, instance$
|
|
1310
|
+
init(this, options, instance$s, create_fragment$s, safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$n);
|
|
1336
1311
|
}
|
|
1337
1312
|
}
|
|
1338
1313
|
|
|
1339
1314
|
/* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.49.0 */
|
|
1340
1315
|
|
|
1341
|
-
function add_css$
|
|
1316
|
+
function add_css$m(target) {
|
|
1342
1317
|
append_styles(target, "svelte-1gfoniz", "img.svelte-1gfoniz{width:100%;height:100%}");
|
|
1343
1318
|
}
|
|
1344
1319
|
|
|
1345
|
-
function create_fragment$
|
|
1320
|
+
function create_fragment$r(ctx) {
|
|
1346
1321
|
let img;
|
|
1347
1322
|
let img_src_value;
|
|
1348
1323
|
|
|
@@ -1369,7 +1344,7 @@ function create_fragment$q(ctx) {
|
|
|
1369
1344
|
};
|
|
1370
1345
|
}
|
|
1371
1346
|
|
|
1372
|
-
function instance$
|
|
1347
|
+
function instance$r($$self, $$props, $$invalidate) {
|
|
1373
1348
|
let { url } = $$props;
|
|
1374
1349
|
|
|
1375
1350
|
$$self.$$set = $$props => {
|
|
@@ -1382,17 +1357,17 @@ function instance$q($$self, $$props, $$invalidate) {
|
|
|
1382
1357
|
class Normalmage extends SvelteComponent {
|
|
1383
1358
|
constructor(options) {
|
|
1384
1359
|
super();
|
|
1385
|
-
init(this, options, instance$
|
|
1360
|
+
init(this, options, instance$r, create_fragment$r, safe_not_equal, { url: 0 }, add_css$m);
|
|
1386
1361
|
}
|
|
1387
1362
|
}
|
|
1388
1363
|
|
|
1389
1364
|
/* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.49.0 */
|
|
1390
1365
|
|
|
1391
|
-
function add_css$
|
|
1366
|
+
function add_css$l(target) {
|
|
1392
1367
|
append_styles(target, "svelte-ub47ya", ".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}");
|
|
1393
1368
|
}
|
|
1394
1369
|
|
|
1395
|
-
function create_fragment$
|
|
1370
|
+
function create_fragment$q(ctx) {
|
|
1396
1371
|
let div;
|
|
1397
1372
|
let html_tag;
|
|
1398
1373
|
let t;
|
|
@@ -1425,7 +1400,7 @@ function create_fragment$p(ctx) {
|
|
|
1425
1400
|
};
|
|
1426
1401
|
}
|
|
1427
1402
|
|
|
1428
|
-
function instance$
|
|
1403
|
+
function instance$q($$self, $$props, $$invalidate) {
|
|
1429
1404
|
let { content } = $$props;
|
|
1430
1405
|
|
|
1431
1406
|
const svgStyle = `
|
|
@@ -1449,18 +1424,18 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
1449
1424
|
class SvgImage extends SvelteComponent {
|
|
1450
1425
|
constructor(options) {
|
|
1451
1426
|
super();
|
|
1452
|
-
init(this, options, instance$
|
|
1427
|
+
init(this, options, instance$q, create_fragment$q, safe_not_equal, { content: 0 }, add_css$l);
|
|
1453
1428
|
}
|
|
1454
1429
|
}
|
|
1455
1430
|
|
|
1456
1431
|
/* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.49.0 */
|
|
1457
1432
|
|
|
1458
|
-
function add_css$
|
|
1433
|
+
function add_css$k(target) {
|
|
1459
1434
|
append_styles(target, "svelte-ozpg4a", ".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
|
|
1460
1435
|
}
|
|
1461
1436
|
|
|
1462
1437
|
// (13:22)
|
|
1463
|
-
function create_if_block_1$
|
|
1438
|
+
function create_if_block_1$6(ctx) {
|
|
1464
1439
|
let normalimage;
|
|
1465
1440
|
let current;
|
|
1466
1441
|
normalimage = new Normalmage({ props: { url: /*imageData*/ ctx[1].url } });
|
|
@@ -1530,12 +1505,12 @@ function create_if_block$a(ctx) {
|
|
|
1530
1505
|
};
|
|
1531
1506
|
}
|
|
1532
1507
|
|
|
1533
|
-
function create_fragment$
|
|
1508
|
+
function create_fragment$p(ctx) {
|
|
1534
1509
|
let div;
|
|
1535
1510
|
let current_block_type_index;
|
|
1536
1511
|
let if_block;
|
|
1537
1512
|
let current;
|
|
1538
|
-
const if_block_creators = [create_if_block$a, create_if_block_1$
|
|
1513
|
+
const if_block_creators = [create_if_block$a, create_if_block_1$6];
|
|
1539
1514
|
const if_blocks = [];
|
|
1540
1515
|
|
|
1541
1516
|
function select_block_type(ctx, dirty) {
|
|
@@ -1618,7 +1593,7 @@ function create_fragment$o(ctx) {
|
|
|
1618
1593
|
};
|
|
1619
1594
|
}
|
|
1620
1595
|
|
|
1621
|
-
function instance$
|
|
1596
|
+
function instance$p($$self, $$props, $$invalidate) {
|
|
1622
1597
|
let imageData;
|
|
1623
1598
|
let svgContent;
|
|
1624
1599
|
var _a, _b;
|
|
@@ -1650,18 +1625,18 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
1650
1625
|
class BaseImage extends SvelteComponent {
|
|
1651
1626
|
constructor(options) {
|
|
1652
1627
|
super();
|
|
1653
|
-
init(this, options, instance$
|
|
1628
|
+
init(this, options, instance$p, create_fragment$p, safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$k);
|
|
1654
1629
|
}
|
|
1655
1630
|
}
|
|
1656
1631
|
|
|
1657
1632
|
/* src/floorplan/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.49.0 */
|
|
1658
1633
|
|
|
1659
|
-
function add_css$
|
|
1634
|
+
function add_css$j(target) {
|
|
1660
1635
|
append_styles(target, "svelte-12pzct5", ".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}");
|
|
1661
1636
|
}
|
|
1662
1637
|
|
|
1663
1638
|
// (95:30)
|
|
1664
|
-
function create_if_block_1$
|
|
1639
|
+
function create_if_block_1$5(ctx) {
|
|
1665
1640
|
let html_tag;
|
|
1666
1641
|
let raw_value = /*userConfigElement*/ ctx[4].outerHTML + "";
|
|
1667
1642
|
let html_anchor;
|
|
@@ -1721,12 +1696,12 @@ function create_if_block$9(ctx) {
|
|
|
1721
1696
|
};
|
|
1722
1697
|
}
|
|
1723
1698
|
|
|
1724
|
-
function create_fragment$
|
|
1699
|
+
function create_fragment$o(ctx) {
|
|
1725
1700
|
let div;
|
|
1726
1701
|
|
|
1727
1702
|
function select_block_type(ctx, dirty) {
|
|
1728
1703
|
if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$9;
|
|
1729
|
-
if (/*userConfigElement*/ ctx[4]) return create_if_block_1$
|
|
1704
|
+
if (/*userConfigElement*/ ctx[4]) return create_if_block_1$5;
|
|
1730
1705
|
}
|
|
1731
1706
|
|
|
1732
1707
|
let current_block_type = select_block_type(ctx);
|
|
@@ -1795,7 +1770,7 @@ function isPointInPolygon(point, polygon) {
|
|
|
1795
1770
|
return inside;
|
|
1796
1771
|
}
|
|
1797
1772
|
|
|
1798
|
-
function instance$
|
|
1773
|
+
function instance$o($$self, $$props, $$invalidate) {
|
|
1799
1774
|
let isLabelInRoom;
|
|
1800
1775
|
let userConfigElement;
|
|
1801
1776
|
let labelVisible;
|
|
@@ -1939,8 +1914,8 @@ class RoomLabel extends SvelteComponent {
|
|
|
1939
1914
|
init(
|
|
1940
1915
|
this,
|
|
1941
1916
|
options,
|
|
1942
|
-
instance$
|
|
1943
|
-
create_fragment$
|
|
1917
|
+
instance$o,
|
|
1918
|
+
create_fragment$o,
|
|
1944
1919
|
safe_not_equal,
|
|
1945
1920
|
{
|
|
1946
1921
|
pxmm: 9,
|
|
@@ -1949,14 +1924,14 @@ class RoomLabel extends SvelteComponent {
|
|
|
1949
1924
|
getLabelElement: 1,
|
|
1950
1925
|
adaptiveRoomLabelVisibleEnable: 11
|
|
1951
1926
|
},
|
|
1952
|
-
add_css$
|
|
1927
|
+
add_css$j
|
|
1953
1928
|
);
|
|
1954
1929
|
}
|
|
1955
1930
|
}
|
|
1956
1931
|
|
|
1957
1932
|
/* src/floorplan/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.49.0 */
|
|
1958
1933
|
|
|
1959
|
-
function add_css$
|
|
1934
|
+
function add_css$i(target) {
|
|
1960
1935
|
append_styles(target, "svelte-13xux0b", ".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}");
|
|
1961
1936
|
}
|
|
1962
1937
|
|
|
@@ -2109,7 +2084,7 @@ function create_each_block$b(key_1, ctx) {
|
|
|
2109
2084
|
};
|
|
2110
2085
|
}
|
|
2111
2086
|
|
|
2112
|
-
function create_fragment$
|
|
2087
|
+
function create_fragment$n(ctx) {
|
|
2113
2088
|
let if_block_anchor;
|
|
2114
2089
|
let current;
|
|
2115
2090
|
let if_block = /*rooms*/ ctx[5] && create_if_block$8(ctx);
|
|
@@ -2164,7 +2139,7 @@ function create_fragment$m(ctx) {
|
|
|
2164
2139
|
};
|
|
2165
2140
|
}
|
|
2166
2141
|
|
|
2167
|
-
function instance$
|
|
2142
|
+
function instance$n($$self, $$props, $$invalidate) {
|
|
2168
2143
|
let rooms;
|
|
2169
2144
|
let { floorIndex } = $$props;
|
|
2170
2145
|
let { floorplanData } = $$props;
|
|
@@ -2221,8 +2196,8 @@ class RoomLabels extends SvelteComponent {
|
|
|
2221
2196
|
init(
|
|
2222
2197
|
this,
|
|
2223
2198
|
options,
|
|
2224
|
-
instance$
|
|
2225
|
-
create_fragment$
|
|
2199
|
+
instance$n,
|
|
2200
|
+
create_fragment$n,
|
|
2226
2201
|
safe_not_equal,
|
|
2227
2202
|
{
|
|
2228
2203
|
floorIndex: 6,
|
|
@@ -2231,14 +2206,14 @@ class RoomLabels extends SvelteComponent {
|
|
|
2231
2206
|
getLabelElement: 1,
|
|
2232
2207
|
adaptiveRoomLabelVisibleEnable: 2
|
|
2233
2208
|
},
|
|
2234
|
-
add_css$
|
|
2209
|
+
add_css$i
|
|
2235
2210
|
);
|
|
2236
2211
|
}
|
|
2237
2212
|
}
|
|
2238
2213
|
|
|
2239
2214
|
/* src/floorplan/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.49.0 */
|
|
2240
2215
|
|
|
2241
|
-
function add_css$
|
|
2216
|
+
function add_css$h(target) {
|
|
2242
2217
|
append_styles(target, "svelte-xt7p1v", ".floorplan-plugin__rule-labels.svelte-xt7p1v.svelte-xt7p1v{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-xt7p1v.svelte-xt7p1v{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-xt7p1v.svelte-xt7p1v{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-xt7p1v.svelte-xt7p1v{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-xt7p1v.svelte-xt7p1v{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-xt7p1v.svelte-xt7p1v{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-xt7p1v.svelte-xt7p1v{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-scale-wrapper.svelte-xt7p1v{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-xt7p1v.svelte-xt7p1v{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-scale.svelte-xt7p1v{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-xt7p1v.svelte-xt7p1v{position:absolute}.floorplan-plugin__rule-labels--top.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-xt7p1v.svelte-xt7p1v{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-text-item.svelte-xt7p1v{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-xt7p1v.svelte-xt7p1v{width:-webkit-max-content;width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}");
|
|
2243
2218
|
}
|
|
2244
2219
|
|
|
@@ -2314,7 +2289,7 @@ function create_each_block$a(key_1, ctx) {
|
|
|
2314
2289
|
};
|
|
2315
2290
|
}
|
|
2316
2291
|
|
|
2317
|
-
function create_fragment$
|
|
2292
|
+
function create_fragment$m(ctx) {
|
|
2318
2293
|
let div3;
|
|
2319
2294
|
let div0;
|
|
2320
2295
|
let t0;
|
|
@@ -2437,7 +2412,7 @@ function create_fragment$l(ctx) {
|
|
|
2437
2412
|
const padding$1 = 1000;
|
|
2438
2413
|
const exteriorWallOffset$1 = 180;
|
|
2439
2414
|
|
|
2440
|
-
function instance$
|
|
2415
|
+
function instance$m($$self, $$props, $$invalidate) {
|
|
2441
2416
|
let { type } = $$props;
|
|
2442
2417
|
let { data } = $$props;
|
|
2443
2418
|
let { bounding } = $$props;
|
|
@@ -2496,13 +2471,13 @@ function instance$l($$self, $$props, $$invalidate) {
|
|
|
2496
2471
|
class RuleItem extends SvelteComponent {
|
|
2497
2472
|
constructor(options) {
|
|
2498
2473
|
super();
|
|
2499
|
-
init(this, options, instance$
|
|
2474
|
+
init(this, options, instance$m, create_fragment$m, safe_not_equal, { type: 0, data: 4, bounding: 5 }, add_css$h);
|
|
2500
2475
|
}
|
|
2501
2476
|
}
|
|
2502
2477
|
|
|
2503
2478
|
/* src/floorplan/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.49.0 */
|
|
2504
2479
|
|
|
2505
|
-
function add_css$
|
|
2480
|
+
function add_css$g(target) {
|
|
2506
2481
|
append_styles(target, "svelte-1mzj9p3", ".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}");
|
|
2507
2482
|
}
|
|
2508
2483
|
|
|
@@ -2579,7 +2554,7 @@ function create_each_block$9(key_1, ctx) {
|
|
|
2579
2554
|
};
|
|
2580
2555
|
}
|
|
2581
2556
|
|
|
2582
|
-
function create_fragment$
|
|
2557
|
+
function create_fragment$l(ctx) {
|
|
2583
2558
|
let div;
|
|
2584
2559
|
let each_blocks = [];
|
|
2585
2560
|
let each_1_lookup = new Map();
|
|
@@ -2659,7 +2634,7 @@ function create_fragment$k(ctx) {
|
|
|
2659
2634
|
const padding = 1000;
|
|
2660
2635
|
const exteriorWallOffset = 180;
|
|
2661
2636
|
|
|
2662
|
-
function instance$
|
|
2637
|
+
function instance$l($$self, $$props, $$invalidate) {
|
|
2663
2638
|
let bounding;
|
|
2664
2639
|
let ruleLabelData;
|
|
2665
2640
|
let ruleLabelDataKeys;
|
|
@@ -2739,7 +2714,7 @@ function instance$k($$self, $$props, $$invalidate) {
|
|
|
2739
2714
|
class RuleLabels extends SvelteComponent {
|
|
2740
2715
|
constructor(options) {
|
|
2741
2716
|
super();
|
|
2742
|
-
init(this, options, instance$
|
|
2717
|
+
init(this, options, instance$l, create_fragment$l, safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css$g);
|
|
2743
2718
|
}
|
|
2744
2719
|
}
|
|
2745
2720
|
|
|
@@ -2796,7 +2771,7 @@ function getFloorIndexFromModelPosition(position, five) {
|
|
|
2796
2771
|
|
|
2797
2772
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte generated by Svelte v3.49.0 */
|
|
2798
2773
|
|
|
2799
|
-
function create_fragment$
|
|
2774
|
+
function create_fragment$k(ctx) {
|
|
2800
2775
|
let path_1;
|
|
2801
2776
|
|
|
2802
2777
|
return {
|
|
@@ -2821,7 +2796,7 @@ function create_fragment$j(ctx) {
|
|
|
2821
2796
|
};
|
|
2822
2797
|
}
|
|
2823
2798
|
|
|
2824
|
-
function instance$
|
|
2799
|
+
function instance$k($$self, $$props, $$invalidate) {
|
|
2825
2800
|
let d;
|
|
2826
2801
|
let { path } = $$props;
|
|
2827
2802
|
|
|
@@ -2841,13 +2816,13 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
2841
2816
|
class RoomMaterial_0 extends SvelteComponent {
|
|
2842
2817
|
constructor(options) {
|
|
2843
2818
|
super();
|
|
2844
|
-
init(this, options, instance$
|
|
2819
|
+
init(this, options, instance$k, create_fragment$k, safe_not_equal, { path: 1 });
|
|
2845
2820
|
}
|
|
2846
2821
|
}
|
|
2847
2822
|
|
|
2848
2823
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte generated by Svelte v3.49.0 */
|
|
2849
2824
|
|
|
2850
|
-
function create_fragment$
|
|
2825
|
+
function create_fragment$j(ctx) {
|
|
2851
2826
|
let defs;
|
|
2852
2827
|
let pattern;
|
|
2853
2828
|
let rect;
|
|
@@ -2908,7 +2883,7 @@ function create_fragment$i(ctx) {
|
|
|
2908
2883
|
|
|
2909
2884
|
const halfWidth = 6;
|
|
2910
2885
|
|
|
2911
|
-
function instance$
|
|
2886
|
+
function instance$j($$self, $$props, $$invalidate) {
|
|
2912
2887
|
let d;
|
|
2913
2888
|
let { path } = $$props;
|
|
2914
2889
|
const width = halfWidth * 2;
|
|
@@ -2930,13 +2905,13 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
2930
2905
|
class RoomMaterial_1 extends SvelteComponent {
|
|
2931
2906
|
constructor(options) {
|
|
2932
2907
|
super();
|
|
2933
|
-
init(this, options, instance$
|
|
2908
|
+
init(this, options, instance$j, create_fragment$j, safe_not_equal, { path: 3 });
|
|
2934
2909
|
}
|
|
2935
2910
|
}
|
|
2936
2911
|
|
|
2937
2912
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte generated by Svelte v3.49.0 */
|
|
2938
2913
|
|
|
2939
|
-
function create_fragment$
|
|
2914
|
+
function create_fragment$i(ctx) {
|
|
2940
2915
|
let defs;
|
|
2941
2916
|
let pattern0;
|
|
2942
2917
|
let rect0;
|
|
@@ -3037,7 +3012,7 @@ function create_fragment$h(ctx) {
|
|
|
3037
3012
|
};
|
|
3038
3013
|
}
|
|
3039
3014
|
|
|
3040
|
-
function instance$
|
|
3015
|
+
function instance$i($$self, $$props, $$invalidate) {
|
|
3041
3016
|
let d;
|
|
3042
3017
|
let { path } = $$props;
|
|
3043
3018
|
|
|
@@ -3057,13 +3032,13 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
3057
3032
|
class RoomMaterial_2 extends SvelteComponent {
|
|
3058
3033
|
constructor(options) {
|
|
3059
3034
|
super();
|
|
3060
|
-
init(this, options, instance$
|
|
3035
|
+
init(this, options, instance$i, create_fragment$i, safe_not_equal, { path: 1 });
|
|
3061
3036
|
}
|
|
3062
3037
|
}
|
|
3063
3038
|
|
|
3064
3039
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial.svelte generated by Svelte v3.49.0 */
|
|
3065
3040
|
|
|
3066
|
-
function add_css$
|
|
3041
|
+
function add_css$f(target) {
|
|
3067
3042
|
append_styles(target, "svelte-1dykexu", ".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}");
|
|
3068
3043
|
}
|
|
3069
3044
|
|
|
@@ -3074,7 +3049,7 @@ function get_each_context$8(ctx, list, i) {
|
|
|
3074
3049
|
}
|
|
3075
3050
|
|
|
3076
3051
|
// (19:6) {:else}
|
|
3077
|
-
function create_else_block$
|
|
3052
|
+
function create_else_block$2(ctx) {
|
|
3078
3053
|
let roommaterial_1;
|
|
3079
3054
|
let current;
|
|
3080
3055
|
roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[5].path } });
|
|
@@ -3108,7 +3083,7 @@ function create_else_block$1(ctx) {
|
|
|
3108
3083
|
}
|
|
3109
3084
|
|
|
3110
3085
|
// (17:37)
|
|
3111
|
-
function create_if_block_1$
|
|
3086
|
+
function create_if_block_1$4(ctx) {
|
|
3112
3087
|
let roommaterial_2;
|
|
3113
3088
|
let current;
|
|
3114
3089
|
roommaterial_2 = new RoomMaterial_2({ props: { path: /*room*/ ctx[5].path } });
|
|
@@ -3181,7 +3156,7 @@ function create_each_block$8(ctx) {
|
|
|
3181
3156
|
let current_block_type_index;
|
|
3182
3157
|
let if_block;
|
|
3183
3158
|
let current;
|
|
3184
|
-
const if_block_creators = [create_if_block$7, create_if_block_1$
|
|
3159
|
+
const if_block_creators = [create_if_block$7, create_if_block_1$4, create_else_block$2];
|
|
3185
3160
|
const if_blocks = [];
|
|
3186
3161
|
|
|
3187
3162
|
function select_block_type(ctx, dirty) {
|
|
@@ -3250,7 +3225,7 @@ function create_each_block$8(ctx) {
|
|
|
3250
3225
|
};
|
|
3251
3226
|
}
|
|
3252
3227
|
|
|
3253
|
-
function create_fragment$
|
|
3228
|
+
function create_fragment$h(ctx) {
|
|
3254
3229
|
let div;
|
|
3255
3230
|
let current;
|
|
3256
3231
|
let each_value = /*rooms*/ ctx[0];
|
|
@@ -3336,7 +3311,7 @@ function create_fragment$g(ctx) {
|
|
|
3336
3311
|
};
|
|
3337
3312
|
}
|
|
3338
3313
|
|
|
3339
|
-
function instance$
|
|
3314
|
+
function instance$h($$self, $$props, $$invalidate) {
|
|
3340
3315
|
let rooms;
|
|
3341
3316
|
let { floorIndex } = $$props;
|
|
3342
3317
|
let { floorplanData } = $$props;
|
|
@@ -3362,17 +3337,17 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
3362
3337
|
class RoomMaterial extends SvelteComponent {
|
|
3363
3338
|
constructor(options) {
|
|
3364
3339
|
super();
|
|
3365
|
-
init(this, options, instance$
|
|
3340
|
+
init(this, options, instance$h, create_fragment$h, safe_not_equal, { floorIndex: 3, floorplanData: 4 }, add_css$f);
|
|
3366
3341
|
}
|
|
3367
3342
|
}
|
|
3368
3343
|
|
|
3369
3344
|
/* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.49.0 */
|
|
3370
3345
|
|
|
3371
|
-
function add_css$
|
|
3346
|
+
function add_css$e(target) {
|
|
3372
3347
|
append_styles(target, "svelte-19uvvss", "path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}");
|
|
3373
3348
|
}
|
|
3374
3349
|
|
|
3375
|
-
function create_fragment$
|
|
3350
|
+
function create_fragment$g(ctx) {
|
|
3376
3351
|
let path;
|
|
3377
3352
|
let mounted;
|
|
3378
3353
|
let dispose;
|
|
@@ -3407,7 +3382,7 @@ function create_fragment$f(ctx) {
|
|
|
3407
3382
|
};
|
|
3408
3383
|
}
|
|
3409
3384
|
|
|
3410
|
-
function instance$
|
|
3385
|
+
function instance$g($$self, $$props, $$invalidate) {
|
|
3411
3386
|
let { room } = $$props;
|
|
3412
3387
|
let { floorplanData } = $$props;
|
|
3413
3388
|
let { hoveredRoom } = $$props;
|
|
@@ -3443,22 +3418,22 @@ class Room extends SvelteComponent {
|
|
|
3443
3418
|
init(
|
|
3444
3419
|
this,
|
|
3445
3420
|
options,
|
|
3446
|
-
instance$
|
|
3447
|
-
create_fragment$
|
|
3421
|
+
instance$g,
|
|
3422
|
+
create_fragment$g,
|
|
3448
3423
|
safe_not_equal,
|
|
3449
3424
|
{
|
|
3450
3425
|
room: 3,
|
|
3451
3426
|
floorplanData: 4,
|
|
3452
3427
|
hoveredRoom: 5
|
|
3453
3428
|
},
|
|
3454
|
-
add_css$
|
|
3429
|
+
add_css$e
|
|
3455
3430
|
);
|
|
3456
3431
|
}
|
|
3457
3432
|
}
|
|
3458
3433
|
|
|
3459
3434
|
/* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.49.0 */
|
|
3460
3435
|
|
|
3461
|
-
function add_css$
|
|
3436
|
+
function add_css$d(target) {
|
|
3462
3437
|
append_styles(target, "svelte-1kqo6e4", ".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}");
|
|
3463
3438
|
}
|
|
3464
3439
|
|
|
@@ -3534,7 +3509,7 @@ function create_each_block$7(key_1, ctx) {
|
|
|
3534
3509
|
};
|
|
3535
3510
|
}
|
|
3536
3511
|
|
|
3537
|
-
function create_fragment$
|
|
3512
|
+
function create_fragment$f(ctx) {
|
|
3538
3513
|
let div;
|
|
3539
3514
|
let svg;
|
|
3540
3515
|
let each_blocks = [];
|
|
@@ -3608,7 +3583,7 @@ function create_fragment$e(ctx) {
|
|
|
3608
3583
|
};
|
|
3609
3584
|
}
|
|
3610
3585
|
|
|
3611
|
-
function instance$
|
|
3586
|
+
function instance$f($$self, $$props, $$invalidate) {
|
|
3612
3587
|
let { floorIndex } = $$props;
|
|
3613
3588
|
let { floorplanData } = $$props;
|
|
3614
3589
|
let { hoveredRoom } = $$props;
|
|
@@ -3631,22 +3606,22 @@ class RoomHighlight extends SvelteComponent {
|
|
|
3631
3606
|
init(
|
|
3632
3607
|
this,
|
|
3633
3608
|
options,
|
|
3634
|
-
instance$
|
|
3635
|
-
create_fragment$
|
|
3609
|
+
instance$f,
|
|
3610
|
+
create_fragment$f,
|
|
3636
3611
|
safe_not_equal,
|
|
3637
3612
|
{
|
|
3638
3613
|
floorIndex: 0,
|
|
3639
3614
|
floorplanData: 1,
|
|
3640
3615
|
hoveredRoom: 2
|
|
3641
3616
|
},
|
|
3642
|
-
add_css$
|
|
3617
|
+
add_css$d
|
|
3643
3618
|
);
|
|
3644
3619
|
}
|
|
3645
3620
|
}
|
|
3646
3621
|
|
|
3647
3622
|
/* src/floorplan/Components/CurrentFloor.svelte generated by Svelte v3.49.0 */
|
|
3648
3623
|
|
|
3649
|
-
function add_css$
|
|
3624
|
+
function add_css$c(target) {
|
|
3650
3625
|
append_styles(target, "svelte-bl8zrz", ".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}");
|
|
3651
3626
|
}
|
|
3652
3627
|
|
|
@@ -3708,7 +3683,7 @@ function create_if_block_2(ctx) {
|
|
|
3708
3683
|
}
|
|
3709
3684
|
|
|
3710
3685
|
// (24:2) {#if roomLabelsEnable}
|
|
3711
|
-
function create_if_block_1$
|
|
3686
|
+
function create_if_block_1$3(ctx) {
|
|
3712
3687
|
let roomlabels;
|
|
3713
3688
|
let current;
|
|
3714
3689
|
|
|
@@ -3823,7 +3798,7 @@ function create_if_block$6(ctx) {
|
|
|
3823
3798
|
};
|
|
3824
3799
|
}
|
|
3825
3800
|
|
|
3826
|
-
function create_fragment$
|
|
3801
|
+
function create_fragment$e(ctx) {
|
|
3827
3802
|
let div;
|
|
3828
3803
|
let roommaterial;
|
|
3829
3804
|
let t0;
|
|
@@ -3864,7 +3839,7 @@ function create_fragment$d(ctx) {
|
|
|
3864
3839
|
}
|
|
3865
3840
|
|
|
3866
3841
|
baseimage = new BaseImage({ props: baseimage_props });
|
|
3867
|
-
let if_block1 = /*roomLabelsEnable*/ ctx[3] && create_if_block_1$
|
|
3842
|
+
let if_block1 = /*roomLabelsEnable*/ ctx[3] && create_if_block_1$3(ctx);
|
|
3868
3843
|
let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$6(ctx);
|
|
3869
3844
|
|
|
3870
3845
|
return {
|
|
@@ -3951,7 +3926,7 @@ function create_fragment$d(ctx) {
|
|
|
3951
3926
|
transition_in(if_block1, 1);
|
|
3952
3927
|
}
|
|
3953
3928
|
} else {
|
|
3954
|
-
if_block1 = create_if_block_1$
|
|
3929
|
+
if_block1 = create_if_block_1$3(ctx);
|
|
3955
3930
|
if_block1.c();
|
|
3956
3931
|
transition_in(if_block1, 1);
|
|
3957
3932
|
if_block1.m(div, t3);
|
|
@@ -4023,7 +3998,7 @@ function create_fragment$d(ctx) {
|
|
|
4023
3998
|
};
|
|
4024
3999
|
}
|
|
4025
4000
|
|
|
4026
|
-
function instance$
|
|
4001
|
+
function instance$e($$self, $$props, $$invalidate) {
|
|
4027
4002
|
let { isCurrent } = $$props;
|
|
4028
4003
|
let { floorIndex } = $$props;
|
|
4029
4004
|
let { hoverEnable } = $$props;
|
|
@@ -4065,8 +4040,8 @@ class CurrentFloor$1 extends SvelteComponent {
|
|
|
4065
4040
|
init(
|
|
4066
4041
|
this,
|
|
4067
4042
|
options,
|
|
4068
|
-
instance$
|
|
4069
|
-
create_fragment$
|
|
4043
|
+
instance$e,
|
|
4044
|
+
create_fragment$e,
|
|
4070
4045
|
safe_not_equal,
|
|
4071
4046
|
{
|
|
4072
4047
|
isCurrent: 0,
|
|
@@ -4078,14 +4053,14 @@ class CurrentFloor$1 extends SvelteComponent {
|
|
|
4078
4053
|
getLabelElement: 6,
|
|
4079
4054
|
adaptiveRoomLabelVisibleEnable: 7
|
|
4080
4055
|
},
|
|
4081
|
-
add_css$
|
|
4056
|
+
add_css$c
|
|
4082
4057
|
);
|
|
4083
4058
|
}
|
|
4084
4059
|
}
|
|
4085
4060
|
|
|
4086
4061
|
/* src/floorplan/Components/Main.svelte generated by Svelte v3.49.0 */
|
|
4087
4062
|
|
|
4088
|
-
function add_css$
|
|
4063
|
+
function add_css$b(target) {
|
|
4089
4064
|
append_styles(target, "svelte-86bqav", ".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}");
|
|
4090
4065
|
}
|
|
4091
4066
|
|
|
@@ -4130,7 +4105,7 @@ function create_if_block$5(ctx) {
|
|
|
4130
4105
|
}
|
|
4131
4106
|
|
|
4132
4107
|
camera = new Camera$1({ props: camera_props });
|
|
4133
|
-
let if_block = /*compassEnable*/ ctx[6] && create_if_block_1$
|
|
4108
|
+
let if_block = /*compassEnable*/ ctx[6] && create_if_block_1$2(ctx);
|
|
4134
4109
|
|
|
4135
4110
|
return {
|
|
4136
4111
|
c() {
|
|
@@ -4210,7 +4185,7 @@ function create_if_block$5(ctx) {
|
|
|
4210
4185
|
transition_in(if_block, 1);
|
|
4211
4186
|
}
|
|
4212
4187
|
} else {
|
|
4213
|
-
if_block = create_if_block_1$
|
|
4188
|
+
if_block = create_if_block_1$2(ctx);
|
|
4214
4189
|
if_block.c();
|
|
4215
4190
|
transition_in(if_block, 1);
|
|
4216
4191
|
if_block.m(div, null);
|
|
@@ -4344,7 +4319,7 @@ function create_each_block$6(ctx) {
|
|
|
4344
4319
|
}
|
|
4345
4320
|
|
|
4346
4321
|
// (39:4) {#if compassEnable}
|
|
4347
|
-
function create_if_block_1$
|
|
4322
|
+
function create_if_block_1$2(ctx) {
|
|
4348
4323
|
let compass;
|
|
4349
4324
|
let current;
|
|
4350
4325
|
|
|
@@ -4384,7 +4359,7 @@ function create_if_block_1$1(ctx) {
|
|
|
4384
4359
|
};
|
|
4385
4360
|
}
|
|
4386
4361
|
|
|
4387
|
-
function create_fragment$
|
|
4362
|
+
function create_fragment$d(ctx) {
|
|
4388
4363
|
let if_block_anchor;
|
|
4389
4364
|
let current;
|
|
4390
4365
|
let if_block = /*visible*/ ctx[1] && create_if_block$5(ctx);
|
|
@@ -4439,7 +4414,7 @@ function create_fragment$c(ctx) {
|
|
|
4439
4414
|
};
|
|
4440
4415
|
}
|
|
4441
4416
|
|
|
4442
|
-
function instance$
|
|
4417
|
+
function instance$d($$self, $$props, $$invalidate) {
|
|
4443
4418
|
let { duration = 0 } = $$props;
|
|
4444
4419
|
let { visible } = $$props;
|
|
4445
4420
|
let { northDesc } = $$props;
|
|
@@ -4497,8 +4472,8 @@ class Main$1 extends SvelteComponent {
|
|
|
4497
4472
|
init(
|
|
4498
4473
|
this,
|
|
4499
4474
|
options,
|
|
4500
|
-
instance$
|
|
4501
|
-
create_fragment$
|
|
4475
|
+
instance$d,
|
|
4476
|
+
create_fragment$d,
|
|
4502
4477
|
safe_not_equal,
|
|
4503
4478
|
{
|
|
4504
4479
|
duration: 0,
|
|
@@ -4516,33 +4491,29 @@ class Main$1 extends SvelteComponent {
|
|
|
4516
4491
|
getLabelElement: 12,
|
|
4517
4492
|
adaptiveRoomLabelVisibleEnable: 13
|
|
4518
4493
|
},
|
|
4519
|
-
add_css$
|
|
4494
|
+
add_css$b
|
|
4520
4495
|
);
|
|
4521
4496
|
}
|
|
4522
4497
|
}
|
|
4523
4498
|
|
|
4524
4499
|
const FLOORPLAN_EXTRA_OBJECT_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC';
|
|
4525
4500
|
|
|
4526
|
-
function formatOutlines(outlines) {
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
const
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
url: item.url,
|
|
4534
|
-
svgUrl: item.svg_url,
|
|
4535
|
-
};
|
|
4536
|
-
if (item.svg_url) {
|
|
4537
|
-
const svgContent = yield fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
4538
|
-
outlineItem.svgContent = svgContent;
|
|
4539
|
-
}
|
|
4540
|
-
return outlineItem;
|
|
4541
|
-
});
|
|
4501
|
+
async function formatOutlines(outlines) {
|
|
4502
|
+
const headers = new Headers({ 'Content-Type': 'text/plain' });
|
|
4503
|
+
const getOutlineItem = async function (item) {
|
|
4504
|
+
const outlineItem = {
|
|
4505
|
+
index: item.index,
|
|
4506
|
+
url: item.url,
|
|
4507
|
+
svgUrl: item.svg_url,
|
|
4542
4508
|
};
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4509
|
+
if (item.svg_url) {
|
|
4510
|
+
const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
4511
|
+
outlineItem.svgContent = svgContent;
|
|
4512
|
+
}
|
|
4513
|
+
return outlineItem;
|
|
4514
|
+
};
|
|
4515
|
+
const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
|
|
4516
|
+
return svgOutlineItems;
|
|
4546
4517
|
}
|
|
4547
4518
|
function formatRoom(data) {
|
|
4548
4519
|
const floorplanRoomItem = {
|
|
@@ -4588,21 +4559,19 @@ function formatFloorplanEntrance(data) {
|
|
|
4588
4559
|
};
|
|
4589
4560
|
return floorplanEntrance;
|
|
4590
4561
|
}
|
|
4591
|
-
function formatData(data) {
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
return floorplanData;
|
|
4605
|
-
});
|
|
4562
|
+
async function formatData(data) {
|
|
4563
|
+
const outlines = await formatOutlines(data.outlines);
|
|
4564
|
+
const bounding = data.computed_data.bounding;
|
|
4565
|
+
const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
|
|
4566
|
+
const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
|
|
4567
|
+
const floorplanData = {
|
|
4568
|
+
outlines,
|
|
4569
|
+
entrance,
|
|
4570
|
+
bounding,
|
|
4571
|
+
floorDatas,
|
|
4572
|
+
observers: data.computed_data.observers.map(formateFloorplanObserver),
|
|
4573
|
+
};
|
|
4574
|
+
return floorplanData;
|
|
4606
4575
|
}
|
|
4607
4576
|
function formatExtraObjects(data, five, floorplanData) {
|
|
4608
4577
|
const extraObjects = data.map((object) => {
|
|
@@ -4697,37 +4666,35 @@ function nearlyEqual(num1, num2, accuracy = 4) {
|
|
|
4697
4666
|
/** 等待 five changeMode 结束
|
|
4698
4667
|
* @description Promise 的状态只代表 mode 与预期是否一致,不保证参数的一致性
|
|
4699
4668
|
*/
|
|
4700
|
-
function changeMode(five, changeModeParams) {
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
five.
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
const
|
|
4712
|
-
|
|
4713
|
-
|
|
4669
|
+
async function changeMode(five, changeModeParams) {
|
|
4670
|
+
await new Promise((resolve, reject) => {
|
|
4671
|
+
// 虽然 changeMode 是异步函数,但不代表异步流程结束代表切换 Mode 动画结束
|
|
4672
|
+
five.changeMode(...changeModeParams).catch((error) => reject(error));
|
|
4673
|
+
five.once('initAnimationEnded', () => {
|
|
4674
|
+
const fiveCurrentState = five.getCurrentState();
|
|
4675
|
+
const correctMode = changeModeParams[0];
|
|
4676
|
+
if (fiveCurrentState.mode !== correctMode)
|
|
4677
|
+
reject(new Error('mode 与预期不符'));
|
|
4678
|
+
/** 检测当前的 current pose 和传入的 pose 是否一致 */
|
|
4679
|
+
const checkPose = () => {
|
|
4680
|
+
const correctPose = changeModeParams[1];
|
|
4681
|
+
if (!correctPose)
|
|
4682
|
+
return true;
|
|
4683
|
+
return Object.keys(correctPose).every((key) => {
|
|
4684
|
+
const fivePoseItem = fiveCurrentState[key];
|
|
4685
|
+
if (fivePoseItem === undefined)
|
|
4714
4686
|
return true;
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
const checkPoseResult = checkPose();
|
|
4727
|
-
if (!checkPoseResult)
|
|
4728
|
-
reject(new Error('five pose 与预期不符'));
|
|
4729
|
-
resolve();
|
|
4730
|
-
});
|
|
4687
|
+
const correctPoseItem = correctPose[key];
|
|
4688
|
+
if (typeof fivePoseItem === 'number' && typeof correctPoseItem === 'number') {
|
|
4689
|
+
return nearlyEqual(fivePoseItem, correctPoseItem, 2);
|
|
4690
|
+
}
|
|
4691
|
+
return fivePoseItem === correctPoseItem;
|
|
4692
|
+
});
|
|
4693
|
+
};
|
|
4694
|
+
const checkPoseResult = checkPose();
|
|
4695
|
+
if (!checkPoseResult)
|
|
4696
|
+
reject(new Error('five pose 与预期不符'));
|
|
4697
|
+
resolve();
|
|
4731
4698
|
});
|
|
4732
4699
|
});
|
|
4733
4700
|
}
|
|
@@ -5074,24 +5041,22 @@ class Controller$3 extends Controller$4 {
|
|
|
5074
5041
|
five.once('dispose', this.dispose);
|
|
5075
5042
|
this.addEventListener();
|
|
5076
5043
|
}
|
|
5077
|
-
load(serverData, state, userAction = true) {
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
this.render();
|
|
5094
|
-
});
|
|
5044
|
+
async load(serverData, state, userAction = true) {
|
|
5045
|
+
function isPluginServerData(serverData) {
|
|
5046
|
+
return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
|
|
5047
|
+
}
|
|
5048
|
+
const _data = serverData;
|
|
5049
|
+
if (_data && !_data.version)
|
|
5050
|
+
console.warn('传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数');
|
|
5051
|
+
const copyData = JSON.parse(JSON.stringify(serverData));
|
|
5052
|
+
const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
|
|
5053
|
+
const prevData = this.data;
|
|
5054
|
+
this.data = await formatData(_serverData);
|
|
5055
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
5056
|
+
this.hooks.emit('dataChange', this.data, prevData);
|
|
5057
|
+
if (state)
|
|
5058
|
+
this.updateState(state, userAction);
|
|
5059
|
+
this.render();
|
|
5095
5060
|
}
|
|
5096
5061
|
/** 更新户型图位置 */
|
|
5097
5062
|
updatePosition() {
|
|
@@ -5116,25 +5081,21 @@ class Controller$3 extends Controller$4 {
|
|
|
5116
5081
|
this.render();
|
|
5117
5082
|
return this;
|
|
5118
5083
|
}
|
|
5119
|
-
show(options = {}) {
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
this._show({ userAction });
|
|
5127
|
-
});
|
|
5084
|
+
async show(options = {}) {
|
|
5085
|
+
// 已经展示完成了,不做任何操作
|
|
5086
|
+
if (this.state.visible)
|
|
5087
|
+
return;
|
|
5088
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
5089
|
+
this.updateState({ visible: true }, userAction);
|
|
5090
|
+
this._show({ userAction });
|
|
5128
5091
|
}
|
|
5129
|
-
hide(options = {}) {
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
this._hide({ userAction });
|
|
5137
|
-
});
|
|
5092
|
+
async hide(options = {}) {
|
|
5093
|
+
this.isHiddenByHideFunc = true;
|
|
5094
|
+
if (!this.state.visible)
|
|
5095
|
+
return;
|
|
5096
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
5097
|
+
this.updateState({ visible: false }, userAction);
|
|
5098
|
+
this._hide({ userAction });
|
|
5138
5099
|
}
|
|
5139
5100
|
enable(options = {}) {
|
|
5140
5101
|
if (this.state.enabled)
|
|
@@ -5164,42 +5125,36 @@ class Controller$3 extends Controller$4 {
|
|
|
5164
5125
|
state.visible ? this._show(options) : this._hide(options);
|
|
5165
5126
|
}
|
|
5166
5127
|
}
|
|
5167
|
-
formatData(serverData) {
|
|
5168
|
-
return
|
|
5169
|
-
return yield formatData(serverData.data);
|
|
5170
|
-
});
|
|
5128
|
+
async formatData(serverData) {
|
|
5129
|
+
return await formatData(serverData.data);
|
|
5171
5130
|
}
|
|
5172
|
-
_show(options) {
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
this.render();
|
|
5190
|
-
});
|
|
5131
|
+
async _show(options) {
|
|
5132
|
+
if (!this.state.enabled)
|
|
5133
|
+
return;
|
|
5134
|
+
this.isHiddenByHideFunc = false;
|
|
5135
|
+
const { userAction } = options;
|
|
5136
|
+
this.hooks.emit('show', { userAction });
|
|
5137
|
+
if (this.five.getCurrentState().mode !== 'Topview') {
|
|
5138
|
+
await changeMode(this.five, ['Topview', undefined, undefined, userAction]);
|
|
5139
|
+
}
|
|
5140
|
+
this.five.model.show(this.floorIndex);
|
|
5141
|
+
this.updatePosition();
|
|
5142
|
+
this.updateSize();
|
|
5143
|
+
const renderDuration = 500;
|
|
5144
|
+
const modelOpacity = this.state.config.modelOpacity;
|
|
5145
|
+
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
5146
|
+
this.hooks.emit('showAnimationEnded', { userAction });
|
|
5147
|
+
this.render();
|
|
5191
5148
|
}
|
|
5192
|
-
_hide(options) {
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
this.render();
|
|
5202
|
-
});
|
|
5149
|
+
async _hide(options) {
|
|
5150
|
+
if (!this.state.enabled)
|
|
5151
|
+
return;
|
|
5152
|
+
const { userAction } = options;
|
|
5153
|
+
this.hooks.emit('hide', { userAction });
|
|
5154
|
+
const modelOpacity = 1;
|
|
5155
|
+
const renderDuration = 0;
|
|
5156
|
+
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
5157
|
+
this.render();
|
|
5203
5158
|
}
|
|
5204
5159
|
_enable(options) {
|
|
5205
5160
|
const { userAction } = options;
|
|
@@ -5299,11 +5254,11 @@ function throttle(func, wait = 200) {
|
|
|
5299
5254
|
|
|
5300
5255
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte generated by Svelte v3.49.0 */
|
|
5301
5256
|
|
|
5302
|
-
function add_css$
|
|
5257
|
+
function add_css$a(target) {
|
|
5303
5258
|
append_styles(target, "svelte-1ty3s4p", ".plugin-radar__camera-wrapper.svelte-1ty3s4p{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1ty3s4p{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1ty3s4p{position:absolute;left:-0.78125rem;top:-0.78125rem;width:0.88542rem;height:0.88542rem;transform-origin:0.78125rem 0.78125rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}");
|
|
5304
5259
|
}
|
|
5305
5260
|
|
|
5306
|
-
function create_fragment$
|
|
5261
|
+
function create_fragment$c(ctx) {
|
|
5307
5262
|
let div2;
|
|
5308
5263
|
let div1;
|
|
5309
5264
|
let div0;
|
|
@@ -5353,7 +5308,7 @@ function getCameraRotateTransform(longitude) {
|
|
|
5353
5308
|
return `rotate(${rotate}deg)`;
|
|
5354
5309
|
}
|
|
5355
5310
|
|
|
5356
|
-
function instance$
|
|
5311
|
+
function instance$c($$self, $$props, $$invalidate) {
|
|
5357
5312
|
let positionTransform;
|
|
5358
5313
|
let rotateTransform;
|
|
5359
5314
|
let { five } = $$props;
|
|
@@ -5433,8 +5388,8 @@ class Camera extends SvelteComponent {
|
|
|
5433
5388
|
init(
|
|
5434
5389
|
this,
|
|
5435
5390
|
options,
|
|
5436
|
-
instance$
|
|
5437
|
-
create_fragment$
|
|
5391
|
+
instance$c,
|
|
5392
|
+
create_fragment$c,
|
|
5438
5393
|
safe_not_equal,
|
|
5439
5394
|
{
|
|
5440
5395
|
five: 3,
|
|
@@ -5442,14 +5397,14 @@ class Camera extends SvelteComponent {
|
|
|
5442
5397
|
floorplanData: 5,
|
|
5443
5398
|
cameraImageUrl: 0
|
|
5444
5399
|
},
|
|
5445
|
-
add_css$
|
|
5400
|
+
add_css$a
|
|
5446
5401
|
);
|
|
5447
5402
|
}
|
|
5448
5403
|
}
|
|
5449
5404
|
|
|
5450
5405
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte generated by Svelte v3.49.0 */
|
|
5451
5406
|
|
|
5452
|
-
function add_css$
|
|
5407
|
+
function add_css$9(target) {
|
|
5453
5408
|
append_styles(target, "svelte-1i87fz7", ".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}");
|
|
5454
5409
|
}
|
|
5455
5410
|
|
|
@@ -5519,7 +5474,7 @@ function create_each_block$5(key_1, ctx) {
|
|
|
5519
5474
|
};
|
|
5520
5475
|
}
|
|
5521
5476
|
|
|
5522
|
-
function create_fragment$
|
|
5477
|
+
function create_fragment$b(ctx) {
|
|
5523
5478
|
let div;
|
|
5524
5479
|
let each_blocks = [];
|
|
5525
5480
|
let each_1_lookup = new Map();
|
|
@@ -5567,7 +5522,7 @@ function create_fragment$a(ctx) {
|
|
|
5567
5522
|
};
|
|
5568
5523
|
}
|
|
5569
5524
|
|
|
5570
|
-
function instance$
|
|
5525
|
+
function instance$b($$self, $$props, $$invalidate) {
|
|
5571
5526
|
let { extraObjects = [] } = $$props;
|
|
5572
5527
|
|
|
5573
5528
|
$$self.$$set = $$props => {
|
|
@@ -5580,7 +5535,7 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
5580
5535
|
class ExtraObjects extends SvelteComponent {
|
|
5581
5536
|
constructor(options) {
|
|
5582
5537
|
super();
|
|
5583
|
-
init(this, options, instance$
|
|
5538
|
+
init(this, options, instance$b, create_fragment$b, safe_not_equal, { extraObjects: 0 }, add_css$9);
|
|
5584
5539
|
}
|
|
5585
5540
|
}
|
|
5586
5541
|
|
|
@@ -5646,7 +5601,7 @@ function create_if_block$4(ctx) {
|
|
|
5646
5601
|
};
|
|
5647
5602
|
}
|
|
5648
5603
|
|
|
5649
|
-
function create_fragment$
|
|
5604
|
+
function create_fragment$a(ctx) {
|
|
5650
5605
|
let baseimage;
|
|
5651
5606
|
let t0;
|
|
5652
5607
|
let extraobjects;
|
|
@@ -5757,7 +5712,7 @@ function create_fragment$9(ctx) {
|
|
|
5757
5712
|
};
|
|
5758
5713
|
}
|
|
5759
5714
|
|
|
5760
|
-
function instance$
|
|
5715
|
+
function instance$a($$self, $$props, $$invalidate) {
|
|
5761
5716
|
let currentFloorExtraObjects;
|
|
5762
5717
|
let { five } = $$props;
|
|
5763
5718
|
let { pxmm } = $$props;
|
|
@@ -5800,7 +5755,7 @@ class CurrentFloor extends SvelteComponent {
|
|
|
5800
5755
|
constructor(options) {
|
|
5801
5756
|
super();
|
|
5802
5757
|
|
|
5803
|
-
init(this, options, instance$
|
|
5758
|
+
init(this, options, instance$a, create_fragment$a, safe_not_equal, {
|
|
5804
5759
|
five: 0,
|
|
5805
5760
|
pxmm: 1,
|
|
5806
5761
|
floorIndex: 2,
|
|
@@ -5813,7 +5768,7 @@ class CurrentFloor extends SvelteComponent {
|
|
|
5813
5768
|
|
|
5814
5769
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte generated by Svelte v3.49.0 */
|
|
5815
5770
|
|
|
5816
|
-
function add_css$
|
|
5771
|
+
function add_css$8(target) {
|
|
5817
5772
|
append_styles(target, "svelte-1mvqyqq", ".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}");
|
|
5818
5773
|
}
|
|
5819
5774
|
|
|
@@ -5822,7 +5777,7 @@ function create_if_block$3(ctx) {
|
|
|
5822
5777
|
let div;
|
|
5823
5778
|
let div_resize_listener;
|
|
5824
5779
|
let current;
|
|
5825
|
-
let if_block = /*clientWidth*/ ctx[6] !== 0 && create_if_block_1(ctx);
|
|
5780
|
+
let if_block = /*clientWidth*/ ctx[6] !== 0 && create_if_block_1$1(ctx);
|
|
5826
5781
|
|
|
5827
5782
|
return {
|
|
5828
5783
|
c() {
|
|
@@ -5846,7 +5801,7 @@ function create_if_block$3(ctx) {
|
|
|
5846
5801
|
transition_in(if_block, 1);
|
|
5847
5802
|
}
|
|
5848
5803
|
} else {
|
|
5849
|
-
if_block = create_if_block_1(ctx);
|
|
5804
|
+
if_block = create_if_block_1$1(ctx);
|
|
5850
5805
|
if_block.c();
|
|
5851
5806
|
transition_in(if_block, 1);
|
|
5852
5807
|
if_block.m(div, null);
|
|
@@ -5879,7 +5834,7 @@ function create_if_block$3(ctx) {
|
|
|
5879
5834
|
}
|
|
5880
5835
|
|
|
5881
5836
|
// (43:4) {#if clientWidth !== 0}
|
|
5882
|
-
function create_if_block_1(ctx) {
|
|
5837
|
+
function create_if_block_1$1(ctx) {
|
|
5883
5838
|
let div;
|
|
5884
5839
|
let currentfloor;
|
|
5885
5840
|
let t;
|
|
@@ -5997,7 +5952,7 @@ function create_if_block_1(ctx) {
|
|
|
5997
5952
|
};
|
|
5998
5953
|
}
|
|
5999
5954
|
|
|
6000
|
-
function create_fragment$
|
|
5955
|
+
function create_fragment$9(ctx) {
|
|
6001
5956
|
let if_block_anchor;
|
|
6002
5957
|
let current;
|
|
6003
5958
|
let if_block = /*visible*/ ctx[1] && create_if_block$3(ctx);
|
|
@@ -6052,7 +6007,7 @@ function create_fragment$8(ctx) {
|
|
|
6052
6007
|
};
|
|
6053
6008
|
}
|
|
6054
6009
|
|
|
6055
|
-
function instance$
|
|
6010
|
+
function instance$9($$self, $$props, $$invalidate) {
|
|
6056
6011
|
let { five } = $$props;
|
|
6057
6012
|
let { visible } = $$props;
|
|
6058
6013
|
let { hoverEnable } = $$props;
|
|
@@ -6138,8 +6093,8 @@ class Main extends SvelteComponent {
|
|
|
6138
6093
|
init(
|
|
6139
6094
|
this,
|
|
6140
6095
|
options,
|
|
6141
|
-
instance$
|
|
6142
|
-
create_fragment$
|
|
6096
|
+
instance$9,
|
|
6097
|
+
create_fragment$9,
|
|
6143
6098
|
safe_not_equal,
|
|
6144
6099
|
{
|
|
6145
6100
|
five: 0,
|
|
@@ -6149,7 +6104,7 @@ class Main extends SvelteComponent {
|
|
|
6149
6104
|
cameraImageUrl: 4,
|
|
6150
6105
|
extraObjects: 5
|
|
6151
6106
|
},
|
|
6152
|
-
add_css$
|
|
6107
|
+
add_css$8
|
|
6153
6108
|
);
|
|
6154
6109
|
}
|
|
6155
6110
|
}
|
|
@@ -6252,55 +6207,49 @@ class Controller$2 extends Controller$4 {
|
|
|
6252
6207
|
// =============== init Listener ===============
|
|
6253
6208
|
five.once('dispose', this.dispose);
|
|
6254
6209
|
}
|
|
6255
|
-
load(serverData, state, userAction = true) {
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
this.render();
|
|
6284
|
-
});
|
|
6210
|
+
async load(serverData, state, userAction = true) {
|
|
6211
|
+
// const loadImage = async () => {
|
|
6212
|
+
// const floorIndex = this.five.work.observers[this.five.getCurrentState().panoIndex].floorIndex
|
|
6213
|
+
// // 当有 svgString 时,没有加载过程
|
|
6214
|
+
// if (floorplanData.outlines[floorIndex]?.svgContent) return
|
|
6215
|
+
// // 如果当前楼层图片不存在,不存在加载过程
|
|
6216
|
+
// const nowFloorImageSrc = floorplanData.outlines[floorIndex]?.url
|
|
6217
|
+
// if (!nowFloorImageSrc) return
|
|
6218
|
+
// // 图片加载完成时再 render
|
|
6219
|
+
// await new Promise<void>((resolve) => {
|
|
6220
|
+
// const nowFloorImage = new Image()
|
|
6221
|
+
// nowFloorImage.src = nowFloorImageSrc
|
|
6222
|
+
// nowFloorImage.onload = () => resolve()
|
|
6223
|
+
// })
|
|
6224
|
+
// }
|
|
6225
|
+
// await loadImage()
|
|
6226
|
+
function isPluginServerData(serverData) {
|
|
6227
|
+
return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
|
|
6228
|
+
}
|
|
6229
|
+
const copyData = JSON.parse(JSON.stringify(serverData));
|
|
6230
|
+
const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
|
|
6231
|
+
const prevData = this.data;
|
|
6232
|
+
this.data = await formatData(_serverData);
|
|
6233
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
6234
|
+
this.hooks.emit('dataChange', this.data, prevData);
|
|
6235
|
+
if (state)
|
|
6236
|
+
this.updateState(state, userAction);
|
|
6237
|
+
this.render();
|
|
6285
6238
|
}
|
|
6286
|
-
show(options = {}) {
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
this._show({ userAction });
|
|
6294
|
-
});
|
|
6239
|
+
async show(options = {}) {
|
|
6240
|
+
// 已经展示完成了,不做任何操作
|
|
6241
|
+
if (this.state.visible)
|
|
6242
|
+
return;
|
|
6243
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
6244
|
+
this.updateState({ visible: true }, userAction);
|
|
6245
|
+
this._show({ userAction });
|
|
6295
6246
|
}
|
|
6296
|
-
hide(options = {}) {
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
this._hide({ userAction });
|
|
6303
|
-
});
|
|
6247
|
+
async hide(options = {}) {
|
|
6248
|
+
if (!this.state.visible)
|
|
6249
|
+
return;
|
|
6250
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
6251
|
+
this.updateState({ visible: false }, userAction);
|
|
6252
|
+
this._hide({ userAction });
|
|
6304
6253
|
}
|
|
6305
6254
|
enable(options = {}) {
|
|
6306
6255
|
if (this.state.enabled)
|
|
@@ -6345,10 +6294,8 @@ class Controller$2 extends Controller$4 {
|
|
|
6345
6294
|
this.extraObjects = formatExtraObjects(data, this.five, this.data);
|
|
6346
6295
|
this.render();
|
|
6347
6296
|
}
|
|
6348
|
-
formatData(serverData) {
|
|
6349
|
-
return
|
|
6350
|
-
return yield formatData(serverData.data);
|
|
6351
|
-
});
|
|
6297
|
+
async formatData(serverData) {
|
|
6298
|
+
return await formatData(serverData.data);
|
|
6352
6299
|
}
|
|
6353
6300
|
_enable(options) {
|
|
6354
6301
|
const { userAction } = options;
|
|
@@ -6408,18 +6355,16 @@ const PanoFloorplanRadarPlugin = (five, params) => {
|
|
|
6408
6355
|
* 有异常,则返回 [Error, undefined]
|
|
6409
6356
|
* 用于替代 try&catch 处理 await 异常的方案
|
|
6410
6357
|
*/
|
|
6411
|
-
function to(promise) {
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
}
|
|
6422
|
-
});
|
|
6358
|
+
async function to(promise) {
|
|
6359
|
+
try {
|
|
6360
|
+
const data = await promise;
|
|
6361
|
+
return [null, data];
|
|
6362
|
+
}
|
|
6363
|
+
catch (error) {
|
|
6364
|
+
if (error instanceof Error)
|
|
6365
|
+
return [error, null];
|
|
6366
|
+
return [new Error(''), null];
|
|
6367
|
+
}
|
|
6423
6368
|
}
|
|
6424
6369
|
|
|
6425
6370
|
var FloorplanErrorType;
|
|
@@ -6464,29 +6409,27 @@ function checkShowState(five, showState) {
|
|
|
6464
6409
|
* 2. 内置了相应的动画时间计算
|
|
6465
6410
|
* 3. 纠正成功会返回 true,失败「可能会被用户行为中断」会返回 false
|
|
6466
6411
|
*/
|
|
6467
|
-
function correctFiveState(five, showState, userAction = true) {
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
if (result === true)
|
|
6472
|
-
return;
|
|
6473
|
-
const currentFiveState = five.getCurrentState();
|
|
6474
|
-
// 纠正 mode
|
|
6475
|
-
if (currentFiveState.mode !== showState.mode) {
|
|
6476
|
-
const [changeModeError] = yield to(changeMode(five, [showState.mode, showState, undefined, userAction]));
|
|
6477
|
-
if (changeModeError)
|
|
6478
|
-
throw new Error(FloorplanErrorType.ChangeModeError);
|
|
6479
|
-
return;
|
|
6480
|
-
}
|
|
6481
|
-
// 纠正相机状态
|
|
6482
|
-
// 根据 latitude、longitude、fov 计算动画时间,最多 1s
|
|
6483
|
-
const { latitude, longitude, fov } = currentFiveState;
|
|
6484
|
-
const time = Math.min(1000, Math.max(200, Math.abs(latitude - Math.PI / 2) * 1000, (longitude > Math.PI ? 2 * Math.PI - longitude : longitude) * 500, Math.abs(fov - showState.fov) * 10));
|
|
6485
|
-
const [updateCameraError] = yield to(five.updateCamera(showState, time, userAction));
|
|
6486
|
-
if (updateCameraError)
|
|
6487
|
-
throw new Error(FloorplanErrorType.UpdateCameraError);
|
|
6412
|
+
async function correctFiveState(five, showState, userAction = true) {
|
|
6413
|
+
// 当前已满足状态,不需要变更
|
|
6414
|
+
const result = checkShowState(five, showState);
|
|
6415
|
+
if (result === true)
|
|
6488
6416
|
return;
|
|
6489
|
-
|
|
6417
|
+
const currentFiveState = five.getCurrentState();
|
|
6418
|
+
// 纠正 mode
|
|
6419
|
+
if (currentFiveState.mode !== showState.mode) {
|
|
6420
|
+
const [changeModeError] = await to(changeMode(five, [showState.mode, showState, undefined, userAction]));
|
|
6421
|
+
if (changeModeError)
|
|
6422
|
+
throw new Error(FloorplanErrorType.ChangeModeError);
|
|
6423
|
+
return;
|
|
6424
|
+
}
|
|
6425
|
+
// 纠正相机状态
|
|
6426
|
+
// 根据 latitude、longitude、fov 计算动画时间,最多 1s
|
|
6427
|
+
const { latitude, longitude, fov } = currentFiveState;
|
|
6428
|
+
const time = Math.min(1000, Math.max(200, Math.abs(latitude - Math.PI / 2) * 1000, (longitude > Math.PI ? 2 * Math.PI - longitude : longitude) * 500, Math.abs(fov - showState.fov) * 10));
|
|
6429
|
+
const [updateCameraError] = await to(five.updateCamera(showState, time, userAction));
|
|
6430
|
+
if (updateCameraError)
|
|
6431
|
+
throw new Error(FloorplanErrorType.UpdateCameraError);
|
|
6432
|
+
return;
|
|
6490
6433
|
}
|
|
6491
6434
|
|
|
6492
6435
|
/** 当前 five 的相机视角是否满足户型图自动隐藏条件
|
|
@@ -6655,7 +6598,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6655
6598
|
enumerable: true,
|
|
6656
6599
|
configurable: true,
|
|
6657
6600
|
writable: true,
|
|
6658
|
-
value: (options = {}) =>
|
|
6601
|
+
value: async (options = {}) => {
|
|
6659
6602
|
if (!this.state.enabled)
|
|
6660
6603
|
return;
|
|
6661
6604
|
// 已经展示完成了,不做任何操作
|
|
@@ -6664,14 +6607,14 @@ class Controller$1 extends Controller$4 {
|
|
|
6664
6607
|
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
6665
6608
|
this.updateState({ visible: true }, userAction);
|
|
6666
6609
|
this._show(options);
|
|
6667
|
-
}
|
|
6610
|
+
}
|
|
6668
6611
|
});
|
|
6669
6612
|
/** 隐藏户型图 */
|
|
6670
6613
|
Object.defineProperty(this, "hide", {
|
|
6671
6614
|
enumerable: true,
|
|
6672
6615
|
configurable: true,
|
|
6673
6616
|
writable: true,
|
|
6674
|
-
value: (options = {}) =>
|
|
6617
|
+
value: async (options = {}) => {
|
|
6675
6618
|
if (!this.state.enabled)
|
|
6676
6619
|
return;
|
|
6677
6620
|
this.isHiddenByHideFunc = true;
|
|
@@ -6679,7 +6622,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6679
6622
|
return;
|
|
6680
6623
|
this.updateState({ visible: false }, options.userAction || true);
|
|
6681
6624
|
this._hide(options);
|
|
6682
|
-
}
|
|
6625
|
+
}
|
|
6683
6626
|
});
|
|
6684
6627
|
/** 更新户型图大小 */
|
|
6685
6628
|
Object.defineProperty(this, "updateSize", {
|
|
@@ -6745,11 +6688,11 @@ class Controller$1 extends Controller$4 {
|
|
|
6745
6688
|
enumerable: true,
|
|
6746
6689
|
configurable: true,
|
|
6747
6690
|
writable: true,
|
|
6748
|
-
value: (options) =>
|
|
6749
|
-
var
|
|
6691
|
+
value: async (options) => {
|
|
6692
|
+
var _a;
|
|
6750
6693
|
if (!this.state.enabled)
|
|
6751
6694
|
return;
|
|
6752
|
-
if (!((
|
|
6695
|
+
if (!((_a = this.five.model) === null || _a === void 0 ? void 0 : _a.loaded))
|
|
6753
6696
|
throw new Error(FloorplanErrorType.ModelNotLoaded);
|
|
6754
6697
|
if (!this.data)
|
|
6755
6698
|
throw new Error(FloorplanErrorType.DataNotLoaded);
|
|
@@ -6763,7 +6706,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6763
6706
|
userAction: true,
|
|
6764
6707
|
};
|
|
6765
6708
|
const mergedOptions = Object.assign(Object.assign({}, baseShowOpts), options);
|
|
6766
|
-
const getShowPromise = () =>
|
|
6709
|
+
const getShowPromise = async () => {
|
|
6767
6710
|
this.hooks.emit('show', { userAction: mergedOptions.userAction, auto: mergedOptions.isAutoShow });
|
|
6768
6711
|
let hasRejected = false;
|
|
6769
6712
|
let externalErrorMsg;
|
|
@@ -6771,7 +6714,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6771
6714
|
hasRejected = true;
|
|
6772
6715
|
externalErrorMsg = errorMsg;
|
|
6773
6716
|
};
|
|
6774
|
-
const [correctError] =
|
|
6717
|
+
const [correctError] = await to(correctFiveState(this.five, this.showState, mergedOptions.userAction));
|
|
6775
6718
|
if (correctError)
|
|
6776
6719
|
throw correctError;
|
|
6777
6720
|
// 异步结束要判断当前是不是被中断了
|
|
@@ -6789,7 +6732,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6789
6732
|
const renderDuration = mergedOptions.immediately ? 0 : SHOW_ANIME_DURATION;
|
|
6790
6733
|
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
6791
6734
|
this.render(renderDuration);
|
|
6792
|
-
}
|
|
6735
|
+
};
|
|
6793
6736
|
this.showPromise = getShowPromise()
|
|
6794
6737
|
.then(() => {
|
|
6795
6738
|
this.hooks.emit('showAnimationEnded', {
|
|
@@ -6811,7 +6754,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6811
6754
|
this.showRejection = undefined;
|
|
6812
6755
|
});
|
|
6813
6756
|
return this.showPromise;
|
|
6814
|
-
}
|
|
6757
|
+
}
|
|
6815
6758
|
});
|
|
6816
6759
|
Object.defineProperty(this, "_hide", {
|
|
6817
6760
|
enumerable: true,
|
|
@@ -7045,24 +6988,22 @@ class Controller$1 extends Controller$4 {
|
|
|
7045
6988
|
five.once('dispose', this.dispose);
|
|
7046
6989
|
this.addEventListener();
|
|
7047
6990
|
}
|
|
7048
|
-
load(serverData, state, userAction = true) {
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
this.render();
|
|
7065
|
-
});
|
|
6991
|
+
async load(serverData, state, userAction = true) {
|
|
6992
|
+
function isPluginServerData(serverData) {
|
|
6993
|
+
return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
|
|
6994
|
+
}
|
|
6995
|
+
const _data = serverData;
|
|
6996
|
+
if (_data && !_data.version)
|
|
6997
|
+
console.warn('传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数');
|
|
6998
|
+
const copyData = JSON.parse(JSON.stringify(serverData));
|
|
6999
|
+
const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
|
|
7000
|
+
const prevData = this.data;
|
|
7001
|
+
this.data = await formatData(_serverData);
|
|
7002
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
7003
|
+
this.hooks.emit('dataChange', this.data, prevData);
|
|
7004
|
+
if (state)
|
|
7005
|
+
this.updateState(state, userAction);
|
|
7006
|
+
this.render();
|
|
7066
7007
|
}
|
|
7067
7008
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
7068
7009
|
appendTo(wrapper) {
|
|
@@ -7110,10 +7051,8 @@ class Controller$1 extends Controller$4 {
|
|
|
7110
7051
|
return;
|
|
7111
7052
|
this.render();
|
|
7112
7053
|
}
|
|
7113
|
-
formatData(serverData) {
|
|
7114
|
-
return
|
|
7115
|
-
return yield formatData(serverData.data);
|
|
7116
|
-
});
|
|
7054
|
+
async formatData(serverData) {
|
|
7055
|
+
return await formatData(serverData.data);
|
|
7117
7056
|
}
|
|
7118
7057
|
updateState(state, userAction) {
|
|
7119
7058
|
const prevState = this.state;
|
|
@@ -7341,10 +7280,10 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
7341
7280
|
const defaultNorthRad = (_a = params.north_rad) !== null && _a !== void 0 ? _a : undefined;
|
|
7342
7281
|
// 局部状态
|
|
7343
7282
|
const state = {};
|
|
7344
|
-
const load = (data) =>
|
|
7345
|
-
var
|
|
7283
|
+
const load = async (data) => {
|
|
7284
|
+
var _a;
|
|
7346
7285
|
const fbxUrl = (data === null || data === void 0 ? void 0 : data.fbx_url) || defaultFbxUrl;
|
|
7347
|
-
const northRad = (
|
|
7286
|
+
const northRad = (_a = data === null || data === void 0 ? void 0 : data.north_rad) !== null && _a !== void 0 ? _a : defaultNorthRad;
|
|
7348
7287
|
if (typeof northRad !== 'number') {
|
|
7349
7288
|
throw new Error('"northRad"配置参数缺失:未配置指南针指向!');
|
|
7350
7289
|
}
|
|
@@ -7353,7 +7292,7 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
7353
7292
|
const zOffset = bounding.max.z - bounding.min.z;
|
|
7354
7293
|
const maxOffset = Math.max(xOffset, zOffset);
|
|
7355
7294
|
const fbxLoader = new FBXLoader();
|
|
7356
|
-
const object =
|
|
7295
|
+
const object = await fbxLoader.loadAsync(fbxUrl);
|
|
7357
7296
|
transfromToMeshBasicMaterial(object, {
|
|
7358
7297
|
transparent: true,
|
|
7359
7298
|
side: THREE.DoubleSide,
|
|
@@ -7367,7 +7306,7 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
7367
7306
|
bject3d2LocalMatrix(object, { position, rotation, scale });
|
|
7368
7307
|
state.object = object;
|
|
7369
7308
|
return true;
|
|
7370
|
-
}
|
|
7309
|
+
};
|
|
7371
7310
|
const onCameraUpdate = ({ latitude }) => {
|
|
7372
7311
|
if (!state.object)
|
|
7373
7312
|
return;
|
|
@@ -7437,25 +7376,25 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
|
|
|
7437
7376
|
const defaultRad = (_c = params.rad) !== null && _c !== void 0 ? _c : undefined;
|
|
7438
7377
|
const defaultFbxUrl = params.fbx_url || '//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx';
|
|
7439
7378
|
const mixers = [];
|
|
7440
|
-
const load = (data) =>
|
|
7441
|
-
var
|
|
7442
|
-
const position = (
|
|
7379
|
+
const load = async (data) => {
|
|
7380
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
7381
|
+
const position = (_a = data === null || data === void 0 ? void 0 : data.position) !== null && _a !== void 0 ? _a : defaultModelPosition;
|
|
7443
7382
|
if (!position)
|
|
7444
7383
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): position is undefined`);
|
|
7445
7384
|
const modelPosition = transformPositionToVector3(position);
|
|
7446
|
-
const rad = (
|
|
7447
|
-
const fbxUrl = (
|
|
7385
|
+
const rad = (_b = data === null || data === void 0 ? void 0 : data.rad) !== null && _b !== void 0 ? _b : defaultRad;
|
|
7386
|
+
const fbxUrl = (_c = data === null || data === void 0 ? void 0 : data.fbx_url) !== null && _c !== void 0 ? _c : defaultFbxUrl;
|
|
7448
7387
|
state.rad = rad;
|
|
7449
7388
|
if (rad === undefined)
|
|
7450
7389
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): rad is ${rad}`);
|
|
7451
7390
|
// 加载模型
|
|
7452
|
-
const object =
|
|
7391
|
+
const object = await new FBXLoader().loadAsync(fbxUrl);
|
|
7453
7392
|
// 设置位置
|
|
7454
7393
|
object.position.copy(modelPosition);
|
|
7455
7394
|
object.rotation.z = rad;
|
|
7456
7395
|
object.scale.set(0.8, 0.8, 0.8);
|
|
7457
7396
|
transfromToMeshBasicMaterial(object, { transparent: true, side: THREE.DoubleSide });
|
|
7458
|
-
const textMesh = (
|
|
7397
|
+
const textMesh = (_g = (_f = (_e = (_d = object.children) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.children) === null || _f === void 0 ? void 0 : _f[3]) === null || _g === void 0 ? void 0 : _g.clone();
|
|
7459
7398
|
if (!textMesh)
|
|
7460
7399
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): textMesh is ${textMesh}`);
|
|
7461
7400
|
textMesh.material = new MeshBasicMaterial({ transparent: true, map: createCanvasTextTexture('入户门') });
|
|
@@ -7463,7 +7402,7 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
|
|
|
7463
7402
|
object.children[0].add(textMesh);
|
|
7464
7403
|
state.object = object;
|
|
7465
7404
|
return true;
|
|
7466
|
-
}
|
|
7405
|
+
};
|
|
7467
7406
|
const initAnimation = () => {
|
|
7468
7407
|
if (state.animation)
|
|
7469
7408
|
return;
|
|
@@ -7700,21 +7639,21 @@ const getLongitudeParams = (from, to, rotation) => {
|
|
|
7700
7639
|
*/
|
|
7701
7640
|
const CameraMovementPlugin = (five) => {
|
|
7702
7641
|
const state = {};
|
|
7703
|
-
const move = (args, duration, opts = { preload: true }) =>
|
|
7642
|
+
const move = async (args, duration, opts = { preload: true }) => {
|
|
7704
7643
|
if (state.interruptCallback) {
|
|
7705
7644
|
state.interruptCallback(false);
|
|
7706
7645
|
}
|
|
7707
7646
|
if (opts.asyncStartCallback) {
|
|
7708
|
-
|
|
7647
|
+
await opts.asyncStartCallback();
|
|
7709
7648
|
}
|
|
7710
7649
|
if (args.mode && args.mode !== five.currentMode) {
|
|
7711
|
-
|
|
7650
|
+
await five.changeMode(args.mode);
|
|
7712
7651
|
}
|
|
7713
7652
|
if (opts.preload && args.panoIndex !== undefined && args.panoIndex !== five.panoIndex) {
|
|
7714
|
-
|
|
7653
|
+
await five.preloadPano(args.panoIndex);
|
|
7715
7654
|
}
|
|
7716
7655
|
if (opts.asyncEndCallback) {
|
|
7717
|
-
|
|
7656
|
+
await opts.asyncEndCallback();
|
|
7718
7657
|
}
|
|
7719
7658
|
if (args.panoIndex === undefined &&
|
|
7720
7659
|
args.fov === undefined &&
|
|
@@ -7722,7 +7661,7 @@ const CameraMovementPlugin = (five) => {
|
|
|
7722
7661
|
args.longitude === undefined) {
|
|
7723
7662
|
return true;
|
|
7724
7663
|
}
|
|
7725
|
-
return
|
|
7664
|
+
return await new Promise((resolve, reject) => {
|
|
7726
7665
|
const panoIndex = args.panoIndex !== undefined ? args.panoIndex : five.panoIndex;
|
|
7727
7666
|
if (panoIndex !== undefined) {
|
|
7728
7667
|
five.moveToPano(panoIndex, Object.assign({
|
|
@@ -7735,7 +7674,7 @@ const CameraMovementPlugin = (five) => {
|
|
|
7735
7674
|
reject(false);
|
|
7736
7675
|
}
|
|
7737
7676
|
});
|
|
7738
|
-
}
|
|
7677
|
+
};
|
|
7739
7678
|
const getAnimeParams = (args) => {
|
|
7740
7679
|
const currentFiveState = five.state;
|
|
7741
7680
|
// latitude
|
|
@@ -7751,20 +7690,20 @@ const CameraMovementPlugin = (five) => {
|
|
|
7751
7690
|
to: { latitude: toLatitude, longitude: toLongitude, fov: toFov },
|
|
7752
7691
|
};
|
|
7753
7692
|
};
|
|
7754
|
-
const rotate = (args, duration, opts = {}) =>
|
|
7693
|
+
const rotate = async (args, duration, opts = {}) => {
|
|
7755
7694
|
if (state.interruptCallback) {
|
|
7756
7695
|
state.interruptCallback(false);
|
|
7757
7696
|
}
|
|
7758
7697
|
if (opts.asyncStartCallback) {
|
|
7759
|
-
|
|
7698
|
+
await opts.asyncStartCallback();
|
|
7760
7699
|
}
|
|
7761
7700
|
if (five.currentMode !== Five.Mode.Panorama) {
|
|
7762
|
-
|
|
7701
|
+
await five.changeMode(Five.Mode.Panorama);
|
|
7763
7702
|
}
|
|
7764
7703
|
if (args.panoIndex !== undefined && args.panoIndex !== five.panoIndex) {
|
|
7765
7704
|
if (opts.preload)
|
|
7766
|
-
|
|
7767
|
-
|
|
7705
|
+
await five.preloadPano(args.panoIndex);
|
|
7706
|
+
await new Promise((resolve, reject) => {
|
|
7768
7707
|
if (!args.panoIndex) {
|
|
7769
7708
|
resolve(true);
|
|
7770
7709
|
return;
|
|
@@ -7776,10 +7715,10 @@ const CameraMovementPlugin = (five) => {
|
|
|
7776
7715
|
});
|
|
7777
7716
|
}
|
|
7778
7717
|
if (opts.asyncEndCallback) {
|
|
7779
|
-
|
|
7718
|
+
await opts.asyncEndCallback();
|
|
7780
7719
|
}
|
|
7781
7720
|
const { from, to } = getAnimeParams(args);
|
|
7782
|
-
return
|
|
7721
|
+
return await new Promise((resolve) => {
|
|
7783
7722
|
const onUpdate = ({ progress }) => {
|
|
7784
7723
|
const state = {};
|
|
7785
7724
|
state.longitude = progressNumber(from.longitude, to.longitude, progress);
|
|
@@ -7821,7 +7760,7 @@ const CameraMovementPlugin = (five) => {
|
|
|
7821
7760
|
state.interruptCallback(true);
|
|
7822
7761
|
}, duration);
|
|
7823
7762
|
});
|
|
7824
|
-
}
|
|
7763
|
+
};
|
|
7825
7764
|
return {
|
|
7826
7765
|
move,
|
|
7827
7766
|
rotate,
|
|
@@ -8023,7 +7962,7 @@ const PanoRulerStyle = `<style type="text/css">
|
|
|
8023
7962
|
</style>
|
|
8024
7963
|
`;
|
|
8025
7964
|
|
|
8026
|
-
const getDistance = (p1, p2) => {
|
|
7965
|
+
const getDistance$1 = (p1, p2) => {
|
|
8027
7966
|
return Math.sqrt(Math.pow(p1.z - p2.z, 2) + Math.pow(p1.x - p2.x, 2));
|
|
8028
7967
|
};
|
|
8029
7968
|
const getRoomHeightInfo = (roomInfo, five) => {
|
|
@@ -8130,7 +8069,7 @@ const PanoRulerPlugin = (five, params) => {
|
|
|
8130
8069
|
y: position.y,
|
|
8131
8070
|
z: position.z,
|
|
8132
8071
|
};
|
|
8133
|
-
const distance = getDistance({ x, z }, observerPoint);
|
|
8072
|
+
const distance = getDistance$1({ x, z }, observerPoint);
|
|
8134
8073
|
if (medianFloorHeight) {
|
|
8135
8074
|
// 取最近点时排除高度与房间平均高度差大于0.3米的点
|
|
8136
8075
|
if (distance < minDistance && Math.abs(observerPoint.y - medianFloorHeight) < 0.3) {
|
|
@@ -8181,7 +8120,7 @@ const PanoRulerPlugin = (five, params) => {
|
|
|
8181
8120
|
freshRule();
|
|
8182
8121
|
return true;
|
|
8183
8122
|
};
|
|
8184
|
-
const load = (_roomInfo, _roomRules, options) =>
|
|
8123
|
+
const load = async (_roomInfo, _roomRules, options) => {
|
|
8185
8124
|
const roomInfo = _roomInfo || params.roomInfo;
|
|
8186
8125
|
const roomRules = _roomRules || params.roomRules;
|
|
8187
8126
|
if (!roomInfo || !roomRules) {
|
|
@@ -8193,9 +8132,9 @@ const PanoRulerPlugin = (five, params) => {
|
|
|
8193
8132
|
return _load(roomInfo, roomRules);
|
|
8194
8133
|
}
|
|
8195
8134
|
else {
|
|
8196
|
-
return
|
|
8135
|
+
return await new Promise((resolve) => five.once('modelLoaded', () => resolve(_load(roomInfo, roomRules))));
|
|
8197
8136
|
}
|
|
8198
|
-
}
|
|
8137
|
+
};
|
|
8199
8138
|
if (params.roomInfo && params.roomRules) {
|
|
8200
8139
|
load(params.roomInfo, params.roomRules);
|
|
8201
8140
|
}
|
|
@@ -8412,7 +8351,7 @@ const PanoRulerPlugin = (five, params) => {
|
|
|
8412
8351
|
|
|
8413
8352
|
/* src/PanoRulerProPlugin/RulerItem.svelte generated by Svelte v3.49.0 */
|
|
8414
8353
|
|
|
8415
|
-
function add_css$
|
|
8354
|
+
function add_css$7(target) {
|
|
8416
8355
|
append_styles(target, "svelte-qy4ud2", ".PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;-webkit-animation:svelte-qy4ud2-viewport-rule-point 0.1s 1s;animation:svelte-qy4ud2-viewport-rule-point 0.1s 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;-webkit-animation:svelte-qy4ud2-viewport-rule-point 0.1s 1.5s;animation:svelte-qy4ud2-viewport-rule-point 0.1s 1.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-qy4ud2 em.svelte-qy4ud2{display:block;height:0.0625rem;-webkit-animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-qy4ud2.svelte-qy4ud2{display:flex;height:0.0625rem;-webkit-animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;align-items:center}.em-solid.svelte-qy4ud2.svelte-qy4ud2{height:100%;background:#ffffff}.em-dotted.svelte-qy4ud2.svelte-qy4ud2{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-qy4ud2.svelte-qy4ud2{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-qy4ud2.svelte-qy4ud2{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;-webkit-animation:svelte-qy4ud2-viewport-rule-label 0.25s ease 1s;animation:svelte-qy4ud2-viewport-rule-label 0.25s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@-webkit-keyframes svelte-qy4ud2-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-qy4ud2-viewport-rule-line{0%{width:0%}100%{width:100%}}@-webkit-keyframes svelte-qy4ud2-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-qy4ud2-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@-webkit-keyframes svelte-qy4ud2-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}@keyframes svelte-qy4ud2-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}");
|
|
8417
8356
|
}
|
|
8418
8357
|
|
|
@@ -8423,7 +8362,7 @@ function get_each_context$4(ctx, list, i) {
|
|
|
8423
8362
|
}
|
|
8424
8363
|
|
|
8425
8364
|
// (28:2) {:else}
|
|
8426
|
-
function create_else_block(ctx) {
|
|
8365
|
+
function create_else_block$1(ctx) {
|
|
8427
8366
|
let div;
|
|
8428
8367
|
let each_value = /*rulerItemProp*/ ctx[0].children;
|
|
8429
8368
|
let each_blocks = [];
|
|
@@ -8550,7 +8489,7 @@ function create_each_block$4(ctx) {
|
|
|
8550
8489
|
};
|
|
8551
8490
|
}
|
|
8552
8491
|
|
|
8553
|
-
function create_fragment$
|
|
8492
|
+
function create_fragment$8(ctx) {
|
|
8554
8493
|
let div2;
|
|
8555
8494
|
let t0;
|
|
8556
8495
|
let div1;
|
|
@@ -8566,7 +8505,7 @@ function create_fragment$7(ctx) {
|
|
|
8566
8505
|
|
|
8567
8506
|
function select_block_type(ctx, dirty) {
|
|
8568
8507
|
if (/*rulerItemProp*/ ctx[0].children.length === 0) return create_if_block$2;
|
|
8569
|
-
return create_else_block;
|
|
8508
|
+
return create_else_block$1;
|
|
8570
8509
|
}
|
|
8571
8510
|
|
|
8572
8511
|
let current_block_type = select_block_type(ctx);
|
|
@@ -8664,7 +8603,7 @@ function create_fragment$7(ctx) {
|
|
|
8664
8603
|
};
|
|
8665
8604
|
}
|
|
8666
8605
|
|
|
8667
|
-
function instance$
|
|
8606
|
+
function instance$8($$self, $$props, $$invalidate) {
|
|
8668
8607
|
let vars;
|
|
8669
8608
|
let { rulerItemProp } = $$props;
|
|
8670
8609
|
let _visible = true;
|
|
@@ -8699,7 +8638,7 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
|
8699
8638
|
class RulerItem extends SvelteComponent {
|
|
8700
8639
|
constructor(options) {
|
|
8701
8640
|
super();
|
|
8702
|
-
init(this, options, instance$
|
|
8641
|
+
init(this, options, instance$8, create_fragment$8, safe_not_equal, { rulerItemProp: 0 }, add_css$7);
|
|
8703
8642
|
}
|
|
8704
8643
|
}
|
|
8705
8644
|
|
|
@@ -8748,7 +8687,7 @@ function create_each_block$3(ctx) {
|
|
|
8748
8687
|
};
|
|
8749
8688
|
}
|
|
8750
8689
|
|
|
8751
|
-
function create_fragment$
|
|
8690
|
+
function create_fragment$7(ctx) {
|
|
8752
8691
|
let div;
|
|
8753
8692
|
let current;
|
|
8754
8693
|
let each_value = /*rulerItemProp*/ ctx[0];
|
|
@@ -8832,7 +8771,7 @@ function create_fragment$6(ctx) {
|
|
|
8832
8771
|
};
|
|
8833
8772
|
}
|
|
8834
8773
|
|
|
8835
|
-
function instance$
|
|
8774
|
+
function instance$7($$self, $$props, $$invalidate) {
|
|
8836
8775
|
var _a, _b, _c, _d;
|
|
8837
8776
|
let { five } = $$props;
|
|
8838
8777
|
let { rulerDatas } = $$props;
|
|
@@ -9050,7 +8989,7 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
9050
8989
|
class RulerItems extends SvelteComponent {
|
|
9051
8990
|
constructor(options) {
|
|
9052
8991
|
super();
|
|
9053
|
-
init(this, options, instance$
|
|
8992
|
+
init(this, options, instance$7, create_fragment$7, safe_not_equal, { five: 1, rulerDatas: 2, options: 3 });
|
|
9054
8993
|
}
|
|
9055
8994
|
}
|
|
9056
8995
|
|
|
@@ -9105,22 +9044,20 @@ class Controller {
|
|
|
9105
9044
|
if ((_a = params.options) === null || _a === void 0 ? void 0 : _a.className)
|
|
9106
9045
|
this.container.classList.add((_b = params.options) === null || _b === void 0 ? void 0 : _b.className);
|
|
9107
9046
|
}
|
|
9108
|
-
this.five.once('modelLoaded', () =>
|
|
9109
|
-
var
|
|
9110
|
-
(
|
|
9111
|
-
})
|
|
9047
|
+
this.five.once('modelLoaded', async () => {
|
|
9048
|
+
var _a, _b;
|
|
9049
|
+
(_b = (_a = this.five.getElement()) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.append(this.container);
|
|
9050
|
+
});
|
|
9112
9051
|
this.five.once('dispose', () => this.dispose());
|
|
9113
9052
|
}
|
|
9114
|
-
load(serverData) {
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
this.state.loaded = true;
|
|
9123
|
-
});
|
|
9053
|
+
async load(serverData) {
|
|
9054
|
+
if (!this.five.work)
|
|
9055
|
+
return;
|
|
9056
|
+
const data = serverData.data;
|
|
9057
|
+
if (!data)
|
|
9058
|
+
throw new Error('标尺数据依赖不齐全!');
|
|
9059
|
+
this.panoRulerProData = data;
|
|
9060
|
+
this.state.loaded = true;
|
|
9124
9061
|
}
|
|
9125
9062
|
enable() {
|
|
9126
9063
|
if (!this.state.loaded)
|
|
@@ -9138,26 +9075,24 @@ class Controller {
|
|
|
9138
9075
|
this.render();
|
|
9139
9076
|
return true;
|
|
9140
9077
|
}
|
|
9141
|
-
render() {
|
|
9078
|
+
async render() {
|
|
9142
9079
|
var _a;
|
|
9143
|
-
|
|
9144
|
-
if (this.
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
this.
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
}
|
|
9160
|
-
});
|
|
9080
|
+
if (this.state.enabled) {
|
|
9081
|
+
if (!this.panoRulerProData || !this.container)
|
|
9082
|
+
return;
|
|
9083
|
+
this.rulerItems = new RulerItems({
|
|
9084
|
+
target: this.container,
|
|
9085
|
+
props: {
|
|
9086
|
+
five: this.five,
|
|
9087
|
+
rulerDatas: this.panoRulerProData,
|
|
9088
|
+
options: this.state.options,
|
|
9089
|
+
},
|
|
9090
|
+
});
|
|
9091
|
+
}
|
|
9092
|
+
else {
|
|
9093
|
+
(_a = this.rulerItems) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
9094
|
+
this.rulerItems = undefined;
|
|
9095
|
+
}
|
|
9161
9096
|
}
|
|
9162
9097
|
dispose() {
|
|
9163
9098
|
if (this.container) {
|
|
@@ -9226,14 +9161,12 @@ function getRoomInfoInstance() {
|
|
|
9226
9161
|
}
|
|
9227
9162
|
|
|
9228
9163
|
const textureLoader = new THREE.TextureLoader();
|
|
9229
|
-
function loadTexture(url) {
|
|
9230
|
-
return
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
return texture;
|
|
9236
|
-
});
|
|
9164
|
+
async function loadTexture(url) {
|
|
9165
|
+
return new Promise((resolve, reject) => {
|
|
9166
|
+
textureLoader.load(url, resolve, undefined, reject);
|
|
9167
|
+
}).then((texture) => {
|
|
9168
|
+
texture.encoding = THREE.sRGBEncoding;
|
|
9169
|
+
return texture;
|
|
9237
9170
|
});
|
|
9238
9171
|
}
|
|
9239
9172
|
|
|
@@ -9295,7 +9228,7 @@ function tweenProgress(duration, easing = TWEEN__default.Easing.Linear.None) {
|
|
|
9295
9228
|
return tween;
|
|
9296
9229
|
}
|
|
9297
9230
|
|
|
9298
|
-
const defaultBaseOptions = { userAction: true };
|
|
9231
|
+
const defaultBaseOptions$1 = { userAction: true };
|
|
9299
9232
|
class PanoCompassController extends Controller$4 {
|
|
9300
9233
|
constructor(five, config) {
|
|
9301
9234
|
super(five);
|
|
@@ -9582,7 +9515,7 @@ class PanoCompassController extends Controller$4 {
|
|
|
9582
9515
|
* 启用插件,响应用户操作并展示UI
|
|
9583
9516
|
* @param options
|
|
9584
9517
|
*/
|
|
9585
|
-
enable(options = defaultBaseOptions) {
|
|
9518
|
+
enable(options = defaultBaseOptions$1) {
|
|
9586
9519
|
this.setState({
|
|
9587
9520
|
enabled: true,
|
|
9588
9521
|
}, options);
|
|
@@ -9591,7 +9524,7 @@ class PanoCompassController extends Controller$4 {
|
|
|
9591
9524
|
* 禁用插件,禁止响应用户操作并隐藏UI
|
|
9592
9525
|
* @param options
|
|
9593
9526
|
*/
|
|
9594
|
-
disable(options = defaultBaseOptions) {
|
|
9527
|
+
disable(options = defaultBaseOptions$1) {
|
|
9595
9528
|
this.setState({
|
|
9596
9529
|
enabled: false,
|
|
9597
9530
|
}, options);
|
|
@@ -9602,7 +9535,7 @@ class PanoCompassController extends Controller$4 {
|
|
|
9602
9535
|
* @returns
|
|
9603
9536
|
* @todo 需要考虑动画
|
|
9604
9537
|
*/
|
|
9605
|
-
show(options = defaultBaseOptions) {
|
|
9538
|
+
show(options = defaultBaseOptions$1) {
|
|
9606
9539
|
if (!this.state.enabled)
|
|
9607
9540
|
return;
|
|
9608
9541
|
this.setState({
|
|
@@ -9616,7 +9549,7 @@ class PanoCompassController extends Controller$4 {
|
|
|
9616
9549
|
* @returns
|
|
9617
9550
|
* @todo 需要考虑动画
|
|
9618
9551
|
*/
|
|
9619
|
-
hide(options = defaultBaseOptions) {
|
|
9552
|
+
hide(options = defaultBaseOptions$1) {
|
|
9620
9553
|
if (!this.state.enabled)
|
|
9621
9554
|
return;
|
|
9622
9555
|
this.setState({
|
|
@@ -9660,19 +9593,17 @@ class PanoCompassController extends Controller$4 {
|
|
|
9660
9593
|
this.init();
|
|
9661
9594
|
}
|
|
9662
9595
|
}
|
|
9663
|
-
load(data, state, userAction = true) {
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
this.setState(state, { userAction });
|
|
9672
|
-
}
|
|
9673
|
-
this.hooks.emit('dataLoaded', this.data);
|
|
9596
|
+
async load(data, state, userAction = true) {
|
|
9597
|
+
const nextData = await this.formatData(data);
|
|
9598
|
+
if (JSON.stringify(this.data) !== JSON.stringify(nextData)) {
|
|
9599
|
+
this.hooks.emit('dataChange', nextData, this.data);
|
|
9600
|
+
this.data = Object.assign({}, nextData);
|
|
9601
|
+
this.init();
|
|
9602
|
+
if (state) {
|
|
9603
|
+
this.setState(state, { userAction });
|
|
9674
9604
|
}
|
|
9675
|
-
|
|
9605
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
9606
|
+
}
|
|
9676
9607
|
}
|
|
9677
9608
|
formatData(serverData) {
|
|
9678
9609
|
if (serverData.version && serverData.data) {
|
|
@@ -9686,64 +9617,58 @@ class PanoCompassController extends Controller$4 {
|
|
|
9686
9617
|
* 初始化
|
|
9687
9618
|
* @todo 逻辑需要细分
|
|
9688
9619
|
*/
|
|
9689
|
-
init() {
|
|
9620
|
+
async init() {
|
|
9690
9621
|
var _a, _b, _c, _d;
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
|
|
9709
|
-
}
|
|
9710
|
-
this.group.add(this.entryDoorMesh);
|
|
9622
|
+
const northRad = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.north_rad) !== null && _b !== void 0 ? _b : null;
|
|
9623
|
+
this._clearCompassIfNeed();
|
|
9624
|
+
if (northRad !== null) {
|
|
9625
|
+
this.compassMesh = await this.loadCompassMesh();
|
|
9626
|
+
this.compassMesh.rotateX(-Math.PI / 2);
|
|
9627
|
+
this.compassMesh.rotateZ(northRad - Math.PI / 2);
|
|
9628
|
+
this.group.add(this.compassMesh);
|
|
9629
|
+
}
|
|
9630
|
+
const entrance = (_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c.entrance) !== null && _d !== void 0 ? _d : null;
|
|
9631
|
+
this._clearEntryDoorIfNeed();
|
|
9632
|
+
if (entrance !== null) {
|
|
9633
|
+
this.entryDoorMesh = await this.loadEntryDoorMesh();
|
|
9634
|
+
this.roomInfoWrapperInstance = this.loadRoomInfo();
|
|
9635
|
+
this.roomInfoInstance = getRoomInfoInstance();
|
|
9636
|
+
this.entryDoorMesh.rotateX(-Math.PI / 2);
|
|
9637
|
+
if (this.roomInfoWrapperInstance) {
|
|
9638
|
+
this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
|
|
9711
9639
|
}
|
|
9712
|
-
this.
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
opacity: 0.8,
|
|
9741
|
-
depthTest: false,
|
|
9742
|
-
});
|
|
9743
|
-
const entryDoorMesh = new THREE.Mesh(entryDoorGeometry, entryDoorMaterial);
|
|
9744
|
-
entryDoorMesh.name = 'pano-compass-entry-door';
|
|
9745
|
-
return entryDoorMesh;
|
|
9640
|
+
this.group.add(this.entryDoorMesh);
|
|
9641
|
+
}
|
|
9642
|
+
this.onFivePanoArrived(this.five.panoIndex || 0);
|
|
9643
|
+
this.five.needsRender = true;
|
|
9644
|
+
}
|
|
9645
|
+
async loadCompassMesh() {
|
|
9646
|
+
const compassImageUrl = this.state.config.compassImageUrl;
|
|
9647
|
+
const compassTexture = await loadTexture(compassImageUrl);
|
|
9648
|
+
const compassGeometry = new THREE.CircleGeometry(0.7, 32);
|
|
9649
|
+
const compassMaterial = new THREE.MeshBasicMaterial({
|
|
9650
|
+
map: compassTexture,
|
|
9651
|
+
transparent: true,
|
|
9652
|
+
opacity: 0,
|
|
9653
|
+
depthTest: false,
|
|
9654
|
+
});
|
|
9655
|
+
const compassMesh = new THREE.Mesh(compassGeometry, compassMaterial);
|
|
9656
|
+
compassMesh.name = 'pano-compass-mesh';
|
|
9657
|
+
return compassMesh;
|
|
9658
|
+
}
|
|
9659
|
+
async loadEntryDoorMesh() {
|
|
9660
|
+
const entryDoorImageUrl = this.state.config.entryDoorImageUrl;
|
|
9661
|
+
const entryDoorTexture = await loadTexture(entryDoorImageUrl);
|
|
9662
|
+
const entryDoorGeometry = new THREE.PlaneGeometry(0.2, 0.16);
|
|
9663
|
+
const entryDoorMaterial = new THREE.MeshBasicMaterial({
|
|
9664
|
+
map: entryDoorTexture,
|
|
9665
|
+
transparent: true,
|
|
9666
|
+
opacity: 0.8,
|
|
9667
|
+
depthTest: false,
|
|
9746
9668
|
});
|
|
9669
|
+
const entryDoorMesh = new THREE.Mesh(entryDoorGeometry, entryDoorMaterial);
|
|
9670
|
+
entryDoorMesh.name = 'pano-compass-entry-door';
|
|
9671
|
+
return entryDoorMesh;
|
|
9747
9672
|
}
|
|
9748
9673
|
loadRoomInfo() {
|
|
9749
9674
|
const points = [
|
|
@@ -13797,7 +13722,7 @@ const currentTarget = writable(null);
|
|
|
13797
13722
|
|
|
13798
13723
|
/* src/PanoSpatialTagPlugin/Components/origins.svelte generated by Svelte v3.49.0 */
|
|
13799
13724
|
|
|
13800
|
-
function add_css$
|
|
13725
|
+
function add_css$6(target) {
|
|
13801
13726
|
append_styles(target, "svelte-1kuu68s", ".PanoSpatialTagPlugin__tag-origin.svelte-1kuu68s{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;-webkit-animation:svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin 1.2s forwards;animation:svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-1kuu68s:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-1kuu68s{transform:translate(-50%, -50%) scale(0.6);-webkit-animation:svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s;animation:svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@-webkit-keyframes svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@-webkit-keyframes svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}@keyframes svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}");
|
|
13802
13727
|
}
|
|
13803
13728
|
|
|
@@ -13864,7 +13789,7 @@ function create_each_block$2(ctx) {
|
|
|
13864
13789
|
};
|
|
13865
13790
|
}
|
|
13866
13791
|
|
|
13867
|
-
function create_fragment$
|
|
13792
|
+
function create_fragment$6(ctx) {
|
|
13868
13793
|
let each_1_anchor;
|
|
13869
13794
|
let each_value = /*origins*/ ctx[0];
|
|
13870
13795
|
let each_blocks = [];
|
|
@@ -13921,7 +13846,7 @@ function create_fragment$5(ctx) {
|
|
|
13921
13846
|
};
|
|
13922
13847
|
}
|
|
13923
13848
|
|
|
13924
|
-
function instance$
|
|
13849
|
+
function instance$6($$self, $$props, $$invalidate) {
|
|
13925
13850
|
let { origins } = $$props;
|
|
13926
13851
|
|
|
13927
13852
|
const handleClick = id => {
|
|
@@ -13940,17 +13865,17 @@ function instance$5($$self, $$props, $$invalidate) {
|
|
|
13940
13865
|
class Origins extends SvelteComponent {
|
|
13941
13866
|
constructor(options) {
|
|
13942
13867
|
super();
|
|
13943
|
-
init(this, options, instance$
|
|
13868
|
+
init(this, options, instance$6, create_fragment$6, safe_not_equal, { origins: 0 }, add_css$6);
|
|
13944
13869
|
}
|
|
13945
13870
|
}
|
|
13946
13871
|
|
|
13947
13872
|
/* src/PanoSpatialTagPlugin/Components/tag.svelte generated by Svelte v3.49.0 */
|
|
13948
13873
|
|
|
13949
|
-
function add_css$
|
|
13874
|
+
function add_css$5(target) {
|
|
13950
13875
|
append_styles(target, "svelte-eb8bdm", ".PanoSpatialTagPlugin__tag-x.svelte-eb8bdm.svelte-eb8bdm{position:absolute;top:0;left:0;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#FFF;transform:translate(0, -100%);transition:height .5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-eb8bdm.svelte-eb8bdm{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity .8s .6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-eb8bdm.svelte-eb8bdm{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-eb8bdm.svelte-eb8bdm{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, .1));box-shadow:0 .1rem .5rem rgba(0, 0, 0, .2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .4s cubic-bezier(.44,.44,.74,.98) , opacity .4s cubic-bezier(.44,.44,.74,.98), width .5s linear, height .5s linear ;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-eb8bdm.svelte-eb8bdm{position:absolute;top:0;left:0.3rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-eb8bdm.svelte-eb8bdm{position:absolute;top:0;left:0.5rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-eb8bdm .PanoSpatialTagPlugin__tag-line1.svelte-eb8bdm{-webkit-animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s;animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-eb8bdm .PanoSpatialTagPlugin__tag-line2.svelte-eb8bdm{-webkit-animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s;animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-eb8bdm.svelte-eb8bdm{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-eb8bdm .PanoSpatialTagPlugin__tag-line.svelte-eb8bdm{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-eb8bdm.svelte-eb8bdm{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-eb8bdm .PanoSpatialTagPlugin__tag-animate.svelte-eb8bdm{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-eb8bdm.svelte-eb8bdm{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform .9s cubic-bezier(0,.65,.16,1.08) .6s;padding-left:.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-eb8bdm .PanoSpatialTagPlugin__tag-content.svelte-eb8bdm{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-eb8bdm .PanoSpatialTagPlugin__tag-flagpole.svelte-eb8bdm{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-eb8bdm .PanoSpatialTagPlugin__tag-shadow.svelte-eb8bdm{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-eb8bdm .PanoSpatialTagPlugin__tag-shadow.svelte-eb8bdm{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-eb8bdm .PanoSpatialTagPlugin__tag-content.svelte-eb8bdm{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-flagpole.svelte-eb8bdm{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-shadow.svelte-eb8bdm{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-content.svelte-eb8bdm{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-content .svelte-eb8bdm{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-line1.svelte-eb8bdm{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);-webkit-animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s;animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-line2.svelte-eb8bdm{opacity:0.5;transform:translate(-50%, 0) scaleY(0);-webkit-animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s;animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@-webkit-keyframes svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@-webkit-keyframes svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@-webkit-keyframes svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@-webkit-keyframes svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}");
|
|
13951
13876
|
}
|
|
13952
13877
|
|
|
13953
|
-
function create_fragment$
|
|
13878
|
+
function create_fragment$5(ctx) {
|
|
13954
13879
|
let div4;
|
|
13955
13880
|
let div0;
|
|
13956
13881
|
let t0;
|
|
@@ -14065,7 +13990,7 @@ function create_fragment$4(ctx) {
|
|
|
14065
13990
|
};
|
|
14066
13991
|
}
|
|
14067
13992
|
|
|
14068
|
-
function instance$
|
|
13993
|
+
function instance$5($$self, $$props, $$invalidate) {
|
|
14069
13994
|
let { id } = $$props;
|
|
14070
13995
|
let { upsideDown } = $$props;
|
|
14071
13996
|
let { content } = $$props;
|
|
@@ -14202,8 +14127,8 @@ class Tag extends SvelteComponent {
|
|
|
14202
14127
|
init(
|
|
14203
14128
|
this,
|
|
14204
14129
|
options,
|
|
14205
|
-
instance$
|
|
14206
|
-
create_fragment$
|
|
14130
|
+
instance$5,
|
|
14131
|
+
create_fragment$5,
|
|
14207
14132
|
safe_not_equal,
|
|
14208
14133
|
{
|
|
14209
14134
|
id: 0,
|
|
@@ -14218,7 +14143,7 @@ class Tag extends SvelteComponent {
|
|
|
14218
14143
|
events: 14,
|
|
14219
14144
|
hooks: 15
|
|
14220
14145
|
},
|
|
14221
|
-
add_css$
|
|
14146
|
+
add_css$5
|
|
14222
14147
|
);
|
|
14223
14148
|
}
|
|
14224
14149
|
}
|
|
@@ -14872,11 +14797,11 @@ var DISPLAY_STRATEGY_TYPE;
|
|
|
14872
14797
|
|
|
14873
14798
|
/* src/ModelItemLabelPlugin/ItemLabelItem.svelte generated by Svelte v3.49.0 */
|
|
14874
14799
|
|
|
14875
|
-
function add_css$
|
|
14800
|
+
function add_css$4(target) {
|
|
14876
14801
|
append_styles(target, "svelte-n1c1kg", ".item-label-item.svelte-n1c1kg{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:0}.item-label-item.visible.svelte-n1c1kg{opacity:1;-webkit-animation:svelte-n1c1kg-fadeIn .3s ease-in;animation:svelte-n1c1kg-fadeIn .3s ease-in}.item-label-item__text-wrap.svelte-n1c1kg::before{content:'';position:absolute;width:100%;height:100%;background-color:rgba(0, 0, 0, .3);filter:blur(0.83333rem);z-index:-1}.item-label-item__text-wrap.svelte-n1c1kg{padding:0.3125rem 0.3125rem 0;position:absolute;height:1.04167rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap;line-height:0.52083rem;font-size:0.57292rem;font-weight:bold;color:#FFEAC0;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center}.item-label-item__text.svelte-n1c1kg{padding-bottom:0.20833rem;border-top:0 solid;border-left:0 solid;border-right:0 solid;border-bottom:1px solid;-o-border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5;border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5}.item-label-item__bar.svelte-n1c1kg{position:absolute;bottom:0;width:1px;background-image:linear-gradient(to bottom, rgba(234, 208, 154, 0), rgba(234, 208, 154, 1))}@-webkit-keyframes svelte-n1c1kg-fadeIn{from{opacity:0\n }to{opacity:1\n }}@keyframes svelte-n1c1kg-fadeIn{from{opacity:0\n }to{opacity:1\n }}");
|
|
14877
14802
|
}
|
|
14878
14803
|
|
|
14879
|
-
function create_fragment$
|
|
14804
|
+
function create_fragment$4(ctx) {
|
|
14880
14805
|
let div2;
|
|
14881
14806
|
let div0;
|
|
14882
14807
|
let span;
|
|
@@ -14957,7 +14882,7 @@ function create_fragment$3(ctx) {
|
|
|
14957
14882
|
};
|
|
14958
14883
|
}
|
|
14959
14884
|
|
|
14960
|
-
function instance$
|
|
14885
|
+
function instance$4($$self, $$props, $$invalidate) {
|
|
14961
14886
|
let { itemLabel } = $$props;
|
|
14962
14887
|
let { hooks } = $$props;
|
|
14963
14888
|
|
|
@@ -14977,7 +14902,7 @@ function instance$3($$self, $$props, $$invalidate) {
|
|
|
14977
14902
|
class ItemLabelItem$1 extends SvelteComponent {
|
|
14978
14903
|
constructor(options) {
|
|
14979
14904
|
super();
|
|
14980
|
-
init(this, options, instance$
|
|
14905
|
+
init(this, options, instance$4, create_fragment$4, safe_not_equal, { itemLabel: 0, hooks: 2 }, add_css$4);
|
|
14981
14906
|
}
|
|
14982
14907
|
}
|
|
14983
14908
|
|
|
@@ -14998,7 +14923,7 @@ function debounce(func, wait = 200) {
|
|
|
14998
14923
|
|
|
14999
14924
|
/* src/ModelItemLabelPlugin/ItemLabelComponent.svelte generated by Svelte v3.49.0 */
|
|
15000
14925
|
|
|
15001
|
-
function add_css$
|
|
14926
|
+
function add_css$3(target) {
|
|
15002
14927
|
append_styles(target, "svelte-gk8s47", ".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}");
|
|
15003
14928
|
}
|
|
15004
14929
|
|
|
@@ -15057,7 +14982,7 @@ function create_each_block$1(key_1, ctx) {
|
|
|
15057
14982
|
};
|
|
15058
14983
|
}
|
|
15059
14984
|
|
|
15060
|
-
function create_fragment$
|
|
14985
|
+
function create_fragment$3(ctx) {
|
|
15061
14986
|
let div;
|
|
15062
14987
|
let each_blocks = [];
|
|
15063
14988
|
let each_1_lookup = new Map();
|
|
@@ -15137,7 +15062,7 @@ function create_fragment$2(ctx) {
|
|
|
15137
15062
|
let cssHeight = 26;
|
|
15138
15063
|
let basicWidth$1 = 11;
|
|
15139
15064
|
|
|
15140
|
-
function instance$
|
|
15065
|
+
function instance$3($$self, $$props, $$invalidate) {
|
|
15141
15066
|
const { Raycaster, Vector3 } = THREE;
|
|
15142
15067
|
let { five } = $$props;
|
|
15143
15068
|
let { modelOcclusionEnable } = $$props;
|
|
@@ -15339,8 +15264,8 @@ class ItemLabelComponent$1 extends SvelteComponent {
|
|
|
15339
15264
|
init(
|
|
15340
15265
|
this,
|
|
15341
15266
|
options,
|
|
15342
|
-
instance$
|
|
15343
|
-
create_fragment$
|
|
15267
|
+
instance$3,
|
|
15268
|
+
create_fragment$3,
|
|
15344
15269
|
safe_not_equal,
|
|
15345
15270
|
{
|
|
15346
15271
|
five: 5,
|
|
@@ -15349,7 +15274,7 @@ class ItemLabelComponent$1 extends SvelteComponent {
|
|
|
15349
15274
|
hooks: 0,
|
|
15350
15275
|
displayStrategyType: 8
|
|
15351
15276
|
},
|
|
15352
|
-
add_css$
|
|
15277
|
+
add_css$3
|
|
15353
15278
|
);
|
|
15354
15279
|
}
|
|
15355
15280
|
}
|
|
@@ -15653,7 +15578,7 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
|
|
|
15653
15578
|
xhr.send();
|
|
15654
15579
|
});
|
|
15655
15580
|
};
|
|
15656
|
-
const load = (data, videoElement) =>
|
|
15581
|
+
const load = async (data, videoElement) => {
|
|
15657
15582
|
const { video_src, video_poster_src, points } = data;
|
|
15658
15583
|
state.videoSource = video_src;
|
|
15659
15584
|
// TODO 存疑,先处理多一次遍历 o(2n)
|
|
@@ -15663,11 +15588,11 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
|
|
|
15663
15588
|
if (videoElement) {
|
|
15664
15589
|
state.videoElement = videoElement;
|
|
15665
15590
|
}
|
|
15666
|
-
state.videoTexture =
|
|
15591
|
+
state.videoTexture = await getVideoTexture(state.videoSource, state.videoElement);
|
|
15667
15592
|
state.enabled = !!data.enable;
|
|
15668
15593
|
if (state.enabled)
|
|
15669
15594
|
enable();
|
|
15670
|
-
}
|
|
15595
|
+
};
|
|
15671
15596
|
const dispose = () => {
|
|
15672
15597
|
disable();
|
|
15673
15598
|
state.videoTexture = undefined;
|
|
@@ -15763,12 +15688,94 @@ var ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE;
|
|
|
15763
15688
|
|
|
15764
15689
|
/* src/ItemLabelPlugin/ItemLabelItem.svelte generated by Svelte v3.49.0 */
|
|
15765
15690
|
|
|
15766
|
-
function add_css$
|
|
15767
|
-
append_styles(target, "svelte-
|
|
15691
|
+
function add_css$2(target) {
|
|
15692
|
+
append_styles(target, "svelte-6b32dy", ".item-label-item.svelte-6b32dy.svelte-6b32dy{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-animation:svelte-6b32dy-fadeIn .3s ease-in;animation:svelte-6b32dy-fadeIn .3s ease-in}.item-label-item.fold.svelte-6b32dy>.item-label-item__text-wrap.svelte-6b32dy{visibility:hidden}.item-label-item.fold.svelte-6b32dy>.item-label-item__bar.anchor.svelte-6b32dy{visibility:hidden}.item-label-item.fold.svelte-6b32dy>.item-label-item__bar.anchor.svelte-6b32dy:after{visibility:visible}.item-label-item__text-wrap.svelte-6b32dy.svelte-6b32dy{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:0.625rem 1.04167rem 0.625rem 0.625rem;position:absolute;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:24.63542rem;min-height:4.79167rem;background-image:linear-gradient(269deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.60) 49%, rgba(31, 38, 46, 0.70) 100%);border:1.5px solid rgba(255, 255, 255, .65);border-radius:0.15625rem;color:white;transform:translate(-50%, 0);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;overflow:hidden;pointer-events:all}.item-label-item__custom.svelte-6b32dy.svelte-6b32dy{padding:0.625rem;max-width:unset;min-height:unset}.icon-wrap.svelte-6b32dy.svelte-6b32dy{width:3.54167rem;height:100%;display:flex;justify-content:center;align-content:center}.icon.svelte-6b32dy.svelte-6b32dy{width:3.54167rem;height:3.54167rem;background-repeat:no-repeat;background-size:contain;background-position:center}.item-label-text.svelte-6b32dy.svelte-6b32dy{margin-left:0.625rem;padding-left:0.625rem;min-height:3.54167rem;height:auto;display:flex;flex-flow:column;justify-content:space-around;align-content:flex-start;border-left:solid rgba(255, 255, 255, .2) 1px;border-top:solid rgba(255, 255, 255, .2) 0;border-right:solid rgba(255, 255, 255, .2) 0;border-bottom:solid rgba(255, 255, 255, .2) 0;pointer-events:auto}.item-model.svelte-6b32dy.svelte-6b32dy{white-space:nowrap;font-size:1.14583rem;font-weight:bold;line-height:1.5625rem}.item-name.svelte-6b32dy.svelte-6b32dy{height:auto;word-wrap:break-word;word-break:break-all;font-size:1.04167rem;line-height:1.45833rem}.item-label-item__bar.svelte-6b32dy.svelte-6b32dy{position:absolute;bottom:0;width:0.15625rem;background-image:linear-gradient(to bottom, white, rgba(255, 255, 255, 0));box-shadow:0 2px 0.41667rem 0 rgba(0, 0, 0, 0.20);pointer-events:none}.item-label-item__bar.anchor.svelte-6b32dy.svelte-6b32dy:after{content:'';position:absolute;bottom:0;width:1.25rem;height:1.25rem;background-image:url(\"//vrlab-public.ljcdn.com/common/file/web/67e7a198-28c9-47dc-879b-507bd3ae600c.png \");background-position:center;background-size:contain;transform:translate(-0.54688rem, 50%)}@-webkit-keyframes svelte-6b32dy-fadeIn{from{opacity:0\n }to{opacity:1\n }}@keyframes svelte-6b32dy-fadeIn{from{opacity:0\n }to{opacity:1\n }}");
|
|
15693
|
+
}
|
|
15694
|
+
|
|
15695
|
+
// (34:8) {:else}
|
|
15696
|
+
function create_else_block(ctx) {
|
|
15697
|
+
let t0;
|
|
15698
|
+
let div;
|
|
15699
|
+
let span0;
|
|
15700
|
+
let t1_value = (/*itemLabel*/ ctx[0].code || /*itemLabel*/ ctx[0].id) + "";
|
|
15701
|
+
let t1;
|
|
15702
|
+
let t2;
|
|
15703
|
+
let span1;
|
|
15704
|
+
let t3_value = /*itemLabel*/ ctx[0].name + "";
|
|
15705
|
+
let t3;
|
|
15706
|
+
let if_block = /*itemLabel*/ ctx[0].icon && create_if_block_1(ctx);
|
|
15707
|
+
|
|
15708
|
+
return {
|
|
15709
|
+
c() {
|
|
15710
|
+
if (if_block) if_block.c();
|
|
15711
|
+
t0 = space();
|
|
15712
|
+
div = element("div");
|
|
15713
|
+
span0 = element("span");
|
|
15714
|
+
t1 = text(t1_value);
|
|
15715
|
+
t2 = space();
|
|
15716
|
+
span1 = element("span");
|
|
15717
|
+
t3 = text(t3_value);
|
|
15718
|
+
attr(span0, "class", "item-model svelte-6b32dy");
|
|
15719
|
+
attr(span1, "class", "item-name svelte-6b32dy");
|
|
15720
|
+
attr(div, "class", "item-label-text svelte-6b32dy");
|
|
15721
|
+
},
|
|
15722
|
+
m(target, anchor) {
|
|
15723
|
+
if (if_block) if_block.m(target, anchor);
|
|
15724
|
+
insert(target, t0, anchor);
|
|
15725
|
+
insert(target, div, anchor);
|
|
15726
|
+
append(div, span0);
|
|
15727
|
+
append(span0, t1);
|
|
15728
|
+
append(div, t2);
|
|
15729
|
+
append(div, span1);
|
|
15730
|
+
append(span1, t3);
|
|
15731
|
+
},
|
|
15732
|
+
p(ctx, dirty) {
|
|
15733
|
+
if (/*itemLabel*/ ctx[0].icon) {
|
|
15734
|
+
if (if_block) {
|
|
15735
|
+
if_block.p(ctx, dirty);
|
|
15736
|
+
} else {
|
|
15737
|
+
if_block = create_if_block_1(ctx);
|
|
15738
|
+
if_block.c();
|
|
15739
|
+
if_block.m(t0.parentNode, t0);
|
|
15740
|
+
}
|
|
15741
|
+
} else if (if_block) {
|
|
15742
|
+
if_block.d(1);
|
|
15743
|
+
if_block = null;
|
|
15744
|
+
}
|
|
15745
|
+
|
|
15746
|
+
if (dirty & /*itemLabel*/ 1 && t1_value !== (t1_value = (/*itemLabel*/ ctx[0].code || /*itemLabel*/ ctx[0].id) + "")) set_data(t1, t1_value);
|
|
15747
|
+
if (dirty & /*itemLabel*/ 1 && t3_value !== (t3_value = /*itemLabel*/ ctx[0].name + "")) set_data(t3, t3_value);
|
|
15748
|
+
},
|
|
15749
|
+
d(detaching) {
|
|
15750
|
+
if (if_block) if_block.d(detaching);
|
|
15751
|
+
if (detaching) detach(t0);
|
|
15752
|
+
if (detaching) detach(div);
|
|
15753
|
+
}
|
|
15754
|
+
};
|
|
15768
15755
|
}
|
|
15769
15756
|
|
|
15770
|
-
// (
|
|
15757
|
+
// (32:8) {#if Boolean(typeof itemLabel.render === 'function')}
|
|
15771
15758
|
function create_if_block$1(ctx) {
|
|
15759
|
+
let div;
|
|
15760
|
+
|
|
15761
|
+
return {
|
|
15762
|
+
c() {
|
|
15763
|
+
div = element("div");
|
|
15764
|
+
},
|
|
15765
|
+
m(target, anchor) {
|
|
15766
|
+
insert(target, div, anchor);
|
|
15767
|
+
/*div_binding*/ ctx[6](div);
|
|
15768
|
+
},
|
|
15769
|
+
p: noop$1,
|
|
15770
|
+
d(detaching) {
|
|
15771
|
+
if (detaching) detach(div);
|
|
15772
|
+
/*div_binding*/ ctx[6](null);
|
|
15773
|
+
}
|
|
15774
|
+
};
|
|
15775
|
+
}
|
|
15776
|
+
|
|
15777
|
+
// (35:12) {#if itemLabel.icon}
|
|
15778
|
+
function create_if_block_1(ctx) {
|
|
15772
15779
|
let div1;
|
|
15773
15780
|
let div0;
|
|
15774
15781
|
let div0_style_value;
|
|
@@ -15779,16 +15786,16 @@ function create_if_block$1(ctx) {
|
|
|
15779
15786
|
c() {
|
|
15780
15787
|
div1 = element("div");
|
|
15781
15788
|
div0 = element("div");
|
|
15782
|
-
attr(div0, "class", "icon svelte-
|
|
15789
|
+
attr(div0, "class", "icon svelte-6b32dy");
|
|
15783
15790
|
attr(div0, "style", div0_style_value = `background-image: url(${/*itemLabel*/ ctx[0].icon})`);
|
|
15784
|
-
attr(div1, "class", "icon-wrap svelte-
|
|
15791
|
+
attr(div1, "class", "icon-wrap svelte-6b32dy");
|
|
15785
15792
|
},
|
|
15786
15793
|
m(target, anchor) {
|
|
15787
15794
|
insert(target, div1, anchor);
|
|
15788
15795
|
append(div1, div0);
|
|
15789
15796
|
|
|
15790
15797
|
if (!mounted) {
|
|
15791
|
-
dispose = listen(div1, "click", /*click_handler*/ ctx[
|
|
15798
|
+
dispose = listen(div1, "click", /*click_handler*/ ctx[7]);
|
|
15792
15799
|
mounted = true;
|
|
15793
15800
|
}
|
|
15794
15801
|
},
|
|
@@ -15805,123 +15812,114 @@ function create_if_block$1(ctx) {
|
|
|
15805
15812
|
};
|
|
15806
15813
|
}
|
|
15807
15814
|
|
|
15808
|
-
function create_fragment$
|
|
15809
|
-
let div3;
|
|
15810
|
-
let div1;
|
|
15811
|
-
let t0;
|
|
15812
|
-
let div0;
|
|
15813
|
-
let span0;
|
|
15814
|
-
let t1_value = (/*itemLabel*/ ctx[0].code || /*itemLabel*/ ctx[0].id) + "";
|
|
15815
|
-
let t1;
|
|
15816
|
-
let t2;
|
|
15817
|
-
let span1;
|
|
15818
|
-
let t3_value = /*itemLabel*/ ctx[0].name + "";
|
|
15819
|
-
let t3;
|
|
15820
|
-
let t4;
|
|
15815
|
+
function create_fragment$2(ctx) {
|
|
15821
15816
|
let div2;
|
|
15817
|
+
let div0;
|
|
15818
|
+
let show_if;
|
|
15819
|
+
let div0_class_value;
|
|
15820
|
+
let t;
|
|
15821
|
+
let div1;
|
|
15822
|
+
let div1_class_value;
|
|
15822
15823
|
let div2_class_value;
|
|
15823
|
-
let div3_class_value;
|
|
15824
15824
|
let mounted;
|
|
15825
15825
|
let dispose;
|
|
15826
|
-
|
|
15826
|
+
|
|
15827
|
+
function select_block_type(ctx, dirty) {
|
|
15828
|
+
if (dirty & /*itemLabel*/ 1) show_if = null;
|
|
15829
|
+
if (show_if == null) show_if = !!Boolean(typeof /*itemLabel*/ ctx[0].render === 'function');
|
|
15830
|
+
if (show_if) return create_if_block$1;
|
|
15831
|
+
return create_else_block;
|
|
15832
|
+
}
|
|
15833
|
+
|
|
15834
|
+
let current_block_type = select_block_type(ctx, -1);
|
|
15835
|
+
let if_block = current_block_type(ctx);
|
|
15827
15836
|
|
|
15828
15837
|
return {
|
|
15829
15838
|
c() {
|
|
15830
|
-
div3 = element("div");
|
|
15831
|
-
div1 = element("div");
|
|
15832
|
-
if (if_block) if_block.c();
|
|
15833
|
-
t0 = space();
|
|
15834
|
-
div0 = element("div");
|
|
15835
|
-
span0 = element("span");
|
|
15836
|
-
t1 = text(t1_value);
|
|
15837
|
-
t2 = space();
|
|
15838
|
-
span1 = element("span");
|
|
15839
|
-
t3 = text(t3_value);
|
|
15840
|
-
t4 = space();
|
|
15841
15839
|
div2 = element("div");
|
|
15842
|
-
|
|
15843
|
-
|
|
15844
|
-
|
|
15845
|
-
|
|
15846
|
-
|
|
15847
|
-
attr(
|
|
15848
|
-
|
|
15849
|
-
|
|
15850
|
-
|
|
15851
|
-
set_style(
|
|
15840
|
+
div0 = element("div");
|
|
15841
|
+
if_block.c();
|
|
15842
|
+
t = space();
|
|
15843
|
+
div1 = element("div");
|
|
15844
|
+
|
|
15845
|
+
attr(div0, "class", div0_class_value = "" + (null_to_empty(classNames("item-label-item__text-wrap", {
|
|
15846
|
+
'item-label-item__custom': Boolean(typeof /*itemLabel*/ ctx[0].render === 'function')
|
|
15847
|
+
})) + " svelte-6b32dy"));
|
|
15848
|
+
|
|
15849
|
+
set_style(div0, "bottom", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
15850
|
+
attr(div1, "class", div1_class_value = "" + (null_to_empty(classNames("item-label-item__bar", { anchor: /*anchorEnabled*/ ctx[1] })) + " svelte-6b32dy"));
|
|
15851
|
+
set_style(div1, "height", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
15852
|
+
attr(div2, "class", div2_class_value = "" + (null_to_empty(classNames("item-label-item", { fold: /*itemLabel*/ ctx[0].isFold })) + " svelte-6b32dy"));
|
|
15853
|
+
set_style(div2, "z-index", /*itemLabel*/ ctx[0].zIndex, false);
|
|
15854
|
+
set_style(div2, "transform", /*itemLabel*/ ctx[0].transform, false);
|
|
15852
15855
|
},
|
|
15853
15856
|
m(target, anchor) {
|
|
15854
|
-
insert(target,
|
|
15855
|
-
append(
|
|
15856
|
-
|
|
15857
|
-
append(
|
|
15858
|
-
append(
|
|
15859
|
-
append(div0, span0);
|
|
15860
|
-
append(span0, t1);
|
|
15861
|
-
append(div0, t2);
|
|
15862
|
-
append(div0, span1);
|
|
15863
|
-
append(span1, t3);
|
|
15864
|
-
append(div3, t4);
|
|
15865
|
-
append(div3, div2);
|
|
15857
|
+
insert(target, div2, anchor);
|
|
15858
|
+
append(div2, div0);
|
|
15859
|
+
if_block.m(div0, null);
|
|
15860
|
+
append(div2, t);
|
|
15861
|
+
append(div2, div1);
|
|
15866
15862
|
|
|
15867
15863
|
if (!mounted) {
|
|
15868
|
-
dispose = listen(
|
|
15864
|
+
dispose = listen(div0, "click", /*onClick*/ ctx[4]);
|
|
15869
15865
|
mounted = true;
|
|
15870
15866
|
}
|
|
15871
15867
|
},
|
|
15872
15868
|
p(ctx, [dirty]) {
|
|
15873
|
-
if (
|
|
15869
|
+
if (current_block_type === (current_block_type = select_block_type(ctx, dirty)) && if_block) {
|
|
15870
|
+
if_block.p(ctx, dirty);
|
|
15871
|
+
} else {
|
|
15872
|
+
if_block.d(1);
|
|
15873
|
+
if_block = current_block_type(ctx);
|
|
15874
|
+
|
|
15874
15875
|
if (if_block) {
|
|
15875
|
-
if_block.p(ctx, dirty);
|
|
15876
|
-
} else {
|
|
15877
|
-
if_block = create_if_block$1(ctx);
|
|
15878
15876
|
if_block.c();
|
|
15879
|
-
if_block.m(
|
|
15877
|
+
if_block.m(div0, null);
|
|
15880
15878
|
}
|
|
15881
|
-
} else if (if_block) {
|
|
15882
|
-
if_block.d(1);
|
|
15883
|
-
if_block = null;
|
|
15884
15879
|
}
|
|
15885
15880
|
|
|
15886
|
-
if (dirty & /*itemLabel*/ 1 &&
|
|
15887
|
-
|
|
15881
|
+
if (dirty & /*itemLabel*/ 1 && div0_class_value !== (div0_class_value = "" + (null_to_empty(classNames("item-label-item__text-wrap", {
|
|
15882
|
+
'item-label-item__custom': Boolean(typeof /*itemLabel*/ ctx[0].render === 'function')
|
|
15883
|
+
})) + " svelte-6b32dy"))) {
|
|
15884
|
+
attr(div0, "class", div0_class_value);
|
|
15885
|
+
}
|
|
15888
15886
|
|
|
15889
15887
|
if (dirty & /*itemLabel*/ 1) {
|
|
15890
|
-
set_style(
|
|
15888
|
+
set_style(div0, "bottom", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
15891
15889
|
}
|
|
15892
15890
|
|
|
15893
|
-
if (dirty & /*anchorEnabled*/ 2 &&
|
|
15894
|
-
attr(
|
|
15891
|
+
if (dirty & /*anchorEnabled*/ 2 && div1_class_value !== (div1_class_value = "" + (null_to_empty(classNames("item-label-item__bar", { anchor: /*anchorEnabled*/ ctx[1] })) + " svelte-6b32dy"))) {
|
|
15892
|
+
attr(div1, "class", div1_class_value);
|
|
15895
15893
|
}
|
|
15896
15894
|
|
|
15897
15895
|
if (dirty & /*itemLabel*/ 1) {
|
|
15898
|
-
set_style(
|
|
15896
|
+
set_style(div1, "height", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
15899
15897
|
}
|
|
15900
15898
|
|
|
15901
|
-
if (dirty & /*itemLabel*/ 1 &&
|
|
15902
|
-
attr(
|
|
15899
|
+
if (dirty & /*itemLabel*/ 1 && div2_class_value !== (div2_class_value = "" + (null_to_empty(classNames("item-label-item", { fold: /*itemLabel*/ ctx[0].isFold })) + " svelte-6b32dy"))) {
|
|
15900
|
+
attr(div2, "class", div2_class_value);
|
|
15903
15901
|
}
|
|
15904
15902
|
|
|
15905
15903
|
if (dirty & /*itemLabel*/ 1) {
|
|
15906
|
-
set_style(
|
|
15904
|
+
set_style(div2, "z-index", /*itemLabel*/ ctx[0].zIndex, false);
|
|
15907
15905
|
}
|
|
15908
15906
|
|
|
15909
15907
|
if (dirty & /*itemLabel*/ 1) {
|
|
15910
|
-
set_style(
|
|
15908
|
+
set_style(div2, "transform", /*itemLabel*/ ctx[0].transform, false);
|
|
15911
15909
|
}
|
|
15912
15910
|
},
|
|
15913
15911
|
i: noop$1,
|
|
15914
15912
|
o: noop$1,
|
|
15915
15913
|
d(detaching) {
|
|
15916
|
-
if (detaching) detach(
|
|
15917
|
-
|
|
15914
|
+
if (detaching) detach(div2);
|
|
15915
|
+
if_block.d();
|
|
15918
15916
|
mounted = false;
|
|
15919
15917
|
dispose();
|
|
15920
15918
|
}
|
|
15921
15919
|
};
|
|
15922
15920
|
}
|
|
15923
15921
|
|
|
15924
|
-
function instance$
|
|
15922
|
+
function instance$2($$self, $$props, $$invalidate) {
|
|
15925
15923
|
let { itemLabel } = $$props;
|
|
15926
15924
|
let { hooks } = $$props;
|
|
15927
15925
|
let { anchorEnabled } = $$props;
|
|
@@ -15932,16 +15930,50 @@ function instance$1($$self, $$props, $$invalidate) {
|
|
|
15932
15930
|
hooks.emit('onLabelClick', itemLabel);
|
|
15933
15931
|
}
|
|
15934
15932
|
|
|
15933
|
+
let customElement;
|
|
15934
|
+
|
|
15935
|
+
function div_binding($$value) {
|
|
15936
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
15937
|
+
customElement = $$value;
|
|
15938
|
+
$$invalidate(3, customElement);
|
|
15939
|
+
});
|
|
15940
|
+
}
|
|
15941
|
+
|
|
15935
15942
|
const click_handler = e => onIconClick(itemLabel);
|
|
15936
15943
|
|
|
15937
15944
|
$$self.$$set = $$props => {
|
|
15938
15945
|
if ('itemLabel' in $$props) $$invalidate(0, itemLabel = $$props.itemLabel);
|
|
15939
|
-
if ('hooks' in $$props) $$invalidate(
|
|
15946
|
+
if ('hooks' in $$props) $$invalidate(5, hooks = $$props.hooks);
|
|
15940
15947
|
if ('anchorEnabled' in $$props) $$invalidate(1, anchorEnabled = $$props.anchorEnabled);
|
|
15941
15948
|
if ('onIconClick' in $$props) $$invalidate(2, onIconClick = $$props.onIconClick);
|
|
15942
15949
|
};
|
|
15943
15950
|
|
|
15944
|
-
|
|
15951
|
+
$$self.$$.update = () => {
|
|
15952
|
+
if ($$self.$$.dirty & /*itemLabel, customElement*/ 9) {
|
|
15953
|
+
{
|
|
15954
|
+
if (typeof itemLabel.render === 'function' && customElement) {
|
|
15955
|
+
if (customElement.children.length === 0) {
|
|
15956
|
+
const child = itemLabel.render(itemLabel);
|
|
15957
|
+
|
|
15958
|
+
if (child) {
|
|
15959
|
+
customElement.appendChild(child);
|
|
15960
|
+
}
|
|
15961
|
+
}
|
|
15962
|
+
}
|
|
15963
|
+
}
|
|
15964
|
+
}
|
|
15965
|
+
};
|
|
15966
|
+
|
|
15967
|
+
return [
|
|
15968
|
+
itemLabel,
|
|
15969
|
+
anchorEnabled,
|
|
15970
|
+
onIconClick,
|
|
15971
|
+
customElement,
|
|
15972
|
+
onClick,
|
|
15973
|
+
hooks,
|
|
15974
|
+
div_binding,
|
|
15975
|
+
click_handler
|
|
15976
|
+
];
|
|
15945
15977
|
}
|
|
15946
15978
|
|
|
15947
15979
|
class ItemLabelItem extends SvelteComponent {
|
|
@@ -15951,16 +15983,16 @@ class ItemLabelItem extends SvelteComponent {
|
|
|
15951
15983
|
init(
|
|
15952
15984
|
this,
|
|
15953
15985
|
options,
|
|
15954
|
-
instance$
|
|
15955
|
-
create_fragment$
|
|
15986
|
+
instance$2,
|
|
15987
|
+
create_fragment$2,
|
|
15956
15988
|
safe_not_equal,
|
|
15957
15989
|
{
|
|
15958
15990
|
itemLabel: 0,
|
|
15959
|
-
hooks:
|
|
15991
|
+
hooks: 5,
|
|
15960
15992
|
anchorEnabled: 1,
|
|
15961
15993
|
onIconClick: 2
|
|
15962
15994
|
},
|
|
15963
|
-
add_css$
|
|
15995
|
+
add_css$2
|
|
15964
15996
|
);
|
|
15965
15997
|
}
|
|
15966
15998
|
}
|
|
@@ -16005,7 +16037,7 @@ function transform2RenderData(data) {
|
|
|
16005
16037
|
|
|
16006
16038
|
/* src/ItemLabelPlugin/ItemLabelComponent.svelte generated by Svelte v3.49.0 */
|
|
16007
16039
|
|
|
16008
|
-
function add_css(target) {
|
|
16040
|
+
function add_css$1(target) {
|
|
16009
16041
|
append_styles(target, "svelte-gk8s47", ".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}");
|
|
16010
16042
|
}
|
|
16011
16043
|
|
|
@@ -16124,7 +16156,7 @@ function create_each_block(key_1, ctx) {
|
|
|
16124
16156
|
};
|
|
16125
16157
|
}
|
|
16126
16158
|
|
|
16127
|
-
function create_fragment(ctx) {
|
|
16159
|
+
function create_fragment$1(ctx) {
|
|
16128
16160
|
let div;
|
|
16129
16161
|
let each_blocks = [];
|
|
16130
16162
|
let each_1_lookup = new Map();
|
|
@@ -16202,7 +16234,7 @@ function create_fragment(ctx) {
|
|
|
16202
16234
|
}
|
|
16203
16235
|
let basicWidth = 11;
|
|
16204
16236
|
|
|
16205
|
-
function instance($$self, $$props, $$invalidate) {
|
|
16237
|
+
function instance$1($$self, $$props, $$invalidate) {
|
|
16206
16238
|
const { Raycaster, Vector3 } = THREE;
|
|
16207
16239
|
let { five } = $$props;
|
|
16208
16240
|
let { modelOcclusionEnable } = $$props;
|
|
@@ -16495,8 +16527,8 @@ class ItemLabelComponent extends SvelteComponent {
|
|
|
16495
16527
|
init(
|
|
16496
16528
|
this,
|
|
16497
16529
|
options,
|
|
16498
|
-
instance,
|
|
16499
|
-
create_fragment,
|
|
16530
|
+
instance$1,
|
|
16531
|
+
create_fragment$1,
|
|
16500
16532
|
safe_not_equal,
|
|
16501
16533
|
{
|
|
16502
16534
|
five: 7,
|
|
@@ -16507,7 +16539,7 @@ class ItemLabelComponent extends SvelteComponent {
|
|
|
16507
16539
|
displayStrategyType: 11,
|
|
16508
16540
|
maxVisibleDistance: 12
|
|
16509
16541
|
},
|
|
16510
|
-
add_css,
|
|
16542
|
+
add_css$1,
|
|
16511
16543
|
[-1, -1]
|
|
16512
16544
|
);
|
|
16513
16545
|
}
|
|
@@ -16645,6 +16677,736 @@ const itemLabelPluginServerParams = {
|
|
|
16645
16677
|
version: 0,
|
|
16646
16678
|
};
|
|
16647
16679
|
|
|
16648
|
-
|
|
16680
|
+
/**
|
|
16681
|
+
* pano plugin controller 基类
|
|
16682
|
+
* @author kyleju
|
|
16683
|
+
*/
|
|
16684
|
+
class BasePanoPluginController extends Controller$5 {
|
|
16685
|
+
constructor(five) {
|
|
16686
|
+
super(five);
|
|
16687
|
+
Object.defineProperty(this, "state", {
|
|
16688
|
+
enumerable: true,
|
|
16689
|
+
configurable: true,
|
|
16690
|
+
writable: true,
|
|
16691
|
+
value: void 0
|
|
16692
|
+
});
|
|
16693
|
+
Object.defineProperty(this, "container", {
|
|
16694
|
+
enumerable: true,
|
|
16695
|
+
configurable: true,
|
|
16696
|
+
writable: true,
|
|
16697
|
+
value: void 0
|
|
16698
|
+
});
|
|
16699
|
+
Object.defineProperty(this, "enabled", {
|
|
16700
|
+
enumerable: true,
|
|
16701
|
+
configurable: true,
|
|
16702
|
+
writable: true,
|
|
16703
|
+
value: void 0
|
|
16704
|
+
});
|
|
16705
|
+
this.five = five;
|
|
16706
|
+
this.five.once('dispose', this.dispose);
|
|
16707
|
+
this.enabled = true;
|
|
16708
|
+
this.state = this.initState();
|
|
16709
|
+
console.log('base controller');
|
|
16710
|
+
}
|
|
16711
|
+
/**
|
|
16712
|
+
* 启用组件
|
|
16713
|
+
* @param options
|
|
16714
|
+
*/
|
|
16715
|
+
enable(options) {
|
|
16716
|
+
this.enabled = true;
|
|
16717
|
+
this.updateState(Object.assign(Object.assign({}, options), { userAction: true }));
|
|
16718
|
+
}
|
|
16719
|
+
/**
|
|
16720
|
+
* 禁用组件
|
|
16721
|
+
* @param options
|
|
16722
|
+
*/
|
|
16723
|
+
disable(options) {
|
|
16724
|
+
this.enabled = false;
|
|
16725
|
+
this.updateState(Object.assign(Object.assign({}, options), { userAction: true }));
|
|
16726
|
+
}
|
|
16727
|
+
/**
|
|
16728
|
+
* 显示 UI
|
|
16729
|
+
* @param options
|
|
16730
|
+
* @returns
|
|
16731
|
+
*/
|
|
16732
|
+
show(options) {
|
|
16733
|
+
if (!this.state.enabled)
|
|
16734
|
+
return;
|
|
16735
|
+
this.setState(Object.assign(Object.assign({}, this.state), { visible: true }), options);
|
|
16736
|
+
return Promise.resolve();
|
|
16737
|
+
}
|
|
16738
|
+
/**
|
|
16739
|
+
* 隐藏 UI
|
|
16740
|
+
* @param options
|
|
16741
|
+
* @returns
|
|
16742
|
+
*/
|
|
16743
|
+
hide(options) {
|
|
16744
|
+
if (!this.state.enabled)
|
|
16745
|
+
return;
|
|
16746
|
+
this.setState(Object.assign(Object.assign({}, this.state), { visible: false }), options);
|
|
16747
|
+
return Promise.resolve();
|
|
16748
|
+
}
|
|
16749
|
+
/**
|
|
16750
|
+
* 销毁对象
|
|
16751
|
+
*/
|
|
16752
|
+
dispose() {
|
|
16753
|
+
this.container.remove();
|
|
16754
|
+
}
|
|
16755
|
+
/**
|
|
16756
|
+
* 设置状态
|
|
16757
|
+
* @param state @T 状态
|
|
16758
|
+
* @param options @BaseOptions 可选配置
|
|
16759
|
+
* @returns
|
|
16760
|
+
*/
|
|
16761
|
+
setState(state, options) {
|
|
16762
|
+
if (!this.enabled)
|
|
16763
|
+
return;
|
|
16764
|
+
const prevState = Object.assign({}, this.state);
|
|
16765
|
+
this.state = Object.assign(Object.assign(Object.assign({}, this.state), state), options);
|
|
16766
|
+
this.stateChangedCallback(prevState, options);
|
|
16767
|
+
}
|
|
16768
|
+
get visible() {
|
|
16769
|
+
return this.five.state.mode === Five.Mode.Panorama;
|
|
16770
|
+
}
|
|
16771
|
+
appendTo(container) {
|
|
16772
|
+
if (!this.enabled)
|
|
16773
|
+
return;
|
|
16774
|
+
this.container = container;
|
|
16775
|
+
this.render();
|
|
16776
|
+
}
|
|
16777
|
+
updateState(options) {
|
|
16778
|
+
this.setState(Object.assign(Object.assign({}, this.state), { enabled: this.enabled, visible: this.visible }), options);
|
|
16779
|
+
}
|
|
16780
|
+
}
|
|
16781
|
+
|
|
16782
|
+
/* src/PanoDoorLabelPlugin/DoorLabelItem.svelte generated by Svelte v3.49.0 */
|
|
16783
|
+
|
|
16784
|
+
function add_css(target) {
|
|
16785
|
+
append_styles(target, "svelte-6rn4em", ".plugin-DoorLabelPlugin-item.svelte-6rn4em.svelte-6rn4em{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-6rn4em.svelte-6rn4em{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.625rem;padding:0.3125rem;white-space:nowrap;font-size:0.625rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-6rn4em.svelte-6rn4em::after{content:\"\";display:block;position:absolute;top:-1px;left:-1px;bottom:-1px;right:-1px;border-radius:0.125rem;border:1px solid rgba(0, 0, 0, 0);-o-border-image:url(\"//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png\") 4;border-image:url(\"//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png\") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-6rn4em.svelte-6rn4em:active,.plugin-DoorLabelPlugin-cnt.svelte-6rn4em.svelte-6rn4em:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-6rn4em.svelte-6rn4em{background:url(\"//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg\") no-repeat;background-size:100%;display:inline-block;width:0.52083rem;height:0.52083rem;margin-left:0.20833rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-6rn4em .plugin-DoorLabelPlugin-icon.svelte-6rn4em{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-6rn4em .plugin-DoorLabelPlugin-txt.svelte-6rn4em{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-6rn4em .plugin-DoorLabelPlugin-icon.svelte-6rn4em{transform:rotate(-90deg);margin-left:0;margin-right:0.20833rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-6rn4em .plugin-DoorLabelPlugin-icon.svelte-6rn4em{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-6rn4em .plugin-DoorLabelPlugin-txt.svelte-6rn4em{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-6rn4em .plugin-DoorLabelPlugin-icon.svelte-6rn4em{transform:rotate(-90deg);margin-left:0;margin-right:0.20833rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-6rn4em .plugin-DoorLabelPlugin-icon.svelte-6rn4em{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-6rn4em .plugin-DoorLabelPlugin-txt.svelte-6rn4em{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-6rn4em .plugin-DoorLabelPlugin-icon.svelte-6rn4em{transform:rotate(-90deg);margin-left:0;margin-right:0.20833rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-6rn4em .plugin-DoorLabelPlugin-icon.svelte-6rn4em{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-6rn4em .plugin-DoorLabelPlugin-txt.svelte-6rn4em{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-6rn4em .plugin-DoorLabelPlugin-icon.svelte-6rn4em{transform:rotate(-90deg);margin-left:0;margin-right:0.20833rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-6rn4em.svelte-6rn4em{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-6rn4em .plugin-DoorLabelPlugin-icon.svelte-6rn4em{background:url(\"//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg\") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-6rn4em.svelte-6rn4em:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-6rn4em.svelte-6rn4em:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}");
|
|
16786
|
+
}
|
|
16787
|
+
|
|
16788
|
+
function create_fragment(ctx) {
|
|
16789
|
+
let div1;
|
|
16790
|
+
let div0;
|
|
16791
|
+
let span;
|
|
16792
|
+
let t1;
|
|
16793
|
+
let i;
|
|
16794
|
+
let div0_class_value;
|
|
16795
|
+
let mounted;
|
|
16796
|
+
let dispose;
|
|
16797
|
+
|
|
16798
|
+
return {
|
|
16799
|
+
c() {
|
|
16800
|
+
div1 = element("div");
|
|
16801
|
+
div0 = element("div");
|
|
16802
|
+
span = element("span");
|
|
16803
|
+
span.textContent = `${/*name*/ ctx[8]}`;
|
|
16804
|
+
t1 = space();
|
|
16805
|
+
i = element("i");
|
|
16806
|
+
attr(span, "class", "plugin-DoorLabelPlugin-txt svelte-6rn4em");
|
|
16807
|
+
attr(i, "class", "plugin-DoorLabelPlugin-icon svelte-6rn4em");
|
|
16808
|
+
attr(div0, "class", div0_class_value = "" + (null_to_empty(classNames('plugin-DoorLabelPlugin-cnt', /*props*/ ctx[0].toward)) + " svelte-6rn4em"));
|
|
16809
|
+
attr(div0, "style", `transform: ${/*transform*/ ctx[6] || 'initial'};pointerEvents: ${/*inSight*/ ctx[5] ? 'auto' : 'none'};opacity: ${/*inSight*/ ctx[5] ? 1 : 0}`);
|
|
16810
|
+
attr(div0, "data-camera-toward", /*cameraToward*/ ctx[7]);
|
|
16811
|
+
attr(div1, "style", `left: ${/*left*/ ctx[3] || 0}%;top: ${/*top*/ ctx[4] || 0}%;opacity: ${/*inSight*/ ctx[5] ? 1 : 0}`);
|
|
16812
|
+
attr(div1, "class", "plugin-DoorLabelPlugin-item svelte-6rn4em");
|
|
16813
|
+
},
|
|
16814
|
+
m(target, anchor) {
|
|
16815
|
+
insert(target, div1, anchor);
|
|
16816
|
+
append(div1, div0);
|
|
16817
|
+
append(div0, span);
|
|
16818
|
+
append(div0, t1);
|
|
16819
|
+
append(div0, i);
|
|
16820
|
+
/*div1_binding*/ ctx[10](div1);
|
|
16821
|
+
|
|
16822
|
+
if (!mounted) {
|
|
16823
|
+
dispose = listen(div0, "click", /*click_handler*/ ctx[9]);
|
|
16824
|
+
mounted = true;
|
|
16825
|
+
}
|
|
16826
|
+
},
|
|
16827
|
+
p(ctx, [dirty]) {
|
|
16828
|
+
if (dirty & /*props*/ 1 && div0_class_value !== (div0_class_value = "" + (null_to_empty(classNames('plugin-DoorLabelPlugin-cnt', /*props*/ ctx[0].toward)) + " svelte-6rn4em"))) {
|
|
16829
|
+
attr(div0, "class", div0_class_value);
|
|
16830
|
+
}
|
|
16831
|
+
},
|
|
16832
|
+
i: noop$1,
|
|
16833
|
+
o: noop$1,
|
|
16834
|
+
d(detaching) {
|
|
16835
|
+
if (detaching) detach(div1);
|
|
16836
|
+
/*div1_binding*/ ctx[10](null);
|
|
16837
|
+
mounted = false;
|
|
16838
|
+
dispose();
|
|
16839
|
+
}
|
|
16840
|
+
};
|
|
16841
|
+
}
|
|
16842
|
+
|
|
16843
|
+
function instance($$self, $$props, $$invalidate) {
|
|
16844
|
+
let { props } = $$props;
|
|
16845
|
+
let { onClick } = $$props;
|
|
16846
|
+
let divElement;
|
|
16847
|
+
let { left, top, inSight, transform, panoIndex, cameraToward, name } = props;
|
|
16848
|
+
let prevPanoIndexRef = 0;
|
|
16849
|
+
|
|
16850
|
+
const initPanoIndex = () => {
|
|
16851
|
+
if (!left || !top || !inSight) {
|
|
16852
|
+
return;
|
|
16853
|
+
}
|
|
16854
|
+
|
|
16855
|
+
if (!divElement) return;
|
|
16856
|
+
const _width = divElement.current.clientWidth / window.innerWidth * 100;
|
|
16857
|
+
const _height = divElement.current.clientHeight / window.innerHeight * 100;
|
|
16858
|
+
|
|
16859
|
+
if (left <= _width / 2 || left >= 100 - _width / 2) {
|
|
16860
|
+
return;
|
|
16861
|
+
}
|
|
16862
|
+
|
|
16863
|
+
if (top <= _height / 2 || top >= 100 - _height / 2) {
|
|
16864
|
+
return;
|
|
16865
|
+
}
|
|
16866
|
+
|
|
16867
|
+
const prevPanoIndex = prevPanoIndexRef;
|
|
16868
|
+
|
|
16869
|
+
if (panoIndex !== prevPanoIndex) {
|
|
16870
|
+
// 触发埋点
|
|
16871
|
+
console.log('panoDoorLabelPlugin', panoIndex, '触发埋点');
|
|
16872
|
+
|
|
16873
|
+
// 这里触发曝光埋点
|
|
16874
|
+
prevPanoIndexRef = panoIndex;
|
|
16875
|
+
}
|
|
16876
|
+
};
|
|
16877
|
+
|
|
16878
|
+
const click_handler = e => {
|
|
16879
|
+
if (onClick) onClick();
|
|
16880
|
+
};
|
|
16881
|
+
|
|
16882
|
+
function div1_binding($$value) {
|
|
16883
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
16884
|
+
divElement = $$value;
|
|
16885
|
+
$$invalidate(2, divElement);
|
|
16886
|
+
});
|
|
16887
|
+
}
|
|
16888
|
+
|
|
16889
|
+
$$self.$$set = $$props => {
|
|
16890
|
+
if ('props' in $$props) $$invalidate(0, props = $$props.props);
|
|
16891
|
+
if ('onClick' in $$props) $$invalidate(1, onClick = $$props.onClick);
|
|
16892
|
+
};
|
|
16893
|
+
|
|
16894
|
+
{
|
|
16895
|
+
initPanoIndex();
|
|
16896
|
+
}
|
|
16897
|
+
|
|
16898
|
+
return [
|
|
16899
|
+
props,
|
|
16900
|
+
onClick,
|
|
16901
|
+
divElement,
|
|
16902
|
+
left,
|
|
16903
|
+
top,
|
|
16904
|
+
inSight,
|
|
16905
|
+
transform,
|
|
16906
|
+
cameraToward,
|
|
16907
|
+
name,
|
|
16908
|
+
click_handler,
|
|
16909
|
+
div1_binding
|
|
16910
|
+
];
|
|
16911
|
+
}
|
|
16912
|
+
|
|
16913
|
+
class DoorLabelItem extends SvelteComponent {
|
|
16914
|
+
constructor(options) {
|
|
16915
|
+
super();
|
|
16916
|
+
init(this, options, instance, create_fragment, safe_not_equal, { props: 0, onClick: 1 }, add_css);
|
|
16917
|
+
}
|
|
16918
|
+
}
|
|
16919
|
+
|
|
16920
|
+
function isTwoRectOverlaped(rect1, rect2) {
|
|
16921
|
+
// 两矩形的中心点水平及垂直距离
|
|
16922
|
+
const verticalDistance = Math.abs(rect1.top + rect1.height / 2 - rect2.top - rect2.height / 2);
|
|
16923
|
+
const horizontalDistance = Math.abs(rect1.left + rect1.width / 2 - rect2.left - rect2.width / 2);
|
|
16924
|
+
const verticalThreshold = (rect1.height + rect2.height) / 2;
|
|
16925
|
+
const horizontalThroshold = (rect1.width + rect2.width) / 2;
|
|
16926
|
+
if (verticalDistance > verticalThreshold && horizontalDistance > horizontalThroshold) {
|
|
16927
|
+
return false;
|
|
16928
|
+
}
|
|
16929
|
+
return true;
|
|
16930
|
+
}
|
|
16931
|
+
function getCameraToward(five) {
|
|
16932
|
+
const { camera } = five;
|
|
16933
|
+
const cameraDirection = camera.getWorldDirection(new Vector3$1());
|
|
16934
|
+
let angel = (Math.atan(cameraDirection.z / cameraDirection.x) * 180) / Math.PI;
|
|
16935
|
+
let toward = '';
|
|
16936
|
+
if (cameraDirection.x < 0)
|
|
16937
|
+
angel += 180;
|
|
16938
|
+
if (angel < 0)
|
|
16939
|
+
angel += 360;
|
|
16940
|
+
if (angel > 315 || angel <= 45) {
|
|
16941
|
+
toward = 'right';
|
|
16942
|
+
}
|
|
16943
|
+
else if (angel > 45 && angel <= 135) {
|
|
16944
|
+
toward = 'back';
|
|
16945
|
+
}
|
|
16946
|
+
else if (angel > 135 && angel <= 225) {
|
|
16947
|
+
toward = 'left';
|
|
16948
|
+
}
|
|
16949
|
+
else if (angel > 225 && angel <= 315) {
|
|
16950
|
+
toward = 'forward';
|
|
16951
|
+
}
|
|
16952
|
+
return toward;
|
|
16953
|
+
}
|
|
16954
|
+
function getDistance(p1, p2) {
|
|
16955
|
+
return Math.sqrt(Math.pow(p1.z - p2.z, 2) + Math.pow(p1.x - p2.x, 2));
|
|
16956
|
+
}
|
|
16957
|
+
// left、right、forward、back 是 roomLabel 的朝向
|
|
16958
|
+
function getToward(rad) {
|
|
16959
|
+
const pi_4 = Math.PI / 4;
|
|
16960
|
+
if (rad > -pi_4 && rad <= pi_4) {
|
|
16961
|
+
return 'left';
|
|
16962
|
+
}
|
|
16963
|
+
else if (rad > pi_4 * 3 || rad <= -pi_4 * 3) {
|
|
16964
|
+
return 'right';
|
|
16965
|
+
}
|
|
16966
|
+
else if (rad > -pi_4 * 3 && rad <= -pi_4) {
|
|
16967
|
+
return 'forward';
|
|
16968
|
+
}
|
|
16969
|
+
else if (rad > pi_4 && rad <= pi_4 * 3) {
|
|
16970
|
+
return 'back';
|
|
16971
|
+
}
|
|
16972
|
+
return '';
|
|
16973
|
+
}
|
|
16974
|
+
|
|
16975
|
+
const defaultBaseOptions = { userAction: true };
|
|
16976
|
+
/**
|
|
16977
|
+
* 分间标签插件
|
|
16978
|
+
* @author kyleju
|
|
16979
|
+
*/
|
|
16980
|
+
class PanoDoorLabelPluginController extends BasePanoPluginController {
|
|
16981
|
+
constructor(five) {
|
|
16982
|
+
super(five);
|
|
16983
|
+
Object.defineProperty(this, "MinVisibledistance", {
|
|
16984
|
+
enumerable: true,
|
|
16985
|
+
configurable: true,
|
|
16986
|
+
writable: true,
|
|
16987
|
+
value: 1.8
|
|
16988
|
+
});
|
|
16989
|
+
Object.defineProperty(this, "MaxVisibledistance", {
|
|
16990
|
+
enumerable: true,
|
|
16991
|
+
configurable: true,
|
|
16992
|
+
writable: true,
|
|
16993
|
+
value: 6
|
|
16994
|
+
});
|
|
16995
|
+
Object.defineProperty(this, "OffsetHeight", {
|
|
16996
|
+
enumerable: true,
|
|
16997
|
+
configurable: true,
|
|
16998
|
+
writable: true,
|
|
16999
|
+
value: -1.3
|
|
17000
|
+
}); // 标签页面高度偏移值
|
|
17001
|
+
Object.defineProperty(this, "rooms", {
|
|
17002
|
+
enumerable: true,
|
|
17003
|
+
configurable: true,
|
|
17004
|
+
writable: true,
|
|
17005
|
+
value: void 0
|
|
17006
|
+
});
|
|
17007
|
+
Object.defineProperty(this, "floorplanServerData", {
|
|
17008
|
+
enumerable: true,
|
|
17009
|
+
configurable: true,
|
|
17010
|
+
writable: true,
|
|
17011
|
+
value: void 0
|
|
17012
|
+
});
|
|
17013
|
+
/** 标签项 */
|
|
17014
|
+
Object.defineProperty(this, "doorLabelItems", {
|
|
17015
|
+
enumerable: true,
|
|
17016
|
+
configurable: true,
|
|
17017
|
+
writable: true,
|
|
17018
|
+
value: void 0
|
|
17019
|
+
});
|
|
17020
|
+
/** 每个点位 visible 标签的缓存 */
|
|
17021
|
+
Object.defineProperty(this, "visibleLabelMap", {
|
|
17022
|
+
enumerable: true,
|
|
17023
|
+
configurable: true,
|
|
17024
|
+
writable: true,
|
|
17025
|
+
value: new Map()
|
|
17026
|
+
});
|
|
17027
|
+
/** 标签项Prop值 */
|
|
17028
|
+
Object.defineProperty(this, "labelItems", {
|
|
17029
|
+
enumerable: true,
|
|
17030
|
+
configurable: true,
|
|
17031
|
+
writable: true,
|
|
17032
|
+
value: []
|
|
17033
|
+
});
|
|
17034
|
+
/** 数据 */
|
|
17035
|
+
Object.defineProperty(this, "doorLabels", {
|
|
17036
|
+
enumerable: true,
|
|
17037
|
+
configurable: true,
|
|
17038
|
+
writable: true,
|
|
17039
|
+
value: void 0
|
|
17040
|
+
});
|
|
17041
|
+
Object.defineProperty(this, "roomObservers", {
|
|
17042
|
+
enumerable: true,
|
|
17043
|
+
configurable: true,
|
|
17044
|
+
writable: true,
|
|
17045
|
+
value: void 0
|
|
17046
|
+
});
|
|
17047
|
+
Object.defineProperty(this, "loadData", {
|
|
17048
|
+
enumerable: true,
|
|
17049
|
+
configurable: true,
|
|
17050
|
+
writable: true,
|
|
17051
|
+
value: (floorplanServerData) => {
|
|
17052
|
+
if (this.doorLabelItems && this.doorLabelItems.length > 0) {
|
|
17053
|
+
this.doorLabelItems.forEach((doorItem) => {
|
|
17054
|
+
doorItem.$destroy();
|
|
17055
|
+
});
|
|
17056
|
+
}
|
|
17057
|
+
this.labelItems = [];
|
|
17058
|
+
this.doorLabels = [];
|
|
17059
|
+
this.doorLabelItems = [];
|
|
17060
|
+
this.floorplanServerData = floorplanServerData;
|
|
17061
|
+
this.five.once('panoArrived', () => {
|
|
17062
|
+
console.log('doorplugin', 'panoArrived');
|
|
17063
|
+
this.initData();
|
|
17064
|
+
});
|
|
17065
|
+
}
|
|
17066
|
+
});
|
|
17067
|
+
Object.defineProperty(this, "initRoomObservers", {
|
|
17068
|
+
enumerable: true,
|
|
17069
|
+
configurable: true,
|
|
17070
|
+
writable: true,
|
|
17071
|
+
value: () => {
|
|
17072
|
+
var _a, _b;
|
|
17073
|
+
const floorDatas = this.floorplanServerData.computed_data.floor_datas || [];
|
|
17074
|
+
const observers = ((_b = (_a = this.five) === null || _a === void 0 ? void 0 : _a.work) === null || _b === void 0 ? void 0 : _b.observers) || [];
|
|
17075
|
+
const roomObservers = observers
|
|
17076
|
+
// eslint-disable-next-line array-callback-return
|
|
17077
|
+
.map((ob) => {
|
|
17078
|
+
const panoIndex = ob.panoIndex;
|
|
17079
|
+
const floorIndex = ob.floorIndex;
|
|
17080
|
+
const floor = floorDatas === null || floorDatas === void 0 ? void 0 : floorDatas.find((d) => d.floor_index === floorIndex);
|
|
17081
|
+
if (floor) {
|
|
17082
|
+
const room = floor.rooms.find((r) => r.observer_indexs.includes(panoIndex));
|
|
17083
|
+
if (room) {
|
|
17084
|
+
return { panoIndex, floorIndex, name: room.name };
|
|
17085
|
+
}
|
|
17086
|
+
}
|
|
17087
|
+
})
|
|
17088
|
+
.filter(Boolean);
|
|
17089
|
+
this.roomObservers = roomObservers;
|
|
17090
|
+
}
|
|
17091
|
+
});
|
|
17092
|
+
Object.defineProperty(this, "hideAllLabels", {
|
|
17093
|
+
enumerable: true,
|
|
17094
|
+
configurable: true,
|
|
17095
|
+
writable: true,
|
|
17096
|
+
value: () => {
|
|
17097
|
+
this.labelItems.forEach((item) => {
|
|
17098
|
+
item.visible = false;
|
|
17099
|
+
item.inSight = false;
|
|
17100
|
+
});
|
|
17101
|
+
this.render();
|
|
17102
|
+
}
|
|
17103
|
+
});
|
|
17104
|
+
Object.defineProperty(this, "fixDoorVisibleAndPosition", {
|
|
17105
|
+
enumerable: true,
|
|
17106
|
+
configurable: true,
|
|
17107
|
+
writable: true,
|
|
17108
|
+
value: () => {
|
|
17109
|
+
this.initRoomObservers();
|
|
17110
|
+
const { panoIndex } = this.five;
|
|
17111
|
+
if (!this.visible)
|
|
17112
|
+
return;
|
|
17113
|
+
if (this.five.model.empty)
|
|
17114
|
+
return;
|
|
17115
|
+
if (panoIndex === null)
|
|
17116
|
+
return;
|
|
17117
|
+
if (!this.roomObservers.find((item) => item.panoIndex === panoIndex))
|
|
17118
|
+
return;
|
|
17119
|
+
const roomObserver = this.roomObservers.find((item) => {
|
|
17120
|
+
return item.panoIndex === panoIndex;
|
|
17121
|
+
});
|
|
17122
|
+
const position = this.five.work.observers.find((item) => item.panoIndex === panoIndex).position;
|
|
17123
|
+
const targetPoint = position.clone();
|
|
17124
|
+
const visibleLabelIds = (() => {
|
|
17125
|
+
if (this.visibleLabelMap.has(panoIndex)) {
|
|
17126
|
+
/** 使用缓存 */
|
|
17127
|
+
return this.visibleLabelMap.get(panoIndex);
|
|
17128
|
+
}
|
|
17129
|
+
else {
|
|
17130
|
+
const visibleDoorIds = [];
|
|
17131
|
+
this.doorLabels.forEach((doorLabelItem, index) => {
|
|
17132
|
+
// step1 校验分间
|
|
17133
|
+
if (doorLabelItem.roomName === roomObserver.name)
|
|
17134
|
+
return;
|
|
17135
|
+
// step2 校验最大最小值
|
|
17136
|
+
const doorPosition = doorLabelItem.position.clone();
|
|
17137
|
+
const distance = doorPosition.distanceTo(targetPoint);
|
|
17138
|
+
if (distance < this.MinVisibledistance || distance > this.MaxVisibledistance)
|
|
17139
|
+
return;
|
|
17140
|
+
// step3 碰撞检测是否有遮挡
|
|
17141
|
+
const raycaster = new Raycaster$1();
|
|
17142
|
+
const direction = doorPosition.clone().sub(targetPoint).normalize();
|
|
17143
|
+
raycaster.set(targetPoint, direction);
|
|
17144
|
+
const [intersection] = this.five.model.intersectRaycaster(raycaster);
|
|
17145
|
+
if (intersection && intersection.distance + 0.1 < distance)
|
|
17146
|
+
return;
|
|
17147
|
+
// 🥳 最终剩下的就是当前点位可见的标签
|
|
17148
|
+
visibleDoorIds.push(index);
|
|
17149
|
+
});
|
|
17150
|
+
this.visibleLabelMap.set(panoIndex, visibleDoorIds);
|
|
17151
|
+
return visibleDoorIds;
|
|
17152
|
+
}
|
|
17153
|
+
})();
|
|
17154
|
+
this.labelItems.forEach((data, index) => {
|
|
17155
|
+
data.visible = visibleLabelIds.includes(index);
|
|
17156
|
+
});
|
|
17157
|
+
this.fixDoorPosition();
|
|
17158
|
+
}
|
|
17159
|
+
});
|
|
17160
|
+
Object.defineProperty(this, "fixDoorPosition", {
|
|
17161
|
+
enumerable: true,
|
|
17162
|
+
configurable: true,
|
|
17163
|
+
writable: true,
|
|
17164
|
+
value: () => {
|
|
17165
|
+
const { panoIndex, camera } = this.five;
|
|
17166
|
+
if (panoIndex === null)
|
|
17167
|
+
return;
|
|
17168
|
+
if (this.five.currentMode !== 'Panorama')
|
|
17169
|
+
return this.hideAllLabels();
|
|
17170
|
+
const fiveElement = this.five.getElement();
|
|
17171
|
+
const canvasWidth = fiveElement.clientWidth;
|
|
17172
|
+
const canvasHeight = fiveElement.clientHeight;
|
|
17173
|
+
const cameraDirection = camera.getWorldDirection(new Vector3$1());
|
|
17174
|
+
const neverOverlapLabels = [];
|
|
17175
|
+
const labelItems = [...this.labelItems];
|
|
17176
|
+
labelItems.forEach((doorLabel, index) => {
|
|
17177
|
+
if (doorLabel.visible) {
|
|
17178
|
+
const disFromCameraToLabel = camera.position.distanceTo(doorLabel.position);
|
|
17179
|
+
const labelPosition = doorLabel.position.clone().add(new Vector3$1(0, this.OffsetHeight, 0));
|
|
17180
|
+
const direction = labelPosition.clone().sub(camera.position).normalize();
|
|
17181
|
+
const angle = direction.angleTo(cameraDirection);
|
|
17182
|
+
const mouse = labelPosition.clone().project(camera);
|
|
17183
|
+
const left = ((mouse.x + 1) / 2.2) * 100;
|
|
17184
|
+
const top = ((-mouse.y + 1) / 2.2) * 100;
|
|
17185
|
+
const visible = left >= 0 &&
|
|
17186
|
+
left <= 100 &&
|
|
17187
|
+
top >= 0 &&
|
|
17188
|
+
top <= 100 &&
|
|
17189
|
+
disFromCameraToLabel > this.MinVisibledistance &&
|
|
17190
|
+
disFromCameraToLabel <= this.MaxVisibledistance;
|
|
17191
|
+
doorLabel.left = left;
|
|
17192
|
+
doorLabel.top = top;
|
|
17193
|
+
doorLabel.inSight = visible && angle < Math.PI / 2;
|
|
17194
|
+
doorLabel.cameraToward = getCameraToward(this.five);
|
|
17195
|
+
if (visible)
|
|
17196
|
+
neverOverlapLabels.push({ disFromCameraToLabel, left, top, index });
|
|
17197
|
+
else
|
|
17198
|
+
doorLabel.transform = 'translate(-50%, -50%)';
|
|
17199
|
+
}
|
|
17200
|
+
else {
|
|
17201
|
+
doorLabel.inSight = false;
|
|
17202
|
+
}
|
|
17203
|
+
});
|
|
17204
|
+
// 视线内多标签防重叠单独处理
|
|
17205
|
+
if (neverOverlapLabels.length > 1) {
|
|
17206
|
+
let heightLevel = 0;
|
|
17207
|
+
neverOverlapLabels.sort((a, b) => b.disFromCameraToLabel - a.disFromCameraToLabel);
|
|
17208
|
+
for (let i = 1; i < neverOverlapLabels.length; i++) {
|
|
17209
|
+
const { index: idx1, left: l1, top: t1 } = neverOverlapLabels[i - 1];
|
|
17210
|
+
const { index: idx2, left: l2, top: t2 } = neverOverlapLabels[i];
|
|
17211
|
+
const rectDom1 = this.container.children[idx1];
|
|
17212
|
+
const rectDom2 = this.container.children[idx2];
|
|
17213
|
+
if (!rectDom1 || !rectDom2)
|
|
17214
|
+
return;
|
|
17215
|
+
const rect1 = {
|
|
17216
|
+
left: (canvasWidth * l1) / 100,
|
|
17217
|
+
top: (canvasHeight * t1) / 100,
|
|
17218
|
+
width: rectDom1.children[0].clientWidth,
|
|
17219
|
+
height: rectDom1.children[0].clientHeight,
|
|
17220
|
+
};
|
|
17221
|
+
const rect2 = {
|
|
17222
|
+
left: (canvasWidth * l2) / 100,
|
|
17223
|
+
top: (canvasHeight * t2) / 100,
|
|
17224
|
+
width: rectDom2.children[0].clientWidth,
|
|
17225
|
+
height: rectDom2.children[0].clientHeight,
|
|
17226
|
+
};
|
|
17227
|
+
if (isTwoRectOverlaped(rect1, rect2)) {
|
|
17228
|
+
heightLevel++;
|
|
17229
|
+
labelItems[idx1].transform = `translate(-50%, ${(heightLevel - 1) * 100 - 50}%)`;
|
|
17230
|
+
labelItems[idx2].transform = `translate(-50%, ${heightLevel * 100 - 50}%)`;
|
|
17231
|
+
}
|
|
17232
|
+
}
|
|
17233
|
+
}
|
|
17234
|
+
this.labelItems = labelItems;
|
|
17235
|
+
this.render();
|
|
17236
|
+
}
|
|
17237
|
+
});
|
|
17238
|
+
Object.defineProperty(this, "onClick", {
|
|
17239
|
+
enumerable: true,
|
|
17240
|
+
configurable: true,
|
|
17241
|
+
writable: true,
|
|
17242
|
+
value: (roomName, position) => {
|
|
17243
|
+
if (!this.rooms)
|
|
17244
|
+
return;
|
|
17245
|
+
const { work } = this.five;
|
|
17246
|
+
let nearestIndex;
|
|
17247
|
+
let nearestVector;
|
|
17248
|
+
let minDistance = Infinity;
|
|
17249
|
+
for (let index = 0; index < work.observers.length; index++) {
|
|
17250
|
+
if (this.rooms[index].name !== roomName)
|
|
17251
|
+
continue;
|
|
17252
|
+
const observer = work.observers[index];
|
|
17253
|
+
const observerPoint = observer.standingPosition;
|
|
17254
|
+
const distance = position.distanceTo(observerPoint);
|
|
17255
|
+
if (distance < minDistance) {
|
|
17256
|
+
nearestIndex = index;
|
|
17257
|
+
nearestVector = observerPoint.clone().sub(position).normalize();
|
|
17258
|
+
minDistance = distance;
|
|
17259
|
+
}
|
|
17260
|
+
}
|
|
17261
|
+
if (nearestVector !== null && nearestIndex !== null) {
|
|
17262
|
+
const options = {};
|
|
17263
|
+
if (minDistance > 0) {
|
|
17264
|
+
const fromVector = new Vector3$1(0, 0, -1);
|
|
17265
|
+
const toVector = nearestVector.clone();
|
|
17266
|
+
const quaternion = new Quaternion();
|
|
17267
|
+
quaternion.setFromUnitVectors(fromVector, toVector);
|
|
17268
|
+
const euler = new Euler();
|
|
17269
|
+
euler.setFromQuaternion(quaternion, 'YXZ');
|
|
17270
|
+
options.longitude = euler.y;
|
|
17271
|
+
}
|
|
17272
|
+
const canceled = this.five.emit('wantsToMoveToPano', nearestIndex, {}, true);
|
|
17273
|
+
if (!canceled) {
|
|
17274
|
+
this.five.moveToPano(nearestIndex, { longitude: options.longitude });
|
|
17275
|
+
}
|
|
17276
|
+
}
|
|
17277
|
+
}
|
|
17278
|
+
});
|
|
17279
|
+
Object.defineProperty(this, "initData", {
|
|
17280
|
+
enumerable: true,
|
|
17281
|
+
configurable: true,
|
|
17282
|
+
writable: true,
|
|
17283
|
+
value: () => {
|
|
17284
|
+
var _a;
|
|
17285
|
+
this.doorLabels = [];
|
|
17286
|
+
const pano_index = this.five.panoIndex;
|
|
17287
|
+
const floor_index = this.floorplanServerData.computed_data.observers[pano_index].floor_index;
|
|
17288
|
+
const rooms = floor_index !== undefined &&
|
|
17289
|
+
((_a = this.floorplanServerData.computed_data.floor_datas[floor_index]) === null || _a === void 0 ? void 0 : _a.rooms);
|
|
17290
|
+
this.rooms = rooms;
|
|
17291
|
+
if (this.rooms && this.rooms.length > 0) {
|
|
17292
|
+
this.rooms.forEach((room) => {
|
|
17293
|
+
var _a;
|
|
17294
|
+
const doors = (_a = this.floorplanServerData.computed_data.doors) === null || _a === void 0 ? void 0 : _a.filter((doorItem) => {
|
|
17295
|
+
if (doorItem && doorItem.name === room.name) {
|
|
17296
|
+
return true;
|
|
17297
|
+
}
|
|
17298
|
+
return false;
|
|
17299
|
+
});
|
|
17300
|
+
const observersInRoom = this.five.work.observers.filter((observer, index) => {
|
|
17301
|
+
if (room.observer_indexs.find((item) => item === index))
|
|
17302
|
+
return true;
|
|
17303
|
+
return false;
|
|
17304
|
+
});
|
|
17305
|
+
if (doors) {
|
|
17306
|
+
doors.forEach((door) => {
|
|
17307
|
+
const doorPoint = door.position;
|
|
17308
|
+
let minDistance = Infinity;
|
|
17309
|
+
let nearestPoint;
|
|
17310
|
+
// 遍历门所在房间所有的点,找到离门最近的点
|
|
17311
|
+
observersInRoom.forEach((observer) => {
|
|
17312
|
+
const position = observer.standingPosition;
|
|
17313
|
+
const observerPoint = {
|
|
17314
|
+
x: position.x,
|
|
17315
|
+
y: position.y,
|
|
17316
|
+
z: position.z,
|
|
17317
|
+
};
|
|
17318
|
+
const distance = getDistance(doorPoint, observerPoint);
|
|
17319
|
+
if (distance < minDistance) {
|
|
17320
|
+
minDistance = distance;
|
|
17321
|
+
nearestPoint = observerPoint;
|
|
17322
|
+
}
|
|
17323
|
+
});
|
|
17324
|
+
if (nearestPoint)
|
|
17325
|
+
doorPoint.y = nearestPoint.y + 0.01;
|
|
17326
|
+
const position = new Vector3$1(doorPoint.x, doorPoint.y, doorPoint.z);
|
|
17327
|
+
position.add(new Vector3$1(-0.2, 1.8, 0).applyEuler(new Euler(0, door.rad, 0)));
|
|
17328
|
+
this.doorLabels.push({
|
|
17329
|
+
roomName: room.name,
|
|
17330
|
+
name: door.name,
|
|
17331
|
+
position,
|
|
17332
|
+
toward: getToward(door.rad),
|
|
17333
|
+
});
|
|
17334
|
+
});
|
|
17335
|
+
}
|
|
17336
|
+
});
|
|
17337
|
+
}
|
|
17338
|
+
this.labelItems = this.doorLabels.map((data) => (Object.assign(Object.assign({}, data), { left: 0, top: 0, visible: false, inSight: false, transform: '', cameraToward: '' })));
|
|
17339
|
+
console.log('doorplugin', 'labelItems', this.labelItems);
|
|
17340
|
+
this.five.on('wantsToMoveToPano', this.hideAllLabels);
|
|
17341
|
+
this.five.on('modelLoaded', this.fixDoorVisibleAndPosition);
|
|
17342
|
+
this.five.on('panoArrived', this.fixDoorVisibleAndPosition);
|
|
17343
|
+
this.five.on('initAnimationEnded', this.fixDoorPosition);
|
|
17344
|
+
this.five.on('cameraUpdate', this.fixDoorPosition);
|
|
17345
|
+
this.five.on('mouseWheel', this.fixDoorPosition);
|
|
17346
|
+
this.five.on('pinchGesture', this.fixDoorPosition);
|
|
17347
|
+
this.fixDoorVisibleAndPosition();
|
|
17348
|
+
}
|
|
17349
|
+
});
|
|
17350
|
+
}
|
|
17351
|
+
stateChangedCallback(prevState, options) {
|
|
17352
|
+
if (this.hooks.hasListener('stateChange')) {
|
|
17353
|
+
const optionParams = {
|
|
17354
|
+
state: this.state,
|
|
17355
|
+
prevState,
|
|
17356
|
+
userAction: options ? options.userAction : defaultBaseOptions.userAction,
|
|
17357
|
+
};
|
|
17358
|
+
this.hooks.emit('stateChange', optionParams);
|
|
17359
|
+
}
|
|
17360
|
+
}
|
|
17361
|
+
render() {
|
|
17362
|
+
if (!this.enabled) {
|
|
17363
|
+
this.doorLabelItems &&
|
|
17364
|
+
this.doorLabelItems.length > 0 &&
|
|
17365
|
+
this.doorLabelItems.forEach((item) => {
|
|
17366
|
+
item === null || item === void 0 ? void 0 : item.$destroy();
|
|
17367
|
+
});
|
|
17368
|
+
this.doorLabels = undefined;
|
|
17369
|
+
return;
|
|
17370
|
+
}
|
|
17371
|
+
if (this.doorLabelItems) {
|
|
17372
|
+
this.doorLabelItems.forEach((item) => {
|
|
17373
|
+
item.$destroy();
|
|
17374
|
+
});
|
|
17375
|
+
}
|
|
17376
|
+
this.doorLabelItems = [];
|
|
17377
|
+
this.labelItems.forEach((item) => {
|
|
17378
|
+
this.doorLabelItems.push(new DoorLabelItem({
|
|
17379
|
+
target: this.container,
|
|
17380
|
+
props: {
|
|
17381
|
+
props: item,
|
|
17382
|
+
onClick: () => {
|
|
17383
|
+
this.onClick(item.name, item.position);
|
|
17384
|
+
},
|
|
17385
|
+
},
|
|
17386
|
+
}));
|
|
17387
|
+
});
|
|
17388
|
+
}
|
|
17389
|
+
initState() {
|
|
17390
|
+
return { enabled: true, visible: true };
|
|
17391
|
+
}
|
|
17392
|
+
dispose() {
|
|
17393
|
+
if (this.five) {
|
|
17394
|
+
this.five.off('wantsToMoveToPano', this.hideAllLabels);
|
|
17395
|
+
this.five.off('modelLoaded', this.fixDoorVisibleAndPosition);
|
|
17396
|
+
this.five.off('panoArrived', this.fixDoorVisibleAndPosition);
|
|
17397
|
+
this.five.off('initAnimationEnded', this.fixDoorPosition);
|
|
17398
|
+
this.five.off('cameraUpdate', this.fixDoorPosition);
|
|
17399
|
+
this.five.off('mouseWheel', this.fixDoorPosition);
|
|
17400
|
+
this.five.off('pinchGesture', this.fixDoorPosition);
|
|
17401
|
+
super.dispose();
|
|
17402
|
+
}
|
|
17403
|
+
}
|
|
17404
|
+
}
|
|
17405
|
+
|
|
17406
|
+
const PanoDoorLabelPlugin = (five) => {
|
|
17407
|
+
return new PanoDoorLabelPluginController(five);
|
|
17408
|
+
};
|
|
17409
|
+
|
|
17410
|
+
const DnalogelVersion = '2.0.0-alpha.43';
|
|
16649
17411
|
|
|
16650
|
-
export { CSS3DRenderPlugin, CameraMovementEffect, CameraMovementPlugin, DIRECTION, DISPLAY_STRATEGY_TYPE, DnalogelVersion, FLOOR_PLAN_ATTACHED_TO, FLOOR_TYPE_MAP, ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE, Plugin as ItemLabelPlugin, Magnifier, ModelChassisCompassPlugin, ModelEntryDoorGuidePlugin, ModelFloorplanPlugin, ModelItemLabelPlugin, ModelRoomLabelPlugin, ModelTVVideoPlugin, ModelViewPlugin, PanoCompassPlugin, PanoCursorRaycasterPlugin, PanoFloorplanRadarPlugin, PanoMeasurePlugin, PanoRulerPlugin, PanoRulerProPlugin, PanoSpatialTagPlugin, ROOM_FETILE_TYPE_MAP, ROOM_TYPE_MAP, Rotation, TopviewFloorplanPlugin, itemLabelPluginServerParams, modelItemLabelPluginServerParams, modelRoomLabelPluginServerParams };
|
|
17412
|
+
export { CSS3DRenderPlugin, CameraMovementEffect, CameraMovementPlugin, DIRECTION, DISPLAY_STRATEGY_TYPE, DnalogelVersion, FLOOR_PLAN_ATTACHED_TO, FLOOR_TYPE_MAP, ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE, Plugin as ItemLabelPlugin, Magnifier, ModelChassisCompassPlugin, ModelEntryDoorGuidePlugin, ModelFloorplanPlugin, ModelItemLabelPlugin, ModelRoomLabelPlugin, ModelTVVideoPlugin, ModelViewPlugin, PanoCompassPlugin, PanoCursorRaycasterPlugin, PanoDoorLabelPlugin, PanoFloorplanRadarPlugin, PanoMeasurePlugin, PanoRulerPlugin, PanoRulerProPlugin, PanoSpatialTagPlugin, ROOM_FETILE_TYPE_MAP, ROOM_TYPE_MAP, Rotation, TopviewFloorplanPlugin, itemLabelPluginServerParams, modelItemLabelPluginServerParams, modelRoomLabelPluginServerParams };
|