@rtzh/gy-cesium 0.0.66 → 0.0.68
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/lib/types/Cesium.d.ts +3 -0
- package/lib/types/components/ClickDistance/index.d.ts +1 -0
- package/lib/types/components/GyCesium/index.d.ts +1 -0
- package/lib/types/components/GyCesiumHtml/index.d.ts +1 -0
- package/lib/types/components/GyCesiumLightLine/index.d.ts +1 -0
- package/lib/types/components/GyCesiumLine/index.d.ts +1 -0
- package/lib/types/components/GyCesiumModelSidebar/index.d.ts +1 -0
- package/lib/types/components/GyCesiumToolbar/index.d.ts +1 -0
- package/lib/types/components/GyCesiumWall/index.d.ts +1 -0
- package/lib/types/components/GyCesiumWater/index.d.ts +1 -0
- package/lib/types/components/ModelControls/index.d.ts +1 -0
- package/lib/types/components/RealTimePointClouds/index.d.ts +1 -0
- package/lib/types/components/SmallMap/index.d.ts +1 -0
- package/lib/types/components/TrackRoam/index.d.ts +1 -0
- package/lib/types/components/VideoShadow/index.d.ts +1 -0
- package/lib/types/components/demo/index.d.ts +1 -0
- package/lib/types/components/index.d.ts +14 -0
- package/lib/types/hooks/CesiumClass.d.ts +244 -0
- package/lib/types/hooks/CesiumFirstPerson.d.ts +95 -0
- package/lib/types/hooks/CesiumModel.d.ts +7 -0
- package/lib/types/hooks/CesiumSmallModel.d.ts +17 -0
- package/lib/types/hooks/CesiumUnit.d.ts +28 -0
- package/lib/types/hooks/Geometry/CT.d.ts +61 -0
- package/lib/types/hooks/Geometry/CesiumPrimitivePolyline.d.ts +50 -0
- package/lib/types/hooks/Geometry/CesiumWater.d.ts +37 -0
- package/lib/types/hooks/Geometry/HtmlOverlayManager.d.ts +11 -0
- package/lib/types/hooks/Geometry/LabelPanelManager.d.ts +137 -0
- package/lib/types/hooks/Geometry/ModelDragController.d.ts +43 -0
- package/lib/types/hooks/Geometry/TrackRoam.d.ts +28 -0
- package/lib/types/hooks/Geometry/VideoShed3d-old.d.ts +106 -0
- package/lib/types/hooks/Geometry/VideoShed3d.d.ts +107 -0
- package/lib/types/hooks/Geometry/WallEntityManager.d.ts +153 -0
- package/lib/types/hooks/Loader/CesiumLoader.d.ts +5 -0
- package/lib/types/hooks/Loader/GltfLoader.d.ts +169 -0
- package/lib/types/hooks/Loader/ModelMatrix.d.ts +71 -0
- package/lib/types/hooks/Loader/RealTimePointCloudsClass.d.ts +31 -0
- package/lib/types/hooks/Loader/RtzhTilesetLoader.d.ts +506 -0
- package/lib/types/hooks/Loader/TilesetLoader.d.ts +133 -0
- package/lib/types/hooks/Loader/createXrayOutline.d.ts +10 -0
- package/lib/types/hooks/Loader/xrayOutlineGpuAdapter-a.d.ts +55 -0
- package/lib/types/hooks/Loader/xrayOutlineGpuAdapter-ls.d.ts +57 -0
- package/lib/types/hooks/Loader/xrayOutlineGpuAdapter.d.ts +57 -0
- package/lib/types/hooks/Loader/xrayOutlineMask.d.ts +5 -0
- package/lib/types/hooks/Material/GridFloorMaterial.d.ts +54 -0
- package/lib/types/hooks/Material/GyMaterialPolygon.d.ts +4 -0
- package/lib/types/hooks/Material/PolylineArrowMaterialProperty.d.ts +25 -0
- package/lib/types/hooks/Material/PolylineLightingMaterialProperty.d.ts +20 -0
- package/lib/types/hooks/Material/PolylineTrialFlowMaterialProperty.d.ts +20 -0
- package/lib/types/hooks/ModelSplit.d.ts +9 -0
- package/lib/types/hooks/baseUrl.d.ts +2 -0
- package/lib/types/hooks/gyCesium.d.ts +11 -0
- package/lib/types/hooks/postProcess/GyEdgeDetectionStage.d.ts +12 -0
- package/lib/types/hooks/postProcess/WindingPoint.d.ts +25 -0
- package/lib/types/hooks/transformlat.d.ts +37 -0
- package/lib/types/index.d.ts +11 -0
- package/lib/v2/gy-cesium.cjs.js +2 -2
- package/lib/v2/gy-cesium.es.js +8950 -8304
- package/lib/v2/style.css +1 -1
- package/lib/v2.7/gy-cesium.cjs.js +2 -2
- package/lib/v2.7/gy-cesium.es.js +8621 -7964
- package/lib/v2.7/style.css +1 -1
- package/lib/v3/gy-cesium.cjs.js +5 -5
- package/lib/v3/gy-cesium.es.js +7726 -7059
- package/lib/v3/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ClickDistance } from './src/ClickDistance.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GyCesium } from './src/GyCesium.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GyCesium3DTiles } from './src/GyCesiumHtml.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GyCesiumLightLine } from './src/GyCesiumLightLine.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GyCesiumLine } from './src/GyCesiumLine.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GyCesiumModelSidebar } from './src/GyCesiumModelSidebar.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GyCesiumToolbar } from './src/GyCesiumToolbar.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GyCesiumWall } from './src/GyCesiumWall.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GyCesiumWater } from './src/GyCesiumWater.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ModelControls } from './src/ModelControls.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RealTimePointClouds } from './src/RealTimePointClouds.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SmallMap } from './src/SmallMap.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TrackRoam } from './src/TrackRoam.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as VideoShadow } from './src/VideoShadow.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GyCesium3DTiles } from './src/GyCesium3DTiles.vue';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './GyCesium';
|
|
2
|
+
export * from './ModelControls';
|
|
3
|
+
export * from './VideoShadow';
|
|
4
|
+
export * from './TrackRoam';
|
|
5
|
+
export * from './SmallMap';
|
|
6
|
+
export * from './GyCesiumHtml';
|
|
7
|
+
export * from './GyCesiumWall';
|
|
8
|
+
export * from './ClickDistance';
|
|
9
|
+
export * from './GyCesiumLine';
|
|
10
|
+
export * from './GyCesiumLightLine';
|
|
11
|
+
export * from './GyCesiumToolbar';
|
|
12
|
+
export * from './GyCesiumWater';
|
|
13
|
+
export * from './RealTimePointClouds';
|
|
14
|
+
export * from './GyCesiumModelSidebar';
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import VideoShed3d from "./Geometry/VideoShed3d";
|
|
2
|
+
import TrackRoam from "./Geometry/TrackRoam";
|
|
3
|
+
import RtzhTilesetLoader from "./Loader/RtzhTilesetLoader";
|
|
4
|
+
import GridFloorMaterial from "./Material/GridFloorMaterial";
|
|
5
|
+
import { CesiumFirstPerson } from "./CesiumFirstPerson";
|
|
6
|
+
import HtmlOverlayManager from "./Geometry/HtmlOverlayManager";
|
|
7
|
+
declare type LonlatType = 'WGS84' | 'GCJ02' | 'BD09';
|
|
8
|
+
export interface CesiumModelOption {
|
|
9
|
+
token?: string;
|
|
10
|
+
lonlatType?: LonlatType;
|
|
11
|
+
startPoint?: number[];
|
|
12
|
+
minDistance?: number;
|
|
13
|
+
maxDistance?: number;
|
|
14
|
+
extent?: null | number[];
|
|
15
|
+
beforeInit?: () => void;
|
|
16
|
+
afterInit?: () => void;
|
|
17
|
+
startSceneLoaded?: () => void;
|
|
18
|
+
sceneLoaded?: (err?: any) => void;
|
|
19
|
+
fileLoaded?: (model: any, fileName: string, opt: any) => void;
|
|
20
|
+
config?: any;
|
|
21
|
+
hideEarth?: boolean;
|
|
22
|
+
useRealCoords?: boolean;
|
|
23
|
+
changeSceneModelHide?: boolean;
|
|
24
|
+
cacheMode?: 'intersect' | 'oldScene' | 'global';
|
|
25
|
+
isSplitView?: boolean;
|
|
26
|
+
isShowFps?: boolean;
|
|
27
|
+
isModelTo2D?: boolean;
|
|
28
|
+
backgroundColor?: any;
|
|
29
|
+
baseColor?: any;
|
|
30
|
+
hasModelControls?: boolean;
|
|
31
|
+
brightness?: number;
|
|
32
|
+
msaaSamples?: number;
|
|
33
|
+
resolutionScale?: number;
|
|
34
|
+
hasShadows?: boolean;
|
|
35
|
+
orderIndependentTranslucency?: boolean;
|
|
36
|
+
useMiddleDragZoom?: boolean;
|
|
37
|
+
}
|
|
38
|
+
declare class CesiumClass {
|
|
39
|
+
options: CesiumModelOption;
|
|
40
|
+
contentId: string;
|
|
41
|
+
camera: any;
|
|
42
|
+
view: any;
|
|
43
|
+
smallView: any;
|
|
44
|
+
edgeDetectionStage: any;
|
|
45
|
+
lonlatType: LonlatType;
|
|
46
|
+
primitiveObj: any;
|
|
47
|
+
currentScence: string;
|
|
48
|
+
sceneObj: any;
|
|
49
|
+
filesObj: any;
|
|
50
|
+
afterFiles: any;
|
|
51
|
+
afterFilesIndex: number;
|
|
52
|
+
hideEarth: boolean;
|
|
53
|
+
useRealCoords: boolean;
|
|
54
|
+
changeSceneModelHide: boolean;
|
|
55
|
+
cacheMode: string;
|
|
56
|
+
isSplitView: boolean;
|
|
57
|
+
modelControlsFun: any;
|
|
58
|
+
HIDEMODELLONLAT: [number, number];
|
|
59
|
+
HIDEMODELCETNER: any;
|
|
60
|
+
TrackRomaTimeStart: any;
|
|
61
|
+
TrackRomaTimeEnd: any;
|
|
62
|
+
TrackRomaTimeList: any;
|
|
63
|
+
SmallMapOnLoadList: any;
|
|
64
|
+
smDom: Element | null;
|
|
65
|
+
hasModelControls: boolean;
|
|
66
|
+
modelControls_lsList: any;
|
|
67
|
+
edgeOutLine: any;
|
|
68
|
+
imageryLayers: any;
|
|
69
|
+
imageryLayerIndex: number;
|
|
70
|
+
oldImageryLayerIndex: number;
|
|
71
|
+
imageryLayersList: any;
|
|
72
|
+
controlsModelList: any;
|
|
73
|
+
catchModel: any;
|
|
74
|
+
windingPoint: any;
|
|
75
|
+
realTimePointCloudsObj: any;
|
|
76
|
+
downHandlerList: any;
|
|
77
|
+
_clickCallbacks: ((mode: any, feature: any) => void)[];
|
|
78
|
+
_screenSpaceEventHandler: any;
|
|
79
|
+
fp: CesiumFirstPerson | null;
|
|
80
|
+
gridFloor: GridFloorMaterial | null;
|
|
81
|
+
htmlOverlayManager: HtmlOverlayManager | null;
|
|
82
|
+
pointLights: any[];
|
|
83
|
+
MAX_POINT_LIGHTS: number;
|
|
84
|
+
private _middleDragRotateHandler;
|
|
85
|
+
private _isMiddleMouseDown;
|
|
86
|
+
private _middleLastX;
|
|
87
|
+
private _middleLastY;
|
|
88
|
+
middleDragSensitivity: number;
|
|
89
|
+
private _middleMinPitch;
|
|
90
|
+
private _middleMaxPitch;
|
|
91
|
+
constructor(contentId: string, opt?: CesiumModelOption);
|
|
92
|
+
init3DModel(): void;
|
|
93
|
+
changeModelsceneMode(isModelTo2D: boolean): void;
|
|
94
|
+
addUrlTemplateImageryProvider(url: string, providerOption?: any): Promise<unknown>;
|
|
95
|
+
addImageLayerList(url?: string | Array<string>): void;
|
|
96
|
+
changeImageLayer(index?: number): void;
|
|
97
|
+
changeImagerLayerFilter(filter: any): void;
|
|
98
|
+
splitView(): void;
|
|
99
|
+
getCameraOpt(lon: number | string, lat: number | string, height?: number | string, { heading, pitch, roll }?: {
|
|
100
|
+
heading?: number | string;
|
|
101
|
+
pitch?: number | string;
|
|
102
|
+
roll?: number | string;
|
|
103
|
+
}): any;
|
|
104
|
+
getcameraPosInfo(): any;
|
|
105
|
+
changeCamera(lon: number | string, lat: number | string, height?: number | string, { heading, pitch, isFly, roll, ...other }?: {
|
|
106
|
+
heading?: number | string;
|
|
107
|
+
pitch?: number | string;
|
|
108
|
+
isFly?: boolean;
|
|
109
|
+
roll?: number | string;
|
|
110
|
+
other?: any;
|
|
111
|
+
duration?: any;
|
|
112
|
+
}): void;
|
|
113
|
+
changeControls(): void;
|
|
114
|
+
_initMiddleDragRotateControl(): void;
|
|
115
|
+
_destroyMiddleDragRotateControl(): void;
|
|
116
|
+
addPostProcessStages(): void;
|
|
117
|
+
addFaceAlphaByDistance(NearFarScalar: any): void;
|
|
118
|
+
getFeatureProperty(feature: any): void;
|
|
119
|
+
addEvents(): void;
|
|
120
|
+
addClickEvent(clickFun: any): {
|
|
121
|
+
handler: any;
|
|
122
|
+
type: any;
|
|
123
|
+
callback: any;
|
|
124
|
+
};
|
|
125
|
+
removeClickEvent(clickFun: any): boolean;
|
|
126
|
+
addModelExtent(): void;
|
|
127
|
+
lonlatToWGS84(lon: number | string, lat: number | string): [number, number];
|
|
128
|
+
wGS84ToLonlat(lon: number | string, lat: number | string): [number, number];
|
|
129
|
+
getEntityById(id: string): any;
|
|
130
|
+
getPrimitiveById(id: string): any;
|
|
131
|
+
removeEntityById(id: string): boolean;
|
|
132
|
+
removePrimitiveById(id: string): boolean;
|
|
133
|
+
changeCameraByInfo(cameraInfo: any, opt?: any): void;
|
|
134
|
+
initSceneCamera(changeCameraTwo?: boolean, opt?: any): void;
|
|
135
|
+
initModelPos(): void;
|
|
136
|
+
addTilesetModel(url: string, opt: any): RtzhTilesetLoader;
|
|
137
|
+
addGltfModel(url: string, opt: any): any;
|
|
138
|
+
addVideoShadow(videoElement: HTMLVideoElement, opt: any): VideoShed3d;
|
|
139
|
+
addModelControlsList(model: any): void;
|
|
140
|
+
removeModelControlsList(model: any): void;
|
|
141
|
+
addTrackRoam(positions: any, opt: any): TrackRoam;
|
|
142
|
+
loadGltfModel(opt: any): Promise<unknown>;
|
|
143
|
+
loadTilesModel(opt: any): Promise<unknown>;
|
|
144
|
+
loadCatchModel(opt: any): void;
|
|
145
|
+
addSceneType(type: string, isAfter?: boolean): Promise<unknown>;
|
|
146
|
+
removeOldSceneModel(sceneName: string, oldSceneName: string): void;
|
|
147
|
+
loadScene(sceneName: string, changeCamera?: boolean, opt?: any): Promise<unknown>;
|
|
148
|
+
onSceneLoaded(sceneName: string, modelsArr?: any): void;
|
|
149
|
+
getAreaListCenter(areaList: any): any;
|
|
150
|
+
removeAllModel(removeAll?: boolean, catchModel?: Array<string>): void;
|
|
151
|
+
loadGridFloor(options?: any): GridFloorMaterial;
|
|
152
|
+
startAutoRotate(positionOrModelId: number[] | string, rAngle: number, opt?: {}): void;
|
|
153
|
+
stopAutoRotate(): void;
|
|
154
|
+
cartesianToLonlat(cartesian: any): any[];
|
|
155
|
+
cartesianToPointByTileset(id: string, cartesian: any): any;
|
|
156
|
+
pointToCartesianByTileset(id: string, point: any): any;
|
|
157
|
+
cartesianToPointByPointClouds(cloudId: string, cartesian: any): any;
|
|
158
|
+
pointToCartesianByPointClouds(cloudId: string, point: any): any;
|
|
159
|
+
getPointCloudsModelMatrix(cloudId: string): any;
|
|
160
|
+
getPointCloudsModelMatrixZero(cloudId: string): any;
|
|
161
|
+
getCartesian3ByPoint(point: any): any;
|
|
162
|
+
computedNewPoint(point: any, matrix: any): any;
|
|
163
|
+
addRealTimePointClouds(foundationModelOpt: any, cloudId: string, addPointsFun: any, opt?: any): Promise<unknown>;
|
|
164
|
+
removeRealTimePointClouds(cloudId: string, isRemove?: boolean): void;
|
|
165
|
+
hasPointClouds(id: string): any;
|
|
166
|
+
/**
|
|
167
|
+
* 创建指南针
|
|
168
|
+
* @param containerId 指南针容器ID(可选,默认创建在viewer容器内)
|
|
169
|
+
* @param options 配置选项
|
|
170
|
+
*/
|
|
171
|
+
createCompass(containerId?: string, options?: any): {
|
|
172
|
+
container: HTMLDivElement;
|
|
173
|
+
update: () => void;
|
|
174
|
+
destroy: () => void;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* 移除指南针
|
|
178
|
+
* @param compassObj createCompass返回的对象
|
|
179
|
+
*/
|
|
180
|
+
removeCompass(compassObj: any): void;
|
|
181
|
+
ceshi(): void;
|
|
182
|
+
initFirstPersion(options: {
|
|
183
|
+
mouseSensitivity?: number;
|
|
184
|
+
moveSpeed?: number;
|
|
185
|
+
flySpeed?: number;
|
|
186
|
+
eyeHeight?: number;
|
|
187
|
+
rotateRatio?: number;
|
|
188
|
+
}): void;
|
|
189
|
+
enterFirstPersion(options: {
|
|
190
|
+
lon: number;
|
|
191
|
+
lat: number;
|
|
192
|
+
height?: number;
|
|
193
|
+
heading?: number;
|
|
194
|
+
pitch?: number;
|
|
195
|
+
roll?: number;
|
|
196
|
+
}): void;
|
|
197
|
+
setFirstPersionPosition(options: {
|
|
198
|
+
lon: number;
|
|
199
|
+
lat: number;
|
|
200
|
+
height: number;
|
|
201
|
+
heading?: number;
|
|
202
|
+
pitch?: number;
|
|
203
|
+
roll?: number;
|
|
204
|
+
}): void;
|
|
205
|
+
moveFirstPersion(options: {
|
|
206
|
+
lon: number;
|
|
207
|
+
lat: number;
|
|
208
|
+
height?: number;
|
|
209
|
+
heading?: number;
|
|
210
|
+
pitch?: number;
|
|
211
|
+
roll?: number;
|
|
212
|
+
duration?: number;
|
|
213
|
+
}): Promise<void> | Promise<boolean>;
|
|
214
|
+
moveFirstPersionByArr(arr: {
|
|
215
|
+
lon: number;
|
|
216
|
+
lat: number;
|
|
217
|
+
height?: number;
|
|
218
|
+
heading?: number;
|
|
219
|
+
pitch?: number;
|
|
220
|
+
roll?: number;
|
|
221
|
+
duration?: number;
|
|
222
|
+
isFly?: boolean;
|
|
223
|
+
}[], callback?: (item: any) => void): Promise<boolean>;
|
|
224
|
+
exitFirstPersion(): void;
|
|
225
|
+
addPointLight(options: {
|
|
226
|
+
lon: number;
|
|
227
|
+
lat: number;
|
|
228
|
+
height?: number;
|
|
229
|
+
color?: string;
|
|
230
|
+
intensity?: number;
|
|
231
|
+
}): any;
|
|
232
|
+
updatePointLight(index: number, options: {
|
|
233
|
+
lon?: number;
|
|
234
|
+
lat?: number;
|
|
235
|
+
height?: number;
|
|
236
|
+
color?: string;
|
|
237
|
+
intensity?: number;
|
|
238
|
+
}): void;
|
|
239
|
+
removePointLight(index: number): void;
|
|
240
|
+
clearPointLights(): void;
|
|
241
|
+
destroyPointLights(): void;
|
|
242
|
+
destroy(): void;
|
|
243
|
+
}
|
|
244
|
+
export default CesiumClass;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import Cesium from "../Cesium";
|
|
2
|
+
export declare class CesiumFirstPerson {
|
|
3
|
+
private viewer;
|
|
4
|
+
private isFPVActive;
|
|
5
|
+
private isFlying;
|
|
6
|
+
private originalView;
|
|
7
|
+
private originalControls;
|
|
8
|
+
private keys;
|
|
9
|
+
private keyDownListener?;
|
|
10
|
+
private keyUpListener?;
|
|
11
|
+
private moveListener?;
|
|
12
|
+
private mouseHandler;
|
|
13
|
+
private isRightMouseDown;
|
|
14
|
+
private lastMouseX;
|
|
15
|
+
private lastMouseY;
|
|
16
|
+
private flyAnimationFrame;
|
|
17
|
+
mouseSensitivity: number;
|
|
18
|
+
moveSpeed: number;
|
|
19
|
+
flySpeed: number;
|
|
20
|
+
eyeHeight: number;
|
|
21
|
+
rotateRatio: number;
|
|
22
|
+
private maxPitch;
|
|
23
|
+
private minPitch;
|
|
24
|
+
private pauseSnapshot;
|
|
25
|
+
private activePathCallback?;
|
|
26
|
+
constructor(viewer: Cesium.Viewer, options?: {
|
|
27
|
+
mouseSensitivity?: number;
|
|
28
|
+
moveSpeed?: number;
|
|
29
|
+
flySpeed?: number;
|
|
30
|
+
eyeHeight?: number;
|
|
31
|
+
rotateRatio?: number;
|
|
32
|
+
});
|
|
33
|
+
enter(options: {
|
|
34
|
+
lon: number;
|
|
35
|
+
lat: number;
|
|
36
|
+
height?: number;
|
|
37
|
+
heading?: number;
|
|
38
|
+
pitch?: number;
|
|
39
|
+
roll?: number;
|
|
40
|
+
}): void;
|
|
41
|
+
exit(): void;
|
|
42
|
+
setPosition(options: {
|
|
43
|
+
lon: number;
|
|
44
|
+
lat: number;
|
|
45
|
+
height: number;
|
|
46
|
+
heading?: number;
|
|
47
|
+
pitch?: number;
|
|
48
|
+
roll?: number;
|
|
49
|
+
}): void;
|
|
50
|
+
isActive(): boolean;
|
|
51
|
+
private startWASD;
|
|
52
|
+
private stopWASD;
|
|
53
|
+
private startRightMouseControl;
|
|
54
|
+
private stopRightMouseControl;
|
|
55
|
+
private pathPoints;
|
|
56
|
+
private currentPathIndex;
|
|
57
|
+
private isPathPaused;
|
|
58
|
+
private isPathExecuting;
|
|
59
|
+
private pathFinishedResolve;
|
|
60
|
+
private currentFlyReject;
|
|
61
|
+
flyToPosition(options: {
|
|
62
|
+
lon: number;
|
|
63
|
+
lat: number;
|
|
64
|
+
height?: number;
|
|
65
|
+
heading?: number;
|
|
66
|
+
pitch?: number;
|
|
67
|
+
roll?: number;
|
|
68
|
+
isLeft?: boolean;
|
|
69
|
+
rotateRatio?: number;
|
|
70
|
+
}): Promise<void>;
|
|
71
|
+
stopFly(): void;
|
|
72
|
+
moveFirstPersionByArr(arr: {
|
|
73
|
+
lon: number;
|
|
74
|
+
lat: number;
|
|
75
|
+
height?: number;
|
|
76
|
+
heading?: number;
|
|
77
|
+
pitch?: number;
|
|
78
|
+
roll?: number;
|
|
79
|
+
duration?: number;
|
|
80
|
+
isFly?: boolean;
|
|
81
|
+
}[], callback?: (idx: number) => void): Promise<boolean>;
|
|
82
|
+
/**
|
|
83
|
+
* 暂停路径飞行:记录当前相机状态快照
|
|
84
|
+
*/
|
|
85
|
+
pausePath(): void;
|
|
86
|
+
/**
|
|
87
|
+
* 继续路径飞行:先还原暂停时姿态,再继续执行路径(传入缓存的callback)
|
|
88
|
+
*/
|
|
89
|
+
resumePath(): void;
|
|
90
|
+
/**
|
|
91
|
+
* 终止整个路径序列
|
|
92
|
+
*/
|
|
93
|
+
stopPath(): void;
|
|
94
|
+
private runNextPathSegment;
|
|
95
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import CesiumClass from "./CesiumClass";
|
|
2
|
+
import type { CesiumModelOption } from "./CesiumClass";
|
|
3
|
+
import type { ModelObjType } from './gyCesium';
|
|
4
|
+
declare class CesiumSmallModel extends CesiumClass {
|
|
5
|
+
parentId: string;
|
|
6
|
+
parentModel: ModelObjType;
|
|
7
|
+
parentView: any;
|
|
8
|
+
private syncListener;
|
|
9
|
+
private lastSyncHeight;
|
|
10
|
+
private lastSyncPosition;
|
|
11
|
+
constructor(contentId: string, opt?: CesiumModelOption);
|
|
12
|
+
init3DModel(): void;
|
|
13
|
+
setSmallMapClock(): void;
|
|
14
|
+
runSmallMapOnLoadList(): void;
|
|
15
|
+
sync2DView(): void;
|
|
16
|
+
}
|
|
17
|
+
export default CesiumSmallModel;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface PointObj {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const toRadians: (num: number) => number;
|
|
6
|
+
export declare const lonlatToPosition: (lon: number, lat: number, height?: number) => any;
|
|
7
|
+
export declare const getColorByCssColor: (color: string) => Cesium.Color;
|
|
8
|
+
export declare const getModelId: () => string;
|
|
9
|
+
export declare const formatLintPosition: (positionList: number[][], length?: number) => number[][];
|
|
10
|
+
export declare const flortSub: (num1: number, num2: number) => number;
|
|
11
|
+
export declare const flortAdd: (num1: number, num2: number) => number;
|
|
12
|
+
export declare const flortMul: (num1: number, num2: number) => number;
|
|
13
|
+
export declare const flortDiv: (arg1: number, arg2: number) => number;
|
|
14
|
+
/**
|
|
15
|
+
* 判断坐标数组是否顺时针(默认为false)
|
|
16
|
+
* @param {Point[]} points 点坐标数组 [{x:0,y:0}...]
|
|
17
|
+
* @returns {boolean} 是否顺时针
|
|
18
|
+
*/
|
|
19
|
+
export declare const isClockwise: (points: PointObj[]) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 缩放多边形坐标
|
|
22
|
+
* @param {Point[]} points 点坐标数组 [{x:0,y:0}...]
|
|
23
|
+
* @param {number} extra 为正:放大; 为负: 缩小
|
|
24
|
+
*/
|
|
25
|
+
export declare const scalePolygon: (points: PointObj[], extra: number) => PointObj[];
|
|
26
|
+
export declare function getCachedIblUrl(url: string): Promise<string>;
|
|
27
|
+
export declare const getModelMatrixByOptions: (position: any, options: any) => any;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
interface LonLat {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
interface LLA {
|
|
6
|
+
longitude: number;
|
|
7
|
+
latitude: number;
|
|
8
|
+
altitude: number;
|
|
9
|
+
}
|
|
10
|
+
interface XYZ {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
z: number;
|
|
14
|
+
}
|
|
15
|
+
interface ENUOffset {
|
|
16
|
+
distance: number;
|
|
17
|
+
azimuth: number;
|
|
18
|
+
elevation: number;
|
|
19
|
+
roll?: number;
|
|
20
|
+
}
|
|
21
|
+
interface RotationMatrix {
|
|
22
|
+
m00: number;
|
|
23
|
+
m01: number;
|
|
24
|
+
m02: number;
|
|
25
|
+
m10: number;
|
|
26
|
+
m11: number;
|
|
27
|
+
m12: number;
|
|
28
|
+
m20: number;
|
|
29
|
+
m21: number;
|
|
30
|
+
m22: number;
|
|
31
|
+
}
|
|
32
|
+
interface CalculateResult {
|
|
33
|
+
lng: number;
|
|
34
|
+
lat: number;
|
|
35
|
+
height: number;
|
|
36
|
+
}
|
|
37
|
+
declare class CT {
|
|
38
|
+
PI: number;
|
|
39
|
+
a: number;
|
|
40
|
+
b: number;
|
|
41
|
+
f: number;
|
|
42
|
+
e_sq: number;
|
|
43
|
+
ee: number;
|
|
44
|
+
WGSF: number;
|
|
45
|
+
WGSe2: number;
|
|
46
|
+
WGSa: number;
|
|
47
|
+
EPSILON: number;
|
|
48
|
+
M_PI: number;
|
|
49
|
+
constructor();
|
|
50
|
+
CalculateCoordinates(coord: LonLat, direction: number, angle: number, distance: number): CalculateResult;
|
|
51
|
+
lonLat2WebMercator(lonLat: LonLat): LonLat;
|
|
52
|
+
webMercator2LonLat(mercator: LonLat): LonLat;
|
|
53
|
+
get_atan(x: number, y: number): number;
|
|
54
|
+
ConvertLLAToXYZ(lla: LLA): XYZ;
|
|
55
|
+
ConvertXYZToLLA(xyz: XYZ): LLA;
|
|
56
|
+
enu_to_ecef(origin: LLA, offset: ENUOffset): LLA;
|
|
57
|
+
multiplyMatrix(A: RotationMatrix, B: RotationMatrix): RotationMatrix;
|
|
58
|
+
enu_to_ecef_with_orientation(origin: LLA, offset: ENUOffset, rotation?: Partial<RotationMatrix>): LLA;
|
|
59
|
+
radians(degrees: number): number;
|
|
60
|
+
}
|
|
61
|
+
export default CT;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import Cesium from "../../Cesium";
|
|
2
|
+
export declare type LinePolylineOpts = {
|
|
3
|
+
positions: number[][];
|
|
4
|
+
lineWidth?: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
textureUrl?: string;
|
|
7
|
+
arrowImg?: string;
|
|
8
|
+
count?: number;
|
|
9
|
+
duration?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
enableDepthTest?: boolean;
|
|
12
|
+
isSolidImage?: boolean;
|
|
13
|
+
/** 是否启用 3D 立体管道模式 */
|
|
14
|
+
is3D?: boolean;
|
|
15
|
+
/** 3D 管道横截面正多边形边数,越大越圆(默认 16) */
|
|
16
|
+
shapeSides?: number;
|
|
17
|
+
/** 唯一标识,会挂载到 primitive 对象上,用于判断归属 */
|
|
18
|
+
lineId?: string | number;
|
|
19
|
+
};
|
|
20
|
+
export declare class CesiumPrimitivePolyline {
|
|
21
|
+
private viewer;
|
|
22
|
+
private primitive;
|
|
23
|
+
private matProp;
|
|
24
|
+
private material;
|
|
25
|
+
private removePreRender;
|
|
26
|
+
private isDestroyed;
|
|
27
|
+
readonly lineId?: string | number;
|
|
28
|
+
private opts;
|
|
29
|
+
constructor(viewer: Cesium.Viewer, opts: LinePolylineOpts);
|
|
30
|
+
private lngLatToCartesian;
|
|
31
|
+
private modifyGeometryST;
|
|
32
|
+
private modifyVolumeST;
|
|
33
|
+
private get isOpaque();
|
|
34
|
+
private createRenderState;
|
|
35
|
+
private buildMaterialProperty;
|
|
36
|
+
private cssToCesiumColor;
|
|
37
|
+
private buildCircleShape;
|
|
38
|
+
private create3DVolume;
|
|
39
|
+
private create2DPolyline;
|
|
40
|
+
create(): void;
|
|
41
|
+
setPositions(lngLatList: number[][]): void;
|
|
42
|
+
setLineWidth(w: number): void;
|
|
43
|
+
setColor(colorStr: string): void;
|
|
44
|
+
setTextureUrl(url: string): void;
|
|
45
|
+
setCount(n: number): void;
|
|
46
|
+
setDuration(ms: number): void;
|
|
47
|
+
setDepthTest(enable: boolean): void;
|
|
48
|
+
setShapeSides(s: number): void;
|
|
49
|
+
destroy(): void;
|
|
50
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare class CesiumWater {
|
|
2
|
+
viewer: any;
|
|
3
|
+
style: any;
|
|
4
|
+
positions: number[][];
|
|
5
|
+
image: any;
|
|
6
|
+
flipY: any;
|
|
7
|
+
width: any;
|
|
8
|
+
height: any;
|
|
9
|
+
alpha: any;
|
|
10
|
+
speed: any;
|
|
11
|
+
move: any;
|
|
12
|
+
moveDir: any;
|
|
13
|
+
moveVar: any;
|
|
14
|
+
sideRes: any;
|
|
15
|
+
material: any;
|
|
16
|
+
riverPrimitive: any;
|
|
17
|
+
constructor(viewer: any, positions: number[][], style: any);
|
|
18
|
+
resetPos(): void;
|
|
19
|
+
prepareMaterial(): any;
|
|
20
|
+
Lines2Plane(positions: number[][], width: number, height: number): {
|
|
21
|
+
left: any;
|
|
22
|
+
right: any;
|
|
23
|
+
self: number[][];
|
|
24
|
+
vertexsH: Float32Array;
|
|
25
|
+
vertexsL: Float32Array;
|
|
26
|
+
uvs: Float32Array;
|
|
27
|
+
vertexs: Float32Array;
|
|
28
|
+
indexs: Uint16Array;
|
|
29
|
+
};
|
|
30
|
+
RaisePoint(pos: any, hei: number): any;
|
|
31
|
+
GetSides(pos: any, pos1: any, w: number): {
|
|
32
|
+
left: any;
|
|
33
|
+
right: any;
|
|
34
|
+
};
|
|
35
|
+
createPrimitive(): any;
|
|
36
|
+
}
|
|
37
|
+
export default CesiumWater;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default class HtmlOverlayManager {
|
|
2
|
+
private _view;
|
|
3
|
+
private _updaters;
|
|
4
|
+
private _isStarted;
|
|
5
|
+
constructor(view: any);
|
|
6
|
+
register(id: string, updateFn: () => void): void;
|
|
7
|
+
unregister(id: string): void;
|
|
8
|
+
private start;
|
|
9
|
+
private stop;
|
|
10
|
+
private updateAll;
|
|
11
|
+
}
|