Want to see pretty graphs? Log in now!
npm install simplex-noise
|2||downloads in the last day|
|21||downloads in the last week|
|63||downloads in the last month|
|Last Published By|
|Version||2.1.1 last updated 2 years ago|
|Dependents||hex-terrain, hextiles-prototype, jsmc, voxel-land, voxel-simplex-terrain|
It requires typed arrays, if you want to use it in browsers without support you will need to use a polyfill like typedarray.js.
// initializing a simplex instance // do this only once it's relatively expensive var simplex = new SimplexNoise(), value2d = simplex.noise2D(x, y), value3d = simplex.noise3D(x, y, z), value4d = simplex.noise2D(x, y, z, w);
You can also pass an alternative random function to the constructor that is used to build the permutation table:
var simplex = new SimplexNoise(Math.random), value2d = simplex.noise2D(x, y);
- Initial Release