@realsee/dnalogel 2.0.0-alpha.7 → 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 +4 -0
- package/dist/CSS3DRenderPlugin/index.js +234 -0
- package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
- package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/dist/CameraMovementPlugin/index.d.ts +5 -0
- package/dist/CameraMovementPlugin/index.js +302 -0
- package/dist/CameraMovementPlugin/typing.d.ts +68 -0
- package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.js +941 -0
- package/dist/ItemLabelPlugin/typings.d.ts +59 -0
- package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/dist/ModelChassisCompassPlugin/index.d.ts +4 -0
- package/dist/ModelChassisCompassPlugin/index.js +145 -0
- package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +4 -0
- package/dist/ModelEntryDoorGuidePlugin/index.js +196 -0
- package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.d.ts +9 -0
- package/dist/ModelItemLabelPlugin/index.js +674 -0
- package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
- package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
- package/dist/ModelRoomLabelPlugin/index.js +541 -0
- package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
- package/dist/ModelTVVideoPlugin/index.d.ts +5 -0
- package/dist/ModelTVVideoPlugin/index.js +301 -0
- package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
- package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
- package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
- package/dist/ModelViewPlugin/index.d.ts +4 -0
- package/dist/ModelViewPlugin/index.js +187 -0
- package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
- package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
- package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.d.ts +8 -0
- package/dist/PanoCompassPlugin/index.js +636 -0
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
- package/dist/PanoCursorRaycasterPlugin/index.js +90 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +70 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +19 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/dist/PanoMeasurePlugin/index.d.ts +10 -0
- package/dist/PanoMeasurePlugin/index.js +3996 -0
- package/dist/PanoMeasurePlugin/typings/data.d.ts +32 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
- package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
- package/dist/PanoRulerPlugin/index.d.ts +5 -0
- package/dist/PanoRulerPlugin/index.js +610 -0
- package/dist/PanoRulerPlugin/style.d.ts +2 -0
- package/dist/PanoRulerPlugin/typings.d.ts +21 -0
- 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/Assets/camera.d.ts +1 -0
- package/dist/floorplan/Assets/compass.d.ts +1 -0
- package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +97 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +7 -0
- package/dist/floorplan/ModelFloorplanPlugin/index.js +4526 -0
- package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
- package/dist/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
- package/dist/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +36 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +7 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +2008 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +67 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +7 -0
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +4236 -0
- package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
- package/dist/floorplan/constant.d.ts +5 -0
- package/dist/floorplan/index.d.ts +6 -0
- package/dist/floorplan/typings/floorplanData.d.ts +137 -0
- package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
- package/dist/floorplan/typings/utility.d.ts +2 -0
- package/dist/floorplan/utils/constant.d.ts +22 -0
- package/dist/floorplan/utils/correctFiveState.d.ts +15 -0
- package/dist/floorplan/utils/formatData.d.ts +5 -0
- package/dist/floorplan/utils/formatPosition.d.ts +36 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.es.js +15436 -0
- package/dist/index.js +15488 -0
- package/dist/index.umd.js +15480 -0
- package/dist/shared-utils/Preloader.d.ts +6 -0
- package/dist/shared-utils/Subscribe.d.ts +45 -0
- package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
- package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
- package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
- package/dist/shared-utils/animationFrame/index.d.ts +15 -0
- package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
- package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
- package/dist/shared-utils/createLine/index.d.ts +3 -0
- package/dist/shared-utils/debounce.d.ts +6 -0
- package/dist/shared-utils/equal.d.ts +11 -0
- package/dist/shared-utils/filter.d.ts +27 -0
- package/dist/shared-utils/five/changeMode.d.ts +5 -0
- package/dist/shared-utils/formatRad.d.ts +7 -0
- package/dist/shared-utils/getPxmm.d.ts +19 -0
- package/dist/shared-utils/getRandomColor.d.ts +1 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/isNil.d.ts +10 -0
- package/dist/shared-utils/isTruelyObject.d.ts +18 -0
- package/dist/shared-utils/math/Interval.d.ts +13 -0
- package/dist/shared-utils/math/Rectangle.d.ts +27 -0
- package/dist/shared-utils/math/evenNumber.d.ts +3 -0
- package/dist/shared-utils/math/index.d.ts +2 -0
- package/dist/shared-utils/math/planimetry.d.ts +116 -0
- package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
- package/dist/shared-utils/nearlyEqual.d.ts +7 -0
- package/dist/shared-utils/nextFrame.d.ts +1 -0
- package/dist/shared-utils/noop.d.ts +5 -0
- package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
- package/dist/shared-utils/px2rem.d.ts +1 -0
- package/dist/shared-utils/removeArrayItem.d.ts +7 -0
- package/dist/shared-utils/tap.d.ts +8 -0
- package/dist/shared-utils/three/centerPoint.d.ts +2 -0
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/dist/shared-utils/three/getNormal.d.ts +2 -0
- package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/dist/shared-utils/three/loadFbxObj.d.ts +2 -0
- package/dist/shared-utils/three/loadTexture.d.ts +2 -0
- package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
- package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
- package/dist/shared-utils/throttle.d.ts +7 -0
- package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
- package/dist/shared-utils/to.d.ts +8 -0
- package/dist/shared-utils/uuid.d.ts +5 -0
- package/dist/shared-utils/vectorTocoordinates.d.ts +7 -0
- package/dist/typings/math.type.d.ts +44 -0
- package/dist/typings/utils.type.d.ts +2 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +78 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1413 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/Magnifier.html +9 -0
- package/docs/classes/ModelRoomLabelController.html +17 -0
- package/docs/enums/CameraMovementEffect.html +3 -0
- package/docs/enums/DIRECTION.html +1 -0
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/Rotation.html +3 -0
- package/docs/index.html +88 -0
- package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
- package/docs/interfaces/FloorplanBounding.html +10 -0
- package/docs/interfaces/FloorplanData.html +3 -0
- package/docs/interfaces/FloorplanEntrance.html +15 -0
- package/docs/interfaces/FloorplanExtraObject.html +7 -0
- package/docs/interfaces/FloorplanExtraObject3D.html +3 -0
- package/docs/interfaces/FloorplanFloorData.html +3 -0
- package/docs/interfaces/FloorplanImagePosition.html +3 -0
- package/docs/interfaces/FloorplanObserver.html +5 -0
- package/docs/interfaces/FloorplanOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanPosition.html +3 -0
- package/docs/interfaces/FloorplanRoomItem.html +17 -0
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -0
- package/docs/interfaces/FloorplanServerBounding.html +10 -0
- package/docs/interfaces/FloorplanServerComputedData.html +1 -0
- package/docs/interfaces/FloorplanServerData.html +3 -0
- package/docs/interfaces/FloorplanServerEntrance.html +15 -0
- package/docs/interfaces/FloorplanServerFloorData.html +3 -0
- package/docs/interfaces/FloorplanServerImagePosition.html +3 -0
- package/docs/interfaces/FloorplanServerObserver.html +5 -0
- package/docs/interfaces/FloorplanServerOutlineItem.html +3 -0
- package/docs/interfaces/FloorplanServerPosition.html +3 -0
- package/docs/interfaces/FloorplanServerRoomItem.html +20 -0
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -0
- package/docs/interfaces/ItemLabelPluginData.html +1 -0
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/LineJson.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
- package/docs/interfaces/ModelViewPluginExportType.html +1 -0
- package/docs/interfaces/OpenParameter.html +3 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -0
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
- package/docs/interfaces/PanoMeasureParameterType.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
- package/docs/interfaces/Point.html +1 -0
- package/docs/interfaces/PointJson.html +1 -0
- package/docs/interfaces/Room.html +1 -0
- package/docs/interfaces/RoomInfo.html +1 -0
- package/docs/interfaces/RoomLabel.html +13 -0
- package/docs/interfaces/RoomRules.html +1 -0
- package/docs/interfaces/Rooms.html +1 -0
- package/docs/modules.html +34 -0
- package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
- package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
- package/libs/CSS3DRenderPlugin/index.js +2 -180
- package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
- package/libs/CameraMovementPlugin/index.d.ts +4 -6
- package/libs/CameraMovementPlugin/index.js +3 -158
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +577 -0
- package/libs/ItemLabelPlugin/ItemLabelItem.js +227 -0
- package/libs/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/libs/ItemLabelPlugin/Plugin.js +120 -0
- package/libs/ItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ItemLabelPlugin/events.type.js +1 -0
- package/libs/ItemLabelPlugin/index.d.ts +9 -0
- package/libs/ItemLabelPlugin/index.js +8 -0
- package/libs/ItemLabelPlugin/typings.d.ts +59 -0
- package/libs/ItemLabelPlugin/typings.js +7 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.js +3 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.js +16 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.js +13 -0
- package/libs/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +4 -0
- package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
- package/libs/ModelChassisCompassPlugin/Plugin.js +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 -135
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +409 -0
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
- package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/events.type.js +1 -0
- package/libs/ModelItemLabelPlugin/index.d.ts +9 -0
- package/libs/ModelItemLabelPlugin/index.js +8 -0
- package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
- package/libs/ModelItemLabelPlugin/typings.js +7 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ModelRoomLabelPlugin/Controller.js +67 -25
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +291 -0
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/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 +267 -154
- 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 +222 -0
- 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/Normalmage.js +63 -0
- package/libs/floorplan/Components/RoomHighlight/Room.js +107 -0
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +216 -0
- 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 +331 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +104 -0
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +142 -0
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
- package/libs/floorplan/Components/SvgImage.js +83 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +120 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +106 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +463 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +375 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +171 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +265 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +301 -0
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.js +219 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +70 -77
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +661 -326
- 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 +168 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +250 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +373 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +195 -43
- 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 +29 -14
- package/CHANGELOG.md +0 -21
- package/dist/dnalogel.cjs.js +0 -7
- package/dist/dnalogel.es.js +0 -41280
- package/dist/dnalogel.umd.js +0 -7
- package/dist/style.css +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
- package/libs/floorplan/Components/BaseImage.svelte +0 -25
- package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
- package/libs/floorplan/Components/Normalmage.svelte +0 -11
- package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
- package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
- package/libs/floorplan/Components/SvgImage.svelte +0 -25
- package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
- package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
- package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
- package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
- package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
- package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
|
@@ -1,398 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { intersectionOfLine } from '../shared-utils/math/planimetry';
|
|
4
|
-
import { nextFrame } from '../shared-utils/nextFrame';
|
|
5
|
-
import throttle from '../shared-utils/throttle';
|
|
6
|
-
import PanoRulerStyle from './style';
|
|
7
|
-
const getDistance = (p1, p2) => {
|
|
8
|
-
return Math.sqrt(Math.pow(p1.z - p2.z, 2) + Math.pow(p1.x - p2.x, 2));
|
|
9
|
-
};
|
|
10
|
-
const getRoomHeightInfo = (roomInfo, five) => {
|
|
11
|
-
const roomHeightInfo = {};
|
|
12
|
-
const raycaster = new Raycaster();
|
|
13
|
-
const work = five.work;
|
|
14
|
-
if (!work)
|
|
15
|
-
return roomHeightInfo;
|
|
16
|
-
const observers = roomInfo.observers;
|
|
17
|
-
work.observers.forEach((observer, index) => {
|
|
18
|
-
const { standingPosition: position } = observer;
|
|
19
|
-
const point = new Vector3(position.x, position.y, position.z);
|
|
20
|
-
raycaster.set(point, new Vector3(0, 1, 0));
|
|
21
|
-
const [intersection] = five.model.intersectRaycaster(raycaster);
|
|
22
|
-
// 虚景 VR 没有天花板碰撞射线无相交,默认固定层高2.7m
|
|
23
|
-
const verticalY = intersection ? intersection.point.y : 2.7;
|
|
24
|
-
const id = observers[index];
|
|
25
|
-
if (!id)
|
|
26
|
-
return roomHeightInfo;
|
|
27
|
-
const observerRoomName = roomInfo.rooms[id].name;
|
|
28
|
-
if (roomHeightInfo[observerRoomName] === undefined) {
|
|
29
|
-
roomHeightInfo[observerRoomName] = {
|
|
30
|
-
__roof: [verticalY],
|
|
31
|
-
__floor: [point.y],
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
roomHeightInfo[observerRoomName].__roof.push(verticalY);
|
|
36
|
-
roomHeightInfo[observerRoomName].__floor.push(point.y);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
// 地板高度求中位数,屋顶高度取最高
|
|
40
|
-
for (const roomName in roomHeightInfo) {
|
|
41
|
-
const room = roomHeightInfo[roomName];
|
|
42
|
-
room.__roof.sort();
|
|
43
|
-
room.__floor.sort();
|
|
44
|
-
room.floor = room.__floor[~~(room.__floor.length / 2)];
|
|
45
|
-
room.roof = room.__roof[room.__roof.length - 1];
|
|
46
|
-
}
|
|
47
|
-
return roomHeightInfo;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* 全景标尺插件
|
|
51
|
-
*/
|
|
52
|
-
export const PanoRulerPlugin = (five, params) => {
|
|
53
|
-
const state = {
|
|
54
|
-
enable: false,
|
|
55
|
-
loaded: false,
|
|
56
|
-
options: params.options || {
|
|
57
|
-
distanceText: (distance) => `${distance.toFixed(1)}m`,
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
const tpl = (name, distance) => {
|
|
61
|
-
const domStr = `
|
|
62
|
-
<div class="PanoRulerPlugin-rule-line">
|
|
63
|
-
<em></em>
|
|
64
|
-
<div class="PanoRulerPlugin-rule-label">
|
|
65
|
-
<div class="PanoRulerPlugin-rule-label-name">${state.options.distanceText(distance)}</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
`;
|
|
69
|
-
const res = document.createElement('div');
|
|
70
|
-
res.setAttribute('class', 'PanoRulerPlugin-rule');
|
|
71
|
-
res.setAttribute('data-name', name);
|
|
72
|
-
res.setAttribute('style', 'display: none');
|
|
73
|
-
res.innerHTML = domStr;
|
|
74
|
-
return res;
|
|
75
|
-
};
|
|
76
|
-
const $rule = document.createElement('div');
|
|
77
|
-
$rule.setAttribute('style', `position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;`);
|
|
78
|
-
// 添加标尺样式
|
|
79
|
-
const style = document.createElement('div');
|
|
80
|
-
style.innerHTML = PanoRulerStyle;
|
|
81
|
-
$rule.appendChild(style);
|
|
82
|
-
const __rule = {};
|
|
83
|
-
const _load = (roomInfo, roomRules) => {
|
|
84
|
-
if (state.loaded) {
|
|
85
|
-
throw new Error('标尺被重复初始化!');
|
|
86
|
-
}
|
|
87
|
-
const roomHeightInfo = getRoomHeightInfo(roomInfo, five);
|
|
88
|
-
const work = five.work;
|
|
89
|
-
if (!work)
|
|
90
|
-
return false;
|
|
91
|
-
for (const obKey in roomRules) {
|
|
92
|
-
const points = roomRules[obKey];
|
|
93
|
-
const { standingPosition: defaultPosition } = work.observers[0];
|
|
94
|
-
const roomPoints = points.map(({ x, z, observers }) => {
|
|
95
|
-
const pointRoomName = observers.length > 0 ? roomInfo.rooms[roomInfo.observers[observers[0]]].name : '';
|
|
96
|
-
const medianFloorHeight = roomHeightInfo[pointRoomName] ? roomHeightInfo[pointRoomName].floor : null;
|
|
97
|
-
let minDistance = Infinity;
|
|
98
|
-
let nearestPoint = {
|
|
99
|
-
index: 0,
|
|
100
|
-
x: defaultPosition.x,
|
|
101
|
-
y: defaultPosition.y,
|
|
102
|
-
z: defaultPosition.z,
|
|
103
|
-
};
|
|
104
|
-
observers.forEach((index) => {
|
|
105
|
-
if (!work.observers[index])
|
|
106
|
-
return;
|
|
107
|
-
const { standingPosition: position } = work.observers[index];
|
|
108
|
-
const observerPoint = {
|
|
109
|
-
index,
|
|
110
|
-
x: position.x,
|
|
111
|
-
y: position.y,
|
|
112
|
-
z: position.z,
|
|
113
|
-
};
|
|
114
|
-
const distance = getDistance({ x, z }, observerPoint);
|
|
115
|
-
if (medianFloorHeight) {
|
|
116
|
-
// 取最近点时排除高度与房间平均高度差大于0.3米的点
|
|
117
|
-
if (distance < minDistance && Math.abs(observerPoint.y - medianFloorHeight) < 0.3) {
|
|
118
|
-
minDistance = distance;
|
|
119
|
-
nearestPoint = observerPoint;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
if (distance < minDistance) {
|
|
124
|
-
minDistance = distance;
|
|
125
|
-
nearestPoint = observerPoint;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
const _origin = new Vector3(x, nearestPoint.y, z);
|
|
130
|
-
Object.assign(_origin, { observers });
|
|
131
|
-
const verticalY = roomHeightInfo[pointRoomName] ? roomHeightInfo[pointRoomName].roof : null;
|
|
132
|
-
const _vertical = !verticalY ? null : new Vector3(x, verticalY, z);
|
|
133
|
-
if (_vertical)
|
|
134
|
-
Object.assign(_vertical, { observers });
|
|
135
|
-
const origin = _origin;
|
|
136
|
-
const vertical = _vertical;
|
|
137
|
-
return { origin, vertical };
|
|
138
|
-
});
|
|
139
|
-
__rule[obKey] = {
|
|
140
|
-
origins: roomPoints.map((roomPoint) => roomPoint.origin),
|
|
141
|
-
rules: [],
|
|
142
|
-
};
|
|
143
|
-
for (const { origin, vertical } of roomPoints) {
|
|
144
|
-
if (!vertical)
|
|
145
|
-
continue;
|
|
146
|
-
const $element = tpl(obKey, origin.distanceTo(vertical));
|
|
147
|
-
$rule.append($element);
|
|
148
|
-
__rule[obKey].rules.push({ vertical: true, rule: [origin, vertical], $element });
|
|
149
|
-
}
|
|
150
|
-
for (let index = 0; index < roomPoints.length; index++) {
|
|
151
|
-
let nextIndex = index + 1;
|
|
152
|
-
if (nextIndex >= roomPoints.length)
|
|
153
|
-
nextIndex = 0;
|
|
154
|
-
const { origin } = roomPoints[index];
|
|
155
|
-
const { origin: next } = roomPoints[nextIndex];
|
|
156
|
-
const $element = tpl(obKey, origin.distanceTo(next));
|
|
157
|
-
$rule.append($element);
|
|
158
|
-
__rule[obKey].rules.push({ vertical: false, rule: [origin, next], $element });
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
state.loaded = true;
|
|
162
|
-
return true;
|
|
163
|
-
};
|
|
164
|
-
const load = async (_roomInfo, _roomRules, options) => {
|
|
165
|
-
const roomInfo = _roomInfo || params.roomInfo;
|
|
166
|
-
const roomRules = _roomRules || params.roomRules;
|
|
167
|
-
if (!roomInfo || !roomRules) {
|
|
168
|
-
throw new Error('标尺数据依赖不齐全!');
|
|
169
|
-
}
|
|
170
|
-
state.options = Object.assign({}, state.options, options || {});
|
|
171
|
-
if (five.model.loaded) {
|
|
172
|
-
return _load(roomInfo, roomRules);
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
return await new Promise((resolve) => five.once('modelLoaded', () => resolve(_load(roomInfo, roomRules))));
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
if (params.roomInfo && params.roomRules) {
|
|
179
|
-
load(params.roomInfo, params.roomRules);
|
|
180
|
-
}
|
|
181
|
-
const getRuleScreenIntr = (startPoint, endPoint, canvasWidth, canvasHeight) => {
|
|
182
|
-
const screenLines = [
|
|
183
|
-
[
|
|
184
|
-
{ x: 0, y: 0 },
|
|
185
|
-
{ x: canvasWidth, y: 0 },
|
|
186
|
-
],
|
|
187
|
-
[
|
|
188
|
-
{ x: 0, y: 0 },
|
|
189
|
-
{ x: 0, y: canvasHeight },
|
|
190
|
-
],
|
|
191
|
-
[
|
|
192
|
-
{ x: canvasWidth, y: 0 },
|
|
193
|
-
{ x: canvasWidth, y: canvasHeight },
|
|
194
|
-
],
|
|
195
|
-
[
|
|
196
|
-
{ x: 0, y: canvasHeight },
|
|
197
|
-
{ x: canvasWidth, y: canvasHeight },
|
|
198
|
-
],
|
|
199
|
-
];
|
|
200
|
-
const intr = [];
|
|
201
|
-
for (let i = 0; i < screenLines.length; i++) {
|
|
202
|
-
const result = intersectionOfLine([startPoint, endPoint], [screenLines[i][0], screenLines[i][1]], true);
|
|
203
|
-
if (result)
|
|
204
|
-
intr.push(result);
|
|
205
|
-
}
|
|
206
|
-
if (intr.length === 0)
|
|
207
|
-
return false;
|
|
208
|
-
else {
|
|
209
|
-
return intr;
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
const freshRule = () => {
|
|
213
|
-
const element = five.getElement()?.parentElement;
|
|
214
|
-
if (!element)
|
|
215
|
-
return;
|
|
216
|
-
if (!state.loaded)
|
|
217
|
-
return;
|
|
218
|
-
if (Object.keys(__rule).length <= 0)
|
|
219
|
-
return;
|
|
220
|
-
const { panoIndex, camera, currentMode } = five;
|
|
221
|
-
if (panoIndex === undefined)
|
|
222
|
-
return;
|
|
223
|
-
let name;
|
|
224
|
-
for (const _name in __rule) {
|
|
225
|
-
if (_name.split(',').indexOf(panoIndex.toString()) >= 0)
|
|
226
|
-
name = _name;
|
|
227
|
-
}
|
|
228
|
-
if (!name)
|
|
229
|
-
return;
|
|
230
|
-
const cameraPosition = camera.position;
|
|
231
|
-
const cameraDirection = camera.getWorldDirection(new Vector3());
|
|
232
|
-
const width = element.clientWidth;
|
|
233
|
-
const height = element.clientHeight;
|
|
234
|
-
// 非全景模式下隐藏所有标尺
|
|
235
|
-
if (currentMode !== Five.Mode.Panorama) {
|
|
236
|
-
for (const _name in __rule) {
|
|
237
|
-
for (const { $element } of __rule[_name].rules) {
|
|
238
|
-
$element.style.display = 'none';
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
// 隐藏非当前点位的标尺
|
|
244
|
-
for (const _name in __rule) {
|
|
245
|
-
for (const { $element } of __rule[_name].rules) {
|
|
246
|
-
$element.style.display = _name === name ? 'block' : 'none';
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
const verticalLines = [];
|
|
250
|
-
// 可以看到的角度最小的拐点
|
|
251
|
-
const [visibleOrigin] = __rule[name].origins
|
|
252
|
-
.slice()
|
|
253
|
-
.filter((point) => point.observers.indexOf(panoIndex) >= 0)
|
|
254
|
-
.sort((pointA, pointB) => {
|
|
255
|
-
const angleA = pointA.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
|
|
256
|
-
const angleB = pointB.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
|
|
257
|
-
return angleA - angleB;
|
|
258
|
-
});
|
|
259
|
-
const shownNotVerticalRules = [];
|
|
260
|
-
for (const { rule, vertical, $element } of __rule[name].rules) {
|
|
261
|
-
const [start, end] = rule;
|
|
262
|
-
const $line = $element.querySelector('.PanoRulerPlugin-rule-line');
|
|
263
|
-
if (!$line)
|
|
264
|
-
return;
|
|
265
|
-
if (!visibleOrigin) {
|
|
266
|
-
$element.style.display = 'none';
|
|
267
|
-
continue;
|
|
268
|
-
}
|
|
269
|
-
if (start !== visibleOrigin && end !== visibleOrigin) {
|
|
270
|
-
$element.style.display = 'none';
|
|
271
|
-
continue;
|
|
272
|
-
}
|
|
273
|
-
if (start.distanceTo(end) < 0.5) {
|
|
274
|
-
$element.style.display = 'none';
|
|
275
|
-
continue;
|
|
276
|
-
}
|
|
277
|
-
if (start.observers.indexOf(panoIndex) === -1 || end.observers.indexOf(panoIndex) === -1) {
|
|
278
|
-
$element.style.display = 'none';
|
|
279
|
-
continue;
|
|
280
|
-
}
|
|
281
|
-
const startAngle = start.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
|
|
282
|
-
if (startAngle > Math.PI / 2) {
|
|
283
|
-
$element.style.display = 'none';
|
|
284
|
-
continue;
|
|
285
|
-
}
|
|
286
|
-
const endAngle = end.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
|
|
287
|
-
if (endAngle > Math.PI / 2) {
|
|
288
|
-
$element.style.display = 'none';
|
|
289
|
-
continue;
|
|
290
|
-
}
|
|
291
|
-
const ruleLength = start.distanceTo(end);
|
|
292
|
-
const midPoint = end.clone().sub(end.clone().sub(start).divide(new Vector3(2, 2, 2)));
|
|
293
|
-
const disFromCameraToMid = midPoint.distanceTo(cameraPosition);
|
|
294
|
-
if (disFromCameraToMid / ruleLength > 8) {
|
|
295
|
-
$element.style.display = 'none';
|
|
296
|
-
continue;
|
|
297
|
-
}
|
|
298
|
-
if (!vertical)
|
|
299
|
-
shownNotVerticalRules.push(rule);
|
|
300
|
-
if (vertical)
|
|
301
|
-
verticalLines.push({ $element, startAngle });
|
|
302
|
-
const mouseStart = start.clone().project(camera);
|
|
303
|
-
const startLeft = ((mouseStart.x + 1) / 2) * width;
|
|
304
|
-
const startTop = ((-mouseStart.y + 1) / 2) * height;
|
|
305
|
-
const mouseEnd = end.clone().project(camera);
|
|
306
|
-
const endLeft = ((mouseEnd.x + 1) / 2) * width;
|
|
307
|
-
const endTop = ((-mouseEnd.y + 1) / 2) * height;
|
|
308
|
-
const distance = Math.sqrt(Math.pow(endLeft - startLeft, 2) + Math.pow(endTop - startTop, 2));
|
|
309
|
-
let visibleLength = distance;
|
|
310
|
-
let labelOffset = 50;
|
|
311
|
-
const intr = getRuleScreenIntr({ x: ~~startLeft, y: ~~startTop }, {
|
|
312
|
-
x: ~~endLeft,
|
|
313
|
-
y: ~~endTop
|
|
314
|
-
}, width, height);
|
|
315
|
-
if (intr && intr.length === 1) {
|
|
316
|
-
if (visibleOrigin === start) {
|
|
317
|
-
visibleLength = Math.sqrt(Math.pow(intr[0].x - startLeft, 2) + Math.pow(intr[0].y - startTop, 2));
|
|
318
|
-
labelOffset = (visibleLength / distance) * 50;
|
|
319
|
-
}
|
|
320
|
-
else if (visibleOrigin === end) {
|
|
321
|
-
visibleLength = Math.sqrt(Math.pow(intr[0].x - endLeft, 2) + Math.pow(intr[0].y - endTop, 2));
|
|
322
|
-
labelOffset = 100 - (visibleLength / distance) * 50;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
if (intr && intr.length === 2) {
|
|
326
|
-
const middlePoint = {
|
|
327
|
-
x: (intr[0].x + intr[1].x) / 2,
|
|
328
|
-
y: (intr[0].y + intr[1].y) / 2,
|
|
329
|
-
};
|
|
330
|
-
const distanceFromStart = Math.sqrt(Math.pow(middlePoint.x - startLeft, 2) + Math.pow(middlePoint.y - startTop, 2));
|
|
331
|
-
labelOffset = (distanceFromStart / distance) * 100;
|
|
332
|
-
}
|
|
333
|
-
const rad = Math.PI / 2 - Math.atan2(endLeft - startLeft, startTop - endTop);
|
|
334
|
-
const deg = (rad / Math.PI) * 180;
|
|
335
|
-
const $label = $line.querySelector('.PanoRulerPlugin-rule-label');
|
|
336
|
-
// 线的长度小于标签时或者标签与线两端点重合时隐藏,
|
|
337
|
-
const labelWidth = $label.children[0].clientWidth;
|
|
338
|
-
if (labelWidth >= distance ||
|
|
339
|
-
labelWidth / 2 >= (labelOffset / 100) * distance ||
|
|
340
|
-
labelWidth / 2 >= (1 - labelOffset / 100) * distance) {
|
|
341
|
-
$line.style.display = 'none';
|
|
342
|
-
}
|
|
343
|
-
else {
|
|
344
|
-
$line.style.display = 'block';
|
|
345
|
-
$line.style.width = distance + 'px';
|
|
346
|
-
$line.style.left = startLeft + 'px';
|
|
347
|
-
$line.style.top = startTop + 'px';
|
|
348
|
-
$line.style.transform = `rotate(${-deg}deg)`;
|
|
349
|
-
$label.style.left = `${labelOffset}%`;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
};
|
|
353
|
-
const nextFrameFreshRule = () => nextFrame(freshRule);
|
|
354
|
-
const throttleFreshRule = throttle(freshRule, 80);
|
|
355
|
-
const enable = () => {
|
|
356
|
-
if (!state.loaded)
|
|
357
|
-
return false;
|
|
358
|
-
if (state.enable)
|
|
359
|
-
return true;
|
|
360
|
-
$rule.setAttribute('class', 'PanoRulerPlugin' + (state.options.className ? ' ' + state.options.className : ''));
|
|
361
|
-
five.getElement()?.parentElement?.append($rule);
|
|
362
|
-
freshRule();
|
|
363
|
-
five.on('panoArrived', freshRule);
|
|
364
|
-
five.on('modeChange', freshRule);
|
|
365
|
-
five.on('cameraDirectionUpdate', nextFrameFreshRule);
|
|
366
|
-
five.on('movingToPano', nextFrameFreshRule);
|
|
367
|
-
five.on('mouseWheel', throttleFreshRule);
|
|
368
|
-
five.on('pinchGesture', throttleFreshRule);
|
|
369
|
-
state.enable = true;
|
|
370
|
-
return true;
|
|
371
|
-
};
|
|
372
|
-
const disable = () => {
|
|
373
|
-
if (!state.enable)
|
|
374
|
-
return true;
|
|
375
|
-
five.off('panoArrived', freshRule);
|
|
376
|
-
five.off('modeChange', freshRule);
|
|
377
|
-
five.off('cameraDirectionUpdate', nextFrameFreshRule);
|
|
378
|
-
five.off('movingToPano', nextFrameFreshRule);
|
|
379
|
-
five.off('mouseWheel', throttleFreshRule);
|
|
380
|
-
five.off('pinchGesture', throttleFreshRule);
|
|
381
|
-
if ($rule) {
|
|
382
|
-
$rule.remove();
|
|
383
|
-
}
|
|
384
|
-
state.enable = false;
|
|
385
|
-
return true;
|
|
386
|
-
};
|
|
387
|
-
return {
|
|
388
|
-
enable,
|
|
389
|
-
disable,
|
|
390
|
-
load,
|
|
391
|
-
state,
|
|
392
|
-
};
|
|
393
|
-
};
|
|
394
|
-
export const panoRulerPluginServerParams = {
|
|
395
|
-
name: 'PanoRulerPlugin',
|
|
396
|
-
version: 0,
|
|
397
|
-
};
|
|
1
|
+
import PanoRulerPlugin from './Plugin';
|
|
2
|
+
export { PanoRulerPlugin };
|
|
398
3
|
export default PanoRulerPlugin;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/* generated by Svelte v3.47.0 */
|
|
2
|
+
import {
|
|
3
|
+
SvelteComponent,
|
|
4
|
+
append_styles,
|
|
5
|
+
attr,
|
|
6
|
+
destroy_each,
|
|
7
|
+
detach,
|
|
8
|
+
element,
|
|
9
|
+
empty,
|
|
10
|
+
init,
|
|
11
|
+
insert,
|
|
12
|
+
listen,
|
|
13
|
+
noop,
|
|
14
|
+
safe_not_equal,
|
|
15
|
+
set_style,
|
|
16
|
+
toggle_class
|
|
17
|
+
} from "svelte/internal";
|
|
18
|
+
|
|
19
|
+
import { currentTarget } from '../store';
|
|
20
|
+
|
|
21
|
+
function add_css(target) {
|
|
22
|
+
append_styles(target, "svelte-scnx9u", ".PanoSpatialTagPlugin__tag-origin.svelte-scnx9u{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;animation:svelte-scnx9u-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-scnx9u:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-scnx9u{transform:translate(-50%, -50%) scale(0.6);animation:svelte-scnx9u-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@keyframes svelte-scnx9u-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-scnx9u-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function get_each_context(ctx, list, i) {
|
|
26
|
+
const child_ctx = ctx.slice();
|
|
27
|
+
child_ctx[3] = list[i];
|
|
28
|
+
return child_ctx;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// (8:0) {#each origins as origin}
|
|
32
|
+
function create_each_block(ctx) {
|
|
33
|
+
let i;
|
|
34
|
+
let style_top = `${/*origin*/ ctx[3].top}%`;
|
|
35
|
+
let style_left = `${/*origin*/ ctx[3].left}%`;
|
|
36
|
+
let mounted;
|
|
37
|
+
let dispose;
|
|
38
|
+
|
|
39
|
+
function click_handler() {
|
|
40
|
+
return /*click_handler*/ ctx[2](/*origin*/ ctx[3]);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
c() {
|
|
45
|
+
i = element("i");
|
|
46
|
+
attr(i, "class", "svelte-scnx9u");
|
|
47
|
+
toggle_class(i, "PanoSpatialTagPlugin__tag-origin", true);
|
|
48
|
+
toggle_class(i, "PanoSpatialTagPlugin__tag-origin-destroy", /*origin*/ ctx[3].destroying);
|
|
49
|
+
set_style(i, "top", style_top, false);
|
|
50
|
+
set_style(i, "left", style_left, false);
|
|
51
|
+
set_style(i, "visibility", /*origin*/ ctx[3].front ? 'visible' : 'hidden', false);
|
|
52
|
+
},
|
|
53
|
+
m(target, anchor) {
|
|
54
|
+
insert(target, i, anchor);
|
|
55
|
+
|
|
56
|
+
if (!mounted) {
|
|
57
|
+
dispose = listen(i, "click", click_handler);
|
|
58
|
+
mounted = true;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
p(new_ctx, dirty) {
|
|
62
|
+
ctx = new_ctx;
|
|
63
|
+
|
|
64
|
+
if (dirty & /*origins*/ 1) {
|
|
65
|
+
toggle_class(i, "PanoSpatialTagPlugin__tag-origin-destroy", /*origin*/ ctx[3].destroying);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (dirty & /*origins*/ 1 && style_top !== (style_top = `${/*origin*/ ctx[3].top}%`)) {
|
|
69
|
+
set_style(i, "top", style_top, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (dirty & /*origins*/ 1 && style_left !== (style_left = `${/*origin*/ ctx[3].left}%`)) {
|
|
73
|
+
set_style(i, "left", style_left, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (dirty & /*origins*/ 1) {
|
|
77
|
+
set_style(i, "visibility", /*origin*/ ctx[3].front ? 'visible' : 'hidden', false);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
d(detaching) {
|
|
81
|
+
if (detaching) detach(i);
|
|
82
|
+
mounted = false;
|
|
83
|
+
dispose();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function create_fragment(ctx) {
|
|
89
|
+
let each_1_anchor;
|
|
90
|
+
let each_value = /*origins*/ ctx[0];
|
|
91
|
+
let each_blocks = [];
|
|
92
|
+
|
|
93
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
94
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
c() {
|
|
99
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
100
|
+
each_blocks[i].c();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
each_1_anchor = empty();
|
|
104
|
+
},
|
|
105
|
+
m(target, anchor) {
|
|
106
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
107
|
+
each_blocks[i].m(target, anchor);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
insert(target, each_1_anchor, anchor);
|
|
111
|
+
},
|
|
112
|
+
p(ctx, [dirty]) {
|
|
113
|
+
if (dirty & /*origins, handleClick*/ 3) {
|
|
114
|
+
each_value = /*origins*/ ctx[0];
|
|
115
|
+
let i;
|
|
116
|
+
|
|
117
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
118
|
+
const child_ctx = get_each_context(ctx, each_value, i);
|
|
119
|
+
|
|
120
|
+
if (each_blocks[i]) {
|
|
121
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
122
|
+
} else {
|
|
123
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
124
|
+
each_blocks[i].c();
|
|
125
|
+
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
for (; i < each_blocks.length; i += 1) {
|
|
130
|
+
each_blocks[i].d(1);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
each_blocks.length = each_value.length;
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
i: noop,
|
|
137
|
+
o: noop,
|
|
138
|
+
d(detaching) {
|
|
139
|
+
destroy_each(each_blocks, detaching);
|
|
140
|
+
if (detaching) detach(each_1_anchor);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function instance($$self, $$props, $$invalidate) {
|
|
146
|
+
let { origins } = $$props;
|
|
147
|
+
|
|
148
|
+
const handleClick = id => {
|
|
149
|
+
currentTarget.update(() => `${id}-PanoSpatialTagPlugin-${Date.now()}`);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const click_handler = origin => handleClick(origin.id);
|
|
153
|
+
|
|
154
|
+
$$self.$$set = $$props => {
|
|
155
|
+
if ('origins' in $$props) $$invalidate(0, origins = $$props.origins);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
return [origins, handleClick, click_handler];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
class Component extends SvelteComponent {
|
|
162
|
+
constructor(options) {
|
|
163
|
+
super();
|
|
164
|
+
init(this, options, instance, create_fragment, safe_not_equal, { origins: 0 }, add_css);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export default Component;
|