@realsee/dnalogel 2.21.0 → 2.22.0-dev.0
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/components/index.js +329 -329
- package/dist/CSS3DRenderPlugin/Controller.d.ts +4 -1
- package/dist/CruisePlugin/index.d.ts +2 -1
- package/dist/PanoCompassPlugin/typings.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Components/Common/CircleButton.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Components/Common/Exit.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Components/Common/Switcher0.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Components/Common/Switcher1.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Components/Common/icons/index.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Components/Controller0.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Components/Controller1.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Components/Tip.svelte.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +12 -4
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +27 -18
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +9 -2
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +26 -9
- package/dist/PanoMeasurePlugin/Model/area.d.ts +74 -0
- package/dist/PanoMeasurePlugin/Model/index.d.ts +10 -0
- package/dist/PanoMeasurePlugin/Model/line.d.ts +7 -1
- package/dist/PanoMeasurePlugin/Model/polygon.d.ts +14 -0
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +8 -4
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +16 -12
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +10 -3
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -8
- package/dist/PanoMeasurePlugin/typings/data.d.ts +24 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +17 -3
- package/dist/PanoMeasurePlugin/typings/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/dom/areaDom.d.ts +22 -0
- package/dist/PanoMeasurePlugin/utils/dom/base.d.ts +29 -0
- package/dist/PanoMeasurePlugin/utils/dom/distanceItem.d.ts +27 -0
- package/dist/PanoMeasurePlugin/utils/generatePolygonGeometry.d.ts +6 -0
- package/dist/PanoMeasurePlugin/utils/geometryUtil.d.ts +7 -0
- package/dist/PanoMeasurePlugin/utils/isIntersecting.d.ts +15 -0
- package/dist/PanoMeasurePlugin/utils/line.d.ts +2 -1
- package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +2 -1
- package/dist/PanoTagPlugin/controller/index.d.ts +2 -1
- package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +1 -1
- package/dist/PanoTagPlugin/typings/tag/TagInstance.d.ts +2 -1
- package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +0 -4
- package/dist/base/BasePlugin.d.ts +6 -3
- package/dist/base/BasePluginWithData.d.ts +2 -1
- package/dist/components/PaintBrush/style.d.ts +1 -1
- package/dist/index.cjs.js +73 -69
- package/dist/index.js +9017 -7073
- package/dist/index.umd.js +66 -62
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +3 -7
- package/dist/shared-utils/absoluteUrl.d.ts +5 -0
- package/{libs/PanoMeasurePlugin/utils → dist/shared-utils}/getIntersectionFromEvent.d.ts +1 -1
- package/dist/{PanoMeasurePlugin/utils → shared-utils}/getPointFromHammerEvent.d.ts +1 -1
- package/dist/shared-utils/index.d.ts +1 -1
- package/dist/shared-utils/isTouchDevice.d.ts +1 -0
- package/dist/shared-utils/safeObj.d.ts +1 -0
- package/dist/shared-utils/three/IObject3D.d.ts +7 -0
- package/dist/shared-utils/three/Magnifier.d.ts +5 -0
- package/dist/shared-utils/three/PointSelector.d.ts +92 -0
- package/dist/shared-utils/three/PointSelectorHelper.d.ts +41 -0
- package/dist/shared-utils/three/index.d.ts +1 -1
- package/dist/typings/typings.d.ts +4 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +34 -33
- package/docs/classes/CruisePluginController.html +48 -45
- package/docs/classes/GuideLineItem.GuideLineItem.html +23 -22
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +38 -37
- package/docs/classes/Magnifier.html +23 -22
- package/docs/classes/ModelRoomLabelController.html +14 -13
- package/docs/classes/Object3DHelperController.html +47 -44
- package/docs/classes/PaintBrush.html +18 -17
- package/docs/classes/PanoMeasurePluginLine.html +74 -108
- package/docs/classes/PanoMeasurePluginModel.html +84 -26
- package/docs/classes/PanoMeasurePluginPoint.html +17 -16
- package/docs/classes/PanoMeasurePluginPolyline.html +41 -28
- package/docs/classes/PanoTagPluginController.html +73 -70
- package/docs/classes/Util.BetterTween.html +12 -11
- package/docs/classes/Util.Interval.html +15 -14
- package/docs/classes/Util.Magnifier.html +54 -20
- package/docs/classes/Util.PointDomHelper.html +14 -13
- package/docs/classes/Util.PointHelper.html +14 -13
- package/docs/classes/{Util.FivePointSelector.html → Util.PointSelectorHelper.html} +70 -30
- package/docs/classes/Util.Rectangle.html +16 -15
- package/docs/enums/CameraMovementEffect.html +10 -9
- package/docs/enums/ContentType.html +23 -22
- package/docs/enums/DIRECTION.html +12 -11
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +12 -11
- package/docs/enums/DimensionType.html +10 -9
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +11 -10
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +12 -11
- package/docs/enums/PaintBrushTypeEnum.html +11 -10
- package/docs/enums/PointType.html +10 -9
- package/docs/enums/Rotation.html +11 -10
- package/docs/functions/CSS3DRenderPlugin.html +7 -6
- package/docs/functions/CameraMovementPlugin.html +7 -6
- package/docs/functions/CruisePlugin.html +11 -8
- package/docs/functions/GuideLinePlugin.html +8 -7
- package/docs/functions/ItemLabelPlugin.html +7 -6
- package/docs/functions/MapviewFloorplanPlugin.html +7 -6
- package/docs/functions/ModelChassisCompassPlugin.html +7 -6
- package/docs/functions/ModelEntryDoorGuidePlugin.html +7 -6
- package/docs/functions/ModelFloorplanPlugin.html +7 -6
- package/docs/functions/ModelItemLabelPlugin.html +7 -6
- package/docs/functions/ModelRoomLabelPlugin.html +7 -6
- package/docs/functions/ModelTVVideoPlugin.html +7 -6
- package/docs/functions/ModelViewPlugin.html +7 -6
- package/docs/functions/Object3DHelperPlugin.html +7 -6
- package/docs/functions/PanoCompassPlugin.html +7 -6
- package/docs/functions/PanoCursorRaycasterPlugin.html +7 -6
- package/docs/functions/PanoDoorLabelPlugin.html +7 -6
- package/docs/functions/PanoFloorplanRadarPlugin.html +7 -6
- package/docs/functions/PanoMeasurePlugin.html +7 -6
- package/docs/functions/PanoRulerPlugin.html +7 -6
- package/docs/functions/PanoRulerProPlugin.html +7 -6
- package/docs/functions/PanoSpatialTagPlugin.html +7 -6
- package/docs/functions/PanoTagPlugin.html +7 -6
- package/docs/functions/PanoVideoPlugin.html +7 -6
- package/docs/functions/TopviewFloorplanPlugin.html +7 -6
- package/docs/{types/PartialObjectDeep.html → functions/Util.absoluteUrl.html} +151 -141
- package/docs/functions/Util.getCoordsFromClient.html +8 -7
- package/docs/functions/Util.getCoordsFromElement.html +8 -7
- package/docs/functions/Util.getFrameTime.html +8 -7
- package/docs/functions/Util.getIntersectFromRelativePosition.html +8 -7
- package/docs/functions/Util.getRaycasterFromFivePointer.html +8 -7
- package/docs/functions/Util.isAbsoluteURL.html +8 -7
- package/docs/functions/Util.isModelLike.html +8 -7
- package/docs/functions/Util.isNil.html +8 -7
- package/docs/functions/Util.isPanoramaLike.html +8 -7
- package/docs/functions/Util.nextFrame.html +8 -7
- package/docs/functions/Util.notNil.html +8 -7
- package/docs/functions/Util.requestAnimationFrameInterval.html +8 -7
- package/docs/functions/Util.tweenProgress.html +8 -7
- package/docs/functions/Util.uuid.html +8 -7
- package/docs/functions/pluginFlag.html +8 -7
- package/docs/index.html +8 -7
- package/docs/interfaces/AddTagConfig.html +9 -8
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +14 -13
- package/docs/interfaces/CSS3DRenderPluginState.html +11 -10
- package/docs/interfaces/CameraMovementPluginExportType.html +10 -9
- package/docs/interfaces/CruisePluginTypes.Config.html +11 -10
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +15 -14
- package/docs/interfaces/CruisePluginTypes.EventMap.html +23 -22
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +15 -14
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +17 -16
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +17 -16
- package/docs/interfaces/CruisePluginTypes.PluginData.html +12 -11
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +10 -9
- package/docs/interfaces/CruisePluginTypes.PluginState.html +14 -13
- package/docs/interfaces/EventMap.html +18 -17
- package/docs/interfaces/FloorplanBounding.html +11 -10
- package/docs/interfaces/FloorplanData.html +13 -12
- package/docs/interfaces/FloorplanEntrance.html +14 -13
- package/docs/interfaces/FloorplanExtraObject.html +13 -12
- package/docs/interfaces/FloorplanExtraObject3D.html +11 -10
- package/docs/interfaces/FloorplanFloorData.html +12 -11
- package/docs/interfaces/FloorplanImagePosition.html +10 -9
- package/docs/interfaces/FloorplanObserver.html +12 -11
- package/docs/interfaces/FloorplanOutlineItem.html +12 -11
- package/docs/interfaces/FloorplanPosition.html +10 -9
- package/docs/interfaces/FloorplanRoomItem.html +16 -15
- package/docs/interfaces/FloorplanRoomLabelItem.html +10 -9
- package/docs/interfaces/FloorplanServerBounding.html +11 -10
- package/docs/interfaces/FloorplanServerComputedData.html +13 -12
- package/docs/interfaces/FloorplanServerData.html +10 -9
- package/docs/interfaces/FloorplanServerDoorItem.html +13 -12
- package/docs/interfaces/FloorplanServerDoorPosition.html +11 -10
- package/docs/interfaces/FloorplanServerEntrance.html +14 -13
- package/docs/interfaces/FloorplanServerFloorData.html +12 -11
- package/docs/interfaces/FloorplanServerImagePosition.html +10 -9
- package/docs/interfaces/FloorplanServerObserver.html +12 -11
- package/docs/interfaces/FloorplanServerOutlineItem.html +12 -11
- package/docs/interfaces/FloorplanServerPosition.html +10 -9
- package/docs/interfaces/FloorplanServerRoomItem.html +17 -16
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +10 -9
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +11 -10
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +13 -12
- package/docs/interfaces/GuideLinePluginType.EventMap.html +16 -15
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +11 -10
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +9 -8
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +16 -15
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +11 -10
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +21 -20
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +10 -9
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +21 -20
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +8 -7
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +10 -9
- package/docs/interfaces/GuideLinePluginType.PluginState.html +11 -10
- package/docs/interfaces/GuideLinePluginType.Route.html +14 -13
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +12 -11
- package/docs/interfaces/HelperOffset.html +11 -10
- package/docs/interfaces/ImagePlaneGroup.html +9 -8
- package/docs/interfaces/ItemLabelPluginData.html +9 -8
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +14 -13
- package/docs/interfaces/ItemLabelPluginParametersType.html +12 -11
- package/docs/interfaces/MinMax.html +10 -9
- package/docs/interfaces/ModelChassisCompassPluginData.html +10 -9
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +11 -10
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +10 -9
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +11 -10
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +11 -10
- package/docs/interfaces/ModelItemLabelPluginData.html +9 -8
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +14 -13
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +10 -9
- package/docs/interfaces/ModelRoomLabelPluginData.html +9 -8
- package/docs/interfaces/ModelTVVideoPluginData.html +12 -11
- package/docs/interfaces/ModelTVVideoPluginExportType.html +11 -10
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +9 -8
- package/docs/interfaces/ModelViewPluginExportType.html +14 -13
- package/docs/interfaces/Object3DHelperState.html +11 -10
- package/docs/interfaces/ObjectHelperControllers.html +12 -11
- package/docs/interfaces/PaintBrushAction.html +15 -14
- package/docs/interfaces/PaintBrushConfigs.html +15 -14
- package/docs/interfaces/PaintBrushState.html +13 -12
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +13 -12
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +8 -7
- package/docs/interfaces/PanoMeasureParameterType.html +25 -17
- package/docs/interfaces/PanoMeasurePluginLineJson.html +11 -10
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +10 -9
- package/docs/interfaces/PanoMeasurePluginPointJson.html +10 -9
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +11 -10
- package/docs/interfaces/PanoRulerPluginExportType.html +13 -12
- package/docs/interfaces/PanoRulerPluginOptions.html +10 -9
- package/docs/interfaces/PanoRulerPluginParameterType.html +11 -10
- package/docs/interfaces/PanoRulerProPluginExportType.html +12 -11
- package/docs/interfaces/PanoRulerProPluginOptions.html +10 -9
- package/docs/interfaces/PanoRulerProPluginParameterType.html +10 -9
- package/docs/interfaces/PanoRulerProPluginState.html +11 -10
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +8 -7
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +8 -7
- package/docs/interfaces/PanoSpatialTagPluginData.html +14 -13
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +13 -12
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +16 -15
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +13 -12
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +16 -15
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +14 -13
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +13 -12
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +9 -8
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +11 -10
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +9 -8
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +12 -11
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +9 -8
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +11 -10
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +13 -12
- package/docs/interfaces/Point.html +11 -10
- package/docs/interfaces/Room.html +12 -11
- package/docs/interfaces/RoomInfo.html +10 -9
- package/docs/interfaces/RoomLabel.html +17 -16
- package/docs/interfaces/RoomRules.html +8 -7
- package/docs/interfaces/Rooms.html +8 -7
- package/docs/interfaces/Scissor.html +12 -11
- package/docs/interfaces/State.html +11 -10
- package/docs/interfaces/TagCacheInterface.html +15 -14
- package/docs/interfaces/TagConfig.html +17 -16
- package/docs/interfaces/TagGLTFObjectGroup.html +9 -8
- package/docs/interfaces/TagIconUrl.html +15 -14
- package/docs/interfaces/TagObjectGroup.html +9 -8
- package/docs/interfaces/TagStyle.html +9 -8
- package/docs/interfaces/Tags.html +12 -11
- package/docs/interfaces/TemporaryState.html +9 -8
- package/docs/interfaces/Util.MagnifierParameter.html +14 -13
- package/docs/interfaces/Util.MouseGroupParameter.html +11 -10
- package/docs/interfaces/Util.PointIntersection.html +407 -0
- package/docs/modules/CruisePluginTypes.html +8 -7
- package/docs/modules/GuideLineItem.html +8 -7
- package/docs/modules/GuideLineModeItem.html +8 -7
- package/docs/modules/GuideLinePluginType.html +8 -7
- package/docs/modules/PanoVideoPluginType.html +8 -7
- package/docs/modules/Util.html +11 -8
- package/docs/modules.html +7 -7
- package/docs/types/ArrayPosition.html +8 -7
- package/docs/types/AudioAppearance.html +8 -7
- package/docs/types/AudioTagTypeConfigKey.html +8 -7
- package/docs/types/CSS3DRenderExportType.html +8 -7
- package/docs/types/CSS3DRenderPluginExportType.html +8 -7
- package/docs/types/CSS3DRenderPluginParameterType.html +8 -7
- package/docs/types/ClassFunctionParameters.html +8 -7
- package/docs/types/Color.html +8 -7
- package/docs/types/ContentTypeConfigKey.html +8 -7
- package/docs/types/ContentTypeConfigKeySplit.html +8 -7
- package/docs/types/ContentTypeMap.html +8 -7
- package/docs/types/Create3DDomContainerReturnType.html +8 -7
- package/docs/types/Create3DElementReturnType.html +8 -7
- package/docs/types/CruisePluginExportType.html +8 -7
- package/docs/types/CruisePluginTypes.CruiseData.html +8 -7
- package/docs/types/CruisePluginTypes.MoveEffect.html +8 -7
- package/docs/types/DeprecatedMediaPlaneProperty.html +8 -7
- package/docs/types/DeprecatedTagProperty.html +8 -7
- package/docs/types/Direction-1.html +8 -7
- package/docs/types/Direction4.html +8 -7
- package/docs/types/ElementRenderer.html +8 -7
- package/docs/types/FloorplanRuleLabels.html +8 -7
- package/docs/types/FloorplanServerRuleLabels.html +8 -7
- package/docs/types/GuideLinePluginExportType.html +8 -7
- package/docs/types/GuideLinePluginType.GuideLineItem.html +8 -7
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +8 -7
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +8 -7
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +8 -7
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +8 -7
- package/docs/types/GuideLinePluginType.PathItem.html +8 -7
- package/docs/types/GuideLinePluginType.PluginData.html +8 -7
- package/docs/types/HelperEventMap.html +8 -7
- package/docs/types/LoadTagConfig.html +8 -7
- package/docs/types/MapviewFloorplanPluginParameterType.html +8 -7
- package/docs/types/MapviewFloorplanPluginReturnType.html +8 -7
- package/docs/types/MediaData.html +8 -7
- package/docs/types/MediaStore.html +8 -7
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +8 -7
- package/docs/types/ModelFloorplanPluginParameterType.html +8 -7
- package/docs/types/ModelFloorplanPluginReturnType.html +8 -7
- package/docs/types/ModelRoomLabelPluginParameters.html +8 -7
- package/docs/types/ModelRoomLabelPluginReturnType.html +8 -7
- package/docs/types/MoveArgs.html +8 -7
- package/docs/types/MoveOpts.html +8 -7
- package/docs/types/Object3DHelperEventMap.html +8 -7
- package/docs/types/ObjectFit.html +8 -7
- package/docs/types/PaintBrushEventMap.html +8 -7
- package/docs/types/PanoCompassPluginData.html +8 -7
- package/docs/types/PanoCompassPluginExportType.html +8 -7
- package/docs/types/PanoCompassPluginParameterType.html +8 -7
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +8 -7
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +8 -7
- package/docs/types/PanoIndex.html +8 -7
- package/docs/types/PanoMeasurePluginEvent.html +8 -7
- package/docs/types/PanoMeasureReturnType.html +8 -7
- package/docs/types/PanoSpatialTagPluginId.html +8 -7
- package/docs/types/PanoTagPluginExportInterface.html +8 -7
- package/docs/types/PanoTagPluginParamsInterface.html +8 -7
- package/docs/types/PanoVideoPluginParameterType.html +8 -7
- package/docs/types/PanoVideoPluginReturnType.html +8 -7
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +8 -7
- package/docs/types/PlaneTag.html +8 -7
- package/docs/types/Point2DTag.html +8 -7
- package/docs/types/Point3DTag.html +8 -7
- package/docs/types/PointTag.html +8 -7
- package/docs/types/PointTagInstance.html +8 -7
- package/docs/types/Position.html +8 -7
- package/docs/types/RotateArgs.html +8 -7
- package/docs/types/RotateOpts.html +8 -7
- package/docs/types/RuleLabelsKey.html +8 -7
- package/docs/types/RuleLabelsValue.html +8 -7
- package/docs/types/StickType.html +8 -7
- package/docs/types/Tag.html +8 -7
- package/docs/types/Tag2D.html +8 -7
- package/docs/types/Tag3D.html +8 -7
- package/docs/types/TagContentType.html +8 -7
- package/docs/types/TagDimensionType.html +8 -7
- package/docs/types/TagElement.html +8 -7
- package/docs/types/TagEvents.html +8 -7
- package/docs/types/TagGLTFObject.html +8 -7
- package/docs/types/TagHooks.html +8 -7
- package/docs/types/TagId.html +8 -7
- package/docs/types/TagInstance.html +8 -7
- package/docs/types/TagPointType.html +8 -7
- package/docs/types/TagRendererMap.html +8 -7
- package/docs/types/TopviewFloorplanPluginParameterType.html +8 -7
- package/docs/types/TopviewFloorplanPluginReturnType.html +8 -7
- package/docs/types/WorkCode.html +8 -7
- package/docs/variables/FLOOR_TYPE_MAP.html +8 -7
- package/docs/variables/PLUGIN.html +8 -7
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +8 -7
- package/docs/variables/ROOM_TYPE_MAP.html +8 -7
- package/docs/variables/itemLabelPluginServerParams.html +8 -7
- package/docs/variables/modelItemLabelPluginServerParams.html +8 -7
- package/docs/variables/modelRoomLabelPluginServerParams.html +8 -7
- package/libs/CSS3DRenderPlugin/Controller.d.ts +4 -1
- package/libs/CSS3DRenderPlugin/Controller.js +31 -28
- package/libs/CSS3DRenderPlugin/index.js +1 -1
- package/libs/CruisePlugin/Controller.js +1 -1
- package/libs/CruisePlugin/index.d.ts +2 -1
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/GuideLinePlugin/Components/Tag.js +68 -68
- package/libs/GuideLinePlugin/Controller.js +1 -1
- package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem.js +1 -1
- package/libs/GuideLinePlugin/index.js +1 -1
- package/libs/ItemLabelPlugin/ItemLabelItem.js +82 -82
- package/libs/ModelTVVideoPlugin/Plugin.js +30 -29
- package/libs/ModelTVVideoPlugin/index.js +4 -3
- package/libs/Object3DHelperPlugin/Controller.js +4 -3
- package/libs/Object3DHelperPlugin/index.js +7 -6
- package/libs/PanoCompassPlugin/Controller.js +21 -21
- package/libs/PanoCompassPlugin/index.js +1 -1
- package/libs/PanoCompassPlugin/typings.d.ts +1 -1
- package/libs/PanoDoorLabelPlugin/BaseController.js +1 -1
- package/libs/PanoDoorLabelPlugin/Controller.js +1 -1
- package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +60 -60
- package/libs/PanoDoorLabelPlugin/index.js +1 -1
- package/libs/PanoMeasurePlugin/Components/Common/CircleButton.js +93 -0
- package/libs/PanoMeasurePlugin/Components/Common/CircleButton.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Components/Common/Exit.js +42 -0
- package/libs/PanoMeasurePlugin/Components/Common/Exit.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Components/Common/Switcher0.js +246 -0
- package/libs/PanoMeasurePlugin/Components/Common/Switcher0.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Components/Common/Switcher1.js +211 -0
- package/libs/PanoMeasurePlugin/Components/Common/Switcher1.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Components/Common/icons/index.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Components/Common/icons/index.js +7 -0
- package/libs/PanoMeasurePlugin/Components/Controller0.js +252 -0
- package/libs/PanoMeasurePlugin/Components/Controller0.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Components/Controller1.js +395 -0
- package/libs/PanoMeasurePlugin/Components/Controller1.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Components/Tip.js +128 -0
- package/libs/PanoMeasurePlugin/Components/Tip.svelte.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +12 -4
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +43 -34
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +27 -18
- package/libs/PanoMeasurePlugin/Controller/EditController.js +285 -92
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +27 -25
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +6 -4
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +9 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +101 -54
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +26 -9
- package/libs/PanoMeasurePlugin/Controller/index.js +138 -81
- package/libs/PanoMeasurePlugin/Model/area.d.ts +74 -0
- package/libs/PanoMeasurePlugin/Model/area.js +117 -0
- package/libs/PanoMeasurePlugin/Model/index.d.ts +10 -0
- package/libs/PanoMeasurePlugin/Model/index.js +61 -37
- package/libs/PanoMeasurePlugin/Model/line.d.ts +7 -1
- package/libs/PanoMeasurePlugin/Model/line.js +37 -22
- package/libs/PanoMeasurePlugin/Model/point.js +17 -12
- package/libs/PanoMeasurePlugin/Model/polygon.d.ts +14 -0
- package/libs/PanoMeasurePlugin/Model/polygon.js +44 -0
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Model/polyline.js +11 -3
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +8 -4
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +49 -37
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +16 -12
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +41 -39
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +10 -3
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +123 -37
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -8
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +16 -24
- package/libs/PanoMeasurePlugin/index.js +73 -24
- package/libs/PanoMeasurePlugin/typings/data.d.ts +24 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +17 -3
- package/libs/PanoMeasurePlugin/typings/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.d.ts +22 -0
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +50 -0
- package/libs/PanoMeasurePlugin/utils/dom/base.d.ts +29 -0
- package/libs/PanoMeasurePlugin/utils/dom/base.js +78 -0
- package/libs/PanoMeasurePlugin/utils/dom/distanceItem.d.ts +27 -0
- package/libs/PanoMeasurePlugin/utils/dom/distanceItem.js +63 -0
- package/libs/PanoMeasurePlugin/utils/generatePolygonGeometry.d.ts +6 -0
- package/libs/PanoMeasurePlugin/utils/generatePolygonGeometry.js +13 -0
- package/libs/PanoMeasurePlugin/utils/geometryUtil.d.ts +7 -0
- package/libs/PanoMeasurePlugin/utils/geometryUtil.js +39 -0
- package/libs/PanoMeasurePlugin/utils/isIntersecting.d.ts +15 -0
- package/libs/PanoMeasurePlugin/utils/isIntersecting.js +25 -0
- package/libs/PanoMeasurePlugin/utils/line.d.ts +2 -1
- package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +2 -1
- package/libs/PanoSpatialTagPlugin/Plugin.js +1 -1
- package/libs/PanoSpatialTagPlugin/index.js +1 -1
- package/libs/PanoTagPlugin/controller/TagCache.js +1 -1
- package/libs/PanoTagPlugin/controller/TagComputer.js +1 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +1 -1
- package/libs/PanoTagPlugin/controller/TagUtil.js +1 -1
- package/libs/PanoTagPlugin/controller/index.d.ts +2 -1
- package/libs/PanoTagPlugin/controller/index.js +1 -1
- package/libs/PanoTagPlugin/index.js +1 -1
- package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +1 -1
- package/libs/PanoTagPlugin/typings/tag/TagInstance.d.ts +2 -1
- package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +0 -4
- package/libs/PanoVideoPlugin/Controller.js +1 -1
- package/libs/PanoVideoPlugin/index.js +1 -1
- package/libs/base/BasePlugin.d.ts +6 -3
- package/libs/base/BasePlugin.js +14 -11
- package/libs/base/BasePluginWithData.d.ts +2 -1
- package/libs/components/PaintBrush/style.d.ts +1 -1
- package/libs/components/PaintBrush/style.js +4 -4
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -1
- package/libs/index.js +144 -124
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +3 -7
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +29 -49
- package/libs/shared-utils/absoluteUrl.d.ts +5 -0
- package/libs/shared-utils/absoluteUrl.js +10 -0
- package/{dist/PanoMeasurePlugin/utils → libs/shared-utils}/getIntersectionFromEvent.d.ts +1 -1
- package/libs/{PanoMeasurePlugin/utils → shared-utils}/getPointFromHammerEvent.d.ts +1 -1
- package/libs/shared-utils/index.d.ts +1 -1
- package/libs/shared-utils/index.js +21 -20
- package/libs/shared-utils/isTouchDevice.d.ts +1 -0
- package/libs/shared-utils/isTouchDevice.js +4 -0
- package/libs/shared-utils/logger.js +2 -2
- package/libs/shared-utils/safeObj.d.ts +1 -0
- package/libs/shared-utils/safeObj.js +6 -0
- package/libs/shared-utils/three/IObject3D.d.ts +7 -0
- package/libs/shared-utils/three/IObject3D.js +25 -0
- package/libs/shared-utils/three/Magnifier.d.ts +5 -0
- package/libs/shared-utils/three/Magnifier.js +22 -14
- package/libs/shared-utils/three/PointSelector.d.ts +92 -0
- package/libs/shared-utils/three/PointSelector.js +187 -0
- package/libs/shared-utils/three/PointSelectorHelper.d.ts +41 -0
- package/libs/shared-utils/three/PointSelectorHelper.js +50 -0
- package/libs/shared-utils/three/centerPoint.js +1 -3
- package/libs/shared-utils/three/index.d.ts +1 -1
- package/libs/typings/typings.d.ts +4 -0
- package/libs/vendor/svelte/internal/index.js +392 -345
- package/package.json +4 -2
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +0 -30
- package/dist/shared-utils/isAbsoluteURL.d.ts +0 -1
- package/dist/shared-utils/three/FivePointSelector.d.ts +0 -36
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +0 -30
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +0 -83
- package/libs/shared-utils/isAbsoluteURL.d.ts +0 -1
- package/libs/shared-utils/isAbsoluteURL.js +0 -6
- package/libs/shared-utils/three/FivePointSelector.d.ts +0 -36
- package/libs/shared-utils/three/FivePointSelector.js +0 -49
- /package/libs/{PanoMeasurePlugin/utils → shared-utils}/getIntersectionFromEvent.js +0 -0
- /package/libs/{PanoMeasurePlugin/utils → shared-utils}/getPointFromHammerEvent.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type Hammer from 'hammerjs';
|
|
2
2
|
import type { Five, Intersection } from '@realsee/five';
|
|
3
3
|
/** 通过鼠标事件或者触摸事件,获取当前点击屏幕关联的射线与模型的交点 */
|
|
4
|
-
export declare function getIntersectionFromEvent(five: Five, event: typeof Hammer['Input']): Intersection[];
|
|
4
|
+
export declare function getIntersectionFromEvent(five: Five, event: (typeof Hammer)['Input']): Intersection[];
|
|
@@ -4,7 +4,7 @@ import { Vector2 } from 'three';
|
|
|
4
4
|
* 从 Hammer 事件中获取操作的点在交互 DOM 中的位置
|
|
5
5
|
* @ignore TODO: make a suitable name
|
|
6
6
|
*/
|
|
7
|
-
export declare function getPointFromHammerEvent(event: typeof Hammer['Input']): {
|
|
7
|
+
export declare function getPointFromHammerEvent(event: (typeof Hammer)['Input']): {
|
|
8
8
|
point: Vector2;
|
|
9
9
|
ndcPoint: Vector2;
|
|
10
10
|
};
|
|
@@ -3,40 +3,41 @@ import { Rectangle as r } from "./math/Rectangle.js";
|
|
|
3
3
|
import { isModelLike as e, isPanoramaLike as t } from "./five/mode.js";
|
|
4
4
|
import { Magnifier as m } from "./three/Magnifier.js";
|
|
5
5
|
import { getCoordsFromClient as i, getCoordsFromElement as n } from "./three/getCoords.js";
|
|
6
|
-
import { getRaycasterFromFivePointer as
|
|
7
|
-
import { getIntersectFromRelativePosition as
|
|
8
|
-
import { PointHelper as
|
|
6
|
+
import { getRaycasterFromFivePointer as l } from "./three/getRaycaster.js";
|
|
7
|
+
import { getIntersectFromRelativePosition as p } from "./three/getIntersect.js";
|
|
8
|
+
import { PointHelper as f } from "./three/PointHelper.js";
|
|
9
9
|
import { PointDomHelper as a } from "./three/PointDomHelper.js";
|
|
10
|
-
import {
|
|
11
|
-
import { isNil as g, notNil as
|
|
12
|
-
import { uuid as
|
|
13
|
-
import { isAbsoluteURL as c } from "./
|
|
14
|
-
import { getFrameTime as d, nextFrame as
|
|
15
|
-
import { BetterTween as
|
|
16
|
-
const
|
|
10
|
+
import { PointSelectorHelper as s } from "./three/PointSelectorHelper.js";
|
|
11
|
+
import { isNil as g, notNil as u } from "./isNil.js";
|
|
12
|
+
import { uuid as F } from "./uuid.js";
|
|
13
|
+
import { absoluteUrl as P, isAbsoluteURL as c } from "./absoluteUrl.js";
|
|
14
|
+
import { getFrameTime as d, nextFrame as b, requestAnimationFrameInterval as v } from "./animationFrame/index.js";
|
|
15
|
+
import { BetterTween as R, tweenProgress as _ } from "./animationFrame/BetterTween.js";
|
|
16
|
+
const U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
17
17
|
__proto__: null,
|
|
18
|
-
BetterTween:
|
|
19
|
-
FivePointSelector: s,
|
|
18
|
+
BetterTween: R,
|
|
20
19
|
Interval: o,
|
|
21
20
|
Magnifier: m,
|
|
22
21
|
PointDomHelper: a,
|
|
23
|
-
PointHelper:
|
|
22
|
+
PointHelper: f,
|
|
23
|
+
PointSelectorHelper: s,
|
|
24
24
|
Rectangle: r,
|
|
25
|
+
absoluteUrl: P,
|
|
25
26
|
getCoordsFromClient: i,
|
|
26
27
|
getCoordsFromElement: n,
|
|
27
28
|
getFrameTime: d,
|
|
28
|
-
getIntersectFromRelativePosition:
|
|
29
|
-
getRaycasterFromFivePointer:
|
|
29
|
+
getIntersectFromRelativePosition: p,
|
|
30
|
+
getRaycasterFromFivePointer: l,
|
|
30
31
|
isAbsoluteURL: c,
|
|
31
32
|
isModelLike: e,
|
|
32
33
|
isNil: g,
|
|
33
34
|
isPanoramaLike: t,
|
|
34
|
-
nextFrame:
|
|
35
|
-
notNil:
|
|
35
|
+
nextFrame: b,
|
|
36
|
+
notNil: u,
|
|
36
37
|
requestAnimationFrameInterval: v,
|
|
37
|
-
tweenProgress:
|
|
38
|
-
uuid:
|
|
38
|
+
tweenProgress: _,
|
|
39
|
+
uuid: F
|
|
39
40
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
U as index
|
|
42
43
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isTouchDevice: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
|
-
console.
|
|
3
|
-
"%c %c@realsee/dnalogel %cv2.
|
|
2
|
+
console.debug(
|
|
3
|
+
"%c %c@realsee/dnalogel %cv2.22.0-dev.0",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function safeObj<T = any>(object: T): NonNullable<Extract<T, Record<any, any>>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Object3D as r } from "three";
|
|
2
|
+
class s extends r {
|
|
3
|
+
constructor() {
|
|
4
|
+
super();
|
|
5
|
+
}
|
|
6
|
+
add(...e) {
|
|
7
|
+
if (e.length === 0)
|
|
8
|
+
return this;
|
|
9
|
+
const t = e.filter(Boolean);
|
|
10
|
+
return super.add(...t);
|
|
11
|
+
}
|
|
12
|
+
remove(...e) {
|
|
13
|
+
if (e.length === 0)
|
|
14
|
+
return this;
|
|
15
|
+
const t = e.filter(Boolean);
|
|
16
|
+
return super.remove(...t);
|
|
17
|
+
}
|
|
18
|
+
removeFromParent() {
|
|
19
|
+
const e = this.parent;
|
|
20
|
+
return e !== null && e.remove(this), this;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
s as IObject3D
|
|
25
|
+
};
|
|
@@ -35,7 +35,12 @@ export declare class Magnifier {
|
|
|
35
35
|
private hammer?;
|
|
36
36
|
private state;
|
|
37
37
|
constructor(five: Five, options: MagnifierParameter);
|
|
38
|
+
getCurrentState(): {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
};
|
|
38
41
|
dispose(): void;
|
|
42
|
+
show(): this;
|
|
43
|
+
hide(): this;
|
|
39
44
|
enable(): this;
|
|
40
45
|
disable(): this;
|
|
41
46
|
/** 把放大镜放到某一个容器中 */
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var a = (s, t, e) => (
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var P = (s, t, e) => t in s ? p(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var a = (s, t, e) => (P(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
4
|
import w from "hammerjs";
|
|
5
|
-
import * as
|
|
5
|
+
import * as v from "three";
|
|
6
6
|
import { Subscribe as D } from "@realsee/five";
|
|
7
7
|
function l(s, t, e) {
|
|
8
8
|
const n = s[t], i = s[e];
|
|
9
|
-
|
|
9
|
+
n === void 0 || i === void 0 || (s[t] = i, s[e] = n);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function C(s, t, e) {
|
|
12
12
|
const n = e / 2;
|
|
13
13
|
for (let i = 1; i <= n; i++) {
|
|
14
14
|
const h = e - (i - 1);
|
|
@@ -30,7 +30,7 @@ class H {
|
|
|
30
30
|
a(this, "config");
|
|
31
31
|
a(this, "offset", { x: 0, y: 0 });
|
|
32
32
|
a(this, "context");
|
|
33
|
-
a(this, "renderCenter", new
|
|
33
|
+
a(this, "renderCenter", new v.Vector3());
|
|
34
34
|
a(this, "hammer");
|
|
35
35
|
a(this, "state", { enabled: !1 });
|
|
36
36
|
a(this, "onPan", (t) => {
|
|
@@ -55,10 +55,19 @@ class H {
|
|
|
55
55
|
throw new Error("CANNOT CREATE CONTEXT2D");
|
|
56
56
|
this.context = n, this.config.dragEnabled && (this.hammer = new w(this.canvas), this.hammer.on("pan", this.onPan), this.hammer.on("panend", this.onPanEnd)), this.initStyle();
|
|
57
57
|
}
|
|
58
|
+
getCurrentState() {
|
|
59
|
+
return this.state;
|
|
60
|
+
}
|
|
58
61
|
dispose() {
|
|
59
62
|
var t;
|
|
60
63
|
this.clear(), this.disable(), (t = this.hammer) == null || t.destroy();
|
|
61
64
|
}
|
|
65
|
+
show() {
|
|
66
|
+
return this.canvas.style.visibility = "visible", this;
|
|
67
|
+
}
|
|
68
|
+
hide() {
|
|
69
|
+
return this.canvas.style.visibility = "hidden", this;
|
|
70
|
+
}
|
|
62
71
|
enable() {
|
|
63
72
|
var t;
|
|
64
73
|
if (!this.state.enabled)
|
|
@@ -70,8 +79,7 @@ class H {
|
|
|
70
79
|
}
|
|
71
80
|
/** 把放大镜放到某一个容器中 */
|
|
72
81
|
appendTo(t) {
|
|
73
|
-
|
|
74
|
-
return this.containerDom && ((e = this.containerDom) == null || e.removeChild(this.canvas)), this.containerDom = t, this.state.enabled && t.append(this.canvas), this;
|
|
82
|
+
return this.containerDom && Array.from(this.containerDom.children).includes(this.canvas) && this.containerDom.removeChild(this.canvas), this.containerDom = t, this.state.enabled && t.append(this.canvas), this;
|
|
75
83
|
}
|
|
76
84
|
/** 清除放大镜渲染内容 */
|
|
77
85
|
clear() {
|
|
@@ -90,16 +98,16 @@ class H {
|
|
|
90
98
|
render() {
|
|
91
99
|
if (!this.five.renderer || !this.containerDom)
|
|
92
100
|
return;
|
|
93
|
-
const { scale: t, context: e, width: n, height: i } = this, h = this.renderCenter.clone().project(this.five.camera), r = this.five.renderer.getSize(new
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
101
|
+
const { scale: t, context: e, width: n, height: i } = this, h = this.renderCenter.clone().project(this.five.camera), r = this.five.renderer.getSize(new v.Vector2()), o = 1, c = n / t, g = i / t, u = o * t, y = (h.x + 1) / 2 * r.x, b = (h.y + 1) / 2 * r.y, d = this.five.getPixels(y - c / 2, b - c / 2, c, g, u), f = Math.floor(n * o), x = Math.floor(i * o);
|
|
102
|
+
C(d, f, x);
|
|
103
|
+
const m = new ImageData(f, x);
|
|
104
|
+
m.data.set(d), e.putImageData(m, 0, 0);
|
|
97
105
|
}
|
|
98
106
|
initStyle() {
|
|
99
107
|
const t = this.canvas;
|
|
100
108
|
t.classList.add("five-plugin__magnifier"), t.style.position = "absolute", t.style.pointerEvents = "all", t.style.borderRadius = "50%", t.style.zIndex = "99";
|
|
101
109
|
const e = 1;
|
|
102
|
-
t.setAttribute("width", (this.width * e).toString()), t.setAttribute("height", (this.height * e).toString()), t.style.border = "2px solid rgba(255,255,255,0.20)", t.style.width = this.width + "px", t.style.height = this.height + "px", t.style.top = this.config.initialPosition.top, t.style.left = this.config.initialPosition.left, t.style.transform = "translate(0,0,100px)", this.config.dragEnabled && (this.canvas.style.cursor = "pointer");
|
|
110
|
+
t.setAttribute("width", (this.width * e).toString()), t.setAttribute("height", (this.height * e).toString()), t.style.border = "2px solid rgba(255,255,255,0.20)", t.style.width = this.width + "px", t.style.height = this.height + "px", t.style.top = this.config.initialPosition.top, t.style.left = this.config.initialPosition.left, t.style.transform = "translate(0,0,100px)", t.style.visibility = "visible", this.config.dragEnabled && (this.canvas.style.cursor = "pointer");
|
|
103
111
|
}
|
|
104
112
|
}
|
|
105
113
|
export {
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { Five, SubscribeEventMap } from '@realsee/five';
|
|
2
|
+
import { Subscribe } from '@realsee/five';
|
|
3
|
+
import { PointSelectorHelper, type PointIntersection } from './PointSelectorHelper';
|
|
4
|
+
import { Vector3 } from 'three';
|
|
5
|
+
interface Config {
|
|
6
|
+
/**
|
|
7
|
+
* @description: 选点的两种模式, 'fixed' 为固定选点为屏幕中心点,拖动five画布来更新点,'cursor' 为跟随鼠标移动来更新点, 'auto' 则根据设备类型自动选择
|
|
8
|
+
* @default: 'auto'
|
|
9
|
+
*/
|
|
10
|
+
mode: 'fixed' | 'cursor' | 'auto';
|
|
11
|
+
pointSelectorHelperParams: ConstructorParameters<typeof PointSelectorHelper>[1];
|
|
12
|
+
}
|
|
13
|
+
interface EventMap extends SubscribeEventMap {
|
|
14
|
+
/**
|
|
15
|
+
* @description: 与模型交点更新时触发,移出监听范围时为null
|
|
16
|
+
* @param isAdhered 是否为吸附的点
|
|
17
|
+
*/
|
|
18
|
+
intersectionUpdate: (intersection: PointIntersection | null, isAdhered?: boolean) => void;
|
|
19
|
+
/**
|
|
20
|
+
* @description: 试图打点,返回false则不打点
|
|
21
|
+
*/
|
|
22
|
+
wantsSelect: (intersection: PointIntersection) => boolean | void;
|
|
23
|
+
select: (intersection: PointIntersection) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @description: 在屏幕上选点
|
|
27
|
+
*/
|
|
28
|
+
export declare class PointSelector {
|
|
29
|
+
hook: Subscribe<EventMap>;
|
|
30
|
+
get position(): PointIntersection;
|
|
31
|
+
/**
|
|
32
|
+
* @description: 不在 five canvas 上时为 true
|
|
33
|
+
*/
|
|
34
|
+
outOfFive: boolean;
|
|
35
|
+
private five;
|
|
36
|
+
private hammer?;
|
|
37
|
+
private mode;
|
|
38
|
+
private pointSelectorHelper;
|
|
39
|
+
private enabled;
|
|
40
|
+
/** 长按屏幕的动作触发后为true,手指抬起后为false */
|
|
41
|
+
private pressDown;
|
|
42
|
+
/** 一组吸附的点,光标靠近这些点时,会将helper以及放大镜的位置设置为这些点 */
|
|
43
|
+
private adherePoints;
|
|
44
|
+
/** 吸附点的半径 */
|
|
45
|
+
private adherePointsRadius;
|
|
46
|
+
constructor(five: Five, config?: Partial<Config>);
|
|
47
|
+
enable(): void;
|
|
48
|
+
disable(): void;
|
|
49
|
+
dispose(): void;
|
|
50
|
+
setAdherePoints(points: Vector3[] | Vector3 | null, radius?: number): void;
|
|
51
|
+
/**
|
|
52
|
+
* @description: 主动触发一次选点
|
|
53
|
+
* @return: select 是否成功
|
|
54
|
+
*/
|
|
55
|
+
select: (intersection?: PointIntersection) => boolean;
|
|
56
|
+
/**
|
|
57
|
+
* @description: 鼠标进入five canvas时
|
|
58
|
+
*/
|
|
59
|
+
private onEnter;
|
|
60
|
+
/**
|
|
61
|
+
* @description: 鼠标离开five canvas时
|
|
62
|
+
*/
|
|
63
|
+
private onLeave;
|
|
64
|
+
private onTap;
|
|
65
|
+
/**
|
|
66
|
+
* 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
|
|
67
|
+
* 2. 如果有长按点,把长按点位置更新为当前位置
|
|
68
|
+
*/
|
|
69
|
+
private onPan;
|
|
70
|
+
/**
|
|
71
|
+
* @description: 长按屏幕后,更新长按点的位置
|
|
72
|
+
*/
|
|
73
|
+
private onPress;
|
|
74
|
+
/**
|
|
75
|
+
* @description: 手指抬起后,重置pressDown状态
|
|
76
|
+
*/
|
|
77
|
+
private onPanEnd;
|
|
78
|
+
private intersectionOnModelUpdate;
|
|
79
|
+
private updateByMousePosition;
|
|
80
|
+
/**
|
|
81
|
+
* @description: 根据鼠标位置更新helper位置
|
|
82
|
+
*/
|
|
83
|
+
private updateByNdcPosition;
|
|
84
|
+
/**
|
|
85
|
+
* @description: 更新 pointSelectorHelper 的焦点位置
|
|
86
|
+
*/
|
|
87
|
+
private updatePointSelectorHelperIntersect;
|
|
88
|
+
private onFiveWantsPanGesture;
|
|
89
|
+
private renderScreenCenter;
|
|
90
|
+
private emitIntersectionUpdate;
|
|
91
|
+
}
|
|
92
|
+
export {};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
var u = Object.defineProperty, v = Object.defineProperties;
|
|
2
|
+
var P = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var m = Object.getOwnPropertySymbols;
|
|
4
|
+
var S = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var p = (s, e, t) => e in s ? u(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, a = (s, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
S.call(e, t) && p(s, t, e[t]);
|
|
8
|
+
if (m)
|
|
9
|
+
for (var t of m(e))
|
|
10
|
+
w.call(e, t) && p(s, t, e[t]);
|
|
11
|
+
return s;
|
|
12
|
+
}, c = (s, e) => v(s, P(e));
|
|
13
|
+
var i = (s, e, t) => (p(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
|
+
import { Subscribe as H } from "@realsee/five";
|
|
15
|
+
import { PointSelectorHelper as y } from "./PointSelectorHelper.js";
|
|
16
|
+
import { isTouchDevice as b } from "../isTouchDevice.js";
|
|
17
|
+
import U from "hammerjs";
|
|
18
|
+
import { getIntersectionFromEvent as d } from "../getIntersectionFromEvent.js";
|
|
19
|
+
import { Vector3 as E, Object3D as M, Face3 as F, Vector2 as I, Raycaster as O } from "three";
|
|
20
|
+
import { getIntersectFromRelativePosition as k } from "./getIntersect.js";
|
|
21
|
+
const l = () => !1;
|
|
22
|
+
class W {
|
|
23
|
+
constructor(e, t) {
|
|
24
|
+
i(this, "hook", new H());
|
|
25
|
+
/**
|
|
26
|
+
* @description: 不在 five canvas 上时为 true
|
|
27
|
+
*/
|
|
28
|
+
i(this, "outOfFive", !1);
|
|
29
|
+
i(this, "five");
|
|
30
|
+
i(this, "hammer");
|
|
31
|
+
i(this, "mode");
|
|
32
|
+
i(this, "pointSelectorHelper");
|
|
33
|
+
i(this, "enabled", !1);
|
|
34
|
+
/** 长按屏幕的动作触发后为true,手指抬起后为false */
|
|
35
|
+
i(this, "pressDown", !1);
|
|
36
|
+
/** 一组吸附的点,光标靠近这些点时,会将helper以及放大镜的位置设置为这些点 */
|
|
37
|
+
i(this, "adherePoints", null);
|
|
38
|
+
/** 吸附点的半径 */
|
|
39
|
+
i(this, "adherePointsRadius", 0.1);
|
|
40
|
+
/**
|
|
41
|
+
* @description: 主动触发一次选点
|
|
42
|
+
* @return: select 是否成功
|
|
43
|
+
*/
|
|
44
|
+
i(this, "select", (e) => {
|
|
45
|
+
e && this.updatePointSelectorHelperIntersect(e);
|
|
46
|
+
const t = this.hook.emit("wantsSelect", this.position);
|
|
47
|
+
return t || (this.pointSelectorHelper.hide(), this.hook.emit("select", this.position)), !t;
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* @description: 鼠标进入five canvas时
|
|
51
|
+
*/
|
|
52
|
+
i(this, "onEnter", () => {
|
|
53
|
+
this.pointSelectorHelper.show(), this.outOfFive = !1, this.hook.emit("intersectionUpdate", this.position);
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* @description: 鼠标离开five canvas时
|
|
57
|
+
*/
|
|
58
|
+
i(this, "onLeave", () => {
|
|
59
|
+
this.pointSelectorHelper.hide(), this.outOfFive = !0, this.hook.emit("intersectionUpdate", null);
|
|
60
|
+
});
|
|
61
|
+
i(this, "onTap", (e) => {
|
|
62
|
+
const [t] = d(this.five, e);
|
|
63
|
+
t != null && t.face && this.select(t);
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
|
|
67
|
+
* 2. 如果有长按点,把长按点位置更新为当前位置
|
|
68
|
+
*/
|
|
69
|
+
i(this, "onPan", (e) => {
|
|
70
|
+
if (!this.pressDown)
|
|
71
|
+
return;
|
|
72
|
+
const [t] = d(this.five, e);
|
|
73
|
+
t != null && t.face && this.intersectionOnModelUpdate(t);
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* @description: 长按屏幕后,更新长按点的位置
|
|
77
|
+
*/
|
|
78
|
+
i(this, "onPress", (e) => {
|
|
79
|
+
const [t] = d(this.five, e);
|
|
80
|
+
t != null && t.face && (this.pressDown = !0, this.intersectionOnModelUpdate(t));
|
|
81
|
+
});
|
|
82
|
+
/**
|
|
83
|
+
* @description: 手指抬起后,重置pressDown状态
|
|
84
|
+
*/
|
|
85
|
+
i(this, "onPanEnd", () => {
|
|
86
|
+
this.pressDown && (this.pressDown = !1, this.select());
|
|
87
|
+
});
|
|
88
|
+
i(this, "intersectionOnModelUpdate", (e) => {
|
|
89
|
+
this.pointSelectorHelper.show(), this.updatePointSelectorHelperIntersect(e);
|
|
90
|
+
});
|
|
91
|
+
i(this, "updateByMousePosition", (e) => {
|
|
92
|
+
const t = this.five.getElement();
|
|
93
|
+
if (!t)
|
|
94
|
+
return;
|
|
95
|
+
const { clientX: o, clientY: r } = e, n = {
|
|
96
|
+
x: o / t.clientWidth,
|
|
97
|
+
y: 1 - r / t.clientHeight
|
|
98
|
+
};
|
|
99
|
+
this.updateByNdcPosition(n);
|
|
100
|
+
});
|
|
101
|
+
/**
|
|
102
|
+
* @description: 根据鼠标位置更新helper位置
|
|
103
|
+
*/
|
|
104
|
+
i(this, "updateByNdcPosition", (e) => {
|
|
105
|
+
const t = k(this.five, e), o = (() => t ? c(a({}, t), { isVirtual: !1 }) : c(a({}, x(this.five, e)), { isVirtual: !0 }))();
|
|
106
|
+
this.updatePointSelectorHelperIntersect(o);
|
|
107
|
+
});
|
|
108
|
+
/**
|
|
109
|
+
* @description: 更新 pointSelectorHelper 的焦点位置
|
|
110
|
+
*/
|
|
111
|
+
i(this, "updatePointSelectorHelperIntersect", (e) => {
|
|
112
|
+
var r;
|
|
113
|
+
const t = a({}, e);
|
|
114
|
+
let o = !1;
|
|
115
|
+
if (((r = this.adherePoints) == null ? void 0 : r.length) > 0 && typeof this.adherePointsRadius == "number") {
|
|
116
|
+
for (const n of this.adherePoints)
|
|
117
|
+
if (n.distanceTo(e.point) < this.adherePointsRadius) {
|
|
118
|
+
t.point = n.clone(), o = !0;
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
this.pointSelectorHelper.updateWithIntersect(t, { emitEvent: !1 }), this.hook.emit("intersectionUpdate", t, o);
|
|
123
|
+
});
|
|
124
|
+
i(this, "onFiveWantsPanGesture", () => {
|
|
125
|
+
if (this.pressDown)
|
|
126
|
+
return !1;
|
|
127
|
+
});
|
|
128
|
+
i(this, "renderScreenCenter", () => {
|
|
129
|
+
this.updateByNdcPosition({ x: 0.5, y: 0.5 });
|
|
130
|
+
});
|
|
131
|
+
i(this, "emitIntersectionUpdate", (e) => {
|
|
132
|
+
this.hook.emit("intersectionUpdate", e);
|
|
133
|
+
});
|
|
134
|
+
var n, h;
|
|
135
|
+
this.five = e;
|
|
136
|
+
const o = (n = t == null ? void 0 : t.mode) != null ? n : "auto";
|
|
137
|
+
o === "auto" ? this.mode = b ? "fixed" : "cursor" : this.mode = o;
|
|
138
|
+
const r = {
|
|
139
|
+
autoFixPCPosition: this.mode === "cursor",
|
|
140
|
+
initialPosition: this.mode === "fixed" ? { left: "35%", top: "20%" } : void 0
|
|
141
|
+
};
|
|
142
|
+
this.pointSelectorHelper = new y(e, c(a({}, t == null ? void 0 : t.pointSelectorHelperParams), {
|
|
143
|
+
magnifierParams: a(a({}, r), (h = t == null ? void 0 : t.pointSelectorHelperParams) == null ? void 0 : h.magnifierParams)
|
|
144
|
+
})), this.pointSelectorHelper.hide();
|
|
145
|
+
}
|
|
146
|
+
get position() {
|
|
147
|
+
return this.outOfFive ? null : this.pointSelectorHelper.position;
|
|
148
|
+
}
|
|
149
|
+
enable() {
|
|
150
|
+
if (this.enabled)
|
|
151
|
+
return;
|
|
152
|
+
this.enabled = !0, this.pointSelectorHelper.enable();
|
|
153
|
+
const e = this.five.getElement();
|
|
154
|
+
if (!e)
|
|
155
|
+
throw new Error("five element not found");
|
|
156
|
+
this.hammer || (this.hammer = new U(e)), this.mode === "cursor" ? (this.five.on("intersectionOnModelUpdate", this.intersectionOnModelUpdate), this.five.on("wantsPanGesture", this.onFiveWantsPanGesture), this.five.on("wantsMoveToPano", l), this.five.on("wantsChangeMode", l), this.five.on("wantsTapGesture", l), e.addEventListener("mousemove", this.updateByMousePosition), e.addEventListener("mouseenter", this.onEnter), e.addEventListener("mouseout", this.onLeave), this.hammer.on("tap", this.onTap), this.hammer.on("pan", this.onPan), this.hammer.on("press", this.onPress), this.hammer.on("panend", this.onPanEnd)) : this.mode === "fixed" && (this.five.on("panGesture", this.renderScreenCenter), this.five.on("interiaPan", this.renderScreenCenter), this.renderScreenCenter(), this.pointSelectorHelper.show()), this.pointSelectorHelper.hooks.on("intersectionUpdate", this.emitIntersectionUpdate);
|
|
157
|
+
}
|
|
158
|
+
disable() {
|
|
159
|
+
if (!this.enabled)
|
|
160
|
+
return;
|
|
161
|
+
this.enabled = !1, this.pointSelectorHelper.disable();
|
|
162
|
+
const e = this.five.getElement();
|
|
163
|
+
this.five.off("intersectionOnModelUpdate", this.intersectionOnModelUpdate), this.five.off("wantsPanGesture", this.onFiveWantsPanGesture), this.five.off("wantsMoveToPano", l), this.five.off("wantsChangeMode", l), this.five.off("wantsTapGesture", l), e == null || e.removeEventListener("mousemove", this.updateByMousePosition), e == null || e.removeEventListener("mouseenter", this.onEnter), e == null || e.removeEventListener("mouseout", this.onLeave), this.hammer.off("tap", this.onTap), this.hammer.off("pan", this.onPan), this.hammer.off("press", this.onPress), this.hammer.off("panend", this.onPanEnd), this.five.off("panGesture", this.renderScreenCenter), this.five.off("interiaPan", this.renderScreenCenter), this.pointSelectorHelper.hooks.off("intersectionUpdate", this.emitIntersectionUpdate);
|
|
164
|
+
}
|
|
165
|
+
dispose() {
|
|
166
|
+
this.disable(), this.pointSelectorHelper.dispose();
|
|
167
|
+
}
|
|
168
|
+
setAdherePoints(e, t) {
|
|
169
|
+
e ? this.adherePoints = Array.isArray(e) ? e : [e] : this.adherePoints = null, typeof t == "number" && (this.adherePointsRadius = t);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function C(s, e) {
|
|
173
|
+
const { x: t, y: o } = e, r = t * 2 - 1, n = o * 2 - 1, h = new I().fromArray([r, n]), f = new O();
|
|
174
|
+
return f.setFromCamera(h, s.camera), f;
|
|
175
|
+
}
|
|
176
|
+
function x(s, e) {
|
|
177
|
+
const t = C(s, e), o = 3, r = new E().addVectors(t.ray.origin, t.ray.direction.clone().normalize().multiplyScalar(o)), n = t.ray.direction.clone().negate();
|
|
178
|
+
return {
|
|
179
|
+
distance: o,
|
|
180
|
+
point: r,
|
|
181
|
+
object: new M(),
|
|
182
|
+
face: new F(0, 0, 0, n)
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
export {
|
|
186
|
+
W as PointSelector
|
|
187
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five';
|
|
2
|
+
import { Subscribe } from '@realsee/five';
|
|
3
|
+
import { Magnifier, PointHelper, PointDomHelper } from '.';
|
|
4
|
+
import type { Intersection } from '../../typings/typings';
|
|
5
|
+
interface Options {
|
|
6
|
+
magnifier: Magnifier | null;
|
|
7
|
+
magnifierParams: ConstructorParameters<typeof Magnifier>[1];
|
|
8
|
+
pointHelper: PointHelper | null;
|
|
9
|
+
pointDomHelper: PointDomHelper | null;
|
|
10
|
+
}
|
|
11
|
+
type EventMap = {
|
|
12
|
+
intersectionUpdate: (intersection: PointIntersection) => void;
|
|
13
|
+
/** 功能开启 */
|
|
14
|
+
enabled: () => void;
|
|
15
|
+
/** 功能关闭 */
|
|
16
|
+
disabled: () => void;
|
|
17
|
+
};
|
|
18
|
+
export interface PointIntersection extends Intersection {
|
|
19
|
+
isVirtual?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare class PointSelectorHelper {
|
|
22
|
+
five: Five;
|
|
23
|
+
hooks: Subscribe<EventMap>;
|
|
24
|
+
position: PointIntersection | undefined;
|
|
25
|
+
magnifier: Magnifier | null;
|
|
26
|
+
private pointHelper;
|
|
27
|
+
private pointDomHelper;
|
|
28
|
+
private state;
|
|
29
|
+
private group;
|
|
30
|
+
constructor(five: Five, options?: Partial<Options>);
|
|
31
|
+
show: () => void;
|
|
32
|
+
hide: () => void;
|
|
33
|
+
enable(): void;
|
|
34
|
+
disable(): void;
|
|
35
|
+
dispose(): void;
|
|
36
|
+
updateWithIntersect: (intersect: Intersection, config?: {
|
|
37
|
+
emitEvent: boolean;
|
|
38
|
+
}) => void;
|
|
39
|
+
private abortUpdateMagnifier;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var l = (r, i, e) => i in r ? a(r, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[i] = e;
|
|
3
|
+
var t = (r, i, e) => (l(r, typeof i != "symbol" ? i + "" : i, e), e);
|
|
4
|
+
import * as h from "three";
|
|
5
|
+
import { Subscribe as p } from "@realsee/five";
|
|
6
|
+
import { Magnifier as o } from "./Magnifier.js";
|
|
7
|
+
import { PointHelper as d } from "./PointHelper.js";
|
|
8
|
+
import { PointDomHelper as f } from "./PointDomHelper.js";
|
|
9
|
+
class v {
|
|
10
|
+
constructor(i, e) {
|
|
11
|
+
t(this, "five");
|
|
12
|
+
t(this, "hooks", new p());
|
|
13
|
+
t(this, "position");
|
|
14
|
+
t(this, "magnifier", null);
|
|
15
|
+
t(this, "pointHelper", null);
|
|
16
|
+
t(this, "pointDomHelper", null);
|
|
17
|
+
t(this, "state", { enabled: !1, visible: !0 });
|
|
18
|
+
t(this, "group", new h.Group());
|
|
19
|
+
t(this, "show", () => {
|
|
20
|
+
this.state.visible || (this.state.visible = !0, this.pointHelper.visible = !0, this.pointDomHelper.enable(), this.magnifier.show(), this.five.needsRender = !0);
|
|
21
|
+
});
|
|
22
|
+
t(this, "hide", () => {
|
|
23
|
+
this.state.visible && (this.state.visible = !1, this.pointHelper.visible = !1, this.pointDomHelper.disable(), this.magnifier.hide(), this.five.needsRender = !0);
|
|
24
|
+
});
|
|
25
|
+
t(this, "updateWithIntersect", (i, e = { emitEvent: !0 }) => {
|
|
26
|
+
var n;
|
|
27
|
+
this.abortUpdateMagnifier(), this.position = i, e.emitEvent && this.hooks.emit("intersectionUpdate", i), this.pointHelper.updateWithIntersect(i), (n = this.pointDomHelper) == null || n.updateWithIntersect(i);
|
|
28
|
+
const s = () => this.magnifier.renderWithPoint(i.point);
|
|
29
|
+
this.abortUpdateMagnifier = () => this.five.off("renderFrame", s), this.five.once("renderFrame", s), this.five.needsRender = !0;
|
|
30
|
+
});
|
|
31
|
+
t(this, "abortUpdateMagnifier", () => {
|
|
32
|
+
});
|
|
33
|
+
var s;
|
|
34
|
+
this.five = i, this.magnifier = (e == null ? void 0 : e.magnifier) !== void 0 ? e.magnifier : new o(i, (s = e == null ? void 0 : e.magnifierParams) != null ? s : { dragEnabled: !0 }), this.pointHelper = (e == null ? void 0 : e.pointHelper) !== void 0 ? e.pointHelper : new d(), this.pointDomHelper = (e == null ? void 0 : e.pointDomHelper) !== void 0 ? e.pointDomHelper : new f(i), this.group.name = "five-point-selector", this.five.scene.add(this.group), this.magnifier.appendTo(document.body);
|
|
35
|
+
}
|
|
36
|
+
enable() {
|
|
37
|
+
var i, e;
|
|
38
|
+
this.state.enabled || (this.state.enabled = !0, this.pointHelper && this.group.add(this.pointHelper), (i = this.magnifier) == null || i.enable(), (e = this.pointDomHelper) == null || e.enable(), this.five.needsRender = !0, this.hooks.emit("enabled"));
|
|
39
|
+
}
|
|
40
|
+
disable() {
|
|
41
|
+
var i, e;
|
|
42
|
+
this.state.enabled && (this.state.enabled = !1, this.pointHelper && this.group.remove(this.pointHelper), (i = this.magnifier) == null || i.disable(), (e = this.pointDomHelper) == null || e.disable(), this.hooks.emit("disabled"));
|
|
43
|
+
}
|
|
44
|
+
dispose() {
|
|
45
|
+
this.hooks.off(), this.disable(), this.magnifier = null, this.pointHelper = null, this.pointDomHelper = null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
v as PointSelectorHelper
|
|
50
|
+
};
|