@realsee/dnalogel 2.0.0-alpha.2 → 2.0.0-alpha.22
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/CHANGELOG.md +78 -0
- package/README.md +93 -4
- package/TERMS.txt +56 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.js +234 -0
- package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.js +302 -0
- package/dist/CameraMovementPlugin/typing.d.ts +68 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.js +143 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.js +201 -0
- package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/index.js +668 -0
- package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/dist/ModelRoomLabelPlugin/index.js +505 -0
- package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +4 -0
- package/dist/ModelTVVideoPlugin/index.js +301 -0
- package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/dist/ModelViewPlugin/index.d.ts +17 -0
- package/dist/ModelViewPlugin/index.js +187 -0
- package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.d.ts +51 -0
- package/dist/PanoCompassPlugin/index.js +635 -0
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
- package/dist/PanoCursorRaycasterPlugin/index.js +90 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +61 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/dist/PanoMeasurePlugin/index.d.ts +7 -0
- package/dist/PanoMeasurePlugin/index.js +5531 -0
- package/dist/PanoMeasurePlugin/typings/data.d.ts +28 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
- package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/dist/PanoRulerPlugin/index.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.js +612 -0
- package/dist/PanoRulerPlugin/style.d.ts +2 -0
- package/dist/PanoRulerPlugin/typings.d.ts +21 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +33 -0
- package/dist/PanoSpatialTagPlugin/index.js +1294 -0
- package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/dist/floorplan/Assets/camera.d.ts +1 -0
- package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/Assets/compass.d.ts +0 -0
- package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +105 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.js +4034 -0
- package/dist/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +28 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +1642 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +75 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +3646 -0
- package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/dist/floorplan/constant.d.ts +5 -0
- package/dist/floorplan/typings/floorplanData.d.ts +137 -0
- package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
- package/dist/floorplan/typings/utility.d.ts +2 -0
- package/dist/floorplan/utils/formatData.d.ts +5 -0
- package/dist/floorplan/utils/formatPosition.d.ts +36 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.es.js +15138 -0
- package/dist/index.js +15180 -0
- package/dist/index.umd.js +15173 -0
- package/dist/shared-utils/Preloader.d.ts +6 -0
- package/dist/shared-utils/Subscribe.d.ts +45 -0
- package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
- package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
- package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
- package/dist/shared-utils/animationFrame/index.d.ts +15 -0
- package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
- package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
- package/dist/shared-utils/createLine/index.d.ts +3 -0
- package/dist/shared-utils/debounce.d.ts +6 -0
- package/dist/shared-utils/equal.d.ts +11 -0
- package/dist/shared-utils/filter.d.ts +27 -0
- package/dist/shared-utils/five/changeMode.d.ts +2 -0
- package/dist/shared-utils/five/useFivePlugin.d.ts +1 -0
- package/dist/shared-utils/formatRad.d.ts +7 -0
- package/dist/shared-utils/getPxmm.d.ts +11 -0
- package/dist/shared-utils/getRandomColor.d.ts +1 -0
- package/dist/shared-utils/isNil.d.ts +10 -0
- package/dist/shared-utils/isTruelyObject.d.ts +18 -0
- package/dist/shared-utils/math/evenNumber.d.ts +3 -0
- package/dist/shared-utils/math/planimetry.d.ts +116 -0
- package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
- package/dist/shared-utils/nearlyEqual.d.ts +7 -0
- package/dist/shared-utils/nextFrame.d.ts +1 -0
- package/dist/shared-utils/noop.d.ts +5 -0
- package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
- package/dist/shared-utils/px2rem.d.ts +1 -0
- package/dist/shared-utils/removeArrayItem.d.ts +7 -0
- package/dist/shared-utils/tap.d.ts +8 -0
- package/dist/shared-utils/three/centerPoint.d.ts +2 -0
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/dist/shared-utils/three/getNormal.d.ts +2 -0
- package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/dist/shared-utils/three/loadFbxObj.d.ts +2 -0
- package/dist/shared-utils/three/loadTexture.d.ts +2 -0
- package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
- package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
- package/dist/shared-utils/throttle.d.ts +7 -0
- package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
- package/dist/shared-utils/to.d.ts +8 -0
- package/dist/shared-utils/useDebounce.d.ts +8 -0
- package/dist/shared-utils/useThrottle.d.ts +8 -0
- package/dist/shared-utils/uuid.d.ts +4 -0
- package/dist/shared-utils/vectorTocoordinates.d.ts +7 -0
- package/dist/typings/math.type.d.ts +44 -0
- package/dist/typings/utils.type.d.ts +2 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +78 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1413 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/ModelRoomLabelController.html +20 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
- package/docs/enums/ModelFloorplanErrorType.html +1 -0
- package/docs/index.html +88 -0
- package/docs/interfaces/LineJson.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
- package/docs/interfaces/ModelFloorplanParameterType.html +1 -0
- package/docs/interfaces/ModelFloorplanViewEvent.html +5 -0
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -0
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
- package/docs/interfaces/PointJson.html +1 -0
- package/docs/interfaces/RoomLabel.html +13 -0
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +19 -0
- package/docs/modules.html +28 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +2 -2
- package/libs/CSS3DRenderPlugin/index.js +27 -26
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ModelChassisCompassPlugin/index.js +2 -2
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/libs/ModelEntryDoorGuidePlugin/index.js +13 -9
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +409 -0
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
- package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/index.js +120 -0
- package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/libs/ModelItemLabelPlugin/typings.js +7 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ModelRoomLabelPlugin/Controller.js +67 -25
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +255 -0
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.d.ts +4 -0
- package/libs/ModelTVVideoPlugin/index.js +254 -0
- package/libs/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/libs/ModelTVVideoPlugin/typings.js +8 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.js +13 -0
- package/libs/ModelViewPlugin/index.js +6 -6
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
- package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
- package/libs/PanoCompassPlugin/index.d.ts +51 -0
- package/libs/PanoCompassPlugin/index.js +253 -0
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +124 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.js +329 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +64 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +305 -0
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +61 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +265 -0
- package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/libs/PanoMeasurePlugin/Model/index.js +139 -0
- package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/libs/PanoMeasurePlugin/Model/line.js +114 -0
- package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/point.js +48 -0
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/polyline.js +65 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +15 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +153 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +48 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +110 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +153 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +117 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +148 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +70 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +102 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +79 -0
- package/libs/PanoMeasurePlugin/index.d.ts +7 -0
- package/libs/PanoMeasurePlugin/index.js +5 -0
- package/libs/PanoMeasurePlugin/typings/data.d.ts +28 -0
- package/libs/PanoMeasurePlugin/typings/data.js +1 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
- package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
- package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +115 -0
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
- package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
- package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/libs/PanoMeasurePlugin/utils/line.js +33 -0
- package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/libs/PanoMeasurePlugin/utils/math.js +44 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +22 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
- package/libs/PanoRulerPlugin/index.d.ts +31 -0
- package/libs/PanoRulerPlugin/index.js +400 -0
- package/libs/PanoRulerPlugin/style.d.ts +2 -0
- package/libs/PanoRulerPlugin/style.js +88 -0
- package/libs/PanoRulerPlugin/typings.d.ts +21 -0
- package/libs/PanoRulerPlugin/typings.js +1 -0
- package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
- package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
- package/libs/PanoSpatialTagPlugin/index.d.ts +33 -0
- package/libs/PanoSpatialTagPlugin/index.js +413 -0
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/store.js +2 -0
- package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/style.js +8 -0
- package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/libs/PanoSpatialTagPlugin/typings.js +1 -0
- package/libs/floorplan/Assets/compass.d.ts +1 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
- package/libs/floorplan/Components/BaseImage.js +222 -0
- package/libs/floorplan/Components/Camera.js +120 -0
- package/libs/floorplan/Components/Compass.js +119 -0
- package/libs/floorplan/Components/CurrentFloor.js +456 -0
- package/libs/floorplan/Components/Main.js +464 -0
- package/libs/floorplan/Components/Normalmage.js +63 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +68 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +199 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +173 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +265 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +331 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +103 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +140 -0
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
- package/libs/floorplan/Components/SvgImage.js +83 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +4 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +455 -279
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +152 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +250 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +312 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +89 -37
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +30 -14
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +269 -118
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
- package/libs/floorplan/constant.d.ts +5 -0
- package/libs/floorplan/constant.js +6 -0
- package/libs/floorplan/typings/floorplanServerData.d.ts +4 -0
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +3 -3
- package/libs/index.d.ts +22 -9
- package/libs/index.js +11 -3
- package/libs/shared-utils/Subscribe.js +8 -1
- package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
- package/libs/shared-utils/createCanvasTextTexture.js +6 -5
- package/libs/shared-utils/getPxmm.d.ts +6 -1
- package/libs/shared-utils/getPxmm.js +26 -12
- package/libs/shared-utils/math/evenNumber.js +1 -1
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
- package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
- package/libs/shared-utils/tinyEJSrender.js +210 -0
- package/libs/shared-utils/useDebounce.js +1 -1
- package/libs/shared-utils/useThrottle.js +2 -1
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +26 -13
- package/dist/dnalogel.cjs.js +0 -2
- package/dist/dnalogel.es.js +0 -37145
- package/dist/dnalogel.umd.js +0 -2
- package/dist/style.css +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
- package/libs/floorplan/Components/BaseImage.svelte +0 -25
- package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
- package/libs/floorplan/Components/Normalmage.svelte +0 -11
- package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
- package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
- package/libs/floorplan/Components/SvgImage.svelte +0 -25
- package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import { Five } from '@realsee/five';
|
|
2
|
+
import { Raycaster, Vector3 } from 'three';
|
|
3
|
+
import { intersectionOfLine } from '../shared-utils/math/planimetry';
|
|
4
|
+
import { nextFrame } from '../shared-utils/nextFrame';
|
|
5
|
+
import throttle from '../shared-utils/throttle';
|
|
6
|
+
import PanoRulerStyle from './style';
|
|
7
|
+
const getDistance = (p1, p2) => {
|
|
8
|
+
return Math.sqrt(Math.pow(p1.z - p2.z, 2) + Math.pow(p1.x - p2.x, 2));
|
|
9
|
+
};
|
|
10
|
+
const getRoomHeightInfo = (roomInfo, five) => {
|
|
11
|
+
const roomHeightInfo = {};
|
|
12
|
+
const raycaster = new Raycaster();
|
|
13
|
+
const work = five.work;
|
|
14
|
+
if (!work)
|
|
15
|
+
return roomHeightInfo;
|
|
16
|
+
const observers = roomInfo.observers;
|
|
17
|
+
work.observers.forEach((observer, index) => {
|
|
18
|
+
const { standingPosition: position } = observer;
|
|
19
|
+
const point = new Vector3(position.x, position.y, position.z);
|
|
20
|
+
raycaster.set(point, new Vector3(0, 1, 0));
|
|
21
|
+
const [intersection] = five.model.intersectRaycaster(raycaster);
|
|
22
|
+
// 虚景 VR 没有天花板碰撞射线无相交,默认固定层高2.7m
|
|
23
|
+
const verticalY = intersection ? intersection.point.y : 2.7;
|
|
24
|
+
const id = observers[index];
|
|
25
|
+
if (!id)
|
|
26
|
+
return roomHeightInfo;
|
|
27
|
+
const observerRoomName = roomInfo.rooms[id].name;
|
|
28
|
+
if (roomHeightInfo[observerRoomName] === undefined) {
|
|
29
|
+
roomHeightInfo[observerRoomName] = {
|
|
30
|
+
__roof: [verticalY],
|
|
31
|
+
__floor: [point.y],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
roomHeightInfo[observerRoomName].__roof.push(verticalY);
|
|
36
|
+
roomHeightInfo[observerRoomName].__floor.push(point.y);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
// 地板高度求中位数,屋顶高度取最高
|
|
40
|
+
for (const roomName in roomHeightInfo) {
|
|
41
|
+
const room = roomHeightInfo[roomName];
|
|
42
|
+
room.__roof.sort();
|
|
43
|
+
room.__floor.sort();
|
|
44
|
+
room.floor = room.__floor[~~(room.__floor.length / 2)];
|
|
45
|
+
room.roof = room.__roof[room.__roof.length - 1];
|
|
46
|
+
}
|
|
47
|
+
return roomHeightInfo;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* 全景标尺插件
|
|
51
|
+
*/
|
|
52
|
+
export const PanoRulerPlugin = (five, params) => {
|
|
53
|
+
const state = {
|
|
54
|
+
enable: false,
|
|
55
|
+
loaded: false,
|
|
56
|
+
options: params.options || {
|
|
57
|
+
distanceText: (distance) => `${distance.toFixed(1)}m`,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
const tpl = (name, distance) => {
|
|
61
|
+
const domStr = `
|
|
62
|
+
<div class="PanoRulerPlugin-rule-line">
|
|
63
|
+
<em></em>
|
|
64
|
+
<div class="PanoRulerPlugin-rule-label">
|
|
65
|
+
<div class="PanoRulerPlugin-rule-label-name">${state.options.distanceText(distance)}</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
`;
|
|
69
|
+
const res = document.createElement('div');
|
|
70
|
+
res.setAttribute('class', 'PanoRulerPlugin-rule');
|
|
71
|
+
res.setAttribute('data-name', name);
|
|
72
|
+
res.setAttribute('style', 'display: none');
|
|
73
|
+
res.innerHTML = domStr;
|
|
74
|
+
return res;
|
|
75
|
+
};
|
|
76
|
+
const $rule = document.createElement('div');
|
|
77
|
+
$rule.setAttribute('style', `position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;`);
|
|
78
|
+
// 添加标尺样式
|
|
79
|
+
const style = document.createElement('div');
|
|
80
|
+
style.innerHTML = PanoRulerStyle;
|
|
81
|
+
$rule.appendChild(style);
|
|
82
|
+
const __rule = {};
|
|
83
|
+
const _load = (roomInfo, roomRules) => {
|
|
84
|
+
if (state.loaded) {
|
|
85
|
+
throw new Error('标尺被重复初始化!');
|
|
86
|
+
}
|
|
87
|
+
const roomHeightInfo = getRoomHeightInfo(roomInfo, five);
|
|
88
|
+
const work = five.work;
|
|
89
|
+
if (!work)
|
|
90
|
+
return false;
|
|
91
|
+
for (const obKey in roomRules) {
|
|
92
|
+
const points = roomRules[obKey];
|
|
93
|
+
const { standingPosition: defaultPosition } = work.observers[0];
|
|
94
|
+
const roomPoints = points.map(({ x, z, observers }) => {
|
|
95
|
+
const pointRoomName = observers.length > 0 ? roomInfo.rooms[roomInfo.observers[observers[0]]].name : '';
|
|
96
|
+
const medianFloorHeight = roomHeightInfo[pointRoomName] ? roomHeightInfo[pointRoomName].floor : null;
|
|
97
|
+
let minDistance = Infinity;
|
|
98
|
+
let nearestPoint = {
|
|
99
|
+
index: 0,
|
|
100
|
+
x: defaultPosition.x,
|
|
101
|
+
y: defaultPosition.y,
|
|
102
|
+
z: defaultPosition.z,
|
|
103
|
+
};
|
|
104
|
+
observers.forEach((index) => {
|
|
105
|
+
if (!work.observers[index])
|
|
106
|
+
return;
|
|
107
|
+
const { standingPosition: position } = work.observers[index];
|
|
108
|
+
const observerPoint = {
|
|
109
|
+
index,
|
|
110
|
+
x: position.x,
|
|
111
|
+
y: position.y,
|
|
112
|
+
z: position.z,
|
|
113
|
+
};
|
|
114
|
+
const distance = getDistance({ x, z }, observerPoint);
|
|
115
|
+
if (medianFloorHeight) {
|
|
116
|
+
// 取最近点时排除高度与房间平均高度差大于0.3米的点
|
|
117
|
+
if (distance < minDistance && Math.abs(observerPoint.y - medianFloorHeight) < 0.3) {
|
|
118
|
+
minDistance = distance;
|
|
119
|
+
nearestPoint = observerPoint;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (distance < minDistance) {
|
|
124
|
+
minDistance = distance;
|
|
125
|
+
nearestPoint = observerPoint;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
const _origin = new Vector3(x, nearestPoint.y, z);
|
|
130
|
+
Object.assign(_origin, { observers });
|
|
131
|
+
const verticalY = roomHeightInfo[pointRoomName] ? roomHeightInfo[pointRoomName].roof : null;
|
|
132
|
+
const _vertical = !verticalY ? null : new Vector3(x, verticalY, z);
|
|
133
|
+
if (_vertical)
|
|
134
|
+
Object.assign(_vertical, { observers });
|
|
135
|
+
const origin = _origin;
|
|
136
|
+
const vertical = _vertical;
|
|
137
|
+
return { origin, vertical };
|
|
138
|
+
});
|
|
139
|
+
__rule[obKey] = {
|
|
140
|
+
origins: roomPoints.map((roomPoint) => roomPoint.origin),
|
|
141
|
+
rules: [],
|
|
142
|
+
};
|
|
143
|
+
for (const { origin, vertical } of roomPoints) {
|
|
144
|
+
if (!vertical)
|
|
145
|
+
continue;
|
|
146
|
+
const $element = tpl(obKey, origin.distanceTo(vertical));
|
|
147
|
+
$rule.append($element);
|
|
148
|
+
__rule[obKey].rules.push({ vertical: true, rule: [origin, vertical], $element });
|
|
149
|
+
}
|
|
150
|
+
for (let index = 0; index < roomPoints.length; index++) {
|
|
151
|
+
let nextIndex = index + 1;
|
|
152
|
+
if (nextIndex >= roomPoints.length)
|
|
153
|
+
nextIndex = 0;
|
|
154
|
+
const { origin } = roomPoints[index];
|
|
155
|
+
const { origin: next } = roomPoints[nextIndex];
|
|
156
|
+
const $element = tpl(obKey, origin.distanceTo(next));
|
|
157
|
+
$rule.append($element);
|
|
158
|
+
__rule[obKey].rules.push({ vertical: false, rule: [origin, next], $element });
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
state.loaded = true;
|
|
162
|
+
return true;
|
|
163
|
+
};
|
|
164
|
+
const load = async (_roomInfo, _roomRules, options) => {
|
|
165
|
+
const roomInfo = _roomInfo || params.roomInfo;
|
|
166
|
+
const roomRules = _roomRules || params.roomRules;
|
|
167
|
+
if (!roomInfo || !roomRules) {
|
|
168
|
+
throw new Error('标尺数据依赖不齐全!');
|
|
169
|
+
}
|
|
170
|
+
state.options = Object.assign({}, state.options, options || {});
|
|
171
|
+
if (five.model.loaded) {
|
|
172
|
+
return _load(roomInfo, roomRules);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
return await new Promise((resolve) => five.once('modelLoaded', () => resolve(_load(roomInfo, roomRules))));
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
if (params.roomInfo && params.roomRules) {
|
|
179
|
+
load(params.roomInfo, params.roomRules);
|
|
180
|
+
}
|
|
181
|
+
const getRuleScreenIntr = (startPoint, endPoint, canvasWidth, canvasHeight) => {
|
|
182
|
+
const screenLines = [
|
|
183
|
+
[
|
|
184
|
+
{ x: 0, y: 0 },
|
|
185
|
+
{ x: canvasWidth, y: 0 },
|
|
186
|
+
],
|
|
187
|
+
[
|
|
188
|
+
{ x: 0, y: 0 },
|
|
189
|
+
{ x: 0, y: canvasHeight },
|
|
190
|
+
],
|
|
191
|
+
[
|
|
192
|
+
{ x: canvasWidth, y: 0 },
|
|
193
|
+
{ x: canvasWidth, y: canvasHeight },
|
|
194
|
+
],
|
|
195
|
+
[
|
|
196
|
+
{ x: 0, y: canvasHeight },
|
|
197
|
+
{ x: canvasWidth, y: canvasHeight },
|
|
198
|
+
],
|
|
199
|
+
];
|
|
200
|
+
const intr = [];
|
|
201
|
+
for (let i = 0; i < screenLines.length; i++) {
|
|
202
|
+
const result = intersectionOfLine([startPoint, endPoint], [screenLines[i][0], screenLines[i][1]], true);
|
|
203
|
+
if (result)
|
|
204
|
+
intr.push(result);
|
|
205
|
+
}
|
|
206
|
+
if (intr.length === 0)
|
|
207
|
+
return false;
|
|
208
|
+
else {
|
|
209
|
+
return intr;
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
const freshRule = () => {
|
|
213
|
+
var _a;
|
|
214
|
+
const element = (_a = five.getElement()) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
215
|
+
if (!element)
|
|
216
|
+
return;
|
|
217
|
+
if (!state.loaded)
|
|
218
|
+
return;
|
|
219
|
+
if (Object.keys(__rule).length <= 0)
|
|
220
|
+
return;
|
|
221
|
+
const { panoIndex, camera, currentMode } = five;
|
|
222
|
+
if (panoIndex === undefined)
|
|
223
|
+
return;
|
|
224
|
+
let name;
|
|
225
|
+
for (const _name in __rule) {
|
|
226
|
+
if (_name.split(',').indexOf(panoIndex.toString()) >= 0)
|
|
227
|
+
name = _name;
|
|
228
|
+
}
|
|
229
|
+
if (!name)
|
|
230
|
+
return;
|
|
231
|
+
const cameraPosition = camera.position;
|
|
232
|
+
const cameraDirection = camera.getWorldDirection(new Vector3());
|
|
233
|
+
const width = element.clientWidth;
|
|
234
|
+
const height = element.clientHeight;
|
|
235
|
+
// 非全景模式下隐藏所有标尺
|
|
236
|
+
if (currentMode !== Five.Mode.Panorama) {
|
|
237
|
+
for (const _name in __rule) {
|
|
238
|
+
for (const { $element } of __rule[_name].rules) {
|
|
239
|
+
$element.style.display = 'none';
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
// 隐藏非当前点位的标尺
|
|
245
|
+
for (const _name in __rule) {
|
|
246
|
+
for (const { $element } of __rule[_name].rules) {
|
|
247
|
+
$element.style.display = _name === name ? 'block' : 'none';
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
const verticalLines = [];
|
|
251
|
+
// 可以看到的角度最小的拐点
|
|
252
|
+
const [visibleOrigin] = __rule[name].origins
|
|
253
|
+
.slice()
|
|
254
|
+
.filter((point) => point.observers.indexOf(panoIndex) >= 0)
|
|
255
|
+
.sort((pointA, pointB) => {
|
|
256
|
+
const angleA = pointA.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
|
|
257
|
+
const angleB = pointB.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
|
|
258
|
+
return angleA - angleB;
|
|
259
|
+
});
|
|
260
|
+
const shownNotVerticalRules = [];
|
|
261
|
+
for (const { rule, vertical, $element } of __rule[name].rules) {
|
|
262
|
+
const [start, end] = rule;
|
|
263
|
+
const $line = $element.querySelector('.PanoRulerPlugin-rule-line');
|
|
264
|
+
if (!$line)
|
|
265
|
+
return;
|
|
266
|
+
if (!visibleOrigin) {
|
|
267
|
+
$element.style.display = 'none';
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
if (start !== visibleOrigin && end !== visibleOrigin) {
|
|
271
|
+
$element.style.display = 'none';
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
if (start.distanceTo(end) < 0.5) {
|
|
275
|
+
$element.style.display = 'none';
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
if (start.observers.indexOf(panoIndex) === -1 || end.observers.indexOf(panoIndex) === -1) {
|
|
279
|
+
$element.style.display = 'none';
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
const startAngle = start.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
|
|
283
|
+
if (startAngle > Math.PI / 2) {
|
|
284
|
+
$element.style.display = 'none';
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
const endAngle = end.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
|
|
288
|
+
if (endAngle > Math.PI / 2) {
|
|
289
|
+
$element.style.display = 'none';
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
const ruleLength = start.distanceTo(end);
|
|
293
|
+
const midPoint = end.clone().sub(end.clone().sub(start).divide(new Vector3(2, 2, 2)));
|
|
294
|
+
const disFromCameraToMid = midPoint.distanceTo(cameraPosition);
|
|
295
|
+
if (disFromCameraToMid / ruleLength > 8) {
|
|
296
|
+
$element.style.display = 'none';
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
if (!vertical)
|
|
300
|
+
shownNotVerticalRules.push(rule);
|
|
301
|
+
if (vertical)
|
|
302
|
+
verticalLines.push({ $element, startAngle });
|
|
303
|
+
const mouseStart = start.clone().project(camera);
|
|
304
|
+
const startLeft = ((mouseStart.x + 1) / 2) * width;
|
|
305
|
+
const startTop = ((-mouseStart.y + 1) / 2) * height;
|
|
306
|
+
const mouseEnd = end.clone().project(camera);
|
|
307
|
+
const endLeft = ((mouseEnd.x + 1) / 2) * width;
|
|
308
|
+
const endTop = ((-mouseEnd.y + 1) / 2) * height;
|
|
309
|
+
const distance = Math.sqrt(Math.pow(endLeft - startLeft, 2) + Math.pow(endTop - startTop, 2));
|
|
310
|
+
let visibleLength = distance;
|
|
311
|
+
let labelOffset = 50;
|
|
312
|
+
const intr = getRuleScreenIntr({ x: ~~startLeft, y: ~~startTop }, {
|
|
313
|
+
x: ~~endLeft,
|
|
314
|
+
y: ~~endTop
|
|
315
|
+
}, width, height);
|
|
316
|
+
if (intr && intr.length === 1) {
|
|
317
|
+
if (visibleOrigin === start) {
|
|
318
|
+
visibleLength = Math.sqrt(Math.pow(intr[0].x - startLeft, 2) + Math.pow(intr[0].y - startTop, 2));
|
|
319
|
+
labelOffset = (visibleLength / distance) * 50;
|
|
320
|
+
}
|
|
321
|
+
else if (visibleOrigin === end) {
|
|
322
|
+
visibleLength = Math.sqrt(Math.pow(intr[0].x - endLeft, 2) + Math.pow(intr[0].y - endTop, 2));
|
|
323
|
+
labelOffset = 100 - (visibleLength / distance) * 50;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (intr && intr.length === 2) {
|
|
327
|
+
const middlePoint = {
|
|
328
|
+
x: (intr[0].x + intr[1].x) / 2,
|
|
329
|
+
y: (intr[0].y + intr[1].y) / 2,
|
|
330
|
+
};
|
|
331
|
+
const distanceFromStart = Math.sqrt(Math.pow(middlePoint.x - startLeft, 2) + Math.pow(middlePoint.y - startTop, 2));
|
|
332
|
+
labelOffset = (distanceFromStart / distance) * 100;
|
|
333
|
+
}
|
|
334
|
+
const rad = Math.PI / 2 - Math.atan2(endLeft - startLeft, startTop - endTop);
|
|
335
|
+
const deg = (rad / Math.PI) * 180;
|
|
336
|
+
const $label = $line.querySelector('.PanoRulerPlugin-rule-label');
|
|
337
|
+
// 线的长度小于标签时或者标签与线两端点重合时隐藏,
|
|
338
|
+
const labelWidth = $label.children[0].clientWidth;
|
|
339
|
+
if (labelWidth >= distance ||
|
|
340
|
+
labelWidth / 2 >= (labelOffset / 100) * distance ||
|
|
341
|
+
labelWidth / 2 >= (1 - labelOffset / 100) * distance) {
|
|
342
|
+
$line.style.display = 'none';
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
$line.style.display = 'block';
|
|
346
|
+
$line.style.width = distance + 'px';
|
|
347
|
+
$line.style.left = startLeft + 'px';
|
|
348
|
+
$line.style.top = startTop + 'px';
|
|
349
|
+
$line.style.transform = `rotate(${-deg}deg)`;
|
|
350
|
+
$label.style.left = `${labelOffset}%`;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
const nextFrameFreshRule = () => nextFrame(freshRule);
|
|
355
|
+
const throttleFreshRule = throttle(freshRule, 80);
|
|
356
|
+
const enable = () => {
|
|
357
|
+
var _a, _b;
|
|
358
|
+
if (!state.loaded)
|
|
359
|
+
return false;
|
|
360
|
+
if (state.enable)
|
|
361
|
+
return true;
|
|
362
|
+
$rule.setAttribute('class', 'PanoRulerPlugin' + (state.options.className ? ' ' + state.options.className : ''));
|
|
363
|
+
(_b = (_a = five.getElement()) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.append($rule);
|
|
364
|
+
freshRule();
|
|
365
|
+
five.on('panoArrived', freshRule);
|
|
366
|
+
five.on('modeChange', freshRule);
|
|
367
|
+
five.on('cameraDirectionUpdate', nextFrameFreshRule);
|
|
368
|
+
five.on('movingToPano', nextFrameFreshRule);
|
|
369
|
+
five.on('mouseWheel', throttleFreshRule);
|
|
370
|
+
five.on('pinchGesture', throttleFreshRule);
|
|
371
|
+
state.enable = true;
|
|
372
|
+
return true;
|
|
373
|
+
};
|
|
374
|
+
const disable = () => {
|
|
375
|
+
if (!state.enable)
|
|
376
|
+
return true;
|
|
377
|
+
five.off('panoArrived', freshRule);
|
|
378
|
+
five.off('modeChange', freshRule);
|
|
379
|
+
five.off('cameraDirectionUpdate', nextFrameFreshRule);
|
|
380
|
+
five.off('movingToPano', nextFrameFreshRule);
|
|
381
|
+
five.off('mouseWheel', throttleFreshRule);
|
|
382
|
+
five.off('pinchGesture', throttleFreshRule);
|
|
383
|
+
if ($rule) {
|
|
384
|
+
$rule.remove();
|
|
385
|
+
}
|
|
386
|
+
state.enable = false;
|
|
387
|
+
return true;
|
|
388
|
+
};
|
|
389
|
+
return {
|
|
390
|
+
enable,
|
|
391
|
+
disable,
|
|
392
|
+
load,
|
|
393
|
+
state,
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
export const panoRulerPluginServerParams = {
|
|
397
|
+
name: 'PanoRulerPlugin',
|
|
398
|
+
version: 0,
|
|
399
|
+
};
|
|
400
|
+
export default PanoRulerPlugin;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const PanoRulerStyle = "<style type=\"text/css\">\n.PanoRulerPlugin-rule-line {\n position: absolute;\n transform-origin: left center;\n width: 0;\n height: 0.0625rem;\n}\n\n.PanoRulerPlugin-rule-line::after {\n content: '';\n position: absolute;\n left: -0.125rem;\n top: -0.1rem;\n width: 0.25rem;\n height: 0.25rem;\n border-radius: 50%;\n background: #FFFFFF;\n z-index: 1;\n animation: viewport-rule-point 0.1s 1s;\n animation-fill-mode: both;\n}\n\n.PanoRulerPlugin-rule-line::before {\n content: '';\n position: absolute;\n right: -0.125rem;\n top: -0.1rem;\n width: 0.25rem;\n height: 0.25rem;\n border-radius: 50%;\n background: #FFFFFF;\n animation: viewport-rule-point 0.1s 1.5s;\n animation-fill-mode: both;\n}\n\n.PanoRulerPlugin-rule-line em {\n background: #fff;\n display: block;\n height: 100%;\n animation: viewport-rule-line 0.5s ease 1s;\n animation-fill-mode: both;\n box-shadow: 0 0 0.25rem rgb(0 0 0 / 40%);\n}\n\n.PanoRulerPlugin-rule-label {\n position: absolute;\n width: 0;\n height: 0;\n top: 0.0625rem;\n}\n\n.PanoRulerPlugin-rule-label-name {\n position: absolute;\n padding: 0.1875rem 0.375rem;\n background: rgba(195,195,195,0.30);\n backdrop-filter: blur(0.25rem);\n -webkit-backdrop-filter: blur(0.25rem);\n border-radius: 6.25rem;\n border: 0.0625rem solid rgba(255,255,255,0.6);\n white-space: nowrap;\n overflow: hidden;\n color: #FFFFFF;\n font-weight: 500;\n font-size: 0.75rem;\n line-height: 1;\n -webkit-animation: viewport-rule-label 0.25s ease 1s;\n animation: viewport-rule-label 0.25s ease 1s;\n animation-fill-mode: both;\n box-shadow: inset 0 0 0.625rem 0 rgba(255,255,255,0.30);\n}\n\n@keyframes viewport-rule-line {\n 0% { width: 0% }\n 100% { width: 100% }\n}\n\n@keyframes viewport-rule-label {\n 0% { opacity: 0; transform: scaleX(0); }\n 100% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); }\n}\n\n@keyframes viewport-rule-point {\n 0% { transform: scaleX(0); }\n 100% { transform: scaleX(1); }\n}\n</style>\n";
|
|
2
|
+
export default PanoRulerStyle;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const PanoRulerStyle = `<style type="text/css">
|
|
2
|
+
.PanoRulerPlugin-rule-line {
|
|
3
|
+
position: absolute;
|
|
4
|
+
transform-origin: left center;
|
|
5
|
+
width: 0;
|
|
6
|
+
height: 0.0625rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.PanoRulerPlugin-rule-line::after {
|
|
10
|
+
content: '';
|
|
11
|
+
position: absolute;
|
|
12
|
+
left: -0.125rem;
|
|
13
|
+
top: -0.1rem;
|
|
14
|
+
width: 0.25rem;
|
|
15
|
+
height: 0.25rem;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
background: #FFFFFF;
|
|
18
|
+
z-index: 1;
|
|
19
|
+
animation: viewport-rule-point 0.1s 1s;
|
|
20
|
+
animation-fill-mode: both;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.PanoRulerPlugin-rule-line::before {
|
|
24
|
+
content: '';
|
|
25
|
+
position: absolute;
|
|
26
|
+
right: -0.125rem;
|
|
27
|
+
top: -0.1rem;
|
|
28
|
+
width: 0.25rem;
|
|
29
|
+
height: 0.25rem;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
background: #FFFFFF;
|
|
32
|
+
animation: viewport-rule-point 0.1s 1.5s;
|
|
33
|
+
animation-fill-mode: both;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.PanoRulerPlugin-rule-line em {
|
|
37
|
+
background: #fff;
|
|
38
|
+
display: block;
|
|
39
|
+
height: 100%;
|
|
40
|
+
animation: viewport-rule-line 0.5s ease 1s;
|
|
41
|
+
animation-fill-mode: both;
|
|
42
|
+
box-shadow: 0 0 0.25rem rgb(0 0 0 / 40%);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.PanoRulerPlugin-rule-label {
|
|
46
|
+
position: absolute;
|
|
47
|
+
width: 0;
|
|
48
|
+
height: 0;
|
|
49
|
+
top: 0.0625rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.PanoRulerPlugin-rule-label-name {
|
|
53
|
+
position: absolute;
|
|
54
|
+
padding: 0.1875rem 0.375rem;
|
|
55
|
+
background: rgba(195,195,195,0.30);
|
|
56
|
+
backdrop-filter: blur(0.25rem);
|
|
57
|
+
-webkit-backdrop-filter: blur(0.25rem);
|
|
58
|
+
border-radius: 6.25rem;
|
|
59
|
+
border: 0.0625rem solid rgba(255,255,255,0.6);
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
color: #FFFFFF;
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
font-size: 0.75rem;
|
|
65
|
+
line-height: 1;
|
|
66
|
+
-webkit-animation: viewport-rule-label 0.25s ease 1s;
|
|
67
|
+
animation: viewport-rule-label 0.25s ease 1s;
|
|
68
|
+
animation-fill-mode: both;
|
|
69
|
+
box-shadow: inset 0 0 0.625rem 0 rgba(255,255,255,0.30);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@keyframes viewport-rule-line {
|
|
73
|
+
0% { width: 0% }
|
|
74
|
+
100% { width: 100% }
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@keyframes viewport-rule-label {
|
|
78
|
+
0% { opacity: 0; transform: scaleX(0); }
|
|
79
|
+
100% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@keyframes viewport-rule-point {
|
|
83
|
+
0% { transform: scaleX(0); }
|
|
84
|
+
100% { transform: scaleX(1); }
|
|
85
|
+
}
|
|
86
|
+
</style>
|
|
87
|
+
`;
|
|
88
|
+
export default PanoRulerStyle;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Room {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
localName: string;
|
|
5
|
+
area: number;
|
|
6
|
+
}
|
|
7
|
+
export interface Rooms {
|
|
8
|
+
[key: string]: Room;
|
|
9
|
+
}
|
|
10
|
+
export declare type RoomObservers = string[];
|
|
11
|
+
export interface RoomInfo {
|
|
12
|
+
rooms: Rooms;
|
|
13
|
+
observers: RoomObservers;
|
|
14
|
+
}
|
|
15
|
+
export interface RoomRules {
|
|
16
|
+
[key: string]: {
|
|
17
|
+
x: number;
|
|
18
|
+
z: number;
|
|
19
|
+
observers: number[];
|
|
20
|
+
}[];
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/* generated by Svelte v3.47.0 */
|
|
2
|
+
import {
|
|
3
|
+
SvelteComponent,
|
|
4
|
+
append_styles,
|
|
5
|
+
attr,
|
|
6
|
+
destroy_each,
|
|
7
|
+
detach,
|
|
8
|
+
element,
|
|
9
|
+
empty,
|
|
10
|
+
init,
|
|
11
|
+
insert,
|
|
12
|
+
listen,
|
|
13
|
+
noop,
|
|
14
|
+
safe_not_equal,
|
|
15
|
+
set_style,
|
|
16
|
+
toggle_class
|
|
17
|
+
} from "svelte/internal";
|
|
18
|
+
|
|
19
|
+
import { currentTarget } from '../store';
|
|
20
|
+
|
|
21
|
+
function add_css(target) {
|
|
22
|
+
append_styles(target, "svelte-scnx9u", ".PanoSpatialTagPlugin__tag-origin.svelte-scnx9u{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;animation:svelte-scnx9u-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-scnx9u:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-scnx9u{transform:translate(-50%, -50%) scale(0.6);animation:svelte-scnx9u-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@keyframes svelte-scnx9u-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-scnx9u-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}}");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function get_each_context(ctx, list, i) {
|
|
26
|
+
const child_ctx = ctx.slice();
|
|
27
|
+
child_ctx[3] = list[i];
|
|
28
|
+
return child_ctx;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// (8:0) {#each origins as origin}
|
|
32
|
+
function create_each_block(ctx) {
|
|
33
|
+
let i;
|
|
34
|
+
let style_top = `${/*origin*/ ctx[3].top}%`;
|
|
35
|
+
let style_left = `${/*origin*/ ctx[3].left}%`;
|
|
36
|
+
let mounted;
|
|
37
|
+
let dispose;
|
|
38
|
+
|
|
39
|
+
function click_handler() {
|
|
40
|
+
return /*click_handler*/ ctx[2](/*origin*/ ctx[3]);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
c() {
|
|
45
|
+
i = element("i");
|
|
46
|
+
attr(i, "class", "svelte-scnx9u");
|
|
47
|
+
toggle_class(i, "PanoSpatialTagPlugin__tag-origin", true);
|
|
48
|
+
toggle_class(i, "PanoSpatialTagPlugin__tag-origin-destroy", /*origin*/ ctx[3].destroying);
|
|
49
|
+
set_style(i, "top", style_top, false);
|
|
50
|
+
set_style(i, "left", style_left, false);
|
|
51
|
+
set_style(i, "visibility", /*origin*/ ctx[3].front ? 'visible' : 'hidden', false);
|
|
52
|
+
},
|
|
53
|
+
m(target, anchor) {
|
|
54
|
+
insert(target, i, anchor);
|
|
55
|
+
|
|
56
|
+
if (!mounted) {
|
|
57
|
+
dispose = listen(i, "click", click_handler);
|
|
58
|
+
mounted = true;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
p(new_ctx, dirty) {
|
|
62
|
+
ctx = new_ctx;
|
|
63
|
+
|
|
64
|
+
if (dirty & /*origins*/ 1) {
|
|
65
|
+
toggle_class(i, "PanoSpatialTagPlugin__tag-origin-destroy", /*origin*/ ctx[3].destroying);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (dirty & /*origins*/ 1 && style_top !== (style_top = `${/*origin*/ ctx[3].top}%`)) {
|
|
69
|
+
set_style(i, "top", style_top, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (dirty & /*origins*/ 1 && style_left !== (style_left = `${/*origin*/ ctx[3].left}%`)) {
|
|
73
|
+
set_style(i, "left", style_left, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (dirty & /*origins*/ 1) {
|
|
77
|
+
set_style(i, "visibility", /*origin*/ ctx[3].front ? 'visible' : 'hidden', false);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
d(detaching) {
|
|
81
|
+
if (detaching) detach(i);
|
|
82
|
+
mounted = false;
|
|
83
|
+
dispose();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function create_fragment(ctx) {
|
|
89
|
+
let each_1_anchor;
|
|
90
|
+
let each_value = /*origins*/ ctx[0];
|
|
91
|
+
let each_blocks = [];
|
|
92
|
+
|
|
93
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
94
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
c() {
|
|
99
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
100
|
+
each_blocks[i].c();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
each_1_anchor = empty();
|
|
104
|
+
},
|
|
105
|
+
m(target, anchor) {
|
|
106
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
107
|
+
each_blocks[i].m(target, anchor);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
insert(target, each_1_anchor, anchor);
|
|
111
|
+
},
|
|
112
|
+
p(ctx, [dirty]) {
|
|
113
|
+
if (dirty & /*origins, handleClick*/ 3) {
|
|
114
|
+
each_value = /*origins*/ ctx[0];
|
|
115
|
+
let i;
|
|
116
|
+
|
|
117
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
118
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
|
119
|
+
|
|
120
|
+
if (each_blocks[i]) {
|
|
121
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
122
|
+
} else {
|
|
123
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
124
|
+
each_blocks[i].c();
|
|
125
|
+
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
for (; i < each_blocks.length; i += 1) {
|
|
130
|
+
each_blocks[i].d(1);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
each_blocks.length = each_value.length;
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
i: noop,
|
|
137
|
+
o: noop,
|
|
138
|
+
d(detaching) {
|
|
139
|
+
destroy_each(each_blocks, detaching);
|
|
140
|
+
if (detaching) detach(each_1_anchor);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function instance($$self, $$props, $$invalidate) {
|
|
146
|
+
let { origins } = $$props;
|
|
147
|
+
|
|
148
|
+
const handleClick = id => {
|
|
149
|
+
currentTarget.update(() => `${id}-PanoSpatialTagPlugin-${Date.now()}`);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const click_handler = origin => handleClick(origin.id);
|
|
153
|
+
|
|
154
|
+
$$self.$$set = $$props => {
|
|
155
|
+
if ('origins' in $$props) $$invalidate(0, origins = $$props.origins);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
return [origins, handleClick, click_handler];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
class Component extends SvelteComponent {
|
|
162
|
+
constructor(options) {
|
|
163
|
+
super();
|
|
164
|
+
init(this, options, instance, create_fragment, safe_not_equal, { origins: 0 }, add_css);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export default Component;
|