@realsee/dnalogel 2.0.0-alpha.3 → 2.0.0-alpha.31-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +108 -0
- package/README.md +93 -4
- package/TERMS.txt +56 -0
- package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +4 -0
- package/dist/CSS3DRenderPlugin/index.js +234 -0
- package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +5 -0
- package/dist/CameraMovementPlugin/index.js +302 -0
- package/dist/CameraMovementPlugin/typing.d.ts +68 -0
- 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 +4 -0
- package/dist/ModelChassisCompassPlugin/index.js +143 -0
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +4 -0
- package/dist/ModelEntryDoorGuidePlugin/index.js +196 -0
- 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/Assets/roomLabelBg.d.ts +1 -0
- package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/dist/ModelRoomLabelPlugin/index.js +541 -0
- package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- 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 +4 -0
- package/dist/ModelViewPlugin/index.js +187 -0
- package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.js +636 -0
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
- package/dist/PanoCursorRaycasterPlugin/index.js +90 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +70 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +19 -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 +10 -0
- package/dist/PanoMeasurePlugin/index.js +3996 -0
- package/dist/PanoMeasurePlugin/typings/data.d.ts +32 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
- package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.d.ts +5 -0
- package/dist/PanoRulerPlugin/index.js +609 -0
- package/dist/PanoRulerPlugin/style.d.ts +2 -0
- package/dist/PanoRulerPlugin/typings.d.ts +21 -0
- package/dist/PanoSpatialTagPlugin/Plugin.d.ts +33 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +5 -0
- package/dist/PanoSpatialTagPlugin/index.js +1296 -0
- package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/dist/floorplan/Assets/camera.d.ts +1 -0
- package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/Assets/compass.d.ts +0 -0
- package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +105 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.js +4034 -0
- package/dist/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +27 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +1648 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +75 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +3646 -0
- package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/dist/floorplan/constant.d.ts +5 -0
- package/dist/floorplan/index.d.ts +6 -0
- package/dist/floorplan/typings/floorplanData.d.ts +137 -0
- package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
- package/dist/floorplan/typings/utility.d.ts +2 -0
- package/dist/floorplan/utils/formatData.d.ts +5 -0
- package/dist/floorplan/utils/formatPosition.d.ts +36 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.es.js +14631 -0
- package/dist/index.js +14683 -0
- package/dist/index.umd.js +14675 -0
- package/dist/shared-utils/Preloader.d.ts +6 -0
- package/dist/shared-utils/Subscribe.d.ts +45 -0
- package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
- package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
- package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
- package/dist/shared-utils/animationFrame/index.d.ts +15 -0
- package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
- package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
- package/dist/shared-utils/createLine/index.d.ts +3 -0
- package/dist/shared-utils/debounce.d.ts +6 -0
- package/dist/shared-utils/equal.d.ts +11 -0
- package/dist/shared-utils/filter.d.ts +27 -0
- package/dist/shared-utils/five/changeMode.d.ts +2 -0
- package/dist/shared-utils/formatRad.d.ts +7 -0
- package/dist/shared-utils/getPxmm.d.ts +11 -0
- package/dist/shared-utils/getRandomColor.d.ts +1 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/isNil.d.ts +10 -0
- package/dist/shared-utils/isTruelyObject.d.ts +18 -0
- package/dist/shared-utils/math/Interval.d.ts +13 -0
- package/dist/shared-utils/math/Rectangle.d.ts +27 -0
- package/dist/shared-utils/math/evenNumber.d.ts +3 -0
- package/dist/shared-utils/math/index.d.ts +2 -0
- package/dist/shared-utils/math/planimetry.d.ts +116 -0
- package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
- package/dist/shared-utils/nearlyEqual.d.ts +7 -0
- package/dist/shared-utils/nextFrame.d.ts +1 -0
- package/dist/shared-utils/noop.d.ts +5 -0
- package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
- package/dist/shared-utils/px2rem.d.ts +1 -0
- package/dist/shared-utils/removeArrayItem.d.ts +7 -0
- package/dist/shared-utils/tap.d.ts +8 -0
- package/dist/shared-utils/three/centerPoint.d.ts +2 -0
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/dist/shared-utils/three/getNormal.d.ts +2 -0
- package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/dist/shared-utils/three/loadFbxObj.d.ts +2 -0
- package/dist/shared-utils/three/loadTexture.d.ts +2 -0
- package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
- package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
- package/dist/shared-utils/throttle.d.ts +7 -0
- package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
- package/dist/shared-utils/to.d.ts +8 -0
- package/dist/shared-utils/uuid.d.ts +4 -0
- package/dist/shared-utils/vectorTocoordinates.d.ts +7 -0
- package/dist/typings/math.type.d.ts +44 -0
- package/dist/typings/utils.type.d.ts +2 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +78 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1413 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/Magnifier.html +9 -0
- package/docs/classes/ModelRoomLabelController.html +17 -0
- package/docs/classes/PanoFloorplanRadarPluginController.html +3 -0
- 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 -0
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/ModelFloorplanErrorType.html +1 -0
- package/docs/enums/Rotation.html +3 -0
- package/docs/index.html +88 -0
- 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 -0
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
- package/docs/interfaces/ModelFloorplanParameterType.html +1 -0
- package/docs/interfaces/ModelFloorplanViewEvent.html +5 -0
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
- package/docs/interfaces/ModelViewPluginExportType.html +1 -0
- package/docs/interfaces/OpenParameter.html +3 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -0
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
- package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +1 -0
- package/docs/interfaces/PanoMeasureParameterType.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
- package/docs/interfaces/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 -0
- package/docs/interfaces/Room.html +1 -0
- package/docs/interfaces/RoomInfo.html +1 -0
- package/docs/interfaces/RoomLabel.html +13 -0
- package/docs/interfaces/RoomRules.html +1 -0
- package/docs/interfaces/Rooms.html +1 -0
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +19 -0
- package/docs/modules.html +44 -0
- 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 +75 -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 -135
- 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 +67 -25
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +291 -0
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- 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/Assets/roomInfoIcon.d.ts +1 -0
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
- package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/libs/PanoCompassPlugin/Plugin.js +249 -0
- package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
- package/libs/PanoCompassPlugin/index.d.ts +7 -24
- package/libs/PanoCompassPlugin/index.js +6 -88
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +132 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.js +329 -0
- package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +337 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +64 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +316 -0
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +70 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +304 -0
- package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/libs/PanoMeasurePlugin/Model/index.js +139 -0
- package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/libs/PanoMeasurePlugin/Model/line.js +114 -0
- package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/point.js +48 -0
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/polyline.js +65 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +12 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +190 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +48 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +110 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +278 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +117 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +148 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.js +98 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +70 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +119 -0
- 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 +19 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +88 -0
- 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 +10 -0
- package/libs/PanoMeasurePlugin/index.js +7 -0
- package/libs/PanoMeasurePlugin/typings/data.d.ts +32 -0
- package/libs/PanoMeasurePlugin/typings/data.js +1 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
- package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
- package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +15 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +120 -0
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
- package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
- package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/libs/PanoMeasurePlugin/utils/line.js +33 -0
- package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/libs/PanoMeasurePlugin/utils/math.js +44 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +21 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
- package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/libs/PanoRulerPlugin/Plugin.js +402 -0
- package/libs/PanoRulerPlugin/index.d.ts +5 -0
- package/libs/PanoRulerPlugin/index.js +3 -0
- package/libs/PanoRulerPlugin/style.d.ts +2 -0
- package/libs/PanoRulerPlugin/style.js +88 -0
- package/libs/PanoRulerPlugin/typings.d.ts +21 -0
- package/libs/PanoRulerPlugin/typings.js +1 -0
- package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
- package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
- package/libs/PanoSpatialTagPlugin/Plugin.d.ts +33 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +415 -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/floorplan/Assets/compass.d.ts +1 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
- package/libs/floorplan/Components/BaseImage.js +222 -0
- package/libs/floorplan/Components/Camera.js +120 -0
- package/libs/floorplan/Components/Compass.js +119 -0
- package/libs/floorplan/Components/CurrentFloor.js +456 -0
- package/libs/floorplan/Components/Main.js +464 -0
- package/libs/floorplan/Components/Normalmage.js +63 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +68 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +199 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +173 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +265 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +331 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +103 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +140 -0
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
- package/libs/floorplan/Components/SvgImage.js +83 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +4 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +455 -279
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +168 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +250 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +312 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +1 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +83 -41
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +30 -14
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +269 -118
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
- package/libs/floorplan/constant.d.ts +5 -0
- package/libs/floorplan/constant.js +6 -0
- package/libs/floorplan/index.d.ts +6 -0
- package/libs/floorplan/index.js +7 -0
- package/libs/floorplan/typings/floorplanServerData.d.ts +4 -0
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +3 -3
- package/libs/index.d.ts +15 -19
- package/libs/index.js +26 -11
- package/libs/shared-utils/Subscribe.js +8 -1
- package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
- package/libs/shared-utils/createCanvasTextTexture.js +6 -5
- package/libs/shared-utils/getPxmm.d.ts +6 -1
- package/libs/shared-utils/getPxmm.js +26 -12
- package/libs/shared-utils/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/vectorTocoordinates.d.ts +1 -1
- package/package.json +30 -15
- package/dist/dnalogel.cjs.js +0 -2
- package/dist/dnalogel.es.js +0 -37288
- package/dist/dnalogel.umd.js +0 -2
- package/dist/style.css +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
- package/libs/floorplan/Components/BaseImage.svelte +0 -25
- package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
- package/libs/floorplan/Components/Normalmage.svelte +0 -11
- package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
- package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
- package/libs/floorplan/Components/SvgImage.svelte +0 -25
- package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
- package/libs/shared-utils/five/useFivePlugin.d.ts +0 -1
- package/libs/shared-utils/five/useFivePlugin.js +0 -8
- package/libs/shared-utils/useDebounce.d.ts +0 -8
- package/libs/shared-utils/useDebounce.js +0 -22
- package/libs/shared-utils/useThrottle.d.ts +0 -8
- package/libs/shared-utils/useThrottle.js +0 -25
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type Line from '../Model/line';
|
|
2
|
+
import type { Five } from '@realsee/five';
|
|
3
|
+
import type { LineCompletelyJson, PolylineCompletelyJson } from '../typings/data';
|
|
4
|
+
import { Vector3 } from 'three';
|
|
5
|
+
export declare type DistanceItem = ReturnType<typeof creatDistanceItem>;
|
|
6
|
+
export interface UserDistanceItem {
|
|
7
|
+
element: Element;
|
|
8
|
+
highlight: () => void;
|
|
9
|
+
unHighlight: () => void;
|
|
10
|
+
update: (params: {
|
|
11
|
+
line: LineCompletelyJson;
|
|
12
|
+
polyline: PolylineCompletelyJson;
|
|
13
|
+
}) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface IDistanceItemProps {
|
|
16
|
+
line: Line;
|
|
17
|
+
userDistanceItem?: UserDistanceItem;
|
|
18
|
+
clickCallback?: (item: DistanceItem) => unknown;
|
|
19
|
+
}
|
|
20
|
+
export declare function creatDistanceItem(props: IDistanceItemProps): {
|
|
21
|
+
lineID: string;
|
|
22
|
+
ndcPosition: Vector3;
|
|
23
|
+
update: (five: Five) => void;
|
|
24
|
+
appendTo: (container: Element) => void;
|
|
25
|
+
remove: () => void;
|
|
26
|
+
highlight: () => void;
|
|
27
|
+
unHighlight: () => void;
|
|
28
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Vector2, Vector3 } from 'three';
|
|
2
|
+
import isNDCPointInScreen from './isNDCPointInScreen';
|
|
3
|
+
function creatContentDom() {
|
|
4
|
+
const contentDom = document.createElement('div');
|
|
5
|
+
contentDom.setAttribute('style', `backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);`);
|
|
6
|
+
contentDom.style.padding = '3px 6px';
|
|
7
|
+
contentDom.style.lineHeight = '1';
|
|
8
|
+
contentDom.style.textAlign = 'center';
|
|
9
|
+
contentDom.style.transform = 'translate(-50%, -50%)';
|
|
10
|
+
contentDom.style.borderRadius = '100px';
|
|
11
|
+
contentDom.style.fontSize = '14px';
|
|
12
|
+
contentDom.style.color = '#fff';
|
|
13
|
+
contentDom.style.background = 'rgba(195,195,195,0.70)';
|
|
14
|
+
contentDom.style.border = '0.5px solid rgba(255,255,255,0.6)';
|
|
15
|
+
contentDom.style.pointerEvents = 'all';
|
|
16
|
+
contentDom.style.cursor = 'pointer';
|
|
17
|
+
return contentDom;
|
|
18
|
+
}
|
|
19
|
+
function createContainerDom(line) {
|
|
20
|
+
const containerDom = document.createElement('div');
|
|
21
|
+
containerDom.id = 'distance_' + line.id;
|
|
22
|
+
containerDom.classList.add('five-plugin-measure__distance');
|
|
23
|
+
containerDom.style.opacity = '0';
|
|
24
|
+
containerDom.style.position = 'absolute';
|
|
25
|
+
containerDom.style.left = '0';
|
|
26
|
+
containerDom.style.top = '0';
|
|
27
|
+
containerDom.style.transform = 'translate3d(0, 0, 0)';
|
|
28
|
+
containerDom.style.transformOrigin = 'left top';
|
|
29
|
+
return containerDom;
|
|
30
|
+
}
|
|
31
|
+
export function creatDistanceItem(props) {
|
|
32
|
+
function handleClick() {
|
|
33
|
+
var _a;
|
|
34
|
+
// 线被选中时才高亮,外部手动触发高亮
|
|
35
|
+
// highlight()
|
|
36
|
+
(_a = props.clickCallback) === null || _a === void 0 ? void 0 : _a.call(props, distanceItem);
|
|
37
|
+
}
|
|
38
|
+
function highlight() {
|
|
39
|
+
if (userDistanceItem)
|
|
40
|
+
return userDistanceItem.highlight();
|
|
41
|
+
contentDom.style.border = '0.5px solid #95AEFF';
|
|
42
|
+
contentDom.style.background = 'linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)';
|
|
43
|
+
}
|
|
44
|
+
function unHighlight() {
|
|
45
|
+
if (userDistanceItem)
|
|
46
|
+
return userDistanceItem.unHighlight();
|
|
47
|
+
contentDom.style.border = '0.5px solid rgba(255,255,255,0.6)';
|
|
48
|
+
contentDom.style.background = 'rgba(195,195,195,0.70)';
|
|
49
|
+
}
|
|
50
|
+
function update(five) {
|
|
51
|
+
const fiveElement = five.getElement();
|
|
52
|
+
if (!fiveElement)
|
|
53
|
+
return;
|
|
54
|
+
const screenWidth = fiveElement.clientWidth;
|
|
55
|
+
const screenHeight = fiveElement.clientHeight;
|
|
56
|
+
if (line.points.length < 2)
|
|
57
|
+
return;
|
|
58
|
+
const [startPoint, endPoint] = line.points;
|
|
59
|
+
const ndcStartPosition = startPoint.position.clone().project(five.camera);
|
|
60
|
+
const ndcEndPosition = endPoint.position.clone().project(five.camera);
|
|
61
|
+
const ndcDomPosition = ndcStartPosition.clone().lerp(ndcEndPosition, 0.5);
|
|
62
|
+
const screenStartPosition = new Vector2(ndcStartPosition.x * screenWidth, ndcStartPosition.y * screenHeight);
|
|
63
|
+
const screenEndPosition = new Vector2(ndcEndPosition.x * screenWidth, ndcEndPosition.y * screenHeight);
|
|
64
|
+
const visible = (() => {
|
|
65
|
+
// 对于超过近平面和远平面的点,计算会有问题
|
|
66
|
+
if (Math.abs(ndcStartPosition.z) > 1 || Math.abs(ndcEndPosition.z) > 1)
|
|
67
|
+
return false;
|
|
68
|
+
if (!isNDCPointInScreen(ndcStartPosition) && !isNDCPointInScreen(ndcEndPosition))
|
|
69
|
+
return false;
|
|
70
|
+
if (!isNDCPointInScreen(ndcDomPosition))
|
|
71
|
+
return false;
|
|
72
|
+
if (screenStartPosition.distanceTo(screenEndPosition) < 20)
|
|
73
|
+
return false;
|
|
74
|
+
return true;
|
|
75
|
+
})();
|
|
76
|
+
if (visible === false) {
|
|
77
|
+
containerDom.style.opacity = '0';
|
|
78
|
+
containerDom.style.pointerEvents = 'none';
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
// 更新 UI
|
|
82
|
+
const left = ((ndcDomPosition.x + 1) / 2) * screenWidth;
|
|
83
|
+
const top = (-(ndcDomPosition.y - 1) / 2) * screenHeight;
|
|
84
|
+
const rad = Math.atan((screenStartPosition.y - screenEndPosition.y) / (screenStartPosition.x - screenEndPosition.x));
|
|
85
|
+
const deg = -(rad * 180) / Math.PI;
|
|
86
|
+
containerDom.style.transform = `translate(${left}px, ${top}px) rotate(${deg}deg)`;
|
|
87
|
+
containerDom.style.opacity = '1';
|
|
88
|
+
containerDom.style.pointerEvents = 'all';
|
|
89
|
+
if (userDistanceItem) {
|
|
90
|
+
userDistanceItem.update({ line: line.toCompletelyJson(), polyline: line.getPolyline().toCompletelyJson() });
|
|
91
|
+
}
|
|
92
|
+
const distanceString = startPoint.position.clone().distanceTo(endPoint.position).toFixed(2) + 'm';
|
|
93
|
+
contentDom.innerText !== distanceString && (contentDom.innerText = distanceString);
|
|
94
|
+
}
|
|
95
|
+
function appendTo(container) {
|
|
96
|
+
container.appendChild(containerDom);
|
|
97
|
+
containerDom.addEventListener('click', handleClick);
|
|
98
|
+
}
|
|
99
|
+
function remove() {
|
|
100
|
+
contentDom.removeEventListener('click', handleClick);
|
|
101
|
+
containerDom.remove();
|
|
102
|
+
}
|
|
103
|
+
const { line } = props;
|
|
104
|
+
const lineID = line.id;
|
|
105
|
+
const contentDom = creatContentDom();
|
|
106
|
+
const containerDom = createContainerDom(line);
|
|
107
|
+
const userDistanceItem = props.userDistanceItem;
|
|
108
|
+
const ndcPosition = new Vector3(0, 0, 0);
|
|
109
|
+
const distanceItem = {
|
|
110
|
+
lineID,
|
|
111
|
+
ndcPosition,
|
|
112
|
+
update,
|
|
113
|
+
appendTo,
|
|
114
|
+
remove,
|
|
115
|
+
highlight: highlight,
|
|
116
|
+
unHighlight: unHighlight,
|
|
117
|
+
};
|
|
118
|
+
(userDistanceItem === null || userDistanceItem === void 0 ? void 0 : userDistanceItem.element) ? containerDom.appendChild(userDistanceItem.element) : containerDom.appendChild(contentDom);
|
|
119
|
+
return distanceItem;
|
|
120
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function findAssociatedLines(line) {
|
|
2
|
+
// 找跟这个线段相邻的线
|
|
3
|
+
const mergeNextLine = (point, nextIndex, target) => {
|
|
4
|
+
const nextLine = point.lines.find((line) => {
|
|
5
|
+
const pointIndex = line.points.findIndex(({ id }) => id === point.id);
|
|
6
|
+
if (pointIndex === nextIndex)
|
|
7
|
+
return false;
|
|
8
|
+
return true;
|
|
9
|
+
});
|
|
10
|
+
if (!nextLine)
|
|
11
|
+
return target;
|
|
12
|
+
const nextPoint = nextLine.points[nextIndex];
|
|
13
|
+
if (!nextPoint)
|
|
14
|
+
return target;
|
|
15
|
+
return mergeNextLine(nextPoint, nextIndex, target.concat(nextLine));
|
|
16
|
+
};
|
|
17
|
+
const rightLines = mergeNextLine(line.points[0], 1, []);
|
|
18
|
+
const leftLines = mergeNextLine(line.points[0], 0, []);
|
|
19
|
+
const lines = rightLines.concat(leftLines);
|
|
20
|
+
return lines;
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Vector2 } from 'three';
|
|
2
|
+
import type Point from '../Model/point';
|
|
3
|
+
import type { Five } from '@realsee/five';
|
|
4
|
+
/**
|
|
5
|
+
* @param tapPoint 注意这里的坐标是相对于 FiveElement 的
|
|
6
|
+
*/
|
|
7
|
+
export declare function findClosestPoint(five: Five, points: Point[], tapPoint: Vector2, maxDistance?: number): {
|
|
8
|
+
distance: number;
|
|
9
|
+
point: Point;
|
|
10
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import ndc2Screen from './ndc2Screen';
|
|
2
|
+
import isNDCPointInScreen from './isNDCPointInScreen';
|
|
3
|
+
/**
|
|
4
|
+
* @param tapPoint 注意这里的坐标是相对于 FiveElement 的
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line max-params
|
|
7
|
+
export function findClosestPoint(five, points, tapPoint, maxDistance) {
|
|
8
|
+
const container = five.getElement();
|
|
9
|
+
if (!container)
|
|
10
|
+
return null;
|
|
11
|
+
if (points.length === 0)
|
|
12
|
+
return null;
|
|
13
|
+
const containerSize = { width: container.clientWidth, height: container.clientHeight };
|
|
14
|
+
const ndcPoints = points
|
|
15
|
+
.map((point) => {
|
|
16
|
+
const ndcPosition = point.position.clone().project(five.camera);
|
|
17
|
+
if (!isNDCPointInScreen(ndcPosition))
|
|
18
|
+
return { distance: Infinity, point };
|
|
19
|
+
const screenPosition = ndc2Screen(ndcPosition, containerSize);
|
|
20
|
+
const distance = screenPosition.distanceTo(tapPoint);
|
|
21
|
+
return { distance, point };
|
|
22
|
+
})
|
|
23
|
+
.sort((a, b) => a.distance - b.distance);
|
|
24
|
+
if (typeof maxDistance === 'number' && ndcPoints[0].distance > maxDistance)
|
|
25
|
+
return null;
|
|
26
|
+
return ndcPoints[0];
|
|
27
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Raycaster } from 'three';
|
|
2
|
+
import { getPointFromHammerEvent } from './getPointFromHammerEvent';
|
|
3
|
+
/** 通过鼠标事件或者触摸事件,获取当前点击屏幕关联的射线与模型的交点 */
|
|
4
|
+
export function getIntersectionFromEvent(five, event) {
|
|
5
|
+
const mouse = getPointFromHammerEvent(event).ndcPoint;
|
|
6
|
+
const raycaster = new Raycaster();
|
|
7
|
+
raycaster.setFromCamera(mouse, five.camera);
|
|
8
|
+
return five.model.intersectRaycaster(raycaster);
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type Hammer from 'hammerjs';
|
|
2
|
+
import { Vector2 } from 'three';
|
|
3
|
+
/**
|
|
4
|
+
* 从 Hammer 事件中获取操作的点在交互 DOM 中的位置
|
|
5
|
+
* @ignore TODO: make a suitable name
|
|
6
|
+
*/
|
|
7
|
+
export declare function getPointFromHammerEvent(event: typeof Hammer['Input']): {
|
|
8
|
+
point: Vector2;
|
|
9
|
+
ndcPoint: Vector2;
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Vector2 } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* 从 Hammer 事件中获取操作的点在交互 DOM 中的位置
|
|
4
|
+
* @ignore TODO: make a suitable name
|
|
5
|
+
*/
|
|
6
|
+
export function getPointFromHammerEvent(event) {
|
|
7
|
+
// clientX 与 clientY 是相对 document 的,需要转换成相对于 target 的坐标
|
|
8
|
+
const { x: clientX, y: clientY } = event.center;
|
|
9
|
+
const { clientWidth, clientHeight } = event.target;
|
|
10
|
+
const clientRect = event.target.getBoundingClientRect();
|
|
11
|
+
const position = new Vector2(clientX, clientY).sub(new Vector2(clientRect.left, clientRect.top));
|
|
12
|
+
const mouse = new Vector2((position.x / clientWidth) * 2 - 1, -(position.y / clientHeight) * 2 + 1);
|
|
13
|
+
return { point: position, ndcPoint: mouse };
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const preventDefault: (e: Event) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const preventDefault = (e) => e.preventDefault();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type Line from '../Model/line';
|
|
2
|
+
import { Line as FiveLine } from '@realsee/five/line';
|
|
3
|
+
import { Color, Texture, Vector3 } from 'three';
|
|
4
|
+
declare type ISetMaterialOpts = Parameters<FiveLine['setMaterial']>[0];
|
|
5
|
+
export interface ICreatLineOpts extends ISetMaterialOpts {
|
|
6
|
+
hasPoint?: boolean;
|
|
7
|
+
pointSize?: number;
|
|
8
|
+
lineWidth?: number;
|
|
9
|
+
pointTexture?: Texture;
|
|
10
|
+
lineRenderOrder?: number;
|
|
11
|
+
pointsRenderOrder?: number;
|
|
12
|
+
lineColor?: Color | string | number;
|
|
13
|
+
pointColor?: Color | string | number;
|
|
14
|
+
}
|
|
15
|
+
export declare function creatLine(start: Vector3, end: Vector3, opts?: ICreatLineOpts): FiveLine;
|
|
16
|
+
export declare function creatLineMesh(line: Line, type: 'normal' | 'light'): FiveLine;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Line as FiveLine } from '@realsee/five/line';
|
|
2
|
+
import { lightLineOpts, normalLineOpts } from './constants';
|
|
3
|
+
import { Color } from 'three';
|
|
4
|
+
export function creatLine(start, end, opts) {
|
|
5
|
+
var _a, _b, _c, _d, _e;
|
|
6
|
+
const lineWidth = (_a = opts === null || opts === void 0 ? void 0 : opts.lineWidth) !== null && _a !== void 0 ? _a : 2;
|
|
7
|
+
const lineColor = (_b = opts === null || opts === void 0 ? void 0 : opts.lineColor) !== null && _b !== void 0 ? _b : new Color(0xffffff);
|
|
8
|
+
const pointSize = (_c = opts === null || opts === void 0 ? void 0 : opts.pointSize) !== null && _c !== void 0 ? _c : 5;
|
|
9
|
+
const lineRenderOrder = (_d = opts === null || opts === void 0 ? void 0 : opts.lineRenderOrder) !== null && _d !== void 0 ? _d : 10;
|
|
10
|
+
const pointsRenderOrder = (_e = opts === null || opts === void 0 ? void 0 : opts.lineRenderOrder) !== null && _e !== void 0 ? _e : 20;
|
|
11
|
+
const line = new FiveLine(start, end);
|
|
12
|
+
// set line
|
|
13
|
+
line.setMaterial({ linewidth: lineWidth, color: lineColor });
|
|
14
|
+
line.line.material.depthTest = false;
|
|
15
|
+
line.line.material.transparent = true;
|
|
16
|
+
line.line.renderOrder = lineRenderOrder;
|
|
17
|
+
// set point
|
|
18
|
+
line.points.renderOrder = pointsRenderOrder;
|
|
19
|
+
const pointMaterial = line.points.material;
|
|
20
|
+
pointMaterial.depthTest = false;
|
|
21
|
+
pointMaterial.size = pointSize;
|
|
22
|
+
(opts === null || opts === void 0 ? void 0 : opts.pointColor) && pointMaterial.color.set(opts.pointColor).convertSRGBToLinear();
|
|
23
|
+
if (opts === null || opts === void 0 ? void 0 : opts.pointTexture)
|
|
24
|
+
pointMaterial.map = opts.pointTexture;
|
|
25
|
+
return line;
|
|
26
|
+
}
|
|
27
|
+
export function creatLineMesh(line, type) {
|
|
28
|
+
const [point, anotherPoint] = line.points;
|
|
29
|
+
const opts = type === 'light' ? lightLineOpts : normalLineOpts;
|
|
30
|
+
const fiveLine = creatLine(point.position, anotherPoint.position, opts);
|
|
31
|
+
fiveLine.name = 'normalLine_' + line.id;
|
|
32
|
+
return fiveLine;
|
|
33
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Vector2 } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* 获取一点对于线段上最近的一点,
|
|
4
|
+
* 如果可以是过直线垂线的垂足,不行的话取线段的两端
|
|
5
|
+
* @param point
|
|
6
|
+
* @param linePoints
|
|
7
|
+
* @return
|
|
8
|
+
*/
|
|
9
|
+
export declare function closestPointOnLine(point: Vector2, linePoints: Vector2[]): Vector2;
|
|
10
|
+
/**
|
|
11
|
+
* 检查两个点是否位置相同
|
|
12
|
+
* point: { x: number, y: number }
|
|
13
|
+
* @param point1
|
|
14
|
+
* @param point2
|
|
15
|
+
* @return
|
|
16
|
+
*/
|
|
17
|
+
export declare function samePointAt(point1: Vector2, point2: Vector2): boolean;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Vector2 } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* 获取一点对于线段上最近的一点,
|
|
4
|
+
* 如果可以是过直线垂线的垂足,不行的话取线段的两端
|
|
5
|
+
* @param point
|
|
6
|
+
* @param linePoints
|
|
7
|
+
* @return
|
|
8
|
+
*/
|
|
9
|
+
export function closestPointOnLine(point, linePoints) {
|
|
10
|
+
const tA = point.x - linePoints[0].x;
|
|
11
|
+
const tB = point.y - linePoints[0].y;
|
|
12
|
+
const tC = linePoints[1].x - linePoints[0].x;
|
|
13
|
+
const tD = linePoints[1].y - linePoints[0].y;
|
|
14
|
+
// 设线段为 AB 线段,线段外一点为 P
|
|
15
|
+
// tDot = AP 向量与 AB 向量乘积,tLenSq 为 |AB|平方。
|
|
16
|
+
// tParam 是 AP 向量在 AB 向量投影向量 AC 与 AB 向量的比。
|
|
17
|
+
const tDot = tA * tC + tB * tD;
|
|
18
|
+
const tLenSq = tC * tC + tD * tD;
|
|
19
|
+
const tParam = tDot / tLenSq;
|
|
20
|
+
let tXx, tYy;
|
|
21
|
+
if (tParam < 0 || samePointAt(linePoints[0], linePoints[1])) {
|
|
22
|
+
tXx = linePoints[0].x;
|
|
23
|
+
tYy = linePoints[0].y;
|
|
24
|
+
}
|
|
25
|
+
else if (tParam > 1) {
|
|
26
|
+
tXx = linePoints[1].x;
|
|
27
|
+
tYy = linePoints[1].y;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
tXx = linePoints[0].x + tParam * tC;
|
|
31
|
+
tYy = linePoints[0].y + tParam * tD;
|
|
32
|
+
}
|
|
33
|
+
return new Vector2(tXx, tYy);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 检查两个点是否位置相同
|
|
37
|
+
* point: { x: number, y: number }
|
|
38
|
+
* @param point1
|
|
39
|
+
* @param point2
|
|
40
|
+
* @return
|
|
41
|
+
*/
|
|
42
|
+
export function samePointAt(point1, point2) {
|
|
43
|
+
return point1.x === point2.x && point1.y === point2.y;
|
|
44
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CurvePath, DoubleSide, Group, LineCurve3, Mesh, MeshBasicMaterial, PlaneGeometry, SphereGeometry, sRGBEncoding, TextureLoader, TubeGeometry, Vector3, } from 'three';
|
|
2
|
+
const planTextureUrl = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAYAAACJIC3tAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAA2KADAAQAAAABAAAA2AAAAADs6jNqAAAZH0lEQVR4Ae1dS68kyVmNet17e6Z7TNPqQX5ICNB4MfMDLASGsUCsQLBhZSRbQpYAsWLHapoVO1YIW7KQjAQrNiBYIZBtDAv29iyYBUICW5qm3Zru6e77qAfnfF98lVn31XUb4YxPeaK7KiMj43HyO3Hqi4yMzFuKgiwgC8gCY7bAppTJmM8/87nPM4MfDfbfLNPNOwU6Q3gbYvtrbLE/eVDWlqavZi0ggTVLTQ/YOxDV98u0pmwgrlL3JbCemVqMSmAtsnIe06MyK4dIfAufD+pB7is0b4H4VWwe6KgBnkBgc3iw/8DnXo0zTaF5C0hgzVMEgBTXJyAoiurDGmeaQvMW0BCxeY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XCrFay5ee/kjl/r7YDc04VDZJbChLH+TducQmHsvL8WbzWLuJhYcLK9oGsz0N2iY12DxFilegzGc+UbfbVtAAmubH0c3hbxiaj6EpmW/GZjTQCMFS7zu4gxiiIygtao+BXXyYCloqtdg8eIAfz+9JJaAOwksAUmY4PAhIm8zU2S+ol7LfRNwJ4ElIMmm5jlEZIgVHL4q0dP03awFgq5mAQoYLLA0n+ULpfpxGad5C8iDNU8RAB7UoSGx8jEVvvDmhDsKrVtAAmudIeI7hqCOKtBjbCkyzigqNG8BCax5igDwEAKLa65D7DOuBy4zMKf7YClY8vtgG7A1wfVYt00Bftwg5cEy8D+zafpSXgDsLXy4ov5w69MynMFoMUpgGag/hcAOICqKi+EUn27QaEn6atMCElibvOyi4hCRr2k7rV7rjd3D2mvXAroP1i43HTK+OPsYXuw1bPmPgnuKj0LzFpAHa54iALxdxXQMad2GJ3uCNHmxDMxpFjEFS/RYFBcDh4p3sH1R9y1RX61aQB6sVWb6uJ5heHgPCY/weVYPcF+heQvoGqx5igBwBQ/2IT738GE89jNgHzlGebAMHeAQkmL4CJ83MUT8SMNDs0eCL3mwBCThxvK6/BQ+3D6C2CKeAfvIMcqDZegAJxDWdyvQT8F7fRdeTCGFBf4X2/ZlBjAeg2cAAAAASUVORK5CYII=`;
|
|
3
|
+
export function getMouseGroup() {
|
|
4
|
+
const group = new Group();
|
|
5
|
+
const planGeometry = new PlaneGeometry(0.3, 0.3);
|
|
6
|
+
const planTexture = new TextureLoader().load(planTextureUrl);
|
|
7
|
+
planTexture.encoding = sRGBEncoding;
|
|
8
|
+
const planMaterial = new MeshBasicMaterial({ map: planTexture, transparent: true, depthTest: false });
|
|
9
|
+
const planMesh = new Mesh(planGeometry, planMaterial);
|
|
10
|
+
const zPath = new CurvePath();
|
|
11
|
+
zPath.add(new LineCurve3(new Vector3(0, 0, 0), new Vector3(0, 0, 0.1)));
|
|
12
|
+
const zGeometry = new TubeGeometry(zPath, 8, 0.004);
|
|
13
|
+
const zMaterial = new MeshBasicMaterial({ color: 0x33f1ef, depthTest: false, transparent: true, side: DoubleSide });
|
|
14
|
+
const zMesh = new Mesh(zGeometry, zMaterial);
|
|
15
|
+
const ballGeometry = new SphereGeometry(0.01, 20, 20);
|
|
16
|
+
const ballMesh = new Mesh(ballGeometry, zMaterial);
|
|
17
|
+
ballMesh.position.set(0, 0, 0.1);
|
|
18
|
+
group.name = 'mouse-current';
|
|
19
|
+
group.add(planMesh);
|
|
20
|
+
return group;
|
|
21
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
import type { RoomInfo, RoomRules } from './typings';
|
|
3
|
+
export interface PanoRulerPluginOptions {
|
|
4
|
+
distanceText?: (distance: number) => string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
interface PanoRulerPluginPluginState {
|
|
8
|
+
enable: boolean;
|
|
9
|
+
loaded: boolean;
|
|
10
|
+
options: PanoRulerPluginOptions;
|
|
11
|
+
}
|
|
12
|
+
export interface PanoRulerPluginParameterType {
|
|
13
|
+
roomInfo?: RoomInfo;
|
|
14
|
+
roomRules?: RoomRules;
|
|
15
|
+
options?: PanoRulerPluginOptions;
|
|
16
|
+
}
|
|
17
|
+
export interface PanoRulerPluginExportType {
|
|
18
|
+
enable: () => void;
|
|
19
|
+
disable: () => void;
|
|
20
|
+
load: (roomInfo?: RoomInfo, roomRules?: RoomRules, options?: PanoRulerPluginOptions) => Promise<boolean>;
|
|
21
|
+
state: PanoRulerPluginPluginState;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 全景标尺插件
|
|
25
|
+
*/
|
|
26
|
+
export declare const PanoRulerPlugin: FivePlugin<PanoRulerPluginParameterType, PanoRulerPluginExportType>;
|
|
27
|
+
export declare const panoRulerPluginServerParams: {
|
|
28
|
+
name: string;
|
|
29
|
+
version: number;
|
|
30
|
+
};
|
|
31
|
+
export default PanoRulerPlugin;
|