@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,148 @@
|
|
|
1
|
+
import TWEEN from '@tweenjs/tween.js';
|
|
2
|
+
import { mainIconStyle as mainIconStyle, mainItemStyle as mainItemStyle } from './style';
|
|
3
|
+
import { tweenProgress } from '../../../shared-utils/animationFrame/BetterTween';
|
|
4
|
+
import { MAIN_NORMAL_PATH, MAIN_DONE_PATH, MAIN_MOUSE_ENTER_FILL, MAIN_MOUSE_LEAVE_FILL } from './HTML';
|
|
5
|
+
export class MainBtnController {
|
|
6
|
+
constructor(measureController, container) {
|
|
7
|
+
Object.defineProperty(this, "container", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
configurable: true,
|
|
10
|
+
writable: true,
|
|
11
|
+
value: void 0
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(this, "measureController", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: void 0
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "mainIconMaskTween", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: void 0
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(this, "mainElement", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: void 0
|
|
30
|
+
});
|
|
31
|
+
/* 鼠标移入时变成蓝色 */
|
|
32
|
+
Object.defineProperty(this, "onMouseEnter", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: () => {
|
|
37
|
+
const { mainItem, pathDom } = this.mainElement;
|
|
38
|
+
mainItem.style.opacity = '1';
|
|
39
|
+
pathDom.setAttribute('fill', MAIN_MOUSE_ENTER_FILL);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
/* 鼠标移出时变成灰色 */
|
|
43
|
+
Object.defineProperty(this, "onMouseLeave", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
configurable: true,
|
|
46
|
+
writable: true,
|
|
47
|
+
value: () => {
|
|
48
|
+
const { mainItem, pathDom } = this.mainElement;
|
|
49
|
+
mainItem.style.opacity = '0.7';
|
|
50
|
+
pathDom.setAttribute('fill', MAIN_MOUSE_LEAVE_FILL);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(this, "onClick", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true,
|
|
56
|
+
writable: true,
|
|
57
|
+
value: () => {
|
|
58
|
+
const mode = this.measureController.getCurrentMode();
|
|
59
|
+
mode === 'Watch' ? this.measureController.changeMode('Edit') : this.measureController.save().changeMode('Watch');
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(this, "editedLineChangeHandler", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
writable: true,
|
|
66
|
+
value: (lines) => {
|
|
67
|
+
// 线的数量大于 1 时,没有状态的变化
|
|
68
|
+
if (lines.length > 1)
|
|
69
|
+
return;
|
|
70
|
+
// 因为撤销导致的状态变更 -> 取消
|
|
71
|
+
if (lines.length === 0)
|
|
72
|
+
return this.change2Cancel(false);
|
|
73
|
+
this.change2Done();
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(this, "modeChangeHandler", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
configurable: true,
|
|
79
|
+
writable: true,
|
|
80
|
+
value: (mode) => {
|
|
81
|
+
mode === 'Watch' ? this.change2Add() : this.change2Cancel();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
this.measureController = measureController;
|
|
85
|
+
this.container = container;
|
|
86
|
+
this.mainElement = this.getMainElement();
|
|
87
|
+
Object.assign(this.mainElement.mainIcon.style, mainIconStyle);
|
|
88
|
+
Object.assign(this.mainElement.mainItem.style, mainItemStyle);
|
|
89
|
+
this.change2Add();
|
|
90
|
+
this.measureController.hook.on('modeChange', this.modeChangeHandler);
|
|
91
|
+
this.mainElement.mainIcon.addEventListener('click', this.onClick);
|
|
92
|
+
this.mainElement.mainIcon.addEventListener('mouseenter', this.onMouseEnter);
|
|
93
|
+
this.mainElement.mainIcon.addEventListener('mouseleave', this.onMouseLeave);
|
|
94
|
+
}
|
|
95
|
+
dispose() {
|
|
96
|
+
this.measureController.hook.off('modeChange', this.modeChangeHandler);
|
|
97
|
+
this.measureController.hook.off('editedLineChange', this.editedLineChangeHandler);
|
|
98
|
+
this.mainElement.mainIcon.removeEventListener('click', this.onClick);
|
|
99
|
+
this.mainElement.mainIcon.removeEventListener('mouseenter', this.onMouseEnter);
|
|
100
|
+
this.mainElement.mainIcon.removeEventListener('mouseleave', this.onMouseLeave);
|
|
101
|
+
}
|
|
102
|
+
getMainElement() {
|
|
103
|
+
const mainTextDom = this.container.querySelector('.fpm__main-text');
|
|
104
|
+
const mainItem = this.container.querySelector('.fpm__main');
|
|
105
|
+
const mainIcon = this.container.querySelector('.fpm__main-icon');
|
|
106
|
+
const pathDom = mainItem === null || mainItem === void 0 ? void 0 : mainItem.querySelector('.fpm__main-icon-path');
|
|
107
|
+
const maskWhiteRect = mainIcon === null || mainIcon === void 0 ? void 0 : mainIcon.querySelector('#fpm__main-icon-mask-white');
|
|
108
|
+
if (!mainItem || !mainTextDom || !mainIcon || !pathDom || !maskWhiteRect)
|
|
109
|
+
throw new Error('cannot find dom');
|
|
110
|
+
return { mainTextDom, mainItem, mainIcon, pathDom, maskWhiteRect };
|
|
111
|
+
}
|
|
112
|
+
change2Add() {
|
|
113
|
+
this.measureController.hook.off('editedLineChange', this.editedLineChangeHandler);
|
|
114
|
+
const { mainIcon, mainTextDom, pathDom } = this.mainElement;
|
|
115
|
+
mainIcon.style.transition = mainTextDom.innerText === '完成' ? 'none' : 'transform 300ms ease-in-out';
|
|
116
|
+
mainIcon.style.transform = 'rotate(0deg)';
|
|
117
|
+
mainTextDom.innerText = '添加';
|
|
118
|
+
pathDom === null || pathDom === void 0 ? void 0 : pathDom.setAttribute('d', MAIN_NORMAL_PATH);
|
|
119
|
+
}
|
|
120
|
+
change2Cancel(withAnime = true) {
|
|
121
|
+
const { mainIcon, mainTextDom, pathDom } = this.mainElement;
|
|
122
|
+
pathDom.setAttribute('d', MAIN_NORMAL_PATH);
|
|
123
|
+
pathDom.setAttribute('mask', '');
|
|
124
|
+
mainIcon.style.transition = withAnime ? 'transform 300ms ease-in-out' : 'none';
|
|
125
|
+
mainIcon.style.transform = 'rotate(45deg)';
|
|
126
|
+
mainTextDom && (mainTextDom.innerText = '取消');
|
|
127
|
+
this.measureController.hook.on('editedLineChange', this.editedLineChangeHandler);
|
|
128
|
+
}
|
|
129
|
+
change2Done() {
|
|
130
|
+
var _a;
|
|
131
|
+
const { mainTextDom, mainIcon, pathDom, maskWhiteRect } = this.getMainElement();
|
|
132
|
+
if (mainTextDom.innerText === '完成')
|
|
133
|
+
return;
|
|
134
|
+
mainIcon.style.transition = 'none';
|
|
135
|
+
mainIcon.style.transform = 'rotate(0deg)';
|
|
136
|
+
mainTextDom.innerText = '完成';
|
|
137
|
+
pathDom.setAttribute('d', MAIN_DONE_PATH);
|
|
138
|
+
pathDom.setAttribute('mask', `url(#fpm__main-icon-mask)`);
|
|
139
|
+
(_a = this.mainIconMaskTween) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
140
|
+
this.mainIconMaskTween = tweenProgress()
|
|
141
|
+
.easing(TWEEN.Easing.Quartic.InOut)
|
|
142
|
+
.onUpdate(({ progress }) => {
|
|
143
|
+
maskWhiteRect.setAttribute('width', (progress * 30).toString());
|
|
144
|
+
})
|
|
145
|
+
.onComplete(() => { var _a; return (_a = this.mainIconMaskTween) === null || _a === void 0 ? void 0 : _a.dispose(); })
|
|
146
|
+
.play();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Mode } from '../../../Controller';
|
|
2
|
+
import type MeasureController from '../../../Controller';
|
|
3
|
+
export default class Revoke {
|
|
4
|
+
private container;
|
|
5
|
+
private revokeIcon;
|
|
6
|
+
private revokeItem;
|
|
7
|
+
private measureController;
|
|
8
|
+
constructor(measureController: MeasureController, container: Element);
|
|
9
|
+
dispose(): void;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
onModeChange: (mode: Mode) => void;
|
|
12
|
+
handleRevoke: () => () => void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export default class Revoke {
|
|
2
|
+
constructor(measureController, container) {
|
|
3
|
+
Object.defineProperty(this, "container", {
|
|
4
|
+
enumerable: true,
|
|
5
|
+
configurable: true,
|
|
6
|
+
writable: true,
|
|
7
|
+
value: void 0
|
|
8
|
+
});
|
|
9
|
+
Object.defineProperty(this, "revokeIcon", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: void 0
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(this, "revokeItem", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true,
|
|
19
|
+
value: void 0
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(this, "measureController", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: void 0
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(this, "onClick", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: () => {
|
|
32
|
+
this.measureController.revoke();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(this, "onModeChange", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: (mode) => {
|
|
40
|
+
if (mode !== 'Edit') {
|
|
41
|
+
this.revokeItem.classList.remove('enabled');
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.revokeItem.classList.add('enabled');
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(this, "handleRevoke", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
value: () => {
|
|
52
|
+
return () => { };
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
this.measureController = measureController;
|
|
56
|
+
this.container = container;
|
|
57
|
+
const revokeIcon = this.container.querySelector('.fpm__revoke-icon');
|
|
58
|
+
const revokeItem = this.container.querySelector('.fpm__revoke');
|
|
59
|
+
if (!revokeIcon || !revokeItem)
|
|
60
|
+
throw new Error('不正确的选择器');
|
|
61
|
+
this.revokeIcon = revokeIcon;
|
|
62
|
+
this.revokeItem = revokeItem;
|
|
63
|
+
this.revokeIcon.addEventListener('click', this.onClick);
|
|
64
|
+
measureController.hook.on('modeChange', this.onModeChange);
|
|
65
|
+
}
|
|
66
|
+
dispose() {
|
|
67
|
+
this.revokeIcon.removeEventListener('click', this.onClick);
|
|
68
|
+
this.measureController.hook.off('modeChange', this.onModeChange);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type MeasureController from '../../Controller';
|
|
2
|
+
export interface UIControllerParams {
|
|
3
|
+
container: Element;
|
|
4
|
+
}
|
|
5
|
+
export declare class UIController {
|
|
6
|
+
private revoke?;
|
|
7
|
+
private container;
|
|
8
|
+
private mainController?;
|
|
9
|
+
private disposers;
|
|
10
|
+
private measureController;
|
|
11
|
+
constructor(measureController: MeasureController, params: UIControllerParams);
|
|
12
|
+
dispose(): void;
|
|
13
|
+
show(): this;
|
|
14
|
+
hide(): this;
|
|
15
|
+
private handleExit;
|
|
16
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import htmlString from './HTML';
|
|
2
|
+
import { uiWrapperStyle, operatingSpaceStyle, controllerBackgroundStyle, buttonGroupStyle, exitIconStyle, exitItemStyle, textStyle, } from './style';
|
|
3
|
+
import { MainBtnController } from './MainBtnController';
|
|
4
|
+
import Revoke from './Revoke';
|
|
5
|
+
export class UIController {
|
|
6
|
+
constructor(measureController, params) {
|
|
7
|
+
Object.defineProperty(this, "revoke", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
configurable: true,
|
|
10
|
+
writable: true,
|
|
11
|
+
value: void 0
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(this, "container", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: void 0
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "mainController", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: void 0
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(this, "disposers", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: []
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(this, "measureController", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true,
|
|
34
|
+
writable: true,
|
|
35
|
+
value: void 0
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(this, "handleExit", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
configurable: true,
|
|
40
|
+
writable: true,
|
|
41
|
+
value: () => {
|
|
42
|
+
const exitIcon = this.container.querySelector('.fpm__exit-icon');
|
|
43
|
+
const exitItem = this.container.querySelector('.fpm__exit');
|
|
44
|
+
if (!exitItem || !exitIcon)
|
|
45
|
+
throw new Error('cannot find dom');
|
|
46
|
+
Object.assign(exitItem.style, exitItemStyle);
|
|
47
|
+
Object.assign(exitIcon === null || exitIcon === void 0 ? void 0 : exitIcon.style, exitIconStyle);
|
|
48
|
+
const onMouseEnter = () => (exitItem.style.opacity = '1');
|
|
49
|
+
const onMouseLeave = () => (exitItem.style.opacity = '0.7');
|
|
50
|
+
const handleClick = () => {
|
|
51
|
+
this.measureController.disable();
|
|
52
|
+
};
|
|
53
|
+
exitIcon.addEventListener('click', handleClick);
|
|
54
|
+
exitIcon.addEventListener('mouseenter', onMouseEnter);
|
|
55
|
+
exitIcon.addEventListener('mouseleave', onMouseLeave);
|
|
56
|
+
return () => {
|
|
57
|
+
exitIcon.removeEventListener('click', handleClick);
|
|
58
|
+
exitIcon.removeEventListener('mouseenter', onMouseEnter);
|
|
59
|
+
exitIcon.removeEventListener('mouseleave', onMouseLeave);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
this.measureController = measureController;
|
|
64
|
+
this.container = document.createElement('div');
|
|
65
|
+
this.container.innerHTML = htmlString;
|
|
66
|
+
this.container.classList.add('fpm__ui-controller');
|
|
67
|
+
params.container.appendChild(this.container);
|
|
68
|
+
const textDoms = this.container.querySelectorAll('.fpm__text');
|
|
69
|
+
const UIItems = this.container.querySelectorAll('.fpm__ui-item');
|
|
70
|
+
const bgDom = this.container.querySelector('.fpm_ui-bg');
|
|
71
|
+
const operatingSpaceDom = this.container.querySelector('.fpm_operating-space');
|
|
72
|
+
Object.assign(bgDom === null || bgDom === void 0 ? void 0 : bgDom.style, controllerBackgroundStyle);
|
|
73
|
+
Object.assign(operatingSpaceDom === null || operatingSpaceDom === void 0 ? void 0 : operatingSpaceDom.style, operatingSpaceStyle);
|
|
74
|
+
Object.assign(this.container.style, uiWrapperStyle);
|
|
75
|
+
UIItems.forEach((item) => Object.assign(item.style, buttonGroupStyle));
|
|
76
|
+
textDoms.forEach((item) => Object.assign(item.style, textStyle));
|
|
77
|
+
}
|
|
78
|
+
dispose() {
|
|
79
|
+
this.hide();
|
|
80
|
+
this.container.remove();
|
|
81
|
+
}
|
|
82
|
+
show() {
|
|
83
|
+
this.container.style.display = 'block';
|
|
84
|
+
this.container.style.opacity = '1';
|
|
85
|
+
this.container.style.transform = 'translate(0, 0)';
|
|
86
|
+
this.revoke = new Revoke(this.measureController, this.container);
|
|
87
|
+
this.mainController = new MainBtnController(this.measureController, this.container);
|
|
88
|
+
this.disposers.push(this.handleExit());
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
91
|
+
hide() {
|
|
92
|
+
var _a, _b;
|
|
93
|
+
this.container.style.display = 'none';
|
|
94
|
+
this.container.style.opacity = '0';
|
|
95
|
+
this.container.style.transform = 'translate(0, 10px)';
|
|
96
|
+
(_a = this.revoke) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
97
|
+
(_b = this.mainController) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
98
|
+
this.disposers.forEach((disposer) => disposer());
|
|
99
|
+
this.disposers = [];
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const addHoverImage = "//vrlab-static.ljcdn.com/release/web/measure/add-hover.944fffad.png";
|
|
2
|
+
export declare const addNormalImage = "//vrlab-static.ljcdn.com/release/web/measure/add-normal.39e967e9.png";
|
|
3
|
+
export declare const cancelHoverImage = "//vrlab-static.ljcdn.com/release/web/measure/canale-hover.74b37e24.png";
|
|
4
|
+
export declare const cancelNormalImage = "//vrlab-static.ljcdn.com/release/web/measure/cancle-normal.77bb326c.png";
|
|
5
|
+
export declare const doneHoverImage = "//vrlab-static.ljcdn.com/release/web/measure/done-hover.9e09438b.png";
|
|
6
|
+
export declare const doneNormalImage = "//vrlab-static.ljcdn.com/release/web/measure/done-normal.4fcddd73.png";
|
|
7
|
+
export declare const exitImage = "//vrlab-static.ljcdn.com/release/web/measure/exit.6693ad51.png";
|
|
8
|
+
export declare const revokeImage = "//vrlab-static.ljcdn.com/release/web/measure/revoke.3e424843.png";
|
|
9
|
+
export declare const uiWrapperStyle: Partial<CSSStyleDeclaration>;
|
|
10
|
+
export declare const operatingSpaceStyle: Partial<CSSStyleDeclaration>;
|
|
11
|
+
export declare const buttonGroupStyle: Partial<CSSStyleDeclaration>;
|
|
12
|
+
export declare const controllerBackgroundStyle: Partial<CSSStyleDeclaration>;
|
|
13
|
+
export declare const mainItemStyle: Partial<CSSStyleDeclaration>;
|
|
14
|
+
export declare const exitItemStyle: Partial<CSSStyleDeclaration>;
|
|
15
|
+
export declare const mainIconStyle: Partial<CSSStyleDeclaration>;
|
|
16
|
+
export declare const exitIconStyle: Partial<CSSStyleDeclaration>;
|
|
17
|
+
export declare const textStyle: Partial<CSSStyleDeclaration>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export const addHoverImage = '//vrlab-static.ljcdn.com/release/web/measure/add-hover.944fffad.png';
|
|
2
|
+
export const addNormalImage = '//vrlab-static.ljcdn.com/release/web/measure/add-normal.39e967e9.png';
|
|
3
|
+
export const cancelHoverImage = '//vrlab-static.ljcdn.com/release/web/measure/canale-hover.74b37e24.png';
|
|
4
|
+
export const cancelNormalImage = '//vrlab-static.ljcdn.com/release/web/measure/cancle-normal.77bb326c.png';
|
|
5
|
+
export const doneHoverImage = '//vrlab-static.ljcdn.com/release/web/measure/done-hover.9e09438b.png';
|
|
6
|
+
export const doneNormalImage = '//vrlab-static.ljcdn.com/release/web/measure/done-normal.4fcddd73.png';
|
|
7
|
+
export const exitImage = '//vrlab-static.ljcdn.com/release/web/measure/exit.6693ad51.png';
|
|
8
|
+
export const revokeImage = '//vrlab-static.ljcdn.com/release/web/measure/revoke.3e424843.png';
|
|
9
|
+
export const uiWrapperStyle = {
|
|
10
|
+
display: 'none',
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
top: '0',
|
|
13
|
+
left: '0',
|
|
14
|
+
width: '100%',
|
|
15
|
+
height: '100%',
|
|
16
|
+
opacity: '0',
|
|
17
|
+
transform: 'translate(0, 10px)',
|
|
18
|
+
transition: 'opacity 500ms ease-in-out, transform 500ms ease-in-out',
|
|
19
|
+
};
|
|
20
|
+
export const operatingSpaceStyle = {
|
|
21
|
+
position: 'absolute',
|
|
22
|
+
left: '50%',
|
|
23
|
+
bottom: '32px',
|
|
24
|
+
transform: 'translateX(-50%)',
|
|
25
|
+
width: '300px',
|
|
26
|
+
height: '89px',
|
|
27
|
+
display: 'flex',
|
|
28
|
+
justifyContent: 'space-between',
|
|
29
|
+
fontSize: '16px',
|
|
30
|
+
pointerEvents: 'all',
|
|
31
|
+
color: '#fff',
|
|
32
|
+
zIndex: '10',
|
|
33
|
+
};
|
|
34
|
+
export const buttonGroupStyle = {
|
|
35
|
+
height: '100%',
|
|
36
|
+
width: 'max-content',
|
|
37
|
+
display: 'flex',
|
|
38
|
+
flexDirection: 'column',
|
|
39
|
+
justifyContent: 'space-between',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
};
|
|
42
|
+
// 操作区下方的背景
|
|
43
|
+
export const controllerBackgroundStyle = {
|
|
44
|
+
position: 'absolute',
|
|
45
|
+
bottom: '0',
|
|
46
|
+
left: '0',
|
|
47
|
+
opacity: '0.5',
|
|
48
|
+
width: '100%',
|
|
49
|
+
height: '184px',
|
|
50
|
+
background: `linear-gradient(180deg, rgba(0,0,0,0.00) 0%, #000000 100%)`,
|
|
51
|
+
zIndex: '0',
|
|
52
|
+
};
|
|
53
|
+
// item
|
|
54
|
+
export const mainItemStyle = {
|
|
55
|
+
margin: '0 80px',
|
|
56
|
+
opacity: '0.7',
|
|
57
|
+
};
|
|
58
|
+
export const exitItemStyle = {
|
|
59
|
+
opacity: '0.7',
|
|
60
|
+
};
|
|
61
|
+
// icon
|
|
62
|
+
export const mainIconStyle = {
|
|
63
|
+
width: '60px',
|
|
64
|
+
height: '60px',
|
|
65
|
+
backgroundSize: '100%',
|
|
66
|
+
cursor: 'pointer',
|
|
67
|
+
};
|
|
68
|
+
export const exitIconStyle = {
|
|
69
|
+
width: '40px',
|
|
70
|
+
height: '40px',
|
|
71
|
+
marginTop: '10px',
|
|
72
|
+
backgroundSize: '100%',
|
|
73
|
+
cursor: 'pointer',
|
|
74
|
+
};
|
|
75
|
+
// text
|
|
76
|
+
export const textStyle = {
|
|
77
|
+
cursor: 'default',
|
|
78
|
+
userSelect: 'none',
|
|
79
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
import MeasureController, { MeasurePluginParameter } from './Controller';
|
|
3
|
+
declare const PanoMeasurePlugin: FivePlugin<MeasurePluginParameter, PluginReturns>;
|
|
4
|
+
export default PanoMeasurePlugin;
|
|
5
|
+
export declare type PluginReturns = MeasureController;
|
|
6
|
+
export type { PluginEvent } from './typings/event.type';
|
|
7
|
+
export type { LineJson, PointJson } from './typings/data';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface LineCompletelyJson {
|
|
2
|
+
id: string;
|
|
3
|
+
points: PointJson[];
|
|
4
|
+
}
|
|
5
|
+
export interface PolylineCompletelyJson {
|
|
6
|
+
id: string;
|
|
7
|
+
points: PointJson[];
|
|
8
|
+
lines: LineCompletelyJson[];
|
|
9
|
+
}
|
|
10
|
+
export interface LineJson {
|
|
11
|
+
id: string;
|
|
12
|
+
points: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface PolylineJson {
|
|
15
|
+
id: string;
|
|
16
|
+
points: string[];
|
|
17
|
+
lines: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface PointJson {
|
|
20
|
+
id: string;
|
|
21
|
+
lines: string[];
|
|
22
|
+
position: number[];
|
|
23
|
+
}
|
|
24
|
+
export interface PluginData {
|
|
25
|
+
lines: LineJson[];
|
|
26
|
+
points: PointJson[];
|
|
27
|
+
polylines: PolylineJson[];
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { SubscribeEventMap } from '@realsee/five';
|
|
2
|
+
import type { Vector3 } from 'three';
|
|
3
|
+
import type { Mode } from '../Controller';
|
|
4
|
+
import type { LineCompletelyJson } from './data';
|
|
5
|
+
interface ControllerEvent extends SubscribeEventMap {
|
|
6
|
+
/**
|
|
7
|
+
* Mode 变更
|
|
8
|
+
*/
|
|
9
|
+
modeChange: (mode: Mode) => void;
|
|
10
|
+
}
|
|
11
|
+
interface WatchEvent extends SubscribeEventMap {
|
|
12
|
+
selectedChange: (lines: LineCompletelyJson[]) => void;
|
|
13
|
+
}
|
|
14
|
+
interface EditEvent {
|
|
15
|
+
/**
|
|
16
|
+
* 编辑线条变更
|
|
17
|
+
*/
|
|
18
|
+
editedLineChange: (lines: LineCompletelyJson[]) => void;
|
|
19
|
+
anchorChange: (anchor: Vector3 | null) => void;
|
|
20
|
+
}
|
|
21
|
+
interface DragEvent extends SubscribeEventMap {
|
|
22
|
+
wantsDragLine: (event: {
|
|
23
|
+
point: string;
|
|
24
|
+
lines: string[];
|
|
25
|
+
}) => boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare type PluginEvent = ControllerEvent & EditEvent & WatchEvent & DragEvent;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type ValueOf<T> = T[keyof T];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TextureLoader, Color } from 'three';
|
|
2
|
+
const lineWidth = 2;
|
|
3
|
+
const lightLineWidth = 4;
|
|
4
|
+
const lineColor = new Color(0xffffff);
|
|
5
|
+
const lightLineColor = new Color(0x2d7cff);
|
|
6
|
+
const pointColor = new Color(0xffffff);
|
|
7
|
+
const lightPointColor = new Color(0x2d7cff);
|
|
8
|
+
const pointSize = 8;
|
|
9
|
+
const lightPointSize = 16;
|
|
10
|
+
const pointImage = 'data:image/png;base64,' +
|
|
11
|
+
'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==';
|
|
12
|
+
const pointTexture = new TextureLoader().load(pointImage);
|
|
13
|
+
export const normalLineOpts = {
|
|
14
|
+
pointTexture,
|
|
15
|
+
pointSize,
|
|
16
|
+
lineWidth,
|
|
17
|
+
lineColor,
|
|
18
|
+
pointColor,
|
|
19
|
+
lineRenderOrder: 20,
|
|
20
|
+
pointsRenderOrder: 20,
|
|
21
|
+
};
|
|
22
|
+
export const dashLineOpts = Object.assign({}, normalLineOpts, { dashed: true });
|
|
23
|
+
export const lightLineOpts = {
|
|
24
|
+
pointTexture,
|
|
25
|
+
pointSize: lightPointSize,
|
|
26
|
+
lineWidth: lightLineWidth,
|
|
27
|
+
lineColor: lightLineColor,
|
|
28
|
+
pointColor: lightPointColor,
|
|
29
|
+
lineRenderOrder: 10,
|
|
30
|
+
pointsRenderOrder: 10,
|
|
31
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type Line from '../Model/line';
|
|
2
|
+
import type { Five } from '@realsee/five';
|
|
3
|
+
import type { LineCompletelyJson, PolylineCompletelyJson } from '../typings/data';
|
|
4
|
+
import { Vector3 } from 'three';
|
|
5
|
+
export declare type DistanceItem = ReturnType<typeof creatDistanceItem>;
|
|
6
|
+
export interface UserDistanceItem {
|
|
7
|
+
element: Element;
|
|
8
|
+
highlight: () => void;
|
|
9
|
+
unHighlight: () => void;
|
|
10
|
+
update: (params: {
|
|
11
|
+
line: LineCompletelyJson;
|
|
12
|
+
polyline: PolylineCompletelyJson;
|
|
13
|
+
}) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface IDistanceItemProps {
|
|
16
|
+
line: Line;
|
|
17
|
+
userDistanceItem?: UserDistanceItem;
|
|
18
|
+
clickCallback?: (item: DistanceItem) => unknown;
|
|
19
|
+
}
|
|
20
|
+
export declare function creatDistanceItem(props: IDistanceItemProps): {
|
|
21
|
+
lineID: string;
|
|
22
|
+
ndcPosition: Vector3;
|
|
23
|
+
update: (five: Five) => void;
|
|
24
|
+
appendTo: (container: Element) => void;
|
|
25
|
+
remove: () => void;
|
|
26
|
+
highlight: () => void;
|
|
27
|
+
unHighlight: () => void;
|
|
28
|
+
};
|