cesium-alpha-earth 1.0.3 → 1.0.4
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/dist/types/core/CesiumAlphaViewer/index.d.ts +7 -0
- package/dist/types/core/CesiumAlphaViewer/method/createViewer.d.ts +3 -0
- package/dist/types/core/CesiumAlphaViewer/method/goTo.d.ts +3 -0
- package/dist/types/core/CesiumAlphaViewer/type.d.ts +77 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +2 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Viewer } from "cesium";
|
|
2
|
+
import { ViewerOption, FlyToOptionType, FlyToTargetType } from "./type";
|
|
3
|
+
export default class CesiumAlphaViewer {
|
|
4
|
+
viewer: Viewer;
|
|
5
|
+
constructor(container: string | HTMLElement, option?: ViewerOption);
|
|
6
|
+
goTo(target: FlyToTargetType, flyToOption?: FlyToOptionType): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Cesium3DTileset, SceneMode, GeocoderService, ProviderViewModel, UrlTemplateImageryProvider, Resource, Cartesian3, BoundingSphere } from "cesium";
|
|
2
|
+
/**
|
|
3
|
+
* 图层类型
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 地形类型
|
|
7
|
+
*/
|
|
8
|
+
export type ViewerOption = {
|
|
9
|
+
control?: ControlOption;
|
|
10
|
+
scene?: SceneOption;
|
|
11
|
+
basemap?: BasemapOption;
|
|
12
|
+
terrain?: TerrainOption;
|
|
13
|
+
};
|
|
14
|
+
export type SceneOption = {
|
|
15
|
+
center?: {
|
|
16
|
+
lng: number;
|
|
17
|
+
lat: number;
|
|
18
|
+
alt: number;
|
|
19
|
+
heading?: number;
|
|
20
|
+
pitch?: number;
|
|
21
|
+
roll?: number;
|
|
22
|
+
};
|
|
23
|
+
showSkyBox?: boolean;
|
|
24
|
+
skyBoxSource?: any;
|
|
25
|
+
showSun?: boolean;
|
|
26
|
+
ionToken?: string;
|
|
27
|
+
sceneMode?: SceneMode;
|
|
28
|
+
};
|
|
29
|
+
export type ControlOption = {
|
|
30
|
+
homeButton?: boolean | any;
|
|
31
|
+
zoom?: any;
|
|
32
|
+
sceneModePicker?: boolean | any;
|
|
33
|
+
projectionPicker?: boolean | any;
|
|
34
|
+
fullscreenButton?: boolean | any;
|
|
35
|
+
fullscreenElement?: HTMLElement | string | any;
|
|
36
|
+
vrButton?: boolean | any;
|
|
37
|
+
geocoder?: boolean | GeocoderService[] | any;
|
|
38
|
+
navigationHelpButton?: boolean | any;
|
|
39
|
+
navigationInstructionsInitiallyVisible?: boolean | any;
|
|
40
|
+
baseLayerPicker?: boolean | any;
|
|
41
|
+
imageryProviderViewModels?: ProviderViewModel[];
|
|
42
|
+
selectedImageryProviderViewModel?: ProviderViewModel;
|
|
43
|
+
terrainProviderViewModels?: ProviderViewModel[];
|
|
44
|
+
selectedTerrainProviderViewModel?: ProviderViewModel;
|
|
45
|
+
compass?: any;
|
|
46
|
+
showPopup?: boolean;
|
|
47
|
+
animation?: boolean;
|
|
48
|
+
timeline?: boolean;
|
|
49
|
+
infoBox?: boolean;
|
|
50
|
+
selectionIndicator?: boolean;
|
|
51
|
+
showRenderLoopErrors?: boolean;
|
|
52
|
+
};
|
|
53
|
+
export type BasemapOption = {
|
|
54
|
+
other?: UrlTemplateImageryProvider.ConstructorOptions;
|
|
55
|
+
};
|
|
56
|
+
export type TerrainOption = {
|
|
57
|
+
url?: string | Resource;
|
|
58
|
+
show?: boolean;
|
|
59
|
+
requestVertexNormals?: boolean;
|
|
60
|
+
requestWaterMask?: boolean;
|
|
61
|
+
requestMetadata?: boolean;
|
|
62
|
+
clip?: boolean;
|
|
63
|
+
flat?: boolean;
|
|
64
|
+
uplift?: boolean;
|
|
65
|
+
flood?: boolean;
|
|
66
|
+
};
|
|
67
|
+
export type FlyToOptionType = {
|
|
68
|
+
distence?: number;
|
|
69
|
+
roll?: number;
|
|
70
|
+
pitch?: number;
|
|
71
|
+
heading?: number;
|
|
72
|
+
};
|
|
73
|
+
export type FlyToTargetType = Cartesian3 | BoundingSphere | Cesium3DTileset | {
|
|
74
|
+
longitude: number;
|
|
75
|
+
latitude: number;
|
|
76
|
+
height?: number;
|
|
77
|
+
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cesium-alpha-earth",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*"
|
|
7
7
|
],
|
|
8
|
+
"types": "dist/types/index.d.ts",
|
|
8
9
|
"scripts": {
|
|
9
10
|
"dev": "node --max_old_space_size=102400 node_modules/vite/bin/vite.js --host",
|
|
10
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|