worley-noise
Worley noise in JavaScript.
What is it?
Worley noise (also called Voronoi or Cell noise) is a type of noise where the value of a point is based on its distance to a set of previously placed points. By using the distance to the closest point it produces images like this:
But we don't have to use the closest point, we can choose the second, third, etc. We can even combine these values by performing mathematical operations on them like addition and subtraction:
The previous images were generated by using the Euclidean distance for the calculations. If we use Manhattan distance we get quite different results:
The formula for generating these images can be found in the advanced example.
Getting started
npm install worley-noise
Example usage:
Canvas examples can be found in the project.
Development
Install dependencies:
npm install
Create a dev build:
npm run dev
Create a minified build:
npm run build