@labelbee/lb-components 1.9.1-alpha.1 → 1.10.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +1 -1
- package/dist/assets/predictTracking/icon.svg.js +1 -0
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
- package/dist/components/pointCloudView/PointCloudContext.js +1 -1
- package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
- package/dist/components/pointCloudView/PointCloudListener.js +1 -1
- package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
- package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
- package/dist/components/pointCloudView/hooks/useAttribute.js +1 -1
- package/dist/components/pointCloudView/hooks/useHistory.js +1 -1
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/dist/components/pointCloudView/hooks/useSphere.js +1 -0
- package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
- package/dist/components/pointCloudView/hooks/useZoom.js +1 -1
- package/dist/components/pointCloudView/index.js +1 -1
- package/dist/components/predictTracking/index.js +1 -0
- package/dist/components/predictTracking/predictTrackingIcon/index.js +1 -0
- package/dist/components/predictTracking/previewResult/index.js +1 -0
- package/dist/components/predictTracking/previewResult/util.js +1 -0
- package/dist/constant/index.js +1 -1
- package/dist/data/Style.js +1 -1
- package/dist/data/enums/ToolType.js +1 -1
- package/dist/index.css +83 -18
- package/dist/index.js +1 -1
- package/dist/store/Actions.js +1 -1
- package/dist/store/annotation/actionCreators.js +1 -1
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/types/App.d.ts +1 -0
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +8 -4
- package/dist/types/components/pointCloudView/PointCloudTopView.d.ts +1 -0
- package/dist/types/components/pointCloudView/hooks/useHistory.d.ts +2 -1
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +49 -5
- package/dist/types/components/pointCloudView/hooks/useSphere.d.ts +6 -0
- package/dist/types/components/pointCloudView/hooks/useStatus.d.ts +1 -1
- package/dist/types/components/pointCloudView/hooks/useZoom.d.ts +4 -0
- package/dist/types/components/pointCloudView/index.d.ts +1 -0
- package/dist/types/components/predictTracking/index.d.ts +2 -0
- package/dist/types/components/predictTracking/predictTrackingIcon/index.d.ts +6 -0
- package/dist/types/components/predictTracking/previewResult/index.d.ts +9 -0
- package/dist/types/components/predictTracking/previewResult/util.d.ts +43 -0
- package/dist/types/constant/index.d.ts +1 -0
- package/dist/types/data/enums/ToolType.d.ts +4 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/store/Actions.d.ts +3 -0
- package/dist/types/store/annotation/actionCreators.d.ts +4 -0
- package/dist/types/store/annotation/reducer.d.ts +2 -0
- package/dist/types/store/annotation/types.d.ts +5 -0
- package/dist/types/utils/ToolUtils.d.ts +2 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/cuboid/index.d.ts +6 -0
- package/dist/utils/ToolUtils.js +1 -1
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/TextAreaFormat/index.js +1 -1
- package/dist/views/MainView/sidebar/ToolIcons.js +1 -1
- package/dist/views/MainView/sidebar/index.js +1 -1
- package/dist/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/cuboid/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/dist/views/MainView/toolHeader/headerOption/index.js +1 -1
- package/dist/views/MainView/toolHeader/index.js +1 -1
- package/es/App.js +1 -1
- package/es/assets/predictTracking/icon.svg.js +1 -4
- package/es/components/pointCloudView/PointCloud3DView.js +1 -1
- package/es/components/pointCloudView/PointCloudBackView.js +1 -1
- package/es/components/pointCloudView/PointCloudContext.js +1 -1
- package/es/components/pointCloudView/PointCloudInfos.js +1 -1
- package/es/components/pointCloudView/PointCloudListener.js +1 -1
- package/es/components/pointCloudView/PointCloudSideView.js +1 -1
- package/es/components/pointCloudView/PointCloudTopView.js +1 -1
- package/es/components/pointCloudView/hooks/useAttribute.js +1 -1
- package/es/components/pointCloudView/hooks/useHistory.js +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/es/components/pointCloudView/hooks/useSphere.js +1 -0
- package/es/components/pointCloudView/hooks/useStatus.js +1 -1
- package/es/components/pointCloudView/hooks/useZoom.js +1 -1
- package/es/components/pointCloudView/index.js +1 -1
- package/es/components/predictTracking/index.js +1 -3
- package/es/components/predictTracking/predictTrackingIcon/index.js +1 -91
- package/es/components/predictTracking/previewResult/index.js +1 -189
- package/es/components/predictTracking/previewResult/util.js +1 -135
- package/es/constant/index.js +1 -1
- package/es/data/Style.js +1 -1
- package/es/data/enums/ToolType.js +1 -1
- package/es/index.css +83 -18
- package/es/index.js +1 -1
- package/es/store/Actions.js +1 -1
- package/es/store/annotation/actionCreators.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/es/utils/ToolUtils.js +1 -1
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/TextAreaFormat/index.js +1 -1
- package/es/views/MainView/sidebar/ToolIcons.js +1 -1
- package/es/views/MainView/sidebar/index.js +1 -1
- package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/cuboid/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/es/views/MainView/toolHeader/headerOption/index.js +1 -1
- package/es/views/MainView/toolHeader/index.js +1 -1
- package/package.json +4 -4
- package/dist/components/pointCloudView/components/PointCloudSizeSlider/index.js +0 -1
- package/dist/types/components/pointCloudView/components/PointCloudSizeSlider/index.d.ts +0 -5
- package/es/App.js.map +0 -1
- package/es/assets/annotation/common/icon_adapt.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_adapt_black.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_back.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_backA.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_clear.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_clearSmall.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_clearSmall_a.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_clear_a.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_invalid.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_invalid_a.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_next.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_nextA.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_r.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_rA.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_save.svg.js.map +0 -1
- package/es/assets/annotation/common/icon_saveA.svg.js.map +0 -1
- package/es/assets/annotation/image/brightness.svg.js.map +0 -1
- package/es/assets/annotation/image/contrast.svg.js.map +0 -1
- package/es/assets/annotation/image/icon_yuantu.svg.js.map +0 -1
- package/es/assets/annotation/image/saturation.svg.js.map +0 -1
- package/es/assets/annotation/lineTool/icon_line.svg.js.map +0 -1
- package/es/assets/annotation/lineTool/icon_line_a.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/changePointCloudValid.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/copy.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/nextBox.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/nodata.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/patse.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/prevBox.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/selectAll.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/selectMultiple.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/unitAttribute.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/unitAttributeForbid.svg.js.map +0 -1
- package/es/assets/annotation/pointCloudTool/unitAttributeHover.svg.js.map +0 -1
- package/es/assets/annotation/pointTool/icon_point.svg.js.map +0 -1
- package/es/assets/annotation/pointTool/icon_point_a.svg.js.map +0 -1
- package/es/assets/annotation/polygonTool/icon_polygon.svg.js.map +0 -1
- package/es/assets/annotation/polygonTool/icon_polygon_a.svg.js.map +0 -1
- package/es/assets/annotation/rectTool/icon_rect.svg.js.map +0 -1
- package/es/assets/annotation/rectTool/icon_rectPattern.svg.js +0 -4
- package/es/assets/annotation/rectTool/icon_rectPattern.svg.js.map +0 -1
- package/es/assets/annotation/rectTool/icon_rect_a.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_copyBackwardResult.svg.js +0 -4
- package/es/assets/annotation/toolHotKeyIcon/icon_copyBackwardResult.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_segment.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js.map +0 -1
- package/es/assets/annotation/toolHotKeyIcon/setValid.svg.js.map +0 -1
- package/es/assets/annotation/video/icon_keyboard_h.svg.js.map +0 -1
- package/es/assets/attributeIcon/eraser.svg.js.map +0 -1
- package/es/assets/attributeIcon/eraser_a.svg.js.map +0 -1
- package/es/assets/attributeIcon/pen.svg.js.map +0 -1
- package/es/assets/attributeIcon/pen_a.svg.js.map +0 -1
- package/es/assets/attributeIcon/zoomUp.svg.js.map +0 -1
- package/es/assets/cssIcon/annotation/icon_clearSmall.svg +0 -10
- package/es/assets/cssIcon/annotation/icon_clearSmall_a.svg +0 -10
- package/es/assets/cssIcon/slide_btn.svg +0 -23
- package/es/assets/predictTracking/icon.svg.js.map +0 -1
- package/es/assets/toolStyle/icon_border.svg.js.map +0 -1
- package/es/assets/toolStyle/icon_borderColor.svg.js.map +0 -1
- package/es/assets/toolStyle/icon_opacityFill.svg.js.map +0 -1
- package/es/assets/toolStyle/icon_opacityStroke.svg.js.map +0 -1
- package/es/components/AnnotationView/index.js.map +0 -1
- package/es/components/AnnotationView/pointCloudAnnotationView.js.map +0 -1
- package/es/components/ImageError/index.js +0 -53
- package/es/components/ImageError/index.js.map +0 -1
- package/es/components/annotationStepPopover/index.js.map +0 -1
- package/es/components/attributeList/index.js.map +0 -1
- package/es/components/checkboxList/index.js.map +0 -1
- package/es/components/colorTag/index.js.map +0 -1
- package/es/components/customAntd/IconWithText/index.js.map +0 -1
- package/es/components/customResizeHook/index.js.map +0 -1
- package/es/components/fileException/FileError.js.map +0 -1
- package/es/components/fileException/FileInvalid.js.map +0 -1
- package/es/components/fileException/index.js.map +0 -1
- package/es/components/pointCloudView/PointCloud2DView.js.map +0 -1
- package/es/components/pointCloudView/PointCloud3DView.js.map +0 -1
- package/es/components/pointCloudView/PointCloudBackView.js.map +0 -1
- package/es/components/pointCloudView/PointCloudContext.js.map +0 -1
- package/es/components/pointCloudView/PointCloudInfos.js.map +0 -1
- package/es/components/pointCloudView/PointCloudLayout.js.map +0 -1
- package/es/components/pointCloudView/PointCloudListener.js.map +0 -1
- package/es/components/pointCloudView/PointCloudSideView.js.map +0 -1
- package/es/components/pointCloudView/PointCloudTopView.js.map +0 -1
- package/es/components/pointCloudView/components/EmptyPage/index.js.map +0 -1
- package/es/components/pointCloudView/components/PointCloudSizeSlider/index.js +0 -1
- package/es/components/pointCloudView/components/PointCloudSizeSlider/index.js.map +0 -1
- package/es/components/pointCloudView/components/UnifiedParamsModal/index.js +0 -228
- package/es/components/pointCloudView/components/UnifiedParamsModal/index.js.map +0 -1
- package/es/components/pointCloudView/components/UnifyParamsModal/index.js.map +0 -1
- package/es/components/pointCloudView/data.js +0 -4
- package/es/components/pointCloudView/data.js.map +0 -1
- package/es/components/pointCloudView/hooks/useAttribute.js.map +0 -1
- package/es/components/pointCloudView/hooks/useBoxes.js.map +0 -1
- package/es/components/pointCloudView/hooks/useConfig.js.map +0 -1
- package/es/components/pointCloudView/hooks/useHistory.js.map +0 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js.map +0 -1
- package/es/components/pointCloudView/hooks/usePolygon.js.map +0 -1
- package/es/components/pointCloudView/hooks/useRotate.js.map +0 -1
- package/es/components/pointCloudView/hooks/useSingleBox.js.map +0 -1
- package/es/components/pointCloudView/hooks/useStatus.js.map +0 -1
- package/es/components/pointCloudView/hooks/useZoom.js.map +0 -1
- package/es/components/pointCloudView/index.js.map +0 -1
- package/es/components/predictTracking/index.js.map +0 -1
- package/es/components/predictTracking/predictTrackingIcon/index.js.map +0 -1
- package/es/components/predictTracking/previewResult/index.js.map +0 -1
- package/es/components/predictTracking/previewResult/util.js.map +0 -1
- package/es/components/videoAnnotate/index.js.map +0 -1
- package/es/components/videoPlayer/TagToolInstanceAdaptor.js.map +0 -1
- package/es/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js.map +0 -1
- package/es/components/videoPlayer/VideoTagLayer.js.map +0 -1
- package/es/components/videoPlayer/components/controller/index.js.map +0 -1
- package/es/components/videoPlayer/index.js.map +0 -1
- package/es/components/videoPlayer/utils.js.map +0 -1
- package/es/configureStore.js.map +0 -1
- package/es/constant/index.js.map +0 -1
- package/es/constant/styleString.js.map +0 -1
- package/es/data/Style.js.map +0 -1
- package/es/data/enums/AnnotationSize.js.map +0 -1
- package/es/data/enums/ToolType.js.map +0 -1
- package/es/hooks/annotation.js.map +0 -1
- package/es/hooks/useConfig.js +0 -18
- package/es/hooks/useConfig.js.map +0 -1
- package/es/hooks/useRafState.js.map +0 -1
- package/es/hooks/useRefCache.js.map +0 -1
- package/es/hooks/useSafeSate.js.map +0 -1
- package/es/hooks/useSize.js.map +0 -1
- package/es/hooks/useUnmountedRef.js.map +0 -1
- package/es/index.js.map +0 -1
- package/es/store/Actions.js.map +0 -1
- package/es/store/annotation/actionCreators.js.map +0 -1
- package/es/store/annotation/map.js.map +0 -1
- package/es/store/annotation/reducer.js.map +0 -1
- package/es/store/annotation/selectors.js.map +0 -1
- package/es/store/ctx.js.map +0 -1
- package/es/store/imgAttribute/actionCreators.js.map +0 -1
- package/es/store/imgAttribute/reducer.js.map +0 -1
- package/es/store/index.js.map +0 -1
- package/es/store/toolStyle/actionCreators.js.map +0 -1
- package/es/store/toolStyle/reducer.js.map +0 -1
- package/es/utils/AnnotationDataUtils.js.map +0 -1
- package/es/utils/ConfigUtils.js.map +0 -1
- package/es/utils/PageOperator.js.map +0 -1
- package/es/utils/StepUtils.js.map +0 -1
- package/es/utils/TextUtils.js.map +0 -1
- package/es/utils/ToolStyleUtils.js.map +0 -1
- package/es/utils/ToolUtils.js.map +0 -1
- package/es/utils/data.js.map +0 -1
- package/es/utils/dom.js.map +0 -1
- package/es/utils/index.js.map +0 -1
- package/es/views/MainView/annotationOperation/index.js.map +0 -1
- package/es/views/MainView/annotationTips/index.js.map +0 -1
- package/es/views/MainView/index.js.map +0 -1
- package/es/views/MainView/sidebar/AnnotationText/index.js.map +0 -1
- package/es/views/MainView/sidebar/ClearIcon/index.js.map +0 -1
- package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js.map +0 -1
- package/es/views/MainView/sidebar/GeneralOperation/index.js.map +0 -1
- package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js.map +0 -1
- package/es/views/MainView/sidebar/ImgAttributeInfo/index.js.map +0 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/batchUpdateModal/index.js.map +0 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js.map +0 -1
- package/es/views/MainView/sidebar/ScribbleSidebar/index.js.map +0 -1
- package/es/views/MainView/sidebar/SwitchAttributeList/index.js.map +0 -1
- package/es/views/MainView/sidebar/TagSidebar/index.js.map +0 -1
- package/es/views/MainView/sidebar/TextAreaFormat/index.js.map +0 -1
- package/es/views/MainView/sidebar/TextToolSidebar/index.js.map +0 -1
- package/es/views/MainView/sidebar/ToolIcons.js.map +0 -1
- package/es/views/MainView/sidebar/ToolStyle/index.js.map +0 -1
- package/es/views/MainView/sidebar/index.js.map +0 -1
- package/es/views/MainView/toolFooter/AnnotatedAttributes/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterPopover.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/scribble/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.js.map +0 -1
- package/es/views/MainView/toolFooter/FooterTips/index.js.map +0 -1
- package/es/views/MainView/toolFooter/HiddenTips/index.js.map +0 -1
- package/es/views/MainView/toolFooter/PageNumber/index.js.map +0 -1
- package/es/views/MainView/toolFooter/Pagination.js.map +0 -1
- package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js.map +0 -1
- package/es/views/MainView/toolFooter/ZoomController/index.js.map +0 -1
- package/es/views/MainView/toolFooter/index.js.map +0 -1
- package/es/views/MainView/toolHeader/ExportData/index.js.map +0 -1
- package/es/views/MainView/toolHeader/StepSwitch/index.js.map +0 -1
- package/es/views/MainView/toolHeader/headerOption/index.js.map +0 -1
- package/es/views/MainView/toolHeader/index.js.map +0 -1
package/dist/App.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var index$1=require("./views/MainView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactRedux=require("react-redux"),index=require("./index.js"),ctx=require("./store/ctx.js"),Actions=require("./store/Actions.js"),actionCreators=require("./store/annotation/actionCreators.js"),reducer=require("./store/annotation/reducer.js"),es=require("antd/es"),zhCN=require("antd/es/locale/zh_CN"),enUS=require("antd/es/locale/en_US");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),zhCN__default=_interopDefaultLegacy(zhCN),enUS__default=_interopDefaultLegacy(enUS),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e};const App=e=>{const[t,a]=React.useState(0),{imgList:o,step:
|
|
1
|
+
"use strict";var index$1=require("./views/MainView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactRedux=require("react-redux"),index=require("./index.js"),ctx=require("./store/ctx.js"),Actions=require("./store/Actions.js"),actionCreators=require("./store/annotation/actionCreators.js"),reducer=require("./store/annotation/reducer.js"),es=require("antd/es"),zhCN=require("antd/es/locale/zh_CN"),enUS=require("antd/es/locale/en_US");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),zhCN__default=_interopDefaultLegacy(zhCN),enUS__default=_interopDefaultLegacy(enUS),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const App=e=>{const[t,a]=React.useState(0),{imgList:o,step:i=1,stepList:s,onSubmit:l,onSave:c,onPageChange:u,onStepChange:d,initialIndex:p=0,toolInstance:h,setToolInstance:P,getFileData:f,pageSize:g=10,loadFileList:r,defaultLang:v="cn",skipBeforePageTurning:I,beforeRotate:_,checkMode:S=!1,intelligentFit:m=!0}=e;React.useEffect(()=>{index.store.dispatch(actionCreators.InitTaskData({onSubmit:l,stepList:s,step:i,getFileData:f,pageSize:g,loadFileList:r,onSave:c,onPageChange:u,onStepChange:d,skipBeforePageTurning:I,beforeRotate:_,checkMode:S})),O(),lbUtils.i18n.changeLanguage(v);const n=()=>{a(L=>L+1)};return lbUtils.i18n.on("languageChanged",n),()=>{lbUtils.i18n.off("languageChanged",n),actionCreators.InitAnnotationState(index.store.dispatch)}},[]),React.useEffect(()=>{index.store.dispatch(actionCreators.UpdateInjectFunc({onSubmit:l,stepList:s,getFileData:f,pageSize:g,loadFileList:r,onSave:c,onPageChange:u,onStepChange:d,beforeRotate:_})),lbUtils.i18n.changeLanguage(v)},[l,s,f,g,r,c,u,d,v,_]),React.useEffect(()=>{index.store.dispatch(actionCreators.UpdateProcessingStep(i))},[i]),React.useEffect(()=>{P==null||P(h)},[h]);const O=()=>{r?actionCreators.loadImgList(index.store.dispatch,index.store.getState,p,!0).then(n=>{n&&index.store.dispatch(reducer.LoadFileAndFileData(p))}):o&&o.length>0&&(index.store.dispatch({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:o}}),index.store.dispatch(reducer.LoadFileAndFileData(p)))};return React__default.default.createElement("div",null,React__default.default.createElement(es.ConfigProvider,{locale:lbUtils.i18n.language==="en"?enUS__default.default:zhCN__default.default},React__default.default.createElement(index$1,__spreadProps(__spreadValues({},e),{intelligentFit:m}))))},mapStateToProps=e=>({toolInstance:e.annotation.toolInstance});var App$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(App);module.exports=App$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var img="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 19 19'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: %23797979%3b stroke: rgba(0%2c0%2c0%2c0)%3b stroke-miterlimit: 10%3b %7d .cls-2 %7b fill: none%3b opacity: 0.3%3b %7d %3c/style%3e %3c/defs%3e %3cg id='icon_buquan' transform='translate(0.501 0.5)'%3e %3cpath id='Clip_2' data-name='Clip 2' class='cls-2' d='M0%2c0H18V18H0Z'/%3e %3cpath id='%e5%87%8f%e5%8e%bb_15' data-name='%e5%87%8f%e5%8e%bb 15' class='cls-1' d='M473.725%2c6954H462.273a1.561%2c1.561%2c0%2c0%2c1-1.159-.529%2c1.88%2c1.88%2c0%2c0%2c1-.48-1.272v-.9h-.815a.809.809%2c0%2c0%2c1-.585-.271.9.9%2c0%2c0%2c1-.236-.6V6947.7a.863.863%2c0%2c0%2c1%2c.819-.9h.817c0-3.474%2c2.569-6.3%2c5.726-6.3h.824v-1.143a1.83%2c1.83%2c0%2c0%2c1-.819-1.557%2c1.914%2c1.914%2c0%2c0%2c1%2c.48-1.274%2c1.532%2c1.532%2c0%2c0%2c1%2c2.312%2c0%2c1.9%2c1.9%2c0%2c0%2c1%2c.48%2c1.272%2c1.836%2c1.836%2c0%2c0%2c1-.817%2c1.559v1.141h.817a6.041%2c6.041%2c0%2c0%2c1%2c5.726%2c6.3h.819a.862.862%2c0%2c0%2c1%2c.817.9v2.733a.916.916%2c0%2c0%2c1-.234.6.809.809%2c0%2c0%2c1-.585.271h-.819v.9a1.879%2c1.879%2c0%2c0%2c1-.48%2c1.272A1.578%2c1.578%2c0%2c0%2c1%2c473.725%2c6954ZM471%2c6946a1%2c1%2c0%2c0%2c0-1%2c1v1a1%2c1%2c0%2c1%2c0%2c2%2c0v-1A1%2c1%2c0%2c0%2c0%2c471%2c6946Zm-6%2c0a1%2c1%2c0%2c0%2c0-1%2c1v1a1%2c1%2c0%2c1%2c0%2c2%2c0v-1A1%2c1%2c0%2c0%2c0%2c465%2c6946Z' transform='translate(-459 -6936)'/%3e %3c/g%3e%3c/svg%3e";module.exports=img;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var dom=require("../../utils/dom.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),classNames=require("classnames"),React=require("react"),PointCloudLayout=require("./PointCloudLayout.js"),PointCloudContext=require("./PointCloudContext.js"),map=require("../../store/annotation/map.js"),reactRedux=require("react-redux"),index=require("../../utils/index.js"),useSingleBox=require("./hooks/useSingleBox.js"),antd=require("antd"),useSize=require("../../hooks/useSize.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js")
|
|
1
|
+
"use strict";var dom=require("../../utils/dom.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),classNames=require("classnames"),React=require("react"),PointCloudLayout=require("./PointCloudLayout.js"),PointCloudContext=require("./PointCloudContext.js"),map=require("../../store/annotation/map.js"),reactRedux=require("react-redux"),index=require("../../utils/index.js"),useSingleBox=require("./hooks/useSingleBox.js"),useSphere=require("./hooks/useSphere.js"),antd=require("antd"),useSize=require("../../hooks/useSize.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var classNames__default=_interopDefaultLegacy(classNames),React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,a,i)=>a in e?__defProp(e,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[a]=i,__spreadValues=(e,a)=>{for(var i in a||(a={}))__hasOwnProp.call(a,i)&&__defNormalProp(e,i,a[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(a))__propIsEnum.call(a,i)&&__defNormalProp(e,i,a[i]);return e},__spreadProps=(e,a)=>__defProps(e,__getOwnPropDescs(a));const pointCloudID="LABELBEE-POINTCLOUD",PointCloud3DContext=React__default.default.createContext({isActive:!1,setTarget3DView:()=>{},reset3DView:()=>{},followTopView:()=>{}}),PointCloudViewIcon=({perspectiveView:e})=>{const{isActive:a,setTarget3DView:i}=React.useContext(PointCloud3DContext),o=p=>classNames__default.default({[dom.getClassName("point-cloud-3d-view",p)]:!0,active:a});return React__default.default.createElement("span",{onClick:()=>{i(lbUtils.EPerspectiveView[e])},className:o(e.toLocaleLowerCase())})},PointCloud3DSideBar=()=>{const{reset3DView:e,followTopView:a}=React.useContext(PointCloud3DContext),{t:i}=reactI18next.useTranslation();return React__default.default.createElement("div",{className:dom.getClassName("point-cloud-3d-sidebar")},React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"Top"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"Front"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"Left"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"Back"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"Right"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"LFT"}),React__default.default.createElement(PointCloudViewIcon,{perspectiveView:"RBT"}),React__default.default.createElement(antd.Tooltip,{title:i("CameraFollowTopView")},React__default.default.createElement("span",{onClick:()=>{a()},className:dom.getClassName("point-cloud-3d-view","followTop")})),React__default.default.createElement("span",{onClick:()=>{e()},className:dom.getClassName("point-cloud-3d-view","reset")}))},PointCloud3D=({currentData:e,config:a})=>{var i;const o=React.useContext(PointCloudContext.PointCloudContext),[p,V]=React.useState(!0),d=React.useRef(null),{initPointCloud3d:w}=usePointCloudViews.usePointCloudViews(),u=useSize(d),{t:C}=reactI18next.useTranslation();React.useEffect(()=>{!o.mainViewInstance||w==null||w(u)},[u]);const{selectedBox:c}=useSingleBox.useSingleBox(),{selectedSphere:m}=useSphere.useSphere(),v=t=>{var n,r;const l=c==null?void 0:c.info;if(l){const s=__spreadValues({},l.center);s.x=s.x-.01,s.z=10;const f=t===lbUtils.EPerspectiveView.Top;(n=o.mainViewInstance)==null||n.updateCameraByBox(l,t,f?s:void 0)}m&&((r=o.mainViewInstance)==null||r.updateCameraBySphere(m,t))},P=()=>{var t;(t=o.mainViewInstance)==null||t.resetCamera()},g=()=>{var t,n;const r=(t=o.topViewInstance)==null?void 0:t.pointCloudInstance.camera;r&&((n=o.mainViewInstance)==null||n.applyCameraTarget(r))};React.useEffect(()=>{if(d.current&&(e==null?void 0:e.url)){let t=o.mainViewInstance;if(!t&&u.width){const n={left:-u.width/2,right:u.width/2,top:u.height/2,bottom:-u.height/2,near:100,far:-100};t=new lbAnnotation.PointCloud({container:d.current,isOrthographicCamera:!0,orthographicParams:n,config:a}),o.setMainViewInstance(t)}}},[u]),React.useEffect(()=>{var t;if(d.current&&(e==null?void 0:e.url)&&e.result&&o.mainViewInstance){let n=o.mainViewInstance;const r=lbUtils.PointCloudUtils.getBoxParamsFromResultList(e.result);r.forEach(l=>{var s;const f=(s=lbUtils.toolStyleConverter.getColorFromConfig({attribute:l.attribute},__spreadProps(__spreadValues({},a),{attributeConfigurable:!0}),{}))==null?void 0:s.hex;n==null||n.generateBox(l,f)}),o.setPointCloudResult(r),o.setPointCloudValid((t=index.jsonParser(e.result))==null?void 0:t.valid)}},[e,o.mainViewInstance]),React.useEffect(()=>{var t,n,r,l;if(c){v(lbUtils.EPerspectiveView.Top);const s=(r=(n=(t=o.topViewInstance)==null?void 0:t.pointCloudInstance)==null?void 0:n.camera.zoom)!=null?r:1;(l=o.mainViewInstance)==null||l.updateCameraZoom(s)}},[c]),React.useEffect(()=>{var t,n,r,l;if(m){v(lbUtils.EPerspectiveView.Top);const s=(r=(n=(t=o.topViewInstance)==null?void 0:t.pointCloudInstance)==null?void 0:n.camera.zoom)!=null?r:1;(l=o.mainViewInstance)==null||l.updateCameraZoom(s)}},[m]);const _=React.useMemo(()=>({reset3DView:P,setTarget3DView:v,isActive:!!c,followTopView:g}),[c,o.mainViewInstance]),h=React__default.default.createElement("div",null,React__default.default.createElement("span",{style:{marginRight:8}},C("ShowArrows")),React__default.default.createElement(antd.Switch,{size:"small",checked:p,onChange:t=>{var n;V(t),(n=o.mainViewInstance)==null||n.setShowDirection(t)}}));return React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-3d-container"),title:C("3DView"),toolbar:h,style:{height:e.mappingImgList&&((i=e.mappingImgList)==null?void 0:i.length)>0?"55%":"100%"}},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-3d-content")},React__default.default.createElement(PointCloud3DContext.Provider,{value:_},React__default.default.createElement(PointCloud3DSideBar,null)),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-3d-view"),id:pointCloudID,ref:d})))};var PointCloud3DView=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloud3D);module.exports=PointCloud3DView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),dom=require("../../utils/dom.js"),PointCloudLayout=require("./PointCloudLayout.js"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),useSingleBox=require("./hooks/useSingleBox.js"),PointCloudInfos=require("./PointCloudInfos.js"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js"),index=require("./components/EmptyPage/index.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var React__default=_interopDefaultLegacy(React);const TransferCanvas2WorldOffset=(n,
|
|
1
|
+
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),dom=require("../../utils/dom.js"),PointCloudLayout=require("./PointCloudLayout.js"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),lbUtils=require("@labelbee/lb-utils"),useSingleBox=require("./hooks/useSingleBox.js"),useSphere=require("./hooks/useSphere.js"),useZoom=require("./hooks/useZoom.js"),PointCloudInfos=require("./PointCloudInfos.js"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js"),index=require("./components/EmptyPage/index.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js"),ToolUtils=require("../../utils/ToolUtils.js");function _interopDefaultLegacy(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var React__default=_interopDefaultLegacy(React);const TransferCanvas2WorldOffset=(n,r,l=1)=>{const{width:e,height:o}=r,t={x:n.x+e*l/2,y:n.y+o*l/2},u={x:r.width/2,y:r.height/2};return{offsetX:(u.x-t.x)/l,offsetY:-(u.y-t.y)/l}},updateBackViewByCanvas2D=(n,r,l,e,o)=>{const{offsetX:t,offsetY:u}=TransferCanvas2WorldOffset(n,l,r);if(o.camera.zoom=r,n){const d=Math.cos(e),f=Math.sin(e),C=t*d,x=t*f,{x:v,y:i,z:c}=o.initCameraPosition;o.camera.position.set(v+x,i-C,c+u)}o.camera.updateProjectionMatrix(),o.render()},PointCloudBackView=({currentData:n,config:r,checkMode:l})=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),o=React.useRef(null),t=useSize(o),{selectedBox:u}=useSingleBox.useSingleBox(),{selectedSphere:d}=useSphere.useSphere(),{syncBackviewToolZoom:f}=useZoom.useZoom(),{t:C}=reactI18next.useTranslation(),{backViewUpdateBox:x,backViewUpdatePoint:v}=usePointCloudViews.usePointCloudViews();return React.useEffect(()=>{if(o.current){const i={width:o.current.clientWidth,height:o.current.clientHeight},c=new lbAnnotation.PointCloudAnnotation({container:o.current,size:i,extraProps:{showDirectionLine:!1,forbidAddNew:!0,forbidDelete:!0},config:r,checkMode:l,toolName:ToolUtils.getPointCloudToolList()});e.setBackViewInstance(c)}},[]),React.useEffect(()=>{if(!t||!e.backViewInstance)return;const{toolInstance:i,pointCloudInstance:c}=e.backViewInstance;i.singleOn("renderZoom",(a,s)=>{if(e.selectedPointCloudBox){updateBackViewByCanvas2D(s,a,t,e.selectedPointCloudBox.rotation,c),f(s,a,t);return}if(d){updateBackViewByCanvas2D(s,a,t,0,c),f(s,a,t);return}}),i.singleOn("dragMove",({currentPos:a,zoom:s})=>{!e.selectedPointCloudBox&&!d||updateBackViewByCanvas2D(a,s,t,e.selectedPointCloudBox?e.selectedPointCloudBox.rotation:0,c)}),i.singleOn("updatePointByDrag",(a,s)=>{d&&(v==null||v(a,s[0]))}),i.singleOn("updatePolygonByDrag",a=>{if(e.selectedIDs.length===1&&a.length===1){const{newPolygon:s,originPolygon:p}=a[0];s&&p&&x(s,p)}})},[e,t]),React.useEffect(()=>{var i;(i=e==null?void 0:e.backViewInstance)==null||i.initSize(t)},[t]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","back-view"),title:C("BackView"),toolbar:React__default.default.createElement(PointCloudInfos.SizeInfoForView,{perspectiveView:lbUtils.EPerspectiveView.Back})},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","bottom-view-content")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","core-instance"),ref:o}),!u&&!d&&React__default.default.createElement(index,null)))};var PointCloudBackView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudBackView);module.exports=PointCloudBackView$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(u){return u&&typeof u=="object"&&"default"in u?u:{default:u}}var React__default=_interopDefaultLegacy(React);const PointCloudContext=React__default.default.createContext({pointCloudBoxList:[],pointCloudSphereList:[],displayPointCloudList:[],displaySphereList:[],polygonList:[],selectedID:"",selectedIDs:[],valid:!0,setSelectedIDs:()=>{},setPointCloudResult:()=>{},setPointCloudSphereList:()=>{},setPointCloudValid:()=>{},setTopViewInstance:()=>{},setSideViewInstance:()=>{},setBackViewInstance:()=>{},setMainViewInstance:()=>{},addSelectedID:()=>{},selectedAllBoxes:()=>{},addPointCloudBox:()=>[],addPointCloudSphere:()=>[],setPolygonList:()=>{},zoom:1,setZoom:()=>{},history:new lbAnnotation.ActionsHistory,hideAttributes:[],setHideAttributes:()=>{},toggleAttributesVisible:()=>{},reRender:()=>{},setAttrPanelLayout:()=>{},attrPanelLayout:"",syncAllViewPointCloudColor:()=>{},defaultAttribute:"",setDefaultAttribute:()=>{},pointCloudPattern:lbAnnotation.EToolName.Rect,setPointCloudPattern:()=>{},selectSpecAttr:()=>{}}),PointCloudProvider=({children:u})=>{const[i,b]=React.useState([]),[c,y]=React.useState([]),[P,O]=React.useState([]),[l,C]=React.useState([]),[h,j]=React.useState(!0),[L,N]=React.useState(1),[r,T]=React.useState(),[m,_]=React.useState(),[w,k]=React.useState(),[o,q]=React.useState(),[I,z]=React.useState(""),[V,F]=React.useState(lbAnnotation.EToolName.Rect),Z=React.useRef(new lbAnnotation.ActionsHistory).current,[s,S]=React.useState([]),[g,G]=React.useState(""),x=React.useMemo(()=>l.length===1?l[0]:"",[l]),B=React.useMemo(()=>{const a=i.find(t=>t.id===x),v=t=>{const e=i.concat(t);return b(e),e},A=t=>{const e=c.concat(t);return y(e),e},p=t=>{j(t!==!1)},n=t=>{t===void 0&&C([]),typeof t=="string"&&C([t]),Array.isArray(t)&&C(Array.from(new Set(t)))},K=t=>{l.includes(t)?n(l.filter(e=>e!==t)):n([...l,t])},Q=()=>{n(i.map(t=>t.id))},U=t=>{n(i.filter(e=>e.attribute===t).map(e=>e.id))},R=i.filter(t=>!s.includes(t.attribute)),D=c.filter(t=>!s.includes(t.attribute)),W=t=>{if(s.includes(t))S(s.filter(e=>e!==t));else{const e=s.concat(t);S(e)}},X=(t=R,e=P,f=D)=>{i.forEach(d=>{o==null||o.removeObjectByName(d.id)}),c.forEach(d=>{o==null||o.removeObjectByName(d.id)}),r==null||r.updatePolygonList(t,e),r==null||r.updatePointList(f),o==null||o.generateBoxes(t),o==null||o.generateSpheres(f),E(t)},E=t=>{const e=o==null?void 0:o.highlightOriginPointCloud(t);return new Promise(f=>{e==null||e.then(d=>{[r].forEach(H=>{var M;d&&((M=H==null?void 0:H.pointCloudInstance)==null||M.updateColor(d),f({color:d}))})})})};return{selectedID:x,pointCloudBoxList:i,pointCloudSphereList:c,displayPointCloudList:R,displaySphereList:D,selectedIDs:l,setPointCloudResult:b,setSelectedIDs:n,addPointCloudBox:v,addPointCloudSphere:A,setPointCloudSphereList:y,valid:h,selectedPointCloudBox:a,setPointCloudValid:p,addSelectedID:K,selectedAllBoxes:Q,topViewInstance:r,setTopViewInstance:T,sideViewInstance:m,setSideViewInstance:_,backViewInstance:w,setBackViewInstance:k,mainViewInstance:o,setMainViewInstance:q,polygonList:P,setPolygonList:O,zoom:L,setZoom:N,history:Z,toggleAttributesVisible:W,hideAttributes:s,setHideAttributes:S,reRender:X,attrPanelLayout:g,setAttrPanelLayout:G,syncAllViewPointCloudColor:E,defaultAttribute:I,setDefaultAttribute:z,pointCloudPattern:V,setPointCloudPattern:F,selectSpecAttr:U}},[h,l,i,c,P,r,m,w,o,L,s,g,I,V]),J=()=>{const a=i.filter(n=>s.includes(n.attribute)),{setSelectedIDs:v,reRender:A}=B,p=a.map(n=>n.id);p.length>0&&v(l.filter(n=>!p.includes(n))),A()};return React.useEffect(()=>{var a;J(),(a=r==null?void 0:r.pointCloud2dOperation)==null||a.setHiddenAttributes(s)},[s]),React__default.default.createElement(PointCloudContext.Provider,{value:B},u)};exports.PointCloudContext=PointCloudContext,exports.PointCloudProvider=PointCloudProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useSingleBox=require("./hooks/useSingleBox.js"),reactI18next=require("react-i18next");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React)
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useSingleBox=require("./hooks/useSingleBox.js"),reactI18next=require("react-i18next");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const DECIMAL_PLACES=2,SizeInfoForView=({perspectiveView:t})=>{const{pointCloudBoxList:i,selectedID:u}=React__default.default.useContext(PointCloudContext.PointCloudContext),e=i.find(a=>a.id===u),f=reactI18next.useTranslation(),{t:o}=f;if(u&&e){const{length:a,width:l,height:r}=lbUtils.PointCloudUtils.transferBox2Kitti(e),n=t===lbUtils.EPerspectiveView.Back?[{label:o("Width"),value:l},{label:o("Height"),value:r}]:[{label:o("Length"),value:a},{label:o("Height"),value:r}];return React__default.default.createElement(React__default.default.Fragment,null,n.map((s,d)=>React__default.default.createElement("span",{key:d,style:{marginRight:d===0?16:0,fontSize:12}},`${s.label}: ${s.value.toFixed(DECIMAL_PLACES)}`)))}return null},BoxInfos=({checkMode:t,config:i})=>{const u=React__default.default.useContext(PointCloudContext.PointCloudContext),{selectedBox:e}=useSingleBox.useSingleBox(),[f,o]=React.useState([]),a=reactI18next.useTranslation(),{t:l,i18n:r}=a;return React.useEffect(()=>{var n;if(!e)return;const{length:s,width:d,height:x,rotation_y:g}=lbUtils.PointCloudUtils.transferBox2Kitti(e.info);let c=[{label:l("Length"),value:s.toFixed(DECIMAL_PLACES)},{label:l("Width"),value:d.toFixed(DECIMAL_PLACES)},{label:l("Height"),value:x.toFixed(DECIMAL_PLACES)},{label:l("Rotation_y"),value:lbAnnotation.UnitUtils.rad2deg(g).toFixed(DECIMAL_PLACES)}];(n=u.mainViewInstance)==null||n.filterPointsByBox(e.info).then(b=>{if(!b){o(c);return}c.push({label:l("PointCount"),value:`${b.num}`}),t===!0&&e.info.subAttribute&&i&&lbUtils.PointCloudUtils.getSubAttributeName(e.info.subAttribute,i).forEach(h=>c.push(h)),o(c)})},[e,r.language]),e?React__default.default.createElement("div",{style:{position:"absolute",color:"white",backgroundColor:"rgba(153, 153, 153, 0.3)",right:8,top:8,fontSize:12,padding:8,zIndex:20}},f.map(n=>React__default.default.createElement("div",{key:n.label},`${n.label}: ${n.value}`))):null},PointCloudValidity=()=>{const t=React__default.default.useContext(PointCloudContext.PointCloudContext),{t:i}=reactI18next.useTranslation();return t.valid===!1?React__default.default.createElement("div",{style:{position:"absolute",backgroundColor:"rgb(242, 101, 73)",color:"white",opacity:.7,left:0,top:0,fontSize:30,padding:"8px 16px",zIndex:20,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},i("Invalid")):null};exports.BoxInfos=BoxInfos,exports.PointCloudValidity=PointCloudValidity,exports.SizeInfoForView=SizeInfoForView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useBoxes=require("./hooks/useBoxes.js"),useSingleBox=require("./hooks/useSingleBox.js"),React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),antd=require("antd"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),annotation=require("../../hooks/annotation.js"),useStatus=require("./hooks/useStatus.js"),index=require("../../utils/index.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),ctx=require("../../store/ctx.js"),useHistory=require("./hooks/useHistory.js"),useAttribute=require("./hooks/useAttribute.js"),useConfig=require("./hooks/useConfig.js"),usePolygon=require("./hooks/usePolygon.js"),reactI18next=require("react-i18next"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(u,r,
|
|
1
|
+
"use strict";var PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useBoxes=require("./hooks/useBoxes.js"),useSingleBox=require("./hooks/useSingleBox.js"),useSphere=require("./hooks/useSphere.js"),React=require("react"),lbAnnotation=require("@labelbee/lb-annotation"),antd=require("antd"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),annotation=require("../../hooks/annotation.js"),useStatus=require("./hooks/useStatus.js"),index=require("../../utils/index.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),ctx=require("../../store/ctx.js"),useHistory=require("./hooks/useHistory.js"),useAttribute=require("./hooks/useAttribute.js"),useConfig=require("./hooks/useConfig.js"),usePolygon=require("./hooks/usePolygon.js"),reactI18next=require("react-i18next"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(u,r,i)=>r in u?__defProp(u,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[r]=i,__spreadValues=(u,r)=>{for(var i in r||(r={}))__hasOwnProp.call(r,i)&&__defNormalProp(u,i,r[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(r))__propIsEnum.call(r,i)&&__defNormalProp(u,i,r[i]);return u},__spreadProps=(u,r)=>__defProps(u,__getOwnPropDescs(r));const{EPolygonPattern}=lbAnnotation.cTool,PointCloudListener=({currentData:u,config:r,checkMode:i,configString:_,imgIndex:w})=>{const o=React.useContext(PointCloudContext.PointCloudContext),{changeSelectedBoxValid:B,selectNextBox:I,selectPrevBox:V,updateSelectedBox:C,deleteSelectedPointCloudBoxAndPolygon:E}=useSingleBox.useSingleBox(),{selectedSphere:f,updatePointCloudSphere:L}=useSphere.useSphere(),{clearAllResult:b,updatePointCloudPattern:q}=useStatus.useStatus(),A=index.jsonParser(u.result),{copySelectedBoxes:O,pasteSelectedBoxes:j,copiedBoxes:T}=useBoxes.useBoxes({config:r}),{toolInstanceRef:a}=annotation.useCustomToolInstance({basicInfo:A}),{updateRotate:P}=useRotate.useRotate({currentData:u}),{updatePointCloudData:p,topViewSelectedChanged:x}=usePointCloudViews.usePointCloudViews(),{redo:h,undo:g,pushHistoryWithList:R,pushHistoryUnderUpdatePolygon:D}=useHistory.useHistory(),{syncThreeViewsAttribute:S}=useAttribute.useAttribute(),{syncAllViewsConfig:N,reRenderTopViewRange:H}=useConfig.useConfig(),{selectedPolygon:m}=usePolygon.usePolygon(),{t:y}=reactI18next.useTranslation(),v=e=>{var t;const{topViewInstance:s}=o;!s||(t=s.pointCloud2dOperation)==null||t.updateSelectedPolygonsPoints(e)},K=(e,t)=>{var s;const{topViewInstance:n,mainViewInstance:l}=o;if(!n)return;const{pointCloud2dOperation:c}=n;switch(e){case"q":{P(2);break}case"e":P(-2);break;case"g":P(180);break;case"u":{const d=c.pattern===EPolygonPattern.Normal?lbAnnotation.EToolName.Rect:lbAnnotation.EToolName.Polygon;q(d);const z={[lbAnnotation.EToolName.Polygon]:y("PolygonPattern"),[lbAnnotation.EToolName.Rect]:y("RectPattern")};antd.message.success(y("ChangePatternMsg",{pattern:z[d]})),c.clearActiveStatus(),c.clearDrawingStatus()}break;case"+":l==null||l.updatePointSize(!0);break;case"-":l==null||l.updatePointSize(!1);break;case"v":o.setPointCloudValid(!o.valid);break;case"tab":if(t.shiftKey){V();break}I(),t.preventDefault();break;case"f":B();break;case"arrowup":v({y:-1});break;case"arrowdown":v({y:1});break;case"arrowleft":v({x:-1});break;case"arrowright":v({x:1});break;case"delete":E();break;default:{if(((s=r.attributeList)==null?void 0:s.length)>0){const d=lbAnnotation.AttributeUtils.getAttributeByKeycode(t.keyCode,r.attributeList);d!==void 0&&a.current.setDefaultAttribute(d)}return}}},U=(e,t)=>{switch(e){case"c":O();break;case"v":j();break;case"a":t.preventDefault(),o.selectedAllBoxes();break;case"z":{t.shiftKey?h():g();break}}},k=e=>{if(!lbAnnotation.CommonToolUtils.hotkeyFilter(e)||i===!0)return;const t=e.key.toLocaleLowerCase();if(e.ctrlKey){U(t,e);return}K(t,e)};return React.useEffect(()=>{const{topViewInstance:e}=o;if(!!e)return window.addEventListener("keydown",k),()=>{window.removeEventListener("keydown",k)}},[o,T,r,o.pointCloudBoxList,o.polygonList]),React.useEffect(()=>{N(r)},[_]),React.useEffect(()=>{(r==null?void 0:r.radius)&&H(r==null?void 0:r.radius)},[r==null?void 0:r.radius]),React.useEffect(()=>{p==null||p()},[w,o.mainViewInstance]),React.useEffect(()=>{o.setHideAttributes([])},[w]),React.useEffect(()=>{a.current.exportData=()=>[o.pointCloudBoxList,{valid:o.valid}],a.current.exportCustomData=()=>{var e,t;return{resultPolygon:(e=o.polygonList)!=null?e:[],resultPoint:(t=o.pointCloudSphereList)!=null?t:[]}},a.current.setDefaultAttribute=e=>{var t;S(e);const s=o.selectedPointCloudBox;if(s){s.attribute=e;const n=C(s);o.mainViewInstance&&x({newSelectedBox:s,newPointCloudList:n})}if(m&&D(__spreadProps(__spreadValues({},m),{attribute:e})),f){const n=L(__spreadProps(__spreadValues({},f),{attribute:e}));o.mainViewInstance&&((t=o.mainViewInstance)==null||t.generateSpheres(n),x({newSelectedSphere:f,newSphereList:n}))}},a.current.setSubAttribute=(e,t)=>{var s;const n=o.selectedPointCloudBox;if(n){const l=(s=n==null?void 0:n.subAttribute)!=null?s:{};n.subAttribute=__spreadProps(__spreadValues({},l),{[e]:t}),C(n)}},a.current.clearResult=()=>{b==null||b()},a.current.redo=()=>{h()},a.current.undo=()=>{g()},a.current.setValid=e=>{a.current.valid=e,setTimeout(()=>{o.setPointCloudValid(e),e===!1&&b()})},a.current.setForbidOperation=e=>{var t,s;(s=(t=o.topViewInstance)==null?void 0:t.pointCloud2dOperation)==null||s.setForbidOperation(e),e===!0&&o.setSelectedIDs(void 0)},a.current.setShowDefaultCursor=e=>{var t,s;(s=(t=o.topViewInstance)==null?void 0:t.pointCloud2dOperation)==null||s.setShowDefaultCursor(e)},a.current.asyncData=e=>{setTimeout(()=>{p==null||p(e)})}},[o.pointCloudBoxList,o.pointCloudSphereList,o.selectedID,o.valid,o.polygonList,o.mainViewInstance]),React.useEffect(()=>{a.current.history={pushHistory:e=>{R({pointCloudBoxList:e})},initRecord:()=>{}}},[]),React.useEffect(()=>{var e;const t=(e=o.topViewInstance)==null?void 0:e.toolInstance;if(!t||i)return;const s=c=>{S(c)},n=c=>{antd.message.error(c)},l=c=>{antd.message.info(c)};return t.on("syncAttribute",s),t.on("messageError",n),t.on("messageInfo",l),()=>{t.unbind("syncAttribute",s),t.unbind("messageError",n),t.unbind("messageInfo",l)}},[o.topViewInstance]),null};var PointCloudListener$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudListener);module.exports=PointCloudListener$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),dom=require("../../utils/dom.js"),PointCloudLayout=require("./PointCloudLayout.js"),React=require("react"),lbUtils=require("@labelbee/lb-utils"),PointCloudContext=require("./PointCloudContext.js"),PointCloudInfos=require("./PointCloudInfos.js"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSingleBox=require("./hooks/useSingleBox.js"),index=require("./components/EmptyPage/index.js"),useSize=require("../../hooks/useSize.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const TransferCanvas2WorldOffset=(t,
|
|
1
|
+
"use strict";var lbAnnotation=require("@labelbee/lb-annotation"),dom=require("../../utils/dom.js"),PointCloudLayout=require("./PointCloudLayout.js"),React=require("react"),lbUtils=require("@labelbee/lb-utils"),PointCloudContext=require("./PointCloudContext.js"),PointCloudInfos=require("./PointCloudInfos.js"),reactRedux=require("react-redux"),map=require("../../store/annotation/map.js"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSingleBox=require("./hooks/useSingleBox.js"),useSphere=require("./hooks/useSphere.js"),index=require("./components/EmptyPage/index.js"),useSize=require("../../hooks/useSize.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js"),ToolUtils=require("../../utils/ToolUtils.js"),useZoom=require("./hooks/useZoom.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const TransferCanvas2WorldOffset=(t,l,e=1)=>{const{width:f,height:s}=l,c={x:t.x+f*e/2,y:t.y+s*e/2},a={x:l.width/2,y:l.height/2};return{offsetX:(a.x-c.x)/e,offsetY:-(a.y-c.y)/e}},updateSideViewByCanvas2D=(t,l,e,f,s)=>{const{offsetX:c,offsetY:a}=TransferCanvas2WorldOffset(t,e,l);if(s.camera.zoom=l,t){const u=Math.cos(f),n=Math.sin(f),x=c*u,v=c*n,{x:i,y:d,z:o}=s.initCameraPosition;s.camera.position.set(i-x,d-v,o+a)}s.camera.updateProjectionMatrix(),s.render()},PointCloudSideView=({config:t,checkMode:l})=>{const e=React__default.default.useContext(PointCloudContext.PointCloudContext),{sideViewUpdateBox:f,sideViewUpdatePoint:s}=usePointCloudViews.usePointCloudViews(),{selectedBox:c}=useSingleBox.useSingleBox(),{selectedSphere:a}=useSphere.useSphere(),u=React.useRef(null),n=useSize(u),{t:x}=reactI18next.useTranslation(),{syncSideviewToolZoom:v}=useZoom.useZoom();return React.useEffect(()=>{if(u.current){const i={width:u.current.clientWidth,height:u.current.clientHeight},d=new lbAnnotation.PointCloudAnnotation({container:u.current,size:i,extraProps:{showDirectionLine:!1,forbidAddNew:!0,forbidDelete:!0},config:t,checkMode:l,toolName:ToolUtils.getPointCloudToolList()});e.setSideViewInstance(d)}},[]),React.useEffect(()=>{if(!n||!e.sideViewInstance)return;const{toolInstance:i,pointCloudInstance:d}=e.sideViewInstance;i.singleOn("renderZoom",(o,r)=>{if(e.selectedPointCloudBox){updateSideViewByCanvas2D(r,o,n,e.selectedPointCloudBox.rotation,d),v(r,o,n);return}a&&(updateSideViewByCanvas2D(r,o,n,0,d),v(r,o,n))}),i.singleOn("dragMove",({currentPos:o,zoom:r})=>{!e.selectedPointCloudBox&&!a||updateSideViewByCanvas2D(o,r,n,e.selectedPointCloudBox?e.selectedPointCloudBox.rotation:0,d)}),i.singleOn("updatePointByDrag",(o,r)=>{a&&(s==null||s(o,r[0]))}),i.singleOn("updatePolygonByDrag",o=>{if(e.selectedIDs.length===1&&o.length===1){const{newPolygon:r,originPolygon:C}=o[0];f(r,C)}})},[e,n]),React.useEffect(()=>{var i;(i=e==null?void 0:e.sideViewInstance)==null||i.initSize(n)},[n]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","side-view"),title:x("SideView"),toolbar:React__default.default.createElement(PointCloudInfos.SizeInfoForView,{perspectiveView:lbUtils.EPerspectiveView.Left})},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","bottom-view-content")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","core-instance"),ref:u}),!c&&!a&&React__default.default.createElement(index,null)))};var PointCloudSideView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudSideView);module.exports=PointCloudSideView$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var dom=require("../../utils/dom.js"),index$
|
|
1
|
+
"use strict";var dom=require("../../utils/dom.js"),index$1=require("../../views/MainView/toolFooter/index.js"),index$2=require("../../views/MainView/toolFooter/ZoomController/index.js"),icons=require("@ant-design/icons"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("./PointCloudContext.js"),useRotate=require("./hooks/useRotate.js"),useSingleBox=require("./hooks/useSingleBox.js"),PointCloudLayout=require("./PointCloudLayout.js"),PointCloudInfos=require("./PointCloudInfos.js"),usePolygon=require("./hooks/usePolygon.js"),useSphere=require("./hooks/useSphere.js"),useZoom=require("./hooks/useZoom.js"),antd=require("antd"),map=require("../../store/annotation/map.js"),reactRedux=require("react-redux"),usePointCloudViews=require("./hooks/usePointCloudViews.js"),useSize=require("../../hooks/useSize.js"),reactI18next=require("react-i18next"),ctx=require("../../store/ctx.js"),index=require("../../utils/index.js"),ToolUtils=require("../../utils/ToolUtils.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,n,i)=>n in e?__defProp(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,__spreadValues=(e,n)=>{for(var i in n||(n={}))__hasOwnProp.call(n,i)&&__defNormalProp(e,i,n[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(n))__propIsEnum.call(n,i)&&__defNormalProp(e,i,n[i]);return e},__spreadProps=(e,n)=>__defProps(e,__getOwnPropDescs(n));const{EPolygonPattern}=lbAnnotation.cTool,TransferCanvas2WorldOffset=(e,n,i=1)=>{const{width:c,height:m}=n,g={x:e.x+c*i/2,y:e.y+m*i/2},C={x:n.width/2,y:n.height/2};return{offsetX:(C.x-g.x)/i,offsetY:-(C.y-g.y)/i}},TopViewToolbar=({currentData:e})=>{const{zoom:n,zoomIn:i,zoomOut:c,initialPosition:m}=useZoom.useZoom(),{selectNextBox:g,selectPrevBox:C}=useSingleBox.useSingleBox(),{updateRotate:w}=useRotate.useRotate({currentData:e}),x=2,p=()=>{w(-x)},t=()=>{w(x)},a=()=>{w(180)};return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement("span",{onClick:t,className:dom.getClassName("point-cloud","rotate-reserve")}),React__default.default.createElement("span",{onClick:p,className:dom.getClassName("point-cloud","rotate")}),React__default.default.createElement("span",{onClick:a,className:dom.getClassName("point-cloud","rotate-180")}),React__default.default.createElement(index$1.FooterDivider,null),React__default.default.createElement(icons.UpSquareOutlined,{onClick:()=>{C()},className:dom.getClassName("point-cloud","prev")}),React__default.default.createElement(icons.DownSquareOutlined,{onClick:()=>{g()},className:dom.getClassName("point-cloud","next")}),React__default.default.createElement(index$1.FooterDivider,null),React__default.default.createElement(index$2.ZoomController,{initialPosition:m,zoomIn:i,zoomOut:c,zoom:n}))},ZAxisSlider=({setZAxisLimit:e,zAxisLimit:n,checkMode:i})=>i?null:React__default.default.createElement("div",{style:{position:"absolute",top:128,right:8,height:"50%",zIndex:20}},React__default.default.createElement(antd.Slider,{vertical:!0,step:.5,max:10,min:.5,defaultValue:n,onAfterChange:c=>{e(c)}})),PointCloudTopView=({currentData:e,imgList:n,stepInfo:i,drawLayerSlot:c,checkMode:m,intelligentFit:g})=>{var C;const[w,x]=React.useState({zoom:1,currentPos:{x:0,y:0}}),p=React.useRef(null),t=React__default.default.useContext(PointCloudContext.PointCloudContext),a=useSize(p),P=index.jsonParser(i.config),{setZoom:O,syncTopviewToolZoom:_}=useZoom.useZoom(),{hideAttributes:q}=t,{addPolygon:E,deletePolygon:j}=usePolygon.usePolygon(),{deletePointCloudSphere:L}=useSphere.useSphere(),{deletePointCloudBox:A,changeValidByID:N}=useSingleBox.useSingleBox(),[y,T]=React.useState(10),{t:k}=reactI18next.useTranslation(),f=usePointCloudViews.usePointCloudViews();return React.useLayoutEffect(()=>{if(!t.topViewInstance&&p.current&&(e==null?void 0:e.url)&&(e==null?void 0:e.result)){const l={width:p.current.clientWidth,height:p.current.clientHeight},u=new lbAnnotation.PointCloudAnnotation({container:p.current,size:l,pcdPath:e.url,config:P,checkMode:m,toolName:ToolUtils.getPointCloudToolList()});t.setTopViewInstance(u)}},[e]),React.useEffect(()=>{if(!a||!t.topViewInstance||!t.sideViewInstance)return;const{toolInstance:l}=t.topViewInstance;l.singleOn("pointCreated",(o,s)=>{f.topViewAddSphere({newPoint:o,size:a,trackConfigurable:P.trackConfigurable,zoom:s})}),l.singleOn("pointDeleted",o=>{L(o)}),l.singleOn("pointSelected",o=>{t.setSelectedIDs([o])}),l.singleOn("updatePointByDrag",(o,s)=>{var d;(d=f.topViewUpdatePoint)==null||d.call(f,o,a)}),l.singleOn("polygonCreated",(o,s)=>{if(l.pattern===EPolygonPattern.Normal||!(e==null?void 0:e.url)){const d=__spreadProps(__spreadValues({},o),{pointList:o.pointList.map(r=>lbUtils.PointCloudUtils.transferCanvas2World(r,a))});E(d),t.setSelectedIDs(q.includes(o.attribute)?"":o.id);return}f.topViewAddBox({polygon:o,size:a,imgList:n,trackConfigurable:P.trackConfigurable,zoom:s,intelligentFit:g})}),l.singleOn("deletedObject",({id:o})=>{A(o),j(o)}),l.singleOn("deleteSelectedIDs",()=>{t.setSelectedIDs([])}),l.singleOn("addSelectedIDs",o=>{t.addSelectedID(o)}),l.singleOn("setSelectedIDs",o=>{t.setSelectedIDs(o)}),l.singleOn("updatePolygonByDrag",o=>{var s;(s=f.topViewUpdateBox)==null||s.call(f,o,a)});const u=o=>{var s;const d=N(o);d&&t.syncAllViewPointCloudColor(d),t.polygonList.find(r=>r.id===o)&&((s=t.topViewInstance)==null||s.toolInstance.setPolygonValidAndRender(o,!0))};return l.on("validUpdate",u),()=>{l.unbind("validUpdate",u)}},[t,a,e,f,t.polygonList]),React.useEffect(()=>{var l,u;if(!(a==null?void 0:a.width)||!t.topViewInstance)return;const o=(u=(l=P==null?void 0:P.attributeList)==null?void 0:l[0])==null?void 0:u.value;o&&t.topViewInstance.toolInstance.setDefaultAttribute(o),t.topViewInstance.initSize(a),t.topViewInstance.updatePolygonList(t.displayPointCloudList,t.polygonList),t.topViewInstance.updatePointList(t.displaySphereList);const{topViewInstance:{pointCloudInstance:s,toolInstance:d}}=t;d.singleOn("renderZoom",(r,v)=>{const{offsetX:I,offsetY:h}=TransferCanvas2WorldOffset(v,a,r);if(s.camera.zoom=r,v){const{x:V,y:S,z:b}=s.initCameraPosition;s.camera.position.set(V+h,S-I,b)}s.camera.updateProjectionMatrix(),s.render(),O(r),_(v,r,a),x({zoom:r,currentPos:v})}),d.singleOn("dragMove",({currentPos:r,zoom:v})=>{const{offsetX:I,offsetY:h}=TransferCanvas2WorldOffset(r,a,v);s.camera.zoom=v;const{x:V,y:S,z:b}=s.initCameraPosition;s.camera.position.set(V+h,S-I,b),s.render(),x({zoom:v,currentPos:r})})},[a,t.topViewInstance,(C=t.topViewInstance)==null?void 0:C.toolInstance]),React.useEffect(()=>{var l,u;(u=(l=t.topViewInstance)==null?void 0:l.pointCloudInstance)==null||u.applyZAxisPoints(y)},[y]),React.useEffect(()=>{f.topViewSelectedChanged({})},[t.selectedIDs]),React__default.default.createElement(PointCloudLayout.PointCloudContainer,{className:dom.getClassName("point-cloud-container","top-view"),title:k("TopView"),toolbar:React__default.default.createElement(TopViewToolbar,{currentData:e})},React__default.default.createElement("div",{style:{position:"relative",flex:1}},React__default.default.createElement("div",{style:{width:"100%",height:"100%"},ref:p},c==null?void 0:c(w)),React__default.default.createElement(PointCloudInfos.BoxInfos,{checkMode:m,config:P}),React__default.default.createElement(ZAxisSlider,{checkMode:m,zAxisLimit:y,setZAxisLimit:T}),React__default.default.createElement(PointCloudInfos.PointCloudValidity,null)))};var PointCloudTopView$1=reactRedux.connect(map.a2MapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudTopView);module.exports=PointCloudTopView$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js");const useAttribute=()=>{const{topViewInstance:t,sideViewInstance:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js");const useAttribute=()=>{const{topViewInstance:t,sideViewInstance:n,backViewInstance:o,mainViewInstance:u,defaultAttribute:i,setDefaultAttribute:r}=React.useContext(PointCloudContext.PointCloudContext);return React.useEffect(()=>{if(!(t==null?void 0:t.toolInstance))return;const e=()=>{r(t==null?void 0:t.toolInstance.defaultAttribute)};return t==null||t.toolInstance.on("changeAttributeSidebar",e),()=>{t==null||t.toolInstance.unbind("changeAttributeSidebar",e)}},[t==null?void 0:t.toolInstance]),{syncThreeViewsAttribute:e=>{[t==null?void 0:t.toolInstance,n==null?void 0:n.toolInstance,o==null?void 0:o.toolInstance].forEach(l=>{l==null||l.setDefaultAttribute(e)})},updateDefaultAttribute:e=>{t==null||t.toolInstance.setDefaultAttribute(e)},reRenderPointCloud3DBox:e=>{u==null||u.generateBox(e)},defaultAttribute:i}};exports.useAttribute=useAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,i,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,i,s)=>i in e?__defProp(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,__spreadValues=(e,i)=>{for(var s in i||(i={}))__hasOwnProp.call(i,s)&&__defNormalProp(e,s,i[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(i))__propIsEnum.call(i,s)&&__defNormalProp(e,s,i[s]);return e};const useHistory=()=>{const{history:e,setPointCloudResult:i,setSelectedIDs:s,pointCloudBoxList:r,pointCloudSphereList:L,mainViewInstance:u,topViewInstance:y,polygonList:d,setPolygonList:a,syncAllViewPointCloudColor:C}=React.useContext(PointCloudContext.PointCloudContext),P=({newBoxParams:o,newPolygon:t})=>{const n={pointCloudBoxList:r,polygonList:d};o&&(n.pointCloudBoxList=r.concat(o)),t&&(n.polygonList=d.concat(t)),e.pushHistory(n)},g=o=>{const t={pointCloudBoxList:r,polygonList:d};o.pointCloudBoxList&&(t.pointCloudBoxList=o.pointCloudBoxList),o.polygonList&&(t.polygonList=o.polygonList),e.pushHistory(t)},h=o=>{o&&e.pushHistory({pointCloudSphereList:L})},v=o=>{if(d.find(n=>n.id===o.id)){const n=d.map(c=>c.id===o.id?o:__spreadValues({},c));e.pushHistory({pointCloudBoxList:r,polygonList:n}),a(n)}},x=({pointCloudBoxList:o,polygonList:t})=>{e.initRecord({pointCloudBoxList:o,polygonList:t},!0)},f=o=>{if(!o)return;const{pointCloudBoxList:t=[],polygonList:n=[]}=o;if(t){r.length!==t.length&&s();const c=r.filter(l=>t.every(p=>p.id!==l.id)),_=t.filter(l=>r.every(p=>p.id!==l.id));c.forEach(l=>{u==null||u.removeObjectByName(l.id)}),_.forEach(l=>{u==null||u.generateBox(l)}),i(t),C(t)}n&&a(n),y==null||y.updatePolygonList(t!=null?t:[],n!=null?n:[])};return{addHistory:P,pushHistoryWithList:g,initHistory:x,pushHistoryUnderUpdatePoint:h,pushHistoryUnderUpdatePolygon:v,redo:()=>{f(e.redo())},undo:()=>{f(e.undo())}}};exports.useHistory=useHistory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("../PointCloudContext.js"),useSingleBox=require("./useSingleBox.js"),ctx=require("../../../store/ctx.js"),StepUtils=require("../../../utils/StepUtils.js"),index=require("../../../utils/index.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),antd=require("antd"),reactI18next=require("react-i18next"),useHistory=require("./useHistory.js"),usePolygon=require("./usePolygon.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,o,n)=>o in t?__defProp(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n,__spreadValues=(t,o)=>{for(var n in o||(o={}))__hasOwnProp.call(o,n)&&__defNormalProp(t,n,o[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(o))__propIsEnum.call(o,n)&&__defNormalProp(t,n,o[n]);return t},__spreadProps=(t,o)=>__defProps(t,__getOwnPropDescs(o)),__async=(t,o,n)=>new Promise((u,e)=>{var s=d=>{try{c(n.next(d))}catch(C){e(C)}},g=d=>{try{c(n.throw(d))}catch(C){e(C)}},c=d=>d.done?u(d.value):Promise.resolve(d.value).then(s,g);c((n=n.apply(t,o)).next())});const DEFAULT_SCOPE=5,DEFAULT_RADIUS=90,PointCloudView={"3D":"3D",Top:"Top",Side:"Side",Back:"Back"},topViewPolygon2PointCloud=(t,o,n,u,e)=>{const[s,g,c,d]=t.pointList.map(P=>lbUtils.PointCloudUtils.transferCanvas2World(P,o)),C=lbAnnotation.MathUtils.getLineCenterPoint([s,c]),h=lbAnnotation.MathUtils.getLineLength(s,g),x=lbAnnotation.MathUtils.getLineLength(g,c),O=lbAnnotation.MathUtils.getRadiusFromQuadrangle(t.pointList);let m=0,w=1,y={};if(n){const P=n.getSensesPointZAxisInPolygon([s,g,c,d]);m=(P.maxZ+P.minZ)/2,w=P.maxZ-P.minZ,y={count:P.zCount}}u&&(m=u.center.z,w=u.depth);const U={center:{x:C.x,y:C.y,z:m},width:x,height:h,depth:w,rotation:O,id:t.id},v=__spreadValues(u?__spreadValues(__spreadValues({},u),U):__spreadProps(__spreadValues({},U),{attribute:"",valid:!0}),y);return e&&Object.assign(v,e),v},sideViewPolygon2PointCloud=(t,o,n,u)=>{const[e,s,g]=t.pointList,[c,d,C]=o.pointList,h=lbAnnotation.MathUtils.getLineCenterPoint([e,g]),x=lbAnnotation.MathUtils.getLineCenterPoint([c,C]),m={x:{x:h.x-x.x,y:h.y-x.y}.x,y:0,z:h.y-x.y},w=lbAnnotation.MathUtils.getLineLength(e,s),y=lbAnnotation.MathUtils.getLineLength(c,d),U=w-y,v=lbAnnotation.MathUtils.getLineLength(s,g),P=lbAnnotation.MathUtils.getLineLength(d,C),I=v-P,{newBoxParams:b}=u.getNewBoxBySideUpdate(m,I,U,n);return b},backViewPolygon2PointCloud=(t,o,n,u)=>{const[e,s,g]=t.pointList,[c,d,C]=o.pointList,h=lbAnnotation.MathUtils.getLineCenterPoint([e,g]),x=lbAnnotation.MathUtils.getLineCenterPoint([c,C]),m={x:{x:h.x-x.x,y:h.y-x.y}.x,y:0,z:h.y-x.y},w=lbAnnotation.MathUtils.getLineLength(e,s),y=lbAnnotation.MathUtils.getLineLength(c,d),U=w-y,v=lbAnnotation.MathUtils.getLineLength(s,g),P=lbAnnotation.MathUtils.getLineLength(d,C),I=v-P;let{newBoxParams:b}=u.getNewBoxByBackUpdate(m,I,U,n);return b},synchronizeSideView=(t,o,n,u)=>{if(!n)return;const{pointCloud2dOperation:e,pointCloudInstance:s}=n;s.loadPCDFileByBox(u,t,{width:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:g}=s.updateOrthoCamera(t,lbUtils.EPerspectiveView.Left);s.setInitCameraPosition(g);const{polygon2d:c,zoom:d}=s.getBoxSidePolygon2DCoordinate(t);s.camera.zoom=d,s.camera.updateProjectionMatrix(),s.render(),e.initPosition(),e.zoomChangeOnCenter(d),e.setResultAndSelectedID([{id:o.id,valid:t.valid,pointList:c,textAttribute:"",isRect:!0,attribute:t.attribute}],o.id)},synchronizeBackView=(t,o,n,u)=>{if(!n)return;const{pointCloud2dOperation:e,pointCloudInstance:s}=n;s.loadPCDFileByBox(u,t,{height:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:g}=s.updateOrthoCamera(t,lbUtils.EPerspectiveView.Back);s.setInitCameraPosition(g);const{polygon2d:c,zoom:d}=s.getBoxBackPolygon2DCoordinate(t);s.camera.zoom=d,s.camera.updateProjectionMatrix(),s.render(),e.initPosition(),e.zoomChangeOnCenter(d),e.setResultAndSelectedID([{id:o.id,valid:t.valid,pointList:c,textAttribute:"",isRect:!0,attribute:t.attribute}],o.id)},synchronizeTopView=(t,o,n,u)=>{var e;if(!n||!u)return;u.generateBox(t,o.id),u.render();const{pointCloud2dOperation:s,pointCloudInstance:g}=n,{polygon2d:c}=g.getBoxTopPolygon2DCoordinate(t),d=[...s.polygonList],C=d.find(h=>h.id===o.id);C?C.pointList=c:d.push({id:o.id,pointList:c,textAttribute:"",isRect:!0,valid:(e=t.valid)!=null?e:!0}),s.setResultAndSelectedID(d,o.id)},usePointCloudViews=()=>{const t=React.useContext(PointCloudContext.PointCloudContext),{topViewInstance:o,sideViewInstance:n,backViewInstance:u,mainViewInstance:e,addPointCloudBox:s,setSelectedIDs:g,selectedIDs:c,pointCloudBoxList:d,hideAttributes:C}=t,{addHistory:h,initHistory:x,pushHistoryUnderUpdatePolygon:O}=useHistory.useHistory(),{selectedPolygon:m}=usePolygon.usePolygon(),{updateSelectedBox:w,updateSelectedBoxes:y,getPointCloudByID:U}=useSingleBox.useSingleBox(),{currentData:v,config:P}=ctx.useSelector(i=>{const{stepList:r,step:p,imgList:l,imgIndex:a}=i.annotation;return{currentData:l[a],config:index.jsonParser(StepUtils.getCurrentStepInfo(p,r).config)}}),I=ctx.useDispatch(),{selectedBox:b}=useSingleBox.useSingleBox(),{t:M}=reactI18next.useTranslation(),A=b==null?void 0:b.info;if(!o||!n||!u)return{topViewAddBox:()=>{},topViewSelectedChanged:()=>{},sideViewUpdateBox:()=>{},backViewUpdateBox:()=>{}};const{pointCloudInstance:z}=o,T=i=>{e==null||e.generateBox(i),e==null||e.controls.update(),e==null||e.render()},R=({newPolygon:i,size:r,imgList:p,trackConfigurable:l,zoom:a})=>{var f;const L={attribute:(f=o.pointCloud2dOperation.defaultAttribute)!=null?f:""};l===!0&&Object.assign(L,{trackID:lbUtils.PointCloudUtils.getNextTrackID({imgList:[],extraBoxList:d})});const B=topViewPolygon2PointCloud(i,r,z,void 0,L),S=o==null?void 0:o.pointCloud2dOperation,V=B;if((P==null?void 0:P.lowerLimitPointsNumInBox)&&typeof B.count=="number"&&B.count<P.lowerLimitPointsNumInBox){antd.message.info(M("LowerLimitPointsNumInBox",{num:P.lowerLimitPointsNumInBox})),S.deletePolygon(B.id);return}const j=C.includes(i.attribute),_=s(V);j?g([]):(g(V.id),S.setSelectedIDs([i.id]),D(PointCloudView.Top,i,V,a,_)),h({newBoxParams:V})},q=(i,r)=>{const p=i!=null?i:b==null?void 0:b.info,l=o==null?void 0:o.pointCloud2dOperation;if(l.setSelectedIDs(c),c.length===0||!l)return;const a=l.selectedPolygon;if(c.length===1&&p){D(PointCloudView.Top,a,p,void 0,r);return}},k=(i,r,p)=>{if(A){let l,a;switch(p){case PointCloudView.Back:l=backViewPolygon2PointCloud;break;case PointCloudView.Side:l=sideViewPolygon2PointCloud;break;default:l=sideViewPolygon2PointCloud;break}if(a=l(i,r,A,n.pointCloudInstance),e){const{count:L}=e.getSensesPointZAxisInPolygon(lbAnnotation.getCuboidFromPointCloudBox(a).polygonPointList,[a.center.z-a.depth/2,a.center.z+a.depth/2]);a=__spreadProps(__spreadValues({},a),{count:L})}const f=w(a);return D(p,i,a,void 0,f),f}},H=(i,r)=>{k(i,r,PointCloudView.Side)},E=(i,r)=>{k(i,r,PointCloudView.Back)},F=(i,r)=>{if(m){const l=i[0].newPolygon;l.pointList=l.pointList.map(a=>lbUtils.PointCloudUtils.transferCanvas2World(a,r)),O(i[0].newPolygon);return}const p=i.map(({newPolygon:l})=>{const a=U(l.id);return topViewPolygon2PointCloud(l,r,o.pointCloudInstance,a)});if(p.length===1){const{newPolygon:l}=i[0],a=y(p);D(PointCloudView.Top,l,p[0],void 0,a)}else{const l=y(p);l&&t.syncAllViewPointCloudColor(l)}},D=(i,r,p,l,a)=>__async(void 0,null,function*(){const f=v==null?void 0:v.url;a&&(yield t.syncAllViewPointCloudColor(a));const L={[PointCloudView.Side]:()=>{synchronizeSideView(p,r,n,f)},[PointCloudView.Back]:()=>{u&&synchronizeBackView(p,r,u,f)},[PointCloudView.Top]:()=>{synchronizeTopView(p,r,o,e)}};Object.keys(L).forEach(B=>{B!==i&&L[B]()}),l&&(e==null||e.updateCameraZoom(l)),T(p)});return{topViewAddBox:R,topViewSelectedChanged:q,topViewUpdateBox:F,sideViewUpdateBox:H,backViewUpdateBox:E,pointCloudBoxListUpdated:i=>{o.updatePolygonList(i),e==null||e.generateBoxes(i)},initPointCloud3d:i=>{if(!e)return;const r={left:-i.width/2,right:i.width/2,top:i.height/2,bottom:-i.height/2,near:100,far:-100};e.initOrthographicCamera(r),e.initRenderer(),e.render()},updatePointCloudData:(...i)=>__async(void 0,[...i],function*(r=v){var p,l,a,f,L,B;if(!(r==null?void 0:r.url)||!e)return;actionCreators.SetPointCloudLoading(I,!0),yield e.loadPCDFile(r.url,(p=P==null?void 0:P.radius)!=null?p:DEFAULT_RADIUS),d.forEach(_=>{e==null||e.removeObjectByName(_.id)});let S=[],V=[];r.result?(S=lbUtils.PointCloudUtils.getBoxParamsFromResultList(r.result),V=lbUtils.PointCloudUtils.getPolygonListFromResultList(r.result),S.forEach(_=>{e==null||e.generateBox(_)}),t.syncAllViewPointCloudColor(S),t.setPointCloudResult(S),t.setPolygonList(V)):(t.setPointCloudResult([]),t.setPolygonList([])),x({pointCloudBoxList:S,polygonList:V}),e.updateTopCamera();const j=(a=(l=index.jsonParser(r.result))==null?void 0:l.valid)!=null?a:!0;t.setPointCloudValid(j),(f=t.sideViewInstance)==null||f.clearAllData(),(L=t.backViewInstance)==null||L.clearAllData(),o.updateData(r.url,r.result,{radius:(B=P==null?void 0:P.radius)!=null?B:DEFAULT_RADIUS}),actionCreators.SetPointCloudLoading(I,!1)})}};exports.synchronizeBackView=synchronizeBackView,exports.synchronizeSideView=synchronizeSideView,exports.synchronizeTopView=synchronizeTopView,exports.topViewPolygon2PointCloud=topViewPolygon2PointCloud,exports.usePointCloudViews=usePointCloudViews;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),PointCloudContext=require("../PointCloudContext.js"),useSingleBox=require("./useSingleBox.js"),useSphere=require("./useSphere.js"),ctx=require("../../../store/ctx.js"),StepUtils=require("../../../utils/StepUtils.js"),index=require("../../../utils/index.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),antd=require("antd"),reactI18next=require("react-i18next"),useHistory=require("./useHistory.js"),usePolygon=require("./usePolygon.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,o,n)=>o in t?__defProp(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n,__spreadValues=(t,o)=>{for(var n in o||(o={}))__hasOwnProp.call(o,n)&&__defNormalProp(t,n,o[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(o))__propIsEnum.call(o,n)&&__defNormalProp(t,n,o[n]);return t},__spreadProps=(t,o)=>__defProps(t,__getOwnPropDescs(o)),__async=(t,o,n)=>new Promise((r,e)=>{var c=l=>{try{s(n.next(l))}catch(h){e(h)}},p=l=>{try{s(n.throw(l))}catch(h){e(h)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(c,p);s((n=n.apply(t,o)).next())});const DEFAULT_SCOPE=5,DEFAULT_RADIUS=90,PointCloudView={"3D":"3D",Top:"Top",Side:"Side",Back:"Back"},topViewPoint2PointCloud=(t,o,n,r,e)=>{const{x:c,y:p}=lbUtils.PointCloudUtils.transferCanvas2World(t,o),{defaultZ:s}=lbUtils.DEFAULT_SPHERE_PARAMS,l={center:{x:c,y:p,z:s},id:t.id},h=r?__spreadValues(__spreadValues({},r),l):__spreadProps(__spreadValues({},l),{attribute:"",valid:!0});return e&&Object.assign(h,e),h},topViewPolygon2PointCloud=(t,o,n,r,e,c)=>{let p=t.pointList.map(y=>lbUtils.PointCloudUtils.transferCanvas2World(y,o)),s=0,l=1,h={};if(n){const y=n.getSensesPointZAxisInPolygon(p,void 0,c);c&&y.fittedCoordinates.length>0&&(p=y.fittedCoordinates),s=(y.maxZ+y.minZ)/2,l=y.maxZ-y.minZ,h={count:y.zCount}}const[g,L,A]=p,U=lbAnnotation.MathUtils.getLineCenterPoint([g,A]),I=lbAnnotation.MathUtils.getLineLength(g,L),D=lbAnnotation.MathUtils.getLineLength(L,A),_=lbAnnotation.MathUtils.getRadiusFromQuadrangle(t.pointList);r&&(s=r.center.z,l=r.depth);const V={center:{x:U.x,y:U.y,z:s},width:D,height:I,depth:l,rotation:_,id:t.id},w=__spreadValues(r?__spreadValues(__spreadValues({},r),V):__spreadProps(__spreadValues({},V),{attribute:"",valid:!0}),h);e&&Object.assign(w,e);const O=p.map(y=>lbUtils.PointCloudUtils.transferWorld2Canvas(y,o));return{boxParams:w,newPointList:O}},sideViewPoint2PointCloud=(t,o,n)=>{const r={x:t.x-o.x,y:t.y-o.y};return __spreadProps(__spreadValues({},n),{center:{x:n.center.x-r.x,y:n.center.y,z:n.center.z-r.y}})},sideViewPolygon2PointCloud=(t,o,n,r)=>{const[e,c,p]=t.pointList,[s,l,h]=o.pointList,g=lbAnnotation.MathUtils.getLineCenterPoint([e,p]),L=lbAnnotation.MathUtils.getLineCenterPoint([s,h]),U={x:{x:g.x-L.x,y:g.y-L.y}.x,y:0,z:g.y-L.y},I=lbAnnotation.MathUtils.getLineLength(e,c),D=lbAnnotation.MathUtils.getLineLength(s,l),_=I-D,V=lbAnnotation.MathUtils.getLineLength(c,p),w=lbAnnotation.MathUtils.getLineLength(l,h),O=V-w,{newBoxParams:y}=r.getNewBoxBySideUpdate(U,O,_,n);return y},backViewPoint2PointCloud=(t,o,n)=>{const r={x:t.x-o.x,y:t.y-o.y};return __spreadProps(__spreadValues({},n),{center:{x:n.center.x,y:n.center.y-r.x,z:n.center.z-r.y}})},backViewPolygon2PointCloud=(t,o,n,r)=>{const[e,c,p]=t.pointList,[s,l,h]=o.pointList,g=lbAnnotation.MathUtils.getLineCenterPoint([e,p]),L=lbAnnotation.MathUtils.getLineCenterPoint([s,h]),U={x:{x:g.x-L.x,y:g.y-L.y}.x,y:0,z:g.y-L.y},I=lbAnnotation.MathUtils.getLineLength(e,c),D=lbAnnotation.MathUtils.getLineLength(s,l),_=I-D,V=lbAnnotation.MathUtils.getLineLength(c,p),w=lbAnnotation.MathUtils.getLineLength(l,h),O=V-w;let{newBoxParams:y}=r.getNewBoxByBackUpdate(U,O,_,n);return y},syncSideViewByPoint=(t,o,n,r,e)=>{var c;if(!n)return;const{toolInstance:p,pointCloudInstance:s}=n;s.loadPCDFile(r,(c=e==null?void 0:e.radius)!=null?c:DEFAULT_RADIUS);const{cameraPositionVector:l}=s.updateOrthoCameraBySphere(t,lbUtils.EPerspectiveView.Left);s.setInitCameraPosition(l);const{point2d:h,zoom:g}=s.getSphereSidePoint2DCoordinate(t);s.camera.zoom=g,s.camera.updateProjectionMatrix(),s.render(),p.initPosition(),p.zoomChangeOnCenter(g),p.setResult([__spreadProps(__spreadValues(__spreadValues({},o),h),{valid:t.valid,textAttribute:"",attribute:t.attribute})]),p.setSelectedID(o.id)},synchronizeSideView=(t,o,n,r)=>{if(!n)return;const{pointCloud2dOperation:e,pointCloudInstance:c}=n;c.loadPCDFileByBox(r,t,{width:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:p}=c.updateOrthoCamera(t,lbUtils.EPerspectiveView.Left);c.setInitCameraPosition(p);const{polygon2d:s,zoom:l}=c.getBoxSidePolygon2DCoordinate(t);c.camera.zoom=l,c.camera.updateProjectionMatrix(),c.render(),e.initPosition(),e.zoomChangeOnCenter(l),e.setResultAndSelectedID([{id:o.id,valid:t.valid,pointList:s,textAttribute:"",isRect:!0,attribute:t.attribute}],o.id)},syncBackViewByPoint=(t,o,n,r,e)=>{var c;if(!n)return;const{toolInstance:p,pointCloudInstance:s}=n;s.loadPCDFile(r,(c=e==null?void 0:e.radius)!=null?c:DEFAULT_RADIUS);const{cameraPositionVector:l}=s.updateOrthoCameraBySphere(t,lbUtils.EPerspectiveView.Back);s.setInitCameraPosition(l);const{point2d:h,zoom:g}=s.getSphereBackPoint2DCoordinate(t);s.camera.zoom=g,s.camera.updateProjectionMatrix(),s.render(),p.initPosition(),p.zoomChangeOnCenter(g),p.setResult([__spreadProps(__spreadValues(__spreadValues({},o),h),{valid:t.valid,textAttribute:"",attribute:t.attribute})]),p.setSelectedID(o.id)},synchronizeBackView=(t,o,n,r)=>{if(!n)return;const{pointCloud2dOperation:e,pointCloudInstance:c}=n;c.loadPCDFileByBox(r,t,{height:DEFAULT_SCOPE,depth:DEFAULT_SCOPE});const{cameraPositionVector:p}=c.updateOrthoCamera(t,lbUtils.EPerspectiveView.Back);c.setInitCameraPosition(p);const{polygon2d:s,zoom:l}=c.getBoxBackPolygon2DCoordinate(t);c.camera.zoom=l,c.camera.updateProjectionMatrix(),c.render(),e.initPosition(),e.zoomChangeOnCenter(l),e.setResultAndSelectedID([{id:o.id,valid:t.valid,pointList:s,textAttribute:"",isRect:!0,attribute:t.attribute}],o.id)},syncTopViewByPoint=(t,o,n,r)=>{if(!n||!r)return;r.generateSphere(t),r.updateCameraBySphere(t,lbUtils.EPerspectiveView.Top),r.render();const{toolInstance:e,pointCloudInstance:c}=n,{point2d:p}=c.getSphereTopPoint2DCoordinate(t),s=[...e.pointList].map(l=>l.id===o.id?__spreadProps(__spreadValues(__spreadValues({},o),p),{valid:t.valid,textAttribute:"",attribute:t.attribute}):l);e.setResult(s),e.setSelectedID(o.id)},synchronizeTopView=(t,o,n,r)=>{var e;if(!n||!r)return;r.generateBox(t,o.id),r.render();const{pointCloud2dOperation:c,pointCloudInstance:p}=n,{polygon2d:s}=p.getBoxTopPolygon2DCoordinate(t),l=[...c.polygonList],h=l.find(g=>g.id===o.id);h?h.pointList=s:l.push({id:o.id,pointList:s,textAttribute:"",isRect:!0,valid:(e=t.valid)!=null?e:!0}),c.setResultAndSelectedID(l,o.id)},usePointCloudViews=()=>{const t=React.useContext(PointCloudContext.PointCloudContext),{topViewInstance:o,sideViewInstance:n,backViewInstance:r,mainViewInstance:e,addPointCloudBox:c,addPointCloudSphere:p,setSelectedIDs:s,selectedIDs:l,pointCloudBoxList:h,pointCloudSphereList:g,hideAttributes:L}=t,{addHistory:A,initHistory:U,pushHistoryUnderUpdatePolygon:I,pushHistoryUnderUpdatePoint:D}=useHistory.useHistory(),{selectedPolygon:_}=usePolygon.usePolygon(),{updateSelectedBox:V,updateSelectedBoxes:w,getPointCloudByID:O}=useSingleBox.useSingleBox(),{getPointCloudSphereByID:y,updatePointCloudSphere:q,selectedSphere:T}=useSphere.useSphere(),{currentData:S,config:B}=ctx.useSelector(i=>{const{stepList:a,step:P,imgList:u,imgIndex:d}=i.annotation;return{currentData:u[d],config:index.jsonParser(StepUtils.getCurrentStepInfo(P,a).config)}}),H=ctx.useDispatch(),{selectedBox:j}=useSingleBox.useSingleBox(),{t:Z}=reactI18next.useTranslation(),N=j==null?void 0:j.info;if(!o||!n||!r)return{topViewAddSphere:()=>{},topViewAddBox:()=>{},topViewSelectedChanged:()=>{},sideViewUpdateBox:()=>{},backViewUpdateBox:()=>{}};const{pointCloudInstance:E}=o,G=i=>{e==null||e.generateBox(i),e==null||e.controls.update(),e==null||e.render()},X=i=>{e==null||e.generateSphere(i),e==null||e.controls.update(),e==null||e.render()},Y=({newPoint:i,size:a,zoom:P,trackConfigurable:u})=>{var d;const C={attribute:(d=o.toolInstance.defaultAttribute)!=null?d:""};u===!0&&Object.assign(C,{trackID:lbUtils.PointCloudUtils.getNextTrackID({imgList:[],extraBoxList:[],extraSphereList:g})});const f=topViewPoint2PointCloud(i,a,E,void 0,C);s(i.id);const x=p(f);z(PointCloudView.Top,i,f,P,x,B)},Q=({polygon:i,size:a,imgList:P,trackConfigurable:u,zoom:d,intelligentFit:C})=>{var f;const x={attribute:(f=o.toolInstance.defaultAttribute)!=null?f:""};u===!0&&Object.assign(x,{trackID:lbUtils.PointCloudUtils.getNextTrackID({imgList:[],extraBoxList:h,extraSphereList:g})});const v=__spreadValues({},i),{boxParams:m,newPointList:k}=topViewPolygon2PointCloud(v,a,E,void 0,x,C),R=o==null?void 0:o.toolInstance;if((B==null?void 0:B.lowerLimitPointsNumInBox)&&typeof m.count=="number"&&m.count<B.lowerLimitPointsNumInBox){antd.message.info(Z("LowerLimitPointsNumInBox",{num:B.lowerLimitPointsNumInBox})),R.deletePolygon(m.id);return}C&&(k==null?void 0:k.length)&&(v.pointList=k);const b=L.includes(v.attribute),it=c(m);b?s([]):(s(m.id),R.setSelectedIDs([v.id]),M(PointCloudView.Top,v,m,d,it),C&&synchronizeTopView(m,v,o,e)),A({newBoxParams:m})},J=({newSelectedBox:i,newPointCloudList:a,newSelectedSphere:P,newSphereList:u})=>{const d=o==null?void 0:o.toolInstance;if(!(l.length===0||!d)){if(i||(j==null?void 0:j.info)){const C=i!=null?i:j==null?void 0:j.info;d.setSelectedIDs(l);const f=d.selectedPolygon;if(l.length===1&&C){M(PointCloudView.Top,f,C,void 0,a);return}}if((P||T)&&l.length===1){const C=P!=null?P:T;d.setSelectedID(l[0]);const f=d.selectedPoint;C&&z(PointCloudView.Top,f,C,void 0,u,B)}}},F=(i,a,P)=>{if(N){let u,d;switch(P){case PointCloudView.Back:u=backViewPolygon2PointCloud;break;case PointCloudView.Side:u=sideViewPolygon2PointCloud;break;default:u=sideViewPolygon2PointCloud;break}if(d=u(i,a,N,n.pointCloudInstance),e){const{count:f}=e.getSensesPointZAxisInPolygon(lbAnnotation.getCuboidFromPointCloudBox(d).polygonPointList,[d.center.z-d.depth/2,d.center.z+d.depth/2]);d=__spreadProps(__spreadValues({},d),{count:f})}const C=V(d);return M(P,i,d,void 0,C),C}},W=(i,a,P)=>{if(T){let u,d;switch(P){case PointCloudView.Back:u=backViewPoint2PointCloud;break;case PointCloudView.Side:u=sideViewPoint2PointCloud;break;default:u=sideViewPoint2PointCloud;break}d=u(i,a,T);const C=q(d);return z(P,i,d,void 0,C,B),C}},K=(i,a)=>{W(i,a,PointCloudView.Side)},$=(i,a)=>{W(i,a,PointCloudView.Back)},tt=(i,a)=>{F(i,a,PointCloudView.Side)},et=(i,a)=>{F(i,a,PointCloudView.Back)},ot=(i,a)=>{const{x:P,y:u}=lbUtils.PointCloudUtils.transferCanvas2World(i,a);D(__spreadProps(__spreadValues({},i),{x:P,y:u}));const d=y(i.id),C=topViewPoint2PointCloud(i,a,E,d),f=q(C);z(PointCloudView.Top,i,C,void 0,f,B)},nt=(i,a)=>{if(_){const u=i[0].newPolygon;u.pointList=u.pointList.map(d=>lbUtils.PointCloudUtils.transferCanvas2World(d,a)),I(i[0].newPolygon);return}const P=i.map(({newPolygon:u})=>{const d=O(u.id),{boxParams:C}=topViewPolygon2PointCloud(u,a,o.pointCloudInstance,d);return C});if(P.length===1){const{newPolygon:u}=i[0],d=w(P);M(PointCloudView.Top,u,P[0],void 0,d)}else{const u=w(P);u&&t.syncAllViewPointCloudColor(u)}},z=(i,a,P,u,d,C)=>__async(void 0,null,function*(){const f=S==null?void 0:S.url,x={[PointCloudView.Side]:()=>{syncSideViewByPoint(P,a,n,f,C)},[PointCloudView.Back]:()=>{r&&syncBackViewByPoint(P,a,r,f,C)},[PointCloudView.Top]:()=>{syncTopViewByPoint(P,a,o,e)}};Object.keys(x).forEach(v=>{v!==i&&x[v]()}),u&&(e==null||e.updateCameraZoom(u)),X(P)}),M=(i,a,P,u,d)=>__async(void 0,null,function*(){const C=S==null?void 0:S.url;d&&(yield t.syncAllViewPointCloudColor(d));const f={[PointCloudView.Side]:()=>{synchronizeSideView(P,a,n,C)},[PointCloudView.Back]:()=>{r&&synchronizeBackView(P,a,r,C)},[PointCloudView.Top]:()=>{synchronizeTopView(P,a,o,e)}};Object.keys(f).forEach(x=>{x!==i&&f[x]()}),u&&(e==null||e.updateCameraZoom(u)),G(P)});return{topViewAddSphere:Y,topViewAddBox:Q,topViewSelectedChanged:J,topViewUpdatePoint:ot,sideViewUpdatePoint:K,backViewUpdatePoint:$,topViewUpdateBox:nt,sideViewUpdateBox:tt,backViewUpdateBox:et,pointCloudBoxListUpdated:i=>{o.updatePolygonList(i),e==null||e.generateBoxes(i)},initPointCloud3d:i=>{if(!e)return;const a={left:-i.width/2,right:i.width/2,top:i.height/2,bottom:-i.height/2,near:100,far:-100};e.initOrthographicCamera(a),e.initRenderer(),e.render()},updatePointCloudData:(...i)=>__async(void 0,[...i],function*(a=S){var P,u,d,C,f,x;if(!(a==null?void 0:a.url)||!e)return;actionCreators.SetPointCloudLoading(H,!0),yield e.loadPCDFile(a.url,(P=B==null?void 0:B.radius)!=null?P:DEFAULT_RADIUS),h.forEach(b=>{e==null||e.removeObjectByName(b.id)}),g.forEach(b=>{e==null||e.removeObjectByName(b.id)});let v=[],m=[],k=[];S.result?(v=lbUtils.PointCloudUtils.getBoxParamsFromResultList(S.result),m=lbUtils.PointCloudUtils.getPolygonListFromResultList(S.result),k=lbUtils.PointCloudUtils.getSphereParamsFromResultList(S.result),v.forEach(b=>{e==null||e.generateBox(b)}),k.forEach(b=>{e==null||e.generateSphere(b)}),t.syncAllViewPointCloudColor(v),t.setPointCloudResult(v),t.setPolygonList(m),t.setPointCloudSphereList(k)):(t.setPointCloudResult([]),t.setPolygonList([]),t.setPointCloudSphereList([])),U({pointCloudBoxList:v,polygonList:m}),e.updateTopCamera();const R=(d=(u=index.jsonParser(a.result))==null?void 0:u.valid)!=null?d:!0;t.setPointCloudValid(R),(C=t.sideViewInstance)==null||C.clearAllData(),(f=t.backViewInstance)==null||f.clearAllData(),o.updateData(a.url,a.result,{radius:(x=B==null?void 0:B.radius)!=null?x:DEFAULT_RADIUS}),actionCreators.SetPointCloudLoading(H,!1)})}};exports.syncBackViewByPoint=syncBackViewByPoint,exports.syncSideViewByPoint=syncSideViewByPoint,exports.syncTopViewByPoint=syncTopViewByPoint,exports.synchronizeBackView=synchronizeBackView,exports.synchronizeSideView=synchronizeSideView,exports.synchronizeTopView=synchronizeTopView,exports.topViewPoint2PointCloud=topViewPoint2PointCloud,exports.topViewPolygon2PointCloud=topViewPolygon2PointCloud,exports.usePointCloudViews=usePointCloudViews;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),_=require("lodash");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_);const useSphere=()=>{const{pointCloudSphereList:e,setPointCloudSphereList:u,selectedID:i,mainViewInstance:r}=React.useContext(PointCloudContext.PointCloudContext),l=React.useMemo(()=>e.find(t=>t.id===i),[i,e]),d=React.useCallback(t=>e.find(n=>n.id===t),[e]),s=React.useCallback(t=>{const n=e.findIndex(o=>o.id===t.id);if(n>-1){e.splice(n,1,___default.default.merge(e[n],t));const o=___default.default.cloneDeep(e);return u(o),o}return e},[e]),c=React.useCallback(t=>{const n=e.filter(o=>o.id!==t);u(n),r==null||r.removeObjectByName(t),r==null||r.render()},[e]);return{selectedSphere:l,getPointCloudSphereByID:d,updatePointCloudSphere:s,deletePointCloudSphere:c}};exports.useSphere=useSphere;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useHistory=require("./useHistory.js");const{EToolName,EPolygonPattern}=lbAnnotation.cTool,useStatus=()=>{const{topViewInstance:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js"),lbAnnotation=require("@labelbee/lb-annotation"),useHistory=require("./useHistory.js");const{EToolName,EPolygonPattern}=lbAnnotation.cTool,useStatus=()=>{const{topViewInstance:i,sideViewInstance:r,backViewInstance:a,mainViewInstance:t,pointCloudBoxList:c,pointCloudSphereList:d,setPointCloudResult:P,setPointCloudSphereList:C,setPolygonList:v,pointCloudPattern:u,setPointCloudPattern:n,syncAllViewPointCloudColor:h}=React.useContext(PointCloudContext.PointCloudContext),{pushHistoryWithList:y}=useHistory.useHistory(),p=()=>{c.forEach(e=>{t==null||t.removeObjectByName(e.id)}),d.forEach(e=>{t==null||t.removeObjectByName(e.id)}),t==null||t.render(),P([]),v([]),C([]),i==null||i.toolScheduler.clearStatusAndResult(),h([]),y({pointCloudBoxList:[],polygonList:[]})},l=()=>{r==null||r.toolInstance.clearResult(),a==null||a.toolInstance.clearResult()};return{clearAllResult:p,updatePointCloudPattern:e=>{if(e===u)return;const s=[i,r,a];switch(e){case EToolName.Rect:l(),s.forEach(o=>{o==null||o.switchToCanvas(EToolName.PointCloudPolygon),o==null||o.toolInstance.setPattern(EPolygonPattern.Rect)}),n(EToolName.Rect);break;case EToolName.Polygon:l(),s.forEach(o=>{o==null||o.switchToCanvas(EToolName.PointCloudPolygon),o==null||o.toolInstance.setPattern(EPolygonPattern.Normal)}),n(EToolName.Polygon);break;case EToolName.Point:l(),s.forEach(o=>{o==null||o.switchToCanvas(EToolName.Point)}),n(EToolName.Point);break;case EToolName.Line:l(),s.forEach(o=>{o==null||o.switchToCanvas(EToolName.Line)}),n(EToolName.Line);break}},pointCloudPattern:u}};exports.useStatus=useStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js");const useZoom=()=>{const{topViewInstance:o}=React.useContext(PointCloudContext.PointCloudContext),{zoom:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PointCloudContext=require("../PointCloudContext.js");const useZoom=()=>{const{topViewInstance:o,sideViewInstance:i,backViewInstance:l}=React.useContext(PointCloudContext.PointCloudContext),{zoom:s,setZoom:c}=React.useContext(PointCloudContext.PointCloudContext);return{zoom:s,setZoom:c,initialPosition:()=>{o==null||o.pointCloud2dOperation.initImgPos()},zoomOut:()=>{o==null||o.pointCloud2dOperation.zoomChanged(!1)},zoomIn:()=>{o==null||o.pointCloud2dOperation.zoomChanged(!0)},syncTopviewToolZoom:(n,t,e)=>{o==null||o.toolScheduler.syncPosition(n,t,e,o==null?void 0:o.toolInstance)},syncSideviewToolZoom:(n,t,e)=>{i==null||i.toolScheduler.syncPosition(n,t,e,i==null?void 0:i.toolInstance)},syncBackviewToolZoom:(n,t,e)=>{l==null||l.toolScheduler.syncPosition(n,t,e,l==null?void 0:l.toolInstance)}}};exports.useZoom=useZoom;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloud3DView=require("./PointCloud3DView.js"),PointCloudBackView=require("./PointCloudBackView.js"),PointCloudTopView=require("./PointCloudTopView.js"),PointCloudSideView=require("./PointCloudSideView.js"),PointCloud2DView=require("./PointCloud2DView.js"),PointCloudListener=require("./PointCloudListener.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),index=require("../../views/MainView/toolFooter/AnnotatedAttributes/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PointCloudView=({imgList:e,drawLayerSlot:a,checkMode:t})=>e.length===0?null:React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudListener,{checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout"),onContextMenu:
|
|
1
|
+
"use strict";var dom=require("../../utils/dom.js"),React=require("react"),PointCloud3DView=require("./PointCloud3DView.js"),PointCloudBackView=require("./PointCloudBackView.js"),PointCloudTopView=require("./PointCloudTopView.js"),PointCloudSideView=require("./PointCloudSideView.js"),PointCloud2DView=require("./PointCloud2DView.js"),PointCloudListener=require("./PointCloudListener.js"),reactRedux=require("react-redux"),ctx=require("../../store/ctx.js"),index=require("../../views/MainView/toolFooter/AnnotatedAttributes/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PointCloudView=({imgList:e,drawLayerSlot:a,checkMode:t,intelligentFit:l})=>e.length===0?null:React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(PointCloudListener,{checkMode:t}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-layout"),onContextMenu:n=>n.preventDefault()},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-wrapper")},React__default.default.createElement(index.AnnotatedAttributesPanelFixedLeft,null),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-content")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","left")},React__default.default.createElement(PointCloud2DView,null),React__default.default.createElement(PointCloud3DView,null)),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right")},React__default.default.createElement(PointCloudTopView,{drawLayerSlot:a,checkMode:t,intelligentFit:l}),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-container","right-bottom")},React__default.default.createElement(PointCloudSideView,{checkMode:t}),React__default.default.createElement(PointCloudBackView,{checkMode:t})))),React__default.default.createElement(index.AnnotatedAttributesPanelFixedRight,null)))),mapStateToProps=e=>({imgList:e.annotation.imgList});var PointCloudView$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PointCloudView);module.exports=PointCloudView$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var index=require("./predictTrackingIcon/index.js");module.exports=index;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var antd=require("antd"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),icon=require("../../../assets/predictTracking/icon.svg.js"),useSingleBox=require("../../pointCloudView/hooks/useSingleBox.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),ctx=require("../../../store/ctx.js"),util=require("../previewResult/util.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__async=(e,i,t)=>new Promise((s,o)=>{var l=r=>{try{n(t.next(r))}catch(a){o(a)}},c=r=>{try{n(t.throw(r))}catch(a){o(a)}},n=r=>r.done?s(r.value):Promise.resolve(r.value).then(l,c);n((t=t.apply(e,i)).next())});const PredictTrackingIcon=e=>{const i=ctx.useDispatch(),{t}=reactI18next.useTranslation(),{loading:s}=e,{selectedBox:o}=useSingleBox.useSingleBox(),l=()=>__async(void 0,null,function*(){if(s)return;const c=o==null?void 0:o.info.trackID;if(!c){antd.message.error(t("BeforePredictStarting"));return}yield i(actionCreators.ChangeSave);const n=yield i(actionCreators.GetBoxesByID(c));if(n.length<2){antd.message.error(t("BeforePredictStarting"));return}const r=n[n.length-2],a=n[n.length-1],u=a.index-r.index;if(u<2){antd.message.error(t("BeforePredictStarting"));return}if(u>8){antd.message.error(t("ThePredictedPointCloud"));return}actionCreators.SetPointCloudLoading(i,!0);const d=util.predict(r,a);actionCreators.SetPredictResult(i,d),actionCreators.SetPredictResultVisible(i,!0)});return React__default.default.createElement(antd.Button,{type:"link",onClick:l,style:{display:"flex",flexDirection:"column",height:"auto",alignItems:"center"}},React__default.default.createElement("img",{src:icon,style:{alignSelf:"center"}}),React__default.default.createElement("span",{style:{color:"#797979"}},t("ComplementaryTracking")))},mapStateToProps=e=>({loading:e.annotation.loading});var PredictTrackingIcon$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PredictTrackingIcon);module.exports=PredictTrackingIcon$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var classNames=require("classnames"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),PointCloudContext=require("../../pointCloudView/PointCloudContext.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),ctx=require("../../../store/ctx.js"),dom=require("../../../utils/dom.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),util=require("./util.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var classNames__default=_interopDefaultLegacy(classNames),React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,a)=>new Promise((c,n)=>{var o=l=>{try{i(a.next(l))}catch(s){n(s)}},r=l=>{try{i(a.throw(l))}catch(s){n(s)}},i=l=>l.done?c(l.value):Promise.resolve(l.value).then(o,r);i((a=a.apply(e,t)).next())});const PreviewResult=e=>{const{predictionResult:t,predictionResultVisible:a,imgList:c}=e,[n,o]=React.useState([]),r=ctx.useDispatch(),{t:i}=reactI18next.useTranslation(),l=()=>{actionCreators.SetPredictResultVisible(r,!1),actionCreators.SetPredictResult(r,[]),o([])},s=()=>__async(void 0,null,function*(){actionCreators.SetPointCloudLoading(r,!0),yield r(actionCreators.BatchUpdateImgListResultByPredictResult()),actionCreators.SetPointCloudLoading(r,!1),l()});return a?React__default.default.createElement(React__default.default.Fragment,null,n.length>0&&React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","bar")},React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","title")},React__default.default.createElement("div",null,i("ComplementaryTrackingPrediction"),n.length>0?`\uFF08${n.length}\uFF09`:""),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","option")},React__default.default.createElement("div",{className:classNames__default.default([dom.getClassName("point-cloud-predict-tracking-container","cancelOption"),dom.getClassName("point-cloud-predict-tracking-container","button")]),onClick:l},i("Cancel")),React__default.default.createElement("div",{className:classNames__default.default([dom.getClassName("point-cloud-predict-tracking-container","okOption"),dom.getClassName("point-cloud-predict-tracking-container","button")]),onClick:s},i("Apply")))),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","content")},React__default.default.createElement(Result,{list:n})))),t.length>0&&React__default.default.createElement(GenerateViewsDataUrl,{result:t,imgList:c,setList:o})):null},Result=e=>{const{list:t}=e,{t:a}=reactI18next.useTranslation(),c=[a("TopView"),a("SideView"),a("BackView")];return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","left")},c.map(n=>React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","title"),key:n},n))),React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","right")},t.map(n=>React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","item"),key:n.id},util.views.map(o=>{const r=n[o];return React__default.default.createElement("div",{className:dom.getClassName("point-cloud-predict-tracking-container","view"),key:`${n.id}-${o}`},React__default.default.createElement("img",{src:r}))})))))},GenerateViewsDataUrl=e=>{const t=React__default.default.useContext(PointCloudContext.PointCloudContext),a=ctx.useDispatch(),{result:c,imgList:n,setList:o}=e,r=React.useRef(null),i={width:600,height:600};return React.useEffect(()=>{(()=>__async(void 0,null,function*(){var s,f,g,v,C,h;const p=(s=t.mainViewInstance)==null?void 0:s.config;if(p&&r.current){const P={left:-i.width/2,right:i.width/2,top:i.height/2,bottom:-i.height/2,near:200,far:-200},u=new lbAnnotation.PointCloud({container:r.current,isOrthographicCamera:!0,orthographicParams:P,config:p});u.setShowDirection(!1);for(const d of c){const{index:m}=d,y=n[m].url?n[m].url:(C=(v=(g=(f=n[m])==null?void 0:f.webPointCloudFile)==null?void 0:g.lidar)==null?void 0:v.url)!=null?C:"";yield u.loadPCDFileByBox(y,d,{width:2,height:2,depth:2}),yield u.updateCameraZoom(t.zoom);const N=(h=lbUtils.toolStyleConverter.getColorFromConfig({attribute:d.attribute},__spreadProps(__spreadValues({},p),{attributeConfigurable:!0}),{}))==null?void 0:h.hex;u.generateBox(d,N),yield util.sleep(500),yield util.getViewsDataUrl(u,d,t.zoom),yield u.removeObjectByName(d.id),yield u.clearPointCloudAndRender()}o(c),actionCreators.SetPointCloudLoading(a,!1)}}))()},[]),React__default.default.createElement("div",{style:i,ref:r,className:"generate-view"})},mapStateToProps=e=>({predictionResult:e.annotation.predictionResult,predictionResultVisible:e.annotation.predictionResultVisible,imgList:e.annotation.imgList});var PreviewResult$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(PreviewResult);module.exports=PreviewResult$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("../../../utils/index.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(r,e,t)=>e in r?__defProp(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,__spreadValues=(r,e)=>{for(var t in e||(e={}))__hasOwnProp.call(e,t)&&__defNormalProp(r,t,e[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))__propIsEnum.call(e,t)&&__defNormalProp(r,t,e[t]);return r},__spreadProps=(r,e)=>__defProps(r,__getOwnPropDescs(e)),__async=(r,e,t)=>new Promise((o,i)=>{var s=n=>{try{c(t.next(n))}catch(l){i(l)}},u=n=>{try{c(t.throw(n))}catch(l){i(l)}},c=n=>n.done?o(n.value):Promise.resolve(n.value).then(s,u);c((t=t.apply(r,e)).next())});const EXAMPLE_IMAGE_SIZE={width:160,height:110},getDataUrl=(r,e=2)=>__async(void 0,null,function*(){return cropAndEnlarge(r.domElement,EXAMPLE_IMAGE_SIZE.width,EXAMPLE_IMAGE_SIZE.height,e)}),sleep=(r=300)=>new Promise(e=>{setTimeout(()=>{e("")},r)}),views=[lbUtils.EPerspectiveView.Top,lbUtils.EPerspectiveView.Left,lbUtils.EPerspectiveView.Back],getViewsDataUrl=(r,e,t)=>__async(void 0,null,function*(){for(const o of views)yield r.updateCameraByBox(e,o),e[o]=yield getDataUrl(r.renderer,t)}),cropAndEnlarge=(r,e,t,o)=>{if(!r)return"";const i=r.width/2,s=r.height/2,u=i-e/2,c=s-t/2,n=document.createElement("canvas");n.width=e*o,n.height=t*o;const l=n.getContext("2d");return l==null||l.drawImage(r,u,c,e,t,0,0,e*o,t*o),n.toDataURL()},getBoxesByTrackID=(r,e,t)=>{const o=[];return r.forEach((i,s)=>{var u;const c=index.jsonParser(i==null?void 0:i.result),n=(u=c==null?void 0:c[`step_${e}`])==null?void 0:u.result,l=n==null?void 0:n.find(p=>p.trackID===t);l&&o.push(__spreadProps(__spreadValues({},l),{index:s}))}),o},predict=(r,e)=>{const o=e.index-r.index-1,i=[],s={},u=["x","y","z"],c=["center","depth","height","index","rotation","width"];u.forEach(n=>{s[n]=getInteriorNumbersByStartAndEnd(r.center[n],e.center[n],o)}),c.forEach(n=>{n!=="center"&&(s[n]=getInteriorNumbersByStartAndEnd(r[n],e[n],o))});for(let n=0;n<o;n++){const l=u.reduce((a,d)=>(a[d]=s[d][n],a),{x:0,y:0,z:0}),p=c.reduce((a,d)=>(d==="center"||(a[d]=s[d][n]),a),__spreadProps(__spreadValues({},r),{id:lbAnnotation.uuid(),center:l}));i.push(p)}return i},getInteriorNumbersByStartAndEnd=(r=0,e=0,t=0)=>{const o=(e-r)/(t+1),i=new Array(t);for(let s=0;s<t;s++)i[s]=r+o*(s+1);return i};exports.getBoxesByTrackID=getBoxesByTrackID,exports.getViewsDataUrl=getViewsDataUrl,exports.predict=predict,exports.sleep=sleep,exports.views=views;
|
package/dist/constant/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EStepType=void 0,function(r){r[r.Check=0]="Check",r[r.ANNOTATION=1]="ANNOTATION",r[r.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",r[r.PRE_ANNOTATION=3]="PRE_ANNOTATION",r[r.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"}(exports.EStepType||(exports.EStepType={})),exports.ESubmitType=void 0,function(r){r[r.Backward=1]="Backward",r[r.Forward=2]="Forward",r[r.Jump=3]="Jump",r[r.Quit=4]="Quit",r[r.Export=5]="Export",r[r.StepChanged=6]="StepChanged",r[r.Save=7]="Save",r[r.BatchUpdateTrackID=8]="BatchUpdateTrackID",r[r.SyncImgList=10001]="SyncImgList",r[r.SyncCurrentPageData=10002]="SyncCurrentPageData"}(exports.ESubmitType||(exports.ESubmitType={}));const prefix="bee",componentCls=`${prefix}-component`;exports.componentCls=componentCls,exports.prefix=prefix;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EStepType=void 0,function(r){r[r.Check=0]="Check",r[r.ANNOTATION=1]="ANNOTATION",r[r.QUALITY_INSPECTION=2]="QUALITY_INSPECTION",r[r.PRE_ANNOTATION=3]="PRE_ANNOTATION",r[r.MANUAL_CORRECTION=4]="MANUAL_CORRECTION"}(exports.EStepType||(exports.EStepType={})),exports.ESubmitType=void 0,function(r){r[r.Backward=1]="Backward",r[r.Forward=2]="Forward",r[r.Jump=3]="Jump",r[r.Quit=4]="Quit",r[r.Export=5]="Export",r[r.StepChanged=6]="StepChanged",r[r.Save=7]="Save",r[r.BatchUpdateTrackID=8]="BatchUpdateTrackID",r[r.BatchUpdateImgList=9]="BatchUpdateImgList",r[r.SyncImgList=10001]="SyncImgList",r[r.SyncCurrentPageData=10002]="SyncCurrentPageData"}(exports.ESubmitType||(exports.ESubmitType={}));const prefix="bee",componentCls=`${prefix}-component`;exports.componentCls=componentCls,exports.prefix=prefix;
|
package/dist/data/Style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const COLORS_ARRAY=["rgba(128, 12, 249, 1)","rgba(0, 255, 48, 1)","rgba(255, 136, 247, 1)","rgba(255, 226, 50, 1)","rgba(153, 66, 23, 1)","rgba(2, 130, 250, 1)","rgba(255, 35, 35, 1)","rgba(0, 255, 234, 1)"],NULL_COLOR="rgba(204, 204, 204, 1)",DEFAULT_COLOR={valid:{stroke:"rgba(102, 111, 255, 0.6)",fill:"rgba(102, 111, 255, 0.3)"},invalid:{stroke:"rgba(255, 153, 102,1)",fill:"rgba(255, 153, 102, 0.5)"},validSelected:{stroke:"rgba(0, 15, 255, 0.8)",fill:"rgba(0, 15, 255, 0.4)"},invalidSelected:{stroke:"rgba(255,153,102,0.8)",fill:"rgba(255,153,102,0.3)"},validHover:{stroke:"rgba(0, 15, 255, 1)",fill:"rgba(0, 15, 255, 0.5)"},invalidHover:{stroke:"rgba(255,153,102,1)",fill:"rgba(255,153,102,0.5)"}},CHANGE_COLOR={1:{valid:"rgba(0, 0, 255, 0.5)",select:{stroke:"rgba(0, 15, 255, 1)",fill:"rgba(0,15,255, 1)"},hover:"rgba(0, 15, 255, 0.8)",line:"rgba(102, 111, 255, 1 )"},3:{valid:"rgba(0, 255, 255, 0.5)",select:{stroke:"rgba(0, 212, 255, 1)",fill:"rgba(0,212,255, 1)"},hover:"rgba(0, 212, 255, 0.8)",line:"rgba(102, 230, 255, 1)"},5:{valid:"rgba(0, 255, 0, 0.5)",select:{stroke:"rgba(149, 255, 1)",fill:"rgba(149,255,0, 1)"},hover:"rgba(149, 255, 0, 0.8)",line:"rgba(191, 255, 102, 1)"},7:{valid:"rgba(255, 255, 0, 0.5)",select:{stroke:"rgba(255, 230, 102, 1)",fill:"rgba(255,213,0, 1)"},hover:"rgba(255, 230, 102, 0.8)",line:"rgba(255, 230, 102, 1)"},9:{valid:"rgba(255, 0, 255, 0.5)",select:{stroke:"rgba(230, 102, 255, 1)",fill:"rgba(213,0,255, 1)"},hover:"rgba(230, 102, 255, 0.8)",line:"rgba(230, 102, 255, 1)"}},BORDER_OPACITY_LEVEL={1:.2,3:.4,5:.6,7:.8,9:1},FILL_OPACITY_LEVEL={1:0,3:.2,5:.4,7:.6,9:.8};exports.BORDER_OPACITY_LEVEL=BORDER_OPACITY_LEVEL,exports.CHANGE_COLOR=CHANGE_COLOR,exports.COLORS_ARRAY=COLORS_ARRAY,exports.DEFAULT_COLOR=DEFAULT_COLOR,exports.FILL_OPACITY_LEVEL=FILL_OPACITY_LEVEL,exports.NULL_COLOR=NULL_COLOR;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const COLORS_ARRAY=["rgba(128, 12, 249, 1)","rgba(0, 255, 48, 1)","rgba(255, 136, 247, 1)","rgba(255, 226, 50, 1)","rgba(153, 66, 23, 1)","rgba(2, 130, 250, 1)","rgba(255, 35, 35, 1)","rgba(0, 255, 234, 1)"],NULL_COLOR="rgba(204, 204, 204, 1)",DEFAULT_COLOR={valid:{stroke:"rgba(102, 111, 255, 0.6)",fill:"rgba(102, 111, 255, 0.3)"},invalid:{stroke:"rgba(255, 153, 102,1)",fill:"rgba(255, 153, 102, 0.5)"},validSelected:{stroke:"rgba(0, 15, 255, 0.8)",fill:"rgba(0, 15, 255, 0.4)"},invalidSelected:{stroke:"rgba(255,153,102,0.8)",fill:"rgba(255,153,102,0.3)"},validHover:{stroke:"rgba(0, 15, 255, 1)",fill:"rgba(0, 15, 255, 0.5)"},invalidHover:{stroke:"rgba(255,153,102,1)",fill:"rgba(255,153,102,0.5)"}},CHANGE_COLOR={1:{valid:"rgba(0, 0, 255, 0.5)",select:{stroke:"rgba(0, 15, 255, 1)",fill:"rgba(0,15,255, 1)"},hover:"rgba(0, 15, 255, 0.8)",line:"rgba(102, 111, 255, 1 )"},3:{valid:"rgba(0, 255, 255, 0.5)",select:{stroke:"rgba(0, 212, 255, 1)",fill:"rgba(0,212,255, 1)"},hover:"rgba(0, 212, 255, 0.8)",line:"rgba(102, 230, 255, 1)"},5:{valid:"rgba(0, 255, 0, 0.5)",select:{stroke:"rgba(149, 255, 1)",fill:"rgba(149,255,0, 1)"},hover:"rgba(149, 255, 0, 0.8)",line:"rgba(191, 255, 102, 1)"},7:{valid:"rgba(255, 255, 0, 0.5)",select:{stroke:"rgba(255, 230, 102, 1)",fill:"rgba(255,213,0, 1)"},hover:"rgba(255, 230, 102, 0.8)",line:"rgba(255, 230, 102, 1)"},9:{valid:"rgba(255, 0, 255, 0.5)",select:{stroke:"rgba(230, 102, 255, 1)",fill:"rgba(213,0,255, 1)"},hover:"rgba(230, 102, 255, 0.8)",line:"rgba(230, 102, 255, 1)"}},BORDER_OPACITY_LEVEL={0:0,1:.2,3:.4,5:.6,7:.8,9:1,10:1},FILL_OPACITY_LEVEL={1:0,3:.2,5:.4,7:.6,9:.8,10:1};exports.BORDER_OPACITY_LEVEL=BORDER_OPACITY_LEVEL,exports.CHANGE_COLOR=CHANGE_COLOR,exports.COLORS_ARRAY=COLORS_ARRAY,exports.DEFAULT_COLOR=DEFAULT_COLOR,exports.FILL_OPACITY_LEVEL=FILL_OPACITY_LEVEL,exports.NULL_COLOR=NULL_COLOR;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EScribblePattern=void 0,function(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EScribblePattern=void 0,function(o){o[o.Scribble=1]="Scribble",o[o.Erase=2]="Erase"}(exports.EScribblePattern||(exports.EScribblePattern={})),exports.EToolName=void 0,function(o){o.Rect="rectTool",o.Tag="tagTool",o.Point="pointTool",o.PointMarker="pointMarkerTool",o.Segmentation="segmentationTool",o.Filter="filterTool",o.Text="textTool",o.Polygon="polygonTool",o.Line="lineTool",o.LineMarker="lineMarkerTool",o.Empty="emptyTool",o.FolderTag="folderTagTool",o.RectTrack="rectTrackTool",o.ScribbleTool="scribbleTool",o.Face="faceTool",o.ClientAttribute="clientAttributeTool",o.OCRRelation="OCRRelationTool",o.SegmentByRect="segmentByRectTool",o.Cuboid="cuboidTool",o.PointCloudPolygon="pointCloudPolygon"}(exports.EToolName||(exports.EToolName={})),exports.ETextType=void 0,function(o){o[o.AnyString=0]="AnyString",o[o.Order=1]="Order",o[o.EnglishOnly=2]="EnglishOnly",o[o.NumberOnly=3]="NumberOnly",o[o.CustomFormat=4]="CustomFormat"}(exports.ETextType||(exports.ETextType={}));const TEXT_ATTRIBUTE_MAX_LENGTH=1e3;exports.TEXT_ATTRIBUTE_MAX_LENGTH=TEXT_ATTRIBUTE_MAX_LENGTH;
|
package/dist/index.css
CHANGED
|
@@ -1306,23 +1306,6 @@
|
|
|
1306
1306
|
cursor: pointer;
|
|
1307
1307
|
margin-right: 16px;
|
|
1308
1308
|
}
|
|
1309
|
-
.bee-point-cloud-wrapper .bee-point-cloud-container__slider-container {
|
|
1310
|
-
width: 100px;
|
|
1311
|
-
padding: 0px 4px;
|
|
1312
|
-
display: flex;
|
|
1313
|
-
align-items: center;
|
|
1314
|
-
}
|
|
1315
|
-
.bee-point-cloud-wrapper .bee-point-cloud-container__slider-container__circle {
|
|
1316
|
-
display: block;
|
|
1317
|
-
width: 5px;
|
|
1318
|
-
height: 5px;
|
|
1319
|
-
background: #d9d9d9;
|
|
1320
|
-
border-radius: 50%;
|
|
1321
|
-
}
|
|
1322
|
-
.bee-point-cloud-wrapper .bee-point-cloud-container__slider-container__slider {
|
|
1323
|
-
width: 70px;
|
|
1324
|
-
padding: 0 4px;
|
|
1325
|
-
}
|
|
1326
1309
|
.bee-point-cloud-wrapper .bee-point-cloud-container__left {
|
|
1327
1310
|
width: 40%;
|
|
1328
1311
|
display: flex;
|
|
@@ -1481,4 +1464,86 @@
|
|
|
1481
1464
|
height: 100%;
|
|
1482
1465
|
}
|
|
1483
1466
|
|
|
1484
|
-
/** PointCloud样式 end */
|
|
1467
|
+
/** PointCloud样式 end */
|
|
1468
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar {
|
|
1469
|
+
position: fixed;
|
|
1470
|
+
z-index: 100;
|
|
1471
|
+
left: 0;
|
|
1472
|
+
right: 240px;
|
|
1473
|
+
bottom: 40px;
|
|
1474
|
+
background: #444;
|
|
1475
|
+
color: white;
|
|
1476
|
+
padding: 20px 24px;
|
|
1477
|
+
display: flex;
|
|
1478
|
+
flex-flow: column;
|
|
1479
|
+
}
|
|
1480
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__title {
|
|
1481
|
+
font-size: 24px;
|
|
1482
|
+
color: #fff;
|
|
1483
|
+
display: flex;
|
|
1484
|
+
justify-content: space-between;
|
|
1485
|
+
}
|
|
1486
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__title .bee-point-cloud-predict-tracking-container__option {
|
|
1487
|
+
display: flex;
|
|
1488
|
+
}
|
|
1489
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__title .bee-point-cloud-predict-tracking-container__option .bee-point-cloud-predict-tracking-container__button {
|
|
1490
|
+
background: red;
|
|
1491
|
+
display: flex;
|
|
1492
|
+
justify-content: center;
|
|
1493
|
+
align-items: center;
|
|
1494
|
+
width: 88px;
|
|
1495
|
+
height: 32px;
|
|
1496
|
+
color: white;
|
|
1497
|
+
border-radius: 4px;
|
|
1498
|
+
border: 1px solid transparent;
|
|
1499
|
+
cursor: pointer;
|
|
1500
|
+
font-size: 14px;
|
|
1501
|
+
}
|
|
1502
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__title .bee-point-cloud-predict-tracking-container__option .bee-point-cloud-predict-tracking-container__okOption {
|
|
1503
|
+
color: #555350;
|
|
1504
|
+
background: white;
|
|
1505
|
+
}
|
|
1506
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__title .bee-point-cloud-predict-tracking-container__option .bee-point-cloud-predict-tracking-container__cancelOption {
|
|
1507
|
+
margin-right: 16px;
|
|
1508
|
+
color: white;
|
|
1509
|
+
background: transparent;
|
|
1510
|
+
border: 1px solid white;
|
|
1511
|
+
}
|
|
1512
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__content {
|
|
1513
|
+
display: flex;
|
|
1514
|
+
flex: 1;
|
|
1515
|
+
}
|
|
1516
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__content .bee-point-cloud-predict-tracking-container__left {
|
|
1517
|
+
width: 140px;
|
|
1518
|
+
}
|
|
1519
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__content .bee-point-cloud-predict-tracking-container__left div {
|
|
1520
|
+
height: 33.3%;
|
|
1521
|
+
align-items: center;
|
|
1522
|
+
}
|
|
1523
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__content .bee-point-cloud-predict-tracking-container__right {
|
|
1524
|
+
display: flex;
|
|
1525
|
+
gap: 40px;
|
|
1526
|
+
flex: 1;
|
|
1527
|
+
overflow: auto;
|
|
1528
|
+
}
|
|
1529
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__content .bee-point-cloud-predict-tracking-container__right .bee-point-cloud-predict-tracking-container__item {
|
|
1530
|
+
display: flex;
|
|
1531
|
+
flex-direction: column;
|
|
1532
|
+
gap: 20px;
|
|
1533
|
+
}
|
|
1534
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__content .bee-point-cloud-predict-tracking-container__right .bee-point-cloud-predict-tracking-container__item .bee-point-cloud-predict-tracking-container__view {
|
|
1535
|
+
width: 180px;
|
|
1536
|
+
height: 110px;
|
|
1537
|
+
background-color: palegreen;
|
|
1538
|
+
}
|
|
1539
|
+
.bee-point-cloud-predict-tracking-container .bee-point-cloud-predict-tracking-container__bar .bee-point-cloud-predict-tracking-container__content .bee-point-cloud-predict-tracking-container__right .bee-point-cloud-predict-tracking-container__item .bee-point-cloud-predict-tracking-container__view img {
|
|
1540
|
+
width: 100%;
|
|
1541
|
+
height: 100%;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
.generate-view {
|
|
1545
|
+
position: fixed;
|
|
1546
|
+
bottom: 0;
|
|
1547
|
+
right: 0;
|
|
1548
|
+
z-index: -200;
|
|
1549
|
+
}
|