forked from claus/react-dat-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
100 lines (80 loc) · 2.46 KB
/
index.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import * as React from 'react';
export interface DatGuiProps {
/**
* The data your dat.GUI controller will mutate
*/
data: any;
/**
* The method which will be called whenever an update is handled by the controller
*/
onUpdate: (data: any) => any;
/**
* The dat.GUI components that make up the controller
*/
children: any;
/**
* Determines if live updates should occur, defaults to true
*/
liveUpdate?: boolean;
/**
* The width of the labels in pixels, defaults to 40
*/
labelWidth?: number;
/**
* The class name to set on the DatGui div
*/
className?: string;
/**
* The style object to set on the DatGui div
*/
style?: React.CSSProperties;
}
/**
* A React reimplementation of Google's dat.GUI controller library.
*
* @see https://github.com/claus/react-dat-gui
*/
export default class DatGui extends React.Component<DatGuiProps> {}
export class DatUnchangableFieldProps {
label?: string;
}
export class DatChangableFieldProps extends DatUnchangableFieldProps {
path: string;
}
export interface DatButtonProps extends DatUnchangableFieldProps {
onClick: (e: React.MouseEvent) => any;
}
export class DatButton extends React.Component<DatButtonProps, any> {}
export interface DatFolderProps extends DatUnchangableFieldProps {
title: string;
closed: boolean;
children: any;
}
export class DatFolder extends React.Component<DatFolderProps, any> {}
export interface DatPresetsProps extends DatUnchangableFieldProps {
onUpdate: (data: any) => any;
options: {
presetName?: string;
data?: any; // Initial data
preset: any; // Your preset
};
}
export class DatPresets extends React.Component<DatPresetsProps, any> {}
export interface DatBooleanProps extends DatChangableFieldProps {}
export class DatBoolean extends React.Component<DatBooleanProps, any> {}
export interface DatColorProps extends DatChangableFieldProps {
[reactColorProp: string]: any;
}
export class DatColor extends React.Component<DatColorProps, any> {}
export interface DatNumberProps extends DatChangableFieldProps {
min: number;
max: number;
step: number;
}
export class DatNumber extends React.Component<DatNumberProps, any> {}
export interface DatSelectProps extends DatChangableFieldProps {
options: any[];
}
export class DatSelect extends React.Component<DatSelectProps, any> {}
export interface DatStringProps extends DatChangableFieldProps {}
export class DatString extends React.Component<DatStringProps, any> {}