Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 608 Bytes

README.md

File metadata and controls

33 lines (26 loc) · 608 Bytes

js-value-noise

1.0.3

2D/3D Value Noise in Javascript!

Installation

From npm:

npm install js-value-noise

In browser:

<script src="./jsvaluenoise.min.js"></script>

In NodeJS project:

const vnoise = require("js-value-noise");

Usage

Live Demo!

Using fractal noise (6+ octaves for pleasant result):

//Seed can be any number
vnoise.seed = 0;

//Fractal noise returns a value between -2 and 2, depending on # octaves
value = vnoise.fractal2d(x, y, octaves);
value = vnoise.fractal3d(x, y, z, octaves);