@nnepoch/dtc-sdk 3.0.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/README.md +298 -0
- package/dist/browser/dtc-sdk-3.0.0.js +2 -0
- package/dist/cjs/index.cjs +38 -0
- package/dist/cjs/index.d.cts +5600 -0
- package/dist/esm/index.d.ts +5600 -0
- package/dist/esm/index.js +38 -0
- package/docs/api/api/classes/Animation.md +280 -0
- package/docs/api/api/classes/ApiRegistryError.md +60 -0
- package/docs/api/api/classes/Camera.md +601 -0
- package/docs/api/api/classes/Connect.md +257 -0
- package/docs/api/api/classes/Dlss.md +67 -0
- package/docs/api/api/classes/HighLighterEffect.md +173 -0
- package/docs/api/api/classes/Layer.md +444 -0
- package/docs/api/api/classes/Model.md +193 -0
- package/docs/api/api/classes/ModelPOI.md +279 -0
- package/docs/api/api/classes/ModelTransform.md +579 -0
- package/docs/api/api/classes/PathPatrol.md +337 -0
- package/docs/api/api/classes/Popup.md +323 -0
- package/docs/api/api/classes/Scene.md +272 -0
- package/docs/api/api/classes/Screen.md +157 -0
- package/docs/api/api/classes/TimeLine.md +274 -0
- package/docs/api/api/classes/UIPOI.md +318 -0
- package/docs/api/api/classes/WeatherSystem.md +581 -0
- package/docs/api/api/functions/createApiFacade.md +20 -0
- package/docs/api/api/index.md +45 -0
- package/docs/api/api/interfaces/ApiInstanceMap.md +107 -0
- package/docs/api/api/interfaces/ApiRegistryContext.md +47 -0
- package/docs/api/api/type-aliases/ApiFacade.md +7 -0
- package/docs/api/api/type-aliases/ApiModuleFactory.md +23 -0
- package/docs/api/api/type-aliases/ApiModuleKey.md +5 -0
- package/docs/api/api/type-aliases/ApiRegistry.md +7 -0
- package/docs/api/api/variables/API_MODULE_KEYS.md +5 -0
- package/docs/api/api/variables/PendingValidationSchemaMap.md +9 -0
- package/docs/api/api/variables/apiRegistry.md +7 -0
- package/docs/api/application/DTCEngine/classes/DTCEngine.md +738 -0
- package/docs/api/application/DTCEngine/index.md +11 -0
- package/docs/api/application/DTCEngine/interfaces/DTCEngineOptions.md +22 -0
- package/docs/api/index.md +7 -0
- package/docs/api/typedoc-sidebar.json +735 -0
- package/docs/api/types/enumerations/LayerEnum.md +21 -0
- package/docs/api/types/enumerations/ModelTransformType.md +251 -0
- package/docs/api/types/enumerations/VideoCodeType.md +37 -0
- package/docs/api/types/index.md +146 -0
- package/docs/api/types/interfaces/AnimationGetLengthRequest.md +29 -0
- package/docs/api/types/interfaces/AnimationPlayRequest.md +61 -0
- package/docs/api/types/interfaces/AnimationSetSpeedRequest.md +29 -0
- package/docs/api/types/interfaces/AnimationStartLoopRequest.md +53 -0
- package/docs/api/types/interfaces/AnimationStopLoopRequest.md +21 -0
- package/docs/api/types/interfaces/AnimationStopRequest.md +21 -0
- package/docs/api/types/interfaces/ApiRequestEnvelope.md +45 -0
- package/docs/api/types/interfaces/ApiResponseEnvelope.md +57 -0
- package/docs/api/types/interfaces/AuthErrorInfo.md +21 -0
- package/docs/api/types/interfaces/AuthSessionSnapshot.md +45 -0
- package/docs/api/types/interfaces/CameraFlyByPathRequest.md +37 -0
- package/docs/api/types/interfaces/CameraFlyToTargetRequest.md +29 -0
- package/docs/api/types/interfaces/CameraLookAtRequest.md +69 -0
- package/docs/api/types/interfaces/CameraObjFollowRequest.md +37 -0
- package/docs/api/types/interfaces/CameraSetFlySpeedRequest.md +13 -0
- package/docs/api/types/interfaces/CameraSetFovRequest.md +13 -0
- package/docs/api/types/interfaces/CameraSetPositionAndRotationRequest.md +21 -0
- package/docs/api/types/interfaces/CenterConnectResult.md +27 -0
- package/docs/api/types/interfaces/CenterEnvelope.md +33 -0
- package/docs/api/types/interfaces/CenterServiceInfo.md +33 -0
- package/docs/api/types/interfaces/CenterTokenAuthorizeResult.md +9 -0
- package/docs/api/types/interfaces/DlssSetEnableRequest.md +23 -0
- package/docs/api/types/interfaces/DlssSetQualityRequest.md +14 -0
- package/docs/api/types/interfaces/EngineConfig.md +127 -0
- package/docs/api/types/interfaces/EngineStatusInfo.md +59 -0
- package/docs/api/types/interfaces/FeatureToggleRequest.md +21 -0
- package/docs/api/types/interfaces/HighLighterEnableRequest.md +11 -0
- package/docs/api/types/interfaces/HighLighterRemoveHighLightModelRequest.md +21 -0
- package/docs/api/types/interfaces/HighLighterSetHighLightModelRequest.md +29 -0
- package/docs/api/types/interfaces/LayerAddRequest.md +61 -0
- package/docs/api/types/interfaces/LayerChildElementRequest.md +21 -0
- package/docs/api/types/interfaces/LayerModelAddRequest.md +75 -0
- package/docs/api/types/interfaces/LayerModelRemoveRequest.md +21 -0
- package/docs/api/types/interfaces/LayerPOIAddRequest.md +117 -0
- package/docs/api/types/interfaces/LayerSelectorRequest.md +21 -0
- package/docs/api/types/interfaces/LayerShowUIPopRequest.md +51 -0
- package/docs/api/types/interfaces/LayerSwitchModelRequest.md +29 -0
- package/docs/api/types/interfaces/ModelAddRequest.md +61 -0
- package/docs/api/types/interfaces/ModelBoundsRequest.md +21 -0
- package/docs/api/types/interfaces/ModelPOIAddRequest.md +53 -0
- package/docs/api/types/interfaces/ModelPOIDeleteByGroupRequest.md +13 -0
- package/docs/api/types/interfaces/ModelPOIDeleteByIdRequest.md +21 -0
- package/docs/api/types/interfaces/ModelPOIGetInfoRequest.md +21 -0
- package/docs/api/types/interfaces/ModelPOIUpdateRequest.md +53 -0
- package/docs/api/types/interfaces/ModelPOIVisibleByGroupRequest.md +21 -0
- package/docs/api/types/interfaces/ModelRemoveRequest.md +21 -0
- package/docs/api/types/interfaces/ModelSelectorRequest.md +21 -0
- package/docs/api/types/interfaces/ModelSetVisibleByTagsRequest.md +21 -0
- package/docs/api/types/interfaces/ModelSetVisibleRequest.md +29 -0
- package/docs/api/types/interfaces/ModelTransformNodeRequest.md +21 -0
- package/docs/api/types/interfaces/ModelTransformRestoreRequest.md +21 -0
- package/docs/api/types/interfaces/ModelTransformRotateByTargetRequest.md +85 -0
- package/docs/api/types/interfaces/ModelTransformRotateRequest.md +29 -0
- package/docs/api/types/interfaces/ModelTransformScaleRequest.md +37 -0
- package/docs/api/types/interfaces/ModelTransformStartMoveRequest.md +61 -0
- package/docs/api/types/interfaces/NetworkAdaptationActionResult.md +47 -0
- package/docs/api/types/interfaces/NetworkAdaptationActionStep.md +29 -0
- package/docs/api/types/interfaces/NetworkAdaptationState.md +41 -0
- package/docs/api/types/interfaces/NetworkDecisionTrace.md +53 -0
- package/docs/api/types/interfaces/NetworkDiagnosticsSnapshot.md +53 -0
- package/docs/api/types/interfaces/NetworkMetricsSnapshot.md +59 -0
- package/docs/api/types/interfaces/PathPatrolAddRequest.md +109 -0
- package/docs/api/types/interfaces/PathPatrolNodeRequest.md +21 -0
- package/docs/api/types/interfaces/PathPatrolSetTimeNodeRequest.md +37 -0
- package/docs/api/types/interfaces/PathPatrolUpdateRequest.md +53 -0
- package/docs/api/types/interfaces/PopupAddRequest.md +21 -0
- package/docs/api/types/interfaces/PopupDelayRequest.md +13 -0
- package/docs/api/types/interfaces/PopupItemRequest.md +61 -0
- package/docs/api/types/interfaces/PopupRemoveRequest.md +21 -0
- package/docs/api/types/interfaces/PopupShowDistanceRequest.md +13 -0
- package/docs/api/types/interfaces/PopupShowRequest.md +29 -0
- package/docs/api/types/interfaces/PopupSyncInfoRequest.md +37 -0
- package/docs/api/types/interfaces/QosEvent.md +65 -0
- package/docs/api/types/interfaces/QosReportingPayload.md +47 -0
- package/docs/api/types/interfaces/QosRuntimeContext.md +29 -0
- package/docs/api/types/interfaces/QosSessionContext.md +29 -0
- package/docs/api/types/interfaces/QosWarnErrorSummary.md +37 -0
- package/docs/api/types/interfaces/ResolvedEngineConfig.md +123 -0
- package/docs/api/types/interfaces/SceneListenCompassRequest.md +13 -0
- package/docs/api/types/interfaces/SceneSwitchRequest.md +13 -0
- package/docs/api/types/interfaces/ScreenSetSceneFPSRequest.md +14 -0
- package/docs/api/types/interfaces/ScreenSetSceneRenderBitrateRequest.md +15 -0
- package/docs/api/types/interfaces/ScreenSetScreenResolutionRequest.md +23 -0
- package/docs/api/types/interfaces/ScreenSetVideoDecodeRequest.md +13 -0
- package/docs/api/types/interfaces/SignallingAllocateResponse.md +27 -0
- package/docs/api/types/interfaces/StandardResponse.md +33 -0
- package/docs/api/types/interfaces/TimeSerialNode.md +21 -0
- package/docs/api/types/interfaces/TimelineNodeRequest.md +21 -0
- package/docs/api/types/interfaces/TimelinePlayRequest.md +53 -0
- package/docs/api/types/interfaces/TimelineSetSpeedRequest.md +37 -0
- package/docs/api/types/interfaces/TimelineStopRequest.md +45 -0
- package/docs/api/types/interfaces/UIPOIAddRequest.md +21 -0
- package/docs/api/types/interfaces/UIPOIDeleteByGroupRequest.md +13 -0
- package/docs/api/types/interfaces/UIPOIDeleteByIdRequest.md +21 -0
- package/docs/api/types/interfaces/UIPOIEnableOverlapRequest.md +13 -0
- package/docs/api/types/interfaces/UIPOIShowDistanceRequest.md +13 -0
- package/docs/api/types/interfaces/UIPOIUpdateRequest.md +21 -0
- package/docs/api/types/interfaces/UIPOIUpdateStateRequest.md +21 -0
- package/docs/api/types/interfaces/Vector3JsonInput.md +27 -0
- package/docs/api/types/interfaces/WeatherChangeSeasonRequest.md +21 -0
- package/docs/api/types/interfaces/WeatherOpenCameraFogRequest.md +69 -0
- package/docs/api/types/interfaces/WeatherSetAnimateTimeOfDayRequest.md +29 -0
- package/docs/api/types/interfaces/WeatherSetDayAndNightRequest.md +13 -0
- package/docs/api/types/interfaces/WeatherSetSceneTimeRequest.md +21 -0
- package/docs/api/types/interfaces/WeatherSetTimeSyncRequest.md +13 -0
- package/docs/api/types/interfaces/WeatherTypeRequest.md +27 -0
- package/docs/api/types/type-aliases/ApiCallback.md +21 -0
- package/docs/api/types/type-aliases/AuthWorkflowState.md +5 -0
- package/docs/api/types/type-aliases/DlssQuality.md +7 -0
- package/docs/api/types/type-aliases/EngineLogLevel.md +5 -0
- package/docs/api/types/type-aliases/EngineViewMode.md +5 -0
- package/docs/api/types/type-aliases/GetWeatherTypeRequest.md +7 -0
- package/docs/api/types/type-aliases/NetworkAdaptationActionType.md +7 -0
- package/docs/api/types/type-aliases/NetworkAdaptationLevel.md +7 -0
- package/docs/api/types/type-aliases/NetworkAdaptationMode.md +9 -0
- package/docs/api/types/type-aliases/QosEventName.md +9 -0
- package/docs/api/types/type-aliases/QosLevel.md +7 -0
- package/docs/api/types/type-aliases/QosStage.md +7 -0
- package/docs/api/types/type-aliases/QosStatus.md +7 -0
- package/docs/api/types/type-aliases/ScreenRenderBitratePreset.md +7 -0
- package/docs/api/types/type-aliases/Season.md +7 -0
- package/docs/api/types/type-aliases/Vector3Input.md +5 -0
- package/docs/api/types/variables/DlssQuality.md +57 -0
- package/docs/api/types/variables/QOS_EVENT_NAMES.md +7 -0
- package/docs/api/types/variables/ScreenRenderBitratePreset.md +39 -0
- package/docs/api/types/variables/ScreenRenderBitratePresetOptions.md +5 -0
- package/docs/api/types/variables/ScreenRenderBitratePresetValueMap.md +27 -0
- package/docs/api/types/variables/Season.md +33 -0
- package/package.json +86 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
[@nnepoch/dtc-sdk](../../index.md) / [api](../index.md) / PathPatrol
|
|
2
|
+
|
|
3
|
+
# Class: PathPatrol
|
|
4
|
+
|
|
5
|
+
路径巡逻 API,支持巡逻路线添加、样式修改、时间节点设置与巡逻控制。
|
|
6
|
+
|
|
7
|
+
## Agent Title
|
|
8
|
+
|
|
9
|
+
路径巡逻
|
|
10
|
+
|
|
11
|
+
## Agent Capabilities
|
|
12
|
+
|
|
13
|
+
添加巡逻路线, 修改巡逻样式, 设置巡逻时间节点, 清除巡逻路径, 暂停巡逻, 继续巡逻, 停止巡逻
|
|
14
|
+
|
|
15
|
+
## Extends
|
|
16
|
+
|
|
17
|
+
- `BaseApi`
|
|
18
|
+
|
|
19
|
+
## Methods
|
|
20
|
+
|
|
21
|
+
### add()
|
|
22
|
+
|
|
23
|
+
> **add**(`payload`, `callback?`): `StreamRequestPromise`\<`unknown`\>
|
|
24
|
+
|
|
25
|
+
添加巡逻路线。
|
|
26
|
+
默认值:`showPath=true`、`afterRender=false`、`passedColor=#ffffff`、`lineColor=#00ff00`。
|
|
27
|
+
|
|
28
|
+
#### Parameters
|
|
29
|
+
|
|
30
|
+
| Parameter | Type | Description |
|
|
31
|
+
| ------ | ------ | ------ |
|
|
32
|
+
| `payload` | [`PathPatrolAddRequest`](../../types/interfaces/PathPatrolAddRequest.md) | 巡逻路线参数。 |
|
|
33
|
+
| `callback?` | `StreamRequestCallback`\<`unknown`\> | 可选回调函数。 |
|
|
34
|
+
|
|
35
|
+
#### Returns
|
|
36
|
+
|
|
37
|
+
`StreamRequestPromise`\<`unknown`\>
|
|
38
|
+
|
|
39
|
+
支持 data/done/error/cancel 事件的流式 Promise。
|
|
40
|
+
|
|
41
|
+
#### Agent Side Effects
|
|
42
|
+
|
|
43
|
+
write
|
|
44
|
+
|
|
45
|
+
#### Agent Preconditions
|
|
46
|
+
|
|
47
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
48
|
+
|
|
49
|
+
#### Agent Risk Level
|
|
50
|
+
|
|
51
|
+
low
|
|
52
|
+
|
|
53
|
+
#### Agent Example
|
|
54
|
+
|
|
55
|
+
#### Example
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
dtcEngine.PathPatrol.add(
|
|
59
|
+
{
|
|
60
|
+
parentId: 'patrolLayer',
|
|
61
|
+
id: 'patrolMan',
|
|
62
|
+
assetPath: '/Game/XiAnDongZhan/Resources/Models/BluePrints/BP_Test.uasset', // 资产路径,
|
|
63
|
+
scale: new dtcEngine.Type.Vector3(2, 2, 2),
|
|
64
|
+
showPath: true,
|
|
65
|
+
passedColor: '#ff0013',
|
|
66
|
+
lineColor: '#0040ef',
|
|
67
|
+
lineWidth: 2,
|
|
68
|
+
nodes: [
|
|
69
|
+
new dtcEngine.Type.Vector3(114.79234244388735, 34.8353249473732, 67.76611328125),
|
|
70
|
+
new dtcEngine.Type.Vector3(114.78552975378634, 34.84532722646887, 67.76627349853516),
|
|
71
|
+
new dtcEngine.Type.Vector3(114.80288724169422, 34.83953942217231, 67.76618194580078),
|
|
72
|
+
new dtcEngine.Type.Vector3(114.8026897995721, 34.843259827346145, 68.76814270019531)
|
|
73
|
+
],
|
|
74
|
+
duration: 10
|
|
75
|
+
},
|
|
76
|
+
(result) => { console.log(result); }
|
|
77
|
+
);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
***
|
|
81
|
+
|
|
82
|
+
### update()
|
|
83
|
+
|
|
84
|
+
> **update**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
85
|
+
|
|
86
|
+
修改巡逻路径的样式。
|
|
87
|
+
|
|
88
|
+
#### Parameters
|
|
89
|
+
|
|
90
|
+
| Parameter | Type | Description |
|
|
91
|
+
| ------ | ------ | ------ |
|
|
92
|
+
| `payload` | [`PathPatrolUpdateRequest`](../../types/interfaces/PathPatrolUpdateRequest.md) | 巡逻样式参数。 |
|
|
93
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
98
|
+
|
|
99
|
+
Promise 形式的接口响应。
|
|
100
|
+
|
|
101
|
+
#### Agent Side Effects
|
|
102
|
+
|
|
103
|
+
write
|
|
104
|
+
|
|
105
|
+
#### Agent Preconditions
|
|
106
|
+
|
|
107
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
108
|
+
|
|
109
|
+
#### Agent Risk Level
|
|
110
|
+
|
|
111
|
+
low
|
|
112
|
+
|
|
113
|
+
#### Agent Example
|
|
114
|
+
|
|
115
|
+
#### Example
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
dtcEngine.PathPatrol.update(
|
|
119
|
+
{ parentId: 'patrolLayer', id: 'patrolMan', lineColor: '#ff00ff', lineWidth: 3.5 },
|
|
120
|
+
(result) => { console.log(result); }
|
|
121
|
+
);
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
***
|
|
125
|
+
|
|
126
|
+
### setTimeNode()
|
|
127
|
+
|
|
128
|
+
> **setTimeNode**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
129
|
+
|
|
130
|
+
设置巡逻开始的时间节点或是节点索引。
|
|
131
|
+
`timeStart` 与 `startNodeIndex` 只能有一个不为空。
|
|
132
|
+
|
|
133
|
+
#### Parameters
|
|
134
|
+
|
|
135
|
+
| Parameter | Type | Description |
|
|
136
|
+
| ------ | ------ | ------ |
|
|
137
|
+
| `payload` | [`PathPatrolSetTimeNodeRequest`](../../types/interfaces/PathPatrolSetTimeNodeRequest.md) | 时间节点参数。 |
|
|
138
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
139
|
+
|
|
140
|
+
#### Returns
|
|
141
|
+
|
|
142
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
143
|
+
|
|
144
|
+
Promise 形式的接口响应。
|
|
145
|
+
|
|
146
|
+
#### Agent Side Effects
|
|
147
|
+
|
|
148
|
+
write
|
|
149
|
+
|
|
150
|
+
#### Agent Preconditions
|
|
151
|
+
|
|
152
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
153
|
+
|
|
154
|
+
#### Agent Risk Level
|
|
155
|
+
|
|
156
|
+
low
|
|
157
|
+
|
|
158
|
+
#### Agent Example
|
|
159
|
+
|
|
160
|
+
#### Example
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
// 示例1: 时间开始节点
|
|
164
|
+
dtcEngine.PathPatrol.setTimeNode(
|
|
165
|
+
{ parentId: 'patrolLayer', id: 'patrolMan', timeStart: '2025-09-10 00:05:00' },
|
|
166
|
+
(result) => { console.log(result); }
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
// 示例2: 开始节点索引
|
|
170
|
+
dtcEngine.PathPatrol.setTimeNode(
|
|
171
|
+
{ parentId: 'patrolLayer', id: 'patrolMan', startNodeIndex: 3 },
|
|
172
|
+
(result) => { console.log(result); }
|
|
173
|
+
);
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
***
|
|
177
|
+
|
|
178
|
+
### clear()
|
|
179
|
+
|
|
180
|
+
> **clear**(`callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
181
|
+
|
|
182
|
+
清除巡逻路径。
|
|
183
|
+
|
|
184
|
+
#### Parameters
|
|
185
|
+
|
|
186
|
+
| Parameter | Type | Description |
|
|
187
|
+
| ------ | ------ | ------ |
|
|
188
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
189
|
+
|
|
190
|
+
#### Returns
|
|
191
|
+
|
|
192
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
193
|
+
|
|
194
|
+
Promise 形式的接口响应。
|
|
195
|
+
|
|
196
|
+
#### Agent Side Effects
|
|
197
|
+
|
|
198
|
+
write
|
|
199
|
+
|
|
200
|
+
#### Agent Preconditions
|
|
201
|
+
|
|
202
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
203
|
+
|
|
204
|
+
#### Agent Risk Level
|
|
205
|
+
|
|
206
|
+
low
|
|
207
|
+
|
|
208
|
+
#### Agent Example
|
|
209
|
+
|
|
210
|
+
#### Example
|
|
211
|
+
|
|
212
|
+
```ts
|
|
213
|
+
dtcEngine.PathPatrol.clear((result) => { console.log(result); });
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
***
|
|
217
|
+
|
|
218
|
+
### pause()
|
|
219
|
+
|
|
220
|
+
> **pause**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
221
|
+
|
|
222
|
+
暂停巡逻。
|
|
223
|
+
|
|
224
|
+
#### Parameters
|
|
225
|
+
|
|
226
|
+
| Parameter | Type | Description |
|
|
227
|
+
| ------ | ------ | ------ |
|
|
228
|
+
| `payload` | [`PathPatrolNodeRequest`](../../types/interfaces/PathPatrolNodeRequest.md) | 巡逻对象参数。 |
|
|
229
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
230
|
+
|
|
231
|
+
#### Returns
|
|
232
|
+
|
|
233
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
234
|
+
|
|
235
|
+
Promise 形式的接口响应。
|
|
236
|
+
|
|
237
|
+
#### Agent Side Effects
|
|
238
|
+
|
|
239
|
+
write
|
|
240
|
+
|
|
241
|
+
#### Agent Preconditions
|
|
242
|
+
|
|
243
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
244
|
+
|
|
245
|
+
#### Agent Risk Level
|
|
246
|
+
|
|
247
|
+
low
|
|
248
|
+
|
|
249
|
+
#### Agent Example
|
|
250
|
+
|
|
251
|
+
#### Example
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
dtcEngine.PathPatrol.pause({ id: 'patrolMan' }, (result) => { console.log(result, '暂停'); });
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
***
|
|
258
|
+
|
|
259
|
+
### resume()
|
|
260
|
+
|
|
261
|
+
> **resume**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
262
|
+
|
|
263
|
+
继续巡逻。
|
|
264
|
+
|
|
265
|
+
#### Parameters
|
|
266
|
+
|
|
267
|
+
| Parameter | Type | Description |
|
|
268
|
+
| ------ | ------ | ------ |
|
|
269
|
+
| `payload` | [`PathPatrolNodeRequest`](../../types/interfaces/PathPatrolNodeRequest.md) | 巡逻对象参数。 |
|
|
270
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
271
|
+
|
|
272
|
+
#### Returns
|
|
273
|
+
|
|
274
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
275
|
+
|
|
276
|
+
Promise 形式的接口响应。
|
|
277
|
+
|
|
278
|
+
#### Agent Side Effects
|
|
279
|
+
|
|
280
|
+
write
|
|
281
|
+
|
|
282
|
+
#### Agent Preconditions
|
|
283
|
+
|
|
284
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
285
|
+
|
|
286
|
+
#### Agent Risk Level
|
|
287
|
+
|
|
288
|
+
low
|
|
289
|
+
|
|
290
|
+
#### Agent Example
|
|
291
|
+
|
|
292
|
+
#### Example
|
|
293
|
+
|
|
294
|
+
```ts
|
|
295
|
+
dtcEngine.PathPatrol.resume({ id: 'patrolMan' }, (result) => { console.log(result); });
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
***
|
|
299
|
+
|
|
300
|
+
### stop()
|
|
301
|
+
|
|
302
|
+
> **stop**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
303
|
+
|
|
304
|
+
停止巡逻。
|
|
305
|
+
|
|
306
|
+
#### Parameters
|
|
307
|
+
|
|
308
|
+
| Parameter | Type | Description |
|
|
309
|
+
| ------ | ------ | ------ |
|
|
310
|
+
| `payload` | [`PathPatrolNodeRequest`](../../types/interfaces/PathPatrolNodeRequest.md) | 巡逻对象参数。 |
|
|
311
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
312
|
+
|
|
313
|
+
#### Returns
|
|
314
|
+
|
|
315
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
316
|
+
|
|
317
|
+
Promise 形式的接口响应。
|
|
318
|
+
|
|
319
|
+
#### Agent Side Effects
|
|
320
|
+
|
|
321
|
+
write
|
|
322
|
+
|
|
323
|
+
#### Agent Preconditions
|
|
324
|
+
|
|
325
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
326
|
+
|
|
327
|
+
#### Agent Risk Level
|
|
328
|
+
|
|
329
|
+
low
|
|
330
|
+
|
|
331
|
+
#### Agent Example
|
|
332
|
+
|
|
333
|
+
#### Example
|
|
334
|
+
|
|
335
|
+
```ts
|
|
336
|
+
dtcEngine.PathPatrol.stop({ id: 'patrolMan' }, (result) => { console.log(result); });
|
|
337
|
+
```
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
[@nnepoch/dtc-sdk](../../index.md) / [api](../index.md) / Popup
|
|
2
|
+
|
|
3
|
+
# Class: Popup
|
|
4
|
+
|
|
5
|
+
前端 Popup 管理 API。
|
|
6
|
+
|
|
7
|
+
的 Popup:气泡由 PopupManager 在前端宿主 DOM 中管理,
|
|
8
|
+
addPop/removePop/removeAll/show/showAll 五个变更方法均通过 SynPopsInfo
|
|
9
|
+
把"需同步的气泡列表"发往引擎,气泡定位由引擎 SyncPops 推送驱动。
|
|
10
|
+
|
|
11
|
+
## Agent Title
|
|
12
|
+
|
|
13
|
+
前端 Popup
|
|
14
|
+
|
|
15
|
+
## Agent Capabilities
|
|
16
|
+
|
|
17
|
+
Popup 添加, Popup 删除, Popup 清除, Popup 显隐控制, Popup 全部显隐控制, Popup 延迟帧控制, Popup 显示距离控制
|
|
18
|
+
|
|
19
|
+
## Extends
|
|
20
|
+
|
|
21
|
+
- `BaseApi`
|
|
22
|
+
|
|
23
|
+
## Properties
|
|
24
|
+
|
|
25
|
+
### popupManager
|
|
26
|
+
|
|
27
|
+
> `readonly` **popupManager**: `PopupManager`
|
|
28
|
+
|
|
29
|
+
## Methods
|
|
30
|
+
|
|
31
|
+
### addPop()
|
|
32
|
+
|
|
33
|
+
> **addPop**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
34
|
+
|
|
35
|
+
创建前端弹出气泡。
|
|
36
|
+
|
|
37
|
+
#### Parameters
|
|
38
|
+
|
|
39
|
+
| Parameter | Type | Description |
|
|
40
|
+
| ------ | ------ | ------ |
|
|
41
|
+
| `payload` | [`PopupAddRequest`](../../types/interfaces/PopupAddRequest.md) | 气泡创建参数。 |
|
|
42
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
43
|
+
|
|
44
|
+
#### Returns
|
|
45
|
+
|
|
46
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
47
|
+
|
|
48
|
+
Promise 形式的接口响应。
|
|
49
|
+
|
|
50
|
+
#### Agent Side Effects
|
|
51
|
+
|
|
52
|
+
write
|
|
53
|
+
|
|
54
|
+
#### Agent Preconditions
|
|
55
|
+
|
|
56
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
57
|
+
|
|
58
|
+
#### Agent Risk Level
|
|
59
|
+
|
|
60
|
+
low
|
|
61
|
+
|
|
62
|
+
#### Agent Example
|
|
63
|
+
|
|
64
|
+
#### Example
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
dtcEngine.Popup.addPop(
|
|
68
|
+
{ groupName: 'CameraPopGroup', popInfo: [{ id: 'Camera1', visible: true }] },
|
|
69
|
+
(result) => { console.log(result); }
|
|
70
|
+
);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
***
|
|
74
|
+
|
|
75
|
+
### removePop()
|
|
76
|
+
|
|
77
|
+
> **removePop**(`payload?`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
78
|
+
|
|
79
|
+
删除前端气泡。
|
|
80
|
+
|
|
81
|
+
#### Parameters
|
|
82
|
+
|
|
83
|
+
| Parameter | Type | Description |
|
|
84
|
+
| ------ | ------ | ------ |
|
|
85
|
+
| `payload` | [`PopupRemoveRequest`](../../types/interfaces/PopupRemoveRequest.md) | 删除参数。不传时清空默认组下的所有气泡。 |
|
|
86
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
87
|
+
|
|
88
|
+
#### Returns
|
|
89
|
+
|
|
90
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
91
|
+
|
|
92
|
+
Promise 形式的接口响应。
|
|
93
|
+
|
|
94
|
+
#### Agent Side Effects
|
|
95
|
+
|
|
96
|
+
write
|
|
97
|
+
|
|
98
|
+
#### Agent Preconditions
|
|
99
|
+
|
|
100
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
101
|
+
|
|
102
|
+
#### Agent Risk Level
|
|
103
|
+
|
|
104
|
+
low
|
|
105
|
+
|
|
106
|
+
#### Agent Example
|
|
107
|
+
|
|
108
|
+
#### Example
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
dtcEngine.Popup.removePop({ groupName: 'cameraLayer', ids: ['camera01'] });
|
|
112
|
+
dtcEngine.Popup.removePop(); // 清除默认组下所有气泡
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
***
|
|
116
|
+
|
|
117
|
+
### removeAll()
|
|
118
|
+
|
|
119
|
+
> **removeAll**(`callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
120
|
+
|
|
121
|
+
清除所有前端气泡。
|
|
122
|
+
|
|
123
|
+
#### Parameters
|
|
124
|
+
|
|
125
|
+
| Parameter | Type | Description |
|
|
126
|
+
| ------ | ------ | ------ |
|
|
127
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
128
|
+
|
|
129
|
+
#### Returns
|
|
130
|
+
|
|
131
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
132
|
+
|
|
133
|
+
Promise 形式的接口响应。
|
|
134
|
+
|
|
135
|
+
#### Agent Side Effects
|
|
136
|
+
|
|
137
|
+
write
|
|
138
|
+
|
|
139
|
+
#### Agent Preconditions
|
|
140
|
+
|
|
141
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
142
|
+
|
|
143
|
+
#### Agent Risk Level
|
|
144
|
+
|
|
145
|
+
low
|
|
146
|
+
|
|
147
|
+
#### Agent Example
|
|
148
|
+
|
|
149
|
+
undefined
|
|
150
|
+
|
|
151
|
+
#### Example
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
dtcEngine.Popup.removeAll((result) => console.log(result));
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
***
|
|
158
|
+
|
|
159
|
+
### show()
|
|
160
|
+
|
|
161
|
+
> **show**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
162
|
+
|
|
163
|
+
显示或隐藏气泡。
|
|
164
|
+
|
|
165
|
+
#### Parameters
|
|
166
|
+
|
|
167
|
+
| Parameter | Type | Description |
|
|
168
|
+
| ------ | ------ | ------ |
|
|
169
|
+
| `payload` | [`PopupShowRequest`](../../types/interfaces/PopupShowRequest.md) | 参数。 |
|
|
170
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
171
|
+
|
|
172
|
+
#### Returns
|
|
173
|
+
|
|
174
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
175
|
+
|
|
176
|
+
Promise 形式的接口响应。
|
|
177
|
+
|
|
178
|
+
#### Agent Side Effects
|
|
179
|
+
|
|
180
|
+
write
|
|
181
|
+
|
|
182
|
+
#### Agent Preconditions
|
|
183
|
+
|
|
184
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
185
|
+
|
|
186
|
+
#### Agent Risk Level
|
|
187
|
+
|
|
188
|
+
low
|
|
189
|
+
|
|
190
|
+
#### Agent Example
|
|
191
|
+
|
|
192
|
+
#### Example
|
|
193
|
+
|
|
194
|
+
```ts
|
|
195
|
+
dtcEngine.Popup.show({ groupName: 'CameraPopGroup', ids: ['Camera2'], show: false });
|
|
196
|
+
dtcEngine.Popup.show({ show: true }); // 显示默认组下所有气泡
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
***
|
|
200
|
+
|
|
201
|
+
### showAll()
|
|
202
|
+
|
|
203
|
+
> **showAll**(`show?`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
204
|
+
|
|
205
|
+
显示或隐藏所有组下的所有气泡。
|
|
206
|
+
|
|
207
|
+
#### Parameters
|
|
208
|
+
|
|
209
|
+
| Parameter | Type | Default value | Description |
|
|
210
|
+
| ------ | ------ | ------ | ------ |
|
|
211
|
+
| `show` | `boolean` | `true` | 气泡显示与否,true 显示,false 隐藏,默认 true。 |
|
|
212
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | `undefined` | 可选回调函数。 |
|
|
213
|
+
|
|
214
|
+
#### Returns
|
|
215
|
+
|
|
216
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
217
|
+
|
|
218
|
+
Promise 形式的接口响应。
|
|
219
|
+
|
|
220
|
+
#### Agent Side Effects
|
|
221
|
+
|
|
222
|
+
write
|
|
223
|
+
|
|
224
|
+
#### Agent Preconditions
|
|
225
|
+
|
|
226
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
227
|
+
|
|
228
|
+
#### Agent Risk Level
|
|
229
|
+
|
|
230
|
+
low
|
|
231
|
+
|
|
232
|
+
#### Agent Example
|
|
233
|
+
|
|
234
|
+
true
|
|
235
|
+
|
|
236
|
+
#### Example
|
|
237
|
+
|
|
238
|
+
```ts
|
|
239
|
+
dtcEngine.Popup.showAll((result) => console.log(result));
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
***
|
|
243
|
+
|
|
244
|
+
### setPopDelayFrame()
|
|
245
|
+
|
|
246
|
+
> **setPopDelayFrame**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
247
|
+
|
|
248
|
+
设置前端气泡同步的延迟时间。
|
|
249
|
+
|
|
250
|
+
#### Parameters
|
|
251
|
+
|
|
252
|
+
| Parameter | Type | Description |
|
|
253
|
+
| ------ | ------ | ------ |
|
|
254
|
+
| `payload` | [`PopupDelayRequest`](../../types/interfaces/PopupDelayRequest.md) | 参数。 |
|
|
255
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
256
|
+
|
|
257
|
+
#### Returns
|
|
258
|
+
|
|
259
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
260
|
+
|
|
261
|
+
Promise 形式的接口响应。
|
|
262
|
+
|
|
263
|
+
#### Agent Side Effects
|
|
264
|
+
|
|
265
|
+
write
|
|
266
|
+
|
|
267
|
+
#### Agent Preconditions
|
|
268
|
+
|
|
269
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
270
|
+
|
|
271
|
+
#### Agent Risk Level
|
|
272
|
+
|
|
273
|
+
low
|
|
274
|
+
|
|
275
|
+
#### Agent Example
|
|
276
|
+
|
|
277
|
+
#### Example
|
|
278
|
+
|
|
279
|
+
```ts
|
|
280
|
+
dtcEngine.Popup.setPopDelayFrame({ time: 0.3 }, (result) => console.log(result));
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
***
|
|
284
|
+
|
|
285
|
+
### setPopShowDistance()
|
|
286
|
+
|
|
287
|
+
> **setPopShowDistance**(`distance`): `void`
|
|
288
|
+
|
|
289
|
+
设置前端页面气泡最远的显示距离(仅本地生效,不发送请求)。
|
|
290
|
+
|
|
291
|
+
#### Parameters
|
|
292
|
+
|
|
293
|
+
| Parameter | Type | Description |
|
|
294
|
+
| ------ | ------ | ------ |
|
|
295
|
+
| `distance` | `number` | 值范围:>= 0。 |
|
|
296
|
+
|
|
297
|
+
#### Returns
|
|
298
|
+
|
|
299
|
+
`void`
|
|
300
|
+
|
|
301
|
+
void
|
|
302
|
+
|
|
303
|
+
#### Agent Side Effects
|
|
304
|
+
|
|
305
|
+
write
|
|
306
|
+
|
|
307
|
+
#### Agent Preconditions
|
|
308
|
+
|
|
309
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
310
|
+
|
|
311
|
+
#### Agent Risk Level
|
|
312
|
+
|
|
313
|
+
low
|
|
314
|
+
|
|
315
|
+
#### Agent Example
|
|
316
|
+
|
|
317
|
+
2000
|
|
318
|
+
|
|
319
|
+
#### Example
|
|
320
|
+
|
|
321
|
+
```ts
|
|
322
|
+
dtcEngine.Popup.setPopShowDistance(2000);
|
|
323
|
+
```
|