aircitytype 1.0.23 → 1.0.26
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/index.d.ts +56 -26
- package/package.json +1 -1
package/index.d.ts
CHANGED
@@ -12,6 +12,7 @@ interface Misc {
|
|
12
12
|
getBPFunction(path: string): Promise<{ data: { params: { functionName: string, functionParams: any[] }[] }[] }>;
|
13
13
|
apiVersion: string;
|
14
14
|
apiVersionServer: string;
|
15
|
+
getMaterial(path: string): void;
|
15
16
|
}
|
16
17
|
|
17
18
|
interface InfoTree {
|
@@ -116,15 +117,14 @@ interface Weather {
|
|
116
117
|
}
|
117
118
|
|
118
119
|
interface TileLayer {
|
119
|
-
[x: string]: any;
|
120
120
|
add(data: TileLayerType | TileLayerType[], fn?: () => void): void;
|
121
|
-
|
122
|
-
|
121
|
+
addModifier(id: string, tileLayerId: string, coordinates: number[][], ententBufferSize: number, fn?: any): void;
|
122
|
+
clearModifier(ids: string | string[], fn?: any): void;
|
123
123
|
delete(ids: string | string[], fn?: () => void): void;
|
124
|
-
|
125
|
-
|
124
|
+
deleteModifier(id: string, tileLayerId: string, fn?: any): void;
|
125
|
+
disableClip(ids: string | string[], fn?: any): void;
|
126
126
|
disableXRay(ids: string | string[], fn?: () => void): void;
|
127
|
-
|
127
|
+
enableClip(ids: string | string[], fn?: any): void;
|
128
128
|
enableXRay(
|
129
129
|
ids: string | string[],
|
130
130
|
color?: [number, number, number, number],
|
@@ -136,9 +136,8 @@ interface TileLayer {
|
|
136
136
|
flyTime?: number,
|
137
137
|
fn?: () => void
|
138
138
|
): void;
|
139
|
-
|
140
|
-
|
141
|
-
// focusActors(data, fn)
|
139
|
+
focusActor(id: string, objectId: string, fn?: any): void;
|
140
|
+
focusActors(data: { id: string; objectIds: string[] } | { id: string; objectIds: string[] }[], fn?: any): void;
|
142
141
|
get(ids: string[] | string, fn?: () => void): Promise<{
|
143
142
|
data: {
|
144
143
|
bFlattenSupported: number;
|
@@ -158,16 +157,16 @@ interface TileLayer {
|
|
158
157
|
visible: 1;
|
159
158
|
}[]
|
160
159
|
}>;
|
161
|
-
|
162
|
-
|
160
|
+
getActorInfo(data: { id: string; objectIds: string[] }, fn?: any): Promise<{ data: any }>;
|
161
|
+
getObjectIDs(ids: string | string[], fn?: () => void): Promise<{ data: { objectIds: string[] }[] }>;
|
163
162
|
hide(p: string | string[], fn?: any): void;
|
164
|
-
|
165
|
-
|
166
|
-
|
163
|
+
hideActor(id: string, objectId: string, fn?: any): void;
|
164
|
+
hideActors(data: { id: string; objectIds: string[] } | { id: string; objectIds: string[] }[], fn?: any): void;
|
165
|
+
hideAllActors(tileLayerId: string): void;
|
167
166
|
highlightActor(id: string, objectId: string, fn?: () => void): void;
|
168
|
-
|
169
|
-
|
170
|
-
|
167
|
+
highlightActors(data: { id: string; objectIds: string[] } | { id: string; objectIds: string[] }[], fn?: any): void;
|
168
|
+
setCollision(tileLayerIds: string | string[], enabled?: boolean, mouseInteract?: boolean, mouseFunction?: boolean, characterCollision?: boolean, fn?: any): void;
|
169
|
+
setFileName(id: string, newVal: string, fn?: () => void): void;
|
171
170
|
setLocation(
|
172
171
|
id: string | string[],
|
173
172
|
newVal: [number, number, number],
|
@@ -178,7 +177,7 @@ interface TileLayer {
|
|
178
177
|
newVal: [number, number, number],
|
179
178
|
fn?: () => void
|
180
179
|
): void;
|
181
|
-
|
180
|
+
setScale(id: string, newVal: [number, number, number], fn?: any): void;
|
182
181
|
setStyle(
|
183
182
|
ids: string[] | string,
|
184
183
|
style: number,
|
@@ -191,14 +190,31 @@ interface TileLayer {
|
|
191
190
|
): void;
|
192
191
|
// setViewportVisible(id, vp, fn)
|
193
192
|
show(p: string | string[], fn?: any): void;
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
stopHighlightActors(
|
199
|
-
|
200
|
-
|
201
|
-
|
193
|
+
showActor(id: string, objectId: string, fn?: any): void;
|
194
|
+
showActors(data: { id: string; objectIds: string[] } | { id: string; objectIds: string[] }[], fn?: any): void;
|
195
|
+
showAllActors(tileLayerId: string | string[]): void;
|
196
|
+
stopHighlightAllActors(): void;
|
197
|
+
stopHighlightActors(data: { id: string; objectIds: string[] } | { id: string; objectIds: string[] }[], fn?: () => void): void;
|
198
|
+
stopHighlightActor(id: string, objectId: string): void;
|
199
|
+
updateBegin(): void;
|
200
|
+
updateEnd(): void;
|
201
|
+
|
202
|
+
// Name Type Description
|
203
|
+
// id string
|
204
|
+
// 唯一标识符
|
205
|
+
|
206
|
+
// tileLayerId string
|
207
|
+
// TileLayer对象的ID
|
208
|
+
|
209
|
+
// coordinates array
|
210
|
+
// 压平多边形的坐标
|
211
|
+
|
212
|
+
// ententBufferSize number
|
213
|
+
// 羽化范围,取值范围:[任意正浮点数],单位:米
|
214
|
+
|
215
|
+
// fn function
|
216
|
+
// 可选的回调函数,请参考二次开发:异步接口调用方式
|
217
|
+
updateModifier(id: string, tileLayerId: string, coordinates: number[][], ententBufferSize: number, fn?: any): void;
|
202
218
|
}
|
203
219
|
|
204
220
|
interface Tools {
|
@@ -480,6 +496,17 @@ interface CustomObjectBPParam {
|
|
480
496
|
parameters: { [key: string]: string | number | any[] }[],
|
481
497
|
}
|
482
498
|
|
499
|
+
type CustomTileLayer = {
|
500
|
+
id: string; //CustomObject对象的ID
|
501
|
+
tileLayerId: string; //TileLayer图层的ID
|
502
|
+
objectId: string | string[]; //TileLayer图层中包含的待复制的模型(Actor)的ObjectId,同时也支持数组类型参数即把多个actor复制为一个customObject
|
503
|
+
location: number[]; //位置坐标:[X, Y, Z],取值示例,数组元素类型:(number),取值范围:[任意数值]
|
504
|
+
coordinateType: number; //坐标系类型,取值:0为Projection类型,1为WGS84类型,默认值:0
|
505
|
+
rotation: number[]; // 旋转:[Pitch, Yaw, Roll],数组元素类型:(number),取值范围:[任意数值]
|
506
|
+
scale: number[]; // 缩放:[X, Y, Z],数组元素类型:(number),取值范围:[任意正整数]
|
507
|
+
smoothMotion: number; // 1: 平滑插值,0: 跳跃
|
508
|
+
}
|
509
|
+
|
483
510
|
interface CustomObject {
|
484
511
|
delete: any;
|
485
512
|
focus(id: string, t?: number): void;
|
@@ -511,6 +538,8 @@ interface CustomObject {
|
|
511
538
|
show(ids: string[] | string, fn?: () => void): void;
|
512
539
|
hide(ids: string[] | string, fn?: () => void): void;
|
513
540
|
restoreMaterial(ids: string | string[]): void;
|
541
|
+
addByTileLayer(data: CustomTileLayer | CustomTileLayer[]): void;
|
542
|
+
|
514
543
|
/**
|
515
544
|
*
|
516
545
|
* data object | array
|
@@ -653,6 +682,7 @@ interface Marker3D {
|
|
653
682
|
hide(ids: string[] | string, fn?: () => void): void;
|
654
683
|
delete(ids: string[] | string): void;
|
655
684
|
deleteByGroupId(id: string): void;
|
685
|
+
hideByGroupId(id: string): void;
|
656
686
|
}
|
657
687
|
|
658
688
|
interface EditHelper {
|