@poor-knight/cesium-utils 0.2.0 → 0.3.1

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.
@@ -12,6 +12,12 @@ import { Viewer } from 'cesium';
12
12
  import { WebMapServiceImageryProvider } from 'cesium';
13
13
  import { WebMapTileServiceImageryProvider } from 'cesium';
14
14
 
15
+ declare type Cartesian3Like = Cesium.Cartesian3 | {
16
+ x: number;
17
+ y: number;
18
+ z: number;
19
+ };
20
+
15
21
  /**创建天地图图层 */
16
22
  export declare function createTdtProvider(key: 'img' | 'vec' | 'cia' | 'cva', opt: {
17
23
  token: string;
@@ -22,6 +28,15 @@ export declare function createTdtTerrain(opt: {
22
28
  token: string;
23
29
  }): TerrainProvider;
24
30
 
31
+ /**根据视角参数,调整摄像头 */
32
+ export declare function flyToCameraParams(viewer: Cesium.Viewer, params: {
33
+ position: Cartesian3Like;
34
+ direction: Cartesian3Like;
35
+ up: Cartesian3Like;
36
+ right: Cartesian3Like;
37
+ transform: Matrix4Like;
38
+ }, duration?: number): void;
39
+
25
40
  /**图层 */
26
41
  export declare interface Layer {
27
42
  key: string;
@@ -30,6 +45,13 @@ export declare interface Layer {
30
45
  hide(viewer: Viewer): void;
31
46
  }
32
47
 
48
+ /**获取左键点击事件监听器,基于viewer唯一 */
49
+ export declare function ListenLeftClick(viewer: Cesium.Viewer): default_2<{
50
+ click: (payload: Cesium.ScreenSpaceEventHandler.PositionedEvent) => void;
51
+ }, any>;
52
+
53
+ declare type Matrix4Like = Cesium.Matrix4 | Record<string, number> | number[];
54
+
33
55
  /** 弹窗控制器 */
34
56
  export declare class PopupCtrl extends default_2<{
35
57
  onMount: (id: string | number) => void;
@@ -53,6 +75,15 @@ export declare class PopupCtrl extends default_2<{
53
75
  closeAll(): void;
54
76
  }
55
77
 
78
+ /**保持当前的视角参数到对象 */
79
+ export declare function saveCameraParams(viewer: Cesium.Viewer): {
80
+ position: Cesium.Cartesian3;
81
+ direction: Cesium.Cartesian3;
82
+ up: Cesium.Cartesian3;
83
+ right: Cesium.Cartesian3;
84
+ transform: Cesium.Matrix4;
85
+ };
86
+
56
87
  /**船只图层 */
57
88
  export declare class ShipLayer implements Layer {
58
89
  key: string;
@@ -72,6 +103,7 @@ export declare class ShipLayer implements Layer {
72
103
  update(feature: Feature<Point>): void;
73
104
  private readonly IS_MOVING_THRESHOLD;
74
105
  private renderEntity;
106
+ private createShipPlane;
75
107
  }
76
108
 
77
109
  export declare class WmsLayer implements Layer {