-
Notifications
You must be signed in to change notification settings - Fork 5
/
types.d.ts
48 lines (41 loc) · 1.45 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
declare module '@cesium/engine' {
export class ShaderSource {
sources: string[]
defines: string[]
constructor(options: { sources: string[]; defines: string[] })
}
// Cesium's type definition is wrong. The parameter type of raiseEvent()
// should be (...args: Parameter<Listener>) instead of
// (...args: Parameter<Listener>[]).
// This cannot be fixed by augmentation but by overloading.
export interface Event<
Listener extends (...args: any[]) => void = (...args: any[]) => void
> {
// eslint-disable-next-line @typescript-eslint/method-signature-style
raiseEvent(...arguments: Parameters<Listener>): void
}
// https://github.com/CesiumGS/cesium/blob/1.105/packages/engine/Source/Core/EllipsoidalOccluder.js
export class EllipsoidalOccluder {
constructor(ellipsoid: Ellipsoid, cameraPosition: Cartesian3)
readonly ellipsoid: Ellipsoid
cameraPosition: Cartesian3
position: Cartesian3
isPointVisible: (occludee: Cartesian3) => boolean
}
}
declare module '@cesium/engine/Source/Scene/Cesium3DTilePass' {
enum Cesium3DTilePass {
PICK
}
export default Cesium3DTilePass
}
declare module '@cesium/engine/Source/Scene/Cesium3DTilePassState' {
export default class Cesium3DTilePassState {
viewport: BoundingRectangle
constructor(arg: { pass: Cesium3DTilePass })
}
}
declare module '@cesium/engine/Source/Renderer/DrawCommand' {
const DrawCommand: () => void
export default DrawCommand
}