@nnepoch/dtc-sdk 3.0.11 → 3.0.13
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/browser/dtc-sdk-3.0.13.js +2 -0
- package/dist/cjs/index.cjs +4 -4
- package/dist/cjs/index.d.cts +329 -9
- package/dist/esm/index.d.ts +329 -9
- package/dist/esm/index.js +4 -4
- package/docs/api/api/classes/ApiRegistryError.md +2 -2
- package/docs/api/api/classes/Camera.md +3 -3
- package/docs/api/api/classes/GizmosTool.md +94 -0
- package/docs/api/api/classes/HeatMap.md +217 -0
- package/docs/api/api/classes/HighLighterEffect.md +6 -0
- package/docs/api/api/classes/Layer.md +103 -1
- package/docs/api/api/classes/Model.md +58 -0
- package/docs/api/api/classes/Navigation.md +618 -0
- package/docs/api/api/classes/PathPatrol.md +8 -4
- package/docs/api/api/classes/PointEditor.md +265 -0
- package/docs/api/api/classes/PointIcon.md +275 -0
- package/docs/api/api/classes/SpatialQuery.md +175 -0
- package/docs/api/api/classes/TimeLine.md +4 -0
- package/docs/api/api/classes/TrainSimulate.md +250 -0
- package/docs/api/api/classes/WeatherSystem.md +55 -6
- package/docs/api/api/classes/WebView.md +61 -0
- package/docs/api/api/index.md +11 -0
- package/docs/api/api/interfaces/ApiInstanceMap.md +52 -0
- package/docs/api/api/interfaces/ApiRegistryContext.md +21 -1
- package/docs/api/api/interfaces/PointIconIdsRequest.md +9 -0
- package/docs/api/api/interfaces/PointIconVisibilityResult.md +31 -0
- package/docs/api/api/type-aliases/ApiModuleFactory.md +1 -1
- package/docs/api/api/type-aliases/PointIconIdsInput.md +5 -0
- package/docs/api/application/DTCEngine/classes/DTCEngine.md +72 -0
- package/docs/api/application/DTCEngine/interfaces/DTCEngineOptions.md +2 -2
- package/docs/api/index.md +1 -1
- package/docs/api/typedoc-sidebar.json +260 -0
- package/docs/api/types/enumerations/FilterMode.md +21 -0
- package/docs/api/types/enumerations/GizmoType.md +37 -0
- package/docs/api/types/enumerations/TrainBehavior.md +29 -0
- package/docs/api/types/index.md +54 -0
- package/docs/api/types/interfaces/AnimationGetLengthRequest.md +1 -1
- package/docs/api/types/interfaces/AnimationPlayRequest.md +5 -5
- package/docs/api/types/interfaces/AnimationSetSpeedRequest.md +1 -1
- package/docs/api/types/interfaces/AnimationStartLoopRequest.md +4 -4
- package/docs/api/types/interfaces/AnimationStopLoopRequest.md +1 -1
- package/docs/api/types/interfaces/AnimationStopRequest.md +1 -1
- package/docs/api/types/interfaces/ApiRequestEnvelope.md +1 -1
- package/docs/api/types/interfaces/ApiResponseEnvelope.md +3 -3
- package/docs/api/types/interfaces/AuthSessionSnapshot.md +4 -4
- package/docs/api/types/interfaces/BuildingFloorCancelOptions.md +11 -0
- package/docs/api/types/interfaces/BuildingFloorItem.md +29 -0
- package/docs/api/types/interfaces/BuildingFloorOverview.md +21 -0
- package/docs/api/types/interfaces/BuildingFloorOverviewOptions.md +19 -0
- package/docs/api/types/interfaces/BuildingFloorRegistration.md +37 -0
- package/docs/api/types/interfaces/BuildingFloorRegistrationResult.md +11 -0
- package/docs/api/types/interfaces/BuildingFloorState.md +35 -0
- package/docs/api/types/interfaces/BuildingFloorStateOptions.md +11 -0
- package/docs/api/types/interfaces/BuildingFloorSwitchOptions.md +25 -0
- package/docs/api/types/interfaces/BuildingFloorTransitionResult.md +43 -0
- package/docs/api/types/interfaces/BuildingFloorViewPoint.md +37 -0
- package/docs/api/types/interfaces/CameraFlyByPathRequest.md +4 -4
- package/docs/api/types/interfaces/CameraFlyToTargetRequest.md +11 -3
- package/docs/api/types/interfaces/CameraLookAtRequest.md +7 -7
- package/docs/api/types/interfaces/CameraObjFollowRequest.md +3 -3
- package/docs/api/types/interfaces/CenterConnectResult.md +4 -4
- package/docs/api/types/interfaces/CenterEnvelope.md +4 -4
- package/docs/api/types/interfaces/CenterServiceInfo.md +5 -5
- package/docs/api/types/interfaces/CenterTokenAuthorizeResult.md +1 -1
- package/docs/api/types/interfaces/DlssSetEnableRequest.md +2 -2
- package/docs/api/types/interfaces/DlssSetQualityRequest.md +1 -1
- package/docs/api/types/interfaces/EngineConfig.md +34 -18
- package/docs/api/types/interfaces/GizmosStartSimpleRequest.md +21 -0
- package/docs/api/types/interfaces/HeatMapConfigRequest.md +53 -0
- package/docs/api/types/interfaces/HeatMapCreateRequest.md +85 -0
- package/docs/api/types/interfaces/HeatMapPointRequest.md +21 -0
- package/docs/api/types/interfaces/HeatMapRemoveRequest.md +21 -0
- package/docs/api/types/interfaces/HighLighterRemoveHighLightModelRequest.md +1 -1
- package/docs/api/types/interfaces/HighLighterSetHighLightModelRequest.md +1 -1
- package/docs/api/types/interfaces/LayerAddRequest.md +14 -6
- package/docs/api/types/interfaces/LayerChildElementRequest.md +1 -1
- package/docs/api/types/interfaces/LayerModelAddRequest.md +19 -7
- package/docs/api/types/interfaces/LayerPOIAddRequest.md +22 -14
- package/docs/api/types/interfaces/LayerResetPOINameRequest.md +21 -0
- package/docs/api/types/interfaces/LayerSelectorRequest.md +1 -1
- package/docs/api/types/interfaces/LayerShowUIPopRequest.md +5 -5
- package/docs/api/types/interfaces/LayerUpdatePOINameRequest.md +37 -0
- package/docs/api/types/interfaces/ModelAddRequest.md +5 -5
- package/docs/api/types/interfaces/ModelPOIAddRequest.md +3 -3
- package/docs/api/types/interfaces/ModelPOIUpdateRequest.md +4 -4
- package/docs/api/types/interfaces/ModelSelectorRequest.md +1 -1
- package/docs/api/types/interfaces/ModelSetVisibleByAttributeRequest.md +37 -0
- package/docs/api/types/interfaces/ModelSetVisibleByTagsRequest.md +1 -1
- package/docs/api/types/interfaces/ModelSetVisibleRequest.md +2 -2
- package/docs/api/types/interfaces/ModelTransformNodeRequest.md +1 -1
- package/docs/api/types/interfaces/ModelTransformRestoreRequest.md +1 -1
- package/docs/api/types/interfaces/ModelTransformRotateByTargetRequest.md +7 -7
- package/docs/api/types/interfaces/ModelTransformRotateRequest.md +1 -1
- package/docs/api/types/interfaces/ModelTransformScaleRequest.md +2 -2
- package/docs/api/types/interfaces/ModelTransformStartMoveRequest.md +5 -5
- package/docs/api/types/interfaces/NavigationMeshNavRequest.md +121 -0
- package/docs/api/types/interfaces/NavigationNavByPathRequest.md +61 -0
- package/docs/api/types/interfaces/NavigationNodeRequest.md +21 -0
- package/docs/api/types/interfaces/NavigationUpdateMeshNavRequest.md +45 -0
- package/docs/api/types/interfaces/NavigationUpdateNavPathRequest.md +45 -0
- package/docs/api/types/interfaces/NavigationUpdateSpeedRequest.md +27 -0
- package/docs/api/types/interfaces/NetworkAdaptationActionStep.md +1 -1
- package/docs/api/types/interfaces/NetworkAdaptationState.md +1 -1
- package/docs/api/types/interfaces/NetworkDecisionTrace.md +2 -2
- package/docs/api/types/interfaces/NetworkDiagnosticsSnapshot.md +2 -2
- package/docs/api/types/interfaces/NetworkMetricsSnapshot.md +7 -7
- package/docs/api/types/interfaces/PathPatrolAddRequest.md +18 -10
- package/docs/api/types/interfaces/PathPatrolNodeRequest.md +1 -1
- package/docs/api/types/interfaces/PathPatrolSetTimeNodeRequest.md +3 -3
- package/docs/api/types/interfaces/PathPatrolUpdateRequest.md +5 -5
- package/docs/api/types/interfaces/PointEditorAddRequest.md +149 -0
- package/docs/api/types/interfaces/PointEditorCategory.md +29 -0
- package/docs/api/types/interfaces/PointEditorClientPosition.md +21 -0
- package/docs/api/types/interfaces/PointEditorDeleteRequest.md +21 -0
- package/docs/api/types/interfaces/PointEditorDeleteResult.md +21 -0
- package/docs/api/types/interfaces/PointEditorResource.md +37 -0
- package/docs/api/types/interfaces/PointEditorScreenPosition.md +21 -0
- package/docs/api/types/interfaces/PointEditorVector.md +29 -0
- package/docs/api/types/interfaces/PopupAddRequest.md +2 -2
- package/docs/api/types/interfaces/PopupItemRequest.md +5 -5
- package/docs/api/types/interfaces/PopupRemoveRequest.md +2 -2
- package/docs/api/types/interfaces/PopupShowRequest.md +3 -3
- package/docs/api/types/interfaces/PopupSyncInfoRequest.md +2 -2
- package/docs/api/types/interfaces/QosEvent.md +5 -5
- package/docs/api/types/interfaces/QosRuntimeContext.md +4 -4
- package/docs/api/types/interfaces/ResolvedEngineConfig.md +17 -5
- package/docs/api/types/interfaces/ScreenSetSceneFPSRequest.md +1 -1
- package/docs/api/types/interfaces/ScreenSetSceneRenderBitrateRequest.md +1 -1
- package/docs/api/types/interfaces/ScreenSetScreenResolutionRequest.md +2 -2
- package/docs/api/types/interfaces/SignallingAllocateResponse.md +4 -4
- package/docs/api/types/interfaces/SpatialQueryLayerByModelBoxRequest.md +29 -0
- package/docs/api/types/interfaces/SpatialQueryLayerByModelRequest.md +53 -0
- package/docs/api/types/interfaces/SpatialQueryLayerByPositionRequest.md +45 -0
- package/docs/api/types/interfaces/StandardResponse.md +1 -1
- package/docs/api/types/interfaces/TimelineNodeRequest.md +2 -2
- package/docs/api/types/interfaces/TimelinePlayRequest.md +6 -6
- package/docs/api/types/interfaces/TimelineSetSpeedRequest.md +3 -3
- package/docs/api/types/interfaces/TimelineStopRequest.md +5 -5
- package/docs/api/types/interfaces/TrainSimulateSetCameraFollowTrainRequest.md +29 -0
- package/docs/api/types/interfaces/TrainSimulateSetTrainBehaviorRequest.md +29 -0
- package/docs/api/types/interfaces/TrainSimulateSetTrainVolumeRequest.md +29 -0
- package/docs/api/types/interfaces/TrainSimulateStartTrainRequest.md +77 -0
- package/docs/api/types/interfaces/UIPOIEnableOverlapRequest.md +1 -1
- package/docs/api/types/interfaces/Vector2JsonInput.md +15 -0
- package/docs/api/types/interfaces/WeatherChangeSeasonRequest.md +1 -1
- package/docs/api/types/interfaces/WeatherOpenCameraFogRequest.md +8 -8
- package/docs/api/types/interfaces/WeatherSetAnimateTimeOfDayRequest.md +3 -3
- package/docs/api/types/interfaces/WeatherSetSceneTimeRequest.md +1 -1
- package/docs/api/types/interfaces/WeatherSetTimeSyncRequest.md +1 -1
- package/docs/api/types/interfaces/WeatherSetVolumeRequest.md +13 -0
- package/docs/api/types/interfaces/WeatherTypeRequest.md +2 -8
- package/docs/api/types/interfaces/WebViewUpdateRequest.md +29 -0
- package/docs/api/types/type-aliases/ApiCallback.md +1 -1
- package/docs/api/types/type-aliases/BuildingFloorFocusMode.md +5 -0
- package/docs/api/types/type-aliases/BuildingFloorInput.md +7 -0
- package/docs/api/types/type-aliases/BuildingFloorRuntimeStatus.md +5 -0
- package/docs/api/types/type-aliases/BuildingFloorTransitionStatus.md +5 -0
- package/docs/api/types/type-aliases/PointEditorCreateCallback.md +7 -0
- package/docs/api/types/type-aliases/PointEditorPoint.md +7 -0
- package/docs/api/types/type-aliases/PointEditorUpdateRequest.md +15 -0
- package/docs/api/types/type-aliases/Vector2Input.md +5 -0
- package/package.json +1 -1
- package/dist/browser/dtc-sdk-3.0.11.js +0 -2
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
[@nnepoch/dtc-sdk](../../index.md) / [api](../index.md) / Navigation
|
|
2
|
+
|
|
3
|
+
# Class: Navigation
|
|
4
|
+
|
|
5
|
+
场景对象导航 API,支持两种导航模式:
|
|
6
|
+
1. 在导航网格上寻路,产生导航路径;
|
|
7
|
+
2. 根据设置好的路径节点,进行直线导航。
|
|
8
|
+
|
|
9
|
+
## Agent Title
|
|
10
|
+
|
|
11
|
+
对象导航
|
|
12
|
+
|
|
13
|
+
## Agent Capabilities
|
|
14
|
+
|
|
15
|
+
网格导航寻路, 导航距离查询, 网格导航暂停, 网格导航继续, 网格导航停止, 网格导航属性修改, 路径导航开始, 路径导航暂停, 路径导航继续, 路径导航停止, 路径导航属性修改
|
|
16
|
+
|
|
17
|
+
## Extends
|
|
18
|
+
|
|
19
|
+
- `BaseApi`
|
|
20
|
+
|
|
21
|
+
## Methods
|
|
22
|
+
|
|
23
|
+
### startNav()
|
|
24
|
+
|
|
25
|
+
> **startNav**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
26
|
+
|
|
27
|
+
网格导航寻路:模型对象根据路过的节点进行导航。
|
|
28
|
+
`nodes` 与 `targetIds` 两者必须有一个不为空。
|
|
29
|
+
默认值:`isCache=true`、`speed=1`、`frontWidth=1`、`backWidth=1`、`isAutoPlay=true`。
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
| Parameter | Type | Description |
|
|
34
|
+
| ------ | ------ | ------ |
|
|
35
|
+
| `payload` | [`NavigationMeshNavRequest`](../../types/interfaces/NavigationMeshNavRequest.md) | 导航参数。 |
|
|
36
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
37
|
+
|
|
38
|
+
#### Returns
|
|
39
|
+
|
|
40
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
41
|
+
|
|
42
|
+
Promise 形式的接口响应。
|
|
43
|
+
|
|
44
|
+
#### Agent Side Effects
|
|
45
|
+
|
|
46
|
+
write
|
|
47
|
+
|
|
48
|
+
#### Agent Preconditions
|
|
49
|
+
|
|
50
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
51
|
+
|
|
52
|
+
#### Agent Risk Level
|
|
53
|
+
|
|
54
|
+
low
|
|
55
|
+
|
|
56
|
+
#### Agent Example
|
|
57
|
+
|
|
58
|
+
#### Example
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
|
|
62
|
+
示例1:模型对象根据路过的节点进行导航
|
|
63
|
+
dtcEngine.Navigation.startNav({
|
|
64
|
+
parentId: 'Players',
|
|
65
|
+
id: 'Player1',
|
|
66
|
+
nodes: [
|
|
67
|
+
new dtcEngine.Type.Vector3(114.7985155712282, 34.842421780635625, 2),
|
|
68
|
+
new dtcEngine.Type.Vector3(114.79789723105696, 34.84218433379876, 1.5),
|
|
69
|
+
new dtcEngine.Type.Vector3(114.79790138598447, 34.842529820659664, 2),
|
|
70
|
+
new dtcEngine.Type.Vector3(114.79799880513536, 34.84259530893161, 1.5),
|
|
71
|
+
new dtcEngine.Type.Vector3(114.79814201498125, 34.842669768891525, 2),
|
|
72
|
+
new dtcEngine.Type.Vector3(114.79808229900121, 34.842686310921465, 2)
|
|
73
|
+
],
|
|
74
|
+
isCache: false,
|
|
75
|
+
planColor: '#00ff00',
|
|
76
|
+
passColor: '#e1e1e1',
|
|
77
|
+
offSetZ: 0.5,
|
|
78
|
+
}, (result) => { console.log(result); });
|
|
79
|
+
* 示例2:模型对象根据目标编码进行导航
|
|
80
|
+
dtcEngine.Navigation.startNav({
|
|
81
|
+
parentId: 'Players',
|
|
82
|
+
id: 'Player1',
|
|
83
|
+
targetCodes: ['1d370e56f4684f07963fed87e91e2164','070b49c4a6c24e0bae3aa8dcd4563556','d7d92d67093f47b881d11e3b59107d0f', 'd5eab05cbf8543aaacd218db300c61cd','a2e0eb51ee8f438088a48a392ffe02d3', '2459436d256847db9084e04e5ef9115c','5317033054e44835a14a6b7a9f5eed74'],
|
|
84
|
+
isCache: false,
|
|
85
|
+
planColor: '#00ff00',
|
|
86
|
+
passColor: '#e1e1e1',
|
|
87
|
+
offSetZ: 0.5,
|
|
88
|
+
}, (result) => { console.log(result); });
|
|
89
|
+
|
|
90
|
+
** 示例3:模型对象根据目标坐标进行导航
|
|
91
|
+
dtcEngine.Navigation.startNav({
|
|
92
|
+
parentId: 'patrolLayer',
|
|
93
|
+
id: 'TestNav',
|
|
94
|
+
targetIds: [
|
|
95
|
+
"14b5770c062c47e1b359c09026221adc",
|
|
96
|
+
"56ce729e6ab74858a830b85b638fbe32",
|
|
97
|
+
"738f6f36bf704969955872c63fab0bd1",
|
|
98
|
+
"534500c3a1c84defab8a9a3d0c0e60a0",
|
|
99
|
+
"74b694f0216d4aaf9b059bba22228c21",
|
|
100
|
+
"2a025d1b1d6641a2b2a2e76f82abbb8c",
|
|
101
|
+
"bc60c0fd9e6247989e2fda0e57756188",
|
|
102
|
+
"42dd7766abc94cce97cb36244c348937",
|
|
103
|
+
"ad594980d6d54752baf63b2f26a29493",
|
|
104
|
+
],
|
|
105
|
+
isCache: false,
|
|
106
|
+
planColor: '#ff820b',
|
|
107
|
+
passColor: '#e1e1e1',
|
|
108
|
+
speed: 3,
|
|
109
|
+
offSetZ: 0.5,
|
|
110
|
+
isAutoClear: false,//是否自动清除,默认 `true`。
|
|
111
|
+
scale: new dtcEngine.Type.Vector3(3, 3, 3),
|
|
112
|
+
}, (result) => {
|
|
113
|
+
console.log(result);
|
|
114
|
+
let param = JSON.parse(result.param);
|
|
115
|
+
if (param.status == 'start') {
|
|
116
|
+
// dtcEngine.Camera.startCameraObjFollow({
|
|
117
|
+
// parentId: "patrolLayer",
|
|
118
|
+
// id: 'TestNav',
|
|
119
|
+
// offSet: new dtcEngine.Type.Vector3(-10, 0, 3),
|
|
120
|
+
// });
|
|
121
|
+
} else if (param.status == 'finished') {
|
|
122
|
+
dtcEngine.Camera.endCameraObjFollow();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
***
|
|
128
|
+
|
|
129
|
+
### getMeshNavDistance()
|
|
130
|
+
|
|
131
|
+
> **getMeshNavDistance**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
132
|
+
|
|
133
|
+
网格导航距离查询:模型对象根据路过的节点进行导航,并返回导航距离信息。
|
|
134
|
+
`nodes` 与 `targetIds` 两者必须有一个不为空。
|
|
135
|
+
默认值:`isCache=false`、`speed=1`、`frontWidth=1`、`backWidth=1`、`isAutoPlay=false`。
|
|
136
|
+
|
|
137
|
+
#### Parameters
|
|
138
|
+
|
|
139
|
+
| Parameter | Type | Description |
|
|
140
|
+
| ------ | ------ | ------ |
|
|
141
|
+
| `payload` | [`NavigationMeshNavRequest`](../../types/interfaces/NavigationMeshNavRequest.md) | 导航参数。 |
|
|
142
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
143
|
+
|
|
144
|
+
#### Returns
|
|
145
|
+
|
|
146
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
147
|
+
|
|
148
|
+
Promise 形式的接口响应。
|
|
149
|
+
|
|
150
|
+
#### Agent Side Effects
|
|
151
|
+
|
|
152
|
+
write
|
|
153
|
+
|
|
154
|
+
#### Agent Preconditions
|
|
155
|
+
|
|
156
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
157
|
+
|
|
158
|
+
#### Agent Risk Level
|
|
159
|
+
|
|
160
|
+
low
|
|
161
|
+
|
|
162
|
+
#### Agent Example
|
|
163
|
+
|
|
164
|
+
#### Example
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
dtcEngine.Navigation.getMeshNavDistance({
|
|
168
|
+
parentId: 'Players',
|
|
169
|
+
id: ['Player1', 'MyRobut'],
|
|
170
|
+
nodes: [
|
|
171
|
+
new dtcEngine.Type.Vector3(114.7985155712282, 34.842421780635625, 2),
|
|
172
|
+
new dtcEngine.Type.Vector3(114.79789723105696, 34.84218433379876, 1.5)
|
|
173
|
+
],
|
|
174
|
+
isCache: false,
|
|
175
|
+
planColor: '#00ff00',
|
|
176
|
+
passColor: '#e1e1e1'
|
|
177
|
+
}, (result) => { console.log(result); });
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
***
|
|
181
|
+
|
|
182
|
+
### pauseNav()
|
|
183
|
+
|
|
184
|
+
> **pauseNav**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
185
|
+
|
|
186
|
+
暂停模型对象网格导航。
|
|
187
|
+
|
|
188
|
+
#### Parameters
|
|
189
|
+
|
|
190
|
+
| Parameter | Type | Description |
|
|
191
|
+
| ------ | ------ | ------ |
|
|
192
|
+
| `payload` | [`NavigationNodeRequest`](../../types/interfaces/NavigationNodeRequest.md) | 导航对象参数。 |
|
|
193
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
194
|
+
|
|
195
|
+
#### Returns
|
|
196
|
+
|
|
197
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
198
|
+
|
|
199
|
+
Promise 形式的接口响应。
|
|
200
|
+
|
|
201
|
+
#### Agent Side Effects
|
|
202
|
+
|
|
203
|
+
write
|
|
204
|
+
|
|
205
|
+
#### Agent Preconditions
|
|
206
|
+
|
|
207
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
208
|
+
|
|
209
|
+
#### Agent Risk Level
|
|
210
|
+
|
|
211
|
+
low
|
|
212
|
+
|
|
213
|
+
#### Agent Example
|
|
214
|
+
|
|
215
|
+
#### Example
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
dtcEngine.Navigation.pauseNav({ parentId: 'Players', id: 'Player1' }, (result) => { console.log(result); });
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
***
|
|
222
|
+
|
|
223
|
+
### resumeNav()
|
|
224
|
+
|
|
225
|
+
> **resumeNav**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
226
|
+
|
|
227
|
+
继续模型对象网格导航。
|
|
228
|
+
|
|
229
|
+
#### Parameters
|
|
230
|
+
|
|
231
|
+
| Parameter | Type | Description |
|
|
232
|
+
| ------ | ------ | ------ |
|
|
233
|
+
| `payload` | [`NavigationNodeRequest`](../../types/interfaces/NavigationNodeRequest.md) | 导航对象参数。 |
|
|
234
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
235
|
+
|
|
236
|
+
#### Returns
|
|
237
|
+
|
|
238
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
239
|
+
|
|
240
|
+
Promise 形式的接口响应。
|
|
241
|
+
|
|
242
|
+
#### Agent Side Effects
|
|
243
|
+
|
|
244
|
+
write
|
|
245
|
+
|
|
246
|
+
#### Agent Preconditions
|
|
247
|
+
|
|
248
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
249
|
+
|
|
250
|
+
#### Agent Risk Level
|
|
251
|
+
|
|
252
|
+
low
|
|
253
|
+
|
|
254
|
+
#### Agent Example
|
|
255
|
+
|
|
256
|
+
#### Example
|
|
257
|
+
|
|
258
|
+
```ts
|
|
259
|
+
dtcEngine.Navigation.resumeNav({ parentId: 'Players', id: ['Player1', 'MyRobut'] }, (result) => { console.log(result); });
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
***
|
|
263
|
+
|
|
264
|
+
### stopNav()
|
|
265
|
+
|
|
266
|
+
> **stopNav**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
267
|
+
|
|
268
|
+
停止模型对象网格导航。
|
|
269
|
+
|
|
270
|
+
#### Parameters
|
|
271
|
+
|
|
272
|
+
| Parameter | Type | Description |
|
|
273
|
+
| ------ | ------ | ------ |
|
|
274
|
+
| `payload` | [`NavigationNodeRequest`](../../types/interfaces/NavigationNodeRequest.md) | 导航对象参数。 |
|
|
275
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
276
|
+
|
|
277
|
+
#### Returns
|
|
278
|
+
|
|
279
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
280
|
+
|
|
281
|
+
Promise 形式的接口响应。
|
|
282
|
+
|
|
283
|
+
#### Agent Side Effects
|
|
284
|
+
|
|
285
|
+
write
|
|
286
|
+
|
|
287
|
+
#### Agent Preconditions
|
|
288
|
+
|
|
289
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
290
|
+
|
|
291
|
+
#### Agent Risk Level
|
|
292
|
+
|
|
293
|
+
low
|
|
294
|
+
|
|
295
|
+
#### Agent Example
|
|
296
|
+
|
|
297
|
+
#### Example
|
|
298
|
+
|
|
299
|
+
```ts
|
|
300
|
+
dtcEngine.Navigation.stopNav({ parentId: 'Players', id: ['Player1'] }, (result) => { console.log(result); });
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
***
|
|
304
|
+
|
|
305
|
+
### updateNav()
|
|
306
|
+
|
|
307
|
+
> **updateNav**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
308
|
+
|
|
309
|
+
设置网格导航路径属性。
|
|
310
|
+
默认值:`speed=-1`(不改变速度)。
|
|
311
|
+
|
|
312
|
+
#### Parameters
|
|
313
|
+
|
|
314
|
+
| Parameter | Type | Description |
|
|
315
|
+
| ------ | ------ | ------ |
|
|
316
|
+
| `payload` | [`NavigationUpdateMeshNavRequest`](../../types/interfaces/NavigationUpdateMeshNavRequest.md) | 导航属性参数。 |
|
|
317
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
318
|
+
|
|
319
|
+
#### Returns
|
|
320
|
+
|
|
321
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
322
|
+
|
|
323
|
+
Promise 形式的接口响应。
|
|
324
|
+
|
|
325
|
+
#### Agent Side Effects
|
|
326
|
+
|
|
327
|
+
write
|
|
328
|
+
|
|
329
|
+
#### Agent Preconditions
|
|
330
|
+
|
|
331
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
332
|
+
|
|
333
|
+
#### Agent Risk Level
|
|
334
|
+
|
|
335
|
+
low
|
|
336
|
+
|
|
337
|
+
#### Agent Example
|
|
338
|
+
|
|
339
|
+
#### Example
|
|
340
|
+
|
|
341
|
+
```ts
|
|
342
|
+
dtcEngine.Navigation.updateNav({
|
|
343
|
+
parentId: 'Players',
|
|
344
|
+
id: 'Player1',
|
|
345
|
+
planColor: '#00ff00',
|
|
346
|
+
passColor: '#e1e1e1',
|
|
347
|
+
speed: 4
|
|
348
|
+
}, (result) => { console.log(result); });
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
***
|
|
352
|
+
|
|
353
|
+
### updateSpeed()
|
|
354
|
+
|
|
355
|
+
> **updateSpeed**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
356
|
+
|
|
357
|
+
设置网格导航路径属性。
|
|
358
|
+
默认值:`speed=-1`(不改变速度)。
|
|
359
|
+
|
|
360
|
+
#### Parameters
|
|
361
|
+
|
|
362
|
+
| Parameter | Type | Description |
|
|
363
|
+
| ------ | ------ | ------ |
|
|
364
|
+
| `payload` | [`NavigationUpdateSpeedRequest`](../../types/interfaces/NavigationUpdateSpeedRequest.md) | 导航属性参数。 |
|
|
365
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
366
|
+
|
|
367
|
+
#### Returns
|
|
368
|
+
|
|
369
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
370
|
+
|
|
371
|
+
Promise 形式的接口响应。
|
|
372
|
+
|
|
373
|
+
#### Agent Side Effects
|
|
374
|
+
|
|
375
|
+
write
|
|
376
|
+
|
|
377
|
+
#### Agent Preconditions
|
|
378
|
+
|
|
379
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
380
|
+
|
|
381
|
+
#### Agent Risk Level
|
|
382
|
+
|
|
383
|
+
low
|
|
384
|
+
|
|
385
|
+
#### Agent Example
|
|
386
|
+
|
|
387
|
+
#### Example
|
|
388
|
+
|
|
389
|
+
```ts
|
|
390
|
+
dtcEngine.Navigation.updateSpeed({
|
|
391
|
+
parentId: 'Players',
|
|
392
|
+
id: 'Player1',
|
|
393
|
+
speed: 4
|
|
394
|
+
}, (result) => { console.log(result); });
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
***
|
|
398
|
+
|
|
399
|
+
### startNavByPath()
|
|
400
|
+
|
|
401
|
+
> **startNavByPath**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
402
|
+
|
|
403
|
+
路径导航开始:根据指定的轨迹节点进行直线导航行走。
|
|
404
|
+
默认值:`isCache=true`、`duration=10`。
|
|
405
|
+
|
|
406
|
+
#### Parameters
|
|
407
|
+
|
|
408
|
+
| Parameter | Type | Description |
|
|
409
|
+
| ------ | ------ | ------ |
|
|
410
|
+
| `payload` | [`NavigationNavByPathRequest`](../../types/interfaces/NavigationNavByPathRequest.md) | 路径导航参数。 |
|
|
411
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
412
|
+
|
|
413
|
+
#### Returns
|
|
414
|
+
|
|
415
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
416
|
+
|
|
417
|
+
Promise 形式的接口响应。
|
|
418
|
+
|
|
419
|
+
#### Agent Side Effects
|
|
420
|
+
|
|
421
|
+
write
|
|
422
|
+
|
|
423
|
+
#### Agent Preconditions
|
|
424
|
+
|
|
425
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
426
|
+
|
|
427
|
+
#### Agent Risk Level
|
|
428
|
+
|
|
429
|
+
low
|
|
430
|
+
|
|
431
|
+
#### Agent Example
|
|
432
|
+
|
|
433
|
+
#### Example
|
|
434
|
+
|
|
435
|
+
```ts
|
|
436
|
+
dtcEngine.Navigation.startNavByPath({
|
|
437
|
+
parentId: 'Players',
|
|
438
|
+
id: ['Player1', 'MyRobut'],
|
|
439
|
+
nodes: [
|
|
440
|
+
new dtcEngine.Type.Vector3(114.7985155712282, 34.842421780635625, 2),
|
|
441
|
+
new dtcEngine.Type.Vector3(114.79789723105696, 34.84218433379876, 1.5),
|
|
442
|
+
new dtcEngine.Type.Vector3(114.79790138598447, 34.842529820659664, 2)
|
|
443
|
+
],
|
|
444
|
+
isCache: false,
|
|
445
|
+
duration: 10
|
|
446
|
+
}, (result) => { console.log(result); });
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
***
|
|
450
|
+
|
|
451
|
+
### pauseNavPath()
|
|
452
|
+
|
|
453
|
+
> **pauseNavPath**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
454
|
+
|
|
455
|
+
暂停模型对象路径导航。
|
|
456
|
+
|
|
457
|
+
#### Parameters
|
|
458
|
+
|
|
459
|
+
| Parameter | Type | Description |
|
|
460
|
+
| ------ | ------ | ------ |
|
|
461
|
+
| `payload` | [`NavigationNodeRequest`](../../types/interfaces/NavigationNodeRequest.md) | 导航对象参数。 |
|
|
462
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
463
|
+
|
|
464
|
+
#### Returns
|
|
465
|
+
|
|
466
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
467
|
+
|
|
468
|
+
Promise 形式的接口响应。
|
|
469
|
+
|
|
470
|
+
#### Agent Side Effects
|
|
471
|
+
|
|
472
|
+
write
|
|
473
|
+
|
|
474
|
+
#### Agent Preconditions
|
|
475
|
+
|
|
476
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
477
|
+
|
|
478
|
+
#### Agent Risk Level
|
|
479
|
+
|
|
480
|
+
low
|
|
481
|
+
|
|
482
|
+
#### Agent Example
|
|
483
|
+
|
|
484
|
+
#### Example
|
|
485
|
+
|
|
486
|
+
```ts
|
|
487
|
+
dtcEngine.Navigation.pauseNavPath({ parentId: 'Players', id: ['Player1', 'MyRobut'] }, (result) => { console.log(result); });
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
***
|
|
491
|
+
|
|
492
|
+
### resumeNavPath()
|
|
493
|
+
|
|
494
|
+
> **resumeNavPath**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
495
|
+
|
|
496
|
+
继续模型对象路径导航。
|
|
497
|
+
|
|
498
|
+
#### Parameters
|
|
499
|
+
|
|
500
|
+
| Parameter | Type | Description |
|
|
501
|
+
| ------ | ------ | ------ |
|
|
502
|
+
| `payload` | [`NavigationNodeRequest`](../../types/interfaces/NavigationNodeRequest.md) | 导航对象参数。 |
|
|
503
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
504
|
+
|
|
505
|
+
#### Returns
|
|
506
|
+
|
|
507
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
508
|
+
|
|
509
|
+
Promise 形式的接口响应。
|
|
510
|
+
|
|
511
|
+
#### Agent Side Effects
|
|
512
|
+
|
|
513
|
+
write
|
|
514
|
+
|
|
515
|
+
#### Agent Preconditions
|
|
516
|
+
|
|
517
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
518
|
+
|
|
519
|
+
#### Agent Risk Level
|
|
520
|
+
|
|
521
|
+
low
|
|
522
|
+
|
|
523
|
+
#### Agent Example
|
|
524
|
+
|
|
525
|
+
#### Example
|
|
526
|
+
|
|
527
|
+
```ts
|
|
528
|
+
dtcEngine.Navigation.resumeNavPath({ parentId: 'Players', id: ['Player1', 'MyRobut'] }, (result) => { console.log(result); });
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
***
|
|
532
|
+
|
|
533
|
+
### stopNavPath()
|
|
534
|
+
|
|
535
|
+
> **stopNavPath**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
536
|
+
|
|
537
|
+
停止模型对象路径导航。
|
|
538
|
+
|
|
539
|
+
#### Parameters
|
|
540
|
+
|
|
541
|
+
| Parameter | Type | Description |
|
|
542
|
+
| ------ | ------ | ------ |
|
|
543
|
+
| `payload` | [`NavigationNodeRequest`](../../types/interfaces/NavigationNodeRequest.md) | 导航对象参数。 |
|
|
544
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
545
|
+
|
|
546
|
+
#### Returns
|
|
547
|
+
|
|
548
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
549
|
+
|
|
550
|
+
Promise 形式的接口响应。
|
|
551
|
+
|
|
552
|
+
#### Agent Side Effects
|
|
553
|
+
|
|
554
|
+
write
|
|
555
|
+
|
|
556
|
+
#### Agent Preconditions
|
|
557
|
+
|
|
558
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
559
|
+
|
|
560
|
+
#### Agent Risk Level
|
|
561
|
+
|
|
562
|
+
low
|
|
563
|
+
|
|
564
|
+
#### Agent Example
|
|
565
|
+
|
|
566
|
+
#### Example
|
|
567
|
+
|
|
568
|
+
```ts
|
|
569
|
+
dtcEngine.Navigation.stopNavPath({ parentId: 'Players', id: ['Player1'] }, (result) => { console.log(result); });
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
***
|
|
573
|
+
|
|
574
|
+
### updateNavPath()
|
|
575
|
+
|
|
576
|
+
> **updateNavPath**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
577
|
+
|
|
578
|
+
设置路径导航属性。
|
|
579
|
+
默认值:`duration=-1`(不改变时长)。
|
|
580
|
+
|
|
581
|
+
#### Parameters
|
|
582
|
+
|
|
583
|
+
| Parameter | Type | Description |
|
|
584
|
+
| ------ | ------ | ------ |
|
|
585
|
+
| `payload` | [`NavigationUpdateNavPathRequest`](../../types/interfaces/NavigationUpdateNavPathRequest.md) | 路径导航属性参数。 |
|
|
586
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
587
|
+
|
|
588
|
+
#### Returns
|
|
589
|
+
|
|
590
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
591
|
+
|
|
592
|
+
Promise 形式的接口响应。
|
|
593
|
+
|
|
594
|
+
#### Agent Side Effects
|
|
595
|
+
|
|
596
|
+
write
|
|
597
|
+
|
|
598
|
+
#### Agent Preconditions
|
|
599
|
+
|
|
600
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
601
|
+
|
|
602
|
+
#### Agent Risk Level
|
|
603
|
+
|
|
604
|
+
low
|
|
605
|
+
|
|
606
|
+
#### Agent Example
|
|
607
|
+
|
|
608
|
+
#### Example
|
|
609
|
+
|
|
610
|
+
```ts
|
|
611
|
+
dtcEngine.Navigation.updateNavPath({
|
|
612
|
+
parentId: 'Players',
|
|
613
|
+
id: ['Player1', 'MyRobut'],
|
|
614
|
+
planColor: '#00ff00',
|
|
615
|
+
passColor: '#e1e1e1',
|
|
616
|
+
duration: 5
|
|
617
|
+
}, (result) => { console.log(result); });
|
|
618
|
+
```
|
|
@@ -50,6 +50,10 @@ DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
|
50
50
|
|
|
51
51
|
low
|
|
52
52
|
|
|
53
|
+
#### Agent Response Mode
|
|
54
|
+
|
|
55
|
+
stream
|
|
56
|
+
|
|
53
57
|
#### Agent Example
|
|
54
58
|
|
|
55
59
|
#### Example
|
|
@@ -115,10 +119,10 @@ low
|
|
|
115
119
|
#### Example
|
|
116
120
|
|
|
117
121
|
```ts
|
|
118
|
-
dtcEngine.PathPatrol.update(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
);
|
|
122
|
+
dtcEngine.PathPatrol.update(
|
|
123
|
+
{ parentId: 'patrolLayer', id: 'patrolMan', lineColor: '#ff00ff', lineWidth: 3.5 },
|
|
124
|
+
(result) => { console.log(result); }
|
|
125
|
+
);
|
|
122
126
|
```
|
|
123
127
|
|
|
124
128
|
***
|