@nnepoch/dtc-sdk 3.0.10 → 3.0.12
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.12.js +2 -0
- package/dist/cjs/index.cjs +4 -4
- package/dist/cjs/index.d.cts +373 -24
- package/dist/esm/index.d.ts +373 -24
- 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.10.js +0 -2
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
[@nnepoch/dtc-sdk](../../index.md) / [api](../index.md) / TrainSimulate
|
|
2
|
+
|
|
3
|
+
# Class: TrainSimulate
|
|
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
|
+
### startTrain()
|
|
22
|
+
|
|
23
|
+
> **startTrain**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
24
|
+
|
|
25
|
+
设置火车的动态并启动列车。
|
|
26
|
+
默认值:`direction='0'`、`action='1'`、`stopTime=180`、`moveType=StopAtTheEnd`。
|
|
27
|
+
`id` 为必填的唯一编号;`parentId` 用于避免重名,可不填。
|
|
28
|
+
|
|
29
|
+
#### Parameters
|
|
30
|
+
|
|
31
|
+
| Parameter | Type | Description |
|
|
32
|
+
| ------ | ------ | ------ |
|
|
33
|
+
| `payload` | [`TrainSimulateStartTrainRequest`](../../types/interfaces/TrainSimulateStartTrainRequest.md) | 列车启动参数。 |
|
|
34
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
35
|
+
|
|
36
|
+
#### Returns
|
|
37
|
+
|
|
38
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
39
|
+
|
|
40
|
+
Promise 形式的接口响应。
|
|
41
|
+
|
|
42
|
+
#### Agent Side Effects
|
|
43
|
+
|
|
44
|
+
write
|
|
45
|
+
|
|
46
|
+
#### Agent Preconditions
|
|
47
|
+
|
|
48
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
49
|
+
|
|
50
|
+
#### Agent Risk Level
|
|
51
|
+
|
|
52
|
+
low
|
|
53
|
+
|
|
54
|
+
#### Agent Example
|
|
55
|
+
|
|
56
|
+
#### Example
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
dtcEngine.TrainSimulate.startTrain(
|
|
60
|
+
{
|
|
61
|
+
parentId: 'RailTrains',
|
|
62
|
+
id: 'DTrain1',
|
|
63
|
+
trainCode: 'G501',
|
|
64
|
+
startStationName: '北京',
|
|
65
|
+
endStationName: '上海',
|
|
66
|
+
direction: '0',
|
|
67
|
+
action: '1',
|
|
68
|
+
stopTime: 180,
|
|
69
|
+
moveType: dtcEngine.Enums.TrainBehavior.StopAtTheEnd
|
|
70
|
+
},
|
|
71
|
+
(result) => { console.log(result); }
|
|
72
|
+
);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
|
|
77
|
+
### setTrainBehavior()
|
|
78
|
+
|
|
79
|
+
> **setTrainBehavior**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
80
|
+
|
|
81
|
+
设置火车的运动方式。
|
|
82
|
+
默认值:`moveType=StopAtTheEnd`。
|
|
83
|
+
|
|
84
|
+
#### Parameters
|
|
85
|
+
|
|
86
|
+
| Parameter | Type | Description |
|
|
87
|
+
| ------ | ------ | ------ |
|
|
88
|
+
| `payload` | [`TrainSimulateSetTrainBehaviorRequest`](../../types/interfaces/TrainSimulateSetTrainBehaviorRequest.md) | 列车运动方式参数。 |
|
|
89
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
90
|
+
|
|
91
|
+
#### Returns
|
|
92
|
+
|
|
93
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
94
|
+
|
|
95
|
+
Promise 形式的接口响应。
|
|
96
|
+
|
|
97
|
+
#### Agent Side Effects
|
|
98
|
+
|
|
99
|
+
write
|
|
100
|
+
|
|
101
|
+
#### Agent Preconditions
|
|
102
|
+
|
|
103
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
104
|
+
|
|
105
|
+
#### Agent Risk Level
|
|
106
|
+
|
|
107
|
+
low
|
|
108
|
+
|
|
109
|
+
#### Agent Example
|
|
110
|
+
|
|
111
|
+
#### Example
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
dtcEngine.TrainSimulate.setTrainBehavior(
|
|
115
|
+
{ parentId: 'RailTrains', id: 'DTrain1', moveType: dtcEngine.Enums.TrainBehavior.Loop },
|
|
116
|
+
(result) => { console.log(result); }
|
|
117
|
+
);
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
***
|
|
121
|
+
|
|
122
|
+
### setCameraFollowTrain()
|
|
123
|
+
|
|
124
|
+
> **setCameraFollowTrain**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
125
|
+
|
|
126
|
+
设置相机跟随火车。
|
|
127
|
+
内部调用相机模块的 `Camera.startCameraObjFollow` 接口实现。
|
|
128
|
+
默认偏移量 `offSet=(-100, 0, 30)`,坐标类型固定为 `'0000'`。
|
|
129
|
+
|
|
130
|
+
#### Parameters
|
|
131
|
+
|
|
132
|
+
| Parameter | Type | Description |
|
|
133
|
+
| ------ | ------ | ------ |
|
|
134
|
+
| `payload` | [`TrainSimulateSetCameraFollowTrainRequest`](../../types/interfaces/TrainSimulateSetCameraFollowTrainRequest.md) | 相机跟随参数。 |
|
|
135
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
136
|
+
|
|
137
|
+
#### Returns
|
|
138
|
+
|
|
139
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
140
|
+
|
|
141
|
+
Promise 形式的接口响应。
|
|
142
|
+
|
|
143
|
+
#### Agent Side Effects
|
|
144
|
+
|
|
145
|
+
write
|
|
146
|
+
|
|
147
|
+
#### Agent Preconditions
|
|
148
|
+
|
|
149
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
150
|
+
|
|
151
|
+
#### Agent Risk Level
|
|
152
|
+
|
|
153
|
+
low
|
|
154
|
+
|
|
155
|
+
#### Agent Example
|
|
156
|
+
|
|
157
|
+
#### Example
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
dtcEngine.TrainSimulate.setCameraFollowTrain(
|
|
161
|
+
{ parentId: 'RailTrains', id: 'DTrain1', offSet: new dtcEngine.Type.Vector3(26, 18, 15) },
|
|
162
|
+
(result) => { console.log(result); }
|
|
163
|
+
);
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
***
|
|
167
|
+
|
|
168
|
+
### setTrainVolume()
|
|
169
|
+
|
|
170
|
+
> **setTrainVolume**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
171
|
+
|
|
172
|
+
设置火车的声音的开关。
|
|
173
|
+
默认值:`volumeOn=true`。
|
|
174
|
+
|
|
175
|
+
#### Parameters
|
|
176
|
+
|
|
177
|
+
| Parameter | Type | Description |
|
|
178
|
+
| ------ | ------ | ------ |
|
|
179
|
+
| `payload` | [`TrainSimulateSetTrainVolumeRequest`](../../types/interfaces/TrainSimulateSetTrainVolumeRequest.md) | 列车声音参数。 |
|
|
180
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
181
|
+
|
|
182
|
+
#### Returns
|
|
183
|
+
|
|
184
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
185
|
+
|
|
186
|
+
Promise 形式的接口响应。
|
|
187
|
+
|
|
188
|
+
#### Agent Side Effects
|
|
189
|
+
|
|
190
|
+
write
|
|
191
|
+
|
|
192
|
+
#### Agent Preconditions
|
|
193
|
+
|
|
194
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
195
|
+
|
|
196
|
+
#### Agent Risk Level
|
|
197
|
+
|
|
198
|
+
low
|
|
199
|
+
|
|
200
|
+
#### Agent Example
|
|
201
|
+
|
|
202
|
+
#### Example
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
dtcEngine.TrainSimulate.setTrainVolume(
|
|
206
|
+
{ parentId: '', id: 'Train1', volumeOn: false },
|
|
207
|
+
(result) => { console.log(result); }
|
|
208
|
+
);
|
|
209
|
+
// 响应示例:{ code: 0, message: 'success', data: null }
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
***
|
|
213
|
+
|
|
214
|
+
### cancelCameraFollowTrain()
|
|
215
|
+
|
|
216
|
+
> **cancelCameraFollowTrain**(`callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
217
|
+
|
|
218
|
+
取消相机跟随火车,无需传参。
|
|
219
|
+
|
|
220
|
+
#### Parameters
|
|
221
|
+
|
|
222
|
+
| Parameter | Type | Description |
|
|
223
|
+
| ------ | ------ | ------ |
|
|
224
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
225
|
+
|
|
226
|
+
#### Returns
|
|
227
|
+
|
|
228
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
229
|
+
|
|
230
|
+
Promise 形式的接口响应。
|
|
231
|
+
|
|
232
|
+
#### Agent Side Effects
|
|
233
|
+
|
|
234
|
+
write
|
|
235
|
+
|
|
236
|
+
#### Agent Preconditions
|
|
237
|
+
|
|
238
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
239
|
+
|
|
240
|
+
#### Agent Risk Level
|
|
241
|
+
|
|
242
|
+
low
|
|
243
|
+
|
|
244
|
+
#### Agent Example
|
|
245
|
+
|
|
246
|
+
#### Example
|
|
247
|
+
|
|
248
|
+
```ts
|
|
249
|
+
dtcEngine.TrainSimulate.cancelCameraFollowTrain((result) => { console.log(result); });
|
|
250
|
+
```
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
## Agent Capabilities
|
|
12
12
|
|
|
13
|
-
天气类型查询, 天气切换, 天气重置, 天气时间重置, 场景时间设置, 时间同步控制, 昼夜动画控制, 昼夜模式设置, 季节切换, 季节重置, 雾效开启,
|
|
13
|
+
天气类型查询, 天气切换, 天气重置, 天气时间重置, 场景时间设置, 时间同步控制, 昼夜动画控制, 昼夜模式设置, 季节切换, 季节重置, 雾效开启, 雾效关闭, 天气音量控制
|
|
14
14
|
|
|
15
15
|
## Extends
|
|
16
16
|
|
|
@@ -54,9 +54,9 @@ low
|
|
|
54
54
|
#### Example
|
|
55
55
|
|
|
56
56
|
```ts
|
|
57
|
-
dtcEngine.WeatherSystem.changeWeatherType({
|
|
58
|
-
|
|
59
|
-
});
|
|
57
|
+
dtcEngine.WeatherSystem.changeWeatherType({ weatherType: 'Clear_Skies', timeDuration: 6 }, (result) => {
|
|
58
|
+
console.log(result);
|
|
59
|
+
});
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
***
|
|
@@ -65,7 +65,7 @@ dtcEngine.WeatherSystem.changeWeatherType({ type: 0, timeDuration: 60 }, (result
|
|
|
65
65
|
|
|
66
66
|
> **getWeatherTypes**(`callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
得到所有天气类型。
|
|
69
69
|
备注:(需在配置 提前预制UDS天气系统)
|
|
70
70
|
|
|
71
71
|
#### Parameters
|
|
@@ -100,7 +100,7 @@ low
|
|
|
100
100
|
#### Example
|
|
101
101
|
|
|
102
102
|
```
|
|
103
|
-
dtcEngine.WeatherSystem.getWeatherTypes((result)=>{console.log(result)})
|
|
103
|
+
dtcEngine.WeatherSystem.getWeatherTypes((result)=>{console.log(result)})
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
***
|
|
@@ -497,6 +497,55 @@ dtcEngine.WeatherSystem.setDayAndNight({ dayType: 'night' }, (result) => {
|
|
|
497
497
|
|
|
498
498
|
***
|
|
499
499
|
|
|
500
|
+
### setWeatherVolume()
|
|
501
|
+
|
|
502
|
+
> **setWeatherVolume**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
503
|
+
|
|
504
|
+
设置天气声音的开关。
|
|
505
|
+
默认值:`volumeOn=true`。`true` 开启,`false` 关闭。
|
|
506
|
+
|
|
507
|
+
#### Parameters
|
|
508
|
+
|
|
509
|
+
| Parameter | Type | Description |
|
|
510
|
+
| ------ | ------ | ------ |
|
|
511
|
+
| `payload` | [`WeatherSetVolumeRequest`](../../types/interfaces/WeatherSetVolumeRequest.md) | 天气声音开关参数。 |
|
|
512
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
513
|
+
|
|
514
|
+
#### Returns
|
|
515
|
+
|
|
516
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
517
|
+
|
|
518
|
+
Promise 形式的接口响应。
|
|
519
|
+
|
|
520
|
+
#### Agent Side Effects
|
|
521
|
+
|
|
522
|
+
write
|
|
523
|
+
|
|
524
|
+
#### Agent Preconditions
|
|
525
|
+
|
|
526
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
527
|
+
|
|
528
|
+
#### Agent Risk Level
|
|
529
|
+
|
|
530
|
+
low
|
|
531
|
+
|
|
532
|
+
#### Agent Example
|
|
533
|
+
|
|
534
|
+
#### Example
|
|
535
|
+
|
|
536
|
+
```ts
|
|
537
|
+
示例1: 关闭天气声音
|
|
538
|
+
dtcEngine.WeatherSystem.setWeatherVolume({ volumeOn: false }, (result) => {
|
|
539
|
+
console.log(result);
|
|
540
|
+
});
|
|
541
|
+
示例2: 开启天气声音
|
|
542
|
+
dtcEngine.WeatherSystem.setWeatherVolume({ volumeOn: true }, (result) => {
|
|
543
|
+
console.log(result);
|
|
544
|
+
});
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
***
|
|
548
|
+
|
|
500
549
|
### openCameraFog()
|
|
501
550
|
|
|
502
551
|
> **openCameraFog**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
[@nnepoch/dtc-sdk](../../index.md) / [api](../index.md) / WebView
|
|
2
|
+
|
|
3
|
+
# Class: WebView
|
|
4
|
+
|
|
5
|
+
网页视图(WebView)管理 API。
|
|
6
|
+
|
|
7
|
+
## Agent Title
|
|
8
|
+
|
|
9
|
+
网页视图
|
|
10
|
+
|
|
11
|
+
## Agent Capabilities
|
|
12
|
+
|
|
13
|
+
网页视图更新
|
|
14
|
+
|
|
15
|
+
## Extends
|
|
16
|
+
|
|
17
|
+
- `BaseApi`
|
|
18
|
+
|
|
19
|
+
## Methods
|
|
20
|
+
|
|
21
|
+
### updateWebView()
|
|
22
|
+
|
|
23
|
+
> **updateWebView**(`payload`, `callback?`): `Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
24
|
+
|
|
25
|
+
更新网页视图参数。
|
|
26
|
+
|
|
27
|
+
#### Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Description |
|
|
30
|
+
| ------ | ------ | ------ |
|
|
31
|
+
| `payload` | [`WebViewUpdateRequest`](../../types/interfaces/WebViewUpdateRequest.md) | 网页视图参数。 |
|
|
32
|
+
| `callback?` | [`ApiCallback`](../../types/type-aliases/ApiCallback.md)\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\> | 可选回调函数。 |
|
|
33
|
+
|
|
34
|
+
#### Returns
|
|
35
|
+
|
|
36
|
+
`Promise`\<[`ApiResponseEnvelope`](../../types/interfaces/ApiResponseEnvelope.md)\<`unknown`\>\>
|
|
37
|
+
|
|
38
|
+
Promise 形式的接口响应。
|
|
39
|
+
|
|
40
|
+
#### Agent Side Effects
|
|
41
|
+
|
|
42
|
+
write
|
|
43
|
+
|
|
44
|
+
#### Agent Preconditions
|
|
45
|
+
|
|
46
|
+
DTCEngine 已完成鉴权并建立 WebRTC 连接
|
|
47
|
+
|
|
48
|
+
#### Agent Risk Level
|
|
49
|
+
|
|
50
|
+
low
|
|
51
|
+
|
|
52
|
+
#### Agent Example
|
|
53
|
+
|
|
54
|
+
#### Example
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
dtcEngine.WebView.updateWebView(
|
|
58
|
+
{ parentId: 'WebViews', id: 'tv1', url: 'http://www.163.com'},
|
|
59
|
+
(result) => { console.log(result); }
|
|
60
|
+
);
|
|
61
|
+
```
|
package/docs/api/api/index.md
CHANGED
|
@@ -8,27 +8,38 @@
|
|
|
8
8
|
- [Camera](classes/Camera.md)
|
|
9
9
|
- [Connect](classes/Connect.md)
|
|
10
10
|
- [Dlss](classes/Dlss.md)
|
|
11
|
+
- [GizmosTool](classes/GizmosTool.md)
|
|
12
|
+
- [HeatMap](classes/HeatMap.md)
|
|
11
13
|
- [HighLighterEffect](classes/HighLighterEffect.md)
|
|
12
14
|
- [Layer](classes/Layer.md)
|
|
13
15
|
- [Model](classes/Model.md)
|
|
14
16
|
- [ModelPOI](classes/ModelPOI.md)
|
|
15
17
|
- [ModelTransform](classes/ModelTransform.md)
|
|
18
|
+
- [Navigation](classes/Navigation.md)
|
|
16
19
|
- [PathPatrol](classes/PathPatrol.md)
|
|
20
|
+
- [PointEditor](classes/PointEditor.md)
|
|
21
|
+
- [PointIcon](classes/PointIcon.md)
|
|
17
22
|
- [Popup](classes/Popup.md)
|
|
18
23
|
- [Scene](classes/Scene.md)
|
|
19
24
|
- [Screen](classes/Screen.md)
|
|
25
|
+
- [SpatialQuery](classes/SpatialQuery.md)
|
|
20
26
|
- [TimeLine](classes/TimeLine.md)
|
|
27
|
+
- [TrainSimulate](classes/TrainSimulate.md)
|
|
21
28
|
- [UIPOI](classes/UIPOI.md)
|
|
22
29
|
- [WeatherSystem](classes/WeatherSystem.md)
|
|
30
|
+
- [WebView](classes/WebView.md)
|
|
23
31
|
- [ApiRegistryError](classes/ApiRegistryError.md)
|
|
24
32
|
|
|
25
33
|
## Interfaces
|
|
26
34
|
|
|
35
|
+
- [PointIconVisibilityResult](interfaces/PointIconVisibilityResult.md)
|
|
36
|
+
- [PointIconIdsRequest](interfaces/PointIconIdsRequest.md)
|
|
27
37
|
- [ApiRegistryContext](interfaces/ApiRegistryContext.md)
|
|
28
38
|
- [ApiInstanceMap](interfaces/ApiInstanceMap.md)
|
|
29
39
|
|
|
30
40
|
## Type Aliases
|
|
31
41
|
|
|
42
|
+
- [PointIconIdsInput](type-aliases/PointIconIdsInput.md)
|
|
32
43
|
- [ApiModuleKey](type-aliases/ApiModuleKey.md)
|
|
33
44
|
- [ApiModuleFactory](type-aliases/ApiModuleFactory.md)
|
|
34
45
|
- [ApiRegistry](type-aliases/ApiRegistry.md)
|
|
@@ -72,12 +72,46 @@
|
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
75
|
+
### Navigation
|
|
76
|
+
|
|
77
|
+
> **Navigation**: [`Navigation`](../classes/Navigation.md)
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
75
81
|
### PathPatrol
|
|
76
82
|
|
|
77
83
|
> **PathPatrol**: [`PathPatrol`](../classes/PathPatrol.md)
|
|
78
84
|
|
|
79
85
|
***
|
|
80
86
|
|
|
87
|
+
### pointIcon
|
|
88
|
+
|
|
89
|
+
> **pointIcon**: [`PointIcon`](../classes/PointIcon.md)
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### PointEditor
|
|
94
|
+
|
|
95
|
+
> **PointEditor**: [`PointEditor`](../classes/PointEditor.md)
|
|
96
|
+
|
|
97
|
+
网页 MODEL 点位编辑(不支持独立 POI)。
|
|
98
|
+
|
|
99
|
+
***
|
|
100
|
+
|
|
101
|
+
### GizmosTool
|
|
102
|
+
|
|
103
|
+
> **GizmosTool**: [`GizmosTool`](../classes/GizmosTool.md)
|
|
104
|
+
|
|
105
|
+
网页 MODEL 的运行时 Gizmo。
|
|
106
|
+
|
|
107
|
+
***
|
|
108
|
+
|
|
109
|
+
### HeatMap
|
|
110
|
+
|
|
111
|
+
> **HeatMap**: [`HeatMap`](../classes/HeatMap.md)
|
|
112
|
+
|
|
113
|
+
***
|
|
114
|
+
|
|
81
115
|
### HighlighterEffect
|
|
82
116
|
|
|
83
117
|
> **HighlighterEffect**: [`HighLighterEffect`](../classes/HighLighterEffect.md)
|
|
@@ -105,3 +139,21 @@
|
|
|
105
139
|
### WeatherSystem
|
|
106
140
|
|
|
107
141
|
> **WeatherSystem**: [`WeatherSystem`](../classes/WeatherSystem.md)
|
|
142
|
+
|
|
143
|
+
***
|
|
144
|
+
|
|
145
|
+
### WebView
|
|
146
|
+
|
|
147
|
+
> **WebView**: [`WebView`](../classes/WebView.md)
|
|
148
|
+
|
|
149
|
+
***
|
|
150
|
+
|
|
151
|
+
### SpatialQuery
|
|
152
|
+
|
|
153
|
+
> **SpatialQuery**: [`SpatialQuery`](../classes/SpatialQuery.md)
|
|
154
|
+
|
|
155
|
+
***
|
|
156
|
+
|
|
157
|
+
### TrainSimulate
|
|
158
|
+
|
|
159
|
+
> **TrainSimulate**: [`TrainSimulate`](../classes/TrainSimulate.md)
|
|
@@ -24,7 +24,7 @@ API 装配上下文,统一承载模块工厂需要的依赖。
|
|
|
24
24
|
|
|
25
25
|
***
|
|
26
26
|
|
|
27
|
-
### createLogger
|
|
27
|
+
### createLogger
|
|
28
28
|
|
|
29
29
|
> **createLogger**: (`moduleName`) => `ModuleLogger`
|
|
30
30
|
|
|
@@ -45,3 +45,23 @@ API 装配上下文,统一承载模块工厂需要的依赖。
|
|
|
45
45
|
> **popupManager**: `PopupManager`
|
|
46
46
|
|
|
47
47
|
前端 Popup 管理器。
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
51
|
+
### videoElementParent?
|
|
52
|
+
|
|
53
|
+
> `optional` **videoElementParent?**: `HTMLElement`
|
|
54
|
+
|
|
55
|
+
当前实例的视频宿主,用于网页点位落点换算。
|
|
56
|
+
|
|
57
|
+
***
|
|
58
|
+
|
|
59
|
+
### beginPointEditorMouseInput?
|
|
60
|
+
|
|
61
|
+
> `optional` **beginPointEditorMouseInput?**: () => () => `void`
|
|
62
|
+
|
|
63
|
+
临时启用官方鼠标输入,退出时恢复原配置。
|
|
64
|
+
|
|
65
|
+
#### Returns
|
|
66
|
+
|
|
67
|
+
() => `void`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[@nnepoch/dtc-sdk](../../index.md) / [api](../index.md) / PointIconVisibilityResult
|
|
2
|
+
|
|
3
|
+
# Interface: PointIconVisibilityResult
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### requestedCount
|
|
8
|
+
|
|
9
|
+
> **requestedCount**: `number`
|
|
10
|
+
|
|
11
|
+
***
|
|
12
|
+
|
|
13
|
+
### affectedCount
|
|
14
|
+
|
|
15
|
+
> **affectedCount**: `number`
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### notFoundIds?
|
|
20
|
+
|
|
21
|
+
> `optional` **notFoundIds?**: `string`[]
|
|
22
|
+
|
|
23
|
+
按 ids 调用(show/hide/showByGroup/hideByGroup)时返回;按 codes 调用时该字段缺失。
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### notFoundCodes?
|
|
28
|
+
|
|
29
|
+
> `optional` **notFoundCodes?**: `string`[]
|
|
30
|
+
|
|
31
|
+
按 codes 调用(showByCode/hideByCode)时返回;按 ids 调用时该字段缺失。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[@nnepoch/dtc-sdk](../../index.md) / [api](../index.md) / ApiModuleFactory
|
|
2
2
|
|
|
3
|
-
# Type Alias: ApiModuleFactory
|
|
3
|
+
# Type Alias: ApiModuleFactory\<TModuleKey\>
|
|
4
4
|
|
|
5
5
|
> **ApiModuleFactory**\<`TModuleKey`\> = (`context`) => [`ApiInstanceMap`](../interfaces/ApiInstanceMap.md)\[`TModuleKey`\]
|
|
6
6
|
|