@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,227 @@
|
|
|
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
|
+
null_to_empty,
|
|
14
|
+
safe_not_equal,
|
|
15
|
+
set_data,
|
|
16
|
+
set_style,
|
|
17
|
+
space,
|
|
18
|
+
text
|
|
19
|
+
} from "svelte/internal";
|
|
20
|
+
|
|
21
|
+
import "./events.type";
|
|
22
|
+
import classNames from 'classnames';
|
|
23
|
+
|
|
24
|
+
function add_css(target) {
|
|
25
|
+
append_styles(target, "svelte-1gam1w3", ".item-label-item.svelte-1gam1w3.svelte-1gam1w3{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;user-select:none;animation:svelte-1gam1w3-fadeIn .3s ease-in}.item-label-item.fold.svelte-1gam1w3>.item-label-item__text-wrap.svelte-1gam1w3{visibility:hidden}.item-label-item.fold.svelte-1gam1w3>.item-label-item__bar.anchor.svelte-1gam1w3{visibility:hidden}.item-label-item.fold.svelte-1gam1w3>.item-label-item__bar.anchor.svelte-1gam1w3:after{visibility:visible}.item-label-item__text-wrap.svelte-1gam1w3.svelte-1gam1w3{height:fit-content;padding:12px 20px 12px 12px;position:absolute;width:max-content;max-width:473px;min-height:92px;background-image:linear-gradient(269deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.60) 49%, rgba(31, 38, 46, 0.70) 100%);border:1.5px solid rgba(255, 255, 255, .65);border-radius:3px;color:white;transform:translate(-50%, 0);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;overflow:hidden;pointer-events:all}.icon-wrap.svelte-1gam1w3.svelte-1gam1w3{width:68px;height:100%;display:flex;justify-content:center;align-content:center}.icon.svelte-1gam1w3.svelte-1gam1w3{width:68px;height:68px;background-repeat:no-repeat;background-size:contain;background-position:center}.item-label-text.svelte-1gam1w3.svelte-1gam1w3{margin-left:12px;padding-left:12px;min-height:68px;height:auto;display:flex;flex-flow:column;justify-content:space-around;align-content:flex-start;border-left:solid rgba(255, 255, 255, .2) 1px;border-top:solid rgba(255, 255, 255, .2) 0;border-right:solid rgba(255, 255, 255, .2) 0;border-bottom:solid rgba(255, 255, 255, .2) 0;pointer-events:auto}.item-model.svelte-1gam1w3.svelte-1gam1w3{white-space:nowrap;font-size:22px;font-weight:bold;line-height:30px}.item-name.svelte-1gam1w3.svelte-1gam1w3{height:auto;word-wrap:break-word;word-break:break-all;font-size:20px;line-height:28px}.item-label-item__bar.svelte-1gam1w3.svelte-1gam1w3{position:absolute;bottom:0;width:3px;background-image:linear-gradient(to bottom, white, rgba(255, 255, 255, 0));box-shadow:0 2px 8px 0 rgba(0, 0, 0, 0.20);pointer-events:none}.item-label-item__bar.anchor.svelte-1gam1w3.svelte-1gam1w3:after{content:'';position:absolute;bottom:0;width:24px;height:24px;background-image:url(\"//vrlab-public.ljcdn.com/common/file/web/67e7a198-28c9-47dc-879b-507bd3ae600c.png \");background-position:center;background-size:contain;transform:translate(-10.5px, 50%)}@keyframes svelte-1gam1w3-fadeIn{from{opacity:0\n }to{opacity:1\n }}");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// (21:2) {#if itemLabel.icon}
|
|
29
|
+
function create_if_block(ctx) {
|
|
30
|
+
let div1;
|
|
31
|
+
let div0;
|
|
32
|
+
let div0_style_value;
|
|
33
|
+
let mounted;
|
|
34
|
+
let dispose;
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
c() {
|
|
38
|
+
div1 = element("div");
|
|
39
|
+
div0 = element("div");
|
|
40
|
+
attr(div0, "class", "icon svelte-1gam1w3");
|
|
41
|
+
attr(div0, "style", div0_style_value = `background-image: url(${/*itemLabel*/ ctx[0].icon})`);
|
|
42
|
+
attr(div1, "class", "icon-wrap svelte-1gam1w3");
|
|
43
|
+
},
|
|
44
|
+
m(target, anchor) {
|
|
45
|
+
insert(target, div1, anchor);
|
|
46
|
+
append(div1, div0);
|
|
47
|
+
|
|
48
|
+
if (!mounted) {
|
|
49
|
+
dispose = listen(div1, "click", /*click_handler*/ ctx[5]);
|
|
50
|
+
mounted = true;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
p(ctx, dirty) {
|
|
54
|
+
if (dirty & /*itemLabel*/ 1 && div0_style_value !== (div0_style_value = `background-image: url(${/*itemLabel*/ ctx[0].icon})`)) {
|
|
55
|
+
attr(div0, "style", div0_style_value);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
d(detaching) {
|
|
59
|
+
if (detaching) detach(div1);
|
|
60
|
+
mounted = false;
|
|
61
|
+
dispose();
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function create_fragment(ctx) {
|
|
67
|
+
let div3;
|
|
68
|
+
let div1;
|
|
69
|
+
let t0;
|
|
70
|
+
let div0;
|
|
71
|
+
let span0;
|
|
72
|
+
let t1_value = (/*itemLabel*/ ctx[0].code || /*itemLabel*/ ctx[0].id) + "";
|
|
73
|
+
let t1;
|
|
74
|
+
let t2;
|
|
75
|
+
let span1;
|
|
76
|
+
let t3_value = /*itemLabel*/ ctx[0].name + "";
|
|
77
|
+
let t3;
|
|
78
|
+
let div1_class_value;
|
|
79
|
+
let t4;
|
|
80
|
+
let div2;
|
|
81
|
+
let div2_class_value;
|
|
82
|
+
let div3_class_value;
|
|
83
|
+
let mounted;
|
|
84
|
+
let dispose;
|
|
85
|
+
let if_block = /*itemLabel*/ ctx[0].icon && create_if_block(ctx);
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
c() {
|
|
89
|
+
div3 = element("div");
|
|
90
|
+
div1 = element("div");
|
|
91
|
+
if (if_block) if_block.c();
|
|
92
|
+
t0 = space();
|
|
93
|
+
div0 = element("div");
|
|
94
|
+
span0 = element("span");
|
|
95
|
+
t1 = text(t1_value);
|
|
96
|
+
t2 = space();
|
|
97
|
+
span1 = element("span");
|
|
98
|
+
t3 = text(t3_value);
|
|
99
|
+
t4 = space();
|
|
100
|
+
div2 = element("div");
|
|
101
|
+
attr(span0, "class", "item-model svelte-1gam1w3");
|
|
102
|
+
attr(span1, "class", "item-name svelte-1gam1w3");
|
|
103
|
+
attr(div0, "class", "item-label-text svelte-1gam1w3");
|
|
104
|
+
attr(div1, "class", div1_class_value = "" + (null_to_empty(classNames("item-label-item__text-wrap")) + " svelte-1gam1w3"));
|
|
105
|
+
set_style(div1, "bottom", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
106
|
+
attr(div2, "class", div2_class_value = "" + (null_to_empty(classNames("item-label-item__bar", { anchor: /*anchorEnabled*/ ctx[1] })) + " svelte-1gam1w3"));
|
|
107
|
+
set_style(div2, "height", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
108
|
+
attr(div3, "class", div3_class_value = "" + (null_to_empty(classNames("item-label-item", { fold: /*itemLabel*/ ctx[0].isFold })) + " svelte-1gam1w3"));
|
|
109
|
+
set_style(div3, "z-index", /*itemLabel*/ ctx[0].zIndex, false);
|
|
110
|
+
set_style(div3, "transform", /*itemLabel*/ ctx[0].transform, false);
|
|
111
|
+
},
|
|
112
|
+
m(target, anchor) {
|
|
113
|
+
insert(target, div3, anchor);
|
|
114
|
+
append(div3, div1);
|
|
115
|
+
if (if_block) if_block.m(div1, null);
|
|
116
|
+
append(div1, t0);
|
|
117
|
+
append(div1, div0);
|
|
118
|
+
append(div0, span0);
|
|
119
|
+
append(span0, t1);
|
|
120
|
+
append(div0, t2);
|
|
121
|
+
append(div0, span1);
|
|
122
|
+
append(span1, t3);
|
|
123
|
+
append(div3, t4);
|
|
124
|
+
append(div3, div2);
|
|
125
|
+
|
|
126
|
+
if (!mounted) {
|
|
127
|
+
dispose = listen(div1, "click", /*onClick*/ ctx[3]);
|
|
128
|
+
mounted = true;
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
p(ctx, [dirty]) {
|
|
132
|
+
if (/*itemLabel*/ ctx[0].icon) {
|
|
133
|
+
if (if_block) {
|
|
134
|
+
if_block.p(ctx, dirty);
|
|
135
|
+
} else {
|
|
136
|
+
if_block = create_if_block(ctx);
|
|
137
|
+
if_block.c();
|
|
138
|
+
if_block.m(div1, t0);
|
|
139
|
+
}
|
|
140
|
+
} else if (if_block) {
|
|
141
|
+
if_block.d(1);
|
|
142
|
+
if_block = null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (dirty & /*itemLabel*/ 1 && t1_value !== (t1_value = (/*itemLabel*/ ctx[0].code || /*itemLabel*/ ctx[0].id) + "")) set_data(t1, t1_value);
|
|
146
|
+
if (dirty & /*itemLabel*/ 1 && t3_value !== (t3_value = /*itemLabel*/ ctx[0].name + "")) set_data(t3, t3_value);
|
|
147
|
+
|
|
148
|
+
if (dirty & /*itemLabel*/ 1) {
|
|
149
|
+
set_style(div1, "bottom", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (dirty & /*anchorEnabled*/ 2 && div2_class_value !== (div2_class_value = "" + (null_to_empty(classNames("item-label-item__bar", { anchor: /*anchorEnabled*/ ctx[1] })) + " svelte-1gam1w3"))) {
|
|
153
|
+
attr(div2, "class", div2_class_value);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (dirty & /*itemLabel*/ 1) {
|
|
157
|
+
set_style(div2, "height", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (dirty & /*itemLabel*/ 1 && div3_class_value !== (div3_class_value = "" + (null_to_empty(classNames("item-label-item", { fold: /*itemLabel*/ ctx[0].isFold })) + " svelte-1gam1w3"))) {
|
|
161
|
+
attr(div3, "class", div3_class_value);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (dirty & /*itemLabel*/ 1) {
|
|
165
|
+
set_style(div3, "z-index", /*itemLabel*/ ctx[0].zIndex, false);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (dirty & /*itemLabel*/ 1) {
|
|
169
|
+
set_style(div3, "transform", /*itemLabel*/ ctx[0].transform, false);
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
i: noop,
|
|
173
|
+
o: noop,
|
|
174
|
+
d(detaching) {
|
|
175
|
+
if (detaching) detach(div3);
|
|
176
|
+
if (if_block) if_block.d();
|
|
177
|
+
mounted = false;
|
|
178
|
+
dispose();
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function instance($$self, $$props, $$invalidate) {
|
|
184
|
+
let { itemLabel } = $$props;
|
|
185
|
+
let { hooks } = $$props;
|
|
186
|
+
let { anchorEnabled } = $$props;
|
|
187
|
+
let { onIconClick } = $$props;
|
|
188
|
+
|
|
189
|
+
// const defaultIcon = '//vrlab-public.ljcdn.com/common/file/web/c8591aaa-e62b-4e31-8fed-671483ace37f.svg\n'
|
|
190
|
+
function onClick() {
|
|
191
|
+
hooks.emit('onLabelClick', itemLabel);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
const click_handler = e => onIconClick(itemLabel);
|
|
195
|
+
|
|
196
|
+
$$self.$$set = $$props => {
|
|
197
|
+
if ('itemLabel' in $$props) $$invalidate(0, itemLabel = $$props.itemLabel);
|
|
198
|
+
if ('hooks' in $$props) $$invalidate(4, hooks = $$props.hooks);
|
|
199
|
+
if ('anchorEnabled' in $$props) $$invalidate(1, anchorEnabled = $$props.anchorEnabled);
|
|
200
|
+
if ('onIconClick' in $$props) $$invalidate(2, onIconClick = $$props.onIconClick);
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
return [itemLabel, anchorEnabled, onIconClick, onClick, hooks, click_handler];
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
class Component extends SvelteComponent {
|
|
207
|
+
constructor(options) {
|
|
208
|
+
super();
|
|
209
|
+
|
|
210
|
+
init(
|
|
211
|
+
this,
|
|
212
|
+
options,
|
|
213
|
+
instance,
|
|
214
|
+
create_fragment,
|
|
215
|
+
safe_not_equal,
|
|
216
|
+
{
|
|
217
|
+
itemLabel: 0,
|
|
218
|
+
hooks: 4,
|
|
219
|
+
anchorEnabled: 1,
|
|
220
|
+
onIconClick: 2
|
|
221
|
+
},
|
|
222
|
+
add_css
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export default Component;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FivePlugin } from "@realsee/five";
|
|
2
|
+
import { ItemLabelPluginExportReturnsType, ItemLabelPluginParametersType } from "./typings";
|
|
3
|
+
export declare const Plugin: FivePlugin<ItemLabelPluginParametersType, ItemLabelPluginExportReturnsType>;
|
|
4
|
+
export default Plugin;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Subscribe } from "@realsee/five";
|
|
2
|
+
import ItemLabelComponent from './ItemLabelComponent';
|
|
3
|
+
import { ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE } from "./typings";
|
|
4
|
+
import { parseItemLabelPluginData } from "./utils/parseData";
|
|
5
|
+
const defaultMaxVisibleDistance = undefined;
|
|
6
|
+
export const Plugin = (five, params) => {
|
|
7
|
+
var _a, _b, _c;
|
|
8
|
+
const pluginState = {
|
|
9
|
+
container: document.createElement('div'),
|
|
10
|
+
data: null,
|
|
11
|
+
enabled: true,
|
|
12
|
+
fiveModeEnabled: true,
|
|
13
|
+
itemLabels: [],
|
|
14
|
+
wrapper: null,
|
|
15
|
+
app: undefined,
|
|
16
|
+
hooks: new Subscribe(),
|
|
17
|
+
modelOcclusionEnable: (_a = params === null || params === void 0 ? void 0 : params.modelOcclusionEnable) !== null && _a !== void 0 ? _a : true,
|
|
18
|
+
displayStrategyType: (_b = params === null || params === void 0 ? void 0 : params.displayStrategyType) !== null && _b !== void 0 ? _b : ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.SMALL,
|
|
19
|
+
maxVisibleDistance: (_c = params === null || params === void 0 ? void 0 : params.maxVisibleDistance) !== null && _c !== void 0 ? _c : defaultMaxVisibleDistance,
|
|
20
|
+
};
|
|
21
|
+
pluginState.container.setAttribute('class', 'item-label-plugin-container');
|
|
22
|
+
pluginState.container.style.cssText = `
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: 0;
|
|
25
|
+
top: 0;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
z-index: 5;
|
|
29
|
+
`;
|
|
30
|
+
pluginState.container.style.pointerEvents = 'none'; // 写到 cssText 里不生效
|
|
31
|
+
const appendTo = (wrapper) => {
|
|
32
|
+
pluginState.wrapper = wrapper;
|
|
33
|
+
wrapper.appendChild(pluginState.container);
|
|
34
|
+
render();
|
|
35
|
+
return true;
|
|
36
|
+
};
|
|
37
|
+
const load = (data) => {
|
|
38
|
+
pluginState.itemLabels = parseItemLabelPluginData(data);
|
|
39
|
+
render();
|
|
40
|
+
};
|
|
41
|
+
const enable = () => {
|
|
42
|
+
if (pluginState.enabled)
|
|
43
|
+
return true;
|
|
44
|
+
pluginState.enabled = true;
|
|
45
|
+
render();
|
|
46
|
+
return true;
|
|
47
|
+
};
|
|
48
|
+
const disable = () => {
|
|
49
|
+
if (!pluginState.enabled)
|
|
50
|
+
return true;
|
|
51
|
+
pluginState.enabled = false;
|
|
52
|
+
render();
|
|
53
|
+
return true;
|
|
54
|
+
};
|
|
55
|
+
const dispose = () => {
|
|
56
|
+
removeListener4Five();
|
|
57
|
+
pluginState.container.remove();
|
|
58
|
+
};
|
|
59
|
+
const render = () => {
|
|
60
|
+
var _a;
|
|
61
|
+
if (!pluginState.wrapper)
|
|
62
|
+
return;
|
|
63
|
+
// 只要不可展示,销毁容器
|
|
64
|
+
if (!pluginState.enabled || !pluginState.fiveModeEnabled) {
|
|
65
|
+
(_a = pluginState.app) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
66
|
+
pluginState.app = undefined;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
// 正常显示时,分为 app 存在和不存在两种情况,如果存在,传值,不存在则初始化并传值
|
|
70
|
+
if (!pluginState.app) {
|
|
71
|
+
pluginState.app = new ItemLabelComponent({
|
|
72
|
+
target: pluginState.container,
|
|
73
|
+
props: {
|
|
74
|
+
five: five,
|
|
75
|
+
modelOcclusionEnable: pluginState.modelOcclusionEnable,
|
|
76
|
+
itemLabels: pluginState.itemLabels,
|
|
77
|
+
wrapper: pluginState.wrapper,
|
|
78
|
+
hooks: pluginState.hooks,
|
|
79
|
+
displayStrategyType: pluginState.displayStrategyType,
|
|
80
|
+
maxVisibleDistance: pluginState.maxVisibleDistance
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
pluginState.app.$set({
|
|
86
|
+
five: five,
|
|
87
|
+
itemLabels: pluginState.itemLabels
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
// 添加 five 监听
|
|
92
|
+
const addListener4Five = () => {
|
|
93
|
+
// five.on('modeChange', onFiveModeChange)
|
|
94
|
+
five.once('dispose', dispose);
|
|
95
|
+
};
|
|
96
|
+
// 取消 five 监听
|
|
97
|
+
const removeListener4Five = () => {
|
|
98
|
+
// five.off('modeChange', onFiveModeChange)
|
|
99
|
+
};
|
|
100
|
+
const onFiveModeChange = (mode) => {
|
|
101
|
+
if (!pluginState.enabled)
|
|
102
|
+
return;
|
|
103
|
+
pluginState.fiveModeEnabled = false;
|
|
104
|
+
render();
|
|
105
|
+
five.once('initAnimationEnded', () => {
|
|
106
|
+
pluginState.fiveModeEnabled = true;
|
|
107
|
+
render();
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
addListener4Five();
|
|
111
|
+
return {
|
|
112
|
+
appendTo,
|
|
113
|
+
load,
|
|
114
|
+
enable,
|
|
115
|
+
disable,
|
|
116
|
+
dispose,
|
|
117
|
+
hooks: pluginState.hooks
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
export default Plugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SubscribeEventMap } from '@realsee/five';
|
|
2
|
+
import type { ItemLabel } from "./typings";
|
|
3
|
+
export interface ItemLabelEvent extends SubscribeEventMap {
|
|
4
|
+
/**
|
|
5
|
+
* 点击标签
|
|
6
|
+
*/
|
|
7
|
+
onLabelClick: (itemLabel: ItemLabel) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare type PluginEvent = ItemLabelEvent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import ItemLabelPlugin from './Plugin';
|
|
2
|
+
export { ItemLabelPlugin };
|
|
3
|
+
export default ItemLabelPlugin;
|
|
4
|
+
export declare const itemLabelPluginServerParams: {
|
|
5
|
+
name: string;
|
|
6
|
+
version: number;
|
|
7
|
+
};
|
|
8
|
+
export type { ItemLabelPluginParametersType, ItemLabelPluginData, ItemLabelPluginExportReturnsType } from './typings';
|
|
9
|
+
export { ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE } from './typings';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import ItemLabelPlugin from './Plugin';
|
|
2
|
+
export { ItemLabelPlugin };
|
|
3
|
+
export default ItemLabelPlugin;
|
|
4
|
+
export const itemLabelPluginServerParams = {
|
|
5
|
+
name: 'ItemLabelPlugin',
|
|
6
|
+
version: 0,
|
|
7
|
+
};
|
|
8
|
+
export { ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE } from './typings';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Subscribe } from "@realsee/five";
|
|
2
|
+
import type { PluginEvent } from "./events.type";
|
|
3
|
+
import type ItemLabelComponent from './ItemLabelComponent';
|
|
4
|
+
export declare enum ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE {
|
|
5
|
+
SMALL = "small",
|
|
6
|
+
MIDLLE = "middle",
|
|
7
|
+
LARGE = "large",
|
|
8
|
+
EXTRA_LARGE = "x-large"
|
|
9
|
+
}
|
|
10
|
+
export interface ItemLabelPluginParametersType {
|
|
11
|
+
maxVisibleDistance?: number;
|
|
12
|
+
modelOcclusionEnable?: boolean;
|
|
13
|
+
displayStrategyType?: Partial<ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE>;
|
|
14
|
+
}
|
|
15
|
+
export interface ItemLabelPluginData {
|
|
16
|
+
item_labels: Readonly<{
|
|
17
|
+
id: string;
|
|
18
|
+
code: string;
|
|
19
|
+
name: string;
|
|
20
|
+
position: [number, number, number];
|
|
21
|
+
type?: string[];
|
|
22
|
+
icon?: string;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}>[];
|
|
25
|
+
}
|
|
26
|
+
export interface ItemLabel {
|
|
27
|
+
id: string;
|
|
28
|
+
code: string;
|
|
29
|
+
name: string;
|
|
30
|
+
position: [number, number, number];
|
|
31
|
+
modelPosition: [number, number, number];
|
|
32
|
+
type?: string[];
|
|
33
|
+
icon?: string;
|
|
34
|
+
observerIndex?: number | undefined;
|
|
35
|
+
visible?: boolean;
|
|
36
|
+
isFold?: boolean;
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}
|
|
39
|
+
export interface ItemLabelPluginExportReturnsType {
|
|
40
|
+
appendTo: (wrapper: Element) => void;
|
|
41
|
+
load: (data: ItemLabelPluginData) => void;
|
|
42
|
+
disable: () => void;
|
|
43
|
+
enable: () => void;
|
|
44
|
+
dispose: () => void;
|
|
45
|
+
hooks: Subscribe<PluginEvent>;
|
|
46
|
+
}
|
|
47
|
+
export interface ItemLabelPluginState {
|
|
48
|
+
container: HTMLDivElement;
|
|
49
|
+
data: ItemLabelPluginData | null;
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
itemLabels: ItemLabel[];
|
|
52
|
+
wrapper: HTMLElement | null;
|
|
53
|
+
fiveModeEnabled: boolean;
|
|
54
|
+
app?: ItemLabelComponent | undefined;
|
|
55
|
+
hooks: Subscribe<PluginEvent>;
|
|
56
|
+
modelOcclusionEnable: boolean;
|
|
57
|
+
displayStrategyType: Partial<ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE>;
|
|
58
|
+
maxVisibleDistance: number | undefined;
|
|
59
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE;
|
|
2
|
+
(function (ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE) {
|
|
3
|
+
ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE["SMALL"] = "small";
|
|
4
|
+
ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE["MIDLLE"] = "middle";
|
|
5
|
+
ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE["LARGE"] = "large";
|
|
6
|
+
ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE["EXTRA_LARGE"] = "x-large";
|
|
7
|
+
})(ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE || (ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getLabelTransform: (cssOffset: [number, number]) => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 展示策略
|
|
3
|
+
* */
|
|
4
|
+
import { ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE } from "../typings";
|
|
5
|
+
export const getStrokeLength = (itemSpaceHeight, type) => {
|
|
6
|
+
switch (type) {
|
|
7
|
+
case ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.SMALL:
|
|
8
|
+
return Math.ceil(-27.78 * itemSpaceHeight + 85);
|
|
9
|
+
case ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.MIDLLE:
|
|
10
|
+
return Math.ceil(-38.9 * itemSpaceHeight + 130);
|
|
11
|
+
case ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.LARGE:
|
|
12
|
+
return Math.ceil(-44.44 * itemSpaceHeight + 140);
|
|
13
|
+
case ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.EXTRA_LARGE:
|
|
14
|
+
return Math.ceil(-92.59 * itemSpaceHeight + 300);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
const { Raycaster, Vector3 } = THREE;
|
|
3
|
+
/**
|
|
4
|
+
* 碰撞检测可见性
|
|
5
|
+
* */
|
|
6
|
+
export const isImpacted = (five, sourceVector, targetVector, distance) => {
|
|
7
|
+
const direction = sourceVector.clone().sub(targetVector).normalize();
|
|
8
|
+
const raycaster = new Raycaster();
|
|
9
|
+
raycaster.set(targetVector, direction);
|
|
10
|
+
const [intersection] = five.model.intersectRaycaster(raycaster);
|
|
11
|
+
return intersection && intersection.distance + 0.01 < distance;
|
|
12
|
+
// return intersection && distance <= intersection.distance + 0.1
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
export interface ModelChassisCompassPluginParameterType {
|
|
3
|
+
north_rad?: number;
|
|
4
|
+
fbx_url?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ModelChassisCompassPluginData {
|
|
7
|
+
north_rad?: number;
|
|
8
|
+
fbx_url?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ModelChassisCompassPluginExportType {
|
|
11
|
+
enable: () => void;
|
|
12
|
+
disable: () => void;
|
|
13
|
+
load: (data?: ModelChassisCompassPluginData) => Promise<boolean>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 模型底盘指南针插件
|
|
17
|
+
*/
|
|
18
|
+
export declare const ModelChassisCompassPlugin: FivePlugin<ModelChassisCompassPluginParameterType, ModelChassisCompassPluginExportType>;
|
|
19
|
+
export default ModelChassisCompassPlugin;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader';
|
|
3
|
+
import object3d2LocalMatrix from '../shared-utils/object3d2LocalMatrix';
|
|
4
|
+
import transfromToMeshBasicMaterial from '../shared-utils/three/transfromToMeshBasicMaterial';
|
|
5
|
+
/**
|
|
6
|
+
* 模型底盘指南针插件
|
|
7
|
+
*/
|
|
8
|
+
export const ModelChassisCompassPlugin = (five, params) => {
|
|
9
|
+
var _a;
|
|
10
|
+
const defaultFbxUrl = params.fbx_url || '//vrlab-static.ljcdn.com/release/web/v3/dipan3/dipan.FBX';
|
|
11
|
+
const defaultNorthRad = (_a = params.north_rad) !== null && _a !== void 0 ? _a : undefined;
|
|
12
|
+
// 局部状态
|
|
13
|
+
const state = {};
|
|
14
|
+
const load = async (data) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const fbxUrl = (data === null || data === void 0 ? void 0 : data.fbx_url) || defaultFbxUrl;
|
|
17
|
+
const northRad = (_a = data === null || data === void 0 ? void 0 : data.north_rad) !== null && _a !== void 0 ? _a : defaultNorthRad;
|
|
18
|
+
if (typeof northRad !== 'number') {
|
|
19
|
+
throw new Error('"northRad"配置参数缺失:未配置指南针指向!');
|
|
20
|
+
}
|
|
21
|
+
const bounding = five.model.bounding;
|
|
22
|
+
const xOffset = bounding.max.x - bounding.min.x;
|
|
23
|
+
const zOffset = bounding.max.z - bounding.min.z;
|
|
24
|
+
const maxOffset = Math.max(xOffset, zOffset);
|
|
25
|
+
const fbxLoader = new FBXLoader();
|
|
26
|
+
const object = await fbxLoader.loadAsync(fbxUrl);
|
|
27
|
+
transfromToMeshBasicMaterial(object, {
|
|
28
|
+
transparent: true,
|
|
29
|
+
side: THREE.DoubleSide,
|
|
30
|
+
blending: THREE.AdditiveBlending,
|
|
31
|
+
});
|
|
32
|
+
const rotation = [0, northRad - Math.PI / 2, 0];
|
|
33
|
+
const { model: { bounding: { max: { x: xMax, z: zMax }, min: { x: xMin, y: yMin, z: zMin }, }, }, } = five;
|
|
34
|
+
state.yBase = yMin;
|
|
35
|
+
const position = { x: (xMax + xMin) / 2, y: yMin - 1.6, z: (zMax + zMin) / 2 };
|
|
36
|
+
const scale = 0.0045 * maxOffset;
|
|
37
|
+
object3d2LocalMatrix(object, { position, rotation, scale });
|
|
38
|
+
state.object = object;
|
|
39
|
+
return true;
|
|
40
|
+
};
|
|
41
|
+
const onCameraUpdate = ({ latitude }) => {
|
|
42
|
+
if (!state.object)
|
|
43
|
+
return;
|
|
44
|
+
const y = getPositionY(latitude);
|
|
45
|
+
if (y) {
|
|
46
|
+
state.object.position.y = y;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const getPositionY = (latitude) => {
|
|
50
|
+
if (state.yBase === undefined)
|
|
51
|
+
return;
|
|
52
|
+
const difference = 0.6;
|
|
53
|
+
if (latitude >= Math.PI / 4)
|
|
54
|
+
return state.yBase - (difference + 1.6);
|
|
55
|
+
const ratio = latitude * (4 / Math.PI);
|
|
56
|
+
return state.yBase - (difference * ratio + 1.6);
|
|
57
|
+
};
|
|
58
|
+
const enable = () => {
|
|
59
|
+
if (!state.object)
|
|
60
|
+
return;
|
|
61
|
+
const y = getPositionY(five.getPose().latitude);
|
|
62
|
+
if (y)
|
|
63
|
+
state.object.position.y = y;
|
|
64
|
+
five.scene.add(state.object);
|
|
65
|
+
five.needsRender = true;
|
|
66
|
+
five.on('cameraDirectionUpdate', onCameraUpdate);
|
|
67
|
+
};
|
|
68
|
+
const disable = () => {
|
|
69
|
+
if (!state.object)
|
|
70
|
+
return;
|
|
71
|
+
five.scene.remove(state.object);
|
|
72
|
+
five.needsRender = true;
|
|
73
|
+
five.off('cameraDirectionUpdate', onCameraUpdate);
|
|
74
|
+
};
|
|
75
|
+
return { load, disable, enable };
|
|
76
|
+
};
|
|
77
|
+
export default ModelChassisCompassPlugin;
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
north_rad?: number;
|
|
4
|
-
fbx_url?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface ModelChassisCompassPluginData {
|
|
7
|
-
north_rad?: number;
|
|
8
|
-
fbx_url?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface ModelChassisCompassPluginExportType {
|
|
11
|
-
enable: () => void;
|
|
12
|
-
disable: () => void;
|
|
13
|
-
load: (data?: ModelChassisCompassPluginData) => Promise<boolean>;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* 模型底盘指南针插件
|
|
17
|
-
*/
|
|
18
|
-
export declare const ModelChassisCompassPlugin: FivePlugin<ModelChassisCompassPluginParameterType, ModelChassisCompassPluginExportType>;
|
|
1
|
+
import ModelChassisCompassPlugin from './Plugin';
|
|
2
|
+
export { ModelChassisCompassPlugin };
|
|
19
3
|
export default ModelChassisCompassPlugin;
|
|
4
|
+
export type { ModelChassisCompassPluginParameterType, ModelChassisCompassPluginData, ModelChassisCompassPluginExportType } from './Plugin';
|