@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,56 @@
|
|
|
1
|
+
import type { Subscribe } from "@realsee/five";
|
|
2
|
+
import type { PluginEvent } from "./events.type";
|
|
3
|
+
import type ItemLabelComponent from './ItemLabelComponent';
|
|
4
|
+
export declare enum DISPLAY_STRATEGY_TYPE {
|
|
5
|
+
SMALL = "small",
|
|
6
|
+
MIDLLE = "middle",
|
|
7
|
+
LARGE = "large",
|
|
8
|
+
EXTRA_LARGE = "x-large"
|
|
9
|
+
}
|
|
10
|
+
export interface ModelItemLabelPluginParametersType {
|
|
11
|
+
modelOcclusionEnable?: boolean;
|
|
12
|
+
displayStrategyType?: Partial<DISPLAY_STRATEGY_TYPE>;
|
|
13
|
+
}
|
|
14
|
+
export interface ModelItemLabelPluginData {
|
|
15
|
+
model_item_labels: Readonly<{
|
|
16
|
+
id: string;
|
|
17
|
+
library: string;
|
|
18
|
+
name: string;
|
|
19
|
+
size: [number, number, number];
|
|
20
|
+
center: [number, number, number];
|
|
21
|
+
position: [number, number, number];
|
|
22
|
+
type: string[];
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}>[];
|
|
25
|
+
}
|
|
26
|
+
export interface ItemLabel {
|
|
27
|
+
id: string;
|
|
28
|
+
library: string;
|
|
29
|
+
name: string;
|
|
30
|
+
size: [number, number, number];
|
|
31
|
+
center: [number, number, number];
|
|
32
|
+
position: [number, number, number];
|
|
33
|
+
type: string[];
|
|
34
|
+
modelPosition: [number, number, number];
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}
|
|
37
|
+
export interface ModelItemLabelPluginExportReturnsType {
|
|
38
|
+
appendTo: (wrapper: Element) => void;
|
|
39
|
+
load: (data: ModelItemLabelPluginData) => void;
|
|
40
|
+
disable: () => void;
|
|
41
|
+
enable: () => void;
|
|
42
|
+
dispose: () => void;
|
|
43
|
+
hooks: Subscribe<PluginEvent>;
|
|
44
|
+
}
|
|
45
|
+
export interface ModelItemLabelPluginState {
|
|
46
|
+
container: HTMLDivElement;
|
|
47
|
+
data: ModelItemLabelPluginData | null;
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
itemLabels: ItemLabel[];
|
|
50
|
+
wrapper: HTMLElement | null;
|
|
51
|
+
fiveModeEnabled: boolean;
|
|
52
|
+
app?: ItemLabelComponent | undefined;
|
|
53
|
+
hooks: Subscribe<PluginEvent>;
|
|
54
|
+
modelOcclusionEnable: boolean;
|
|
55
|
+
displayStrategyType: Partial<DISPLAY_STRATEGY_TYPE>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var DISPLAY_STRATEGY_TYPE;
|
|
2
|
+
(function (DISPLAY_STRATEGY_TYPE) {
|
|
3
|
+
DISPLAY_STRATEGY_TYPE["SMALL"] = "small";
|
|
4
|
+
DISPLAY_STRATEGY_TYPE["MIDLLE"] = "middle";
|
|
5
|
+
DISPLAY_STRATEGY_TYPE["LARGE"] = "large";
|
|
6
|
+
DISPLAY_STRATEGY_TYPE["EXTRA_LARGE"] = "x-large";
|
|
7
|
+
})(DISPLAY_STRATEGY_TYPE || (DISPLAY_STRATEGY_TYPE = {}));
|
|
@@ -1,14 +1,69 @@
|
|
|
1
|
-
import RoomLabelItems from './RoomLabelItems
|
|
1
|
+
import RoomLabelItems from './RoomLabelItems';
|
|
2
2
|
import { parseModelRoomLabelPluginData } from './utils/parseData';
|
|
3
3
|
export class ModelRoomLabelController {
|
|
4
|
-
five;
|
|
5
|
-
enabled = true;
|
|
6
|
-
fiveModeEnabled;
|
|
7
|
-
app = undefined;
|
|
8
|
-
wrapper;
|
|
9
|
-
roomLabels = [];
|
|
10
|
-
container = document.createElement('div');
|
|
11
4
|
constructor(five) {
|
|
5
|
+
Object.defineProperty(this, "five", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value: void 0
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(this, "enabled", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(this, "fiveModeEnabled", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: void 0
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(this, "app", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: undefined
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(this, "wrapper", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: void 0
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(this, "roomLabels", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: []
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(this, "container", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
configurable: true,
|
|
44
|
+
writable: true,
|
|
45
|
+
value: document.createElement('div')
|
|
46
|
+
});
|
|
47
|
+
/** 监听 Five Mode 变化
|
|
48
|
+
* @description
|
|
49
|
+
* Mode 不符合要求时,立刻消失,满足要求时,需要等待动画结束再展示
|
|
50
|
+
*/
|
|
51
|
+
Object.defineProperty(this, "onFiveModeChange", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
configurable: true,
|
|
54
|
+
writable: true,
|
|
55
|
+
value: (mode) => {
|
|
56
|
+
if (mode !== 'Floorplan') {
|
|
57
|
+
this.fiveModeEnabled = false;
|
|
58
|
+
this.render();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
this.five.once('initAnimationEnded', () => {
|
|
62
|
+
this.fiveModeEnabled = this.five.currentMode === 'Floorplan';
|
|
63
|
+
this.render();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
});
|
|
12
67
|
this.five = five;
|
|
13
68
|
this.fiveModeEnabled = this.five.currentMode === 'Floorplan';
|
|
14
69
|
// init container style
|
|
@@ -19,6 +74,7 @@ export class ModelRoomLabelController {
|
|
|
19
74
|
this.container.style.pointerEvents = 'none';
|
|
20
75
|
this.container.style.left = '0';
|
|
21
76
|
this.container.style.top = '0';
|
|
77
|
+
this.container.style.zIndex = '5';
|
|
22
78
|
// five listener
|
|
23
79
|
this.five.once('dispose', () => this.dispose());
|
|
24
80
|
this.five.on('modeChange', this.onFiveModeChange);
|
|
@@ -61,26 +117,12 @@ export class ModelRoomLabelController {
|
|
|
61
117
|
this.render();
|
|
62
118
|
return this;
|
|
63
119
|
}
|
|
64
|
-
/** 监听 Five Mode 变化
|
|
65
|
-
* @description
|
|
66
|
-
* Mode 不符合要求时,立刻消失,满足要求时,需要等待动画结束再展示
|
|
67
|
-
*/
|
|
68
|
-
onFiveModeChange = (mode) => {
|
|
69
|
-
if (mode !== 'Floorplan') {
|
|
70
|
-
this.fiveModeEnabled = false;
|
|
71
|
-
this.render();
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
this.five.once('initAnimationEnded', () => {
|
|
75
|
-
this.fiveModeEnabled = this.five.currentMode === 'Floorplan';
|
|
76
|
-
this.render();
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
120
|
render() {
|
|
121
|
+
var _a;
|
|
80
122
|
if (!this.wrapper)
|
|
81
123
|
return;
|
|
82
|
-
if (!this.
|
|
83
|
-
this.app
|
|
124
|
+
if (!this.enabled || !this.fiveModeEnabled) {
|
|
125
|
+
(_a = this.app) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
84
126
|
this.app = undefined;
|
|
85
127
|
return;
|
|
86
128
|
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* generated by Svelte v3.47.0 */
|
|
2
|
+
import {
|
|
3
|
+
SvelteComponent,
|
|
4
|
+
append,
|
|
5
|
+
append_styles,
|
|
6
|
+
attr,
|
|
7
|
+
detach,
|
|
8
|
+
element,
|
|
9
|
+
init,
|
|
10
|
+
insert,
|
|
11
|
+
listen,
|
|
12
|
+
noop,
|
|
13
|
+
safe_not_equal,
|
|
14
|
+
set_data,
|
|
15
|
+
set_style,
|
|
16
|
+
space,
|
|
17
|
+
text,
|
|
18
|
+
toggle_class
|
|
19
|
+
} from "svelte/internal";
|
|
20
|
+
|
|
21
|
+
import { ROOM_LABEL_BG } from './Assets/roomLabelBg';
|
|
22
|
+
|
|
23
|
+
function add_css(target) {
|
|
24
|
+
append_styles(target, "svelte-17nkflf", ".room-label-item.svelte-17nkflf{position:absolute;font-size:8px;z-index:0;transform:none;cursor:pointer;pointer-events:none;user-select:none}.room-label-item__text.svelte-17nkflf{position:absolute;left:0;top:-64px;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:20px;min-width:32px;padding:0 6px;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-17nkflf{position:absolute;top:-44px;height:48px;width:1px;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-17nkflf{font-size:10px}");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function create_fragment(ctx) {
|
|
28
|
+
let div1;
|
|
29
|
+
let span;
|
|
30
|
+
let t0_value = /*roomLabel*/ ctx[0].name + "";
|
|
31
|
+
let t0;
|
|
32
|
+
let t1;
|
|
33
|
+
let div0;
|
|
34
|
+
let mounted;
|
|
35
|
+
let dispose;
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
c() {
|
|
39
|
+
div1 = element("div");
|
|
40
|
+
span = element("span");
|
|
41
|
+
t0 = text(t0_value);
|
|
42
|
+
t1 = space();
|
|
43
|
+
div0 = element("div");
|
|
44
|
+
attr(span, "class", "room-label-item__text svelte-17nkflf");
|
|
45
|
+
set_style(span, "background-image", "url(" + ROOM_LABEL_BG + ")");
|
|
46
|
+
toggle_class(span, "wide", /*roomLabel*/ ctx[0].name.length > 3);
|
|
47
|
+
attr(div0, "class", "room-label-item__bar svelte-17nkflf");
|
|
48
|
+
attr(div1, "class", "room-label-item svelte-17nkflf");
|
|
49
|
+
set_style(div1, "z-index", /*roomLabel*/ ctx[0].zIndex, false);
|
|
50
|
+
set_style(div1, "transform", /*roomLabel*/ ctx[0].transform, false);
|
|
51
|
+
set_style(div1, "opacity", /*roomLabel*/ ctx[0].visible ? 1 : 0, false);
|
|
52
|
+
},
|
|
53
|
+
m(target, anchor) {
|
|
54
|
+
insert(target, div1, anchor);
|
|
55
|
+
append(div1, span);
|
|
56
|
+
append(span, t0);
|
|
57
|
+
append(div1, t1);
|
|
58
|
+
append(div1, div0);
|
|
59
|
+
|
|
60
|
+
if (!mounted) {
|
|
61
|
+
dispose = listen(span, "click", /*onClick*/ ctx[1]);
|
|
62
|
+
mounted = true;
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
p(ctx, [dirty]) {
|
|
66
|
+
if (dirty & /*roomLabel*/ 1 && t0_value !== (t0_value = /*roomLabel*/ ctx[0].name + "")) set_data(t0, t0_value);
|
|
67
|
+
|
|
68
|
+
if (dirty & /*roomLabel*/ 1) {
|
|
69
|
+
toggle_class(span, "wide", /*roomLabel*/ ctx[0].name.length > 3);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (dirty & /*roomLabel*/ 1) {
|
|
73
|
+
set_style(div1, "z-index", /*roomLabel*/ ctx[0].zIndex, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (dirty & /*roomLabel*/ 1) {
|
|
77
|
+
set_style(div1, "transform", /*roomLabel*/ ctx[0].transform, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (dirty & /*roomLabel*/ 1) {
|
|
81
|
+
set_style(div1, "opacity", /*roomLabel*/ ctx[0].visible ? 1 : 0, false);
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
i: noop,
|
|
85
|
+
o: noop,
|
|
86
|
+
d(detaching) {
|
|
87
|
+
if (detaching) detach(div1);
|
|
88
|
+
mounted = false;
|
|
89
|
+
dispose();
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function instance($$self, $$props, $$invalidate) {
|
|
95
|
+
let { five } = $$props;
|
|
96
|
+
let { roomLabel } = $$props;
|
|
97
|
+
|
|
98
|
+
function onClick() {
|
|
99
|
+
five.setState({
|
|
100
|
+
panoIndex: roomLabel.panoIndex,
|
|
101
|
+
mode: 'Panorama',
|
|
102
|
+
longitude: roomLabel.longitude
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
$$self.$$set = $$props => {
|
|
107
|
+
if ('five' in $$props) $$invalidate(2, five = $$props.five);
|
|
108
|
+
if ('roomLabel' in $$props) $$invalidate(0, roomLabel = $$props.roomLabel);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return [roomLabel, onClick, five];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
class Component extends SvelteComponent {
|
|
115
|
+
constructor(options) {
|
|
116
|
+
super();
|
|
117
|
+
init(this, options, instance, create_fragment, safe_not_equal, { five: 2, roomLabel: 0 }, add_css);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export default Component;
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/* generated by Svelte v3.47.0 */
|
|
2
|
+
import {
|
|
3
|
+
SvelteComponent,
|
|
4
|
+
add_render_callback,
|
|
5
|
+
add_resize_listener,
|
|
6
|
+
append_styles,
|
|
7
|
+
attr,
|
|
8
|
+
check_outros,
|
|
9
|
+
create_component,
|
|
10
|
+
destroy_component,
|
|
11
|
+
detach,
|
|
12
|
+
element,
|
|
13
|
+
empty,
|
|
14
|
+
group_outros,
|
|
15
|
+
init,
|
|
16
|
+
insert,
|
|
17
|
+
mount_component,
|
|
18
|
+
outro_and_destroy_block,
|
|
19
|
+
safe_not_equal,
|
|
20
|
+
transition_in,
|
|
21
|
+
transition_out,
|
|
22
|
+
update_keyed_each
|
|
23
|
+
} from "svelte/internal";
|
|
24
|
+
|
|
25
|
+
import { onDestroy, onMount } from 'svelte';
|
|
26
|
+
import { Raycaster, Vector3 } from 'three';
|
|
27
|
+
import RoomLabelItem from './RoomLabelItem';
|
|
28
|
+
|
|
29
|
+
function add_css(target) {
|
|
30
|
+
append_styles(target, "svelte-185yvaa", ".room-labels-container.svelte-185yvaa{width:100%;height:100%;position:relative;color:#fff}");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function get_each_context(ctx, list, i) {
|
|
34
|
+
const child_ctx = ctx.slice();
|
|
35
|
+
child_ctx[9] = list[i];
|
|
36
|
+
return child_ctx;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// (70:2) {#each roomLabels as roomLableItem (roomLableItem.id)}
|
|
40
|
+
function create_each_block(key_1, ctx) {
|
|
41
|
+
let first;
|
|
42
|
+
let roomlabelitem;
|
|
43
|
+
let current;
|
|
44
|
+
|
|
45
|
+
roomlabelitem = new RoomLabelItem({
|
|
46
|
+
props: {
|
|
47
|
+
roomLabel: /*roomLableItem*/ ctx[9],
|
|
48
|
+
five: /*five*/ ctx[1]
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
key: key_1,
|
|
54
|
+
first: null,
|
|
55
|
+
c() {
|
|
56
|
+
first = empty();
|
|
57
|
+
create_component(roomlabelitem.$$.fragment);
|
|
58
|
+
this.first = first;
|
|
59
|
+
},
|
|
60
|
+
m(target, anchor) {
|
|
61
|
+
insert(target, first, anchor);
|
|
62
|
+
mount_component(roomlabelitem, target, anchor);
|
|
63
|
+
current = true;
|
|
64
|
+
},
|
|
65
|
+
p(new_ctx, dirty) {
|
|
66
|
+
ctx = new_ctx;
|
|
67
|
+
const roomlabelitem_changes = {};
|
|
68
|
+
if (dirty & /*roomLabels*/ 1) roomlabelitem_changes.roomLabel = /*roomLableItem*/ ctx[9];
|
|
69
|
+
if (dirty & /*five*/ 2) roomlabelitem_changes.five = /*five*/ ctx[1];
|
|
70
|
+
roomlabelitem.$set(roomlabelitem_changes);
|
|
71
|
+
},
|
|
72
|
+
i(local) {
|
|
73
|
+
if (current) return;
|
|
74
|
+
transition_in(roomlabelitem.$$.fragment, local);
|
|
75
|
+
current = true;
|
|
76
|
+
},
|
|
77
|
+
o(local) {
|
|
78
|
+
transition_out(roomlabelitem.$$.fragment, local);
|
|
79
|
+
current = false;
|
|
80
|
+
},
|
|
81
|
+
d(detaching) {
|
|
82
|
+
if (detaching) detach(first);
|
|
83
|
+
destroy_component(roomlabelitem, detaching);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function create_fragment(ctx) {
|
|
89
|
+
let div;
|
|
90
|
+
let each_blocks = [];
|
|
91
|
+
let each_1_lookup = new Map();
|
|
92
|
+
let div_resize_listener;
|
|
93
|
+
let current;
|
|
94
|
+
let each_value = /*roomLabels*/ ctx[0];
|
|
95
|
+
const get_key = ctx => /*roomLableItem*/ ctx[9].id;
|
|
96
|
+
|
|
97
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
98
|
+
let child_ctx = get_each_context(ctx, each_value, i);
|
|
99
|
+
let key = get_key(child_ctx);
|
|
100
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
c() {
|
|
105
|
+
div = element("div");
|
|
106
|
+
|
|
107
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
108
|
+
each_blocks[i].c();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
attr(div, "class", "room-labels-container svelte-185yvaa");
|
|
112
|
+
add_render_callback(() => /*div_elementresize_handler*/ ctx[4].call(div));
|
|
113
|
+
},
|
|
114
|
+
m(target, anchor) {
|
|
115
|
+
insert(target, div, anchor);
|
|
116
|
+
|
|
117
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
118
|
+
each_blocks[i].m(div, null);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
div_resize_listener = add_resize_listener(div, /*div_elementresize_handler*/ ctx[4].bind(div));
|
|
122
|
+
current = true;
|
|
123
|
+
},
|
|
124
|
+
p(ctx, [dirty]) {
|
|
125
|
+
if (dirty & /*roomLabels, five*/ 3) {
|
|
126
|
+
each_value = /*roomLabels*/ ctx[0];
|
|
127
|
+
group_outros();
|
|
128
|
+
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, outro_and_destroy_block, create_each_block, null, get_each_context);
|
|
129
|
+
check_outros();
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
i(local) {
|
|
133
|
+
if (current) return;
|
|
134
|
+
|
|
135
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
136
|
+
transition_in(each_blocks[i]);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
current = true;
|
|
140
|
+
},
|
|
141
|
+
o(local) {
|
|
142
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
143
|
+
transition_out(each_blocks[i]);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
current = false;
|
|
147
|
+
},
|
|
148
|
+
d(detaching) {
|
|
149
|
+
if (detaching) detach(div);
|
|
150
|
+
|
|
151
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
152
|
+
each_blocks[i].d();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
div_resize_listener();
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function instance($$self, $$props, $$invalidate) {
|
|
161
|
+
let { five } = $$props;
|
|
162
|
+
let { roomLabels } = $$props;
|
|
163
|
+
let containerWidth;
|
|
164
|
+
let containerHeight;
|
|
165
|
+
|
|
166
|
+
function getLabelVisible(five, roomLabelItem) {
|
|
167
|
+
// 先看是不是在当前展示的楼层上
|
|
168
|
+
const isLabelInFloor = five.model.shownFloor === null || roomLabelItem.floorIndex === five.model.shownFloor;
|
|
169
|
+
|
|
170
|
+
if (!isLabelInFloor) return false;
|
|
171
|
+
|
|
172
|
+
// 再看是不是被模型遮挡
|
|
173
|
+
const raycaster = new Raycaster();
|
|
174
|
+
|
|
175
|
+
const cameraPosition = five.camera.position.clone();
|
|
176
|
+
const position = new Vector3(roomLabelItem.position.x, roomLabelItem.position.y, roomLabelItem.position.z);
|
|
177
|
+
const vectorDistance = position.distanceTo(cameraPosition);
|
|
178
|
+
raycaster.set(cameraPosition.clone(), position.clone().sub(cameraPosition).normalize());
|
|
179
|
+
const [intersection] = five.model.intersectRaycaster(raycaster);
|
|
180
|
+
if (intersection && intersection.distance + 1 < vectorDistance) return false;
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function getLabelTransform(five, roomLabelItem) {
|
|
185
|
+
const position = new Vector3(roomLabelItem.position.x, roomLabelItem.position.y, roomLabelItem.position.z);
|
|
186
|
+
const mouse = position.clone().project(five.camera);
|
|
187
|
+
const xOffset = Math.ceil((mouse.x + 1) / 2 * containerWidth);
|
|
188
|
+
const yOffset = Math.ceil((-mouse.y + 1) / 2 * containerHeight);
|
|
189
|
+
return `translate(${xOffset}px, ${yOffset}px)`;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function getFormatedRoomLabels(five, labels) {
|
|
193
|
+
const newLabels = labels.map(roomLabelItem => {
|
|
194
|
+
// 计算是否可见,如果不可见,不会更新位置
|
|
195
|
+
const visible = getLabelVisible(five, roomLabelItem);
|
|
196
|
+
|
|
197
|
+
if (!visible) return Object.assign(Object.assign({}, roomLabelItem), { visible });
|
|
198
|
+
|
|
199
|
+
// 更新位置
|
|
200
|
+
const transform = getLabelTransform(five, roomLabelItem);
|
|
201
|
+
|
|
202
|
+
return Object.assign(Object.assign({}, roomLabelItem), { visible, transform });
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
const sortedRoomLabelItems = newLabels.filter(({ visible }) => visible).map(roomLabelItem => ({
|
|
206
|
+
roomLabelItem,
|
|
207
|
+
distance: new Vector3(...Object.values(roomLabelItem.position)).clone().distanceTo(five.camera.position)
|
|
208
|
+
})).sort((a, b) => a.distance - b.distance);
|
|
209
|
+
|
|
210
|
+
return newLabels.map(roomLabelItem => {
|
|
211
|
+
const sortIndex = sortedRoomLabelItems.findIndex(item => item.roomLabelItem.id === roomLabelItem.id);
|
|
212
|
+
if (sortIndex !== undefined) return Object.assign(Object.assign({}, roomLabelItem), { zIndex: sortIndex * 10 });
|
|
213
|
+
return roomLabelItem;
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function onFiveCameraUpdate() {
|
|
218
|
+
$$invalidate(0, roomLabels = getFormatedRoomLabels(five, roomLabels));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
five.on('cameraUpdate', onFiveCameraUpdate);
|
|
222
|
+
five.on('modelShownFloorChange', onFiveCameraUpdate);
|
|
223
|
+
|
|
224
|
+
onDestroy(() => {
|
|
225
|
+
five.off('cameraUpdate', onFiveCameraUpdate);
|
|
226
|
+
five.off('modelShownFloorChange', onFiveCameraUpdate);
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
onMount(() => {
|
|
230
|
+
onFiveCameraUpdate();
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
function div_elementresize_handler() {
|
|
234
|
+
containerWidth = this.clientWidth;
|
|
235
|
+
containerHeight = this.clientHeight;
|
|
236
|
+
$$invalidate(2, containerWidth);
|
|
237
|
+
$$invalidate(3, containerHeight);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
$$self.$$set = $$props => {
|
|
241
|
+
if ('five' in $$props) $$invalidate(1, five = $$props.five);
|
|
242
|
+
if ('roomLabels' in $$props) $$invalidate(0, roomLabels = $$props.roomLabels);
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
return [roomLabels, five, containerWidth, containerHeight, div_elementresize_handler];
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
class Component extends SvelteComponent {
|
|
249
|
+
constructor(options) {
|
|
250
|
+
super();
|
|
251
|
+
init(this, options, instance, create_fragment, safe_not_equal, { five: 1, roomLabels: 0 }, add_css);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export default Component;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
import type { ModelTVVideoPluginExportType, ModelTVVideoPluginParameterType } from "./typings";
|
|
3
|
+
export declare const ModelTVVideoPlugin: FivePlugin<ModelTVVideoPluginParameterType, ModelTVVideoPluginExportType>;
|
|
4
|
+
export default ModelTVVideoPlugin;
|