@realsee/dnalogel 2.0.0-alpha.9 → 2.0.0-beta.36
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/README.md +78 -28
- package/components/index.js +1450 -0
- package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +3 -48
- package/dist/CSS3DRenderPlugin/index.js +27 -26
- package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +4 -6
- package/dist/CameraMovementPlugin/index.js +12 -12
- package/dist/CameraMovementPlugin/typing.d.ts +1 -1
- package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.js +941 -0
- package/dist/ItemLabelPlugin/typings.d.ts +59 -0
- package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/dist/ModelChassisCompassPlugin/index.js +8 -5
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/dist/ModelEntryDoorGuidePlugin/index.js +20 -20
- package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.js +674 -0
- package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelRoomLabelPlugin/index.js +153 -73
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +5 -0
- package/dist/ModelTVVideoPlugin/index.js +301 -0
- package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
- package/dist/ModelViewPlugin/index.d.ts +3 -16
- package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/dist/PanoCompassPlugin/index.d.ts +4 -47
- package/dist/PanoCompassPlugin/index.js +242 -129
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/dist/PanoCursorRaycasterPlugin/index.js +5 -3
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +12 -9
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +18 -9
- package/dist/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/dist/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +5 -2
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +50 -15
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +5 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/dist/PanoMeasurePlugin/index.d.ts +9 -6
- package/dist/PanoMeasurePlugin/index.js +2649 -3442
- package/dist/PanoMeasurePlugin/typings/data.d.ts +4 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +14 -5
- package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -2
- package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.d.ts +4 -30
- package/dist/PanoRulerPlugin/index.js +12 -12
- package/dist/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +5 -0
- package/dist/PanoSpatialTagPlugin/index.js +1307 -0
- package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/dist/base/BasePlugin.d.ts +100 -0
- package/dist/base/BasePluginWithData.d.ts +34 -0
- package/dist/components/PaintBrush/Controller.d.ts +43 -0
- package/dist/components/PaintBrush/Subscribe.d.ts +76 -0
- package/dist/components/PaintBrush/index.d.ts +27 -0
- package/dist/components/PaintBrush/style.d.ts +2 -0
- package/dist/components/PaintBrush/tween.d.ts +62 -0
- package/dist/components/PaintBrush/typings.d.ts +58 -0
- package/dist/components/PaintBrush/utils.d.ts +26 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +70 -77
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
- package/dist/floorplan/ModelFloorplanPlugin/index.js +2319 -1620
- package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +601 -266
- package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +53 -47
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +6 -4
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +2198 -1428
- package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/dist/floorplan/index.d.ts +6 -0
- package/dist/floorplan/utils/constant.d.ts +22 -0
- package/dist/floorplan/utils/correctFiveState.d.ts +15 -0
- package/dist/floorplan/utils/formatPosition.d.ts +1 -1
- package/dist/index.d.ts +15 -24
- package/dist/index.es.js +10694 -7145
- package/dist/index.js +10432 -6869
- package/dist/index.umd.js +10435 -6875
- package/dist/shared-utils/five/changeMode.d.ts +4 -1
- package/dist/shared-utils/getPxmm.d.ts +8 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/math/Interval.d.ts +13 -0
- package/dist/shared-utils/math/Rectangle.d.ts +27 -0
- package/dist/shared-utils/math/index.d.ts +2 -0
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/dist/shared-utils/three/getNormal.d.ts +1 -1
- package/dist/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/dist/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
- package/dist/shared-utils/uuid.d.ts +1 -0
- package/dist/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Magnifier.html +9 -0
- package/docs/classes/ModelRoomLabelController.html +5 -8
- package/docs/enums/CameraMovementEffect.html +3 -0
- package/docs/enums/DIRECTION.html +1 -0
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/Rotation.html +3 -0
- package/docs/index.html +78 -33
- package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
- package/docs/interfaces/FloorplanBounding.html +10 -0
- package/docs/interfaces/FloorplanData.html +3 -0
- package/docs/interfaces/FloorplanEntrance.html +15 -0
- package/docs/interfaces/FloorplanExtraObject.html +7 -0
- package/docs/interfaces/FloorplanExtraObject3D.html +3 -0
- package/docs/interfaces/FloorplanFloorData.html +3 -0
- package/docs/interfaces/FloorplanImagePosition.html +3 -0
- package/docs/interfaces/FloorplanObserver.html +5 -0
- package/docs/interfaces/FloorplanOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanPosition.html +3 -0
- package/docs/interfaces/FloorplanRoomItem.html +17 -0
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -0
- package/docs/interfaces/FloorplanServerBounding.html +10 -0
- package/docs/interfaces/FloorplanServerComputedData.html +1 -0
- package/docs/interfaces/FloorplanServerData.html +3 -0
- package/docs/interfaces/FloorplanServerEntrance.html +15 -0
- package/docs/interfaces/FloorplanServerFloorData.html +3 -0
- package/docs/interfaces/FloorplanServerImagePosition.html +3 -0
- package/docs/interfaces/FloorplanServerObserver.html +5 -0
- package/docs/interfaces/FloorplanServerOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanServerPosition.html +3 -0
- package/docs/interfaces/FloorplanServerRoomItem.html +20 -0
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -0
- package/docs/interfaces/ItemLabelPluginData.html +1 -0
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
- package/docs/interfaces/ModelViewPluginExportType.html +1 -0
- package/docs/interfaces/OpenParameter.html +3 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
- package/docs/interfaces/PanoMeasureParameterType.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
- package/docs/interfaces/Point.html +1 -0
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -0
- package/docs/interfaces/RoomInfo.html +1 -0
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -0
- package/docs/interfaces/Rooms.html +1 -0
- package/docs/modules.html +26 -18
- package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
- package/libs/CSS3DRenderPlugin/index.js +2 -180
- package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
- package/libs/CameraMovementPlugin/index.d.ts +4 -6
- package/libs/CameraMovementPlugin/index.js +3 -158
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +577 -0
- package/libs/ItemLabelPlugin/ItemLabelItem.js +227 -0
- package/libs/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/libs/ItemLabelPlugin/Plugin.js +120 -0
- package/libs/ItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ItemLabelPlugin/events.type.js +1 -0
- package/libs/ItemLabelPlugin/index.d.ts +9 -0
- package/libs/ItemLabelPlugin/index.js +8 -0
- package/libs/ItemLabelPlugin/typings.d.ts +59 -0
- package/libs/ItemLabelPlugin/typings.js +7 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.js +3 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.js +16 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.js +13 -0
- package/libs/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +4 -0
- package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/libs/ModelChassisCompassPlugin/Plugin.js +77 -0
- package/libs/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/libs/ModelChassisCompassPlugin/index.js +2 -74
- package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +140 -0
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/libs/ModelEntryDoorGuidePlugin/index.js +2 -136
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +409 -0
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
- package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/index.js +8 -0
- package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/libs/ModelItemLabelPlugin/typings.js +7 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ModelRoomLabelPlugin/Controller.js +65 -23
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +83 -45
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelSimulationPlugin/index.d.ts +33 -0
- package/libs/ModelSimulationPlugin/index.js +166 -0
- package/libs/ModelSimulationPlugin/shaders/fragment.d.ts +2 -0
- package/libs/ModelSimulationPlugin/shaders/fragment.js +96 -0
- package/libs/ModelSimulationPlugin/shaders/vertex.d.ts +2 -0
- package/libs/ModelSimulationPlugin/shaders/vertex.js +23 -0
- package/libs/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/libs/ModelTVVideoPlugin/Plugin.js +254 -0
- package/libs/ModelTVVideoPlugin/index.d.ts +5 -0
- package/libs/ModelTVVideoPlugin/index.js +4 -0
- package/libs/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/libs/ModelTVVideoPlugin/typings.js +8 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.js +13 -0
- package/libs/ModelViewPlugin/Plugin.d.ts +17 -0
- package/libs/ModelViewPlugin/Plugin.js +160 -0
- package/libs/ModelViewPlugin/index.d.ts +3 -16
- package/libs/ModelViewPlugin/index.js +2 -159
- package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/libs/PanoCompassPlugin/Plugin.js +249 -0
- package/libs/PanoCompassPlugin/index.d.ts +4 -47
- package/libs/PanoCompassPlugin/index.js +3 -167
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +12 -9
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +77 -14
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +268 -155
- package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +337 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +40 -20
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +246 -153
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +18 -9
- package/libs/PanoMeasurePlugin/Controller/index.js +182 -54
- package/libs/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/index.js +30 -5
- package/libs/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/libs/PanoMeasurePlugin/Model/line.js +61 -11
- package/libs/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/point.js +24 -4
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Model/polyline.js +20 -3
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +11 -14
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +5 -2
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +107 -25
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +23 -8
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +61 -26
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +50 -15
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +234 -59
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +84 -38
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.js +98 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +52 -17
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +5 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +84 -34
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +80 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +11 -1
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +64 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +265 -0
- package/libs/PanoMeasurePlugin/index.d.ts +9 -6
- package/libs/PanoMeasurePlugin/index.js +3 -1
- package/libs/PanoMeasurePlugin/typings/data.d.ts +4 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +14 -5
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +15 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/constants.js +7 -7
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +22 -16
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.js +8 -7
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +5 -5
- package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/libs/PanoRulerPlugin/Plugin.js +403 -0
- package/libs/PanoRulerPlugin/index.d.ts +4 -30
- package/libs/PanoRulerPlugin/index.js +2 -397
- package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
- package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
- package/libs/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +426 -0
- package/libs/PanoSpatialTagPlugin/index.d.ts +5 -0
- package/libs/PanoSpatialTagPlugin/index.js +5 -0
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/store.js +2 -0
- package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/style.js +8 -0
- package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/libs/PanoSpatialTagPlugin/typings.js +1 -0
- package/libs/base/BasePlugin.d.ts +100 -0
- package/libs/base/BasePlugin.js +31 -0
- package/libs/base/BasePluginWithData.d.ts +34 -0
- package/libs/base/BasePluginWithData.js +4 -0
- package/libs/components/PaintBrush/Controller.d.ts +43 -0
- package/libs/components/PaintBrush/Controller.js +575 -0
- package/libs/components/PaintBrush/Subscribe.d.ts +76 -0
- package/libs/components/PaintBrush/Subscribe.js +121 -0
- package/libs/components/PaintBrush/index.d.ts +27 -0
- package/libs/components/PaintBrush/index.js +57 -0
- package/libs/components/PaintBrush/style.d.ts +2 -0
- package/libs/components/PaintBrush/style.js +102 -0
- package/libs/components/PaintBrush/tween.d.ts +62 -0
- package/libs/components/PaintBrush/tween.js +15 -0
- package/libs/components/PaintBrush/typings.d.ts +58 -0
- package/libs/components/PaintBrush/typings.js +6 -0
- package/libs/components/PaintBrush/utils.d.ts +26 -0
- package/libs/components/PaintBrush/utils.js +51 -0
- package/libs/components/index.d.ts +2 -0
- package/libs/components/index.js +3 -0
- package/libs/floorplan/Assets/compass.d.ts +1 -0
- package/libs/floorplan/Assets/compass.js +1 -0
- package/libs/floorplan/Components/BaseImage.js +10 -5
- package/libs/floorplan/Components/Camera.js +120 -0
- package/libs/floorplan/Components/Compass.js +120 -0
- package/libs/floorplan/Components/CurrentFloor.js +469 -0
- package/libs/floorplan/Components/Main.js +470 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +45 -8
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +30 -103
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +322 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +309 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +30 -27
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +11 -9
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +70 -77
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +661 -325
- package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
- package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/libs/floorplan/ModelFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +49 -33
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +3 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +114 -53
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +194 -42
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +1 -0
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +53 -47
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +450 -154
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +6 -4
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +2 -2
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/index.d.ts +6 -0
- package/libs/floorplan/index.js +7 -0
- package/libs/floorplan/utils/constant.d.ts +22 -0
- package/libs/floorplan/utils/constant.js +23 -0
- package/libs/floorplan/utils/correctFiveState.d.ts +15 -0
- package/libs/floorplan/utils/correctFiveState.js +46 -0
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +3 -3
- package/libs/index.d.ts +15 -24
- package/libs/index.js +25 -14
- package/libs/shared-utils/Subscribe.js +8 -1
- package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
- package/libs/shared-utils/createCanvasTextTexture.js +6 -5
- package/libs/shared-utils/five/changeMode.d.ts +4 -1
- package/libs/shared-utils/five/changeMode.js +34 -13
- package/libs/shared-utils/getPxmm.d.ts +8 -0
- package/libs/shared-utils/getPxmm.js +25 -20
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +1 -0
- package/libs/shared-utils/math/Interval.d.ts +13 -0
- package/libs/shared-utils/math/Interval.js +40 -0
- package/libs/shared-utils/math/Rectangle.d.ts +27 -0
- package/libs/shared-utils/math/Rectangle.js +50 -0
- package/libs/shared-utils/math/evenNumber.js +1 -1
- package/libs/shared-utils/math/index.d.ts +2 -0
- package/libs/shared-utils/math/index.js +2 -0
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
- package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
- package/libs/shared-utils/tinyEJSrender.js +210 -0
- package/libs/shared-utils/uuid.d.ts +1 -0
- package/libs/shared-utils/uuid.js +1 -0
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +13 -6
- package/CHANGELOG.md +0 -30
- package/dist/shared-utils/five/useFivePlugin.d.ts +0 -1
- package/dist/shared-utils/useDebounce.d.ts +0 -8
- package/dist/shared-utils/useThrottle.d.ts +0 -8
- package/docs/enums/ModelFloorplanErrorType.html +0 -1
- package/docs/interfaces/ModelFloorplanParameterType.html +0 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +0 -5
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +0 -1
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import Line from '../../Model/line';
|
|
2
|
-
import { Five } from '@realsee/five';
|
|
1
|
+
import type Line from '../../Model/line';
|
|
2
|
+
import type { Five } from '@realsee/five';
|
|
3
3
|
export default class DeleteDom {
|
|
4
4
|
visible: boolean;
|
|
5
5
|
private five;
|
|
6
6
|
private lines;
|
|
7
7
|
private points;
|
|
8
8
|
private onClick;
|
|
9
|
+
private cancelDelete;
|
|
9
10
|
private content;
|
|
10
11
|
private container;
|
|
12
|
+
private masking;
|
|
11
13
|
constructor(five: Five, opts?: {
|
|
12
14
|
onClick?: (e: MouseEvent) => void;
|
|
15
|
+
cancelDelete?: (e: MouseEvent) => void;
|
|
13
16
|
});
|
|
14
17
|
dispose(): void;
|
|
15
18
|
appendTo(element: Element): this;
|
|
@@ -2,36 +2,102 @@ import deleteSvg from './_Assets/delete.svg';
|
|
|
2
2
|
import deleteBg from './_Assets/delete_bg.png';
|
|
3
3
|
import deleteHoverBg from './_Assets/delete_hover_bg.png';
|
|
4
4
|
export default class DeleteDom {
|
|
5
|
-
visible = false;
|
|
6
|
-
five;
|
|
7
|
-
lines = [];
|
|
8
|
-
points = [];
|
|
9
|
-
onClick;
|
|
10
|
-
content = document.createElement('div');
|
|
11
|
-
container = document.createElement('div');
|
|
12
5
|
constructor(five, opts) {
|
|
6
|
+
Object.defineProperty(this, "visible", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: false
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(this, "five", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: void 0
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(this, "lines", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: []
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(this, "points", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: []
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(this, "onClick", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: void 0
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(this, "cancelDelete", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: void 0
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(this, "content", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
value: document.createElement('div')
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(this, "container", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: true,
|
|
51
|
+
writable: true,
|
|
52
|
+
value: document.createElement('div')
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(this, "masking", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
configurable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
value: document.createElement('div')
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(this, "onMouseEnter", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
configurable: true,
|
|
63
|
+
writable: true,
|
|
64
|
+
value: () => {
|
|
65
|
+
this.content.style.backgroundImage = `url(${deleteHoverBg})`;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(this, "onMouseLeave", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
configurable: true,
|
|
71
|
+
writable: true,
|
|
72
|
+
value: () => {
|
|
73
|
+
this.content.style.backgroundImage = `url(${deleteBg})`;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
13
76
|
this.five = five;
|
|
14
|
-
this.onClick = opts
|
|
77
|
+
this.onClick = (opts === null || opts === void 0 ? void 0 : opts.onClick) || (() => void 0);
|
|
78
|
+
this.cancelDelete = (opts === null || opts === void 0 ? void 0 : opts.cancelDelete) || (() => void 0);
|
|
15
79
|
// container
|
|
16
80
|
this.container.classList.add('fpm__delete');
|
|
17
81
|
this.container.style.opacity = '0';
|
|
18
82
|
this.container.style.position = 'absolute';
|
|
19
83
|
this.container.style.left = '0';
|
|
20
|
-
this.container.style.top = '
|
|
84
|
+
this.container.style.top = '10px';
|
|
21
85
|
this.container.style.transform = `translate3d(0, 0, 10px)`;
|
|
22
86
|
this.container.style.pointerEvents = `none`;
|
|
87
|
+
this.container.style.transition = 'top 200ms ease, opacity 200ms ease';
|
|
88
|
+
this.container.style.zIndex = '99';
|
|
23
89
|
// content
|
|
24
90
|
this.content.classList.add('fpm__delete-content');
|
|
25
|
-
this.content.style.width = '
|
|
26
|
-
this.content.style.height = '
|
|
91
|
+
this.content.style.width = '62px';
|
|
92
|
+
this.content.style.height = '26px';
|
|
27
93
|
this.content.style.display = 'flex';
|
|
28
94
|
this.content.style.alignItems = 'center';
|
|
29
95
|
this.content.style.justifyContent = 'center';
|
|
30
96
|
this.content.style.transform = 'translate(-50%, -50%)';
|
|
31
97
|
this.content.style.color = '#fff';
|
|
32
|
-
this.content.style.fontSize = '
|
|
33
|
-
this.content.style.lineHeight = '
|
|
34
|
-
this.content.style.borderRadius = '
|
|
98
|
+
this.content.style.fontSize = '12px';
|
|
99
|
+
this.content.style.lineHeight = '17px';
|
|
100
|
+
this.content.style.borderRadius = '11px';
|
|
35
101
|
this.content.style.backgroundSize = '100% 100%';
|
|
36
102
|
this.content.style.cursor = 'pointer';
|
|
37
103
|
this.content.style.userSelect = 'none';
|
|
@@ -43,22 +109,30 @@ export default class DeleteDom {
|
|
|
43
109
|
this.container.append(this.content);
|
|
44
110
|
const deleteSvgDom = this.content.querySelector('.fpm__delete-icon');
|
|
45
111
|
if (deleteSvgDom) {
|
|
46
|
-
deleteSvgDom.style.width = '
|
|
47
|
-
deleteSvgDom.style.height = '
|
|
48
|
-
deleteSvgDom.style.marginRight = '
|
|
112
|
+
deleteSvgDom.style.width = '16px';
|
|
113
|
+
deleteSvgDom.style.height = '17px';
|
|
114
|
+
deleteSvgDom.style.marginRight = '1px';
|
|
49
115
|
}
|
|
50
116
|
this.content.addEventListener('click', this.onClick);
|
|
51
117
|
this.content.addEventListener('mouseenter', this.onMouseEnter);
|
|
52
118
|
this.content.addEventListener('mouseleave', this.onMouseLeave);
|
|
119
|
+
// masking
|
|
120
|
+
this.masking.setAttribute('style', 'position: absolute;top: 0;left: 0;bottom: 0;right: 0;pointer-events: none;');
|
|
121
|
+
this.masking.addEventListener('click', this.cancelDelete);
|
|
122
|
+
this.masking.addEventListener('touchstart', this.cancelDelete);
|
|
53
123
|
}
|
|
54
124
|
dispose() {
|
|
55
125
|
this.content.removeEventListener('click', this.onClick);
|
|
56
126
|
this.content.removeEventListener('mouseenter', this.onMouseEnter);
|
|
57
127
|
this.content.removeEventListener('mouseleave', this.onMouseLeave);
|
|
58
128
|
this.container.remove();
|
|
129
|
+
this.masking.removeEventListener('click', this.cancelDelete);
|
|
130
|
+
this.masking.removeEventListener('touchstart', this.cancelDelete);
|
|
131
|
+
this.masking.remove();
|
|
59
132
|
}
|
|
60
133
|
appendTo(element) {
|
|
61
134
|
element.append(this.container);
|
|
135
|
+
element.append(this.masking);
|
|
62
136
|
return this;
|
|
63
137
|
}
|
|
64
138
|
setLines(lines) {
|
|
@@ -82,27 +156,35 @@ export default class DeleteDom {
|
|
|
82
156
|
return this;
|
|
83
157
|
const centerScreenX = ((centerX + 1) / 2) * wrapper.clientWidth;
|
|
84
158
|
const maxScreenY = (-(maxY - 1) / 2) * wrapper.clientHeight;
|
|
85
|
-
|
|
86
|
-
|
|
159
|
+
let x = centerScreenX;
|
|
160
|
+
let y = maxScreenY - 34;
|
|
161
|
+
// 只有一条线时且斜率大时删除按钮位于右侧
|
|
162
|
+
if (this.lines.length === 1 && points.length === 2) {
|
|
163
|
+
const k = (yArray[1] - yArray[0]) / (xArray[1] - xArray[0]);
|
|
164
|
+
const centerY = (yArray[1] + yArray[0]) / 2;
|
|
165
|
+
const centerScreenY = (-(centerY - 1) / 2) * wrapper.clientHeight;
|
|
166
|
+
if (Math.abs(k) > 0.4) {
|
|
167
|
+
x = centerScreenX + 57;
|
|
168
|
+
y = centerScreenY;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
87
171
|
this.container.style.transform = `translate3d(${x}px, ${y}px, 10px)`;
|
|
88
172
|
return this.show();
|
|
89
173
|
}
|
|
90
174
|
hide() {
|
|
91
175
|
this.visible = false;
|
|
176
|
+
this.masking.style.pointerEvents = 'none';
|
|
92
177
|
this.container.style.opacity = '0';
|
|
178
|
+
this.container.style.top = '10px';
|
|
93
179
|
this.container.style.pointerEvents = 'none';
|
|
94
180
|
return this;
|
|
95
181
|
}
|
|
96
182
|
show() {
|
|
97
183
|
this.visible = true;
|
|
184
|
+
this.masking.style.pointerEvents = 'auto';
|
|
98
185
|
this.container.style.opacity = '1';
|
|
186
|
+
this.container.style.top = '0';
|
|
99
187
|
this.container.style.pointerEvents = 'auto';
|
|
100
188
|
return this;
|
|
101
189
|
}
|
|
102
|
-
onMouseEnter = () => {
|
|
103
|
-
this.content.style.backgroundImage = `url(${deleteHoverBg})`;
|
|
104
|
-
};
|
|
105
|
-
onMouseLeave = () => {
|
|
106
|
-
this.content.style.backgroundImage = `url(${deleteBg})`;
|
|
107
|
-
};
|
|
108
190
|
}
|
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
import { Vector3 } from 'three';
|
|
2
2
|
export default class FiveHelper {
|
|
3
|
-
edges = [];
|
|
4
|
-
five;
|
|
5
3
|
constructor(five) {
|
|
4
|
+
Object.defineProperty(this, "edges", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true,
|
|
8
|
+
value: []
|
|
9
|
+
});
|
|
10
|
+
Object.defineProperty(this, "five", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: void 0
|
|
15
|
+
});
|
|
16
|
+
/** 模型加载后获取折线 */
|
|
17
|
+
Object.defineProperty(this, "onModelLoaded", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: () => {
|
|
22
|
+
if (!this.five.model)
|
|
23
|
+
return;
|
|
24
|
+
this.edges = this.five.model.getEdges();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
6
27
|
this.five = five;
|
|
7
28
|
this.five.model.loaded ? this.onModelLoaded() : this.five.on('modelLoaded', this.onModelLoaded);
|
|
8
29
|
}
|
|
@@ -24,10 +45,4 @@ export default class FiveHelper {
|
|
|
24
45
|
return null;
|
|
25
46
|
return closestPoint || null;
|
|
26
47
|
}
|
|
27
|
-
/** 模型加载后获取折线 */
|
|
28
|
-
onModelLoaded = () => {
|
|
29
|
-
if (!this.five.model)
|
|
30
|
-
return;
|
|
31
|
-
this.edges = this.five.model.getEdges();
|
|
32
|
-
};
|
|
33
48
|
}
|
|
@@ -1,9 +1,66 @@
|
|
|
1
1
|
export class GuideController {
|
|
2
|
-
measureController;
|
|
3
|
-
textDom = document.createElement('span');
|
|
4
|
-
container = document.createElement('div');
|
|
5
|
-
hasAnchor = false;
|
|
6
2
|
constructor(measureController, params) {
|
|
3
|
+
Object.defineProperty(this, "measureController", {
|
|
4
|
+
enumerable: true,
|
|
5
|
+
configurable: true,
|
|
6
|
+
writable: true,
|
|
7
|
+
value: void 0
|
|
8
|
+
});
|
|
9
|
+
Object.defineProperty(this, "textDom", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: document.createElement('span')
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(this, "container", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true,
|
|
19
|
+
value: document.createElement('div')
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(this, "hasAnchor", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: false
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(this, "onModelChange", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: (mode) => {
|
|
32
|
+
if (mode === 'Watch') {
|
|
33
|
+
this.textDom.innerText = ``;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this.textDom.innerText = `请选择第一个测量点,Esc或单击鼠标右键可取消选择`;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(this, "anchorChange", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true,
|
|
43
|
+
value: (anchor) => {
|
|
44
|
+
if (!this.hasAnchor && !!anchor) {
|
|
45
|
+
this.hasAnchor = true;
|
|
46
|
+
this.textDom.innerText = `选择下一个测量点,Esc或单击鼠标右键取消选择`;
|
|
47
|
+
}
|
|
48
|
+
else if (!anchor) {
|
|
49
|
+
this.hasAnchor = false;
|
|
50
|
+
this.textDom.innerText = `请选择第一个测量点,Esc或单击鼠标右键可取消选择`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(this, "onEditedLineChange", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
configurable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
value: (lines) => {
|
|
59
|
+
if (lines.length === 1) {
|
|
60
|
+
this.textDom.innerText = `可以连续选择测量点,或点击下方“完成”结束测量(Esc取消,Command+S保存)`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
7
64
|
this.initDom();
|
|
8
65
|
params.container.append(this.container);
|
|
9
66
|
this.measureController = measureController;
|
|
@@ -50,26 +107,4 @@ export class GuideController {
|
|
|
50
107
|
textDom.innerText = `点击下方“添加”开始测距`;
|
|
51
108
|
container.appendChild(textDom);
|
|
52
109
|
}
|
|
53
|
-
onModelChange = (mode) => {
|
|
54
|
-
if (mode === 'Watch') {
|
|
55
|
-
this.textDom.innerText = ``;
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
this.textDom.innerText = `请选择第一个测量点,Esc或单击鼠标右键可取消选择`;
|
|
59
|
-
};
|
|
60
|
-
anchorChange = (anchor) => {
|
|
61
|
-
if (!this.hasAnchor && !!anchor) {
|
|
62
|
-
this.hasAnchor = true;
|
|
63
|
-
this.textDom.innerText = `选择下一个测量点,Esc或单击鼠标右键取消选择`;
|
|
64
|
-
}
|
|
65
|
-
else if (!anchor) {
|
|
66
|
-
this.hasAnchor = false;
|
|
67
|
-
this.textDom.innerText = `请选择第一个测量点,Esc或单击鼠标右键可取消选择`;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
onEditedLineChange = (lines) => {
|
|
71
|
-
if (lines.length === 1) {
|
|
72
|
-
this.textDom.innerText = `可以连续选择测量点,或点击下方“完成”结束测量(Esc取消,Command+S保存)`;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
110
|
}
|
|
@@ -1,24 +1,59 @@
|
|
|
1
|
-
import { Five } from '@realsee/five';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import type { Five } from '@realsee/five';
|
|
2
|
+
import Hammer from 'hammerjs';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
import { Subscribe, SubscribeEventMap } from '@realsee/five';
|
|
5
|
+
interface MagnifierEvent extends SubscribeEventMap {
|
|
6
|
+
wantsPanGesture: (data: {
|
|
7
|
+
deltaX: number;
|
|
8
|
+
deltaY: number;
|
|
9
|
+
srcEvent: typeof Hammer['Input'];
|
|
10
|
+
}) => boolean;
|
|
11
|
+
}
|
|
12
|
+
/** 放大镜配置参数 */
|
|
13
|
+
export interface MagnifierParameter {
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
scale?: number;
|
|
17
|
+
/** 允许拖动放大镜 */
|
|
18
|
+
dragEnabled?: boolean;
|
|
19
|
+
/** renderWithPoint 时,是否应该自动更新放大镜的位置 */
|
|
20
|
+
autoFixPCPosition?: boolean;
|
|
21
|
+
/** 放大镜初始位置应该设置在容器的哪个位置 */
|
|
22
|
+
initialPosition?: {
|
|
23
|
+
left: string;
|
|
24
|
+
top: string;
|
|
25
|
+
};
|
|
7
26
|
}
|
|
8
27
|
export default class Magnifier {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
visible: boolean;
|
|
31
|
+
hooks: Subscribe<MagnifierEvent>;
|
|
32
|
+
contentDom: HTMLCanvasElement;
|
|
9
33
|
private five;
|
|
10
34
|
private scale;
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private originWidth;
|
|
15
|
-
private originHeight;
|
|
16
|
-
private context;
|
|
35
|
+
private wrapper?;
|
|
36
|
+
private config;
|
|
37
|
+
private offset;
|
|
17
38
|
private canvas;
|
|
18
|
-
private
|
|
19
|
-
|
|
39
|
+
private context;
|
|
40
|
+
private renderCenter;
|
|
41
|
+
private lastPanEvent?;
|
|
42
|
+
private hammer?;
|
|
43
|
+
constructor(five: Five, options: MagnifierParameter);
|
|
20
44
|
dispose(): void;
|
|
45
|
+
/** 移除放大镜 DOM */
|
|
46
|
+
remove(): void;
|
|
47
|
+
/** 清除放大镜渲染内容 */
|
|
21
48
|
clear(): void;
|
|
49
|
+
/** 把放大镜放到某一个容器中 */
|
|
22
50
|
appendTo(element: Element): void;
|
|
23
|
-
|
|
51
|
+
/** 放大传入点位周围的内容 */
|
|
52
|
+
renderWithPoint(point: THREE.Vector3): void;
|
|
53
|
+
private autoFixPCPosition;
|
|
54
|
+
private render;
|
|
55
|
+
private initStyle;
|
|
56
|
+
private onPan;
|
|
57
|
+
private onPanEnd;
|
|
24
58
|
}
|
|
59
|
+
export {};
|