-
Notifications
You must be signed in to change notification settings - Fork 0
/
typings.d.ts
42 lines (41 loc) · 1.2 KB
/
typings.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
declare module "canvas-sketch-util/random" {
export const createRandom: (seed?: number | string) => {
getRandomSeed: () => number;
setSeed: (n: number, opt?: {}) => void;
getSeed: () => number;
value: () => number;
shuffle: <T>(array: Array<T>) => Array<T>;
pick: <T>(array: Array<T>) => T;
gaussian: (mean: number, standardDerivation: number) => number;
onSphere: (radius?: number) => [number, number, number];
noise1D: (x: number, frequency?: number, amplitude?: number) => number;
noise2D: (
x: number,
y: number,
frequency?: number,
amplitude?: number
) => number;
noise3D: (
x: number,
y: number,
z: number,
frequency?: number,
amplitude?: number
) => number;
noise4D: (
x: number,
y: number,
z: number,
w: number,
frequency?: number,
amplitude?: number
) => number;
};
export const getRandomSeed: () => number;
export const setSeed: (n: number, opt?: {}) => void;
export const getSeed: () => number;
export const value: () => number;
}
declare module "canvas-sketch-util/math" {
export const clamp: (value: number, min: number, max: number) => number;
}