aircitytype 1.0.13 → 1.0.15

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.
Files changed (2) hide show
  1. package/index.d.ts +22 -22
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -20,7 +20,7 @@ interface InfoTree {
20
20
  color: string | [number, number, number, number],
21
21
  fn?: () => void
22
22
  ): void;
23
- get(fn: (e: { infotree: InfoTreeItem[] }) => void): Promise<{ infotree: InfoTreeItem[] }>;
23
+ get(fn: (e: any) => void): void;
24
24
  hide(ids: string[] | string, fn?: () => void): void;
25
25
  hideByGroupId(groupId: string, fn?: () => void): void;
26
26
  highlightByGroupId(groupId: string, fn: () => void): void;
@@ -273,9 +273,9 @@ interface Settings {
273
273
  }
274
274
 
275
275
  declare interface InfoTreeItem {
276
- iD: string;
277
- index: 0;
278
- parentIndex: -1;
276
+ iD: "ProjectTree_Root";
277
+ index: number;
278
+ parentIndex: number;
279
279
  name: string;
280
280
  visiblity: true;
281
281
  type: string;
@@ -321,6 +321,7 @@ interface AircityEvent {
321
321
  PropertyName: string;
322
322
  Position: [number, number, number];
323
323
  UserData: string;
324
+ coordinates: [number, number, number][];
324
325
  ModelName: string;
325
326
  }
326
327
 
@@ -343,14 +344,8 @@ declare class CameraTour {
343
344
  }
344
345
 
345
346
  interface Polygon {
346
- add(v: {
347
- id: string;
348
- coordinates: Array<number[]>; //左上,右上,右下,做下这样的顺序
349
- color: number[]; //多边形的填充颜色
350
- frameColor: Color;
351
- frameThickness: number;
352
- depthTest: boolean;
353
- }): void;
347
+ add(v: PolygonType | PolygonType[]): void;
348
+ delete(id: string | string[]): void;
354
349
  clear(): void;
355
350
  }
356
351
 
@@ -363,7 +358,7 @@ interface Polygon3D {
363
358
  interface Polyline {
364
359
  add(arg0: PolyLineType | PolyLineType[]): void;
365
360
  focus(id: string, distance?: number): void;
366
- delete(id: string): void;
361
+ delete(id: string | string[]): void;
367
362
  hide(id: string): void;
368
363
  clear(): void;
369
364
  }
@@ -477,14 +472,8 @@ type CustomObjectParams = {
477
472
  UserData?: string; //
478
473
  };
479
474
 
480
- interface CustomObjectParam {
481
- id: string;
482
- functionName: string
483
- parameters: { [key: string]: string | number | any[] }[],
484
- }
485
-
486
475
  interface CustomObject {
487
- delete: any;
476
+ delete(id: string | string[]): void;
488
477
  focus(id: string, t: number): void;
489
478
  startMove(id: string, v: number, t: any[]): void;
490
479
  add(p: CustomObjectParams | CustomObjectParams[]): void;
@@ -509,11 +498,11 @@ interface CustomObject {
509
498
  resultMessage: string;
510
499
  timestamp: number;
511
500
  }>;
512
- callBatchBPFunction(v: CustomObjectParam | CustomObjectParam[]): void;
513
501
  setLocation(id: string | string[], arr: [number, number, number]): void;
514
502
  show(ids: string[] | string, fn?: () => void): void;
515
503
  hide(ids: string[] | string, fn?: () => void): void;
516
504
  restoreMaterial(ids: string | string[]): void;
505
+ callBatchBPFunction(param: { id: string, functionName: string, parameters: any } | { id: string, functionName: string, parameters: any }[]): void;
517
506
  /**
518
507
  *
519
508
  * data object | array
@@ -597,7 +586,7 @@ interface PolyLineType {
597
586
  color?: string | [number, number, number, number]; // 颜色值,支持四种格式,取值示例
598
587
  coordinates?: [number, number, number][]; // 坐标点数组,取值示例
599
588
  coordinateType?: number; // 坐标系类型,取值范围:0为Projection类型,1为WGS84类型,默认值:0
600
- style?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; // 折线样式,箭头/光流/贴地/实线/虚线等,取值范围:[0~7],参考 PolylineStyle
589
+ style?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; // {Arrow: 0, Arrow1: 1, Flow: 2, Beam: 3, Normal: 4,OnTerrain:5} 参考 PolylineStyle
601
590
  thickness?: number; //线宽,单位:米,默认值20
602
591
  intensity?: number; //亮度,取值范围:[0~1000],默认值:0.5
603
592
  flowRate?: number; // 流速,取值范围:[0~1.0],默认值:0.5
@@ -606,6 +595,15 @@ interface PolyLineType {
606
595
  shape?: number; //样式,0:直线, 1:曲线
607
596
  }
608
597
 
598
+ interface PolygonType {
599
+ id: string;
600
+ coordinates: Array<number[]>; //左上,右上,右下,做下这样的顺序
601
+ color: number[]; //多边形的填充颜色
602
+ frameColor: Color;
603
+ frameThickness: number;
604
+ depthTest: boolean;
605
+ }
606
+
609
607
  interface Marker {
610
608
  clear(): void;
611
609
  add(p: markType | markType[]): Promise<null>;
@@ -634,6 +632,8 @@ interface Marker3D {
634
632
  hide(ids: string[] | string, fn?: () => void): void;
635
633
  delete(ids: string[] | string): void;
636
634
  deleteByGroupId(id: string): void;
635
+ hideByGroupId(groupID: string): void;
636
+ showByGroupId(groupId: string, fn?: () => void): void;
637
637
  }
638
638
 
639
639
  interface EditHelper {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aircitytype",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {