@realsee/dnalogel 2.25.0 → 2.26.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/dist/CruisePlugin/typing.d.ts +1 -1
- package/dist/GuideLinePlugin/typing.d.ts +1 -1
- package/dist/PanoCompassPlugin/typings.d.ts +1 -1
- package/dist/PipelinePlugin/Controller.d.ts +108 -0
- package/dist/PipelinePlugin/index.d.ts +6 -0
- package/dist/PipelinePlugin/typing/PluginData.d.ts +20 -0
- package/dist/PipelinePlugin/typing/ServerData.d.ts +28 -0
- package/dist/PipelinePlugin/typing/index.d.ts +79 -0
- package/dist/PipelinePlugin/utils/Objects/FlowPipe.d.ts +34 -0
- package/dist/PipelinePlugin/utils/Objects/Pipe.d.ts +49 -0
- package/dist/PipelinePlugin/utils/formatData.d.ts +12 -0
- package/dist/base/BasePluginWithData.d.ts +3 -15
- package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +1 -1
- package/dist/floorplan/typings/index.d.ts +1 -1
- package/dist/index.cjs.js +100 -65
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9269 -8673
- package/dist/index.umd.js +93 -58
- package/dist/shared-utils/three/Extras/Core/Interpolations.d.ts +11 -0
- package/dist/shared-utils/three/Extras/Curves/BezierCurve3.d.ts +13 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +33 -30
- package/docs/classes/CruisePluginController.html +28 -25
- package/docs/classes/GuideLineItem.GuideLineItem.html +22 -19
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +37 -34
- package/docs/classes/Magnifier.html +22 -19
- package/docs/classes/ModelRoomLabelController.html +13 -10
- package/docs/classes/Object3DHelperController.html +27 -24
- package/docs/classes/PaintBrush.html +17 -14
- package/docs/classes/PanoMeasurePluginLine.html +29 -26
- package/docs/classes/PanoMeasurePluginModel.html +29 -26
- package/docs/classes/PanoMeasurePluginPoint.html +16 -13
- package/docs/classes/PanoMeasurePluginPolyline.html +29 -26
- package/docs/classes/PanoTagPluginController.html +49 -46
- package/docs/classes/Util.BetterTween.html +11 -8
- package/docs/classes/Util.Interval.html +14 -11
- package/docs/classes/Util.Magnifier.html +22 -19
- package/docs/classes/Util.PointDomHelper.html +13 -10
- package/docs/classes/Util.PointHelper.html +13 -10
- package/docs/classes/Util.PointSelectorHelper.html +18 -15
- package/docs/classes/Util.Rectangle.html +15 -12
- package/docs/enums/CameraMovementEffect.html +9 -6
- package/docs/enums/ContentType.html +22 -19
- package/docs/enums/DIRECTION.html +11 -8
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +11 -8
- package/docs/enums/DimensionType.html +9 -6
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +10 -7
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +11 -8
- package/docs/enums/PaintBrushTypeEnum.html +10 -7
- package/docs/enums/PointType.html +9 -6
- package/docs/enums/Rotation.html +10 -7
- package/docs/functions/CSS3DRenderPlugin.html +6 -3
- package/docs/functions/CameraMovementPlugin.html +6 -3
- package/docs/functions/CruisePlugin.html +6 -3
- package/docs/functions/GuideLinePlugin.html +7 -4
- package/docs/functions/ItemLabelPlugin.html +6 -3
- package/docs/functions/MapviewFloorplanPlugin.html +6 -3
- package/docs/functions/ModelChassisCompassPlugin.html +6 -3
- package/docs/functions/ModelEntryDoorGuidePlugin.html +6 -3
- package/docs/functions/ModelFloorplanPlugin.html +6 -3
- package/docs/functions/ModelItemLabelPlugin.html +6 -3
- package/docs/functions/ModelRoomLabelPlugin.html +6 -3
- package/docs/functions/ModelTVVideoPlugin.html +6 -3
- package/docs/functions/ModelViewPlugin.html +6 -3
- package/docs/functions/Object3DHelperPlugin.html +6 -3
- package/docs/functions/PanoCompassPlugin.html +6 -3
- package/docs/functions/PanoCursorRaycasterPlugin.html +6 -3
- package/docs/functions/PanoDoorLabelPlugin.html +6 -3
- package/docs/functions/PanoFloorplanRadarPlugin.html +6 -3
- package/docs/functions/PanoMeasurePlugin.html +6 -3
- package/docs/functions/PanoRulerPlugin.html +6 -3
- package/docs/functions/PanoRulerProPlugin.html +6 -3
- package/docs/functions/PanoSpatialTagPlugin.html +6 -3
- package/docs/functions/PanoTagPlugin.html +6 -3
- package/docs/functions/PanoVideoPlugin.html +6 -3
- package/docs/functions/PipelinePlugin.html +280 -0
- package/docs/functions/TopviewFloorplanPlugin.html +6 -3
- package/docs/functions/Util.absoluteUrl.html +7 -4
- package/docs/functions/Util.getCoordsFromClient.html +7 -4
- package/docs/functions/Util.getCoordsFromElement.html +7 -4
- package/docs/functions/Util.getFrameTime.html +7 -4
- package/docs/functions/Util.getIntersectFromRelativePosition.html +7 -4
- package/docs/functions/Util.getRaycasterFromFivePointer.html +7 -4
- package/docs/functions/Util.isAbsoluteURL.html +7 -4
- package/docs/functions/Util.isModelLike.html +7 -4
- package/docs/functions/Util.isNil.html +7 -4
- package/docs/functions/Util.isPanoramaLike.html +7 -4
- package/docs/functions/Util.nextFrame.html +7 -4
- package/docs/functions/Util.notNil.html +7 -4
- package/docs/functions/Util.requestAnimationFrameInterval.html +7 -4
- package/docs/functions/Util.tweenProgress.html +7 -4
- package/docs/functions/Util.uuid.html +7 -4
- package/docs/functions/pluginFlag.html +7 -4
- package/docs/index.html +7 -4
- package/docs/interfaces/AddTagConfig.html +8 -5
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +13 -10
- package/docs/interfaces/CSS3DRenderPluginState.html +10 -7
- package/docs/interfaces/CameraMovementPluginExportType.html +9 -6
- package/docs/interfaces/CruisePluginTypes.Config.html +10 -7
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +14 -11
- package/docs/interfaces/CruisePluginTypes.EventMap.html +22 -19
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +14 -11
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +16 -13
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +16 -13
- package/docs/interfaces/CruisePluginTypes.PluginData.html +11 -8
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +10 -21
- package/docs/interfaces/CruisePluginTypes.PluginState.html +13 -10
- package/docs/interfaces/EventMap.html +17 -14
- package/docs/interfaces/FloorplanBounding.html +10 -7
- package/docs/interfaces/FloorplanData.html +12 -9
- package/docs/interfaces/FloorplanEntrance.html +13 -10
- package/docs/interfaces/FloorplanExtraObject.html +12 -9
- package/docs/interfaces/FloorplanExtraObject3D.html +10 -7
- package/docs/interfaces/FloorplanFloorData.html +11 -8
- package/docs/interfaces/FloorplanImagePosition.html +9 -6
- package/docs/interfaces/FloorplanObserver.html +11 -8
- package/docs/interfaces/FloorplanOutlineItem.html +11 -8
- package/docs/interfaces/FloorplanPosition.html +9 -6
- package/docs/interfaces/FloorplanRoomItem.html +15 -12
- package/docs/interfaces/FloorplanRoomLabelItem.html +9 -6
- package/docs/interfaces/FloorplanServerBounding.html +10 -7
- package/docs/interfaces/FloorplanServerComputedData.html +12 -9
- package/docs/interfaces/FloorplanServerData.html +9 -6
- package/docs/interfaces/FloorplanServerDoorItem.html +12 -9
- package/docs/interfaces/FloorplanServerDoorPosition.html +10 -7
- package/docs/interfaces/FloorplanServerEntrance.html +13 -10
- package/docs/interfaces/FloorplanServerFloorData.html +11 -8
- package/docs/interfaces/FloorplanServerImagePosition.html +9 -6
- package/docs/interfaces/FloorplanServerObserver.html +11 -8
- package/docs/interfaces/FloorplanServerOutlineItem.html +11 -8
- package/docs/interfaces/FloorplanServerPosition.html +9 -6
- package/docs/interfaces/FloorplanServerRoomItem.html +16 -13
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +9 -6
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +10 -7
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +12 -9
- package/docs/interfaces/GuideLinePluginType.EventMap.html +15 -12
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +10 -7
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +8 -5
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +15 -12
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +10 -7
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +20 -17
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +9 -6
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +20 -17
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +7 -4
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +10 -21
- package/docs/interfaces/GuideLinePluginType.PluginState.html +10 -7
- package/docs/interfaces/GuideLinePluginType.Route.html +13 -10
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +11 -8
- package/docs/interfaces/HelperOffset.html +10 -7
- package/docs/interfaces/ImagePlaneGroup.html +8 -5
- package/docs/interfaces/ItemLabelPluginData.html +8 -5
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +13 -10
- package/docs/interfaces/ItemLabelPluginParametersType.html +11 -8
- package/docs/interfaces/MinMax.html +9 -6
- package/docs/interfaces/ModelChassisCompassPluginData.html +9 -6
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +10 -7
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +9 -6
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +10 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +10 -7
- package/docs/interfaces/ModelItemLabelPluginData.html +8 -5
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +13 -10
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +9 -6
- package/docs/interfaces/ModelRoomLabelPluginData.html +8 -5
- package/docs/interfaces/ModelTVVideoPluginData.html +11 -8
- package/docs/interfaces/ModelTVVideoPluginExportType.html +10 -7
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +8 -5
- package/docs/interfaces/ModelViewPluginExportType.html +13 -10
- package/docs/interfaces/Object3DHelperState.html +10 -7
- package/docs/interfaces/ObjectHelperControllers.html +11 -8
- package/docs/interfaces/PaintBrushAction.html +14 -11
- package/docs/interfaces/PaintBrushConfigs.html +14 -11
- package/docs/interfaces/PaintBrushState.html +12 -9
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +12 -9
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +7 -4
- package/docs/interfaces/PanoMeasureParameterType.html +18 -15
- package/docs/interfaces/PanoMeasurePluginLineJson.html +10 -7
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +9 -6
- package/docs/interfaces/PanoMeasurePluginPointJson.html +9 -6
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +10 -7
- package/docs/interfaces/PanoRulerPluginExportType.html +12 -9
- package/docs/interfaces/PanoRulerPluginOptions.html +9 -6
- package/docs/interfaces/PanoRulerPluginParameterType.html +10 -7
- package/docs/interfaces/PanoRulerProPluginExportType.html +11 -8
- package/docs/interfaces/PanoRulerProPluginOptions.html +9 -6
- package/docs/interfaces/PanoRulerProPluginParameterType.html +9 -6
- package/docs/interfaces/PanoRulerProPluginState.html +10 -7
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +7 -4
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +7 -4
- package/docs/interfaces/PanoSpatialTagPluginData.html +13 -10
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +12 -9
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +15 -12
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +12 -9
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +15 -12
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +13 -10
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +12 -9
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +8 -5
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +10 -7
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +8 -5
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +11 -8
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +8 -5
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +10 -7
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +12 -9
- package/docs/interfaces/Point.html +10 -7
- package/docs/interfaces/Room.html +11 -8
- package/docs/interfaces/RoomInfo.html +9 -6
- package/docs/interfaces/RoomLabel.html +16 -13
- package/docs/interfaces/RoomRules.html +7 -4
- package/docs/interfaces/Rooms.html +7 -4
- package/docs/interfaces/Scissor.html +11 -8
- package/docs/interfaces/State.html +10 -7
- package/docs/interfaces/TagCacheInterface.html +14 -11
- package/docs/interfaces/TagConfig.html +15 -12
- package/docs/interfaces/TagGLTFObjectGroup.html +8 -5
- package/docs/interfaces/TagIconUrl.html +14 -11
- package/docs/interfaces/TagObjectGroup.html +8 -5
- package/docs/interfaces/TagStyle.html +8 -5
- package/docs/interfaces/Tags.html +11 -8
- package/docs/interfaces/TemporaryState.html +8 -5
- package/docs/interfaces/Util.MagnifierParameter.html +13 -10
- package/docs/interfaces/Util.MouseGroupParameter.html +10 -7
- package/docs/interfaces/Util.PointIntersection.html +10 -7
- package/docs/modules/CruisePluginTypes.html +7 -4
- package/docs/modules/GuideLineItem.html +7 -4
- package/docs/modules/GuideLineModeItem.html +7 -4
- package/docs/modules/GuideLinePluginType.html +7 -4
- package/docs/modules/PanoVideoPluginType.html +7 -4
- package/docs/modules/Util.html +7 -4
- package/docs/modules.html +10 -4
- package/docs/types/ArrayPosition.html +7 -4
- package/docs/types/AudioAppearance.html +7 -4
- package/docs/types/AudioTagTypeConfigKey.html +7 -4
- package/docs/types/CSS3DRenderExportType.html +7 -4
- package/docs/types/CSS3DRenderPluginExportType.html +7 -4
- package/docs/types/CSS3DRenderPluginParameterType.html +7 -4
- package/docs/types/ClassFunctionParameters.html +7 -4
- package/docs/types/Color.html +7 -4
- package/docs/types/ContentTypeConfigKey.html +7 -4
- package/docs/types/ContentTypeConfigKeySplit.html +7 -4
- package/docs/types/ContentTypeMap.html +7 -4
- package/docs/types/Create3DDomContainerReturnType.html +7 -4
- package/docs/types/Create3DElementReturnType.html +7 -4
- package/docs/types/CruisePluginExportType.html +7 -4
- package/docs/types/CruisePluginTypes.CruiseData.html +7 -4
- package/docs/types/CruisePluginTypes.MoveEffect.html +7 -4
- package/docs/types/DeprecatedMediaPlaneProperty.html +7 -4
- package/docs/types/DeprecatedTagProperty.html +7 -4
- package/docs/types/Direction-1.html +7 -4
- package/docs/types/Direction4.html +7 -4
- package/docs/types/ElementRenderer.html +7 -4
- package/docs/types/FloorplanRuleLabels.html +7 -4
- package/docs/types/FloorplanServerRuleLabels.html +7 -4
- package/docs/types/GuideLinePluginExportType.html +7 -4
- package/docs/types/GuideLinePluginType.GuideLineItem.html +7 -4
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +7 -4
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +7 -4
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +7 -4
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +7 -4
- package/docs/types/GuideLinePluginType.PathItem.html +7 -4
- package/docs/types/GuideLinePluginType.PluginData.html +7 -4
- package/docs/types/HelperEventMap.html +7 -4
- package/docs/types/LoadTagConfig.html +7 -4
- package/docs/types/MapviewFloorplanPluginParameterType.html +7 -4
- package/docs/types/MapviewFloorplanPluginReturnType.html +7 -4
- package/docs/types/MediaData.html +7 -4
- package/docs/types/MediaStore.html +7 -4
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +7 -4
- package/docs/types/ModelFloorplanPluginParameterType.html +7 -4
- package/docs/types/ModelFloorplanPluginReturnType.html +7 -4
- package/docs/types/ModelRoomLabelPluginParameters.html +7 -4
- package/docs/types/ModelRoomLabelPluginReturnType.html +7 -4
- package/docs/types/MoveArgs.html +7 -4
- package/docs/types/MoveOpts.html +7 -4
- package/docs/types/Object3DHelperEventMap.html +7 -4
- package/docs/types/ObjectFit.html +7 -4
- package/docs/types/PaintBrushEventMap.html +7 -4
- package/docs/types/PanoCompassPluginData.html +7 -4
- package/docs/types/PanoCompassPluginExportType.html +7 -4
- package/docs/types/PanoCompassPluginParameterType.html +7 -4
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +7 -4
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +7 -4
- package/docs/types/PanoIndex.html +7 -4
- package/docs/types/PanoMeasurePluginEvent.html +7 -4
- package/docs/types/PanoMeasureReturnType.html +7 -4
- package/docs/types/PanoSpatialTagPluginId.html +7 -4
- package/docs/types/PanoTagPluginExportInterface.html +7 -4
- package/docs/types/PanoTagPluginParamsInterface.html +7 -4
- package/docs/types/PanoVideoPluginParameterType.html +7 -4
- package/docs/types/PanoVideoPluginReturnType.html +7 -4
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +7 -4
- package/docs/types/PipelinePluginParameterType.html +271 -0
- package/docs/types/PipelinePluginReturnType.html +271 -0
- package/docs/types/PlaneTag.html +7 -4
- package/docs/types/Point2DTag.html +7 -4
- package/docs/types/Point3DTag.html +7 -4
- package/docs/types/PointTag.html +7 -4
- package/docs/types/PointTagInstance.html +7 -4
- package/docs/types/Position.html +7 -4
- package/docs/types/RotateArgs.html +7 -4
- package/docs/types/RotateOpts.html +7 -4
- package/docs/types/RuleLabelsKey.html +7 -4
- package/docs/types/RuleLabelsValue.html +7 -4
- package/docs/types/StickType.html +7 -4
- package/docs/types/Tag.html +7 -4
- package/docs/types/Tag2D.html +7 -4
- package/docs/types/Tag3D.html +7 -4
- package/docs/types/TagContentType.html +7 -4
- package/docs/types/TagDimensionType.html +7 -4
- package/docs/types/TagElement.html +7 -4
- package/docs/types/TagEvents.html +7 -4
- package/docs/types/TagGLTFObject.html +7 -4
- package/docs/types/TagHooks.html +7 -4
- package/docs/types/TagId.html +7 -4
- package/docs/types/TagInstance.html +7 -4
- package/docs/types/TagPointType.html +7 -4
- package/docs/types/TagRendererMap.html +7 -4
- package/docs/types/TopviewFloorplanPluginParameterType.html +7 -4
- package/docs/types/TopviewFloorplanPluginReturnType.html +7 -4
- package/docs/types/WorkCode.html +7 -4
- package/docs/variables/FLOOR_TYPE_MAP.html +7 -4
- package/docs/variables/PLUGIN.html +7 -4
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +7 -4
- package/docs/variables/ROOM_TYPE_MAP.html +7 -4
- package/docs/variables/itemLabelPluginServerParams.html +7 -4
- package/docs/variables/modelItemLabelPluginServerParams.html +7 -4
- package/docs/variables/modelRoomLabelPluginServerParams.html +7 -4
- package/libs/CruisePlugin/typing.d.ts +1 -1
- package/libs/GuideLinePlugin/typing.d.ts +1 -1
- package/libs/PanoCompassPlugin/typings.d.ts +1 -1
- package/libs/PipelinePlugin/Controller.d.ts +108 -0
- package/libs/PipelinePlugin/Controller.js +344 -0
- package/libs/PipelinePlugin/index.d.ts +6 -0
- package/libs/PipelinePlugin/index.js +39 -0
- package/libs/PipelinePlugin/typing/PluginData/index.js +6 -0
- package/libs/PipelinePlugin/typing/PluginData.d.ts +20 -0
- package/libs/PipelinePlugin/typing/PluginData.js +1 -0
- package/libs/PipelinePlugin/typing/ServerData/index.js +6 -0
- package/libs/PipelinePlugin/typing/ServerData.d.ts +28 -0
- package/libs/PipelinePlugin/typing/ServerData.js +1 -0
- package/libs/PipelinePlugin/typing/index.d.ts +79 -0
- package/libs/PipelinePlugin/typing/index.js +6 -0
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.d.ts +34 -0
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +106 -0
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.d.ts +11 -0
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +52 -0
- package/libs/PipelinePlugin/utils/Objects/Pipe.d.ts +49 -0
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +179 -0
- package/libs/PipelinePlugin/utils/formatData.d.ts +12 -0
- package/libs/PipelinePlugin/utils/formatData.js +46 -0
- package/libs/base/BasePlugin.js +1 -1
- package/libs/base/BasePluginWithData.d.ts +3 -15
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +87 -88
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +75 -76
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +1 -1
- package/libs/floorplan/typings/index.d.ts +1 -1
- package/libs/index.d.ts +1 -0
- package/libs/index.js +117 -108
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/Extras/Core/Interpolations.d.ts +11 -0
- package/libs/shared-utils/three/Extras/Core/Interpolations.js +28 -0
- package/libs/shared-utils/three/Extras/Core/Interpolations2.js +34 -0
- package/libs/shared-utils/three/Extras/Curves/BezierCurve3.d.ts +13 -0
- package/libs/shared-utils/three/Extras/Curves/BezierCurve3.js +30 -0
- package/package.json +1 -1
|
@@ -49,7 +49,7 @@ export interface EventMap extends BasePlugin.EventMap<State, PluginData> {
|
|
|
49
49
|
userAction: boolean;
|
|
50
50
|
}) => void;
|
|
51
51
|
}
|
|
52
|
-
export interface PluginServerData
|
|
52
|
+
export interface PluginServerData {
|
|
53
53
|
version: number;
|
|
54
54
|
data: PluginData;
|
|
55
55
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { Five } from '@realsee/five';
|
|
2
|
+
import type { State, EventMap, ServerData, PluginData, LoadOptions, ShowHideOptions, SetSpeedOptions, ShowPipelinesOptions } from './typing';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
import * as BasePlugin from '../base/BasePluginWithData';
|
|
5
|
+
import { ObjectFlowPipe } from './utils/Objects/FlowPipe';
|
|
6
|
+
export declare class Controller extends BasePlugin.Controller<State, EventMap, ServerData.RootObject, PluginData.RootObject> {
|
|
7
|
+
data?: PluginData.RootObject;
|
|
8
|
+
/** 插件状态
|
|
9
|
+
* @property `visible` `<boolean>` 是否可见
|
|
10
|
+
* @property `enabled` `<boolean>` 是否启用
|
|
11
|
+
* @property `visiblePipeIDs` `<string[]>` 可见的管道 ID
|
|
12
|
+
* @property `speed` `<Speed>` 水流速度
|
|
13
|
+
* @property `speed.flowSpeed` `<number>` 横向流动速度,默认是 0.6 m/s
|
|
14
|
+
* @property `speed.rotateSpeed` `<number>` 纵向旋转速度:默认是 0 deg/s
|
|
15
|
+
*/
|
|
16
|
+
state: State;
|
|
17
|
+
/** 当前插件所有新增 THREE 相关副作用都在 group 下 */
|
|
18
|
+
group: THREE.Group;
|
|
19
|
+
/** 用于展示水流的水管 */
|
|
20
|
+
pipeObjects: ObjectFlowPipe[];
|
|
21
|
+
/** 水管贴图缓存 */
|
|
22
|
+
private texturePromiseCache;
|
|
23
|
+
constructor(five: Five);
|
|
24
|
+
/** 加载管道数据,重复调用会使用新数据覆盖旧数据
|
|
25
|
+
* @param `data` `<Plugin.ServerData>` Open API 接口返回的数据。
|
|
26
|
+
* @param `initialState` `<Plugin.State> | <undefined>` 数据加载后,要应用的 state,默认是 undefined。
|
|
27
|
+
* @param `userAction` `<boolean> | <undefined>` 是否是用户操作,默认是 true。
|
|
28
|
+
* @param `options` `<Plugin.LoadOptions> | <undefined>` 数据加载配置项。
|
|
29
|
+
* @param `options.getPipeRadius` `<(pipe: ServerData.LinesDataset) => number> | <undefined>` 允许用户通过函数自定义管道半径。
|
|
30
|
+
* @param `options.getPipeUrl` `<(water: Water) => string> | <undefined>` 允许用户通过函数自定义管道贴图,
|
|
31
|
+
* 函数返回的 string 就是当前 water 对应的贴图地址。
|
|
32
|
+
*/
|
|
33
|
+
load(data: ServerData.RootObject, initialState?: Partial<State>, userAction?: boolean, options?: Partial<LoadOptions>): Promise<void>;
|
|
34
|
+
/** 更改插件 State
|
|
35
|
+
* @param `state` `<Partial<Plugin.State>>` 插件属性 `state` 的子集。
|
|
36
|
+
* @param `options` `<Option> | <undefined>`
|
|
37
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
38
|
+
*/
|
|
39
|
+
setState(state: Partial<State>, options?: BasePlugin.BaseOptions): void;
|
|
40
|
+
/** 启用插件
|
|
41
|
+
* @param `options` `<Option> | <undefined>`
|
|
42
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
43
|
+
*/
|
|
44
|
+
enable(options?: BasePlugin.BaseOptions): void;
|
|
45
|
+
/** 禁用插件
|
|
46
|
+
* @param `options` `<Option> | <undefined>`
|
|
47
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
48
|
+
*/
|
|
49
|
+
disable(options?: BasePlugin.BaseOptions): void;
|
|
50
|
+
/** 展示管道模型,注意如果通过 `switchPipelines` 更改过 `visibleIDs`,则只会展示这一部分模型。
|
|
51
|
+
* @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
52
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
53
|
+
* @param `options.anime` `<AnimeOptions> | <undefined>` 动画配置。
|
|
54
|
+
* @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
|
|
55
|
+
*/
|
|
56
|
+
show(options?: Partial<ShowHideOptions>): Promise<void>;
|
|
57
|
+
/** 插件内容整体隐藏
|
|
58
|
+
* @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
59
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
60
|
+
* @param `options.anime` `<AnimeOptions> | <undefined>` 动画配置。
|
|
61
|
+
* @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
|
|
62
|
+
*/
|
|
63
|
+
hide(options?: Partial<ShowHideOptions>): Promise<void>;
|
|
64
|
+
/** 切换管路
|
|
65
|
+
* @param `options` `Partial<ShowPipelinesOptions> | <undefined>`
|
|
66
|
+
* @param `options.target` `<{ startLibraryID: number; endLibraryID: number }[]> | <undefined>`
|
|
67
|
+
* 目标管路,存在时,展示目标管路包含的管道,同时隐藏其他管道。不存在则展示所有管道。
|
|
68
|
+
* startLibraryID 和 endLibraryID 是起始和结束的设备 ID。
|
|
69
|
+
* @param `options.showAnime` `<AnimeOptions> | <undefined>` 展示的动画配置。
|
|
70
|
+
* @param `options.hideAnime` `<AnimeOptions> | <undefined>` 隐藏的动画配置。
|
|
71
|
+
* @param `options.anime` `<AnimeOptions> | <undefined>` 兜底的动画配置。
|
|
72
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
|
|
73
|
+
* */
|
|
74
|
+
switchPipelines(options?: Partial<ShowPipelinesOptions>): Promise<void>;
|
|
75
|
+
/** 开始流动 */
|
|
76
|
+
flow(options?: BasePlugin.BaseOptions): void;
|
|
77
|
+
/** 停止流动 */
|
|
78
|
+
stopFlow(options?: BasePlugin.BaseOptions): void;
|
|
79
|
+
/** 更改水管流速
|
|
80
|
+
* @param `options` `<SetSpeedOptions> | <undefined>`
|
|
81
|
+
* @param `options.speed` `<Speed> | <undefined>` 参考 `state.speed` 的描述。
|
|
82
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
|
|
83
|
+
*/
|
|
84
|
+
setSpeed(options?: Partial<SetSpeedOptions>): void;
|
|
85
|
+
/** 销毁插件,移除所有副作用,销毁后将不响应任何 API */
|
|
86
|
+
dispose: () => void;
|
|
87
|
+
protected formatData(data: ServerData.RootObject, options?: Partial<LoadOptions>): Promise<PluginData.RootObject>;
|
|
88
|
+
private _enable;
|
|
89
|
+
private _disable;
|
|
90
|
+
private _show;
|
|
91
|
+
private _hide;
|
|
92
|
+
private _switchPipelines;
|
|
93
|
+
private _flow;
|
|
94
|
+
private _stopFlow;
|
|
95
|
+
private _setSpeed;
|
|
96
|
+
private updateState;
|
|
97
|
+
/** 加载管道贴图,如果再加载中,复用之前的加载 Promise */
|
|
98
|
+
private loadPipeTexture;
|
|
99
|
+
/** 销毁所有动画 */
|
|
100
|
+
private disposeAnime;
|
|
101
|
+
/** 移除所有管道模型 */
|
|
102
|
+
private removeAllPipes;
|
|
103
|
+
/** 根据 ID 查找管道模型 */
|
|
104
|
+
private findPipeObjectWithID;
|
|
105
|
+
/** 根据 target 查找管道模型 */
|
|
106
|
+
private findPipeObjectWithTarget;
|
|
107
|
+
private onWantsFiveTapGesture;
|
|
108
|
+
}
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
var j = Object.defineProperty;
|
|
2
|
+
var v = Object.getOwnPropertySymbols;
|
|
3
|
+
var P = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var A = (p, n, e) => n in p ? j(p, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[n] = e, m = (p, n) => {
|
|
5
|
+
for (var e in n || (n = {}))
|
|
6
|
+
P.call(n, e) && A(p, e, n[e]);
|
|
7
|
+
if (v)
|
|
8
|
+
for (var e of v(n))
|
|
9
|
+
_.call(n, e) && A(p, e, n[e]);
|
|
10
|
+
return p;
|
|
11
|
+
};
|
|
12
|
+
var u = (p, n, e) => (A(p, typeof n != "symbol" ? n + "" : n, e), e);
|
|
13
|
+
var d = (p, n, e) => new Promise((t, i) => {
|
|
14
|
+
var s = (a) => {
|
|
15
|
+
try {
|
|
16
|
+
h(e.next(a));
|
|
17
|
+
} catch (c) {
|
|
18
|
+
i(c);
|
|
19
|
+
}
|
|
20
|
+
}, r = (a) => {
|
|
21
|
+
try {
|
|
22
|
+
h(e.throw(a));
|
|
23
|
+
} catch (c) {
|
|
24
|
+
i(c);
|
|
25
|
+
}
|
|
26
|
+
}, h = (a) => a.done ? t(a.value) : Promise.resolve(a.value).then(s, r);
|
|
27
|
+
h((e = e.apply(p, n)).next());
|
|
28
|
+
});
|
|
29
|
+
import * as F from "three";
|
|
30
|
+
import { Controller as S } from "../base/BasePluginWithData.js";
|
|
31
|
+
import { equal as O } from "../shared-utils/equal.js";
|
|
32
|
+
import { notNil as T } from "../shared-utils/isNil.js";
|
|
33
|
+
import { loadTexture as x } from "../shared-utils/three/loadTexture.js";
|
|
34
|
+
import { format as y, getPipesFromLibrary as C } from "./utils/formatData.js";
|
|
35
|
+
import { ObjectFlowPipe as D } from "./utils/Objects/FlowPipe.js";
|
|
36
|
+
import "../base/BasePlugin.js";
|
|
37
|
+
import "../shared-utils/Subscribe.js";
|
|
38
|
+
import "hammerjs";
|
|
39
|
+
import "@realsee/five";
|
|
40
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
41
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
42
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
43
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
44
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
45
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
46
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
47
|
+
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
48
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
49
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
50
|
+
import "../shared-utils/three/centerPoint.js";
|
|
51
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
52
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
53
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
54
|
+
import "../shared-utils/absoluteUrl.js";
|
|
55
|
+
import "../shared-utils/isTruelyObject.js";
|
|
56
|
+
import "../shared-utils/animationFrame/index.js";
|
|
57
|
+
import "./utils/Objects/Pipe.js";
|
|
58
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
59
|
+
import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
60
|
+
import "../shared-utils/three/Extras/Core/Interpolations.js";
|
|
61
|
+
import "../shared-utils/three/Extras/Core/Interpolations2.js";
|
|
62
|
+
const g = { flowSpeed: 0.6, rotateSpeed: 0 };
|
|
63
|
+
class de extends S {
|
|
64
|
+
constructor(e) {
|
|
65
|
+
super(e);
|
|
66
|
+
// ==================== public properties ====================
|
|
67
|
+
u(this, "data");
|
|
68
|
+
/** 插件状态
|
|
69
|
+
* @property `visible` `<boolean>` 是否可见
|
|
70
|
+
* @property `enabled` `<boolean>` 是否启用
|
|
71
|
+
* @property `visiblePipeIDs` `<string[]>` 可见的管道 ID
|
|
72
|
+
* @property `speed` `<Speed>` 水流速度
|
|
73
|
+
* @property `speed.flowSpeed` `<number>` 横向流动速度,默认是 0.6 m/s
|
|
74
|
+
* @property `speed.rotateSpeed` `<number>` 纵向旋转速度:默认是 0 deg/s
|
|
75
|
+
*/
|
|
76
|
+
u(this, "state");
|
|
77
|
+
/** 当前插件所有新增 THREE 相关副作用都在 group 下 */
|
|
78
|
+
u(this, "group");
|
|
79
|
+
/** 用于展示水流的水管 */
|
|
80
|
+
u(this, "pipeObjects", []);
|
|
81
|
+
// ==================== private properties ====================
|
|
82
|
+
/** 水管贴图缓存 */
|
|
83
|
+
u(this, "texturePromiseCache", /* @__PURE__ */ new Map());
|
|
84
|
+
/** 销毁插件,移除所有副作用,销毁后将不响应任何 API */
|
|
85
|
+
u(this, "dispose", () => {
|
|
86
|
+
this.disable(), this.five.scene.remove(this.group), this.texturePromiseCache.forEach((e) => e.then((t) => t.dispose())), this.texturePromiseCache.clear();
|
|
87
|
+
});
|
|
88
|
+
u(this, "onWantsFiveTapGesture", (...e) => {
|
|
89
|
+
const [t] = e, i = t.intersectObjects(this.pipeObjects, !1);
|
|
90
|
+
if (i.length === 0 || !this.data)
|
|
91
|
+
return;
|
|
92
|
+
const h = i[0].object.customID, a = this.data.pipes.find(({ id: o }) => o === h), c = this.data.pipelines.find((o) => a && o.pipes.includes(a));
|
|
93
|
+
if (!(!a || !c))
|
|
94
|
+
return this.hooks.emit("tap", {
|
|
95
|
+
intersectObjects: i,
|
|
96
|
+
pipe: a,
|
|
97
|
+
pipeline: c,
|
|
98
|
+
wantsFiveTapGestureParams: e
|
|
99
|
+
}), !1;
|
|
100
|
+
});
|
|
101
|
+
this.state = {
|
|
102
|
+
target: null,
|
|
103
|
+
visible: !0,
|
|
104
|
+
enabled: !0,
|
|
105
|
+
isFlowing: !1,
|
|
106
|
+
speed: g
|
|
107
|
+
}, this.five = e, this.group = new F.Group(), this.group.name = "water-pipe-group", this.five.scene.add(this.group), this.five.once("dispose", this.dispose), this.five.on("wantsTapGesture", this.onWantsFiveTapGesture);
|
|
108
|
+
}
|
|
109
|
+
/** 加载管道数据,重复调用会使用新数据覆盖旧数据
|
|
110
|
+
* @param `data` `<Plugin.ServerData>` Open API 接口返回的数据。
|
|
111
|
+
* @param `initialState` `<Plugin.State> | <undefined>` 数据加载后,要应用的 state,默认是 undefined。
|
|
112
|
+
* @param `userAction` `<boolean> | <undefined>` 是否是用户操作,默认是 true。
|
|
113
|
+
* @param `options` `<Plugin.LoadOptions> | <undefined>` 数据加载配置项。
|
|
114
|
+
* @param `options.getPipeRadius` `<(pipe: ServerData.LinesDataset) => number> | <undefined>` 允许用户通过函数自定义管道半径。
|
|
115
|
+
* @param `options.getPipeUrl` `<(water: Water) => string> | <undefined>` 允许用户通过函数自定义管道贴图,
|
|
116
|
+
* 函数返回的 string 就是当前 water 对应的贴图地址。
|
|
117
|
+
*/
|
|
118
|
+
// eslint-disable-next-line max-params
|
|
119
|
+
load(e, t, i, s) {
|
|
120
|
+
return d(this, null, function* () {
|
|
121
|
+
const r = this.data;
|
|
122
|
+
this.data = yield this.formatData(e, s), this.removeAllPipes(), this.hooks.emit("dataChange", this.data, r), this.pipeObjects = yield Promise.all(
|
|
123
|
+
this.data.pipes.filter((h) => !!(h != null && h.texture)).map((b) => d(this, [b], function* ({ id: h, texture: a, path: c, radius: o }) {
|
|
124
|
+
const l = yield this.loadPipeTexture(a), f = { id: h, path: c, textureURL: a, texture: l, geometryConfig: { radius: o } };
|
|
125
|
+
return new D(f);
|
|
126
|
+
}))
|
|
127
|
+
), this.data.pipelines.forEach((h) => {
|
|
128
|
+
h.pipes.reduce((a, c) => {
|
|
129
|
+
const o = this.findPipeObjectWithID(c.id);
|
|
130
|
+
return o == null || o.setInitialDisplacement(a), a + ((o == null ? void 0 : o.pathLength) || 0);
|
|
131
|
+
}, 0);
|
|
132
|
+
}), this.hooks.emit("dataLoaded", this.data), this.state.visible === !1 && this.pipeObjects.forEach((h) => h.setOpacity(0)), this.state.enabled && (this.group.add(...this.pipeObjects), this.five.needsRender = !0), t && this.setState(t, { userAction: i });
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/** 更改插件 State
|
|
136
|
+
* @param `state` `<Partial<Plugin.State>>` 插件属性 `state` 的子集。
|
|
137
|
+
* @param `options` `<Option> | <undefined>`
|
|
138
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
139
|
+
*/
|
|
140
|
+
setState(e, t = {}) {
|
|
141
|
+
const i = this.state;
|
|
142
|
+
if (O(e, i, { deep: !0 }))
|
|
143
|
+
return;
|
|
144
|
+
const s = t.userAction !== void 0 ? t.userAction : !0;
|
|
145
|
+
if (this.updateState(e, s), e.enabled !== void 0 && i.enabled !== e.enabled && (e.enabled ? this._enable({ userAction: s }) : this._disable({ userAction: s })), e.visible !== void 0 && i.visible !== e.visible) {
|
|
146
|
+
const r = { userAction: s, anime: { duration: 500 } };
|
|
147
|
+
e.visible ? this._show(r) : this._hide(r);
|
|
148
|
+
}
|
|
149
|
+
if (e.isFlowing !== void 0 && i.isFlowing !== e.isFlowing && (e.isFlowing ? this._flow() : this._stopFlow()), e.speed !== void 0 && !O(i.speed, this.state.speed, { deep: !0 }) && this._setSpeed(e.speed), e.target !== void 0 && !O(i.target, this.state.target, { deep: !0 })) {
|
|
150
|
+
const r = {
|
|
151
|
+
target: e.target,
|
|
152
|
+
showAnime: { duration: 500 },
|
|
153
|
+
hideAnime: { duration: 500 }
|
|
154
|
+
};
|
|
155
|
+
this._switchPipelines(r);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/** 启用插件
|
|
159
|
+
* @param `options` `<Option> | <undefined>`
|
|
160
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
161
|
+
*/
|
|
162
|
+
enable(e = {}) {
|
|
163
|
+
var i;
|
|
164
|
+
if (this.state.enabled)
|
|
165
|
+
return;
|
|
166
|
+
const t = (i = e.userAction) != null ? i : !0;
|
|
167
|
+
this.updateState({ enabled: !0 }, t), this._enable({ userAction: t });
|
|
168
|
+
}
|
|
169
|
+
/** 禁用插件
|
|
170
|
+
* @param `options` `<Option> | <undefined>`
|
|
171
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
172
|
+
*/
|
|
173
|
+
disable(e = {}) {
|
|
174
|
+
var i;
|
|
175
|
+
if (this.state.enabled === !1)
|
|
176
|
+
return;
|
|
177
|
+
const t = (i = e.userAction) != null ? i : !0;
|
|
178
|
+
this.updateState({ enabled: !1, isFlowing: !1 }, t), this._disable({ userAction: t });
|
|
179
|
+
}
|
|
180
|
+
/** 展示管道模型,注意如果通过 `switchPipelines` 更改过 `visibleIDs`,则只会展示这一部分模型。
|
|
181
|
+
* @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
182
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
183
|
+
* @param `options.anime` `<AnimeOptions> | <undefined>` 动画配置。
|
|
184
|
+
* @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
|
|
185
|
+
*/
|
|
186
|
+
show() {
|
|
187
|
+
return d(this, arguments, function* (e = {}) {
|
|
188
|
+
if (this.state.visible)
|
|
189
|
+
return;
|
|
190
|
+
const t = m({
|
|
191
|
+
userAction: !0,
|
|
192
|
+
anime: { duration: 500 }
|
|
193
|
+
}, e);
|
|
194
|
+
this.updateState({ visible: !0 }, t.userAction), yield this._show(t);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
/** 插件内容整体隐藏
|
|
198
|
+
* @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
199
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
200
|
+
* @param `options.anime` `<AnimeOptions> | <undefined>` 动画配置。
|
|
201
|
+
* @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
|
|
202
|
+
*/
|
|
203
|
+
hide() {
|
|
204
|
+
return d(this, arguments, function* (e = {}) {
|
|
205
|
+
if (this.state.visible === !1)
|
|
206
|
+
return;
|
|
207
|
+
const t = m({
|
|
208
|
+
userAction: !0,
|
|
209
|
+
anime: { duration: 500 }
|
|
210
|
+
}, e);
|
|
211
|
+
this.updateState({ visible: !1 }, t.userAction), yield this._hide(t);
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
/** 切换管路
|
|
215
|
+
* @param `options` `Partial<ShowPipelinesOptions> | <undefined>`
|
|
216
|
+
* @param `options.target` `<{ startLibraryID: number; endLibraryID: number }[]> | <undefined>`
|
|
217
|
+
* 目标管路,存在时,展示目标管路包含的管道,同时隐藏其他管道。不存在则展示所有管道。
|
|
218
|
+
* startLibraryID 和 endLibraryID 是起始和结束的设备 ID。
|
|
219
|
+
* @param `options.showAnime` `<AnimeOptions> | <undefined>` 展示的动画配置。
|
|
220
|
+
* @param `options.hideAnime` `<AnimeOptions> | <undefined>` 隐藏的动画配置。
|
|
221
|
+
* @param `options.anime` `<AnimeOptions> | <undefined>` 兜底的动画配置。
|
|
222
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
|
|
223
|
+
* */
|
|
224
|
+
switchPipelines(e) {
|
|
225
|
+
return d(this, null, function* () {
|
|
226
|
+
var c, o, b, l, f, w;
|
|
227
|
+
if (!this.data)
|
|
228
|
+
return;
|
|
229
|
+
const t = (c = e == null ? void 0 : e.target) != null ? c : null, i = (o = e == null ? void 0 : e.userAction) != null ? o : !0;
|
|
230
|
+
this.updateState({ target: t }, i);
|
|
231
|
+
const s = { duration: 500 }, r = (l = (b = e == null ? void 0 : e.hideAnime) != null ? b : e == null ? void 0 : e.anime) != null ? l : s, h = (w = (f = e == null ? void 0 : e.showAnime) != null ? f : e == null ? void 0 : e.anime) != null ? w : s, a = {
|
|
232
|
+
target: t,
|
|
233
|
+
showAnime: h,
|
|
234
|
+
hideAnime: r
|
|
235
|
+
};
|
|
236
|
+
this._switchPipelines(a);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/** 开始流动 */
|
|
240
|
+
flow(e = {}) {
|
|
241
|
+
var i;
|
|
242
|
+
if (this.state.isFlowing)
|
|
243
|
+
return;
|
|
244
|
+
const t = (i = e.userAction) != null ? i : !0;
|
|
245
|
+
this.updateState({ isFlowing: !0 }, t), this._flow();
|
|
246
|
+
}
|
|
247
|
+
/** 停止流动 */
|
|
248
|
+
stopFlow(e = {}) {
|
|
249
|
+
var i;
|
|
250
|
+
if (this.state.isFlowing === !1)
|
|
251
|
+
return;
|
|
252
|
+
const t = (i = e.userAction) != null ? i : !0;
|
|
253
|
+
this.updateState({ isFlowing: !1 }, t), this._stopFlow();
|
|
254
|
+
}
|
|
255
|
+
/** 更改水管流速
|
|
256
|
+
* @param `options` `<SetSpeedOptions> | <undefined>`
|
|
257
|
+
* @param `options.speed` `<Speed> | <undefined>` 参考 `state.speed` 的描述。
|
|
258
|
+
* @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
|
|
259
|
+
*/
|
|
260
|
+
setSpeed(e) {
|
|
261
|
+
var s, r;
|
|
262
|
+
const t = (s = e == null ? void 0 : e.speed) != null ? s : g, i = (r = e.userAction) != null ? r : !0;
|
|
263
|
+
this.updateState({ speed: t }, i), this._setSpeed(t);
|
|
264
|
+
}
|
|
265
|
+
formatData(e, t) {
|
|
266
|
+
return d(this, null, function* () {
|
|
267
|
+
return y(e, t);
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
_enable(e) {
|
|
271
|
+
this.hooks.emit("enable", { userAction: e.userAction }), this.five.scene.add(this.group), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture);
|
|
272
|
+
}
|
|
273
|
+
_disable(e) {
|
|
274
|
+
this.hooks.emit("disable", { userAction: e.userAction }), this.disposeAnime(), this.five.scene.remove(this.group), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture);
|
|
275
|
+
}
|
|
276
|
+
_show(e) {
|
|
277
|
+
return d(this, null, function* () {
|
|
278
|
+
var s;
|
|
279
|
+
this.hooks.emit("show", { userAction: e.userAction });
|
|
280
|
+
const t = (s = e == null ? void 0 : e.anime) != null ? s : { duration: 500 }, i = this.findPipeObjectWithTarget(this.state.target);
|
|
281
|
+
yield Promise.all(i.map((r) => r == null ? void 0 : r.show(t))), this.five.needsRender = !0;
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
_hide(e) {
|
|
285
|
+
return d(this, null, function* () {
|
|
286
|
+
var i;
|
|
287
|
+
this.hooks.emit("hide", { userAction: e.userAction });
|
|
288
|
+
const t = (i = e == null ? void 0 : e.anime) != null ? i : { duration: 500 };
|
|
289
|
+
yield Promise.all(this.pipeObjects.map((s) => s.hide(t))), this.five.needsRender = !0;
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
_switchPipelines(e) {
|
|
293
|
+
return d(this, null, function* () {
|
|
294
|
+
if (!this.data)
|
|
295
|
+
return;
|
|
296
|
+
const t = this.findPipeObjectWithTarget(e.target), i = e.hideAnime;
|
|
297
|
+
yield Promise.all(this.pipeObjects.map((r) => r.hide(i)));
|
|
298
|
+
const s = e.showAnime;
|
|
299
|
+
yield Promise.all(t.map((r) => r.show(s)));
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
_flow() {
|
|
303
|
+
this.pipeObjects.forEach((e) => e.flow());
|
|
304
|
+
}
|
|
305
|
+
_stopFlow() {
|
|
306
|
+
this.pipeObjects.forEach((e) => e.stopFlow());
|
|
307
|
+
}
|
|
308
|
+
_setSpeed(e) {
|
|
309
|
+
this.pipeObjects.forEach((t) => t.setSpeed(e));
|
|
310
|
+
}
|
|
311
|
+
updateState(e, t) {
|
|
312
|
+
const i = this.state;
|
|
313
|
+
this.state = m(m({}, this.state), e), this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: t });
|
|
314
|
+
}
|
|
315
|
+
/** 加载管道贴图,如果再加载中,复用之前的加载 Promise */
|
|
316
|
+
loadPipeTexture(e) {
|
|
317
|
+
return d(this, null, function* () {
|
|
318
|
+
const t = this.texturePromiseCache.get(e);
|
|
319
|
+
if (t)
|
|
320
|
+
return t;
|
|
321
|
+
const i = x(e);
|
|
322
|
+
return this.texturePromiseCache.set(e, i), i;
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
/** 销毁所有动画 */
|
|
326
|
+
disposeAnime() {
|
|
327
|
+
this.pipeObjects.forEach((e) => e.disposeAnime()), this.five.needsRender = !0;
|
|
328
|
+
}
|
|
329
|
+
/** 移除所有管道模型 */
|
|
330
|
+
removeAllPipes() {
|
|
331
|
+
this.disposeAnime(), this.group.remove(...this.pipeObjects), this.pipeObjects.forEach((e) => e.dispose()), this.pipeObjects = [], this.five.needsRender = !0;
|
|
332
|
+
}
|
|
333
|
+
/** 根据 ID 查找管道模型 */
|
|
334
|
+
findPipeObjectWithID(e) {
|
|
335
|
+
return this.pipeObjects.find(({ customID: t }) => t === e);
|
|
336
|
+
}
|
|
337
|
+
/** 根据 target 查找管道模型 */
|
|
338
|
+
findPipeObjectWithTarget(e) {
|
|
339
|
+
return e ? C({ data: this.data, target: e }).map(({ id: i }) => this.findPipeObjectWithID(i)).filter(T) : this.pipeObjects;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
export {
|
|
343
|
+
de as Controller
|
|
344
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
|
+
import { Controller } from './Controller';
|
|
3
|
+
export declare const PipelinePlugin: FivePlugin<undefined, Controller>;
|
|
4
|
+
export type PipelinePluginParameterType = undefined;
|
|
5
|
+
export type PipelinePluginReturnType = InstanceType<typeof Controller>;
|
|
6
|
+
export default PipelinePlugin;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Controller as o } from "./Controller.js";
|
|
2
|
+
import "three";
|
|
3
|
+
import "../base/BasePluginWithData.js";
|
|
4
|
+
import "../base/BasePlugin.js";
|
|
5
|
+
import "../shared-utils/Subscribe.js";
|
|
6
|
+
import "hammerjs";
|
|
7
|
+
import "@realsee/five";
|
|
8
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
9
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
10
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
11
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
12
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
13
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
14
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
15
|
+
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
16
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
17
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
18
|
+
import "../shared-utils/three/centerPoint.js";
|
|
19
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
20
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
21
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
22
|
+
import "../shared-utils/absoluteUrl.js";
|
|
23
|
+
import "../shared-utils/equal.js";
|
|
24
|
+
import "../shared-utils/isTruelyObject.js";
|
|
25
|
+
import "../shared-utils/isNil.js";
|
|
26
|
+
import "../shared-utils/three/loadTexture.js";
|
|
27
|
+
import "./utils/formatData.js";
|
|
28
|
+
import "./utils/Objects/FlowPipe.js";
|
|
29
|
+
import "../shared-utils/animationFrame/index.js";
|
|
30
|
+
import "./utils/Objects/Pipe.js";
|
|
31
|
+
import "../shared-utils/animationFrame/BetterTween.js";
|
|
32
|
+
import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
33
|
+
import "../shared-utils/three/Extras/Core/Interpolations.js";
|
|
34
|
+
import "../shared-utils/three/Extras/Core/Interpolations2.js";
|
|
35
|
+
const J = (r) => new o(r);
|
|
36
|
+
export {
|
|
37
|
+
J as PipelinePlugin,
|
|
38
|
+
J as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface Water {
|
|
2
|
+
isHot: boolean;
|
|
3
|
+
quality: number;
|
|
4
|
+
}
|
|
5
|
+
export interface Pipe {
|
|
6
|
+
id: string;
|
|
7
|
+
path: number[][];
|
|
8
|
+
texture?: string;
|
|
9
|
+
radius: number;
|
|
10
|
+
water: Water;
|
|
11
|
+
}
|
|
12
|
+
export interface Pipeline {
|
|
13
|
+
startLibraryID: number;
|
|
14
|
+
endLibraryID: number;
|
|
15
|
+
pipes: Pipe[];
|
|
16
|
+
}
|
|
17
|
+
export interface RootObject {
|
|
18
|
+
pipelines: Pipeline[];
|
|
19
|
+
pipes: Pipe[];
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface LinesDataset {
|
|
2
|
+
id: string;
|
|
3
|
+
type: string;
|
|
4
|
+
name: string;
|
|
5
|
+
data: number[][];
|
|
6
|
+
}
|
|
7
|
+
export interface ConnectsDataset {
|
|
8
|
+
waterType: number;
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
data: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface WaterTypeMap {
|
|
14
|
+
name: string;
|
|
15
|
+
type: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ModelMap {
|
|
18
|
+
library: number;
|
|
19
|
+
name: string;
|
|
20
|
+
}
|
|
21
|
+
/** LinesDataset 的别名 */
|
|
22
|
+
export type PipeItem = LinesDataset;
|
|
23
|
+
export interface RootObject {
|
|
24
|
+
LinesDataset: LinesDataset[];
|
|
25
|
+
ConnectsDataset: ConnectsDataset[];
|
|
26
|
+
WaterTypeMap: WaterTypeMap[];
|
|
27
|
+
ModelMap: ModelMap[];
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type * as THREE from 'THREE';
|
|
2
|
+
import type * as PluginData from './PluginData';
|
|
3
|
+
import type * as ServerData from './ServerData';
|
|
4
|
+
import type * as BasePlugin from '../../base/BasePluginWithData';
|
|
5
|
+
import type { EventCallback } from '@realsee/five';
|
|
6
|
+
import type { AnimeOptions } from '../utils/Objects/Pipe';
|
|
7
|
+
export interface PipelineTargetItem {
|
|
8
|
+
startLibraryID: number;
|
|
9
|
+
endLibraryID: number;
|
|
10
|
+
}
|
|
11
|
+
export interface State extends BasePlugin.State {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
visible: boolean;
|
|
14
|
+
isFlowing: boolean;
|
|
15
|
+
speed: Speed;
|
|
16
|
+
target: null | PipelineTargetItem[];
|
|
17
|
+
}
|
|
18
|
+
export interface LoadOptions {
|
|
19
|
+
/** 获取管道半径,单位是 m。默认是 0.016 m */
|
|
20
|
+
getPipeRadius: (pipe: ServerData.LinesDataset) => number;
|
|
21
|
+
/** 自定义不同水质的贴图 */
|
|
22
|
+
getPipeUrl: <T extends PluginData.Water>(water: T) => string;
|
|
23
|
+
}
|
|
24
|
+
export interface EventMap extends BasePlugin.EventMap<State, PluginData.RootObject> {
|
|
25
|
+
/** visible 从 false 到 true 的回调
|
|
26
|
+
* @param event.userAction 是否是用户操作
|
|
27
|
+
*/
|
|
28
|
+
show: (event: {
|
|
29
|
+
userAction: boolean;
|
|
30
|
+
}) => void;
|
|
31
|
+
/** visible 从 true 到 false 的回调
|
|
32
|
+
* @param event.userAction 是否是用户操作
|
|
33
|
+
*/
|
|
34
|
+
hide: (event: {
|
|
35
|
+
userAction: boolean;
|
|
36
|
+
}) => void;
|
|
37
|
+
/** enabled 从 false 到 true 的回调
|
|
38
|
+
* @param event.userAction 是否是用户操作
|
|
39
|
+
*/
|
|
40
|
+
enable: (event: {
|
|
41
|
+
userAction: boolean;
|
|
42
|
+
}) => void;
|
|
43
|
+
/** enabled 从 true 到 false 的回调
|
|
44
|
+
* @param event.userAction 是否是用户操作
|
|
45
|
+
*/
|
|
46
|
+
disable: (event: {
|
|
47
|
+
userAction: boolean;
|
|
48
|
+
}) => void;
|
|
49
|
+
tap: (data: {
|
|
50
|
+
pipe: PluginData.Pipe;
|
|
51
|
+
pipeline: PluginData.Pipeline;
|
|
52
|
+
intersectObjects: THREE.Intersection[];
|
|
53
|
+
wantsFiveTapGestureParams: Parameters<EventCallback['wantsTapGesture']>;
|
|
54
|
+
}) => any;
|
|
55
|
+
}
|
|
56
|
+
export interface ShowHideOptions {
|
|
57
|
+
userAction: boolean;
|
|
58
|
+
anime: AnimeOptions;
|
|
59
|
+
}
|
|
60
|
+
export interface ShowPipelinesOptions {
|
|
61
|
+
userAction: boolean;
|
|
62
|
+
showAnime: AnimeOptions;
|
|
63
|
+
hideAnime: AnimeOptions;
|
|
64
|
+
anime: AnimeOptions;
|
|
65
|
+
target: PipelineTargetItem[];
|
|
66
|
+
}
|
|
67
|
+
/** 流速 */
|
|
68
|
+
export interface Speed {
|
|
69
|
+
/** 横向流速:m/s */
|
|
70
|
+
flowSpeed?: number;
|
|
71
|
+
/** 纵向旋转速度:deg/s */
|
|
72
|
+
rotateSpeed?: number;
|
|
73
|
+
}
|
|
74
|
+
export interface SetSpeedOptions {
|
|
75
|
+
speed: Speed;
|
|
76
|
+
userAction: boolean;
|
|
77
|
+
}
|
|
78
|
+
export * as ServerData from './ServerData';
|
|
79
|
+
export * as PluginData from './PluginData';
|