-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
43 lines (34 loc) · 825 Bytes
/
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
interface Updatable {
update(step: number): void;
}
interface UiPropBase<T> {
propKey: keyof T;
name: string;
description?: string;
group?: string;
}
interface UiRangeProp<T> extends UiPropBase<T> {
type: "range";
min: number;
max: number;
increment: number;
initialValue: number;
}
interface MutableUiRangeProp<T> extends UiRangeProp<T> {
value: number;
}
interface UiBooleanProp<T> extends UiPropBase<T> {
type: "boolean";
initialValue: boolean;
}
interface MutableUiBooleanProp<T> extends UiBooleanProp<T> {
value: boolean;
}
type UiProp<T> = UiRangeProp<T> | UiBooleanProp<T>;
type MutableUiProp<T> = MutableUiRangeProp<T> | MutableUiBooleanProp<T>;
type UiPropList<T> = UiProp<T>[];
type VectorPair = {
x: number;
y: number;
};
type NoiseFunc = (x: number, y: number) => number;