forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noisejs.d.ts
58 lines (51 loc) · 1.35 KB
/
noisejs.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
// Type definitions for noisejs
// Project: https://github.com/xixixao/noisejs
// Definitions by: Atsushi Izumihara <https://github.com/izmhr>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare class Noise {
/**
* Passing in seed will seed this Noise instance
* @param {number} seed
* @return {Noise} Noise instance
*/
constructor(seed?: number);
/**
* 2D simplex noise
* @param {number} x
* @param {number} y
* @return {number} noise value
*/
simplex2(x: number, y: number): number;
/**
* 3D simplex noise
* @param {number} x
* @param {number} y
* @param {number} z
* @return {number} noise value
*/
simplex3(x: number, y: number, z: number): number;
/**
* 2D Perlin Noise
* @param {number} x
* @param {number} y
* @return {number} noise value
*/
perlin2(x: number, y: number): number;
/**
* 3D Perlin Noise
* @param {number} x
* @param {number} y
* @param {number} z
* @return {number} noise value
*/
perlin3(x: number, y: number, z: number): number;
/**
* This isn't a very good seeding function, but it works ok. It supports 2^16
* different seed values. Write something better if you need more seeds.
* @param {number} seed [description]
*/
seed(seed: number): void;
}
declare module "noisejs" {
export = Noise;
}