noise-library
v1.0.1
Published
A collection of noise functions
Downloads
25
Maintainers
Readme
Javascript Noise Library
A speed-improved perlin and simplex noise algorithms for 2D. Based on example code by Stefan Gustavson ([email protected]). Optimisations by Peter Eastman ([email protected]). Better rank ordering method by Stefan Gustavson in 2012. Converted to Javascript by Joseph Gentle. Version 2012-03-09 This code was placed in the public domain by its original author, Stefan Gustavson. Version 2018-09-27 Converted into NPM module by William Siuhang ([email protected])
Installation
Install by running npm install noise-library
in terminal
Usage
Importing library for use import Noise from 'noise-library';
Example
import Noise from 'noise-library';
var perlinValue2d = Noise.perlin2(x, y);
var perlinValue3d = Noise.perlin3(x, y, z);
// where x, y, z are the normalized coordinates of a WebGL object vertice
Library includes Perlin, Simplex and Seed noise