@realsee/dnalogel 2.0.0-alpha.2 → 2.0.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/README.md +93 -4
- package/TERMS.txt +56 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.js +234 -0
- package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.js +302 -0
- package/dist/CameraMovementPlugin/typing.d.ts +68 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.js +143 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.js +201 -0
- package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/index.js +668 -0
- package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/dist/ModelRoomLabelPlugin/index.js +505 -0
- package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +4 -0
- package/dist/ModelTVVideoPlugin/index.js +301 -0
- package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/dist/ModelViewPlugin/index.d.ts +17 -0
- package/dist/ModelViewPlugin/index.js +187 -0
- package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.d.ts +51 -0
- package/dist/PanoCompassPlugin/index.js +635 -0
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
- package/dist/PanoCursorRaycasterPlugin/index.js +90 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +61 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/dist/PanoMeasurePlugin/index.d.ts +7 -0
- package/dist/PanoMeasurePlugin/index.js +5531 -0
- package/dist/PanoMeasurePlugin/typings/data.d.ts +28 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
- package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/dist/PanoRulerPlugin/index.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.js +612 -0
- package/dist/PanoRulerPlugin/style.d.ts +2 -0
- package/dist/PanoRulerPlugin/typings.d.ts +21 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +33 -0
- package/dist/PanoSpatialTagPlugin/index.js +1294 -0
- package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/dist/floorplan/Assets/camera.d.ts +1 -0
- package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/Assets/compass.d.ts +0 -0
- package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +105 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.js +4034 -0
- package/dist/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +28 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +1642 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +75 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +3646 -0
- package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/dist/floorplan/constant.d.ts +5 -0
- package/dist/floorplan/typings/floorplanData.d.ts +137 -0
- package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
- package/dist/floorplan/typings/utility.d.ts +2 -0
- package/dist/floorplan/utils/formatData.d.ts +5 -0
- package/dist/floorplan/utils/formatPosition.d.ts +36 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.es.js +15138 -0
- package/dist/index.js +15180 -0
- package/dist/index.umd.js +15173 -0
- package/dist/shared-utils/Preloader.d.ts +6 -0
- package/dist/shared-utils/Subscribe.d.ts +45 -0
- package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
- package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
- package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
- package/dist/shared-utils/animationFrame/index.d.ts +15 -0
- package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
- package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
- package/dist/shared-utils/createLine/index.d.ts +3 -0
- package/dist/shared-utils/debounce.d.ts +6 -0
- package/dist/shared-utils/equal.d.ts +11 -0
- package/dist/shared-utils/filter.d.ts +27 -0
- package/dist/shared-utils/five/changeMode.d.ts +2 -0
- package/dist/shared-utils/five/useFivePlugin.d.ts +1 -0
- package/dist/shared-utils/formatRad.d.ts +7 -0
- package/dist/shared-utils/getPxmm.d.ts +11 -0
- package/dist/shared-utils/getRandomColor.d.ts +1 -0
- package/dist/shared-utils/isNil.d.ts +10 -0
- package/dist/shared-utils/isTruelyObject.d.ts +18 -0
- package/dist/shared-utils/math/evenNumber.d.ts +3 -0
- package/dist/shared-utils/math/planimetry.d.ts +116 -0
- package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
- package/dist/shared-utils/nearlyEqual.d.ts +7 -0
- package/dist/shared-utils/nextFrame.d.ts +1 -0
- package/dist/shared-utils/noop.d.ts +5 -0
- package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
- package/dist/shared-utils/px2rem.d.ts +1 -0
- package/dist/shared-utils/removeArrayItem.d.ts +7 -0
- package/dist/shared-utils/tap.d.ts +8 -0
- package/dist/shared-utils/three/centerPoint.d.ts +2 -0
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/dist/shared-utils/three/getNormal.d.ts +2 -0
- package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/dist/shared-utils/three/loadFbxObj.d.ts +2 -0
- package/dist/shared-utils/three/loadTexture.d.ts +2 -0
- package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
- package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
- package/dist/shared-utils/throttle.d.ts +7 -0
- package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
- package/dist/shared-utils/to.d.ts +8 -0
- package/dist/shared-utils/useDebounce.d.ts +8 -0
- package/dist/shared-utils/useThrottle.d.ts +8 -0
- package/dist/shared-utils/uuid.d.ts +4 -0
- package/dist/shared-utils/vectorTocoordinates.d.ts +7 -0
- package/dist/typings/math.type.d.ts +44 -0
- package/dist/typings/utils.type.d.ts +2 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +78 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1413 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/ModelRoomLabelController.html +20 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
- package/docs/enums/ModelFloorplanErrorType.html +1 -0
- package/docs/index.html +88 -0
- package/docs/interfaces/LineJson.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
- package/docs/interfaces/ModelFloorplanParameterType.html +1 -0
- package/docs/interfaces/ModelFloorplanViewEvent.html +5 -0
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -0
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
- package/docs/interfaces/PointJson.html +1 -0
- package/docs/interfaces/RoomLabel.html +13 -0
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +19 -0
- package/docs/modules.html +28 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +2 -2
- package/libs/CSS3DRenderPlugin/index.js +27 -26
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ModelChassisCompassPlugin/index.js +2 -2
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/libs/ModelEntryDoorGuidePlugin/index.js +13 -9
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +409 -0
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
- package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/index.js +120 -0
- package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/libs/ModelItemLabelPlugin/typings.js +7 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ModelRoomLabelPlugin/Controller.js +67 -25
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +255 -0
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.d.ts +4 -0
- package/libs/ModelTVVideoPlugin/index.js +254 -0
- package/libs/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/libs/ModelTVVideoPlugin/typings.js +8 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.js +13 -0
- package/libs/ModelViewPlugin/index.js +6 -6
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
- package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
- package/libs/PanoCompassPlugin/index.d.ts +51 -0
- package/libs/PanoCompassPlugin/index.js +253 -0
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +124 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/libs/PanoMeasurePlugin/Controller/EditController.js +329 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +64 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +305 -0
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +61 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +265 -0
- package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/libs/PanoMeasurePlugin/Model/index.js +139 -0
- package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/libs/PanoMeasurePlugin/Model/line.js +114 -0
- package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/point.js +48 -0
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Model/polyline.js +65 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +15 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +153 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +48 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +110 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +153 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +117 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +148 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +70 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +102 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +79 -0
- package/libs/PanoMeasurePlugin/index.d.ts +7 -0
- package/libs/PanoMeasurePlugin/index.js +5 -0
- package/libs/PanoMeasurePlugin/typings/data.d.ts +28 -0
- package/libs/PanoMeasurePlugin/typings/data.js +1 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
- package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
- package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +115 -0
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
- package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
- package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/libs/PanoMeasurePlugin/utils/line.js +33 -0
- package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/libs/PanoMeasurePlugin/utils/math.js +44 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +22 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
- package/libs/PanoRulerPlugin/index.d.ts +31 -0
- package/libs/PanoRulerPlugin/index.js +400 -0
- package/libs/PanoRulerPlugin/style.d.ts +2 -0
- package/libs/PanoRulerPlugin/style.js +88 -0
- package/libs/PanoRulerPlugin/typings.d.ts +21 -0
- package/libs/PanoRulerPlugin/typings.js +1 -0
- package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
- package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
- package/libs/PanoSpatialTagPlugin/index.d.ts +33 -0
- package/libs/PanoSpatialTagPlugin/index.js +413 -0
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/store.js +2 -0
- package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/style.js +8 -0
- package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/libs/PanoSpatialTagPlugin/typings.js +1 -0
- package/libs/floorplan/Assets/compass.d.ts +1 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
- package/libs/floorplan/Components/BaseImage.js +222 -0
- package/libs/floorplan/Components/Camera.js +120 -0
- package/libs/floorplan/Components/Compass.js +119 -0
- package/libs/floorplan/Components/CurrentFloor.js +456 -0
- package/libs/floorplan/Components/Main.js +464 -0
- package/libs/floorplan/Components/Normalmage.js +63 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +68 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +199 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +173 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +265 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +331 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +103 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +140 -0
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
- package/libs/floorplan/Components/SvgImage.js +83 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +4 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +455 -279
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +152 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +250 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +312 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +89 -37
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +30 -14
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +269 -118
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
- package/libs/floorplan/constant.d.ts +5 -0
- package/libs/floorplan/constant.js +6 -0
- package/libs/floorplan/typings/floorplanServerData.d.ts +4 -0
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +3 -3
- package/libs/index.d.ts +22 -9
- package/libs/index.js +11 -3
- package/libs/shared-utils/Subscribe.js +8 -1
- package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
- package/libs/shared-utils/createCanvasTextTexture.js +6 -5
- package/libs/shared-utils/getPxmm.d.ts +6 -1
- package/libs/shared-utils/getPxmm.js +26 -12
- package/libs/shared-utils/math/evenNumber.js +1 -1
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
- package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
- package/libs/shared-utils/tinyEJSrender.js +210 -0
- package/libs/shared-utils/useDebounce.js +1 -1
- package/libs/shared-utils/useThrottle.js +2 -1
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +26 -13
- package/dist/dnalogel.cjs.js +0 -2
- package/dist/dnalogel.es.js +0 -37145
- package/dist/dnalogel.umd.js +0 -2
- package/dist/style.css +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
- package/libs/floorplan/Components/BaseImage.svelte +0 -25
- package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
- package/libs/floorplan/Components/Normalmage.svelte +0 -11
- package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
- package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
- package/libs/floorplan/Components/SvgImage.svelte +0 -25
- package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { getRoomInfoInstance } from './getRoomInfoInstance';
|
|
3
|
+
import { loadTexture } from '../shared-utils/three/loadTexture';
|
|
4
|
+
import CSS3DRenderPlugin from '../CSS3DRenderPlugin';
|
|
5
|
+
import { tweenProgress } from '../shared-utils/animationFrame/BetterTween';
|
|
6
|
+
export const panoCompassPluginServerParams = {
|
|
7
|
+
name: 'PanoCompassPlugin',
|
|
8
|
+
version: 0,
|
|
9
|
+
};
|
|
10
|
+
export const PanoCompassPlugin = function (five, config) {
|
|
11
|
+
return new PanoCompassController(five, config);
|
|
12
|
+
};
|
|
13
|
+
export default PanoCompassPlugin;
|
|
14
|
+
class PanoCompassController {
|
|
15
|
+
constructor(five, config) {
|
|
16
|
+
Object.defineProperty(this, "five", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: void 0
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(this, "data", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
writable: true,
|
|
26
|
+
value: void 0
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(this, "config", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
configurable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
value: void 0
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(this, "group", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: new THREE.Group()
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(this, "modelLoaded", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: false
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(this, "roomInfoInstance", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
configurable: true,
|
|
49
|
+
writable: true,
|
|
50
|
+
value: void 0
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(this, "roomInfoWrapperInstance", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true,
|
|
55
|
+
writable: true,
|
|
56
|
+
value: void 0
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(this, "compassMeshTween", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
configurable: true,
|
|
61
|
+
writable: true,
|
|
62
|
+
value: void 0
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(this, "compassMesh", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
configurable: true,
|
|
67
|
+
writable: true,
|
|
68
|
+
value: void 0
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(this, "entryDoorMesh", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
configurable: true,
|
|
73
|
+
writable: true,
|
|
74
|
+
value: void 0
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(this, "dispose", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
configurable: true,
|
|
79
|
+
writable: true,
|
|
80
|
+
value: () => {
|
|
81
|
+
var _a, _b, _c, _d;
|
|
82
|
+
this.five.scene.remove(this.group);
|
|
83
|
+
this.group.remove(...this.group.children);
|
|
84
|
+
(_b = (_a = this.compassMesh) === null || _a === void 0 ? void 0 : _a.material.map) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
85
|
+
(_d = (_c = this.entryDoorMesh) === null || _c === void 0 ? void 0 : _c.material.map) === null || _d === void 0 ? void 0 : _d.dispose();
|
|
86
|
+
this.five.off('panoArrived', this.onFivePanoArrived);
|
|
87
|
+
this.five.off('panoWillArrive', this.onFivePanoWillArrive);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(this, "onFiveFistPanoLoaded", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
configurable: true,
|
|
93
|
+
writable: true,
|
|
94
|
+
value: () => {
|
|
95
|
+
this.modelLoaded = true;
|
|
96
|
+
if (this.data)
|
|
97
|
+
this.init();
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(this, "onFivePanoWillArrive", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
configurable: true,
|
|
103
|
+
writable: true,
|
|
104
|
+
value: (panoIndex) => {
|
|
105
|
+
var _a, _b;
|
|
106
|
+
if (panoIndex === this.five.panoIndex)
|
|
107
|
+
return;
|
|
108
|
+
(_a = this.compassMeshTween) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
109
|
+
(_b = this.compassMesh) === null || _b === void 0 ? void 0 : _b.material.setValues({ opacity: 0 });
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(this, "onFivePanoArrived", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
configurable: true,
|
|
115
|
+
writable: true,
|
|
116
|
+
value: (panoIndex) => {
|
|
117
|
+
var _a, _b, _c, _d;
|
|
118
|
+
// ======== fix compass position ========
|
|
119
|
+
const standingPosition = this.five.work.observers[panoIndex].standingPosition;
|
|
120
|
+
if (this.compassMesh) {
|
|
121
|
+
// 指南针上移 0.01m,防止与地板重合
|
|
122
|
+
this.compassMesh.position.copy(standingPosition.clone().setY(standingPosition.y + 0.01));
|
|
123
|
+
if (this.compassMesh.material.opacity !== 0)
|
|
124
|
+
return;
|
|
125
|
+
(_a = this.compassMeshTween) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
126
|
+
this.compassMeshTween = tweenProgress(1000)
|
|
127
|
+
.onUpdate(({ progress }) => {
|
|
128
|
+
var _a;
|
|
129
|
+
(_a = this.compassMesh) === null || _a === void 0 ? void 0 : _a.material.setValues({ opacity: progress });
|
|
130
|
+
this.five.needsRender = true;
|
|
131
|
+
})
|
|
132
|
+
.play();
|
|
133
|
+
}
|
|
134
|
+
// ======== fix entry door label position and rotation ========
|
|
135
|
+
if (this.entryDoorMesh) {
|
|
136
|
+
const entryDoorPosition = new THREE.Vector3(this.data.entrance.position.x, this.data.entrance.position.y, this.data.entrance.position.z);
|
|
137
|
+
const panoToEntryDoorVector = entryDoorPosition
|
|
138
|
+
.clone()
|
|
139
|
+
.setY(standingPosition.y)
|
|
140
|
+
.sub(standingPosition)
|
|
141
|
+
.normalize();
|
|
142
|
+
const compassEntryDoorPosition = standingPosition
|
|
143
|
+
.clone()
|
|
144
|
+
.add(panoToEntryDoorVector.clone().multiplyScalar(0.7))
|
|
145
|
+
.setY(standingPosition.y + 0.01);
|
|
146
|
+
this.entryDoorMesh.rotation.z = new THREE.Vector3(0, 0, -1).angleTo(panoToEntryDoorVector);
|
|
147
|
+
this.entryDoorMesh.position.copy(compassEntryDoorPosition);
|
|
148
|
+
// 不是客厅时,隐藏入户门指引
|
|
149
|
+
((_b = this.data) === null || _b === void 0 ? void 0 : _b.room_observers[panoIndex].room.type) === 1
|
|
150
|
+
? (_c = this.entryDoorMesh) === null || _c === void 0 ? void 0 : _c.material.setValues({ opacity: 1 })
|
|
151
|
+
: (_d = this.entryDoorMesh) === null || _d === void 0 ? void 0 : _d.material.setValues({ opacity: 0 });
|
|
152
|
+
}
|
|
153
|
+
// ======== fix room info ========
|
|
154
|
+
if (this.roomInfoInstance && this.roomInfoWrapperInstance) {
|
|
155
|
+
this.roomInfoWrapperInstance.css3DObject.position.copy(standingPosition.clone().setY(standingPosition.y + 0.01));
|
|
156
|
+
this.roomInfoInstance.setRoom(this.data.room_observers[panoIndex].room);
|
|
157
|
+
}
|
|
158
|
+
this.five.needsRender = true;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
Object.defineProperty(this, "onFiveCameraDirectionUpdate", {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
configurable: true,
|
|
164
|
+
writable: true,
|
|
165
|
+
value: ({ longitude, latitude, }) => {
|
|
166
|
+
var _a, _b;
|
|
167
|
+
if (!this.roomInfoWrapperInstance)
|
|
168
|
+
return;
|
|
169
|
+
this.roomInfoWrapperInstance.css3DObject.rotation.z = longitude;
|
|
170
|
+
latitude > 0.66 && this.five.getCurrentState().mode === 'Panorama'
|
|
171
|
+
? (_a = this.roomInfoInstance) === null || _a === void 0 ? void 0 : _a.show()
|
|
172
|
+
: (_b = this.roomInfoInstance) === null || _b === void 0 ? void 0 : _b.hide();
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
this.five = five;
|
|
176
|
+
this.config = config;
|
|
177
|
+
this.five.scene.add(this.group);
|
|
178
|
+
five.once('dispose', this.dispose);
|
|
179
|
+
five.once('modelLoaded', this.onFiveFistPanoLoaded);
|
|
180
|
+
this.five.on('panoArrived', this.onFivePanoArrived);
|
|
181
|
+
this.five.on('panoWillArrive', this.onFivePanoWillArrive);
|
|
182
|
+
this.five.on('cameraDirectionUpdate', this.onFiveCameraDirectionUpdate);
|
|
183
|
+
}
|
|
184
|
+
load(data) {
|
|
185
|
+
this.data = data;
|
|
186
|
+
if (this.modelLoaded)
|
|
187
|
+
this.init();
|
|
188
|
+
}
|
|
189
|
+
async init() {
|
|
190
|
+
if (!this.data || !this.modelLoaded)
|
|
191
|
+
return;
|
|
192
|
+
const northRad = this.data.north_rad;
|
|
193
|
+
if (northRad != null) {
|
|
194
|
+
this.compassMesh = await this.loadCompassMesh();
|
|
195
|
+
this.compassMesh.rotateX(-Math.PI / 2);
|
|
196
|
+
this.compassMesh.rotateZ(northRad - Math.PI / 2);
|
|
197
|
+
this.group.add(this.compassMesh);
|
|
198
|
+
}
|
|
199
|
+
if (this.data.entrance != null) {
|
|
200
|
+
this.entryDoorMesh = await this.loadEntryDoorMesh();
|
|
201
|
+
this.roomInfoWrapperInstance = this.loadRoomInfo();
|
|
202
|
+
this.roomInfoInstance = getRoomInfoInstance();
|
|
203
|
+
this.entryDoorMesh.rotateX(-Math.PI / 2);
|
|
204
|
+
if (this.roomInfoWrapperInstance)
|
|
205
|
+
this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
|
|
206
|
+
this.group.add(this.entryDoorMesh);
|
|
207
|
+
}
|
|
208
|
+
this.onFivePanoArrived(this.five.panoIndex || 0);
|
|
209
|
+
this.five.needsRender = true;
|
|
210
|
+
}
|
|
211
|
+
async loadCompassMesh() {
|
|
212
|
+
var _a;
|
|
213
|
+
const compassImageUrl = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.compassImageUrl) ||
|
|
214
|
+
'//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png';
|
|
215
|
+
const compassTexture = await loadTexture(compassImageUrl);
|
|
216
|
+
const compassGeometry = new THREE.CircleGeometry(0.7, 32);
|
|
217
|
+
const compassMaterial = new THREE.MeshBasicMaterial({
|
|
218
|
+
map: compassTexture,
|
|
219
|
+
transparent: true,
|
|
220
|
+
opacity: 0,
|
|
221
|
+
depthTest: false,
|
|
222
|
+
});
|
|
223
|
+
const compassMesh = new THREE.Mesh(compassGeometry, compassMaterial);
|
|
224
|
+
compassMesh.name = 'pano-compass-mesh';
|
|
225
|
+
return compassMesh;
|
|
226
|
+
}
|
|
227
|
+
async loadEntryDoorMesh() {
|
|
228
|
+
var _a;
|
|
229
|
+
const entryDoorImageUrl = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.entryDoorImageUrl) ||
|
|
230
|
+
'//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png';
|
|
231
|
+
const entryDoorTexture = await loadTexture(entryDoorImageUrl);
|
|
232
|
+
const entryDoorGeometry = new THREE.PlaneGeometry(0.2, 0.16);
|
|
233
|
+
const entryDoorMaterial = new THREE.MeshBasicMaterial({
|
|
234
|
+
map: entryDoorTexture,
|
|
235
|
+
transparent: true,
|
|
236
|
+
opacity: 0.8,
|
|
237
|
+
depthTest: false,
|
|
238
|
+
});
|
|
239
|
+
const entryDoorMesh = new THREE.Mesh(entryDoorGeometry, entryDoorMaterial);
|
|
240
|
+
entryDoorMesh.name = 'pano-compass-entry-door';
|
|
241
|
+
return entryDoorMesh;
|
|
242
|
+
}
|
|
243
|
+
loadRoomInfo() {
|
|
244
|
+
const points = [
|
|
245
|
+
new THREE.Vector3(-0.7, 0, -0.7),
|
|
246
|
+
new THREE.Vector3(0.7, 0, -0.7),
|
|
247
|
+
new THREE.Vector3(0.7, 0, 0.7),
|
|
248
|
+
new THREE.Vector3(-0.7, 0, 0.7),
|
|
249
|
+
];
|
|
250
|
+
const roomInfo = CSS3DRenderPlugin(this.five).create3DDomContainer(points);
|
|
251
|
+
return roomInfo;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
@@ -40,20 +40,22 @@ export const PanoCursorRaycasterPlugin = (five) => {
|
|
|
40
40
|
return { clear, pointAxesHelperMesh };
|
|
41
41
|
};
|
|
42
42
|
const canSeePoint = (point, distanceError = 0) => {
|
|
43
|
-
|
|
43
|
+
var _a, _b;
|
|
44
|
+
const cameraPosition = (_a = five === null || five === void 0 ? void 0 : five.camera) === null || _a === void 0 ? void 0 : _a.position;
|
|
44
45
|
if (!cameraPosition)
|
|
45
46
|
return false;
|
|
46
47
|
const distance = point.distanceTo(cameraPosition);
|
|
47
48
|
const direction = point.sub(cameraPosition).normalize();
|
|
48
49
|
const raycaster = new Raycaster(cameraPosition, direction);
|
|
49
|
-
const intersection = five.model.intersectRaycaster(raycaster)
|
|
50
|
+
const intersection = (_b = five.model.intersectRaycaster(raycaster)) === null || _b === void 0 ? void 0 : _b[0];
|
|
50
51
|
return !(intersection && intersection.distance + distanceError < distance);
|
|
51
52
|
};
|
|
52
53
|
const intersection = () => {
|
|
53
54
|
return state.intersection;
|
|
54
55
|
};
|
|
55
56
|
const destroy = () => {
|
|
56
|
-
|
|
57
|
+
var _a, _b;
|
|
58
|
+
(_b = (_a = state.disposers) === null || _a === void 0 ? void 0 : _a.forEach) === null || _b === void 0 ? void 0 : _b.call(_a, (d) => d === null || d === void 0 ? void 0 : d());
|
|
57
59
|
five.off('intersectionOnModelUpdate', updateIntersection);
|
|
58
60
|
five.off('intersectionHidden', clearIntersection);
|
|
59
61
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type Line from '../Model/line';
|
|
2
|
+
import type Magnifier from '../Modules/Magnifier';
|
|
3
|
+
import type FiveHelper from '../Modules/FiveHelper';
|
|
4
|
+
import type { Group } from 'three';
|
|
5
|
+
import type { Model } from '../Model';
|
|
6
|
+
import type { PluginEvent } from '../typings/event.type';
|
|
7
|
+
import type { UserDistanceItem } from '../utils/distanceDom';
|
|
8
|
+
import type { Five, Intersection, IntersectMeshInterface, Subscribe } from '@realsee/five';
|
|
9
|
+
export interface IControllerParams {
|
|
10
|
+
five: Five;
|
|
11
|
+
group: Group;
|
|
12
|
+
model: Model;
|
|
13
|
+
mouseGroup: Group;
|
|
14
|
+
container: Element;
|
|
15
|
+
magnifier: Magnifier;
|
|
16
|
+
fiveHelper: FiveHelper;
|
|
17
|
+
hook: Subscribe<PluginEvent>;
|
|
18
|
+
userDistanceItemCreator?: () => UserDistanceItem;
|
|
19
|
+
}
|
|
20
|
+
export default abstract class BaseController {
|
|
21
|
+
protected five: Five;
|
|
22
|
+
protected group: Group;
|
|
23
|
+
protected model: Model;
|
|
24
|
+
protected disposed: boolean;
|
|
25
|
+
protected mouseGroup: Group;
|
|
26
|
+
protected container: Element;
|
|
27
|
+
protected fiveHelper: FiveHelper;
|
|
28
|
+
protected hook: IControllerParams['hook'];
|
|
29
|
+
protected magnifier: IControllerParams['magnifier'];
|
|
30
|
+
protected userDistanceItemCreator: IControllerParams['userDistanceItemCreator'];
|
|
31
|
+
constructor(params: IControllerParams);
|
|
32
|
+
protected removeLine(line: Line): void;
|
|
33
|
+
protected updateDistanceUI: () => void;
|
|
34
|
+
protected updateMouseGroup(intersection: Intersection, mesh?: IntersectMeshInterface): Group;
|
|
35
|
+
protected dispose(): void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { preventDefault } from '../utils/ironbox';
|
|
2
|
+
export default class BaseController {
|
|
3
|
+
constructor(params) {
|
|
4
|
+
Object.defineProperty(this, "five", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true,
|
|
8
|
+
value: void 0
|
|
9
|
+
});
|
|
10
|
+
Object.defineProperty(this, "group", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: void 0
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(this, "model", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: void 0
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(this, "disposed", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
writable: true,
|
|
26
|
+
value: false
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(this, "mouseGroup", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
configurable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
value: void 0
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(this, "container", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: void 0
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(this, "fiveHelper", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: void 0
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(this, "hook", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
configurable: true,
|
|
49
|
+
writable: true,
|
|
50
|
+
value: void 0
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(this, "magnifier", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true,
|
|
55
|
+
writable: true,
|
|
56
|
+
value: void 0
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(this, "userDistanceItemCreator", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
configurable: true,
|
|
61
|
+
writable: true,
|
|
62
|
+
value: void 0
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(this, "updateDistanceUI", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
configurable: true,
|
|
67
|
+
writable: true,
|
|
68
|
+
value: () => {
|
|
69
|
+
this.model.lines.forEach((line) => line.distanceItem.update(this.five));
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
// ==================== Params ====================
|
|
73
|
+
this.five = params.five;
|
|
74
|
+
this.hook = params.hook;
|
|
75
|
+
this.model = params.model;
|
|
76
|
+
this.magnifier = params.magnifier;
|
|
77
|
+
this.container = params.container;
|
|
78
|
+
this.fiveHelper = params.fiveHelper;
|
|
79
|
+
this.userDistanceItemCreator = params.userDistanceItemCreator;
|
|
80
|
+
// ==================== Groups ====================
|
|
81
|
+
this.group = params.group;
|
|
82
|
+
this.mouseGroup = params.mouseGroup;
|
|
83
|
+
const fiveElement = this.five.getElement();
|
|
84
|
+
if (fiveElement) {
|
|
85
|
+
fiveElement.addEventListener('touchstart', preventDefault);
|
|
86
|
+
fiveElement.addEventListener('contextmenu', preventDefault);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
removeLine(line) {
|
|
90
|
+
this.group.remove(line.mesh, line.lightMesh);
|
|
91
|
+
line.distanceItem.remove();
|
|
92
|
+
this.five.needsRender = true;
|
|
93
|
+
}
|
|
94
|
+
updateMouseGroup(intersection, mesh) {
|
|
95
|
+
if (!intersection)
|
|
96
|
+
return this.mouseGroup;
|
|
97
|
+
// ============ update mouseGroup position ============
|
|
98
|
+
const adsorbentPoint = this.fiveHelper.getAdsorbentPoint(intersection);
|
|
99
|
+
const viewPosition = adsorbentPoint ? adsorbentPoint : intersection.point;
|
|
100
|
+
this.mouseGroup.position.copy(viewPosition);
|
|
101
|
+
// ============ update mouseGroup quaternion ============
|
|
102
|
+
if (mesh) {
|
|
103
|
+
this.mouseGroup.quaternion.copy(mesh.quaternion);
|
|
104
|
+
}
|
|
105
|
+
else if (intersection.face) {
|
|
106
|
+
const normal = intersection.face.normal;
|
|
107
|
+
const positionVector = normal.clone().multiplyScalar(0.05);
|
|
108
|
+
const position = intersection.point.clone().add(positionVector);
|
|
109
|
+
const lookAtVector = position.clone().add(positionVector);
|
|
110
|
+
this.mouseGroup.lookAt(lookAtVector);
|
|
111
|
+
}
|
|
112
|
+
return this.mouseGroup;
|
|
113
|
+
}
|
|
114
|
+
dispose() {
|
|
115
|
+
this.disposed = true;
|
|
116
|
+
this.magnifier.dispose();
|
|
117
|
+
this.model.lines.forEach((line) => this.removeLine(line));
|
|
118
|
+
const fiveElement = this.five.getElement();
|
|
119
|
+
if (fiveElement) {
|
|
120
|
+
fiveElement.removeEventListener('touchstart', preventDefault);
|
|
121
|
+
fiveElement.removeEventListener('contextmenu', preventDefault);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { LineJson } from '../typings/data';
|
|
2
|
+
import { Model } from '../Model';
|
|
3
|
+
import Line from '../Model/line';
|
|
4
|
+
import BaseController, { IControllerParams } from './BaseController';
|
|
5
|
+
export interface EditEvent {
|
|
6
|
+
editedLineChange: (lines: LineJson[]) => void;
|
|
7
|
+
}
|
|
8
|
+
export default class EditController extends BaseController {
|
|
9
|
+
type: string;
|
|
10
|
+
model: Model;
|
|
11
|
+
private pressPoint?;
|
|
12
|
+
private hasAppendDashed;
|
|
13
|
+
private hasAppendMouseGroup;
|
|
14
|
+
private fiveElement?;
|
|
15
|
+
/** 上一个端点位置 */
|
|
16
|
+
private lastPoint;
|
|
17
|
+
/** 鼠标点到上一个端点连接的虚线 */
|
|
18
|
+
private dashed;
|
|
19
|
+
private hammer?;
|
|
20
|
+
/** 根据 intersection 更新放大镜和吸附点 */
|
|
21
|
+
private onIntersectionUpdate;
|
|
22
|
+
constructor(params: IControllerParams);
|
|
23
|
+
dispose(): void;
|
|
24
|
+
getEditingLines(): Line[];
|
|
25
|
+
/** 撤销编辑 */
|
|
26
|
+
revoke: () => void;
|
|
27
|
+
private onMouseLeave;
|
|
28
|
+
/** 编辑线条发生改变时通知外部 */
|
|
29
|
+
private onLineChanged;
|
|
30
|
+
private onPress;
|
|
31
|
+
/**
|
|
32
|
+
* 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
|
|
33
|
+
* 2. 如果有长按点,把长按点位置更新为当前位置
|
|
34
|
+
*/
|
|
35
|
+
private onPan;
|
|
36
|
+
private onPanEnd;
|
|
37
|
+
/**
|
|
38
|
+
* 1. 如果存在上一个点,需要绘制当前点到上一个点的连线
|
|
39
|
+
* 2. 把上一个点的位置更新为当前点的位置
|
|
40
|
+
* 3. 清除 mouseGroup 和 magnifier
|
|
41
|
+
*/
|
|
42
|
+
private onTap;
|
|
43
|
+
private onWantsTapGesture;
|
|
44
|
+
/** 编辑时取消走点 */
|
|
45
|
+
private onWantsToMoveToPano;
|
|
46
|
+
/** 存在长按点时不能移动全景 */
|
|
47
|
+
private onWantsPanGesture;
|
|
48
|
+
/** 移动全景时更新 distanceItem 在屏幕上的位置 */
|
|
49
|
+
private onCameraUpdate;
|
|
50
|
+
/** 更新虚线 */
|
|
51
|
+
private updateDashed;
|
|
52
|
+
}
|