@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.js
CHANGED
|
@@ -490,11 +490,11 @@ const ROOM_LABEL_BG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAY
|
|
|
490
490
|
|
|
491
491
|
/* src/ModelRoomLabelPlugin/RoomLabelItem.svelte generated by Svelte v3.49.0 */
|
|
492
492
|
|
|
493
|
-
function add_css$
|
|
493
|
+
function add_css$q(target) {
|
|
494
494
|
internal.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}");
|
|
495
495
|
}
|
|
496
496
|
|
|
497
|
-
function create_fragment$
|
|
497
|
+
function create_fragment$v(ctx) {
|
|
498
498
|
let div1;
|
|
499
499
|
let span;
|
|
500
500
|
let t0_value = /*roomLabel*/ ctx[0].name + "";
|
|
@@ -561,7 +561,7 @@ function create_fragment$u(ctx) {
|
|
|
561
561
|
};
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
function instance$
|
|
564
|
+
function instance$v($$self, $$props, $$invalidate) {
|
|
565
565
|
let { five } = $$props;
|
|
566
566
|
let { roomLabel } = $$props;
|
|
567
567
|
|
|
@@ -584,7 +584,7 @@ function instance$u($$self, $$props, $$invalidate) {
|
|
|
584
584
|
class RoomLabelItem extends internal.SvelteComponent {
|
|
585
585
|
constructor(options) {
|
|
586
586
|
super();
|
|
587
|
-
internal.init(this, options, instance$
|
|
587
|
+
internal.init(this, options, instance$v, create_fragment$v, internal.safe_not_equal, { five: 2, roomLabel: 0 }, add_css$q);
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
590
|
|
|
@@ -592,7 +592,7 @@ class RoomLabelItem extends internal.SvelteComponent {
|
|
|
592
592
|
|
|
593
593
|
const { Map: Map_1 } = internal.globals;
|
|
594
594
|
|
|
595
|
-
function add_css$
|
|
595
|
+
function add_css$p(target) {
|
|
596
596
|
internal.append_styles(target, "svelte-9eg4zi", ".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}");
|
|
597
597
|
}
|
|
598
598
|
|
|
@@ -651,7 +651,7 @@ function create_each_block$c(key_1, ctx) {
|
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
-
function create_fragment$
|
|
654
|
+
function create_fragment$u(ctx) {
|
|
655
655
|
let div;
|
|
656
656
|
let each_blocks = [];
|
|
657
657
|
let each_1_lookup = new Map_1();
|
|
@@ -723,7 +723,7 @@ function create_fragment$t(ctx) {
|
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
725
|
|
|
726
|
-
function instance$
|
|
726
|
+
function instance$u($$self, $$props, $$invalidate) {
|
|
727
727
|
let rendererSize;
|
|
728
728
|
let { five } = $$props;
|
|
729
729
|
let { roomLabels } = $$props;
|
|
@@ -848,7 +848,7 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
848
848
|
class RoomLabelItems extends internal.SvelteComponent {
|
|
849
849
|
constructor(options) {
|
|
850
850
|
super();
|
|
851
|
-
internal.init(this, options, instance$
|
|
851
|
+
internal.init(this, options, instance$u, create_fragment$u, internal.safe_not_equal, { five: 1, roomLabels: 0 }, add_css$p);
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
854
|
|
|
@@ -1023,31 +1023,6 @@ exports.FLOOR_PLAN_ATTACHED_TO = void 0;
|
|
|
1023
1023
|
FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["BOUNDING_CENTER"] = 3] = "BOUNDING_CENTER";
|
|
1024
1024
|
})(exports.FLOOR_PLAN_ATTACHED_TO || (exports.FLOOR_PLAN_ATTACHED_TO = {}));
|
|
1025
1025
|
|
|
1026
|
-
/******************************************************************************
|
|
1027
|
-
Copyright (c) Microsoft Corporation.
|
|
1028
|
-
|
|
1029
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1030
|
-
purpose with or without fee is hereby granted.
|
|
1031
|
-
|
|
1032
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1033
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1034
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1035
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1036
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1037
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1038
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1039
|
-
***************************************************************************** */
|
|
1040
|
-
|
|
1041
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1042
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1043
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1044
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1045
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1046
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1047
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1048
|
-
});
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
1026
|
/**
|
|
1052
1027
|
* 检查一个值是否是狭义上的对象
|
|
1053
1028
|
* @param {any} value 要检查的值
|
|
@@ -1161,11 +1136,11 @@ function rad2Deg$1(rad) {
|
|
|
1161
1136
|
|
|
1162
1137
|
/* src/floorplan/Components/Camera.svelte generated by Svelte v3.49.0 */
|
|
1163
1138
|
|
|
1164
|
-
function add_css$
|
|
1139
|
+
function add_css$o(target) {
|
|
1165
1140
|
internal.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%}");
|
|
1166
1141
|
}
|
|
1167
1142
|
|
|
1168
|
-
function create_fragment$
|
|
1143
|
+
function create_fragment$t(ctx) {
|
|
1169
1144
|
let div1;
|
|
1170
1145
|
let div0;
|
|
1171
1146
|
|
|
@@ -1202,7 +1177,7 @@ function create_fragment$s(ctx) {
|
|
|
1202
1177
|
};
|
|
1203
1178
|
}
|
|
1204
1179
|
|
|
1205
|
-
function instance$
|
|
1180
|
+
function instance$t($$self, $$props, $$invalidate) {
|
|
1206
1181
|
let { panoIndex } = $$props;
|
|
1207
1182
|
let { floorplanData } = $$props;
|
|
1208
1183
|
let { lastPanoramaLongitude } = $$props;
|
|
@@ -1248,8 +1223,8 @@ class Camera$1 extends internal.SvelteComponent {
|
|
|
1248
1223
|
internal.init(
|
|
1249
1224
|
this,
|
|
1250
1225
|
options,
|
|
1251
|
-
instance$
|
|
1252
|
-
create_fragment$
|
|
1226
|
+
instance$t,
|
|
1227
|
+
create_fragment$t,
|
|
1253
1228
|
internal.safe_not_equal,
|
|
1254
1229
|
{
|
|
1255
1230
|
panoIndex: 5,
|
|
@@ -1257,7 +1232,7 @@ class Camera$1 extends internal.SvelteComponent {
|
|
|
1257
1232
|
lastPanoramaLongitude: 7,
|
|
1258
1233
|
cameraImageUrl: 0
|
|
1259
1234
|
},
|
|
1260
|
-
add_css$
|
|
1235
|
+
add_css$o
|
|
1261
1236
|
);
|
|
1262
1237
|
}
|
|
1263
1238
|
}
|
|
@@ -1266,7 +1241,7 @@ const COMPASS_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAM
|
|
|
1266
1241
|
|
|
1267
1242
|
/* src/floorplan/Components/Compass.svelte generated by Svelte v3.49.0 */
|
|
1268
1243
|
|
|
1269
|
-
function add_css$
|
|
1244
|
+
function add_css$n(target) {
|
|
1270
1245
|
internal.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}");
|
|
1271
1246
|
}
|
|
1272
1247
|
|
|
@@ -1307,7 +1282,7 @@ function create_if_block$b(ctx) {
|
|
|
1307
1282
|
};
|
|
1308
1283
|
}
|
|
1309
1284
|
|
|
1310
|
-
function create_fragment$
|
|
1285
|
+
function create_fragment$s(ctx) {
|
|
1311
1286
|
let if_block_anchor;
|
|
1312
1287
|
let if_block = /*canCompassShow*/ ctx[1] && create_if_block$b(ctx);
|
|
1313
1288
|
|
|
@@ -1336,7 +1311,7 @@ function rad2Deg(rad) {
|
|
|
1336
1311
|
return rad / Math.PI * 180;
|
|
1337
1312
|
}
|
|
1338
1313
|
|
|
1339
|
-
function instance$
|
|
1314
|
+
function instance$s($$self, $$props, $$invalidate) {
|
|
1340
1315
|
var _a;
|
|
1341
1316
|
let { floorplanData } = $$props;
|
|
1342
1317
|
let { northDesc } = $$props;
|
|
@@ -1360,17 +1335,17 @@ function instance$r($$self, $$props, $$invalidate) {
|
|
|
1360
1335
|
class Compass extends internal.SvelteComponent {
|
|
1361
1336
|
constructor(options) {
|
|
1362
1337
|
super();
|
|
1363
|
-
internal.init(this, options, instance$
|
|
1338
|
+
internal.init(this, options, instance$s, create_fragment$s, internal.safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$n);
|
|
1364
1339
|
}
|
|
1365
1340
|
}
|
|
1366
1341
|
|
|
1367
1342
|
/* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.49.0 */
|
|
1368
1343
|
|
|
1369
|
-
function add_css$
|
|
1344
|
+
function add_css$m(target) {
|
|
1370
1345
|
internal.append_styles(target, "svelte-1gfoniz", "img.svelte-1gfoniz{width:100%;height:100%}");
|
|
1371
1346
|
}
|
|
1372
1347
|
|
|
1373
|
-
function create_fragment$
|
|
1348
|
+
function create_fragment$r(ctx) {
|
|
1374
1349
|
let img;
|
|
1375
1350
|
let img_src_value;
|
|
1376
1351
|
|
|
@@ -1397,7 +1372,7 @@ function create_fragment$q(ctx) {
|
|
|
1397
1372
|
};
|
|
1398
1373
|
}
|
|
1399
1374
|
|
|
1400
|
-
function instance$
|
|
1375
|
+
function instance$r($$self, $$props, $$invalidate) {
|
|
1401
1376
|
let { url } = $$props;
|
|
1402
1377
|
|
|
1403
1378
|
$$self.$$set = $$props => {
|
|
@@ -1410,17 +1385,17 @@ function instance$q($$self, $$props, $$invalidate) {
|
|
|
1410
1385
|
class Normalmage extends internal.SvelteComponent {
|
|
1411
1386
|
constructor(options) {
|
|
1412
1387
|
super();
|
|
1413
|
-
internal.init(this, options, instance$
|
|
1388
|
+
internal.init(this, options, instance$r, create_fragment$r, internal.safe_not_equal, { url: 0 }, add_css$m);
|
|
1414
1389
|
}
|
|
1415
1390
|
}
|
|
1416
1391
|
|
|
1417
1392
|
/* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.49.0 */
|
|
1418
1393
|
|
|
1419
|
-
function add_css$
|
|
1394
|
+
function add_css$l(target) {
|
|
1420
1395
|
internal.append_styles(target, "svelte-ub47ya", ".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}");
|
|
1421
1396
|
}
|
|
1422
1397
|
|
|
1423
|
-
function create_fragment$
|
|
1398
|
+
function create_fragment$q(ctx) {
|
|
1424
1399
|
let div;
|
|
1425
1400
|
let html_tag;
|
|
1426
1401
|
let t;
|
|
@@ -1453,7 +1428,7 @@ function create_fragment$p(ctx) {
|
|
|
1453
1428
|
};
|
|
1454
1429
|
}
|
|
1455
1430
|
|
|
1456
|
-
function instance$
|
|
1431
|
+
function instance$q($$self, $$props, $$invalidate) {
|
|
1457
1432
|
let { content } = $$props;
|
|
1458
1433
|
|
|
1459
1434
|
const svgStyle = `
|
|
@@ -1477,18 +1452,18 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
1477
1452
|
class SvgImage extends internal.SvelteComponent {
|
|
1478
1453
|
constructor(options) {
|
|
1479
1454
|
super();
|
|
1480
|
-
internal.init(this, options, instance$
|
|
1455
|
+
internal.init(this, options, instance$q, create_fragment$q, internal.safe_not_equal, { content: 0 }, add_css$l);
|
|
1481
1456
|
}
|
|
1482
1457
|
}
|
|
1483
1458
|
|
|
1484
1459
|
/* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.49.0 */
|
|
1485
1460
|
|
|
1486
|
-
function add_css$
|
|
1461
|
+
function add_css$k(target) {
|
|
1487
1462
|
internal.append_styles(target, "svelte-ozpg4a", ".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
|
|
1488
1463
|
}
|
|
1489
1464
|
|
|
1490
1465
|
// (13:22)
|
|
1491
|
-
function create_if_block_1$
|
|
1466
|
+
function create_if_block_1$6(ctx) {
|
|
1492
1467
|
let normalimage;
|
|
1493
1468
|
let current;
|
|
1494
1469
|
normalimage = new Normalmage({ props: { url: /*imageData*/ ctx[1].url } });
|
|
@@ -1558,12 +1533,12 @@ function create_if_block$a(ctx) {
|
|
|
1558
1533
|
};
|
|
1559
1534
|
}
|
|
1560
1535
|
|
|
1561
|
-
function create_fragment$
|
|
1536
|
+
function create_fragment$p(ctx) {
|
|
1562
1537
|
let div;
|
|
1563
1538
|
let current_block_type_index;
|
|
1564
1539
|
let if_block;
|
|
1565
1540
|
let current;
|
|
1566
|
-
const if_block_creators = [create_if_block$a, create_if_block_1$
|
|
1541
|
+
const if_block_creators = [create_if_block$a, create_if_block_1$6];
|
|
1567
1542
|
const if_blocks = [];
|
|
1568
1543
|
|
|
1569
1544
|
function select_block_type(ctx, dirty) {
|
|
@@ -1646,7 +1621,7 @@ function create_fragment$o(ctx) {
|
|
|
1646
1621
|
};
|
|
1647
1622
|
}
|
|
1648
1623
|
|
|
1649
|
-
function instance$
|
|
1624
|
+
function instance$p($$self, $$props, $$invalidate) {
|
|
1650
1625
|
let imageData;
|
|
1651
1626
|
let svgContent;
|
|
1652
1627
|
var _a, _b;
|
|
@@ -1678,18 +1653,18 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
1678
1653
|
class BaseImage extends internal.SvelteComponent {
|
|
1679
1654
|
constructor(options) {
|
|
1680
1655
|
super();
|
|
1681
|
-
internal.init(this, options, instance$
|
|
1656
|
+
internal.init(this, options, instance$p, create_fragment$p, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$k);
|
|
1682
1657
|
}
|
|
1683
1658
|
}
|
|
1684
1659
|
|
|
1685
1660
|
/* src/floorplan/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.49.0 */
|
|
1686
1661
|
|
|
1687
|
-
function add_css$
|
|
1662
|
+
function add_css$j(target) {
|
|
1688
1663
|
internal.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}");
|
|
1689
1664
|
}
|
|
1690
1665
|
|
|
1691
1666
|
// (95:30)
|
|
1692
|
-
function create_if_block_1$
|
|
1667
|
+
function create_if_block_1$5(ctx) {
|
|
1693
1668
|
let html_tag;
|
|
1694
1669
|
let raw_value = /*userConfigElement*/ ctx[4].outerHTML + "";
|
|
1695
1670
|
let html_anchor;
|
|
@@ -1749,12 +1724,12 @@ function create_if_block$9(ctx) {
|
|
|
1749
1724
|
};
|
|
1750
1725
|
}
|
|
1751
1726
|
|
|
1752
|
-
function create_fragment$
|
|
1727
|
+
function create_fragment$o(ctx) {
|
|
1753
1728
|
let div;
|
|
1754
1729
|
|
|
1755
1730
|
function select_block_type(ctx, dirty) {
|
|
1756
1731
|
if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$9;
|
|
1757
|
-
if (/*userConfigElement*/ ctx[4]) return create_if_block_1$
|
|
1732
|
+
if (/*userConfigElement*/ ctx[4]) return create_if_block_1$5;
|
|
1758
1733
|
}
|
|
1759
1734
|
|
|
1760
1735
|
let current_block_type = select_block_type(ctx);
|
|
@@ -1823,7 +1798,7 @@ function isPointInPolygon(point, polygon) {
|
|
|
1823
1798
|
return inside;
|
|
1824
1799
|
}
|
|
1825
1800
|
|
|
1826
|
-
function instance$
|
|
1801
|
+
function instance$o($$self, $$props, $$invalidate) {
|
|
1827
1802
|
let isLabelInRoom;
|
|
1828
1803
|
let userConfigElement;
|
|
1829
1804
|
let labelVisible;
|
|
@@ -1967,8 +1942,8 @@ class RoomLabel extends internal.SvelteComponent {
|
|
|
1967
1942
|
internal.init(
|
|
1968
1943
|
this,
|
|
1969
1944
|
options,
|
|
1970
|
-
instance$
|
|
1971
|
-
create_fragment$
|
|
1945
|
+
instance$o,
|
|
1946
|
+
create_fragment$o,
|
|
1972
1947
|
internal.safe_not_equal,
|
|
1973
1948
|
{
|
|
1974
1949
|
pxmm: 9,
|
|
@@ -1977,14 +1952,14 @@ class RoomLabel extends internal.SvelteComponent {
|
|
|
1977
1952
|
getLabelElement: 1,
|
|
1978
1953
|
adaptiveRoomLabelVisibleEnable: 11
|
|
1979
1954
|
},
|
|
1980
|
-
add_css$
|
|
1955
|
+
add_css$j
|
|
1981
1956
|
);
|
|
1982
1957
|
}
|
|
1983
1958
|
}
|
|
1984
1959
|
|
|
1985
1960
|
/* src/floorplan/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.49.0 */
|
|
1986
1961
|
|
|
1987
|
-
function add_css$
|
|
1962
|
+
function add_css$i(target) {
|
|
1988
1963
|
internal.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}");
|
|
1989
1964
|
}
|
|
1990
1965
|
|
|
@@ -2137,7 +2112,7 @@ function create_each_block$b(key_1, ctx) {
|
|
|
2137
2112
|
};
|
|
2138
2113
|
}
|
|
2139
2114
|
|
|
2140
|
-
function create_fragment$
|
|
2115
|
+
function create_fragment$n(ctx) {
|
|
2141
2116
|
let if_block_anchor;
|
|
2142
2117
|
let current;
|
|
2143
2118
|
let if_block = /*rooms*/ ctx[5] && create_if_block$8(ctx);
|
|
@@ -2192,7 +2167,7 @@ function create_fragment$m(ctx) {
|
|
|
2192
2167
|
};
|
|
2193
2168
|
}
|
|
2194
2169
|
|
|
2195
|
-
function instance$
|
|
2170
|
+
function instance$n($$self, $$props, $$invalidate) {
|
|
2196
2171
|
let rooms;
|
|
2197
2172
|
let { floorIndex } = $$props;
|
|
2198
2173
|
let { floorplanData } = $$props;
|
|
@@ -2249,8 +2224,8 @@ class RoomLabels extends internal.SvelteComponent {
|
|
|
2249
2224
|
internal.init(
|
|
2250
2225
|
this,
|
|
2251
2226
|
options,
|
|
2252
|
-
instance$
|
|
2253
|
-
create_fragment$
|
|
2227
|
+
instance$n,
|
|
2228
|
+
create_fragment$n,
|
|
2254
2229
|
internal.safe_not_equal,
|
|
2255
2230
|
{
|
|
2256
2231
|
floorIndex: 6,
|
|
@@ -2259,14 +2234,14 @@ class RoomLabels extends internal.SvelteComponent {
|
|
|
2259
2234
|
getLabelElement: 1,
|
|
2260
2235
|
adaptiveRoomLabelVisibleEnable: 2
|
|
2261
2236
|
},
|
|
2262
|
-
add_css$
|
|
2237
|
+
add_css$i
|
|
2263
2238
|
);
|
|
2264
2239
|
}
|
|
2265
2240
|
}
|
|
2266
2241
|
|
|
2267
2242
|
/* src/floorplan/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.49.0 */
|
|
2268
2243
|
|
|
2269
|
-
function add_css$
|
|
2244
|
+
function add_css$h(target) {
|
|
2270
2245
|
internal.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}");
|
|
2271
2246
|
}
|
|
2272
2247
|
|
|
@@ -2342,7 +2317,7 @@ function create_each_block$a(key_1, ctx) {
|
|
|
2342
2317
|
};
|
|
2343
2318
|
}
|
|
2344
2319
|
|
|
2345
|
-
function create_fragment$
|
|
2320
|
+
function create_fragment$m(ctx) {
|
|
2346
2321
|
let div3;
|
|
2347
2322
|
let div0;
|
|
2348
2323
|
let t0;
|
|
@@ -2465,7 +2440,7 @@ function create_fragment$l(ctx) {
|
|
|
2465
2440
|
const padding$1 = 1000;
|
|
2466
2441
|
const exteriorWallOffset$1 = 180;
|
|
2467
2442
|
|
|
2468
|
-
function instance$
|
|
2443
|
+
function instance$m($$self, $$props, $$invalidate) {
|
|
2469
2444
|
let { type } = $$props;
|
|
2470
2445
|
let { data } = $$props;
|
|
2471
2446
|
let { bounding } = $$props;
|
|
@@ -2524,13 +2499,13 @@ function instance$l($$self, $$props, $$invalidate) {
|
|
|
2524
2499
|
class RuleItem extends internal.SvelteComponent {
|
|
2525
2500
|
constructor(options) {
|
|
2526
2501
|
super();
|
|
2527
|
-
internal.init(this, options, instance$
|
|
2502
|
+
internal.init(this, options, instance$m, create_fragment$m, internal.safe_not_equal, { type: 0, data: 4, bounding: 5 }, add_css$h);
|
|
2528
2503
|
}
|
|
2529
2504
|
}
|
|
2530
2505
|
|
|
2531
2506
|
/* src/floorplan/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.49.0 */
|
|
2532
2507
|
|
|
2533
|
-
function add_css$
|
|
2508
|
+
function add_css$g(target) {
|
|
2534
2509
|
internal.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}");
|
|
2535
2510
|
}
|
|
2536
2511
|
|
|
@@ -2607,7 +2582,7 @@ function create_each_block$9(key_1, ctx) {
|
|
|
2607
2582
|
};
|
|
2608
2583
|
}
|
|
2609
2584
|
|
|
2610
|
-
function create_fragment$
|
|
2585
|
+
function create_fragment$l(ctx) {
|
|
2611
2586
|
let div;
|
|
2612
2587
|
let each_blocks = [];
|
|
2613
2588
|
let each_1_lookup = new Map();
|
|
@@ -2687,7 +2662,7 @@ function create_fragment$k(ctx) {
|
|
|
2687
2662
|
const padding = 1000;
|
|
2688
2663
|
const exteriorWallOffset = 180;
|
|
2689
2664
|
|
|
2690
|
-
function instance$
|
|
2665
|
+
function instance$l($$self, $$props, $$invalidate) {
|
|
2691
2666
|
let bounding;
|
|
2692
2667
|
let ruleLabelData;
|
|
2693
2668
|
let ruleLabelDataKeys;
|
|
@@ -2767,7 +2742,7 @@ function instance$k($$self, $$props, $$invalidate) {
|
|
|
2767
2742
|
class RuleLabels extends internal.SvelteComponent {
|
|
2768
2743
|
constructor(options) {
|
|
2769
2744
|
super();
|
|
2770
|
-
internal.init(this, options, instance$
|
|
2745
|
+
internal.init(this, options, instance$l, create_fragment$l, internal.safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css$g);
|
|
2771
2746
|
}
|
|
2772
2747
|
}
|
|
2773
2748
|
|
|
@@ -2824,7 +2799,7 @@ function getFloorIndexFromModelPosition(position, five) {
|
|
|
2824
2799
|
|
|
2825
2800
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte generated by Svelte v3.49.0 */
|
|
2826
2801
|
|
|
2827
|
-
function create_fragment$
|
|
2802
|
+
function create_fragment$k(ctx) {
|
|
2828
2803
|
let path_1;
|
|
2829
2804
|
|
|
2830
2805
|
return {
|
|
@@ -2849,7 +2824,7 @@ function create_fragment$j(ctx) {
|
|
|
2849
2824
|
};
|
|
2850
2825
|
}
|
|
2851
2826
|
|
|
2852
|
-
function instance$
|
|
2827
|
+
function instance$k($$self, $$props, $$invalidate) {
|
|
2853
2828
|
let d;
|
|
2854
2829
|
let { path } = $$props;
|
|
2855
2830
|
|
|
@@ -2869,13 +2844,13 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
2869
2844
|
class RoomMaterial_0 extends internal.SvelteComponent {
|
|
2870
2845
|
constructor(options) {
|
|
2871
2846
|
super();
|
|
2872
|
-
internal.init(this, options, instance$
|
|
2847
|
+
internal.init(this, options, instance$k, create_fragment$k, internal.safe_not_equal, { path: 1 });
|
|
2873
2848
|
}
|
|
2874
2849
|
}
|
|
2875
2850
|
|
|
2876
2851
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte generated by Svelte v3.49.0 */
|
|
2877
2852
|
|
|
2878
|
-
function create_fragment$
|
|
2853
|
+
function create_fragment$j(ctx) {
|
|
2879
2854
|
let defs;
|
|
2880
2855
|
let pattern;
|
|
2881
2856
|
let rect;
|
|
@@ -2936,7 +2911,7 @@ function create_fragment$i(ctx) {
|
|
|
2936
2911
|
|
|
2937
2912
|
const halfWidth = 6;
|
|
2938
2913
|
|
|
2939
|
-
function instance$
|
|
2914
|
+
function instance$j($$self, $$props, $$invalidate) {
|
|
2940
2915
|
let d;
|
|
2941
2916
|
let { path } = $$props;
|
|
2942
2917
|
const width = halfWidth * 2;
|
|
@@ -2958,13 +2933,13 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
2958
2933
|
class RoomMaterial_1 extends internal.SvelteComponent {
|
|
2959
2934
|
constructor(options) {
|
|
2960
2935
|
super();
|
|
2961
|
-
internal.init(this, options, instance$
|
|
2936
|
+
internal.init(this, options, instance$j, create_fragment$j, internal.safe_not_equal, { path: 3 });
|
|
2962
2937
|
}
|
|
2963
2938
|
}
|
|
2964
2939
|
|
|
2965
2940
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte generated by Svelte v3.49.0 */
|
|
2966
2941
|
|
|
2967
|
-
function create_fragment$
|
|
2942
|
+
function create_fragment$i(ctx) {
|
|
2968
2943
|
let defs;
|
|
2969
2944
|
let pattern0;
|
|
2970
2945
|
let rect0;
|
|
@@ -3065,7 +3040,7 @@ function create_fragment$h(ctx) {
|
|
|
3065
3040
|
};
|
|
3066
3041
|
}
|
|
3067
3042
|
|
|
3068
|
-
function instance$
|
|
3043
|
+
function instance$i($$self, $$props, $$invalidate) {
|
|
3069
3044
|
let d;
|
|
3070
3045
|
let { path } = $$props;
|
|
3071
3046
|
|
|
@@ -3085,13 +3060,13 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
3085
3060
|
class RoomMaterial_2 extends internal.SvelteComponent {
|
|
3086
3061
|
constructor(options) {
|
|
3087
3062
|
super();
|
|
3088
|
-
internal.init(this, options, instance$
|
|
3063
|
+
internal.init(this, options, instance$i, create_fragment$i, internal.safe_not_equal, { path: 1 });
|
|
3089
3064
|
}
|
|
3090
3065
|
}
|
|
3091
3066
|
|
|
3092
3067
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial.svelte generated by Svelte v3.49.0 */
|
|
3093
3068
|
|
|
3094
|
-
function add_css$
|
|
3069
|
+
function add_css$f(target) {
|
|
3095
3070
|
internal.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}");
|
|
3096
3071
|
}
|
|
3097
3072
|
|
|
@@ -3102,7 +3077,7 @@ function get_each_context$8(ctx, list, i) {
|
|
|
3102
3077
|
}
|
|
3103
3078
|
|
|
3104
3079
|
// (19:6) {:else}
|
|
3105
|
-
function create_else_block$
|
|
3080
|
+
function create_else_block$2(ctx) {
|
|
3106
3081
|
let roommaterial_1;
|
|
3107
3082
|
let current;
|
|
3108
3083
|
roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[5].path } });
|
|
@@ -3136,7 +3111,7 @@ function create_else_block$1(ctx) {
|
|
|
3136
3111
|
}
|
|
3137
3112
|
|
|
3138
3113
|
// (17:37)
|
|
3139
|
-
function create_if_block_1$
|
|
3114
|
+
function create_if_block_1$4(ctx) {
|
|
3140
3115
|
let roommaterial_2;
|
|
3141
3116
|
let current;
|
|
3142
3117
|
roommaterial_2 = new RoomMaterial_2({ props: { path: /*room*/ ctx[5].path } });
|
|
@@ -3209,7 +3184,7 @@ function create_each_block$8(ctx) {
|
|
|
3209
3184
|
let current_block_type_index;
|
|
3210
3185
|
let if_block;
|
|
3211
3186
|
let current;
|
|
3212
|
-
const if_block_creators = [create_if_block$7, create_if_block_1$
|
|
3187
|
+
const if_block_creators = [create_if_block$7, create_if_block_1$4, create_else_block$2];
|
|
3213
3188
|
const if_blocks = [];
|
|
3214
3189
|
|
|
3215
3190
|
function select_block_type(ctx, dirty) {
|
|
@@ -3278,7 +3253,7 @@ function create_each_block$8(ctx) {
|
|
|
3278
3253
|
};
|
|
3279
3254
|
}
|
|
3280
3255
|
|
|
3281
|
-
function create_fragment$
|
|
3256
|
+
function create_fragment$h(ctx) {
|
|
3282
3257
|
let div;
|
|
3283
3258
|
let current;
|
|
3284
3259
|
let each_value = /*rooms*/ ctx[0];
|
|
@@ -3364,7 +3339,7 @@ function create_fragment$g(ctx) {
|
|
|
3364
3339
|
};
|
|
3365
3340
|
}
|
|
3366
3341
|
|
|
3367
|
-
function instance$
|
|
3342
|
+
function instance$h($$self, $$props, $$invalidate) {
|
|
3368
3343
|
let rooms;
|
|
3369
3344
|
let { floorIndex } = $$props;
|
|
3370
3345
|
let { floorplanData } = $$props;
|
|
@@ -3390,17 +3365,17 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
3390
3365
|
class RoomMaterial extends internal.SvelteComponent {
|
|
3391
3366
|
constructor(options) {
|
|
3392
3367
|
super();
|
|
3393
|
-
internal.init(this, options, instance$
|
|
3368
|
+
internal.init(this, options, instance$h, create_fragment$h, internal.safe_not_equal, { floorIndex: 3, floorplanData: 4 }, add_css$f);
|
|
3394
3369
|
}
|
|
3395
3370
|
}
|
|
3396
3371
|
|
|
3397
3372
|
/* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.49.0 */
|
|
3398
3373
|
|
|
3399
|
-
function add_css$
|
|
3374
|
+
function add_css$e(target) {
|
|
3400
3375
|
internal.append_styles(target, "svelte-19uvvss", "path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}");
|
|
3401
3376
|
}
|
|
3402
3377
|
|
|
3403
|
-
function create_fragment$
|
|
3378
|
+
function create_fragment$g(ctx) {
|
|
3404
3379
|
let path;
|
|
3405
3380
|
let mounted;
|
|
3406
3381
|
let dispose;
|
|
@@ -3435,7 +3410,7 @@ function create_fragment$f(ctx) {
|
|
|
3435
3410
|
};
|
|
3436
3411
|
}
|
|
3437
3412
|
|
|
3438
|
-
function instance$
|
|
3413
|
+
function instance$g($$self, $$props, $$invalidate) {
|
|
3439
3414
|
let { room } = $$props;
|
|
3440
3415
|
let { floorplanData } = $$props;
|
|
3441
3416
|
let { hoveredRoom } = $$props;
|
|
@@ -3471,22 +3446,22 @@ class Room extends internal.SvelteComponent {
|
|
|
3471
3446
|
internal.init(
|
|
3472
3447
|
this,
|
|
3473
3448
|
options,
|
|
3474
|
-
instance$
|
|
3475
|
-
create_fragment$
|
|
3449
|
+
instance$g,
|
|
3450
|
+
create_fragment$g,
|
|
3476
3451
|
internal.safe_not_equal,
|
|
3477
3452
|
{
|
|
3478
3453
|
room: 3,
|
|
3479
3454
|
floorplanData: 4,
|
|
3480
3455
|
hoveredRoom: 5
|
|
3481
3456
|
},
|
|
3482
|
-
add_css$
|
|
3457
|
+
add_css$e
|
|
3483
3458
|
);
|
|
3484
3459
|
}
|
|
3485
3460
|
}
|
|
3486
3461
|
|
|
3487
3462
|
/* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.49.0 */
|
|
3488
3463
|
|
|
3489
|
-
function add_css$
|
|
3464
|
+
function add_css$d(target) {
|
|
3490
3465
|
internal.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}");
|
|
3491
3466
|
}
|
|
3492
3467
|
|
|
@@ -3562,7 +3537,7 @@ function create_each_block$7(key_1, ctx) {
|
|
|
3562
3537
|
};
|
|
3563
3538
|
}
|
|
3564
3539
|
|
|
3565
|
-
function create_fragment$
|
|
3540
|
+
function create_fragment$f(ctx) {
|
|
3566
3541
|
let div;
|
|
3567
3542
|
let svg;
|
|
3568
3543
|
let each_blocks = [];
|
|
@@ -3636,7 +3611,7 @@ function create_fragment$e(ctx) {
|
|
|
3636
3611
|
};
|
|
3637
3612
|
}
|
|
3638
3613
|
|
|
3639
|
-
function instance$
|
|
3614
|
+
function instance$f($$self, $$props, $$invalidate) {
|
|
3640
3615
|
let { floorIndex } = $$props;
|
|
3641
3616
|
let { floorplanData } = $$props;
|
|
3642
3617
|
let { hoveredRoom } = $$props;
|
|
@@ -3659,22 +3634,22 @@ class RoomHighlight extends internal.SvelteComponent {
|
|
|
3659
3634
|
internal.init(
|
|
3660
3635
|
this,
|
|
3661
3636
|
options,
|
|
3662
|
-
instance$
|
|
3663
|
-
create_fragment$
|
|
3637
|
+
instance$f,
|
|
3638
|
+
create_fragment$f,
|
|
3664
3639
|
internal.safe_not_equal,
|
|
3665
3640
|
{
|
|
3666
3641
|
floorIndex: 0,
|
|
3667
3642
|
floorplanData: 1,
|
|
3668
3643
|
hoveredRoom: 2
|
|
3669
3644
|
},
|
|
3670
|
-
add_css$
|
|
3645
|
+
add_css$d
|
|
3671
3646
|
);
|
|
3672
3647
|
}
|
|
3673
3648
|
}
|
|
3674
3649
|
|
|
3675
3650
|
/* src/floorplan/Components/CurrentFloor.svelte generated by Svelte v3.49.0 */
|
|
3676
3651
|
|
|
3677
|
-
function add_css$
|
|
3652
|
+
function add_css$c(target) {
|
|
3678
3653
|
internal.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}");
|
|
3679
3654
|
}
|
|
3680
3655
|
|
|
@@ -3736,7 +3711,7 @@ function create_if_block_2(ctx) {
|
|
|
3736
3711
|
}
|
|
3737
3712
|
|
|
3738
3713
|
// (24:2) {#if roomLabelsEnable}
|
|
3739
|
-
function create_if_block_1$
|
|
3714
|
+
function create_if_block_1$3(ctx) {
|
|
3740
3715
|
let roomlabels;
|
|
3741
3716
|
let current;
|
|
3742
3717
|
|
|
@@ -3851,7 +3826,7 @@ function create_if_block$6(ctx) {
|
|
|
3851
3826
|
};
|
|
3852
3827
|
}
|
|
3853
3828
|
|
|
3854
|
-
function create_fragment$
|
|
3829
|
+
function create_fragment$e(ctx) {
|
|
3855
3830
|
let div;
|
|
3856
3831
|
let roommaterial;
|
|
3857
3832
|
let t0;
|
|
@@ -3892,7 +3867,7 @@ function create_fragment$d(ctx) {
|
|
|
3892
3867
|
}
|
|
3893
3868
|
|
|
3894
3869
|
baseimage = new BaseImage({ props: baseimage_props });
|
|
3895
|
-
let if_block1 = /*roomLabelsEnable*/ ctx[3] && create_if_block_1$
|
|
3870
|
+
let if_block1 = /*roomLabelsEnable*/ ctx[3] && create_if_block_1$3(ctx);
|
|
3896
3871
|
let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$6(ctx);
|
|
3897
3872
|
|
|
3898
3873
|
return {
|
|
@@ -3979,7 +3954,7 @@ function create_fragment$d(ctx) {
|
|
|
3979
3954
|
internal.transition_in(if_block1, 1);
|
|
3980
3955
|
}
|
|
3981
3956
|
} else {
|
|
3982
|
-
if_block1 = create_if_block_1$
|
|
3957
|
+
if_block1 = create_if_block_1$3(ctx);
|
|
3983
3958
|
if_block1.c();
|
|
3984
3959
|
internal.transition_in(if_block1, 1);
|
|
3985
3960
|
if_block1.m(div, t3);
|
|
@@ -4051,7 +4026,7 @@ function create_fragment$d(ctx) {
|
|
|
4051
4026
|
};
|
|
4052
4027
|
}
|
|
4053
4028
|
|
|
4054
|
-
function instance$
|
|
4029
|
+
function instance$e($$self, $$props, $$invalidate) {
|
|
4055
4030
|
let { isCurrent } = $$props;
|
|
4056
4031
|
let { floorIndex } = $$props;
|
|
4057
4032
|
let { hoverEnable } = $$props;
|
|
@@ -4093,8 +4068,8 @@ class CurrentFloor$1 extends internal.SvelteComponent {
|
|
|
4093
4068
|
internal.init(
|
|
4094
4069
|
this,
|
|
4095
4070
|
options,
|
|
4096
|
-
instance$
|
|
4097
|
-
create_fragment$
|
|
4071
|
+
instance$e,
|
|
4072
|
+
create_fragment$e,
|
|
4098
4073
|
internal.safe_not_equal,
|
|
4099
4074
|
{
|
|
4100
4075
|
isCurrent: 0,
|
|
@@ -4106,14 +4081,14 @@ class CurrentFloor$1 extends internal.SvelteComponent {
|
|
|
4106
4081
|
getLabelElement: 6,
|
|
4107
4082
|
adaptiveRoomLabelVisibleEnable: 7
|
|
4108
4083
|
},
|
|
4109
|
-
add_css$
|
|
4084
|
+
add_css$c
|
|
4110
4085
|
);
|
|
4111
4086
|
}
|
|
4112
4087
|
}
|
|
4113
4088
|
|
|
4114
4089
|
/* src/floorplan/Components/Main.svelte generated by Svelte v3.49.0 */
|
|
4115
4090
|
|
|
4116
|
-
function add_css$
|
|
4091
|
+
function add_css$b(target) {
|
|
4117
4092
|
internal.append_styles(target, "svelte-86bqav", ".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}");
|
|
4118
4093
|
}
|
|
4119
4094
|
|
|
@@ -4158,7 +4133,7 @@ function create_if_block$5(ctx) {
|
|
|
4158
4133
|
}
|
|
4159
4134
|
|
|
4160
4135
|
camera = new Camera$1({ props: camera_props });
|
|
4161
|
-
let if_block = /*compassEnable*/ ctx[6] && create_if_block_1$
|
|
4136
|
+
let if_block = /*compassEnable*/ ctx[6] && create_if_block_1$2(ctx);
|
|
4162
4137
|
|
|
4163
4138
|
return {
|
|
4164
4139
|
c() {
|
|
@@ -4238,7 +4213,7 @@ function create_if_block$5(ctx) {
|
|
|
4238
4213
|
internal.transition_in(if_block, 1);
|
|
4239
4214
|
}
|
|
4240
4215
|
} else {
|
|
4241
|
-
if_block = create_if_block_1$
|
|
4216
|
+
if_block = create_if_block_1$2(ctx);
|
|
4242
4217
|
if_block.c();
|
|
4243
4218
|
internal.transition_in(if_block, 1);
|
|
4244
4219
|
if_block.m(div, null);
|
|
@@ -4372,7 +4347,7 @@ function create_each_block$6(ctx) {
|
|
|
4372
4347
|
}
|
|
4373
4348
|
|
|
4374
4349
|
// (39:4) {#if compassEnable}
|
|
4375
|
-
function create_if_block_1$
|
|
4350
|
+
function create_if_block_1$2(ctx) {
|
|
4376
4351
|
let compass;
|
|
4377
4352
|
let current;
|
|
4378
4353
|
|
|
@@ -4412,7 +4387,7 @@ function create_if_block_1$1(ctx) {
|
|
|
4412
4387
|
};
|
|
4413
4388
|
}
|
|
4414
4389
|
|
|
4415
|
-
function create_fragment$
|
|
4390
|
+
function create_fragment$d(ctx) {
|
|
4416
4391
|
let if_block_anchor;
|
|
4417
4392
|
let current;
|
|
4418
4393
|
let if_block = /*visible*/ ctx[1] && create_if_block$5(ctx);
|
|
@@ -4467,7 +4442,7 @@ function create_fragment$c(ctx) {
|
|
|
4467
4442
|
};
|
|
4468
4443
|
}
|
|
4469
4444
|
|
|
4470
|
-
function instance$
|
|
4445
|
+
function instance$d($$self, $$props, $$invalidate) {
|
|
4471
4446
|
let { duration = 0 } = $$props;
|
|
4472
4447
|
let { visible } = $$props;
|
|
4473
4448
|
let { northDesc } = $$props;
|
|
@@ -4525,8 +4500,8 @@ class Main$1 extends internal.SvelteComponent {
|
|
|
4525
4500
|
internal.init(
|
|
4526
4501
|
this,
|
|
4527
4502
|
options,
|
|
4528
|
-
instance$
|
|
4529
|
-
create_fragment$
|
|
4503
|
+
instance$d,
|
|
4504
|
+
create_fragment$d,
|
|
4530
4505
|
internal.safe_not_equal,
|
|
4531
4506
|
{
|
|
4532
4507
|
duration: 0,
|
|
@@ -4544,33 +4519,29 @@ class Main$1 extends internal.SvelteComponent {
|
|
|
4544
4519
|
getLabelElement: 12,
|
|
4545
4520
|
adaptiveRoomLabelVisibleEnable: 13
|
|
4546
4521
|
},
|
|
4547
|
-
add_css$
|
|
4522
|
+
add_css$b
|
|
4548
4523
|
);
|
|
4549
4524
|
}
|
|
4550
4525
|
}
|
|
4551
4526
|
|
|
4552
4527
|
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';
|
|
4553
4528
|
|
|
4554
|
-
function formatOutlines(outlines) {
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
const
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
url: item.url,
|
|
4562
|
-
svgUrl: item.svg_url,
|
|
4563
|
-
};
|
|
4564
|
-
if (item.svg_url) {
|
|
4565
|
-
const svgContent = yield fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
4566
|
-
outlineItem.svgContent = svgContent;
|
|
4567
|
-
}
|
|
4568
|
-
return outlineItem;
|
|
4569
|
-
});
|
|
4529
|
+
async function formatOutlines(outlines) {
|
|
4530
|
+
const headers = new Headers({ 'Content-Type': 'text/plain' });
|
|
4531
|
+
const getOutlineItem = async function (item) {
|
|
4532
|
+
const outlineItem = {
|
|
4533
|
+
index: item.index,
|
|
4534
|
+
url: item.url,
|
|
4535
|
+
svgUrl: item.svg_url,
|
|
4570
4536
|
};
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4537
|
+
if (item.svg_url) {
|
|
4538
|
+
const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
4539
|
+
outlineItem.svgContent = svgContent;
|
|
4540
|
+
}
|
|
4541
|
+
return outlineItem;
|
|
4542
|
+
};
|
|
4543
|
+
const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
|
|
4544
|
+
return svgOutlineItems;
|
|
4574
4545
|
}
|
|
4575
4546
|
function formatRoom(data) {
|
|
4576
4547
|
const floorplanRoomItem = {
|
|
@@ -4616,21 +4587,19 @@ function formatFloorplanEntrance(data) {
|
|
|
4616
4587
|
};
|
|
4617
4588
|
return floorplanEntrance;
|
|
4618
4589
|
}
|
|
4619
|
-
function formatData(data) {
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
return floorplanData;
|
|
4633
|
-
});
|
|
4590
|
+
async function formatData(data) {
|
|
4591
|
+
const outlines = await formatOutlines(data.outlines);
|
|
4592
|
+
const bounding = data.computed_data.bounding;
|
|
4593
|
+
const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
|
|
4594
|
+
const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
|
|
4595
|
+
const floorplanData = {
|
|
4596
|
+
outlines,
|
|
4597
|
+
entrance,
|
|
4598
|
+
bounding,
|
|
4599
|
+
floorDatas,
|
|
4600
|
+
observers: data.computed_data.observers.map(formateFloorplanObserver),
|
|
4601
|
+
};
|
|
4602
|
+
return floorplanData;
|
|
4634
4603
|
}
|
|
4635
4604
|
function formatExtraObjects(data, five, floorplanData) {
|
|
4636
4605
|
const extraObjects = data.map((object) => {
|
|
@@ -4725,37 +4694,35 @@ function nearlyEqual(num1, num2, accuracy = 4) {
|
|
|
4725
4694
|
/** 等待 five changeMode 结束
|
|
4726
4695
|
* @description Promise 的状态只代表 mode 与预期是否一致,不保证参数的一致性
|
|
4727
4696
|
*/
|
|
4728
|
-
function changeMode(five, changeModeParams) {
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
five.
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
const
|
|
4740
|
-
|
|
4741
|
-
|
|
4697
|
+
async function changeMode(five, changeModeParams) {
|
|
4698
|
+
await new Promise((resolve, reject) => {
|
|
4699
|
+
// 虽然 changeMode 是异步函数,但不代表异步流程结束代表切换 Mode 动画结束
|
|
4700
|
+
five.changeMode(...changeModeParams).catch((error) => reject(error));
|
|
4701
|
+
five.once('initAnimationEnded', () => {
|
|
4702
|
+
const fiveCurrentState = five.getCurrentState();
|
|
4703
|
+
const correctMode = changeModeParams[0];
|
|
4704
|
+
if (fiveCurrentState.mode !== correctMode)
|
|
4705
|
+
reject(new Error('mode 与预期不符'));
|
|
4706
|
+
/** 检测当前的 current pose 和传入的 pose 是否一致 */
|
|
4707
|
+
const checkPose = () => {
|
|
4708
|
+
const correctPose = changeModeParams[1];
|
|
4709
|
+
if (!correctPose)
|
|
4710
|
+
return true;
|
|
4711
|
+
return Object.keys(correctPose).every((key) => {
|
|
4712
|
+
const fivePoseItem = fiveCurrentState[key];
|
|
4713
|
+
if (fivePoseItem === undefined)
|
|
4742
4714
|
return true;
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
const checkPoseResult = checkPose();
|
|
4755
|
-
if (!checkPoseResult)
|
|
4756
|
-
reject(new Error('five pose 与预期不符'));
|
|
4757
|
-
resolve();
|
|
4758
|
-
});
|
|
4715
|
+
const correctPoseItem = correctPose[key];
|
|
4716
|
+
if (typeof fivePoseItem === 'number' && typeof correctPoseItem === 'number') {
|
|
4717
|
+
return nearlyEqual(fivePoseItem, correctPoseItem, 2);
|
|
4718
|
+
}
|
|
4719
|
+
return fivePoseItem === correctPoseItem;
|
|
4720
|
+
});
|
|
4721
|
+
};
|
|
4722
|
+
const checkPoseResult = checkPose();
|
|
4723
|
+
if (!checkPoseResult)
|
|
4724
|
+
reject(new Error('five pose 与预期不符'));
|
|
4725
|
+
resolve();
|
|
4759
4726
|
});
|
|
4760
4727
|
});
|
|
4761
4728
|
}
|
|
@@ -5102,24 +5069,22 @@ class Controller$3 extends Controller$4 {
|
|
|
5102
5069
|
five.once('dispose', this.dispose);
|
|
5103
5070
|
this.addEventListener();
|
|
5104
5071
|
}
|
|
5105
|
-
load(serverData, state, userAction = true) {
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
this.render();
|
|
5122
|
-
});
|
|
5072
|
+
async load(serverData, state, userAction = true) {
|
|
5073
|
+
function isPluginServerData(serverData) {
|
|
5074
|
+
return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
|
|
5075
|
+
}
|
|
5076
|
+
const _data = serverData;
|
|
5077
|
+
if (_data && !_data.version)
|
|
5078
|
+
console.warn('传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数');
|
|
5079
|
+
const copyData = JSON.parse(JSON.stringify(serverData));
|
|
5080
|
+
const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
|
|
5081
|
+
const prevData = this.data;
|
|
5082
|
+
this.data = await formatData(_serverData);
|
|
5083
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
5084
|
+
this.hooks.emit('dataChange', this.data, prevData);
|
|
5085
|
+
if (state)
|
|
5086
|
+
this.updateState(state, userAction);
|
|
5087
|
+
this.render();
|
|
5123
5088
|
}
|
|
5124
5089
|
/** 更新户型图位置 */
|
|
5125
5090
|
updatePosition() {
|
|
@@ -5144,25 +5109,21 @@ class Controller$3 extends Controller$4 {
|
|
|
5144
5109
|
this.render();
|
|
5145
5110
|
return this;
|
|
5146
5111
|
}
|
|
5147
|
-
show(options = {}) {
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
this._show({ userAction });
|
|
5155
|
-
});
|
|
5112
|
+
async show(options = {}) {
|
|
5113
|
+
// 已经展示完成了,不做任何操作
|
|
5114
|
+
if (this.state.visible)
|
|
5115
|
+
return;
|
|
5116
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
5117
|
+
this.updateState({ visible: true }, userAction);
|
|
5118
|
+
this._show({ userAction });
|
|
5156
5119
|
}
|
|
5157
|
-
hide(options = {}) {
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
this._hide({ userAction });
|
|
5165
|
-
});
|
|
5120
|
+
async hide(options = {}) {
|
|
5121
|
+
this.isHiddenByHideFunc = true;
|
|
5122
|
+
if (!this.state.visible)
|
|
5123
|
+
return;
|
|
5124
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
5125
|
+
this.updateState({ visible: false }, userAction);
|
|
5126
|
+
this._hide({ userAction });
|
|
5166
5127
|
}
|
|
5167
5128
|
enable(options = {}) {
|
|
5168
5129
|
if (this.state.enabled)
|
|
@@ -5192,42 +5153,36 @@ class Controller$3 extends Controller$4 {
|
|
|
5192
5153
|
state.visible ? this._show(options) : this._hide(options);
|
|
5193
5154
|
}
|
|
5194
5155
|
}
|
|
5195
|
-
formatData(serverData) {
|
|
5196
|
-
return
|
|
5197
|
-
return yield formatData(serverData.data);
|
|
5198
|
-
});
|
|
5156
|
+
async formatData(serverData) {
|
|
5157
|
+
return await formatData(serverData.data);
|
|
5199
5158
|
}
|
|
5200
|
-
_show(options) {
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
this.render();
|
|
5218
|
-
});
|
|
5159
|
+
async _show(options) {
|
|
5160
|
+
if (!this.state.enabled)
|
|
5161
|
+
return;
|
|
5162
|
+
this.isHiddenByHideFunc = false;
|
|
5163
|
+
const { userAction } = options;
|
|
5164
|
+
this.hooks.emit('show', { userAction });
|
|
5165
|
+
if (this.five.getCurrentState().mode !== 'Topview') {
|
|
5166
|
+
await changeMode(this.five, ['Topview', undefined, undefined, userAction]);
|
|
5167
|
+
}
|
|
5168
|
+
this.five.model.show(this.floorIndex);
|
|
5169
|
+
this.updatePosition();
|
|
5170
|
+
this.updateSize();
|
|
5171
|
+
const renderDuration = 500;
|
|
5172
|
+
const modelOpacity = this.state.config.modelOpacity;
|
|
5173
|
+
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
5174
|
+
this.hooks.emit('showAnimationEnded', { userAction });
|
|
5175
|
+
this.render();
|
|
5219
5176
|
}
|
|
5220
|
-
_hide(options) {
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
this.render();
|
|
5230
|
-
});
|
|
5177
|
+
async _hide(options) {
|
|
5178
|
+
if (!this.state.enabled)
|
|
5179
|
+
return;
|
|
5180
|
+
const { userAction } = options;
|
|
5181
|
+
this.hooks.emit('hide', { userAction });
|
|
5182
|
+
const modelOpacity = 1;
|
|
5183
|
+
const renderDuration = 0;
|
|
5184
|
+
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
5185
|
+
this.render();
|
|
5231
5186
|
}
|
|
5232
5187
|
_enable(options) {
|
|
5233
5188
|
const { userAction } = options;
|
|
@@ -5327,11 +5282,11 @@ function throttle(func, wait = 200) {
|
|
|
5327
5282
|
|
|
5328
5283
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte generated by Svelte v3.49.0 */
|
|
5329
5284
|
|
|
5330
|
-
function add_css$
|
|
5285
|
+
function add_css$a(target) {
|
|
5331
5286
|
internal.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%}");
|
|
5332
5287
|
}
|
|
5333
5288
|
|
|
5334
|
-
function create_fragment$
|
|
5289
|
+
function create_fragment$c(ctx) {
|
|
5335
5290
|
let div2;
|
|
5336
5291
|
let div1;
|
|
5337
5292
|
let div0;
|
|
@@ -5381,7 +5336,7 @@ function getCameraRotateTransform(longitude) {
|
|
|
5381
5336
|
return `rotate(${rotate}deg)`;
|
|
5382
5337
|
}
|
|
5383
5338
|
|
|
5384
|
-
function instance$
|
|
5339
|
+
function instance$c($$self, $$props, $$invalidate) {
|
|
5385
5340
|
let positionTransform;
|
|
5386
5341
|
let rotateTransform;
|
|
5387
5342
|
let { five } = $$props;
|
|
@@ -5461,8 +5416,8 @@ class Camera extends internal.SvelteComponent {
|
|
|
5461
5416
|
internal.init(
|
|
5462
5417
|
this,
|
|
5463
5418
|
options,
|
|
5464
|
-
instance$
|
|
5465
|
-
create_fragment$
|
|
5419
|
+
instance$c,
|
|
5420
|
+
create_fragment$c,
|
|
5466
5421
|
internal.safe_not_equal,
|
|
5467
5422
|
{
|
|
5468
5423
|
five: 3,
|
|
@@ -5470,14 +5425,14 @@ class Camera extends internal.SvelteComponent {
|
|
|
5470
5425
|
floorplanData: 5,
|
|
5471
5426
|
cameraImageUrl: 0
|
|
5472
5427
|
},
|
|
5473
|
-
add_css$
|
|
5428
|
+
add_css$a
|
|
5474
5429
|
);
|
|
5475
5430
|
}
|
|
5476
5431
|
}
|
|
5477
5432
|
|
|
5478
5433
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte generated by Svelte v3.49.0 */
|
|
5479
5434
|
|
|
5480
|
-
function add_css$
|
|
5435
|
+
function add_css$9(target) {
|
|
5481
5436
|
internal.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%)}");
|
|
5482
5437
|
}
|
|
5483
5438
|
|
|
@@ -5547,7 +5502,7 @@ function create_each_block$5(key_1, ctx) {
|
|
|
5547
5502
|
};
|
|
5548
5503
|
}
|
|
5549
5504
|
|
|
5550
|
-
function create_fragment$
|
|
5505
|
+
function create_fragment$b(ctx) {
|
|
5551
5506
|
let div;
|
|
5552
5507
|
let each_blocks = [];
|
|
5553
5508
|
let each_1_lookup = new Map();
|
|
@@ -5595,7 +5550,7 @@ function create_fragment$a(ctx) {
|
|
|
5595
5550
|
};
|
|
5596
5551
|
}
|
|
5597
5552
|
|
|
5598
|
-
function instance$
|
|
5553
|
+
function instance$b($$self, $$props, $$invalidate) {
|
|
5599
5554
|
let { extraObjects = [] } = $$props;
|
|
5600
5555
|
|
|
5601
5556
|
$$self.$$set = $$props => {
|
|
@@ -5608,7 +5563,7 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
5608
5563
|
class ExtraObjects extends internal.SvelteComponent {
|
|
5609
5564
|
constructor(options) {
|
|
5610
5565
|
super();
|
|
5611
|
-
internal.init(this, options, instance$
|
|
5566
|
+
internal.init(this, options, instance$b, create_fragment$b, internal.safe_not_equal, { extraObjects: 0 }, add_css$9);
|
|
5612
5567
|
}
|
|
5613
5568
|
}
|
|
5614
5569
|
|
|
@@ -5674,7 +5629,7 @@ function create_if_block$4(ctx) {
|
|
|
5674
5629
|
};
|
|
5675
5630
|
}
|
|
5676
5631
|
|
|
5677
|
-
function create_fragment$
|
|
5632
|
+
function create_fragment$a(ctx) {
|
|
5678
5633
|
let baseimage;
|
|
5679
5634
|
let t0;
|
|
5680
5635
|
let extraobjects;
|
|
@@ -5785,7 +5740,7 @@ function create_fragment$9(ctx) {
|
|
|
5785
5740
|
};
|
|
5786
5741
|
}
|
|
5787
5742
|
|
|
5788
|
-
function instance$
|
|
5743
|
+
function instance$a($$self, $$props, $$invalidate) {
|
|
5789
5744
|
let currentFloorExtraObjects;
|
|
5790
5745
|
let { five } = $$props;
|
|
5791
5746
|
let { pxmm } = $$props;
|
|
@@ -5828,7 +5783,7 @@ class CurrentFloor extends internal.SvelteComponent {
|
|
|
5828
5783
|
constructor(options) {
|
|
5829
5784
|
super();
|
|
5830
5785
|
|
|
5831
|
-
internal.init(this, options, instance$
|
|
5786
|
+
internal.init(this, options, instance$a, create_fragment$a, internal.safe_not_equal, {
|
|
5832
5787
|
five: 0,
|
|
5833
5788
|
pxmm: 1,
|
|
5834
5789
|
floorIndex: 2,
|
|
@@ -5841,7 +5796,7 @@ class CurrentFloor extends internal.SvelteComponent {
|
|
|
5841
5796
|
|
|
5842
5797
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte generated by Svelte v3.49.0 */
|
|
5843
5798
|
|
|
5844
|
-
function add_css$
|
|
5799
|
+
function add_css$8(target) {
|
|
5845
5800
|
internal.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}");
|
|
5846
5801
|
}
|
|
5847
5802
|
|
|
@@ -5850,7 +5805,7 @@ function create_if_block$3(ctx) {
|
|
|
5850
5805
|
let div;
|
|
5851
5806
|
let div_resize_listener;
|
|
5852
5807
|
let current;
|
|
5853
|
-
let if_block = /*clientWidth*/ ctx[6] !== 0 && create_if_block_1(ctx);
|
|
5808
|
+
let if_block = /*clientWidth*/ ctx[6] !== 0 && create_if_block_1$1(ctx);
|
|
5854
5809
|
|
|
5855
5810
|
return {
|
|
5856
5811
|
c() {
|
|
@@ -5874,7 +5829,7 @@ function create_if_block$3(ctx) {
|
|
|
5874
5829
|
internal.transition_in(if_block, 1);
|
|
5875
5830
|
}
|
|
5876
5831
|
} else {
|
|
5877
|
-
if_block = create_if_block_1(ctx);
|
|
5832
|
+
if_block = create_if_block_1$1(ctx);
|
|
5878
5833
|
if_block.c();
|
|
5879
5834
|
internal.transition_in(if_block, 1);
|
|
5880
5835
|
if_block.m(div, null);
|
|
@@ -5907,7 +5862,7 @@ function create_if_block$3(ctx) {
|
|
|
5907
5862
|
}
|
|
5908
5863
|
|
|
5909
5864
|
// (43:4) {#if clientWidth !== 0}
|
|
5910
|
-
function create_if_block_1(ctx) {
|
|
5865
|
+
function create_if_block_1$1(ctx) {
|
|
5911
5866
|
let div;
|
|
5912
5867
|
let currentfloor;
|
|
5913
5868
|
let t;
|
|
@@ -6025,7 +5980,7 @@ function create_if_block_1(ctx) {
|
|
|
6025
5980
|
};
|
|
6026
5981
|
}
|
|
6027
5982
|
|
|
6028
|
-
function create_fragment$
|
|
5983
|
+
function create_fragment$9(ctx) {
|
|
6029
5984
|
let if_block_anchor;
|
|
6030
5985
|
let current;
|
|
6031
5986
|
let if_block = /*visible*/ ctx[1] && create_if_block$3(ctx);
|
|
@@ -6080,7 +6035,7 @@ function create_fragment$8(ctx) {
|
|
|
6080
6035
|
};
|
|
6081
6036
|
}
|
|
6082
6037
|
|
|
6083
|
-
function instance$
|
|
6038
|
+
function instance$9($$self, $$props, $$invalidate) {
|
|
6084
6039
|
let { five } = $$props;
|
|
6085
6040
|
let { visible } = $$props;
|
|
6086
6041
|
let { hoverEnable } = $$props;
|
|
@@ -6166,8 +6121,8 @@ class Main extends internal.SvelteComponent {
|
|
|
6166
6121
|
internal.init(
|
|
6167
6122
|
this,
|
|
6168
6123
|
options,
|
|
6169
|
-
instance$
|
|
6170
|
-
create_fragment$
|
|
6124
|
+
instance$9,
|
|
6125
|
+
create_fragment$9,
|
|
6171
6126
|
internal.safe_not_equal,
|
|
6172
6127
|
{
|
|
6173
6128
|
five: 0,
|
|
@@ -6177,7 +6132,7 @@ class Main extends internal.SvelteComponent {
|
|
|
6177
6132
|
cameraImageUrl: 4,
|
|
6178
6133
|
extraObjects: 5
|
|
6179
6134
|
},
|
|
6180
|
-
add_css$
|
|
6135
|
+
add_css$8
|
|
6181
6136
|
);
|
|
6182
6137
|
}
|
|
6183
6138
|
}
|
|
@@ -6280,55 +6235,49 @@ class Controller$2 extends Controller$4 {
|
|
|
6280
6235
|
// =============== init Listener ===============
|
|
6281
6236
|
five.once('dispose', this.dispose);
|
|
6282
6237
|
}
|
|
6283
|
-
load(serverData, state, userAction = true) {
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
this.render();
|
|
6312
|
-
});
|
|
6238
|
+
async load(serverData, state, userAction = true) {
|
|
6239
|
+
// const loadImage = async () => {
|
|
6240
|
+
// const floorIndex = this.five.work.observers[this.five.getCurrentState().panoIndex].floorIndex
|
|
6241
|
+
// // 当有 svgString 时,没有加载过程
|
|
6242
|
+
// if (floorplanData.outlines[floorIndex]?.svgContent) return
|
|
6243
|
+
// // 如果当前楼层图片不存在,不存在加载过程
|
|
6244
|
+
// const nowFloorImageSrc = floorplanData.outlines[floorIndex]?.url
|
|
6245
|
+
// if (!nowFloorImageSrc) return
|
|
6246
|
+
// // 图片加载完成时再 render
|
|
6247
|
+
// await new Promise<void>((resolve) => {
|
|
6248
|
+
// const nowFloorImage = new Image()
|
|
6249
|
+
// nowFloorImage.src = nowFloorImageSrc
|
|
6250
|
+
// nowFloorImage.onload = () => resolve()
|
|
6251
|
+
// })
|
|
6252
|
+
// }
|
|
6253
|
+
// await loadImage()
|
|
6254
|
+
function isPluginServerData(serverData) {
|
|
6255
|
+
return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
|
|
6256
|
+
}
|
|
6257
|
+
const copyData = JSON.parse(JSON.stringify(serverData));
|
|
6258
|
+
const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
|
|
6259
|
+
const prevData = this.data;
|
|
6260
|
+
this.data = await formatData(_serverData);
|
|
6261
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
6262
|
+
this.hooks.emit('dataChange', this.data, prevData);
|
|
6263
|
+
if (state)
|
|
6264
|
+
this.updateState(state, userAction);
|
|
6265
|
+
this.render();
|
|
6313
6266
|
}
|
|
6314
|
-
show(options = {}) {
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
this._show({ userAction });
|
|
6322
|
-
});
|
|
6267
|
+
async show(options = {}) {
|
|
6268
|
+
// 已经展示完成了,不做任何操作
|
|
6269
|
+
if (this.state.visible)
|
|
6270
|
+
return;
|
|
6271
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
6272
|
+
this.updateState({ visible: true }, userAction);
|
|
6273
|
+
this._show({ userAction });
|
|
6323
6274
|
}
|
|
6324
|
-
hide(options = {}) {
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
this._hide({ userAction });
|
|
6331
|
-
});
|
|
6275
|
+
async hide(options = {}) {
|
|
6276
|
+
if (!this.state.visible)
|
|
6277
|
+
return;
|
|
6278
|
+
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
6279
|
+
this.updateState({ visible: false }, userAction);
|
|
6280
|
+
this._hide({ userAction });
|
|
6332
6281
|
}
|
|
6333
6282
|
enable(options = {}) {
|
|
6334
6283
|
if (this.state.enabled)
|
|
@@ -6373,10 +6322,8 @@ class Controller$2 extends Controller$4 {
|
|
|
6373
6322
|
this.extraObjects = formatExtraObjects(data, this.five, this.data);
|
|
6374
6323
|
this.render();
|
|
6375
6324
|
}
|
|
6376
|
-
formatData(serverData) {
|
|
6377
|
-
return
|
|
6378
|
-
return yield formatData(serverData.data);
|
|
6379
|
-
});
|
|
6325
|
+
async formatData(serverData) {
|
|
6326
|
+
return await formatData(serverData.data);
|
|
6380
6327
|
}
|
|
6381
6328
|
_enable(options) {
|
|
6382
6329
|
const { userAction } = options;
|
|
@@ -6436,18 +6383,16 @@ const PanoFloorplanRadarPlugin = (five, params) => {
|
|
|
6436
6383
|
* 有异常,则返回 [Error, undefined]
|
|
6437
6384
|
* 用于替代 try&catch 处理 await 异常的方案
|
|
6438
6385
|
*/
|
|
6439
|
-
function to(promise) {
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
}
|
|
6450
|
-
});
|
|
6386
|
+
async function to(promise) {
|
|
6387
|
+
try {
|
|
6388
|
+
const data = await promise;
|
|
6389
|
+
return [null, data];
|
|
6390
|
+
}
|
|
6391
|
+
catch (error) {
|
|
6392
|
+
if (error instanceof Error)
|
|
6393
|
+
return [error, null];
|
|
6394
|
+
return [new Error(''), null];
|
|
6395
|
+
}
|
|
6451
6396
|
}
|
|
6452
6397
|
|
|
6453
6398
|
var FloorplanErrorType;
|
|
@@ -6492,29 +6437,27 @@ function checkShowState(five, showState) {
|
|
|
6492
6437
|
* 2. 内置了相应的动画时间计算
|
|
6493
6438
|
* 3. 纠正成功会返回 true,失败「可能会被用户行为中断」会返回 false
|
|
6494
6439
|
*/
|
|
6495
|
-
function correctFiveState(five, showState, userAction = true) {
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
if (result === true)
|
|
6500
|
-
return;
|
|
6501
|
-
const currentFiveState = five.getCurrentState();
|
|
6502
|
-
// 纠正 mode
|
|
6503
|
-
if (currentFiveState.mode !== showState.mode) {
|
|
6504
|
-
const [changeModeError] = yield to(changeMode(five, [showState.mode, showState, undefined, userAction]));
|
|
6505
|
-
if (changeModeError)
|
|
6506
|
-
throw new Error(FloorplanErrorType.ChangeModeError);
|
|
6507
|
-
return;
|
|
6508
|
-
}
|
|
6509
|
-
// 纠正相机状态
|
|
6510
|
-
// 根据 latitude、longitude、fov 计算动画时间,最多 1s
|
|
6511
|
-
const { latitude, longitude, fov } = currentFiveState;
|
|
6512
|
-
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));
|
|
6513
|
-
const [updateCameraError] = yield to(five.updateCamera(showState, time, userAction));
|
|
6514
|
-
if (updateCameraError)
|
|
6515
|
-
throw new Error(FloorplanErrorType.UpdateCameraError);
|
|
6440
|
+
async function correctFiveState(five, showState, userAction = true) {
|
|
6441
|
+
// 当前已满足状态,不需要变更
|
|
6442
|
+
const result = checkShowState(five, showState);
|
|
6443
|
+
if (result === true)
|
|
6516
6444
|
return;
|
|
6517
|
-
|
|
6445
|
+
const currentFiveState = five.getCurrentState();
|
|
6446
|
+
// 纠正 mode
|
|
6447
|
+
if (currentFiveState.mode !== showState.mode) {
|
|
6448
|
+
const [changeModeError] = await to(changeMode(five, [showState.mode, showState, undefined, userAction]));
|
|
6449
|
+
if (changeModeError)
|
|
6450
|
+
throw new Error(FloorplanErrorType.ChangeModeError);
|
|
6451
|
+
return;
|
|
6452
|
+
}
|
|
6453
|
+
// 纠正相机状态
|
|
6454
|
+
// 根据 latitude、longitude、fov 计算动画时间,最多 1s
|
|
6455
|
+
const { latitude, longitude, fov } = currentFiveState;
|
|
6456
|
+
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));
|
|
6457
|
+
const [updateCameraError] = await to(five.updateCamera(showState, time, userAction));
|
|
6458
|
+
if (updateCameraError)
|
|
6459
|
+
throw new Error(FloorplanErrorType.UpdateCameraError);
|
|
6460
|
+
return;
|
|
6518
6461
|
}
|
|
6519
6462
|
|
|
6520
6463
|
/** 当前 five 的相机视角是否满足户型图自动隐藏条件
|
|
@@ -6683,7 +6626,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6683
6626
|
enumerable: true,
|
|
6684
6627
|
configurable: true,
|
|
6685
6628
|
writable: true,
|
|
6686
|
-
value: (options = {}) =>
|
|
6629
|
+
value: async (options = {}) => {
|
|
6687
6630
|
if (!this.state.enabled)
|
|
6688
6631
|
return;
|
|
6689
6632
|
// 已经展示完成了,不做任何操作
|
|
@@ -6692,14 +6635,14 @@ class Controller$1 extends Controller$4 {
|
|
|
6692
6635
|
const userAction = options.userAction !== undefined ? options.userAction : true;
|
|
6693
6636
|
this.updateState({ visible: true }, userAction);
|
|
6694
6637
|
this._show(options);
|
|
6695
|
-
}
|
|
6638
|
+
}
|
|
6696
6639
|
});
|
|
6697
6640
|
/** 隐藏户型图 */
|
|
6698
6641
|
Object.defineProperty(this, "hide", {
|
|
6699
6642
|
enumerable: true,
|
|
6700
6643
|
configurable: true,
|
|
6701
6644
|
writable: true,
|
|
6702
|
-
value: (options = {}) =>
|
|
6645
|
+
value: async (options = {}) => {
|
|
6703
6646
|
if (!this.state.enabled)
|
|
6704
6647
|
return;
|
|
6705
6648
|
this.isHiddenByHideFunc = true;
|
|
@@ -6707,7 +6650,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6707
6650
|
return;
|
|
6708
6651
|
this.updateState({ visible: false }, options.userAction || true);
|
|
6709
6652
|
this._hide(options);
|
|
6710
|
-
}
|
|
6653
|
+
}
|
|
6711
6654
|
});
|
|
6712
6655
|
/** 更新户型图大小 */
|
|
6713
6656
|
Object.defineProperty(this, "updateSize", {
|
|
@@ -6773,11 +6716,11 @@ class Controller$1 extends Controller$4 {
|
|
|
6773
6716
|
enumerable: true,
|
|
6774
6717
|
configurable: true,
|
|
6775
6718
|
writable: true,
|
|
6776
|
-
value: (options) =>
|
|
6777
|
-
var
|
|
6719
|
+
value: async (options) => {
|
|
6720
|
+
var _a;
|
|
6778
6721
|
if (!this.state.enabled)
|
|
6779
6722
|
return;
|
|
6780
|
-
if (!((
|
|
6723
|
+
if (!((_a = this.five.model) === null || _a === void 0 ? void 0 : _a.loaded))
|
|
6781
6724
|
throw new Error(FloorplanErrorType.ModelNotLoaded);
|
|
6782
6725
|
if (!this.data)
|
|
6783
6726
|
throw new Error(FloorplanErrorType.DataNotLoaded);
|
|
@@ -6791,7 +6734,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6791
6734
|
userAction: true,
|
|
6792
6735
|
};
|
|
6793
6736
|
const mergedOptions = Object.assign(Object.assign({}, baseShowOpts), options);
|
|
6794
|
-
const getShowPromise = () =>
|
|
6737
|
+
const getShowPromise = async () => {
|
|
6795
6738
|
this.hooks.emit('show', { userAction: mergedOptions.userAction, auto: mergedOptions.isAutoShow });
|
|
6796
6739
|
let hasRejected = false;
|
|
6797
6740
|
let externalErrorMsg;
|
|
@@ -6799,7 +6742,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6799
6742
|
hasRejected = true;
|
|
6800
6743
|
externalErrorMsg = errorMsg;
|
|
6801
6744
|
};
|
|
6802
|
-
const [correctError] =
|
|
6745
|
+
const [correctError] = await to(correctFiveState(this.five, this.showState, mergedOptions.userAction));
|
|
6803
6746
|
if (correctError)
|
|
6804
6747
|
throw correctError;
|
|
6805
6748
|
// 异步结束要判断当前是不是被中断了
|
|
@@ -6817,7 +6760,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6817
6760
|
const renderDuration = mergedOptions.immediately ? 0 : SHOW_ANIME_DURATION;
|
|
6818
6761
|
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
6819
6762
|
this.render(renderDuration);
|
|
6820
|
-
}
|
|
6763
|
+
};
|
|
6821
6764
|
this.showPromise = getShowPromise()
|
|
6822
6765
|
.then(() => {
|
|
6823
6766
|
this.hooks.emit('showAnimationEnded', {
|
|
@@ -6839,7 +6782,7 @@ class Controller$1 extends Controller$4 {
|
|
|
6839
6782
|
this.showRejection = undefined;
|
|
6840
6783
|
});
|
|
6841
6784
|
return this.showPromise;
|
|
6842
|
-
}
|
|
6785
|
+
}
|
|
6843
6786
|
});
|
|
6844
6787
|
Object.defineProperty(this, "_hide", {
|
|
6845
6788
|
enumerable: true,
|
|
@@ -7073,24 +7016,22 @@ class Controller$1 extends Controller$4 {
|
|
|
7073
7016
|
five.once('dispose', this.dispose);
|
|
7074
7017
|
this.addEventListener();
|
|
7075
7018
|
}
|
|
7076
|
-
load(serverData, state, userAction = true) {
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
this.render();
|
|
7093
|
-
});
|
|
7019
|
+
async load(serverData, state, userAction = true) {
|
|
7020
|
+
function isPluginServerData(serverData) {
|
|
7021
|
+
return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
|
|
7022
|
+
}
|
|
7023
|
+
const _data = serverData;
|
|
7024
|
+
if (_data && !_data.version)
|
|
7025
|
+
console.warn('传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数');
|
|
7026
|
+
const copyData = JSON.parse(JSON.stringify(serverData));
|
|
7027
|
+
const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
|
|
7028
|
+
const prevData = this.data;
|
|
7029
|
+
this.data = await formatData(_serverData);
|
|
7030
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
7031
|
+
this.hooks.emit('dataChange', this.data, prevData);
|
|
7032
|
+
if (state)
|
|
7033
|
+
this.updateState(state, userAction);
|
|
7034
|
+
this.render();
|
|
7094
7035
|
}
|
|
7095
7036
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
7096
7037
|
appendTo(wrapper) {
|
|
@@ -7138,10 +7079,8 @@ class Controller$1 extends Controller$4 {
|
|
|
7138
7079
|
return;
|
|
7139
7080
|
this.render();
|
|
7140
7081
|
}
|
|
7141
|
-
formatData(serverData) {
|
|
7142
|
-
return
|
|
7143
|
-
return yield formatData(serverData.data);
|
|
7144
|
-
});
|
|
7082
|
+
async formatData(serverData) {
|
|
7083
|
+
return await formatData(serverData.data);
|
|
7145
7084
|
}
|
|
7146
7085
|
updateState(state, userAction) {
|
|
7147
7086
|
const prevState = this.state;
|
|
@@ -7369,10 +7308,10 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
7369
7308
|
const defaultNorthRad = (_a = params.north_rad) !== null && _a !== void 0 ? _a : undefined;
|
|
7370
7309
|
// 局部状态
|
|
7371
7310
|
const state = {};
|
|
7372
|
-
const load = (data) =>
|
|
7373
|
-
var
|
|
7311
|
+
const load = async (data) => {
|
|
7312
|
+
var _a;
|
|
7374
7313
|
const fbxUrl = (data === null || data === void 0 ? void 0 : data.fbx_url) || defaultFbxUrl;
|
|
7375
|
-
const northRad = (
|
|
7314
|
+
const northRad = (_a = data === null || data === void 0 ? void 0 : data.north_rad) !== null && _a !== void 0 ? _a : defaultNorthRad;
|
|
7376
7315
|
if (typeof northRad !== 'number') {
|
|
7377
7316
|
throw new Error('"northRad"配置参数缺失:未配置指南针指向!');
|
|
7378
7317
|
}
|
|
@@ -7381,7 +7320,7 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
7381
7320
|
const zOffset = bounding.max.z - bounding.min.z;
|
|
7382
7321
|
const maxOffset = Math.max(xOffset, zOffset);
|
|
7383
7322
|
const fbxLoader = new FBXLoader.FBXLoader();
|
|
7384
|
-
const object =
|
|
7323
|
+
const object = await fbxLoader.loadAsync(fbxUrl);
|
|
7385
7324
|
transfromToMeshBasicMaterial(object, {
|
|
7386
7325
|
transparent: true,
|
|
7387
7326
|
side: THREE__namespace.DoubleSide,
|
|
@@ -7395,7 +7334,7 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
7395
7334
|
bject3d2LocalMatrix(object, { position, rotation, scale });
|
|
7396
7335
|
state.object = object;
|
|
7397
7336
|
return true;
|
|
7398
|
-
}
|
|
7337
|
+
};
|
|
7399
7338
|
const onCameraUpdate = ({ latitude }) => {
|
|
7400
7339
|
if (!state.object)
|
|
7401
7340
|
return;
|
|
@@ -7465,25 +7404,25 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
|
|
|
7465
7404
|
const defaultRad = (_c = params.rad) !== null && _c !== void 0 ? _c : undefined;
|
|
7466
7405
|
const defaultFbxUrl = params.fbx_url || '//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx';
|
|
7467
7406
|
const mixers = [];
|
|
7468
|
-
const load = (data) =>
|
|
7469
|
-
var
|
|
7470
|
-
const position = (
|
|
7407
|
+
const load = async (data) => {
|
|
7408
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
7409
|
+
const position = (_a = data === null || data === void 0 ? void 0 : data.position) !== null && _a !== void 0 ? _a : defaultModelPosition;
|
|
7471
7410
|
if (!position)
|
|
7472
7411
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): position is undefined`);
|
|
7473
7412
|
const modelPosition = transformPositionToVector3(position);
|
|
7474
|
-
const rad = (
|
|
7475
|
-
const fbxUrl = (
|
|
7413
|
+
const rad = (_b = data === null || data === void 0 ? void 0 : data.rad) !== null && _b !== void 0 ? _b : defaultRad;
|
|
7414
|
+
const fbxUrl = (_c = data === null || data === void 0 ? void 0 : data.fbx_url) !== null && _c !== void 0 ? _c : defaultFbxUrl;
|
|
7476
7415
|
state.rad = rad;
|
|
7477
7416
|
if (rad === undefined)
|
|
7478
7417
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): rad is ${rad}`);
|
|
7479
7418
|
// 加载模型
|
|
7480
|
-
const object =
|
|
7419
|
+
const object = await new FBXLoader.FBXLoader().loadAsync(fbxUrl);
|
|
7481
7420
|
// 设置位置
|
|
7482
7421
|
object.position.copy(modelPosition);
|
|
7483
7422
|
object.rotation.z = rad;
|
|
7484
7423
|
object.scale.set(0.8, 0.8, 0.8);
|
|
7485
7424
|
transfromToMeshBasicMaterial(object, { transparent: true, side: THREE__namespace.DoubleSide });
|
|
7486
|
-
const textMesh = (
|
|
7425
|
+
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();
|
|
7487
7426
|
if (!textMesh)
|
|
7488
7427
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): textMesh is ${textMesh}`);
|
|
7489
7428
|
textMesh.material = new THREE.MeshBasicMaterial({ transparent: true, map: createCanvasTextTexture('入户门') });
|
|
@@ -7491,7 +7430,7 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
|
|
|
7491
7430
|
object.children[0].add(textMesh);
|
|
7492
7431
|
state.object = object;
|
|
7493
7432
|
return true;
|
|
7494
|
-
}
|
|
7433
|
+
};
|
|
7495
7434
|
const initAnimation = () => {
|
|
7496
7435
|
if (state.animation)
|
|
7497
7436
|
return;
|
|
@@ -7728,21 +7667,21 @@ const getLongitudeParams = (from, to, rotation) => {
|
|
|
7728
7667
|
*/
|
|
7729
7668
|
const CameraMovementPlugin = (five$1) => {
|
|
7730
7669
|
const state = {};
|
|
7731
|
-
const move = (args, duration, opts = { preload: true }) =>
|
|
7670
|
+
const move = async (args, duration, opts = { preload: true }) => {
|
|
7732
7671
|
if (state.interruptCallback) {
|
|
7733
7672
|
state.interruptCallback(false);
|
|
7734
7673
|
}
|
|
7735
7674
|
if (opts.asyncStartCallback) {
|
|
7736
|
-
|
|
7675
|
+
await opts.asyncStartCallback();
|
|
7737
7676
|
}
|
|
7738
7677
|
if (args.mode && args.mode !== five$1.currentMode) {
|
|
7739
|
-
|
|
7678
|
+
await five$1.changeMode(args.mode);
|
|
7740
7679
|
}
|
|
7741
7680
|
if (opts.preload && args.panoIndex !== undefined && args.panoIndex !== five$1.panoIndex) {
|
|
7742
|
-
|
|
7681
|
+
await five$1.preloadPano(args.panoIndex);
|
|
7743
7682
|
}
|
|
7744
7683
|
if (opts.asyncEndCallback) {
|
|
7745
|
-
|
|
7684
|
+
await opts.asyncEndCallback();
|
|
7746
7685
|
}
|
|
7747
7686
|
if (args.panoIndex === undefined &&
|
|
7748
7687
|
args.fov === undefined &&
|
|
@@ -7750,7 +7689,7 @@ const CameraMovementPlugin = (five$1) => {
|
|
|
7750
7689
|
args.longitude === undefined) {
|
|
7751
7690
|
return true;
|
|
7752
7691
|
}
|
|
7753
|
-
return
|
|
7692
|
+
return await new Promise((resolve, reject) => {
|
|
7754
7693
|
const panoIndex = args.panoIndex !== undefined ? args.panoIndex : five$1.panoIndex;
|
|
7755
7694
|
if (panoIndex !== undefined) {
|
|
7756
7695
|
five$1.moveToPano(panoIndex, Object.assign({
|
|
@@ -7763,7 +7702,7 @@ const CameraMovementPlugin = (five$1) => {
|
|
|
7763
7702
|
reject(false);
|
|
7764
7703
|
}
|
|
7765
7704
|
});
|
|
7766
|
-
}
|
|
7705
|
+
};
|
|
7767
7706
|
const getAnimeParams = (args) => {
|
|
7768
7707
|
const currentFiveState = five$1.state;
|
|
7769
7708
|
// latitude
|
|
@@ -7779,20 +7718,20 @@ const CameraMovementPlugin = (five$1) => {
|
|
|
7779
7718
|
to: { latitude: toLatitude, longitude: toLongitude, fov: toFov },
|
|
7780
7719
|
};
|
|
7781
7720
|
};
|
|
7782
|
-
const rotate = (args, duration, opts = {}) =>
|
|
7721
|
+
const rotate = async (args, duration, opts = {}) => {
|
|
7783
7722
|
if (state.interruptCallback) {
|
|
7784
7723
|
state.interruptCallback(false);
|
|
7785
7724
|
}
|
|
7786
7725
|
if (opts.asyncStartCallback) {
|
|
7787
|
-
|
|
7726
|
+
await opts.asyncStartCallback();
|
|
7788
7727
|
}
|
|
7789
7728
|
if (five$1.currentMode !== five.Five.Mode.Panorama) {
|
|
7790
|
-
|
|
7729
|
+
await five$1.changeMode(five.Five.Mode.Panorama);
|
|
7791
7730
|
}
|
|
7792
7731
|
if (args.panoIndex !== undefined && args.panoIndex !== five$1.panoIndex) {
|
|
7793
7732
|
if (opts.preload)
|
|
7794
|
-
|
|
7795
|
-
|
|
7733
|
+
await five$1.preloadPano(args.panoIndex);
|
|
7734
|
+
await new Promise((resolve, reject) => {
|
|
7796
7735
|
if (!args.panoIndex) {
|
|
7797
7736
|
resolve(true);
|
|
7798
7737
|
return;
|
|
@@ -7804,10 +7743,10 @@ const CameraMovementPlugin = (five$1) => {
|
|
|
7804
7743
|
});
|
|
7805
7744
|
}
|
|
7806
7745
|
if (opts.asyncEndCallback) {
|
|
7807
|
-
|
|
7746
|
+
await opts.asyncEndCallback();
|
|
7808
7747
|
}
|
|
7809
7748
|
const { from, to } = getAnimeParams(args);
|
|
7810
|
-
return
|
|
7749
|
+
return await new Promise((resolve) => {
|
|
7811
7750
|
const onUpdate = ({ progress }) => {
|
|
7812
7751
|
const state = {};
|
|
7813
7752
|
state.longitude = progressNumber(from.longitude, to.longitude, progress);
|
|
@@ -7849,7 +7788,7 @@ const CameraMovementPlugin = (five$1) => {
|
|
|
7849
7788
|
state.interruptCallback(true);
|
|
7850
7789
|
}, duration);
|
|
7851
7790
|
});
|
|
7852
|
-
}
|
|
7791
|
+
};
|
|
7853
7792
|
return {
|
|
7854
7793
|
move,
|
|
7855
7794
|
rotate,
|
|
@@ -8051,7 +7990,7 @@ const PanoRulerStyle = `<style type="text/css">
|
|
|
8051
7990
|
</style>
|
|
8052
7991
|
`;
|
|
8053
7992
|
|
|
8054
|
-
const getDistance = (p1, p2) => {
|
|
7993
|
+
const getDistance$1 = (p1, p2) => {
|
|
8055
7994
|
return Math.sqrt(Math.pow(p1.z - p2.z, 2) + Math.pow(p1.x - p2.x, 2));
|
|
8056
7995
|
};
|
|
8057
7996
|
const getRoomHeightInfo = (roomInfo, five) => {
|
|
@@ -8158,7 +8097,7 @@ const PanoRulerPlugin = (five$1, params) => {
|
|
|
8158
8097
|
y: position.y,
|
|
8159
8098
|
z: position.z,
|
|
8160
8099
|
};
|
|
8161
|
-
const distance = getDistance({ x, z }, observerPoint);
|
|
8100
|
+
const distance = getDistance$1({ x, z }, observerPoint);
|
|
8162
8101
|
if (medianFloorHeight) {
|
|
8163
8102
|
// 取最近点时排除高度与房间平均高度差大于0.3米的点
|
|
8164
8103
|
if (distance < minDistance && Math.abs(observerPoint.y - medianFloorHeight) < 0.3) {
|
|
@@ -8209,7 +8148,7 @@ const PanoRulerPlugin = (five$1, params) => {
|
|
|
8209
8148
|
freshRule();
|
|
8210
8149
|
return true;
|
|
8211
8150
|
};
|
|
8212
|
-
const load = (_roomInfo, _roomRules, options) =>
|
|
8151
|
+
const load = async (_roomInfo, _roomRules, options) => {
|
|
8213
8152
|
const roomInfo = _roomInfo || params.roomInfo;
|
|
8214
8153
|
const roomRules = _roomRules || params.roomRules;
|
|
8215
8154
|
if (!roomInfo || !roomRules) {
|
|
@@ -8221,9 +8160,9 @@ const PanoRulerPlugin = (five$1, params) => {
|
|
|
8221
8160
|
return _load(roomInfo, roomRules);
|
|
8222
8161
|
}
|
|
8223
8162
|
else {
|
|
8224
|
-
return
|
|
8163
|
+
return await new Promise((resolve) => five$1.once('modelLoaded', () => resolve(_load(roomInfo, roomRules))));
|
|
8225
8164
|
}
|
|
8226
|
-
}
|
|
8165
|
+
};
|
|
8227
8166
|
if (params.roomInfo && params.roomRules) {
|
|
8228
8167
|
load(params.roomInfo, params.roomRules);
|
|
8229
8168
|
}
|
|
@@ -8440,7 +8379,7 @@ const PanoRulerPlugin = (five$1, params) => {
|
|
|
8440
8379
|
|
|
8441
8380
|
/* src/PanoRulerProPlugin/RulerItem.svelte generated by Svelte v3.49.0 */
|
|
8442
8381
|
|
|
8443
|
-
function add_css$
|
|
8382
|
+
function add_css$7(target) {
|
|
8444
8383
|
internal.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)}}");
|
|
8445
8384
|
}
|
|
8446
8385
|
|
|
@@ -8451,7 +8390,7 @@ function get_each_context$4(ctx, list, i) {
|
|
|
8451
8390
|
}
|
|
8452
8391
|
|
|
8453
8392
|
// (28:2) {:else}
|
|
8454
|
-
function create_else_block(ctx) {
|
|
8393
|
+
function create_else_block$1(ctx) {
|
|
8455
8394
|
let div;
|
|
8456
8395
|
let each_value = /*rulerItemProp*/ ctx[0].children;
|
|
8457
8396
|
let each_blocks = [];
|
|
@@ -8578,7 +8517,7 @@ function create_each_block$4(ctx) {
|
|
|
8578
8517
|
};
|
|
8579
8518
|
}
|
|
8580
8519
|
|
|
8581
|
-
function create_fragment$
|
|
8520
|
+
function create_fragment$8(ctx) {
|
|
8582
8521
|
let div2;
|
|
8583
8522
|
let t0;
|
|
8584
8523
|
let div1;
|
|
@@ -8594,7 +8533,7 @@ function create_fragment$7(ctx) {
|
|
|
8594
8533
|
|
|
8595
8534
|
function select_block_type(ctx, dirty) {
|
|
8596
8535
|
if (/*rulerItemProp*/ ctx[0].children.length === 0) return create_if_block$2;
|
|
8597
|
-
return create_else_block;
|
|
8536
|
+
return create_else_block$1;
|
|
8598
8537
|
}
|
|
8599
8538
|
|
|
8600
8539
|
let current_block_type = select_block_type(ctx);
|
|
@@ -8692,7 +8631,7 @@ function create_fragment$7(ctx) {
|
|
|
8692
8631
|
};
|
|
8693
8632
|
}
|
|
8694
8633
|
|
|
8695
|
-
function instance$
|
|
8634
|
+
function instance$8($$self, $$props, $$invalidate) {
|
|
8696
8635
|
let vars;
|
|
8697
8636
|
let { rulerItemProp } = $$props;
|
|
8698
8637
|
let _visible = true;
|
|
@@ -8727,7 +8666,7 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
|
8727
8666
|
class RulerItem extends internal.SvelteComponent {
|
|
8728
8667
|
constructor(options) {
|
|
8729
8668
|
super();
|
|
8730
|
-
internal.init(this, options, instance$
|
|
8669
|
+
internal.init(this, options, instance$8, create_fragment$8, internal.safe_not_equal, { rulerItemProp: 0 }, add_css$7);
|
|
8731
8670
|
}
|
|
8732
8671
|
}
|
|
8733
8672
|
|
|
@@ -8776,7 +8715,7 @@ function create_each_block$3(ctx) {
|
|
|
8776
8715
|
};
|
|
8777
8716
|
}
|
|
8778
8717
|
|
|
8779
|
-
function create_fragment$
|
|
8718
|
+
function create_fragment$7(ctx) {
|
|
8780
8719
|
let div;
|
|
8781
8720
|
let current;
|
|
8782
8721
|
let each_value = /*rulerItemProp*/ ctx[0];
|
|
@@ -8860,7 +8799,7 @@ function create_fragment$6(ctx) {
|
|
|
8860
8799
|
};
|
|
8861
8800
|
}
|
|
8862
8801
|
|
|
8863
|
-
function instance$
|
|
8802
|
+
function instance$7($$self, $$props, $$invalidate) {
|
|
8864
8803
|
var _a, _b, _c, _d;
|
|
8865
8804
|
let { five: five$1 } = $$props;
|
|
8866
8805
|
let { rulerDatas } = $$props;
|
|
@@ -9078,7 +9017,7 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
9078
9017
|
class RulerItems extends internal.SvelteComponent {
|
|
9079
9018
|
constructor(options) {
|
|
9080
9019
|
super();
|
|
9081
|
-
internal.init(this, options, instance$
|
|
9020
|
+
internal.init(this, options, instance$7, create_fragment$7, internal.safe_not_equal, { five: 1, rulerDatas: 2, options: 3 });
|
|
9082
9021
|
}
|
|
9083
9022
|
}
|
|
9084
9023
|
|
|
@@ -9133,22 +9072,20 @@ class Controller {
|
|
|
9133
9072
|
if ((_a = params.options) === null || _a === void 0 ? void 0 : _a.className)
|
|
9134
9073
|
this.container.classList.add((_b = params.options) === null || _b === void 0 ? void 0 : _b.className);
|
|
9135
9074
|
}
|
|
9136
|
-
this.five.once('modelLoaded', () =>
|
|
9137
|
-
var
|
|
9138
|
-
(
|
|
9139
|
-
})
|
|
9075
|
+
this.five.once('modelLoaded', async () => {
|
|
9076
|
+
var _a, _b;
|
|
9077
|
+
(_b = (_a = this.five.getElement()) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.append(this.container);
|
|
9078
|
+
});
|
|
9140
9079
|
this.five.once('dispose', () => this.dispose());
|
|
9141
9080
|
}
|
|
9142
|
-
load(serverData) {
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
this.state.loaded = true;
|
|
9151
|
-
});
|
|
9081
|
+
async load(serverData) {
|
|
9082
|
+
if (!this.five.work)
|
|
9083
|
+
return;
|
|
9084
|
+
const data = serverData.data;
|
|
9085
|
+
if (!data)
|
|
9086
|
+
throw new Error('标尺数据依赖不齐全!');
|
|
9087
|
+
this.panoRulerProData = data;
|
|
9088
|
+
this.state.loaded = true;
|
|
9152
9089
|
}
|
|
9153
9090
|
enable() {
|
|
9154
9091
|
if (!this.state.loaded)
|
|
@@ -9166,26 +9103,24 @@ class Controller {
|
|
|
9166
9103
|
this.render();
|
|
9167
9104
|
return true;
|
|
9168
9105
|
}
|
|
9169
|
-
render() {
|
|
9106
|
+
async render() {
|
|
9170
9107
|
var _a;
|
|
9171
|
-
|
|
9172
|
-
if (this.
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
this.
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
}
|
|
9188
|
-
});
|
|
9108
|
+
if (this.state.enabled) {
|
|
9109
|
+
if (!this.panoRulerProData || !this.container)
|
|
9110
|
+
return;
|
|
9111
|
+
this.rulerItems = new RulerItems({
|
|
9112
|
+
target: this.container,
|
|
9113
|
+
props: {
|
|
9114
|
+
five: this.five,
|
|
9115
|
+
rulerDatas: this.panoRulerProData,
|
|
9116
|
+
options: this.state.options,
|
|
9117
|
+
},
|
|
9118
|
+
});
|
|
9119
|
+
}
|
|
9120
|
+
else {
|
|
9121
|
+
(_a = this.rulerItems) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
9122
|
+
this.rulerItems = undefined;
|
|
9123
|
+
}
|
|
9189
9124
|
}
|
|
9190
9125
|
dispose() {
|
|
9191
9126
|
if (this.container) {
|
|
@@ -9254,14 +9189,12 @@ function getRoomInfoInstance() {
|
|
|
9254
9189
|
}
|
|
9255
9190
|
|
|
9256
9191
|
const textureLoader = new THREE__namespace.TextureLoader();
|
|
9257
|
-
function loadTexture(url) {
|
|
9258
|
-
return
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
return texture;
|
|
9264
|
-
});
|
|
9192
|
+
async function loadTexture(url) {
|
|
9193
|
+
return new Promise((resolve, reject) => {
|
|
9194
|
+
textureLoader.load(url, resolve, undefined, reject);
|
|
9195
|
+
}).then((texture) => {
|
|
9196
|
+
texture.encoding = THREE__namespace.sRGBEncoding;
|
|
9197
|
+
return texture;
|
|
9265
9198
|
});
|
|
9266
9199
|
}
|
|
9267
9200
|
|
|
@@ -9323,7 +9256,7 @@ function tweenProgress(duration, easing = TWEEN__default["default"].Easing.Linea
|
|
|
9323
9256
|
return tween;
|
|
9324
9257
|
}
|
|
9325
9258
|
|
|
9326
|
-
const defaultBaseOptions = { userAction: true };
|
|
9259
|
+
const defaultBaseOptions$1 = { userAction: true };
|
|
9327
9260
|
class PanoCompassController extends Controller$4 {
|
|
9328
9261
|
constructor(five$1, config) {
|
|
9329
9262
|
super(five$1);
|
|
@@ -9610,7 +9543,7 @@ class PanoCompassController extends Controller$4 {
|
|
|
9610
9543
|
* 启用插件,响应用户操作并展示UI
|
|
9611
9544
|
* @param options
|
|
9612
9545
|
*/
|
|
9613
|
-
enable(options = defaultBaseOptions) {
|
|
9546
|
+
enable(options = defaultBaseOptions$1) {
|
|
9614
9547
|
this.setState({
|
|
9615
9548
|
enabled: true,
|
|
9616
9549
|
}, options);
|
|
@@ -9619,7 +9552,7 @@ class PanoCompassController extends Controller$4 {
|
|
|
9619
9552
|
* 禁用插件,禁止响应用户操作并隐藏UI
|
|
9620
9553
|
* @param options
|
|
9621
9554
|
*/
|
|
9622
|
-
disable(options = defaultBaseOptions) {
|
|
9555
|
+
disable(options = defaultBaseOptions$1) {
|
|
9623
9556
|
this.setState({
|
|
9624
9557
|
enabled: false,
|
|
9625
9558
|
}, options);
|
|
@@ -9630,7 +9563,7 @@ class PanoCompassController extends Controller$4 {
|
|
|
9630
9563
|
* @returns
|
|
9631
9564
|
* @todo 需要考虑动画
|
|
9632
9565
|
*/
|
|
9633
|
-
show(options = defaultBaseOptions) {
|
|
9566
|
+
show(options = defaultBaseOptions$1) {
|
|
9634
9567
|
if (!this.state.enabled)
|
|
9635
9568
|
return;
|
|
9636
9569
|
this.setState({
|
|
@@ -9644,7 +9577,7 @@ class PanoCompassController extends Controller$4 {
|
|
|
9644
9577
|
* @returns
|
|
9645
9578
|
* @todo 需要考虑动画
|
|
9646
9579
|
*/
|
|
9647
|
-
hide(options = defaultBaseOptions) {
|
|
9580
|
+
hide(options = defaultBaseOptions$1) {
|
|
9648
9581
|
if (!this.state.enabled)
|
|
9649
9582
|
return;
|
|
9650
9583
|
this.setState({
|
|
@@ -9688,19 +9621,17 @@ class PanoCompassController extends Controller$4 {
|
|
|
9688
9621
|
this.init();
|
|
9689
9622
|
}
|
|
9690
9623
|
}
|
|
9691
|
-
load(data, state, userAction = true) {
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
this.setState(state, { userAction });
|
|
9700
|
-
}
|
|
9701
|
-
this.hooks.emit('dataLoaded', this.data);
|
|
9624
|
+
async load(data, state, userAction = true) {
|
|
9625
|
+
const nextData = await this.formatData(data);
|
|
9626
|
+
if (JSON.stringify(this.data) !== JSON.stringify(nextData)) {
|
|
9627
|
+
this.hooks.emit('dataChange', nextData, this.data);
|
|
9628
|
+
this.data = Object.assign({}, nextData);
|
|
9629
|
+
this.init();
|
|
9630
|
+
if (state) {
|
|
9631
|
+
this.setState(state, { userAction });
|
|
9702
9632
|
}
|
|
9703
|
-
|
|
9633
|
+
this.hooks.emit('dataLoaded', this.data);
|
|
9634
|
+
}
|
|
9704
9635
|
}
|
|
9705
9636
|
formatData(serverData) {
|
|
9706
9637
|
if (serverData.version && serverData.data) {
|
|
@@ -9714,64 +9645,58 @@ class PanoCompassController extends Controller$4 {
|
|
|
9714
9645
|
* 初始化
|
|
9715
9646
|
* @todo 逻辑需要细分
|
|
9716
9647
|
*/
|
|
9717
|
-
init() {
|
|
9648
|
+
async init() {
|
|
9718
9649
|
var _a, _b, _c, _d;
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
|
|
9737
|
-
}
|
|
9738
|
-
this.group.add(this.entryDoorMesh);
|
|
9650
|
+
const northRad = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.north_rad) !== null && _b !== void 0 ? _b : null;
|
|
9651
|
+
this._clearCompassIfNeed();
|
|
9652
|
+
if (northRad !== null) {
|
|
9653
|
+
this.compassMesh = await this.loadCompassMesh();
|
|
9654
|
+
this.compassMesh.rotateX(-Math.PI / 2);
|
|
9655
|
+
this.compassMesh.rotateZ(northRad - Math.PI / 2);
|
|
9656
|
+
this.group.add(this.compassMesh);
|
|
9657
|
+
}
|
|
9658
|
+
const entrance = (_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c.entrance) !== null && _d !== void 0 ? _d : null;
|
|
9659
|
+
this._clearEntryDoorIfNeed();
|
|
9660
|
+
if (entrance !== null) {
|
|
9661
|
+
this.entryDoorMesh = await this.loadEntryDoorMesh();
|
|
9662
|
+
this.roomInfoWrapperInstance = this.loadRoomInfo();
|
|
9663
|
+
this.roomInfoInstance = getRoomInfoInstance();
|
|
9664
|
+
this.entryDoorMesh.rotateX(-Math.PI / 2);
|
|
9665
|
+
if (this.roomInfoWrapperInstance) {
|
|
9666
|
+
this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
|
|
9739
9667
|
}
|
|
9740
|
-
this.
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
opacity: 0.8,
|
|
9769
|
-
depthTest: false,
|
|
9770
|
-
});
|
|
9771
|
-
const entryDoorMesh = new THREE__namespace.Mesh(entryDoorGeometry, entryDoorMaterial);
|
|
9772
|
-
entryDoorMesh.name = 'pano-compass-entry-door';
|
|
9773
|
-
return entryDoorMesh;
|
|
9668
|
+
this.group.add(this.entryDoorMesh);
|
|
9669
|
+
}
|
|
9670
|
+
this.onFivePanoArrived(this.five.panoIndex || 0);
|
|
9671
|
+
this.five.needsRender = true;
|
|
9672
|
+
}
|
|
9673
|
+
async loadCompassMesh() {
|
|
9674
|
+
const compassImageUrl = this.state.config.compassImageUrl;
|
|
9675
|
+
const compassTexture = await loadTexture(compassImageUrl);
|
|
9676
|
+
const compassGeometry = new THREE__namespace.CircleGeometry(0.7, 32);
|
|
9677
|
+
const compassMaterial = new THREE__namespace.MeshBasicMaterial({
|
|
9678
|
+
map: compassTexture,
|
|
9679
|
+
transparent: true,
|
|
9680
|
+
opacity: 0,
|
|
9681
|
+
depthTest: false,
|
|
9682
|
+
});
|
|
9683
|
+
const compassMesh = new THREE__namespace.Mesh(compassGeometry, compassMaterial);
|
|
9684
|
+
compassMesh.name = 'pano-compass-mesh';
|
|
9685
|
+
return compassMesh;
|
|
9686
|
+
}
|
|
9687
|
+
async loadEntryDoorMesh() {
|
|
9688
|
+
const entryDoorImageUrl = this.state.config.entryDoorImageUrl;
|
|
9689
|
+
const entryDoorTexture = await loadTexture(entryDoorImageUrl);
|
|
9690
|
+
const entryDoorGeometry = new THREE__namespace.PlaneGeometry(0.2, 0.16);
|
|
9691
|
+
const entryDoorMaterial = new THREE__namespace.MeshBasicMaterial({
|
|
9692
|
+
map: entryDoorTexture,
|
|
9693
|
+
transparent: true,
|
|
9694
|
+
opacity: 0.8,
|
|
9695
|
+
depthTest: false,
|
|
9774
9696
|
});
|
|
9697
|
+
const entryDoorMesh = new THREE__namespace.Mesh(entryDoorGeometry, entryDoorMaterial);
|
|
9698
|
+
entryDoorMesh.name = 'pano-compass-entry-door';
|
|
9699
|
+
return entryDoorMesh;
|
|
9775
9700
|
}
|
|
9776
9701
|
loadRoomInfo() {
|
|
9777
9702
|
const points = [
|
|
@@ -13825,7 +13750,7 @@ const currentTarget = store.writable(null);
|
|
|
13825
13750
|
|
|
13826
13751
|
/* src/PanoSpatialTagPlugin/Components/origins.svelte generated by Svelte v3.49.0 */
|
|
13827
13752
|
|
|
13828
|
-
function add_css$
|
|
13753
|
+
function add_css$6(target) {
|
|
13829
13754
|
internal.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}}");
|
|
13830
13755
|
}
|
|
13831
13756
|
|
|
@@ -13892,7 +13817,7 @@ function create_each_block$2(ctx) {
|
|
|
13892
13817
|
};
|
|
13893
13818
|
}
|
|
13894
13819
|
|
|
13895
|
-
function create_fragment$
|
|
13820
|
+
function create_fragment$6(ctx) {
|
|
13896
13821
|
let each_1_anchor;
|
|
13897
13822
|
let each_value = /*origins*/ ctx[0];
|
|
13898
13823
|
let each_blocks = [];
|
|
@@ -13949,7 +13874,7 @@ function create_fragment$5(ctx) {
|
|
|
13949
13874
|
};
|
|
13950
13875
|
}
|
|
13951
13876
|
|
|
13952
|
-
function instance$
|
|
13877
|
+
function instance$6($$self, $$props, $$invalidate) {
|
|
13953
13878
|
let { origins } = $$props;
|
|
13954
13879
|
|
|
13955
13880
|
const handleClick = id => {
|
|
@@ -13968,17 +13893,17 @@ function instance$5($$self, $$props, $$invalidate) {
|
|
|
13968
13893
|
class Origins extends internal.SvelteComponent {
|
|
13969
13894
|
constructor(options) {
|
|
13970
13895
|
super();
|
|
13971
|
-
internal.init(this, options, instance$
|
|
13896
|
+
internal.init(this, options, instance$6, create_fragment$6, internal.safe_not_equal, { origins: 0 }, add_css$6);
|
|
13972
13897
|
}
|
|
13973
13898
|
}
|
|
13974
13899
|
|
|
13975
13900
|
/* src/PanoSpatialTagPlugin/Components/tag.svelte generated by Svelte v3.49.0 */
|
|
13976
13901
|
|
|
13977
|
-
function add_css$
|
|
13902
|
+
function add_css$5(target) {
|
|
13978
13903
|
internal.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)}}");
|
|
13979
13904
|
}
|
|
13980
13905
|
|
|
13981
|
-
function create_fragment$
|
|
13906
|
+
function create_fragment$5(ctx) {
|
|
13982
13907
|
let div4;
|
|
13983
13908
|
let div0;
|
|
13984
13909
|
let t0;
|
|
@@ -14093,7 +14018,7 @@ function create_fragment$4(ctx) {
|
|
|
14093
14018
|
};
|
|
14094
14019
|
}
|
|
14095
14020
|
|
|
14096
|
-
function instance$
|
|
14021
|
+
function instance$5($$self, $$props, $$invalidate) {
|
|
14097
14022
|
let { id } = $$props;
|
|
14098
14023
|
let { upsideDown } = $$props;
|
|
14099
14024
|
let { content } = $$props;
|
|
@@ -14230,8 +14155,8 @@ class Tag extends internal.SvelteComponent {
|
|
|
14230
14155
|
internal.init(
|
|
14231
14156
|
this,
|
|
14232
14157
|
options,
|
|
14233
|
-
instance$
|
|
14234
|
-
create_fragment$
|
|
14158
|
+
instance$5,
|
|
14159
|
+
create_fragment$5,
|
|
14235
14160
|
internal.safe_not_equal,
|
|
14236
14161
|
{
|
|
14237
14162
|
id: 0,
|
|
@@ -14246,7 +14171,7 @@ class Tag extends internal.SvelteComponent {
|
|
|
14246
14171
|
events: 14,
|
|
14247
14172
|
hooks: 15
|
|
14248
14173
|
},
|
|
14249
|
-
add_css$
|
|
14174
|
+
add_css$5
|
|
14250
14175
|
);
|
|
14251
14176
|
}
|
|
14252
14177
|
}
|
|
@@ -14900,11 +14825,11 @@ exports.DISPLAY_STRATEGY_TYPE = void 0;
|
|
|
14900
14825
|
|
|
14901
14826
|
/* src/ModelItemLabelPlugin/ItemLabelItem.svelte generated by Svelte v3.49.0 */
|
|
14902
14827
|
|
|
14903
|
-
function add_css$
|
|
14828
|
+
function add_css$4(target) {
|
|
14904
14829
|
internal.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 }}");
|
|
14905
14830
|
}
|
|
14906
14831
|
|
|
14907
|
-
function create_fragment$
|
|
14832
|
+
function create_fragment$4(ctx) {
|
|
14908
14833
|
let div2;
|
|
14909
14834
|
let div0;
|
|
14910
14835
|
let span;
|
|
@@ -14985,7 +14910,7 @@ function create_fragment$3(ctx) {
|
|
|
14985
14910
|
};
|
|
14986
14911
|
}
|
|
14987
14912
|
|
|
14988
|
-
function instance$
|
|
14913
|
+
function instance$4($$self, $$props, $$invalidate) {
|
|
14989
14914
|
let { itemLabel } = $$props;
|
|
14990
14915
|
let { hooks } = $$props;
|
|
14991
14916
|
|
|
@@ -15005,7 +14930,7 @@ function instance$3($$self, $$props, $$invalidate) {
|
|
|
15005
14930
|
class ItemLabelItem$1 extends internal.SvelteComponent {
|
|
15006
14931
|
constructor(options) {
|
|
15007
14932
|
super();
|
|
15008
|
-
internal.init(this, options, instance$
|
|
14933
|
+
internal.init(this, options, instance$4, create_fragment$4, internal.safe_not_equal, { itemLabel: 0, hooks: 2 }, add_css$4);
|
|
15009
14934
|
}
|
|
15010
14935
|
}
|
|
15011
14936
|
|
|
@@ -15026,7 +14951,7 @@ function debounce(func, wait = 200) {
|
|
|
15026
14951
|
|
|
15027
14952
|
/* src/ModelItemLabelPlugin/ItemLabelComponent.svelte generated by Svelte v3.49.0 */
|
|
15028
14953
|
|
|
15029
|
-
function add_css$
|
|
14954
|
+
function add_css$3(target) {
|
|
15030
14955
|
internal.append_styles(target, "svelte-gk8s47", ".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}");
|
|
15031
14956
|
}
|
|
15032
14957
|
|
|
@@ -15085,7 +15010,7 @@ function create_each_block$1(key_1, ctx) {
|
|
|
15085
15010
|
};
|
|
15086
15011
|
}
|
|
15087
15012
|
|
|
15088
|
-
function create_fragment$
|
|
15013
|
+
function create_fragment$3(ctx) {
|
|
15089
15014
|
let div;
|
|
15090
15015
|
let each_blocks = [];
|
|
15091
15016
|
let each_1_lookup = new Map();
|
|
@@ -15165,7 +15090,7 @@ function create_fragment$2(ctx) {
|
|
|
15165
15090
|
let cssHeight = 26;
|
|
15166
15091
|
let basicWidth$1 = 11;
|
|
15167
15092
|
|
|
15168
|
-
function instance$
|
|
15093
|
+
function instance$3($$self, $$props, $$invalidate) {
|
|
15169
15094
|
const { Raycaster, Vector3 } = THREE__namespace;
|
|
15170
15095
|
let { five } = $$props;
|
|
15171
15096
|
let { modelOcclusionEnable } = $$props;
|
|
@@ -15367,8 +15292,8 @@ class ItemLabelComponent$1 extends internal.SvelteComponent {
|
|
|
15367
15292
|
internal.init(
|
|
15368
15293
|
this,
|
|
15369
15294
|
options,
|
|
15370
|
-
instance$
|
|
15371
|
-
create_fragment$
|
|
15295
|
+
instance$3,
|
|
15296
|
+
create_fragment$3,
|
|
15372
15297
|
internal.safe_not_equal,
|
|
15373
15298
|
{
|
|
15374
15299
|
five: 5,
|
|
@@ -15377,7 +15302,7 @@ class ItemLabelComponent$1 extends internal.SvelteComponent {
|
|
|
15377
15302
|
hooks: 0,
|
|
15378
15303
|
displayStrategyType: 8
|
|
15379
15304
|
},
|
|
15380
|
-
add_css$
|
|
15305
|
+
add_css$3
|
|
15381
15306
|
);
|
|
15382
15307
|
}
|
|
15383
15308
|
}
|
|
@@ -15681,7 +15606,7 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
|
|
|
15681
15606
|
xhr.send();
|
|
15682
15607
|
});
|
|
15683
15608
|
};
|
|
15684
|
-
const load = (data, videoElement) =>
|
|
15609
|
+
const load = async (data, videoElement) => {
|
|
15685
15610
|
const { video_src, video_poster_src, points } = data;
|
|
15686
15611
|
state.videoSource = video_src;
|
|
15687
15612
|
// TODO 存疑,先处理多一次遍历 o(2n)
|
|
@@ -15691,11 +15616,11 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
|
|
|
15691
15616
|
if (videoElement) {
|
|
15692
15617
|
state.videoElement = videoElement;
|
|
15693
15618
|
}
|
|
15694
|
-
state.videoTexture =
|
|
15619
|
+
state.videoTexture = await getVideoTexture(state.videoSource, state.videoElement);
|
|
15695
15620
|
state.enabled = !!data.enable;
|
|
15696
15621
|
if (state.enabled)
|
|
15697
15622
|
enable();
|
|
15698
|
-
}
|
|
15623
|
+
};
|
|
15699
15624
|
const dispose = () => {
|
|
15700
15625
|
disable();
|
|
15701
15626
|
state.videoTexture = undefined;
|
|
@@ -15791,12 +15716,94 @@ exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE = void 0;
|
|
|
15791
15716
|
|
|
15792
15717
|
/* src/ItemLabelPlugin/ItemLabelItem.svelte generated by Svelte v3.49.0 */
|
|
15793
15718
|
|
|
15794
|
-
function add_css$
|
|
15795
|
-
internal.append_styles(target, "svelte-
|
|
15719
|
+
function add_css$2(target) {
|
|
15720
|
+
internal.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 }}");
|
|
15721
|
+
}
|
|
15722
|
+
|
|
15723
|
+
// (34:8) {:else}
|
|
15724
|
+
function create_else_block(ctx) {
|
|
15725
|
+
let t0;
|
|
15726
|
+
let div;
|
|
15727
|
+
let span0;
|
|
15728
|
+
let t1_value = (/*itemLabel*/ ctx[0].code || /*itemLabel*/ ctx[0].id) + "";
|
|
15729
|
+
let t1;
|
|
15730
|
+
let t2;
|
|
15731
|
+
let span1;
|
|
15732
|
+
let t3_value = /*itemLabel*/ ctx[0].name + "";
|
|
15733
|
+
let t3;
|
|
15734
|
+
let if_block = /*itemLabel*/ ctx[0].icon && create_if_block_1(ctx);
|
|
15735
|
+
|
|
15736
|
+
return {
|
|
15737
|
+
c() {
|
|
15738
|
+
if (if_block) if_block.c();
|
|
15739
|
+
t0 = internal.space();
|
|
15740
|
+
div = internal.element("div");
|
|
15741
|
+
span0 = internal.element("span");
|
|
15742
|
+
t1 = internal.text(t1_value);
|
|
15743
|
+
t2 = internal.space();
|
|
15744
|
+
span1 = internal.element("span");
|
|
15745
|
+
t3 = internal.text(t3_value);
|
|
15746
|
+
internal.attr(span0, "class", "item-model svelte-6b32dy");
|
|
15747
|
+
internal.attr(span1, "class", "item-name svelte-6b32dy");
|
|
15748
|
+
internal.attr(div, "class", "item-label-text svelte-6b32dy");
|
|
15749
|
+
},
|
|
15750
|
+
m(target, anchor) {
|
|
15751
|
+
if (if_block) if_block.m(target, anchor);
|
|
15752
|
+
internal.insert(target, t0, anchor);
|
|
15753
|
+
internal.insert(target, div, anchor);
|
|
15754
|
+
internal.append(div, span0);
|
|
15755
|
+
internal.append(span0, t1);
|
|
15756
|
+
internal.append(div, t2);
|
|
15757
|
+
internal.append(div, span1);
|
|
15758
|
+
internal.append(span1, t3);
|
|
15759
|
+
},
|
|
15760
|
+
p(ctx, dirty) {
|
|
15761
|
+
if (/*itemLabel*/ ctx[0].icon) {
|
|
15762
|
+
if (if_block) {
|
|
15763
|
+
if_block.p(ctx, dirty);
|
|
15764
|
+
} else {
|
|
15765
|
+
if_block = create_if_block_1(ctx);
|
|
15766
|
+
if_block.c();
|
|
15767
|
+
if_block.m(t0.parentNode, t0);
|
|
15768
|
+
}
|
|
15769
|
+
} else if (if_block) {
|
|
15770
|
+
if_block.d(1);
|
|
15771
|
+
if_block = null;
|
|
15772
|
+
}
|
|
15773
|
+
|
|
15774
|
+
if (dirty & /*itemLabel*/ 1 && t1_value !== (t1_value = (/*itemLabel*/ ctx[0].code || /*itemLabel*/ ctx[0].id) + "")) internal.set_data(t1, t1_value);
|
|
15775
|
+
if (dirty & /*itemLabel*/ 1 && t3_value !== (t3_value = /*itemLabel*/ ctx[0].name + "")) internal.set_data(t3, t3_value);
|
|
15776
|
+
},
|
|
15777
|
+
d(detaching) {
|
|
15778
|
+
if (if_block) if_block.d(detaching);
|
|
15779
|
+
if (detaching) internal.detach(t0);
|
|
15780
|
+
if (detaching) internal.detach(div);
|
|
15781
|
+
}
|
|
15782
|
+
};
|
|
15796
15783
|
}
|
|
15797
15784
|
|
|
15798
|
-
// (
|
|
15785
|
+
// (32:8) {#if Boolean(typeof itemLabel.render === 'function')}
|
|
15799
15786
|
function create_if_block$1(ctx) {
|
|
15787
|
+
let div;
|
|
15788
|
+
|
|
15789
|
+
return {
|
|
15790
|
+
c() {
|
|
15791
|
+
div = internal.element("div");
|
|
15792
|
+
},
|
|
15793
|
+
m(target, anchor) {
|
|
15794
|
+
internal.insert(target, div, anchor);
|
|
15795
|
+
/*div_binding*/ ctx[6](div);
|
|
15796
|
+
},
|
|
15797
|
+
p: internal.noop,
|
|
15798
|
+
d(detaching) {
|
|
15799
|
+
if (detaching) internal.detach(div);
|
|
15800
|
+
/*div_binding*/ ctx[6](null);
|
|
15801
|
+
}
|
|
15802
|
+
};
|
|
15803
|
+
}
|
|
15804
|
+
|
|
15805
|
+
// (35:12) {#if itemLabel.icon}
|
|
15806
|
+
function create_if_block_1(ctx) {
|
|
15800
15807
|
let div1;
|
|
15801
15808
|
let div0;
|
|
15802
15809
|
let div0_style_value;
|
|
@@ -15807,16 +15814,16 @@ function create_if_block$1(ctx) {
|
|
|
15807
15814
|
c() {
|
|
15808
15815
|
div1 = internal.element("div");
|
|
15809
15816
|
div0 = internal.element("div");
|
|
15810
|
-
internal.attr(div0, "class", "icon svelte-
|
|
15817
|
+
internal.attr(div0, "class", "icon svelte-6b32dy");
|
|
15811
15818
|
internal.attr(div0, "style", div0_style_value = `background-image: url(${/*itemLabel*/ ctx[0].icon})`);
|
|
15812
|
-
internal.attr(div1, "class", "icon-wrap svelte-
|
|
15819
|
+
internal.attr(div1, "class", "icon-wrap svelte-6b32dy");
|
|
15813
15820
|
},
|
|
15814
15821
|
m(target, anchor) {
|
|
15815
15822
|
internal.insert(target, div1, anchor);
|
|
15816
15823
|
internal.append(div1, div0);
|
|
15817
15824
|
|
|
15818
15825
|
if (!mounted) {
|
|
15819
|
-
dispose = internal.listen(div1, "click", /*click_handler*/ ctx[
|
|
15826
|
+
dispose = internal.listen(div1, "click", /*click_handler*/ ctx[7]);
|
|
15820
15827
|
mounted = true;
|
|
15821
15828
|
}
|
|
15822
15829
|
},
|
|
@@ -15833,123 +15840,114 @@ function create_if_block$1(ctx) {
|
|
|
15833
15840
|
};
|
|
15834
15841
|
}
|
|
15835
15842
|
|
|
15836
|
-
function create_fragment$
|
|
15837
|
-
let div3;
|
|
15838
|
-
let div1;
|
|
15839
|
-
let t0;
|
|
15840
|
-
let div0;
|
|
15841
|
-
let span0;
|
|
15842
|
-
let t1_value = (/*itemLabel*/ ctx[0].code || /*itemLabel*/ ctx[0].id) + "";
|
|
15843
|
-
let t1;
|
|
15844
|
-
let t2;
|
|
15845
|
-
let span1;
|
|
15846
|
-
let t3_value = /*itemLabel*/ ctx[0].name + "";
|
|
15847
|
-
let t3;
|
|
15848
|
-
let t4;
|
|
15843
|
+
function create_fragment$2(ctx) {
|
|
15849
15844
|
let div2;
|
|
15845
|
+
let div0;
|
|
15846
|
+
let show_if;
|
|
15847
|
+
let div0_class_value;
|
|
15848
|
+
let t;
|
|
15849
|
+
let div1;
|
|
15850
|
+
let div1_class_value;
|
|
15850
15851
|
let div2_class_value;
|
|
15851
|
-
let div3_class_value;
|
|
15852
15852
|
let mounted;
|
|
15853
15853
|
let dispose;
|
|
15854
|
-
|
|
15854
|
+
|
|
15855
|
+
function select_block_type(ctx, dirty) {
|
|
15856
|
+
if (dirty & /*itemLabel*/ 1) show_if = null;
|
|
15857
|
+
if (show_if == null) show_if = !!Boolean(typeof /*itemLabel*/ ctx[0].render === 'function');
|
|
15858
|
+
if (show_if) return create_if_block$1;
|
|
15859
|
+
return create_else_block;
|
|
15860
|
+
}
|
|
15861
|
+
|
|
15862
|
+
let current_block_type = select_block_type(ctx, -1);
|
|
15863
|
+
let if_block = current_block_type(ctx);
|
|
15855
15864
|
|
|
15856
15865
|
return {
|
|
15857
15866
|
c() {
|
|
15858
|
-
div3 = internal.element("div");
|
|
15859
|
-
div1 = internal.element("div");
|
|
15860
|
-
if (if_block) if_block.c();
|
|
15861
|
-
t0 = internal.space();
|
|
15862
|
-
div0 = internal.element("div");
|
|
15863
|
-
span0 = internal.element("span");
|
|
15864
|
-
t1 = internal.text(t1_value);
|
|
15865
|
-
t2 = internal.space();
|
|
15866
|
-
span1 = internal.element("span");
|
|
15867
|
-
t3 = internal.text(t3_value);
|
|
15868
|
-
t4 = internal.space();
|
|
15869
15867
|
div2 = internal.element("div");
|
|
15870
|
-
internal.
|
|
15871
|
-
|
|
15872
|
-
internal.
|
|
15873
|
-
|
|
15874
|
-
|
|
15875
|
-
internal.attr(
|
|
15876
|
-
|
|
15877
|
-
|
|
15878
|
-
|
|
15879
|
-
internal.set_style(
|
|
15868
|
+
div0 = internal.element("div");
|
|
15869
|
+
if_block.c();
|
|
15870
|
+
t = internal.space();
|
|
15871
|
+
div1 = internal.element("div");
|
|
15872
|
+
|
|
15873
|
+
internal.attr(div0, "class", div0_class_value = "" + (internal.null_to_empty(classNames__default["default"]("item-label-item__text-wrap", {
|
|
15874
|
+
'item-label-item__custom': Boolean(typeof /*itemLabel*/ ctx[0].render === 'function')
|
|
15875
|
+
})) + " svelte-6b32dy"));
|
|
15876
|
+
|
|
15877
|
+
internal.set_style(div0, "bottom", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
15878
|
+
internal.attr(div1, "class", div1_class_value = "" + (internal.null_to_empty(classNames__default["default"]("item-label-item__bar", { anchor: /*anchorEnabled*/ ctx[1] })) + " svelte-6b32dy"));
|
|
15879
|
+
internal.set_style(div1, "height", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
15880
|
+
internal.attr(div2, "class", div2_class_value = "" + (internal.null_to_empty(classNames__default["default"]("item-label-item", { fold: /*itemLabel*/ ctx[0].isFold })) + " svelte-6b32dy"));
|
|
15881
|
+
internal.set_style(div2, "z-index", /*itemLabel*/ ctx[0].zIndex, false);
|
|
15882
|
+
internal.set_style(div2, "transform", /*itemLabel*/ ctx[0].transform, false);
|
|
15880
15883
|
},
|
|
15881
15884
|
m(target, anchor) {
|
|
15882
|
-
internal.insert(target,
|
|
15883
|
-
internal.append(
|
|
15884
|
-
|
|
15885
|
-
internal.append(
|
|
15886
|
-
internal.append(
|
|
15887
|
-
internal.append(div0, span0);
|
|
15888
|
-
internal.append(span0, t1);
|
|
15889
|
-
internal.append(div0, t2);
|
|
15890
|
-
internal.append(div0, span1);
|
|
15891
|
-
internal.append(span1, t3);
|
|
15892
|
-
internal.append(div3, t4);
|
|
15893
|
-
internal.append(div3, div2);
|
|
15885
|
+
internal.insert(target, div2, anchor);
|
|
15886
|
+
internal.append(div2, div0);
|
|
15887
|
+
if_block.m(div0, null);
|
|
15888
|
+
internal.append(div2, t);
|
|
15889
|
+
internal.append(div2, div1);
|
|
15894
15890
|
|
|
15895
15891
|
if (!mounted) {
|
|
15896
|
-
dispose = internal.listen(
|
|
15892
|
+
dispose = internal.listen(div0, "click", /*onClick*/ ctx[4]);
|
|
15897
15893
|
mounted = true;
|
|
15898
15894
|
}
|
|
15899
15895
|
},
|
|
15900
15896
|
p(ctx, [dirty]) {
|
|
15901
|
-
if (
|
|
15897
|
+
if (current_block_type === (current_block_type = select_block_type(ctx, dirty)) && if_block) {
|
|
15898
|
+
if_block.p(ctx, dirty);
|
|
15899
|
+
} else {
|
|
15900
|
+
if_block.d(1);
|
|
15901
|
+
if_block = current_block_type(ctx);
|
|
15902
|
+
|
|
15902
15903
|
if (if_block) {
|
|
15903
|
-
if_block.p(ctx, dirty);
|
|
15904
|
-
} else {
|
|
15905
|
-
if_block = create_if_block$1(ctx);
|
|
15906
15904
|
if_block.c();
|
|
15907
|
-
if_block.m(
|
|
15905
|
+
if_block.m(div0, null);
|
|
15908
15906
|
}
|
|
15909
|
-
} else if (if_block) {
|
|
15910
|
-
if_block.d(1);
|
|
15911
|
-
if_block = null;
|
|
15912
15907
|
}
|
|
15913
15908
|
|
|
15914
|
-
if (dirty & /*itemLabel*/ 1 &&
|
|
15915
|
-
|
|
15909
|
+
if (dirty & /*itemLabel*/ 1 && div0_class_value !== (div0_class_value = "" + (internal.null_to_empty(classNames__default["default"]("item-label-item__text-wrap", {
|
|
15910
|
+
'item-label-item__custom': Boolean(typeof /*itemLabel*/ ctx[0].render === 'function')
|
|
15911
|
+
})) + " svelte-6b32dy"))) {
|
|
15912
|
+
internal.attr(div0, "class", div0_class_value);
|
|
15913
|
+
}
|
|
15916
15914
|
|
|
15917
15915
|
if (dirty & /*itemLabel*/ 1) {
|
|
15918
|
-
internal.set_style(
|
|
15916
|
+
internal.set_style(div0, "bottom", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
15919
15917
|
}
|
|
15920
15918
|
|
|
15921
|
-
if (dirty & /*anchorEnabled*/ 2 &&
|
|
15922
|
-
internal.attr(
|
|
15919
|
+
if (dirty & /*anchorEnabled*/ 2 && div1_class_value !== (div1_class_value = "" + (internal.null_to_empty(classNames__default["default"]("item-label-item__bar", { anchor: /*anchorEnabled*/ ctx[1] })) + " svelte-6b32dy"))) {
|
|
15920
|
+
internal.attr(div1, "class", div1_class_value);
|
|
15923
15921
|
}
|
|
15924
15922
|
|
|
15925
15923
|
if (dirty & /*itemLabel*/ 1) {
|
|
15926
|
-
internal.set_style(
|
|
15924
|
+
internal.set_style(div1, "height", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
15927
15925
|
}
|
|
15928
15926
|
|
|
15929
|
-
if (dirty & /*itemLabel*/ 1 &&
|
|
15930
|
-
internal.attr(
|
|
15927
|
+
if (dirty & /*itemLabel*/ 1 && div2_class_value !== (div2_class_value = "" + (internal.null_to_empty(classNames__default["default"]("item-label-item", { fold: /*itemLabel*/ ctx[0].isFold })) + " svelte-6b32dy"))) {
|
|
15928
|
+
internal.attr(div2, "class", div2_class_value);
|
|
15931
15929
|
}
|
|
15932
15930
|
|
|
15933
15931
|
if (dirty & /*itemLabel*/ 1) {
|
|
15934
|
-
internal.set_style(
|
|
15932
|
+
internal.set_style(div2, "z-index", /*itemLabel*/ ctx[0].zIndex, false);
|
|
15935
15933
|
}
|
|
15936
15934
|
|
|
15937
15935
|
if (dirty & /*itemLabel*/ 1) {
|
|
15938
|
-
internal.set_style(
|
|
15936
|
+
internal.set_style(div2, "transform", /*itemLabel*/ ctx[0].transform, false);
|
|
15939
15937
|
}
|
|
15940
15938
|
},
|
|
15941
15939
|
i: internal.noop,
|
|
15942
15940
|
o: internal.noop,
|
|
15943
15941
|
d(detaching) {
|
|
15944
|
-
if (detaching) internal.detach(
|
|
15945
|
-
|
|
15942
|
+
if (detaching) internal.detach(div2);
|
|
15943
|
+
if_block.d();
|
|
15946
15944
|
mounted = false;
|
|
15947
15945
|
dispose();
|
|
15948
15946
|
}
|
|
15949
15947
|
};
|
|
15950
15948
|
}
|
|
15951
15949
|
|
|
15952
|
-
function instance$
|
|
15950
|
+
function instance$2($$self, $$props, $$invalidate) {
|
|
15953
15951
|
let { itemLabel } = $$props;
|
|
15954
15952
|
let { hooks } = $$props;
|
|
15955
15953
|
let { anchorEnabled } = $$props;
|
|
@@ -15960,16 +15958,50 @@ function instance$1($$self, $$props, $$invalidate) {
|
|
|
15960
15958
|
hooks.emit('onLabelClick', itemLabel);
|
|
15961
15959
|
}
|
|
15962
15960
|
|
|
15961
|
+
let customElement;
|
|
15962
|
+
|
|
15963
|
+
function div_binding($$value) {
|
|
15964
|
+
internal.binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
15965
|
+
customElement = $$value;
|
|
15966
|
+
$$invalidate(3, customElement);
|
|
15967
|
+
});
|
|
15968
|
+
}
|
|
15969
|
+
|
|
15963
15970
|
const click_handler = e => onIconClick(itemLabel);
|
|
15964
15971
|
|
|
15965
15972
|
$$self.$$set = $$props => {
|
|
15966
15973
|
if ('itemLabel' in $$props) $$invalidate(0, itemLabel = $$props.itemLabel);
|
|
15967
|
-
if ('hooks' in $$props) $$invalidate(
|
|
15974
|
+
if ('hooks' in $$props) $$invalidate(5, hooks = $$props.hooks);
|
|
15968
15975
|
if ('anchorEnabled' in $$props) $$invalidate(1, anchorEnabled = $$props.anchorEnabled);
|
|
15969
15976
|
if ('onIconClick' in $$props) $$invalidate(2, onIconClick = $$props.onIconClick);
|
|
15970
15977
|
};
|
|
15971
15978
|
|
|
15972
|
-
|
|
15979
|
+
$$self.$$.update = () => {
|
|
15980
|
+
if ($$self.$$.dirty & /*itemLabel, customElement*/ 9) {
|
|
15981
|
+
{
|
|
15982
|
+
if (typeof itemLabel.render === 'function' && customElement) {
|
|
15983
|
+
if (customElement.children.length === 0) {
|
|
15984
|
+
const child = itemLabel.render(itemLabel);
|
|
15985
|
+
|
|
15986
|
+
if (child) {
|
|
15987
|
+
customElement.appendChild(child);
|
|
15988
|
+
}
|
|
15989
|
+
}
|
|
15990
|
+
}
|
|
15991
|
+
}
|
|
15992
|
+
}
|
|
15993
|
+
};
|
|
15994
|
+
|
|
15995
|
+
return [
|
|
15996
|
+
itemLabel,
|
|
15997
|
+
anchorEnabled,
|
|
15998
|
+
onIconClick,
|
|
15999
|
+
customElement,
|
|
16000
|
+
onClick,
|
|
16001
|
+
hooks,
|
|
16002
|
+
div_binding,
|
|
16003
|
+
click_handler
|
|
16004
|
+
];
|
|
15973
16005
|
}
|
|
15974
16006
|
|
|
15975
16007
|
class ItemLabelItem extends internal.SvelteComponent {
|
|
@@ -15979,16 +16011,16 @@ class ItemLabelItem extends internal.SvelteComponent {
|
|
|
15979
16011
|
internal.init(
|
|
15980
16012
|
this,
|
|
15981
16013
|
options,
|
|
15982
|
-
instance$
|
|
15983
|
-
create_fragment$
|
|
16014
|
+
instance$2,
|
|
16015
|
+
create_fragment$2,
|
|
15984
16016
|
internal.safe_not_equal,
|
|
15985
16017
|
{
|
|
15986
16018
|
itemLabel: 0,
|
|
15987
|
-
hooks:
|
|
16019
|
+
hooks: 5,
|
|
15988
16020
|
anchorEnabled: 1,
|
|
15989
16021
|
onIconClick: 2
|
|
15990
16022
|
},
|
|
15991
|
-
add_css$
|
|
16023
|
+
add_css$2
|
|
15992
16024
|
);
|
|
15993
16025
|
}
|
|
15994
16026
|
}
|
|
@@ -16033,7 +16065,7 @@ function transform2RenderData(data) {
|
|
|
16033
16065
|
|
|
16034
16066
|
/* src/ItemLabelPlugin/ItemLabelComponent.svelte generated by Svelte v3.49.0 */
|
|
16035
16067
|
|
|
16036
|
-
function add_css(target) {
|
|
16068
|
+
function add_css$1(target) {
|
|
16037
16069
|
internal.append_styles(target, "svelte-gk8s47", ".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}");
|
|
16038
16070
|
}
|
|
16039
16071
|
|
|
@@ -16152,7 +16184,7 @@ function create_each_block(key_1, ctx) {
|
|
|
16152
16184
|
};
|
|
16153
16185
|
}
|
|
16154
16186
|
|
|
16155
|
-
function create_fragment(ctx) {
|
|
16187
|
+
function create_fragment$1(ctx) {
|
|
16156
16188
|
let div;
|
|
16157
16189
|
let each_blocks = [];
|
|
16158
16190
|
let each_1_lookup = new Map();
|
|
@@ -16230,7 +16262,7 @@ function create_fragment(ctx) {
|
|
|
16230
16262
|
}
|
|
16231
16263
|
let basicWidth = 11;
|
|
16232
16264
|
|
|
16233
|
-
function instance($$self, $$props, $$invalidate) {
|
|
16265
|
+
function instance$1($$self, $$props, $$invalidate) {
|
|
16234
16266
|
const { Raycaster, Vector3 } = THREE__namespace;
|
|
16235
16267
|
let { five: five$1 } = $$props;
|
|
16236
16268
|
let { modelOcclusionEnable } = $$props;
|
|
@@ -16523,8 +16555,8 @@ class ItemLabelComponent extends internal.SvelteComponent {
|
|
|
16523
16555
|
internal.init(
|
|
16524
16556
|
this,
|
|
16525
16557
|
options,
|
|
16526
|
-
instance,
|
|
16527
|
-
create_fragment,
|
|
16558
|
+
instance$1,
|
|
16559
|
+
create_fragment$1,
|
|
16528
16560
|
internal.safe_not_equal,
|
|
16529
16561
|
{
|
|
16530
16562
|
five: 7,
|
|
@@ -16535,7 +16567,7 @@ class ItemLabelComponent extends internal.SvelteComponent {
|
|
|
16535
16567
|
displayStrategyType: 11,
|
|
16536
16568
|
maxVisibleDistance: 12
|
|
16537
16569
|
},
|
|
16538
|
-
add_css,
|
|
16570
|
+
add_css$1,
|
|
16539
16571
|
[-1, -1]
|
|
16540
16572
|
);
|
|
16541
16573
|
}
|
|
@@ -16673,7 +16705,737 @@ const itemLabelPluginServerParams = {
|
|
|
16673
16705
|
version: 0,
|
|
16674
16706
|
};
|
|
16675
16707
|
|
|
16676
|
-
|
|
16708
|
+
/**
|
|
16709
|
+
* pano plugin controller 基类
|
|
16710
|
+
* @author kyleju
|
|
16711
|
+
*/
|
|
16712
|
+
class BasePanoPluginController extends Controller$5 {
|
|
16713
|
+
constructor(five) {
|
|
16714
|
+
super(five);
|
|
16715
|
+
Object.defineProperty(this, "state", {
|
|
16716
|
+
enumerable: true,
|
|
16717
|
+
configurable: true,
|
|
16718
|
+
writable: true,
|
|
16719
|
+
value: void 0
|
|
16720
|
+
});
|
|
16721
|
+
Object.defineProperty(this, "container", {
|
|
16722
|
+
enumerable: true,
|
|
16723
|
+
configurable: true,
|
|
16724
|
+
writable: true,
|
|
16725
|
+
value: void 0
|
|
16726
|
+
});
|
|
16727
|
+
Object.defineProperty(this, "enabled", {
|
|
16728
|
+
enumerable: true,
|
|
16729
|
+
configurable: true,
|
|
16730
|
+
writable: true,
|
|
16731
|
+
value: void 0
|
|
16732
|
+
});
|
|
16733
|
+
this.five = five;
|
|
16734
|
+
this.five.once('dispose', this.dispose);
|
|
16735
|
+
this.enabled = true;
|
|
16736
|
+
this.state = this.initState();
|
|
16737
|
+
console.log('base controller');
|
|
16738
|
+
}
|
|
16739
|
+
/**
|
|
16740
|
+
* 启用组件
|
|
16741
|
+
* @param options
|
|
16742
|
+
*/
|
|
16743
|
+
enable(options) {
|
|
16744
|
+
this.enabled = true;
|
|
16745
|
+
this.updateState(Object.assign(Object.assign({}, options), { userAction: true }));
|
|
16746
|
+
}
|
|
16747
|
+
/**
|
|
16748
|
+
* 禁用组件
|
|
16749
|
+
* @param options
|
|
16750
|
+
*/
|
|
16751
|
+
disable(options) {
|
|
16752
|
+
this.enabled = false;
|
|
16753
|
+
this.updateState(Object.assign(Object.assign({}, options), { userAction: true }));
|
|
16754
|
+
}
|
|
16755
|
+
/**
|
|
16756
|
+
* 显示 UI
|
|
16757
|
+
* @param options
|
|
16758
|
+
* @returns
|
|
16759
|
+
*/
|
|
16760
|
+
show(options) {
|
|
16761
|
+
if (!this.state.enabled)
|
|
16762
|
+
return;
|
|
16763
|
+
this.setState(Object.assign(Object.assign({}, this.state), { visible: true }), options);
|
|
16764
|
+
return Promise.resolve();
|
|
16765
|
+
}
|
|
16766
|
+
/**
|
|
16767
|
+
* 隐藏 UI
|
|
16768
|
+
* @param options
|
|
16769
|
+
* @returns
|
|
16770
|
+
*/
|
|
16771
|
+
hide(options) {
|
|
16772
|
+
if (!this.state.enabled)
|
|
16773
|
+
return;
|
|
16774
|
+
this.setState(Object.assign(Object.assign({}, this.state), { visible: false }), options);
|
|
16775
|
+
return Promise.resolve();
|
|
16776
|
+
}
|
|
16777
|
+
/**
|
|
16778
|
+
* 销毁对象
|
|
16779
|
+
*/
|
|
16780
|
+
dispose() {
|
|
16781
|
+
this.container.remove();
|
|
16782
|
+
}
|
|
16783
|
+
/**
|
|
16784
|
+
* 设置状态
|
|
16785
|
+
* @param state @T 状态
|
|
16786
|
+
* @param options @BaseOptions 可选配置
|
|
16787
|
+
* @returns
|
|
16788
|
+
*/
|
|
16789
|
+
setState(state, options) {
|
|
16790
|
+
if (!this.enabled)
|
|
16791
|
+
return;
|
|
16792
|
+
const prevState = Object.assign({}, this.state);
|
|
16793
|
+
this.state = Object.assign(Object.assign(Object.assign({}, this.state), state), options);
|
|
16794
|
+
this.stateChangedCallback(prevState, options);
|
|
16795
|
+
}
|
|
16796
|
+
get visible() {
|
|
16797
|
+
return this.five.state.mode === five.Five.Mode.Panorama;
|
|
16798
|
+
}
|
|
16799
|
+
appendTo(container) {
|
|
16800
|
+
if (!this.enabled)
|
|
16801
|
+
return;
|
|
16802
|
+
this.container = container;
|
|
16803
|
+
this.render();
|
|
16804
|
+
}
|
|
16805
|
+
updateState(options) {
|
|
16806
|
+
this.setState(Object.assign(Object.assign({}, this.state), { enabled: this.enabled, visible: this.visible }), options);
|
|
16807
|
+
}
|
|
16808
|
+
}
|
|
16809
|
+
|
|
16810
|
+
/* src/PanoDoorLabelPlugin/DoorLabelItem.svelte generated by Svelte v3.49.0 */
|
|
16811
|
+
|
|
16812
|
+
function add_css(target) {
|
|
16813
|
+
internal.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)}");
|
|
16814
|
+
}
|
|
16815
|
+
|
|
16816
|
+
function create_fragment(ctx) {
|
|
16817
|
+
let div1;
|
|
16818
|
+
let div0;
|
|
16819
|
+
let span;
|
|
16820
|
+
let t1;
|
|
16821
|
+
let i;
|
|
16822
|
+
let div0_class_value;
|
|
16823
|
+
let mounted;
|
|
16824
|
+
let dispose;
|
|
16825
|
+
|
|
16826
|
+
return {
|
|
16827
|
+
c() {
|
|
16828
|
+
div1 = internal.element("div");
|
|
16829
|
+
div0 = internal.element("div");
|
|
16830
|
+
span = internal.element("span");
|
|
16831
|
+
span.textContent = `${/*name*/ ctx[8]}`;
|
|
16832
|
+
t1 = internal.space();
|
|
16833
|
+
i = internal.element("i");
|
|
16834
|
+
internal.attr(span, "class", "plugin-DoorLabelPlugin-txt svelte-6rn4em");
|
|
16835
|
+
internal.attr(i, "class", "plugin-DoorLabelPlugin-icon svelte-6rn4em");
|
|
16836
|
+
internal.attr(div0, "class", div0_class_value = "" + (internal.null_to_empty(classNames__default["default"]('plugin-DoorLabelPlugin-cnt', /*props*/ ctx[0].toward)) + " svelte-6rn4em"));
|
|
16837
|
+
internal.attr(div0, "style", `transform: ${/*transform*/ ctx[6] || 'initial'};pointerEvents: ${/*inSight*/ ctx[5] ? 'auto' : 'none'};opacity: ${/*inSight*/ ctx[5] ? 1 : 0}`);
|
|
16838
|
+
internal.attr(div0, "data-camera-toward", /*cameraToward*/ ctx[7]);
|
|
16839
|
+
internal.attr(div1, "style", `left: ${/*left*/ ctx[3] || 0}%;top: ${/*top*/ ctx[4] || 0}%;opacity: ${/*inSight*/ ctx[5] ? 1 : 0}`);
|
|
16840
|
+
internal.attr(div1, "class", "plugin-DoorLabelPlugin-item svelte-6rn4em");
|
|
16841
|
+
},
|
|
16842
|
+
m(target, anchor) {
|
|
16843
|
+
internal.insert(target, div1, anchor);
|
|
16844
|
+
internal.append(div1, div0);
|
|
16845
|
+
internal.append(div0, span);
|
|
16846
|
+
internal.append(div0, t1);
|
|
16847
|
+
internal.append(div0, i);
|
|
16848
|
+
/*div1_binding*/ ctx[10](div1);
|
|
16849
|
+
|
|
16850
|
+
if (!mounted) {
|
|
16851
|
+
dispose = internal.listen(div0, "click", /*click_handler*/ ctx[9]);
|
|
16852
|
+
mounted = true;
|
|
16853
|
+
}
|
|
16854
|
+
},
|
|
16855
|
+
p(ctx, [dirty]) {
|
|
16856
|
+
if (dirty & /*props*/ 1 && div0_class_value !== (div0_class_value = "" + (internal.null_to_empty(classNames__default["default"]('plugin-DoorLabelPlugin-cnt', /*props*/ ctx[0].toward)) + " svelte-6rn4em"))) {
|
|
16857
|
+
internal.attr(div0, "class", div0_class_value);
|
|
16858
|
+
}
|
|
16859
|
+
},
|
|
16860
|
+
i: internal.noop,
|
|
16861
|
+
o: internal.noop,
|
|
16862
|
+
d(detaching) {
|
|
16863
|
+
if (detaching) internal.detach(div1);
|
|
16864
|
+
/*div1_binding*/ ctx[10](null);
|
|
16865
|
+
mounted = false;
|
|
16866
|
+
dispose();
|
|
16867
|
+
}
|
|
16868
|
+
};
|
|
16869
|
+
}
|
|
16870
|
+
|
|
16871
|
+
function instance($$self, $$props, $$invalidate) {
|
|
16872
|
+
let { props } = $$props;
|
|
16873
|
+
let { onClick } = $$props;
|
|
16874
|
+
let divElement;
|
|
16875
|
+
let { left, top, inSight, transform, panoIndex, cameraToward, name } = props;
|
|
16876
|
+
let prevPanoIndexRef = 0;
|
|
16877
|
+
|
|
16878
|
+
const initPanoIndex = () => {
|
|
16879
|
+
if (!left || !top || !inSight) {
|
|
16880
|
+
return;
|
|
16881
|
+
}
|
|
16882
|
+
|
|
16883
|
+
if (!divElement) return;
|
|
16884
|
+
const _width = divElement.current.clientWidth / window.innerWidth * 100;
|
|
16885
|
+
const _height = divElement.current.clientHeight / window.innerHeight * 100;
|
|
16886
|
+
|
|
16887
|
+
if (left <= _width / 2 || left >= 100 - _width / 2) {
|
|
16888
|
+
return;
|
|
16889
|
+
}
|
|
16890
|
+
|
|
16891
|
+
if (top <= _height / 2 || top >= 100 - _height / 2) {
|
|
16892
|
+
return;
|
|
16893
|
+
}
|
|
16894
|
+
|
|
16895
|
+
const prevPanoIndex = prevPanoIndexRef;
|
|
16896
|
+
|
|
16897
|
+
if (panoIndex !== prevPanoIndex) {
|
|
16898
|
+
// 触发埋点
|
|
16899
|
+
console.log('panoDoorLabelPlugin', panoIndex, '触发埋点');
|
|
16900
|
+
|
|
16901
|
+
// 这里触发曝光埋点
|
|
16902
|
+
prevPanoIndexRef = panoIndex;
|
|
16903
|
+
}
|
|
16904
|
+
};
|
|
16905
|
+
|
|
16906
|
+
const click_handler = e => {
|
|
16907
|
+
if (onClick) onClick();
|
|
16908
|
+
};
|
|
16909
|
+
|
|
16910
|
+
function div1_binding($$value) {
|
|
16911
|
+
internal.binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
16912
|
+
divElement = $$value;
|
|
16913
|
+
$$invalidate(2, divElement);
|
|
16914
|
+
});
|
|
16915
|
+
}
|
|
16916
|
+
|
|
16917
|
+
$$self.$$set = $$props => {
|
|
16918
|
+
if ('props' in $$props) $$invalidate(0, props = $$props.props);
|
|
16919
|
+
if ('onClick' in $$props) $$invalidate(1, onClick = $$props.onClick);
|
|
16920
|
+
};
|
|
16921
|
+
|
|
16922
|
+
{
|
|
16923
|
+
initPanoIndex();
|
|
16924
|
+
}
|
|
16925
|
+
|
|
16926
|
+
return [
|
|
16927
|
+
props,
|
|
16928
|
+
onClick,
|
|
16929
|
+
divElement,
|
|
16930
|
+
left,
|
|
16931
|
+
top,
|
|
16932
|
+
inSight,
|
|
16933
|
+
transform,
|
|
16934
|
+
cameraToward,
|
|
16935
|
+
name,
|
|
16936
|
+
click_handler,
|
|
16937
|
+
div1_binding
|
|
16938
|
+
];
|
|
16939
|
+
}
|
|
16940
|
+
|
|
16941
|
+
class DoorLabelItem extends internal.SvelteComponent {
|
|
16942
|
+
constructor(options) {
|
|
16943
|
+
super();
|
|
16944
|
+
internal.init(this, options, instance, create_fragment, internal.safe_not_equal, { props: 0, onClick: 1 }, add_css);
|
|
16945
|
+
}
|
|
16946
|
+
}
|
|
16947
|
+
|
|
16948
|
+
function isTwoRectOverlaped(rect1, rect2) {
|
|
16949
|
+
// 两矩形的中心点水平及垂直距离
|
|
16950
|
+
const verticalDistance = Math.abs(rect1.top + rect1.height / 2 - rect2.top - rect2.height / 2);
|
|
16951
|
+
const horizontalDistance = Math.abs(rect1.left + rect1.width / 2 - rect2.left - rect2.width / 2);
|
|
16952
|
+
const verticalThreshold = (rect1.height + rect2.height) / 2;
|
|
16953
|
+
const horizontalThroshold = (rect1.width + rect2.width) / 2;
|
|
16954
|
+
if (verticalDistance > verticalThreshold && horizontalDistance > horizontalThroshold) {
|
|
16955
|
+
return false;
|
|
16956
|
+
}
|
|
16957
|
+
return true;
|
|
16958
|
+
}
|
|
16959
|
+
function getCameraToward(five) {
|
|
16960
|
+
const { camera } = five;
|
|
16961
|
+
const cameraDirection = camera.getWorldDirection(new THREE.Vector3());
|
|
16962
|
+
let angel = (Math.atan(cameraDirection.z / cameraDirection.x) * 180) / Math.PI;
|
|
16963
|
+
let toward = '';
|
|
16964
|
+
if (cameraDirection.x < 0)
|
|
16965
|
+
angel += 180;
|
|
16966
|
+
if (angel < 0)
|
|
16967
|
+
angel += 360;
|
|
16968
|
+
if (angel > 315 || angel <= 45) {
|
|
16969
|
+
toward = 'right';
|
|
16970
|
+
}
|
|
16971
|
+
else if (angel > 45 && angel <= 135) {
|
|
16972
|
+
toward = 'back';
|
|
16973
|
+
}
|
|
16974
|
+
else if (angel > 135 && angel <= 225) {
|
|
16975
|
+
toward = 'left';
|
|
16976
|
+
}
|
|
16977
|
+
else if (angel > 225 && angel <= 315) {
|
|
16978
|
+
toward = 'forward';
|
|
16979
|
+
}
|
|
16980
|
+
return toward;
|
|
16981
|
+
}
|
|
16982
|
+
function getDistance(p1, p2) {
|
|
16983
|
+
return Math.sqrt(Math.pow(p1.z - p2.z, 2) + Math.pow(p1.x - p2.x, 2));
|
|
16984
|
+
}
|
|
16985
|
+
// left、right、forward、back 是 roomLabel 的朝向
|
|
16986
|
+
function getToward(rad) {
|
|
16987
|
+
const pi_4 = Math.PI / 4;
|
|
16988
|
+
if (rad > -pi_4 && rad <= pi_4) {
|
|
16989
|
+
return 'left';
|
|
16990
|
+
}
|
|
16991
|
+
else if (rad > pi_4 * 3 || rad <= -pi_4 * 3) {
|
|
16992
|
+
return 'right';
|
|
16993
|
+
}
|
|
16994
|
+
else if (rad > -pi_4 * 3 && rad <= -pi_4) {
|
|
16995
|
+
return 'forward';
|
|
16996
|
+
}
|
|
16997
|
+
else if (rad > pi_4 && rad <= pi_4 * 3) {
|
|
16998
|
+
return 'back';
|
|
16999
|
+
}
|
|
17000
|
+
return '';
|
|
17001
|
+
}
|
|
17002
|
+
|
|
17003
|
+
const defaultBaseOptions = { userAction: true };
|
|
17004
|
+
/**
|
|
17005
|
+
* 分间标签插件
|
|
17006
|
+
* @author kyleju
|
|
17007
|
+
*/
|
|
17008
|
+
class PanoDoorLabelPluginController extends BasePanoPluginController {
|
|
17009
|
+
constructor(five) {
|
|
17010
|
+
super(five);
|
|
17011
|
+
Object.defineProperty(this, "MinVisibledistance", {
|
|
17012
|
+
enumerable: true,
|
|
17013
|
+
configurable: true,
|
|
17014
|
+
writable: true,
|
|
17015
|
+
value: 1.8
|
|
17016
|
+
});
|
|
17017
|
+
Object.defineProperty(this, "MaxVisibledistance", {
|
|
17018
|
+
enumerable: true,
|
|
17019
|
+
configurable: true,
|
|
17020
|
+
writable: true,
|
|
17021
|
+
value: 6
|
|
17022
|
+
});
|
|
17023
|
+
Object.defineProperty(this, "OffsetHeight", {
|
|
17024
|
+
enumerable: true,
|
|
17025
|
+
configurable: true,
|
|
17026
|
+
writable: true,
|
|
17027
|
+
value: -1.3
|
|
17028
|
+
}); // 标签页面高度偏移值
|
|
17029
|
+
Object.defineProperty(this, "rooms", {
|
|
17030
|
+
enumerable: true,
|
|
17031
|
+
configurable: true,
|
|
17032
|
+
writable: true,
|
|
17033
|
+
value: void 0
|
|
17034
|
+
});
|
|
17035
|
+
Object.defineProperty(this, "floorplanServerData", {
|
|
17036
|
+
enumerable: true,
|
|
17037
|
+
configurable: true,
|
|
17038
|
+
writable: true,
|
|
17039
|
+
value: void 0
|
|
17040
|
+
});
|
|
17041
|
+
/** 标签项 */
|
|
17042
|
+
Object.defineProperty(this, "doorLabelItems", {
|
|
17043
|
+
enumerable: true,
|
|
17044
|
+
configurable: true,
|
|
17045
|
+
writable: true,
|
|
17046
|
+
value: void 0
|
|
17047
|
+
});
|
|
17048
|
+
/** 每个点位 visible 标签的缓存 */
|
|
17049
|
+
Object.defineProperty(this, "visibleLabelMap", {
|
|
17050
|
+
enumerable: true,
|
|
17051
|
+
configurable: true,
|
|
17052
|
+
writable: true,
|
|
17053
|
+
value: new Map()
|
|
17054
|
+
});
|
|
17055
|
+
/** 标签项Prop值 */
|
|
17056
|
+
Object.defineProperty(this, "labelItems", {
|
|
17057
|
+
enumerable: true,
|
|
17058
|
+
configurable: true,
|
|
17059
|
+
writable: true,
|
|
17060
|
+
value: []
|
|
17061
|
+
});
|
|
17062
|
+
/** 数据 */
|
|
17063
|
+
Object.defineProperty(this, "doorLabels", {
|
|
17064
|
+
enumerable: true,
|
|
17065
|
+
configurable: true,
|
|
17066
|
+
writable: true,
|
|
17067
|
+
value: void 0
|
|
17068
|
+
});
|
|
17069
|
+
Object.defineProperty(this, "roomObservers", {
|
|
17070
|
+
enumerable: true,
|
|
17071
|
+
configurable: true,
|
|
17072
|
+
writable: true,
|
|
17073
|
+
value: void 0
|
|
17074
|
+
});
|
|
17075
|
+
Object.defineProperty(this, "loadData", {
|
|
17076
|
+
enumerable: true,
|
|
17077
|
+
configurable: true,
|
|
17078
|
+
writable: true,
|
|
17079
|
+
value: (floorplanServerData) => {
|
|
17080
|
+
if (this.doorLabelItems && this.doorLabelItems.length > 0) {
|
|
17081
|
+
this.doorLabelItems.forEach((doorItem) => {
|
|
17082
|
+
doorItem.$destroy();
|
|
17083
|
+
});
|
|
17084
|
+
}
|
|
17085
|
+
this.labelItems = [];
|
|
17086
|
+
this.doorLabels = [];
|
|
17087
|
+
this.doorLabelItems = [];
|
|
17088
|
+
this.floorplanServerData = floorplanServerData;
|
|
17089
|
+
this.five.once('panoArrived', () => {
|
|
17090
|
+
console.log('doorplugin', 'panoArrived');
|
|
17091
|
+
this.initData();
|
|
17092
|
+
});
|
|
17093
|
+
}
|
|
17094
|
+
});
|
|
17095
|
+
Object.defineProperty(this, "initRoomObservers", {
|
|
17096
|
+
enumerable: true,
|
|
17097
|
+
configurable: true,
|
|
17098
|
+
writable: true,
|
|
17099
|
+
value: () => {
|
|
17100
|
+
var _a, _b;
|
|
17101
|
+
const floorDatas = this.floorplanServerData.computed_data.floor_datas || [];
|
|
17102
|
+
const observers = ((_b = (_a = this.five) === null || _a === void 0 ? void 0 : _a.work) === null || _b === void 0 ? void 0 : _b.observers) || [];
|
|
17103
|
+
const roomObservers = observers
|
|
17104
|
+
// eslint-disable-next-line array-callback-return
|
|
17105
|
+
.map((ob) => {
|
|
17106
|
+
const panoIndex = ob.panoIndex;
|
|
17107
|
+
const floorIndex = ob.floorIndex;
|
|
17108
|
+
const floor = floorDatas === null || floorDatas === void 0 ? void 0 : floorDatas.find((d) => d.floor_index === floorIndex);
|
|
17109
|
+
if (floor) {
|
|
17110
|
+
const room = floor.rooms.find((r) => r.observer_indexs.includes(panoIndex));
|
|
17111
|
+
if (room) {
|
|
17112
|
+
return { panoIndex, floorIndex, name: room.name };
|
|
17113
|
+
}
|
|
17114
|
+
}
|
|
17115
|
+
})
|
|
17116
|
+
.filter(Boolean);
|
|
17117
|
+
this.roomObservers = roomObservers;
|
|
17118
|
+
}
|
|
17119
|
+
});
|
|
17120
|
+
Object.defineProperty(this, "hideAllLabels", {
|
|
17121
|
+
enumerable: true,
|
|
17122
|
+
configurable: true,
|
|
17123
|
+
writable: true,
|
|
17124
|
+
value: () => {
|
|
17125
|
+
this.labelItems.forEach((item) => {
|
|
17126
|
+
item.visible = false;
|
|
17127
|
+
item.inSight = false;
|
|
17128
|
+
});
|
|
17129
|
+
this.render();
|
|
17130
|
+
}
|
|
17131
|
+
});
|
|
17132
|
+
Object.defineProperty(this, "fixDoorVisibleAndPosition", {
|
|
17133
|
+
enumerable: true,
|
|
17134
|
+
configurable: true,
|
|
17135
|
+
writable: true,
|
|
17136
|
+
value: () => {
|
|
17137
|
+
this.initRoomObservers();
|
|
17138
|
+
const { panoIndex } = this.five;
|
|
17139
|
+
if (!this.visible)
|
|
17140
|
+
return;
|
|
17141
|
+
if (this.five.model.empty)
|
|
17142
|
+
return;
|
|
17143
|
+
if (panoIndex === null)
|
|
17144
|
+
return;
|
|
17145
|
+
if (!this.roomObservers.find((item) => item.panoIndex === panoIndex))
|
|
17146
|
+
return;
|
|
17147
|
+
const roomObserver = this.roomObservers.find((item) => {
|
|
17148
|
+
return item.panoIndex === panoIndex;
|
|
17149
|
+
});
|
|
17150
|
+
const position = this.five.work.observers.find((item) => item.panoIndex === panoIndex).position;
|
|
17151
|
+
const targetPoint = position.clone();
|
|
17152
|
+
const visibleLabelIds = (() => {
|
|
17153
|
+
if (this.visibleLabelMap.has(panoIndex)) {
|
|
17154
|
+
/** 使用缓存 */
|
|
17155
|
+
return this.visibleLabelMap.get(panoIndex);
|
|
17156
|
+
}
|
|
17157
|
+
else {
|
|
17158
|
+
const visibleDoorIds = [];
|
|
17159
|
+
this.doorLabels.forEach((doorLabelItem, index) => {
|
|
17160
|
+
// step1 校验分间
|
|
17161
|
+
if (doorLabelItem.roomName === roomObserver.name)
|
|
17162
|
+
return;
|
|
17163
|
+
// step2 校验最大最小值
|
|
17164
|
+
const doorPosition = doorLabelItem.position.clone();
|
|
17165
|
+
const distance = doorPosition.distanceTo(targetPoint);
|
|
17166
|
+
if (distance < this.MinVisibledistance || distance > this.MaxVisibledistance)
|
|
17167
|
+
return;
|
|
17168
|
+
// step3 碰撞检测是否有遮挡
|
|
17169
|
+
const raycaster = new THREE.Raycaster();
|
|
17170
|
+
const direction = doorPosition.clone().sub(targetPoint).normalize();
|
|
17171
|
+
raycaster.set(targetPoint, direction);
|
|
17172
|
+
const [intersection] = this.five.model.intersectRaycaster(raycaster);
|
|
17173
|
+
if (intersection && intersection.distance + 0.1 < distance)
|
|
17174
|
+
return;
|
|
17175
|
+
// 🥳 最终剩下的就是当前点位可见的标签
|
|
17176
|
+
visibleDoorIds.push(index);
|
|
17177
|
+
});
|
|
17178
|
+
this.visibleLabelMap.set(panoIndex, visibleDoorIds);
|
|
17179
|
+
return visibleDoorIds;
|
|
17180
|
+
}
|
|
17181
|
+
})();
|
|
17182
|
+
this.labelItems.forEach((data, index) => {
|
|
17183
|
+
data.visible = visibleLabelIds.includes(index);
|
|
17184
|
+
});
|
|
17185
|
+
this.fixDoorPosition();
|
|
17186
|
+
}
|
|
17187
|
+
});
|
|
17188
|
+
Object.defineProperty(this, "fixDoorPosition", {
|
|
17189
|
+
enumerable: true,
|
|
17190
|
+
configurable: true,
|
|
17191
|
+
writable: true,
|
|
17192
|
+
value: () => {
|
|
17193
|
+
const { panoIndex, camera } = this.five;
|
|
17194
|
+
if (panoIndex === null)
|
|
17195
|
+
return;
|
|
17196
|
+
if (this.five.currentMode !== 'Panorama')
|
|
17197
|
+
return this.hideAllLabels();
|
|
17198
|
+
const fiveElement = this.five.getElement();
|
|
17199
|
+
const canvasWidth = fiveElement.clientWidth;
|
|
17200
|
+
const canvasHeight = fiveElement.clientHeight;
|
|
17201
|
+
const cameraDirection = camera.getWorldDirection(new THREE.Vector3());
|
|
17202
|
+
const neverOverlapLabels = [];
|
|
17203
|
+
const labelItems = [...this.labelItems];
|
|
17204
|
+
labelItems.forEach((doorLabel, index) => {
|
|
17205
|
+
if (doorLabel.visible) {
|
|
17206
|
+
const disFromCameraToLabel = camera.position.distanceTo(doorLabel.position);
|
|
17207
|
+
const labelPosition = doorLabel.position.clone().add(new THREE.Vector3(0, this.OffsetHeight, 0));
|
|
17208
|
+
const direction = labelPosition.clone().sub(camera.position).normalize();
|
|
17209
|
+
const angle = direction.angleTo(cameraDirection);
|
|
17210
|
+
const mouse = labelPosition.clone().project(camera);
|
|
17211
|
+
const left = ((mouse.x + 1) / 2.2) * 100;
|
|
17212
|
+
const top = ((-mouse.y + 1) / 2.2) * 100;
|
|
17213
|
+
const visible = left >= 0 &&
|
|
17214
|
+
left <= 100 &&
|
|
17215
|
+
top >= 0 &&
|
|
17216
|
+
top <= 100 &&
|
|
17217
|
+
disFromCameraToLabel > this.MinVisibledistance &&
|
|
17218
|
+
disFromCameraToLabel <= this.MaxVisibledistance;
|
|
17219
|
+
doorLabel.left = left;
|
|
17220
|
+
doorLabel.top = top;
|
|
17221
|
+
doorLabel.inSight = visible && angle < Math.PI / 2;
|
|
17222
|
+
doorLabel.cameraToward = getCameraToward(this.five);
|
|
17223
|
+
if (visible)
|
|
17224
|
+
neverOverlapLabels.push({ disFromCameraToLabel, left, top, index });
|
|
17225
|
+
else
|
|
17226
|
+
doorLabel.transform = 'translate(-50%, -50%)';
|
|
17227
|
+
}
|
|
17228
|
+
else {
|
|
17229
|
+
doorLabel.inSight = false;
|
|
17230
|
+
}
|
|
17231
|
+
});
|
|
17232
|
+
// 视线内多标签防重叠单独处理
|
|
17233
|
+
if (neverOverlapLabels.length > 1) {
|
|
17234
|
+
let heightLevel = 0;
|
|
17235
|
+
neverOverlapLabels.sort((a, b) => b.disFromCameraToLabel - a.disFromCameraToLabel);
|
|
17236
|
+
for (let i = 1; i < neverOverlapLabels.length; i++) {
|
|
17237
|
+
const { index: idx1, left: l1, top: t1 } = neverOverlapLabels[i - 1];
|
|
17238
|
+
const { index: idx2, left: l2, top: t2 } = neverOverlapLabels[i];
|
|
17239
|
+
const rectDom1 = this.container.children[idx1];
|
|
17240
|
+
const rectDom2 = this.container.children[idx2];
|
|
17241
|
+
if (!rectDom1 || !rectDom2)
|
|
17242
|
+
return;
|
|
17243
|
+
const rect1 = {
|
|
17244
|
+
left: (canvasWidth * l1) / 100,
|
|
17245
|
+
top: (canvasHeight * t1) / 100,
|
|
17246
|
+
width: rectDom1.children[0].clientWidth,
|
|
17247
|
+
height: rectDom1.children[0].clientHeight,
|
|
17248
|
+
};
|
|
17249
|
+
const rect2 = {
|
|
17250
|
+
left: (canvasWidth * l2) / 100,
|
|
17251
|
+
top: (canvasHeight * t2) / 100,
|
|
17252
|
+
width: rectDom2.children[0].clientWidth,
|
|
17253
|
+
height: rectDom2.children[0].clientHeight,
|
|
17254
|
+
};
|
|
17255
|
+
if (isTwoRectOverlaped(rect1, rect2)) {
|
|
17256
|
+
heightLevel++;
|
|
17257
|
+
labelItems[idx1].transform = `translate(-50%, ${(heightLevel - 1) * 100 - 50}%)`;
|
|
17258
|
+
labelItems[idx2].transform = `translate(-50%, ${heightLevel * 100 - 50}%)`;
|
|
17259
|
+
}
|
|
17260
|
+
}
|
|
17261
|
+
}
|
|
17262
|
+
this.labelItems = labelItems;
|
|
17263
|
+
this.render();
|
|
17264
|
+
}
|
|
17265
|
+
});
|
|
17266
|
+
Object.defineProperty(this, "onClick", {
|
|
17267
|
+
enumerable: true,
|
|
17268
|
+
configurable: true,
|
|
17269
|
+
writable: true,
|
|
17270
|
+
value: (roomName, position) => {
|
|
17271
|
+
if (!this.rooms)
|
|
17272
|
+
return;
|
|
17273
|
+
const { work } = this.five;
|
|
17274
|
+
let nearestIndex;
|
|
17275
|
+
let nearestVector;
|
|
17276
|
+
let minDistance = Infinity;
|
|
17277
|
+
for (let index = 0; index < work.observers.length; index++) {
|
|
17278
|
+
if (this.rooms[index].name !== roomName)
|
|
17279
|
+
continue;
|
|
17280
|
+
const observer = work.observers[index];
|
|
17281
|
+
const observerPoint = observer.standingPosition;
|
|
17282
|
+
const distance = position.distanceTo(observerPoint);
|
|
17283
|
+
if (distance < minDistance) {
|
|
17284
|
+
nearestIndex = index;
|
|
17285
|
+
nearestVector = observerPoint.clone().sub(position).normalize();
|
|
17286
|
+
minDistance = distance;
|
|
17287
|
+
}
|
|
17288
|
+
}
|
|
17289
|
+
if (nearestVector !== null && nearestIndex !== null) {
|
|
17290
|
+
const options = {};
|
|
17291
|
+
if (minDistance > 0) {
|
|
17292
|
+
const fromVector = new THREE.Vector3(0, 0, -1);
|
|
17293
|
+
const toVector = nearestVector.clone();
|
|
17294
|
+
const quaternion = new THREE.Quaternion();
|
|
17295
|
+
quaternion.setFromUnitVectors(fromVector, toVector);
|
|
17296
|
+
const euler = new THREE.Euler();
|
|
17297
|
+
euler.setFromQuaternion(quaternion, 'YXZ');
|
|
17298
|
+
options.longitude = euler.y;
|
|
17299
|
+
}
|
|
17300
|
+
const canceled = this.five.emit('wantsToMoveToPano', nearestIndex, {}, true);
|
|
17301
|
+
if (!canceled) {
|
|
17302
|
+
this.five.moveToPano(nearestIndex, { longitude: options.longitude });
|
|
17303
|
+
}
|
|
17304
|
+
}
|
|
17305
|
+
}
|
|
17306
|
+
});
|
|
17307
|
+
Object.defineProperty(this, "initData", {
|
|
17308
|
+
enumerable: true,
|
|
17309
|
+
configurable: true,
|
|
17310
|
+
writable: true,
|
|
17311
|
+
value: () => {
|
|
17312
|
+
var _a;
|
|
17313
|
+
this.doorLabels = [];
|
|
17314
|
+
const pano_index = this.five.panoIndex;
|
|
17315
|
+
const floor_index = this.floorplanServerData.computed_data.observers[pano_index].floor_index;
|
|
17316
|
+
const rooms = floor_index !== undefined &&
|
|
17317
|
+
((_a = this.floorplanServerData.computed_data.floor_datas[floor_index]) === null || _a === void 0 ? void 0 : _a.rooms);
|
|
17318
|
+
this.rooms = rooms;
|
|
17319
|
+
if (this.rooms && this.rooms.length > 0) {
|
|
17320
|
+
this.rooms.forEach((room) => {
|
|
17321
|
+
var _a;
|
|
17322
|
+
const doors = (_a = this.floorplanServerData.computed_data.doors) === null || _a === void 0 ? void 0 : _a.filter((doorItem) => {
|
|
17323
|
+
if (doorItem && doorItem.name === room.name) {
|
|
17324
|
+
return true;
|
|
17325
|
+
}
|
|
17326
|
+
return false;
|
|
17327
|
+
});
|
|
17328
|
+
const observersInRoom = this.five.work.observers.filter((observer, index) => {
|
|
17329
|
+
if (room.observer_indexs.find((item) => item === index))
|
|
17330
|
+
return true;
|
|
17331
|
+
return false;
|
|
17332
|
+
});
|
|
17333
|
+
if (doors) {
|
|
17334
|
+
doors.forEach((door) => {
|
|
17335
|
+
const doorPoint = door.position;
|
|
17336
|
+
let minDistance = Infinity;
|
|
17337
|
+
let nearestPoint;
|
|
17338
|
+
// 遍历门所在房间所有的点,找到离门最近的点
|
|
17339
|
+
observersInRoom.forEach((observer) => {
|
|
17340
|
+
const position = observer.standingPosition;
|
|
17341
|
+
const observerPoint = {
|
|
17342
|
+
x: position.x,
|
|
17343
|
+
y: position.y,
|
|
17344
|
+
z: position.z,
|
|
17345
|
+
};
|
|
17346
|
+
const distance = getDistance(doorPoint, observerPoint);
|
|
17347
|
+
if (distance < minDistance) {
|
|
17348
|
+
minDistance = distance;
|
|
17349
|
+
nearestPoint = observerPoint;
|
|
17350
|
+
}
|
|
17351
|
+
});
|
|
17352
|
+
if (nearestPoint)
|
|
17353
|
+
doorPoint.y = nearestPoint.y + 0.01;
|
|
17354
|
+
const position = new THREE.Vector3(doorPoint.x, doorPoint.y, doorPoint.z);
|
|
17355
|
+
position.add(new THREE.Vector3(-0.2, 1.8, 0).applyEuler(new THREE.Euler(0, door.rad, 0)));
|
|
17356
|
+
this.doorLabels.push({
|
|
17357
|
+
roomName: room.name,
|
|
17358
|
+
name: door.name,
|
|
17359
|
+
position,
|
|
17360
|
+
toward: getToward(door.rad),
|
|
17361
|
+
});
|
|
17362
|
+
});
|
|
17363
|
+
}
|
|
17364
|
+
});
|
|
17365
|
+
}
|
|
17366
|
+
this.labelItems = this.doorLabels.map((data) => (Object.assign(Object.assign({}, data), { left: 0, top: 0, visible: false, inSight: false, transform: '', cameraToward: '' })));
|
|
17367
|
+
console.log('doorplugin', 'labelItems', this.labelItems);
|
|
17368
|
+
this.five.on('wantsToMoveToPano', this.hideAllLabels);
|
|
17369
|
+
this.five.on('modelLoaded', this.fixDoorVisibleAndPosition);
|
|
17370
|
+
this.five.on('panoArrived', this.fixDoorVisibleAndPosition);
|
|
17371
|
+
this.five.on('initAnimationEnded', this.fixDoorPosition);
|
|
17372
|
+
this.five.on('cameraUpdate', this.fixDoorPosition);
|
|
17373
|
+
this.five.on('mouseWheel', this.fixDoorPosition);
|
|
17374
|
+
this.five.on('pinchGesture', this.fixDoorPosition);
|
|
17375
|
+
this.fixDoorVisibleAndPosition();
|
|
17376
|
+
}
|
|
17377
|
+
});
|
|
17378
|
+
}
|
|
17379
|
+
stateChangedCallback(prevState, options) {
|
|
17380
|
+
if (this.hooks.hasListener('stateChange')) {
|
|
17381
|
+
const optionParams = {
|
|
17382
|
+
state: this.state,
|
|
17383
|
+
prevState,
|
|
17384
|
+
userAction: options ? options.userAction : defaultBaseOptions.userAction,
|
|
17385
|
+
};
|
|
17386
|
+
this.hooks.emit('stateChange', optionParams);
|
|
17387
|
+
}
|
|
17388
|
+
}
|
|
17389
|
+
render() {
|
|
17390
|
+
if (!this.enabled) {
|
|
17391
|
+
this.doorLabelItems &&
|
|
17392
|
+
this.doorLabelItems.length > 0 &&
|
|
17393
|
+
this.doorLabelItems.forEach((item) => {
|
|
17394
|
+
item === null || item === void 0 ? void 0 : item.$destroy();
|
|
17395
|
+
});
|
|
17396
|
+
this.doorLabels = undefined;
|
|
17397
|
+
return;
|
|
17398
|
+
}
|
|
17399
|
+
if (this.doorLabelItems) {
|
|
17400
|
+
this.doorLabelItems.forEach((item) => {
|
|
17401
|
+
item.$destroy();
|
|
17402
|
+
});
|
|
17403
|
+
}
|
|
17404
|
+
this.doorLabelItems = [];
|
|
17405
|
+
this.labelItems.forEach((item) => {
|
|
17406
|
+
this.doorLabelItems.push(new DoorLabelItem({
|
|
17407
|
+
target: this.container,
|
|
17408
|
+
props: {
|
|
17409
|
+
props: item,
|
|
17410
|
+
onClick: () => {
|
|
17411
|
+
this.onClick(item.name, item.position);
|
|
17412
|
+
},
|
|
17413
|
+
},
|
|
17414
|
+
}));
|
|
17415
|
+
});
|
|
17416
|
+
}
|
|
17417
|
+
initState() {
|
|
17418
|
+
return { enabled: true, visible: true };
|
|
17419
|
+
}
|
|
17420
|
+
dispose() {
|
|
17421
|
+
if (this.five) {
|
|
17422
|
+
this.five.off('wantsToMoveToPano', this.hideAllLabels);
|
|
17423
|
+
this.five.off('modelLoaded', this.fixDoorVisibleAndPosition);
|
|
17424
|
+
this.five.off('panoArrived', this.fixDoorVisibleAndPosition);
|
|
17425
|
+
this.five.off('initAnimationEnded', this.fixDoorPosition);
|
|
17426
|
+
this.five.off('cameraUpdate', this.fixDoorPosition);
|
|
17427
|
+
this.five.off('mouseWheel', this.fixDoorPosition);
|
|
17428
|
+
this.five.off('pinchGesture', this.fixDoorPosition);
|
|
17429
|
+
super.dispose();
|
|
17430
|
+
}
|
|
17431
|
+
}
|
|
17432
|
+
}
|
|
17433
|
+
|
|
17434
|
+
const PanoDoorLabelPlugin = (five) => {
|
|
17435
|
+
return new PanoDoorLabelPluginController(five);
|
|
17436
|
+
};
|
|
17437
|
+
|
|
17438
|
+
const DnalogelVersion = '2.0.0-alpha.43';
|
|
16677
17439
|
|
|
16678
17440
|
exports.CSS3DRenderPlugin = CSS3DRenderPlugin;
|
|
16679
17441
|
exports.CameraMovementPlugin = CameraMovementPlugin;
|
|
@@ -16690,6 +17452,7 @@ exports.ModelTVVideoPlugin = ModelTVVideoPlugin;
|
|
|
16690
17452
|
exports.ModelViewPlugin = ModelViewPlugin;
|
|
16691
17453
|
exports.PanoCompassPlugin = PanoCompassPlugin;
|
|
16692
17454
|
exports.PanoCursorRaycasterPlugin = PanoCursorRaycasterPlugin;
|
|
17455
|
+
exports.PanoDoorLabelPlugin = PanoDoorLabelPlugin;
|
|
16693
17456
|
exports.PanoFloorplanRadarPlugin = PanoFloorplanRadarPlugin;
|
|
16694
17457
|
exports.PanoMeasurePlugin = PanoMeasurePlugin;
|
|
16695
17458
|
exports.PanoRulerPlugin = PanoRulerPlugin;
|