This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
forked from Harmoware/Harmoware-VIS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deck.gl.d.ts
76 lines (59 loc) · 2.4 KB
/
deck.gl.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
declare module "deck.gl" {
import * as React from 'react';
import DeckGL from '@deck.gl/react';
import { Layer } from '@deck.gl/core';
import { CompositeLayer, ScatterplotLayer, GridCellLayer, LineLayer,
HexagonLayer, ArcLayer, PolygonLayer, AttributeManager } from '@deck.gl/layers';
import { vec3 } from 'gl-matrix';
import { number } from 'prop-types';
interface Uniforms {
extruded: boolean,
opacity: number,
coverage: number
}
interface LayerProps {
id?: string;
data?: any[];
visible?: boolean;
pickable?: boolean;
opacity?: number;
onHover?: (event: React.MouseEvent<HTMLButtonElement>) => void;
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
coordinateSystem?: number;
}
export default class DeckGL extends React.Component<any> {}
class CompositeLayer<P extends LayerProps = LayerProps, S = {}> extends Layer<P, S> {}
class ScatterplotLayer<P extends LayerProps = LayerProps, S = {}> extends Layer<P, S> {}
class GridCellLayer<P extends LayerProps = LayerProps, S = {}> extends Layer<P, S> {}
class LineLayer<P extends LayerProps = LayerProps, S = {}> extends Layer<P, S> {}
class HexagonLayer<P extends LayerProps = LayerProps, S = {}> extends Layer<P, S> {}
class ArcLayer<P extends LayerProps = LayerProps, S = {}> extends Layer<P, S> {}
class ScenegraphLayer<P extends LayerProps = LayerProps, S = {}> extends Layer<P, S> {}
class SimpleMeshLayer<P extends LayerProps = LayerProps, S = {}> extends Layer<P, S> {}
class PathLayer<P extends LayerProps = LayerProps, S = {}> extends Layer<P, S> {}
class PolygonLayer<P extends LayerProps = LayerProps, S = {}> extends CompositeLayer<P, S> {}
class AttributeManager {
addInstanced(attributes: object, updaters?: object): void;
}
}
declare module "@deck.gl/core" {
import * as React from 'react';
import { Uniforms, LayerProps } from 'deck.gl';
class Layer <P extends LayerProps = LayerProps, S = {}> {
constructor(props: P);
context: any;
props: P;
state: S;
setUniforms(uniforms: Uniforms): any;
draw({uniforms}:{uniforms: Uniforms}): any;
setState<K extends keyof S>(
state: ((prevState: Readonly<S>, props: Readonly<P>) => (Pick<S, K> | S | null)) | (Pick<S, K> | S | null),
callback?: () => void
): void;
updateState(state: {
props: P,
oldProps: P,
changeFlags: any,
}): void;
}
}