All Projects → andrewrk → node-perlin-noise

andrewrk / node-perlin-noise

Licence: other
perlin noise generator for node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

perlin noise generator for node.js

Usage

var perlin = require('perlin-noise');

var noise = perlin.generatePerlinNoise(480, 480);
// noise is an array with length 480 * 480

Documentation

generatePerlinNoise(width, height, options)

Returns a one-dimensional of length width * height in row-major order. That is, index = y * width + height.

Each value in the array will be between 0 and 1.

  • options (optional)
    • octaveCount - defaults to 4
    • amplitude - defaults to 0.1
    • persistence - defaults to 0.2

generateWhiteNoise(width, height)

Returns a one-dimensional of length width * height in row-major order. That is, index = y * width + height.

Each value in the array will be between 0 and 1.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].