@realsee/dnalogel 2.0.0-alpha.9 → 2.0.0-beta.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -28
- package/components/index.js +1450 -0
- package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +3 -48
- package/dist/CSS3DRenderPlugin/index.js +27 -26
- package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +4 -6
- package/dist/CameraMovementPlugin/index.js +12 -12
- package/dist/CameraMovementPlugin/typing.d.ts +1 -1
- package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.js +941 -0
- package/dist/ItemLabelPlugin/typings.d.ts +59 -0
- package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/dist/ModelChassisCompassPlugin/index.js +8 -5
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/dist/ModelEntryDoorGuidePlugin/index.js +20 -20
- package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.js +674 -0
- package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelRoomLabelPlugin/index.js +153 -73
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +5 -0
- package/dist/ModelTVVideoPlugin/index.js +301 -0
- package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
- package/dist/ModelViewPlugin/index.d.ts +3 -16
- package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/dist/PanoCompassPlugin/index.d.ts +4 -47
- package/dist/PanoCompassPlugin/index.js +242 -129
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/dist/PanoCursorRaycasterPlugin/index.js +5 -3
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +12 -9
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +18 -9
- package/dist/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/dist/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +5 -2
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +50 -15
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +5 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/dist/PanoMeasurePlugin/index.d.ts +9 -6
- package/dist/PanoMeasurePlugin/index.js +2649 -3442
- package/dist/PanoMeasurePlugin/typings/data.d.ts +4 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +14 -5
- package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -2
- package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.d.ts +4 -30
- package/dist/PanoRulerPlugin/index.js +12 -12
- package/dist/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
- package/dist/PanoSpatialTagPlugin/index.d.ts +5 -0
- package/dist/PanoSpatialTagPlugin/index.js +1307 -0
- package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/dist/base/BasePlugin.d.ts +100 -0
- package/dist/base/BasePluginWithData.d.ts +34 -0
- package/dist/components/PaintBrush/Controller.d.ts +43 -0
- package/dist/components/PaintBrush/Subscribe.d.ts +76 -0
- package/dist/components/PaintBrush/index.d.ts +27 -0
- package/dist/components/PaintBrush/style.d.ts +2 -0
- package/dist/components/PaintBrush/tween.d.ts +62 -0
- package/dist/components/PaintBrush/typings.d.ts +58 -0
- package/dist/components/PaintBrush/utils.d.ts +26 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +70 -77
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
- package/dist/floorplan/ModelFloorplanPlugin/index.js +2319 -1620
- package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +601 -266
- package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +53 -47
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +6 -4
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +2198 -1428
- package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/dist/floorplan/index.d.ts +6 -0
- package/dist/floorplan/utils/constant.d.ts +22 -0
- package/dist/floorplan/utils/correctFiveState.d.ts +15 -0
- package/dist/floorplan/utils/formatPosition.d.ts +1 -1
- package/dist/index.d.ts +15 -24
- package/dist/index.es.js +10694 -7145
- package/dist/index.js +10432 -6869
- package/dist/index.umd.js +10435 -6875
- package/dist/shared-utils/five/changeMode.d.ts +4 -1
- package/dist/shared-utils/getPxmm.d.ts +8 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/math/Interval.d.ts +13 -0
- package/dist/shared-utils/math/Rectangle.d.ts +27 -0
- package/dist/shared-utils/math/index.d.ts +2 -0
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/dist/shared-utils/three/getNormal.d.ts +1 -1
- package/dist/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/dist/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
- package/dist/shared-utils/uuid.d.ts +1 -0
- package/dist/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Magnifier.html +9 -0
- package/docs/classes/ModelRoomLabelController.html +5 -8
- package/docs/enums/CameraMovementEffect.html +3 -0
- package/docs/enums/DIRECTION.html +1 -0
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/Rotation.html +3 -0
- package/docs/index.html +78 -33
- package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
- package/docs/interfaces/FloorplanBounding.html +10 -0
- package/docs/interfaces/FloorplanData.html +3 -0
- package/docs/interfaces/FloorplanEntrance.html +15 -0
- package/docs/interfaces/FloorplanExtraObject.html +7 -0
- package/docs/interfaces/FloorplanExtraObject3D.html +3 -0
- package/docs/interfaces/FloorplanFloorData.html +3 -0
- package/docs/interfaces/FloorplanImagePosition.html +3 -0
- package/docs/interfaces/FloorplanObserver.html +5 -0
- package/docs/interfaces/FloorplanOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanPosition.html +3 -0
- package/docs/interfaces/FloorplanRoomItem.html +17 -0
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -0
- package/docs/interfaces/FloorplanServerBounding.html +10 -0
- package/docs/interfaces/FloorplanServerComputedData.html +1 -0
- package/docs/interfaces/FloorplanServerData.html +3 -0
- package/docs/interfaces/FloorplanServerEntrance.html +15 -0
- package/docs/interfaces/FloorplanServerFloorData.html +3 -0
- package/docs/interfaces/FloorplanServerImagePosition.html +3 -0
- package/docs/interfaces/FloorplanServerObserver.html +5 -0
- package/docs/interfaces/FloorplanServerOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanServerPosition.html +3 -0
- package/docs/interfaces/FloorplanServerRoomItem.html +20 -0
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -0
- package/docs/interfaces/ItemLabelPluginData.html +1 -0
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
- package/docs/interfaces/ModelViewPluginExportType.html +1 -0
- package/docs/interfaces/OpenParameter.html +3 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
- package/docs/interfaces/PanoMeasureParameterType.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
- package/docs/interfaces/Point.html +1 -0
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -0
- package/docs/interfaces/RoomInfo.html +1 -0
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -0
- package/docs/interfaces/Rooms.html +1 -0
- package/docs/modules.html +26 -18
- package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
- package/libs/CSS3DRenderPlugin/index.js +2 -180
- package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
- package/libs/CameraMovementPlugin/index.d.ts +4 -6
- package/libs/CameraMovementPlugin/index.js +3 -158
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +577 -0
- package/libs/ItemLabelPlugin/ItemLabelItem.js +227 -0
- package/libs/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/libs/ItemLabelPlugin/Plugin.js +120 -0
- package/libs/ItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ItemLabelPlugin/events.type.js +1 -0
- package/libs/ItemLabelPlugin/index.d.ts +9 -0
- package/libs/ItemLabelPlugin/index.js +8 -0
- package/libs/ItemLabelPlugin/typings.d.ts +59 -0
- package/libs/ItemLabelPlugin/typings.js +7 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.js +3 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.js +16 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.js +13 -0
- package/libs/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +4 -0
- package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/libs/ModelChassisCompassPlugin/Plugin.js +77 -0
- package/libs/ModelChassisCompassPlugin/index.d.ts +3 -18
- package/libs/ModelChassisCompassPlugin/index.js +2 -74
- package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +140 -0
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
- package/libs/ModelEntryDoorGuidePlugin/index.js +2 -136
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +409 -0
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
- package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/index.js +8 -0
- package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/libs/ModelItemLabelPlugin/typings.js +7 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ModelRoomLabelPlugin/Controller.js +65 -23
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +83 -45
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelSimulationPlugin/index.d.ts +33 -0
- package/libs/ModelSimulationPlugin/index.js +166 -0
- package/libs/ModelSimulationPlugin/shaders/fragment.d.ts +2 -0
- package/libs/ModelSimulationPlugin/shaders/fragment.js +96 -0
- package/libs/ModelSimulationPlugin/shaders/vertex.d.ts +2 -0
- package/libs/ModelSimulationPlugin/shaders/vertex.js +23 -0
- package/libs/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/libs/ModelTVVideoPlugin/Plugin.js +254 -0
- package/libs/ModelTVVideoPlugin/index.d.ts +5 -0
- package/libs/ModelTVVideoPlugin/index.js +4 -0
- package/libs/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/libs/ModelTVVideoPlugin/typings.js +8 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/libs/ModelTVVideoPlugin/utils/parseData.js +13 -0
- package/libs/ModelViewPlugin/Plugin.d.ts +17 -0
- package/libs/ModelViewPlugin/Plugin.js +160 -0
- package/libs/ModelViewPlugin/index.d.ts +3 -16
- package/libs/ModelViewPlugin/index.js +2 -159
- package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/libs/PanoCompassPlugin/Plugin.js +249 -0
- package/libs/PanoCompassPlugin/index.d.ts +4 -47
- package/libs/PanoCompassPlugin/index.js +3 -167
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +12 -9
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +77 -14
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +268 -155
- package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +337 -0
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +40 -20
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +246 -153
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +18 -9
- package/libs/PanoMeasurePlugin/Controller/index.js +182 -54
- package/libs/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/index.js +30 -5
- package/libs/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/libs/PanoMeasurePlugin/Model/line.js +61 -11
- package/libs/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/point.js +24 -4
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Model/polyline.js +20 -3
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +11 -14
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +5 -2
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +107 -25
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +23 -8
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +61 -26
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +50 -15
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +234 -59
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +84 -38
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.js +98 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +52 -17
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +5 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +84 -34
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +80 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +11 -1
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +64 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +265 -0
- package/libs/PanoMeasurePlugin/index.d.ts +9 -6
- package/libs/PanoMeasurePlugin/index.js +3 -1
- package/libs/PanoMeasurePlugin/typings/data.d.ts +4 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +14 -5
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +15 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/constants.js +7 -7
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +22 -16
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.js +8 -7
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +5 -5
- package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/libs/PanoRulerPlugin/Plugin.js +403 -0
- package/libs/PanoRulerPlugin/index.d.ts +4 -30
- package/libs/PanoRulerPlugin/index.js +2 -397
- package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
- package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
- package/libs/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +426 -0
- package/libs/PanoSpatialTagPlugin/index.d.ts +5 -0
- package/libs/PanoSpatialTagPlugin/index.js +5 -0
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/store.js +2 -0
- package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
- package/libs/PanoSpatialTagPlugin/style.js +8 -0
- package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
- package/libs/PanoSpatialTagPlugin/typings.js +1 -0
- package/libs/base/BasePlugin.d.ts +100 -0
- package/libs/base/BasePlugin.js +31 -0
- package/libs/base/BasePluginWithData.d.ts +34 -0
- package/libs/base/BasePluginWithData.js +4 -0
- package/libs/components/PaintBrush/Controller.d.ts +43 -0
- package/libs/components/PaintBrush/Controller.js +575 -0
- package/libs/components/PaintBrush/Subscribe.d.ts +76 -0
- package/libs/components/PaintBrush/Subscribe.js +121 -0
- package/libs/components/PaintBrush/index.d.ts +27 -0
- package/libs/components/PaintBrush/index.js +57 -0
- package/libs/components/PaintBrush/style.d.ts +2 -0
- package/libs/components/PaintBrush/style.js +102 -0
- package/libs/components/PaintBrush/tween.d.ts +62 -0
- package/libs/components/PaintBrush/tween.js +15 -0
- package/libs/components/PaintBrush/typings.d.ts +58 -0
- package/libs/components/PaintBrush/typings.js +6 -0
- package/libs/components/PaintBrush/utils.d.ts +26 -0
- package/libs/components/PaintBrush/utils.js +51 -0
- package/libs/components/index.d.ts +2 -0
- package/libs/components/index.js +3 -0
- package/libs/floorplan/Assets/compass.d.ts +1 -0
- package/libs/floorplan/Assets/compass.js +1 -0
- package/libs/floorplan/Components/BaseImage.js +10 -5
- package/libs/floorplan/Components/Camera.js +120 -0
- package/libs/floorplan/Components/Compass.js +120 -0
- package/libs/floorplan/Components/CurrentFloor.js +469 -0
- package/libs/floorplan/Components/Main.js +470 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +45 -8
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +30 -103
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +322 -0
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +309 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +30 -27
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +1 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +11 -9
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +70 -77
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +661 -325
- package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
- package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/libs/floorplan/ModelFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +49 -33
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +3 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +114 -53
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +194 -42
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -2
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +1 -0
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +53 -47
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +450 -154
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +6 -4
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +2 -2
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/index.d.ts +6 -0
- package/libs/floorplan/index.js +7 -0
- package/libs/floorplan/utils/constant.d.ts +22 -0
- package/libs/floorplan/utils/constant.js +23 -0
- package/libs/floorplan/utils/correctFiveState.d.ts +15 -0
- package/libs/floorplan/utils/correctFiveState.js +46 -0
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +3 -3
- package/libs/index.d.ts +15 -24
- package/libs/index.js +25 -14
- package/libs/shared-utils/Subscribe.js +8 -1
- package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
- package/libs/shared-utils/createCanvasTextTexture.js +6 -5
- package/libs/shared-utils/five/changeMode.d.ts +4 -1
- package/libs/shared-utils/five/changeMode.js +34 -13
- package/libs/shared-utils/getPxmm.d.ts +8 -0
- package/libs/shared-utils/getPxmm.js +25 -20
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +1 -0
- package/libs/shared-utils/math/Interval.d.ts +13 -0
- package/libs/shared-utils/math/Interval.js +40 -0
- package/libs/shared-utils/math/Rectangle.d.ts +27 -0
- package/libs/shared-utils/math/Rectangle.js +50 -0
- package/libs/shared-utils/math/evenNumber.js +1 -1
- package/libs/shared-utils/math/index.d.ts +2 -0
- package/libs/shared-utils/math/index.js +2 -0
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
- package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
- package/libs/shared-utils/tinyEJSrender.js +210 -0
- package/libs/shared-utils/uuid.d.ts +1 -0
- package/libs/shared-utils/uuid.js +1 -0
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +13 -6
- package/CHANGELOG.md +0 -30
- package/dist/shared-utils/five/useFivePlugin.d.ts +0 -1
- package/dist/shared-utils/useDebounce.d.ts +0 -8
- package/dist/shared-utils/useThrottle.d.ts +0 -8
- package/docs/enums/ModelFloorplanErrorType.html +0 -1
- package/docs/interfaces/ModelFloorplanParameterType.html +0 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +0 -5
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Subscribe } from "@realsee/five";
|
|
2
|
+
import type { PluginEvent } from "./events.type";
|
|
3
|
+
import type ItemLabelComponent from './ItemLabelComponent.svelte';
|
|
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
|
+
}
|
|
@@ -11,7 +11,7 @@ const ROOM_LABEL_BG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAY
|
|
|
11
11
|
/* src/ModelRoomLabelPlugin/RoomLabelItem.svelte generated by Svelte v3.47.0 */
|
|
12
12
|
|
|
13
13
|
function add_css$1(target) {
|
|
14
|
-
internal.append_styles(target, "svelte-
|
|
14
|
+
internal.append_styles(target, "svelte-1ak9fbs", ".room-label-item.svelte-1ak9fbs{position:absolute;font-size:0.41667rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.room-label-item__text.svelte-1ak9fbs{position:absolute;left:0;top:-3.33333rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.04167rem;min-width:1.66667rem;padding:0 0.3125rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1ak9fbs{position:absolute;top:-2.29167rem;height:2.5rem;width:1px;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1ak9fbs{font-size:0.52083rem}");
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function create_fragment$1(ctx) {
|
|
@@ -31,11 +31,11 @@ function create_fragment$1(ctx) {
|
|
|
31
31
|
t0 = internal.text(t0_value);
|
|
32
32
|
t1 = internal.space();
|
|
33
33
|
div0 = internal.element("div");
|
|
34
|
-
internal.attr(span, "class", "room-label-item__text svelte-
|
|
34
|
+
internal.attr(span, "class", "room-label-item__text svelte-1ak9fbs");
|
|
35
35
|
internal.set_style(span, "background-image", "url(" + ROOM_LABEL_BG + ")");
|
|
36
36
|
internal.toggle_class(span, "wide", /*roomLabel*/ ctx[0].name.length > 3);
|
|
37
|
-
internal.attr(div0, "class", "room-label-item__bar svelte-
|
|
38
|
-
internal.attr(div1, "class", "room-label-item svelte-
|
|
37
|
+
internal.attr(div0, "class", "room-label-item__bar svelte-1ak9fbs");
|
|
38
|
+
internal.attr(div1, "class", "room-label-item svelte-1ak9fbs");
|
|
39
39
|
internal.set_style(div1, "z-index", /*roomLabel*/ ctx[0].zIndex, false);
|
|
40
40
|
internal.set_style(div1, "transform", /*roomLabel*/ ctx[0].transform, false);
|
|
41
41
|
internal.set_style(div1, "opacity", /*roomLabel*/ ctx[0].visible ? 1 : 0, false);
|
|
@@ -110,17 +110,19 @@ class RoomLabelItem extends internal.SvelteComponent {
|
|
|
110
110
|
|
|
111
111
|
/* src/ModelRoomLabelPlugin/RoomLabelItems.svelte generated by Svelte v3.47.0 */
|
|
112
112
|
|
|
113
|
+
const { Map: Map_1 } = internal.globals;
|
|
114
|
+
|
|
113
115
|
function add_css(target) {
|
|
114
|
-
internal.append_styles(target, "svelte-
|
|
116
|
+
internal.append_styles(target, "svelte-9eg4zi", ".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}");
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
function get_each_context(ctx, list, i) {
|
|
118
120
|
const child_ctx = ctx.slice();
|
|
119
|
-
child_ctx[
|
|
121
|
+
child_ctx[12] = list[i];
|
|
120
122
|
return child_ctx;
|
|
121
123
|
}
|
|
122
124
|
|
|
123
|
-
// (
|
|
125
|
+
// (82:2) {#each roomLabels as roomLableItem (roomLableItem.id)}
|
|
124
126
|
function create_each_block(key_1, ctx) {
|
|
125
127
|
let first;
|
|
126
128
|
let roomlabelitem;
|
|
@@ -128,7 +130,7 @@ function create_each_block(key_1, ctx) {
|
|
|
128
130
|
|
|
129
131
|
roomlabelitem = new RoomLabelItem({
|
|
130
132
|
props: {
|
|
131
|
-
roomLabel: /*roomLableItem*/ ctx[
|
|
133
|
+
roomLabel: /*roomLableItem*/ ctx[12],
|
|
132
134
|
five: /*five*/ ctx[1]
|
|
133
135
|
}
|
|
134
136
|
});
|
|
@@ -149,7 +151,7 @@ function create_each_block(key_1, ctx) {
|
|
|
149
151
|
p(new_ctx, dirty) {
|
|
150
152
|
ctx = new_ctx;
|
|
151
153
|
const roomlabelitem_changes = {};
|
|
152
|
-
if (dirty & /*roomLabels*/ 1) roomlabelitem_changes.roomLabel = /*roomLableItem*/ ctx[
|
|
154
|
+
if (dirty & /*roomLabels*/ 1) roomlabelitem_changes.roomLabel = /*roomLableItem*/ ctx[12];
|
|
153
155
|
if (dirty & /*five*/ 2) roomlabelitem_changes.five = /*five*/ ctx[1];
|
|
154
156
|
roomlabelitem.$set(roomlabelitem_changes);
|
|
155
157
|
},
|
|
@@ -172,11 +174,11 @@ function create_each_block(key_1, ctx) {
|
|
|
172
174
|
function create_fragment(ctx) {
|
|
173
175
|
let div;
|
|
174
176
|
let each_blocks = [];
|
|
175
|
-
let each_1_lookup = new
|
|
177
|
+
let each_1_lookup = new Map_1();
|
|
176
178
|
let div_resize_listener;
|
|
177
179
|
let current;
|
|
178
180
|
let each_value = /*roomLabels*/ ctx[0];
|
|
179
|
-
const get_key = ctx => /*roomLableItem*/ ctx[
|
|
181
|
+
const get_key = ctx => /*roomLableItem*/ ctx[12].id;
|
|
180
182
|
|
|
181
183
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
182
184
|
let child_ctx = get_each_context(ctx, each_value, i);
|
|
@@ -192,8 +194,8 @@ function create_fragment(ctx) {
|
|
|
192
194
|
each_blocks[i].c();
|
|
193
195
|
}
|
|
194
196
|
|
|
195
|
-
internal.attr(div, "class", "room-labels-container svelte-
|
|
196
|
-
internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[
|
|
197
|
+
internal.attr(div, "class", "room-labels-container svelte-9eg4zi");
|
|
198
|
+
internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[6].call(div));
|
|
197
199
|
},
|
|
198
200
|
m(target, anchor) {
|
|
199
201
|
internal.insert(target, div, anchor);
|
|
@@ -202,7 +204,7 @@ function create_fragment(ctx) {
|
|
|
202
204
|
each_blocks[i].m(div, null);
|
|
203
205
|
}
|
|
204
206
|
|
|
205
|
-
div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[
|
|
207
|
+
div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[6].bind(div));
|
|
206
208
|
current = true;
|
|
207
209
|
},
|
|
208
210
|
p(ctx, [dirty]) {
|
|
@@ -242,22 +244,17 @@ function create_fragment(ctx) {
|
|
|
242
244
|
}
|
|
243
245
|
|
|
244
246
|
function instance($$self, $$props, $$invalidate) {
|
|
247
|
+
let rendererSize;
|
|
245
248
|
let { five } = $$props;
|
|
246
249
|
let { roomLabels } = $$props;
|
|
247
250
|
let containerWidth;
|
|
248
251
|
let containerHeight;
|
|
252
|
+
let shownFloor = null;
|
|
249
253
|
|
|
250
|
-
function getLabelVisible(
|
|
251
|
-
// 先看是不是在当前展示的楼层上
|
|
252
|
-
const isLabelInFloor = five.model.shownFloor === null || roomLabelItem.floorIndex === five.model.shownFloor;
|
|
253
|
-
|
|
254
|
-
if (!isLabelInFloor) return false;
|
|
255
|
-
|
|
256
|
-
// 再看是不是被模型遮挡
|
|
254
|
+
function getLabelVisible(item) {
|
|
257
255
|
const raycaster = new three.Raycaster();
|
|
258
|
-
|
|
259
256
|
const cameraPosition = five.camera.position.clone();
|
|
260
|
-
const position = new three.Vector3(
|
|
257
|
+
const position = new three.Vector3(item.position.x, item.position.y, item.position.z);
|
|
261
258
|
const vectorDistance = position.distanceTo(cameraPosition);
|
|
262
259
|
raycaster.set(cameraPosition.clone(), position.clone().sub(cameraPosition).normalize());
|
|
263
260
|
const [intersection] = five.model.intersectRaycaster(raycaster);
|
|
@@ -265,51 +262,60 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
265
262
|
return true;
|
|
266
263
|
}
|
|
267
264
|
|
|
268
|
-
function getLabelTransform(
|
|
269
|
-
const position = new three.Vector3(
|
|
265
|
+
function getLabelTransform(item, rendererSize) {
|
|
266
|
+
const position = new three.Vector3(item.position.x, item.position.y, item.position.z);
|
|
270
267
|
const mouse = position.clone().project(five.camera);
|
|
271
|
-
const xOffset = Math.ceil((mouse.x + 1) / 2 *
|
|
272
|
-
const yOffset = Math.ceil((-mouse.y + 1) / 2 *
|
|
268
|
+
const xOffset = Math.ceil((mouse.x + 1) / 2 * rendererSize.x);
|
|
269
|
+
const yOffset = Math.ceil((-mouse.y + 1) / 2 * rendererSize.y);
|
|
273
270
|
return `translate(${xOffset}px, ${yOffset}px)`;
|
|
274
271
|
}
|
|
275
272
|
|
|
276
|
-
function getFormatedRoomLabels(
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
273
|
+
function getFormatedRoomLabels(rendererSize) {
|
|
274
|
+
// 因为 item distance 需要重复计算,所以缓存一下
|
|
275
|
+
const distanceMap = new Map();
|
|
276
|
+
|
|
277
|
+
function getItemDistance(item) {
|
|
278
|
+
const cacheDistance = distanceMap.get(item.id);
|
|
279
|
+
if (cacheDistance) return cacheDistance;
|
|
280
|
+
const { x, y, z } = item.position;
|
|
281
|
+
const distance = new three.Vector3(x, y, z).clone().distanceTo(five.camera.position);
|
|
282
|
+
distanceMap.set(item.id, distance);
|
|
283
|
+
return distance;
|
|
284
|
+
}
|
|
280
285
|
|
|
281
|
-
|
|
286
|
+
const formatedItems = roomLabels.map(item => {
|
|
287
|
+
const visible = getLabelVisible(item);
|
|
282
288
|
|
|
283
|
-
|
|
284
|
-
|
|
289
|
+
const transform = visible
|
|
290
|
+
? getLabelTransform(item, rendererSize)
|
|
291
|
+
: item.transform;
|
|
285
292
|
|
|
286
|
-
|
|
287
|
-
});
|
|
293
|
+
const itemDistance = getItemDistance(item);
|
|
288
294
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
distance: new three.Vector3(...Object.values(roomLabelItem.position)).clone().distanceTo(five.camera.position)
|
|
292
|
-
})).sort((a, b) => a.distance - b.distance);
|
|
295
|
+
// visible === true 的 item 中,distance 比自己小的 item 个数
|
|
296
|
+
const minItemLen = roomLabels.filter(item => item.visible && getItemDistance(item) < itemDistance).length;
|
|
293
297
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
if (sortIndex !== undefined) return { ...roomLabelItem, zIndex: sortIndex * 10 };
|
|
297
|
-
return roomLabelItem;
|
|
298
|
+
const zIndex = minItemLen * 10;
|
|
299
|
+
return Object.assign(Object.assign({}, item), { visible, transform, zIndex });
|
|
298
300
|
});
|
|
301
|
+
|
|
302
|
+
return formatedItems;
|
|
299
303
|
}
|
|
300
304
|
|
|
301
305
|
function onFiveCameraUpdate() {
|
|
302
|
-
$$invalidate(0, roomLabels = getFormatedRoomLabels(
|
|
306
|
+
$$invalidate(0, roomLabels = getFormatedRoomLabels(rendererSize));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
function onFiveModelShownFloorChange(floorIndex) {
|
|
310
|
+
$$invalidate(4, shownFloor = floorIndex);
|
|
303
311
|
}
|
|
304
312
|
|
|
305
313
|
five.on('cameraUpdate', onFiveCameraUpdate);
|
|
314
|
+
five.on('modelShownFloorChange', onFiveModelShownFloorChange);
|
|
306
315
|
|
|
307
316
|
svelte.onDestroy(() => {
|
|
308
317
|
five.off('cameraUpdate', onFiveCameraUpdate);
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
svelte.onMount(() => {
|
|
312
|
-
onFiveCameraUpdate();
|
|
318
|
+
five.off('modelShownFloorChange', onFiveModelShownFloorChange);
|
|
313
319
|
});
|
|
314
320
|
|
|
315
321
|
function div_elementresize_handler() {
|
|
@@ -324,7 +330,39 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
324
330
|
if ('roomLabels' in $$props) $$invalidate(0, roomLabels = $$props.roomLabels);
|
|
325
331
|
};
|
|
326
332
|
|
|
327
|
-
|
|
333
|
+
$$self.$$.update = () => {
|
|
334
|
+
if ($$self.$$.dirty & /*containerWidth, containerHeight*/ 12) {
|
|
335
|
+
$$invalidate(5, rendererSize = { x: containerWidth, y: containerHeight });
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
if ($$self.$$.dirty & /*rendererSize*/ 32) {
|
|
339
|
+
{
|
|
340
|
+
// rendererSize 变化时,触发 reRender
|
|
341
|
+
$$invalidate(0, roomLabels = getFormatedRoomLabels(rendererSize));
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if ($$self.$$.dirty & /*roomLabels, shownFloor*/ 17) {
|
|
346
|
+
{
|
|
347
|
+
// shownFloor 变化时,更新 item visible
|
|
348
|
+
$$invalidate(0, roomLabels = roomLabels.map(item => {
|
|
349
|
+
const isLabelInFloor = shownFloor === null || item.floorIndex === shownFloor;
|
|
350
|
+
const visible = isLabelInFloor ? item.visible : false;
|
|
351
|
+
return Object.assign(Object.assign({}, item), { visible });
|
|
352
|
+
}));
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
return [
|
|
358
|
+
roomLabels,
|
|
359
|
+
five,
|
|
360
|
+
containerWidth,
|
|
361
|
+
containerHeight,
|
|
362
|
+
shownFloor,
|
|
363
|
+
rendererSize,
|
|
364
|
+
div_elementresize_handler
|
|
365
|
+
];
|
|
328
366
|
}
|
|
329
367
|
|
|
330
368
|
class RoomLabelItems extends internal.SvelteComponent {
|
|
@@ -350,14 +388,69 @@ function parseModelRoomLabelPluginData(data) {
|
|
|
350
388
|
}
|
|
351
389
|
|
|
352
390
|
class ModelRoomLabelController {
|
|
353
|
-
five;
|
|
354
|
-
enabled = true;
|
|
355
|
-
fiveModeEnabled;
|
|
356
|
-
app = undefined;
|
|
357
|
-
wrapper;
|
|
358
|
-
roomLabels = [];
|
|
359
|
-
container = document.createElement('div');
|
|
360
391
|
constructor(five) {
|
|
392
|
+
Object.defineProperty(this, "five", {
|
|
393
|
+
enumerable: true,
|
|
394
|
+
configurable: true,
|
|
395
|
+
writable: true,
|
|
396
|
+
value: void 0
|
|
397
|
+
});
|
|
398
|
+
Object.defineProperty(this, "enabled", {
|
|
399
|
+
enumerable: true,
|
|
400
|
+
configurable: true,
|
|
401
|
+
writable: true,
|
|
402
|
+
value: true
|
|
403
|
+
});
|
|
404
|
+
Object.defineProperty(this, "fiveModeEnabled", {
|
|
405
|
+
enumerable: true,
|
|
406
|
+
configurable: true,
|
|
407
|
+
writable: true,
|
|
408
|
+
value: void 0
|
|
409
|
+
});
|
|
410
|
+
Object.defineProperty(this, "app", {
|
|
411
|
+
enumerable: true,
|
|
412
|
+
configurable: true,
|
|
413
|
+
writable: true,
|
|
414
|
+
value: undefined
|
|
415
|
+
});
|
|
416
|
+
Object.defineProperty(this, "wrapper", {
|
|
417
|
+
enumerable: true,
|
|
418
|
+
configurable: true,
|
|
419
|
+
writable: true,
|
|
420
|
+
value: void 0
|
|
421
|
+
});
|
|
422
|
+
Object.defineProperty(this, "roomLabels", {
|
|
423
|
+
enumerable: true,
|
|
424
|
+
configurable: true,
|
|
425
|
+
writable: true,
|
|
426
|
+
value: []
|
|
427
|
+
});
|
|
428
|
+
Object.defineProperty(this, "container", {
|
|
429
|
+
enumerable: true,
|
|
430
|
+
configurable: true,
|
|
431
|
+
writable: true,
|
|
432
|
+
value: document.createElement('div')
|
|
433
|
+
});
|
|
434
|
+
/** 监听 Five Mode 变化
|
|
435
|
+
* @description
|
|
436
|
+
* Mode 不符合要求时,立刻消失,满足要求时,需要等待动画结束再展示
|
|
437
|
+
*/
|
|
438
|
+
Object.defineProperty(this, "onFiveModeChange", {
|
|
439
|
+
enumerable: true,
|
|
440
|
+
configurable: true,
|
|
441
|
+
writable: true,
|
|
442
|
+
value: (mode) => {
|
|
443
|
+
if (mode !== 'Floorplan') {
|
|
444
|
+
this.fiveModeEnabled = false;
|
|
445
|
+
this.render();
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
this.five.once('initAnimationEnded', () => {
|
|
449
|
+
this.fiveModeEnabled = this.five.currentMode === 'Floorplan';
|
|
450
|
+
this.render();
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
});
|
|
361
454
|
this.five = five;
|
|
362
455
|
this.fiveModeEnabled = this.five.currentMode === 'Floorplan';
|
|
363
456
|
// init container style
|
|
@@ -368,6 +461,7 @@ class ModelRoomLabelController {
|
|
|
368
461
|
this.container.style.pointerEvents = 'none';
|
|
369
462
|
this.container.style.left = '0';
|
|
370
463
|
this.container.style.top = '0';
|
|
464
|
+
this.container.style.zIndex = '5';
|
|
371
465
|
// five listener
|
|
372
466
|
this.five.once('dispose', () => this.dispose());
|
|
373
467
|
this.five.on('modeChange', this.onFiveModeChange);
|
|
@@ -410,26 +504,12 @@ class ModelRoomLabelController {
|
|
|
410
504
|
this.render();
|
|
411
505
|
return this;
|
|
412
506
|
}
|
|
413
|
-
/** 监听 Five Mode 变化
|
|
414
|
-
* @description
|
|
415
|
-
* Mode 不符合要求时,立刻消失,满足要求时,需要等待动画结束再展示
|
|
416
|
-
*/
|
|
417
|
-
onFiveModeChange = (mode) => {
|
|
418
|
-
if (mode !== 'Floorplan') {
|
|
419
|
-
this.fiveModeEnabled = false;
|
|
420
|
-
this.render();
|
|
421
|
-
return;
|
|
422
|
-
}
|
|
423
|
-
this.five.once('initAnimationEnded', () => {
|
|
424
|
-
this.fiveModeEnabled = this.five.currentMode === 'Floorplan';
|
|
425
|
-
this.render();
|
|
426
|
-
});
|
|
427
|
-
};
|
|
428
507
|
render() {
|
|
508
|
+
var _a;
|
|
429
509
|
if (!this.wrapper)
|
|
430
510
|
return;
|
|
431
511
|
if (!this.enabled || !this.fiveModeEnabled) {
|
|
432
|
-
this.app
|
|
512
|
+
(_a = this.app) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
433
513
|
this.app = undefined;
|
|
434
514
|
return;
|
|
435
515
|
}
|
|
@@ -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;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import ModelTVVideoPlugin from './Plugin';
|
|
2
|
+
export { ModelTVVideoPlugin };
|
|
3
|
+
export default ModelTVVideoPlugin;
|
|
4
|
+
export type { ModelTVVideoPluginParameterType, ModelTVVideoPluginData, Point, ModelTVVideoPluginExportType } from './typings';
|
|
5
|
+
export { DIRECTION } from './typings';
|