aircitytype 1.1.28 → 1.1.29

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/aircity/index.d.ts +32 -10
  2. package/package.json +1 -1
@@ -1,3 +1,16 @@
1
+ // 基础坐标点类型(支持2D/3D)
2
+ type Point = number[];
3
+
4
+ // 单个环类型(闭合多边形)
5
+ type Ring = Point[];
6
+
7
+ // 单个Part类型(外环+可选内环)
8
+ type Part = Ring[];
9
+
10
+ // 完整的多边形结构(支持单Part和多Part)
11
+ type PolygonStructure = Ring | Part | Part[];
12
+
13
+
1
14
  interface HOSTINFO {
2
15
  Path: string;
3
16
  AirCityPlayer: string;
@@ -25,6 +38,7 @@ interface InfoTree {
25
38
  fn?: () => void
26
39
  ): void;
27
40
  get(fn?: (e: { infotree: InfoTreeItem[] }) => void): Promise<{ infotree: InfoTreeItem[] }>;
41
+ focus(id:string,fn?:()=>void);
28
42
  hide(ids: string[] | string, fn?: () => void): void;
29
43
  hideByGroupId(groupId: string, fn?: () => void): void;
30
44
  highlightByGroupId(groupId: string, fn: () => void): void;
@@ -91,7 +105,6 @@ interface Weather {
91
105
  day: number,
92
106
  hour: number,
93
107
  minute: number,
94
- // second: number,
95
108
  daynightLoop: boolean,
96
109
  fn?: () => void
97
110
  ): void;
@@ -264,6 +277,14 @@ interface TileLayer {
264
277
  stopHighlightActor(id: string, objectId: string): void;
265
278
  updateBegin(): void;
266
279
  updateEnd(): void;
280
+ addHole(data:{
281
+ id:string; // 挖洞操作唯一标识符
282
+ tileLayerId:string; //TileLayer对象的ID
283
+ coordinates: PolygonStructure; //挖洞多边形的坐标数组,二维数组,数组元素类型:挖洞多边形的坐标,取值示例
284
+ innerRings: any[]; //挖洞多边形的内环,三维数组,数组元素类型:挖洞多边形的坐标数组
285
+ isReverseCut:boolean //挖洞多边形是否反转,默认值:false
286
+ }[]): void;
287
+ clearHole(id:string|string[],fn?:()=>void):void;
267
288
 
268
289
  // Name Type Description
269
290
  // id string
@@ -456,7 +477,7 @@ interface Polygon3D {
456
477
  }
457
478
 
458
479
  interface Polyline {
459
- add(arg0: PolyLineType | PolyLineType[]): void;
480
+ add(arg0: PolyLineType | PolyLineType[], fn: (r)=>void): void;
460
481
  update(arg:PolyLineType|PolyLineType[]):void;
461
482
  focus(id: string, distance?: number): void;
462
483
  delete(id: string | string[]): void;
@@ -743,6 +764,7 @@ interface PolygonType {
743
764
 
744
765
  declare enum PolygonStyle {
745
766
  OnTerrain = 0,
767
+ SingleColor = 0
746
768
  }
747
769
 
748
770
  interface PolyLineType {
@@ -1052,14 +1074,14 @@ interface VehicleData{
1052
1074
 
1053
1075
  interface GeoJSONLayerOption{
1054
1076
  id: string,
1055
- visible: boolean,//加载后是否显示
1056
- rotation: [number, number, number],//图层旋转
1057
- offset: [number, number, number],//基于原始位置的偏移量
1058
- needProject: boolean,//开启投影转换
1059
- collision: boolean, //开启碰撞
1060
- onTerrain: boolean,//是否贴地
1061
- url: string;
1062
- renderer: any;
1077
+ visible?: boolean,//加载后是否显示
1078
+ rotation?: [number, number, number],//图层旋转
1079
+ offset?: [number, number, number],//基于原始位置的偏移量
1080
+ needProject?: boolean,//开启投影转换
1081
+ collision?: boolean, //开启碰撞
1082
+ onTerrain?: boolean,//是否贴地
1083
+ url?: string;
1084
+ renderer?: any;
1063
1085
  }
1064
1086
 
1065
1087
  interface Marker {
package/package.json CHANGED
@@ -18,5 +18,5 @@
18
18
  "fs-extra": "^11.3.0",
19
19
  "jsonc-parser": "^3.3.1"
20
20
  },
21
- "version": "1.1.28"
21
+ "version": "1.1.29"
22
22
  }