aircitytype 1.1.6 → 1.1.9

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.
@@ -494,10 +494,13 @@ type CustomObjectType = {
494
494
  coordinateType?: number;
495
495
  location?: number[]; //位置坐标
496
496
  rotation?: [number, number, number]; //旋转
497
+ isEffectRotation?:boolean;
498
+ supportAttach?:boolean;
497
499
  localRotation?: [number, number, number];
498
500
  scale?: [number, number, number] | number[]; //缩放
499
501
  smoothMotion?: number; //1: 平滑插值,0: 跳跃
500
502
  UserData?: string; //
503
+ visible?:boolean;
501
504
  };
502
505
 
503
506
  interface CustomObjectBPParam {
@@ -583,6 +586,7 @@ type marker3dType = {
583
586
  textLocation?: number[]; // 文字位置
584
587
  textRotation?: number[]; // 文字旋转
585
588
  textScale?: number[]; // 文字缩放
589
+ fixedSize?:boolean;
586
590
  pointName?: string; //3D标注展示的特效名称
587
591
  pointVisible?: boolean; //3D标注是否显示
588
592
  pointScale?: number; //3D标注整体缩放比例
@@ -668,6 +672,20 @@ interface TileLayerType {
668
672
  scale: [number, number, number] | number[];
669
673
  }
670
674
 
675
+ interface VehicleData{
676
+ id :string //Vehicle对象的ID
677
+ groupId?:string //可选,Group分组
678
+ userData?:string //可选,用户自定义数据
679
+ assetPath:string //资源库车辆载具路径,类似CustomObject对象的assetPath,示例值:'/JC_CustomAssets/VehicleLibrary/Exhibition/SUV_01'
680
+ coordinate:number[] //载具初始位置坐标:[X,Y,Z],取值示例,数组元素类型:(number),取值范围:[任意数值]
681
+ coordinateType?:number //可选,坐标系类型,取值:0为Projection类型,1为WGS84类型,默认值:0
682
+ autoHeight?:boolean //可选,是否自动计算载具行驶高度,默认值:true,注意:当设置为false时会使用载具坐标的高度Z
683
+ rotation?:number[] //可选,载具旋转,世界坐标系旋转:[Pitch,Yaw,Roll],数组元素类型:(number),取值范围:[任意数值],默认值:[0,0,0]
684
+ colorType?:number //可选,载具涂装颜色类型,取值范围:[0~任意正整数],默认值:0 随机使用涂装颜色,大于0则使用其他固定的涂装颜色。
685
+ localOffset?:number[] //可选,载具基于原始位置坐标的偏移量,默认值:[0,0,0]
686
+ supportAttach :boolean //是否支持贴画贴合,默认值:true
687
+ }
688
+
671
689
  interface Marker {
672
690
  clear(): void;
673
691
  add(p: markType | markType[]): Promise<null>;
@@ -691,6 +709,7 @@ interface Marker {
691
709
  interface Marker3D {
692
710
  clear(): void;
693
711
  add(p: marker3dType | marker3dType[]): Promise<null>;
712
+ update(p: marker3dType | marker3dType[]): Promise<null>;
694
713
  /**
695
714
  * o1 distance
696
715
  * o2 flytime
@@ -703,8 +722,43 @@ interface Marker3D {
703
722
  hideByGroupId(id: string): void;
704
723
  }
705
724
 
725
+ /**
726
+ *
727
+ */
728
+ type VehicleBatch = {
729
+ id:string // Vehicle对象的ID
730
+ functionName:string // 蓝图函数名
731
+ parameters:{"paramType":string,"paramValue":string|number}[] //蓝图函数包含的多个参数结构,可选参数,数组类型,注意:传入多参数的顺序与类型务必与蓝图函数的参数顺序及其参数类型一致以保证执行结果符合预期。多个参数结构示例:[{"paramType":BPFuncParamType.String,"paramValue":"示例值"},{"paramType":BPFuncParamType.Bool,"paramValue":false},{"paramType":BPFuncParamType.Float,"paramValue":100.8}]
732
+ }
733
+
706
734
  interface Vehicle {
707
735
  delete(id: string): void;
736
+ add(data:VehicleData|VehicleData[], fn?:()=>void):void;
737
+ callBatchFunction(data:VehicleBatch|VehicleBatch[], fn?:()=>void):void;
738
+ clear(fn?:()=>void):void;
739
+ delete(ids:string|string[], fn?:()=>void):void;
740
+ focus(ids:string|string[], followEnable?:boolean, distance?:number, flyTime?:number, rotation?:number[], distanceRotation?:number[], fn?:()=>void):void;
741
+ get(ids:string|string[], fn?:()=>void):void;
742
+ hide(ids:string|string[], fn?:()=>void):void;
743
+ moveTo(data, fn?:()=>void):void;
744
+ pause(ids:string|string[], fn?:()=>void):void;
745
+ resume(id:string, fn?:()=>void):void;
746
+ setWayPoint(data, fn?:()=>void):void;
747
+ show(ids:string|string[], fn?:()=>void):void;
748
+ /**
749
+ *
750
+ * @param data [
751
+ {"id":"vc1","timeStamp":1},
752
+ {"id":"vc2","timeStamp":5},
753
+ {"id":"vc3","timeStamp":7}
754
+ ]
755
+ * @param fn
756
+ */
757
+ start(data:{"id":string,"timeStamp":number}[], fn?:()=>void):void; //以下参数表示三辆载具开始运动,v1第一秒开始运动,v2第五秒开始运动,v3第七秒开始运动
758
+ stop(ids:string|string[], fn?:()=>void):void;
759
+ update(data:VehicleData|VehicleData[], fn?:()=>void):void;
760
+ updateBegin():void;
761
+ updateEnd(fn?:()=>void):void;
708
762
  }
709
763
 
710
764
  interface EditHelper {
@@ -739,7 +793,7 @@ interface EditHelper {
739
793
  start(fn?: () => void): void;
740
794
  }
741
795
 
742
- declare class fdapi {
796
+ declare class FDAPITYPE {
743
797
  tag: any;
744
798
  coord: any;
745
799
  constructor(a: any, b: any, c: any);
@@ -861,7 +915,8 @@ type EchartTool = {
861
915
 
862
916
  declare var HostConfig: HOSTINFO;
863
917
  declare var offline: boolean;
864
- declare var __g: fdapi;
918
+ declare var __g: FDAPITYPE;
919
+ declare var fdapi: FDAPITYPE;
865
920
  declare var __player: { resize: () => void };
866
921
  declare var tools: EchartTool;
867
922
  declare var projectROOT: string;
package/main.js CHANGED
@@ -73,8 +73,6 @@ function parseJsonFile(filePath, callback) {
73
73
  return;
74
74
  }
75
75
 
76
- console.log(data);
77
-
78
76
  let jsonData;
79
77
  try {
80
78
  jsonData = parse(data);
@@ -83,8 +81,6 @@ function parseJsonFile(filePath, callback) {
83
81
  return;
84
82
  }
85
83
 
86
- console.log(`解析的配置文件内容:`, jsonData);
87
-
88
84
  // 检查和修改配置
89
85
  modifyCompilerOptions(jsonData);
90
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aircitytype",
3
- "description": "增加了types中aircity的检测",
3
+ "description": "marker3d更新方法",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 1"
6
6
  },
@@ -14,8 +14,8 @@
14
14
  "bin": {
15
15
  "installdts": "./main.js"
16
16
  },
17
- "version": "1.1.6",
18
17
  "dependencies": {
19
18
  "jsonc-parser": "^3.3.1"
20
- }
19
+ },
20
+ "version": "1.1.9"
21
21
  }