1.0.1 • Published 6 years ago

noise-library v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

Javascript Noise Library

A speed-improved perlin and simplex noise algorithms for 2D. Based on example code by Stefan Gustavson (stegu@itn.liu.se). Optimisations by Peter Eastman (peastman@drizzle.stanford.edu). 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 (williamsiuhang@gmail.com)

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